summaryrefslogtreecommitdiff
path: root/command_line
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-01-15 21:50:41 +0000
committerAsh Wolf <ninji@wuffs.org>2023-01-15 21:50:41 +0000
commita231f5dbb93c60da240a027f2afd8a4797069541 (patch)
treea6bc68fdc2f1a1fa0000e5cd63a5189f170c226b /command_line
parent35d488e972a9dd75ce3867c000405f128b79c615 (diff)
downloadMWCC-a231f5dbb93c60da240a027f2afd8a4797069541.tar.gz
MWCC-a231f5dbb93c60da240a027f2afd8a4797069541.zip
more cleanup
Diffstat (limited to '')
-rw-r--r--command_line/C++_Parser/Src/Library/IO.c2
-rw-r--r--command_line/C++_Parser/Src/Library/Parameter.c46
-rw-r--r--command_line/C++_Parser/Src/Library/Projects.c14
-rw-r--r--command_line/C++_Parser/Src/Library/ToolHelpers-cc.c4
-rw-r--r--command_line/CmdLine/Project/Resources/CLErrors.r2
-rw-r--r--command_line/CmdLine/Src/CLDependencies.c2
-rw-r--r--command_line/CmdLine/Src/CLFileOps.c92
-rw-r--r--command_line/CmdLine/Src/CLMain.c26
-rw-r--r--command_line/CmdLine/Src/CLPrefs.c2
-rw-r--r--command_line/CmdLine/Src/CLToolExec.c16
-rw-r--r--command_line/CmdLine/Src/CLWriteObjectFile.c4
-rw-r--r--command_line/CmdLine/Src/Callbacks/CLDropinCallbacks_V10.cpp4
-rw-r--r--command_line/CmdLine/Src/Envir/CLErrors.c4
-rw-r--r--command_line/CmdLine/Src/Envir/CLIO.c8
-rw-r--r--command_line/CmdLine/Src/Plugins/CLPlugins.c18
-rw-r--r--command_line/CmdLine/Src/Project/CLAccessPaths.c4
16 files changed, 124 insertions, 124 deletions
diff --git a/command_line/C++_Parser/Src/Library/IO.c b/command_line/C++_Parser/Src/Library/IO.c
index 36d809b..0ce74df 100644
--- a/command_line/C++_Parser/Src/Library/IO.c
+++ b/command_line/C++_Parser/Src/Library/IO.c
@@ -7,7 +7,7 @@ void ShowTextHandle(const char *description, Handle text) {
return;
if (description)
- CLPStatus(71, description);
+ CLPStatus(CLPStr71, description);
CWSecretAttachHandle(parseopts.context, text, &mh);
CWParserDisplayTextHandle(parseopts.context, description, mh);
}
diff --git a/command_line/C++_Parser/Src/Library/Parameter.c b/command_line/C++_Parser/Src/Library/Parameter.c
index 31669e1..4b640b3 100644
--- a/command_line/C++_Parser/Src/Library/Parameter.c
+++ b/command_line/C++_Parser/Src/Library/Parameter.c
@@ -162,7 +162,7 @@ static int Param_Number(NUM_T *p, const char *pstr, int flags) {
val = 0;
opstr = pstr;
if (!pstr[0]) {
- Param_Error(5, "", pstr);
+ Param_Error(CLPStr5, "", pstr);
return 0;
}
@@ -175,12 +175,12 @@ static int Param_Number(NUM_T *p, const char *pstr, int flags) {
while (*pstr) {
if (!my_isxdigit(*pstr)) {
- Param_Error(5, "hexadecimal ", opstr);
+ Param_Error(CLPStr5, "hexadecimal ", opstr);
return 0;
}
if (val > 0xFFFFFFF) {
- Param_Error(4, opstr);
+ Param_Error(CLPStr4, opstr);
return 0;
}
@@ -192,12 +192,12 @@ static int Param_Number(NUM_T *p, const char *pstr, int flags) {
while (*pstr) {
if (*pstr < '0' || *pstr >= '8') {
- Param_Error(5, "octal ", opstr);
+ Param_Error(CLPStr5, "octal ", opstr);
return 0;
}
if (val > 0x1FFFFFFF) {
- Param_Error(4, opstr);
+ Param_Error(CLPStr4, opstr);
return 0;
}
@@ -207,12 +207,12 @@ static int Param_Number(NUM_T *p, const char *pstr, int flags) {
} else {
while (*pstr) {
if (!my_isdigit(*pstr)) {
- Param_Error(5, "decimal ", opstr);
+ Param_Error(CLPStr5, "decimal ", opstr);
return 0;
}
if (val > 0x19999999) {
- Param_Error(4, opstr);
+ Param_Error(CLPStr4, opstr);
return 0;
}
@@ -238,15 +238,15 @@ static int Param_Number(NUM_T *p, const char *pstr, int flags) {
}
if (!p->fit && (val < lo || val > hi)) {
- Param_Error(6, val, lo, hi);
+ Param_Error(CLPStr6, val, lo, hi);
return 0;
}
if (val < lo) {
- Param_Warning(7, val, lo, hi, lo);
+ Param_Warning(CLPStr7, val, lo, hi, lo);
val = lo;
} else if (val > hi) {
- Param_Warning(7, val, lo, hi, hi);
+ Param_Warning(CLPStr7, val, lo, hi, hi);
val = hi;
}
@@ -309,7 +309,7 @@ static int Param_FTypeCreator(FTYPE_T *p, const char *pstr, int flags) {
}
if (*pstr) {
- Param_Error(8, opstr);
+ Param_Error(CLPStr8, opstr);
return 0;
}
@@ -352,7 +352,7 @@ static int Param_String(STRING_T *p, const char *pstr, int flags) {
c2pstr(p->str);
if (len > p->maxlen) {
- Param_Error(9, pstr, pstr + len - 5, p->maxlen - 1);
+ Param_Error(CLPStr9, pstr, pstr + len - 5, p->maxlen - 1);
return 0;
}
@@ -399,10 +399,10 @@ static int Param_ID_or_SYM(STRING_T *p, const char *pstr, int flags) {
for (ptr = pstr; *ptr; ++ptr) {
if (ptr == pstr && my_isdigit(*ptr))
- Param_Warning(10, pstr);
+ Param_Warning(CLPStr10, pstr);
if (!my_isalnum(*ptr) && !strchr(x, *ptr))
- Param_Warning(11, pstr, *ptr);
+ Param_Warning(CLPStr11, pstr, *ptr);
}
return 1;
@@ -444,7 +444,7 @@ static int Param_OnOff(ONOFF_T *p, const char *pstr, int flags) {
} else if (!ustrcmp(pstr, "off")) {
*(p->var) = mytrue == 0;
} else {
- Param_Error(12, pstr);
+ Param_Error(CLPStr12, pstr);
return 0;
}
@@ -484,7 +484,7 @@ static int Param_OffOn(OFFON_T *p, const char *pstr, int flags) {
} else if (!ustrcmp(pstr, "on")) {
*(p->var) = mytrue == 0;
} else {
- Param_Error(12, pstr);
+ Param_Error(CLPStr12, pstr);
return 0;
}
@@ -518,7 +518,7 @@ static int Param_FilePath(FILEPATH_T *p, const char *pstr, int flags) {
err = OS_MakeFileSpec(pstr, &spec);
if (err) {
- Param_Error(18, pstr, OS_GetErrText(err));
+ Param_Error(CLPStr18, pstr, OS_GetErrText(err));
return 0;
}
@@ -528,7 +528,7 @@ static int Param_FilePath(FILEPATH_T *p, const char *pstr, int flags) {
} else {
clen = strlen(canon);
if (clen > p->maxlen) {
- Param_Error(13, canon + clen - 32, canon);
+ Param_Error(CLPStr13, canon + clen - 32, canon);
return 0;
}
strcpy(p->filename, canon);
@@ -744,7 +744,7 @@ static int Param_Setting(SETTING_T *p, const char *pstr, int flags) {
Boolean equals = 0;
if (!pstr) {
- Param_Error(40);
+ Param_Error(CLPStr40);
return 0;
}
@@ -988,7 +988,7 @@ static Boolean Param_IsNonTextFile(const char *fname, Boolean warn) {
if (!OS_GetMacFileType(&tmp, &mactype)) {
if (mactype != 'TEXT') {
if (warn)
- Param_Warning(77, fname);
+ Param_Warning(CLPStr77, fname);
return 1;
}
}
@@ -1018,11 +1018,11 @@ static int Param_GetArgument(PARAM_T *param, const char **cparam, int exec) {
if (tok->val == nextParam || tok->val == ATK_EQUALS)
tok = Arg_UsedToken();
if (tok->val == nextOpt || tok->val == nextParam || tok->val == lastOpt) {
- Param_Error(34);
+ Param_Error(CLPStr34_ArgumentsExpected);
return 0;
}
if (tok->val != ATK_ARG) {
- Param_Error(57, "parameter", Arg_GetTokenName(tok));
+ Param_Error(CLPStr57, "parameter", Arg_GetTokenName(tok));
return 0;
}
Arg_GetTokenText(tok, curparam, sizeof(curparam), 1);
@@ -1038,7 +1038,7 @@ static int Param_GetArgument(PARAM_T *param, const char **cparam, int exec) {
*cparam = 0;
if (tok->val == ATK_EQUALS && !subparse) {
if (!(exec & PARAMPARSEFLAGS_40)) {
- Param_Error(37);
+ Param_Error(CLPStr37);
return 0;
}
Arg_UsedToken();
diff --git a/command_line/C++_Parser/Src/Library/Projects.c b/command_line/C++_Parser/Src/Library/Projects.c
index dca9df2..b310398 100644
--- a/command_line/C++_Parser/Src/Library/Projects.c
+++ b/command_line/C++_Parser/Src/Library/Projects.c
@@ -27,7 +27,7 @@ int AddFileToProject(OSSpec *oss, SInt16 which, char *outfilename, Boolean exist
err = OS_OSSpec_To_FSSpec(oss, &cws);
if (err) {
- CLPOSAlert(44, err, OS_SpecToStringRelative(oss, 0, STSbuf, sizeof(STSbuf)));
+ CLPOSAlert(CLPStr44, err, OS_SpecToStringRelative(oss, 0, STSbuf, sizeof(STSbuf)));
return 0;
}
@@ -79,7 +79,7 @@ int AddAccessPath(OSPathSpec *oss, SInt16 type, SInt32 position, Boolean recursi
CWAccessPathListInfo apli;
if ((err = OS_MakeSpecWithPath(oss, NULL, 0, &spec)) || (err = OS_OSSpec_To_FSSpec(&spec, &api.pathSpec))) {
- CLPOSAlert(45, err, OS_PathSpecToString(&spec.path, STSbuf, sizeof(STSbuf)));
+ CLPOSAlert(CLPStr45, err, OS_PathSpecToString(&spec.path, STSbuf, sizeof(STSbuf)));
return 0;
}
@@ -173,7 +173,7 @@ void AddOverlayGroup(const char *name, CWAddr64 *addr, SInt32 *groupnum, SInt32
result = CWParserAddOverlay1Group(parseopts.context, name, addr, groupnum);
if (result) {
if (result == cwErrInvalidCallback) {
- CLPReportError(72);
+ CLPReportError(CLPStr72);
} else {
failedCallback = "CWParserAddOverlay1Group";
longjmp(exit_plugin, result);
@@ -187,7 +187,7 @@ void AddOverlay(SInt32 groupnum, const char *name, SInt32 *overlaynum) {
result = CWParserAddOverlay1(parseopts.context, name, groupnum, overlaynum);
if (result) {
if (result == cwErrInvalidCallback) {
- CLPReportError(72);
+ CLPReportError(CLPStr72);
} else {
failedCallback = "CWParserAddOverlay1";
longjmp(exit_plugin, result);
@@ -201,7 +201,7 @@ void AddSegment(const char *name, SInt16 attrs, SInt32 *segmentnum) {
result = CWParserAddSegment(parseopts.context, name, attrs, segmentnum);
if (result) {
if (result == cwErrInvalidCallback) {
- CLPReportError(73);
+ CLPReportError(CLPStr73);
} else {
failedCallback = "CWParserAddSegment";
longjmp(exit_plugin, result);
@@ -215,7 +215,7 @@ void ChangeSegment(SInt32 segmentnum, const char *name, SInt16 attrs) {
result = CWParserSetSegment(parseopts.context, segmentnum, name, attrs);
if (result) {
if (result == cwErrInvalidCallback) {
- CLPReportError(73);
+ CLPReportError(CLPStr73);
} else {
failedCallback = "CWParserSetSegment";
longjmp(exit_plugin, result);
@@ -230,7 +230,7 @@ int GetSegment(SInt32 segmentnum, char *name, SInt16 *attrs) {
result = CWGetSegmentInfo(parseopts.context, segmentnum, &psi);
if (result) {
if (result == cwErrInvalidCallback) {
- CLPReportError(73);
+ CLPReportError(CLPStr73);
}
return 0;
}
diff --git a/command_line/C++_Parser/Src/Library/ToolHelpers-cc.c b/command_line/C++_Parser/Src/Library/ToolHelpers-cc.c
index b58f188..6c19b5b 100644
--- a/command_line/C++_Parser/Src/Library/ToolHelpers-cc.c
+++ b/command_line/C++_Parser/Src/Library/ToolHelpers-cc.c
@@ -21,9 +21,9 @@ void FinishCompilerTool(void) {
strcpy(pCmdLineCompiler.outMakefile, parseopts.lastoutputname);
} else if (outputOrdering == OutputOrdering2) {
if (parseopts.possibleFiles > 0 || parseopts.userSpecifiedFiles > 0)
- CLPReportError(41, parseopts.lastoutputname);
+ CLPReportError(CLPStr41, parseopts.lastoutputname);
else
- CLPReportError(42, parseopts.lastoutputname);
+ CLPReportError(CLPStr42, parseopts.lastoutputname);
} else {
SetFileOutputName(numfiles - 1, lastStage, parseopts.lastoutputname);
}
diff --git a/command_line/CmdLine/Project/Resources/CLErrors.r b/command_line/CmdLine/Project/Resources/CLErrors.r
index 5d457b1..5303d06 100644
--- a/command_line/CmdLine/Project/Resources/CLErrors.r
+++ b/command_line/CmdLine/Project/Resources/CLErrors.r
@@ -1,4 +1,4 @@
-static const char *STR12000[112] = {
+static const char *STR12000[108] = {
"Could not get current working directory",
"Cannot find my executable '%s'",
"Could not initialize plugin '%s'",
diff --git a/command_line/CmdLine/Src/CLDependencies.c b/command_line/CmdLine/Src/CLDependencies.c
index 724141a..2292dfb 100644
--- a/command_line/CmdLine/Src/CLDependencies.c
+++ b/command_line/CmdLine/Src/CLDependencies.c
@@ -267,7 +267,7 @@ int Deps_ChangeSpecialAccessPath(OSSpec *srcfss, Boolean initialize) {
specialAccessPath = FindOrAddGlobalInclPath(gTarg->incls.allPaths, pathspecptr);
if (optsCmdLine.verbose > 2)
- CLReport(105, OS_PathSpecToString(pathspecptr, STSbuf, sizeof(STSbuf)));
+ CLReport(CLStr105, OS_PathSpecToString(pathspecptr, STSbuf, sizeof(STSbuf)));
return 1;
}
diff --git a/command_line/CmdLine/Src/CLFileOps.c b/command_line/CmdLine/Src/CLFileOps.c
index a5976be..a79522a 100644
--- a/command_line/CmdLine/Src/CLFileOps.c
+++ b/command_line/CmdLine/Src/CLFileOps.c
@@ -13,7 +13,7 @@ static int OutputTextData(File *file, SInt16 stage, OSType maccreator, OSType ma
ret = ShowHandle(file->textdata, size, 0);
} else {
if (optsCmdLine.verbose)
- CLReport(15, OS_SpecToStringRelative(&file->outfss, NULL, STSbuf, sizeof(STSbuf)));
+ CLReport(CLStr15, OS_SpecToStringRelative(&file->outfss, NULL, STSbuf, sizeof(STSbuf)));
ret = WriteHandleToFile(&file->outfss, file->textdata, size, maccreator, mactype);
file->wroteToDisk |= stage;
}
@@ -145,7 +145,7 @@ int GetOutputFile(File *file, SInt16 stage) {
if (!err) {
if (OS_EqualSpec(&file->srcfss, &file->outfss)) {
if (specifiedName) {
- CLReportError(102, targetoutfilename);
+ CLReportError(CLStr102, targetoutfilename);
file->writeToDisk &= ~stage;
file->tempOnDisk &= ~stage;
return 0;
@@ -170,7 +170,7 @@ static int PreprocessFile(File *file) {
const CWObjectFlags *cof;
if (!(file->dropinflags & kCanpreprocess)) {
- CLReportWarning(53, Plugin_GetDropInName(file->compiler), file->srcfilename);
+ CLReportWarning(CLStr53, Plugin_GetDropInName(file->compiler), file->srcfilename);
return 1;
}
@@ -188,7 +188,7 @@ static int PreprocessFile(File *file) {
optsCompiler.ppFileType ? optsCompiler.ppFileType : cof->ppFileType);
}
- CLReportError(96, "preprocessing", file->srcfilename);
+ CLReportError(CLStr96, "preprocessing", file->srcfilename);
return 0;
}
@@ -228,7 +228,7 @@ static int RecordBrowseInfo(File *file) {
return 1;
if (!file->browsedata) {
- CLReportError(101, Plugin_GetDropInName(file->compiler), OS_SpecToStringRelative(&file->srcfss, NULL, STSbuf, sizeof(STSbuf)));
+ CLReportError(CLStr101, Plugin_GetDropInName(file->compiler), OS_SpecToStringRelative(&file->srcfss, NULL, STSbuf, sizeof(STSbuf)));
return 0;
}
@@ -278,7 +278,7 @@ static int CompileFile(File *file) {
int ret = 1;
if (!(file->dropinflags & kCanprecompile) && ((optsCompiler.forcePrecompile == 1) || (file->mappingflags & kPrecompile))) {
- CLReportWarning(54, Plugin_GetDropInName(file->compiler), file->srcfilename);
+ CLReportWarning(CLStr54, Plugin_GetDropInName(file->compiler), file->srcfilename);
return 1;
}
@@ -294,7 +294,7 @@ static int CompileFile(File *file) {
file->recordbrowseinfo = ret < 0;
file->browseFileID = id;
if (optsCmdLine.verbose > 1)
- CLReport(22, file->srcfilename, file->browseFileID);
+ CLReport(CLStr22, file->srcfilename, file->browseFileID);
} else {
memset(file->browseoptions, 0, sizeof(file->browseoptions));
file->recordbrowseinfo = 0;
@@ -306,7 +306,7 @@ static int CompileFile(File *file) {
ret = 0;
} else {
if ((!file->hasobjectcode || !file->objectdata) && (file->dropinflags & kGeneratescode) && (file->objectUsage & 2)) {
- CLReportError(96, "compiling", file->srcfilename);
+ CLReportError(CLStr96, "compiling", file->srcfilename);
ret = 0;
} else if (optsCmdLine.state == OptsCmdLineState_2 && !StoreObjectFile(file)) {
ret = 0;
@@ -334,7 +334,7 @@ static int DisassembleFile(File *file) {
Plugin *disasm;
if (!file->hasobjectcode && !file->hasresources) {
- CLReportError(56, file->srcfilename);
+ CLReportError(CLStr56, file->srcfilename);
return 0;
}
@@ -352,7 +352,7 @@ static int DisassembleFile(File *file) {
optsCompiler.disFileCreator ? optsCompiler.disFileCreator : cof->disFileCreator,
optsCompiler.disFileType ? optsCompiler.disFileType : cof->disFileType);
}
- CLReportError(96, "disassembling", file->srcfilename);
+ CLReportError(CLStr96, "disassembling", file->srcfilename);
return 0;
} else {
@@ -370,7 +370,7 @@ static int DisassembleFile(File *file) {
optsCompiler.disFileCreator ? optsCompiler.disFileCreator : cof->disFileCreator,
optsCompiler.disFileType ? optsCompiler.disFileType : cof->disFileType);
}
- CLReportError(96, "disassembling", file->srcfilename);
+ CLReportError(CLStr96, "disassembling", file->srcfilename);
}
return 0;
}
@@ -383,15 +383,15 @@ static int DisassembleFile(File *file) {
optsCompiler.disFileCreator ? optsCompiler.disFileCreator : cof->disFileCreator,
optsCompiler.disFileType ? optsCompiler.disFileType : cof->disFileType);
}
- CLReportError(96, "disassembling", file->srcfilename);
+ CLReportError(CLStr96, "disassembling", file->srcfilename);
}
return 0;
}
if (gTarg->linker)
- CLReportError(58, Plugin_GetDropInName(gTarg->linker), Plugin_GetDropInName(file->compiler), file->srcfilename);
+ CLReportError(CLStr58, Plugin_GetDropInName(gTarg->linker), Plugin_GetDropInName(file->compiler), file->srcfilename);
else
- CLReportError(57, Plugin_GetDropInName(file->compiler), file->srcfilename);
+ CLReportError(CLStr57, Plugin_GetDropInName(file->compiler), file->srcfilename);
return 0;
}
@@ -437,10 +437,10 @@ static int CompileEntry(File *file, Boolean *compiled) {
const char *cun;
const char *dun;
const char *uun;
- CLReport(25, file->compiledlines);
+ CLReport(CLStr25, file->compiledlines);
tinfo->linesCompiled += file->compiledlines;
cun = dun = uun = "bytes";
- CLReport(26, file->codesize, cun, file->idatasize, dun, file->udatasize, uun);
+ CLReport(CLStr26, file->codesize, cun, file->idatasize, dun, file->udatasize, uun);
}
tinfo->codeSize += file->codesize;
tinfo->iDataSize += file->idatasize;
@@ -451,9 +451,9 @@ static int CompileEntry(File *file, Boolean *compiled) {
if (optsCmdLine.timeWorking) {
if (optsCmdLine.verbose)
- CLReport(24, (endWork - beginWork) / 1000.0, "compile", "", "", "");
+ CLReport(CLStr24, (endWork - beginWork) / 1000.0, "compile", "", "", "");
else
- CLReport(24, (endWork - beginWork) / 1000.0, "compile", "'", file->srcfilename, "'");
+ CLReport(CLStr24, (endWork - beginWork) / 1000.0, "compile", "'", file->srcfilename, "'");
}
return 1;
@@ -463,16 +463,16 @@ static void DumpFileAndPathInfo(void) {
int i;
int n;
- CLReport(84, "Framework search paths ([d] = default, [r] = recursive)");
+ CLReport(CLStr84, "Framework search paths ([d] = default, [r] = recursive)");
n = Paths_Count(&FrameworkPaths);
if (!n) {
- CLReport(85, "(none)", "");
+ CLReport(CLStr85, "(none)", "");
} else {
for (i = 0; i < n; i++) {
Path *path = Paths_GetPath(&FrameworkPaths, i);
OS_ASSERT(961, path != NULL);
- CLReport(85,
+ CLReport(CLStr85,
OS_PathSpecToString(path->spec, STSbuf, sizeof(STSbuf)),
((path->flags & 2) && path->recursive) ? " [d] [r]" : (path->flags & 2) ? " [d]" : path->recursive ? " [r]" : ""
);
@@ -482,7 +482,7 @@ static void DumpFileAndPathInfo(void) {
for (j = 0; j < Paths_Count(path->recursive); j++) {
Path *sub = Paths_GetPath(path->recursive, j);
OS_ASSERT(976, sub);
- CLReport(85, "\t", OS_PathSpecToString(sub->spec, STSbuf, sizeof(STSbuf)));
+ CLReport(CLStr85, "\t", OS_PathSpecToString(sub->spec, STSbuf, sizeof(STSbuf)));
}
}
}
@@ -490,7 +490,7 @@ static void DumpFileAndPathInfo(void) {
n = Frameworks_GetCount();
if (Frameworks_GetCount()) {
- CLReport(84, "Included frameworks");
+ CLReport(CLStr84, "Included frameworks");
for (i = 0; i < n; i++) {
char version[80];
Paths_FWInfo *info = Frameworks_GetInfo(i);
@@ -504,23 +504,23 @@ static void DumpFileAndPathInfo(void) {
strncat(version, info->version.s, sizeof(version) - 4);
strcat(version, ")");
}
- CLReport(85, info->name.s, version);
+ CLReport(CLStr85, info->name.s, version);
}
}
if (clState.plugintype == CWDROPINCOMPILERTYPE)
- CLReport(84, "User include search paths ([d] = default, [r] = recursive)");
+ CLReport(CLStr84, "User include search paths ([d] = default, [r] = recursive)");
else
- CLReport(84, "Library search paths ([d] = default, [r] = recursive)");
+ CLReport(CLStr84, "Library search paths ([d] = default, [r] = recursive)");
if (!Paths_Count(&gTarg->userPaths) && clState.plugintype == CWDROPINCOMPILERTYPE) {
- CLReport(85, "(none)", "");
+ CLReport(CLStr85, "(none)", "");
} else {
for (i = 0; i < Paths_Count(&gTarg->userPaths); i++) {
Path *path = Paths_GetPath(&gTarg->userPaths, i);
OS_ASSERT(1024, path != NULL);
- CLReport(85,
+ CLReport(CLStr85,
OS_PathSpecToString(path->spec, STSbuf, sizeof(STSbuf)),
((path->flags & 2) && path->recursive) ? " [d] [r]" : (path->flags & 2) ? " [d]" : path->recursive ? " [r]" : ""
);
@@ -530,23 +530,23 @@ static void DumpFileAndPathInfo(void) {
for (j = 0; j < Paths_Count(path->recursive); j++) {
Path *sub = Paths_GetPath(path->recursive, j);
OS_ASSERT(1039, sub);
- CLReport(85, "\t", OS_PathSpecToString(sub->spec, STSbuf, sizeof(STSbuf)));
+ CLReport(CLStr85, "\t", OS_PathSpecToString(sub->spec, STSbuf, sizeof(STSbuf)));
}
}
}
}
if (clState.plugintype == CWDROPINCOMPILERTYPE)
- CLReport(84, "System include search paths ([d] = default, [r] = recursive)");
+ CLReport(CLStr84, "System include search paths ([d] = default, [r] = recursive)");
if (!Paths_Count(&gTarg->sysPaths))
- CLReport(85, "(none)", "");
+ CLReport(CLStr85, "(none)", "");
for (i = 0; i < Paths_Count(&gTarg->sysPaths); i++) {
Path *path = Paths_GetPath(&gTarg->sysPaths, i);
OS_ASSERT(1054, path != NULL);
- CLReport(85,
+ CLReport(CLStr85,
OS_PathSpecToString(path->spec, STSbuf, sizeof(STSbuf)),
((path->flags & 2) && path->recursive) ? " [d] [r]" : (path->flags & 2) ? " [d]" : path->recursive ? " [r]" : ""
);
@@ -556,22 +556,22 @@ static void DumpFileAndPathInfo(void) {
for (j = 0; j < Paths_Count(path->recursive); j++) {
Path *sub = Paths_GetPath(path->recursive, j);
OS_ASSERT(1069, sub);
- CLReport(85, "\t", OS_PathSpecToString(sub->spec, STSbuf, sizeof(STSbuf)));
+ CLReport(CLStr85, "\t", OS_PathSpecToString(sub->spec, STSbuf, sizeof(STSbuf)));
}
}
}
if (clState.plugintype == CWDROPINCOMPILERTYPE)
- CLReport(84, "Files in project (relative to CWD)");
+ CLReport(CLStr84, "Files in project (relative to CWD)");
else
- CLReport(84, "Link order for project (relative to CWD)");
+ CLReport(CLStr84, "Link order for project (relative to CWD)");
for (i = 0; i < Files_Count(&gTarg->files); i++) {
File *file = Files_GetFile(&gTarg->files, i);
if (!VFiles_Find(gTarg->virtualFiles, file->srcfilename))
- CLReport(85, OS_SpecToStringRelative(&file->srcfss, NULL, STSbuf, sizeof(STSbuf)), "");
+ CLReport(CLStr85, OS_SpecToStringRelative(&file->srcfss, NULL, STSbuf, sizeof(STSbuf)), "");
else
- CLReport(85, file->srcfilename, "\t(virtual file)");
+ CLReport(CLStr85, file->srcfilename, "\t(virtual file)");
}
}
@@ -655,16 +655,16 @@ int CompileFilesInProject(void) {
const char *dun;
const char *uun;
cun = dun = uun = "bytes";
- CLReport(27, tinfo->codeSize, cun, tinfo->iDataSize, dun, tinfo->uDataSize, uun);
+ CLReport(CLStr27, tinfo->codeSize, cun, tinfo->iDataSize, dun, tinfo->uDataSize, uun);
}
endTime = OS_GetMilliseconds();
if (optsCmdLine.timeWorking)
- CLReport(24, (endTime - startTime) / 1000.0, "compile", "", "", "project");
+ CLReport(CLStr24, (endTime - startTime) / 1000.0, "compile", "", "", "project");
if (ignored > 0 && compiled == 0 && (gTarg->preLinker || gTarg->linker))
- CLReportError(29);
+ CLReportError(CLStr29);
if (failed)
return Result_Failed;
@@ -696,7 +696,7 @@ static int PostLinkFilesInProject(void) {
endTime = OS_GetMilliseconds();
if (optsCmdLine.timeWorking)
- CLReport(24, (endTime - startTime) / 1000.0, "compile", "", "", "project");
+ CLReport(CLStr24, (endTime - startTime) / 1000.0, "compile", "", "", "project");
return CheckForUserBreak() ? Result_Cancelled : Result_Success;
}
@@ -726,7 +726,7 @@ int LinkProject(void) {
subEnd = OS_GetMilliseconds();
if (optsCmdLine.timeWorking)
- CLReport(24, (subEnd - subStart) / 1000.0, "prelink project", "", "", "");
+ CLReport(CLStr24, (subEnd - subStart) / 1000.0, "prelink project", "", "", "");
}
if (gTarg->linker && optsLinker.callLinker && optsCmdLine.state == OptsCmdLineState_3) {
@@ -744,7 +744,7 @@ int LinkProject(void) {
subEnd = OS_GetMilliseconds();
if (optsCmdLine.timeWorking)
- CLReport(24, (subEnd - subStart) / 1000.0, "link project", "", "", "");
+ CLReport(CLStr24, (subEnd - subStart) / 1000.0, "link project", "", "", "");
}
if (gTarg->postLinker && optsLinker.callPostLinker && optsCmdLine.state == OptsCmdLineState_3) {
@@ -772,12 +772,12 @@ int LinkProject(void) {
subEnd = OS_GetMilliseconds();
if (optsCmdLine.timeWorking)
- CLReport(24, (subEnd - subStart) / 1000.0, "postlink project", "", "", "");
+ CLReport(CLStr24, (subEnd - subStart) / 1000.0, "postlink project", "", "", "");
if (!optsLinker.keepLinkerOutput && gTarg->targetinfo->outputType == linkOutputFile) {
if (optsCmdLine.verbose > 1) {
OS_FSSpec_To_OSSpec(&fss, &outfile);
- CLReport(19, OS_SpecToString(&outfile, STSbuf, sizeof(STSbuf)));
+ CLReport(CLStr19, OS_SpecToString(&outfile, STSbuf, sizeof(STSbuf)));
}
FSpDelete(&fss);
}
@@ -789,7 +789,7 @@ int LinkProject(void) {
endTime = OS_GetMilliseconds();
if (optsCmdLine.timeWorking)
- CLReport(24, (endTime - startTime) / 1000.0, "finish link stage", "", "", "");
+ CLReport(CLStr24, (endTime - startTime) / 1000.0, "finish link stage", "", "", "");
return Result_Success;
}
diff --git a/command_line/CmdLine/Src/CLMain.c b/command_line/CmdLine/Src/CLMain.c
index ae678fa..ef55b55 100644
--- a/command_line/CmdLine/Src/CLMain.c
+++ b/command_line/CmdLine/Src/CLMain.c
@@ -253,7 +253,7 @@ int Main_Initialize(int argc, char **argv) {
}
if (OS_FindProgram(exename, &clState.programSpec))
- CLReportError(2, exename);
+ CLReportError(CLStr2, exename);
Plugins_Init();
if (!RegisterStaticCmdLinePlugin())
@@ -387,7 +387,7 @@ static int Main_ResolveProject(void) {
endTime = LMGetTicks();
if (optsCmdLine.timeWorking) {
- CLReport(24, (endTime - startTime) / 60.0, "resolve", "", "project", "");
+ CLReport(CLStr24, (endTime - startTime) / 60.0, "resolve", "", "project", "");
}
return 0;
@@ -399,7 +399,7 @@ static int UpdatePCmdLineFromVersion(PCmdLine *given, PCmdLine *target) {
*target = *given;
if (clState.pluginDebug && version < 0x1002 && !warned) {
- CLReportWarning(104, "CmdLine Panel");
+ CLReportWarning(CLStr104, "CmdLine Panel");
warned = 1;
}
@@ -414,7 +414,7 @@ static int UpdatePCmdLineFromVersion(PCmdLine *given, PCmdLine *target) {
}
if (version < 0x1000 || version > 0x1002) {
- CLReportError(104, "CmdLine Panel");
+ CLReportError(CLStr104, "CmdLine Panel");
return 0;
} else {
target->version = 0x1002;
@@ -427,7 +427,7 @@ static int UpdatePCmdLineEnvirFromVersion(PCmdLineEnvir *given, PCmdLineEnvir *t
*target = *given;
if ((clState.pluginDebug && version < 0x1000) || version > 0x1000) {
- CLReportError(104, "CmdLine Environment");
+ CLReportError(CLStr104, "CmdLine Environment");
return 0;
} else {
target->version = 0x1000;
@@ -441,7 +441,7 @@ static int UpdatePCmdLineCompilerFromVersion(PCmdLineCompiler *given, PCmdLineCo
*target = *given;
if (clState.pluginDebug && version < 0x1005 && !warned) {
- CLReportWarning(104, "CmdLine Compiler Panel");
+ CLReportWarning(CLStr104, "CmdLine Compiler Panel");
warned = 1;
}
@@ -468,7 +468,7 @@ static int UpdatePCmdLineCompilerFromVersion(PCmdLineCompiler *given, PCmdLineCo
}
if (version <= 0x1000 || version > 0x1005) {
- CLReportError(104, "CmdLine Compiler Panel");
+ CLReportError(CLStr104, "CmdLine Compiler Panel");
return 0;
} else {
target->version = 0x1005;
@@ -482,7 +482,7 @@ static int UpdatePCmdLineLinkerFromVersion(PCmdLineLinker *given, PCmdLineLinker
*target = *given;
if (clState.pluginDebug && version < 0x1002 && !warned) {
- CLReportWarning(104, "CmdLine Linker Panel");
+ CLReportWarning(CLStr104, "CmdLine Linker Panel");
warned = 1;
}
@@ -499,7 +499,7 @@ static int UpdatePCmdLineLinkerFromVersion(PCmdLineLinker *given, PCmdLineLinker
}
if (version < 0x1000 || version > 0x1002) {
- CLReportError(104, "CmdLine Linker Panel");
+ CLReportError(CLStr104, "CmdLine Linker Panel");
return 0;
} else {
target->version = 0x1002;
@@ -518,7 +518,7 @@ static int UpdatePrefPanels(const char *name) {
return 0;
}
} else {
- CLReportError(91, "CmdLine Panel");
+ CLReportError(CLStr91, "CmdLine Panel");
return 0;
}
}
@@ -530,7 +530,7 @@ static int UpdatePrefPanels(const char *name) {
return 0;
}
} else {
- CLReportError(91, "CmdLine Environment");
+ CLReportError(CLStr91, "CmdLine Environment");
return 0;
}
}
@@ -542,7 +542,7 @@ static int UpdatePrefPanels(const char *name) {
return 0;
}
} else {
- CLReportError(91, "CmdLine Compiler Panel");
+ CLReportError(CLStr91, "CmdLine Compiler Panel");
return 0;
}
}
@@ -554,7 +554,7 @@ static int UpdatePrefPanels(const char *name) {
return 0;
}
} else {
- CLReportError(91, "CmdLine Linker Panel");
+ CLReportError(CLStr91, "CmdLine Linker Panel");
return 0;
}
}
diff --git a/command_line/CmdLine/Src/CLPrefs.c b/command_line/CmdLine/Src/CLPrefs.c
index b825c4a..05ca045 100644
--- a/command_line/CmdLine/Src/CLPrefs.c
+++ b/command_line/CmdLine/Src/CLPrefs.c
@@ -98,7 +98,7 @@ Boolean Prefs_AddPanel(PrefPanel *panel) {
for (scan = &panellist; *scan; scan = &(*scan)->next) {
if (!strcmp((*scan)->name, panel->name)) {
- CLReportError(90, panel->name);
+ CLReportError(CLStr90, panel->name);
return 0;
}
}
diff --git a/command_line/CmdLine/Src/CLToolExec.c b/command_line/CmdLine/Src/CLToolExec.c
index cbd1a91..c268a55 100644
--- a/command_line/CmdLine/Src/CLToolExec.c
+++ b/command_line/CmdLine/Src/CLToolExec.c
@@ -125,7 +125,7 @@ int DeleteTemporaries(void) {
if ((file->objectUsage & CmdLineStageMask_Cg) && (file->tempOnDisk & CmdLineStageMask_Cg) && (file->wroteToDisk & CmdLineStageMask_Cg)) {
GetOutputFile(file, CmdLineStageMask_Cg);
if (optsCmdLine.verbose > 1)
- CLReport(19, OS_SpecToString(&file->outfss, STSbuf, sizeof(STSbuf)));
+ CLReport(CLStr19, OS_SpecToString(&file->outfss, STSbuf, sizeof(STSbuf)));
OS_Delete(&file->outfss);
file->tempOnDisk &= ~CmdLineStageMask_Cg;
file->wroteToDisk &= ~CmdLineStageMask_Cg;
@@ -190,13 +190,13 @@ int ExecuteLinker(Plugin *plugin, SInt32 dropinflags, File *file, char *stdoutfi
if (!OS_FindProgram(cname, &linkerspec)) {
ptr = cname;
if (optsCompiler.linkerName[0]) {
- CLReportWarning(66, linkertype, optsCompiler.linkerName);
- CLReport(65, ptr, clState.programName);
+ CLReportWarning(CLStr66, linkertype, optsCompiler.linkerName);
+ CLReport(CLStr65, ptr, clState.programName);
} else if (optsCmdLine.verbose) {
- CLReport(65, ptr, clState.programName);
+ CLReport(CLStr65, ptr, clState.programName);
}
} else {
- CLReportError(66, linkertype, linkername);
+ CLReportError(CLStr66, linkertype, linkername);
return 0;
}
}
@@ -221,15 +221,15 @@ int ExecuteLinker(Plugin *plugin, SInt32 dropinflags, File *file, char *stdoutfi
fflush(stderr);
if (optsCmdLine.verbose)
- CLReport(67, linkertype, OS_SpecToString(&linkerspec, STSbuf, sizeof(STSbuf)));
+ CLReport(CLStr67, linkertype, OS_SpecToString(&linkerspec, STSbuf, sizeof(STSbuf)));
if (!optsCmdLine.dryRun) {
execerr = OS_Execute(&linkerspec, args.argv, args.envp, stdoutfile, stderrfile, &exitcode);
if (execerr) {
- CLReportError(68, linkertype, args.argv[0], OS_GetErrText(execerr));
+ CLReportError(CLStr68, linkertype, args.argv[0], OS_GetErrText(execerr));
ret = 0;
} else if (exitcode) {
- CLReportError(69 /*nice*/, linkertype, args.argv[0], exitcode);
+ CLReportError(CLStr69, linkertype, args.argv[0], exitcode);
ret = 0;
}
}
diff --git a/command_line/CmdLine/Src/CLWriteObjectFile.c b/command_line/CmdLine/Src/CLWriteObjectFile.c
index 22028dc..7f2cc05 100644
--- a/command_line/CmdLine/Src/CLWriteObjectFile.c
+++ b/command_line/CmdLine/Src/CLWriteObjectFile.c
@@ -12,7 +12,7 @@ int WriteObjectFile(File *file, OSType maccreator, OSType mactype) {
OS_OSSpec_To_FSSpec(&file->srcfss, &srcfss);
if (optsCmdLine.verbose) {
- CLReport(16,
+ CLReport(CLStr16,
(file->tempOnDisk & CmdLineStageMask_Cg) ? "temporary " : "",
OS_SpecToStringRelative(&file->outfss, NULL, STSbuf, sizeof(STSbuf)));
}
@@ -33,7 +33,7 @@ int WriteBrowseData(File *file, OSType maccreator, OSType mactype) {
OS_NameSpecSetExtension(&outfss.name, optsCompiler.brsFileExt[0] ? optsCompiler.brsFileExt : cof->brsFileExt);
if (optsCmdLine.verbose) {
- CLReport(17, OS_SpecToStringRelative(&outfss, NULL, STSbuf, sizeof(STSbuf)));
+ CLReport(CLStr17, OS_SpecToStringRelative(&outfss, NULL, STSbuf, sizeof(STSbuf)));
}
if (!Browser_PackBrowseFile(file->browsedata, &clState.browseTableHandle, &browsehandle))
diff --git a/command_line/CmdLine/Src/Callbacks/CLDropinCallbacks_V10.cpp b/command_line/CmdLine/Src/Callbacks/CLDropinCallbacks_V10.cpp
index 24eaf83..f231060 100644
--- a/command_line/CmdLine/Src/Callbacks/CLDropinCallbacks_V10.cpp
+++ b/command_line/CmdLine/Src/Callbacks/CLDropinCallbacks_V10.cpp
@@ -623,11 +623,11 @@ CWResult UCBGetNamedPreferences(CWPluginContext context, const char *prefsname,
PrefPanel *pnl = Prefs_FindPanel(prefsname);
if (pnl) {
if (optsCmdLine.verbose > 2)
- CLReport(83, prefsname);
+ CLReport(CLStr83, prefsname);
UCBSecretAttachHandle(context, PrefPanel_GetHandle(pnl), prefsdata);
return cwNoErr;
} else {
- CLReportError(91, prefsname);
+ CLReportError(CLStr91, prefsname);
*prefsdata = NULL;
return cwErrRequestFailed;
}
diff --git a/command_line/CmdLine/Src/Envir/CLErrors.c b/command_line/CmdLine/Src/Envir/CLErrors.c
index 591e30d..06d5b29 100644
--- a/command_line/CmdLine/Src/Envir/CLErrors.c
+++ b/command_line/CmdLine/Src/Envir/CLErrors.c
@@ -59,7 +59,7 @@ void CLReportOSError(SInt16 errid, int err, ...) {
va_end(va);
oserr = OS_GetErrText(err);
- CLReportError(99, txt, oserr, err);
+ CLReportError(CLStr99, txt, oserr, err);
if (txt != mybuf)
free(txt);
@@ -77,7 +77,7 @@ void CLReportCError(SInt16 errid, int err_no, ...) {
va_end(va);
serr = strerror(err_no);
- CLReportError(100, txt, serr, err_no);
+ CLReportError(CLStr100, txt, serr, err_no);
if (txt != mybuf)
free(txt);
diff --git a/command_line/CmdLine/Src/Envir/CLIO.c b/command_line/CmdLine/Src/Envir/CLIO.c
index 1d6eaad..7be38a0 100644
--- a/command_line/CmdLine/Src/Envir/CLIO.c
+++ b/command_line/CmdLine/Src/Envir/CLIO.c
@@ -240,7 +240,7 @@ void TermWorking(void) {
static void ProgressFunction(const char *functionname) {
if (optsCmdLine.verbose)
- CLReport(7, functionname);
+ CLReport(CLStr7, functionname);
}
Boolean CheckForUserBreak(void) {
@@ -881,10 +881,10 @@ SInt16 CLStyledMessageDispatch(Plugin *plugin, MessageRef *ref, SInt32 errorNumb
if (++clState.countErrors >= optsCmdLine.maxErrors) {
clState.withholdErrors = 1;
if (!optsCompiler.noFail) {
- CLReport(70);
+ CLReport(CLStr70);
clState.userBreak = 1;
} else {
- CLReport(71);
+ CLReport(CLStr71);
}
}
}
@@ -892,7 +892,7 @@ SInt16 CLStyledMessageDispatch(Plugin *plugin, MessageRef *ref, SInt32 errorNumb
if (msgType == Msg_Warning && optsCmdLine.maxWarnings) {
if (++clState.countWarnings >= optsCmdLine.maxWarnings) {
clState.withholdWarnings = 1;
- CLReport(72);
+ CLReport(CLStr72);
}
}
diff --git a/command_line/CmdLine/Src/Plugins/CLPlugins.c b/command_line/CmdLine/Src/Plugins/CLPlugins.c
index 3342dae..dd9d902 100644
--- a/command_line/CmdLine/Src/Plugins/CLPlugins.c
+++ b/command_line/CmdLine/Src/Plugins/CLPlugins.c
@@ -400,7 +400,7 @@ static Boolean VerifyPanels(Plugin *pl) {
if (pl->cb->GetPanelList && pl->cb->GetPanelList(&pls) == 0) {
for (idx = 0; idx < pls->count; idx++) {
if (Prefs_FindPanel(pls->names[idx]) == NULL) {
- CLReportError(91, pls->names[idx]);
+ CLReportError(CLStr91, pls->names[idx]);
failed = 1;
}
}
@@ -460,7 +460,7 @@ void Plugin_Free(Plugin *pl) {
Boolean Plugin_VerifyPanels(Plugin *pl) {
if (!VerifyPanels(pl)) {
- CLReportError(92, Plugin_GetDropInName(pl));
+ CLReportError(CLStr92, Plugin_GetDropInName(pl));
return 0;
} else {
return 1;
@@ -511,14 +511,14 @@ int Plugins_Add(Plugin *pl) {
pl->cached_ascii_version = Plugin_GetVersionInfoASCII(pl);
if (!SupportedPlugin(pl, &failreason)) {
- CLReportError(88, dropinname, pl->cached_ascii_version, failreason);
+ CLReportError(CLStr88, dropinname, pl->cached_ascii_version, failreason);
return 0;
}
scan = &pluginlist;
while (*scan) {
if (Plugin_MatchesName(*scan, dropinname)) {
- CLReportError(89, dropinname);
+ CLReportError(CLStr89, dropinname);
return 0;
}
scan = &(*scan)->next;
@@ -528,14 +528,14 @@ int Plugins_Add(Plugin *pl) {
df = Plugin_GetDropInFlags(pl);
if (!(df->dropinflags & dropInExecutableTool) && !SendInitOrTermRequest(pl, 1)) {
- CLReportError(3, dropinname);
+ CLReportError(CLStr3, dropinname);
return 0;
}
if (df->dropintype == CWDROPINCOMPILERTYPE && df->dropinflags & 0x17C000)
- CLReportError(4, "compiler", dropinname);
+ CLReportError(CLStr4, "compiler", dropinname);
if (df->dropintype == CWDROPINLINKERTYPE && df->dropinflags & 0x5FE4000)
- CLReportError(4, "linker", dropinname);
+ CLReportError(CLStr4, "linker", dropinname);
if (clState.pluginDebug) {
vislang = df->edit_language ? df->edit_language : CWFOURCHAR('-','-','-','-');
@@ -816,11 +816,11 @@ Plugin *Plugins_GetParserForPlugin(Plugin *list, OSType style, int numPlugins, C
if (pick && !allpanels) {
int idx;
- CLReport(5);
+ CLReport(CLStr5);
for (idx = 0; idx < numPanels; idx++) {
if (!supports[idx])
- CLReport(6, panelNames[idx]);
+ CLReport(CLStr6, panelNames[idx]);
}
}
diff --git a/command_line/CmdLine/Src/Project/CLAccessPaths.c b/command_line/CmdLine/Src/Project/CLAccessPaths.c
index 1b455da..f4c7725 100644
--- a/command_line/CmdLine/Src/Project/CLAccessPaths.c
+++ b/command_line/CmdLine/Src/Project/CLAccessPaths.c
@@ -463,13 +463,13 @@ void Framework_GetEnvInfo(void) {
if (path[0]) {
if (strlen(path) >= sizeof(path)) {
- CLReportError(64, sizeof(path), path);
+ CLReportError(CLStr64, sizeof(path), path);
} else {
err = OS_MakeSpec(path, &spec, &is_file);
if (!is_file && !err) {
Frameworks_AddPath(&spec.path);
} else {
- CLReportError(23, path);
+ CLReportError(CLStr23, path);
}
}
}