summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--command_line/CmdLine/Src/CLBrowser.c10
-rw-r--r--command_line/CmdLine/Src/CLDependencies.c6
-rw-r--r--command_line/CmdLine/Src/CLFileOps.c24
-rw-r--r--command_line/CmdLine/Src/CLPluginRequests.cpp3
-rw-r--r--command_line/CmdLine/Src/CLPrefs.c3
-rw-r--r--command_line/CmdLine/Src/CLTarg.c9
-rw-r--r--command_line/CmdLine/Src/CLToolExec.c6
-rw-r--r--command_line/CmdLine/Src/CLWriteObjectFile.c3
-rw-r--r--command_line/CmdLine/Src/Callbacks/CLCompilerLinkerDropin_V10.cpp33
-rw-r--r--command_line/CmdLine/Src/Callbacks/CLDropinCallbacks_V10.cpp27
-rw-r--r--command_line/CmdLine/Src/Envir/CLIO.c16
-rw-r--r--command_line/CmdLine/Src/MacEmul/Files.c3
-rw-r--r--command_line/CmdLine/Src/MacEmul/Resources.c13
-rw-r--r--command_line/CmdLine/Src/OSLib/Generic.c2
-rw-r--r--command_line/CmdLine/Src/OSLib/MacFileTypes.c3
-rw-r--r--command_line/CmdLine/Src/OSLib/MacSpecs.c6
-rw-r--r--command_line/CmdLine/Src/OSLib/StringUtils.c3
-rw-r--r--command_line/CmdLine/Src/Plugins/CLPlugins.c54
-rw-r--r--command_line/CmdLine/Src/Project/CLAccessPaths.c49
-rw-r--r--command_line/CmdLine/Src/Project/CLFiles.c19
-rw-r--r--command_line/CmdLine/Src/Project/CLOverlays.c67
-rw-r--r--command_line/CmdLine/Src/Project/CLProj.c3
-rw-r--r--command_line/CmdLine/Src/Project/CLSegs.c21
-rw-r--r--compiler_and_linker/FrontEnd/C/CScope.c4
-rw-r--r--compiler_and_linker/unsorted/CExprConvMatch.c4
-rw-r--r--compiler_and_linker/unsorted/CInline.c2
-rw-r--r--compiler_and_linker/unsorted/CSOM.c2
-rw-r--r--compiler_and_linker/unsorted/InlineAsmPPC.c2
-rw-r--r--compiler_and_linker/unsorted/IroLinearForm.c2
-rw-r--r--compiler_and_linker/unsorted/IroPointerAnalysisADTs.c416
-rw-r--r--compiler_and_linker/unsorted/IroUtil.c2
-rw-r--r--includes/cmdline.h2
-rw-r--r--includes/common.h4
-rw-r--r--includes/compiler/BitVector.h2
-rw-r--r--includes/compiler/CInt64.h14
-rw-r--r--includes/compiler/InlineAsm.h6
-rw-r--r--includes/compiler/IroFlowgraph.h10
-rw-r--r--includes/compiler/IroUtil.h6
-rw-r--r--includes/compiler/objects.h2
-rw-r--r--includes/oslib.h1
-rwxr-xr-xsdk_hdrs/CWPlugins.h2
-rw-r--r--unsorted/Arguments.c3
-rw-r--r--unsorted/Option.c6
-rw-r--r--unsorted/Parameter.c3
-rw-r--r--unsorted/ParserHelpers-cc.c6
-rw-r--r--unsorted/Targets.c3
46 files changed, 386 insertions, 501 deletions
diff --git a/command_line/CmdLine/Src/CLBrowser.c b/command_line/CmdLine/Src/CLBrowser.c
index 826d395..2679e52 100644
--- a/command_line/CmdLine/Src/CLBrowser.c
+++ b/command_line/CmdLine/Src/CLBrowser.c
@@ -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;
diff --git a/command_line/CmdLine/Src/CLDependencies.c b/command_line/CmdLine/Src/CLDependencies.c
index 6590257..724141a 100644
--- a/command_line/CmdLine/Src/CLDependencies.c
+++ b/command_line/CmdLine/Src/CLDependencies.c
@@ -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);
diff --git a/command_line/CmdLine/Src/CLFileOps.c b/command_line/CmdLine/Src/CLFileOps.c
index be3c00c..a5976be 100644
--- a/command_line/CmdLine/Src/CLFileOps.c
+++ b/command_line/CmdLine/Src/CLFileOps.c
@@ -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)));
}
}
diff --git a/command_line/CmdLine/Src/CLPluginRequests.cpp b/command_line/CmdLine/Src/CLPluginRequests.cpp
index 9de50ba..dc11d18 100644
--- a/command_line/CmdLine/Src/CLPluginRequests.cpp
+++ b/command_line/CmdLine/Src/CLPluginRequests.cpp
@@ -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;
diff --git a/command_line/CmdLine/Src/CLPrefs.c b/command_line/CmdLine/Src/CLPrefs.c
index dba6dd8..b825c4a 100644
--- a/command_line/CmdLine/Src/CLPrefs.c
+++ b/command_line/CmdLine/Src/CLPrefs.c
@@ -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);
diff --git a/command_line/CmdLine/Src/CLTarg.c b/command_line/CmdLine/Src/CLTarg.c
index a3f4389..6a1782a 100644
--- a/command_line/CmdLine/Src/CLTarg.c
+++ b/command_line/CmdLine/Src/CLTarg.c
@@ -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;
diff --git a/command_line/CmdLine/Src/CLToolExec.c b/command_line/CmdLine/Src/CLToolExec.c
index 9bc4213..cbd1a91 100644
--- a/command_line/CmdLine/Src/CLToolExec.c
+++ b/command_line/CmdLine/Src/CLToolExec.c
@@ -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;
diff --git a/command_line/CmdLine/Src/CLWriteObjectFile.c b/command_line/CmdLine/Src/CLWriteObjectFile.c
index 6e92114..22028dc 100644
--- a/command_line/CmdLine/Src/CLWriteObjectFile.c
+++ b/command_line/CmdLine/Src/CLWriteObjectFile.c
@@ -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);
diff --git a/command_line/CmdLine/Src/Callbacks/CLCompilerLinkerDropin_V10.cpp b/command_line/CmdLine/Src/Callbacks/CLCompilerLinkerDropin_V10.cpp
index 070bc07..3804b93 100644
--- a/command_line/CmdLine/Src/Callbacks/CLCompilerLinkerDropin_V10.cpp
+++ b/command_line/CmdLine/Src/Callbacks/CLCompilerLinkerDropin_V10.cpp
@@ -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);
diff --git a/command_line/CmdLine/Src/Callbacks/CLDropinCallbacks_V10.cpp b/command_line/CmdLine/Src/Callbacks/CLDropinCallbacks_V10.cpp
index ed02965..24eaf83 100644
--- a/command_line/CmdLine/Src/Callbacks/CLDropinCallbacks_V10.cpp
+++ b/command_line/CmdLine/Src/Callbacks/CLDropinCallbacks_V10.cpp
@@ -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;
}
diff --git a/command_line/CmdLine/Src/Envir/CLIO.c b/command_line/CmdLine/Src/Envir/CLIO.c
index 0c07eaf..1d6eaad 100644
--- a/command_line/CmdLine/Src/Envir/CLIO.c
+++ b/command_line/CmdLine/Src/Envir/CLIO.c
@@ -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;
diff --git a/command_line/CmdLine/Src/MacEmul/Files.c b/command_line/CmdLine/Src/MacEmul/Files.c
index a613b4a..02760e7 100644
--- a/command_line/CmdLine/Src/MacEmul/Files.c
+++ b/command_line/CmdLine/Src/MacEmul/Files.c
@@ -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;
diff --git a/command_line/CmdLine/Src/MacEmul/Resources.c b/command_line/CmdLine/Src/MacEmul/Resources.c
index 821df0b..1563898 100644
--- a/command_line/CmdLine/Src/MacEmul/Resources.c
+++ b/command_line/CmdLine/Src/MacEmul/Resources.c
@@ -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);
diff --git a/command_line/CmdLine/Src/OSLib/Generic.c b/command_line/CmdLine/Src/OSLib/Generic.c
index f2c2ac9..84de7fd 100644
--- a/command_line/CmdLine/Src/OSLib/Generic.c
+++ b/command_line/CmdLine/Src/OSLib/Generic.c
@@ -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;
}
diff --git a/command_line/CmdLine/Src/OSLib/MacFileTypes.c b/command_line/CmdLine/Src/OSLib/MacFileTypes.c
index 5ebb4d6..d8e63a8 100644
--- a/command_line/CmdLine/Src/OSLib/MacFileTypes.c
+++ b/command_line/CmdLine/Src/OSLib/MacFileTypes.c
@@ -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;
}
diff --git a/command_line/CmdLine/Src/OSLib/MacSpecs.c b/command_line/CmdLine/Src/OSLib/MacSpecs.c
index ece3d96..6d11620 100644
--- a/command_line/CmdLine/Src/OSLib/MacSpecs.c
+++ b/command_line/CmdLine/Src/OSLib/MacSpecs.c
@@ -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;
diff --git a/command_line/CmdLine/Src/OSLib/StringUtils.c b/command_line/CmdLine/Src/OSLib/StringUtils.c
index 9d5d110..b2a71e7 100644
--- a/command_line/CmdLine/Src/OSLib/StringUtils.c
+++ b/command_line/CmdLine/Src/OSLib/StringUtils.c
@@ -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;
diff --git a/command_line/CmdLine/Src/Plugins/CLPlugins.c b/command_line/CmdLine/Src/Plugins/CLPlugins.c
index 38af6fe..8db8398 100644
--- a/command_line/CmdLine/Src/Plugins/CLPlugins.c
+++ b/command_line/CmdLine/Src/Plugins/CLPlugins.c
@@ -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;
diff --git a/command_line/CmdLine/Src/Project/CLAccessPaths.c b/command_line/CmdLine/Src/Project/CLAccessPaths.c
index d20b16b..1b455da 100644
--- a/command_line/CmdLine/Src/Project/CLAccessPaths.c
+++ b/command_line/CmdLine/Src/Project/CLAccessPaths.c
@@ -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];
}
diff --git a/command_line/CmdLine/Src/Project/CLFiles.c b/command_line/CmdLine/Src/Project/CLFiles.c
index 6953df1..e651c73 100644
--- a/command_line/CmdLine/Src/Project/CLFiles.c
+++ b/command_line/CmdLine/Src/Project/CLFiles.c
@@ -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;
}
diff --git a/command_line/CmdLine/Src/Project/CLOverlays.c b/command_line/CmdLine/Src/Project/CLOverlays.c
index 3437366..2656869 100644
--- a/command_line/CmdLine/Src/Project/CLOverlays.c
+++ b/command_line/CmdLine/Src/Project/CLOverlays.c
@@ -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;
}
diff --git a/command_line/CmdLine/Src/Project/CLProj.c b/command_line/CmdLine/Src/Project/CLProj.c
index 83b2ce1..79b99ae 100644
--- a/command_line/CmdLine/Src/Project/CLProj.c
+++ b/command_line/CmdLine/Src/Project/CLProj.c
@@ -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;
diff --git a/command_line/CmdLine/Src/Project/CLSegs.c b/command_line/CmdLine/Src/Project/CLSegs.c
index a0e006c..e2c7369 100644
--- a/command_line/CmdLine/Src/Project/CLSegs.c
+++ b/command_line/CmdLine/Src/Project/CLSegs.c
@@ -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;
}
diff --git a/compiler_and_linker/FrontEnd/C/CScope.c b/compiler_and_linker/FrontEnd/C/CScope.c
index a59a8a7..ef5695c 100644
--- a/compiler_and_linker/FrontEnd/C/CScope.c
+++ b/compiler_and_linker/FrontEnd/C/CScope.c
@@ -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;
diff --git a/compiler_and_linker/unsorted/CExprConvMatch.c b/compiler_and_linker/unsorted/CExprConvMatch.c
index 24afb62..69e6651 100644
--- a/compiler_and_linker/unsorted/CExprConvMatch.c
+++ b/compiler_and_linker/unsorted/CExprConvMatch.c
@@ -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;
diff --git a/compiler_and_linker/unsorted/CInline.c b/compiler_and_linker/unsorted/CInline.c
index 85cdf83..7d3c2ef 100644
--- a/compiler_and_linker/unsorted/CInline.c
+++ b/compiler_and_linker/unsorted/CInline.c
@@ -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;
diff --git a/compiler_and_linker/unsorted/CSOM.c b/compiler_and_linker/unsorted/CSOM.c
index 896c425..816c749 100644
--- a/compiler_and_linker/unsorted/CSOM.c
+++ b/compiler_and_linker/unsorted/CSOM.c
@@ -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;
}
diff --git a/compiler_and_linker/unsorted/InlineAsmPPC.c b/compiler_and_linker/unsorted/InlineAsmPPC.c
index 834432c..606b6af 100644
--- a/compiler_and_linker/unsorted/InlineAsmPPC.c
+++ b/compiler_and_linker/unsorted/InlineAsmPPC.c
@@ -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);
}
diff --git a/compiler_and_linker/unsorted/IroLinearForm.c b/compiler_and_linker/unsorted/IroLinearForm.c
index 2ac1d0a..4941587 100644
--- a/compiler_and_linker/unsorted/IroLinearForm.c
+++ b/compiler_and_linker/unsorted/IroLinearForm.c
@@ -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) {
diff --git a/compiler_and_linker/unsorted/IroPointerAnalysisADTs.c b/compiler_and_linker/unsorted/IroPointerAnalysisADTs.c
index fe5d4bb..54e59c8 100644
--- a/compiler_and_linker/unsorted/IroPointerAnalysisADTs.c
+++ b/compiler_and_linker/unsorted/IroPointerAnalysisADTs.c
@@ -4,7 +4,7 @@
#include "compiler/CInt64.h"
// TODO: this should really be elsewhere (but where?)
-inline UInt32 gcd(UInt32 a, UInt32 b) {
+CW_INLINE UInt32 gcd(UInt32 a, UInt32 b) {
UInt32 chk;
if (!a)
@@ -207,20 +207,20 @@ static LocationSet stDummyLocationSet = {
static LocationSet *stUnknownLs = &stDummyLocationSet;
// forward decls
-inline StackElement *Stack_sub_48A5B0(Stack **stackPtr);
-inline void ObjectSet_RemoveAll(ObjectSet *procList);
-inline void ExtendedParamSet_RemoveAll(ExtendedParamSet *epList);
-inline void LocationSet_Copy(LocationSet *dest, LocationSet *src);
-inline Boolean LocationSet_IsUnknown(LocationSet *ls);
-inline void LocationSetSet_RemoveAll(LocationSetSet *lss);
-inline void LocationSetSet_AddSet(LocationSetSet *dest, LocationSetSet *src);
-inline void ParamMappingFunction_RemoveAll(ParamMappingFunction *pmf);
-inline void ParamMappingFunction_AddAllMaybe_sub_487C50(ParamMappingFunction *dest, ParamMappingFunction *src);
-inline void PointsToFunction_RemoveAll(PointsToFunction *pointsToFunc);
-inline void PointsToFunction_AddAllIGuess_sub_487D80(PointsToFunction *dest, PointsToFunction *src);
-inline void PTFList_RemoveAll(PTFList *ptfList);
-
-inline StackElement *StackElement_New(void) {
+CW_INLINE StackElement *Stack_sub_48A5B0(Stack **stackPtr);
+CW_INLINE void ObjectSet_RemoveAll(ObjectSet *procList);
+CW_INLINE void ExtendedParamSet_RemoveAll(ExtendedParamSet *epList);
+CW_INLINE void LocationSet_Copy(LocationSet *dest, LocationSet *src);
+CW_INLINE Boolean LocationSet_IsUnknown(LocationSet *ls);
+CW_INLINE void LocationSetSet_RemoveAll(LocationSetSet *lss);
+CW_INLINE void LocationSetSet_AddSet(LocationSetSet *dest, LocationSetSet *src);
+CW_INLINE void ParamMappingFunction_RemoveAll(ParamMappingFunction *pmf);
+CW_INLINE void ParamMappingFunction_AddAllMaybe_sub_487C50(ParamMappingFunction *dest, ParamMappingFunction *src);
+CW_INLINE void PointsToFunction_RemoveAll(PointsToFunction *pointsToFunc);
+CW_INLINE void PointsToFunction_AddAllIGuess_sub_487D80(PointsToFunction *dest, PointsToFunction *src);
+CW_INLINE void PTFList_RemoveAll(PTFList *ptfList);
+
+CW_INLINE StackElement *StackElement_New(void) {
StackElement *stackElement = IRO_malloc(sizeof(StackElement));
IRO_ASSERT(103, stackElement != NULL);
#ifdef IRO_DEBUG
@@ -232,7 +232,7 @@ inline StackElement *StackElement_New(void) {
return stackElement;
}
-inline void StackElement_Delete(StackElement *stackElement) {
+CW_INLINE void StackElement_Delete(StackElement *stackElement) {
IRO_ASSERT(117, stackElement != NULL);
IRO_ASSERT(118, stackElement->proc == NULL);
IRO_ASSERT(119, stackElement->ptf == NULL);
@@ -242,7 +242,7 @@ inline void StackElement_Delete(StackElement *stackElement) {
IRO_free(stackElement);
}
-inline void StackElement_Init(StackElement *stackElement, Object *proc, PartialTransferFunction *ptf, ParamMappingFunction *map, IROLinear *funcCall) {
+CW_INLINE void StackElement_Init(StackElement *stackElement, Object *proc, PartialTransferFunction *ptf, ParamMappingFunction *map, IROLinear *funcCall) {
IRO_ASSERT(131, stackElement != NULL);
IRO_ASSERT(132, proc != NULL);
IRO_ASSERT(133, ptf != NULL);
@@ -254,13 +254,13 @@ inline void StackElement_Init(StackElement *stackElement, Object *proc, PartialT
stackElement->funcCall = funcCall;
}
-inline void StackElement_Copy(StackElement *dest, StackElement *src) {
+CW_INLINE void StackElement_Copy(StackElement *dest, StackElement *src) {
IRO_ASSERT(145, dest != NULL);
IRO_ASSERT(146, src != NULL);
StackElement_Init(dest, src->proc, src->ptf, src->map, src->funcCall);
}
-inline void StackElement_Term(StackElement *stackElement) {
+CW_INLINE void StackElement_Term(StackElement *stackElement) {
IRO_ASSERT(156, stackElement != NULL);
#ifdef IRO_DEBUG
stackElement->proc = NULL;
@@ -270,38 +270,38 @@ inline void StackElement_Term(StackElement *stackElement) {
#endif
}
-inline void *StackElement_sub_48A780(StackElement *stackElement) {
+CW_INLINE void *StackElement_sub_48A780(StackElement *stackElement) {
IRO_ASSERT(213, stackElement != NULL);
return stackElement->proc;
}
-inline Boolean StackRelated_sub_48A760(void *key1, void *key2) {
+CW_INLINE Boolean StackRelated_sub_48A760(void *key1, void *key2) {
IRO_ASSERT(220, key1 != NULL);
IRO_ASSERT(221, key2 != NULL);
return key1 == key2;
}
-inline Object *StackElement_proc(StackElement *stackElement) {
+CW_INLINE Object *StackElement_proc(StackElement *stackElement) {
IRO_ASSERT(228, stackElement != NULL);
return stackElement->proc;
}
-inline PartialTransferFunction *StackElement_ptf(StackElement *stackElement) {
+CW_INLINE PartialTransferFunction *StackElement_ptf(StackElement *stackElement) {
IRO_ASSERT(235, stackElement != NULL);
return stackElement->ptf;
}
-inline ParamMappingFunction *StackElement_map(StackElement *stackElement) {
+CW_INLINE ParamMappingFunction *StackElement_map(StackElement *stackElement) {
IRO_ASSERT(242, stackElement != NULL);
return stackElement->map;
}
-inline IROLinear *StackElement_funcCall(StackElement *stackElement) {
+CW_INLINE IROLinear *StackElement_funcCall(StackElement *stackElement) {
IRO_ASSERT(249, stackElement != NULL);
return stackElement->funcCall;
}
-inline Stack *Stack_New(void) {
+CW_INLINE Stack *Stack_New(void) {
Stack *stack = IRO_malloc(sizeof(Stack));
IRO_ASSERT(265, stack != NULL);
#ifdef IRO_DEBUG
@@ -311,7 +311,7 @@ inline Stack *Stack_New(void) {
return stack;
}
-inline void Stack_Delete(Stack *stack) {
+CW_INLINE void Stack_Delete(Stack *stack) {
IRO_ASSERT(277, stack != NULL);
IRO_ASSERT(278, stack->top == NULL);
IRO_ASSERT(279, stack->next == NULL);
@@ -319,13 +319,13 @@ inline void Stack_Delete(Stack *stack) {
IRO_free(stack);
}
-inline void Stack_Init(Stack *stack) {
+CW_INLINE void Stack_Init(Stack *stack) {
IRO_ASSERT(289, stack != NULL);
stack->top = NULL;
stack->next = NULL;
}
-inline void Stack_Term(Stack **stackPtr) {
+CW_INLINE void Stack_Term(Stack **stackPtr) {
StackElement *stackElement;
IRO_ASSERT(299, stackPtr != NULL);
@@ -338,7 +338,7 @@ inline void Stack_Term(Stack **stackPtr) {
}
}
-inline void Stack_sub_48A660(Stack **stackPtr, StackElement *stackElement) {
+CW_INLINE void Stack_sub_48A660(Stack **stackPtr, StackElement *stackElement) {
StackElement *newElement;
Stack *newStack;
@@ -354,21 +354,21 @@ inline void Stack_sub_48A660(Stack **stackPtr, StackElement *stackElement) {
*stackPtr = newStack;
}
-inline StackElement *Stack_Top(Stack **stackPtr) {
+CW_INLINE StackElement *Stack_Top(Stack **stackPtr) {
IRO_ASSERT(331, stackPtr != NULL);
IRO_ASSERT(332, *stackPtr != NULL);
return (*stackPtr)->top;
}
-inline Stack *Stack_Next(Stack **stackPtr) {
+CW_INLINE Stack *Stack_Next(Stack **stackPtr) {
IRO_ASSERT(343, stackPtr != NULL);
IRO_ASSERT(344, *stackPtr != NULL);
return (*stackPtr)->next;
}
-inline StackElement *Stack_sub_48A5B0(Stack **stackPtr) {
+CW_INLINE StackElement *Stack_sub_48A5B0(Stack **stackPtr) {
StackElement *stackElement;
IRO_ASSERT(357, stackPtr != NULL);
@@ -386,7 +386,7 @@ inline StackElement *Stack_sub_48A5B0(Stack **stackPtr) {
return stackElement;
}
-inline StackElement *Stack_sub_48A710(Stack **stackPtr, void *key) {
+CW_INLINE StackElement *Stack_sub_48A710(Stack **stackPtr, void *key) {
Stack *stack;
IRO_ASSERT(379, stackPtr != NULL);
@@ -402,7 +402,7 @@ inline StackElement *Stack_sub_48A710(Stack **stackPtr, void *key) {
return NULL;
}
-inline ObjectSet *ObjectSet_New(void) {
+CW_INLINE ObjectSet *ObjectSet_New(void) {
ObjectSet *procList;
procList = IRO_malloc(sizeof(ObjectSet));
@@ -414,7 +414,7 @@ inline ObjectSet *ObjectSet_New(void) {
return procList;
}
-inline void ObjectSet_Delete(ObjectSet *procList) {
+CW_INLINE void ObjectSet_Delete(ObjectSet *procList) {
IRO_ASSERT(451, procList != NULL);
IRO_ASSERT(452, procList->proc == NULL);
IRO_ASSERT(453, procList->otherProcs == NULL);
@@ -422,13 +422,13 @@ inline void ObjectSet_Delete(ObjectSet *procList) {
IRO_free(procList);
}
-inline void ObjectSet_Init(ObjectSet *procList) {
+CW_INLINE void ObjectSet_Init(ObjectSet *procList) {
IRO_ASSERT(463, procList != NULL);
procList->proc = NULL;
procList->otherProcs = NULL;
}
-inline void ObjectSet_Term(ObjectSet *procList) {
+CW_INLINE void ObjectSet_Term(ObjectSet *procList) {
IRO_ASSERT(481, procList != NULL);
ObjectSet_RemoveAll(procList);
#ifdef IRO_DEBUG
@@ -437,7 +437,7 @@ inline void ObjectSet_Term(ObjectSet *procList) {
#endif
}
-inline void ObjectSet_ForEach(ObjectSet *procList, void (*action)(Object *, void *), void *refcon) {
+CW_INLINE void ObjectSet_ForEach(ObjectSet *procList, void (*action)(Object *, void *), void *refcon) {
IRO_ASSERT(528, procList != NULL);
IRO_ASSERT(529, action != NULL);
IRO_ASSERT(530, refcon == NULL || refcon != NULL);
@@ -448,7 +448,7 @@ inline void ObjectSet_ForEach(ObjectSet *procList, void (*action)(Object *, void
}
}
-inline Object *ObjectSet_sub_485020(ObjectSet *procList, Object *proc) {
+CW_INLINE Object *ObjectSet_sub_485020(ObjectSet *procList, Object *proc) {
IRO_ASSERT(540, procList != NULL);
IRO_ASSERT(541, proc != NULL);
while (procList && procList->proc) {
@@ -459,12 +459,12 @@ inline Object *ObjectSet_sub_485020(ObjectSet *procList, Object *proc) {
return NULL;
}
-inline Object *ObjectSet_FindFirst(ObjectSet *procList) {
+CW_INLINE Object *ObjectSet_FindFirst(ObjectSet *procList) {
IRO_ASSERT(552, procList != NULL);
return procList->proc;
}
-inline int ObjectSet_Count(ObjectSet *procList) {
+CW_INLINE int ObjectSet_Count(ObjectSet *procList) {
int count;
IRO_ASSERT(561, procList != NULL);
@@ -478,7 +478,7 @@ inline int ObjectSet_Count(ObjectSet *procList) {
return count;
}
-inline void ObjectSet_sub_486800(ObjectSet *procList, Object *proc) {
+CW_INLINE void ObjectSet_sub_486800(ObjectSet *procList, Object *proc) {
ObjectSet *newProcList;
IRO_ASSERT(574, procList != NULL);
@@ -495,7 +495,7 @@ inline void ObjectSet_sub_486800(ObjectSet *procList, Object *proc) {
procList->proc = proc;
}
-inline void ObjectSet_sub_4867D0(ObjectSet *procList, Object *proc) {
+CW_INLINE void ObjectSet_sub_4867D0(ObjectSet *procList, Object *proc) {
IRO_ASSERT(592, procList != NULL);
IRO_ASSERT(593, proc != NULL);
@@ -503,7 +503,7 @@ inline void ObjectSet_sub_4867D0(ObjectSet *procList, Object *proc) {
ObjectSet_sub_486800(procList, proc);
}
-inline void ObjectSet_Remove(ObjectSet *procList, Object *proc) {
+CW_INLINE void ObjectSet_Remove(ObjectSet *procList, Object *proc) {
ObjectSet *prev;
ObjectSet *tmp;
@@ -539,28 +539,28 @@ inline void ObjectSet_Remove(ObjectSet *procList, Object *proc) {
}
}
-inline void ObjectSet_RemoveAll(ObjectSet *procList) {
+CW_INLINE void ObjectSet_RemoveAll(ObjectSet *procList) {
IRO_ASSERT(645, procList != NULL);
while (procList && procList->proc)
ObjectSet_Remove(procList, procList->proc);
}
-inline void ObjectSet_AddSetAction(Object *proc, void *refcon) {
+CW_INLINE void ObjectSet_AddSetAction(Object *proc, void *refcon) {
IRO_ASSERT(655, proc != NULL);
IRO_ASSERT(656, refcon != NULL);
ObjectSet_sub_4867D0(refcon, proc);
}
-inline void ObjectSet_SimpleAddSetAction(Object *proc, void *refcon) {
+CW_INLINE void ObjectSet_SimpleAddSetAction(Object *proc, void *refcon) {
IRO_ASSERT(663, proc != NULL);
IRO_ASSERT(664, refcon != NULL);
ObjectSet_sub_486800(refcon, proc);
}
-inline void ObjectSet_sub_48C590(ObjectSet *dest, ObjectSet *src) {
+CW_INLINE void ObjectSet_sub_48C590(ObjectSet *dest, ObjectSet *src) {
IRO_ASSERT(671, dest != NULL);
IRO_ASSERT(672, src != NULL);
@@ -570,21 +570,21 @@ inline void ObjectSet_sub_48C590(ObjectSet *dest, ObjectSet *src) {
ObjectSet_ForEach(src, ObjectSet_SimpleAddSetAction, dest);
}
-inline void ObjectSet_RemoveSetAction(Object *proc, void *refcon) {
+CW_INLINE void ObjectSet_RemoveSetAction(Object *proc, void *refcon) {
IRO_ASSERT(682, proc != NULL);
IRO_ASSERT(683, refcon != NULL);
ObjectSet_Remove(refcon, proc);
}
-inline void ObjectSet_removeiter_sub_48C890(ObjectSet *dest, ObjectSet *src) {
+CW_INLINE void ObjectSet_removeiter_sub_48C890(ObjectSet *dest, ObjectSet *src) {
IRO_ASSERT(690, dest != NULL);
IRO_ASSERT(691, src != NULL);
ObjectSet_ForEach(src, ObjectSet_RemoveSetAction, dest);
}
-inline Boolean ObjectSet_sub_484FA0(ObjectSet *os1, ObjectSet *os2) {
+CW_INLINE Boolean ObjectSet_sub_484FA0(ObjectSet *os1, ObjectSet *os2) {
ObjectSet *scan;
IRO_ASSERT(700, os1 != NULL);
@@ -606,7 +606,7 @@ inline Boolean ObjectSet_sub_484FA0(ObjectSet *os1, ObjectSet *os2) {
return 1;
}
-inline ExtendedParam *ExtendedParam_New(void) {
+CW_INLINE ExtendedParam *ExtendedParam_New(void) {
ExtendedParam *ep = IRO_malloc(sizeof(ExtendedParam));
IRO_ASSERT(755, ep != NULL);
@@ -616,14 +616,14 @@ inline ExtendedParam *ExtendedParam_New(void) {
return ep;
}
-inline void ExtendedParam_Delete(ExtendedParam *ep) {
+CW_INLINE void ExtendedParam_Delete(ExtendedParam *ep) {
IRO_ASSERT(762, ep != NULL);
IRO_ASSERT(763, ep->objectSet == NULL);
IRO_DEBUG_CLEAR(ep, sizeof(ExtendedParam));
IRO_free(ep);
}
-inline void ExtendedParam_Init(ExtendedParam *ep, Object *obj) {
+CW_INLINE void ExtendedParam_Init(ExtendedParam *ep, Object *obj) {
IRO_ASSERT(777, ep != NULL);
IRO_ASSERT(778, obj != NULL);
IRO_ASSERT(779, obj->extParam == NULL);
@@ -637,11 +637,11 @@ inline void ExtendedParam_Init(ExtendedParam *ep, Object *obj) {
ep->x4 = stExtendedParamNum++;
}
-inline void ExtendedParam_TermAction(Object *obj, void *refcon) {
+CW_INLINE void ExtendedParam_TermAction(Object *obj, void *refcon) {
obj->extParam = NULL;
}
-inline void ExtendedParam_Term(ExtendedParam *ep) {
+CW_INLINE void ExtendedParam_Term(ExtendedParam *ep) {
IRO_ASSERT(800, ep != NULL);
ObjectSet_ForEach(ep->objectSet, ExtendedParam_TermAction, NULL);
@@ -652,7 +652,7 @@ inline void ExtendedParam_Term(ExtendedParam *ep) {
#endif
}
-inline Boolean ExtendedParams_Equal(ExtendedParam *ep1, ExtendedParam *ep2) {
+CW_INLINE Boolean ExtendedParams_Equal(ExtendedParam *ep1, ExtendedParam *ep2) {
IRO_ASSERT(841, ep1 != NULL);
IRO_ASSERT(842, ep2 != NULL);
IRO_ASSERT(843, ep1->objectSet != NULL);
@@ -664,13 +664,13 @@ inline Boolean ExtendedParams_Equal(ExtendedParam *ep1, ExtendedParam *ep2) {
return ep1->x4 == ep2->x4 && ObjectSet_sub_484FA0(ep1->objectSet, ep2->objectSet);
}
-inline ExtendedParam *ExtendedParam_FindByObject(Object *obj) {
+CW_INLINE ExtendedParam *ExtendedParam_FindByObject(Object *obj) {
IRO_ASSERT(856, obj != NULL);
return obj->extParam;
}
-inline void ExtendedParam_sub_4867B0(ExtendedParam *ep, Object *obj) {
+CW_INLINE void ExtendedParam_sub_4867B0(ExtendedParam *ep, Object *obj) {
IRO_ASSERT(863, ep != NULL);
IRO_ASSERT(864, ep->objectSet != NULL);
IRO_ASSERT(865, obj != NULL);
@@ -679,11 +679,11 @@ inline void ExtendedParam_sub_4867B0(ExtendedParam *ep, Object *obj) {
obj->extParam = ep;
}
-inline void ExtendedParam_RemoveObjectSetAction(Object *object, void *refcon) {
+CW_INLINE void ExtendedParam_RemoveObjectSetAction(Object *object, void *refcon) {
object->extParam = NULL;
}
-inline void EP_sub_48C850(ExtendedParam *ep, ObjectSet *objSet) {
+CW_INLINE void EP_sub_48C850(ExtendedParam *ep, ObjectSet *objSet) {
IRO_ASSERT(888, ep != NULL);
IRO_ASSERT(889, ep->objectSet != NULL);
IRO_ASSERT(890, objSet != NULL);
@@ -692,19 +692,19 @@ inline void EP_sub_48C850(ExtendedParam *ep, ObjectSet *objSet) {
ObjectSet_ForEach(objSet, ExtendedParam_RemoveObjectSetAction, NULL);
}
-inline ObjectSet *ExtendedParam_objectSet(ExtendedParam *ep) {
+CW_INLINE ObjectSet *ExtendedParam_objectSet(ExtendedParam *ep) {
IRO_ASSERT(898, ep != NULL);
return ep->objectSet;
}
-inline uint32 ExtendedParam_sub_489110(ExtendedParam *ep) {
+CW_INLINE uint32 ExtendedParam_sub_489110(ExtendedParam *ep) {
IRO_ASSERT(905, ep != NULL);
return ep->x4;
}
-inline ExtendedParamSet *AllocsExtParamSet_sub_4876C0(void) {
+CW_INLINE ExtendedParamSet *AllocsExtParamSet_sub_4876C0(void) {
ExtendedParamSet *epList = IRO_malloc(sizeof(ExtendedParamSet));
IRO_ASSERT(924, epList != NULL);
@@ -715,7 +715,7 @@ inline ExtendedParamSet *AllocsExtParamSet_sub_4876C0(void) {
return epList;
}
-inline void FreesExtParamSet_sub_48CAE0(ExtendedParamSet *epList) {
+CW_INLINE void FreesExtParamSet_sub_48CAE0(ExtendedParamSet *epList) {
IRO_ASSERT(936, epList != NULL);
IRO_ASSERT(937, epList->ep == NULL);
IRO_ASSERT(938, epList->otherEps == NULL);
@@ -723,13 +723,13 @@ inline void FreesExtParamSet_sub_48CAE0(ExtendedParamSet *epList) {
IRO_free(epList);
}
-inline void InitsExtParamSet_sub_4876A0(ExtendedParamSet *epList) {
+CW_INLINE void InitsExtParamSet_sub_4876A0(ExtendedParamSet *epList) {
IRO_ASSERT(948, epList != NULL);
epList->ep = NULL;
epList->otherEps = NULL;
}
-inline void TermsExtParamSet_sub_48CB00(ExtendedParamSet *epList) {
+CW_INLINE void TermsExtParamSet_sub_48CB00(ExtendedParamSet *epList) {
IRO_ASSERT(966, epList != NULL);
ExtendedParamSet_RemoveAll(epList);
#ifdef IRO_DEBUG
@@ -738,7 +738,7 @@ inline void TermsExtParamSet_sub_48CB00(ExtendedParamSet *epList) {
#endif
}
-inline void MaybeWalkExtParamSet_sub_48CBE0(ExtendedParamSet *epList, void (*action)(ExtendedParam *, void *), void *refcon) {
+CW_INLINE void MaybeWalkExtParamSet_sub_48CBE0(ExtendedParamSet *epList, void (*action)(ExtendedParam *, void *), void *refcon) {
IRO_ASSERT(1010, epList != NULL);
IRO_ASSERT(1011, action != NULL);
@@ -748,7 +748,7 @@ inline void MaybeWalkExtParamSet_sub_48CBE0(ExtendedParamSet *epList, void (*act
}
}
-inline ExtendedParam *ExtParamSet_sub_4876D0(ExtendedParamSet *epList, ExtendedParam *ep) {
+CW_INLINE ExtendedParam *ExtParamSet_sub_4876D0(ExtendedParamSet *epList, ExtendedParam *ep) {
IRO_ASSERT(1022, epList != NULL);
IRO_ASSERT(1023, ep != NULL);
@@ -761,7 +761,7 @@ inline ExtendedParam *ExtParamSet_sub_4876D0(ExtendedParamSet *epList, ExtendedP
return NULL;
}
-inline void ExtParamSet_sub_487660(ExtendedParamSet *epList, ExtendedParam *ep) {
+CW_INLINE void ExtParamSet_sub_487660(ExtendedParamSet *epList, ExtendedParam *ep) {
IRO_ASSERT(1056, epList != NULL);
IRO_ASSERT(1057, ep != NULL);
@@ -776,7 +776,7 @@ inline void ExtParamSet_sub_487660(ExtendedParamSet *epList, ExtendedParam *ep)
epList->ep = ep;
}
-inline void ExtParamSet_sub_487630(ExtendedParamSet *epList, ExtendedParam *ep) {
+CW_INLINE void ExtParamSet_sub_487630(ExtendedParamSet *epList, ExtendedParam *ep) {
IRO_ASSERT(1076, epList != NULL);
IRO_ASSERT(1077, ep != NULL);
@@ -784,7 +784,7 @@ inline void ExtParamSet_sub_487630(ExtendedParamSet *epList, ExtendedParam *ep)
ExtParamSet_sub_487660(epList, ep);
}
-inline void ExtendedParamSet_Remove(ExtendedParamSet *epList, ExtendedParam *ep) {
+CW_INLINE void ExtendedParamSet_Remove(ExtendedParamSet *epList, ExtendedParam *ep) {
ExtendedParamSet *prev;
ExtendedParamSet *tmp;
@@ -820,14 +820,14 @@ inline void ExtendedParamSet_Remove(ExtendedParamSet *epList, ExtendedParam *ep)
}
}
-inline void ExtendedParamSet_RemoveAll(ExtendedParamSet *epList) {
+CW_INLINE void ExtendedParamSet_RemoveAll(ExtendedParamSet *epList) {
IRO_ASSERT(1129, epList != NULL);
while (epList && epList->ep)
ExtendedParamSet_Remove(epList, epList->ep);
}
-inline PAHeapBlock *CreateUniqueHeapAlloc_sub_486420(void) {
+CW_INLINE PAHeapBlock *CreateUniqueHeapAlloc_sub_486420(void) {
PAHeapBlock *hb = IRO_malloc(sizeof(PAHeapBlock));
IRO_ASSERT(1225, hb != NULL);
@@ -837,20 +837,20 @@ inline PAHeapBlock *CreateUniqueHeapAlloc_sub_486420(void) {
return hb;
}
-inline void InitUniqueHeapAlloc_sub_486410(PAHeapBlock *hb, IROLinear *nd) {
+CW_INLINE void InitUniqueHeapAlloc_sub_486410(PAHeapBlock *hb, IROLinear *nd) {
IRO_ASSERT(1247, hb != NULL);
hb->x0 = nd;
}
-inline Boolean PAHeapBlocks_Equal(PAHeapBlock *hb1, PAHeapBlock *hb2) {
+CW_INLINE Boolean PAHeapBlocks_Equal(PAHeapBlock *hb1, PAHeapBlock *hb2) {
IRO_ASSERT(1296, hb1 != NULL);
IRO_ASSERT(1297, hb2 != NULL);
return (hb1 == hb2) || (hb1->x0 == hb2->x0);
}
-inline PALocalVar *PALocalVar_New(void) {
+CW_INLINE PALocalVar *PALocalVar_New(void) {
PALocalVar *local = IRO_malloc(sizeof(PALocalVar));
IRO_ASSERT(1333, local != NULL);
@@ -861,7 +861,7 @@ inline PALocalVar *PALocalVar_New(void) {
return local;
}
-inline void PALocalVar_InitByObject(PALocalVar *local, Object *obj) {
+CW_INLINE void PALocalVar_InitByObject(PALocalVar *local, Object *obj) {
IRO_ASSERT(1357, local != NULL);
IRO_ASSERT(1358, obj != NULL);
@@ -874,7 +874,7 @@ inline void PALocalVar_InitByObject(PALocalVar *local, Object *obj) {
}
}
-inline void PALocalVar_InitByName(PALocalVar *local, char *name) {
+CW_INLINE void PALocalVar_InitByName(PALocalVar *local, char *name) {
IRO_ASSERT(1372, local != NULL);
IRO_ASSERT(1373, name != NULL);
@@ -883,7 +883,7 @@ inline void PALocalVar_InitByName(PALocalVar *local, char *name) {
strcpy(local->x4, name);
}
-inline Boolean PALocalVars_Equal(PALocalVar *local1, PALocalVar *local2) {
+CW_INLINE Boolean PALocalVars_Equal(PALocalVar *local1, PALocalVar *local2) {
IRO_ASSERT(1419, local1 == NULL || local1 != NULL);
IRO_ASSERT(1420, local2 == NULL || local2 != NULL);
@@ -900,24 +900,24 @@ inline Boolean PALocalVars_Equal(PALocalVar *local1, PALocalVar *local2) {
return local1->x0 == local2->x0;
}
-inline void PALocalVar_SetSth_sub_4847C0(PALocalVar *local, Object *obj) {
+CW_INLINE void PALocalVar_SetSth_sub_4847C0(PALocalVar *local, Object *obj) {
IRO_ASSERT(1436, local != NULL);
IRO_ASSERT(1437, obj == NULL || obj != NULL);
local->x0 = obj;
}
-inline Object *PALocalVar_Get0_sub_4847E0(PALocalVar *local) {
+CW_INLINE Object *PALocalVar_Get0_sub_4847E0(PALocalVar *local) {
IRO_ASSERT(1444, local != NULL);
return local->x0;
}
-inline char *PALocalVar_Get4_sub_4847D0(PALocalVar *local) {
+CW_INLINE char *PALocalVar_Get4_sub_4847D0(PALocalVar *local) {
IRO_ASSERT(1451, local != NULL);
return local->x4;
}
-inline PAMemoryBlock *PAMemoryBlock_New(void) {
+CW_INLINE PAMemoryBlock *PAMemoryBlock_New(void) {
PAMemoryBlock *mb = IRO_malloc(sizeof(PAMemoryBlock));
IRO_ASSERT(1491, mb != NULL);
@@ -927,13 +927,13 @@ inline PAMemoryBlock *PAMemoryBlock_New(void) {
return mb;
}
-inline void PAMemoryBlock_Delete(PAMemoryBlock *mb) {
+CW_INLINE void PAMemoryBlock_Delete(PAMemoryBlock *mb) {
IRO_ASSERT(1502, mb != NULL);
IRO_ASSERT(1503, mb->kind == PAMEMORYBLOCKKIND_INVALID);
IRO_free(mb);
}
-inline void PAMemoryBlock_Init(PAMemoryBlock *mb, PAMemoryBlockKind kind, void *thing) {
+CW_INLINE void PAMemoryBlock_Init(PAMemoryBlock *mb, PAMemoryBlockKind kind, void *thing) {
IRO_ASSERT(1513, mb != NULL);
IRO_ASSERT(1514, thing == NULL || thing != NULL);
@@ -959,7 +959,7 @@ inline void PAMemoryBlock_Init(PAMemoryBlock *mb, PAMemoryBlockKind kind, void *
}
}
-inline void PAMemoryBlock_Term(PAMemoryBlock *mb) {
+CW_INLINE void PAMemoryBlock_Term(PAMemoryBlock *mb) {
IRO_ASSERT(1552, mb != NULL);
#ifdef IRO_DEBUG
@@ -967,7 +967,7 @@ inline void PAMemoryBlock_Term(PAMemoryBlock *mb) {
#endif
}
-inline Boolean MemoryBlocks_Equal(PAMemoryBlock *mb1, PAMemoryBlock *mb2) {
+CW_INLINE Boolean MemoryBlocks_Equal(PAMemoryBlock *mb1, PAMemoryBlock *mb2) {
IRO_ASSERT(1657, mb1 == NULL || mb1 != NULL);
IRO_ASSERT(1658, mb2 == NULL || mb2 != NULL);
@@ -994,13 +994,13 @@ inline Boolean MemoryBlocks_Equal(PAMemoryBlock *mb1, PAMemoryBlock *mb2) {
}
}
-inline PAMemoryBlockKind PAMemoryBlock_kind(PAMemoryBlock *mb) {
+CW_INLINE PAMemoryBlockKind PAMemoryBlock_kind(PAMemoryBlock *mb) {
IRO_ASSERT(1692, mb != NULL);
return mb->kind;
}
-inline void *PAMemoryBlock_thing(PAMemoryBlock *mb) {
+CW_INLINE void *PAMemoryBlock_thing(PAMemoryBlock *mb) {
IRO_ASSERT(1699, mb != NULL);
switch (mb->kind) {
@@ -1020,7 +1020,7 @@ inline void *PAMemoryBlock_thing(PAMemoryBlock *mb) {
}
}
-inline LocationSet *LocationSet_New(void) {
+CW_INLINE LocationSet *LocationSet_New(void) {
LocationSet *ls = IRO_malloc(sizeof(LocationSet));
IRO_ASSERT(1767, ls != NULL);
@@ -1033,7 +1033,7 @@ inline LocationSet *LocationSet_New(void) {
return ls;
}
-inline void LocationSet_Delete(LocationSet *ls) {
+CW_INLINE void LocationSet_Delete(LocationSet *ls) {
IRO_ASSERT(1781, ls != NULL);
IRO_ASSERT(1782, ls != stUnknownLs);
IRO_ASSERT(1783, ls->block == NULL);
@@ -1044,7 +1044,7 @@ inline void LocationSet_Delete(LocationSet *ls) {
IRO_free(ls);
}
-inline void LocationSet_InitKnown(LocationSet *ls, PAMemoryBlock *block, CInt64 field, UInt32 stride, Type *rtype) {
+CW_INLINE void LocationSet_InitKnown(LocationSet *ls, PAMemoryBlock *block, CInt64 field, UInt32 stride, Type *rtype) {
IRO_ASSERT(1796, ls != NULL);
IRO_ASSERT(1797, ls != stUnknownLs);
IRO_ASSERT(1798, block != NULL);
@@ -1055,7 +1055,7 @@ inline void LocationSet_InitKnown(LocationSet *ls, PAMemoryBlock *block, CInt64
ls->u.known.stride = stride;
}
-inline void LocationSet_InitUnknown(LocationSet *ls, Type *rtype, PAMemoryBlock *restriction, LocationSet *bitfieldOf) {
+CW_INLINE void LocationSet_InitUnknown(LocationSet *ls, Type *rtype, PAMemoryBlock *restriction, LocationSet *bitfieldOf) {
IRO_ASSERT(1809, ls != NULL);
IRO_ASSERT(1810, ls != stUnknownLs);
IRO_ASSERT(1811, rtype == NULL || rtype != NULL);
@@ -1073,7 +1073,7 @@ inline void LocationSet_InitUnknown(LocationSet *ls, Type *rtype, PAMemoryBlock
}
}
-inline void LocationSet_Copy(LocationSet *dest, LocationSet *src) {
+CW_INLINE void LocationSet_Copy(LocationSet *dest, LocationSet *src) {
IRO_ASSERT(1829, src != NULL);
IRO_ASSERT(1830, dest != NULL);
@@ -1094,7 +1094,7 @@ inline void LocationSet_Copy(LocationSet *dest, LocationSet *src) {
}
}
-inline void LocationSet_Term(LocationSet *ls) {
+CW_INLINE void LocationSet_Term(LocationSet *ls) {
IRO_ASSERT(1857, ls != NULL);
IRO_ASSERT(1858, ls != stUnknownLs);
@@ -1110,7 +1110,7 @@ inline void LocationSet_Term(LocationSet *ls) {
#endif
}
-inline Boolean LocationSets_Overlap(LocationSet *ls1, Type *rtype1, LocationSet *ls2, Type *rtype2) {
+CW_INLINE Boolean LocationSets_Overlap(LocationSet *ls1, Type *rtype1, LocationSet *ls2, Type *rtype2) {
Boolean isUnknown1, isUnknown2;
PAMemoryBlock *restriction1, *restriction2;
@@ -1212,7 +1212,7 @@ inline Boolean LocationSets_Overlap(LocationSet *ls1, Type *rtype1, LocationSet
return 0;
}
-inline Boolean LocationSets_Equal(LocationSet *ls1, LocationSet *ls2) {
+CW_INLINE Boolean LocationSets_Equal(LocationSet *ls1, LocationSet *ls2) {
IRO_ASSERT(2080, ls1 != NULL);
IRO_ASSERT(2081, ls2 != NULL);
@@ -1234,7 +1234,7 @@ inline Boolean LocationSets_Equal(LocationSet *ls1, LocationSet *ls2) {
);
}
-inline Boolean LocationSets_LookupCompatible(LocationSet *ls1, LocationSet *ls2) {
+CW_INLINE Boolean LocationSets_LookupCompatible(LocationSet *ls1, LocationSet *ls2) {
IRO_ASSERT(2119, ls1 != NULL);
IRO_ASSERT(2120, ls2 != NULL);
@@ -1270,7 +1270,7 @@ inline Boolean LocationSets_LookupCompatible(LocationSet *ls1, LocationSet *ls2)
return 0;
}
-inline Boolean LocationSet_Contains(LocationSet *ls1, Type *rtype1, LocationSet *ls2, Type *rtype2) {
+CW_INLINE Boolean LocationSet_Contains(LocationSet *ls1, Type *rtype1, LocationSet *ls2, Type *rtype2) {
Boolean unknown1;
Boolean unknown2;
PAMemoryBlock *restriction2;
@@ -1314,13 +1314,13 @@ inline Boolean LocationSet_Contains(LocationSet *ls1, Type *rtype1, LocationSet
MemoryBlocks_Equal(ls1->block, ls2->block);
}
-inline Boolean LocationSet_IsUnknown(LocationSet *ls) {
+CW_INLINE Boolean LocationSet_IsUnknown(LocationSet *ls) {
IRO_ASSERT(2233, ls != NULL);
return (ls == stUnknownLs) || (ls->block == stUnknownMb);
}
-inline Boolean LocationSet_sub_48AF30(LocationSet *ls) {
+CW_INLINE Boolean LocationSet_sub_48AF30(LocationSet *ls) {
return
!LocationSet_IsUnknown(ls) &&
(ls->u.known.stride == 0) &&
@@ -1329,7 +1329,7 @@ inline Boolean LocationSet_sub_48AF30(LocationSet *ls) {
!PAMemoryBlock_thing(ls->block);
}
-inline void LocationSet_SetRtype(LocationSet *ls, Type *rtype) {
+CW_INLINE void LocationSet_SetRtype(LocationSet *ls, Type *rtype) {
IRO_ASSERT(2263, ls != NULL);
IRO_ASSERT(2264, ls != stUnknownLs);
IRO_ASSERT(2265, rtype != NULL);
@@ -1337,62 +1337,62 @@ inline void LocationSet_SetRtype(LocationSet *ls, Type *rtype) {
ls->rtype = rtype;
}
-inline void SetsLocationSetField_sub_4851B0(LocationSet *ls, CInt64 field) {
+CW_INLINE void SetsLocationSetField_sub_4851B0(LocationSet *ls, CInt64 field) {
IRO_ASSERT(2272, ls != NULL);
IRO_ASSERT(2273, !LocationSet_IsUnknown(ls));
ls->u.known.field = field;
}
-inline void SetsLocationSetStride_sub_4852D0(LocationSet *ls, SInt32 stride) {
+CW_INLINE void SetsLocationSetStride_sub_4852D0(LocationSet *ls, SInt32 stride) {
IRO_ASSERT(2280, ls != NULL);
IRO_ASSERT(2281, !LocationSet_IsUnknown(ls));
ls->u.known.stride = stride;
}
-inline PAMemoryBlock *LocationSet_block(LocationSet *ls) {
+CW_INLINE PAMemoryBlock *LocationSet_block(LocationSet *ls) {
IRO_ASSERT(2298, ls != NULL);
return ls->block;
}
-inline Type *LocationSet_rtype(LocationSet *ls) {
+CW_INLINE Type *LocationSet_rtype(LocationSet *ls) {
IRO_ASSERT(2306, ls != NULL);
IRO_ASSERT(2307, ls != stUnknownLs);
return ls->rtype;
}
-inline CInt64 LocationSet_field(LocationSet *ls) {
+CW_INLINE CInt64 LocationSet_field(LocationSet *ls) {
IRO_ASSERT(2314, ls != NULL);
IRO_ASSERT(2315, !LocationSet_IsUnknown(ls));
return ls->u.known.field;
}
-inline UInt32 LocationSet_stride(LocationSet *ls) {
+CW_INLINE UInt32 LocationSet_stride(LocationSet *ls) {
IRO_ASSERT(2322, ls != NULL);
IRO_ASSERT(2323, !LocationSet_IsUnknown(ls));
return ls->u.known.stride;
}
-inline PAMemoryBlock *LocationSet_restriction(LocationSet *ls) {
+CW_INLINE PAMemoryBlock *LocationSet_restriction(LocationSet *ls) {
IRO_ASSERT(2330, ls != NULL);
IRO_ASSERT(2331, LocationSet_IsUnknown(ls));
return ls->u.unknown.restriction;
}
-inline LocationSet *LocationSet_bitfieldOf(LocationSet *ls) {
+CW_INLINE LocationSet *LocationSet_bitfieldOf(LocationSet *ls) {
IRO_ASSERT(2338, ls != NULL);
IRO_ASSERT(2339, LocationSet_IsUnknown(ls));
return ls->u.unknown.bitfieldOf;
}
-inline LocationSetSet *LocationSetSet_New(void) {
+CW_INLINE LocationSetSet *LocationSetSet_New(void) {
LocationSetSet *lss = IRO_malloc(sizeof(LocationSetSet));
IRO_ASSERT(2356, lss != NULL);
@@ -1404,7 +1404,7 @@ inline LocationSetSet *LocationSetSet_New(void) {
return lss;
}
-inline void LocationSetSet_Delete(LocationSetSet *lss) {
+CW_INLINE void LocationSetSet_Delete(LocationSetSet *lss) {
IRO_ASSERT(2369, lss != NULL);
IRO_ASSERT(2370, lss->loc == NULL);
IRO_ASSERT(2371, lss->otherLocs == NULL);
@@ -1413,7 +1413,7 @@ inline void LocationSetSet_Delete(LocationSetSet *lss) {
IRO_free(lss);
}
-inline void LocationSetSet_Init(LocationSetSet *lss) {
+CW_INLINE void LocationSetSet_Init(LocationSetSet *lss) {
IRO_ASSERT(2382, lss != NULL);
lss->loc = NULL;
@@ -1421,7 +1421,7 @@ inline void LocationSetSet_Init(LocationSetSet *lss) {
lss->count = 0;
}
-inline void LocationSetSet_Copy(LocationSetSet *dest, LocationSetSet *src) {
+CW_INLINE void LocationSetSet_Copy(LocationSetSet *dest, LocationSetSet *src) {
IRO_ASSERT(2391, dest != NULL);
IRO_ASSERT(2392, src != NULL);
@@ -1431,7 +1431,7 @@ inline void LocationSetSet_Copy(LocationSetSet *dest, LocationSetSet *src) {
LocationSetSet_AddSet(dest, src);
}
-inline void LocationSetSet_Term(LocationSetSet *lss) {
+CW_INLINE void LocationSetSet_Term(LocationSetSet *lss) {
IRO_ASSERT(2402, lss != NULL);
LocationSetSet_RemoveAll(lss);
@@ -1443,7 +1443,7 @@ inline void LocationSetSet_Term(LocationSetSet *lss) {
#endif
}
-inline void LocationSetSet_ForEach(LocationSetSet *lss, void (*action)(LocationSet *, void *), void *refcon) {
+CW_INLINE void LocationSetSet_ForEach(LocationSetSet *lss, void (*action)(LocationSet *, void *), void *refcon) {
IRO_ASSERT(2446, lss != NULL);
IRO_ASSERT(2447, action != NULL);
IRO_ASSERT(2448, refcon == NULL || refcon != NULL);
@@ -1454,7 +1454,7 @@ inline void LocationSetSet_ForEach(LocationSetSet *lss, void (*action)(LocationS
}
}
-inline LocationSet *LocationSetSet_Find(LocationSetSet *lss, LocationSet *ls) {
+CW_INLINE LocationSet *LocationSetSet_Find(LocationSetSet *lss, LocationSet *ls) {
IRO_ASSERT(2458, lss != NULL);
IRO_ASSERT(2459, ls != NULL);
@@ -1467,7 +1467,7 @@ inline LocationSet *LocationSetSet_Find(LocationSetSet *lss, LocationSet *ls) {
return NULL;
}
-inline LocationSet *LocationSetSet_FindUnknown(LocationSetSet *lss) {
+CW_INLINE LocationSet *LocationSetSet_FindUnknown(LocationSetSet *lss) {
IRO_ASSERT(2470, lss != NULL);
if (!lss->loc)
@@ -1482,19 +1482,19 @@ inline LocationSet *LocationSetSet_FindUnknown(LocationSetSet *lss) {
return NULL;
}
-inline LocationSet *LocationSetSet_FindFirst(LocationSetSet *lss) {
+CW_INLINE LocationSet *LocationSetSet_FindFirst(LocationSetSet *lss) {
IRO_ASSERT(2498, lss != NULL);
return lss->loc;
}
-inline int LocationSetSet_Count(LocationSetSet *lss) {
+CW_INLINE int LocationSetSet_Count(LocationSetSet *lss) {
IRO_ASSERT(2505, lss != NULL);
return lss->count;
}
-inline void LocationSetSet_RemoveAllWithMemoryBlock(LocationSetSet *lss, PAMemoryBlock *block) {
+CW_INLINE void LocationSetSet_RemoveAllWithMemoryBlock(LocationSetSet *lss, PAMemoryBlock *block) {
LocationSetSet *first;
LocationSetSet *prev;
LocationSetSet *next;
@@ -1541,7 +1541,7 @@ inline void LocationSetSet_RemoveAllWithMemoryBlock(LocationSetSet *lss, PAMemor
}
}
-inline void LocationSetSet_SimpleAdd(LocationSetSet *lss, LocationSet *ls) {
+CW_INLINE void LocationSetSet_SimpleAdd(LocationSetSet *lss, LocationSet *ls) {
IRO_ASSERT(2572, lss != NULL);
IRO_ASSERT(2573, ls != NULL);
@@ -1583,7 +1583,7 @@ inline void LocationSetSet_SimpleAdd(LocationSetSet *lss, LocationSet *ls) {
}
}
-inline void LocationSetSet_Add(LocationSetSet *lss, LocationSet *ls) {
+CW_INLINE void LocationSetSet_Add(LocationSetSet *lss, LocationSet *ls) {
IRO_ASSERT(2622, lss != NULL);
IRO_ASSERT(2623, ls != NULL);
@@ -1594,7 +1594,7 @@ inline void LocationSetSet_Add(LocationSetSet *lss, LocationSet *ls) {
}
}
-inline void LocationSetSet_AddUnknown(LocationSetSet *lss, Type *rtype, PAMemoryBlock *restriction, LocationSet *bitfieldOf) {
+CW_INLINE void LocationSetSet_AddUnknown(LocationSetSet *lss, Type *rtype, PAMemoryBlock *restriction, LocationSet *bitfieldOf) {
LocationSet *ls;
IRO_ASSERT(2643, lss != NULL);
@@ -1609,7 +1609,7 @@ inline void LocationSetSet_AddUnknown(LocationSetSet *lss, Type *rtype, PAMemory
LocationSet_Delete(ls);
}
-inline void LocationSetSet_Remove(LocationSetSet *lss, LocationSet *ls) {
+CW_INLINE void LocationSetSet_Remove(LocationSetSet *lss, LocationSet *ls) {
LocationSetSet *prev;
LocationSetSet *first;
LocationSetSet *tmp;
@@ -1653,28 +1653,28 @@ inline void LocationSetSet_Remove(LocationSetSet *lss, LocationSet *ls) {
}
}
-inline void LocationSetSet_RemoveAll(LocationSetSet *lss) {
+CW_INLINE void LocationSetSet_RemoveAll(LocationSetSet *lss) {
IRO_ASSERT(2707, lss != NULL);
while (lss && lss->loc)
LocationSetSet_Remove(lss, lss->loc);
}
-inline void LocationSetSet_AddSetAction(LocationSet *ls, void *refcon) {
+CW_INLINE void LocationSetSet_AddSetAction(LocationSet *ls, void *refcon) {
IRO_ASSERT(2717, ls != NULL);
IRO_ASSERT(2718, refcon != NULL);
LocationSetSet_Add((LocationSetSet *) refcon, ls);
}
-inline void LocationSetSet_SimpleAddSetAction(LocationSet *ls, void *refcon) {
+CW_INLINE void LocationSetSet_SimpleAddSetAction(LocationSet *ls, void *refcon) {
IRO_ASSERT(2725, ls != NULL);
IRO_ASSERT(2726, refcon != NULL);
LocationSetSet_SimpleAdd((LocationSetSet *) refcon, ls);
}
-inline void LocationSetSet_AddSet(LocationSetSet *dest, LocationSetSet *src) {
+CW_INLINE void LocationSetSet_AddSet(LocationSetSet *dest, LocationSetSet *src) {
IRO_ASSERT(2733, dest != NULL);
IRO_ASSERT(2734, src != NULL);
@@ -1684,21 +1684,21 @@ inline void LocationSetSet_AddSet(LocationSetSet *dest, LocationSetSet *src) {
LocationSetSet_ForEach(src, LocationSetSet_SimpleAddSetAction, dest);
}
-inline void LocationSetSet_RemoveSetAction(LocationSet *ls, void *refcon) {
+CW_INLINE void LocationSetSet_RemoveSetAction(LocationSet *ls, void *refcon) {
IRO_ASSERT(2744, ls != NULL);
IRO_ASSERT(2745, refcon != NULL);
LocationSetSet_Remove((LocationSetSet *) refcon, ls);
}
-inline void LocationSetSet_sub_488700(LocationSetSet *dest, LocationSetSet *src) {
+CW_INLINE void LocationSetSet_sub_488700(LocationSetSet *dest, LocationSetSet *src) {
IRO_ASSERT(2752, dest != NULL);
IRO_ASSERT(2753, src != NULL);
LocationSetSet_ForEach(src, LocationSetSet_RemoveSetAction, dest);
}
-inline Boolean LocationSetSets_Equal(LocationSetSet *lss1, LocationSetSet *lss2) {
+CW_INLINE Boolean LocationSetSets_Equal(LocationSetSet *lss1, LocationSetSet *lss2) {
IRO_ASSERT(2826, lss1 != NULL);
IRO_ASSERT(2827, lss2 != NULL);
@@ -1716,7 +1716,7 @@ inline Boolean LocationSetSets_Equal(LocationSetSet *lss1, LocationSetSet *lss2)
return 1;
}
-inline ParamMapping *ParamMapping_New(void) {
+CW_INLINE ParamMapping *ParamMapping_New(void) {
ParamMapping *pm = IRO_malloc(sizeof(ParamMapping));
IRO_ASSERT(2885, pm != NULL);
@@ -1728,7 +1728,7 @@ inline ParamMapping *ParamMapping_New(void) {
return pm;
}
-inline void ParamMapping_Delete(ParamMapping *pm) {
+CW_INLINE void ParamMapping_Delete(ParamMapping *pm) {
IRO_ASSERT(2898, pm != NULL);
IRO_ASSERT(2899, pm->actual == NULL);
IRO_ASSERT(2900, pm->formal == NULL);
@@ -1737,7 +1737,7 @@ inline void ParamMapping_Delete(ParamMapping *pm) {
IRO_free(pm);
}
-inline void ParamMapping_Init_PROBABLY(ParamMapping *pm, IROLinear *actual, Object *formal, ExtendedParam *extended) {
+CW_INLINE void ParamMapping_Init_PROBABLY(ParamMapping *pm, IROLinear *actual, Object *formal, ExtendedParam *extended) {
IRO_ASSERT(2911, pm != NULL);
pm->actual = actual;
@@ -1745,7 +1745,7 @@ inline void ParamMapping_Init_PROBABLY(ParamMapping *pm, IROLinear *actual, Obje
pm->extended = extended;
}
-inline void ParamMapping_Copy(ParamMapping *dest, ParamMapping *src) {
+CW_INLINE void ParamMapping_Copy(ParamMapping *dest, ParamMapping *src) {
IRO_ASSERT(2920, src != NULL);
IRO_ASSERT(2921, dest != NULL);
@@ -1754,7 +1754,7 @@ inline void ParamMapping_Copy(ParamMapping *dest, ParamMapping *src) {
dest->extended = src->extended;
}
-inline void ParamMapping_Term(ParamMapping *pm) {
+CW_INLINE void ParamMapping_Term(ParamMapping *pm) {
IRO_ASSERT(2933, pm != NULL);
#ifdef IRO_DEBUG
@@ -1764,25 +1764,25 @@ inline void ParamMapping_Term(ParamMapping *pm) {
#endif
}
-inline void ParamMapping_SetExtended(ParamMapping *pm, ExtendedParam *ep) {
+CW_INLINE void ParamMapping_SetExtended(ParamMapping *pm, ExtendedParam *ep) {
IRO_ASSERT(2992, pm != NULL);
pm->extended = ep;
}
-inline IROLinear *ParamMapping_actual(ParamMapping *pm) {
+CW_INLINE IROLinear *ParamMapping_actual(ParamMapping *pm) {
IRO_ASSERT(2999, pm != NULL);
return pm->actual;
}
-inline ExtendedParam *ParamMapping_extended(ParamMapping *pm) {
+CW_INLINE ExtendedParam *ParamMapping_extended(ParamMapping *pm) {
IRO_ASSERT(3011, pm != NULL);
return pm->extended;
}
-inline ParamMappingFunction *ParamMappingFunction_New(void) {
+CW_INLINE ParamMappingFunction *ParamMappingFunction_New(void) {
ParamMappingFunction *pmf = IRO_malloc(sizeof(ParamMappingFunction));
IRO_ASSERT(3026, pmf != NULL);
@@ -1793,7 +1793,7 @@ inline ParamMappingFunction *ParamMappingFunction_New(void) {
return pmf;
}
-inline void ParamMappingFunction_Delete(ParamMappingFunction *pmf) {
+CW_INLINE void ParamMappingFunction_Delete(ParamMappingFunction *pmf) {
IRO_ASSERT(3039, pmf != NULL);
IRO_ASSERT(3040, pmf->mapping == NULL);
IRO_ASSERT(3041, pmf->otherMappings == NULL);
@@ -1801,14 +1801,14 @@ inline void ParamMappingFunction_Delete(ParamMappingFunction *pmf) {
IRO_free(pmf);
}
-inline void ParamMappingFunction_Init(ParamMappingFunction *pmf) {
+CW_INLINE void ParamMappingFunction_Init(ParamMappingFunction *pmf) {
IRO_ASSERT(3050, pmf != NULL);
pmf->mapping = NULL;
pmf->otherMappings = NULL;
}
-inline void ParamMappingFunction_Copy(ParamMappingFunction *dest, ParamMappingFunction *src) {
+CW_INLINE void ParamMappingFunction_Copy(ParamMappingFunction *dest, ParamMappingFunction *src) {
IRO_ASSERT(3058, src != NULL);
IRO_ASSERT(3059, dest != NULL);
@@ -1817,7 +1817,7 @@ inline void ParamMappingFunction_Copy(ParamMappingFunction *dest, ParamMappingFu
ParamMappingFunction_AddAllMaybe_sub_487C50(dest, src);
}
-inline void ParamMappingFunction_Term(ParamMappingFunction *pmf) {
+CW_INLINE void ParamMappingFunction_Term(ParamMappingFunction *pmf) {
IRO_ASSERT(3068, pmf != NULL);
ParamMappingFunction_RemoveAll(pmf);
@@ -1828,7 +1828,7 @@ inline void ParamMappingFunction_Term(ParamMappingFunction *pmf) {
#endif
}
-inline void pmf_sub_487C70(ParamMappingFunction *pmf, void (*action)(ParamMapping *, void *), void *refcon) {
+CW_INLINE void pmf_sub_487C70(ParamMappingFunction *pmf, void (*action)(ParamMapping *, void *), void *refcon) {
IRO_ASSERT(3111, pmf != NULL);
IRO_ASSERT(3112, action != NULL);
IRO_ASSERT(3113, refcon == NULL || refcon != NULL);
@@ -1839,7 +1839,7 @@ inline void pmf_sub_487C70(ParamMappingFunction *pmf, void (*action)(ParamMappin
}
}
-inline ParamMapping *ParamMappingFunction_FindMappingByFormal(ParamMappingFunction *pmf, Object *formal) {
+CW_INLINE ParamMapping *ParamMappingFunction_FindMappingByFormal(ParamMappingFunction *pmf, Object *formal) {
IRO_ASSERT(3123, pmf != NULL);
IRO_ASSERT(3124, formal != NULL);
@@ -1852,7 +1852,7 @@ inline ParamMapping *ParamMappingFunction_FindMappingByFormal(ParamMappingFuncti
return NULL;
}
-inline void Pmf_Add_sub_486610(ParamMappingFunction *pmf, ParamMapping *mapping) {
+CW_INLINE void Pmf_Add_sub_486610(ParamMappingFunction *pmf, ParamMapping *mapping) {
ParamMapping *existing;
IRO_ASSERT(3138, pmf != NULL);
@@ -1876,7 +1876,7 @@ inline void Pmf_Add_sub_486610(ParamMappingFunction *pmf, ParamMapping *mapping)
}
}
-inline void ParamMappingFunction_Remove(ParamMappingFunction *pmf, ParamMapping *mapping) {
+CW_INLINE void ParamMappingFunction_Remove(ParamMappingFunction *pmf, ParamMapping *mapping) {
ParamMappingFunction *prev;
ParamMappingFunction *tmp;
@@ -1915,28 +1915,28 @@ inline void ParamMappingFunction_Remove(ParamMappingFunction *pmf, ParamMapping
}
}
-inline void ParamMappingFunction_RemoveAll(ParamMappingFunction *pmf) {
+CW_INLINE void ParamMappingFunction_RemoveAll(ParamMappingFunction *pmf) {
IRO_ASSERT(3213, pmf != NULL);
while (pmf && pmf->mapping)
ParamMappingFunction_Remove(pmf, pmf->mapping);
}
-inline void ParamMappingFunction_AddFunctionAction(ParamMapping *mapping, void *refcon) {
+CW_INLINE void ParamMappingFunction_AddFunctionAction(ParamMapping *mapping, void *refcon) {
IRO_ASSERT(3223, mapping != NULL);
IRO_ASSERT(3224, refcon != NULL);
Pmf_Add_sub_486610((ParamMappingFunction *) refcon, mapping);
}
-inline void ParamMappingFunction_AddAllMaybe_sub_487C50(ParamMappingFunction *dest, ParamMappingFunction *src) {
+CW_INLINE void ParamMappingFunction_AddAllMaybe_sub_487C50(ParamMappingFunction *dest, ParamMappingFunction *src) {
IRO_ASSERT(3231, dest != NULL);
IRO_ASSERT(3232, src != NULL);
pmf_sub_487C70(src, ParamMappingFunction_AddFunctionAction, dest);
}
-inline PointsToEntry *PointsToEntry_New(void) {
+CW_INLINE PointsToEntry *PointsToEntry_New(void) {
PointsToEntry *pte = IRO_malloc(sizeof(PointsToEntry));
IRO_ASSERT(3288, pte != NULL);
@@ -1947,7 +1947,7 @@ inline PointsToEntry *PointsToEntry_New(void) {
return pte;
}
-inline void PointsToEntry_Delete(PointsToEntry *pte) {
+CW_INLINE void PointsToEntry_Delete(PointsToEntry *pte) {
IRO_ASSERT(3300, pte != NULL);
IRO_ASSERT(3301, pte->loc == NULL);
IRO_ASSERT(3302, pte->locs == NULL);
@@ -1955,7 +1955,7 @@ inline void PointsToEntry_Delete(PointsToEntry *pte) {
IRO_free(pte);
}
-inline void PointsToEntry_Init(PointsToEntry *pte, LocationSet *loc, LocationSetSet *locs) {
+CW_INLINE void PointsToEntry_Init(PointsToEntry *pte, LocationSet *loc, LocationSetSet *locs) {
IRO_ASSERT(3312, pte != NULL);
IRO_ASSERT(3313, loc != NULL);
IRO_ASSERT(3314, !LocationSet_IsUnknown(loc));
@@ -1968,14 +1968,14 @@ inline void PointsToEntry_Init(PointsToEntry *pte, LocationSet *loc, LocationSet
LocationSetSet_Copy(pte->locs, locs);
}
-inline void PointsToEntry_Copy(PointsToEntry *dest, PointsToEntry *src) {
+CW_INLINE void PointsToEntry_Copy(PointsToEntry *dest, PointsToEntry *src) {
IRO_ASSERT(3325, src != NULL);
IRO_ASSERT(3326, dest != NULL);
PointsToEntry_Init(dest, src->loc, src->locs);
}
-inline void PointsToEntry_Term(PointsToEntry *pte) {
+CW_INLINE void PointsToEntry_Term(PointsToEntry *pte) {
IRO_ASSERT(3333, pte != NULL);
LocationSet_Term(pte->loc);
@@ -1989,7 +1989,7 @@ inline void PointsToEntry_Term(PointsToEntry *pte) {
#endif
}
-inline Boolean PointsToEntries_Equal(PointsToEntry *pte1, PointsToEntry *pte2) {
+CW_INLINE Boolean PointsToEntries_Equal(PointsToEntry *pte1, PointsToEntry *pte2) {
IRO_ASSERT(3381, pte1 != NULL);
IRO_ASSERT(3382, pte2 != NULL);
@@ -1999,19 +1999,19 @@ inline Boolean PointsToEntries_Equal(PointsToEntry *pte1, PointsToEntry *pte2) {
return LocationSets_Equal(pte1->loc, pte2->loc) && LocationSetSets_Equal(pte1->locs, pte2->locs);
}
-inline LocationSet *PointsToEntry_loc(PointsToEntry *pte) {
+CW_INLINE LocationSet *PointsToEntry_loc(PointsToEntry *pte) {
IRO_ASSERT(3407, pte != NULL);
return pte->loc;
}
-inline LocationSetSet *PointsToEntry_locs(PointsToEntry *pte) {
+CW_INLINE LocationSetSet *PointsToEntry_locs(PointsToEntry *pte) {
IRO_ASSERT(3414, pte != NULL);
return pte->locs;
}
-inline PointsToFunction *PointsToFunction_New(void) {
+CW_INLINE PointsToFunction *PointsToFunction_New(void) {
PointsToFunction *pointsToFunc = IRO_malloc(sizeof(PointsToFunction));
IRO_ASSERT(3430, pointsToFunc != NULL);
@@ -2022,7 +2022,7 @@ inline PointsToFunction *PointsToFunction_New(void) {
return pointsToFunc;
}
-inline void PointsToFunction_Delete(PointsToFunction *pointsToFunc) {
+CW_INLINE void PointsToFunction_Delete(PointsToFunction *pointsToFunc) {
IRO_ASSERT(3442, pointsToFunc != NULL);
IRO_ASSERT(3443, pointsToFunc->pte == NULL);
IRO_ASSERT(3444, pointsToFunc->otherPtes == NULL);
@@ -2030,14 +2030,14 @@ inline void PointsToFunction_Delete(PointsToFunction *pointsToFunc) {
IRO_free(pointsToFunc);
}
-inline void PointsToFunction_Init(PointsToFunction *pointsToFunc) {
+CW_INLINE void PointsToFunction_Init(PointsToFunction *pointsToFunc) {
IRO_ASSERT(3454, pointsToFunc != NULL);
pointsToFunc->pte = NULL;
pointsToFunc->otherPtes = NULL;
}
-inline void PointsToFunction_Copy(PointsToFunction *dest, PointsToFunction *src) {
+CW_INLINE void PointsToFunction_Copy(PointsToFunction *dest, PointsToFunction *src) {
IRO_ASSERT(3462, src != NULL);
IRO_ASSERT(3463, dest != NULL);
@@ -2046,7 +2046,7 @@ inline void PointsToFunction_Copy(PointsToFunction *dest, PointsToFunction *src)
PointsToFunction_AddAllIGuess_sub_487D80(dest, src);
}
-inline void PointsToFunction_Term(PointsToFunction *pointsToFunc) {
+CW_INLINE void PointsToFunction_Term(PointsToFunction *pointsToFunc) {
IRO_ASSERT(3472, pointsToFunc != NULL);
PointsToFunction_RemoveAll(pointsToFunc);
@@ -2057,7 +2057,7 @@ inline void PointsToFunction_Term(PointsToFunction *pointsToFunc) {
#endif
}
-inline void PointsToFunction_ForEach(PointsToFunction *pointsToFunc, void (*action)(PointsToEntry *, void *), void *refcon) {
+CW_INLINE void PointsToFunction_ForEach(PointsToFunction *pointsToFunc, void (*action)(PointsToEntry *, void *), void *refcon) {
IRO_ASSERT(3515, pointsToFunc != NULL);
IRO_ASSERT(3516, action != NULL);
IRO_ASSERT(3517, refcon == NULL || refcon != NULL);
@@ -2068,7 +2068,7 @@ inline void PointsToFunction_ForEach(PointsToFunction *pointsToFunc, void (*acti
}
}
-inline PointsToEntry *PointsToFunction_FindByLocationSet(PointsToFunction *pointsToFunc, LocationSet *ls) {
+CW_INLINE PointsToEntry *PointsToFunction_FindByLocationSet(PointsToFunction *pointsToFunc, LocationSet *ls) {
IRO_ASSERT(3527, pointsToFunc != NULL);
IRO_ASSERT(3528, ls != NULL);
@@ -2081,13 +2081,13 @@ inline PointsToEntry *PointsToFunction_FindByLocationSet(PointsToFunction *point
return NULL;
}
-inline PointsToEntry *PointsToFunction_FindFirst(PointsToFunction *pointsToFunc) {
+CW_INLINE PointsToEntry *PointsToFunction_FindFirst(PointsToFunction *pointsToFunc) {
IRO_ASSERT(3539, pointsToFunc != NULL);
return pointsToFunc->pte;
}
-inline PointsToEntry *PointsToFunction_FindByLookupCompatibleLocationSet(PointsToFunction *pointsToFunc, LocationSet *ls) {
+CW_INLINE PointsToEntry *PointsToFunction_FindByLookupCompatibleLocationSet(PointsToFunction *pointsToFunc, LocationSet *ls) {
IRO_ASSERT(3546, pointsToFunc != NULL);
IRO_ASSERT(3547, ls != NULL);
@@ -2104,7 +2104,7 @@ inline PointsToEntry *PointsToFunction_FindByLookupCompatibleLocationSet(PointsT
return NULL;
}
-inline PointsToEntry *PointsToFunction_FindContainingLocationSet(PointsToFunction *pointsToFunc, LocationSet *ls, Type *rtype) {
+CW_INLINE PointsToEntry *PointsToFunction_FindContainingLocationSet(PointsToFunction *pointsToFunc, LocationSet *ls, Type *rtype) {
IRO_ASSERT(3565, pointsToFunc != NULL);
IRO_ASSERT(3566, ls != NULL);
IRO_ASSERT(3567, rtype != NULL);
@@ -2120,7 +2120,7 @@ inline PointsToEntry *PointsToFunction_FindContainingLocationSet(PointsToFunctio
return NULL;
}
-inline void PointsToFunction_RemoveOverlappingLocations(PointsToFunction *pointsToFunc, PointsToEntry *pte) {
+CW_INLINE void PointsToFunction_RemoveOverlappingLocations(PointsToFunction *pointsToFunc, PointsToEntry *pte) {
Type *rtype1;
Type *rtype2;
LocationSet *ls;
@@ -2179,7 +2179,7 @@ inline void PointsToFunction_RemoveOverlappingLocations(PointsToFunction *points
}
}
-inline Boolean ShouldAddNewPointsToEntryToFunction(PointsToFunction *pointsToFunc, PointsToEntry *pte) {
+CW_INLINE Boolean ShouldAddNewPointsToEntryToFunction(PointsToFunction *pointsToFunc, PointsToEntry *pte) {
Boolean flag;
Boolean isKnown;
SInt32 stride;
@@ -2247,7 +2247,7 @@ inline Boolean ShouldAddNewPointsToEntryToFunction(PointsToFunction *pointsToFun
return !flag;
}
-inline Boolean PointsToFunction_SimpleAdd(PointsToFunction *pointsToFunc, PointsToEntry *pte) {
+CW_INLINE Boolean PointsToFunction_SimpleAdd(PointsToFunction *pointsToFunc, PointsToEntry *pte) {
PointsToEntry *newPTE;
IRO_ASSERT(3741, pointsToFunc != NULL);
@@ -2266,7 +2266,7 @@ inline Boolean PointsToFunction_SimpleAdd(PointsToFunction *pointsToFunc, Points
return 1;
}
-inline Boolean PointsToFunction_Add(PointsToFunction *pointsToFunc, PointsToEntry *pte) {
+CW_INLINE Boolean PointsToFunction_Add(PointsToFunction *pointsToFunc, PointsToEntry *pte) {
IRO_ASSERT(3766, pointsToFunc != NULL);
IRO_ASSERT(3767, pte != NULL);
@@ -2284,7 +2284,7 @@ inline Boolean PointsToFunction_Add(PointsToFunction *pointsToFunc, PointsToEntr
return 0;
}
-inline Boolean PointsToFunction_AddWithoutChecking(PointsToFunction *pointsToFunc, PointsToEntry *pte) {
+CW_INLINE Boolean PointsToFunction_AddWithoutChecking(PointsToFunction *pointsToFunc, PointsToEntry *pte) {
LocationSet *ls;
IRO_ASSERT(3793, pointsToFunc != NULL);
@@ -2301,7 +2301,7 @@ inline Boolean PointsToFunction_AddWithoutChecking(PointsToFunction *pointsToFun
return 0;
}
-inline void PointsToFunction_RemoveByLocationSet(PointsToFunction *pointsToFunc, LocationSet *ls) {
+CW_INLINE void PointsToFunction_RemoveByLocationSet(PointsToFunction *pointsToFunc, LocationSet *ls) {
PointsToFunction *prev;
PointsToFunction *tmp;
@@ -2341,28 +2341,28 @@ inline void PointsToFunction_RemoveByLocationSet(PointsToFunction *pointsToFunc,
}
}
-inline void PointsToFunction_RemoveAll(PointsToFunction *pointsToFunc) {
+CW_INLINE void PointsToFunction_RemoveAll(PointsToFunction *pointsToFunc) {
IRO_ASSERT(3862, pointsToFunc != NULL);
while (pointsToFunc && pointsToFunc->pte)
PointsToFunction_RemoveByLocationSet(pointsToFunc, pointsToFunc->pte->loc);
}
-inline void PointsToFunction_AddFunctionAction(PointsToEntry *pte, void *refcon) {
+CW_INLINE void PointsToFunction_AddFunctionAction(PointsToEntry *pte, void *refcon) {
IRO_ASSERT(3872, pte != NULL);
IRO_ASSERT(3873, refcon != NULL);
PointsToFunction_Add((PointsToFunction *) refcon, pte);
}
-inline void PointsToFunction_SimpleAddFunctionAction(PointsToEntry *pte, void *refcon) {
+CW_INLINE void PointsToFunction_SimpleAddFunctionAction(PointsToEntry *pte, void *refcon) {
IRO_ASSERT(3880, pte != NULL);
IRO_ASSERT(3881, refcon != NULL);
PointsToFunction_SimpleAdd((PointsToFunction *) refcon, pte);
}
-inline void PointsToFunction_AddAllIGuess_sub_487D80(PointsToFunction *dest, PointsToFunction *src) {
+CW_INLINE void PointsToFunction_AddAllIGuess_sub_487D80(PointsToFunction *dest, PointsToFunction *src) {
IRO_ASSERT(3888, dest != NULL);
IRO_ASSERT(3889, src != NULL);
@@ -2372,7 +2372,7 @@ inline void PointsToFunction_AddAllIGuess_sub_487D80(PointsToFunction *dest, Poi
PointsToFunction_ForEach(src, PointsToFunction_SimpleAddFunctionAction, dest);
}
-inline void PointsToFunction_SortByExtendedParamNum(PointsToFunction *pointsToFunc) {
+CW_INLINE void PointsToFunction_SortByExtendedParamNum(PointsToFunction *pointsToFunc) {
UInt32 value1;
UInt32 value2;
PointsToFunction *scan;
@@ -2417,7 +2417,7 @@ inline void PointsToFunction_SortByExtendedParamNum(PointsToFunction *pointsToFu
}
}
-inline Boolean PointsToFunctions_Equal(PointsToFunction *pointsToFunc1, PointsToFunction *pointsToFunc2) {
+CW_INLINE Boolean PointsToFunctions_Equal(PointsToFunction *pointsToFunc1, PointsToFunction *pointsToFunc2) {
PointsToFunction *scan;
PointsToEntry *pte;
@@ -2442,11 +2442,11 @@ inline Boolean PointsToFunctions_Equal(PointsToFunction *pointsToFunc1, PointsTo
return 1;
}
-inline Boolean PointsToFunctions_Match(PointsToFunction *pointsToFunc1, PointsToFunction *pointsToFunc2) {
+CW_INLINE Boolean PointsToFunctions_Match(PointsToFunction *pointsToFunc1, PointsToFunction *pointsToFunc2) {
return 1;
}
-inline PartialTransferFunction *PartialTransferFunction_New(void) {
+CW_INLINE PartialTransferFunction *PartialTransferFunction_New(void) {
PartialTransferFunction *ptf = IRO_malloc(sizeof(PartialTransferFunction));
IRO_ASSERT(4110, ptf != NULL);
@@ -2461,7 +2461,7 @@ inline PartialTransferFunction *PartialTransferFunction_New(void) {
return ptf;
}
-inline void PartialTransferFunction_Delete(PartialTransferFunction *ptf) {
+CW_INLINE void PartialTransferFunction_Delete(PartialTransferFunction *ptf) {
IRO_ASSERT(4126, ptf != NULL);
IRO_ASSERT(4127, ptf->initialPointsToFn == NULL);
IRO_ASSERT(4128, ptf->finalPointsToFn == NULL);
@@ -2473,7 +2473,7 @@ inline void PartialTransferFunction_Delete(PartialTransferFunction *ptf) {
IRO_free(ptf);
}
-inline void PartialTransferFunction_Init(PartialTransferFunction *ptf, IROLinear *contextNd, PartialTransferFunction *contextPTF) {
+CW_INLINE void PartialTransferFunction_Init(PartialTransferFunction *ptf, IROLinear *contextNd, PartialTransferFunction *contextPTF) {
IRO_ASSERT(4142, ptf != NULL);
IRO_ASSERT(4143, contextNd != NULL);
IRO_ASSERT(4144, contextPTF != NULL);
@@ -2494,7 +2494,7 @@ inline void PartialTransferFunction_Init(PartialTransferFunction *ptf, IROLinear
ptf->context.ptf = contextPTF;
}
-inline void PartialTransferFunction_Copy(PartialTransferFunction *dest, PartialTransferFunction *src) {
+CW_INLINE void PartialTransferFunction_Copy(PartialTransferFunction *dest, PartialTransferFunction *src) {
IRO_ASSERT(4164, src != NULL);
IRO_ASSERT(4165, dest != NULL);
@@ -2517,7 +2517,7 @@ inline void PartialTransferFunction_Copy(PartialTransferFunction *dest, PartialT
dest->context = src->context;
}
-inline void PartialTransferFunction_Term(PartialTransferFunction *ptf) {
+CW_INLINE void PartialTransferFunction_Term(PartialTransferFunction *ptf) {
IRO_ASSERT(4190, ptf != NULL);
PointsToFunction_Term(ptf->initialPointsToFn);
@@ -2544,25 +2544,25 @@ inline void PartialTransferFunction_Term(PartialTransferFunction *ptf) {
#endif
}
-inline PointsToFunction *PartialTransferFunction_initialPointsToFn(PartialTransferFunction *ptf) {
+CW_INLINE PointsToFunction *PartialTransferFunction_initialPointsToFn(PartialTransferFunction *ptf) {
IRO_ASSERT(4221, ptf != NULL);
return ptf->initialPointsToFn;
}
-inline PointsToFunction *PartialTransferFunction_finalPointsToFn(PartialTransferFunction *ptf) {
+CW_INLINE PointsToFunction *PartialTransferFunction_finalPointsToFn(PartialTransferFunction *ptf) {
IRO_ASSERT(4227, ptf != NULL);
return ptf->finalPointsToFn;
}
-inline LocationSetSet *PTF_sub_48D750(PartialTransferFunction *ptf) {
+CW_INLINE LocationSetSet *PTF_sub_48D750(PartialTransferFunction *ptf) {
IRO_ASSERT(4233, ptf != NULL);
return ptf->funcModifies;
}
-inline LocationSet *PartialTransferFunction_returnLocation(PartialTransferFunction *ptf) {
+CW_INLINE LocationSet *PartialTransferFunction_returnLocation(PartialTransferFunction *ptf) {
IRO_ASSERT(4249, ptf != NULL);
if (!ptf->returnLocation) {
@@ -2579,25 +2579,25 @@ inline LocationSet *PartialTransferFunction_returnLocation(PartialTransferFuncti
return ptf->returnLocation;
}
-inline IROLinear *PTF_sub_48B980(PartialTransferFunction *ptf) {
+CW_INLINE IROLinear *PTF_sub_48B980(PartialTransferFunction *ptf) {
IRO_ASSERT(4265, ptf != NULL);
return ptf->context.nd;
}
-inline PartialTransferFunction *PTF_sub_48B970(PartialTransferFunction *ptf) {
+CW_INLINE PartialTransferFunction *PTF_sub_48B970(PartialTransferFunction *ptf) {
IRO_ASSERT(4271, ptf != NULL);
return ptf->context.ptf;
}
-inline void PartialTransferFunction_sub_48A610(PartialTransferFunction *ptf, Boolean value) {
+CW_INLINE void PartialTransferFunction_sub_48A610(PartialTransferFunction *ptf, Boolean value) {
IRO_ASSERT(4298, ptf != NULL);
ptf->x10 = (value != 0) ? 1 : 0;
}
-inline PTFList *PTFList_New(void) {
+CW_INLINE PTFList *PTFList_New(void) {
PTFList *ptfList = IRO_malloc(sizeof(PTFList));
IRO_ASSERT(4393, ptfList != NULL);
@@ -2608,7 +2608,7 @@ inline PTFList *PTFList_New(void) {
return ptfList;
}
-inline void PTFList_Delete(PTFList *ptfList) {
+CW_INLINE void PTFList_Delete(PTFList *ptfList) {
IRO_ASSERT(4405, ptfList != NULL);
IRO_ASSERT(4406, ptfList->ptf == NULL);
IRO_ASSERT(4407, ptfList->otherPTFs == NULL);
@@ -2616,14 +2616,14 @@ inline void PTFList_Delete(PTFList *ptfList) {
IRO_free(ptfList);
}
-inline void PTFList_Init(PTFList *ptfList) {
+CW_INLINE void PTFList_Init(PTFList *ptfList) {
IRO_ASSERT(4417, ptfList != NULL);
ptfList->ptf = NULL;
ptfList->otherPTFs = NULL;
}
-inline void PTFList_Term(PTFList *ptfList) {
+CW_INLINE void PTFList_Term(PTFList *ptfList) {
IRO_ASSERT(4435, ptfList != NULL);
PTFList_RemoveAll(ptfList);
@@ -2634,7 +2634,7 @@ inline void PTFList_Term(PTFList *ptfList) {
#endif
}
-inline void PTFList_ForEach(PTFList *ptfList, void (*action)(PartialTransferFunction *, void *), void *refcon) {
+CW_INLINE void PTFList_ForEach(PTFList *ptfList, void (*action)(PartialTransferFunction *, void *), void *refcon) {
IRO_ASSERT(4478, ptfList != NULL);
IRO_ASSERT(4479, action != NULL);
IRO_ASSERT(4480, refcon == NULL || refcon != NULL);
@@ -2645,7 +2645,7 @@ inline void PTFList_ForEach(PTFList *ptfList, void (*action)(PartialTransferFunc
}
}
-inline PartialTransferFunction *PTFList_sub_48A0F0(PTFList *ptfList, PartialTransferFunction *ptf) {
+CW_INLINE PartialTransferFunction *PTFList_sub_48A0F0(PTFList *ptfList, PartialTransferFunction *ptf) {
IRO_ASSERT(4490, ptfList != NULL);
IRO_ASSERT(4491, ptf != NULL);
@@ -2659,13 +2659,13 @@ inline PartialTransferFunction *PTFList_sub_48A0F0(PTFList *ptfList, PartialTran
return NULL;
}
-inline PartialTransferFunction *PTFList_FindFirst(PTFList *ptfList) {
+CW_INLINE PartialTransferFunction *PTFList_FindFirst(PTFList *ptfList) {
IRO_ASSERT(4502, ptfList != NULL);
return ptfList->ptf;
}
-inline void PTFList_sub_48A080(PTFList *ptfList, PartialTransferFunction *ptf) {
+CW_INLINE void PTFList_sub_48A080(PTFList *ptfList, PartialTransferFunction *ptf) {
IRO_ASSERT(4511, ptfList != NULL);
IRO_ASSERT(4512, ptf != NULL);
@@ -2680,7 +2680,7 @@ inline void PTFList_sub_48A080(PTFList *ptfList, PartialTransferFunction *ptf) {
ptfList->ptf = ptf;
}
-inline void PTFList_sub_48A050(PTFList *ptfList, PartialTransferFunction *ptf) {
+CW_INLINE void PTFList_sub_48A050(PTFList *ptfList, PartialTransferFunction *ptf) {
IRO_ASSERT(4529, ptfList != NULL);
IRO_ASSERT(4530, ptf != NULL);
@@ -2688,7 +2688,7 @@ inline void PTFList_sub_48A050(PTFList *ptfList, PartialTransferFunction *ptf) {
PTFList_sub_48A080(ptfList, ptf);
}
-inline void PTFList_Remove(PTFList *ptfList, PartialTransferFunction *ptf) {
+CW_INLINE void PTFList_Remove(PTFList *ptfList, PartialTransferFunction *ptf) {
PTFList *prev;
PTFList *tmp;
@@ -2725,7 +2725,7 @@ inline void PTFList_Remove(PTFList *ptfList, PartialTransferFunction *ptf) {
}
}
-inline void PTFList_RemoveAll(PTFList *ptfList) {
+CW_INLINE void PTFList_RemoveAll(PTFList *ptfList) {
IRO_ASSERT(4582, ptfList != NULL);
while (ptfList && ptfList->ptf)
diff --git a/compiler_and_linker/unsorted/IroUtil.c b/compiler_and_linker/unsorted/IroUtil.c
index 53e6733..3ed6350 100644
--- a/compiler_and_linker/unsorted/IroUtil.c
+++ b/compiler_and_linker/unsorted/IroUtil.c
@@ -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;
diff --git a/includes/cmdline.h b/includes/cmdline.h
index 6c39423..e9d3726 100644
--- a/includes/cmdline.h
+++ b/includes/cmdline.h
@@ -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
diff --git a/includes/common.h b/includes/common.h
index 5bbb017..ba9b54c 100644
--- a/includes/common.h
+++ b/includes/common.h
@@ -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
// ----------
diff --git a/includes/compiler/BitVector.h b/includes/compiler/BitVector.h
index 724bb8f..a6830d6 100644
--- a/includes/compiler/BitVector.h
+++ b/includes/compiler/BitVector.h
@@ -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 {
diff --git a/includes/compiler/CInt64.h b/includes/compiler/CInt64.h
index a0938e2..663168a 100644
--- a/includes/compiler/CInt64.h
+++ b/includes/compiler/CInt64.h
@@ -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;
}
diff --git a/includes/compiler/InlineAsm.h b/includes/compiler/InlineAsm.h
index ca0032e..7c07b23 100644
--- a/includes/compiler/InlineAsm.h
+++ b/includes/compiler/InlineAsm.h
@@ -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);
diff --git a/includes/compiler/IroFlowgraph.h b/includes/compiler/IroFlowgraph.h
index 98b6110..90e696c 100644
--- a/includes/compiler/IroFlowgraph.h
+++ b/includes/compiler/IroFlowgraph.h
@@ -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++;
diff --git a/includes/compiler/IroUtil.h b/includes/compiler/IroUtil.h
index 502d0cd..a757025 100644
--- a/includes/compiler/IroUtil.h
+++ b/includes/compiler/IroUtil.h
@@ -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;
diff --git a/includes/compiler/objects.h b/includes/compiler/objects.h
index 2209dee..5f56877 100644
--- a/includes/compiler/objects.h
+++ b/includes/compiler/objects.h
@@ -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;
}
diff --git a/includes/oslib.h b/includes/oslib.h
index d5be38e..3c8d88c 100644
--- a/includes/oslib.h
+++ b/includes/oslib.h
@@ -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;
diff --git a/sdk_hdrs/CWPlugins.h b/sdk_hdrs/CWPlugins.h
index ecd690b..c959b9f 100755
--- a/sdk_hdrs/CWPlugins.h
+++ b/sdk_hdrs/CWPlugins.h
@@ -1 +1 @@
-/* * CWPlugins.h - Common declarations for Metrowerks CodeWarrior� plugins * * Copyright � 1995-1997 Metrowerks, Inc. All rights reserved. * */ #include "common.h" #ifndef __CWPlugins_H__ #define __CWPlugins_H__ #ifdef __MWERKS__ # pragma once #endif #define CWPLUGIN_HOST_MACOS 1 #define CWPLUGIN_HOST_WIN32 2 #define CWPLUGIN_HOST_SOLARIS 3 #define CWPLUGIN_HOST_LINUX 4 #ifndef CWPLUGIN_HOST # ifdef WIN32 # define CWPLUGIN_HOST CWPLUGIN_HOST_WIN32 # elif defined(macintosh) # define CWPLUGIN_HOST CWPLUGIN_HOST_MACOS # elif defined(__sun__) # define CWPLUGIN_HOST CWPLUGIN_HOST_SOLARIS # elif defined(__linux__) || defined(__CLION_IDE__) # define CWPLUGIN_HOST CWPLUGIN_HOST_LINUX # else # error # endif #endif #define CWPLUGIN_API_MACOS 1 #define CWPLUGIN_API_WIN32 2 #define CWPLUGIN_API_UNIX 3 #ifndef CWPLUGIN_API # ifdef WIN32 # define CWPLUGIN_API CWPLUGIN_API_WIN32 # elif defined(macintosh) # define CWPLUGIN_API CWPLUGIN_API_MACOS # elif defined(__sun__) || defined(__linux__) || defined(__CLION_IDE__) # define CWPLUGIN_API CWPLUGIN_API_UNIX # else # error # endif #endif /* ** Radix 256 notation where a 32-bit integer is created from four ** ASCII characters. A four-character constant of this form, say ** 'ABCD', must always be represented with the same pattern, 0x41424344 ** in this case, regardless of big/little endian issues. */ typedef SInt32 CWFourCharType; #define CWFOURCHAR(a, b, c, d) \ (((CWFourCharType) ((a) & 0xff) << 24) \ | ((CWFourCharType) ((b) & 0xff) << 16) \ | ((CWFourCharType) ((c) & 0xff) << 8) \ | ((CWFourCharType) ((d) & 0xff))) #if CWPLUGIN_API == CWPLUGIN_API_UNIX #include <sys/param.h> #endif #ifndef CW_USE_PRAGMA_EXPORT #if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS #define CW_USE_PRAGMA_EXPORT 1 #else #define CW_USE_PRAGMA_EXPORT 0 #endif #endif #ifndef CW_USE_PRAGMA_IMPORT #if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS #define CW_USE_PRAGMA_IMPORT 1 #else #define CW_USE_PRAGMA_IMPORT 0 #endif #endif #ifdef __MWERKS__ #pragma options align=mac68k #endif #ifdef _MSC_VER #pragma pack(push,2) #endif #ifdef __cplusplus extern "C" { #endif #if CW_USE_PRAGMA_IMPORT #pragma import on #endif /* These constants specify the action the IDE is asking the plugin to execute */ enum { reqInitialize = -2, /* called when the plugin is loaded */ reqTerminate = -1, /* called when the plugin is unloaded */ reqIdle = -100, /* called periodically to allow for plugin tasks EP 6/24/98 */ reqAbout = -101, /* called to ask plugin to display about dialog EP 6/24/98 */ reqPrefsChange = -102 /* called when an associated pref panel changes EP 6/24/98 */ }; /* Used in CWFileInfo.dependencyType to indicate what type of make */ /* dependency to establish between files */ typedef enum CWDependencyType { cwNoDependency, /* do not establish a dependency */ cwNormalDependency, /* recompile dependent whenever prereq changes */ cwInterfaceDependency /* recompile only if interface to file changes */ } CWDependencyType; /* Used in CWFileInfo.filedatatype to indicate the type of data in a loaded file */ enum { cwFileTypeUnknown, /* unknown binary data */ cwFileTypeText, /* normal text file */ cwFileTypePrecompiledHeader /* cached precompiled header */ }; /* constant for CWFileInfo.isdependentoffile */ #define kCurrentCompiledFile -1L /* constant for CWStorePluginData/CWGetPluginData */ #define kTargetGlobalPluginData -1L /* constant for CWNewProjectEntryInfo link order, segment, and overlay values */ #define kDefaultLinkPosition -1L /* Selectors for CWFindLogicalDirectory */ enum { kIDEDirectorySelector = 1, /* parent directory of IDE application; "bin" folder on Win32 */ kCodeWarriorDirectorySelector, /* root CodeWarrior directory */ kSystemDirectorySelector, /* system directory */ kProjectDirectorySelector, /* parent directory of current project */ kProjectDataDirectorySelector, /* project data directory */ kTargetDataDirectorySelector, /* target data directory (within project data directory) */ kTargetObjectCodeDirectorySelector, /* object code directory (within target data directory) */ kDebuggerCacheDirectorySelector, /* "CW Debugging Cache" directory */ kHelperAppsDirectorySelector, /* "(Helper Apps)" directory */ kPluginsDirectorySelector, /* "CodeWarrior Plugins" (Mac) or "plugins" (Win32) directory */ kPluginParentDirectorySelector, /* parent directory of current plugin */ kStationeryDirectorySelector, /* "(Project Stationery)" directory */ kRADStationeryDirectorySelector, /* "RAD Stationery" directory */ kLocalizedResourcesDirectorySelector /* "resources" directory */ }; /* CWPluginContext is a magic cookie passed to all plugins. It must */ /* be passed back to all IDE callbacks */ typedef struct CWPluginPrivateContext* CWPluginContext; /* CWResult is the error/status result returned by all IDE API routine. */ /* The most common errors are returned directly. For OS-specific errors, the */ /* CWResult is cwErrOSError, and the OS-specific error can be obtained by */ /* calling CWGetOSError() */ typedef SInt32 CWResult; /* CWMemHandle is an abstraction for memory used in some parts */ /* of the plugin API. API routines must be used to allocate */ /* and free CWMemHandles, or to convert them to pointers. */ typedef struct CWMemHandlePrivateStruct* CWMemHandle; /* Used to identify custom data associated by a plugin with */ /* a project file or a target as a whole. Must be a four character */ /* constant. All lower case constants are reserved by the IDE */ typedef UInt32 CWDataType; /* Some information used in the compiler/linker API is platform-dependent */ /* We use some typedefs to isolate the differences */ /* CWFileSpec contains the native platform file specifier. */ /* CWFileName contains the string type for a native file name */ /* CWFileTime contains the native platform file timestamp */ /* CWOSResult contains the native platform error return value */ /* CWResult contains an API routine error/status result */ /* CW_CALLBACK is a macro defining the calling convention and return type for */ /* IDE callback routines. */ /* CW_PLUGINENTRY is a macro defining the calling convention and return type for */ /* plugin entry points. */ /* CWSUCCESS is a macro that evaluates to true when given a CWResult indicating an */ /* routine succeeded */ #if CWPLUGIN_API == CWPLUGIN_API_MACOS typedef FSSpec CWFileSpec; typedef char CWFileName[32]; typedef unsigned long CWFileTime; typedef OSErr CWOSResult; #elif CWPLUGIN_API == CWPLUGIN_API_WIN32 typedef unsigned char Boolean; typedef struct CWFileSpec { char path[MAX_PATH]; } CWFileSpec; typedef char CWFileName[65]; typedef FILETIME CWFileTime; typedef DWORD CWOSResult; #elif CWPLUGIN_API == CWPLUGIN_API_UNIX #define MAX_PATH MAXPATHLEN #ifndef __MACTYPES__ typedef unsigned char Boolean; #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif typedef struct CWFileSpec { char path[MAX_PATH]; } CWFileSpec; typedef char CWFileName[65]; typedef time_t CWFileTime; typedef int CWOSResult; #else #error Unknown plugin API! #endif #define CWSUCCESS(result) ((result) == 0) #if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS #define CW_CALLBACK pascal CWResult #define CW_CALLBACK_PTR(function_name) pascal CWResult (function_name) #define CWPLUGIN_ENTRY(function_name) pascal short (function_name) #elif CWPLUGIN_HOST == CWPLUGIN_HOST_WIN32 #define CW_CALLBACK CWResult __stdcall #define CW_CALLBACK_PTR(function_name) CWResult (__stdcall function_name) #define CWPLUGIN_ENTRY(function_name) short (__stdcall function_name) #elif CWPLUGIN_HOST==CWPLUGIN_HOST_SOLARIS || CWPLUGIN_HOST==CWPLUGIN_HOST_LINUX #define CW_CALLBACK CWResult #define CW_CALLBACK_PTR(function_name) CWResult (function_name) #define CWPLUGIN_ENTRY(function_name) short (function_name) #else #error Unknown plugin host! #endif /* information returned by CWFindAndLoadFile */ typedef struct CWFileInfo { Boolean fullsearch; /* [<-] do we do a full search of paths for file */ char dependencyType; /* [<-] type CWDependencyType */ SInt32 isdependentoffile; /* [<-] this file is a dependent of file id */ /* (zero based) or -1L if of current file */ Boolean suppressload; /* [<-] find but don't load the file */ Boolean padding; /* [**] structure padding */ const char* filedata; /* [->] point to the file text/data, or NULL */ SInt32 filedatalength; /* [->] length of filedata */ short filedatatype; /* [->] type of data pointed to by filedata */ /* the remaining members are valid only when called by compilers */ short fileID; /* [->] use in browse records and dependencies */ CWFileSpec filespec; /* [->] specifies the file on disk */ Boolean alreadyincluded; /* [->] TRUE if already included in current compile */ Boolean recordbrowseinfo; /* [->] record browse info for this file? */ } CWFileInfo; /* information maintained by the IDE for each segment in the project */ typedef struct CWProjectSegmentInfo { char name[32]; /* segment name */ short attributes; /* segment attributes */ } CWProjectSegmentInfo; /* 64 bit address */ typedef struct CWAddr64 { SInt32 lo; /* low order longword of address */ SInt32 hi; /* high order longword of address */ } CWAddr64; /* describes an overlay group, Use CWGetOverlayGroup1Info to iterate over overlay groups */ typedef struct CWOverlay1GroupInfo { char name[256]; /* overlay group name */ CWAddr64 address; /* load address */ SInt32 numoverlays; /* number of overlays in this group */ } CWOverlay1GroupInfo; /* describes an overlay, use CWGetOverlay1Info to iterate over overlays */ typedef struct CWOverlay1Info { char name[256]; /* name of this overlay */ SInt32 numfiles; /* number of files in the overlay */ } CWOverlay1Info; /* describes a file in an overlay, use CWGetOverlayFile1Info to iterate over files. Use */ /* whichfile in calls taking a file number, e.g. CWLoadObjectData or CWGetFileInfo */ typedef struct CWOverlay1FileInfo { SInt32 whichfile; /* flat file number */ } CWOverlay1FileInfo; /* * All compiler errors or warnings which occur at some specific location in some * source file are identified by a CWMessageRef structure. This structure * provides sufficient information for the development environment to locate * and display the exact position associated with a message. For each message, * the compiler provides: * * errorstring: contains a description of the error, e.g. "syntax error" * errorline: contains a subset of the text containing the error * errorlevel: indicates if the "error" is an error, warning, or informational message * CWMessageRef: further info so the IDE can perform two tasks: * - Display a summary of each message, with the "error token" * underlined within the compiler-provided errorline. This * information is provided by the tokenoffset and tokenlength * fields. If tokenLength is zero then no underlining is performed. * * - Open the file containing the error and select the full * text of the error. This information is provided by the * selectionoffset and selectionlength fields. */ typedef struct CWMessageRef { CWFileSpec sourcefile; /* file containing error */ SInt32 linenumber; /* error linenumber in file */ short tokenoffset; /* offset into errorline of token underline */ short tokenlength; /* length of error token to be underlined */ SInt32 selectionoffset; /* start of error for text selection */ SInt32 selectionlength; /* length of error for text selection */ } CWMessageRef; /* message types, used for errorlevel parameter to message routines */ enum { messagetypeInfo, /* informational only */ messagetypeWarning, /* warning message */ messagetypeError /* error message */ }; /* information maintained by the IDE for each file in the project */ typedef struct CWProjectFileInfo { CWFileSpec filespec; /* CW_FileSpec of file in project */ CWFileTime moddate; /* date source file was last modified */ short segment; /* segment number of file */ Boolean hasobjectcode; /* file has object code to be linked */ Boolean hasresources; /* file has resources to be linked */ Boolean isresourcefile; /* file -is- a resource file to be linked */ Boolean weakimport; /* file has "Import Weak" flag set */ Boolean initbefore; /* file has "Init Before" flag set */ Boolean gendebug; /* file has generate debug info on */ CWFileTime objmoddate; /* date object code was last modified */ CWFileName dropinname; /* name of dropin used to process this file */ short fileID; /* fileID to use in browse records */ Boolean recordbrowseinfo; /* record browse info for this file? */ Boolean reserved; /* reserved and used internally */ #if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS /* some Macintosh-specific information */ OSType filetype; /* MacOS file type */ OSType filecreator; /* MacOS file creator */ #endif Boolean hasunitdata; /* file has associated unit data (Pascal) */ Boolean mergeintooutput; /* file has "Merge Into Output" flag set */ UInt32 unitdatadependencytag; /* dependency tag (i.e. checksum) of unit data (Pascal) */ } CWProjectFileInfo; typedef struct CWNewTextDocumentInfo { const char* documentname; /* name for new document, can be NULL */ CWMemHandle text; /* initial text for document */ Boolean markDirty; /* mark doc as needing to be saved? */ } CWNewTextDocumentInfo; typedef struct CWNewProjectEntryInfo { /* use kDefaultLinkPosition to get default link order, overlay, or segment */ SInt32 position; /* optional link order position */ SInt32 segment; /* optional segment number */ SInt32 overlayGroup; /* optional overlay group number */ SInt32 overlay; /* optional overlay number */ const char* groupPath; /* optional fully qualified path to file group */ Boolean mergeintooutput; /* set merge into output flag? */ Boolean weakimport; /* set weak import flag? */ Boolean initbefore; /* set initbefore flag? */ } CWNewProjectEntryInfo; typedef struct CWIDEInfo { unsigned short majorVersion; unsigned short minorVersion; unsigned short bugFixVersion; unsigned short buildVersion; unsigned short dropinAPIVersion; } CWIDEInfo; /* Structures for getting the list of access paths. */ /* The callback does the filtering on the host flags, so the list returned */ /* will only contain the paths that are enabled for the host platform. */ /* There are separate APIs to get the Mac OS X framework style access paths. */ typedef enum CWAccessPathType { cwSystemPath, cwUserPath } CWAccessPathType; typedef struct CWAccessPathInfo { CWFileSpec pathSpec; Boolean recursive; SInt32 subdirectoryCount; } CWAccessPathInfo; typedef struct CWAccessPathListInfo { SInt32 systemPathCount; SInt32 userPathCount; Boolean alwaysSearchUserPaths; Boolean convertPaths; } CWAccessPathListInfo; /* Structures for getting the list of Mac OS X framework access paths. */ /* The callback does the filtering on the host flags, so the list returned */ /* will only contain the Mac OS X framework style paths that are enabled for */ /* the host platform. */ /* There are separate APIs to get the traditional style access paths. */ typedef struct CWFrameworkAccessPathInfo { CWFileSpec pathSpec; Boolean framework; } CWFrameworkAccessPathInfo; typedef struct CWFrameworkAccessPathListInfo { SInt32 systemPathCount; SInt32 userPathCount; Boolean alwaysSearchUserPaths; Boolean convertPaths; Boolean requireFrameworkIncludes; } CWFrameworkAccessPathListInfo; /* constants for different types of plugins */ /* Used in the dropintype in the DropInFlags, as well as for the MacOS file type */ enum { CWDROPINLINKERTYPE = CWFOURCHAR('L','i','n','k'), /* type for DropIn linkers */ CWDROPINCOMPILERTYPE= CWFOURCHAR('C','o','m','p'), /* type for DropIn compilers */ CWDROPINPREFSTYPE = CWFOURCHAR('P','a','n','L'), /* type for DropIn panels */ CWDROPINPREFSTYPE_1 = CWFOURCHAR('P','a','n','l'), /* type for 1.x IDE DropIn panels */ CWDROPINVCSTYPE = CWFOURCHAR('V','C','S',' '), /* type for DropIn version control */ CWDROPINCOMTYPE = CWFOURCHAR('C','O','M',' ') /* type for COM-only plugins */ }; typedef SInt32 CWPluginType; // one of the above types /* Format of 'Flag' resources, or data returned by dropin's GetDropinFlags entry */ /* point. */ /* */ /* For the version 2 of these resource, we renamed the 'apiversion' field to */ /* 'earliestCompatibleAPIVersion' and added the 'newestAPIVersion' field. */ /* This allows plugins to support more than one API version and therefore run */ /* under more than one version of the IDE. The CWGetAPIVersion call should be used */ /* to determine what API version the IDE is using to talk to a plugin. */ #define kCurrentDropInFlagsVersion 2 typedef struct DropInFlags { short rsrcversion; /* version number of resource */ CWDataType dropintype; /* dropin type (compiler, panel, etc) */ /* earliest API support by this plugin */ unsigned short earliestCompatibleAPIVersion; UInt32 dropinflags; /* capability flags */ CWDataType edit_language; /* language */ unsigned short newestAPIVersion; /* newest API version supported */ } DropInFlags, **DropInFlagsHandle; #define kCurrentCWPanelListVersion 1 typedef struct CWPanelList { short version; short count; const char** names; } CWPanelList; #define kCurrentCWFamilyListVersion 1 #define kCurrentCWFamilyResourceVersion 1 typedef struct CWFamily { CWDataType type; const char* name; } CWFamily; typedef struct CWFamilyList { short version; short count; CWFamily* families; } CWFamilyList; typedef struct CWFamilyResource { short version; CWDataType type; unsigned char name[64]; } CWFamilyResource; #define kCurrentCWHelpInfoVersion 1 typedef struct CWHelpInfo { short version; const char* helpFileName; } CWHelpInfo; #define kCurrentCWRelativePathVersion 1 typedef enum CWRelativePathFormat { format_Generic = 0, // Simple name, not platform-specific format_Mac, // Uses : as separator :: for parent directory format_Win, // Uses \ as separator .. for parent directory format_Unix // Uses / as separator .. for parent directory } CWRelativePathFormat; typedef enum CWRelativePathTypes { type_Absolute = 0, type_Project, type_Compiler, type_System, type_UserDefined } CWRelativePathTypes; typedef struct CWRelativePath { short version; // version number unsigned char pathType; // use CWRelativePathTypes unsigned char pathFormat; // use CWRelativePathFormat char userDefinedTree[256]; // user-defined tree name char pathString[512]; // actual path string } CWRelativePath; /* * */ #define kCurrentCWPluginInfoVersion 1 typedef struct CWPluginInfo { short version; // struct version number const char* companyName; // i.e. Metrowerks const char* pluginName; // Defaults to Dropin->GetName() const char* pluginDisplayName; const char* familyName; // i.e. Java unsigned short majorIDEVersion; // Version of IDE Required unsigned short minorIDEVersion; } CWPluginInfo; /* Declaration of plugin entry points that must be implemented by non-MacOS plugins */ /* It can also be implemented for MacOS plugins instead of having a 'Flag' resource */ CWPLUGIN_ENTRY (CWPlugin_GetDropInFlags)(const DropInFlags**, SInt32* flagsSize); /* Declaration of plugin entry points that may optionally be implemented by plugins */ /* These entry points override the corresponding resources on MacOS */ CWPLUGIN_ENTRY (CWPlugin_GetDropInName)(const char** dropInName); CWPLUGIN_ENTRY (CWPlugin_GetDisplayName)(const char** displayName); CWPLUGIN_ENTRY (CWPlugin_GetPanelList)(const CWPanelList** panelList); CWPLUGIN_ENTRY (CWPlugin_GetFamilyList)(const CWFamilyList** familyList); CWPLUGIN_ENTRY (CWPlugin_GetHelpInfo)(const CWHelpInfo** helpInfo); /* Declaration of info plugin entry point that must be implemented by all COM plugins */ CWPLUGIN_ENTRY (CWPlugin_GetPluginInfo)(const CWPluginInfo** pluginInfo); /* Callback declarations: these callbacks are supported for all CodeWarrior plugins */ /* Get the action the IDE is requesting of the plugin */ CW_CALLBACK CWGetPluginRequest(CWPluginContext context, SInt32* request); /* Call when finished handling a request, just before returning to the shell */ CW_CALLBACK CWDonePluginRequest(CWPluginContext, CWResult resultCode); /* Get the version number of API used by the IDE to talk to the plugin */ CW_CALLBACK CWGetAPIVersion(CWPluginContext context, SInt32* version); /* Get information about the IDE being used */ CW_CALLBACK CWGetIDEInfo(CWPluginContext context, CWIDEInfo* info); /* Get the OS error associated with the last callback */ CW_CALLBACK CWGetCallbackOSError(CWPluginContext context, CWOSResult* error); /* Set the OS error associated with a failed plugin request */ CW_CALLBACK CWSetPluginOSError(CWPluginContext context, CWOSResult); /* Get the file specifier for the current project */ CW_CALLBACK CWGetProjectFile(CWPluginContext context, CWFileSpec* projectSpec); /* Get the directory where the IDE stores target-specific generated data */ CW_CALLBACK CWGetTargetDataDirectory(CWPluginContext context, CWFileSpec* targetDataDirectorySpec); /* Get the name of the current target in the current project */ CW_CALLBACK CWGetTargetName(CWPluginContext context, char* name, short maxLength); /* Get the directory where output files should be stored */ CW_CALLBACK CWGetOutputFileDirectory(CWPluginContext context, CWFileSpec* outputFileDirectory); /* Get the number of files in the current project */ CW_CALLBACK CWGetProjectFileCount(CWPluginContext context, SInt32* count); /* Get information about a particular file in the project */ CW_CALLBACK CWGetFileInfo(CWPluginContext context, SInt32 whichfile, Boolean checkFileLocation, CWProjectFileInfo* fileinfo); /* Search for a file by name on the current file's access paths. */ CW_CALLBACK CWFindAndLoadFile(CWPluginContext context, const char* filename, CWFileInfo *fileinfo); /* Get the access paths for the current target */ CW_CALLBACK CWGetAccessPathListInfo(CWPluginContext context, CWAccessPathListInfo* pathListInfo); CW_CALLBACK CWGetAccessPathInfo(CWPluginContext context, CWAccessPathType pathType, SInt32 whichPath, CWAccessPathInfo* pathInfo); CW_CALLBACK CWGetAccessPathSubdirectory(CWPluginContext context, CWAccessPathType pathType, SInt32 whichPath, SInt32 whichSubdirectory, CWFileSpec* subdirectory); CW_CALLBACK CWGetFrameworkAccessPathListInfo(CWPluginContext context, CWFrameworkAccessPathListInfo* pathListInfo); CW_CALLBACK CWGetFrameworkAccessPathInfo(CWPluginContext context, CWAccessPathType pathType, SInt32 whichPath, CWFrameworkAccessPathInfo* pathInfo); /* Get file text, from the editor, include file cache, or by reading the file */ CW_CALLBACK CWGetFileText(CWPluginContext context, const CWFileSpec* filespec, const char** text, SInt32* textLength, short* filedatatype); /* Release file text returned by CWFindAndLoadFile and CWGetFileText */ CW_CALLBACK CWReleaseFileText(CWPluginContext context, const char* text); /* Get information about a project segment */ CW_CALLBACK CWGetSegmentInfo(CWPluginContext context, SInt32 whichsegment, CWProjectSegmentInfo* segmentinfo); /* Get the number of overlay groups in the target */ CW_CALLBACK CWGetOverlay1GroupsCount(CWPluginContext context, SInt32* count); /* Get information about a project overlay group */ CW_CALLBACK CWGetOverlay1GroupInfo(CWPluginContext context, SInt32 whichgroup, CWOverlay1GroupInfo* groupinfo); /* Get information about an overlay within a group */ CW_CALLBACK CWGetOverlay1Info(CWPluginContext context, SInt32 whichgroup, SInt32 whichoverlay, CWOverlay1Info* overlayinfo); /* Get information about a file in an overlay */ CW_CALLBACK CWGetOverlay1FileInfo(CWPluginContext context, SInt32 whichgroup, SInt32 whichoverlay, SInt32 whichoverlayfile, CWOverlay1FileInfo* fileinfo); /* Report a error, warning, or informational message */ CW_CALLBACK CWReportMessage(CWPluginContext context, const CWMessageRef* msgRef, const char *line1, const char *line2, short errorlevel, SInt32 errorNumber); /* Display an alert. May actually be put in a message, depending on the plugin request */ CW_CALLBACK CWAlert(CWPluginContext context, const char* msg1, const char* msg2, const char* msg3, const char* msg4); /* Display one or two status messages to the user */ CW_CALLBACK CWShowStatus(CWPluginContext context, const char *line1, const char *line2); /* Give to the IDE to handle events and check if user has canceled this operation */ CW_CALLBACK CWUserBreak(CWPluginContext context); /* Return stored preference data, referenced by name. Typically used for preference */ /* panel settings. */ CW_CALLBACK CWGetNamedPreferences(CWPluginContext context, const char* prefsname, CWMemHandle* prefsdata); /* Store data referenced by a data type and file number */ CW_CALLBACK CWStorePluginData(CWPluginContext context, SInt32 whichfile, CWDataType type, CWMemHandle prefsdata); /* Return stored data referenced by a data type and file number */ CW_CALLBACK CWGetPluginData(CWPluginContext context, SInt32 whichfile, CWDataType type, CWMemHandle* prefsdata); /* Inform the IDE that a file modification date has changed. isGenerated is for use */ /* by compiler and linker plugins only */ CW_CALLBACK CWSetModDate(CWPluginContext context, const CWFileSpec* filespec, CWFileTime* moddate, Boolean isGenerated); /* Ask the IDE to add a file to the current target in the current project. isGenerated */ /* is for use by compiler plugins only. */ CW_CALLBACK CWAddProjectEntry(CWPluginContext context, const CWFileSpec* fileSpec, Boolean isGenerated, const CWNewProjectEntryInfo* projectEntryInfo, SInt32* whichfile); /* Ask the IDE to remove a file from the current target (link-order/segment/overlay) in the current project. */ /* If it's the last target that contains the file, it would be removed from the file list. */ CW_CALLBACK CWRemoveProjectEntry(CWPluginContext context, const CWFileSpec* fileSpec); /* Create a new editor window, supplying initial text and an optional document name */ CW_CALLBACK CWCreateNewTextDocument(CWPluginContext, const CWNewTextDocumentInfo* docinfo); /* Allocate memory. Permanent memory is not freed until the plugin is unloaded. */ /* Temporary memory is freed after each plugin request completes. */ CW_CALLBACK CWAllocateMemory(CWPluginContext context, SInt32 size, Boolean isPermanent, void** ptr); /* Free memory allocated via CWAllocateMemory */ CW_CALLBACK CWFreeMemory(CWPluginContext context, void* ptr, Boolean isPermanent); /* Allocate a memory handle of the requested size. All handles are automatically */ /* freed at the end of each compiler/linker request. useTempMemory is MacOS-specific*/ CW_CALLBACK CWAllocMemHandle(CWPluginContext context, SInt32 size, Boolean useTempMemory, CWMemHandle* handle); /* Free a memory handle */ CW_CALLBACK CWFreeMemHandle(CWPluginContext context, CWMemHandle handle); /* Return the current size of a memory handle */ CW_CALLBACK CWGetMemHandleSize(CWPluginContext context, CWMemHandle handle, SInt32* size); /* Resize an existing memory handle */ CW_CALLBACK CWResizeMemHandle(CWPluginContext context, CWMemHandle handle, SInt32 newSize); /* To obtain a pointer to the block, you must lock the handle */ /* moveHi is MacOS-specific */ CW_CALLBACK CWLockMemHandle(CWPluginContext context, CWMemHandle handle, Boolean moveHi, void** ptr); /* Unlock a memory handle, the pointer returned by locking the handle may no */ /* longer be valid */ CW_CALLBACK CWUnlockMemHandle(CWPluginContext context, CWMemHandle handle); #if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS /* Utility function to map MacOS error codes to a CWResult code. Plugins */ /* may internally generate OSErrs, but need to return CWResult to the */ /* CodeWarrior IDE */ CW_CALLBACK CWMacOSErrToCWResult(CWPluginContext context, OSErr err); #endif /* Turn off the built in PP window manager while the plugin displays a dialog */ CW_CALLBACK CWPreDialog(CWPluginContext context); /* Turn on the built in PP window manager after the plugin is through with its */ /* dialog */ CW_CALLBACK CWPostDialog(CWPluginContext context); /* Notify the IDE that the plugin will be performing actions on a file */ CW_CALLBACK CWPreFileAction(CWPluginContext context, const CWFileSpec *theFile); /* Notify the IDE that the plugin is finished performing actions on a file */ CW_CALLBACK CWPostFileAction(CWPluginContext context, const CWFileSpec *theFile); CW_CALLBACK CWResolveRelativePath(CWPluginContext context, const CWRelativePath* relativePath, CWFileSpec* fileSpec, Boolean create); CW_CALLBACK CWFindLogicalDirectory(CWPluginContext context, SInt32 selector, CWFileSpec *dirSpec); CW_CALLBACK CWOpenFileInEditor(CWPluginContext context, const CWFileSpec *fileSpec); #if CWPLUGIN_HOST==CWPLUGIN_HOST_SOLARIS || CWPLUGIN_HOST==CWPLUGIN_HOST_LINUX /* Forward declarations */ struct ICodeWarriorApp; struct ICodeWarriorProject; struct ICodeWarriorDesign; struct ICodeWarriorTarget; #endif /* CWPLUGIN_HOST==CWPLUGIN_HOST_SOLARIS || CWPLUGIN_HOST==CWPLUGIN_HOST_LINUX */ /* Get the IDE application COM interface. Fails if called from any thread */ /* other than the main IDE thread, e.g. a build thread. */ CW_CALLBACK CWGetCOMApplicationInterface(CWPluginContext context, struct ICodeWarriorApp **app); /* Get the current project COM interface. Adds a reference upon return. */ /* Only succeeds if the plugin is being called in the context of a */ /* particular project. Fails if called from any thread */ /* other than the main IDE thread, e.g. a build thread. */ CW_CALLBACK CWGetCOMProjectInterface(CWPluginContext context, struct ICodeWarriorProject **project); /* Get the current design COM interface. Adds a reference upon return. */ /* Only succeeds if the plugin is being called in the context of a */ /* particular target that is associated with a design. */ /* Fails if called from any thread other than the main IDE thread, */ /* e.g. a build thread. */ CW_CALLBACK CWGetCOMDesignInterface(CWPluginContext context, struct ICodeWarriorDesign **design); /* Get the current target COM interface. Adds a reference upon return. */ /* Only succeeds if the plugin is being called in the context of a */ /* particular target. Fails if called from any thread */ /* other than the main IDE thread, e.g. a build thread. */ CW_CALLBACK CWGetCOMTargetInterface(CWPluginContext context, struct ICodeWarriorTarget **target); #if CW_USE_PRAGMA_IMPORT #pragma import reset #endif #ifdef __cplusplus } #endif #ifdef _MSC_VER #pragma pack(pop) #endif #ifdef __MWERKS__ #pragma options align=reset #endif #endif /* __CWPlugins_H__ */ \ No newline at end of file
+/* * CWPlugins.h - Common declarations for Metrowerks CodeWarrior� plugins * * Copyright � 1995-1997 Metrowerks, Inc. All rights reserved. * */ #include "common.h" #ifndef __CWPlugins_H__ #define __CWPlugins_H__ #ifdef __MWERKS__ # pragma once #endif #define CWPLUGIN_HOST_MACOS 1 #define CWPLUGIN_HOST_WIN32 2 #define CWPLUGIN_HOST_SOLARIS 3 #define CWPLUGIN_HOST_LINUX 4 #ifndef CWPLUGIN_HOST # ifdef WIN32 # define CWPLUGIN_HOST CWPLUGIN_HOST_WIN32 # elif defined(macintosh) || defined(__MACH__) # define CWPLUGIN_HOST CWPLUGIN_HOST_MACOS # elif defined(__sun__) # define CWPLUGIN_HOST CWPLUGIN_HOST_SOLARIS # elif defined(__linux__) # define CWPLUGIN_HOST CWPLUGIN_HOST_LINUX # else # error # endif #endif #define CWPLUGIN_API_MACOS 1 #define CWPLUGIN_API_WIN32 2 #define CWPLUGIN_API_UNIX 3 #ifndef CWPLUGIN_API # ifdef WIN32 # define CWPLUGIN_API CWPLUGIN_API_WIN32 # elif defined(macintosh) || defined(__MACH__) # define CWPLUGIN_API CWPLUGIN_API_MACOS # elif defined(__sun__) || defined(__linux__) # define CWPLUGIN_API CWPLUGIN_API_UNIX # else # error # endif #endif /* ** Radix 256 notation where a 32-bit integer is created from four ** ASCII characters. A four-character constant of this form, say ** 'ABCD', must always be represented with the same pattern, 0x41424344 ** in this case, regardless of big/little endian issues. */ typedef SInt32 CWFourCharType; #define CWFOURCHAR(a, b, c, d) \ (((CWFourCharType) ((a) & 0xff) << 24) \ | ((CWFourCharType) ((b) & 0xff) << 16) \ | ((CWFourCharType) ((c) & 0xff) << 8) \ | ((CWFourCharType) ((d) & 0xff))) #if CWPLUGIN_API == CWPLUGIN_API_UNIX #include <sys/param.h> #endif #ifndef CW_USE_PRAGMA_EXPORT #if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS #define CW_USE_PRAGMA_EXPORT 1 #else #define CW_USE_PRAGMA_EXPORT 0 #endif #endif #ifndef CW_USE_PRAGMA_IMPORT #if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS #define CW_USE_PRAGMA_IMPORT 1 #else #define CW_USE_PRAGMA_IMPORT 0 #endif #endif #ifdef __MWERKS__ #pragma options align=mac68k #endif #ifdef _MSC_VER #pragma pack(push,2) #endif #ifdef __cplusplus extern "C" { #endif #if CW_USE_PRAGMA_IMPORT #pragma import on #endif /* These constants specify the action the IDE is asking the plugin to execute */ enum { reqInitialize = -2, /* called when the plugin is loaded */ reqTerminate = -1, /* called when the plugin is unloaded */ reqIdle = -100, /* called periodically to allow for plugin tasks EP 6/24/98 */ reqAbout = -101, /* called to ask plugin to display about dialog EP 6/24/98 */ reqPrefsChange = -102 /* called when an associated pref panel changes EP 6/24/98 */ }; /* Used in CWFileInfo.dependencyType to indicate what type of make */ /* dependency to establish between files */ typedef enum CWDependencyType { cwNoDependency, /* do not establish a dependency */ cwNormalDependency, /* recompile dependent whenever prereq changes */ cwInterfaceDependency /* recompile only if interface to file changes */ } CWDependencyType; /* Used in CWFileInfo.filedatatype to indicate the type of data in a loaded file */ enum { cwFileTypeUnknown, /* unknown binary data */ cwFileTypeText, /* normal text file */ cwFileTypePrecompiledHeader /* cached precompiled header */ }; /* constant for CWFileInfo.isdependentoffile */ #define kCurrentCompiledFile -1L /* constant for CWStorePluginData/CWGetPluginData */ #define kTargetGlobalPluginData -1L /* constant for CWNewProjectEntryInfo link order, segment, and overlay values */ #define kDefaultLinkPosition -1L /* Selectors for CWFindLogicalDirectory */ enum { kIDEDirectorySelector = 1, /* parent directory of IDE application; "bin" folder on Win32 */ kCodeWarriorDirectorySelector, /* root CodeWarrior directory */ kSystemDirectorySelector, /* system directory */ kProjectDirectorySelector, /* parent directory of current project */ kProjectDataDirectorySelector, /* project data directory */ kTargetDataDirectorySelector, /* target data directory (within project data directory) */ kTargetObjectCodeDirectorySelector, /* object code directory (within target data directory) */ kDebuggerCacheDirectorySelector, /* "CW Debugging Cache" directory */ kHelperAppsDirectorySelector, /* "(Helper Apps)" directory */ kPluginsDirectorySelector, /* "CodeWarrior Plugins" (Mac) or "plugins" (Win32) directory */ kPluginParentDirectorySelector, /* parent directory of current plugin */ kStationeryDirectorySelector, /* "(Project Stationery)" directory */ kRADStationeryDirectorySelector, /* "RAD Stationery" directory */ kLocalizedResourcesDirectorySelector /* "resources" directory */ }; /* CWPluginContext is a magic cookie passed to all plugins. It must */ /* be passed back to all IDE callbacks */ typedef struct CWPluginPrivateContext* CWPluginContext; /* CWResult is the error/status result returned by all IDE API routine. */ /* The most common errors are returned directly. For OS-specific errors, the */ /* CWResult is cwErrOSError, and the OS-specific error can be obtained by */ /* calling CWGetOSError() */ typedef SInt32 CWResult; /* CWMemHandle is an abstraction for memory used in some parts */ /* of the plugin API. API routines must be used to allocate */ /* and free CWMemHandles, or to convert them to pointers. */ typedef struct CWMemHandlePrivateStruct* CWMemHandle; /* Used to identify custom data associated by a plugin with */ /* a project file or a target as a whole. Must be a four character */ /* constant. All lower case constants are reserved by the IDE */ typedef UInt32 CWDataType; /* Some information used in the compiler/linker API is platform-dependent */ /* We use some typedefs to isolate the differences */ /* CWFileSpec contains the native platform file specifier. */ /* CWFileName contains the string type for a native file name */ /* CWFileTime contains the native platform file timestamp */ /* CWOSResult contains the native platform error return value */ /* CWResult contains an API routine error/status result */ /* CW_CALLBACK is a macro defining the calling convention and return type for */ /* IDE callback routines. */ /* CW_PLUGINENTRY is a macro defining the calling convention and return type for */ /* plugin entry points. */ /* CWSUCCESS is a macro that evaluates to true when given a CWResult indicating an */ /* routine succeeded */ #if CWPLUGIN_API == CWPLUGIN_API_MACOS typedef FSSpec CWFileSpec; typedef char CWFileName[32]; typedef UInt32 CWFileTime; typedef OSErr CWOSResult; #elif CWPLUGIN_API == CWPLUGIN_API_WIN32 typedef unsigned char Boolean; typedef struct CWFileSpec { char path[MAX_PATH]; } CWFileSpec; typedef char CWFileName[65]; typedef FILETIME CWFileTime; typedef DWORD CWOSResult; #elif CWPLUGIN_API == CWPLUGIN_API_UNIX #define MAX_PATH MAXPATHLEN #ifndef __MACTYPES__ typedef unsigned char Boolean; #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif typedef struct CWFileSpec { char path[MAX_PATH]; } CWFileSpec; typedef char CWFileName[65]; typedef time_t CWFileTime; typedef int CWOSResult; #else #error Unknown plugin API! #endif #define CWSUCCESS(result) ((result) == 0) #if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS && !defined(__MACH__) #define CW_CALLBACK pascal CWResult #define CW_CALLBACK_PTR(function_name) pascal CWResult (function_name) #define CWPLUGIN_ENTRY(function_name) pascal short (function_name) #elif CWPLUGIN_HOST == CWPLUGIN_HOST_WIN32 #define CW_CALLBACK CWResult __stdcall #define CW_CALLBACK_PTR(function_name) CWResult (__stdcall function_name) #define CWPLUGIN_ENTRY(function_name) short (__stdcall function_name) #elif CWPLUGIN_HOST==CWPLUGIN_HOST_SOLARIS || CWPLUGIN_HOST==CWPLUGIN_HOST_LINUX || defined(__MACH__) #define CW_CALLBACK CWResult #define CW_CALLBACK_PTR(function_name) CWResult (function_name) #define CWPLUGIN_ENTRY(function_name) short (function_name) #else #error Unknown plugin host! #endif /* information returned by CWFindAndLoadFile */ typedef struct CWFileInfo { Boolean fullsearch; /* [<-] do we do a full search of paths for file */ char dependencyType; /* [<-] type CWDependencyType */ SInt32 isdependentoffile; /* [<-] this file is a dependent of file id */ /* (zero based) or -1L if of current file */ Boolean suppressload; /* [<-] find but don't load the file */ Boolean padding; /* [**] structure padding */ const char* filedata; /* [->] point to the file text/data, or NULL */ SInt32 filedatalength; /* [->] length of filedata */ short filedatatype; /* [->] type of data pointed to by filedata */ /* the remaining members are valid only when called by compilers */ short fileID; /* [->] use in browse records and dependencies */ CWFileSpec filespec; /* [->] specifies the file on disk */ Boolean alreadyincluded; /* [->] TRUE if already included in current compile */ Boolean recordbrowseinfo; /* [->] record browse info for this file? */ } CWFileInfo; /* information maintained by the IDE for each segment in the project */ typedef struct CWProjectSegmentInfo { char name[32]; /* segment name */ short attributes; /* segment attributes */ } CWProjectSegmentInfo; /* 64 bit address */ typedef struct CWAddr64 { SInt32 lo; /* low order longword of address */ SInt32 hi; /* high order longword of address */ } CWAddr64; /* describes an overlay group, Use CWGetOverlayGroup1Info to iterate over overlay groups */ typedef struct CWOverlay1GroupInfo { char name[256]; /* overlay group name */ CWAddr64 address; /* load address */ SInt32 numoverlays; /* number of overlays in this group */ } CWOverlay1GroupInfo; /* describes an overlay, use CWGetOverlay1Info to iterate over overlays */ typedef struct CWOverlay1Info { char name[256]; /* name of this overlay */ SInt32 numfiles; /* number of files in the overlay */ } CWOverlay1Info; /* describes a file in an overlay, use CWGetOverlayFile1Info to iterate over files. Use */ /* whichfile in calls taking a file number, e.g. CWLoadObjectData or CWGetFileInfo */ typedef struct CWOverlay1FileInfo { SInt32 whichfile; /* flat file number */ } CWOverlay1FileInfo; /* * All compiler errors or warnings which occur at some specific location in some * source file are identified by a CWMessageRef structure. This structure * provides sufficient information for the development environment to locate * and display the exact position associated with a message. For each message, * the compiler provides: * * errorstring: contains a description of the error, e.g. "syntax error" * errorline: contains a subset of the text containing the error * errorlevel: indicates if the "error" is an error, warning, or informational message * CWMessageRef: further info so the IDE can perform two tasks: * - Display a summary of each message, with the "error token" * underlined within the compiler-provided errorline. This * information is provided by the tokenoffset and tokenlength * fields. If tokenLength is zero then no underlining is performed. * * - Open the file containing the error and select the full * text of the error. This information is provided by the * selectionoffset and selectionlength fields. */ typedef struct CWMessageRef { CWFileSpec sourcefile; /* file containing error */ SInt32 linenumber; /* error linenumber in file */ short tokenoffset; /* offset into errorline of token underline */ short tokenlength; /* length of error token to be underlined */ SInt32 selectionoffset; /* start of error for text selection */ SInt32 selectionlength; /* length of error for text selection */ } CWMessageRef; /* message types, used for errorlevel parameter to message routines */ enum { messagetypeInfo, /* informational only */ messagetypeWarning, /* warning message */ messagetypeError /* error message */ }; /* information maintained by the IDE for each file in the project */ typedef struct CWProjectFileInfo { CWFileSpec filespec; /* CW_FileSpec of file in project */ CWFileTime moddate; /* date source file was last modified */ short segment; /* segment number of file */ Boolean hasobjectcode; /* file has object code to be linked */ Boolean hasresources; /* file has resources to be linked */ Boolean isresourcefile; /* file -is- a resource file to be linked */ Boolean weakimport; /* file has "Import Weak" flag set */ Boolean initbefore; /* file has "Init Before" flag set */ Boolean gendebug; /* file has generate debug info on */ CWFileTime objmoddate; /* date object code was last modified */ CWFileName dropinname; /* name of dropin used to process this file */ short fileID; /* fileID to use in browse records */ Boolean recordbrowseinfo; /* record browse info for this file? */ Boolean reserved; /* reserved and used internally */ #if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS /* some Macintosh-specific information */ OSType filetype; /* MacOS file type */ OSType filecreator; /* MacOS file creator */ #endif Boolean hasunitdata; /* file has associated unit data (Pascal) */ Boolean mergeintooutput; /* file has "Merge Into Output" flag set */ UInt32 unitdatadependencytag; /* dependency tag (i.e. checksum) of unit data (Pascal) */ } CWProjectFileInfo; typedef struct CWNewTextDocumentInfo { const char* documentname; /* name for new document, can be NULL */ CWMemHandle text; /* initial text for document */ Boolean markDirty; /* mark doc as needing to be saved? */ } CWNewTextDocumentInfo; typedef struct CWNewProjectEntryInfo { /* use kDefaultLinkPosition to get default link order, overlay, or segment */ SInt32 position; /* optional link order position */ SInt32 segment; /* optional segment number */ SInt32 overlayGroup; /* optional overlay group number */ SInt32 overlay; /* optional overlay number */ const char* groupPath; /* optional fully qualified path to file group */ Boolean mergeintooutput; /* set merge into output flag? */ Boolean weakimport; /* set weak import flag? */ Boolean initbefore; /* set initbefore flag? */ } CWNewProjectEntryInfo; typedef struct CWIDEInfo { unsigned short majorVersion; unsigned short minorVersion; unsigned short bugFixVersion; unsigned short buildVersion; unsigned short dropinAPIVersion; } CWIDEInfo; /* Structures for getting the list of access paths. */ /* The callback does the filtering on the host flags, so the list returned */ /* will only contain the paths that are enabled for the host platform. */ /* There are separate APIs to get the Mac OS X framework style access paths. */ typedef enum CWAccessPathType { cwSystemPath, cwUserPath } CWAccessPathType; typedef struct CWAccessPathInfo { CWFileSpec pathSpec; Boolean recursive; SInt32 subdirectoryCount; } CWAccessPathInfo; typedef struct CWAccessPathListInfo { SInt32 systemPathCount; SInt32 userPathCount; Boolean alwaysSearchUserPaths; Boolean convertPaths; } CWAccessPathListInfo; /* Structures for getting the list of Mac OS X framework access paths. */ /* The callback does the filtering on the host flags, so the list returned */ /* will only contain the Mac OS X framework style paths that are enabled for */ /* the host platform. */ /* There are separate APIs to get the traditional style access paths. */ typedef struct CWFrameworkAccessPathInfo { CWFileSpec pathSpec; Boolean framework; } CWFrameworkAccessPathInfo; typedef struct CWFrameworkAccessPathListInfo { SInt32 systemPathCount; SInt32 userPathCount; Boolean alwaysSearchUserPaths; Boolean convertPaths; Boolean requireFrameworkIncludes; } CWFrameworkAccessPathListInfo; /* constants for different types of plugins */ /* Used in the dropintype in the DropInFlags, as well as for the MacOS file type */ enum { CWDROPINLINKERTYPE = CWFOURCHAR('L','i','n','k'), /* type for DropIn linkers */ CWDROPINCOMPILERTYPE= CWFOURCHAR('C','o','m','p'), /* type for DropIn compilers */ CWDROPINPREFSTYPE = CWFOURCHAR('P','a','n','L'), /* type for DropIn panels */ CWDROPINPREFSTYPE_1 = CWFOURCHAR('P','a','n','l'), /* type for 1.x IDE DropIn panels */ CWDROPINVCSTYPE = CWFOURCHAR('V','C','S',' '), /* type for DropIn version control */ CWDROPINCOMTYPE = CWFOURCHAR('C','O','M',' ') /* type for COM-only plugins */ }; typedef SInt32 CWPluginType; // one of the above types /* Format of 'Flag' resources, or data returned by dropin's GetDropinFlags entry */ /* point. */ /* */ /* For the version 2 of these resource, we renamed the 'apiversion' field to */ /* 'earliestCompatibleAPIVersion' and added the 'newestAPIVersion' field. */ /* This allows plugins to support more than one API version and therefore run */ /* under more than one version of the IDE. The CWGetAPIVersion call should be used */ /* to determine what API version the IDE is using to talk to a plugin. */ #define kCurrentDropInFlagsVersion 2 typedef struct DropInFlagsV1 { short rsrcversion; /* version number of resource */ CWDataType dropintype; /* dropin type (compiler, panel, etc) */ /* earliest API support by this plugin */ unsigned short earliestCompatibleAPIVersion; UInt32 dropinflags; /* capability flags */ CWDataType edit_language; /* language */ } DropInFlagsV1, **DropInFlagsHandleV1; typedef struct DropInFlags { short rsrcversion; /* version number of resource */ CWDataType dropintype; /* dropin type (compiler, panel, etc) */ /* earliest API support by this plugin */ unsigned short earliestCompatibleAPIVersion; UInt32 dropinflags; /* capability flags */ CWDataType edit_language; /* language */ unsigned short newestAPIVersion; /* newest API version supported */ } DropInFlags, **DropInFlagsHandle; #define kCurrentCWPanelListVersion 1 typedef struct CWPanelList { short version; short count; const char** names; } CWPanelList; #define kCurrentCWFamilyListVersion 1 #define kCurrentCWFamilyResourceVersion 1 typedef struct CWFamily { CWDataType type; const char* name; } CWFamily; typedef struct CWFamilyList { short version; short count; CWFamily* families; } CWFamilyList; typedef struct CWFamilyResource { short version; CWDataType type; unsigned char name[64]; } CWFamilyResource; #define kCurrentCWHelpInfoVersion 1 typedef struct CWHelpInfo { short version; const char* helpFileName; } CWHelpInfo; #define kCurrentCWRelativePathVersion 1 typedef enum CWRelativePathFormat { format_Generic = 0, // Simple name, not platform-specific format_Mac, // Uses : as separator :: for parent directory format_Win, // Uses \ as separator .. for parent directory format_Unix // Uses / as separator .. for parent directory } CWRelativePathFormat; typedef enum CWRelativePathTypes { type_Absolute = 0, type_Project, type_Compiler, type_System, type_UserDefined } CWRelativePathTypes; typedef struct CWRelativePath { short version; // version number unsigned char pathType; // use CWRelativePathTypes unsigned char pathFormat; // use CWRelativePathFormat char userDefinedTree[256]; // user-defined tree name char pathString[512]; // actual path string } CWRelativePath; /* * */ #define kCurrentCWPluginInfoVersion 1 typedef struct CWPluginInfo { short version; // struct version number const char* companyName; // i.e. Metrowerks const char* pluginName; // Defaults to Dropin->GetName() const char* pluginDisplayName; const char* familyName; // i.e. Java unsigned short majorIDEVersion; // Version of IDE Required unsigned short minorIDEVersion; } CWPluginInfo; /* Declaration of plugin entry points that must be implemented by non-MacOS plugins */ /* It can also be implemented for MacOS plugins instead of having a 'Flag' resource */ CWPLUGIN_ENTRY (CWPlugin_GetDropInFlags)(const DropInFlags**, SInt32* flagsSize); /* Declaration of plugin entry points that may optionally be implemented by plugins */ /* These entry points override the corresponding resources on MacOS */ CWPLUGIN_ENTRY (CWPlugin_GetDropInName)(const char** dropInName); CWPLUGIN_ENTRY (CWPlugin_GetDisplayName)(const char** displayName); CWPLUGIN_ENTRY (CWPlugin_GetPanelList)(const CWPanelList** panelList); CWPLUGIN_ENTRY (CWPlugin_GetFamilyList)(const CWFamilyList** familyList); CWPLUGIN_ENTRY (CWPlugin_GetHelpInfo)(const CWHelpInfo** helpInfo); /* Declaration of info plugin entry point that must be implemented by all COM plugins */ CWPLUGIN_ENTRY (CWPlugin_GetPluginInfo)(const CWPluginInfo** pluginInfo); /* Callback declarations: these callbacks are supported for all CodeWarrior plugins */ /* Get the action the IDE is requesting of the plugin */ CW_CALLBACK CWGetPluginRequest(CWPluginContext context, SInt32* request); /* Call when finished handling a request, just before returning to the shell */ CW_CALLBACK CWDonePluginRequest(CWPluginContext, CWResult resultCode); /* Get the version number of API used by the IDE to talk to the plugin */ CW_CALLBACK CWGetAPIVersion(CWPluginContext context, SInt32* version); /* Get information about the IDE being used */ CW_CALLBACK CWGetIDEInfo(CWPluginContext context, CWIDEInfo* info); /* Get the OS error associated with the last callback */ CW_CALLBACK CWGetCallbackOSError(CWPluginContext context, CWOSResult* error); /* Set the OS error associated with a failed plugin request */ CW_CALLBACK CWSetPluginOSError(CWPluginContext context, CWOSResult); /* Get the file specifier for the current project */ CW_CALLBACK CWGetProjectFile(CWPluginContext context, CWFileSpec* projectSpec); /* Get the directory where the IDE stores target-specific generated data */ CW_CALLBACK CWGetTargetDataDirectory(CWPluginContext context, CWFileSpec* targetDataDirectorySpec); /* Get the name of the current target in the current project */ CW_CALLBACK CWGetTargetName(CWPluginContext context, char* name, short maxLength); /* Get the directory where output files should be stored */ CW_CALLBACK CWGetOutputFileDirectory(CWPluginContext context, CWFileSpec* outputFileDirectory); /* Get the number of files in the current project */ CW_CALLBACK CWGetProjectFileCount(CWPluginContext context, SInt32* count); /* Get information about a particular file in the project */ CW_CALLBACK CWGetFileInfo(CWPluginContext context, SInt32 whichfile, Boolean checkFileLocation, CWProjectFileInfo* fileinfo); /* Search for a file by name on the current file's access paths. */ CW_CALLBACK CWFindAndLoadFile(CWPluginContext context, const char* filename, CWFileInfo *fileinfo); /* Get the access paths for the current target */ CW_CALLBACK CWGetAccessPathListInfo(CWPluginContext context, CWAccessPathListInfo* pathListInfo); CW_CALLBACK CWGetAccessPathInfo(CWPluginContext context, CWAccessPathType pathType, SInt32 whichPath, CWAccessPathInfo* pathInfo); CW_CALLBACK CWGetAccessPathSubdirectory(CWPluginContext context, CWAccessPathType pathType, SInt32 whichPath, SInt32 whichSubdirectory, CWFileSpec* subdirectory); CW_CALLBACK CWGetFrameworkAccessPathListInfo(CWPluginContext context, CWFrameworkAccessPathListInfo* pathListInfo); CW_CALLBACK CWGetFrameworkAccessPathInfo(CWPluginContext context, CWAccessPathType pathType, SInt32 whichPath, CWFrameworkAccessPathInfo* pathInfo); /* Get file text, from the editor, include file cache, or by reading the file */ CW_CALLBACK CWGetFileText(CWPluginContext context, const CWFileSpec* filespec, const char** text, SInt32* textLength, short* filedatatype); /* Release file text returned by CWFindAndLoadFile and CWGetFileText */ CW_CALLBACK CWReleaseFileText(CWPluginContext context, const char* text); /* Get information about a project segment */ CW_CALLBACK CWGetSegmentInfo(CWPluginContext context, SInt32 whichsegment, CWProjectSegmentInfo* segmentinfo); /* Get the number of overlay groups in the target */ CW_CALLBACK CWGetOverlay1GroupsCount(CWPluginContext context, SInt32* count); /* Get information about a project overlay group */ CW_CALLBACK CWGetOverlay1GroupInfo(CWPluginContext context, SInt32 whichgroup, CWOverlay1GroupInfo* groupinfo); /* Get information about an overlay within a group */ CW_CALLBACK CWGetOverlay1Info(CWPluginContext context, SInt32 whichgroup, SInt32 whichoverlay, CWOverlay1Info* overlayinfo); /* Get information about a file in an overlay */ CW_CALLBACK CWGetOverlay1FileInfo(CWPluginContext context, SInt32 whichgroup, SInt32 whichoverlay, SInt32 whichoverlayfile, CWOverlay1FileInfo* fileinfo); /* Report a error, warning, or informational message */ CW_CALLBACK CWReportMessage(CWPluginContext context, const CWMessageRef* msgRef, const char *line1, const char *line2, short errorlevel, SInt32 errorNumber); /* Display an alert. May actually be put in a message, depending on the plugin request */ CW_CALLBACK CWAlert(CWPluginContext context, const char* msg1, const char* msg2, const char* msg3, const char* msg4); /* Display one or two status messages to the user */ CW_CALLBACK CWShowStatus(CWPluginContext context, const char *line1, const char *line2); /* Give to the IDE to handle events and check if user has canceled this operation */ CW_CALLBACK CWUserBreak(CWPluginContext context); /* Return stored preference data, referenced by name. Typically used for preference */ /* panel settings. */ CW_CALLBACK CWGetNamedPreferences(CWPluginContext context, const char* prefsname, CWMemHandle* prefsdata); /* Store data referenced by a data type and file number */ CW_CALLBACK CWStorePluginData(CWPluginContext context, SInt32 whichfile, CWDataType type, CWMemHandle prefsdata); /* Return stored data referenced by a data type and file number */ CW_CALLBACK CWGetPluginData(CWPluginContext context, SInt32 whichfile, CWDataType type, CWMemHandle* prefsdata); /* Inform the IDE that a file modification date has changed. isGenerated is for use */ /* by compiler and linker plugins only */ CW_CALLBACK CWSetModDate(CWPluginContext context, const CWFileSpec* filespec, CWFileTime* moddate, Boolean isGenerated); /* Ask the IDE to add a file to the current target in the current project. isGenerated */ /* is for use by compiler plugins only. */ CW_CALLBACK CWAddProjectEntry(CWPluginContext context, const CWFileSpec* fileSpec, Boolean isGenerated, const CWNewProjectEntryInfo* projectEntryInfo, SInt32* whichfile); /* Ask the IDE to remove a file from the current target (link-order/segment/overlay) in the current project. */ /* If it's the last target that contains the file, it would be removed from the file list. */ CW_CALLBACK CWRemoveProjectEntry(CWPluginContext context, const CWFileSpec* fileSpec); /* Create a new editor window, supplying initial text and an optional document name */ CW_CALLBACK CWCreateNewTextDocument(CWPluginContext, const CWNewTextDocumentInfo* docinfo); /* Allocate memory. Permanent memory is not freed until the plugin is unloaded. */ /* Temporary memory is freed after each plugin request completes. */ CW_CALLBACK CWAllocateMemory(CWPluginContext context, SInt32 size, Boolean isPermanent, void** ptr); /* Free memory allocated via CWAllocateMemory */ CW_CALLBACK CWFreeMemory(CWPluginContext context, void* ptr, Boolean isPermanent); /* Allocate a memory handle of the requested size. All handles are automatically */ /* freed at the end of each compiler/linker request. useTempMemory is MacOS-specific*/ CW_CALLBACK CWAllocMemHandle(CWPluginContext context, SInt32 size, Boolean useTempMemory, CWMemHandle* handle); /* Free a memory handle */ CW_CALLBACK CWFreeMemHandle(CWPluginContext context, CWMemHandle handle); /* Return the current size of a memory handle */ CW_CALLBACK CWGetMemHandleSize(CWPluginContext context, CWMemHandle handle, SInt32* size); /* Resize an existing memory handle */ CW_CALLBACK CWResizeMemHandle(CWPluginContext context, CWMemHandle handle, SInt32 newSize); /* To obtain a pointer to the block, you must lock the handle */ /* moveHi is MacOS-specific */ CW_CALLBACK CWLockMemHandle(CWPluginContext context, CWMemHandle handle, Boolean moveHi, void** ptr); /* Unlock a memory handle, the pointer returned by locking the handle may no */ /* longer be valid */ CW_CALLBACK CWUnlockMemHandle(CWPluginContext context, CWMemHandle handle); #if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS /* Utility function to map MacOS error codes to a CWResult code. Plugins */ /* may internally generate OSErrs, but need to return CWResult to the */ /* CodeWarrior IDE */ CW_CALLBACK CWMacOSErrToCWResult(CWPluginContext context, OSErr err); #endif /* Turn off the built in PP window manager while the plugin displays a dialog */ CW_CALLBACK CWPreDialog(CWPluginContext context); /* Turn on the built in PP window manager after the plugin is through with its */ /* dialog */ CW_CALLBACK CWPostDialog(CWPluginContext context); /* Notify the IDE that the plugin will be performing actions on a file */ CW_CALLBACK CWPreFileAction(CWPluginContext context, const CWFileSpec *theFile); /* Notify the IDE that the plugin is finished performing actions on a file */ CW_CALLBACK CWPostFileAction(CWPluginContext context, const CWFileSpec *theFile); CW_CALLBACK CWResolveRelativePath(CWPluginContext context, const CWRelativePath* relativePath, CWFileSpec* fileSpec, Boolean create); CW_CALLBACK CWFindLogicalDirectory(CWPluginContext context, SInt32 selector, CWFileSpec *dirSpec); CW_CALLBACK CWOpenFileInEditor(CWPluginContext context, const CWFileSpec *fileSpec); #if CWPLUGIN_HOST==CWPLUGIN_HOST_SOLARIS || CWPLUGIN_HOST==CWPLUGIN_HOST_LINUX /* Forward declarations */ struct ICodeWarriorApp; struct ICodeWarriorProject; struct ICodeWarriorDesign; struct ICodeWarriorTarget; #endif /* CWPLUGIN_HOST==CWPLUGIN_HOST_SOLARIS || CWPLUGIN_HOST==CWPLUGIN_HOST_LINUX */ /* Get the IDE application COM interface. Fails if called from any thread */ /* other than the main IDE thread, e.g. a build thread. */ CW_CALLBACK CWGetCOMApplicationInterface(CWPluginContext context, struct ICodeWarriorApp **app); /* Get the current project COM interface. Adds a reference upon return. */ /* Only succeeds if the plugin is being called in the context of a */ /* particular project. Fails if called from any thread */ /* other than the main IDE thread, e.g. a build thread. */ CW_CALLBACK CWGetCOMProjectInterface(CWPluginContext context, struct ICodeWarriorProject **project); /* Get the current design COM interface. Adds a reference upon return. */ /* Only succeeds if the plugin is being called in the context of a */ /* particular target that is associated with a design. */ /* Fails if called from any thread other than the main IDE thread, */ /* e.g. a build thread. */ CW_CALLBACK CWGetCOMDesignInterface(CWPluginContext context, struct ICodeWarriorDesign **design); /* Get the current target COM interface. Adds a reference upon return. */ /* Only succeeds if the plugin is being called in the context of a */ /* particular target. Fails if called from any thread */ /* other than the main IDE thread, e.g. a build thread. */ CW_CALLBACK CWGetCOMTargetInterface(CWPluginContext context, struct ICodeWarriorTarget **target); #if CW_USE_PRAGMA_IMPORT #pragma import reset #endif #ifdef __cplusplus } #endif #ifdef _MSC_VER #pragma pack(pop) #endif #ifdef __MWERKS__ #pragma options align=reset #endif #endif /* __CWPlugins_H__ */ \ No newline at end of file
diff --git a/unsorted/Arguments.c b/unsorted/Arguments.c
index 663d211..631f282 100644
--- a/unsorted/Arguments.c
+++ b/unsorted/Arguments.c
@@ -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;
}
}
diff --git a/unsorted/Option.c b/unsorted/Option.c
index c1c8e91..e4851dc 100644
--- a/unsorted/Option.c
+++ b/unsorted/Option.c
@@ -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)
diff --git a/unsorted/Parameter.c b/unsorted/Parameter.c
index 03e4a75..31669e1 100644
--- a/unsorted/Parameter.c
+++ b/unsorted/Parameter.c
@@ -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)
diff --git a/unsorted/ParserHelpers-cc.c b/unsorted/ParserHelpers-cc.c
index fe081ad..07315b3 100644
--- a/unsorted/ParserHelpers-cc.c
+++ b/unsorted/ParserHelpers-cc.c
@@ -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++;
}
diff --git a/unsorted/Targets.c b/unsorted/Targets.c
index 1c00170..378b9d7 100644
--- a/unsorted/Targets.c
+++ b/unsorted/Targets.c
@@ -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;
}