|
|
1.1 root 1: /* @(#)standard.h 1.19 98/10/23 Copyright 1985 J. Schilling */
2: /*
3: * standard definitions
4: *
5: * This file should be included past:
6: *
7: * mconfig.h / config.h
8: * stdio.h
9: * stdlib.h
10: * unistd.h
11: * string.h
12: * sys/types.h
13: *
14: * Copyright (c) 1985 J. Schilling
15: */
16: /*
17: * This program is free software; you can redistribute it and/or modify
18: * it under the terms of the GNU General Public License as published by
19: * the Free Software Foundation; either version 2, or (at your option)
20: * any later version.
21: *
22: * This program is distributed in the hope that it will be useful,
23: * but WITHOUT ANY WARRANTY; without even the implied warranty of
24: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25: * GNU General Public License for more details.
26: *
27: * You should have received a copy of the GNU General Public License
28: * along with this program; see the file COPYING. If not, write to
29: * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
30: */
31:
32: #ifndef _STANDARD_H
33: #define _STANDARD_H
34:
35: #ifdef M68000
36: # ifndef tos
37: # define JOS 1
38: # endif
39: #endif
40: #include "scg/prototyp.h"
41:
42: /*
43: * fundamental constants
44: */
45: #ifndef NULL
46: # define NULL 0
47: #endif
48: #ifndef TRUE
49: # define TRUE 1
50: # define FALSE 0
51: #endif
52: #define YES 1
53: #define NO 0
54:
55: /*
56: * Program exit codes
57: */
58: #define EX_BAD (-1)
59:
60: /*
61: * standard storage class definitions
62: */
63: #define GLOBAL extern
64: #define IMPORT extern
65: #define EXPORT
66: #define INTERN static
67: #define LOCAL static
68: #define FAST register
69: #if defined(_JOS) || defined(JOS)
70: # define global extern
71: # define import extern
72: # define export
73: # define intern static
74: # define local static
75: # define fast register
76: #endif
77: #ifndef PROTOTYPES
78: # ifndef const
79: # define const
80: # endif
81: # ifndef signed
82: # define signed
83: # endif
84: # ifndef volatile
85: # define volatile
86: # endif
87: #endif /* PROTOTYPES */
88:
89: /*
90: * standard type definitions
91: */
92: typedef int BOOL;
93: typedef int bool;
94: #ifdef JOS
95: # define NO_VOID
96: #endif
97: #ifdef NO_VOID
98: typedef int VOID;
99: # ifndef lint
100: typedef int void;
101: # endif
102: #else
103: typedef void VOID;
104: #endif
105:
106: #if defined(_SIZE_T) || defined(_T_SIZE_) || defined(_T_SIZE) || \
107: defined(__SIZE_T) || defined(_SIZE_T_) || \
108: defined(_GCC_SIZE_T) || defined(_SIZET_) || \
109: defined(__sys_stdtypes_h) || defined(___int_size_t_h)
110:
111: #ifndef HAVE_SIZE_T
112: # define HAVE_SIZE_T
113: #endif
114:
115: #endif
116:
117: #ifdef EOF /* stdio.h has been included */
118: extern int _cvmod __PR((const char *, int *, int *));
119: extern FILE *_fcons __PR((FILE *, int, int));
120: extern FILE *fdup __PR((FILE *));
121: extern int fdown __PR((FILE *));
122: extern int fexecl __PR((const char *, FILE *, FILE *, FILE *,
123: const char *, ...));
124: extern int fexecle __PR((const char *, FILE *, FILE *, FILE *,
125: const char *, ...));
126: /* 6th arg not const, fexecv forces av[ac] = NULL */
127: extern int fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
128: char **));
129: extern int fexecve __PR((const char *, FILE *, FILE *, FILE *,
130: char * const *, char * const *));
131: extern int fgetline __PR((FILE *, char *, int));
132: extern int fgetstr __PR((FILE *, char *, int));
133: extern void file_raise __PR((FILE *, int));
134: extern int fileclose __PR((FILE *));
135: extern FILE *fileluopen __PR((int, const char *));
136: extern FILE *fileopen __PR((const char *, const char *));
137: extern long filepos __PR((FILE *));
138: extern int fileread __PR((FILE *, void *, int));
139: extern int ffileread __PR((FILE *, void *, int));
140: extern FILE *filereopen __PR((const char *, const char *, FILE *));
141: extern long fileseek __PR((FILE *, long));
142: extern long filesize __PR((FILE *));
143: #ifdef S_IFMT
144: extern int filestat __PR((FILE *, struct stat *));
145: #endif
146: extern int filewrite __PR((FILE *, void *, int));
147: extern int ffilewrite __PR((FILE *, void *, int));
148: extern int flush __PR((void));
149: extern int fpipe __PR((FILE **));
150: extern int fprintf __PR((FILE *, const char *, ...));
151: extern int getbroken __PR((FILE *, char *, char, char **, int));
152: extern int ofindline __PR((FILE *, char, const char *, int,
153: char **, int));
154: extern int peekc __PR((FILE *));
155:
156: extern int spawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
157: extern int spawnl __PR((FILE *, FILE *, FILE *,
158: const char *, const char *, ...));
159: extern int spawnv_nowait __PR((FILE *, FILE *, FILE *,
160: const char *, int, char *const*));
161: #endif /* EOF */
162:
163: extern int _niread __PR((int, void *, int));
164: extern int _openfd __PR((const char *, int));
165: extern void comerr __PR((const char *, ...));
166: extern void comerrno __PR((int, const char *, ...));
167: extern int errmsg __PR((const char *, ...));
168: extern int errmsgno __PR((int, const char *, ...));
169: extern char *errmsgstr __PR((int));
170: extern int error __PR((const char *, ...));
171: extern char *fillbytes __PR((void *, int, char));
172: extern int findline __PR((const char *, char, const char *,
173: int, char **, int));
174: extern int getline __PR((char *, int));
175: extern int getstr __PR((char *, int));
176: extern int breakline __PR((char *, char, char **, int));
177: extern int getallargs __PR((int *, char * const**, const char *, ...));
178: extern int getargs __PR((int *, char * const**, const char *, ...));
179: extern int getfiles __PR((int *, char * const**, const char *));
180: extern char *astoi __PR((const char *, int *));
181: extern char *astol __PR((const char *, long *));
182:
183: /*extern void handlecond __PR((const char *, SIGBLK *, int(*)(const char *, long, long), long));*/
184: extern void unhandlecond __PR((void));
185:
186: extern int patcompile __PR((const unsigned char *, int, int *));
187: extern unsigned char *patmatch __PR((const unsigned char *, const int *,
188: const unsigned char *, int, int, int));
189:
190: extern int printf __PR((const char *, ...));
191: extern char *movebytes __PR((const void *, void *, int));
192:
193: extern void save_args __PR((int, char**));
194: extern int saved_ac __PR((void));
195: extern char **saved_av __PR((void));
196: extern char *saved_av0 __PR((void));
197: #ifndef seterrno
198: extern int seterrno __PR((int));
199: #endif
200: extern void set_progname __PR((const char *));
201: extern char *get_progname __PR((void));
202:
203: extern void setfp __PR((void * const *));
204: extern int wait_chld __PR((int));
205: extern int geterrno __PR((void));
206: extern void raisecond __PR((const char *, long));
207: #ifdef HAVE_SIZE_T
208: extern int snprintf __PR((char *, size_t, const char *, ...));
209: #endif
210: /*extern int sprintf __PR((char *, const char *, ...)); ist woanders falsch deklariert !!!*/
211: extern char *strcatl __PR((char *, ...));
212: extern int streql __PR((const char *, const char *));
213: #ifdef va_arg
214: extern int format __PR((void (*)(char, long), long, const char *, va_list));
215: #else
216: extern int format __PR((void (*)(char, long), long, const char *, void *));
217: #endif
218:
219: extern int ftoes __PR((char *, double, int, int));
220: extern int ftofs __PR((char *, double, int, int));
221:
222: extern void swabbytes __PR((void *, int));
223: extern char *getav0 __PR((void));
224: extern char **getavp __PR((void));
225: extern void **getfp __PR((void));
226: extern int flush_reg_windows __PR((int));
227: extern int cmpbytes __PR((const void *, const void *, int));
228:
229: #if defined(_JOS) || defined(JOS)
230: # include <jos_io.h>
231: #endif
232:
233: #endif /* _STANDARD_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.