2 * prototypes for PD-KSH
3 * originally generated using "cproto.c 3.5 92/04/11 19:28:01 cthuang "
10 void afreeall(Area
*);
11 void * alloc(size_t, Area
*);
12 void * aresize(void *, size_t, Area
*);
13 void afree(void *, Area
*);
19 int c_whence(char **);
20 int c_command(char **);
21 int c_typeset(char **);
23 int c_unalias(char **);
28 void getopts_reset(int);
29 int c_getopts(char **);
40 int c_brkcont(char **);
41 int c_exitreturn(char **);
44 int c_ulimit(char **);
46 int timex(struct op
*, int);
47 void timex_hook(struct op
*, char ** volatile *);
49 int c_builtin(char **);
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);
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);
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
*);
77 int evaluate(const char *, long *, int, bool);
78 int v_evaluate(struct tbl
*, const char *, volatile int, bool);
80 void init_histvec(void);
81 void hist_init(Source
*);
82 void hist_finish(void);
83 void histsave(int, const char *, int);
86 void sethistsize(int);
87 void sethistfile(const char *);
88 char ** histpos(void);
90 int findhist(int, int, const char *, int);
91 int findhistrel(const char *);
92 char **hist_get_newest(int);
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)));
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 */
116 int ksh_dup2(int, int, 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
**);
133 int exchild(struct op
*, int, int);
134 void startlast(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);
143 int j_stopped_running(void);
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);
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__
));
157 void quitenv(struct shf
*);
158 void cleanup_parents_env(void);
159 void cleanup_proc_env(void);
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 *,
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);
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 *);
194 void initkeywords(void);
195 struct op
* compile(Source
*);
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
*);
206 void inittraps(void);
207 void alarm_init(void);
208 Trap
* gettrap(const char *, int);
210 void intrcheck(void);
211 int fatal_trap_check(void);
212 int trap_pending(void);
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);
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
*);
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 **);
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);
272 int amigaos_dupbbase(int, int);
273 int pipe(int filedes
[]);