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