home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROS_m68k_bin.lha / AROS / include / stdlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-08  |  1.2 KB  |  46 lines

  1. #ifndef _STDLIB_H
  2. #define _STDLIB_H
  3.  
  4. /*
  5.     (C) 1995-96 AROS - The Amiga Replacement OS
  6.     $Id: stdlib.h,v 1.8 1997/01/22 17:13:00 digulla Exp $
  7.  
  8.     Desc: ANSI-C header file stdlib.h
  9.     Lang: english
  10. */
  11. #ifndef _SYS_TYPES_H
  12. #   include <sys/types.h>
  13. #endif
  14.  
  15. #define EXIT_SUCCESS    0 /* Success exit status */
  16. #define EXIT_FAILURE    1 /* Failing exit status */
  17.  
  18. void __attribute__ ((noreturn)) exit (int code);
  19. void __attribute__ ((noreturn)) abort (void);
  20.  
  21. int abs (int j);
  22. long labs (long j);
  23. int atoi (const char * str);
  24. long atol (const char * str);
  25. long strtol (const char * str, char ** endptr, int base);
  26. unsigned long strtoul (const char * str, char ** endptr, int base);
  27.  
  28. int rand (void);
  29. void srand (unsigned int seed);
  30. /* Max. number returned by rand() */
  31. #ifndef RAND_MAX
  32. #   define RAND_MAX       2147483647
  33. #endif
  34.  
  35. void qsort (void * array, size_t count, size_t elementsize,
  36.     int (*comparefunction)(const void * element1, const void * element2));
  37. void * bsearch (const void * key, const void * base, size_t count,
  38.     size_t size, int (*comparefunction)(const void *, const void *));
  39.  
  40. void * malloc (size_t size);
  41. void * calloc (size_t count, size_t size);
  42. void * realloc (void * oldmem, size_t newsize);
  43. void free (void * memory);
  44.  
  45. #endif /* _STDLIB_H */
  46.