/*-----------------------------------------------------------------------------+
|                                                                              |
|       Copyright (c), Raisonance S.A.S., 1987-2007                            |
|                                                                              |
+------------------------------------------------------------------------------+
|                                                                              |
|       File: STDLIB.H                                                         |
|                                                                              |
+--------------+-------+----------------------------------------------+--------+
|     DATE     |VERSION| HISTORY/CHANGES                              |   BY   |
|  (MM/DD/YY)  | VX.Y  |                                              |        |
+--------------+-------+----------------------------------------------+--------+
|   ??/??/??   |  1.0  | Initial implementation                       |   XX   |
|   11/07/02   |  1.1  | Reimplementation                             |   JR   |
|   11/30/05   |  1.2  | ST7 compiler / Pass register masks          |   SC   |
+--------------+-------+----------------------------------------------+--------+
|Purpose    :                                                                  |
|   General utilities                                                          |
+-----------------------------------------------------------------------------*/

#ifndef  _STDLIB_H_
#define  _STDLIB_H_

#pragma SAVE

/* include particular files at this point */
#if defined(__RC51__)
   #include <51\MAIN_C51.h>
#elif defined(__RCMX__)
   #include <MX\MAIN_MX.h>
#elif defined(__RCXA__)
   #include <XA\MAIN_XA.h>
#elif defined(__RCST5__)
   #include <ST5\MAIN_ST5.h>
#elif defined(__RCST6__)
   #include <ST6\MAIN_ST6.h>
#elif defined(__RCST7__)
   #include <ST7\MAIN_ST7.h>
#elif defined(__RCMP__)
   #include <MP\MAIN_MP.h>
#endif

#ifndef __not_supporting_stdlib__
extern int           atoi (const char LOCAL_GENERIC *s) reentrant;
extern long          atol (const char  LOCAL_GENERIC *s) reentrant;
extern long          strtol (const char  LOCAL_GENERIC *s, char  LOCAL_GENERIC * LOCAL_GENERIC *end, int base) reentrant;
extern unsigned long strtoul (const char  LOCAL_GENERIC *s, char  LOCAL_GENERIC * LOCAL_GENERIC *endp, int base) reentrant;
extern int           rand (void) reentrant;
extern void          srand (unsigned int seed) reentrant;
extern int           abs (int n) reentrant;
extern long          labs (long n) reentrant;

extern double        atof  (const char  LOCAL_GENERIC *s) reentrant;
extern double        strtod (const char LOCAL_GENERIC *s, char  LOCAL_GENERIC * LOCAL_GENERIC *endp) reentrant;
#endif

#if defined(__RCMP__)
   #include <MP\REGMASK.h>
#endif

#pragma RESTORE

#include <alloc.h>

#endif
