]>
Commit | Line | Data |
---|---|---|
726f6388 JA |
1 | /* externs.h -- extern function declarations which do not appear in their |
2 | own header file. */ | |
3 | ||
495aee44 | 4 | /* Copyright (C) 1993-2010 Free Software Foundation, Inc. |
726f6388 JA |
5 | |
6 | This file is part of GNU Bash, the Bourne Again SHell. | |
7 | ||
3185942a JA |
8 | Bash is free software: you can redistribute it and/or modify |
9 | it under the terms of the GNU General Public License as published by | |
10 | the Free Software Foundation, either version 3 of the License, or | |
11 | (at your option) any later version. | |
726f6388 | 12 | |
3185942a JA |
13 | Bash is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | GNU General Public License for more details. | |
726f6388 | 17 | |
3185942a JA |
18 | You should have received a copy of the GNU General Public License |
19 | along with Bash. If not, see <http://www.gnu.org/licenses/>. | |
20 | */ | |
726f6388 JA |
21 | |
22 | /* Make sure that this is included *after* config.h! */ | |
23 | ||
ccc6cda3 JA |
24 | #if !defined (_EXTERNS_H_) |
25 | # define _EXTERNS_H_ | |
726f6388 JA |
26 | |
27 | #include "stdc.h" | |
28 | ||
29 | /* Functions from expr.c. */ | |
7117c2d2 | 30 | extern intmax_t evalexp __P((char *, int *)); |
726f6388 JA |
31 | |
32 | /* Functions from print_cmd.c. */ | |
3185942a JA |
33 | #define FUNC_MULTILINE 0x01 |
34 | #define FUNC_EXTERNAL 0x02 | |
35 | ||
726f6388 | 36 | extern char *make_command_string __P((COMMAND *)); |
b80f6443 JA |
37 | extern char *named_function_string __P((char *, COMMAND *, int)); |
38 | ||
726f6388 JA |
39 | extern void print_command __P((COMMAND *)); |
40 | extern void print_simple_command __P((SIMPLE_COM *)); | |
ccc6cda3 | 41 | extern void print_word_list __P((WORD_LIST *, char *)); |
b80f6443 JA |
42 | |
43 | /* debugger support */ | |
44 | extern void print_for_command_head __P((FOR_COM *)); | |
45 | #if defined (SELECT_COMMAND) | |
46 | extern void print_select_command_head __P((SELECT_COM *)); | |
47 | #endif | |
48 | extern void print_case_command_head __P((CASE_COM *)); | |
49 | #if defined (DPAREN_ARITHMETIC) | |
50 | extern void print_arith_command __P((WORD_LIST *)); | |
51 | #endif | |
52 | #if defined (COND_COMMAND) | |
53 | extern void print_cond_command __P((COND_COM *)); | |
54 | #endif | |
55 | ||
56 | /* set -x support */ | |
0001803f CR |
57 | extern void xtrace_init __P((void)); |
58 | #ifdef NEED_XTRACE_SET_DECL | |
59 | extern void xtrace_set __P((int, FILE *)); | |
60 | #endif | |
61 | extern void xtrace_fdchk __P((int)); | |
62 | extern void xtrace_reset __P((void)); | |
7117c2d2 | 63 | extern char *indirection_level_string __P((void)); |
b80f6443 JA |
64 | extern void xtrace_print_assignment __P((char *, char *, int, int)); |
65 | extern void xtrace_print_word_list __P((WORD_LIST *, int)); | |
66 | extern void xtrace_print_for_command_head __P((FOR_COM *)); | |
67 | #if defined (SELECT_COMMAND) | |
68 | extern void xtrace_print_select_command_head __P((SELECT_COM *)); | |
69 | #endif | |
70 | extern void xtrace_print_case_command_head __P((CASE_COM *)); | |
cce855bc JA |
71 | #if defined (DPAREN_ARITHMETIC) |
72 | extern void xtrace_print_arith_cmd __P((WORD_LIST *)); | |
73 | #endif | |
74 | #if defined (COND_COMMAND) | |
75 | extern void xtrace_print_cond_term __P((int, int, WORD_DESC *, char *, char *)); | |
76 | #endif | |
726f6388 JA |
77 | |
78 | /* Functions from shell.c. */ | |
f73dda09 | 79 | extern void exit_shell __P((int)) __attribute__((__noreturn__)); |
7117c2d2 | 80 | extern void sh_exit __P((int)) __attribute__((__noreturn__)); |
ccc6cda3 | 81 | extern void disable_priv_mode __P((void)); |
d166f048 | 82 | extern void unbind_args __P((void)); |
ccc6cda3 JA |
83 | |
84 | #if defined (RESTRICTED_SHELL) | |
b72432fd | 85 | extern int shell_is_restricted __P((char *)); |
ccc6cda3 JA |
86 | extern int maybe_make_restricted __P((char *)); |
87 | #endif | |
88 | ||
cce855bc | 89 | extern void unset_bash_input __P((int)); |
d166f048 JA |
90 | extern void get_current_user_info __P((void)); |
91 | ||
ccc6cda3 JA |
92 | /* Functions from eval.c. */ |
93 | extern int reader_loop __P((void)); | |
94 | extern int parse_command __P((void)); | |
95 | extern int read_command __P((void)); | |
726f6388 JA |
96 | |
97 | /* Functions from braces.c. */ | |
98 | #if defined (BRACE_EXPANSION) | |
99 | extern char **brace_expand __P((char *)); | |
100 | #endif | |
101 | ||
ccc6cda3 | 102 | /* Miscellaneous functions from parse.y */ |
bb70624e | 103 | extern int yyparse __P((void)); |
f73dda09 | 104 | extern int return_EOF __P((void)); |
3185942a | 105 | extern char *xparse_dolparen __P((char *, char *, int *, int)); |
bb70624e | 106 | extern void reset_parser __P((void)); |
b80f6443 JA |
107 | extern WORD_LIST *parse_string_to_word_list __P((char *, int, const char *)); |
108 | ||
109 | extern void free_pushed_string_input __P((void)); | |
bb70624e | 110 | |
7117c2d2 JA |
111 | extern char *decode_prompt_string __P((char *)); |
112 | ||
bb70624e JA |
113 | extern int get_current_prompt_level __P((void)); |
114 | extern void set_current_prompt_level __P((int)); | |
ccc6cda3 | 115 | |
f73dda09 | 116 | #if defined (HISTORY) |
495aee44 | 117 | extern char *history_delimiting_chars __P((const char *)); |
f73dda09 | 118 | #endif |
ccc6cda3 JA |
119 | |
120 | /* Declarations for functions defined in locale.c */ | |
121 | extern void set_default_locale __P((void)); | |
122 | extern void set_default_locale_vars __P((void)); | |
123 | extern int set_locale_var __P((char *, char *)); | |
124 | extern int set_lang __P((char *, char *)); | |
0628567a | 125 | extern void set_default_lang __P((void)); |
ccc6cda3 JA |
126 | extern char *get_locale_var __P((char *)); |
127 | extern char *localetrans __P((char *, int, int *)); | |
7117c2d2 JA |
128 | extern char *mk_msgstr __P((char *, int *)); |
129 | extern char *localeexpand __P((char *, int, int, int, int *)); | |
ccc6cda3 JA |
130 | |
131 | /* Declarations for functions defined in list.c. */ | |
7117c2d2 JA |
132 | extern void list_walk __P((GENERIC_LIST *, sh_glist_func_t *)); |
133 | extern void wlist_walk __P((WORD_LIST *, sh_icpfunc_t *)); | |
134 | extern GENERIC_LIST *list_reverse (); | |
ccc6cda3 JA |
135 | extern int list_length (); |
136 | extern GENERIC_LIST *list_append (); | |
7117c2d2 | 137 | extern GENERIC_LIST *list_remove (); |
ccc6cda3 | 138 | |
cce855bc | 139 | /* Declarations for functions defined in stringlib.c */ |
bb70624e | 140 | extern int find_string_in_alist __P((char *, STRING_INT_ALIST *, int)); |
7117c2d2 JA |
141 | extern char *find_token_in_alist __P((int, STRING_INT_ALIST *, int)); |
142 | extern int find_index_in_alist __P((char *, STRING_INT_ALIST *, int)); | |
bb70624e | 143 | |
0001803f | 144 | extern char *substring __P((const char *, int, int)); |
cce855bc | 145 | extern char *strsub __P((char *, char *, char *, int)); |
bb70624e | 146 | extern char *strcreplace __P((char *, int, char *, int)); |
cce855bc JA |
147 | extern void strip_leading __P((char *)); |
148 | extern void strip_trailing __P((char *, int, int)); | |
cce855bc JA |
149 | extern void xbcopy __P((char *, char *, int)); |
150 | ||
b80f6443 JA |
151 | /* Functions from version.c. */ |
152 | extern char *shell_version_string __P((void)); | |
153 | extern void show_shell_version __P((int)); | |
154 | ||
cce855bc JA |
155 | /* Functions from the bash library, lib/sh/libsh.a. These should really |
156 | go into a separate include file. */ | |
28ef6c31 | 157 | |
3185942a JA |
158 | /* declarations for functions defined in lib/sh/casemod.c */ |
159 | extern char *sh_modcase __P((const char *, char *, int)); | |
160 | ||
161 | /* Defines for flags argument to sh_modcase. These need to agree with what's | |
162 | in lib/sh/casemode.c */ | |
17345e5a JA |
163 | #define CASE_LOWER 0x0001 |
164 | #define CASE_UPPER 0x0002 | |
165 | #define CASE_CAPITALIZE 0x0004 | |
166 | #define CASE_UNCAP 0x0008 | |
167 | #define CASE_TOGGLE 0x0010 | |
168 | #define CASE_TOGGLEALL 0x0020 | |
169 | #define CASE_UPFIRST 0x0040 | |
170 | #define CASE_LOWFIRST 0x0080 | |
171 | ||
172 | #define CASE_USEWORDS 0x1000 | |
3185942a | 173 | |
28ef6c31 JA |
174 | /* declarations for functions defined in lib/sh/clktck.c */ |
175 | extern long get_clk_tck __P((void)); | |
176 | ||
177 | /* declarations for functions defined in lib/sh/clock.c */ | |
178 | extern void clock_t_to_secs (); | |
179 | extern void print_clock_t (); | |
180 | ||
495aee44 CR |
181 | /* Declarations for functions defined in lib/sh/dprintf.c */ |
182 | #if !defined (HAVE_DPRINTF) | |
183 | extern void dprintf __P((int, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); | |
184 | #endif | |
3185942a | 185 | |
f73dda09 JA |
186 | /* Declarations for functions defined in lib/sh/fmtulong.c */ |
187 | #define FL_PREFIX 0x01 /* add 0x, 0X, or 0 prefix as appropriate */ | |
188 | #define FL_ADDBASE 0x02 /* add base# prefix to converted value */ | |
189 | #define FL_HEXUPPER 0x04 /* use uppercase when converting to hex */ | |
190 | #define FL_UNSIGNED 0x08 /* don't add any sign */ | |
191 | ||
192 | extern char *fmtulong __P((unsigned long int, int, char *, size_t, int)); | |
193 | ||
194 | /* Declarations for functions defined in lib/sh/fmtulong.c */ | |
195 | #if defined (HAVE_LONG_LONG) | |
196 | extern char *fmtullong __P((unsigned long long int, int, char *, size_t, int)); | |
197 | #endif | |
198 | ||
7117c2d2 JA |
199 | /* Declarations for functions defined in lib/sh/fmtumax.c */ |
200 | extern char *fmtumax __P((uintmax_t, int, char *, size_t, int)); | |
201 | ||
0001803f CR |
202 | /* Declarations for functions defined in lib/sh/fnxform.c */ |
203 | extern char *fnx_fromfs __P((char *, size_t)); | |
204 | extern char *fnx_tofs __P((char *, size_t)); | |
205 | ||
3185942a | 206 | /* Declarations for functions defined in lib/sh/fpurge.c */ |
89a92869 CR |
207 | |
208 | #if defined NEED_FPURGE_DECL | |
3185942a JA |
209 | #if !HAVE_DECL_FPURGE |
210 | ||
211 | #if HAVE_FPURGE | |
212 | # define fpurge _bash_fpurge | |
213 | #endif | |
214 | extern int fpurge __P((FILE *stream)); | |
215 | ||
216 | #endif /* HAVE_DECL_FPURGE */ | |
89a92869 | 217 | #endif /* NEED_FPURGE_DECL */ |
3185942a | 218 | |
cce855bc JA |
219 | /* Declarations for functions defined in lib/sh/getcwd.c */ |
220 | #if !defined (HAVE_GETCWD) | |
221 | extern char *getcwd __P((char *, size_t)); | |
222 | #endif | |
223 | ||
3185942a JA |
224 | /* Declarations for functions defined in lib/sh/input_avail.c */ |
225 | extern int input_avail __P((int)); | |
226 | ||
cce855bc | 227 | /* Declarations for functions defined in lib/sh/itos.c */ |
7117c2d2 JA |
228 | extern char *inttostr __P((intmax_t, char *, size_t)); |
229 | extern char *itos __P((intmax_t)); | |
230 | extern char *uinttostr __P((uintmax_t, char *, size_t)); | |
231 | extern char *uitos __P((uintmax_t)); | |
cce855bc | 232 | |
28ef6c31 JA |
233 | /* declarations for functions defined in lib/sh/makepath.c */ |
234 | #define MP_DOTILDE 0x01 | |
235 | #define MP_DOCWD 0x02 | |
236 | #define MP_RMDOT 0x04 | |
3185942a | 237 | #define MP_IGNDOT 0x08 |
ccc6cda3 | 238 | |
f73dda09 | 239 | extern char *sh_makepath __P((const char *, const char *, int)); |
ccc6cda3 | 240 | |
0001803f CR |
241 | /* declarations for functions defined in lib/sh/mbscasecmp.c */ |
242 | #if !defined (HAVE_MBSCASECMP) | |
243 | extern char *mbscasecmp __P((const char *, const char *)); | |
244 | #endif | |
245 | ||
246 | /* declarations for functions defined in lib/sh/mbschr.c */ | |
247 | #if !defined (HAVE_MBSCHR) | |
248 | extern char *mbschr __P((const char *, int)); | |
249 | #endif | |
250 | ||
251 | /* declarations for functions defined in lib/sh/mbscmp.c */ | |
252 | #if !defined (HAVE_MBSCMP) | |
253 | extern char *mbscmp __P((const char *, const char *)); | |
254 | #endif | |
255 | ||
7117c2d2 JA |
256 | /* declarations for functions defined in lib/sh/netconn.c */ |
257 | extern int isnetconn __P((int)); | |
258 | ||
28ef6c31 JA |
259 | /* declarations for functions defined in lib/sh/netopen.c */ |
260 | extern int netopen __P((char *)); | |
261 | ||
262 | /* Declarations for functions defined in lib/sh/oslib.c */ | |
ccc6cda3 | 263 | |
7117c2d2 | 264 | #if !defined (HAVE_DUP2) || defined (DUP2_BROKEN) |
ccc6cda3 | 265 | extern int dup2 __P((int, int)); |
7117c2d2 | 266 | #endif |
726f6388 | 267 | |
28ef6c31 JA |
268 | #if !defined (HAVE_GETDTABLESIZE) |
269 | extern int getdtablesize __P((void)); | |
270 | #endif /* !HAVE_GETDTABLESIZE */ | |
271 | ||
ccc6cda3 JA |
272 | #if !defined (HAVE_GETHOSTNAME) |
273 | extern int gethostname __P((char *, int)); | |
274 | #endif /* !HAVE_GETHOSTNAME */ | |
275 | ||
7117c2d2 JA |
276 | extern int getmaxgroups __P((void)); |
277 | extern long getmaxchild __P((void)); | |
278 | ||
28ef6c31 JA |
279 | /* declarations for functions defined in lib/sh/pathcanon.c */ |
280 | #define PATH_CHECKDOTDOT 0x0001 | |
281 | #define PATH_CHECKEXISTS 0x0002 | |
282 | #define PATH_HARDPATH 0x0004 | |
283 | #define PATH_NOALLOC 0x0008 | |
284 | ||
285 | extern char *sh_canonpath __P((char *, int)); | |
286 | ||
287 | /* declarations for functions defined in lib/sh/pathphys.c */ | |
288 | extern char *sh_physpath __P((char *, int)); | |
289 | extern char *sh_realpath __P((const char *, char *)); | |
ccc6cda3 | 290 | |
28ef6c31 | 291 | /* declarations for functions defined in lib/sh/setlinebuf.c */ |
f73dda09 JA |
292 | #ifdef NEED_SH_SETLINEBUF_DECL |
293 | extern int sh_setlinebuf __P((FILE *)); | |
ccc6cda3 | 294 | #endif |
726f6388 | 295 | |
0628567a JA |
296 | /* declarations for functions defined in lib/sh/shaccess.c */ |
297 | extern int sh_eaccess __P((char *, int)); | |
298 | ||
b80f6443 JA |
299 | /* declarations for functions defined in lib/sh/shmatch.c */ |
300 | extern int sh_regmatch __P((const char *, const char *, int)); | |
301 | ||
302 | /* defines for flags argument to sh_regmatch. */ | |
303 | #define SHMAT_SUBEXP 0x001 /* save subexpressions in SH_REMATCH */ | |
304 | #define SHMAT_PWARN 0x002 /* print a warning message on invalid regexp */ | |
305 | ||
495aee44 CR |
306 | /* declarations for functions defined in lib/sh/shmbchar.c */ |
307 | extern size_t mbstrlen __P((const char *)); | |
308 | extern char *mbsmbchar __P((const char *)); | |
309 | ||
28ef6c31 | 310 | /* declarations for functions defined in lib/sh/shquote.c */ |
495aee44 CR |
311 | extern char *sh_single_quote __P((const char *)); |
312 | extern char *sh_double_quote __P((const char *)); | |
95732b49 | 313 | extern char *sh_mkdoublequoted __P((const char *, int, int)); |
28ef6c31 JA |
314 | extern char *sh_un_double_quote __P((char *)); |
315 | extern char *sh_backslash_quote __P((char *)); | |
316 | extern char *sh_backslash_quote_for_double_quotes __P((char *)); | |
317 | extern int sh_contains_shell_metas __P((char *)); | |
318 | ||
319 | /* declarations for functions defined in lib/sh/spell.c */ | |
320 | extern int spname __P((char *, char *)); | |
3185942a | 321 | extern char *dirspell __P((char *)); |
28ef6c31 JA |
322 | |
323 | /* declarations for functions defined in lib/sh/strcasecmp.c */ | |
324 | #if !defined (HAVE_STRCASECMP) | |
325 | extern int strncasecmp __P((const char *, const char *, int)); | |
326 | extern int strcasecmp __P((const char *, const char *)); | |
327 | #endif /* HAVE_STRCASECMP */ | |
328 | ||
0001803f CR |
329 | /* declarations for functions defined in lib/sh/strcasestr.c */ |
330 | #if ! HAVE_STRCASESTR | |
331 | extern char *strcasestr __P((const char *, const char *)); | |
332 | #endif | |
333 | ||
495aee44 CR |
334 | /* declarations for functions defined in lib/sh/strchrnul.c */ |
335 | #if ! HAVE_STRCHRNUL | |
336 | extern char *strchrnul __P((const char *, int)); | |
337 | #endif | |
338 | ||
28ef6c31 | 339 | /* declarations for functions defined in lib/sh/strerror.c */ |
0628567a | 340 | #if !defined (HAVE_STRERROR) && !defined (strerror) |
28ef6c31 JA |
341 | extern char *strerror __P((int)); |
342 | #endif | |
343 | ||
7117c2d2 JA |
344 | /* declarations for functions defined in lib/sh/strftime.c */ |
345 | #if !defined (HAVE_STRFTIME) && defined (NEED_STRFTIME_DECL) | |
346 | extern size_t strftime __P((char *, size_t, const char *, const struct tm *)); | |
347 | #endif | |
348 | ||
28ef6c31 JA |
349 | /* declarations for functions and structures defined in lib/sh/stringlist.c */ |
350 | ||
351 | /* This is a general-purpose argv-style array struct. */ | |
352 | typedef struct _list_of_strings { | |
353 | char **list; | |
354 | int list_size; | |
355 | int list_len; | |
356 | } STRINGLIST; | |
357 | ||
7117c2d2 JA |
358 | typedef int sh_strlist_map_func_t __P((char *)); |
359 | ||
360 | extern STRINGLIST *strlist_create __P((int)); | |
361 | extern STRINGLIST *strlist_resize __P((STRINGLIST *, int)); | |
362 | extern void strlist_flush __P((STRINGLIST *)); | |
363 | extern void strlist_dispose __P((STRINGLIST *)); | |
364 | extern int strlist_remove __P((STRINGLIST *, char *)); | |
365 | extern STRINGLIST *strlist_copy __P((STRINGLIST *)); | |
366 | extern STRINGLIST *strlist_merge __P((STRINGLIST *, STRINGLIST *)); | |
367 | extern STRINGLIST *strlist_append __P((STRINGLIST *, STRINGLIST *)); | |
368 | extern STRINGLIST *strlist_prefix_suffix __P((STRINGLIST *, char *, char *)); | |
369 | extern void strlist_print __P((STRINGLIST *, char *)); | |
370 | extern void strlist_walk __P((STRINGLIST *, sh_strlist_map_func_t *)); | |
371 | extern void strlist_sort __P((STRINGLIST *)); | |
28ef6c31 JA |
372 | |
373 | /* declarations for functions defined in lib/sh/stringvec.c */ | |
374 | ||
7117c2d2 JA |
375 | extern char **strvec_create __P((int)); |
376 | extern char **strvec_resize __P((char **, int)); | |
377 | extern void strvec_flush __P((char **)); | |
378 | extern void strvec_dispose __P((char **)); | |
379 | extern int strvec_remove __P((char **, char *)); | |
380 | extern int strvec_len __P((char **)); | |
381 | extern int strvec_search __P((char **, char *)); | |
382 | extern char **strvec_copy __P((char **)); | |
383 | extern int strvec_strcmp __P((char **, char **)); | |
384 | extern void strvec_sort __P((char **)); | |
385 | ||
386 | extern char **strvec_from_word_list __P((WORD_LIST *, int, int, int *)); | |
387 | extern WORD_LIST *strvec_to_word_list __P((char **, int, int)); | |
28ef6c31 | 388 | |
95732b49 JA |
389 | /* declarations for functions defined in lib/sh/strnlen.c */ |
390 | #if !defined (HAVE_STRNLEN) | |
391 | extern size_t strnlen __P((const char *, size_t)); | |
392 | #endif | |
393 | ||
394 | /* declarations for functions defined in lib/sh/strpbrk.c */ | |
395 | #if !defined (HAVE_STRPBRK) | |
396 | extern char *strpbrk __P((const char *, const char *)); | |
397 | #endif | |
398 | ||
cce855bc JA |
399 | /* declarations for functions defined in lib/sh/strtod.c */ |
400 | #if !defined (HAVE_STRTOD) | |
401 | extern double strtod __P((const char *, char **)); | |
402 | #endif | |
ccc6cda3 | 403 | |
cce855bc | 404 | /* declarations for functions defined in lib/sh/strtol.c */ |
f73dda09 | 405 | #if !HAVE_DECL_STRTOL |
cce855bc JA |
406 | extern long strtol __P((const char *, char **, int)); |
407 | #endif | |
408 | ||
f73dda09 JA |
409 | /* declarations for functions defined in lib/sh/strtoll.c */ |
410 | #if defined (HAVE_LONG_LONG) && !HAVE_DECL_STRTOLL | |
411 | extern long long strtoll __P((const char *, char **, int)); | |
412 | #endif | |
413 | ||
cce855bc | 414 | /* declarations for functions defined in lib/sh/strtoul.c */ |
f73dda09 | 415 | #if !HAVE_DECL_STRTOUL |
cce855bc JA |
416 | extern unsigned long strtoul __P((const char *, char **, int)); |
417 | #endif | |
ccc6cda3 | 418 | |
f73dda09 JA |
419 | /* declarations for functions defined in lib/sh/strtoull.c */ |
420 | #if defined (HAVE_LONG_LONG) && !HAVE_DECL_STRTOULL | |
421 | extern unsigned long long strtoull __P((const char *, char **, int)); | |
422 | #endif | |
423 | ||
424 | /* declarations for functions defined in lib/sh/strimax.c */ | |
f73dda09 JA |
425 | #if !HAVE_DECL_STRTOIMAX |
426 | extern intmax_t strtoimax __P((const char *, char **, int)); | |
427 | #endif | |
428 | ||
429 | /* declarations for functions defined in lib/sh/strumax.c */ | |
430 | #if !HAVE_DECL_STRTOUMAX | |
431 | extern uintmax_t strtoumax __P((const char *, char **, int)); | |
432 | #endif | |
433 | ||
28ef6c31 JA |
434 | /* declarations for functions defined in lib/sh/strtrans.c */ |
435 | extern char *ansicstr __P((char *, int, int, int *, int *)); | |
436 | extern char *ansic_quote __P((char *, int, int *)); | |
f73dda09 | 437 | extern int ansic_shouldquote __P((const char *)); |
7117c2d2 | 438 | extern char *ansiexpand __P((char *, int, int, int *)); |
bb70624e JA |
439 | |
440 | /* declarations for functions defined in lib/sh/timeval.c. No prototypes | |
441 | so we don't have to count on having a definition of struct timeval in | |
442 | scope when this file is included. */ | |
443 | extern void timeval_to_secs (); | |
444 | extern void print_timeval (); | |
445 | ||
28ef6c31 JA |
446 | /* declarations for functions defined in lib/sh/tmpfile.c */ |
447 | #define MT_USETMPDIR 0x0001 | |
448 | #define MT_READWRITE 0x0002 | |
449 | #define MT_USERANDOM 0x0004 | |
bb70624e | 450 | |
28ef6c31 JA |
451 | extern char *sh_mktmpname __P((char *, int)); |
452 | extern int sh_mktmpfd __P((char *, int, char **)); | |
453 | /* extern FILE *sh_mktmpfp __P((char *, int, char **)); */ | |
bb70624e | 454 | |
3185942a JA |
455 | /* declarations for functions defined in lib/sh/uconvert.c */ |
456 | extern int uconvert __P((char *, long *, long *)); | |
457 | ||
458 | /* declarations for functions defined in lib/sh/ufuncs.c */ | |
459 | extern unsigned int falarm __P((unsigned int, unsigned int)); | |
460 | extern unsigned int fsleep __P((unsigned int, unsigned int)); | |
461 | ||
495aee44 CR |
462 | /* declarations for functions defined in lib/sh/unicode.c */ |
463 | extern int u32cconv __P((unsigned long, char *)); | |
464 | ||
95732b49 JA |
465 | /* declarations for functions defined in lib/sh/winsize.c */ |
466 | extern void get_new_window_size __P((int, int *, int *)); | |
467 | ||
95732b49 JA |
468 | /* declarations for functions defined in lib/sh/zcatfd.c */ |
469 | extern int zcatfd __P((int, int, char *)); | |
470 | ||
3185942a JA |
471 | /* declarations for functions defined in lib/sh/zgetline.c */ |
472 | extern ssize_t zgetline __P((int, char **, size_t *, int)); | |
473 | ||
474 | /* declarations for functions defined in lib/sh/zmapfd.c */ | |
475 | extern int zmapfd __P((int, char **, char *)); | |
476 | ||
28ef6c31 | 477 | /* declarations for functions defined in lib/sh/zread.c */ |
f73dda09 | 478 | extern ssize_t zread __P((int, char *, size_t)); |
17345e5a | 479 | extern ssize_t zreadretry __P((int, char *, size_t)); |
7117c2d2 | 480 | extern ssize_t zreadintr __P((int, char *, size_t)); |
f73dda09 | 481 | extern ssize_t zreadc __P((int, char *)); |
17345e5a | 482 | extern ssize_t zreadcintr __P((int, char *)); |
28ef6c31 JA |
483 | extern void zreset __P((void)); |
484 | extern void zsyncfd __P((int)); | |
485 | ||
486 | /* declarations for functions defined in lib/sh/zwrite.c */ | |
f73dda09 | 487 | extern int zwrite __P((int, char *, size_t)); |
bb70624e | 488 | |
495aee44 CR |
489 | /* declarations for functions defined in lib/glob/gmisc.c */ |
490 | extern int match_pattern_char __P((char *, char *)); | |
491 | extern int umatchlen __P((char *, size_t)); | |
492 | ||
493 | #if defined (HANDLE_MULTIBYTE) | |
494 | extern int match_pattern_wchar __P((wchar_t *, wchar_t *)); | |
495 | extern int wmatchlen __P((wchar_t *, size_t)); | |
496 | #endif | |
497 | ||
ccc6cda3 | 498 | #endif /* _EXTERNS_H_ */ |