home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / TURBOC_1.LZH / INCLUDE / STDLIB.H < prev    next >
Text File  |  1990-03-02  |  2KB  |  78 lines

  1. /*      STDLIB.H
  2.  
  3.         Standard Library Includes
  4.  
  5.         Copyright (c) Borland International 1988
  6.         All Rights Reserved.
  7. */
  8.  
  9.  
  10. #if !defined( __STDLIB )
  11. #define __STDLIB
  12.  
  13.  
  14. #define EXIT_FAILURE    !0
  15. #define EXIT_SUCCESS    0
  16. #define RAND_MAX        32767
  17.  
  18.  
  19. typedef unsigned long   size_t;
  20.  
  21.  
  22. typedef struct
  23. {
  24.     int    quot;
  25.     int    rem;
  26. } div_t;
  27.  
  28. typedef struct
  29. {
  30.     long   quot;
  31.     long   rem;
  32. } ldiv_t;
  33.  
  34.  
  35. double  atof( const char *str );
  36. int     atoi( const char *str );
  37. long    atol( const char *str );
  38.  
  39. char    *ecvt( double d, int ndig, int *dec, int *sign );
  40. char    *gcvt( double value, int dec, char * buf );
  41.  
  42. char    *itoa( int value, char *string, int radix );
  43. char    *ltoa( long value, char *string, int radix );
  44. char    *ultoa( unsigned long value, char *string, int radix );
  45.  
  46. void    *malloc( size_t size );
  47. void    *calloc( size_t elt_count, size_t elt_size );
  48. void    free( void *ptr );
  49. void    *realloc( void *ptr, size_t size );
  50.  
  51. int     abs( int x );
  52. long    labs( long x );
  53. div_t   div( int n, int d );
  54. ldiv_t  ldiv( long n, long d );
  55.  
  56. int     rand( void );
  57. void    srand( unsigned int seed );
  58. #define random( x ) (rand() % (x))
  59. double  strtod( const char *s, char **endptr );
  60.  
  61. int     system( const char *command );
  62.  
  63. void    exit( int status );
  64. void    abort( void );
  65. int     atexit( void (*func)( void ) );
  66.  
  67. char    *getenv( const char *name );
  68.  
  69. void    *bsearch( const void *key, const void *base,
  70.           size_t nmemb, size_t size,
  71.           int (*compar)() );
  72. void    qsort( void *base, size_t nmemb, size_t size,
  73.           int (*compar)() );
  74.  
  75. #endif
  76.  
  77. /************************************************************************/
  78.