1 /* externs.h -- extern function declarations which do not appear in their
4 /* Copyright (C) 1993 Free Software Foundation, Inc.
6 This file is part of GNU Bash, the Bourne Again SHell.
8 Bash is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2, or (at your option) any later
13 Bash is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 You should have received a copy of the GNU General Public License along
19 with Bash; see the file COPYING. If not, write to the Free Software
20 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
22 /* Make sure that this is included *after* config.h! */
24 #if !defined (_EXTERNS_H_)
29 /* Functions from expr.c. */
30 extern long evalexp __P((char *, int *));
32 /* Functions from print_cmd.c. */
33 extern char *make_command_string __P((COMMAND *));
34 extern void print_command __P((COMMAND *));
35 extern void print_simple_command __P((SIMPLE_COM *));
36 extern char *named_function_string __P((char *, COMMAND *, int));
37 extern void print_word_list __P((WORD_LIST *, char *));
38 extern void xtrace_print_word_list __P((WORD_LIST *));
39 #if defined (DPAREN_ARITHMETIC)
40 extern void xtrace_print_arith_cmd __P((WORD_LIST *));
42 #if defined (COND_COMMAND)
43 extern void xtrace_print_cond_term __P((int, int, WORD_DESC *, char *, char *));
46 /* Functions from shell.c. */
47 extern void exit_shell __P((int));
48 extern void disable_priv_mode __P((void));
49 extern void unbind_args __P((void));
51 #if defined (RESTRICTED_SHELL)
52 extern int maybe_make_restricted __P((char *));
55 extern void unset_bash_input __P((int));
56 extern void get_current_user_info __P((void));
58 /* Functions from eval.c. */
59 extern int reader_loop __P((void));
60 extern int parse_command __P((void));
61 extern int read_command __P((void));
62 extern WORD_LIST *parse_string_to_word_list __P((char *, char *));
64 /* Functions from braces.c. */
65 #if defined (BRACE_EXPANSION)
66 extern char **brace_expand __P((char *));
69 /* Miscellaneous functions from parse.y */
70 extern int yyparse ();
71 extern void reset_parser ();
73 /* Functions from version.c. */
74 extern char *shell_version_string __P((void));
75 extern void show_shell_version __P((int));
77 /* Declarations for functions defined in locale.c */
78 extern void set_default_locale __P((void));
79 extern void set_default_locale_vars __P((void));
80 extern int set_locale_var __P((char *, char *));
81 extern int set_lang __P((char *, char *));
82 extern char *get_locale_var __P((char *));
83 extern char *localetrans __P((char *, int, int *));
85 /* Declarations for functions defined in list.c. */
86 extern void map_over_list __P((GENERIC_LIST *, Function *));
87 extern void map_over_words __P((WORD_LIST *, Function *));
88 extern GENERIC_LIST *reverse_list ();
89 extern int list_length ();
90 extern GENERIC_LIST *list_append ();
91 extern GENERIC_LIST *delete_element ();
93 /* Declarations for functions defined in stringlib.c */
94 extern char *ansicstr __P((char *, int, int *, int *));
95 extern int find_name_in_array __P((char *, char **));
96 extern int array_len __P((char **));
97 extern void free_array_members __P((char **));
98 extern void free_array __P((char **));
99 extern char **copy_array __P((char **));
100 extern int qsort_string_compare ();
101 extern void sort_char_array __P((char **));
102 extern char **word_list_to_argv __P((WORD_LIST *, int, int, int *));
103 extern WORD_LIST *argv_to_word_list __P((char **, int, int));
105 extern char *strsub __P((char *, char *, char *, int));
106 extern void strip_leading __P((char *));
107 extern void strip_trailing __P((char *, int, int));
108 extern char *strindex __P((char *, char *));
109 extern void xbcopy __P((char *, char *, int));
111 /* Functions from the bash library, lib/sh/libsh.a. These should really
112 go into a separate include file. */
113 /* Declarations for functions defined in lib/sh/getcwd.c */
114 #if !defined (HAVE_GETCWD)
115 extern char *getcwd __P((char *, size_t));
118 /* Declarations for functions defined in lib/sh/itos.c */
119 extern char *itos __P((int));
121 /* Declarations for functions defined in lib/sh/oslib.c */
122 extern long get_clk_tck __P((void));
124 #if !defined (strerror)
125 extern char *strerror __P((int));
128 #if !defined (HAVE_STRCASECMP)
129 extern int strncasecmp __P((const char *, const char *, int));
130 extern int strcasecmp __P((const char *, const char *));
131 #endif /* HAVE_STRCASECMP */
133 extern int dup2 __P((int, int));
135 #if !defined (HAVE_GETHOSTNAME)
136 extern int gethostname __P((char *, int));
137 #endif /* !HAVE_GETHOSTNAME */
139 #if !defined (HAVE_GETDTABLESIZE)
140 extern int getdtablesize __P((void));
141 #endif /* !HAVE_GETDTABLESIZE */
143 #if !defined (HAVE_SETLINEBUF)
144 extern int setlinebuf ();
147 /* declarations for functions defined in lib/sh/strtod.c */
148 #if !defined (HAVE_STRTOD)
149 extern double strtod __P((const char *, char **));
152 /* declarations for functions defined in lib/sh/strtol.c */
153 #if !defined (HAVE_STRTOL)
154 extern long strtol __P((const char *, char **, int));
157 /* declarations for functions defined in lib/sh/strtoul.c */
158 #if !defined (HAVE_STRTOUL)
159 extern unsigned long strtoul __P((const char *, char **, int));
162 #endif /* _EXTERNS_H_ */