ce831f78e74625ebc91700541e2f0c373ee00886
[platform/upstream/bash.git] / builtins / common.h
1 /* common.h -- extern declarations for functions defined in common.c. */
2
3 /* Copyright (C) 1993 Free Software Foundation, Inc.
4
5    This file is part of GNU Bash, the Bourne Again SHell.
6
7    Bash is free software; you can redistribute it and/or modify it under
8    the terms of the GNU General Public License as published by the Free
9    Software Foundation; either version 2, or (at your option) any later
10    version.
11
12    Bash is distributed in the hope that it will be useful, but WITHOUT ANY
13    WARRANTY; without even the implied warranty of MERCHANTABILITY or
14    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15    for more details.
16
17    You should have received a copy of the GNU General Public License along
18    with Bash; see the file COPYING.  If not, write to the Free Software
19    Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20
21 #if  !defined (__COMMON_H)
22 #  define __COMMON_H
23
24 #include "../stdc.h"
25
26 #define ISOPTION(s, c)  (s[0] == '-' && !s[2] && s[1] == c)
27
28 extern void builtin_error __P((const char *, ...));
29 extern void builtin_usage ();
30 extern void bad_option ();
31
32 extern char **make_builtin_argv ();
33
34 extern int get_numeric_arg ();
35 extern void remember_args ();
36 extern void no_args ();
37 extern int no_options ();
38
39 extern int read_octal ();
40
41 extern void push_context (), pop_context ();
42 extern void push_dollar_vars (), pop_dollar_vars ();
43 extern void dispose_saved_dollar_vars ();
44 extern int dollar_vars_changed ();
45 extern void set_dollar_vars_unchanged (), set_dollar_vars_changed ();
46
47 /* Keeps track of the current working directory. */
48 extern char *the_current_working_directory;
49 extern char *get_working_directory ();
50 extern void set_working_directory ();
51
52 #if defined (JOB_CONTROL)
53 extern int get_job_spec ();
54 #endif
55
56 extern int display_signal_list ();
57
58 /* It's OK to declare a function as returning a Function * without
59    providing a definition of what a `Function' is. */
60 extern struct builtin *builtin_address_internal ();
61 extern Function *find_shell_builtin ();
62 extern Function *builtin_address ();
63 extern Function *find_special_builtin ();
64
65 extern void initialize_shell_builtins ();
66
67 extern char *single_quote ();
68 extern char *double_quote ();
69 extern char *backslash_quote ();
70 extern int contains_shell_metas ();
71
72 /* Functions from hash.def */
73 extern void initialize_filename_hashing ();
74 extern void flush_hashed_filenames ();
75 extern char *find_hashed_filename ();
76 extern void remove_hashed_filename ();
77 extern void remember_filename ();
78
79 /* Functions from set.def */
80 extern void initialize_shell_options ();
81 extern void list_minus_o_opts ();
82 extern int set_minus_o_option ();
83 extern int minus_o_option_value ();
84
85 /* Functions from type.def */
86 extern int describe_command ();
87
88 /* Functions from setattr.def */
89 extern int set_or_show_attributes ();
90 extern int show_var_attributes ();
91 extern int show_name_attributes ();
92 extern void set_var_attribute ();
93
94 /* Functions from pushd.def */
95 extern char *get_dirstack_element ();
96 extern void set_dirstack_element ();
97 extern WORD_LIST *get_directory_stack ();
98
99 /* Functions from evalstring.c */
100 extern int parse_and_execute ();
101 extern void parse_and_execute_cleanup ();
102
103 /* Functions from evalfile.c */
104 extern int maybe_execute_file __P((char *, int));
105 extern int source_file __P((char *));
106
107 #endif /* !__COMMON_H */