mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-24 02:29:55 +00:00
use the newly supported "= { 0x1234 }" syntax instead of non-standard __attribute__((__raw_inline__(0x1234))).
This commit is contained in:
parent
ee736a689c
commit
65dbaedf5d
@ -35,12 +35,11 @@
|
||||
#include <Quickdraw.h>
|
||||
QDGlobals qd;
|
||||
|
||||
#pragma parameter __D0 _GetPtrSize(__A0)
|
||||
pascal long _GetPtrSize(Ptr ptr) = { 0xA021 };
|
||||
|
||||
pascal Size GetPtrSize(Ptr ptr)
|
||||
{
|
||||
#pragma parameter __D0 _GetPtrSize(__A0)
|
||||
pascal long _GetPtrSize(Ptr ptr) ONEWORDINLINE(0xA021);
|
||||
|
||||
long tmp = _GetPtrSize(ptr);
|
||||
if(tmp > 0)
|
||||
return (Size) tmp;
|
||||
@ -48,11 +47,11 @@ pascal Size GetPtrSize(Ptr ptr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#pragma parameter __D0 _GetHandleSize(__A0)
|
||||
pascal long _GetHandleSize(Handle h) = { 0xA025 };
|
||||
|
||||
pascal Size GetHandleSize(Handle h)
|
||||
{
|
||||
#pragma parameter __D0 _GetHandleSize(__A0)
|
||||
pascal long _GetHandleSize(Handle h) ONEWORDINLINE(0xA025);
|
||||
|
||||
long tmp = _GetHandleSize(h);
|
||||
if(tmp > 0)
|
||||
return (Size) tmp;
|
||||
@ -60,51 +59,62 @@ pascal Size GetHandleSize(Handle h)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#pragma parameter __A0 _PtrToHand(__A0, __D0)
|
||||
pascal Handle _PtrToHand(const void *srcPtr, long size) = { 0xA9E3 };
|
||||
|
||||
EXTERN_API( OSErr )
|
||||
PtrToHand(
|
||||
const void * srcPtr,
|
||||
Handle * dstHndl,
|
||||
long size)
|
||||
{
|
||||
#pragma parameter __A0 _PtrToHand(__A0, __D0)
|
||||
pascal Handle _PtrToHand(const void *srcPtr, long size) ONEWORDINLINE(0xA9E3);
|
||||
|
||||
*dstHndl = _PtrToHand(srcPtr, size);
|
||||
|
||||
return MemError();
|
||||
}
|
||||
|
||||
#pragma parameter __A0 _HandToHand(__A0)
|
||||
pascal Handle _HandToHand(Handle h) = { 0xA9E1 };
|
||||
|
||||
EXTERN_API( OSErr )
|
||||
HandToHand(Handle * theHndl)
|
||||
{
|
||||
#pragma parameter __A0 _HandToHand(__A0)
|
||||
pascal Handle _HandToHand(Handle h) ONEWORDINLINE(0xA9E1);
|
||||
|
||||
*theHndl = _HandToHand(*theHndl);
|
||||
|
||||
return MemError();
|
||||
}
|
||||
|
||||
#pragma parameter __D0 _StringToNum(__A0)
|
||||
pascal long _StringToNum(ConstStr255Param theString) = { 0x3F3C, 0x0001, 0xA9EE };
|
||||
|
||||
EXTERN_API( void )
|
||||
StringToNum(
|
||||
ConstStr255Param theString,
|
||||
long * theNum)
|
||||
{
|
||||
#pragma parameter __D0 _StringToNum(__A0)
|
||||
pascal long _StringToNum(ConstStr255Param theString) THREEWORDINLINE(0x3F3C, 0x0001, 0xA9EE);
|
||||
*theNum = _StringToNum(theString);
|
||||
}
|
||||
|
||||
#pragma parameter _NumToString(__D0, __A0)
|
||||
pascal long _NumToString(long theNum, ConstStr255Param theString) = { 0x4267, 0xA9EE };
|
||||
|
||||
EXTERN_API( void )
|
||||
NumToString(
|
||||
long theNum,
|
||||
Str255 theString)
|
||||
{
|
||||
#pragma parameter _NumToString(__D0, __A0)
|
||||
pascal long _NumToString(long theNum, ConstStr255Param theString) TWOWORDINLINE(0x4267, 0xA9EE);
|
||||
_NumToString(theNum, theString);
|
||||
}
|
||||
|
||||
#pragma parameter __D0 _CmpString(__A0, __A1, __D0)
|
||||
pascal long _CmpString(const char *a, const char *b, long lens) = { 0xA03C };
|
||||
#pragma parameter __D0 _CmpStringCase(__A0, __A1, __D0)
|
||||
pascal long _CmpStringCase(const char *a, const char *b, long lens) = { 0xA43C };
|
||||
#pragma parameter __D0 _CmpStringMarks(__A0, __A1, __D0)
|
||||
pascal long _CmpStringMarks(const char *a, const char *b, long lens) = { 0xA23C };
|
||||
#pragma parameter __D0 _CmpStringCaseMarks(__A0, __A1, __D0)
|
||||
pascal long _CmpStringCaseMarks(const char *a, const char *b, long lens) = { 0xA63C };
|
||||
|
||||
EXTERN_API( Boolean )
|
||||
EqualString(
|
||||
ConstStr255Param str1,
|
||||
@ -112,15 +122,6 @@ EqualString(
|
||||
Boolean caseSensitive,
|
||||
Boolean diacSensitive)
|
||||
{
|
||||
#pragma parameter __D0 _CmpString(__A0, __A1, __D0)
|
||||
pascal long _CmpString(const char *a, const char *b, long lens) ONEWORDINLINE(0xA03C);
|
||||
#pragma parameter __D0 _CmpStringCase(__A0, __A1, __D0)
|
||||
pascal long _CmpStringCase(const char *a, const char *b, long lens) ONEWORDINLINE(0xA43C);
|
||||
#pragma parameter __D0 _CmpStringMarks(__A0, __A1, __D0)
|
||||
pascal long _CmpStringMarks(const char *a, const char *b, long lens) ONEWORDINLINE(0xA23C);
|
||||
#pragma parameter __D0 _CmpStringCaseMarks(__A0, __A1, __D0)
|
||||
pascal long _CmpStringCaseMarks(const char *a, const char *b, long lens) ONEWORDINLINE(0xA63C);
|
||||
|
||||
long lens = (str1[0] << 16) | str2[0];
|
||||
long result;
|
||||
if(caseSensitive)
|
||||
|
@ -6,7 +6,8 @@ export LANG=en
|
||||
|
||||
# cp $IN/[A-Z]*.h $OUT/
|
||||
for file in $(cd $IN; ls [A-Z]*.h); do
|
||||
tr '\r' '\n' < $IN/$file | sed 's/= \(0x[0-9A-Z]*\);/ONEWORDINLINE(\1);/' > $OUT/$file
|
||||
tr '\r' '\n' < $IN/$file > $OUT/$file
|
||||
#| sed 's/= \(0x[0-9A-Z]*\);/ONEWORDINLINE(\1);/' > $OUT/$file
|
||||
done
|
||||
|
||||
cat > $OUT/ConditionalMacros.h <<END_MARKER
|
||||
@ -30,31 +31,6 @@ tr '\r' '\n' < $IN/ConditionalMacros.h | sed 's/__GNUC__/__GNUC_DISABLED__/g' >>
|
||||
|
||||
cat >> $OUT/ConditionalMacros.h <<END_MARKER
|
||||
|
||||
#undef ONEWORDINLINE(w1)
|
||||
#undef TWOWORDINLINE(w1,w2)
|
||||
#undef THREEWORDINLINE(w1,w2,w3)
|
||||
#undef FOURWORDINLINE(w1,w2,w3,w4)
|
||||
#undef FIVEWORDINLINE(w1,w2,w3,w4,w5)
|
||||
#undef SIXWORDINLINE(w1,w2,w3,w4,w5,w6)
|
||||
#undef SEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7)
|
||||
#undef EIGHTWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8)
|
||||
#undef NINEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9)
|
||||
#undef TENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10)
|
||||
#undef ELEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11)
|
||||
#undef TWELVEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12)
|
||||
|
||||
#define ONEWORDINLINE(w1) __attribute__((__raw_inline__(w1)))
|
||||
#define TWOWORDINLINE(w1,w2) __attribute__((__raw_inline__(w1,w2)))
|
||||
#define THREEWORDINLINE(w1,w2,w3) __attribute__((__raw_inline__(w1,w2,w3)))
|
||||
#define FOURWORDINLINE(w1,w2,w3,w4) __attribute__((__raw_inline__(w1,w2,w3,w4)))
|
||||
#define FIVEWORDINLINE(w1,w2,w3,w4,w5) __attribute__((__raw_inline__(w1,w2,w3,w4,w5)))
|
||||
#define SIXWORDINLINE(w1,w2,w3,w4,w5,w6) __attribute__((__raw_inline__(w1,w2,w3,w4,w5,w6)))
|
||||
#define SEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7) __attribute__((__raw_inline__(w1,w2,w3,w4,w5,w6,w7)))
|
||||
#define EIGHTWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8) __attribute__((__raw_inline__(w1,w2,w3,w4,w5,w6,w7,w8)))
|
||||
#define NINEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9) __attribute__((__raw_inline__(w1,w2,w3,w4,w5,w6,w7,w8,w9)))
|
||||
#define TENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10) __attribute__((__raw_inline__(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10)))
|
||||
#define ELEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11) __attribute__((__raw_inline__(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11)))
|
||||
#define TWELVEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12) __attribute__((__raw_inline__(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12)))
|
||||
|
||||
#endif /* __CONDITIONALMACROS__WRAP__ */
|
||||
END_MARKER
|
||||
|
Loading…
Reference in New Issue
Block a user