Expand PMF_FN_* macros.
[netbsd-mini2440.git] / usr.sbin / sup / source / libc.h
blob2ee3dfbf7fc9a77a5a11d59de0aaf2a0f54a2100
1 /* $NetBSD: libc.h,v 1.7 2006/04/02 01:39:48 christos Exp $ */
3 /*
4 * Copyright (c) 1991 Carnegie Mellon University
5 * All Rights Reserved.
6 *
7 * Permission to use, copy, modify and distribute this software and its
8 * documentation is hereby granted, provided that both the copyright
9 * notice and this permission notice appear in all copies of the
10 * software, derivative works or modified versions, and any portions
11 * thereof, and that both notices appear in supporting documentation.
13 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
14 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
15 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
17 * Carnegie Mellon requests users of this software to return to
19 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
20 * School of Computer Science
21 * Carnegie Mellon University
22 * Pittsburgh PA 15213-3890
24 * any improvements or extensions that they make and grant Carnegie the rights
25 * to redistribute these changes.
28 **********************************************************************
29 * HISTORY
31 * Revision 1.7 89/04/03 11:10:45 vanryzin
32 * Changed definition of qsort for c++ to indicate the procedure
33 * passed to qsort has parameters. Since we were unsure if ANSI C
34 * could handle the syntax I placed the new definition within #if
35 * defined(c_plusplus) conditionals. This may not be necessary
36 * and perhaps should be fixed at a later time.
37 * [89/04/03 vanryzin]
39 * Revision 1.6 89/02/05 15:55:57 gm0w
40 * Added extern char *errmsg().
41 * [89/02/04 gm0w]
43 * Revision 1.5 89/01/20 15:34:40 gm0w
44 * Moved all of the STDC changes to other existing include files
45 * back into this one. Added non-STDC extern declarations for
46 * all functions without int return values to match those defined
47 * by STDC. Added include of sysent.h. Removed obsolete cdate
48 * extern declaration.
49 * [88/12/17 gm0w]
51 * Revision 1.4 88/12/22 16:58:56 mja
52 * Correct __STDC__ parameter type for getenv().
53 * [88/12/20 dld]
55 * Revision 1.3 88/12/14 23:31:42 mja
56 * Made file reentrant. Added declarations for __STDC__.
57 * [88/01/06 jjk]
59 * 30-Apr-88 Glenn Marcy (gm0w) at Carnegie-Mellon University
60 * Added pathof() extern.
62 * 01-Dec-85 Glenn Marcy (gm0w) at Carnegie-Mellon University
63 * Added getname() extern.
65 * 29-Nov-85 Glenn Marcy (gm0w) at Carnegie-Mellon University
66 * Added lseek() extern.
68 * 02-Nov-85 Glenn Marcy (gm0w) at Carnegie-Mellon University
69 * Added estrdup() extern.
71 * 14-Aug-81 Mike Accetta (mja) at Carnegie-Mellon University
72 * Created.
74 **********************************************************************
77 #ifndef _LIBC_H_
78 #define _LIBC_H_ 1
80 #ifndef _TYPES_
81 #include <sys/types.h>
82 #endif /* _TYPES_ */
84 #ifndef FILE
85 #include <stdio.h>
86 #endif /* FILE */
88 #ifndef _STRINGS_H_
89 #include <strings.h>
90 #endif /* _STRINGS_H_ */
92 #ifndef _STRING_H_
93 #include <string.h>
94 #endif /* _STRINGS_H_ */
96 #ifndef _TIME_H_
97 #include <time.h>
98 #endif /* _TIME_H_ */
100 /* CMU stdio additions */
101 extern FILE *fopenp(const char*, const char*, char*, char*);
102 extern FILE *fwantread(const char*, const char*, const char*, const char*);
103 extern FILE *fwantwrite(const char*, const char*, const char*, const char*,
104 int);
106 /* CMU string routines */
107 extern char* foldup(char*, const char*);
108 extern char* folddown(char*, const char*);
109 extern char* sindex(const char*, const char*);
110 extern char _argbreak;
111 extern char* getstr(const char*, char*, char*);
112 extern int getstab(const char*, const char**, const char*);
113 extern int getsearch(const char*, const char**, const char*);
114 extern char* strarg(const char**, const char*, const char*, char*, char*);
115 extern int stabarg(const char**, const char*, const char*, const char**,
116 const char*);
117 extern int searcharg(const char**, const char*, const char*, const char**,
118 const char*);
119 extern int getint(const char*, int, int, int);
120 extern int intarg(const char**, const char*, const char*, int, int, int);
121 extern long getlong(const char*, long, long, long);
122 extern long longarg(const char**, const char*, const char*, long, long, long);
123 extern short getshort(const char*, short, short, short);
124 extern short shortarg(const char**, const char*, const char*,
125 short, short, short);
126 extern float getfloat(const char*, float, float, float);
127 extern float floatarg(const char**, const char*, const char*,
128 float, float, float);
129 extern double getdouble(const char*, double, double, double);
130 extern double doublearg(const char**, const char*, const char*,
131 double, double, double);
132 extern unsigned int getoct(const char*, unsigned int, unsigned int,
133 unsigned int);
134 extern unsigned int octarg(const char**, const char*, const char*,
135 unsigned int, unsigned int, unsigned int);
136 extern unsigned int gethex(const char*, unsigned int, unsigned int,
137 unsigned int);
138 extern unsigned int hexarg(const char**, const char*, const char*,
139 unsigned int, unsigned int, unsigned int);
140 extern unsigned int atoh(const char*);
141 extern char *concat(const char*, int, ...);
143 /* CMU library routines */
144 extern char *getname(int);
145 extern char *pathof(char *);
147 /* CMU time additions */
148 extern long gtime(const struct tm*);
149 extern long atot(const char*);
151 /* 4.3 BSD standard library routines; taken from man(3) */
152 #if defined(c_plusplus)
153 typedef int (*PFI2)(...);
154 #endif /* c_plusplus */
155 #endif /* not _LIBC_H_ */