1 | /* $Header: /afs/dev.mit.edu/source/repository/third/tcsh/tc.decls.h,v 1.1.1.2 1998-10-03 21:10:11 danw Exp $ */ |
---|
2 | /* |
---|
3 | * tc.decls.h: Function declarations from all the tcsh modules |
---|
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. All advertising materials mentioning features or use of this software |
---|
18 | * must display the following acknowledgement: |
---|
19 | * This product includes software developed by the University of |
---|
20 | * California, Berkeley and its contributors. |
---|
21 | * 4. Neither the name of the University nor the names of its contributors |
---|
22 | * may be used to endorse or promote products derived from this software |
---|
23 | * without specific prior written permission. |
---|
24 | * |
---|
25 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
---|
26 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
---|
29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
---|
30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
---|
31 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
---|
32 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
---|
33 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
---|
34 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
---|
35 | * SUCH DAMAGE. |
---|
36 | */ |
---|
37 | #ifndef _h_tc_decls |
---|
38 | #define _h_tc_decls |
---|
39 | |
---|
40 | /* |
---|
41 | * tc.alloc.c |
---|
42 | */ |
---|
43 | #ifndef SYSMALLOC |
---|
44 | #ifndef WINNT |
---|
45 | extern void free __P((ptr_t)); |
---|
46 | extern memalign_t malloc __P((size_t)); |
---|
47 | extern memalign_t realloc __P((ptr_t, size_t)); |
---|
48 | extern memalign_t calloc __P((size_t, size_t)); |
---|
49 | #endif /* !WINNT */ |
---|
50 | #else /* SYSMALLOC */ |
---|
51 | extern void sfree __P((ptr_t)); |
---|
52 | extern memalign_t smalloc __P((size_t)); |
---|
53 | extern memalign_t srealloc __P((ptr_t, size_t)); |
---|
54 | extern memalign_t scalloc __P((size_t, size_t)); |
---|
55 | #endif /* SYSMALLOC */ |
---|
56 | extern void showall __P((Char **, struct command *)); |
---|
57 | |
---|
58 | /* |
---|
59 | * tc.bind.c |
---|
60 | */ |
---|
61 | extern void dobindkey __P((Char **, struct command *)); |
---|
62 | #ifdef OBSOLETE |
---|
63 | extern void dobind __P((Char **, struct command *)); |
---|
64 | #endif /* OBSOLETE */ |
---|
65 | |
---|
66 | /* |
---|
67 | * tc.defs.c: |
---|
68 | */ |
---|
69 | extern void getmachine __P((void)); |
---|
70 | |
---|
71 | |
---|
72 | /* |
---|
73 | * tc.disc.c |
---|
74 | */ |
---|
75 | extern int setdisc __P((int)); |
---|
76 | extern int resetdisc __P((int)); |
---|
77 | |
---|
78 | /* |
---|
79 | * tc.func.c |
---|
80 | */ |
---|
81 | extern Char *expand_lex __P((Char *, size_t, struct wordent *, |
---|
82 | int, int)); |
---|
83 | extern Char *sprlex __P((Char *, size_t, struct wordent *)); |
---|
84 | extern void Itoa __P((int, Char *)); |
---|
85 | extern void dolist __P((Char **, struct command *)); |
---|
86 | extern void dotelltc __P((Char **, struct command *)); |
---|
87 | extern void doechotc __P((Char **, struct command *)); |
---|
88 | extern void dosettc __P((Char **, struct command *)); |
---|
89 | extern int cmd_expand __P((Char *, Char *)); |
---|
90 | extern void dowhich __P((Char **, struct command *)); |
---|
91 | extern struct process *find_stop_ed __P((void)); |
---|
92 | extern void fg_proc_entry __P((struct process *)); |
---|
93 | extern sigret_t alrmcatch __P((int)); |
---|
94 | extern void precmd __P((void)); |
---|
95 | extern void cwd_cmd __P((void)); |
---|
96 | extern void beep_cmd __P((void)); |
---|
97 | extern void period_cmd __P((void)); |
---|
98 | extern void aliasrun __P((int, Char *, Char *)); |
---|
99 | extern void setalarm __P((int)); |
---|
100 | extern void rmstar __P((struct wordent *)); |
---|
101 | extern void continue_jobs __P((struct wordent *)); |
---|
102 | extern Char *gettilde __P((Char *)); |
---|
103 | extern Char *getusername __P((Char **)); |
---|
104 | #ifdef OBSOLETE |
---|
105 | extern void doaliases __P((Char **, struct command *)); |
---|
106 | #endif /* OBSOLETE */ |
---|
107 | extern void shlvl __P((int)); |
---|
108 | extern int fixio __P((int, int)); |
---|
109 | extern int collate __P((const Char *, const Char *)); |
---|
110 | #ifdef HASHBANG |
---|
111 | extern int hashbang __P((int, Char ***)); |
---|
112 | #endif /* HASHBANG */ |
---|
113 | #ifdef REMOTEHOST |
---|
114 | extern void remotehost __P((void)); |
---|
115 | #endif /* REMOTEHOST */ |
---|
116 | |
---|
117 | |
---|
118 | /* |
---|
119 | * tc.os.c |
---|
120 | */ |
---|
121 | #ifdef MACH |
---|
122 | extern void dosetpath __P((Char **, struct command *)); |
---|
123 | #endif /* MACH */ |
---|
124 | |
---|
125 | #ifdef TCF |
---|
126 | extern void dogetxvers __P((Char **, struct command *)); |
---|
127 | extern void dosetxvers __P((Char **, struct command *)); |
---|
128 | extern void dogetspath __P((Char **, struct command *)); |
---|
129 | extern void dosetspath __P((Char **, struct command *)); |
---|
130 | extern char *sitename __P((pid_t)); |
---|
131 | extern void domigrate __P((Char **, struct command *)); |
---|
132 | #endif /* TCF */ |
---|
133 | |
---|
134 | #ifdef WARP |
---|
135 | extern void dowarp __P((Char **, struct command *)); |
---|
136 | #endif /* WARP */ |
---|
137 | |
---|
138 | #if defined(_CRAY) && !defined(_CRAYMPP) |
---|
139 | extern void dodmmode __P((Char **, struct command *)); |
---|
140 | #endif /* _CRAY && !_CRAYMPP */ |
---|
141 | |
---|
142 | #if defined(masscomp) || defined(hcx) |
---|
143 | extern void douniverse __P((Char **, struct command *)); |
---|
144 | #endif /* masscomp */ |
---|
145 | |
---|
146 | #if defined(hcx) |
---|
147 | extern void doatt __P((Char **, struct command *)); |
---|
148 | extern void doucb __P((Char **, struct command *)); |
---|
149 | #endif /* hcx */ |
---|
150 | |
---|
151 | #ifdef _SEQUENT_ |
---|
152 | extern void pr_stat_sub __P((struct process_stats *, |
---|
153 | struct process_stats *, |
---|
154 | struct process_stats *)); |
---|
155 | #endif /* _SEQUENT_ */ |
---|
156 | |
---|
157 | #ifdef NEEDtcgetpgrp |
---|
158 | extern int xtcgetpgrp __P((int)); |
---|
159 | extern int xtcsetpgrp __P((int, int)); |
---|
160 | # undef tcgetpgrp |
---|
161 | # define tcgetpgrp(a) xtcgetpgrp(a) |
---|
162 | # undef tcsetpgrp |
---|
163 | # define tcsetpgrp(a, b) xtcsetpgrp((a), (b)) |
---|
164 | #endif /* NEEDtcgetpgrp */ |
---|
165 | |
---|
166 | #ifdef YPBUGS |
---|
167 | extern void fix_yp_bugs __P((void)); |
---|
168 | #endif /* YPBUGS */ |
---|
169 | #ifdef STRCOLLBUG |
---|
170 | extern void fix_strcoll_bug __P((void)); |
---|
171 | #endif /* STRCOLLBUG */ |
---|
172 | |
---|
173 | extern void osinit __P((void)); |
---|
174 | |
---|
175 | #ifdef NEEDmemmove |
---|
176 | extern ptr_t xmemmove __P((ptr_t, const ptr_t, size_t)); |
---|
177 | # define memmove(a, b, c) xmemmove((a), (b), (c)) |
---|
178 | #endif /* NEEDmemmove */ |
---|
179 | |
---|
180 | #ifdef NEEDmemset |
---|
181 | extern ptr_t xmemset __P((ptr_t, int, size_t)); |
---|
182 | # define memset(a, b, c) xmemset((a), (b), (c)) |
---|
183 | #endif /* NEEDmemset */ |
---|
184 | |
---|
185 | |
---|
186 | #ifdef NEEDgetcwd |
---|
187 | extern char *xgetcwd __P((char *, size_t)); |
---|
188 | # undef getcwd |
---|
189 | # define getcwd(a, b) xgetcwd((a), (b)) |
---|
190 | #endif /* NEEDgetcwd */ |
---|
191 | |
---|
192 | #ifdef NEEDgethostname |
---|
193 | extern int xgethostname __P((char *, int)); |
---|
194 | # undef gethostname |
---|
195 | # define gethostname(a, b) xgethostname((a), (b)) |
---|
196 | #endif /* NEEDgethostname */ |
---|
197 | |
---|
198 | #ifdef NEEDnice |
---|
199 | extern int xnice __P((int)); |
---|
200 | # undef nice |
---|
201 | # define nice(a) xnice(a) |
---|
202 | #endif /* NEEDnice */ |
---|
203 | |
---|
204 | #ifdef NEEDstrerror |
---|
205 | extern char *xstrerror __P((int)); |
---|
206 | # undef strerror |
---|
207 | # define strerror(a) xstrerror(a) |
---|
208 | #endif /* NEEDstrerror */ |
---|
209 | |
---|
210 | #ifdef apollo |
---|
211 | extern void doinlib __P((Char **, struct command *)); |
---|
212 | extern void dover __P((Char **, struct command *)); |
---|
213 | extern void dorootnode __P((Char **, struct command *)); |
---|
214 | extern int getv __P((Char *)); |
---|
215 | #endif /* apollo */ |
---|
216 | |
---|
217 | |
---|
218 | /* |
---|
219 | * tc.printf.h |
---|
220 | */ |
---|
221 | extern pret_t xprintf __P((const char *, ...)); |
---|
222 | extern pret_t xsnprintf __P((char *, size_t, const char *, ...)); |
---|
223 | extern pret_t xvprintf __P((const char *, va_list)); |
---|
224 | extern pret_t xvsnprintf __P((char *, size_t, const char *, |
---|
225 | va_list)); |
---|
226 | |
---|
227 | /* |
---|
228 | * tc.prompt.c |
---|
229 | */ |
---|
230 | extern void dateinit __P((void)); |
---|
231 | extern void printprompt __P((int, char *)); |
---|
232 | extern Char *expdollar __P((Char **, const Char **, size_t *, |
---|
233 | int)); |
---|
234 | extern void tprintf __P((int, Char *, const Char *, size_t, |
---|
235 | char *, time_t, ptr_t)); |
---|
236 | |
---|
237 | /* |
---|
238 | * tc.sched.c |
---|
239 | */ |
---|
240 | extern time_t sched_next __P((void)); |
---|
241 | extern void dosched __P((Char **, struct command *)); |
---|
242 | extern void sched_run __P((int)); |
---|
243 | |
---|
244 | /* |
---|
245 | * tc.sig.c |
---|
246 | */ |
---|
247 | #ifndef BSDSIGS |
---|
248 | # ifdef UNRELSIGS |
---|
249 | # ifdef COHERENT |
---|
250 | extern sigret_t (*xsignal __P((int, sigret_t (*)(int)))) (); |
---|
251 | # define signal(x,y) xsignal(x,y) |
---|
252 | # endif /* COHERENT */ |
---|
253 | extern sigret_t (*xsigset __P((int, sigret_t (*)(int)))) (); |
---|
254 | # define sigset(x,y) xsigset(x,y) |
---|
255 | extern void xsigrelse __P((int)); |
---|
256 | # define sigrelse(x) xsigrelse(x) |
---|
257 | extern void xsighold __P((int)); |
---|
258 | # define sighold(x) xsighold(x) |
---|
259 | extern void xsigignore __P((int)); |
---|
260 | # define sigignore(x) xsigignore(x) |
---|
261 | extern void xsigpause __P((int)); |
---|
262 | # define sigpause(x) xsigpause(x) |
---|
263 | extern pid_t ourwait __P((int *)); |
---|
264 | # endif /* UNRELSIGS */ |
---|
265 | # ifdef SXA |
---|
266 | extern void sigpause __P((int)); |
---|
267 | # endif /* SXA */ |
---|
268 | #endif /* !BSDSIGS */ |
---|
269 | |
---|
270 | #ifdef NEEDsignal |
---|
271 | extern sigret_t (*xsignal __P((int, sigret_t (*)(int)))) (); |
---|
272 | # define signal(a, b) xsignal(a, b) |
---|
273 | #endif /* NEEDsignal */ |
---|
274 | #if defined(_SEQUENT_) || ((SYSVREL > 3 || defined(_DGUX_SOURCE)) && defined(POSIXSIGS)) || (defined(_AIX) && defined(POSIXSIGS)) || defined(WINNT) |
---|
275 | extern sigmask_t sigsetmask __P((sigmask_t)); |
---|
276 | # if !defined(DGUX) || (defined(DGUX) && defined(__ix86)) |
---|
277 | extern sigmask_t sigblock __P((sigmask_t)); |
---|
278 | # endif /* !DGUX */ |
---|
279 | extern void bsd_sigpause __P((sigmask_t)); |
---|
280 | extern sigret_t (*bsd_signal __P((int, sigret_t (*)(int)))) __P((int)); |
---|
281 | #endif /* _SEQUENT_ */ |
---|
282 | #ifdef SIGSYNCH |
---|
283 | extern sigret_t synch_handler __P((int)); |
---|
284 | #endif /* SIGSYNCH */ |
---|
285 | |
---|
286 | |
---|
287 | /* |
---|
288 | * tc.str.c: |
---|
289 | */ |
---|
290 | #ifdef SHORT_STRINGS |
---|
291 | extern Char *s_strchr __P((const Char *, int)); |
---|
292 | extern Char *s_strrchr __P((const Char *, int)); |
---|
293 | extern Char *s_strcat __P((Char *, const Char *)); |
---|
294 | # ifdef NOTUSED |
---|
295 | extern Char *s_strncat __P((Char *, const Char *, size_t)); |
---|
296 | # endif /* NOTUSED */ |
---|
297 | extern Char *s_strcpy __P((Char *, const Char *)); |
---|
298 | extern Char *s_strncpy __P((Char *, const Char *, size_t)); |
---|
299 | extern Char *s_strspl __P((const Char *, const Char *)); |
---|
300 | extern size_t s_strlen __P((const Char *)); |
---|
301 | extern int s_strcmp __P((const Char *, const Char *)); |
---|
302 | extern int s_strncmp __P((const Char *, const Char *, |
---|
303 | size_t)); |
---|
304 | extern Char *s_strsave __P((const Char *)); |
---|
305 | extern Char *s_strend __P((const Char *)); |
---|
306 | extern Char *s_strstr __P((const Char *, const Char *)); |
---|
307 | extern Char *str2short __P((const char *)); |
---|
308 | extern Char **blk2short __P((char **)); |
---|
309 | extern char *short2str __P((const Char *)); |
---|
310 | extern char **short2blk __P((Char **)); |
---|
311 | #endif /* SHORT_STRINGS */ |
---|
312 | extern char *short2qstr __P((const Char *)); |
---|
313 | |
---|
314 | |
---|
315 | /* |
---|
316 | * tc.vers.c: |
---|
317 | */ |
---|
318 | extern void fix_version __P((void)); |
---|
319 | |
---|
320 | /* |
---|
321 | * tc.who.c |
---|
322 | */ |
---|
323 | #ifndef HAVENOUTMP |
---|
324 | extern void initwatch __P((void)); |
---|
325 | extern void resetwatch __P((void)); |
---|
326 | extern void watch_login __P((int)); |
---|
327 | extern const char *who_info __P((ptr_t, int, char *, size_t)); |
---|
328 | extern void dolog __P((Char **, struct command *)); |
---|
329 | # ifdef UTHOST |
---|
330 | extern char *utmphost __P((void)); |
---|
331 | # endif /* UTHOST */ |
---|
332 | #endif /* HAVENOUTMP */ |
---|
333 | |
---|
334 | #endif /* _h_tc_decls */ |
---|