git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SpiderScript - Commenting changes
[tpg/acess2.git]
/
Kernel
/
lib.c
diff --git
a/Kernel/lib.c
b/Kernel/lib.c
index
5f277b8
..
51dbe05
100644
(file)
--- a/
Kernel/lib.c
+++ b/
Kernel/lib.c
@@
-77,6
+77,8
@@
EXPORT(CheckMem);
EXPORT(ModUtil_LookupString);
EXPORT(ModUtil_SetIdent);
EXPORT(UnHex);
EXPORT(ModUtil_LookupString);
EXPORT(ModUtil_SetIdent);
EXPORT(UnHex);
+EXPORT(SwapEndian16);
+EXPORT(SwapEndian32);
// === CODE ===
/**
// === CODE ===
/**
@@
-260,7
+262,7
@@
int vsnprintf(char *__s, size_t __maxlen, const char *__format, va_list args)
}
}
else
}
}
else
- minSize =
1
;
+ minSize =
0
;
// - Precision
precision = -1;
// - Precision
precision = -1;
@@
-902,3
+904,12
@@
int UnHex(Uint8 *Dest, size_t DestSize, const char *SourceString)
}
return i/2;
}
}
return i/2;
}
+
+Uint16 SwapEndian16(Uint16 Val)
+{
+ return ((Val&0xFF)<<8) | ((Val>>8)&0xFF);
+}
+Uint32 SwapEndian32(Uint32 Val)
+{
+ return ((Val&0xFF)<<24) | ((Val&0xFF00)<<8) | ((Val>>8)&0xFF00) | ((Val>>24)&0xFF);
+}
UCC
git Repository :: git.ucc.asn.au