From fb89b45e1ed227fe458f64434067a1295641d872 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 14 Apr 2021 04:29:35 +0100 Subject: [PATCH] Some Mac OS refactor. --- setter/src/macos/macos.h | 16 ++++++++-------- setter/src/macos/retro68.h | 2 +- setter/src/macos/rsrcfork.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/setter/src/macos/macos.h b/setter/src/macos/macos.h index 993c057..8303242 100644 --- a/setter/src/macos/macos.h +++ b/setter/src/macos/macos.h @@ -55,20 +55,20 @@ enum #if __MWERKS__ <= 0x2100 // There's no MacTypes.h in old CodeWarrior -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef short int16_t; -typedef unsigned short uint16_t; -typedef long int32_t; -typedef unsigned long uint32_t; -typedef long long int64_t; +typedef signed char int8_t; +typedef unsigned char uint8_t; +typedef short int16_t; +typedef unsigned short uint16_t; +typedef long int32_t; +typedef unsigned long uint32_t; +typedef long long int64_t; typedef unsigned long long uint64_t; #define kHasNoINITs (0x0080) /* Files only (Extensions/Control Panels only) */ #if __MWERKS__ <= 0x1800 // 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 enum diff --git a/setter/src/macos/retro68.h b/setter/src/macos/retro68.h index 55ec3d5..c361649 100644 --- a/setter/src/macos/retro68.h +++ b/setter/src/macos/retro68.h @@ -137,7 +137,7 @@ enum /*MemoryDispatch errors*/ enum { - notEnoughMemoryErr = -620, /*insufficient physical memory*/ + notEnoughMemoryErr = -620 /*insufficient physical memory*/ }; enum diff --git a/setter/src/macos/rsrcfork.c b/setter/src/macos/rsrcfork.c index ba74ac8..83ca473 100644 --- a/setter/src/macos/rsrcfork.c +++ b/setter/src/macos/rsrcfork.c @@ -51,7 +51,7 @@ static OSErr SaveResourceToNewFile(int16_t vRefNum, h = NewHandle(length); - if(!h) return notEnoughMemoryErr; + if(!h) return -620; // notEnoughMemoryErr memcpy(*h, buffer, length);