From: cuz Date: Fri, 25 Oct 2002 20:46:57 +0000 (+0000) Subject: Added the div function X-Git-Tag: V2.12.0~2162 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=55baa52735573a3754d7f7b23535f781502fa1f1;p=cc65 Added the div function git-svn-id: svn://svn.cc65.org/cc65/trunk@1470 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/include/stdlib.h b/include/stdlib.h index 32184f1fa..8a4ccd55a 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -46,7 +46,11 @@ #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 - +/* Return type of the div function */ +typedef struct { + int rem; + int quot; +} div_t; /* Memory management */ void* __fastcall__ malloc (size_t size); @@ -71,6 +75,7 @@ long __fastcall__ atol (const char* s); int __fastcall__ atexit (void (*exitfunc) (void)); void* bsearch (const void* key, const void* base, size_t n, size_t size, int (*cmp) (const void*, const void*)); +div_t __fastcall__ div (int numer, int denom); void exit (int ret); char* __fastcall__ getenv (const char* name); void qsort (void* base, size_t count, size_t size,