summaryrefslogtreecommitdiff
path: root/command_line
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-01-11 22:29:53 +0000
committerAsh Wolf <ninji@wuffs.org>2023-01-11 22:29:53 +0000
commit0bec4f557a96e1a40437cf5af20cc78a5eec8a63 (patch)
treec1e05ec804c43aa5a8f5f21b0ed02d0587d29563 /command_line
parentaec1b8dddc68ecb8288ec6132932e4c7b4bca09f (diff)
downloadMWCC-0bec4f557a96e1a40437cf5af20cc78a5eec8a63.tar.gz
MWCC-0bec4f557a96e1a40437cf5af20cc78a5eec8a63.zip
getting closer
Diffstat (limited to 'command_line')
-rw-r--r--command_line/C++_Parser/Src/Library/WarningHelpers.c2
-rw-r--r--command_line/CmdLine/Src/CLDependencies.c4
-rw-r--r--command_line/CmdLine/Src/CLFileOps.c8
-rw-r--r--command_line/CmdLine/Src/CLIncludeFileCache.c6
-rw-r--r--command_line/CmdLine/Src/CLLicenses.c13
-rw-r--r--command_line/CmdLine/Src/CLMain.c16
-rw-r--r--command_line/CmdLine/Src/CLPrefs.c4
-rw-r--r--command_line/CmdLine/Src/CLToolExec.c4
-rw-r--r--command_line/CmdLine/Src/Clients/ClientGlue.c2
-rw-r--r--command_line/CmdLine/Src/Envir/CLIO.c18
-rw-r--r--command_line/CmdLine/Src/MacEmul/LowMem.c6
-rw-r--r--command_line/CmdLine/Src/MacEmul/Memory.c10
-rw-r--r--command_line/CmdLine/Src/MacEmul/ResourceStrings.c4
-rw-r--r--command_line/CmdLine/Src/MacEmul/Resources.c12
-rw-r--r--command_line/CmdLine/Src/MacEmul/TextUtils.c2
-rw-r--r--command_line/CmdLine/Src/OSLib/Posix.c4
-rw-r--r--command_line/CmdLine/Src/Plugins/CLPlugins.c8
-rw-r--r--command_line/CmdLine/Src/Project/CLAccessPaths.c4
-rw-r--r--command_line/CmdLine/Src/Project/CLFiles.c2
19 files changed, 64 insertions, 65 deletions
diff --git a/command_line/C++_Parser/Src/Library/WarningHelpers.c b/command_line/C++_Parser/Src/Library/WarningHelpers.c
index 35a6fa8..95a0657 100644
--- a/command_line/C++_Parser/Src/Library/WarningHelpers.c
+++ b/command_line/C++_Parser/Src/Library/WarningHelpers.c
@@ -55,7 +55,7 @@ int SetWarningFlags(const char *opt, void *str, const char *, int flags) {
return 1;
}
-int DisplayWarningOptions() {
+int DisplayWarningOptions(const char *, void *, const char *, int) {
Handle h;
h = NewHandle(0);
diff --git a/command_line/CmdLine/Src/CLDependencies.c b/command_line/CmdLine/Src/CLDependencies.c
index 8c4c13b..6590257 100644
--- a/command_line/CmdLine/Src/CLDependencies.c
+++ b/command_line/CmdLine/Src/CLDependencies.c
@@ -273,11 +273,11 @@ int Deps_ChangeSpecialAccessPath(OSSpec *srcfss, Boolean initialize) {
return 1;
}
-Path *Deps_GetSpecialAccessPath() {
+Path *Deps_GetSpecialAccessPath(void) {
return specialAccessPath;
}
-static void SetSpecialAccessPathFromIncludeStackTOS() {
+static void SetSpecialAccessPathFromIncludeStackTOS(void) {
// does not match, some registers are in the wrong order
OSSpec spec;
SInt16 index;
diff --git a/command_line/CmdLine/Src/CLFileOps.c b/command_line/CmdLine/Src/CLFileOps.c
index 14c9dc6..be3c00c 100644
--- a/command_line/CmdLine/Src/CLFileOps.c
+++ b/command_line/CmdLine/Src/CLFileOps.c
@@ -460,7 +460,7 @@ static int CompileEntry(File *file, Boolean *compiled) {
return 1;
}
-static void DumpFileAndPathInfo() {
+static void DumpFileAndPathInfo(void) {
int i;
int n;
@@ -583,7 +583,7 @@ static void DumpFileAndPathInfo() {
}
}
-int CompileFilesInProject() {
+int CompileFilesInProject(void) {
struct BuildInfo *tinfo;
SInt32 index;
SInt32 startTime;
@@ -679,7 +679,7 @@ int CompileFilesInProject() {
return CheckForUserBreak() ? Result_Cancelled : Result_Success;
}
-static int PostLinkFilesInProject() {
+static int PostLinkFilesInProject(void) {
SInt32 index;
SInt32 startTime;
SInt32 endTime;
@@ -709,7 +709,7 @@ static int PostLinkFilesInProject() {
return CheckForUserBreak() ? Result_Cancelled : Result_Success;
}
-int LinkProject() {
+int LinkProject(void) {
SInt32 startTime;
SInt32 endTime;
diff --git a/command_line/CmdLine/Src/CLIncludeFileCache.c b/command_line/CmdLine/Src/CLIncludeFileCache.c
index d479f36..b7c78ea 100644
--- a/command_line/CmdLine/Src/CLIncludeFileCache.c
+++ b/command_line/CmdLine/Src/CLIncludeFileCache.c
@@ -19,7 +19,7 @@ static CacheEntry *cachelist;
static CacheEntry *freelist;
static UInt32 availablecache;
-static CacheEntry *makecacheentry() {
+static CacheEntry *makecacheentry(void) {
CacheEntry *c = freelist;
if (c) {
freelist = c->next;
@@ -46,13 +46,13 @@ static void deletecacheentry(CacheEntry *c) {
cachelist = c->next;
}
-void InitializeIncludeCache() {
+void InitializeIncludeCache(void) {
freelist = NULL;
cachelist = NULL;
availablecache = CACHE_SIZE;
}
-void CleanupIncludeCache() {
+void CleanupIncludeCache(void) {
CacheEntry *c;
CacheEntry *c1;
diff --git a/command_line/CmdLine/Src/CLLicenses.c b/command_line/CmdLine/Src/CLLicenses.c
index f264e6c..a58d58d 100644
--- a/command_line/CmdLine/Src/CLLicenses.c
+++ b/command_line/CmdLine/Src/CLLicenses.c
@@ -1,23 +1,22 @@
#include "cmdline.h"
-void License_Initialize() {
+void License_Initialize(void) {
}
-void License_Terminate() {
+void License_Terminate(void) {
}
-SInt32 License_Checkout() {
+SInt32 License_Checkout(void) {
return 0xD0AD0A;
}
void License_Refresh() {
-
+ // unknown args
}
void License_Checkin() {
-
+ // unknown args
}
-void License_AutoCheckin() {
-
+void License_AutoCheckin(void) {
}
diff --git a/command_line/CmdLine/Src/CLMain.c b/command_line/CmdLine/Src/CLMain.c
index 6e041ad..ae678fa 100644
--- a/command_line/CmdLine/Src/CLMain.c
+++ b/command_line/CmdLine/Src/CLMain.c
@@ -117,13 +117,13 @@ static BasePluginCallbacks clcb = {
CLT_GetFileTypeMappings
};
-static int RegisterStaticCmdLinePlugin() {
+static int RegisterStaticCmdLinePlugin(void) {
return RegisterStaticPlugin(&clcb);
}
#include "command_line/CmdLine/Project/Resources/CLErrors.r"
-static int RegisterCmdLineResources() {
+static int RegisterCmdLineResources(void) {
return RegisterResource("Command-line strings", 12000, STR12000);
}
@@ -278,7 +278,7 @@ int Main_Terminate(int exitcode) {
return exitcode;
}
-static int Main_ParseCommandLine() {
+static int Main_ParseCommandLine(void) {
Plugin *parser;
CWCommandLineArgs myargs;
int x, y;
@@ -337,7 +337,7 @@ static int Main_ParseCommandLine() {
return Result_Success;
}
-static int Main_SetupParamBlock() {
+static int Main_SetupParamBlock(void) {
PrefPanelsChangedCallback(0);
if (optsCompiler.outMakefile[0]) {
@@ -362,7 +362,7 @@ static int Main_SetupParamBlock() {
return 0;
}
-static int Main_ResolveProject() {
+static int Main_ResolveProject(void) {
SInt32 startTime;
SInt32 endTime;
int err;
@@ -562,7 +562,7 @@ static int UpdatePrefPanels(const char *name) {
return 1;
}
-static int SetupCmdLinePrefPanels() {
+static int SetupCmdLinePrefPanels(void) {
int ret;
PrefPanelsChangedCallback = UpdatePrefPanels;
@@ -578,7 +578,7 @@ static int SetupCmdLinePrefPanels() {
return ret;
}
-static int Main_SetupContext() {
+static int Main_SetupContext(void) {
gTarg = Target_New("default", clState.cpu, clState.os, clState.language);
Target_Add(&gProj->targets, gTarg);
@@ -622,7 +622,7 @@ static int Main_SetupContext() {
return 1;
}
-int Main_Driver() {
+int Main_Driver(void) {
volatile int result;
result = setjmp(exit_program);
diff --git a/command_line/CmdLine/Src/CLPrefs.c b/command_line/CmdLine/Src/CLPrefs.c
index 7aaa28a..dba6dd8 100644
--- a/command_line/CmdLine/Src/CLPrefs.c
+++ b/command_line/CmdLine/Src/CLPrefs.c
@@ -78,11 +78,11 @@ int PrefPanel_PutHandle(PrefPanel *panel, Handle data) {
return 1;
}
-void Prefs_Initialize() {
+void Prefs_Initialize(void) {
panellist = NULL;
}
-void Prefs_Terminate() {
+void Prefs_Terminate(void) {
PrefPanel *scan;
PrefPanel *next;
diff --git a/command_line/CmdLine/Src/CLToolExec.c b/command_line/CmdLine/Src/CLToolExec.c
index 80e3a7c..9bc4213 100644
--- a/command_line/CmdLine/Src/CLToolExec.c
+++ b/command_line/CmdLine/Src/CLToolExec.c
@@ -100,7 +100,7 @@ static int SetupLinkerCommandLine(SInt32 dropinflags, File *file, CWCommandLineA
return 1;
}
-int SetupTemporaries() {
+int SetupTemporaries(void) {
SInt32 idx;
File *file;
@@ -117,7 +117,7 @@ int SetupTemporaries() {
return 1;
}
-int DeleteTemporaries() {
+int DeleteTemporaries(void) {
SInt32 idx;
File *file;
diff --git a/command_line/CmdLine/Src/Clients/ClientGlue.c b/command_line/CmdLine/Src/Clients/ClientGlue.c
index 6bc0508..f6b4a74 100644
--- a/command_line/CmdLine/Src/Clients/ClientGlue.c
+++ b/command_line/CmdLine/Src/Clients/ClientGlue.c
@@ -48,7 +48,7 @@ int CmdLine_Initialize(int argc, char **argv, const char *builddate, const char
return Main_Initialize(argc, argv);
}
-int CmdLine_Driver() {
+int CmdLine_Driver(void) {
return Main_Driver();
}
diff --git a/command_line/CmdLine/Src/Envir/CLIO.c b/command_line/CmdLine/Src/Envir/CLIO.c
index 70ba9ae..0c07eaf 100644
--- a/command_line/CmdLine/Src/Envir/CLIO.c
+++ b/command_line/CmdLine/Src/Envir/CLIO.c
@@ -24,7 +24,7 @@ static void catchinterrupt() {
clState.userBreak = 1;
}
-static void SetupConsoleInfo() {
+static void SetupConsoleInfo(void) {
struct winsize ws;
struct stat st;
@@ -57,11 +57,11 @@ static void Crash() {
*((unsigned char *) NULL) = 0;
}
-void SetupDebuggingTraps() {
+void SetupDebuggingTraps(void) {
signal(SIGABRT, Crash);
}
-Boolean IO_Initialize() {
+Boolean IO_Initialize(void) {
ioPiping = 0;
ioInHelp = 0;
ioLineNum = 0;
@@ -79,19 +79,19 @@ Boolean IO_Initialize() {
return 1;
}
-Boolean IO_Terminate() {
+Boolean IO_Terminate(void) {
if (ioInHelp)
IO_HelpTerminate();
TermWorking();
return 1;
}
-Boolean IO_HelpInitialize() {
+Boolean IO_HelpInitialize(void) {
ioInHelp = 1;
return 1;
}
-Boolean IO_HelpTerminate() {
+Boolean IO_HelpTerminate(void) {
ioInHelp = 0;
return 1;
}
@@ -229,13 +229,13 @@ Boolean AppendHandleToFile(OSSpec *spec, Handle text, UInt32 size, CWDataType ma
return 1;
}
-void InitWorking() {
+void InitWorking(void) {
}
void ShowWorking(int x) {
}
-void TermWorking() {
+void TermWorking(void) {
}
static void ProgressFunction(const char *functionname) {
@@ -243,7 +243,7 @@ static void ProgressFunction(const char *functionname) {
CLReport(7, functionname);
}
-Boolean CheckForUserBreak() {
+Boolean CheckForUserBreak(void) {
ShowWorking(4);
return clState.userBreak;
}
diff --git a/command_line/CmdLine/Src/MacEmul/LowMem.c b/command_line/CmdLine/Src/MacEmul/LowMem.c
index cd31194..6b32e2c 100644
--- a/command_line/CmdLine/Src/MacEmul/LowMem.c
+++ b/command_line/CmdLine/Src/MacEmul/LowMem.c
@@ -2,15 +2,15 @@
static OSErr memErr;
-UInt32 LMGetTicks() {
+UInt32 LMGetTicks(void) {
return (OS_GetMilliseconds() * 60) / 1000;
}
-UInt32 LMGetTime() {
+UInt32 LMGetTime(void) {
return OS_GetMilliseconds() / 1000;
}
-OSErr LMGetMemErr() {
+OSErr LMGetMemErr(void) {
return memErr;
}
diff --git a/command_line/CmdLine/Src/MacEmul/Memory.c b/command_line/CmdLine/Src/MacEmul/Memory.c
index e201343..e6c42c3 100644
--- a/command_line/CmdLine/Src/MacEmul/Memory.c
+++ b/command_line/CmdLine/Src/MacEmul/Memory.c
@@ -49,7 +49,7 @@ void OS_DestroyMacHandle(Handle h, OSHandle *ret) {
free(h);
}
-OSErr MemError() {
+OSErr MemError(void) {
return memError;
}
@@ -257,10 +257,10 @@ void DebugStr(ConstStringPtr str) {
fprintf(stderr, "%*.*s", str[0], str[0], &str[1]);
}
-struct Zone *HandleZone() {
- return 0;
+struct Zone *HandleZone(void) {
+ return NULL;
}
-struct Zone *ApplicationZone() {
- return 0;
+struct Zone *ApplicationZone(void) {
+ return NULL;
}
diff --git a/command_line/CmdLine/Src/MacEmul/ResourceStrings.c b/command_line/CmdLine/Src/MacEmul/ResourceStrings.c
index 4b6bc22..2cc960c 100644
--- a/command_line/CmdLine/Src/MacEmul/ResourceStrings.c
+++ b/command_line/CmdLine/Src/MacEmul/ResourceStrings.c
@@ -8,7 +8,7 @@ typedef struct {
static Res rlist[16];
-void Res_Initialize() {
+void Res_Initialize(void) {
memset(rlist, 0, sizeof(rlist));
}
@@ -64,5 +64,5 @@ const char *Res_GetResource(SInt16 rsrcid, SInt16 index) {
return 0;
}
-void Res_Cleanup() {
+void Res_Cleanup(void) {
}
diff --git a/command_line/CmdLine/Src/MacEmul/Resources.c b/command_line/CmdLine/Src/MacEmul/Resources.c
index ef2aab0..821df0b 100644
--- a/command_line/CmdLine/Src/MacEmul/Resources.c
+++ b/command_line/CmdLine/Src/MacEmul/Resources.c
@@ -105,7 +105,7 @@ static Boolean UseResourceForkInfo;
// Forward declarations
static void ReadResourceFork(SInt16 ref, SInt8 permission, void *file_data, SInt32 file_size);
-Boolean OS_UsingMacResourceForkInfo() {
+Boolean OS_UsingMacResourceForkInfo(void) {
return UseResourceForkInfo;
}
@@ -1186,7 +1186,7 @@ OSErr HOpenRF(SInt16 vRefNum, SInt32 dirID, ConstStringPtr fileName, SInt8 permi
}
}
-OSErr InitResources() {
+OSErr InitResources(void) {
MemRsrcMap *map;
map = maplist;
@@ -1201,7 +1201,7 @@ OSErr InitResources() {
return 0;
}
-OSErr ResError() {
+OSErr ResError(void) {
return resError;
}
@@ -1289,7 +1289,7 @@ OSErr HOpenResFile(SInt16 vRefNum, SInt32 dirID, ConstStringPtr fileName, SInt8
return FSpOpenResFile(&fss, permission);
}
-SInt16 CurResFile() {
+SInt16 CurResFile(void) {
return cur_res_file;
}
@@ -1570,7 +1570,7 @@ Handle Get1IndResource(OSType theType, SInt16 index) {
}
}
-SInt16 Count1Types() {
+SInt16 Count1Types(void) {
MemRsrcMap *rm;
MemRsrcTypeList *rtl;
SInt16 count;
@@ -1667,6 +1667,6 @@ SInt16 GetResFileAttrs(SInt16) {
}
}
-Boolean LMGetResLoad() {
+Boolean LMGetResLoad(void) {
return 1;
}
diff --git a/command_line/CmdLine/Src/MacEmul/TextUtils.c b/command_line/CmdLine/Src/MacEmul/TextUtils.c
index 7971074..f9f606d 100644
--- a/command_line/CmdLine/Src/MacEmul/TextUtils.c
+++ b/command_line/CmdLine/Src/MacEmul/TextUtils.c
@@ -22,7 +22,7 @@ SInt16 CharacterByteType(Ptr textBuf, SInt16 textOffset, ScriptCode script) {
return 0;
}
-SInt16 CharByte() {
+SInt16 CharByte(void) {
return 0;
}
diff --git a/command_line/CmdLine/Src/OSLib/Posix.c b/command_line/CmdLine/Src/OSLib/Posix.c
index 1f13dff..f42c0be 100644
--- a/command_line/CmdLine/Src/OSLib/Posix.c
+++ b/command_line/CmdLine/Src/OSLib/Posix.c
@@ -48,7 +48,7 @@ int OS_InitProgram(int *pArgc, char ***pArgv) {
return 0;
}
-int OS_TermProgram() {
+int OS_TermProgram(void) {
return 0;
}
@@ -767,7 +767,7 @@ int OS_CloseDir(OSOpenedDir *ref) {
return 0;
}
-UInt32 OS_GetMilliseconds() {
+UInt32 OS_GetMilliseconds(void) {
struct tms tms;
return times(&tms) * 1000 / CLOCKS_PER_SEC;
}
diff --git a/command_line/CmdLine/Src/Plugins/CLPlugins.c b/command_line/CmdLine/Src/Plugins/CLPlugins.c
index 5f31f45..38af6fe 100644
--- a/command_line/CmdLine/Src/Plugins/CLPlugins.c
+++ b/command_line/CmdLine/Src/Plugins/CLPlugins.c
@@ -5,11 +5,11 @@ static ToolVersionInfo toolVersionInfo;
static VersionInfo toolVersion;
static Boolean useToolVersion;
-static void GetToolVersionInfo() {
+static void GetToolVersionInfo(void) {
useToolVersion = 0;
}
-const ToolVersionInfo *Plugin_GetToolVersionInfo() {
+const ToolVersionInfo *Plugin_GetToolVersionInfo(void) {
return useToolVersion ? &toolVersionInfo : 0;
}
@@ -480,12 +480,12 @@ Boolean Plugin_VerifyPanels(Plugin *pl) {
}
}
-void Plugins_Init() {
+void Plugins_Init(void) {
pluginlist = NULL;
GetToolVersionInfo();
}
-void Plugins_Term() {
+void Plugins_Term(void) {
Plugin *scan;
Plugin *next;
diff --git a/command_line/CmdLine/Src/Project/CLAccessPaths.c b/command_line/CmdLine/Src/Project/CLAccessPaths.c
index 1ffcd1d..d20b16b 100644
--- a/command_line/CmdLine/Src/Project/CLAccessPaths.c
+++ b/command_line/CmdLine/Src/Project/CLAccessPaths.c
@@ -451,7 +451,7 @@ int Frameworks_AddFramework(const char *name, const char *version, Boolean hidde
return 0;
}
-void Framework_GetEnvInfo() {
+void Framework_GetEnvInfo(void) {
char path[256];
char *env;
char *ptr;
@@ -513,7 +513,7 @@ void Framework_GetEnvInfo() {
}
}
-int Frameworks_GetCount() {
+int Frameworks_GetCount(void) {
return FrameworkInfo.fwsCount;
}
diff --git a/command_line/CmdLine/Src/Project/CLFiles.c b/command_line/CmdLine/Src/Project/CLFiles.c
index a13deaf..6953df1 100644
--- a/command_line/CmdLine/Src/Project/CLFiles.c
+++ b/command_line/CmdLine/Src/Project/CLFiles.c
@@ -1,6 +1,6 @@
#include "cmdline.h"
-File *File_New() {
+File *File_New(void) {
File *file;
file = xmalloc(NULL, sizeof(File));
if (!file) {