Commit | Line | Data |
---|---|---|
a0553bd8 CZ |
1 | /*- |
2 | * Copyright (c) 1991 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * %sccs.include.redist.c% | |
6 | * | |
4d7b2685 | 7 | * @(#)extern.h 5.2 (Berkeley) %G% |
a0553bd8 CZ |
8 | */ |
9 | ||
4d7b2685 KB |
10 | #include <sys/cdefs.h> |
11 | ||
a0553bd8 | 12 | /* |
4d7b2685 | 13 | * csh.c |
a0553bd8 | 14 | */ |
4d7b2685 KB |
15 | int gethdir __P((Char *)); |
16 | void dosource __P((Char **)); | |
17 | void exitstat __P((void)); | |
18 | void goodbye __P((void)); | |
19 | void importpath __P((Char *)); | |
20 | void initdesc __P((void)); | |
21 | void pintr __P((int)); | |
22 | void pintr1 __P((bool)); | |
23 | void printprompt __P((void)); | |
24 | void process __P((bool)); | |
25 | void rechist __P((void)); | |
26 | void untty __P((void)); | |
27 | ||
28 | #ifdef PROF | |
29 | void done __P((int)); | |
a0553bd8 | 30 | #else |
4d7b2685 | 31 | void xexit __P((int)); |
a0553bd8 | 32 | #endif |
a0553bd8 CZ |
33 | |
34 | /* | |
4d7b2685 | 35 | * dir.c |
a0553bd8 | 36 | */ |
4d7b2685 KB |
37 | void dinit __P((Char *)); |
38 | void dodirs __P((Char **)); | |
39 | Char *dcanon __P((Char *, Char *)); | |
40 | void dtildepr __P((Char *, Char *)); | |
41 | void dtilde __P((void)); | |
42 | void dochngd __P((Char **)); | |
43 | Char *dnormalize __P((Char *)); | |
44 | void dopushd __P((Char **)); | |
45 | void dopopd __P((Char **)); | |
46 | struct directory; | |
47 | void dfree __P((struct directory *)); | |
a0553bd8 CZ |
48 | |
49 | /* | |
4d7b2685 | 50 | * dol.c |
a0553bd8 | 51 | */ |
4d7b2685 KB |
52 | void Dfix __P((struct command *)); |
53 | Char *Dfix1 __P((Char *)); | |
54 | void heredoc __P((Char *)); | |
a0553bd8 CZ |
55 | |
56 | /* | |
4d7b2685 | 57 | * err.c |
a0553bd8 | 58 | */ |
4d7b2685 KB |
59 | void seterror __P((int, ...)); |
60 | void stderror __P((int, ...)); | |
a0553bd8 CZ |
61 | |
62 | /* | |
4d7b2685 | 63 | * exec.c |
a0553bd8 | 64 | */ |
4d7b2685 KB |
65 | void doexec __P((struct command *)); |
66 | void dohash __P((void)); | |
67 | void dounhash __P((void)); | |
68 | void execash __P((char **, struct command *)); | |
69 | void hashstat __P((void)); | |
70 | void xechoit __P((Char **)); | |
a0553bd8 CZ |
71 | |
72 | /* | |
4d7b2685 | 73 | * exp.c |
a0553bd8 | 74 | */ |
4d7b2685 KB |
75 | int exp __P((Char ***)); |
76 | int exp0 __P((Char ***, bool)); | |
a0553bd8 CZ |
77 | |
78 | /* | |
4d7b2685 | 79 | * file.c |
a0553bd8 CZ |
80 | */ |
81 | #ifdef FILEC | |
4d7b2685 | 82 | int tenex __P((Char *, int)); |
a0553bd8 CZ |
83 | #endif |
84 | ||
85 | /* | |
4d7b2685 | 86 | * func.c |
a0553bd8 | 87 | */ |
4d7b2685 KB |
88 | void Setenv __P((Char *, Char *)); |
89 | void doalias __P((Char **)); | |
90 | void dobreak __P((void)); | |
91 | void docontin __P((void)); | |
92 | void doecho __P((Char **)); | |
93 | void doelse __P((void)); | |
94 | void doend __P((void)); | |
95 | void doeval __P((Char **)); | |
96 | void doexit __P((Char **)); | |
97 | void doforeach __P((Char **)); | |
98 | void doglob __P((Char **)); | |
99 | void dogoto __P((Char **)); | |
100 | void doif __P((Char **, struct command *)); | |
101 | void dolimit __P((Char **)); | |
102 | void dologin __P((Char **)); | |
103 | void dologout __P((void)); | |
104 | void donohup __P((void)); | |
105 | void doonintr __P((Char **)); | |
106 | void dorepeat __P((Char **, struct command *)); | |
107 | void dosetenv __P((Char **)); | |
108 | void dosuspend __P((void)); | |
109 | void doswbrk __P((void)); | |
110 | void doswitch __P((Char **)); | |
111 | void doumask __P((Char **)); | |
112 | void dounlimit __P((Char **)); | |
113 | void dounsetenv __P((Char **)); | |
114 | void dowhile __P((Char **)); | |
115 | void dozip __P((void)); | |
116 | void func __P((struct command *, struct biltins *)); | |
117 | struct biltins * | |
118 | isbfunc __P((struct command *)); | |
119 | void prvars __P((void)); | |
120 | void search __P((int, int, Char *)); | |
121 | int srchx __P((Char *)); | |
122 | void unalias __P((Char **)); | |
123 | void wfree __P((void)); | |
a0553bd8 CZ |
124 | |
125 | /* | |
4d7b2685 | 126 | * glob.c |
a0553bd8 | 127 | */ |
4d7b2685 KB |
128 | Char **dobackp __P((Char *, bool)); |
129 | void Gcat __P((Char *, Char *)); | |
130 | Char *globone __P((Char *, int)); | |
131 | int Gmatch __P((Char *, Char *)); | |
132 | void ginit __P((void)); | |
133 | Char **globall __P((Char **)); | |
134 | void rscan __P((Char **, void (*)())); | |
135 | void tglob __P((Char **)); | |
136 | void trim __P((Char **)); | |
a0553bd8 CZ |
137 | |
138 | /* | |
4d7b2685 | 139 | * hist.c |
a0553bd8 | 140 | */ |
4d7b2685 KB |
141 | void dohist __P((Char **)); |
142 | struct Hist * | |
143 | enthist __P((int, struct wordent *, bool)); | |
144 | void savehist __P((struct wordent *)); | |
a0553bd8 CZ |
145 | |
146 | /* | |
4d7b2685 | 147 | * lex.c |
a0553bd8 | 148 | */ |
4d7b2685 KB |
149 | void addla __P((Char *)); |
150 | void bseek __P((off_t)); | |
151 | void btoeof __P((void)); | |
152 | void copylex __P((struct wordent *, struct wordent *)); | |
153 | Char *domod __P((Char *, int)); | |
154 | void freelex __P((struct wordent *)); | |
155 | int lex __P((struct wordent *)); | |
156 | void prlex __P((struct wordent *)); | |
157 | int readc __P((bool)); | |
158 | void settell __P((void)); | |
159 | void unreadc __P((int)); | |
a0553bd8 CZ |
160 | |
161 | /* | |
4d7b2685 | 162 | * misc.c |
a0553bd8 | 163 | */ |
4d7b2685 KB |
164 | int any __P((char *, int)); |
165 | Char **blkcat __P((Char **, Char **)); | |
166 | Char **blkcpy __P((Char **, Char **)); | |
167 | Char **blkend __P((Char **)); | |
168 | void blkfree __P((Char **)); | |
169 | int blklen __P((Char **)); | |
170 | void blkpr __P((Char **)); | |
171 | Char **blkspl __P((Char **, Char **)); | |
172 | void closem __P((void)); | |
173 | Char **copyblk __P((Char **)); | |
174 | int dcopy __P((int, int)); | |
175 | int dmove __P((int, int)); | |
176 | void donefds __P((void)); | |
177 | Char lastchr __P((Char *)); | |
178 | void lshift __P((Char **, int)); | |
179 | int number __P((Char *)); | |
180 | int prefix __P((Char *, Char *)); | |
181 | Char **saveblk __P((Char **)); | |
182 | void setzero __P((char *, int)); | |
183 | Char *strip __P((Char *)); | |
184 | char *strsave __P((char *)); | |
185 | char *strspl __P((char *, char *)); | |
186 | void udvar __P((Char *)); | |
187 | ||
188 | #ifndef NOTUSED | |
189 | char *strstr __P((const char *, const char *)); | |
a0553bd8 | 190 | #endif |
4d7b2685 KB |
191 | #ifndef SHORT_STRINGS |
192 | char *strend __P((char *)); | |
a0553bd8 | 193 | #endif |
a0553bd8 CZ |
194 | |
195 | /* | |
4d7b2685 | 196 | * parse.c |
a0553bd8 | 197 | */ |
4d7b2685 KB |
198 | void alias __P((struct wordent *)); |
199 | void freesyn __P((struct command *)); | |
200 | struct command * | |
201 | syntax __P((struct wordent *, struct wordent *, int)); | |
a0553bd8 CZ |
202 | |
203 | /* | |
4d7b2685 | 204 | * print.c |
a0553bd8 | 205 | */ |
4d7b2685 KB |
206 | void draino __P((void)); |
207 | void flush __P((void)); | |
208 | void pcsecs __P((long)); | |
209 | void psecs __P((long)); | |
210 | int putpure __P((int)); | |
211 | int putraw __P((int)); | |
212 | void xputchar __P((int)); | |
a0553bd8 CZ |
213 | |
214 | /* | |
4d7b2685 | 215 | * proc.c |
a0553bd8 | 216 | */ |
4d7b2685 KB |
217 | void dobg __P((Char **)); |
218 | void dobg1 __P((Char **)); | |
219 | void dofg __P((Char **)); | |
220 | void dofg1 __P((Char **)); | |
221 | void dojobs __P((Char **)); | |
222 | void dokill __P((Char **)); | |
223 | void donotify __P((Char **)); | |
224 | void dostop __P((Char **)); | |
225 | void dowait __P((void)); | |
226 | void palloc __P((int, struct command *)); | |
227 | void panystop __P((bool)); | |
228 | void pchild __P((int)); | |
229 | void pendjob __P((void)); | |
230 | struct process * | |
231 | pfind __P((Char *)); | |
232 | int pfork __P((struct command *, int)); | |
233 | void pgetty __P((int, int)); | |
234 | void pjwait __P((struct process *)); | |
235 | void pnote __P((void)); | |
236 | void prestjob __P((void)); | |
237 | void psavejob __P((void)); | |
238 | void pstart __P((struct process *, int)); | |
239 | void pwait __P((void)); | |
a0553bd8 CZ |
240 | |
241 | /* | |
4d7b2685 | 242 | * sem.c |
a0553bd8 | 243 | */ |
4d7b2685 KB |
244 | void execute __P((struct command *, int, int *, int *)); |
245 | void mypipe __P((int *)); | |
a0553bd8 CZ |
246 | |
247 | /* | |
4d7b2685 | 248 | * set.c |
a0553bd8 | 249 | */ |
4d7b2685 KB |
250 | struct varent |
251 | *adrof1 __P((Char *, struct varent *)); | |
252 | void doset __P((Char **)); | |
253 | void dolet __P((Char **)); | |
254 | Char *putn __P((int)); | |
255 | int getn __P((Char *)); | |
256 | Char *value1 __P((Char *, struct varent *)); | |
257 | void set __P((Char *, Char *)); | |
258 | void set1 __P((Char *, Char **, struct varent *)); | |
259 | void setq __P((Char *, Char **, struct varent *)); | |
260 | void unset __P((Char *[])); | |
261 | void unset1 __P((Char *[], struct varent *)); | |
262 | void unsetv __P((Char *)); | |
263 | void setNS __P((Char *)); | |
264 | void shift __P((Char **)); | |
265 | void plist __P((struct varent *)); | |
a0553bd8 CZ |
266 | |
267 | /* | |
4d7b2685 | 268 | * time.c |
a0553bd8 | 269 | */ |
4d7b2685 KB |
270 | void donice __P((Char **)); |
271 | void dotime __P((void)); | |
272 | void prusage __P((struct rusage *, struct rusage *, | |
273 | struct timeval *, struct timeval *)); | |
274 | void ruadd __P((struct rusage *, struct rusage *)); | |
275 | void settimes __P((void)); | |
276 | void tvadd __P((struct timeval *, struct timeval *)); | |
277 | void tvsub __P((struct timeval *, struct timeval *, struct timeval *)); | |
a0553bd8 CZ |
278 | |
279 | /* | |
280 | * tc.alloc.c | |
281 | */ | |
282 | #ifndef SYSMALLOC | |
283 | #ifdef sun | |
284 | extern int free(); | |
285 | #else | |
286 | extern void free(); | |
287 | #endif | |
288 | extern ptr_t malloc(); | |
289 | extern ptr_t realloc(); | |
290 | extern ptr_t calloc(); | |
291 | #else | |
292 | extern void Free(); | |
293 | extern ptr_t Malloc(); | |
294 | extern ptr_t Realloc(); | |
295 | extern ptr_t Calloc(); | |
296 | #endif /* SYSMALLOC */ | |
297 | extern void showall(); | |
298 | ||
299 | /* | |
300 | * tc.printf.h | |
301 | */ | |
302 | extern void xprintf(); | |
303 | extern void xsprintf(); | |
304 | extern void xvprintf(); | |
305 | extern void xvsprintf(); | |
306 | ||
307 | /* | |
308 | * tc.str.c: | |
309 | */ | |
310 | #ifdef SHORT_STRINGS | |
311 | extern Char *s_strchr(); | |
312 | extern Char *s_strrchr(); | |
313 | extern Char *s_strcat(); | |
314 | #ifdef NOTUSED | |
315 | extern Char *s_strncat(); | |
316 | #endif | |
317 | extern Char *s_strcpy(); | |
318 | extern Char *s_strncpy(); | |
319 | extern Char *s_strspl(); | |
320 | extern int s_strlen(); | |
321 | extern int s_strcmp(); | |
322 | extern int s_strncmp(); | |
323 | extern Char *s_strsave(); | |
324 | extern Char *s_strend(); | |
325 | extern Char *s_strspl(); | |
326 | #ifdef NOTUSED | |
327 | extern Char *s_strstr(); | |
328 | #endif | |
329 | extern Char *str2short(); | |
330 | extern Char **blk2short(); | |
331 | extern char *short2str(); | |
332 | extern char *short2qstr(); | |
333 | extern char **short2blk(); | |
334 | #endif |