From b499d7e1e8c982d4c29df88b416b11b283ad161a Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 31 Oct 2001 17:55:35 +0000 Subject: [PATCH] I've decided that shuffling the `sections' like that doesn't really gain anything, so I'm reverting that change. --- tools/qfcc/source/qfcc.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/qfcc/source/qfcc.c b/tools/qfcc/source/qfcc.c index ed049b907..a905f72cf 100644 --- a/tools/qfcc/source/qfcc.c +++ b/tools/qfcc/source/qfcc.c @@ -330,6 +330,10 @@ WriteData (int crc) h = SafeOpenWrite (destfile); SafeWrite (h, &progs, sizeof (progs)); + progs.ofs_strings = ftell (h); + progs.numstrings = strofs; + SafeWrite (h, strings, strofs); + progs.ofs_statements = ftell (h); progs.numstatements = numstatements; for (i = 0; i < numstatements; i++) { @@ -340,6 +344,18 @@ WriteData (int crc) } SafeWrite (h, statements, numstatements * sizeof (dstatement_t)); + progs.ofs_functions = ftell (h); + progs.numfunctions = numfunctions; + for (i = 0; i < numfunctions; i++) { + functions[i].first_statement = LittleLong (functions[i].first_statement); + functions[i].parm_start = LittleLong (functions[i].parm_start); + functions[i].s_name = LittleLong (functions[i].s_name); + functions[i].s_file = LittleLong (functions[i].s_file); + functions[i].numparms = LittleLong (functions[i].numparms); + functions[i].locals = LittleLong (functions[i].locals); + } + SafeWrite (h, functions, numfunctions * sizeof (dfunction_t)); + progs.ofs_globaldefs = ftell (h); progs.numglobaldefs = numglobaldefs; for (i = 0; i < numglobaldefs; i++) { @@ -358,22 +374,6 @@ WriteData (int crc) } SafeWrite (h, fields, numfielddefs * sizeof (ddef_t)); - progs.ofs_functions = ftell (h); - progs.numfunctions = numfunctions; - for (i = 0; i < numfunctions; i++) { - functions[i].first_statement = LittleLong (functions[i].first_statement); - functions[i].parm_start = LittleLong (functions[i].parm_start); - functions[i].s_name = LittleLong (functions[i].s_name); - functions[i].s_file = LittleLong (functions[i].s_file); - functions[i].numparms = LittleLong (functions[i].numparms); - functions[i].locals = LittleLong (functions[i].locals); - } - SafeWrite (h, functions, numfunctions * sizeof (dfunction_t)); - - progs.ofs_strings = ftell (h); - progs.numstrings = strofs; - SafeWrite (h, strings, strofs); - progs.ofs_globals = ftell (h); progs.numglobals = numpr_globals; for (i = 0; i < numpr_globals; i++)