summaryrefslogtreecommitdiff
path: root/unsorted
diff options
context:
space:
mode:
Diffstat (limited to 'unsorted')
-rw-r--r--unsorted/Arguments.c24
-rw-r--r--unsorted/Help.c20
-rw-r--r--unsorted/OptimizerHelpers.c2
-rw-r--r--unsorted/Option.c18
-rw-r--r--unsorted/Parameter.c2
-rw-r--r--unsorted/Projects.c4
-rw-r--r--unsorted/StaticParserGlue.c4
-rw-r--r--unsorted/TargetOptimizer-ppc-mach.c36
-rw-r--r--unsorted/Targets.c2
-rw-r--r--unsorted/ToolHelpers-cc.c2
-rw-r--r--unsorted/uCOS.c6
11 files changed, 61 insertions, 59 deletions
diff --git a/unsorted/Arguments.c b/unsorted/Arguments.c
index c427a5a..663d211 100644
--- a/unsorted/Arguments.c
+++ b/unsorted/Arguments.c
@@ -96,7 +96,7 @@ static void Arg_Setup(int argc, char **argv) {
margind = 1;
}
-static void Arg_SkipRespFileWS() {
+static void Arg_SkipRespFileWS(void) {
restart:
while (respfile[0] && isspace(respfile[0]))
++respfile;
@@ -139,12 +139,12 @@ static unsigned char Arg_OpenRespFile(const char *name) {
}
}
-static void Arg_CloseRespFile() {
+static void Arg_CloseRespFile(void) {
in_response_file = 0;
OS_FreeFileHandle(&respfilehandle);
}
-static char *Arg_GetRespFileToken() {
+static char *Arg_GetRespFileToken(void) {
char *start;
char *ptr;
int quoting;
@@ -211,7 +211,7 @@ restart:
return ret;
}
-static unsigned char Arg_GotMore() {
+static unsigned char Arg_GotMore(void) {
if (!in_response_file)
return margind < margc;
else if (respfile[0])
@@ -220,7 +220,7 @@ static unsigned char Arg_GotMore() {
return margind < margc;
}
-static void Arg_Parse() {
+static void Arg_Parse(void) {
unsigned char isOpt;
unsigned char isList;
char *arg;
@@ -385,7 +385,7 @@ void Arg_Init(int theargc, char **theargv) {
}
}
-void Arg_Terminate() {
+void Arg_Terminate(void) {
ArgToken *cur;
while (numargtoks > 0) {
@@ -399,7 +399,7 @@ void Arg_Terminate() {
maxargtoks = 0;
}
-void Arg_Reset() {
+void Arg_Reset(void) {
scantok = 0;
}
@@ -419,27 +419,27 @@ void Arg_Stop(ArgToken *where) {
scantok = numargtoks - 2;
}
-ArgToken *Arg_PeekToken() {
+ArgToken *Arg_PeekToken(void) {
if (scantok >= numargtoks)
return 0;
else
return &argtoks[scantok];
}
-ArgToken *Arg_UsedToken() {
+ArgToken *Arg_UsedToken(void) {
if (scantok < numargtoks)
scantok++;
return Arg_PeekToken();
}
-int Arg_IsEmpty() {
+int Arg_IsEmpty(void) {
ArgToken *tok;
tok = Arg_PeekToken();
return (tok == 0 || tok->val == ATK_END);
}
-ArgToken *Arg_GetToken() {
+ArgToken *Arg_GetToken(void) {
ArgToken *ret;
ret = Arg_PeekToken();
@@ -448,7 +448,7 @@ ArgToken *Arg_GetToken() {
return ret;
}
-ArgToken *Arg_UndoToken() {
+ArgToken *Arg_UndoToken(void) {
if (scantok > 0) {
scantok--;
return Arg_PeekToken();
diff --git a/unsorted/Help.c b/unsorted/Help.c
index ceeb278..74849a1 100644
--- a/unsorted/Help.c
+++ b/unsorted/Help.c
@@ -23,7 +23,7 @@ static char outLine[256];
static void Help_Output(Side *left, Side *right);
static void Help_OutputSingle(Side *all);
-static void Help_Flush();
+static void Help_Flush(void);
static void Side_Init(Side *s, short offset, short width) {
memset(s, 0, sizeof(Side));
@@ -147,7 +147,7 @@ static void Side_DumpLine(Side *s) {
}
}
-static void Help_PrintLine() {
+static void Help_PrintLine(void) {
HPrintF(helptext, "%.*s\n", parseopts.ioCols - 1, outLine);
}
@@ -176,11 +176,11 @@ static void Help_OutputSingle(Side *all) {
}
}
-static void Help_Flush() {
+static void Help_Flush(void) {
Help_Output(&left, &right);
}
-static void Help_NewLine() {
+static void Help_NewLine(void) {
Side_NewLine(&left);
Side_NewLine(&right);
}
@@ -369,7 +369,7 @@ int Help_Option(struct OptionList *lst, struct Option *opt, int subprint, const
Side_Print(
&left,
"%s",
- (opt->avail & OTF_SUB_OPTIONS_OPTIONAL) ? ((lastparam->flags & PARAMFLAGS_8) ? "[=" : "[,") : ((lastparam->flags & PARAMFLAGS_8) ? "," : "=")
+ (opt->avail & OTF_SUB_OPTIONS_OPTIONAL) ? ((lastparam->flags & PARAMFLAGS_8) ? "[=" : "[,") : ((lastparam->flags & PARAMFLAGS_8) ? "=" : ",")
);
} else if (!(opt->avail & OTF_STICKY)) {
if (opt->avail & OTF_SUB_OPTIONS_OPTIONAL) {
@@ -397,8 +397,8 @@ int Help_Option(struct OptionList *lst, struct Option *opt, int subprint, const
Side_Print(&left, "\t");
Side_Print(&right, "\t");
Help_Options(opt->sub, 1, "");
- Side_Print(&left, "\b");
Side_Print(&right, "\b");
+ Side_Print(&left, "\b");
} else {
Side_Print(&left, "\n");
Side_Print(&right, "\n");
@@ -465,7 +465,7 @@ void Help_Options(struct OptionList *lst, int subprint, const char *keyword) {
HPrintF(helptext, "\n");
}
-void Help_Usage() {
+void Help_Usage(void) {
Side_Print(
&all,
"\tGuide to help:\b"
@@ -518,7 +518,7 @@ void Help_Usage() {
Help_OutputSingle(&all);
}
-void Help_Null() {
+void Help_Null(void) {
Side_Print(&all,
"%s [options, filenames...]\n\nExecute '%s %shelp' for more information.",
OS_GetFileNamePtr(parseopts.args->argv[0]),
@@ -528,7 +528,7 @@ void Help_Null() {
Help_OutputSingle(&all);
}
-void Help_Init() {
+void Help_Init(void) {
short lb;
short le;
short rb;
@@ -555,7 +555,7 @@ void Help_Line(char ch) {
HPrintF(helptext, "%.*s\n", parseopts.ioCols - 1, line);
}
-void Help_Term() {
+void Help_Term(void) {
ShowTextHandle(0, helptext);
DisposeHandle(helptext);
}
diff --git a/unsorted/OptimizerHelpers.c b/unsorted/OptimizerHelpers.c
index 8b4bf36..4085363 100644
--- a/unsorted/OptimizerHelpers.c
+++ b/unsorted/OptimizerHelpers.c
@@ -123,7 +123,7 @@ int SetOptFlags(const char *opt, void *str, const char *, int flags) {
return 1;
}
-int DisplayOptimizationOptions() {
+int DisplayOptimizationOptions(const char *, void *, const char *, int) {
SInt32 oldsize;
Handle h;
diff --git a/unsorted/Option.c b/unsorted/Option.c
index 410c807..c1c8e91 100644
--- a/unsorted/Option.c
+++ b/unsorted/Option.c
@@ -69,14 +69,14 @@ static void Option_PopOpt(char *optname) {
free(os->e.o.curopt);
}
-static void Option_PopList() {
+static void Option_PopList(void) {
Args_Pop(ARGFLAG_1);
}
-void Args_InitStack() {
+void Args_InitStack(void) {
oStackPtr = 0;
}
-int Args_StackSize() {
+int Args_StackSize(void) {
return oStackPtr;
}
@@ -187,7 +187,7 @@ void Args_AddToToolArgs(anon0_50 *ta) {
Arg_AddToToolArgs(ta, 2, nptr);
}
-void Options_Init() {
+void Options_Init(void) {
numoptionlists = 0;
maxlegalset = 0;
numlegalset = 0;
@@ -212,11 +212,11 @@ void Options_Init() {
Args_InitStack();
}
-OptionList *Options_GetOptions() {
+OptionList *Options_GetOptions(void) {
return &legalset;
}
-void Options_SortOptions() {
+void Options_SortOptions(void) {
int r;
if (numinternalset > 0) {
@@ -341,7 +341,7 @@ int Option_ForTool(Option *opt, int which) {
return !which || (opt->avail & which);
}
-int Option_ThisTool() {
+int Option_ThisTool(void) {
return (pTool->TYPE == CWDROPINCOMPILERTYPE) ? OTF_TOOL_COMPILER : OTF_TOOL_LINKER;
}
@@ -817,7 +817,7 @@ static int Options_DoParse(OptionList *search, int flags) {
parseopts.possibleFiles++;
haderrors = 0;
}
- parsedany = 1;
+ parsedany++;
if (haderrors)
failed = 1;
else
@@ -1126,7 +1126,7 @@ int Option_Help(const char *opt) {
return ret;
}
-int Options_DisplayHelp() {
+int Options_DisplayHelp(void) {
if (parseopts.helpFlags & HELPFLAGS_1)
return Option_Help(parseopts.helpKey);
else
diff --git a/unsorted/Parameter.c b/unsorted/Parameter.c
index b3c7367..03e4a75 100644
--- a/unsorted/Parameter.c
+++ b/unsorted/Parameter.c
@@ -973,7 +973,7 @@ static void Param_PushParam(const char *param) {
Args_Push(4, (void *) param, 0);
}
-static void Param_PopParam() {
+static void Param_PopParam(void) {
Args_Pop(4);
}
diff --git a/unsorted/Projects.c b/unsorted/Projects.c
index fda92df..dca9df2 100644
--- a/unsorted/Projects.c
+++ b/unsorted/Projects.c
@@ -2,7 +2,7 @@
extern char STSbuf[256];
-int GetFileCount() {
+int GetFileCount(void) {
SInt32 num;
CWGetProjectFileCount(parseopts.context, &num);
return num;
@@ -115,7 +115,7 @@ int AddAccessPath(OSPathSpec *oss, SInt16 type, SInt32 position, Boolean recursi
return 1;
}
-int MoveSystemPathsIntoUserList() {
+int MoveSystemPathsIntoUserList(void) {
CWResult result = CWParserSwapAccessPaths(parseopts.context);
return result == cwNoErr;
}
diff --git a/unsorted/StaticParserGlue.c b/unsorted/StaticParserGlue.c
index c2e130d..7a44487 100644
--- a/unsorted/StaticParserGlue.c
+++ b/unsorted/StaticParserGlue.c
@@ -18,12 +18,12 @@ static ParserPluginCallbacks pr_cb = {
Parser_SupportsPanels
};
-int RegisterStaticParserPlugins() {
+int RegisterStaticParserPlugins(void) {
return RegisterStaticParserPlugin(&cb, &pr_cb);
}
#include "ParserErrors.r"
-int RegisterStaticParserResources() {
+int RegisterStaticParserResources(void) {
return RegisterResource("Parser Strings", 12010, STR12010);
}
diff --git a/unsorted/TargetOptimizer-ppc-mach.c b/unsorted/TargetOptimizer-ppc-mach.c
index 10fe33e..6c86356 100644
--- a/unsorted/TargetOptimizer-ppc-mach.c
+++ b/unsorted/TargetOptimizer-ppc-mach.c
@@ -17,28 +17,28 @@ int TargetSetOptFlags(short val, Boolean set) {
pBackEnd.processor = schedule_ppc_default;
break;
case 'SG':
- pBackEnd.processor = schedule_ppc_default = 0;
+ pBackEnd.processor = schedule_ppc_default = PrefCPU_Generic;
break;
case 'S1':
- pBackEnd.processor = schedule_ppc_default = 1;
+ pBackEnd.processor = schedule_ppc_default = PrefCPU_601;
break;
case 'S3':
- pBackEnd.processor = schedule_ppc_default = 2;
+ pBackEnd.processor = schedule_ppc_default = PrefCPU_603;
break;
case 'S#':
- pBackEnd.processor = schedule_ppc_default = 3;
+ pBackEnd.processor = schedule_ppc_default = PrefCPU_603e;
break;
case 'S4':
- pBackEnd.processor = schedule_ppc_default = 4;
+ pBackEnd.processor = schedule_ppc_default = PrefCPU_604;
break;
case 'S%':
- pBackEnd.processor = schedule_ppc_default = 5;
+ pBackEnd.processor = schedule_ppc_default = PrefCPU_604e;
break;
case 'S7':
- pBackEnd.processor = schedule_ppc_default = 6;
+ pBackEnd.processor = schedule_ppc_default = PrefCPU_750;
break;
case 'SA':
- pBackEnd.processor = schedule_ppc_default = 7;
+ pBackEnd.processor = schedule_ppc_default = PrefCPU_Altivec;
break;
default:
return 0;
@@ -48,22 +48,24 @@ int TargetSetOptFlags(short val, Boolean set) {
}
void TargetDisplayOptimizationOptions(Handle txt) {
+ PrefCPU p;
+
if (!pBackEnd.schedule) {
HPrintF(txt, "\t- no instruction scheduling\n");
} else {
HPrintF(txt, "\t- schedule for %s\n",
- (pBackEnd.processor == 0) ? "generic PPC" :
- (pBackEnd.processor == 1) ? "601" :
- (pBackEnd.processor == 2) ? "603" :
- (pBackEnd.processor == 3) ? "603e" :
- (pBackEnd.processor == 4) ? "604" :
- (pBackEnd.processor == 5) ? "604e" :
- (pBackEnd.processor == 6) ? "750" :
- (pBackEnd.processor == 7) ? "Altivec" :
+ !(p = (PrefCPU) pBackEnd.processor) ? "generic PPC" :
+ (p == PrefCPU_601) ? "601" :
+ (p == PrefCPU_603) ? "603" :
+ (p == PrefCPU_603e) ? "603e" :
+ (p == PrefCPU_604) ? "604" :
+ (p == PrefCPU_604e) ? "604e" :
+ (p == PrefCPU_750) ? "750" :
+ (p == PrefCPU_Altivec) ? "Altivec" :
"???"
);
}
}
-void TargetSetPragmaOptimizationsToUnspecified() {
+void TargetSetPragmaOptimizationsToUnspecified(void) {
}
diff --git a/unsorted/Targets.c b/unsorted/Targets.c
index accad8b..1c00170 100644
--- a/unsorted/Targets.c
+++ b/unsorted/Targets.c
@@ -53,7 +53,7 @@ Boolean ParserToolHandlesPanels(int numPanels, const char **panelNames) {
return 0;
}
-Boolean SetupParserToolOptions() {
+Boolean SetupParserToolOptions(void) {
int idx;
Options_Init();
diff --git a/unsorted/ToolHelpers-cc.c b/unsorted/ToolHelpers-cc.c
index fee7517..b58f188 100644
--- a/unsorted/ToolHelpers-cc.c
+++ b/unsorted/ToolHelpers-cc.c
@@ -11,7 +11,7 @@ int Opt_DummyLinkerSettingRoutine(const char *var, const char *val) {
return 0;
}
-void FinishCompilerTool() {
+void FinishCompilerTool(void) {
SInt32 numfiles;
if (parseopts.lastoutputname[0]) {
diff --git a/unsorted/uCOS.c b/unsorted/uCOS.c
index 2a7f643..11f1668 100644
--- a/unsorted/uCOS.c
+++ b/unsorted/uCOS.c
@@ -119,15 +119,15 @@ void COS_AppendPtrToHandle(char *ptr1, Handle hand2, SInt32 size) {
PtrAndHand(ptr1, hand2, size);
}
-OSErr COS_GetMemErr() {
+OSErr COS_GetMemErr(void) {
return LMGetMemErr();
}
-SInt32 COS_GetTicks() {
+SInt32 COS_GetTicks(void) {
return LMGetTicks();
}
-SInt32 COS_GetTime() {
+SInt32 COS_GetTime(void) {
return LMGetTime();
}