Some Mac OS refactor.

This commit is contained in:
2021-04-14 04:29:35 +01:00
parent d77c416798
commit fb89b45e1e
3 changed files with 10 additions and 10 deletions

View File

@@ -55,20 +55,20 @@ enum
#if __MWERKS__ <= 0x2100 #if __MWERKS__ <= 0x2100
// There's no MacTypes.h in old CodeWarrior // There's no MacTypes.h in old CodeWarrior
typedef signed char int8_t; typedef signed char int8_t;
typedef unsigned char uint8_t; typedef unsigned char uint8_t;
typedef short int16_t; typedef short int16_t;
typedef unsigned short uint16_t; typedef unsigned short uint16_t;
typedef long int32_t; typedef long int32_t;
typedef unsigned long uint32_t; typedef unsigned long uint32_t;
typedef long long int64_t; typedef long long int64_t;
typedef unsigned long long uint64_t; typedef unsigned long long uint64_t;
#define kHasNoINITs (0x0080) /* Files only (Extensions/Control Panels only) */ #define kHasNoINITs (0x0080) /* Files only (Extensions/Control Panels only) */
#if __MWERKS__ <= 0x1800 #if __MWERKS__ <= 0x1800
// Old CodeWarrior C library does not include snprintf() // Old CodeWarrior C library does not include snprintf()
int snprintf(char *str, size_t size, const char *format, ...); int snprintf(char* str, size_t size, const char* format, ...);
#endif #endif
enum enum

View File

@@ -137,7 +137,7 @@ enum
/*MemoryDispatch errors*/ /*MemoryDispatch errors*/
enum enum
{ {
notEnoughMemoryErr = -620, /*insufficient physical memory*/ notEnoughMemoryErr = -620 /*insufficient physical memory*/
}; };
enum enum

View File

@@ -51,7 +51,7 @@ static OSErr SaveResourceToNewFile(int16_t vRefNum,
h = NewHandle(length); h = NewHandle(length);
if(!h) return notEnoughMemoryErr; if(!h) return -620; // notEnoughMemoryErr
memcpy(*h, buffer, length); memcpy(*h, buffer, length);