From: John Hodge Date: Thu, 14 Jun 2012 08:38:01 +0000 (+0800) Subject: Usermode/libc - Implimented abs/labs for a ported game X-Git-Tag: rel0.15~611^2~62 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=7f9d69d6ea27607efe01e7513fd09a9a8319e5e5;p=tpg%2Facess2.git Usermode/libc - Implimented abs/labs for a ported game --- diff --git a/Usermode/Libraries/libc.so_src/stdlib.c b/Usermode/Libraries/libc.so_src/stdlib.c index 191f5261..ddd1234a 100644 --- a/Usermode/Libraries/libc.so_src/stdlib.c +++ b/Usermode/Libraries/libc.so_src/stdlib.c @@ -134,3 +134,7 @@ EXPORT int atoi(const char *str) if(neg) ret = -ret; return ret; } + +int abs(int j) { return j < 0 ? -j : j; } +long int labs(long int j) { return j < 0 ? -j : j; } +