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