00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "setup.h"
00023
00024 #if BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE
00025
00026 #include "bload.h"
00027 #include "envrnmnt.h"
00028
00029 #if BLOAD_AND_BSAVE
00030 #include "bsave.h"
00031 #endif
00032
00033 #include "moduldef.h"
00034
00035 #define _CSTRCBIN_SOURCE_
00036 #include "cstrcbin.h"
00037
00038 #if BLOAD_AND_BSAVE
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 globle void MarkConstructHeaderNeededItems(
00053 struct constructHeader *theConstruct,
00054 long theBsaveID)
00055 {
00056 theConstruct->name->neededSymbol = TRUE;
00057 theConstruct->bsaveID = theBsaveID;
00058 }
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 globle void AssignBsaveConstructHeaderVals(
00078 struct bsaveConstructHeader *theBsaveConstruct,
00079 struct constructHeader *theConstruct)
00080 {
00081 theBsaveConstruct->name = (long) theConstruct->name->bucket;
00082 theBsaveConstruct->whichModule = theConstruct->whichModule->theModule->bsaveID;
00083 if (theConstruct->next != NULL)
00084 theBsaveConstruct->next = ((struct constructHeader *) theConstruct->next)->bsaveID;
00085 else
00086 theBsaveConstruct->next = -1L;
00087 }
00088
00089 #endif
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109 LOCALE void UpdateConstructHeader(
00110 void *theEnv,
00111 struct bsaveConstructHeader *theBsaveConstruct,
00112 struct constructHeader *theConstruct,
00113 int itemModuleSize,
00114 void *itemModuleArray,
00115 int itemSize,
00116 void *itemArray)
00117 {
00118 long moduleOffset, itemOffset;
00119
00120 moduleOffset = itemModuleSize * theBsaveConstruct->whichModule;
00121 theConstruct->whichModule =
00122 (struct defmoduleItemHeader *) &((char *) itemModuleArray)[moduleOffset];
00123 theConstruct->name = SymbolPointer(theBsaveConstruct->name);
00124 IncrementSymbolCount(theConstruct->name);
00125 if (theBsaveConstruct->next != -1L)
00126 {
00127 itemOffset = itemSize * theBsaveConstruct->next;
00128 theConstruct->next = (struct constructHeader *) &((char *) itemArray)[itemOffset];
00129 }
00130 else
00131 theConstruct->next = NULL;
00132 theConstruct->ppForm = NULL;
00133 theConstruct->bsaveID = 0L;
00134 theConstruct->usrData = NULL;
00135 }
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146 globle void UnmarkConstructHeader(
00147 void *theEnv,
00148 struct constructHeader *theConstruct)
00149 {
00150 DecrementSymbolCount(theEnv,theConstruct->name);
00151 }
00152
00153 #endif
00154