mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Switch to more modern int swapping routines
This commit is contained in:
parent
4eeda831aa
commit
9a73214b9f
|
@ -312,7 +312,7 @@ char *OSTypeToStr(char *buf, OSType t)
|
||||||
{
|
{
|
||||||
char *p = buf;
|
char *p = buf;
|
||||||
char str[4], *q = str;
|
char str[4], *q = str;
|
||||||
*(UInt32 *)str = EndianU32_NtoB(t);
|
*(UInt32 *)str = OSSwapHostToBigInt32(t);
|
||||||
for (int i = 0; i < 4; ++i) {
|
for (int i = 0; i < 4; ++i) {
|
||||||
if (isprint(*q) && *q != '\\')
|
if (isprint(*q) && *q != '\\')
|
||||||
*p++ = *q++;
|
*p++ = *q++;
|
||||||
|
@ -348,7 +348,7 @@ int StrToOSType(const char *str, OSType &t)
|
||||||
p += 2;
|
p += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
t = EndianU32_BtoN(*(UInt32 *)buf);
|
t = OSSwapBigToHostInt32(*(UInt32 *)buf);
|
||||||
return p - str;
|
return p - str;
|
||||||
fail:
|
fail:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user