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
Kernel/VFS - Fixed missuse of strcmp that caused userland compilations to break
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
lib.c
diff --git
a/KernelLand/Kernel/lib.c
b/KernelLand/Kernel/lib.c
index
60cbd4c
..
f07e9f3
100644
(file)
--- a/
KernelLand/Kernel/lib.c
+++ b/
KernelLand/Kernel/lib.c
@@
-17,8
+17,10
@@
const short DAYS_BEFORE[] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 3
// === PROTOTYPES ===
#if 0
int atoi(const char *string);
// === PROTOTYPES ===
#if 0
int atoi(const char *string);
+ int ParseInt(const char *string, int *Val);
void itoa(char *buf, Uint64 num, int base, int minLength, char pad);
int vsnprintf(char *__s, size_t __maxlen, const char *__format, va_list args);
void itoa(char *buf, Uint64 num, int base, int minLength, char pad);
int vsnprintf(char *__s, size_t __maxlen, const char *__format, va_list args);
+ int snprintf(char *__s, size_t __n, const char *__format, ...);
int sprintf(char *__s, const char *__format, ...);
#endif
int tolower(int c);
int sprintf(char *__s, const char *__format, ...);
#endif
int tolower(int c);
@@
-56,6
+58,7
@@
void format_date(tTime TS, int *year, int *month, int *day, int *hrs, int *mins,
EXPORT(atoi);
EXPORT(itoa);
EXPORT(vsnprintf);
EXPORT(atoi);
EXPORT(itoa);
EXPORT(vsnprintf);
+EXPORT(snprintf);
EXPORT(sprintf);
EXPORT(tolower);
EXPORT(strucmp);
EXPORT(sprintf);
EXPORT(tolower);
EXPORT(strucmp);
@@
-84,6
+87,7
@@
EXPORT(ModUtil_SetIdent);
EXPORT(UnHex);
EXPORT(SwapEndian16);
EXPORT(SwapEndian32);
EXPORT(UnHex);
EXPORT(SwapEndian16);
EXPORT(SwapEndian32);
+EXPORT(SwapEndian64);
EXPORT(memmove);
// === CODE ===
EXPORT(memmove);
// === CODE ===
@@
-408,6
+412,20
@@
int vsnprintf(char *__s, size_t __maxlen, const char *__format, va_list args)
}
#undef PUTCH
}
#undef PUTCH
+/**
+ */
+int snprintf(char *__s, size_t __n, const char *__format, ...)
+{
+ va_list args;
+ int ret;
+
+ va_start(args, __format);
+ ret = vsnprintf(__s, __n, __format, args);
+ va_end(args);
+
+ return ret;
+}
+
/**
*/
int sprintf(char *__s, const char *__format, ...)
/**
*/
int sprintf(char *__s, const char *__format, ...)
@@
-1043,6
+1061,10
@@
Uint32 SwapEndian32(Uint32 Val)
{
return ((Val&0xFF)<<24) | ((Val&0xFF00)<<8) | ((Val>>8)&0xFF00) | ((Val>>24)&0xFF);
}
{
return ((Val&0xFF)<<24) | ((Val&0xFF00)<<8) | ((Val>>8)&0xFF00) | ((Val>>24)&0xFF);
}
+Uint64 SwapEndian64(Uint64 Val)
+{
+ return SwapEndian32(Val >> 32) | ((Uint64)SwapEndian32(Val) << 32);
+}
void *memmove(void *__dest, const void *__src, size_t len)
{
void *memmove(void *__dest, const void *__src, size_t len)
{
UCC
git Repository :: git.ucc.asn.au