lscript_heap.cpp

Go to the documentation of this file.
00001 
00032 #if 0
00033 
00034 #include "linden_common.h"
00035 
00036 #include "lscript_heap.h"
00037 
00038 LLScriptHeapEntry::LLScriptHeapEntry(U8 *entry)
00039 : mEntry(entry)
00040 {
00041         S32 offset = 0;
00042         mNext = bytestream2integer(entry, offset);
00043         mRefCount = bytestream2integer(entry, offset);
00044         mType = *(entry + offset);
00045         mData = entry + offset;
00046         mListOffset = offset;
00047 }
00048 
00049 LLScriptHeapEntry::LLScriptHeapEntry(U8 *heap, S32 offset)
00050 : mNext(0x9), mType(0), mRefCount(0), mEntry(heap + offset), mData(heap + offset + 0x9), mListOffset(0x9)
00051 {
00052 }
00053 
00054 LLScriptHeapEntry::~LLScriptHeapEntry()
00055 {
00056 }
00057 
00058 void LLScriptHeapEntry::addString(char *string)
00059 {
00060         S32 size = strlen(string) + 1;          /*Flawfinder: ignore*/
00061         S32 offset = 0;
00062         memcpy(mData, string, size);            /*Flawfinder: ignore*/
00063         mNext += size;
00064         integer2bytestream(mEntry, offset, mNext);
00065         mRefCount++;
00066         integer2bytestream(mEntry, offset, mRefCount);
00067         *(mEntry + offset) = LSCRIPTTypeByte[LST_STRING];
00068 }
00069 
00070 
00071 
00072 #endif

Generated on Thu Jul 1 06:09:51 2010 for Second Life Viewer by  doxygen 1.4.7