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

  1. #ifndef __STDLIB_H
  2. #define __STDLIB_H
  3.  
  4. #ifndef __INC_POS_PEXEC_TYPES_H
  5. #include <pExec/Types.h>
  6. #endif
  7.  
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12. #ifndef _WCHAR_T
  13. #define _WCHAR_T
  14. typedef char wchar_t;
  15. #endif
  16.  
  17. #ifndef ERANGE
  18. #define ERANGE 13
  19. #endif
  20.  
  21. #define EXIT_FAILURE (-1)
  22. #define EXIT_SUCCESS 0
  23.  
  24. #ifndef HUGE_VAL
  25. #ifdef _FLT_FFP
  26. #define HUGE_VAL    9.22337177E+17
  27. #else
  28. #define HUGE_VAL    1.797693134862316E+308
  29. #endif
  30. #endif
  31.  
  32. #define RAND_MAX 32767
  33.  
  34. #define    MB_CUR_MAX    1
  35. #ifndef MB_LEN_MAX
  36. #define    MB_LEN_MAX    1
  37. #endif
  38.  
  39. typedef struct
  40. {
  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.  
  94. #ifdef __cplusplus
  95. }
  96. #endif
  97.  
  98. #endif    /* _STDLIB_H */
  99.