Tizen 2.0 Release
[external/mawk.git] / nstd.h
1 /* nstd.h */
2
3 /* Never Standard.h
4
5    This has all the prototypes that are supposed to
6    be in a standard place but never are, and when they are
7    the standard place isn't standard
8 */
9
10 /*
11 $Log: nstd.h,v $
12  * Revision 1.6  1995/06/18  19:42:22  mike
13  * Remove some redundant declarations and add some prototypes
14  *
15  * Revision 1.5  1995/04/20  20:26:56  mike
16  * beta improvements from Carl Mascott
17  *
18  * Revision 1.4  1994/12/11  22:08:24  mike
19  * add STDC_MATHERR
20  *
21  * Revision 1.3  1993/07/15  23:56:09  mike
22  * general cleanup
23  *
24  * Revision 1.2  1993/07/07  00:07:43  mike
25  * more work on 1.2
26  *
27  * Revision 1.1  1993/07/04  12:38:06  mike
28  * Initial revision
29  *
30 */
31
32 #ifndef  NSTD_H
33 #define  NSTD_H         1
34
35 #include "config.h"
36
37 #ifdef   NO_PROTOS
38 #define  PROTO(name,args)       name()
39 #else
40 #define  PROTO(name,args)       name args
41 #endif
42
43
44
45 /* types */
46
47 #ifdef  NO_VOID_STAR
48 typedef  char *PTR ;
49 #else
50 typedef  void *PTR ;
51 #endif
52
53 #ifdef   SIZE_T_STDDEF_H
54 #include <stddef.h>
55 #else
56 #ifdef   SIZE_T_TYPES_H
57 #include <sys/types.h>
58 #else
59 typedef  unsigned  size_t ;
60 #endif
61 #endif
62
63 /* stdlib.h */
64
65 double  PROTO(strtod, (const char*, char**)) ;
66 void    PROTO(free, (void*)) ;
67 PTR     PROTO(malloc, (size_t)) ;
68 PTR     PROTO(realloc, (void*,size_t)) ;
69 void    PROTO(exit, (int)) ;
70 char*   PROTO(getenv, (const char*)) ;
71
72 /* string.h */
73
74 int     PROTO(memcmp, (const void*,const void*,size_t)) ;
75 PTR     PROTO(memcpy, (void*,const void*,size_t)) ;
76 PTR     PROTO(memset, (void*,int,size_t)) ;
77 char*   PROTO(strchr, (const char*, int)) ;
78 int     PROTO(strcmp, (const char*,const char*)) ;
79 char*   PROTO(strcpy, (char *, const char*)) ;
80 size_t  PROTO(strlen, (const char*)) ;
81 int     PROTO(strncmp, (const char*,const char*,size_t)) ;
82 char*   PROTO(strncpy, (char*, const char*, size_t)) ;
83 char*   PROTO(strrchr, (const char*,int)) ;
84 char*   PROTO(strerror, (int)) ;
85
86
87 #ifdef  NO_ERRNO_H
88 extern  int errno ;
89 #else
90 #include <errno.h>
91 #endif
92
93 /* math.h */
94 double  PROTO(fmod,(double,double)) ;
95
96 /* if have to diddle with errno to get errors from the math library */
97 #ifndef STDC_MATHERR
98 #define STDC_MATHERR   (FPE_TRAPS_ON && NO_MATHERR)
99 #endif
100
101 #endif  /* NSTD_H */
102