From 35d488e972a9dd75ce3867c000405f128b79c615 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sun, 15 Jan 2023 12:14:05 +0000 Subject: reorganise things a bit to align further with the actual names/structure --- command_line/CmdLine/Src/CLFileTypes.c | 29 +++++++++++++++++++++++ command_line/CmdLine/Src/Clients/CLStaticMain.c | 10 ++++---- command_line/CmdLine/Src/uFileTypeMappings.c | 31 ------------------------- 3 files changed, 34 insertions(+), 36 deletions(-) create mode 100644 command_line/CmdLine/Src/CLFileTypes.c delete mode 100644 command_line/CmdLine/Src/uFileTypeMappings.c (limited to 'command_line/CmdLine/Src') diff --git a/command_line/CmdLine/Src/CLFileTypes.c b/command_line/CmdLine/Src/CLFileTypes.c new file mode 100644 index 0000000..3416603 --- /dev/null +++ b/command_line/CmdLine/Src/CLFileTypes.c @@ -0,0 +1,29 @@ +#include "cmdline.h" + +void AddFileTypeMappingList(OSFileTypeMappings **list, const OSFileTypeMappingList *entry) { + OS_AddFileTypeMappingList(list, entry); +} + +void UseFileTypeMappings(OSFileTypeMappings *list) { + OS_UseFileTypeMappings(list); +} + +OSErr SetMacFileType(const FSSpec *spec, OSType mactype) { + OSSpec ospec; + OSErr err; + + err = OS_FSSpec_To_OSSpec(spec, &ospec); + if (err) + return err; + return OS_SetMacFileType(&ospec, mactype); +} + +OSErr GetMacFileType(const FSSpec *spec, OSType *mactype) { + OSSpec ospec; + OSErr err; + + err = OS_FSSpec_To_OSSpec(spec, &ospec); + if (err) + return err; + return OS_GetMacFileType(&ospec, mactype); +} diff --git a/command_line/CmdLine/Src/Clients/CLStaticMain.c b/command_line/CmdLine/Src/Clients/CLStaticMain.c index 871dcef..77910fe 100644 --- a/command_line/CmdLine/Src/Clients/CLStaticMain.c +++ b/command_line/CmdLine/Src/Clients/CLStaticMain.c @@ -4,16 +4,16 @@ extern const char *CMDLINE_BUILD_TIME; extern const char *CMDLINE_BUILD_DATE; // Glue functions -extern int RegisterStaticParserPlugins(); -extern int RegisterStaticParserResources(); +extern int RegisterStaticParserPlugins(void); +extern int RegisterStaticParserResources(void); extern void GetStaticTarget(OSType *cpu, OSType *os); extern void GetStaticPluginType(OSType *language, OSType *plugintype); extern void GetStaticParserPluginType(OSType *style); -extern int RegisterStaticTargetResources(); -extern int RegisterStaticTargetPlugins(); +extern int RegisterStaticTargetResources(void); +extern int RegisterStaticTargetPlugins(void); -extern int RegisterStaticParserToolInfo(); +extern int RegisterStaticParserToolInfo(void); int main(int argc, char **argv) { OSType cpu; diff --git a/command_line/CmdLine/Src/uFileTypeMappings.c b/command_line/CmdLine/Src/uFileTypeMappings.c deleted file mode 100644 index 56aaea5..0000000 --- a/command_line/CmdLine/Src/uFileTypeMappings.c +++ /dev/null @@ -1,31 +0,0 @@ -#include "cmdline.h" - -// I don't actually have a name for this file, annoyingly enough - -void AddFileTypeMappingList(OSFileTypeMappings **list, const OSFileTypeMappingList *entry) { - OS_AddFileTypeMappingList(list, entry); -} - -void UseFileTypeMappings(OSFileTypeMappings *list) { - OS_UseFileTypeMappings(list); -} - -OSErr SetMacFileType(const FSSpec *spec, OSType mactype) { - OSSpec ospec; - OSErr err; - - err = OS_FSSpec_To_OSSpec(spec, &ospec); - if (err) - return err; - return OS_SetMacFileType(&ospec, mactype); -} - -OSErr GetMacFileType(const FSSpec *spec, OSType *mactype) { - OSSpec ospec; - OSErr err; - - err = OS_FSSpec_To_OSSpec(spec, &ospec); - if (err) - return err; - return OS_GetMacFileType(&ospec, mactype); -} -- cgit v1.2.3