home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / gnu / ixemul-39.47-env-bin.lha / include / stdlib.h < prev    next >
C/C++ Source or Header  |  1994-07-08  |  5KB  |  135 lines

  1. /*-
  2.  * Copyright (c) 1990 The Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms, with or without
  6.  * modification, are permitted provided that the following conditions
  7.  * are met:
  8.  * 1. Redistributions of source code must retain the above copyright
  9.  *    notice, this list of conditions and the following disclaimer.
  10.  * 2. Redistributions in binary form must reproduce the above copyright
  11.  *    notice, this list of conditions and the following disclaimer in the
  12.  *    documentation and/or other materials provided with the distribution.
  13.  * 3. All advertising materials mentioning features or use of this software
  14.  *    must display the following acknowledgement:
  15.  *    This product includes software developed by the University of
  16.  *    California, Berkeley and its contributors.
  17.  * 4. Neither the name of the University nor the names of its contributors
  18.  *    may be used to endorse or promote products derived from this software
  19.  *    without specific prior written permission.
  20.  *
  21.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  22.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  25.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  27.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  29.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  30.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31.  * SUCH DAMAGE.
  32.  *
  33.  *    @(#)stdlib.h    5.13 (Berkeley) 6/4/91
  34.  */
  35.  
  36. #ifndef _STDLIB_H_
  37. #define _STDLIB_H_
  38. #include <sys/types.h>
  39.  
  40. #ifdef    _WCHAR_T_
  41. typedef    _WCHAR_T_    wchar_t;
  42. #undef    _WCHAR_T_
  43. #endif
  44.  
  45. #ifndef NULL
  46. #define NULL 0
  47. #endif
  48.  
  49. typedef struct {
  50.     int quot;        /* quotient */
  51.     int rem;        /* remainder */
  52. } div_t;
  53. typedef struct {
  54.     long quot;        /* quotient */
  55.     long rem;        /* remainder */
  56. } ldiv_t;
  57.  
  58. /* #define    EXIT_FAILURE    1 */
  59. /* for amigados, this makes more sense */
  60. #define    EXIT_FAILURE    20
  61. #define    EXIT_SUCCESS    0
  62.  
  63. #define    RAND_MAX    0x7fffffff
  64.  
  65. #define    MB_CUR_MAX    1    /* XXX */
  66.  
  67. #include <sys/cdefs.h>
  68.  
  69. __BEGIN_DECLS
  70. void     abort __P((void));
  71. int     abs __P((int));
  72. int     atexit __P((void (*)(void)));
  73. double     atof __P((const char *));
  74. int     atoi __P((const char *));
  75. long     atol __P((const char *));
  76. void    *bsearch __P((const void *, const void *, size_t,
  77.         size_t, int (*)(const void *, const void *)));
  78. void    *calloc __P((size_t, size_t));
  79. div_t     div __P((int, int));
  80. void     exit __P((int));
  81. void     free __P((void *));
  82. char    *getenv __P((const char *));
  83. long     labs __P((long));
  84. ldiv_t     ldiv __P((long, long));
  85. void    *malloc __P((size_t));
  86. void     qsort __P((void *, size_t, size_t,
  87.         int (*)(const void *, const void *)));
  88. int     rand __P((void));
  89. void    *realloc __P((void *, size_t));
  90. void     srand __P((unsigned));
  91. double     strtod __P((const char *, char **));
  92. long     strtol __P((const char *, char **, int));
  93. unsigned long
  94.      strtoul __P((const char *, char **, int));
  95. int     system __P((const char *));
  96.  
  97. /* these are currently just stubs */
  98. int     mblen __P((const char *, size_t));
  99. size_t     mbstowcs __P((wchar_t *, const char *, size_t));
  100. int     wctomb __P((char *, wchar_t));
  101. int     mbtowc __P((wchar_t *, const char *, size_t));
  102. size_t     wcstombs __P((char *, const wchar_t *, size_t));
  103.  
  104. #ifndef _ANSI_SOURCE
  105. void     cfree __P((void *));
  106. int     putenv __P((const char *));
  107. #if 0
  108. int     setenv __P((const char *, const char *, ...));
  109. #else
  110. int     setenv __P((const char *, const char *, int));
  111. #endif
  112. #endif /* not ANSI */
  113.  
  114. #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
  115. void    *alloca __P((size_t));    /* built-in for gcc */
  116. extern     char *optarg;            /* getopt(3) external variables */
  117. extern     int optind;
  118. extern     int opterr;
  119. int     getopt __P((int, char * const *, const char *));
  120. extern     char *suboptarg;        /* getsubopt(3) external variable */
  121. int     getsubopt __P((char **, char * const *, char **));
  122. int     heapsort __P((void *, size_t, size_t,
  123.         int (*)(const void *, const void *)));
  124. char    *initstate __P((unsigned, char *, int));
  125. int     radixsort __P((const u_char **, int, const u_char *, u_char));
  126. long     random __P((void));
  127. char    *setstate __P((char *));
  128. void     srandom __P((unsigned));
  129. void     unsetenv __P((const char *));
  130. #endif /* neither ANSI nor POSIX */
  131.  
  132. __END_DECLS
  133.  
  134. #endif /* _STDLIB_H_ */
  135.