home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c329 / 2.img / INCL_A / STDLIB.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-15  |  1.9 KB  |  65 lines

  1. /*  stdlib.h
  2.  *  ANSI C Runtime Library
  3.  */
  4.  
  5. #ifndef _STDDEF_H
  6. #  include <stddef.h>
  7. #endif  /* _STDDEF_H */
  8. #ifndef _STDLIB_H
  9. #define _STDLIB_H
  10. typedef struct {
  11.     int quot;           /* quotient */
  12.     int rem;            /* remainder */
  13. } div_t;
  14. typedef div_t ldiv_t;
  15. typedef char wchar_t;
  16.  
  17. #include <math.h>       /* define ERANGE and HUGE_VAL */
  18. #define EXIT_FAILURE        1
  19. #define EXIT_SUCCESS        0
  20. #define RAND_MAX            (2029052025-1)
  21. #define mb_max              sizeof(wchar_t)
  22.  
  23. #define BLOCKSIZE       4096    /* block size to allocate with sbrk in malloc */
  24.  
  25. double atof(const char *nptr);
  26. int atoi(const char *nptr);
  27. long int atol(const char *nptr);
  28. double strtod(const char *nptr, char **endptr);
  29. long int strtol(const char *nptr, char **endptr, int base);
  30. unsigned long int strtoul(const char *nptr, char **endptr, int base);
  31.  
  32. int rand(void);
  33. void srand(unsigned int seed);
  34.  
  35. void *calloc(size_t nmemb, size_t size);
  36. void free(void *ptr);
  37. void *malloc(size_t size);
  38. void *realloc(void *ptr, size_t size);
  39.  
  40. void abort(void);
  41. int atexit(void (*func)(void));
  42. void exit(int status);
  43. char *getenv(const char *name);
  44. int system(const char *string);
  45.  
  46. void *bsearch(const void *key, const void *base, size_t nmemb, size_t size,
  47.     int (*compar)(const void *, const void *));
  48. void qsort(void *base, size_t nmemb, size_t size,
  49.     int (*compar)(const void *, const void *));
  50.  
  51. int abs(int j);
  52. #define abs(j)  ((j)<0?-(j):(j))
  53. /* the compiler can recognize the above construct and will produce better code */
  54. div_t div(int number, int denom);
  55. long int labs(long int j);
  56. #define labs(j)  ((j)<0?-(j):(j))
  57. ldiv_t ldiv(long int number, long int denom);
  58.  
  59. double cabs (double x, double y);
  60.  
  61. int mblen(const char *s, size_t n);
  62. int mbtowc(wchar_t *pwc, const char *s, size_t n);
  63. int wctomb(char *s, wchar_t wchar);
  64. #endif      /* _STDLIB_H */
  65.