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