mirror of https://git.wuffs.org/MWCC
more cleanup
This commit is contained in:
parent
35d488e972
commit
a231f5dbb9
|
@ -7,7 +7,7 @@ void ShowTextHandle(const char *description, Handle text) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (description)
|
if (description)
|
||||||
CLPStatus(71, description);
|
CLPStatus(CLPStr71, description);
|
||||||
CWSecretAttachHandle(parseopts.context, text, &mh);
|
CWSecretAttachHandle(parseopts.context, text, &mh);
|
||||||
CWParserDisplayTextHandle(parseopts.context, description, mh);
|
CWParserDisplayTextHandle(parseopts.context, description, mh);
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ static int Param_Number(NUM_T *p, const char *pstr, int flags) {
|
||||||
val = 0;
|
val = 0;
|
||||||
opstr = pstr;
|
opstr = pstr;
|
||||||
if (!pstr[0]) {
|
if (!pstr[0]) {
|
||||||
Param_Error(5, "", pstr);
|
Param_Error(CLPStr5, "", pstr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,12 +175,12 @@ static int Param_Number(NUM_T *p, const char *pstr, int flags) {
|
||||||
|
|
||||||
while (*pstr) {
|
while (*pstr) {
|
||||||
if (!my_isxdigit(*pstr)) {
|
if (!my_isxdigit(*pstr)) {
|
||||||
Param_Error(5, "hexadecimal ", opstr);
|
Param_Error(CLPStr5, "hexadecimal ", opstr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val > 0xFFFFFFF) {
|
if (val > 0xFFFFFFF) {
|
||||||
Param_Error(4, opstr);
|
Param_Error(CLPStr4, opstr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,12 +192,12 @@ static int Param_Number(NUM_T *p, const char *pstr, int flags) {
|
||||||
|
|
||||||
while (*pstr) {
|
while (*pstr) {
|
||||||
if (*pstr < '0' || *pstr >= '8') {
|
if (*pstr < '0' || *pstr >= '8') {
|
||||||
Param_Error(5, "octal ", opstr);
|
Param_Error(CLPStr5, "octal ", opstr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val > 0x1FFFFFFF) {
|
if (val > 0x1FFFFFFF) {
|
||||||
Param_Error(4, opstr);
|
Param_Error(CLPStr4, opstr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,12 +207,12 @@ static int Param_Number(NUM_T *p, const char *pstr, int flags) {
|
||||||
} else {
|
} else {
|
||||||
while (*pstr) {
|
while (*pstr) {
|
||||||
if (!my_isdigit(*pstr)) {
|
if (!my_isdigit(*pstr)) {
|
||||||
Param_Error(5, "decimal ", opstr);
|
Param_Error(CLPStr5, "decimal ", opstr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val > 0x19999999) {
|
if (val > 0x19999999) {
|
||||||
Param_Error(4, opstr);
|
Param_Error(CLPStr4, opstr);
|
||||||
return 0;
|
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)) {
|
if (!p->fit && (val < lo || val > hi)) {
|
||||||
Param_Error(6, val, lo, hi);
|
Param_Error(CLPStr6, val, lo, hi);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val < lo) {
|
if (val < lo) {
|
||||||
Param_Warning(7, val, lo, hi, lo);
|
Param_Warning(CLPStr7, val, lo, hi, lo);
|
||||||
val = lo;
|
val = lo;
|
||||||
} else if (val > hi) {
|
} else if (val > hi) {
|
||||||
Param_Warning(7, val, lo, hi, hi);
|
Param_Warning(CLPStr7, val, lo, hi, hi);
|
||||||
val = hi;
|
val = hi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,7 +309,7 @@ static int Param_FTypeCreator(FTYPE_T *p, const char *pstr, int flags) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*pstr) {
|
if (*pstr) {
|
||||||
Param_Error(8, opstr);
|
Param_Error(CLPStr8, opstr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ static int Param_String(STRING_T *p, const char *pstr, int flags) {
|
||||||
c2pstr(p->str);
|
c2pstr(p->str);
|
||||||
|
|
||||||
if (len > p->maxlen) {
|
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;
|
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) {
|
for (ptr = pstr; *ptr; ++ptr) {
|
||||||
if (ptr == pstr && my_isdigit(*ptr))
|
if (ptr == pstr && my_isdigit(*ptr))
|
||||||
Param_Warning(10, pstr);
|
Param_Warning(CLPStr10, pstr);
|
||||||
|
|
||||||
if (!my_isalnum(*ptr) && !strchr(x, *ptr))
|
if (!my_isalnum(*ptr) && !strchr(x, *ptr))
|
||||||
Param_Warning(11, pstr, *ptr);
|
Param_Warning(CLPStr11, pstr, *ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -444,7 +444,7 @@ static int Param_OnOff(ONOFF_T *p, const char *pstr, int flags) {
|
||||||
} else if (!ustrcmp(pstr, "off")) {
|
} else if (!ustrcmp(pstr, "off")) {
|
||||||
*(p->var) = mytrue == 0;
|
*(p->var) = mytrue == 0;
|
||||||
} else {
|
} else {
|
||||||
Param_Error(12, pstr);
|
Param_Error(CLPStr12, pstr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -484,7 +484,7 @@ static int Param_OffOn(OFFON_T *p, const char *pstr, int flags) {
|
||||||
} else if (!ustrcmp(pstr, "on")) {
|
} else if (!ustrcmp(pstr, "on")) {
|
||||||
*(p->var) = mytrue == 0;
|
*(p->var) = mytrue == 0;
|
||||||
} else {
|
} else {
|
||||||
Param_Error(12, pstr);
|
Param_Error(CLPStr12, pstr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -518,7 +518,7 @@ static int Param_FilePath(FILEPATH_T *p, const char *pstr, int flags) {
|
||||||
|
|
||||||
err = OS_MakeFileSpec(pstr, &spec);
|
err = OS_MakeFileSpec(pstr, &spec);
|
||||||
if (err) {
|
if (err) {
|
||||||
Param_Error(18, pstr, OS_GetErrText(err));
|
Param_Error(CLPStr18, pstr, OS_GetErrText(err));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -528,7 +528,7 @@ static int Param_FilePath(FILEPATH_T *p, const char *pstr, int flags) {
|
||||||
} else {
|
} else {
|
||||||
clen = strlen(canon);
|
clen = strlen(canon);
|
||||||
if (clen > p->maxlen) {
|
if (clen > p->maxlen) {
|
||||||
Param_Error(13, canon + clen - 32, canon);
|
Param_Error(CLPStr13, canon + clen - 32, canon);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
strcpy(p->filename, canon);
|
strcpy(p->filename, canon);
|
||||||
|
@ -744,7 +744,7 @@ static int Param_Setting(SETTING_T *p, const char *pstr, int flags) {
|
||||||
Boolean equals = 0;
|
Boolean equals = 0;
|
||||||
|
|
||||||
if (!pstr) {
|
if (!pstr) {
|
||||||
Param_Error(40);
|
Param_Error(CLPStr40);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -988,7 +988,7 @@ static Boolean Param_IsNonTextFile(const char *fname, Boolean warn) {
|
||||||
if (!OS_GetMacFileType(&tmp, &mactype)) {
|
if (!OS_GetMacFileType(&tmp, &mactype)) {
|
||||||
if (mactype != 'TEXT') {
|
if (mactype != 'TEXT') {
|
||||||
if (warn)
|
if (warn)
|
||||||
Param_Warning(77, fname);
|
Param_Warning(CLPStr77, fname);
|
||||||
return 1;
|
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)
|
if (tok->val == nextParam || tok->val == ATK_EQUALS)
|
||||||
tok = Arg_UsedToken();
|
tok = Arg_UsedToken();
|
||||||
if (tok->val == nextOpt || tok->val == nextParam || tok->val == lastOpt) {
|
if (tok->val == nextOpt || tok->val == nextParam || tok->val == lastOpt) {
|
||||||
Param_Error(34);
|
Param_Error(CLPStr34_ArgumentsExpected);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (tok->val != ATK_ARG) {
|
if (tok->val != ATK_ARG) {
|
||||||
Param_Error(57, "parameter", Arg_GetTokenName(tok));
|
Param_Error(CLPStr57, "parameter", Arg_GetTokenName(tok));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Arg_GetTokenText(tok, curparam, sizeof(curparam), 1);
|
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;
|
*cparam = 0;
|
||||||
if (tok->val == ATK_EQUALS && !subparse) {
|
if (tok->val == ATK_EQUALS && !subparse) {
|
||||||
if (!(exec & PARAMPARSEFLAGS_40)) {
|
if (!(exec & PARAMPARSEFLAGS_40)) {
|
||||||
Param_Error(37);
|
Param_Error(CLPStr37);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Arg_UsedToken();
|
Arg_UsedToken();
|
||||||
|
|
|
@ -27,7 +27,7 @@ int AddFileToProject(OSSpec *oss, SInt16 which, char *outfilename, Boolean exist
|
||||||
|
|
||||||
err = OS_OSSpec_To_FSSpec(oss, &cws);
|
err = OS_OSSpec_To_FSSpec(oss, &cws);
|
||||||
if (err) {
|
if (err) {
|
||||||
CLPOSAlert(44, err, OS_SpecToStringRelative(oss, 0, STSbuf, sizeof(STSbuf)));
|
CLPOSAlert(CLPStr44, err, OS_SpecToStringRelative(oss, 0, STSbuf, sizeof(STSbuf)));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ int AddAccessPath(OSPathSpec *oss, SInt16 type, SInt32 position, Boolean recursi
|
||||||
CWAccessPathListInfo apli;
|
CWAccessPathListInfo apli;
|
||||||
|
|
||||||
if ((err = OS_MakeSpecWithPath(oss, NULL, 0, &spec)) || (err = OS_OSSpec_To_FSSpec(&spec, &api.pathSpec))) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ void AddOverlayGroup(const char *name, CWAddr64 *addr, SInt32 *groupnum, SInt32
|
||||||
result = CWParserAddOverlay1Group(parseopts.context, name, addr, groupnum);
|
result = CWParserAddOverlay1Group(parseopts.context, name, addr, groupnum);
|
||||||
if (result) {
|
if (result) {
|
||||||
if (result == cwErrInvalidCallback) {
|
if (result == cwErrInvalidCallback) {
|
||||||
CLPReportError(72);
|
CLPReportError(CLPStr72);
|
||||||
} else {
|
} else {
|
||||||
failedCallback = "CWParserAddOverlay1Group";
|
failedCallback = "CWParserAddOverlay1Group";
|
||||||
longjmp(exit_plugin, result);
|
longjmp(exit_plugin, result);
|
||||||
|
@ -187,7 +187,7 @@ void AddOverlay(SInt32 groupnum, const char *name, SInt32 *overlaynum) {
|
||||||
result = CWParserAddOverlay1(parseopts.context, name, groupnum, overlaynum);
|
result = CWParserAddOverlay1(parseopts.context, name, groupnum, overlaynum);
|
||||||
if (result) {
|
if (result) {
|
||||||
if (result == cwErrInvalidCallback) {
|
if (result == cwErrInvalidCallback) {
|
||||||
CLPReportError(72);
|
CLPReportError(CLPStr72);
|
||||||
} else {
|
} else {
|
||||||
failedCallback = "CWParserAddOverlay1";
|
failedCallback = "CWParserAddOverlay1";
|
||||||
longjmp(exit_plugin, result);
|
longjmp(exit_plugin, result);
|
||||||
|
@ -201,7 +201,7 @@ void AddSegment(const char *name, SInt16 attrs, SInt32 *segmentnum) {
|
||||||
result = CWParserAddSegment(parseopts.context, name, attrs, segmentnum);
|
result = CWParserAddSegment(parseopts.context, name, attrs, segmentnum);
|
||||||
if (result) {
|
if (result) {
|
||||||
if (result == cwErrInvalidCallback) {
|
if (result == cwErrInvalidCallback) {
|
||||||
CLPReportError(73);
|
CLPReportError(CLPStr73);
|
||||||
} else {
|
} else {
|
||||||
failedCallback = "CWParserAddSegment";
|
failedCallback = "CWParserAddSegment";
|
||||||
longjmp(exit_plugin, result);
|
longjmp(exit_plugin, result);
|
||||||
|
@ -215,7 +215,7 @@ void ChangeSegment(SInt32 segmentnum, const char *name, SInt16 attrs) {
|
||||||
result = CWParserSetSegment(parseopts.context, segmentnum, name, attrs);
|
result = CWParserSetSegment(parseopts.context, segmentnum, name, attrs);
|
||||||
if (result) {
|
if (result) {
|
||||||
if (result == cwErrInvalidCallback) {
|
if (result == cwErrInvalidCallback) {
|
||||||
CLPReportError(73);
|
CLPReportError(CLPStr73);
|
||||||
} else {
|
} else {
|
||||||
failedCallback = "CWParserSetSegment";
|
failedCallback = "CWParserSetSegment";
|
||||||
longjmp(exit_plugin, result);
|
longjmp(exit_plugin, result);
|
||||||
|
@ -230,7 +230,7 @@ int GetSegment(SInt32 segmentnum, char *name, SInt16 *attrs) {
|
||||||
result = CWGetSegmentInfo(parseopts.context, segmentnum, &psi);
|
result = CWGetSegmentInfo(parseopts.context, segmentnum, &psi);
|
||||||
if (result) {
|
if (result) {
|
||||||
if (result == cwErrInvalidCallback) {
|
if (result == cwErrInvalidCallback) {
|
||||||
CLPReportError(73);
|
CLPReportError(CLPStr73);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,9 +21,9 @@ void FinishCompilerTool(void) {
|
||||||
strcpy(pCmdLineCompiler.outMakefile, parseopts.lastoutputname);
|
strcpy(pCmdLineCompiler.outMakefile, parseopts.lastoutputname);
|
||||||
} else if (outputOrdering == OutputOrdering2) {
|
} else if (outputOrdering == OutputOrdering2) {
|
||||||
if (parseopts.possibleFiles > 0 || parseopts.userSpecifiedFiles > 0)
|
if (parseopts.possibleFiles > 0 || parseopts.userSpecifiedFiles > 0)
|
||||||
CLPReportError(41, parseopts.lastoutputname);
|
CLPReportError(CLPStr41, parseopts.lastoutputname);
|
||||||
else
|
else
|
||||||
CLPReportError(42, parseopts.lastoutputname);
|
CLPReportError(CLPStr42, parseopts.lastoutputname);
|
||||||
} else {
|
} else {
|
||||||
SetFileOutputName(numfiles - 1, lastStage, parseopts.lastoutputname);
|
SetFileOutputName(numfiles - 1, lastStage, parseopts.lastoutputname);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
static const char *STR12000[112] = {
|
static const char *STR12000[108] = {
|
||||||
"Could not get current working directory",
|
"Could not get current working directory",
|
||||||
"Cannot find my executable '%s'",
|
"Cannot find my executable '%s'",
|
||||||
"Could not initialize plugin '%s'",
|
"Could not initialize plugin '%s'",
|
||||||
|
|
|
@ -267,7 +267,7 @@ int Deps_ChangeSpecialAccessPath(OSSpec *srcfss, Boolean initialize) {
|
||||||
|
|
||||||
specialAccessPath = FindOrAddGlobalInclPath(gTarg->incls.allPaths, pathspecptr);
|
specialAccessPath = FindOrAddGlobalInclPath(gTarg->incls.allPaths, pathspecptr);
|
||||||
if (optsCmdLine.verbose > 2)
|
if (optsCmdLine.verbose > 2)
|
||||||
CLReport(105, OS_PathSpecToString(pathspecptr, STSbuf, sizeof(STSbuf)));
|
CLReport(CLStr105, OS_PathSpecToString(pathspecptr, STSbuf, sizeof(STSbuf)));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ static int OutputTextData(File *file, SInt16 stage, OSType maccreator, OSType ma
|
||||||
ret = ShowHandle(file->textdata, size, 0);
|
ret = ShowHandle(file->textdata, size, 0);
|
||||||
} else {
|
} else {
|
||||||
if (optsCmdLine.verbose)
|
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);
|
ret = WriteHandleToFile(&file->outfss, file->textdata, size, maccreator, mactype);
|
||||||
file->wroteToDisk |= stage;
|
file->wroteToDisk |= stage;
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ int GetOutputFile(File *file, SInt16 stage) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
if (OS_EqualSpec(&file->srcfss, &file->outfss)) {
|
if (OS_EqualSpec(&file->srcfss, &file->outfss)) {
|
||||||
if (specifiedName) {
|
if (specifiedName) {
|
||||||
CLReportError(102, targetoutfilename);
|
CLReportError(CLStr102, targetoutfilename);
|
||||||
file->writeToDisk &= ~stage;
|
file->writeToDisk &= ~stage;
|
||||||
file->tempOnDisk &= ~stage;
|
file->tempOnDisk &= ~stage;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -170,7 +170,7 @@ static int PreprocessFile(File *file) {
|
||||||
const CWObjectFlags *cof;
|
const CWObjectFlags *cof;
|
||||||
|
|
||||||
if (!(file->dropinflags & kCanpreprocess)) {
|
if (!(file->dropinflags & kCanpreprocess)) {
|
||||||
CLReportWarning(53, Plugin_GetDropInName(file->compiler), file->srcfilename);
|
CLReportWarning(CLStr53, Plugin_GetDropInName(file->compiler), file->srcfilename);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ static int PreprocessFile(File *file) {
|
||||||
optsCompiler.ppFileType ? optsCompiler.ppFileType : cof->ppFileType);
|
optsCompiler.ppFileType ? optsCompiler.ppFileType : cof->ppFileType);
|
||||||
}
|
}
|
||||||
|
|
||||||
CLReportError(96, "preprocessing", file->srcfilename);
|
CLReportError(CLStr96, "preprocessing", file->srcfilename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ static int RecordBrowseInfo(File *file) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (!file->browsedata) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ static int CompileFile(File *file) {
|
||||||
int ret = 1;
|
int ret = 1;
|
||||||
|
|
||||||
if (!(file->dropinflags & kCanprecompile) && ((optsCompiler.forcePrecompile == 1) || (file->mappingflags & kPrecompile))) {
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ static int CompileFile(File *file) {
|
||||||
file->recordbrowseinfo = ret < 0;
|
file->recordbrowseinfo = ret < 0;
|
||||||
file->browseFileID = id;
|
file->browseFileID = id;
|
||||||
if (optsCmdLine.verbose > 1)
|
if (optsCmdLine.verbose > 1)
|
||||||
CLReport(22, file->srcfilename, file->browseFileID);
|
CLReport(CLStr22, file->srcfilename, file->browseFileID);
|
||||||
} else {
|
} else {
|
||||||
memset(file->browseoptions, 0, sizeof(file->browseoptions));
|
memset(file->browseoptions, 0, sizeof(file->browseoptions));
|
||||||
file->recordbrowseinfo = 0;
|
file->recordbrowseinfo = 0;
|
||||||
|
@ -306,7 +306,7 @@ static int CompileFile(File *file) {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
} else {
|
||||||
if ((!file->hasobjectcode || !file->objectdata) && (file->dropinflags & kGeneratescode) && (file->objectUsage & 2)) {
|
if ((!file->hasobjectcode || !file->objectdata) && (file->dropinflags & kGeneratescode) && (file->objectUsage & 2)) {
|
||||||
CLReportError(96, "compiling", file->srcfilename);
|
CLReportError(CLStr96, "compiling", file->srcfilename);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else if (optsCmdLine.state == OptsCmdLineState_2 && !StoreObjectFile(file)) {
|
} else if (optsCmdLine.state == OptsCmdLineState_2 && !StoreObjectFile(file)) {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
@ -334,7 +334,7 @@ static int DisassembleFile(File *file) {
|
||||||
Plugin *disasm;
|
Plugin *disasm;
|
||||||
|
|
||||||
if (!file->hasobjectcode && !file->hasresources) {
|
if (!file->hasobjectcode && !file->hasresources) {
|
||||||
CLReportError(56, file->srcfilename);
|
CLReportError(CLStr56, file->srcfilename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ static int DisassembleFile(File *file) {
|
||||||
optsCompiler.disFileCreator ? optsCompiler.disFileCreator : cof->disFileCreator,
|
optsCompiler.disFileCreator ? optsCompiler.disFileCreator : cof->disFileCreator,
|
||||||
optsCompiler.disFileType ? optsCompiler.disFileType : cof->disFileType);
|
optsCompiler.disFileType ? optsCompiler.disFileType : cof->disFileType);
|
||||||
}
|
}
|
||||||
CLReportError(96, "disassembling", file->srcfilename);
|
CLReportError(CLStr96, "disassembling", file->srcfilename);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -370,7 +370,7 @@ static int DisassembleFile(File *file) {
|
||||||
optsCompiler.disFileCreator ? optsCompiler.disFileCreator : cof->disFileCreator,
|
optsCompiler.disFileCreator ? optsCompiler.disFileCreator : cof->disFileCreator,
|
||||||
optsCompiler.disFileType ? optsCompiler.disFileType : cof->disFileType);
|
optsCompiler.disFileType ? optsCompiler.disFileType : cof->disFileType);
|
||||||
}
|
}
|
||||||
CLReportError(96, "disassembling", file->srcfilename);
|
CLReportError(CLStr96, "disassembling", file->srcfilename);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -383,15 +383,15 @@ static int DisassembleFile(File *file) {
|
||||||
optsCompiler.disFileCreator ? optsCompiler.disFileCreator : cof->disFileCreator,
|
optsCompiler.disFileCreator ? optsCompiler.disFileCreator : cof->disFileCreator,
|
||||||
optsCompiler.disFileType ? optsCompiler.disFileType : cof->disFileType);
|
optsCompiler.disFileType ? optsCompiler.disFileType : cof->disFileType);
|
||||||
}
|
}
|
||||||
CLReportError(96, "disassembling", file->srcfilename);
|
CLReportError(CLStr96, "disassembling", file->srcfilename);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gTarg->linker)
|
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
|
else
|
||||||
CLReportError(57, Plugin_GetDropInName(file->compiler), file->srcfilename);
|
CLReportError(CLStr57, Plugin_GetDropInName(file->compiler), file->srcfilename);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -437,10 +437,10 @@ static int CompileEntry(File *file, Boolean *compiled) {
|
||||||
const char *cun;
|
const char *cun;
|
||||||
const char *dun;
|
const char *dun;
|
||||||
const char *uun;
|
const char *uun;
|
||||||
CLReport(25, file->compiledlines);
|
CLReport(CLStr25, file->compiledlines);
|
||||||
tinfo->linesCompiled += file->compiledlines;
|
tinfo->linesCompiled += file->compiledlines;
|
||||||
cun = dun = uun = "bytes";
|
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->codeSize += file->codesize;
|
||||||
tinfo->iDataSize += file->idatasize;
|
tinfo->iDataSize += file->idatasize;
|
||||||
|
@ -451,9 +451,9 @@ static int CompileEntry(File *file, Boolean *compiled) {
|
||||||
|
|
||||||
if (optsCmdLine.timeWorking) {
|
if (optsCmdLine.timeWorking) {
|
||||||
if (optsCmdLine.verbose)
|
if (optsCmdLine.verbose)
|
||||||
CLReport(24, (endWork - beginWork) / 1000.0, "compile", "", "", "");
|
CLReport(CLStr24, (endWork - beginWork) / 1000.0, "compile", "", "", "");
|
||||||
else
|
else
|
||||||
CLReport(24, (endWork - beginWork) / 1000.0, "compile", "'", file->srcfilename, "'");
|
CLReport(CLStr24, (endWork - beginWork) / 1000.0, "compile", "'", file->srcfilename, "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -463,16 +463,16 @@ static void DumpFileAndPathInfo(void) {
|
||||||
int i;
|
int i;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
CLReport(84, "Framework search paths ([d] = default, [r] = recursive)");
|
CLReport(CLStr84, "Framework search paths ([d] = default, [r] = recursive)");
|
||||||
n = Paths_Count(&FrameworkPaths);
|
n = Paths_Count(&FrameworkPaths);
|
||||||
if (!n) {
|
if (!n) {
|
||||||
CLReport(85, "(none)", "");
|
CLReport(CLStr85, "(none)", "");
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
Path *path = Paths_GetPath(&FrameworkPaths, i);
|
Path *path = Paths_GetPath(&FrameworkPaths, i);
|
||||||
OS_ASSERT(961, path != NULL);
|
OS_ASSERT(961, path != NULL);
|
||||||
|
|
||||||
CLReport(85,
|
CLReport(CLStr85,
|
||||||
OS_PathSpecToString(path->spec, STSbuf, sizeof(STSbuf)),
|
OS_PathSpecToString(path->spec, STSbuf, sizeof(STSbuf)),
|
||||||
((path->flags & 2) && path->recursive) ? " [d] [r]" : (path->flags & 2) ? " [d]" : path->recursive ? " [r]" : ""
|
((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++) {
|
for (j = 0; j < Paths_Count(path->recursive); j++) {
|
||||||
Path *sub = Paths_GetPath(path->recursive, j);
|
Path *sub = Paths_GetPath(path->recursive, j);
|
||||||
OS_ASSERT(976, sub);
|
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();
|
n = Frameworks_GetCount();
|
||||||
if (Frameworks_GetCount()) {
|
if (Frameworks_GetCount()) {
|
||||||
CLReport(84, "Included frameworks");
|
CLReport(CLStr84, "Included frameworks");
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
char version[80];
|
char version[80];
|
||||||
Paths_FWInfo *info = Frameworks_GetInfo(i);
|
Paths_FWInfo *info = Frameworks_GetInfo(i);
|
||||||
|
@ -504,23 +504,23 @@ static void DumpFileAndPathInfo(void) {
|
||||||
strncat(version, info->version.s, sizeof(version) - 4);
|
strncat(version, info->version.s, sizeof(version) - 4);
|
||||||
strcat(version, ")");
|
strcat(version, ")");
|
||||||
}
|
}
|
||||||
CLReport(85, info->name.s, version);
|
CLReport(CLStr85, info->name.s, version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clState.plugintype == CWDROPINCOMPILERTYPE)
|
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
|
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) {
|
if (!Paths_Count(&gTarg->userPaths) && clState.plugintype == CWDROPINCOMPILERTYPE) {
|
||||||
CLReport(85, "(none)", "");
|
CLReport(CLStr85, "(none)", "");
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < Paths_Count(&gTarg->userPaths); i++) {
|
for (i = 0; i < Paths_Count(&gTarg->userPaths); i++) {
|
||||||
Path *path = Paths_GetPath(&gTarg->userPaths, i);
|
Path *path = Paths_GetPath(&gTarg->userPaths, i);
|
||||||
OS_ASSERT(1024, path != NULL);
|
OS_ASSERT(1024, path != NULL);
|
||||||
|
|
||||||
CLReport(85,
|
CLReport(CLStr85,
|
||||||
OS_PathSpecToString(path->spec, STSbuf, sizeof(STSbuf)),
|
OS_PathSpecToString(path->spec, STSbuf, sizeof(STSbuf)),
|
||||||
((path->flags & 2) && path->recursive) ? " [d] [r]" : (path->flags & 2) ? " [d]" : path->recursive ? " [r]" : ""
|
((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++) {
|
for (j = 0; j < Paths_Count(path->recursive); j++) {
|
||||||
Path *sub = Paths_GetPath(path->recursive, j);
|
Path *sub = Paths_GetPath(path->recursive, j);
|
||||||
OS_ASSERT(1039, sub);
|
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)
|
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))
|
if (!Paths_Count(&gTarg->sysPaths))
|
||||||
CLReport(85, "(none)", "");
|
CLReport(CLStr85, "(none)", "");
|
||||||
|
|
||||||
for (i = 0; i < Paths_Count(&gTarg->sysPaths); i++) {
|
for (i = 0; i < Paths_Count(&gTarg->sysPaths); i++) {
|
||||||
Path *path = Paths_GetPath(&gTarg->sysPaths, i);
|
Path *path = Paths_GetPath(&gTarg->sysPaths, i);
|
||||||
OS_ASSERT(1054, path != NULL);
|
OS_ASSERT(1054, path != NULL);
|
||||||
|
|
||||||
CLReport(85,
|
CLReport(CLStr85,
|
||||||
OS_PathSpecToString(path->spec, STSbuf, sizeof(STSbuf)),
|
OS_PathSpecToString(path->spec, STSbuf, sizeof(STSbuf)),
|
||||||
((path->flags & 2) && path->recursive) ? " [d] [r]" : (path->flags & 2) ? " [d]" : path->recursive ? " [r]" : ""
|
((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++) {
|
for (j = 0; j < Paths_Count(path->recursive); j++) {
|
||||||
Path *sub = Paths_GetPath(path->recursive, j);
|
Path *sub = Paths_GetPath(path->recursive, j);
|
||||||
OS_ASSERT(1069, sub);
|
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)
|
if (clState.plugintype == CWDROPINCOMPILERTYPE)
|
||||||
CLReport(84, "Files in project (relative to CWD)");
|
CLReport(CLStr84, "Files in project (relative to CWD)");
|
||||||
else
|
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++) {
|
for (i = 0; i < Files_Count(&gTarg->files); i++) {
|
||||||
File *file = Files_GetFile(&gTarg->files, i);
|
File *file = Files_GetFile(&gTarg->files, i);
|
||||||
if (!VFiles_Find(gTarg->virtualFiles, file->srcfilename))
|
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
|
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 *dun;
|
||||||
const char *uun;
|
const char *uun;
|
||||||
cun = dun = uun = "bytes";
|
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();
|
endTime = OS_GetMilliseconds();
|
||||||
|
|
||||||
if (optsCmdLine.timeWorking)
|
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))
|
if (ignored > 0 && compiled == 0 && (gTarg->preLinker || gTarg->linker))
|
||||||
CLReportError(29);
|
CLReportError(CLStr29);
|
||||||
|
|
||||||
if (failed)
|
if (failed)
|
||||||
return Result_Failed;
|
return Result_Failed;
|
||||||
|
@ -696,7 +696,7 @@ static int PostLinkFilesInProject(void) {
|
||||||
endTime = OS_GetMilliseconds();
|
endTime = OS_GetMilliseconds();
|
||||||
|
|
||||||
if (optsCmdLine.timeWorking)
|
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;
|
return CheckForUserBreak() ? Result_Cancelled : Result_Success;
|
||||||
}
|
}
|
||||||
|
@ -726,7 +726,7 @@ int LinkProject(void) {
|
||||||
subEnd = OS_GetMilliseconds();
|
subEnd = OS_GetMilliseconds();
|
||||||
|
|
||||||
if (optsCmdLine.timeWorking)
|
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) {
|
if (gTarg->linker && optsLinker.callLinker && optsCmdLine.state == OptsCmdLineState_3) {
|
||||||
|
@ -744,7 +744,7 @@ int LinkProject(void) {
|
||||||
subEnd = OS_GetMilliseconds();
|
subEnd = OS_GetMilliseconds();
|
||||||
|
|
||||||
if (optsCmdLine.timeWorking)
|
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) {
|
if (gTarg->postLinker && optsLinker.callPostLinker && optsCmdLine.state == OptsCmdLineState_3) {
|
||||||
|
@ -772,12 +772,12 @@ int LinkProject(void) {
|
||||||
subEnd = OS_GetMilliseconds();
|
subEnd = OS_GetMilliseconds();
|
||||||
|
|
||||||
if (optsCmdLine.timeWorking)
|
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 (!optsLinker.keepLinkerOutput && gTarg->targetinfo->outputType == linkOutputFile) {
|
||||||
if (optsCmdLine.verbose > 1) {
|
if (optsCmdLine.verbose > 1) {
|
||||||
OS_FSSpec_To_OSSpec(&fss, &outfile);
|
OS_FSSpec_To_OSSpec(&fss, &outfile);
|
||||||
CLReport(19, OS_SpecToString(&outfile, STSbuf, sizeof(STSbuf)));
|
CLReport(CLStr19, OS_SpecToString(&outfile, STSbuf, sizeof(STSbuf)));
|
||||||
}
|
}
|
||||||
FSpDelete(&fss);
|
FSpDelete(&fss);
|
||||||
}
|
}
|
||||||
|
@ -789,7 +789,7 @@ int LinkProject(void) {
|
||||||
endTime = OS_GetMilliseconds();
|
endTime = OS_GetMilliseconds();
|
||||||
|
|
||||||
if (optsCmdLine.timeWorking)
|
if (optsCmdLine.timeWorking)
|
||||||
CLReport(24, (endTime - startTime) / 1000.0, "finish link stage", "", "", "");
|
CLReport(CLStr24, (endTime - startTime) / 1000.0, "finish link stage", "", "", "");
|
||||||
|
|
||||||
return Result_Success;
|
return Result_Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,7 +253,7 @@ int Main_Initialize(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OS_FindProgram(exename, &clState.programSpec))
|
if (OS_FindProgram(exename, &clState.programSpec))
|
||||||
CLReportError(2, exename);
|
CLReportError(CLStr2, exename);
|
||||||
|
|
||||||
Plugins_Init();
|
Plugins_Init();
|
||||||
if (!RegisterStaticCmdLinePlugin())
|
if (!RegisterStaticCmdLinePlugin())
|
||||||
|
@ -387,7 +387,7 @@ static int Main_ResolveProject(void) {
|
||||||
endTime = LMGetTicks();
|
endTime = LMGetTicks();
|
||||||
|
|
||||||
if (optsCmdLine.timeWorking) {
|
if (optsCmdLine.timeWorking) {
|
||||||
CLReport(24, (endTime - startTime) / 60.0, "resolve", "", "project", "");
|
CLReport(CLStr24, (endTime - startTime) / 60.0, "resolve", "", "project", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -399,7 +399,7 @@ static int UpdatePCmdLineFromVersion(PCmdLine *given, PCmdLine *target) {
|
||||||
*target = *given;
|
*target = *given;
|
||||||
|
|
||||||
if (clState.pluginDebug && version < 0x1002 && !warned) {
|
if (clState.pluginDebug && version < 0x1002 && !warned) {
|
||||||
CLReportWarning(104, "CmdLine Panel");
|
CLReportWarning(CLStr104, "CmdLine Panel");
|
||||||
warned = 1;
|
warned = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -414,7 +414,7 @@ static int UpdatePCmdLineFromVersion(PCmdLine *given, PCmdLine *target) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version < 0x1000 || version > 0x1002) {
|
if (version < 0x1000 || version > 0x1002) {
|
||||||
CLReportError(104, "CmdLine Panel");
|
CLReportError(CLStr104, "CmdLine Panel");
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
target->version = 0x1002;
|
target->version = 0x1002;
|
||||||
|
@ -427,7 +427,7 @@ static int UpdatePCmdLineEnvirFromVersion(PCmdLineEnvir *given, PCmdLineEnvir *t
|
||||||
*target = *given;
|
*target = *given;
|
||||||
|
|
||||||
if ((clState.pluginDebug && version < 0x1000) || version > 0x1000) {
|
if ((clState.pluginDebug && version < 0x1000) || version > 0x1000) {
|
||||||
CLReportError(104, "CmdLine Environment");
|
CLReportError(CLStr104, "CmdLine Environment");
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
target->version = 0x1000;
|
target->version = 0x1000;
|
||||||
|
@ -441,7 +441,7 @@ static int UpdatePCmdLineCompilerFromVersion(PCmdLineCompiler *given, PCmdLineCo
|
||||||
*target = *given;
|
*target = *given;
|
||||||
|
|
||||||
if (clState.pluginDebug && version < 0x1005 && !warned) {
|
if (clState.pluginDebug && version < 0x1005 && !warned) {
|
||||||
CLReportWarning(104, "CmdLine Compiler Panel");
|
CLReportWarning(CLStr104, "CmdLine Compiler Panel");
|
||||||
warned = 1;
|
warned = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,7 +468,7 @@ static int UpdatePCmdLineCompilerFromVersion(PCmdLineCompiler *given, PCmdLineCo
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version <= 0x1000 || version > 0x1005) {
|
if (version <= 0x1000 || version > 0x1005) {
|
||||||
CLReportError(104, "CmdLine Compiler Panel");
|
CLReportError(CLStr104, "CmdLine Compiler Panel");
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
target->version = 0x1005;
|
target->version = 0x1005;
|
||||||
|
@ -482,7 +482,7 @@ static int UpdatePCmdLineLinkerFromVersion(PCmdLineLinker *given, PCmdLineLinker
|
||||||
*target = *given;
|
*target = *given;
|
||||||
|
|
||||||
if (clState.pluginDebug && version < 0x1002 && !warned) {
|
if (clState.pluginDebug && version < 0x1002 && !warned) {
|
||||||
CLReportWarning(104, "CmdLine Linker Panel");
|
CLReportWarning(CLStr104, "CmdLine Linker Panel");
|
||||||
warned = 1;
|
warned = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -499,7 +499,7 @@ static int UpdatePCmdLineLinkerFromVersion(PCmdLineLinker *given, PCmdLineLinker
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version < 0x1000 || version > 0x1002) {
|
if (version < 0x1000 || version > 0x1002) {
|
||||||
CLReportError(104, "CmdLine Linker Panel");
|
CLReportError(CLStr104, "CmdLine Linker Panel");
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
target->version = 0x1002;
|
target->version = 0x1002;
|
||||||
|
@ -518,7 +518,7 @@ static int UpdatePrefPanels(const char *name) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CLReportError(91, "CmdLine Panel");
|
CLReportError(CLStr91, "CmdLine Panel");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -530,7 +530,7 @@ static int UpdatePrefPanels(const char *name) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CLReportError(91, "CmdLine Environment");
|
CLReportError(CLStr91, "CmdLine Environment");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -542,7 +542,7 @@ static int UpdatePrefPanels(const char *name) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CLReportError(91, "CmdLine Compiler Panel");
|
CLReportError(CLStr91, "CmdLine Compiler Panel");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -554,7 +554,7 @@ static int UpdatePrefPanels(const char *name) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CLReportError(91, "CmdLine Linker Panel");
|
CLReportError(CLStr91, "CmdLine Linker Panel");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ Boolean Prefs_AddPanel(PrefPanel *panel) {
|
||||||
|
|
||||||
for (scan = &panellist; *scan; scan = &(*scan)->next) {
|
for (scan = &panellist; *scan; scan = &(*scan)->next) {
|
||||||
if (!strcmp((*scan)->name, panel->name)) {
|
if (!strcmp((*scan)->name, panel->name)) {
|
||||||
CLReportError(90, panel->name);
|
CLReportError(CLStr90, panel->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,7 @@ int DeleteTemporaries(void) {
|
||||||
if ((file->objectUsage & CmdLineStageMask_Cg) && (file->tempOnDisk & CmdLineStageMask_Cg) && (file->wroteToDisk & CmdLineStageMask_Cg)) {
|
if ((file->objectUsage & CmdLineStageMask_Cg) && (file->tempOnDisk & CmdLineStageMask_Cg) && (file->wroteToDisk & CmdLineStageMask_Cg)) {
|
||||||
GetOutputFile(file, CmdLineStageMask_Cg);
|
GetOutputFile(file, CmdLineStageMask_Cg);
|
||||||
if (optsCmdLine.verbose > 1)
|
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);
|
OS_Delete(&file->outfss);
|
||||||
file->tempOnDisk &= ~CmdLineStageMask_Cg;
|
file->tempOnDisk &= ~CmdLineStageMask_Cg;
|
||||||
file->wroteToDisk &= ~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)) {
|
if (!OS_FindProgram(cname, &linkerspec)) {
|
||||||
ptr = cname;
|
ptr = cname;
|
||||||
if (optsCompiler.linkerName[0]) {
|
if (optsCompiler.linkerName[0]) {
|
||||||
CLReportWarning(66, linkertype, optsCompiler.linkerName);
|
CLReportWarning(CLStr66, linkertype, optsCompiler.linkerName);
|
||||||
CLReport(65, ptr, clState.programName);
|
CLReport(CLStr65, ptr, clState.programName);
|
||||||
} else if (optsCmdLine.verbose) {
|
} else if (optsCmdLine.verbose) {
|
||||||
CLReport(65, ptr, clState.programName);
|
CLReport(CLStr65, ptr, clState.programName);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CLReportError(66, linkertype, linkername);
|
CLReportError(CLStr66, linkertype, linkername);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -221,15 +221,15 @@ int ExecuteLinker(Plugin *plugin, SInt32 dropinflags, File *file, char *stdoutfi
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
|
||||||
if (optsCmdLine.verbose)
|
if (optsCmdLine.verbose)
|
||||||
CLReport(67, linkertype, OS_SpecToString(&linkerspec, STSbuf, sizeof(STSbuf)));
|
CLReport(CLStr67, linkertype, OS_SpecToString(&linkerspec, STSbuf, sizeof(STSbuf)));
|
||||||
|
|
||||||
if (!optsCmdLine.dryRun) {
|
if (!optsCmdLine.dryRun) {
|
||||||
execerr = OS_Execute(&linkerspec, args.argv, args.envp, stdoutfile, stderrfile, &exitcode);
|
execerr = OS_Execute(&linkerspec, args.argv, args.envp, stdoutfile, stderrfile, &exitcode);
|
||||||
if (execerr) {
|
if (execerr) {
|
||||||
CLReportError(68, linkertype, args.argv[0], OS_GetErrText(execerr));
|
CLReportError(CLStr68, linkertype, args.argv[0], OS_GetErrText(execerr));
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else if (exitcode) {
|
} else if (exitcode) {
|
||||||
CLReportError(69 /*nice*/, linkertype, args.argv[0], exitcode);
|
CLReportError(CLStr69, linkertype, args.argv[0], exitcode);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ int WriteObjectFile(File *file, OSType maccreator, OSType mactype) {
|
||||||
OS_OSSpec_To_FSSpec(&file->srcfss, &srcfss);
|
OS_OSSpec_To_FSSpec(&file->srcfss, &srcfss);
|
||||||
|
|
||||||
if (optsCmdLine.verbose) {
|
if (optsCmdLine.verbose) {
|
||||||
CLReport(16,
|
CLReport(CLStr16,
|
||||||
(file->tempOnDisk & CmdLineStageMask_Cg) ? "temporary " : "",
|
(file->tempOnDisk & CmdLineStageMask_Cg) ? "temporary " : "",
|
||||||
OS_SpecToStringRelative(&file->outfss, NULL, STSbuf, sizeof(STSbuf)));
|
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);
|
OS_NameSpecSetExtension(&outfss.name, optsCompiler.brsFileExt[0] ? optsCompiler.brsFileExt : cof->brsFileExt);
|
||||||
if (optsCmdLine.verbose) {
|
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))
|
if (!Browser_PackBrowseFile(file->browsedata, &clState.browseTableHandle, &browsehandle))
|
||||||
|
|
|
@ -623,11 +623,11 @@ CWResult UCBGetNamedPreferences(CWPluginContext context, const char *prefsname,
|
||||||
PrefPanel *pnl = Prefs_FindPanel(prefsname);
|
PrefPanel *pnl = Prefs_FindPanel(prefsname);
|
||||||
if (pnl) {
|
if (pnl) {
|
||||||
if (optsCmdLine.verbose > 2)
|
if (optsCmdLine.verbose > 2)
|
||||||
CLReport(83, prefsname);
|
CLReport(CLStr83, prefsname);
|
||||||
UCBSecretAttachHandle(context, PrefPanel_GetHandle(pnl), prefsdata);
|
UCBSecretAttachHandle(context, PrefPanel_GetHandle(pnl), prefsdata);
|
||||||
return cwNoErr;
|
return cwNoErr;
|
||||||
} else {
|
} else {
|
||||||
CLReportError(91, prefsname);
|
CLReportError(CLStr91, prefsname);
|
||||||
*prefsdata = NULL;
|
*prefsdata = NULL;
|
||||||
return cwErrRequestFailed;
|
return cwErrRequestFailed;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ void CLReportOSError(SInt16 errid, int err, ...) {
|
||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
oserr = OS_GetErrText(err);
|
oserr = OS_GetErrText(err);
|
||||||
CLReportError(99, txt, oserr, err);
|
CLReportError(CLStr99, txt, oserr, err);
|
||||||
|
|
||||||
if (txt != mybuf)
|
if (txt != mybuf)
|
||||||
free(txt);
|
free(txt);
|
||||||
|
@ -77,7 +77,7 @@ void CLReportCError(SInt16 errid, int err_no, ...) {
|
||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
serr = strerror(err_no);
|
serr = strerror(err_no);
|
||||||
CLReportError(100, txt, serr, err_no);
|
CLReportError(CLStr100, txt, serr, err_no);
|
||||||
|
|
||||||
if (txt != mybuf)
|
if (txt != mybuf)
|
||||||
free(txt);
|
free(txt);
|
||||||
|
|
|
@ -240,7 +240,7 @@ void TermWorking(void) {
|
||||||
|
|
||||||
static void ProgressFunction(const char *functionname) {
|
static void ProgressFunction(const char *functionname) {
|
||||||
if (optsCmdLine.verbose)
|
if (optsCmdLine.verbose)
|
||||||
CLReport(7, functionname);
|
CLReport(CLStr7, functionname);
|
||||||
}
|
}
|
||||||
|
|
||||||
Boolean CheckForUserBreak(void) {
|
Boolean CheckForUserBreak(void) {
|
||||||
|
@ -881,10 +881,10 @@ SInt16 CLStyledMessageDispatch(Plugin *plugin, MessageRef *ref, SInt32 errorNumb
|
||||||
if (++clState.countErrors >= optsCmdLine.maxErrors) {
|
if (++clState.countErrors >= optsCmdLine.maxErrors) {
|
||||||
clState.withholdErrors = 1;
|
clState.withholdErrors = 1;
|
||||||
if (!optsCompiler.noFail) {
|
if (!optsCompiler.noFail) {
|
||||||
CLReport(70);
|
CLReport(CLStr70);
|
||||||
clState.userBreak = 1;
|
clState.userBreak = 1;
|
||||||
} else {
|
} else {
|
||||||
CLReport(71);
|
CLReport(CLStr71);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -892,7 +892,7 @@ SInt16 CLStyledMessageDispatch(Plugin *plugin, MessageRef *ref, SInt32 errorNumb
|
||||||
if (msgType == Msg_Warning && optsCmdLine.maxWarnings) {
|
if (msgType == Msg_Warning && optsCmdLine.maxWarnings) {
|
||||||
if (++clState.countWarnings >= optsCmdLine.maxWarnings) {
|
if (++clState.countWarnings >= optsCmdLine.maxWarnings) {
|
||||||
clState.withholdWarnings = 1;
|
clState.withholdWarnings = 1;
|
||||||
CLReport(72);
|
CLReport(CLStr72);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -400,7 +400,7 @@ static Boolean VerifyPanels(Plugin *pl) {
|
||||||
if (pl->cb->GetPanelList && pl->cb->GetPanelList(&pls) == 0) {
|
if (pl->cb->GetPanelList && pl->cb->GetPanelList(&pls) == 0) {
|
||||||
for (idx = 0; idx < pls->count; idx++) {
|
for (idx = 0; idx < pls->count; idx++) {
|
||||||
if (Prefs_FindPanel(pls->names[idx]) == NULL) {
|
if (Prefs_FindPanel(pls->names[idx]) == NULL) {
|
||||||
CLReportError(91, pls->names[idx]);
|
CLReportError(CLStr91, pls->names[idx]);
|
||||||
failed = 1;
|
failed = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -460,7 +460,7 @@ void Plugin_Free(Plugin *pl) {
|
||||||
|
|
||||||
Boolean Plugin_VerifyPanels(Plugin *pl) {
|
Boolean Plugin_VerifyPanels(Plugin *pl) {
|
||||||
if (!VerifyPanels(pl)) {
|
if (!VerifyPanels(pl)) {
|
||||||
CLReportError(92, Plugin_GetDropInName(pl));
|
CLReportError(CLStr92, Plugin_GetDropInName(pl));
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -511,14 +511,14 @@ int Plugins_Add(Plugin *pl) {
|
||||||
pl->cached_ascii_version = Plugin_GetVersionInfoASCII(pl);
|
pl->cached_ascii_version = Plugin_GetVersionInfoASCII(pl);
|
||||||
|
|
||||||
if (!SupportedPlugin(pl, &failreason)) {
|
if (!SupportedPlugin(pl, &failreason)) {
|
||||||
CLReportError(88, dropinname, pl->cached_ascii_version, failreason);
|
CLReportError(CLStr88, dropinname, pl->cached_ascii_version, failreason);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
scan = &pluginlist;
|
scan = &pluginlist;
|
||||||
while (*scan) {
|
while (*scan) {
|
||||||
if (Plugin_MatchesName(*scan, dropinname)) {
|
if (Plugin_MatchesName(*scan, dropinname)) {
|
||||||
CLReportError(89, dropinname);
|
CLReportError(CLStr89, dropinname);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
scan = &(*scan)->next;
|
scan = &(*scan)->next;
|
||||||
|
@ -528,14 +528,14 @@ int Plugins_Add(Plugin *pl) {
|
||||||
|
|
||||||
df = Plugin_GetDropInFlags(pl);
|
df = Plugin_GetDropInFlags(pl);
|
||||||
if (!(df->dropinflags & dropInExecutableTool) && !SendInitOrTermRequest(pl, 1)) {
|
if (!(df->dropinflags & dropInExecutableTool) && !SendInitOrTermRequest(pl, 1)) {
|
||||||
CLReportError(3, dropinname);
|
CLReportError(CLStr3, dropinname);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (df->dropintype == CWDROPINCOMPILERTYPE && df->dropinflags & 0x17C000)
|
if (df->dropintype == CWDROPINCOMPILERTYPE && df->dropinflags & 0x17C000)
|
||||||
CLReportError(4, "compiler", dropinname);
|
CLReportError(CLStr4, "compiler", dropinname);
|
||||||
if (df->dropintype == CWDROPINLINKERTYPE && df->dropinflags & 0x5FE4000)
|
if (df->dropintype == CWDROPINLINKERTYPE && df->dropinflags & 0x5FE4000)
|
||||||
CLReportError(4, "linker", dropinname);
|
CLReportError(CLStr4, "linker", dropinname);
|
||||||
|
|
||||||
if (clState.pluginDebug) {
|
if (clState.pluginDebug) {
|
||||||
vislang = df->edit_language ? df->edit_language : CWFOURCHAR('-','-','-','-');
|
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) {
|
if (pick && !allpanels) {
|
||||||
int idx;
|
int idx;
|
||||||
CLReport(5);
|
CLReport(CLStr5);
|
||||||
|
|
||||||
for (idx = 0; idx < numPanels; idx++) {
|
for (idx = 0; idx < numPanels; idx++) {
|
||||||
if (!supports[idx])
|
if (!supports[idx])
|
||||||
CLReport(6, panelNames[idx]);
|
CLReport(CLStr6, panelNames[idx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -463,13 +463,13 @@ void Framework_GetEnvInfo(void) {
|
||||||
|
|
||||||
if (path[0]) {
|
if (path[0]) {
|
||||||
if (strlen(path) >= sizeof(path)) {
|
if (strlen(path) >= sizeof(path)) {
|
||||||
CLReportError(64, sizeof(path), path);
|
CLReportError(CLStr64, sizeof(path), path);
|
||||||
} else {
|
} else {
|
||||||
err = OS_MakeSpec(path, &spec, &is_file);
|
err = OS_MakeSpec(path, &spec, &is_file);
|
||||||
if (!is_file && !err) {
|
if (!is_file && !err) {
|
||||||
Frameworks_AddPath(&spec.path);
|
Frameworks_AddPath(&spec.path);
|
||||||
} else {
|
} else {
|
||||||
CLReportError(23, path);
|
CLReportError(CLStr23, path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1294,9 +1294,9 @@ static void CodeGen_EOLCheck(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void schedule_for(int what) {
|
static void schedule_for(int what) {
|
||||||
CPrep_PushOption(OPT_OFFSET(schedule_cpu), what);
|
CPrep_PushOption(OPT_OFFSET(scheduling), what);
|
||||||
if (copts.schedule_factor == 0)
|
if (copts.schedule_factor == 0)
|
||||||
CPrep_PushOption(OPT_OFFSET(schedule_mode), 2);
|
CPrep_PushOption(OPT_OFFSET(schedule_factor), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pragma_scheduling(void) {
|
static void pragma_scheduling(void) {
|
||||||
|
@ -1313,20 +1313,20 @@ static void pragma_scheduling(void) {
|
||||||
schedule_for(7);
|
schedule_for(7);
|
||||||
return;
|
return;
|
||||||
} else if (!strcmp(tkidentifier->name, "reset")) {
|
} else if (!strcmp(tkidentifier->name, "reset")) {
|
||||||
CPrep_PopOption(OPT_OFFSET(schedule_cpu));
|
CPrep_PopOption(OPT_OFFSET(scheduling));
|
||||||
CPrep_PopOption(OPT_OFFSET(schedule_mode));
|
CPrep_PopOption(OPT_OFFSET(schedule_factor));
|
||||||
return;
|
return;
|
||||||
} else if (!strcmp(tkidentifier->name, "off")) {
|
} else if (!strcmp(tkidentifier->name, "off")) {
|
||||||
CPrep_PushOption(OPT_OFFSET(schedule_mode), 0);
|
CPrep_PushOption(OPT_OFFSET(schedule_factor), 0);
|
||||||
return;
|
return;
|
||||||
} else if (!strcmp(tkidentifier->name, "once")) {
|
} else if (!strcmp(tkidentifier->name, "once")) {
|
||||||
CPrep_PushOption(OPT_OFFSET(schedule_mode), 1);
|
CPrep_PushOption(OPT_OFFSET(schedule_factor), 1);
|
||||||
return;
|
return;
|
||||||
} else if (!strcmp(tkidentifier->name, "twice")) {
|
} else if (!strcmp(tkidentifier->name, "twice")) {
|
||||||
CPrep_PushOption(OPT_OFFSET(schedule_mode), 2);
|
CPrep_PushOption(OPT_OFFSET(schedule_factor), 2);
|
||||||
return;
|
return;
|
||||||
} else if (!strcmp(tkidentifier->name, "on")) {
|
} else if (!strcmp(tkidentifier->name, "on")) {
|
||||||
CPrep_PushOption(OPT_OFFSET(schedule_mode), 2);
|
CPrep_PushOption(OPT_OFFSET(schedule_factor), 2);
|
||||||
return;
|
return;
|
||||||
} else if (!*flag) {
|
} else if (!*flag) {
|
||||||
if (!strcmp(tkidentifier->name, "603e")) {
|
if (!strcmp(tkidentifier->name, "603e")) {
|
||||||
|
@ -1612,7 +1612,7 @@ void CodeGen_ParsePragma(HashNameNode *name) {
|
||||||
case 32:
|
case 32:
|
||||||
case 64:
|
case 64:
|
||||||
case 128:
|
case 128:
|
||||||
CPrep_PushOption(OPT_OFFSET(code_alignment), value);
|
CPrep_PushOption(OPT_OFFSET(function_align), value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PPCError_Warning(161);
|
PPCError_Warning(161);
|
||||||
|
@ -1620,7 +1620,7 @@ void CodeGen_ParsePragma(HashNameNode *name) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (t == TK_IDENTIFIER && !strcmp(tkidentifier->name, "reset")) {
|
} else if (t == TK_IDENTIFIER && !strcmp(tkidentifier->name, "reset")) {
|
||||||
CPrep_PopOption(OPT_OFFSET(code_alignment));
|
CPrep_PopOption(OPT_OFFSET(function_align));
|
||||||
} else {
|
} else {
|
||||||
PPCError_Warning(161);
|
PPCError_Warning(161);
|
||||||
}
|
}
|
||||||
|
@ -1739,7 +1739,7 @@ void CodeGen_ParsePragma(HashNameNode *name) {
|
||||||
case 32:
|
case 32:
|
||||||
case 64:
|
case 64:
|
||||||
case 128:
|
case 128:
|
||||||
CPrep_PushOption(OPT_OFFSET(some_alignment), value);
|
CPrep_PushOption(OPT_OFFSET(min_struct_alignment), value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PPCError_Warning(191);
|
PPCError_Warning(191);
|
||||||
|
@ -1748,11 +1748,11 @@ void CodeGen_ParsePragma(HashNameNode *name) {
|
||||||
}
|
}
|
||||||
} else if (t == TK_IDENTIFIER) {
|
} else if (t == TK_IDENTIFIER) {
|
||||||
if (!strcmp(tkidentifier->name, "reset"))
|
if (!strcmp(tkidentifier->name, "reset"))
|
||||||
CPrep_PopOption(OPT_OFFSET(some_alignment));
|
CPrep_PopOption(OPT_OFFSET(min_struct_alignment));
|
||||||
else if (!strcmp(tkidentifier->name, "on"))
|
else if (!strcmp(tkidentifier->name, "on"))
|
||||||
CPrep_PushOption(OPT_OFFSET(some_alignment), 4);
|
CPrep_PushOption(OPT_OFFSET(min_struct_alignment), 4);
|
||||||
else if (!strcmp(tkidentifier->name, "off"))
|
else if (!strcmp(tkidentifier->name, "off"))
|
||||||
CPrep_PushOption(OPT_OFFSET(some_alignment), 1);
|
CPrep_PushOption(OPT_OFFSET(min_struct_alignment), 1);
|
||||||
} else {
|
} else {
|
||||||
PPCError_Warning(161);
|
PPCError_Warning(161);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,118 +5,218 @@
|
||||||
#include "pref_structs.h"
|
#include "pref_structs.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
// "Could not get current working directory"
|
||||||
CLStr1 = 1,
|
CLStr1 = 1,
|
||||||
|
// "Cannot find my executable '%s'"
|
||||||
CLStr2 = 2,
|
CLStr2 = 2,
|
||||||
|
// "Could not initialize plugin '%s'"
|
||||||
CLStr3 = 3,
|
CLStr3 = 3,
|
||||||
|
// "The %s '%s' requires functionality not present in the command-line driver."
|
||||||
CLStr4 = 4,
|
CLStr4 = 4,
|
||||||
|
// "The command-line parser does not support these panels:"
|
||||||
CLStr5 = 5,
|
CLStr5 = 5,
|
||||||
|
// "\t%s\n"
|
||||||
CLStr6 = 6,
|
CLStr6 = 6,
|
||||||
|
// "Compiling function: '%s'"
|
||||||
CLStr7 = 7,
|
CLStr7 = 7,
|
||||||
|
// "Could not write file '%s'"
|
||||||
CLStr8 = 8,
|
CLStr8 = 8,
|
||||||
|
// "Could not write file '%s' in directory '%s'"
|
||||||
CLStr9 = 9,
|
CLStr9 = 9,
|
||||||
|
// "Write error on output (errno=%ld)"
|
||||||
CLStr10 = 10,
|
CLStr10 = 10,
|
||||||
|
// "Current working directory is too long"
|
||||||
CLStr11 = 11,
|
CLStr11 = 11,
|
||||||
|
// "Unknown filetype '%c%c%c%c', defaulting to '%s'"
|
||||||
CLStr12 = 12,
|
CLStr12 = 12,
|
||||||
|
// "%s:\ttype %s"
|
||||||
CLStr13 = 13,
|
CLStr13 = 13,
|
||||||
|
// "Storing output for '%s' in '%s'"
|
||||||
CLStr14 = 14,
|
CLStr14 = 14,
|
||||||
|
// "Writing text file '%s'"
|
||||||
CLStr15 = 15,
|
CLStr15 = 15,
|
||||||
|
// "Writing %sobject file '%s'"
|
||||||
CLStr16 = 16,
|
CLStr16 = 16,
|
||||||
|
// "Writing browse data '%s'"
|
||||||
CLStr17 = 17,
|
CLStr17 = 17,
|
||||||
|
// "Could not write %s '%s' (error %ld)"
|
||||||
CLStr18 = 18,
|
CLStr18 = 18,
|
||||||
|
// "Deleting temporary file '%s'"
|
||||||
CLStr19 = 19,
|
CLStr19 = 19,
|
||||||
|
// "Could not resolve alias for '%s' (error %ld)"
|
||||||
CLStr20 = 20,
|
CLStr20 = 20,
|
||||||
|
// "%s:\t'%s'%s"
|
||||||
CLStr21 = 21,
|
CLStr21 = 21,
|
||||||
|
// "File '%s' has browse fileID %d"
|
||||||
CLStr22 = 22,
|
CLStr22 = 22,
|
||||||
|
// "Can't locate directory '%s'"
|
||||||
CLStr23 = 23,
|
CLStr23 = 23,
|
||||||
|
// " %8.2f seconds to %s %s%s%s"
|
||||||
CLStr24 = 24,
|
CLStr24 = 24,
|
||||||
|
// " %8d lines compiled"
|
||||||
CLStr25 = 25,
|
CLStr25 = 25,
|
||||||
|
// " %8d %s code\n %8d %s init'd data\n %8d %s uninit'd data"
|
||||||
CLStr26 = 26,
|
CLStr26 = 26,
|
||||||
|
// " %8d total %s code\n %8d total %s init'd data\n %8d total %s uninit'd data"
|
||||||
CLStr27 = 27,
|
CLStr27 = 27,
|
||||||
|
// "File '%s' is not compilable source, target object data, or command file; ignoring"
|
||||||
CLStr28 = 28,
|
CLStr28 = 28,
|
||||||
|
// "All specified files were ignored"
|
||||||
CLStr29 = 29,
|
CLStr29 = 29,
|
||||||
|
// "Compiling: '%s'"
|
||||||
CLStr30 = 30,
|
CLStr30 = 30,
|
||||||
|
// "Compiling: '%s' with '%s'"
|
||||||
CLStr31 = 31,
|
CLStr31 = 31,
|
||||||
|
// "Precompiling: '%s'"
|
||||||
CLStr32 = 32,
|
CLStr32 = 32,
|
||||||
|
// "Precompiling: '%s' with '%s'"
|
||||||
CLStr33 = 33,
|
CLStr33 = 33,
|
||||||
|
// "Preprocessing: '%s'"
|
||||||
CLStr34 = 34,
|
CLStr34 = 34,
|
||||||
|
// "Preprocessing: '%s' with '%s'"
|
||||||
CLStr35 = 35,
|
CLStr35 = 35,
|
||||||
|
// "Finding dependencies: '%s'"
|
||||||
CLStr36 = 36,
|
CLStr36 = 36,
|
||||||
|
// "Finding dependencies: '%s' with '%s'"
|
||||||
CLStr37 = 37,
|
CLStr37 = 37,
|
||||||
|
// "Importing: '%s'"
|
||||||
CLStr38 = 38,
|
CLStr38 = 38,
|
||||||
|
// "Importing: '%s' with '%s'"
|
||||||
CLStr39 = 39,
|
CLStr39 = 39,
|
||||||
|
// "Linking project"
|
||||||
CLStr40 = 40,
|
CLStr40 = 40,
|
||||||
|
// "Linking project with '%s'"
|
||||||
CLStr41 = 41,
|
CLStr41 = 41,
|
||||||
|
// "Pre-linking project"
|
||||||
CLStr42 = 42,
|
CLStr42 = 42,
|
||||||
|
// "Pre-linking project with '%s'"
|
||||||
CLStr43 = 43,
|
CLStr43 = 43,
|
||||||
|
// "Post-linking project"
|
||||||
CLStr44 = 44,
|
CLStr44 = 44,
|
||||||
|
// "Post-linking project with '%s'"
|
||||||
CLStr45 = 45,
|
CLStr45 = 45,
|
||||||
|
// "Disassembling: '%s'"
|
||||||
CLStr46 = 46,
|
CLStr46 = 46,
|
||||||
|
// "Disassembling: '%s' with '%s'"
|
||||||
CLStr47 = 47,
|
CLStr47 = 47,
|
||||||
|
// "Syntax checking: '%s'"
|
||||||
CLStr48 = 48,
|
CLStr48 = 48,
|
||||||
|
// "Syntax checking: '%s' with '%s'"
|
||||||
CLStr49 = 49,
|
CLStr49 = 49,
|
||||||
|
// "Getting target info from '%s'"
|
||||||
CLStr50 = 50,
|
CLStr50 = 50,
|
||||||
|
// "Initializing '%s'"
|
||||||
CLStr51 = 51,
|
CLStr51 = 51,
|
||||||
|
// "Terminating '%s'"
|
||||||
CLStr52 = 52,
|
CLStr52 = 52,
|
||||||
|
// "'%s' cannot preprocess, skipping '%s'"
|
||||||
CLStr53 = 53,
|
CLStr53 = 53,
|
||||||
|
// "'%s' cannot precompile, skipping '%s'"
|
||||||
CLStr54 = 54,
|
CLStr54 = 54,
|
||||||
|
// "'%s' cannot generate code, skipping '%s'"
|
||||||
CLStr55 = 55,
|
CLStr55 = 55,
|
||||||
|
// "'%s' has no object code to disassemble"
|
||||||
CLStr56 = 56,
|
CLStr56 = 56,
|
||||||
|
// "'%s' cannot disassemble, skipping '%s'"
|
||||||
CLStr57 = 57,
|
CLStr57 = 57,
|
||||||
|
// "Neither '%s' nor '%s' can disassemble, skipping '%s'"
|
||||||
CLStr58 = 58,
|
CLStr58 = 58,
|
||||||
|
// "No precompiled header name given, '%s' assumed"
|
||||||
CLStr59 = 59,
|
CLStr59 = 59,
|
||||||
|
// "Precompile target '%s' given on command line; source-specified name '%s' ignored"
|
||||||
CLStr60 = 60,
|
CLStr60 = 60,
|
||||||
|
// "Writing precompiled %s file '%s'"
|
||||||
CLStr61 = 61,
|
CLStr61 = 61,
|
||||||
|
// "Reading precompiled %s file '%s'"
|
||||||
CLStr62 = 62,
|
CLStr62 = 62,
|
||||||
|
// "Cannot %s memory for %s"
|
||||||
CLStr63 = 63,
|
CLStr63 = 63,
|
||||||
|
// "Files/directories must have length <= %ld characters;\n'%s' not accepted"
|
||||||
CLStr64 = 64,
|
CLStr64 = 64,
|
||||||
|
// "Guessed linker name '%s' from compiler name '%s'"
|
||||||
CLStr65 = 65,
|
CLStr65 = 65,
|
||||||
|
// "Can't find %s '%s' in path"
|
||||||
CLStr66 = 66,
|
CLStr66 = 66,
|
||||||
|
// "Calling %s '%s'"
|
||||||
CLStr67 = 67,
|
CLStr67 = 67,
|
||||||
|
// "Can't execute %s '%s' (%s)"
|
||||||
CLStr68 = 68,
|
CLStr68 = 68,
|
||||||
|
// "%s '%s' returned with exit code %d"
|
||||||
CLStr69 = 69,
|
CLStr69 = 69,
|
||||||
|
// "Too many errors printed, aborting program"
|
||||||
CLStr70 = 70,
|
CLStr70 = 70,
|
||||||
|
// "Too many errors printed, suppressing errors for current file"
|
||||||
CLStr71 = 71,
|
CLStr71 = 71,
|
||||||
|
// "Too many warnings printed, suppressing warnings for current file"
|
||||||
CLStr72 = 72,
|
CLStr72 = 72,
|
||||||
|
// "No %s mapping matches '%s' (unrecognized file contents or filename extension); %s"
|
||||||
CLStr73 = 73,
|
CLStr73 = 73,
|
||||||
|
// "No plugin or target matches the file '%s', ignoring"
|
||||||
CLStr74 = 74,
|
CLStr74 = 74,
|
||||||
|
// "File '%s' cannot be handled by this tool, ignoring"
|
||||||
CLStr75 = 75,
|
CLStr75 = 75,
|
||||||
|
// "File '%s' does not match the active target"
|
||||||
CLStr76 = 76,
|
CLStr76 = 76,
|
||||||
|
// "Adding%s:\t'%s'"
|
||||||
CLStr77 = 77,
|
CLStr77 = 77,
|
||||||
|
// "Creating new overlay '%s' in group '%s'"
|
||||||
CLStr78 = 78,
|
CLStr78 = 78,
|
||||||
|
// "Creating new overlay group '%s' at addr %08X:%08X"
|
||||||
CLStr79 = 79,
|
CLStr79 = 79,
|
||||||
|
// "File '%s' cannot be added to overlay group; define an overlay in the group first"
|
||||||
CLStr80 = 80,
|
CLStr80 = 80,
|
||||||
|
// "Cannot create virtual export file '%s' (from '-export name,...')"
|
||||||
CLStr81 = 81,
|
CLStr81 = 81,
|
||||||
|
// "Too many %s defined; at most %d%s is allowed"
|
||||||
CLStr82 = 82,
|
CLStr82 = 82,
|
||||||
|
// "Loading preference panel '%s'"
|
||||||
CLStr83 = 83,
|
CLStr83 = 83,
|
||||||
|
// "%s:"
|
||||||
CLStr84 = 84,
|
CLStr84 = 84,
|
||||||
|
// "\t%s%s"
|
||||||
CLStr85 = 85,
|
CLStr85 = 85,
|
||||||
|
// "Already defined %s search path; '%s' added after other paths"
|
||||||
CLStr86 = 86,
|
CLStr86 = 86,
|
||||||
|
// "License check failed: %s"
|
||||||
CLStr87 = 87,
|
CLStr87 = 87,
|
||||||
|
// "The plugin '%s' (version '%s') cannot be used:\n%s"
|
||||||
CLStr88 = 88,
|
CLStr88 = 88,
|
||||||
|
// "Plugin '%s' has already been registered"
|
||||||
CLStr89 = 89,
|
CLStr89 = 89,
|
||||||
|
// "Preferences for '%s' have already been registered"
|
||||||
CLStr90 = 90,
|
CLStr90 = 90,
|
||||||
|
// "Preferences for '%s' not found"
|
||||||
CLStr91 = 91,
|
CLStr91 = 91,
|
||||||
|
// "Some preferences needed by the plugin '%s' have not been registered"
|
||||||
CLStr92 = 92,
|
CLStr92 = 92,
|
||||||
|
// "Could not load file '%s'"
|
||||||
CLStr93 = 93,
|
CLStr93 = 93,
|
||||||
|
// "Could not find change current working directory to '%s'"
|
||||||
CLStr94 = 94,
|
CLStr94 = 94,
|
||||||
|
// "Out of memory"
|
||||||
CLStr95 = 95,
|
CLStr95 = 95,
|
||||||
|
// "The tool did not produce any output while %s the file '%s'"
|
||||||
CLStr96 = 96,
|
CLStr96 = 96,
|
||||||
|
// "The filename '%s' is invalid"
|
||||||
CLStr97 = 97,
|
CLStr97 = 97,
|
||||||
|
// "The %slinker for this target was not found"
|
||||||
CLStr98 = 98,
|
CLStr98 = 98,
|
||||||
|
// "%s\n%s (OS error %d)"
|
||||||
CLStr99 = 99,
|
CLStr99 = 99,
|
||||||
|
// "%s\n%s (error %d)"
|
||||||
CLStr100 = 100,
|
CLStr100 = 100,
|
||||||
|
// "Note: '%s' did not generate any browse information \nfor '%s'; no browser output generated"
|
||||||
CLStr101 = 101,
|
CLStr101 = 101,
|
||||||
|
// "Source and specified output for the file '%s' are identical; no output will be generated"
|
||||||
CLStr102 = 102,
|
CLStr102 = 102,
|
||||||
|
// "More than one output filename specified for '%s'; ignoring '%s'"
|
||||||
CLStr103 = 103,
|
CLStr103 = 103,
|
||||||
|
// "Pref panel data for '%s' is out-of-date or invalid"
|
||||||
CLStr104 = 104,
|
CLStr104 = 104,
|
||||||
|
// "Changing primary user access path to '%s'"
|
||||||
CLStr105 = 105,
|
CLStr105 = 105,
|
||||||
|
// "The linker does not expect duplicate files; ignoring repeated '%s'"
|
||||||
CLStr106 = 106,
|
CLStr106 = 106,
|
||||||
CLStr107 = 107,
|
|
||||||
CLStr108 = 108,
|
|
||||||
CLStr109 = 109,
|
|
||||||
CLStr110 = 110,
|
|
||||||
CLStr111 = 111,
|
|
||||||
CLStr112 = 112
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DO_INTERNAL_ERROR(line, ...) CLInternalError(__FILE__, line, __VA_ARGS__)
|
#define DO_INTERNAL_ERROR(line, ...) CLInternalError(__FILE__, line, __VA_ARGS__)
|
||||||
|
@ -654,6 +754,13 @@ extern int StoreObjectFile(File *file);
|
||||||
extern int CompileFilesInProject(void);
|
extern int CompileFilesInProject(void);
|
||||||
extern int LinkProject(void);
|
extern int LinkProject(void);
|
||||||
|
|
||||||
|
/********************************/
|
||||||
|
/* CLFileTypes.c */
|
||||||
|
extern void AddFileTypeMappingList(OSFileTypeMappings **list, const OSFileTypeMappingList *entry);
|
||||||
|
extern void UseFileTypeMappings(OSFileTypeMappings *list);
|
||||||
|
extern OSErr SetMacFileType(const FSSpec *spec, OSType mactype);
|
||||||
|
extern OSErr GetMacFileType(const FSSpec *spec, OSType *mactype);
|
||||||
|
|
||||||
/********************************/
|
/********************************/
|
||||||
/* CLIncludeFileCache.c */
|
/* CLIncludeFileCache.c */
|
||||||
extern void InitializeIncludeCache(void);
|
extern void InitializeIncludeCache(void);
|
||||||
|
@ -738,13 +845,6 @@ extern int ExecuteLinker(Plugin *plugin, SInt32 dropinflags, File *file, char *s
|
||||||
extern int WriteObjectFile(File *file, OSType maccreator, OSType mactype);
|
extern int WriteObjectFile(File *file, OSType maccreator, OSType mactype);
|
||||||
extern int WriteBrowseData(File *file, OSType maccreator, OSType mactype);
|
extern int WriteBrowseData(File *file, OSType maccreator, OSType mactype);
|
||||||
|
|
||||||
/********************************/
|
|
||||||
/* Unknown name - provisionally named uFileTypeMappings.c */
|
|
||||||
extern void AddFileTypeMappingList(OSFileTypeMappings **list, const OSFileTypeMappingList *entry);
|
|
||||||
extern void UseFileTypeMappings(OSFileTypeMappings *list);
|
|
||||||
extern OSErr SetMacFileType(const FSSpec *spec, OSType mactype);
|
|
||||||
extern OSErr GetMacFileType(const FSSpec *spec, OSType *mactype);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,256 +0,0 @@
|
||||||
#include "compiler/common.h"
|
|
||||||
|
|
||||||
// THESE TYPES ARE NOT YET SORTED
|
|
||||||
#include "compiler/tokens.h"
|
|
||||||
#include "compiler/CompilerTools.h"
|
|
||||||
|
|
||||||
#ifdef __MWERKS__
|
|
||||||
#pragma options align=mac68k
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct MemInitializer {
|
|
||||||
MemInitializer *next;
|
|
||||||
union {
|
|
||||||
ENodeList *nodes;
|
|
||||||
ENode *expr;
|
|
||||||
} e;
|
|
||||||
union {
|
|
||||||
ObjMemberVar *ivar;
|
|
||||||
Type *type;
|
|
||||||
} u;
|
|
||||||
Boolean is_ivar;
|
|
||||||
Boolean is_expr;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
typedef enum DepNameType {
|
|
||||||
DNT_NAME,
|
|
||||||
DNT_CONVERSION,
|
|
||||||
DNT_DTOR,
|
|
||||||
DNT_NAMESPACE,
|
|
||||||
DNT_QUALNAME,
|
|
||||||
DNT_TEMPLATE,
|
|
||||||
DNT_TYPENAME
|
|
||||||
} DepNameType;
|
|
||||||
|
|
||||||
struct DepName {
|
|
||||||
DepName *next;
|
|
||||||
union {
|
|
||||||
HashNameNode *name;
|
|
||||||
NameSpace *nspace;
|
|
||||||
struct {
|
|
||||||
Type *type;
|
|
||||||
UInt32 qual;
|
|
||||||
} conv;
|
|
||||||
struct {
|
|
||||||
HashNameNode *name;
|
|
||||||
TemplArg *args;
|
|
||||||
} templ;
|
|
||||||
struct {
|
|
||||||
HashNameNode *name;
|
|
||||||
Type *type;
|
|
||||||
} tname;
|
|
||||||
} u;
|
|
||||||
DepNameType type;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef enum SubKind {
|
|
||||||
SUBKIND_NAMESPACE,
|
|
||||||
SUBKIND_TYPE,
|
|
||||||
SUBKIND_OBJECT
|
|
||||||
} SubKind;
|
|
||||||
|
|
||||||
typedef struct Substitution {
|
|
||||||
struct Substitution *next;
|
|
||||||
union {
|
|
||||||
NameSpace *nspace;
|
|
||||||
struct {
|
|
||||||
Type *type;
|
|
||||||
UInt32 qual;
|
|
||||||
} type;
|
|
||||||
Object *obj;
|
|
||||||
} u;
|
|
||||||
int id;
|
|
||||||
SubKind kind;
|
|
||||||
} Substitution;
|
|
||||||
|
|
||||||
// Registers.c
|
|
||||||
|
|
||||||
// RegisterInfo.c
|
|
||||||
|
|
||||||
// LOOSE DECLS
|
|
||||||
extern short high_offset;
|
|
||||||
extern short low_offset;
|
|
||||||
extern short high_reg;
|
|
||||||
extern short low_reg;
|
|
||||||
extern short high_reg2;
|
|
||||||
extern short low_reg2;
|
|
||||||
extern void PrecompilerRead(short refnum, void *buffer);
|
|
||||||
extern void PrecompilerWrite();
|
|
||||||
extern void CodeGen_InitCompiler();
|
|
||||||
extern void CodeGen_TermCompiler();
|
|
||||||
extern void CodeGen_InitBackEndOptions();
|
|
||||||
extern void CodeGen_UpdateOptimizerOptions();
|
|
||||||
extern void CodeGen_UpdateBackEndOptions();
|
|
||||||
extern void MWUnmangle(const char *name, char *buf, int size);
|
|
||||||
//extern COpts copts;
|
|
||||||
extern CParams *cparamblkptr;
|
|
||||||
extern FuncArg elipsis;
|
|
||||||
extern FuncArg oldstyle;
|
|
||||||
extern jmp_buf errorreturn;
|
|
||||||
extern Boolean cprep_nomem_exit;
|
|
||||||
extern Boolean anyerrors;
|
|
||||||
extern Boolean fatalerrors;
|
|
||||||
extern SInt32 lines;
|
|
||||||
extern char string[256];
|
|
||||||
extern TemplStack *ctempl_curinstance;
|
|
||||||
//extern ParserTryBlock *trychain;
|
|
||||||
extern Boolean in_assembler;
|
|
||||||
extern Boolean preprocessing_only;
|
|
||||||
extern void AssemblerError();
|
|
||||||
#include "compiler/types.h"
|
|
||||||
extern short tk;
|
|
||||||
extern HashNameNode *tkidentifier;
|
|
||||||
extern short lex();
|
|
||||||
extern short notendofline();
|
|
||||||
extern short lookahead();
|
|
||||||
extern Object *CClass_Constructor(TypeClass *tclass);
|
|
||||||
extern Object *CClass_Destructor(TypeClass *tclass);
|
|
||||||
extern int CClass_CheckPures(TypeClass *tclass);
|
|
||||||
extern Boolean CClass_IsConstructor(Object *func);
|
|
||||||
extern short CABI_GetStructResultArgumentIndex();
|
|
||||||
extern Boolean CParser_HasInternalLinkage(Object *obj);
|
|
||||||
extern HashNameNode *CParser_GetUniqueName();
|
|
||||||
extern SInt32 CParser_GetUniqueID();
|
|
||||||
extern Boolean CParserIsVolatileExpr(ENode *expr);
|
|
||||||
extern Boolean CParserIsConstExpr(ENode *expr);
|
|
||||||
extern Boolean CParser_IsPublicRuntimeObject(Object *obj);
|
|
||||||
extern Boolean CParser_ParseOperatorName(short *token, Boolean flag1, Boolean flag2);
|
|
||||||
extern Boolean CTemplTool_EqualArgs(TemplArg *a, TemplArg *b);
|
|
||||||
extern Boolean CTemplTool_IsTemplateArgumentDependentType(Type *type);
|
|
||||||
extern TypeTemplDep *CDecl_NewTemplDepType(TypeTemplDepType tdtype);
|
|
||||||
extern Type *CDecl_NewPointerType(Type *type);
|
|
||||||
extern Type *CDecl_NewStructType(SInt32 size, SInt32 align);
|
|
||||||
extern Type *CDecl_NewArrayType(Type *type, SInt32 num);
|
|
||||||
extern GList name_mangle_list;
|
|
||||||
extern void CPrep_UnLex();
|
|
||||||
extern Type *CTempl_ClassGetType(TypeClass *tclass);
|
|
||||||
//extern short is_typesame(Type *t1, Type *t2);
|
|
||||||
extern Boolean is_unsigned(Type *type);
|
|
||||||
extern void CDecl_CompleteType(Type *type);
|
|
||||||
extern TemplArg *CTempl_ParseUncheckTemplArgs(void *fixmelater, Boolean flag);
|
|
||||||
extern SInt32 CClass_VirtualBaseOffset(TypeClass *tclass, TypeClass *base);
|
|
||||||
extern Boolean CClass_IsMoreAccessiblePath(BClassList *a, BClassList *b);
|
|
||||||
extern Boolean CClass_ClassDominates(TypeClass *a, TypeClass *b);
|
|
||||||
extern Boolean CParser_CheckTemplateClassUsage(TemplClass *tmclass, Boolean flag);
|
|
||||||
extern Type *CTempl_ParseTemplTemplParam(Type *t);
|
|
||||||
extern void CClass_CheckPathAccess(BClassList *bcl, void *unk, AccessType access);
|
|
||||||
extern BClassList *CClass_GetPathCopy(BClassList *path, Boolean flag);
|
|
||||||
extern Object *CClass_ThisSelfObject();
|
|
||||||
extern AccessType global_access;
|
|
||||||
extern HashNameNode *this_name_node;
|
|
||||||
extern void CParser_Setup();
|
|
||||||
extern Boolean CParser_IsConst(Type *type, UInt32 qual);
|
|
||||||
extern void CParser_Cleanup();
|
|
||||||
extern void SetupPrecompiler(Boolean flag);
|
|
||||||
extern void CleanupPrecompiler();
|
|
||||||
extern void SetupAssembler();
|
|
||||||
extern void CleanupAssembler();
|
|
||||||
extern void ObjGen_Setup();
|
|
||||||
extern void ObjGen_Finish();
|
|
||||||
extern void ObjGen_Cleanup();
|
|
||||||
extern void ObjGen_CodeCleanup();
|
|
||||||
extern void ObjGen_DeclareFloatConst(Object *obj);
|
|
||||||
extern void ObjGen_DeclareVectorConst(Object *obj);
|
|
||||||
extern void ObjGen_DeclareCodeLabel(Object *labelobj, SInt32 offset, Object *funcobj);
|
|
||||||
extern Boolean ObjGen_IsExported(Object *obj);
|
|
||||||
extern void PointerAnalysis_Setup();
|
|
||||||
extern void PointerAnalysis_Cleanup();
|
|
||||||
extern Boolean CPrep_Preprocess();
|
|
||||||
extern void cparser();
|
|
||||||
extern void CBrowse_Setup(CParams *param);
|
|
||||||
extern void CBrowse_Finish(CParams *param);
|
|
||||||
extern void CBrowse_Cleanup(CParams *param);
|
|
||||||
extern UInt32 CParser_GetTypeQualifiers(Type *type, UInt32 qual);
|
|
||||||
extern void CTemplClass_RegisterUsingDecl(TemplClass *tclass, Type *target, AccessType access);
|
|
||||||
extern void CodeGen_InsertSpecialMacros();
|
|
||||||
extern void CPrep_PreprocessDumpFileInfo(Boolean flag);
|
|
||||||
extern void CPrep_PreprocessDumpNewLine();
|
|
||||||
extern Boolean gForceSourceLoc;
|
|
||||||
extern void ObjGen_SegmentName(); // might take an arg, not sure since it's empty
|
|
||||||
extern void ObjGen_SrcBreakName(HashNameNode *name, SInt32 modDate, Boolean flag);
|
|
||||||
extern char *precomp_target_str;
|
|
||||||
extern Object *CParser_ParseObject();
|
|
||||||
extern void PointerAnalysis_PragmaMode();
|
|
||||||
extern void CExcept_Terminate();
|
|
||||||
extern void CExcept_ArrayInit();
|
|
||||||
extern void CExcept_Magic();
|
|
||||||
extern void CSOM_PragmaReleaseOrder();
|
|
||||||
extern void CSOM_PragmaClassVersion();
|
|
||||||
extern void CSOM_PragmaMetaClass();
|
|
||||||
extern void CSOM_PragmaCallStyle();
|
|
||||||
extern short GetPrec(short t);
|
|
||||||
extern short localcount;
|
|
||||||
extern Boolean InlineAsm_gccmode;
|
|
||||||
extern void initialize_aliases();
|
|
||||||
extern Statement *current_statement;
|
|
||||||
extern int pclist_bad_operand;
|
|
||||||
extern int n_real_registers[];
|
|
||||||
extern short pic_base_reg;
|
|
||||||
extern Object pic_base;
|
|
||||||
extern ObjectList *exceptionlist;
|
|
||||||
extern ObjectList *arguments;
|
|
||||||
extern ObjectList *locals;
|
|
||||||
extern ObjectList *toclist;
|
|
||||||
extern Boolean uses_globals;
|
|
||||||
extern Boolean requires_frame;
|
|
||||||
extern void assign_locals_to_memory(ObjectList *locals);
|
|
||||||
extern PCodeLabel *pic_base_pcodelabel;
|
|
||||||
extern void *make_alias(Object *obj, SInt32 offset, SInt32 size);
|
|
||||||
extern Boolean is_volatile_object(Object *obj);
|
|
||||||
extern Boolean is_pascal_object(Object *obj);
|
|
||||||
extern Boolean local_is_16bit_offset(Object *obj);
|
|
||||||
extern Boolean can_add_displ_to_local(Object *obj, SInt32 displ);
|
|
||||||
extern int local_base_register(Object *obj);
|
|
||||||
extern int disable_optimizer;
|
|
||||||
extern Boolean IsTempName(HashNameNode *name);
|
|
||||||
extern void assign_local_memory(Object *obj);
|
|
||||||
extern void move_varargs_to_memory();
|
|
||||||
extern Type stvoid;
|
|
||||||
extern TypePointer void_ptr;
|
|
||||||
extern int countexceptionactionregisters(ExceptionAction *exc);
|
|
||||||
extern void noteexceptionactionregisters(ExceptionAction *exc, PCodeArg *);
|
|
||||||
extern void recordexceptionactions(PCode *pc, ExceptionAction *exc);
|
|
||||||
extern SInt32 functionbodyoffset;
|
|
||||||
extern Object *CParser_NewRTFunc(Type *returntype, HashNameNode *name, Boolean unkflag, int argcount, ...);
|
|
||||||
extern SInt32 curstmtvalue;
|
|
||||||
extern Object *__memcpy_object;
|
|
||||||
extern void CInit_RewriteString(ENode *expr, Boolean flag);
|
|
||||||
extern int is_intrinsic_function_call(ENode *expr);
|
|
||||||
extern SInt32 I8_log2n(SInt64 value);
|
|
||||||
extern void PPCError_Error(int code);
|
|
||||||
|
|
||||||
enum {
|
|
||||||
INTRINSIC_8 = 8,
|
|
||||||
INTRINSIC_35 = 35,
|
|
||||||
INTRINSIC_36 = 36
|
|
||||||
};
|
|
||||||
|
|
||||||
extern char *ScanFloat(char *input, double *output, Boolean *fail);
|
|
||||||
|
|
||||||
#ifdef __MWERKS__
|
|
||||||
#pragma options align=reset
|
|
||||||
#endif
|
|
|
@ -23,84 +23,161 @@ typedef struct {
|
||||||
} Pragma; // assumed name
|
} Pragma; // assumed name
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
CLPStr0 = 0,
|
// "Option missing"
|
||||||
CLPStr1 = 1,
|
CLPStr1 = 1,
|
||||||
|
// "Command-line argument '%.15s...%.15s' is much too long, maximum accepted length is %d characters"
|
||||||
CLPStr2 = 2,
|
CLPStr2 = 2,
|
||||||
|
// "Parameter for '%s' missing"
|
||||||
CLPStr3 = 3,
|
CLPStr3 = 3,
|
||||||
|
// "Numeric constant '%s' overflowed 32-bit range"
|
||||||
CLPStr4 = 4,
|
CLPStr4 = 4,
|
||||||
|
// "Invalid %sconstant '%s'"
|
||||||
CLPStr5 = 5,
|
CLPStr5 = 5,
|
||||||
|
// "Numeric constant %lu is out of the legal range %lu - %lu"
|
||||||
CLPStr6 = 6,
|
CLPStr6 = 6,
|
||||||
|
// "Numeric constant %lu is out of the legal range %lu - %lu; clipping to %lu"
|
||||||
CLPStr7 = 7,
|
CLPStr7 = 7,
|
||||||
|
// "Four-char type '%s' is too long, expected maximum four characters"
|
||||||
CLPStr8 = 8,
|
CLPStr8 = 8,
|
||||||
|
// "String constant '%.16s...%.16s' too long, expected maximum %ld characters"
|
||||||
CLPStr9 = 9,
|
CLPStr9 = 9,
|
||||||
|
// "Identifier '%s' cannot start with a digit"
|
||||||
CLPStr10 = 10,
|
CLPStr10 = 10,
|
||||||
|
// "Identifier '%s' cannot contain the character '%c'"
|
||||||
CLPStr11 = 11,
|
CLPStr11 = 11,
|
||||||
|
// "Expected 'on' or 'off', but got '%s'"
|
||||||
CLPStr12 = 12,
|
CLPStr12 = 12,
|
||||||
|
// "Filename or directory '...%32s' is too long, expected maximum %ld characters"
|
||||||
CLPStr13 = 13,
|
CLPStr13 = 13,
|
||||||
|
// "Directory '...%32s' combined with filename '...%32s' is too long, maximum path is %ld characters"
|
||||||
CLPStr14 = 14,
|
CLPStr14 = 14,
|
||||||
|
// "File '%s' does not exist"
|
||||||
CLPStr15 = 15,
|
CLPStr15 = 15,
|
||||||
|
// "'%s' is a directory or volume, filename expected"
|
||||||
CLPStr16 = 16,
|
CLPStr16 = 16,
|
||||||
|
// "'%s' does not refer to a directory"
|
||||||
CLPStr17 = 17,
|
CLPStr17 = 17,
|
||||||
|
// "File path '%s' not accepted\n(%s)"
|
||||||
CLPStr18 = 18,
|
CLPStr18 = 18,
|
||||||
|
// "Unknown option '%s'"
|
||||||
CLPStr19_UnknownOptionX = 19,
|
CLPStr19_UnknownOptionX = 19,
|
||||||
|
// "Unknown option '%s'; expected one of '%s'"
|
||||||
CLPStr20_UnknownOptionX_ExpectedOneOfX = 20,
|
CLPStr20_UnknownOptionX_ExpectedOneOfX = 20,
|
||||||
|
// "Option is obsolete"
|
||||||
CLPStr21_OptionObsolete = 21,
|
CLPStr21_OptionObsolete = 21,
|
||||||
|
// "Option is obsolete; %s"
|
||||||
CLPStr22_OptionObsoleteWithHelp = 22,
|
CLPStr22_OptionObsoleteWithHelp = 22,
|
||||||
|
// "Option '%s' substituted with %s"
|
||||||
CLPStr23_OptionXSubstitutedWithX = 23,
|
CLPStr23_OptionXSubstitutedWithX = 23,
|
||||||
|
// "Option deprecated; accepted this time"
|
||||||
CLPStr24_OptionDeprecated = 24,
|
CLPStr24_OptionDeprecated = 24,
|
||||||
|
// "Option deprecated, accepted this time; use '%s' instead"
|
||||||
CLPStr25_OptionDeprecatedWithHelp = 25,
|
CLPStr25_OptionDeprecatedWithHelp = 25,
|
||||||
|
// "Option ignored"
|
||||||
CLPStr26_OptionIgnored = 26,
|
CLPStr26_OptionIgnored = 26,
|
||||||
|
// "Option ignored;\n%s"
|
||||||
CLPStr27_OptionIgnoredWithText = 27,
|
CLPStr27_OptionIgnoredWithText = 27,
|
||||||
|
// "%s"
|
||||||
CLPStr28_WarningText = 28,
|
CLPStr28_WarningText = 28,
|
||||||
|
// "Option has no effect on this target"
|
||||||
CLPStr29_OptionHasNoEffect = 29,
|
CLPStr29_OptionHasNoEffect = 29,
|
||||||
|
// "Option should not be specified multiple times"
|
||||||
CLPStr30_OptionShouldNotBeSpecifiedMultipleTimes = 30,
|
CLPStr30_OptionShouldNotBeSpecifiedMultipleTimes = 30,
|
||||||
|
// "Option overrides the effect of '%s'; only one of '%s' should be specified"
|
||||||
CLPStr31_OptionOverridesEffect = 31,
|
CLPStr31_OptionOverridesEffect = 31,
|
||||||
|
// "Option overrides the effect of '%s'; only one of '%s' should be specified;\n%s"
|
||||||
CLPStr32_OptionOverridesEffectWithHelp = 32,
|
CLPStr32_OptionOverridesEffectWithHelp = 32,
|
||||||
|
// "No default handler set up for '%s', ignoring"
|
||||||
CLPStr33_NoDefaultHandlerSetUpForX_Ignoring = 33,
|
CLPStr33_NoDefaultHandlerSetUpForX_Ignoring = 33,
|
||||||
|
// "Argument(s) expected"
|
||||||
CLPStr34_ArgumentsExpected = 34,
|
CLPStr34_ArgumentsExpected = 34,
|
||||||
|
// "Token '%s' not expected"
|
||||||
CLPStr35_TokenXNotExpected = 35,
|
CLPStr35_TokenXNotExpected = 35,
|
||||||
|
// "Unexpected additional argument '%s'"
|
||||||
CLPStr36_UnexpectedAdditionalArgumentX = 36,
|
CLPStr36_UnexpectedAdditionalArgumentX = 36,
|
||||||
|
// "Encountered extraneous arguments"
|
||||||
CLPStr37 = 37,
|
CLPStr37 = 37,
|
||||||
|
// "No help available for option '%s'"
|
||||||
CLPStr38_NoHelpAvailableForOptionX = 38,
|
CLPStr38_NoHelpAvailableForOptionX = 38,
|
||||||
|
// "Empty (zero-length) argument not accepted"
|
||||||
CLPStr39 = 39,
|
CLPStr39 = 39,
|
||||||
|
// "Variable name missing"
|
||||||
CLPStr40 = 40,
|
CLPStr40 = 40,
|
||||||
|
// "Only one output filename allowed; '%s' not accepted"
|
||||||
CLPStr41 = 41,
|
CLPStr41 = 41,
|
||||||
|
// "Output filenames found without source; '%s' not accepted"
|
||||||
CLPStr42 = 42,
|
CLPStr42 = 42,
|
||||||
|
// "Multiple outputs expected, output is ambiguous; '%s' not accepted"
|
||||||
CLPStr43 = 43,
|
CLPStr43 = 43,
|
||||||
|
// "Specified file '%s' not found"
|
||||||
CLPStr44 = 44,
|
CLPStr44 = 44,
|
||||||
|
// "Specified directory '%s' not found"
|
||||||
CLPStr45 = 45,
|
CLPStr45 = 45,
|
||||||
|
// "'%s' is a filename, not a directory; not accepted"
|
||||||
CLPStr46 = 46,
|
CLPStr46 = 46,
|
||||||
|
// "'%s' is a directory, not a filename; not accepted"
|
||||||
CLPStr47 = 47,
|
CLPStr47 = 47,
|
||||||
|
// "Library search found shared library '%s' instead of export library '%s.LIB'"
|
||||||
CLPStr48 = 48,
|
CLPStr48 = 48,
|
||||||
|
// "No library file found matching 'lib%s{%s}' or '%s'"
|
||||||
CLPStr49 = 49,
|
CLPStr49 = 49,
|
||||||
|
// "Redudant use of '%c%s%s'; linker always searches library paths;\ntypically one finds, e.g., libXXX.a with '%c%sXXX'"
|
||||||
CLPStr50 = 50,
|
CLPStr50 = 50,
|
||||||
|
// "Empty filename in library list ignored"
|
||||||
CLPStr51 = 51,
|
CLPStr51 = 51,
|
||||||
|
// "Environment variable '%s' not found"
|
||||||
CLPStr52 = 52,
|
CLPStr52 = 52,
|
||||||
|
// "In environment variable '%s':"
|
||||||
CLPStr53 = 53,
|
CLPStr53 = 53,
|
||||||
|
// "Option name expected for 'opt'"
|
||||||
CLPStr54 = 54,
|
CLPStr54 = 54,
|
||||||
|
// "Token '%s' ignored"
|
||||||
CLPStr55 = 55,
|
CLPStr55 = 55,
|
||||||
|
// "Token '%s[...%s]' was truncated to %d characters"
|
||||||
CLPStr56 = 56,
|
CLPStr56 = 56,
|
||||||
|
// "Expected %s, but got %s"
|
||||||
CLPStr57 = 57,
|
CLPStr57 = 57,
|
||||||
|
// "No output expected from this process, ignoring output name '%s'"
|
||||||
CLPStr58 = 58,
|
CLPStr58 = 58,
|
||||||
|
// "Only one output directory allowed, '%s' not accepted"
|
||||||
CLPStr59 = 59,
|
CLPStr59 = 59,
|
||||||
|
// "Storing browse info for '%s' in '%s'"
|
||||||
CLPStr60 = 60,
|
CLPStr60 = 60,
|
||||||
|
// "All linker output will be created in the same directory; ignoring path for '%s'"
|
||||||
CLPStr61 = 61,
|
CLPStr61 = 61,
|
||||||
|
// "Option overrides previously specified optimizations"
|
||||||
CLPStr62 = 62,
|
CLPStr62 = 62,
|
||||||
|
// "Could not initialize command line parser"
|
||||||
CLPStr63 = 63,
|
CLPStr63 = 63,
|
||||||
|
// "Output filename '%s' is invalid"
|
||||||
CLPStr64 = 64,
|
CLPStr64 = 64,
|
||||||
|
// "Truncated output filename '%s' to %d characters"
|
||||||
CLPStr65 = 65,
|
CLPStr65 = 65,
|
||||||
|
// "Output directory '%s' cannot be found"
|
||||||
CLPStr66 = 66,
|
CLPStr66 = 66,
|
||||||
|
// "Cannot add access path '%s'"
|
||||||
CLPStr67 = 67,
|
CLPStr67 = 67,
|
||||||
|
// "Cannot set preferences for '%s'"
|
||||||
CLPStr68 = 68,
|
CLPStr68 = 68,
|
||||||
|
// "Some of the files specified could not be found; build aborted"
|
||||||
CLPStr69 = 69,
|
CLPStr69 = 69,
|
||||||
|
// "Nothing to do: no source or object files specified"
|
||||||
CLPStr70 = 70,
|
CLPStr70 = 70,
|
||||||
|
// "Contents of %s:"
|
||||||
CLPStr71 = 71,
|
CLPStr71 = 71,
|
||||||
|
// "Overlays not supported on this target"
|
||||||
CLPStr72 = 72,
|
CLPStr72 = 72,
|
||||||
|
// "Segments not supported on this target"
|
||||||
CLPStr73 = 73,
|
CLPStr73 = 73,
|
||||||
|
// "Cannot open %s file '%s'"
|
||||||
CLPStr74 = 74,
|
CLPStr74 = 74,
|
||||||
|
// ""
|
||||||
CLPStr75 = 75,
|
CLPStr75 = 75,
|
||||||
|
// "The file \"%s\" may be ignored unless it has one of the following\nextensions: \"%s\""
|
||||||
CLPStr76 = 76,
|
CLPStr76 = 76,
|
||||||
|
// "Not using non-text file '%s' as optional argument"
|
||||||
CLPStr77 = 77,
|
CLPStr77 = 77,
|
||||||
|
// "Cannot redirect stream to '%s' (%s)"
|
||||||
CLPStr78 = 78
|
CLPStr78 = 78
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
5
notes
5
notes
|
@ -1,5 +1,10 @@
|
||||||
|
OS X:
|
||||||
~/bin/mwccppc -c -g -opt l=4,noschedule,speed -enum min -Iincludes -Isdk_hdrs -w all,nounused -wchar_t on -bool off -Cpp_exceptions off
|
~/bin/mwccppc -c -g -opt l=4,noschedule,speed -enum min -Iincludes -Isdk_hdrs -w all,nounused -wchar_t on -bool off -Cpp_exceptions off
|
||||||
|
|
||||||
|
OS 9:
|
||||||
|
export MWCIncludes="/Users/ash/src/mwcc/native_copy/msl_c_pro7/MSL_Common/Include;/Users/ash/src/mwcc/native_copy/msl_c_pro7/MSL_MacOS/Include"
|
||||||
|
wine ../reversing/v7_0_mwcppc.exe -g -opt l=4,speed -enum min -Iincludes -Isdk_hdrs -w all,nounused,notinlined -wchar_t on -bool off -Cpp_exceptions off -maxwarnings 10
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- locate COS stuff based off EPPC 8 debug info
|
- locate COS stuff based off EPPC 8 debug info
|
||||||
- command_line/C++_Parser/Src/Library/OptimizerHelpers.c
|
- command_line/C++_Parser/Src/Library/OptimizerHelpers.c
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1,50 @@
|
||||||
/*
* CWPluginErrors.h - CW_Result constants for plugin errors
*
* Copyright © 1995-1997 Metrowerks, Inc. All rights reserved.
*
*/
#ifndef __CWPluginErrors_H__
#define __CWPluginErrors_H__
#ifdef __MWERKS__
# pragma once
#endif
enum
{
// common errors for all plugins
cwNoErr, /* successful return */
cwErrUserCanceled, /* operation canceled by user */
cwErrRequestFailed, /* generic failure when plugin fails */
cwErrInvalidParameter, /* one or more callback parameters invalid */
cwErrInvalidCallback, /* invalid given current request and plugin type*/
cwErrInvalidMPCallback, /* this request is not support from MP threads */
cwErrOSError, /* OS-specific, call CWGetCallbackOSError() */
cwErrOutOfMemory, /* not enough memory */
cwErrFileNotFound, /* file not found on disk */
cwErrUnknownFile, /* bad file number, doesn't exist */
cwErrSilent, /* request failed but plugin didn't report any */
/* errors and doesn't want IDE to report that */
/* an unknown error occurred */
cwErrCantSetAttribute, /* plugin requested inapplicable file flags in */
/* CWAddProjectEntry */
cwErrStringBufferOverflow, /* an output string buffer was too small */
cwErrDirectoryNotFound, /* unable to find a directory being sought */
cwErrLastCommonError = 512,
// compiler/linker errors
cwErrUnknownSegment, /* bad segment number, doesn't exist */
cwErrSBMNotFound, /* */
cwErrObjectFileNotStored, /* No external object file has been stored */
cwErrLicenseCheckFailed,/* license check failed, error reported by IDE */
cwErrFileSpecNotSpecified, /* a file spec was unspecified */
cwErrFileSpecInvalid, /* a file spec was invalid */
cwErrLastCompilerLinkerError = 1024
};
#endif // __CWPluginErrors_H__
|
/*
|
||||||
|
* CWPluginErrors.h - CW_Result constants for plugin errors
|
||||||
|
*
|
||||||
|
* Copyright <EFBFBD> 1995-1997 Metrowerks, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __CWPluginErrors_H__
|
||||||
|
#define __CWPluginErrors_H__
|
||||||
|
|
||||||
|
#ifdef __MWERKS__
|
||||||
|
# pragma once
|
||||||
|
#endif
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
// common errors for all plugins
|
||||||
|
|
||||||
|
cwNoErr, /* successful return */
|
||||||
|
cwErrUserCanceled, /* operation canceled by user */
|
||||||
|
cwErrRequestFailed, /* generic failure when plugin fails */
|
||||||
|
cwErrInvalidParameter, /* one or more callback parameters invalid */
|
||||||
|
cwErrInvalidCallback, /* invalid given current request and plugin type*/
|
||||||
|
cwErrInvalidMPCallback, /* this request is not support from MP threads */
|
||||||
|
cwErrOSError, /* OS-specific, call CWGetCallbackOSError() */
|
||||||
|
cwErrOutOfMemory, /* not enough memory */
|
||||||
|
cwErrFileNotFound, /* file not found on disk */
|
||||||
|
cwErrUnknownFile, /* bad file number, doesn't exist */
|
||||||
|
cwErrSilent, /* request failed but plugin didn't report any */
|
||||||
|
/* errors and doesn't want IDE to report that */
|
||||||
|
/* an unknown error occurred */
|
||||||
|
cwErrCantSetAttribute, /* plugin requested inapplicable file flags in */
|
||||||
|
/* CWAddProjectEntry */
|
||||||
|
cwErrStringBufferOverflow, /* an output string buffer was too small */
|
||||||
|
cwErrDirectoryNotFound, /* unable to find a directory being sought */
|
||||||
|
cwErrLastCommonError = 512,
|
||||||
|
|
||||||
|
// compiler/linker errors
|
||||||
|
|
||||||
|
cwErrUnknownSegment, /* bad segment number, doesn't exist */
|
||||||
|
cwErrSBMNotFound, /* */
|
||||||
|
cwErrObjectFileNotStored, /* No external object file has been stored */
|
||||||
|
cwErrLicenseCheckFailed,/* license check failed, error reported by IDE */
|
||||||
|
cwErrFileSpecNotSpecified, /* a file spec was unspecified */
|
||||||
|
cwErrFileSpecInvalid, /* a file spec was invalid */
|
||||||
|
cwErrLastCompilerLinkerError = 1024
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __CWPluginErrors_H__
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
/*
* CWUnixPluginPrefix.h
*
* Copyright © 1999 Metrowerks, Inc. All rights reserved.
*
*/
#ifndef MW_CWUnixPluginPrefix_H
#define MW_CWUnixPluginPrefix_H
#define CW_USE_PRAGMA_EXPORT 0
#include "CWRuntimeFeatures.h"
#ifdef __MWERKS__
#if !__option(bool)
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif
#endif
#endif
#endif /* MW_CWUnixPluginPrefix_H */
|
|
|
@ -1 +0,0 @@
|
||||||
#include <Win32Headers.mch>
#ifndef WIN32
#define WIN32 1
#endif
#define CW_USE_PRAGMA_EXPORT 0
#ifdef __MWERKS__
#if !__option(bool)
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif
#endif
#endif
|
|
|
@ -1 +0,0 @@
|
||||||
#ifndef __CATTYPES_H__
#define __CATTYPES_H__
typedef int CatNodeID;
#define NODE_NULL -1
#define NODE_ROOT 0
#define kCatalogClass "CodeWarrior.CatalogModelObject"
#define kFolderClass "CodeWarrior.FolderModelObject"
#define kTrashNodeClass "CodeWarrior.TrashNode"
// internal properties used in the catalog
#define kContentsFolder "ContentsFolder"
#define kClass "Class"
#define kComments "Comments"
#define kFile "File"
#define kNodeLocked "Locked"
#define kModDate "Modified"
#define kName "Name"
#define kID "ID"
#define kFolderSuffix "_Contents"
#define kDefCatalogExt "ctlg"
#define kDefCatalogFolderExt "ctlgf"
// Command group ID for commands in the catalog menu...
const long cmdGroup_CatalogMenu = 10000;
// catalog-specific menu commands to go with those defined by the IDE;
// such as cmd_Cut, cmd_Copy, etc.
const long cmd_CatalogRename = 10000; // plugin commands in the range 10000-10999
const long cmd_CatalogProperties = 10001;
const long cmd_ShowCatalogBrowser = 10002;
const long cmd_ShowCatalogPalette = 10003;
const long cmd_NewCatalog = 10004;
const long cmd_NewFolder = 10005;
const long cmd_OpenCatalog = 10006;
const long cmd_CloseCatalog = 10007;
const long cmd_ImportControls = 10008;
const long cmd_ShowPrevious = 10009;
const long cmd_ShowNext = 10010;
const long cmd_ExpandIndexView = 10011;
const long cmd_CollapseIndexView = 10012;
const long cmd_ToggleIndexView = 10013;
const long cmd_CloseCatalogPalette = 10014;
enum UPDATE_TYPE
{
UPDATE_NONE = 0,
UPDATE_CHILDREN,
UPDATE_DESCENDANTS
};
enum CatTransType
{
CATTRANS_TYPE_UNKNOWN,
CATTRANS_TYPE_ALIAS,
CATTRANS_TYPE_COPY,
CATTRANS_TYPE_DELETE,
CATTRANS_TYPE_DROP,
CATTRANS_TYPE_EDITPROPERTIES,
CATTRANS_TYPE_LOCK,
CATTRANS_TYPE_MOVE,
CATTRANS_TYPE_PASTE,
CATTRANS_TYPE_RENAME,
CATTRANS_TYPE_UNLOCK
};
struct CatWindowData
{
bool fUseDefSize;
bool fUseDefPos;
SIZE size;
POINT pos;
CatWindowData() : fUseDefSize(true), fUseDefPos(true)
{
pos.x = pos.y = 0;
size.cx = size.cy = 0;
}
};
#endif // __CATTYPES_H__
|
|
|
@ -1 +1,138 @@
|
||||||
/*
* CompilerMapping.h - File Type & Extension => Compiler Mapping for Metrowerks CodeWarrior<6F>
*
* Copyright <20> 1995 Metrowerks, Inc. All rights reserved.
*
*/
#ifndef __COMPILERMAPPING_H__
#define __COMPILERMAPPING_H__
#ifdef __MWERKS__
# pragma once
#endif
#ifndef __CWPLUGINS_H__
#include "CWPlugins.h"
#endif
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
#ifdef _MSC_VER
#pragma pack(push,2)
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
const CWDataType Lang_C_CPP = CWFOURCHAR('c','+','+',' ');
const CWDataType Lang_Pascal = CWFOURCHAR('p','a','s','c');
const CWDataType Lang_Rez = CWFOURCHAR('r','e','z',' ');
const CWDataType Lang_Java = CWFOURCHAR('j','a','v','a');
const CWDataType Lang_MISC = CWFOURCHAR('\?','\?','\?','\?');
#else
#define Lang_C_CPP CWFOURCHAR('c','+','+',' ')
#define Lang_Pascal CWFOURCHAR('p','a','s','c')
#define Lang_Rez CWFOURCHAR('r','e','z',' ')
#define Lang_Java CWFOURCHAR('j','a','v','a')
#define Lang_MISC CWFOURCHAR('\?','\?','\?','\?')
#endif
/* Compiler flags, as used in member dropinflags of struct DropInFlags returned by compilers */
enum
{
kGeneratescode = 1L << 31, /* this compiler generates code */
kGeneratesrsrcs = 1L << 30, /* this compiler generates resources */
kCanpreprocess = 1L << 29, /* this compiler can accept a Preprocess request */
kCanprecompile = 1L << 28, /* this compiler can accept a Precompile request */
kIspascal = 1L << 27, /* this is the pascal compiler */
kCanimport = 1L << 26, /* this compiler needs the "Import Weak" popup */
kCandisassemble = 1L << 25, /* this compiler can disassemble */
kPersistent = 1L << 24, /* keep the compiler resident except on context switches*/
kCompAllowDupFileNames = 1L << 23, /* allow multiple project files with the same name */
kCompMultiTargAware = 1L << 22, /* the compiler can be used with multiple targets */
kIsMPAware = 1L << 21, /* the compiler can be run in an MP thread */
kCompUsesTargetStorage = 1L << 20, /* the compiler keeps storage per target */
kCompEmitsOwnBrSymbols = 1L << 19, /* browser info includes compiler-specific symbols */
kCompAlwaysReload = 1L << 18, /* always reload the compiler before request */
kCompRequiresProjectBuildStartedMsg = 1L << 17, /* Compiler listens for project build started messages */
kCompRequiresTargetBuildStartedMsg = 1L << 16, /* Compiler listens for target build started messages */
kCompRequiresSubProjectBuildStartedMsg = 1L << 15, /* Compiler listens for Sub project build started messages */
kCompRequiresFileListBuildStartedMsg = 1L << 14, /* Compiler listens for filelist build started messages */
kCompReentrant = 1L << 13, /* Compiler can use re-entrant DropIn and is re-entry safe */
kCompSavesDbgPreprocess = 1 << 12, /* Compiler will save preprocessed files for debugging needs */
kCompRequiresTargetCompileStartedMsg = 1 << 11 /* Compiler listens for target compile started/ended messages */
/* remaining flags are reserved for future use and should be zero-initialized */
};
/* Compiler mapping flags, used in CompilerMapping.flags & CWExtensionMapping.flags */
typedef unsigned long CompilerMappingFlags;
enum
{
kPrecompile = 1L << 31, /* should this file type be Precompiled? */
kLaunchable = 1L << 30, /* can this file type be double-clicked on? */
kRsrcfile = 1L << 29, /* does this file type contain resources for linking? */
kIgnored = 1L << 28 /* should files of this type be ignored during Make? */
/* remaining flags are reserved for future use and should be zero-initialized */
};
/* Format of data in 'EMap' resource, or as returned by a compiler's */
/* GetExtensionMapping entry point */
typedef struct CWExtensionMapping {
CWDataType type; /* MacOS file type, e.g. 'TEXT' or 0 */
char extension[32]; /* file extension, e.g. .c/.cp/.pch or "" */
CompilerMappingFlags flags; /* see above */
} CWExtensionMapping;
#define kCurrentCWExtMapListVersion 1
#define kCurrentCWExtMapListResourceVersion 1
typedef struct CWExtMapList {
short version;
short nMappings;
CWExtensionMapping* mappings;
} CWExtMapList;
/* Format of data returned by GetTargetList entry point */
#define kCurrentCWTargetListVersion 1
#define kCurrentCWTargetListResourceVersion 1
typedef struct CWTypeList {
short count;
CWDataType items[1];
} CW_CPUList, CW_OSList;
typedef struct CWTargetList {
short version;
short cpuCount;
CWDataType* cpus;
short osCount;
CWDataType* oss;
} CWTargetList;
typedef struct CWTargetListResource {
short version;
CW_CPUList cpus;
CW_OSList oss;
} CWTargetListResource;
#ifdef __cplusplus
}
#endif
#ifdef _MSC_VER
#pragma pack(pop,2)
#endif
#ifdef __MWERKS__
#pragma options align=reset
#endif
#endif /* __COMPILERMAPPING_H__ */
|
/*
|
||||||
|
* CompilerMapping.h - File Type & Extension => Compiler Mapping for Metrowerks CodeWarrior<EFBFBD>
|
||||||
|
*
|
||||||
|
* Copyright <EFBFBD> 1995 Metrowerks, Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __COMPILERMAPPING_H__
|
||||||
|
#define __COMPILERMAPPING_H__
|
||||||
|
|
||||||
|
#ifdef __MWERKS__
|
||||||
|
# pragma once
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __CWPLUGINS_H__
|
||||||
|
#include "CWPlugins.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __MWERKS__
|
||||||
|
#pragma options align=mac68k
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma pack(push,2)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
const CWDataType Lang_C_CPP = CWFOURCHAR('c','+','+',' ');
|
||||||
|
const CWDataType Lang_Pascal = CWFOURCHAR('p','a','s','c');
|
||||||
|
const CWDataType Lang_Rez = CWFOURCHAR('r','e','z',' ');
|
||||||
|
const CWDataType Lang_Java = CWFOURCHAR('j','a','v','a');
|
||||||
|
const CWDataType Lang_MISC = CWFOURCHAR('\?','\?','\?','\?');
|
||||||
|
#else
|
||||||
|
#define Lang_C_CPP CWFOURCHAR('c','+','+',' ')
|
||||||
|
#define Lang_Pascal CWFOURCHAR('p','a','s','c')
|
||||||
|
#define Lang_Rez CWFOURCHAR('r','e','z',' ')
|
||||||
|
#define Lang_Java CWFOURCHAR('j','a','v','a')
|
||||||
|
#define Lang_MISC CWFOURCHAR('\?','\?','\?','\?')
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Compiler flags, as used in member dropinflags of struct DropInFlags returned by compilers */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
kGeneratescode = 1L << 31, /* this compiler generates code */
|
||||||
|
kGeneratesrsrcs = 1L << 30, /* this compiler generates resources */
|
||||||
|
kCanpreprocess = 1L << 29, /* this compiler can accept a Preprocess request */
|
||||||
|
kCanprecompile = 1L << 28, /* this compiler can accept a Precompile request */
|
||||||
|
kIspascal = 1L << 27, /* this is the pascal compiler */
|
||||||
|
kCanimport = 1L << 26, /* this compiler needs the "Import Weak" popup */
|
||||||
|
kCandisassemble = 1L << 25, /* this compiler can disassemble */
|
||||||
|
kPersistent = 1L << 24, /* keep the compiler resident except on context switches*/
|
||||||
|
kCompAllowDupFileNames = 1L << 23, /* allow multiple project files with the same name */
|
||||||
|
kCompMultiTargAware = 1L << 22, /* the compiler can be used with multiple targets */
|
||||||
|
kIsMPAware = 1L << 21, /* the compiler can be run in an MP thread */
|
||||||
|
kCompUsesTargetStorage = 1L << 20, /* the compiler keeps storage per target */
|
||||||
|
kCompEmitsOwnBrSymbols = 1L << 19, /* browser info includes compiler-specific symbols */
|
||||||
|
kCompAlwaysReload = 1L << 18, /* always reload the compiler before request */
|
||||||
|
kCompRequiresProjectBuildStartedMsg = 1L << 17, /* Compiler listens for project build started messages */
|
||||||
|
kCompRequiresTargetBuildStartedMsg = 1L << 16, /* Compiler listens for target build started messages */
|
||||||
|
kCompRequiresSubProjectBuildStartedMsg = 1L << 15, /* Compiler listens for Sub project build started messages */
|
||||||
|
kCompRequiresFileListBuildStartedMsg = 1L << 14, /* Compiler listens for filelist build started messages */
|
||||||
|
kCompReentrant = 1L << 13, /* Compiler can use re-entrant DropIn and is re-entry safe */
|
||||||
|
kCompSavesDbgPreprocess = 1 << 12, /* Compiler will save preprocessed files for debugging needs */
|
||||||
|
kCompRequiresTargetCompileStartedMsg = 1 << 11 /* Compiler listens for target compile started/ended messages */
|
||||||
|
/* remaining flags are reserved for future use and should be zero-initialized */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Compiler mapping flags, used in CompilerMapping.flags & CWExtensionMapping.flags */
|
||||||
|
typedef unsigned long CompilerMappingFlags;
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
kPrecompile = 1L << 31, /* should this file type be Precompiled? */
|
||||||
|
kLaunchable = 1L << 30, /* can this file type be double-clicked on? */
|
||||||
|
kRsrcfile = 1L << 29, /* does this file type contain resources for linking? */
|
||||||
|
kIgnored = 1L << 28 /* should files of this type be ignored during Make? */
|
||||||
|
/* remaining flags are reserved for future use and should be zero-initialized */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Format of data in 'EMap' resource, or as returned by a compiler's */
|
||||||
|
/* GetExtensionMapping entry point */
|
||||||
|
|
||||||
|
typedef struct CWExtensionMapping {
|
||||||
|
CWDataType type; /* MacOS file type, e.g. 'TEXT' or 0 */
|
||||||
|
char extension[32]; /* file extension, e.g. .c/.cp/.pch or "" */
|
||||||
|
CompilerMappingFlags flags; /* see above */
|
||||||
|
} CWExtensionMapping;
|
||||||
|
|
||||||
|
#define kCurrentCWExtMapListVersion 1
|
||||||
|
#define kCurrentCWExtMapListResourceVersion 1
|
||||||
|
|
||||||
|
typedef struct CWExtMapList {
|
||||||
|
short version;
|
||||||
|
short nMappings;
|
||||||
|
CWExtensionMapping* mappings;
|
||||||
|
} CWExtMapList;
|
||||||
|
|
||||||
|
/* Format of data returned by GetTargetList entry point */
|
||||||
|
|
||||||
|
#define kCurrentCWTargetListVersion 1
|
||||||
|
#define kCurrentCWTargetListResourceVersion 1
|
||||||
|
|
||||||
|
typedef struct CWTypeList {
|
||||||
|
short count;
|
||||||
|
CWDataType items[1];
|
||||||
|
} CW_CPUList, CW_OSList;
|
||||||
|
|
||||||
|
typedef struct CWTargetList {
|
||||||
|
short version;
|
||||||
|
short cpuCount;
|
||||||
|
CWDataType* cpus;
|
||||||
|
short osCount;
|
||||||
|
CWDataType* oss;
|
||||||
|
} CWTargetList;
|
||||||
|
|
||||||
|
typedef struct CWTargetListResource {
|
||||||
|
short version;
|
||||||
|
CW_CPUList cpus;
|
||||||
|
CW_OSList oss;
|
||||||
|
} CWTargetListResource;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma pack(pop,2)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __MWERKS__
|
||||||
|
#pragma options align=reset
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __COMPILERMAPPING_H__ */
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
/*
DropInPanelWin32.h
This is the old name for the file that is now called CWDropInPanel.h.
It is here for backward compatibility with older panels. New panels
should include CWDropInPanel.h instead.
*/
#ifndef __DROPINPANELWIN32_H__
#define __DROPINPANELWIN32_H__
#include "CWDropInPanel.h"
#endif
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
/*
* MWBrowse.h
*
* Copyright © 1993-96 Metrowerks, Inc. All rights reserved.
*
* Types and constants needed for emitting CodeWarrior
* browse information.
*/
#ifndef __MWBROWSE_H__
#define __MWBROWSE_H__
#ifdef __MWERKS__
#pragma once
#endif
#include "MWLangDefs.h"
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
#ifdef _MSC_VER
#pragma pack(push,2)
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define BROWSE_HEADER 0xBEABBAEB
#define BROWSE_VERSION 2
#define BROWSE_EARLIEST_COMPATIBLE_VERSION 2
typedef struct BrowseHeader {
long browse_header; // always set to BROWSE_HEADER
long browse_version; // always set to BROWSE_VERSION
short browse_language; // the language of this translation unit, enum ELanguage
short uses_name_table; // TRUE: uses name table from CW object code
long earliest_compatible_version;// always set to BROWSE_EARLIEST_COMPATIBLE_VERSION
long reserved[15]; // for future extensions
} BrowseHeader;
typedef unsigned char EBrowserItem;
enum {
browseFunction, // function, procedure, or method
browseGlobal, // global variable
browseClass, // class, struct, or union
browseMacro, // macro
browseEnum, // enum, enumerated type member
browseTypedef, // user-defined type other than class
browseConstant, // constant value
browseTemplate, // C++ template
browsePackage, // Java package
browseCompSymbolStart = 0x70,
browseEnd = 0xFF // used to denote end-of-list
};
// flag constants for functions, member functions, data members
enum
{
kAbstract = 1, // abstract/pure virtual
kStatic = 2, // static member
kFinal = 4, // final Java class, method, or data member
kMember = 8, // item is a class member
// reserve flags 0x10, 0x20, and 0x40 for other general flags
// flags specific to classes
kInterface = 0x80, // class is Java interface
kPublic = 0x100, // class is public Java class
// flags specific to functions and member functions
kInline = 0x80, // inline function
kPascal = 0x100, // pascal function
kAsm = 0x200, // asm function
kVirtual = 0x400, // virtual member function
kCtor = 0x800, // is constructor
kDtor = 0x1000, // is destructor
kNative = 0x2000, // native Java method
kSynch = 0x4000, // synchronized Java method
kIntrinsic = 0x8000, // intrinsic routine (for General Magic)
kConst = 0x10000, // const function
// flags specific to data members
kTransient = 0x80, // transient Java data member
kVolatile = 0x100 // volatile Java data member
};
typedef enum EAccess
{ // can be used as mask values
accessNone = 0,
accessPrivate = 1,
accessProtected = 2,
accessPublic = 4,
accessAll = accessPrivate+accessProtected+accessPublic
} EAccess;
typedef unsigned char EMember;
enum
{
memberFunction, // member function/method
memberData, // data member/field
memberEnd = 0xFF // denotes end-of-list
};
typedef enum ETemplateType
{ // templates are either class or function templates
templateClass,
templateFunction
} ETemplateType;
/********************************************************************************/
/* Old (pre-CW9) browse data support definitions */
/********************************************************************************/
#define BROWSE_OLD_VERSION 0
enum {
BROWSE_SCOPE_STATIC, // local to this file
BROWSE_SCOPE_EXTERN // global to all files
};
enum {
BROWSE_OBJECT_FUNCTION, // function object
BROWSE_OBJECT_DATA // data object
};
enum { // browse data types
BROWSE_END, // end of browse data
BROWSE_OBJECT // a function/data definition
};
typedef struct BrowseObjectDef {
short type; // always BROWSE_OBJECT
short size; // size of following data
char object_type; // one of: (BROWSE_OBJECT_FUNCTION,BROWSE_OBJECT_DATA)
char object_scope; // one of: (BROWSE_SCOPE_STATIC,BROWSE_SCOPE_EXTERN)
long source_offset; // offset of declartation in source code
// char name[...]; followed by padded object name (c-string)
// char classname[...]; followed by padded class name string (c-string)
} BrowseObjectDef;
typedef struct BrowseHeader_Old {
long browse_header; // always set to BROWSE_HEADER
long browse_version; // always set to BROWSE_VERSION
long reserved[14]; // for future extensions
} BrowseHeader_Old;
#ifdef __cplusplus
}
#endif
#ifdef _MSC_VER
#pragma pack(pop)
#endif
#ifdef __MWERKS__
#pragma options align=reset
#endif
#endif // __MWBROWSE_H__
|
|
|
@ -1 +0,0 @@
|
||||||
/*
* MWLangDefs.h
*
* Copyright © 1994-1996 metrowerks inc. All rights reserved.
*
* Language constants.
*/
#ifndef MWLangDefs_H
#define MWLangDefs_H
enum ELanguage
{
langUnknown,
langC,
langCPlus,
langPascal,
langObjectPascal,
langJava,
langAssembler, // don't care which assembler
langFortran,
langRez
};
#endif // !MWLangDefs_H
|
|
Loading…
Reference in New Issue