]> git.ipfire.org Git - thirdparty/bash.git/blame - externs.h
Imported from ../bash-2.03.tar.gz.
[thirdparty/bash.git] / externs.h
CommitLineData
726f6388
JA
1/* externs.h -- extern function declarations which do not appear in their
2 own header file. */
3
4/* Copyright (C) 1993 Free Software Foundation, Inc.
5
6 This file is part of GNU Bash, the Bourne Again SHell.
7
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
11 version.
12
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
16 for more details.
17
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. */
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. */
d166f048 30extern long evalexp __P((char *, int *));
726f6388
JA
31
32/* Functions from print_cmd.c. */
33extern char *make_command_string __P((COMMAND *));
34extern void print_command __P((COMMAND *));
35extern void print_simple_command __P((SIMPLE_COM *));
36extern char *named_function_string __P((char *, COMMAND *, int));
ccc6cda3
JA
37extern void print_word_list __P((WORD_LIST *, char *));
38extern void xtrace_print_word_list __P((WORD_LIST *));
cce855bc
JA
39#if defined (DPAREN_ARITHMETIC)
40extern void xtrace_print_arith_cmd __P((WORD_LIST *));
41#endif
42#if defined (COND_COMMAND)
43extern void xtrace_print_cond_term __P((int, int, WORD_DESC *, char *, char *));
44#endif
726f6388
JA
45
46/* Functions from shell.c. */
cce855bc 47extern void exit_shell __P((int));
ccc6cda3 48extern void disable_priv_mode __P((void));
d166f048 49extern void unbind_args __P((void));
ccc6cda3
JA
50
51#if defined (RESTRICTED_SHELL)
b72432fd 52extern int shell_is_restricted __P((char *));
ccc6cda3
JA
53extern int maybe_make_restricted __P((char *));
54#endif
55
cce855bc 56extern void unset_bash_input __P((int));
d166f048
JA
57extern void get_current_user_info __P((void));
58
ccc6cda3
JA
59/* Functions from eval.c. */
60extern int reader_loop __P((void));
61extern int parse_command __P((void));
62extern int read_command __P((void));
cce855bc 63extern WORD_LIST *parse_string_to_word_list __P((char *, char *));
726f6388
JA
64
65/* Functions from braces.c. */
66#if defined (BRACE_EXPANSION)
67extern char **brace_expand __P((char *));
68#endif
69
ccc6cda3
JA
70/* Miscellaneous functions from parse.y */
71extern int yyparse ();
72extern void reset_parser ();
73
74/* Functions from version.c. */
75extern char *shell_version_string __P((void));
76extern void show_shell_version __P((int));
77
78/* Declarations for functions defined in locale.c */
79extern void set_default_locale __P((void));
80extern void set_default_locale_vars __P((void));
81extern int set_locale_var __P((char *, char *));
82extern int set_lang __P((char *, char *));
83extern char *get_locale_var __P((char *));
84extern char *localetrans __P((char *, int, int *));
85
86/* Declarations for functions defined in list.c. */
87extern void map_over_list __P((GENERIC_LIST *, Function *));
88extern void map_over_words __P((WORD_LIST *, Function *));
89extern GENERIC_LIST *reverse_list ();
90extern int list_length ();
91extern GENERIC_LIST *list_append ();
92extern GENERIC_LIST *delete_element ();
93
cce855bc
JA
94/* Declarations for functions defined in stringlib.c */
95extern char *ansicstr __P((char *, int, int *, int *));
96extern int find_name_in_array __P((char *, char **));
97extern int array_len __P((char **));
98extern void free_array_members __P((char **));
99extern void free_array __P((char **));
100extern char **copy_array __P((char **));
101extern int qsort_string_compare ();
102extern void sort_char_array __P((char **));
103extern char **word_list_to_argv __P((WORD_LIST *, int, int, int *));
104extern WORD_LIST *argv_to_word_list __P((char **, int, int));
105
106extern char *strsub __P((char *, char *, char *, int));
107extern void strip_leading __P((char *));
108extern void strip_trailing __P((char *, int, int));
109extern char *strindex __P((char *, char *));
110extern void xbcopy __P((char *, char *, int));
111
112/* Functions from the bash library, lib/sh/libsh.a. These should really
113 go into a separate include file. */
114/* Declarations for functions defined in lib/sh/getcwd.c */
115#if !defined (HAVE_GETCWD)
116extern char *getcwd __P((char *, size_t));
117#endif
118
119/* Declarations for functions defined in lib/sh/itos.c */
b72432fd 120extern char *inttostr __P((int, char *, int));
cce855bc
JA
121extern char *itos __P((int));
122
123/* Declarations for functions defined in lib/sh/oslib.c */
ccc6cda3
JA
124extern long get_clk_tck __P((void));
125
126#if !defined (strerror)
127extern char *strerror __P((int));
128#endif
129
130#if !defined (HAVE_STRCASECMP)
e8ce775d
JA
131extern int strncasecmp __P((const char *, const char *, int));
132extern int strcasecmp __P((const char *, const char *));
ccc6cda3
JA
133#endif /* HAVE_STRCASECMP */
134
135extern int dup2 __P((int, int));
726f6388 136
ccc6cda3
JA
137#if !defined (HAVE_GETHOSTNAME)
138extern int gethostname __P((char *, int));
139#endif /* !HAVE_GETHOSTNAME */
140
141#if !defined (HAVE_GETDTABLESIZE)
142extern int getdtablesize __P((void));
143#endif /* !HAVE_GETDTABLESIZE */
144
145#if !defined (HAVE_SETLINEBUF)
146extern int setlinebuf ();
147#endif
726f6388 148
cce855bc
JA
149/* declarations for functions defined in lib/sh/strtod.c */
150#if !defined (HAVE_STRTOD)
151extern double strtod __P((const char *, char **));
152#endif
ccc6cda3 153
cce855bc
JA
154/* declarations for functions defined in lib/sh/strtol.c */
155#if !defined (HAVE_STRTOL)
156extern long strtol __P((const char *, char **, int));
157#endif
158
159/* declarations for functions defined in lib/sh/strtoul.c */
160#if !defined (HAVE_STRTOUL)
161extern unsigned long strtoul __P((const char *, char **, int));
162#endif
ccc6cda3
JA
163
164#endif /* _EXTERNS_H_ */