summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2022-10-12 18:07:57 +0100
committerAsh Wolf <ninji@wuffs.org>2022-10-12 18:07:57 +0100
commit945f73751630db0420522b5d6af0629d90376a45 (patch)
tree4b374c13d61dd0f54abefa49c6c348d6a56c6a52 /includes
parentf080c0e765878ae91949d91a0bc10b87e6c8269b (diff)
downloadMWCC-945f73751630db0420522b5d6af0629d90376a45.tar.gz
MWCC-945f73751630db0420522b5d6af0629d90376a45.zip
almost finished OSLib
Diffstat (limited to 'includes')
-rw-r--r--includes/common.h8
-rw-r--r--includes/oslib.h10
2 files changed, 16 insertions, 2 deletions
diff --git a/includes/common.h b/includes/common.h
index 8f9c346..809f99f 100644
--- a/includes/common.h
+++ b/includes/common.h
@@ -15,6 +15,14 @@
//#include <MacHeadersMach-O>
#define CW_PASCAL pascal
#undef toupper
+#undef tolower
+
+// What the fuck is this haha
+// typedef char * va_list;
+#define va_start(a,b) (a = ((va_list) __builtin_next_arg(b)))
+#define va_arg(a,b) (*(b *) (void *) ((a = (char *) (((((unsigned long)(a)) + ((__alignof__ (b) == 16) ? 15 : 3)) & ~((__alignof__ (b) == 16) ? 15 : 3)) + ((sizeof (b) + 3) & ~3))) - ((sizeof (b) + 3) & ~3)))
+#define va_end(a) ((void)0)
+
#else
#include <stdarg.h>
// expand this to nothing
diff --git a/includes/oslib.h b/includes/oslib.h
index fa444a3..fadc81f 100644
--- a/includes/oslib.h
+++ b/includes/oslib.h
@@ -54,12 +54,15 @@ typedef struct {
OSPathSpec spec;
} OSOpenedDir; // assumed name, might be something like OSDirRef though?
+#ifdef __MWERKS__
+#pragma options align=packed
+#endif
typedef struct OSFileTypeMapping {
OSType mactype;
const char *magic;
char length;
+ char executable;
const char *mimetype;
- char executable; // not sure why this is rearranged
} OSFileTypeMapping;
typedef struct OSFileTypeMappingList {
@@ -71,10 +74,13 @@ typedef struct OSFileTypeMappings {
OSFileTypeMappingList *mappingList;
struct OSFileTypeMappings *next;
} OSFileTypeMappings;
+#ifdef __MWERKS__
+#pragma options align=reset
+#endif
/********************************/
/* Generic */
-extern int WildCardMatch(const char *wild, const char *name);
+extern int WildCardMatch(char *wild, char *name);
extern OSSpec *OS_MatchPath(const char *path);
extern char *OS_GetFileNamePtr(char *path);
extern char *OS_GetDirName(const OSPathSpec *spec, char *buf, int size);