home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / DC-POS24.LZX / pOS / pOSxA.lzx / pOSxA / stdlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-12  |  2.1 KB  |  94 lines

  1. #ifndef __STDLIB_H
  2. #define __STDLIB_H
  3.  
  4. # ifndef _SIZE_T
  5. # define _SIZE_T
  6.   typedef unsigned long size_t;
  7. # endif
  8.  
  9. #ifndef _WCHAR_T
  10. #define _WCHAR_T
  11. typedef char wchar_t;
  12. #endif
  13.  
  14. # ifndef ERANGE
  15. #define ERANGE 13
  16. # endif
  17.  
  18. #ifndef NULL
  19. #define NULL ((void *)0)
  20. #endif
  21.  
  22. #define EXIT_FAILURE (-1)
  23. #define EXIT_SUCCESS 0
  24.  
  25. #ifndef HUGE_VAL
  26. #ifdef _FLT_FFP
  27. #define HUGE_VAL    9.22337177E+17
  28. #else
  29. #define HUGE_VAL    1.797693134862316E+308
  30. #endif
  31. #endif
  32.  
  33. #define RAND_MAX 32767
  34.  
  35. #define    MB_CUR_MAX    1
  36. #ifndef MB_LEN_MAX
  37. #define    MB_LEN_MAX    1
  38. #endif
  39.  
  40. typedef struct {
  41.     int quot;
  42.     int rem;
  43. } div_t;                        /* quotient and remainder for div() */
  44.  
  45. typedef struct {
  46.     long quot;
  47.     long rem;
  48. } ldiv_t;                        /* quotient and remainder for ldiv() */
  49.  
  50. double atof(const char *_nptr);
  51. int atoi(const char *_nptr);
  52. long int atol(const char *_nptr);
  53. double strtod(const char *_nptr, char **_endptr);
  54. long int strtol(const char *_nptr, char **_endptr, int _base);
  55. unsigned long int strtoul(const char *_nptr, char **_endptr, int _base);
  56.  
  57. int rand(void);
  58. void srand(unsigned int _seed);
  59.  
  60. void *calloc(size_t _nmemb, size_t _size);
  61. void free(void *_ptr);
  62. void *malloc(size_t _size);
  63. void *realloc(void *_ptr, size_t _size);
  64.  
  65. void abort(void);
  66. int atexit(void (*_func)(void));
  67. void exit(int _status);
  68. char *getenv(const char *_name);
  69. int system(const char *_string);
  70.  
  71. void *bsearch(const void *_key, const void *_base, size_t _nmemb, size_t _size,
  72.                                 int (*_compar)(const void *, const void *));
  73. void qsort(void *_base, size_t _nmemb, size_t _size,
  74.                                 int (*_compar)(const void *, const void *));
  75.  
  76. int abs(int _j);
  77. div_t div(int _numer, int _denom);
  78. long int labs(long int _j);
  79. ldiv_t ldiv(long int _numer, long int _denom);
  80.  
  81. int mblen(const char *_s, size_t _n);
  82. int mbtowc(wchar_t *_pwc, const char *_s, size_t _n);
  83. int wctomb(char *_s, wchar_t _wchar);
  84. size_t mbstowcs(wchar_t *_pwcs, const char *_s, size_t _n);
  85. size_t wcstombs(char *_s, const wchar_t *_pwcs, size_t _n);
  86.  
  87. #if !__STDC__
  88. /* non ANSI C functions */
  89. void ftoa(double _val, char *_buf, int, int);
  90. long double strtold(const char *_nptr, char **_endptr);
  91. #endif    /* !__STDC__ */
  92.  
  93. #endif    /* _STDLIB_H */
  94.