static void DumpString(TString* s, DumpState* D) { if (s==NULL || getstr(s)==NULL) DumpSize(0,D); else { size_t size=s->tsv.len+1; /* include trailing '\0' */ DumpSize(size,D); DumpBlock(getstr(s),size,D); } }
static void DumpString(const TString* s, void* D) { if (s==NULL || s->str==NULL) DumpSize(0,D); else { size_t size=s->len+1; /* include trailing '\0' */ DumpSize(size,D); DumpBlock(s->str,size,D); } }
static void DumpString(const TString* s, DumpState* D) { if (s==NULL || getstr(s)==NULL) { strsize_t size=0; DumpSize(size,D); } else { strsize_t size=( strsize_t )s->tsv.len+1; /* include trailing '\0' */ DumpSize(size,D); DumpBlock(getstr(s),size,D); } }
void DumpFunction(TFunc* tf, FILE* D) { lastF=tf; ThreadCode(tf->code,tf->code+tf->size); fputc(ID_FUN,D); DumpSize(tf->size,D); DumpWord(tf->lineDefined,D); if (IsMain(tf)) DumpString(tf->fileName,D); else DumpWord(tf->marked,D); DumpBlock(tf->code,tf->size,D); DumpStrings(D); }