mirror of https://git.wuffs.org/MWCC
get it to compile with clang
This commit is contained in:
parent
0bec4f557a
commit
54bb1363a2
|
@ -75,9 +75,8 @@ int Browser_SearchFile(OSHandle *browsetable, const char *fullpath, SInt16 *ID)
|
|||
SInt32 size;
|
||||
Boolean found = 0;
|
||||
|
||||
#line 114
|
||||
OPTION_ASSERT(OS_IsFullPath(fullpath));
|
||||
OPTION_ASSERT(browsetable!=NULL);
|
||||
OS_ASSERT(114, OS_IsFullPath(fullpath));
|
||||
OS_ASSERT(115, browsetable!=NULL);
|
||||
|
||||
GetBrowseTableInfoAndLock(browsetable, &scan, &cnt, &size);
|
||||
for (idx = 0; idx < cnt; idx++) {
|
||||
|
@ -167,9 +166,8 @@ int Browser_PackBrowseFile(Handle browsedata, OSHandle *browsetable, OSHandle *b
|
|||
int err;
|
||||
void *bptr;
|
||||
|
||||
#line 253
|
||||
OPTION_ASSERT(browsedata!=NULL);
|
||||
OPTION_ASSERT(browsetable!=NULL);
|
||||
OS_ASSERT(253, browsedata!=NULL);
|
||||
OS_ASSERT(254, browsetable!=NULL);
|
||||
|
||||
datasize = GetHandleSize(browsedata);
|
||||
tableoffs = (datasize + sizeof(header) + 7) & ~7;
|
||||
|
|
|
@ -99,8 +99,7 @@ static Boolean FindFileInPaths(Paths *paths, const char *filename, Path **thepat
|
|||
|
||||
for (idx = 0; idx < Paths_Count(paths); idx++) {
|
||||
path = Paths_GetPath(paths, idx);
|
||||
#line 175
|
||||
OPTION_ASSERT(path);
|
||||
OS_ASSERT(175, path);
|
||||
if (_FindFileInPath(path, filename, thepath, spec))
|
||||
return 1;
|
||||
}
|
||||
|
@ -263,8 +262,7 @@ int Deps_ChangeSpecialAccessPath(OSSpec *srcfss, Boolean initialize) {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
#line 468
|
||||
DO_INTERNAL_ERROR("Unhandled include file search type (%d)\n", optsCompiler.includeSearch);
|
||||
DO_INTERNAL_ERROR(468, "Unhandled include file search type (%d)\n", optsCompiler.includeSearch);
|
||||
}
|
||||
|
||||
specialAccessPath = FindOrAddGlobalInclPath(gTarg->incls.allPaths, pathspecptr);
|
||||
|
|
|
@ -415,8 +415,7 @@ static int CompileEntry(File *file, Boolean *compiled) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
#line 835
|
||||
OPTION_ASSERT(file->compiler);
|
||||
OS_ASSERT(835, file->compiler);
|
||||
|
||||
*compiled = 1;
|
||||
beginWork = OS_GetMilliseconds();
|
||||
|
@ -471,8 +470,7 @@ static void DumpFileAndPathInfo(void) {
|
|||
} else {
|
||||
for (i = 0; i < n; i++) {
|
||||
Path *path = Paths_GetPath(&FrameworkPaths, i);
|
||||
#line 961
|
||||
OPTION_ASSERT(path != NULL);
|
||||
OS_ASSERT(961, path != NULL);
|
||||
|
||||
CLReport(85,
|
||||
OS_PathSpecToString(path->spec, STSbuf, sizeof(STSbuf)),
|
||||
|
@ -483,8 +481,7 @@ static void DumpFileAndPathInfo(void) {
|
|||
UInt16 j;
|
||||
for (j = 0; j < Paths_Count(path->recursive); j++) {
|
||||
Path *sub = Paths_GetPath(path->recursive, j);
|
||||
#line 976
|
||||
OPTION_ASSERT(sub);
|
||||
OS_ASSERT(976, sub);
|
||||
CLReport(85, "\t", OS_PathSpecToString(sub->spec, STSbuf, sizeof(STSbuf)));
|
||||
}
|
||||
}
|
||||
|
@ -497,8 +494,7 @@ static void DumpFileAndPathInfo(void) {
|
|||
for (i = 0; i < n; i++) {
|
||||
char version[80];
|
||||
Paths_FWInfo *info = Frameworks_GetInfo(i);
|
||||
#line 993
|
||||
OPTION_ASSERT(info);
|
||||
OS_ASSERT(993, info);
|
||||
|
||||
version[0] = 0;
|
||||
strcpy(version, "\t(");
|
||||
|
@ -522,8 +518,7 @@ static void DumpFileAndPathInfo(void) {
|
|||
} else {
|
||||
for (i = 0; i < Paths_Count(&gTarg->userPaths); i++) {
|
||||
Path *path = Paths_GetPath(&gTarg->userPaths, i);
|
||||
#line 1024
|
||||
OPTION_ASSERT(path != NULL);
|
||||
OS_ASSERT(1024, path != NULL);
|
||||
|
||||
CLReport(85,
|
||||
OS_PathSpecToString(path->spec, STSbuf, sizeof(STSbuf)),
|
||||
|
@ -534,8 +529,7 @@ static void DumpFileAndPathInfo(void) {
|
|||
UInt16 j;
|
||||
for (j = 0; j < Paths_Count(path->recursive); j++) {
|
||||
Path *sub = Paths_GetPath(path->recursive, j);
|
||||
#line 1039
|
||||
OPTION_ASSERT(sub);
|
||||
OS_ASSERT(1039, sub);
|
||||
CLReport(85, "\t", OS_PathSpecToString(sub->spec, STSbuf, sizeof(STSbuf)));
|
||||
}
|
||||
}
|
||||
|
@ -550,8 +544,7 @@ static void DumpFileAndPathInfo(void) {
|
|||
|
||||
for (i = 0; i < Paths_Count(&gTarg->sysPaths); i++) {
|
||||
Path *path = Paths_GetPath(&gTarg->sysPaths, i);
|
||||
#line 1054
|
||||
OPTION_ASSERT(path != NULL);
|
||||
OS_ASSERT(1054, path != NULL);
|
||||
|
||||
CLReport(85,
|
||||
OS_PathSpecToString(path->spec, STSbuf, sizeof(STSbuf)),
|
||||
|
@ -562,8 +555,7 @@ static void DumpFileAndPathInfo(void) {
|
|||
UInt16 j;
|
||||
for (j = 0; j < Paths_Count(path->recursive); j++) {
|
||||
Path *sub = Paths_GetPath(path->recursive, j);
|
||||
#line 1069
|
||||
OPTION_ASSERT(sub);
|
||||
OS_ASSERT(1069, sub);
|
||||
CLReport(85, "\t", OS_PathSpecToString(sub->spec, STSbuf, sizeof(STSbuf)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -218,8 +218,7 @@ Boolean SendTargetInfoRequest(Target *targ, Plugin *linker, SInt32 dropinflags)
|
|||
if (linker && !(dropinflags & dropInExecutableTool)) {
|
||||
if (optsCmdLine.verbose > 1)
|
||||
CLReport(CLStr50, Plugin_GetDropInName(linker));
|
||||
#line 298
|
||||
OPTION_ASSERT(Plugin_GetPluginType(linker) == CWDROPINLINKERTYPE);
|
||||
OS_ASSERT(298, Plugin_GetPluginType(linker) == CWDROPINLINKERTYPE);
|
||||
|
||||
if (!Plugin_VerifyPanels(linker))
|
||||
return 0;
|
||||
|
|
|
@ -42,8 +42,7 @@ Handle PrefPanel_GetHandle(PrefPanel *panel) {
|
|||
else
|
||||
SetHandleSize(panel->workHandle, len);
|
||||
|
||||
#line 60
|
||||
OPTION_ASSERT(MemError()==noErr);
|
||||
OS_ASSERT(60, MemError()==noErr);
|
||||
|
||||
HLock(panel->data);
|
||||
HLock(panel->workHandle);
|
||||
|
|
|
@ -13,12 +13,9 @@ Target *Target_New(const char *name, OSType cpu, OSType os, OSType lang) {
|
|||
|
||||
OS_GetCWD(&targ->outputDirectory);
|
||||
|
||||
#line 25
|
||||
OPTION_ASSERT(Segments_Initialize(&targ->linkage.segs));
|
||||
#line 28
|
||||
OPTION_ASSERT(Overlays_Initialize(&targ->linkage.overlays));
|
||||
#line 35
|
||||
OPTION_ASSERT(Files_Initialize(&targ->files) && Files_Initialize(&targ->pchs) && VFiles_Initialize(&targ->virtualFiles) &&
|
||||
OS_ASSERT(25, Segments_Initialize(&targ->linkage.segs));
|
||||
OS_ASSERT(28, Overlays_Initialize(&targ->linkage.overlays));
|
||||
OS_ASSERT(35, Files_Initialize(&targ->files) && Files_Initialize(&targ->pchs) && VFiles_Initialize(&targ->virtualFiles) &&
|
||||
Paths_Initialize(&targ->sysPaths) && Paths_Initialize(&targ->userPaths) && Incls_Initialize(&targ->incls, targ));
|
||||
|
||||
return targ;
|
||||
|
|
|
@ -46,8 +46,7 @@ static int SetupLinkerCommandLine(SInt32 dropinflags, File *file, CWCommandLineA
|
|||
break;
|
||||
}
|
||||
|
||||
#line 89
|
||||
OPTION_ASSERT(x < numPlugins);
|
||||
OS_ASSERT(89, x < numPlugins);
|
||||
|
||||
args->argc = 1;
|
||||
args->argv = xmalloc("command-line arguments", 2 * sizeof(char *));
|
||||
|
@ -150,8 +149,7 @@ int ExecuteLinker(Plugin *plugin, SInt32 dropinflags, File *file, char *stdoutfi
|
|||
int x;
|
||||
|
||||
// TODO rename this flag to isExecutableTool
|
||||
#line 269
|
||||
OPTION_ASSERT(dropinflags & dropInExecutableTool);
|
||||
OS_ASSERT(269, dropinflags & dropInExecutableTool);
|
||||
|
||||
args.argc = 0;
|
||||
args.argv = args.envp = NULL;
|
||||
|
|
|
@ -6,8 +6,7 @@ int WriteObjectFile(File *file, OSType maccreator, OSType mactype) {
|
|||
FSSpec srcfss;
|
||||
FSSpec outfss;
|
||||
|
||||
#line 22
|
||||
OPTION_ASSERT(file->objectdata && file->compiler);
|
||||
OS_ASSERT(22, file->objectdata && file->compiler);
|
||||
|
||||
OS_OSSpec_To_FSSpec(&file->outfss, &outfss);
|
||||
OS_OSSpec_To_FSSpec(&file->srcfss, &srcfss);
|
||||
|
|
|
@ -52,10 +52,8 @@ CWResult UCBStoreObjectData(CWPluginContext context, SInt32 whichfile, CWObjectD
|
|||
UCBSecretAttachHandle(context, objecthand, &object->objectdata);
|
||||
UCBSecretAttachHandle(context, browsehand, &object->browsedata);
|
||||
} else {
|
||||
if (filedata->outfileowner && filedata->outfileowner != CmdLineStageMask_Cg) {
|
||||
#line 240
|
||||
DO_INTERNAL_ERROR("Cannot store object file spec for '%s'\n", filedata->srcfilename);
|
||||
}
|
||||
if (filedata->outfileowner && filedata->outfileowner != CmdLineStageMask_Cg)
|
||||
DO_INTERNAL_ERROR(240, "Cannot store object file spec for '%s'\n", filedata->srcfilename);
|
||||
OS_FSSpec_To_OSSpec(object->objectfile, &filedata->outfss);
|
||||
filedata->wroteToDisk |= CmdLineStageMask_Cg;
|
||||
}
|
||||
|
@ -134,8 +132,7 @@ CWResult UCBBeginSubCompile(CWPluginContext context, SInt32 whichfile, CWPluginC
|
|||
if (optsCmdLine.verbose > 3)
|
||||
CLPrint("Callback: %s\n", "UCBBeginSubCompile");
|
||||
|
||||
#line 372
|
||||
DO_INTERNAL_ERROR("UCBBeginSubCompile not implemented");
|
||||
DO_INTERNAL_ERROR(372, "UCBBeginSubCompile not implemented");
|
||||
return cwErrRequestFailed;
|
||||
}
|
||||
|
||||
|
@ -143,8 +140,7 @@ CWResult UCBEndSubCompile(CWPluginContext subContext) {
|
|||
if (optsCmdLine.verbose > 3)
|
||||
CLPrint("Callback: %s\n", "UCBEndSubCompile");
|
||||
|
||||
#line 384
|
||||
DO_INTERNAL_ERROR("UCBEndSubCompile not implemented");
|
||||
DO_INTERNAL_ERROR(384, "UCBEndSubCompile not implemented");
|
||||
return cwErrRequestFailed;
|
||||
}
|
||||
|
||||
|
@ -165,8 +161,7 @@ CWResult UCBGetPrecompiledHeaderSpec(CWPluginContext context, CWFileSpec *pchspe
|
|||
return cwErrInvalidCallback;
|
||||
|
||||
file = Files_GetFile(&gTarg->files, c->whichfile);
|
||||
#line 420
|
||||
OPTION_ASSERT(file != NULL);
|
||||
OS_ASSERT(420, file != NULL);
|
||||
|
||||
cof = Plugin_CL_GetObjectFlags(file->compiler);
|
||||
if (!file->outfilename[0]) {
|
||||
|
@ -222,8 +217,7 @@ CWResult UCBGetResourceFile(CWPluginContext context, CWFileSpec *filespec) {
|
|||
if (optsCmdLine.verbose > 3)
|
||||
CLPrint("Callback: %s\n", "UCBGetResourceFile");
|
||||
|
||||
#line 514
|
||||
DO_INTERNAL_ERROR("UCBGetResourceFile not implemented");
|
||||
DO_INTERNAL_ERROR(514, "UCBGetResourceFile not implemented");
|
||||
return cwErrRequestFailed;
|
||||
}
|
||||
|
||||
|
@ -231,8 +225,7 @@ CWResult UCBPutResourceFile(CWPluginContext context, const char *prompt, const c
|
|||
if (optsCmdLine.verbose > 3)
|
||||
CLPrint("Callback: %s\n", "UCBPutResourceFile");
|
||||
|
||||
#line 529
|
||||
DO_INTERNAL_ERROR("UCBPutResourceFile not implemented");
|
||||
DO_INTERNAL_ERROR(529, "UCBPutResourceFile not implemented");
|
||||
return cwErrRequestFailed;
|
||||
}
|
||||
|
||||
|
@ -270,8 +263,7 @@ CWResult UCBLookUpUnit(CWPluginContext context, const char *name, Boolean isdepe
|
|||
return cwErrInvalidCallback;
|
||||
|
||||
srcfile = Files_GetFile(&gTarg->files, c->whichfile);
|
||||
#line 591
|
||||
OPTION_ASSERT(srcfile != NULL);
|
||||
OS_ASSERT(591, srcfile != NULL);
|
||||
|
||||
*unitdata = NULL;
|
||||
*unitdatalength = 0;
|
||||
|
@ -403,8 +395,7 @@ CWResult UCBStoreUnit(CWPluginContext context, const char *inunitname, CWMemHand
|
|||
return cwErrInvalidCallback;
|
||||
|
||||
srcfile = Files_GetFile(&gTarg->files, c->whichfile);
|
||||
#line 791
|
||||
OPTION_ASSERT(srcfile != NULL);
|
||||
OS_ASSERT(791, srcfile != NULL);
|
||||
|
||||
if (optsCompiler.sbmPath[0]) {
|
||||
err = OS_MakeSpecWithPath(&clState.sbmPathSpec, unitname, 1, &sbmspec);
|
||||
|
@ -510,8 +501,7 @@ CWResult UCBGetModifiedFiles(CWPluginContext context, SInt32 *modifiedFileCount,
|
|||
CLPrint("Callback: %s\n", "UCBGetModifiedFiles");
|
||||
|
||||
*modifiedFileCount = 0;
|
||||
#line 949
|
||||
DO_INTERNAL_ERROR("CWGetModifiedFiles not implemented!\n");
|
||||
DO_INTERNAL_ERROR(949, "CWGetModifiedFiles not implemented!\n");
|
||||
return cwNoErr;
|
||||
}
|
||||
|
||||
|
@ -538,8 +528,7 @@ CWResult UCBGetStoredObjectFileSpec(CWPluginContext context, SInt32 whichfile, C
|
|||
if (!(file = Files_GetFile(&gTarg->files, whichfile)))
|
||||
return cwErrUnknownFile;
|
||||
if (file->outfileowner != CmdLineStageMask_Cg) {
|
||||
#line 993
|
||||
DO_INTERNAL_ERROR("Lost stored object file spec for '%s'\n", file->srcfilename);
|
||||
DO_INTERNAL_ERROR(993, "Lost stored object file spec for '%s'\n", file->srcfilename);
|
||||
return cwErrRequestFailed;
|
||||
} else {
|
||||
OS_OSSpec_To_FSSpec(&file->outfss, fileSpec);
|
||||
|
|
|
@ -203,8 +203,7 @@ static Boolean FindAndLoad_MissingFile(CWPluginContext context, const char *file
|
|||
return 0;
|
||||
|
||||
file = Files_GetFile(&gTarg->files, c->whichfile);
|
||||
#line 486
|
||||
OPTION_ASSERT(file != NULL);
|
||||
OS_ASSERT(486, file != NULL);
|
||||
|
||||
OS_MakeSpecWithPath(&file->srcfss.path, filename, 1, spec);
|
||||
Deps_AddDependency(&file->deps, -1, spec, !fileinfo->fullsearch && !optsCompiler.noSysPath, fileinfo->dependencyType, &fileinfo->alreadyincluded);
|
||||
|
@ -638,8 +637,7 @@ CWResult UCBStorePluginData(CWPluginContext context, SInt32 whichfile, CWDataTyp
|
|||
if (optsCmdLine.verbose > 3)
|
||||
CLPrint("Callback: %s\n", "UCBStorePluginData");
|
||||
|
||||
#line 1267
|
||||
DO_INTERNAL_ERROR("UCBStorePluginData not implemented");
|
||||
DO_INTERNAL_ERROR(1267, "UCBStorePluginData not implemented");
|
||||
return cwErrRequestFailed;
|
||||
}
|
||||
|
||||
|
@ -647,8 +645,7 @@ CWResult UCBGetPluginData(CWPluginContext context, SInt32 whichfile, CWDataType
|
|||
if (optsCmdLine.verbose > 3)
|
||||
CLPrint("Callback: %s\n", "UCBGetPluginData");
|
||||
|
||||
#line 1286
|
||||
DO_INTERNAL_ERROR("UCBGetPluginData not implemented");
|
||||
DO_INTERNAL_ERROR(1286, "UCBGetPluginData not implemented");
|
||||
return cwErrRequestFailed;
|
||||
}
|
||||
|
||||
|
@ -951,8 +948,7 @@ CWResult UCBCreateNewTextDocument(CWPluginContext context, const CWNewTextDocume
|
|||
return cwErrRequestFailed;
|
||||
}
|
||||
} else {
|
||||
#line 1755
|
||||
DO_INTERNAL_ERROR("Cannot deal with unexpected document");
|
||||
DO_INTERNAL_ERROR(1755, "Cannot deal with unexpected document");
|
||||
return cwErrInvalidCallback;
|
||||
}
|
||||
}
|
||||
|
@ -1062,8 +1058,7 @@ CWResult UCBPreFileAction(CWPluginContext context, const CWFileSpec *theFile) {
|
|||
if (optsCmdLine.verbose > 3)
|
||||
CLPrint("Callback: %s\n", "UCBPreFileAction");
|
||||
|
||||
#line 1963
|
||||
DO_INTERNAL_ERROR("UCBPreFileAction not implemented");
|
||||
DO_INTERNAL_ERROR(1963, "UCBPreFileAction not implemented");
|
||||
return cwErrRequestFailed;
|
||||
}
|
||||
|
||||
|
@ -1071,8 +1066,7 @@ CWResult UCBPostFileAction(CWPluginContext context, const CWFileSpec *theFile) {
|
|||
if (optsCmdLine.verbose > 3)
|
||||
CLPrint("Callback: %s\n", "UCBPostFileAction");
|
||||
|
||||
#line 1977
|
||||
DO_INTERNAL_ERROR("UCBPostFileAction not implemented");
|
||||
DO_INTERNAL_ERROR(1977, "UCBPostFileAction not implemented");
|
||||
return cwErrRequestFailed;
|
||||
}
|
||||
|
||||
|
@ -1100,8 +1094,7 @@ CWResult UCBCacheAccessPathList(CWPluginContext context) {
|
|||
for (x = 0; x < apl->userPathCount; x++) {
|
||||
ap = &apl->userPaths[x];
|
||||
path = Paths_GetPath(&gTarg->userPaths, x);
|
||||
#line 2010
|
||||
OPTION_ASSERT(path);
|
||||
OS_ASSERT(2010, path);
|
||||
|
||||
OS_MakeSpecWithPath(path->spec, NULL, 0, &spec);
|
||||
OS_OSSpec_To_FSSpec(&spec, &ap->pathSpec);
|
||||
|
@ -1132,8 +1125,7 @@ CWResult UCBCacheAccessPathList(CWPluginContext context) {
|
|||
for (x = 0; x < apl->systemPathCount; x++) {
|
||||
ap = &apl->systemPaths[x];
|
||||
path = Paths_GetPath(&gTarg->sysPaths, x);
|
||||
#line 2044
|
||||
OPTION_ASSERT(path);
|
||||
OS_ASSERT(2044, path);
|
||||
|
||||
OS_MakeSpecWithPath(path->spec, NULL, 0, &spec);
|
||||
OS_OSSpec_To_FSSpec(&spec, &ap->pathSpec);
|
||||
|
@ -1208,8 +1200,7 @@ CWResult UCBCheckinLicense(CWPluginContext context, SInt32 cookie) {
|
|||
}
|
||||
|
||||
CWResult UCBResolveRelativePath(CWPluginContext context, const CWRelativePath *relativePath, CWFileSpec *fileSpec, Boolean create) {
|
||||
#line 2255
|
||||
DO_INTERNAL_ERROR("UCBResolveRelativePath not implemented");
|
||||
DO_INTERNAL_ERROR(2255, "UCBResolveRelativePath not implemented");
|
||||
return cwErrRequestFailed;
|
||||
}
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ typedef struct {
|
|||
} UnkCLIOStruct;
|
||||
|
||||
// unknown names for these inlines
|
||||
inline void appendText(UnkCLIOStruct *f, const char *str) {
|
||||
CW_INLINE void appendText(UnkCLIOStruct *f, const char *str) {
|
||||
int len = strlen(str);
|
||||
|
||||
if (f->pos + len >= f->maxlen) {
|
||||
|
@ -278,7 +278,7 @@ inline void appendText(UnkCLIOStruct *f, const char *str) {
|
|||
f->pos += len;
|
||||
f->col += len;
|
||||
}
|
||||
inline void appendChar(UnkCLIOStruct *f, char c) {
|
||||
CW_INLINE void appendChar(UnkCLIOStruct *f, char c) {
|
||||
if (f->pos >= f->maxlen) {
|
||||
f->maxlen *= 2;
|
||||
if (f->original) {
|
||||
|
@ -301,7 +301,7 @@ static void StartLine(UnkCLIOStruct *f) {
|
|||
appendText(f, f->newline);
|
||||
}
|
||||
|
||||
inline void newLine(UnkCLIOStruct *f) {
|
||||
CW_INLINE void newLine(UnkCLIOStruct *f) {
|
||||
if (f->newline)
|
||||
appendChar(f, '\n');
|
||||
else
|
||||
|
@ -424,14 +424,12 @@ void CLPrintDispatch(int unk, SInt16 msgtype, const char *message) {
|
|||
const char *ptr;
|
||||
const char *nptr;
|
||||
|
||||
if (optsCmdLine.stderr2stdout == 1 || msgtype == Msg_Note || msgtype == Msg_Status) {
|
||||
if (optsCmdLine.stderr2stdout == 1 || msgtype == Msg_Note || msgtype == Msg_Status)
|
||||
out = stdout;
|
||||
} else if (msgtype == Msg_Warning || msgtype == Msg_Error || msgtype == Msg_Alert) {
|
||||
else if (msgtype == Msg_Warning || msgtype == Msg_Error || msgtype == Msg_Alert)
|
||||
out = stderr;
|
||||
} else {
|
||||
#line 847
|
||||
OPTION_ASSERT(0);
|
||||
}
|
||||
else
|
||||
OS_ASSERT(847, 0);
|
||||
|
||||
if (!printedAnything && !ioPiping) {
|
||||
printedAnything = 1;
|
||||
|
|
|
@ -672,8 +672,7 @@ OSErr FSMakeFSSpec(SInt16 vRefNum, SInt32 dirID, ConstStr255Param pathName, FSSp
|
|||
}
|
||||
OS_PathSpecToString(&spec.path, path, 256);
|
||||
} else {
|
||||
#line 840
|
||||
OPTION_ASSERT(vRefNum!=0);
|
||||
OS_ASSERT(840, vRefNum!=0);
|
||||
tmpfss.vRefNum = vRefNum;
|
||||
tmpfss.parID = dirID ? dirID : 2;
|
||||
tmpfss.name[0] = 0;
|
||||
|
|
|
@ -568,8 +568,7 @@ static void WriteResourceFork(SInt16 ref) {
|
|||
|
||||
mrle = mtyp->ref_list;
|
||||
while (mrle) {
|
||||
#line 943
|
||||
OPTION_ASSERT(reflist_offs < dmap.namelist_offs);
|
||||
OS_ASSERT(943, reflist_offs < dmap.namelist_offs);
|
||||
|
||||
drle.id = mrle->id;
|
||||
drle.name_offs = (mrle->name) ? name_offs : -1;
|
||||
|
@ -583,18 +582,16 @@ static void WriteResourceFork(SInt16 ref) {
|
|||
|
||||
reflist_offs += sizeof(trle);
|
||||
if (mrle->name) {
|
||||
#line 962
|
||||
if (dhdr.map_offs < dhdr.data_offs)
|
||||
OPTION_ASSERT(name_offs + dmap.namelist_offs + dhdr.map_offs < dhdr.data_offs);
|
||||
OS_ASSERT(963, name_offs + dmap.namelist_offs + dhdr.map_offs < dhdr.data_offs);
|
||||
RF_HANDLE_INSERT(hand_ref, mrle->name, dhdr.map_offs + dmap.namelist_offs + drle.name_offs, mrle->name[0] + 1);
|
||||
name_offs += mrle->name[0] + 1;
|
||||
}
|
||||
|
||||
#line 970
|
||||
OPTION_ASSERT(data_offs < dhdr.data_len);
|
||||
OPTION_ASSERT(mrle->hand!=NULL);
|
||||
OS_ASSERT(970, data_offs < dhdr.data_len);
|
||||
OS_ASSERT(971, mrle->hand!=NULL);
|
||||
if (dhdr.map_offs > dhdr.data_offs)
|
||||
OPTION_ASSERT(data_offs + dhdr.data_offs < dhdr.map_offs);
|
||||
OS_ASSERT(973, data_offs + dhdr.data_offs < dhdr.map_offs);
|
||||
|
||||
HLock(mrle->hand);
|
||||
dent.len = GetHandleSize(mrle->hand);
|
||||
|
|
|
@ -7,7 +7,7 @@ static OSOpenedDir wilddirref;
|
|||
static OSSpec wildmatch;
|
||||
char STSbuf[256];
|
||||
|
||||
inline char dummyfunc(int ch) {
|
||||
CW_INLINE char dummyfunc(int ch) {
|
||||
return ch;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,7 @@ void OS_AddFileTypeMappingList(OSFileTypeMappings **list, const OSFileTypeMappin
|
|||
scan = &(*scan)->next;
|
||||
|
||||
*scan = malloc(sizeof(OSFileTypeMappings));
|
||||
#line 40
|
||||
OPTION_ASSERT(*scan != NULL);
|
||||
OS_ASSERT(40, *scan != NULL);
|
||||
(*scan)->mappingList = entry;
|
||||
(*scan)->next = 0;
|
||||
}
|
||||
|
|
|
@ -94,8 +94,7 @@ static DirNode *FindDirMapEntry(unsigned int dirID) {
|
|||
|
||||
row = dirID >> 8;
|
||||
col = dirID & 0xFF;
|
||||
#line 166
|
||||
OPTION_ASSERT(dirID != 2);
|
||||
OS_ASSERT(166, dirID != 2);
|
||||
|
||||
if (row >= dirMapRows)
|
||||
return 0;
|
||||
|
@ -167,8 +166,7 @@ static int FindOrAdd(const OSPathSpec *path, unsigned int *vRefNum, unsigned int
|
|||
*vRefNum = vol->vRefNum;
|
||||
level = &vol->root;
|
||||
ptr = &pb[1];
|
||||
#line 267
|
||||
OPTION_ASSERT(*pb == OS_PATHSEP);
|
||||
OS_ASSERT(267, *pb == OS_PATHSEP);
|
||||
|
||||
while (*ptr) {
|
||||
st = ptr;
|
||||
|
|
|
@ -91,8 +91,7 @@ char *mvprintf(char *mybuf, unsigned int len, const char *format, va_list va) {
|
|||
int ret;
|
||||
char *buf;
|
||||
|
||||
#line 134
|
||||
OPTION_ASSERT(mybuf != NULL);
|
||||
OS_ASSERT(134, mybuf != NULL);
|
||||
|
||||
maxlen = len - 1;
|
||||
buf = mybuf;
|
||||
|
|
|
@ -15,8 +15,7 @@ const ToolVersionInfo *Plugin_GetToolVersionInfo(void) {
|
|||
|
||||
static const char *Plugin_GetDisplayName(Plugin *pl) {
|
||||
const char *name;
|
||||
#line 251
|
||||
OPTION_ASSERT(pl);
|
||||
OS_ASSERT(251, pl);
|
||||
|
||||
if (pl->cb->GetDisplayName && pl->cb->GetDisplayName(&name) == 0)
|
||||
return name;
|
||||
|
@ -26,8 +25,7 @@ static const char *Plugin_GetDisplayName(Plugin *pl) {
|
|||
|
||||
const char *Plugin_GetDropInName(Plugin *pl) {
|
||||
const char *name;
|
||||
#line 263
|
||||
OPTION_ASSERT(pl);
|
||||
OS_ASSERT(263, pl);
|
||||
|
||||
if (pl->cb->GetDropInName && pl->cb->GetDropInName(&name) == 0)
|
||||
return name;
|
||||
|
@ -38,8 +36,7 @@ const char *Plugin_GetDropInName(Plugin *pl) {
|
|||
const VersionInfo *Plugin_GetVersionInfo(Plugin *pl) {
|
||||
static const VersionInfo fakeversion = {0, 0, 0, 0};
|
||||
const VersionInfo *vi;
|
||||
#line 276
|
||||
OPTION_ASSERT(pl);
|
||||
OS_ASSERT(276, pl);
|
||||
|
||||
if (pl->cb->GetVersionInfo && pl->cb->GetVersionInfo(&vi) == 0)
|
||||
return vi;
|
||||
|
@ -82,8 +79,7 @@ DropInFlags *Plugin_GetDropInFlags(Plugin *pl) {
|
|||
const DropInFlags *df;
|
||||
SInt32 dfsize;
|
||||
|
||||
#line 329
|
||||
OPTION_ASSERT(pl);
|
||||
OS_ASSERT(329, pl);
|
||||
|
||||
if (pl->cb->GetDropInFlags && pl->cb->GetDropInFlags(&df, &dfsize) == 0) {
|
||||
memset(&retdf, 0, sizeof(retdf));
|
||||
|
@ -97,8 +93,7 @@ DropInFlags *Plugin_GetDropInFlags(Plugin *pl) {
|
|||
OSType Plugin_GetPluginType(Plugin *pl) {
|
||||
DropInFlags *df;
|
||||
|
||||
#line 345
|
||||
OPTION_ASSERT(pl);
|
||||
OS_ASSERT(345, pl);
|
||||
|
||||
df = Plugin_GetDropInFlags(pl);
|
||||
if (df)
|
||||
|
@ -115,9 +110,8 @@ const CWTargetList *Plugin_CL_GetTargetList(Plugin *pl) {
|
|||
};
|
||||
const CWTargetList *tl;
|
||||
|
||||
#line 358
|
||||
OPTION_ASSERT(pl);
|
||||
OPTION_ASSERT(pl->cl_cb != NULL);
|
||||
OS_ASSERT(358, pl);
|
||||
OS_ASSERT(359, pl->cl_cb != NULL);
|
||||
|
||||
if (pl->cl_cb->GetTargetList && pl->cl_cb->GetTargetList(&tl) == 0)
|
||||
return tl;
|
||||
|
@ -131,8 +125,7 @@ const CWPanelList *Plugin_GetPanelList(Plugin *pl) {
|
|||
};
|
||||
const CWPanelList *pnl;
|
||||
|
||||
#line 381
|
||||
OPTION_ASSERT(pl);
|
||||
OS_ASSERT(381, pl);
|
||||
|
||||
if (pl->cb->GetPanelList && pl->cb->GetPanelList(&pnl) == 0)
|
||||
return pnl;
|
||||
|
@ -147,9 +140,8 @@ const CWExtMapList *Plugin_CL_GetExtMapList(Plugin *pl) {
|
|||
};
|
||||
const CWExtMapList *el;
|
||||
|
||||
#line 401
|
||||
OPTION_ASSERT(pl);
|
||||
OPTION_ASSERT(pl->cl_cb != NULL);
|
||||
OS_ASSERT(401, pl);
|
||||
OS_ASSERT(402, pl->cl_cb != NULL);
|
||||
|
||||
if (pl->cl_cb->GetDefaultMappingList && pl->cl_cb->GetDefaultMappingList(&el) == 0)
|
||||
return el;
|
||||
|
@ -160,8 +152,7 @@ const CWExtMapList *Plugin_CL_GetExtMapList(Plugin *pl) {
|
|||
const OSFileTypeMappingList *Plugin_GetFileTypeMappingList(Plugin *pl) {
|
||||
const OSFileTypeMappingList *ftml;
|
||||
|
||||
#line 422
|
||||
OPTION_ASSERT(pl);
|
||||
OS_ASSERT(422, pl);
|
||||
|
||||
if (pl->cb->GetFileTypeMappings && pl->cb->GetFileTypeMappings(&ftml) == 0)
|
||||
return ftml;
|
||||
|
@ -177,9 +168,8 @@ const CWObjectFlags *Plugin_CL_GetObjectFlags(Plugin *pl) {
|
|||
};
|
||||
const CWObjectFlags *cof;
|
||||
|
||||
#line 434
|
||||
OPTION_ASSERT(pl);
|
||||
OPTION_ASSERT(pl->cl_cb != NULL);
|
||||
OS_ASSERT(434, pl);
|
||||
OS_ASSERT(435, pl->cl_cb != NULL);
|
||||
|
||||
if (pl->cl_cb->GetObjectFlags && pl->cl_cb->GetObjectFlags(&cof) == 0)
|
||||
return cof;
|
||||
|
@ -288,8 +278,7 @@ Boolean Plugin_MatchesType(Plugin *pl, OSType type, OSType lang, Boolean exact)
|
|||
Boolean Plugin_Pr_MatchesPlugin(Plugin *pl, CLPluginInfo *pluginfo, OSType cpu, OSType os) {
|
||||
Boolean isSupported;
|
||||
|
||||
#line 566
|
||||
OPTION_ASSERT(pl->pr_cb != NULL);
|
||||
OS_ASSERT(566, pl->pr_cb != NULL);
|
||||
|
||||
if (pl->pr_cb->SupportsPlugin && pl->pr_cb->SupportsPlugin(pluginfo, cpu, os, &isSupported) == 0)
|
||||
return isSupported;
|
||||
|
@ -300,8 +289,7 @@ Boolean Plugin_Pr_MatchesPlugin(Plugin *pl, CLPluginInfo *pluginfo, OSType cpu,
|
|||
Boolean Plugin_Pr_MatchesPanels(Plugin *pl, int numPanels, const char **panelNames) {
|
||||
Boolean isSupported;
|
||||
|
||||
#line 578
|
||||
OPTION_ASSERT(pl->pr_cb != NULL);
|
||||
OS_ASSERT(578, pl->pr_cb != NULL);
|
||||
|
||||
if (pl->pr_cb->SupportsPanels && pl->pr_cb->SupportsPanels(numPanels, panelNames, &isSupported) == 0)
|
||||
return isSupported;
|
||||
|
@ -312,9 +300,8 @@ Boolean Plugin_Pr_MatchesPanels(Plugin *pl, int numPanels, const char **panelNam
|
|||
Boolean Plugin_CL_WriteObjectFile(Plugin *pl, FSSpec *srcfss, FSSpec *outfss, OSType creator, OSType type, Handle data) {
|
||||
OSSpec outoss;
|
||||
|
||||
#line 590
|
||||
OPTION_ASSERT(pl->cl_cb != NULL);
|
||||
OPTION_ASSERT(data != NULL && srcfss != NULL && outfss != NULL);
|
||||
OS_ASSERT(590, pl->cl_cb != NULL);
|
||||
OS_ASSERT(591, data != NULL && srcfss != NULL && outfss != NULL);
|
||||
|
||||
if (pl->cl_cb->WriteObjectFile) {
|
||||
return pl->cl_cb->WriteObjectFile(srcfss, outfss, creator, type, data) == 0;
|
||||
|
@ -349,7 +336,7 @@ Boolean Plugin_CL_GetCompilerMapping(Plugin *pl, OSType type, const char *ext, U
|
|||
}
|
||||
|
||||
static Boolean SupportedPlugin(Plugin *pl, const char **reason) {
|
||||
static const SInt32 DropInFlagsSize[3] = {0, 0x10, 0x12};
|
||||
static const SInt32 DropInFlagsSize[3] = {0, sizeof(DropInFlagsV1), sizeof(DropInFlags)};
|
||||
const DropInFlags *df;
|
||||
const CWObjectFlags *cof;
|
||||
SInt32 dfsize;
|
||||
|
@ -884,9 +871,8 @@ int Plugins_GetPluginList(Plugin *list, int *numPlugins, CLPluginInfo **pluginIn
|
|||
while (scan) {
|
||||
df = Plugin_GetDropInFlags(scan);
|
||||
vi = Plugin_GetVersionInfo(scan);
|
||||
#line 1270
|
||||
OPTION_ASSERT(df != NULL);
|
||||
OPTION_ASSERT(vi != NULL);
|
||||
OS_ASSERT(1270, df != NULL);
|
||||
OS_ASSERT(1271, vi != NULL);
|
||||
(*pluginInfo)[idx].plugintype = df->dropintype;
|
||||
(*pluginInfo)[idx].language = df->edit_language;
|
||||
(*pluginInfo)[idx].dropinflags = df->dropinflags;
|
||||
|
|
|
@ -32,8 +32,7 @@ void Path_Free(Path *path) {
|
|||
}
|
||||
|
||||
Boolean Paths_Initialize(Paths *paths) {
|
||||
#line 52
|
||||
OPTION_ASSERT(paths != NULL);
|
||||
OS_ASSERT(52, paths != NULL);
|
||||
|
||||
memset(paths, 0, sizeof(Paths));
|
||||
paths->pathsArray = NULL;
|
||||
|
@ -43,8 +42,7 @@ Boolean Paths_Initialize(Paths *paths) {
|
|||
Boolean Paths_Terminate(Paths *paths) {
|
||||
UInt16 index;
|
||||
|
||||
#line 63
|
||||
OPTION_ASSERT(paths != NULL);
|
||||
OS_ASSERT(63, paths != NULL);
|
||||
|
||||
if (paths->pathsArray) {
|
||||
for (index = 0; index < paths->pathsCount; index++)
|
||||
|
@ -59,8 +57,7 @@ Boolean Paths_Terminate(Paths *paths) {
|
|||
static Boolean Paths_GrowPaths(Paths *paths, UInt16 *index) {
|
||||
Path **newArray;
|
||||
|
||||
#line 84
|
||||
OPTION_ASSERT(paths != NULL);
|
||||
OS_ASSERT(84, paths != NULL);
|
||||
|
||||
if (paths->pathsCount >= paths->arraySize) {
|
||||
paths->arraySize += 20;
|
||||
|
@ -116,8 +113,7 @@ Boolean Paths_DeletePath(Paths *paths, UInt16 index) {
|
|||
}
|
||||
|
||||
Path *Paths_GetPath(Paths *paths, UInt16 pathnum) {
|
||||
#line 151
|
||||
OPTION_ASSERT(paths != NULL);
|
||||
OS_ASSERT(151, paths != NULL);
|
||||
|
||||
if (pathnum < paths->pathsCount)
|
||||
return paths->pathsArray[pathnum];
|
||||
|
@ -126,8 +122,7 @@ Path *Paths_GetPath(Paths *paths, UInt16 pathnum) {
|
|||
}
|
||||
|
||||
UInt16 Paths_Count(const Paths *paths) {
|
||||
#line 161
|
||||
OPTION_ASSERT(paths != NULL);
|
||||
OS_ASSERT(161, paths != NULL);
|
||||
|
||||
return paths->pathsCount;
|
||||
}
|
||||
|
@ -135,8 +130,7 @@ UInt16 Paths_Count(const Paths *paths) {
|
|||
Boolean Paths_FindPath(const Paths *paths, const Path *path) {
|
||||
UInt16 idx;
|
||||
|
||||
#line 169
|
||||
OPTION_ASSERT(paths != NULL);
|
||||
OS_ASSERT(169, paths != NULL);
|
||||
|
||||
for (idx = 0; idx < paths->pathsCount; idx++) {
|
||||
if (paths->pathsArray[idx] == path)
|
||||
|
@ -150,8 +144,7 @@ Path *Paths_FindPathSpec(const Paths *paths, const OSPathSpec *dir) {
|
|||
UInt16 idx;
|
||||
Path *path;
|
||||
|
||||
#line 182
|
||||
OPTION_ASSERT(paths != NULL);
|
||||
OS_ASSERT(182, paths != NULL);
|
||||
|
||||
for (idx = 0; idx < paths->pathsCount; idx++) {
|
||||
path = paths->pathsArray[idx];
|
||||
|
@ -220,8 +213,7 @@ int Paths_CountRecurse(Paths *paths) {
|
|||
mine = Paths_Count(paths);
|
||||
for (idx = 0; idx < mine; idx++) {
|
||||
path = Paths_GetPath(paths, idx);
|
||||
#line 336
|
||||
OPTION_ASSERT(path);
|
||||
OS_ASSERT(336, path);
|
||||
|
||||
if (path->recursive)
|
||||
mine += Paths_CountRecurse(path->recursive);
|
||||
|
@ -237,11 +229,9 @@ static void CopyRecurseFSS(FSSpec **list, Paths *paths, UInt16 *count) {
|
|||
|
||||
for (idx = 0; idx < Paths_Count(paths); idx++) {
|
||||
path = Paths_GetPath(paths, idx);
|
||||
#line 353
|
||||
OPTION_ASSERT(path && *count > 0);
|
||||
OS_ASSERT(353, path && *count > 0);
|
||||
OS_MakeSpecWithPath(path->spec, NULL, 0, &spec);
|
||||
#line 355
|
||||
OPTION_ASSERT(OS_OSSpec_To_FSSpec(&spec, *list));
|
||||
OS_ASSERT(355, OS_OSSpec_To_FSSpec(&spec, *list));
|
||||
(*list)++;
|
||||
(*count)--;
|
||||
if (path->recursive)
|
||||
|
@ -251,13 +241,11 @@ static void CopyRecurseFSS(FSSpec **list, Paths *paths, UInt16 *count) {
|
|||
|
||||
void Paths_CopyRecurseFSS(FSSpec *list, Paths *paths, UInt16 count) {
|
||||
CopyRecurseFSS(&list, paths, &count);
|
||||
#line 367
|
||||
OPTION_ASSERT(count == 0);
|
||||
OS_ASSERT(367, count == 0);
|
||||
}
|
||||
|
||||
static Boolean Frameworks_Initialize(Frameworks *fws) {
|
||||
#line 405
|
||||
OPTION_ASSERT(fws != NULL);
|
||||
OS_ASSERT(405, fws != NULL);
|
||||
|
||||
memset(fws, 0, sizeof(Frameworks));
|
||||
fws->fwsArray = NULL;
|
||||
|
@ -267,8 +255,7 @@ static Boolean Frameworks_Initialize(Frameworks *fws) {
|
|||
static Boolean Frameworks_Grow(Frameworks *fws, UInt16 *index) {
|
||||
Paths_FWInfo **newArray;
|
||||
|
||||
#line 418
|
||||
OPTION_ASSERT(fws != NULL);
|
||||
OS_ASSERT(418, fws != NULL);
|
||||
|
||||
if (fws->fwsCount >= fws->arraySize) {
|
||||
fws->arraySize += 20;
|
||||
|
@ -461,9 +448,8 @@ void Framework_GetEnvInfo(void) {
|
|||
int err;
|
||||
Boolean is_file;
|
||||
|
||||
#line 672
|
||||
OPTION_ASSERT(Paths_Initialize(&FrameworkPaths) == 1);
|
||||
OPTION_ASSERT(Frameworks_Initialize(&FrameworkInfo) == 1);
|
||||
OS_ASSERT(672, Paths_Initialize(&FrameworkPaths) == 1);
|
||||
OS_ASSERT(673, Frameworks_Initialize(&FrameworkInfo) == 1);
|
||||
|
||||
env = getenv("MWFrameworkPaths");
|
||||
if (env) {
|
||||
|
@ -518,8 +504,7 @@ int Frameworks_GetCount(void) {
|
|||
}
|
||||
|
||||
Paths_FWInfo *Frameworks_GetInfo(int which) {
|
||||
#line 762
|
||||
OPTION_ASSERT(FrameworkInfo.fwsArray);
|
||||
OPTION_ASSERT(FrameworkInfo.fwsCount > which);
|
||||
OS_ASSERT(762, FrameworkInfo.fwsArray);
|
||||
OS_ASSERT(763, FrameworkInfo.fwsCount > which);
|
||||
return FrameworkInfo.fwsArray[which];
|
||||
}
|
||||
|
|
|
@ -30,8 +30,7 @@ void File_Free(File *file) {
|
|||
}
|
||||
|
||||
Boolean Files_Initialize(Files *this) {
|
||||
#line 47
|
||||
OPTION_ASSERT(this != NULL);
|
||||
OS_ASSERT(47, this != NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -39,8 +38,7 @@ Boolean Files_Terminate(Files *this) {
|
|||
File *file;
|
||||
File *next;
|
||||
|
||||
#line 56
|
||||
OPTION_ASSERT(this != NULL);
|
||||
OS_ASSERT(56, this != NULL);
|
||||
|
||||
for (file = this->fileList; file; file = next) {
|
||||
next = file->next;
|
||||
|
@ -57,9 +55,8 @@ Boolean Files_AddFile(Files *this, File *file) {
|
|||
Boolean Files_InsertFile(Files *this, File *file, SInt32 position) {
|
||||
File **scan;
|
||||
|
||||
#line 80
|
||||
OPTION_ASSERT(this != NULL);
|
||||
OPTION_ASSERT(file != NULL);
|
||||
OS_ASSERT(80, this != NULL);
|
||||
OS_ASSERT(81, file != NULL);
|
||||
|
||||
if (position < 0)
|
||||
position = 0;
|
||||
|
@ -81,9 +78,8 @@ Boolean Files_InsertFile(Files *this, File *file, SInt32 position) {
|
|||
File *Files_GetFile(Files *this, SInt32 filenum) {
|
||||
File *file;
|
||||
|
||||
#line 104
|
||||
OPTION_ASSERT(this != NULL);
|
||||
OPTION_ASSERT(filenum >= 0);
|
||||
OS_ASSERT(104, this != NULL);
|
||||
OS_ASSERT(105, filenum >= 0);
|
||||
|
||||
file = this->fileList;
|
||||
while (file && file->filenum != filenum)
|
||||
|
@ -101,8 +97,7 @@ File *Files_FindFile(Files *this, OSSpec *spec) {
|
|||
}
|
||||
|
||||
int Files_Count(Files *this) {
|
||||
#line 127
|
||||
OPTION_ASSERT(this != NULL);
|
||||
OS_ASSERT(127, this != NULL);
|
||||
|
||||
return this->fileCount;
|
||||
}
|
||||
|
|
|
@ -6,8 +6,7 @@ Boolean Overlays_Initialize(Overlays *this) {
|
|||
OvlAddr addr;
|
||||
SInt32 idx;
|
||||
|
||||
#line 24
|
||||
OPTION_ASSERT(this);
|
||||
OS_ASSERT(24, this);
|
||||
|
||||
this->groups = NULL;
|
||||
this->lastgrp = NULL;
|
||||
|
@ -24,12 +23,10 @@ Boolean Overlays_Initialize(Overlays *this) {
|
|||
return 0;
|
||||
|
||||
OvlGroup_AddOverlay(grp, ovl, &idx);
|
||||
#line 42
|
||||
OPTION_ASSERT(idx==0);
|
||||
OS_ASSERT(42, idx==0);
|
||||
|
||||
Overlays_AddOvlGroup(this, grp, &idx);
|
||||
#line 45
|
||||
OPTION_ASSERT(idx==0);
|
||||
OS_ASSERT(45, idx==0);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -38,8 +35,7 @@ Boolean Overlays_Terminate(Overlays *this) {
|
|||
OvlGroup *grp;
|
||||
OvlGroup *nxtgrp;
|
||||
|
||||
#line 54
|
||||
OPTION_ASSERT(this);
|
||||
OS_ASSERT(54, this);
|
||||
|
||||
for (grp = this->groups; grp; grp = nxtgrp) {
|
||||
nxtgrp = grp->next;
|
||||
|
@ -52,9 +48,8 @@ Boolean Overlays_Terminate(Overlays *this) {
|
|||
}
|
||||
|
||||
Boolean Overlays_AddOvlGroup(Overlays *this, OvlGroup *grp, SInt32 *grpnum) {
|
||||
#line 70
|
||||
OPTION_ASSERT(this);
|
||||
OPTION_ASSERT(grp);
|
||||
OS_ASSERT(70, this);
|
||||
OS_ASSERT(71, grp);
|
||||
|
||||
if (this->groups == NULL)
|
||||
this->groups = grp;
|
||||
|
@ -73,8 +68,7 @@ OvlGroup *Overlays_GetOvlGroup(Overlays *this, SInt32 grpnum) {
|
|||
OvlGroup *grp;
|
||||
SInt32 cnt = 0;
|
||||
|
||||
#line 93
|
||||
OPTION_ASSERT(this);
|
||||
OS_ASSERT(93, this);
|
||||
|
||||
grp = this->groups;
|
||||
while (grp && cnt < grpnum) {
|
||||
|
@ -92,8 +86,7 @@ SInt32 Overlays_CountGroups(Overlays *this) {
|
|||
OvlGroup *scan;
|
||||
int num = 0;
|
||||
|
||||
#line 112
|
||||
OPTION_ASSERT(this);
|
||||
OS_ASSERT(112, this);
|
||||
|
||||
scan = this->groups;
|
||||
while (scan) {
|
||||
|
@ -107,8 +100,7 @@ SInt32 Overlays_CountGroups(Overlays *this) {
|
|||
Boolean Overlays_AddFileToOverlay(Overlays *this, SInt32 grpnum, SInt32 ovlnum, SInt32 filenum) {
|
||||
Overlay *oly;
|
||||
|
||||
#line 130
|
||||
OPTION_ASSERT(this);
|
||||
OS_ASSERT(130, this);
|
||||
|
||||
oly = Overlays_GetOverlayInGroup(this, grpnum, ovlnum);
|
||||
if (oly)
|
||||
|
@ -120,8 +112,7 @@ Boolean Overlays_AddFileToOverlay(Overlays *this, SInt32 grpnum, SInt32 ovlnum,
|
|||
Overlay *Overlays_GetOverlayInGroup(Overlays *this, SInt32 grpnum, SInt32 ovlnum) {
|
||||
OvlGroup *grp;
|
||||
|
||||
#line 144
|
||||
OPTION_ASSERT(this);
|
||||
OS_ASSERT(144, this);
|
||||
|
||||
grp = Overlays_GetOvlGroup(this, grpnum);
|
||||
if (grp)
|
||||
|
@ -133,8 +124,7 @@ Overlay *Overlays_GetOverlayInGroup(Overlays *this, SInt32 grpnum, SInt32 ovlnum
|
|||
SInt32 Overlays_GetFileInOverlay(Overlays *this, SInt32 grpnum, SInt32 ovlnum, SInt32 filnum) {
|
||||
Overlay *oly;
|
||||
|
||||
#line 160
|
||||
OPTION_ASSERT(this);
|
||||
OS_ASSERT(160, this);
|
||||
|
||||
oly = Overlays_GetOverlayInGroup(this, grpnum, ovlnum);
|
||||
if (oly)
|
||||
|
@ -146,8 +136,7 @@ SInt32 Overlays_GetFileInOverlay(Overlays *this, SInt32 grpnum, SInt32 ovlnum, S
|
|||
OvlGroup *OvlGroup_New(const char *name, OvlAddr addr) {
|
||||
OvlGroup *grp;
|
||||
|
||||
#line 175
|
||||
OPTION_ASSERT(name);
|
||||
OS_ASSERT(175, name);
|
||||
|
||||
grp = xmalloc(NULL, sizeof(OvlGroup));
|
||||
if (grp) {
|
||||
|
@ -159,8 +148,7 @@ OvlGroup *OvlGroup_New(const char *name, OvlAddr addr) {
|
|||
grp->olycnt = 0;
|
||||
grp->next = NULL;
|
||||
} else {
|
||||
#line 188
|
||||
DO_INTERNAL_ERROR("Could not allocate %s", "overlay group");
|
||||
DO_INTERNAL_ERROR(188, "Could not allocate %s", "overlay group");
|
||||
}
|
||||
return grp;
|
||||
}
|
||||
|
@ -169,8 +157,7 @@ void OvlGroup_Delete(OvlGroup *grp) {
|
|||
Overlay *scan;
|
||||
Overlay *next;
|
||||
|
||||
#line 197
|
||||
OPTION_ASSERT(grp);
|
||||
OS_ASSERT(197, grp);
|
||||
|
||||
for (scan = grp->olys; scan; scan = next) {
|
||||
next = scan->next;
|
||||
|
@ -182,9 +169,8 @@ void OvlGroup_Delete(OvlGroup *grp) {
|
|||
}
|
||||
|
||||
Boolean OvlGroup_AddOverlay(OvlGroup *this, Overlay *oly, SInt32 *olynum) {
|
||||
#line 211
|
||||
OPTION_ASSERT(this);
|
||||
OPTION_ASSERT(oly);
|
||||
OS_ASSERT(211, this);
|
||||
OS_ASSERT(212, oly);
|
||||
|
||||
if (!this->lastoly)
|
||||
this->olys = oly;
|
||||
|
@ -203,8 +189,7 @@ Overlay *OvlGroup_GetOverlay(OvlGroup *this, SInt32 olynum) {
|
|||
Overlay *oly;
|
||||
SInt32 cnt = 0;
|
||||
|
||||
#line 234
|
||||
OPTION_ASSERT(this);
|
||||
OS_ASSERT(234, this);
|
||||
|
||||
oly = this->olys;
|
||||
while (oly && cnt < olynum) {
|
||||
|
@ -222,8 +207,7 @@ SInt32 OvlGroup_CountOverlays(OvlGroup *this) {
|
|||
Overlay *scan;
|
||||
int num = 0;
|
||||
|
||||
#line 254
|
||||
OPTION_ASSERT(this);
|
||||
OS_ASSERT(254, this);
|
||||
|
||||
scan = this->olys;
|
||||
while (scan) {
|
||||
|
@ -246,15 +230,13 @@ Overlay *Overlay_New(const char *name) {
|
|||
oly->cnt = 0;
|
||||
oly->next = NULL;
|
||||
} else {
|
||||
#line 281
|
||||
DO_INTERNAL_ERROR("Could not allocate %s", "overlay");
|
||||
DO_INTERNAL_ERROR(281, "Could not allocate %s", "overlay");
|
||||
}
|
||||
return oly;
|
||||
}
|
||||
|
||||
void Overlay_Delete(Overlay *oly) {
|
||||
#line 288
|
||||
OPTION_ASSERT(oly);
|
||||
OS_ASSERT(288, oly);
|
||||
|
||||
if (oly->list)
|
||||
xfree(oly->list);
|
||||
|
@ -262,8 +244,7 @@ void Overlay_Delete(Overlay *oly) {
|
|||
}
|
||||
|
||||
Boolean Overlay_AddFile(Overlay *oly, SInt32 filenum, SInt32 *filnum) {
|
||||
#line 296
|
||||
OPTION_ASSERT(oly);
|
||||
OS_ASSERT(296, oly);
|
||||
|
||||
if (oly->cnt >= oly->max) {
|
||||
oly->max += 16;
|
||||
|
@ -279,8 +260,7 @@ Boolean Overlay_AddFile(Overlay *oly, SInt32 filenum, SInt32 *filnum) {
|
|||
}
|
||||
|
||||
SInt32 Overlay_GetFile(Overlay *oly, SInt32 filnum) {
|
||||
#line 314
|
||||
OPTION_ASSERT(oly);
|
||||
OS_ASSERT(314, oly);
|
||||
|
||||
if (filnum < oly->cnt)
|
||||
return oly->list[filnum];
|
||||
|
@ -289,8 +269,7 @@ SInt32 Overlay_GetFile(Overlay *oly, SInt32 filnum) {
|
|||
}
|
||||
|
||||
SInt32 Overlay_CountFiles(Overlay *oly) {
|
||||
#line 323
|
||||
OPTION_ASSERT(oly);
|
||||
OS_ASSERT(323, oly);
|
||||
|
||||
return oly->cnt;
|
||||
}
|
||||
|
|
|
@ -8,8 +8,7 @@ Boolean Proj_Initialize(Project *this) {
|
|||
}
|
||||
|
||||
Boolean Proj_Terminate(Project *this) {
|
||||
#line 25
|
||||
OPTION_ASSERT(this != NULL);
|
||||
OS_ASSERT(25, this != NULL);
|
||||
|
||||
Targets_Term(this->targets);
|
||||
return 1;
|
||||
|
|
|
@ -18,21 +18,18 @@ Boolean Segments_Initialize(Segments *segs) {
|
|||
Segment *main;
|
||||
UInt16 idx;
|
||||
|
||||
#line 36
|
||||
OPTION_ASSERT(segs != NULL);
|
||||
OS_ASSERT(36, segs != NULL);
|
||||
|
||||
memset(segs, 0, sizeof(Segments));
|
||||
segs->segsArray = NULL;
|
||||
|
||||
jump = Segment_New("Jump Table", 0x28);
|
||||
Segments_AddSegment(segs, jump, &idx);
|
||||
#line 44
|
||||
OPTION_ASSERT(idx==0);
|
||||
OS_ASSERT(44, idx==0);
|
||||
|
||||
main = Segment_New("Main", 0xFFFF);
|
||||
Segments_AddSegment(segs, main, &idx);
|
||||
#line 49
|
||||
OPTION_ASSERT(idx==1);
|
||||
OS_ASSERT(49, idx==1);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -40,8 +37,7 @@ Boolean Segments_Initialize(Segments *segs) {
|
|||
Boolean Segments_Terminate(Segments *segs) {
|
||||
UInt16 index;
|
||||
|
||||
#line 57
|
||||
OPTION_ASSERT(segs != NULL);
|
||||
OS_ASSERT(57, segs != NULL);
|
||||
|
||||
if (segs->segsArray) {
|
||||
for (index = 0; index < segs->segsCount; index++)
|
||||
|
@ -56,8 +52,7 @@ Boolean Segments_Terminate(Segments *segs) {
|
|||
static Boolean Segments_GrowSegments(Segments *segs, UInt16 *index) {
|
||||
Segment **newArray;
|
||||
|
||||
#line 78
|
||||
OPTION_ASSERT(segs != NULL);
|
||||
OS_ASSERT(78, segs != NULL);
|
||||
|
||||
if (segs->segsCount >= segs->arraySize) {
|
||||
segs->arraySize += 20;
|
||||
|
@ -106,8 +101,7 @@ Boolean Segments_DeleteSegment(Segments *segs, UInt16 index) {
|
|||
}
|
||||
|
||||
Segment *Segments_GetSegment(Segments *segs, UInt16 segnum) {
|
||||
#line 137
|
||||
OPTION_ASSERT(segs != NULL);
|
||||
OS_ASSERT(137, segs != NULL);
|
||||
|
||||
if (segnum < segs->segsCount)
|
||||
return segs->segsArray[segnum];
|
||||
|
@ -116,8 +110,7 @@ Segment *Segments_GetSegment(Segments *segs, UInt16 segnum) {
|
|||
}
|
||||
|
||||
UInt16 Segments_Count(const Segments *segs) {
|
||||
#line 147
|
||||
OPTION_ASSERT(segs != NULL);
|
||||
OS_ASSERT(147, segs != NULL);
|
||||
|
||||
return segs->segsCount;
|
||||
}
|
||||
|
|
|
@ -1364,7 +1364,7 @@ static Boolean CScope_FindQualifiedTag(CScopeParseResult *result, NameSpace *nsp
|
|||
return 0;
|
||||
}
|
||||
|
||||
inline void CScope_NSIteratorInit(CScopeNSIterator *iterator, NameSpace *nspace, CScopeParseResult *result) {
|
||||
CW_INLINE void CScope_NSIteratorInit(CScopeNSIterator *iterator, NameSpace *nspace, CScopeParseResult *result) {
|
||||
// assumed name
|
||||
if (nspace->usings) {
|
||||
iterator->nspace = NULL;
|
||||
|
@ -1376,7 +1376,7 @@ inline void CScope_NSIteratorInit(CScopeNSIterator *iterator, NameSpace *nspace,
|
|||
iterator->result = result;
|
||||
}
|
||||
|
||||
inline Boolean CScope_NSIteratorNext(CScopeNSIterator *iterator) {
|
||||
CW_INLINE Boolean CScope_NSIteratorNext(CScopeNSIterator *iterator) {
|
||||
// assumed name
|
||||
if (iterator->lookup)
|
||||
return (iterator->lookup = iterator->lookup->next) != NULL;
|
||||
|
|
|
@ -225,7 +225,7 @@ static Boolean CExpr_IsBetterClassConversion(TypeClass *a, TypeClass *b, TypeCla
|
|||
return 0;
|
||||
}
|
||||
|
||||
inline Boolean Inline_501D40(Type *a, Type *b) {
|
||||
CW_INLINE Boolean Inline_501D40(Type *a, Type *b) {
|
||||
return (a == TYPE(&stbool)) && (IS_TYPE_POINTER_ONLY(b) || IS_TYPE_MEMBERPOINTER(b));
|
||||
}
|
||||
|
||||
|
@ -430,7 +430,7 @@ typedef enum MysteryEnum {
|
|||
ME_255 = 255
|
||||
} MysteryEnum;
|
||||
|
||||
inline MysteryEnum Inline_501FF0(UInt32 qual1, UInt32 qual2) {
|
||||
CW_INLINE MysteryEnum Inline_501FF0(UInt32 qual1, UInt32 qual2) {
|
||||
if ((qual1 & Q_CV) == (qual2 & Q_CV))
|
||||
return ME_0;
|
||||
|
||||
|
|
|
@ -386,7 +386,7 @@ static ENode *CInline_FoldConst(ENode *expr) {
|
|||
}
|
||||
|
||||
// unknown name
|
||||
inline SInt32 CInline_GetLocalID2(Object *object) {
|
||||
CW_INLINE SInt32 CInline_GetLocalID2(Object *object) {
|
||||
ObjectList *list;
|
||||
SInt32 counter;
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ static Type *CSOM_FindClassType(HashNameNode *name) {
|
|||
return type;
|
||||
}
|
||||
|
||||
static inline UInt16 CSOM_GetTokenTableIndex(const Object *object) {
|
||||
CW_INLINE UInt16 CSOM_GetTokenTableIndex(const Object *object) {
|
||||
CError_ASSERT(173, IS_TYPE_METHOD(object->type));
|
||||
return TYPE_METHOD(object->type)->x1E;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ static void DiadicOperatorPPC(IAExpr *left, short token, IAExpr *right);
|
|||
static void InlineAsm_ExpressionPPC(IAExpr *expr, SInt32 value);
|
||||
static void savepicbase(short reg, HashNameNode *name);
|
||||
|
||||
inline SInt32 ExtractValue(CInt64 value) {
|
||||
CW_INLINE SInt32 ExtractValue(CInt64 value) {
|
||||
return (SInt32) CInt64_GetULong(&value);
|
||||
}
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ static void MarkArgs(IROLinear *linear) {
|
|||
}
|
||||
|
||||
// assumed name, position
|
||||
static inline void MarkSubExpr(IROLinear *linear) {
|
||||
CW_INLINE void MarkSubExpr(IROLinear *linear) {
|
||||
int i;
|
||||
|
||||
switch (linear->type) {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -796,7 +796,7 @@ IROLinear *IRO_TempReference(Object *obj, IROList *list) {
|
|||
return ind;
|
||||
}
|
||||
|
||||
inline IROLinear *LocateFatherHelper(IROLinear *linear, Boolean a, IROLinear ***b) {
|
||||
CW_INLINE IROLinear *LocateFatherHelper(IROLinear *linear, Boolean a, IROLinear ***b) {
|
||||
IROLinear *scan;
|
||||
SInt32 index;
|
||||
int i;
|
||||
|
|
|
@ -119,7 +119,7 @@ enum {
|
|||
CLStr112 = 112
|
||||
};
|
||||
|
||||
#define DO_INTERNAL_ERROR(...) CLInternalError(__FILE__, __LINE__, __VA_ARGS__)
|
||||
#define DO_INTERNAL_ERROR(line, ...) CLInternalError(__FILE__, line, __VA_ARGS__)
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#pragma options align=mac68k
|
||||
|
|
|
@ -28,10 +28,14 @@
|
|||
|
||||
#define alloca(x) __alloca(x)
|
||||
|
||||
#define CW_INLINE inline
|
||||
|
||||
#else
|
||||
#include <stdarg.h>
|
||||
// expand this to nothing
|
||||
#define CW_PASCAL
|
||||
|
||||
#define CW_INLINE static inline
|
||||
#endif
|
||||
|
||||
// ----------
|
||||
|
|
|
@ -23,7 +23,7 @@ extern void Bv_Set(BitVector *bv);
|
|||
extern Boolean Bv_IsSubset(const BitVector *a, const BitVector *b);
|
||||
extern Boolean Bv_IsEmpty(const BitVector *bv);
|
||||
|
||||
inline void Bv_SetBit(UInt32 bit, BitVector *bv) {
|
||||
CW_INLINE void Bv_SetBit(UInt32 bit, BitVector *bv) {
|
||||
if ((bit / 32) < bv->size) {
|
||||
bv->data[bit / 32] |= 1 << (bit & 31);
|
||||
} else {
|
||||
|
|
|
@ -10,33 +10,33 @@ extern const CInt64 cint64_one;
|
|||
extern const CInt64 cint64_max;
|
||||
extern const CInt64 cint64_min;
|
||||
|
||||
inline Boolean CInt64_IsNegative(const CInt64 *n) {
|
||||
CW_INLINE Boolean CInt64_IsNegative(const CInt64 *n) {
|
||||
return (n->hi & 0x80000000) != 0;
|
||||
}
|
||||
inline UInt32 CInt64_GetULong(const CInt64 *n) { // 42E660 in mwcppc.exe
|
||||
CW_INLINE UInt32 CInt64_GetULong(const CInt64 *n) { // 42E660 in mwcppc.exe
|
||||
return n->lo;
|
||||
|
||||
}
|
||||
inline void CInt64_SetLong(CInt64 *pN, SInt32 n) {
|
||||
CW_INLINE void CInt64_SetLong(CInt64 *pN, SInt32 n) {
|
||||
pN->lo = n;
|
||||
pN->hi = (n < 0) ? 0xFFFFFFFF : 0;
|
||||
}
|
||||
inline void CInt64_SetULong(CInt64 *pN, UInt32 n) {
|
||||
CW_INLINE void CInt64_SetULong(CInt64 *pN, UInt32 n) {
|
||||
pN->lo = n;
|
||||
pN->hi = 0;
|
||||
}
|
||||
|
||||
inline Boolean CInt64_IsZero(CInt64 *n) {
|
||||
CW_INLINE Boolean CInt64_IsZero(CInt64 *n) {
|
||||
//if (n->hi == 0 && n->lo == 0)
|
||||
// return 1;
|
||||
//else
|
||||
// return 0;
|
||||
return n->hi == 0 && n->lo == 0;
|
||||
}
|
||||
inline Boolean CInt64_IsOne(CInt64 *n) { // assumed name
|
||||
CW_INLINE Boolean CInt64_IsOne(CInt64 *n) { // assumed name
|
||||
return n->hi == 0 && n->lo == 1;
|
||||
}
|
||||
inline void CInt64_Extend32(CInt64 *n) { // assumed name
|
||||
CW_INLINE void CInt64_Extend32(CInt64 *n) { // assumed name
|
||||
n->hi = (n->lo >> 31) ? 0xFFFFFFFF : 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ extern Object *InlineAsm_GetObjectOffset(InlineAsm *ia, SInt32 index, SInt32 *of
|
|||
extern char *InlineAsm_DumpStatement(Statement *stmt);
|
||||
|
||||
// unknown name
|
||||
inline void InlineAsm_InitExpr5(IAExpr *expr, SInt32 value) {
|
||||
CW_INLINE void InlineAsm_InitExpr5(IAExpr *expr, SInt32 value) {
|
||||
expr->type = IAExpr_5;
|
||||
expr->flags = 0;
|
||||
expr->value = value;
|
||||
|
@ -224,12 +224,12 @@ inline void InlineAsm_InitExpr5(IAExpr *expr, SInt32 value) {
|
|||
}
|
||||
|
||||
// unknown name
|
||||
inline int InlineAsm_CheckExpr(IAExpr *expr) {
|
||||
CW_INLINE int InlineAsm_CheckExpr(IAExpr *expr) {
|
||||
return (expr->xC == NULL && expr->object == NULL && expr->label == NULL);
|
||||
}
|
||||
|
||||
// unknown name
|
||||
inline SInt32 InlineAsm_GetExprValue(IAExpr *expr) {
|
||||
CW_INLINE SInt32 InlineAsm_GetExprValue(IAExpr *expr) {
|
||||
switch (expr->type) {
|
||||
case IAExpr_8:
|
||||
return HIGH_PART(expr->value);
|
||||
|
|
|
@ -62,20 +62,20 @@ extern void IRO_BuildFlowgraph(IROLinear *linear);
|
|||
extern IRONode *IRO_NewFlowGraphNode(void);
|
||||
extern IRONode *IRO_MergeFlowGraphNodes(IRONode *a, IRONode *b);
|
||||
|
||||
inline void IROFlowgraph_sub_4C2140(IRONodes *nodes) {
|
||||
CW_INLINE void IROFlowgraph_sub_4C2140(IRONodes *nodes) {
|
||||
nodes->indices = oalloc(sizeof(UInt16) * IRO_NumNodes);
|
||||
nodes->num = 0;
|
||||
nodes->base = 0;
|
||||
}
|
||||
|
||||
inline void IROFlowgraph_sub_4C20E0(IRONodes *nodes) {
|
||||
CW_INLINE void IROFlowgraph_sub_4C20E0(IRONodes *nodes) {
|
||||
}
|
||||
|
||||
inline UInt16 IROFlowgraph_sub_4C2040(IRONodes *nodes) {
|
||||
CW_INLINE UInt16 IROFlowgraph_sub_4C2040(IRONodes *nodes) {
|
||||
return nodes->num;
|
||||
}
|
||||
|
||||
inline UInt16 IROFlowgraph_sub_4C2100(IRONodes *nodes) {
|
||||
CW_INLINE UInt16 IROFlowgraph_sub_4C2100(IRONodes *nodes) {
|
||||
UInt16 result = -1;
|
||||
if (nodes->num) {
|
||||
result = nodes->indices[nodes->base];
|
||||
|
@ -85,7 +85,7 @@ inline UInt16 IROFlowgraph_sub_4C2100(IRONodes *nodes) {
|
|||
return result;
|
||||
}
|
||||
|
||||
inline void IROFlowgraph_sub_4C3880(IRONodes *nodes, UInt16 index) {
|
||||
CW_INLINE void IROFlowgraph_sub_4C3880(IRONodes *nodes, UInt16 index) {
|
||||
if (nodes->num < IRO_NumNodes) {
|
||||
nodes->indices[(nodes->base + nodes->num) % IRO_NumNodes] = index;
|
||||
nodes->num++;
|
||||
|
|
|
@ -106,19 +106,19 @@ extern void IRO_SetupForUserBreakChecking(void);
|
|||
extern void IRO_CheckForUserBreak(void);
|
||||
|
||||
// TODO is this elsewhere?
|
||||
inline Boolean IRO_IsUnsignedType(Type *type) {
|
||||
CW_INLINE Boolean IRO_IsUnsignedType(Type *type) {
|
||||
return is_unsigned(type);
|
||||
}
|
||||
|
||||
// 4B4D40
|
||||
inline CInt64 IRO_MakeULong(UInt32 i) {
|
||||
CW_INLINE CInt64 IRO_MakeULong(UInt32 i) {
|
||||
CInt64 val;
|
||||
CInt64_SetULong(&val, i);
|
||||
return val;
|
||||
}
|
||||
|
||||
// 4BAAA0
|
||||
inline CInt64 IRO_MakeLong(SInt32 i) {
|
||||
CW_INLINE CInt64 IRO_MakeLong(SInt32 i) {
|
||||
CInt64 val;
|
||||
CInt64_SetLong(&val, i);
|
||||
return val;
|
||||
|
|
|
@ -235,7 +235,7 @@ enum {
|
|||
// placing these here until further notice
|
||||
|
||||
// unknown name, mwcppc.exe 7.0: 484870
|
||||
inline Boolean Inline_IsObjectData(Object *object) {
|
||||
CW_INLINE Boolean Inline_IsObjectData(Object *object) {
|
||||
return object->datatype == DDATA;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
|
||||
#define OPTION_ASSERT(cond) do { if (!!(cond) == 0) { printf("%s:%u: failed assertion\n", __FILE__, __LINE__); abort(); } } while(0)
|
||||
#define OS_ASSERT(line, cond) do { if (!!(cond) == 0) { printf("%s:%u: failed assertion\n", __FILE__, line); abort(); } } while(0)
|
||||
|
||||
typedef struct uOSTypePair {
|
||||
int perm;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -557,8 +557,7 @@ void Arg_AddToToolArgs(anon0_50 *ta, short tokval, char *toktxt) {
|
|||
Arg_GrowArg(ta, ",");
|
||||
break;
|
||||
default:
|
||||
#line 787
|
||||
CLPFatalError(__FILE__, __LINE__, "Unknown token (%d)", tokval);
|
||||
CLPFatalError(__FILE__, 787, "Unknown token (%d)", tokval);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,8 +81,7 @@ int Args_StackSize(void) {
|
|||
}
|
||||
|
||||
void Args_Push(short flags, void *first, void *second) {
|
||||
#line 104
|
||||
OPTION_ASSERT(oStackPtr<MAXSTACK);
|
||||
OS_ASSERT(104, oStackPtr<MAXSTACK);
|
||||
if (oStackPtr > 0)
|
||||
{
|
||||
short prev =
|
||||
|
@ -943,8 +942,7 @@ static int Options_DoParse(OptionList *search, int flags) {
|
|||
tok = Arg_GetToken();
|
||||
if (!tok)
|
||||
tok = Arg_UndoToken();
|
||||
#line 1335
|
||||
OPTION_ASSERT(tok);
|
||||
OS_ASSERT(1335, tok);
|
||||
}
|
||||
|
||||
if (!parsedany || haderrors)
|
||||
|
|
|
@ -1012,8 +1012,7 @@ static int Param_GetArgument(PARAM_T *param, const char **cparam, int exec) {
|
|||
lastOpt = !subparse ? ATK_END : ATK_ARG_END;
|
||||
|
||||
tok = Arg_PeekToken();
|
||||
#line 1467
|
||||
OPTION_ASSERT(tok);
|
||||
OS_ASSERT(1467, tok);
|
||||
|
||||
if ((param->flags & PARAMFLAGS_3) == 0) {
|
||||
if (tok->val == nextParam || tok->val == ATK_EQUALS)
|
||||
|
|
|
@ -140,16 +140,14 @@ int SetupPragmas(const Pragma *pragmas) {
|
|||
else if (*((char *)pragmas->value) == PR_RESET)
|
||||
set = "reset";
|
||||
else
|
||||
#line 186
|
||||
OPTION_ASSERT(*((char *)pragmas->value) == PR_UNSET);
|
||||
OS_ASSERT(186, *((char *)pragmas->value) == PR_UNSET);
|
||||
|
||||
if (set) {
|
||||
snprintf(tmp, sizeof(tmp), "#pragma %s %s\n", pragmas->pragma, set);
|
||||
AddStringToHandle(&definesHandle, tmp);
|
||||
}
|
||||
} else {
|
||||
#line 195
|
||||
OPTION_ASSERT(!"Can't handle pragma");
|
||||
OS_ASSERT(195, !"Can't handle pragma");
|
||||
}
|
||||
pragmas++;
|
||||
}
|
||||
|
|
|
@ -5,8 +5,7 @@ ParserTool *pTool;
|
|||
int SetParserToolInfo(ParserTool *tool) {
|
||||
pTool = tool;
|
||||
|
||||
#line 16
|
||||
OPTION_ASSERT(pTool->toolInfo && (parseopts.toolVersion || pTool->copyright));
|
||||
OS_ASSERT(16, pTool->toolInfo && (parseopts.toolVersion || pTool->copyright));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue