/*
Copyright (c) 1993 Xerox Corporation.  All rights reserved.
*/
/*
$Id$

$Date$
 *
 * PCR stdlib.h ANSI C 4.10 
 */
/* Chauser, October 28, 1993 3:29 pm PDT */

#ifndef ←←PCR←stdlib←h
#define ←←PCR←stdlib←h 1

#include <host/stdlib.h>

/*
 * 4.10.1 String conversion
 *
 *  Not overridden: atof strtod
 */

extern int PCR←atoi(const char *s);

extern long PCR←atol(const char *s);

extern long PCR←strtol(const char *s, char **endp, int base);

extern unsigned long PCR←strtoul(const char *s, char **endp, int base);

#ifndef PCR←NO←RENAME

#undef atoi
#define atoi PCR←atoi

#undef atol
#define atol PCR←atol

#undef strtol
#define strtol PCR←strtol

#undef strtoul
#define strtoul PCR←strtoul

#endif /* !PCR←NO←RENAME */


/*
 * 4.10.2 Random Numbers
 */


extern int PCR←rand(void);

extern void PCR←srand(unsigned int seed);


#ifndef PCR←NO←RENAME

#undef rand
#define rand PCR←rand

#undef srand
#define srand PCR←srand

#endif /* !PCR←NO←RENAME */


/*
 * 4.10.3 Memory Management
 */

#ifndef PCR←calloc
extern void *PCR←calloc(size←t nmemb, size←t size);
#endif

#ifndef PCR←free
extern void PCR←free(void *ptr);
#endif

#ifndef PCR←malloc
extern void *PCR←malloc(size←t size);
#endif

#ifndef PCR←realloc
extern void *PCR←realloc(void *ptr, size←t size);
#endif

#ifndef PCR←NO←RENAME

#undef calloc
#define calloc PCR←calloc

#undef free
#define free PCR←free

#undef malloc
#define malloc PCR←malloc

#undef realloc
#define realloc PCR←realloc

#endif /* !PCR←NO←RENAME */


/*
 * 4.10.4 Communication with the environment
 */

extern void PCR←abort(void);
    /* per-thread */

extern int PCR←atexit(void (*func)(void));
extern void PCR←exit(int status);
    /* per-thread */

extern char *PCR←getenv(const char *name);
extern void PCR←setenv(const char *name, const char *value); /* not ANSI */
    /*
     * The environment is per-thread, initialized to UNIX environment
     *   and inherited across thread fork.
     */ 

extern int PCR←system(const char *string);


#ifndef PCR←NO←RENAME

#undef abort
#define abort PCR←abort

#undef atexit
#define atexit PCR←atexit

#undef exit
#define exit PCR←exit

#undef getenv
#define getenv PCR←getenv

#undef system
#define system PCR←system

#endif /* !PCR←NO←RENAME */

/*
 * 4.10.5 Searching and Sorting
 *
 * Not overridden: bsearch qsort
 */

/*
 * 4.10.6 Integer Arithmetic
 *
 * Not overridden: abs div labs ldiv
 */

/*
 * 4.10.7 Multibyte characters
 *
 * Not overridden: mblen mbtowc wctomb
 */


/*
 * 4.10.8 Multibyte strings
 *
 * Not overridden: mbstowcs wcstombs
 */


#endif /* !←←PCR←stdlib←h */

/*
$Log$
*/