]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/tcsh/sh.decls.h
This commit was generated by cvs2svn to compensate for changes in r142810,
[FreeBSD/FreeBSD.git] / contrib / tcsh / sh.decls.h
1 /* $Header: /src/pub/tcsh/sh.decls.h,v 3.39 2004/03/21 16:48:14 christos Exp $ */
2 /*
3  * sh.decls.h    External declarations from sh*.c
4  */
5 /*-
6  * Copyright (c) 1980, 1991 The Regents of the University of California.
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  * 3. Neither the name of the University nor the names of its contributors
18  *    may be used to endorse or promote products derived from this software
19  *    without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  */
33 #ifndef _h_sh_decls
34 #define _h_sh_decls
35
36 /*
37  * sh.c
38  */
39 extern  int               gethdir       __P((Char *));
40 extern  void              dosource      __P((Char **, struct command *));
41 extern  void              exitstat      __P((void));
42 extern  void              goodbye       __P((Char **, struct command *));
43 extern  void              importpath    __P((Char *));
44 extern  void              initdesc      __P((void));
45 extern  sigret_t          pintr         __P((int));
46 extern  void              pintr1        __P((bool));
47 extern  void              process       __P((bool));
48 extern  void              untty         __P((void));
49 #ifdef PROF
50 extern  void              done          __P((int));
51 #else
52 extern  void              xexit         __P((int));
53 #endif
54
55 /*
56  * sh.dir.c
57  */
58 extern  void              dinit         __P((Char *));
59 extern  void              dodirs        __P((Char **, struct command *));
60 extern  Char             *dcanon        __P((Char *, Char *));
61 extern  void              dtildepr      __P((Char *));
62 extern  void              dtilde        __P((void));
63 extern  void              dochngd       __P((Char **, struct command *));
64 extern  Char             *dnormalize    __P((Char *, int));
65 extern  void              dopushd       __P((Char **, struct command *));
66 extern  void              dopopd        __P((Char **, struct command *));
67 extern  void              dfree         __P((struct directory *));
68 extern  void              dsetstack     __P((void));
69 extern  int               getstakd      __P((Char *, int));
70 extern  void              recdirs       __P((Char *, int));
71 extern  void              loaddirs      __P((Char *));
72
73 /*
74  * sh.dol.c
75  */
76 extern  void              Dfix          __P((struct command *));
77 extern  Char             *Dfix1         __P((Char *));
78 extern  void              heredoc       __P((Char *));
79
80 /*
81  * sh.err.c
82  */
83 extern  void              errinit       __P((void));
84 extern  void              seterror      __P((unsigned int, ...));
85 extern  void              stderror      __P((unsigned int, ...));
86
87 /*
88  * sh.exec.c
89  */
90 extern  void              doexec        __P((struct command *, bool));
91 extern  void              dohash        __P((Char **, struct command *));
92 extern  void              dounhash      __P((Char **, struct command *));
93 extern  void              execash       __P((Char **, struct command *));
94 extern  void              hashstat      __P((Char **, struct command *));
95 extern  void              xechoit       __P((Char **));
96 extern  int               executable    __P((Char *, Char *, bool));
97 extern  int               tellmewhat    __P((struct wordent *, Char *));
98 extern  void              dowhere       __P((Char **, struct command *));
99 extern  int               find_cmd      __P((Char *, int));
100
101 /*
102  * sh.exp.c
103  */
104 extern  Char     *filetest       __P((Char *, Char ***, bool));
105 extern  int               expr          __P((Char ***));
106 extern  int               exp0          __P((Char ***, bool));
107
108 /*
109  * sh.file.c
110  */
111 #if defined(FILEC) && defined(TIOCSTI)
112 extern  int               tenex         __P((Char *, int));
113 #endif
114
115 /*
116  * sh.func.c
117  */
118 extern  void              tsetenv       __P((Char *, Char *));
119 extern  void              Unsetenv      __P((Char *));
120 extern  void              doalias       __P((Char **, struct command *));
121 extern  void              dobreak       __P((Char **, struct command *));
122 extern  void              docontin      __P((Char **, struct command *));
123 extern  void              doecho        __P((Char **, struct command *));
124 extern  void              doelse        __P((Char **, struct command *));
125 extern  void              doend         __P((Char **, struct command *));
126 extern  void              doeval        __P((Char **, struct command *));
127 extern  void              doexit        __P((Char **, struct command *));
128 extern  void              doforeach     __P((Char **, struct command *));
129 extern  void              doglob        __P((Char **, struct command *));
130 extern  void              dogoto        __P((Char **, struct command *));
131 extern  void              doif          __P((Char **, struct command *));
132 extern  void              dolimit       __P((Char **, struct command *));
133 extern  void              dologin       __P((Char **, struct command *));
134 extern  void              dologout      __P((Char **, struct command *));
135 #ifdef NEWGRP
136 extern  void              donewgrp      __P((Char **, struct command *));
137 #endif
138 extern  void              donohup       __P((Char **, struct command *));
139 extern  void              dohup         __P((Char **, struct command *));
140 extern  void              doonintr      __P((Char **, struct command *));
141 extern  void              doprintenv    __P((Char **, struct command *));
142 extern  void              dorepeat      __P((Char **, struct command *));
143 extern  void              dofiletest    __P((Char **, struct command *));
144 extern  void              dosetenv      __P((Char **, struct command *));
145 extern  void              dosuspend     __P((Char **, struct command *));
146 extern  void              doswbrk       __P((Char **, struct command *));
147 extern  void              doswitch      __P((Char **, struct command *));
148 extern  void              doumask       __P((Char **, struct command *));
149 extern  void              dounlimit     __P((Char **, struct command *));
150 extern  void              dounsetenv    __P((Char **, struct command *));
151 extern  void              dowhile       __P((Char **, struct command *));
152 extern  void              dozip         __P((Char **, struct command *));
153 extern  void              func          __P((struct command *, 
154                                              struct biltins *));
155 extern  void              gotolab       __P((Char *));
156 extern struct biltins    *isbfunc       __P((struct command *));
157 extern  void              prvars        __P((void));
158 extern  int               srchx         __P((Char *));
159 extern  void              unalias       __P((Char **, struct command *));
160 extern  void              wfree         __P((void));
161 extern  void              dobuiltins    __P((Char **, struct command *));
162 extern  void              reexecute     __P((struct command *));
163
164 /*
165  * sh.glob.c
166  */
167 extern  Char             *globequal     __P((Char *, Char *));
168 extern  Char            **dobackp       __P((Char *, bool));
169 extern  void              Gcat          __P((Char *, Char *));
170 extern  Char             *globone       __P((Char *, int));
171 extern  int               Gmatch        __P((Char *, Char *));
172 extern  int               Gnmatch       __P((Char *, Char *, Char **));
173 extern  void              ginit         __P((void));
174 extern  Char            **globall       __P((Char **));
175 extern  void              rscan         __P((Char **, void (*)(int)));
176 extern  void              tglob         __P((Char **));
177 extern  void              trim          __P((Char **));
178 #if defined(FILEC) && defined(TIOCSTI)
179 extern  int               sortscmp      __P((Char **, Char **));
180 #endif
181 extern  void              nlsinit       __P((void));
182 extern  int               t_pmatch      __P((Char *, Char *, Char **, int));
183
184 /*
185  * sh.hist.c
186  */
187 extern  void              dohist        __P((Char **, struct command *));
188 extern  struct Hist      *enthist       __P((int, struct wordent *, bool, bool));
189 extern  void              savehist      __P((struct wordent *, bool));
190 extern  void              fmthist       __P((int, ptr_t, char *, size_t));
191 extern  void              rechist       __P((Char *, int));
192 extern  void              loadhist      __P((Char *, bool));
193
194 /*
195  * sh.init.c
196  */
197 extern  void              mesginit      __P((void));
198
199 /*
200  * sh.lex.c
201  */
202 extern  void              addla         __P((Char *));
203 extern  void              bseek         __P((struct Ain *));
204 extern  void              btell         __P((struct Ain *));
205 extern  void              btoeof        __P((void));
206 extern  void              copylex       __P((struct wordent *, 
207                                              struct wordent *));
208 extern  Char             *domod         __P((Char *, int));
209 extern  void              freelex       __P((struct wordent *));
210 extern  int               lex           __P((struct wordent *));
211 extern  void              prlex         __P((struct wordent *));
212 extern  int               readc         __P((bool));
213 extern  void              settell       __P((void));
214 extern  void              unreadc       __P((int));
215
216
217 /*
218  * sh.misc.c
219  */
220 extern  int               any           __P((char *, int));
221 extern  Char            **blkcpy        __P((Char **, Char **));
222 extern  void              blkfree       __P((Char **));
223 extern  int               blklen        __P((Char **));
224 extern  void              blkpr         __P((Char **));
225 extern  void              blkexpand     __P((Char **, Char *));
226 extern  Char            **blkspl        __P((Char **, Char **));
227 extern  void              closem        __P((void));
228 #ifndef CLOSE_ON_EXEC
229 extern  void              closech       __P((void));
230 #endif /* !CLOSE_ON_EXEC */
231 extern  Char            **copyblk       __P((Char **));
232 extern  int               dcopy         __P((int, int));
233 extern  int               dmove         __P((int, int));
234 extern  void              donefds       __P((void));
235 extern  Char              lastchr       __P((Char *));
236 extern  void              lshift        __P((Char **, int));
237 extern  int               number        __P((Char *));
238 extern  int               prefix        __P((Char *, Char *));
239 extern  Char            **saveblk       __P((Char **));
240 extern  void              setzero       __P((char *, int));
241 extern  Char             *strip         __P((Char *));
242 extern  Char             *quote         __P((Char *));
243 extern  Char             *quote_meta    __P((Char *, const Char *));
244 extern  char             *strsave       __P((const char *));
245 extern  void              udvar         __P((Char *));
246 #ifndef POSIX
247 extern  char             *strstr        __P((const char *, const char *));
248 #endif /* !POSIX */
249 #ifndef SHORT_STRINGS
250 extern  char             *strspl        __P((char *, char *));
251 extern  char             *strend        __P((char *));
252 #endif /* SHORT_STRINGS */
253
254 /*
255  * sh.parse.c
256  */
257 extern  void              alias         __P((struct wordent *));
258 extern  void              freesyn       __P((struct command *));
259 extern struct command    *syntax        __P((struct wordent *, 
260                                              struct wordent *, int));
261
262 /*
263  * sh.print.c
264  */
265 extern  void              drainoline    __P((void));
266 extern  void              flush         __P((void));
267 #ifdef BSDTIMES
268 extern  void              pcsecs        __P((long));
269 #else /* !BSDTIMES */
270 # ifdef POSIX
271 extern  void              pcsecs        __P((clock_t));
272 # else /* !POSIX */
273 extern  void              pcsecs        __P((time_t));
274 # endif /* !POSIX */
275 #endif /* BSDTIMES */
276 #ifdef BSDLIMIT
277 extern  void              psecs         __P((long));
278 #endif /* BSDLIMIT */
279 extern  int               putpure       __P((int));
280 extern  int               putraw        __P((int));
281 extern  void              xputchar      __P((int));
282
283
284 /*
285  * sh.proc.c
286  */
287 extern  void              dobg          __P((Char **, struct command *));
288 extern  void              dobg1         __P((Char **, struct command *));
289 extern  void              dofg          __P((Char **, struct command *));
290 extern  void              dofg1         __P((Char **, struct command *));
291 extern  void              dojobs        __P((Char **, struct command *));
292 extern  void              dokill        __P((Char **, struct command *));
293 extern  void              donotify      __P((Char **, struct command *));
294 extern  void              dostop        __P((Char **, struct command *));
295 extern  void              dowait        __P((Char **, struct command *));
296 extern  void              palloc        __P((int, struct command *));
297 extern  void              panystop      __P((bool));
298 extern  sigret_t          pchild        __P((int));
299 extern  void              pendjob       __P((void));
300 extern  int               pfork         __P((struct command *, int));
301 extern  void              pgetty        __P((int, int));
302 extern  void              pjwait        __P((struct process *));
303 extern  void              pnote         __P((void));
304 extern  void              prestjob      __P((void));
305 extern  void              psavejob      __P((void));
306 extern  int               pstart        __P((struct process *, int));
307 extern  void              pwait         __P((void));
308 extern  struct process   *pfind         __P((Char *));
309
310 /*
311  * sh.sem.c
312  */
313 extern  void              execute       __P((struct command *, int, int *, 
314                                              int *, bool));
315 extern  void              mypipe        __P((int *));
316
317 /*
318  * sh.set.c
319  */
320 extern  struct varent    *adrof1        __P((Char *, struct varent *));
321 extern  void              doset         __P((Char **, struct command *));
322 extern  void              dolet         __P((Char **, struct command *));
323 extern  Char             *putn          __P((int));
324 extern  int               getn          __P((Char *));
325 extern  Char             *value1        __P((Char *, struct varent *));
326 extern  void              set           __P((Char *, Char *, int));
327 extern  void              set1          __P((Char *, Char **, struct varent *,
328                                              int));
329 extern  void              setq          __P((Char *, Char **, struct varent *,
330                                              int));
331 extern  void              unset         __P((Char **, struct command *));
332 extern  void              unset1        __P((Char *[], struct varent *));
333 extern  void              unsetv        __P((Char *));
334 extern  void              setNS         __P((Char *));
335 extern  void              shift         __P((Char **, struct command *));
336 extern  void              plist         __P((struct varent *, int));
337 extern  Char             *unparse       __P((struct command *));
338 #if defined(DSPMBYTE)
339 extern  void              update_dspmbyte_vars  __P((void));
340 extern  void              autoset_dspmbyte      __P((Char *));
341 #endif
342
343 /*
344  * sh.time.c
345  */
346 extern  void              donice        __P((Char **, struct command *));
347 extern  void              dotime        __P((Char **, struct command *));
348 #ifdef BSDTIMES
349 extern  void              prusage       __P((struct sysrusage *,
350                                              struct sysrusage *, 
351                                              timeval_t *, timeval_t *));
352 extern  void              ruadd         __P((struct sysrusage *,
353                                              struct sysrusage *));
354 #else /* BSDTIMES */
355 # ifdef _SEQUENT_
356 extern  void              prusage       __P((struct process_stats *,
357                                              struct process_stats *, 
358                                              timeval_t *, timeval_t *));
359 extern  void              ruadd         __P((struct process_stats *,
360                                              struct process_stats *));
361 # else /* !_SEQUENT_ */
362 #  ifdef POSIX
363 extern  void              prusage       __P((struct tms *, struct tms *, 
364                                              clock_t, clock_t));
365 #  else /* !POSIX */
366 extern  void              prusage       __P((struct tms *, struct tms *, 
367                                              time_t, time_t));
368 #  endif /* !POSIX */
369 # endif /* !_SEQUENT_ */
370 #endif /* BSDTIMES */
371 extern  void              settimes      __P((void));
372 #if defined(BSDTIMES) || defined(_SEQUENT_)
373 extern  void              tvsub         __P((struct timeval *, 
374                                              struct timeval *, 
375                                              struct timeval *));
376 #endif /* BSDTIMES || _SEQUENT_ */
377
378 #endif /* _h_sh_decls */