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 | * | |
4df6491c | 7 | * @(#)extern.h 5.4 (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 **)); | |
7226ee77 CZ |
137 | #ifdef FILEC |
138 | int sortscmp __P((Char **, Char **)); | |
139 | #endif /* FILEC */ | |
a0553bd8 CZ |
140 | |
141 | /* | |
4d7b2685 | 142 | * hist.c |
a0553bd8 | 143 | */ |
4d7b2685 KB |
144 | void dohist __P((Char **)); |
145 | struct Hist * | |
146 | enthist __P((int, struct wordent *, bool)); | |
147 | void savehist __P((struct wordent *)); | |
a0553bd8 CZ |
148 | |
149 | /* | |
4d7b2685 | 150 | * lex.c |
a0553bd8 | 151 | */ |
4d7b2685 KB |
152 | void addla __P((Char *)); |
153 | void bseek __P((off_t)); | |
154 | void btoeof __P((void)); | |
155 | void copylex __P((struct wordent *, struct wordent *)); | |
156 | Char *domod __P((Char *, int)); | |
157 | void freelex __P((struct wordent *)); | |
158 | int lex __P((struct wordent *)); | |
159 | void prlex __P((struct wordent *)); | |
160 | int readc __P((bool)); | |
161 | void settell __P((void)); | |
162 | void unreadc __P((int)); | |
a0553bd8 CZ |
163 | |
164 | /* | |
4d7b2685 | 165 | * misc.c |
a0553bd8 | 166 | */ |
4d7b2685 KB |
167 | int any __P((char *, int)); |
168 | Char **blkcat __P((Char **, Char **)); | |
169 | Char **blkcpy __P((Char **, Char **)); | |
170 | Char **blkend __P((Char **)); | |
171 | void blkfree __P((Char **)); | |
172 | int blklen __P((Char **)); | |
173 | void blkpr __P((Char **)); | |
174 | Char **blkspl __P((Char **, Char **)); | |
175 | void closem __P((void)); | |
176 | Char **copyblk __P((Char **)); | |
177 | int dcopy __P((int, int)); | |
178 | int dmove __P((int, int)); | |
179 | void donefds __P((void)); | |
180 | Char lastchr __P((Char *)); | |
181 | void lshift __P((Char **, int)); | |
182 | int number __P((Char *)); | |
183 | int prefix __P((Char *, Char *)); | |
184 | Char **saveblk __P((Char **)); | |
185 | void setzero __P((char *, int)); | |
186 | Char *strip __P((Char *)); | |
187 | char *strsave __P((char *)); | |
188 | char *strspl __P((char *, char *)); | |
189 | void udvar __P((Char *)); | |
190 | ||
191 | #ifndef NOTUSED | |
192 | char *strstr __P((const char *, const char *)); | |
a0553bd8 | 193 | #endif |
4d7b2685 KB |
194 | #ifndef SHORT_STRINGS |
195 | char *strend __P((char *)); | |
a0553bd8 | 196 | #endif |
a0553bd8 CZ |
197 | |
198 | /* | |
4d7b2685 | 199 | * parse.c |
a0553bd8 | 200 | */ |
4d7b2685 KB |
201 | void alias __P((struct wordent *)); |
202 | void freesyn __P((struct command *)); | |
203 | struct command * | |
204 | syntax __P((struct wordent *, struct wordent *, int)); | |
a0553bd8 CZ |
205 | |
206 | /* | |
4d7b2685 | 207 | * print.c |
a0553bd8 | 208 | */ |
4d7b2685 KB |
209 | void draino __P((void)); |
210 | void flush __P((void)); | |
211 | void pcsecs __P((long)); | |
212 | void psecs __P((long)); | |
213 | int putpure __P((int)); | |
214 | int putraw __P((int)); | |
215 | void xputchar __P((int)); | |
a0553bd8 CZ |
216 | |
217 | /* | |
4d7b2685 | 218 | * proc.c |
a0553bd8 | 219 | */ |
4d7b2685 KB |
220 | void dobg __P((Char **)); |
221 | void dobg1 __P((Char **)); | |
222 | void dofg __P((Char **)); | |
223 | void dofg1 __P((Char **)); | |
224 | void dojobs __P((Char **)); | |
225 | void dokill __P((Char **)); | |
226 | void donotify __P((Char **)); | |
227 | void dostop __P((Char **)); | |
228 | void dowait __P((void)); | |
229 | void palloc __P((int, struct command *)); | |
230 | void panystop __P((bool)); | |
231 | void pchild __P((int)); | |
232 | void pendjob __P((void)); | |
233 | struct process * | |
234 | pfind __P((Char *)); | |
235 | int pfork __P((struct command *, int)); | |
236 | void pgetty __P((int, int)); | |
237 | void pjwait __P((struct process *)); | |
238 | void pnote __P((void)); | |
239 | void prestjob __P((void)); | |
240 | void psavejob __P((void)); | |
241 | void pstart __P((struct process *, int)); | |
242 | void pwait __P((void)); | |
a0553bd8 CZ |
243 | |
244 | /* | |
4d7b2685 | 245 | * sem.c |
a0553bd8 | 246 | */ |
4d7b2685 KB |
247 | void execute __P((struct command *, int, int *, int *)); |
248 | void mypipe __P((int *)); | |
a0553bd8 CZ |
249 | |
250 | /* | |
4d7b2685 | 251 | * set.c |
a0553bd8 | 252 | */ |
4d7b2685 KB |
253 | struct varent |
254 | *adrof1 __P((Char *, struct varent *)); | |
255 | void doset __P((Char **)); | |
256 | void dolet __P((Char **)); | |
257 | Char *putn __P((int)); | |
258 | int getn __P((Char *)); | |
259 | Char *value1 __P((Char *, struct varent *)); | |
260 | void set __P((Char *, Char *)); | |
261 | void set1 __P((Char *, Char **, struct varent *)); | |
262 | void setq __P((Char *, Char **, struct varent *)); | |
263 | void unset __P((Char *[])); | |
264 | void unset1 __P((Char *[], struct varent *)); | |
265 | void unsetv __P((Char *)); | |
266 | void setNS __P((Char *)); | |
267 | void shift __P((Char **)); | |
268 | void plist __P((struct varent *)); | |
a0553bd8 CZ |
269 | |
270 | /* | |
4d7b2685 | 271 | * time.c |
a0553bd8 | 272 | */ |
4d7b2685 KB |
273 | void donice __P((Char **)); |
274 | void dotime __P((void)); | |
275 | void prusage __P((struct rusage *, struct rusage *, | |
276 | struct timeval *, struct timeval *)); | |
277 | void ruadd __P((struct rusage *, struct rusage *)); | |
278 | void settimes __P((void)); | |
279 | void tvadd __P((struct timeval *, struct timeval *)); | |
280 | void tvsub __P((struct timeval *, struct timeval *, struct timeval *)); | |
a0553bd8 CZ |
281 | |
282 | /* | |
4df6491c | 283 | * alloc.c |
a0553bd8 CZ |
284 | */ |
285 | #ifndef SYSMALLOC | |
4df6491c CZ |
286 | void free __P((ptr_t)); |
287 | ptr_t malloc __P((size_t)); | |
288 | ptr_t realloc __P((ptr_t, size_t)); | |
289 | ptr_t calloc __P((size_t, size_t)); | |
a0553bd8 | 290 | #else |
4df6491c CZ |
291 | void Free __P((ptr_t)); |
292 | ptr_t Malloc __P((size_t)); | |
293 | ptr_t Realloc __P((ptr_t, size_t)); | |
294 | ptr_t Calloc __P((size_t, size_t)); | |
a0553bd8 | 295 | #endif /* SYSMALLOC */ |
4df6491c | 296 | void showall __P((void)); |
a0553bd8 CZ |
297 | |
298 | /* | |
4df6491c | 299 | * printf.h |
a0553bd8 | 300 | */ |
4df6491c CZ |
301 | void xprintf __P((char *, ...)); |
302 | void xsprintf __P((char *, char *, ...)); | |
303 | void xvprintf __P((char *, va_list)); | |
304 | void xvsprintf __P((char *, char *, va_list)); | |
a0553bd8 CZ |
305 | |
306 | /* | |
4df6491c | 307 | * str.c: |
a0553bd8 CZ |
308 | */ |
309 | #ifdef SHORT_STRINGS | |
4df6491c CZ |
310 | Char *s_strchr __P((Char *, int)); |
311 | Char *s_strrchr __P((Char *, int)); | |
312 | Char *s_strcat __P((Char *, Char *)); | |
a0553bd8 | 313 | #ifdef NOTUSED |
4df6491c | 314 | Char *s_strncat __P((Char *, Char *, size_t)); |
a0553bd8 | 315 | #endif |
4df6491c CZ |
316 | Char *s_strcpy __P((Char *, Char *)); |
317 | Char *s_strncpy __P((Char *, Char *, size_t)); | |
318 | Char *s_strspl __P((Char *, Char *)); | |
319 | size_t s_strlen __P((Char *)); | |
320 | int s_strcmp __P((Char *, Char *)); | |
321 | int s_strncmp __P((Char *, Char *, size_t)); | |
322 | Char *s_strsave __P((Char *)); | |
323 | Char *s_strend __P((Char *)); | |
a0553bd8 | 324 | #ifdef NOTUSED |
4df6491c | 325 | Char *s_strstr __P((Char *, Char *)); |
a0553bd8 | 326 | #endif |
4df6491c CZ |
327 | Char *str2short __P((char *)); |
328 | Char **blk2short __P((char **)); | |
329 | char *short2str __P((Char *)); | |
330 | char *short2qstr __P((Char *)); | |
331 | char **short2blk __P((Char **)); | |
a0553bd8 | 332 | #endif |