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