reenabled swaptest. quake should now load data and start on big endian architectures...
[AROS-Contrib.git] / gnu / abc-shell / proto.h
blobe06e7120e6d039f99696b27bbcaa9a48e9447e56
1 /*
2 * prototypes for PD-KSH
3 * originally generated using "cproto.c 3.5 92/04/11 19:28:01 cthuang "
4 * $Id$
5 */
7 #include "attrib.h"
8 /* alloc.c */
9 Area * ainit(Area *);
10 void afreeall(Area *);
11 void * alloc(size_t, Area *);
12 void * aresize(void *, size_t, Area *);
13 void afree(void *, Area *);
14 /* c_ksh.c */
15 int c_hash(char **);
16 int c_cd(char **);
17 int c_pwd(char **);
18 int c_print(char **);
19 int c_whence(char **);
20 int c_command(char **);
21 int c_typeset(char **);
22 int c_alias(char **);
23 int c_unalias(char **);
24 int c_let(char **);
25 int c_jobs(char **);
26 int c_fgbg(char **);
27 int c_kill(char **);
28 void getopts_reset(int);
29 int c_getopts(char **);
30 int c_bind(char **);
31 /* c_sh.c */
32 int c_label(char **);
33 int c_shift(char **);
34 int c_umask(char **);
35 int c_dot(char **);
36 int c_wait(char **);
37 int c_read(char **);
38 int c_eval(char **);
39 int c_trap(char **);
40 int c_brkcont(char **);
41 int c_exitreturn(char **);
42 int c_set(char **);
43 int c_unset(char **);
44 int c_ulimit(char **);
45 int c_times(char **);
46 int timex(struct op *, int);
47 void timex_hook(struct op *, char ** volatile *);
48 int c_exec(char **);
49 int c_builtin(char **);
50 /* c_test.c */
51 int c_test(char **);
52 /* eval.c */
53 char * substitute(const char *, int);
54 char ** eval(char **, int);
55 char * evalstr(char *, int);
56 char * evalonestr(char *, int);
57 char *debunk(char *, const char *, size_t);
58 void expand(char *, XPtrV *, int);
59 int glob_str(char *, XPtrV *, int);
60 /* exec.c */
61 int execute(struct op * volatile, volatile int);
62 int shcomexec(char **);
63 struct tbl * findfunc(const char *, unsigned int, int);
64 int define(const char *, struct op *);
65 void builtin(const char *, int (*)(char **));
66 struct tbl * findcom(const char *, int);
67 void flushcom(int);
68 char * search(const char *, const char *, int, int *);
69 int search_access(const char *, int, int *);
70 int pr_menu(char *const *);
71 int pr_list(char *const *);
73 void copyenv(struct globals *);
74 void restoreenv(struct globals *);
76 /* expr.c */
77 int evaluate(const char *, long *, int, bool);
78 int v_evaluate(struct tbl *, const char *, volatile int, bool);
79 /* history.c */
80 void init_histvec(void);
81 void hist_init(Source *);
82 void hist_finish(void);
83 void histsave(int, const char *, int);
84 #ifdef HISTORY
85 int c_fc(char **);
86 void sethistsize(int);
87 void sethistfile(const char *);
88 char ** histpos(void);
89 int histnum(int);
90 int findhist(int, int, const char *, int);
91 int findhistrel(const char *);
92 char **hist_get_newest(int);
93 #endif /* HISTORY */
94 /* io.c */
95 void errorf(const char *, ...)
96 __attribute__((__noreturn__, __format__ (printf, 1, 2)));
97 void warningf(int, const char *, ...)
98 __attribute__((__format__ (printf, 2, 3)));
99 void bi_errorf(const char *, ...)
100 __attribute__((__format__ (printf, 1, 2)));
101 void internal_errorf(int, const char *, ...)
102 __attribute__((__format__ (printf, 2, 3)));
103 void error_prefix(int);
104 void shellf(const char *, ...)
105 __attribute__((__format__ (printf, 1, 2)));
106 void shprintf(const char *, ...)
107 __attribute__((__format__ (printf, 1, 2)));
108 #ifdef KSH_DEBUG
109 void kshdebug_init_(void);
110 void kshdebug_printf_(const char *, ...)
111 __attribute__((__format__ (printf, 1, 2)));
112 void kshdebug_dump_(const char *, const void *, int);
113 #endif /* KSH_DEBUG */
114 int can_seek(int);
115 void initio(void);
116 int ksh_dup2(int, int, int);
117 int savefd(int);
118 void restfd(int, int);
119 void openpipe(int *);
120 void closepipe(int *);
121 int check_fd(char *, int, const char **);
122 void coproc_init(void);
123 void coproc_read_close(int);
124 void coproc_readw_close(int);
125 void coproc_write_close(int);
126 int coproc_getfd(int, const char **);
127 void coproc_cleanup(int);
128 struct temp *maketemp(Area *, Temp_type, struct temp **);
129 /* jobs.c */
130 void j_init(int);
131 void j_exit(void);
132 void j_change(void);
133 int exchild(struct op *, int, int);
134 void startlast(void);
135 int waitlast(void);
136 int waitfor(const char *, int *);
137 int j_kill(const char *, int);
138 int j_resume(const char *, int);
139 int j_jobs(const char *, int, int);
140 int j_njobs(void);
141 void j_notify(void);
142 pid_t j_async(void);
143 int j_stopped_running(void);
144 /* lex.c */
145 int yylex(int cf);
146 void yyerror(const char *, ...)
147 __attribute__((__noreturn__, __format__ (printf, 1, 2)));
148 Source * pushs(int, Area *);
149 void set_prompt(int, Source *);
150 void pprompt(const char *, int);
151 /* main.c */
152 int include(const char *, int, char **, int);
153 int command(const char *);
154 int shell(Source *volatile, int volatile);
155 void unwind(int) __attribute__((__noreturn__));
156 void newenv(int);
157 void quitenv(struct shf *);
158 void cleanup_parents_env(void);
159 void cleanup_proc_env(void);
160 /* misc.c */
161 void setctypes(const char *, int);
162 void initctypes(void);
163 char * ulton(unsigned long, int);
164 char * str_save(const char *, Area *);
165 char * str_nsave(const char *, int, Area *);
166 int option(const char *);
167 char * getoptions(void);
168 void change_flag(enum sh_flag, int, int);
169 int parse_args(char **, int, int *);
170 int getn(const char *, int *);
171 int bi_getn(const char *, int *);
172 char * strerror(int);
173 int gmatch(const char *, const char *, int);
174 int has_globbing(const char *, const char *);
175 const unsigned char *pat_scan(const unsigned char *, const unsigned char *,
176 int);
177 void qsortp(void **, size_t, int (*)(void *, void *));
178 int xstrcmp(void *, void *);
179 void ksh_getopt_reset(Getopt *, int);
180 int ksh_getopt(char **, Getopt *, const char *);
181 void print_value_quoted(const char *);
182 void print_columns(struct shf *, int, char *(*)(void *, int, char *, int),
183 void *, int, int prefcol);
184 int strip_nuls(char *, int);
185 int blocking_read(int, char *, int);
186 int reset_nonblock(int fd);
187 char *ksh_get_wd(char *, int);
188 /* path.c */
189 int make_path(const char *, const char *, char **, XString *, int *);
190 void simplify_path(char *);
191 char *get_phys_path(const char *);
192 void set_current_wd(char *);
193 /* syn.c */
194 void initkeywords(void);
195 struct op * compile(Source *);
196 /* table.c */
197 unsigned int hash(const char *);
198 void ktinit(struct table *, Area *, int);
199 struct tbl * ktsearch(struct table *, const char *, unsigned int);
200 struct tbl * ktenter(struct table *, const char *, unsigned int);
201 void ktdelete(struct tbl *);
202 void ktwalk(struct tstate *, struct table *);
203 struct tbl * ktnext(struct tstate *);
204 struct tbl ** ktsort(struct table *);
205 /* trap.c */
206 void inittraps(void);
207 void alarm_init(void);
208 Trap * gettrap(const char *, int);
209 void trapsig(int);
210 void intrcheck(void);
211 int fatal_trap_check(void);
212 int trap_pending(void);
213 void runtraps(int);
214 void runtrap(Trap *);
215 void cleartraps(void);
216 void restoresigs(void);
217 void settrap(Trap *, char *);
218 int block_pipe(void);
219 void restore_pipe(int);
220 int setsig(Trap *, sig_t, int);
221 void setexecsig(Trap *, int);
222 /* tree.c */
223 int fptreef(struct shf *, int, const char *, ...);
224 char * snptreef(char *, int, const char *, ...);
225 struct op * tcopy(struct op *, Area *);
226 char * wdcopy(const char *, Area *);
227 char * wdscan(const char *, int);
228 char * wdstrip(const char *);
229 void tfree(struct op *, Area *);
230 /* var.c */
231 void newblock(void);
232 void popblock(void);
233 void initvar(void);
234 struct tbl * global(const char *);
235 struct tbl * local(const char *, bool);
236 char * str_val(struct tbl *);
237 long intval(struct tbl *);
238 int setstr(struct tbl *, const char *, int);
239 struct tbl *setint_v(struct tbl *, struct tbl *, bool);
240 void setint(struct tbl *, long);
241 int getint(struct tbl *, long *, bool);
242 struct tbl * typeset(const char *, Tflag, Tflag, int, int);
243 void unset(struct tbl *, int);
244 char * skip_varname(const char *, int);
245 char *skip_wdvarname(const char *, int);
246 int is_wdvarname(const char *, int);
247 int is_wdvarassign(const char *);
248 char ** makenv(void);
249 void change_random(void);
250 int array_ref_len(const char *);
251 char * arrayname(const char *);
252 void set_array(const char *, int, char **);
253 /* version.c */
255 /*amigaos.c*/
257 char *convert_path_u2a(const char *);
258 char *convert_path_a2u(const char *);
259 char *convert_path_multi(const char *);
260 bool *assign_posix(void);
261 void SetAmiUpdateENVVariable(const char *);
263 unsigned int alarm(unsigned int);
264 #ifdef __AROS__
265 pid_t getppid(void);
266 #else
267 int getppid(void);
268 #endif
269 int fork(void);
270 int wait(int *);
271 int pause(void);
272 int amigaos_dupbbase(int, int);
273 int pipe(int filedes[]);