Expand PMF_FN_* macros.
[netbsd-mini2440.git] / bin / ksh / proto.h
blob1c059ae3c50f4fbf3377665f34b2cf9bf31426e3
1 /* $NetBSD: proto.h,v 1.6 2004/07/07 19:20:09 mycroft Exp $ */
3 /*
4 * prototypes for PD-KSH
5 * originally generated using "cproto.c 3.5 92/04/11 19:28:01 cthuang "
6 * $Id: proto.h,v 1.7 2005/06/26 19:09:00 christos Exp $
7 */
9 /* alloc.c */
10 Area * ainit ARGS((Area *));
11 void afreeall ARGS((Area *));
12 void * alloc ARGS((size_t, Area *));
13 void * aresize ARGS((void *, size_t, Area *));
14 void afree ARGS((void *, Area *));
15 /* c_ksh.c */
16 int c_hash ARGS((char **));
17 int c_cd ARGS((char **));
18 int c_pwd ARGS((char **));
19 int c_print ARGS((char **));
20 int c_whence ARGS((char **));
21 int c_command ARGS((char **));
22 int c_typeset ARGS((char **));
23 int c_alias ARGS((char **));
24 int c_unalias ARGS((char **));
25 int c_let ARGS((char **));
26 int c_jobs ARGS((char **));
27 int c_fgbg ARGS((char **));
28 int c_kill ARGS((char **));
29 void getopts_reset ARGS((int));
30 int c_getopts ARGS((char **));
31 int c_bind ARGS((char **));
32 /* c_sh.c */
33 int c_label ARGS((char **));
34 int c_shift ARGS((char **));
35 int c_umask ARGS((char **));
36 int c_dot ARGS((char **));
37 int c_wait ARGS((char **));
38 int c_read ARGS((char **));
39 int c_eval ARGS((char **));
40 int c_trap ARGS((char **));
41 int c_brkcont ARGS((char **));
42 int c_exitreturn ARGS((char **));
43 int c_set ARGS((char **));
44 int c_unset ARGS((char **));
45 int c_ulimit ARGS((char **));
46 int c_times ARGS((char **));
47 int timex ARGS((struct op *, int));
48 void timex_hook ARGS((struct op *, char ** volatile *));
49 int c_exec ARGS((char **));
50 int c_builtin ARGS((char **));
51 /* c_test.c */
52 int c_test ARGS((char **));
53 /* edit.c: most prototypes in edit.h */
54 void x_init ARGS((void));
55 int x_read ARGS((char *, size_t));
56 void set_editmode ARGS((const char *));
57 /* emacs.c: most prototypes in edit.h */
58 int x_bind ARGS((const char *, const char *, int, int));
59 /* eval.c */
60 char * substitute ARGS((const char *, int));
61 char ** eval ARGS((char **, int));
62 char * evalstr ARGS((char *, int));
63 char * evalonestr ARGS((char *, int));
64 char *debunk ARGS((char *, const char *, size_t));
65 void expand ARGS((char *, XPtrV *, int));
66 int glob_str ARGS((char *, XPtrV *, int));
67 /* exec.c */
68 int fd_clexec ARGS((int));
69 int execute ARGS((struct op * volatile, volatile int));
70 int shcomexec ARGS((char **));
71 struct tbl * findfunc ARGS((const char *, unsigned int, int));
72 int define ARGS((const char *, struct op *));
73 void builtin ARGS((const char *, int (*)(char **)));
74 struct tbl * findcom ARGS((const char *, int));
75 void flushcom ARGS((int all));
76 char * search ARGS((const char *, const char *, int, int *));
77 int search_access ARGS((const char *, int, int *));
78 int pr_menu ARGS((char *const *));
79 int pr_list ARGS((char *const *));
80 /* expr.c */
81 int evaluate ARGS((const char *, long *, int));
82 int v_evaluate ARGS((struct tbl *, const char *, volatile int));
83 /* history.c */
84 void init_histvec ARGS((void));
85 void hist_init ARGS((Source *));
86 void hist_finish ARGS((void));
87 void histsave ARGS((int, const char *, int));
88 #ifdef HISTORY
89 int c_fc ARGS((char **));
90 void sethistsize ARGS((int));
91 void sethistfile ARGS((const char *));
92 # ifdef EASY_HISTORY
93 void histappend ARGS((const char *, int));
94 # endif
95 char ** histpos ARGS((void));
96 int histN ARGS((void));
97 int histnum ARGS((int));
98 int findhist ARGS((int, int, const char *, int));
99 #endif /* HISTORY */
100 /* io.c */
101 void errorf ARGS((const char *, ...))
102 GCC_FUNC_ATTR2(noreturn, format(printf, 1, 2));
103 void warningf ARGS((int, const char *, ...))
104 GCC_FUNC_ATTR(format(printf, 2, 3));
105 void bi_errorf ARGS((const char *, ...))
106 GCC_FUNC_ATTR(format(printf, 1, 2));
107 void internal_errorf ARGS((int, const char *, ...))
108 GCC_FUNC_ATTR(format(printf, 2, 3));
109 void error_prefix ARGS((int));
110 void shellf ARGS((const char *, ...))
111 GCC_FUNC_ATTR(format(printf, 1, 2));
112 void shprintf ARGS((const char *, ...))
113 GCC_FUNC_ATTR(format(printf, 1, 2));
114 #ifdef KSH_DEBUG
115 void kshdebug_init_ ARGS((void));
116 void kshdebug_printf_ ARGS((const char *, ...))
117 GCC_FUNC_ATTR(format(printf, 1, 2));
118 void kshdebug_dump_ ARGS((const char *, const void *, int));
119 #endif /* KSH_DEBUG */
120 int can_seek ARGS((int));
121 void initio ARGS((void));
122 int ksh_dup2 ARGS((int, int, int));
123 int savefd ARGS((int, int));
124 void restfd ARGS((int, int));
125 void openpipe ARGS((int *));
126 void closepipe ARGS((int *));
127 int check_fd ARGS((char *, int, const char **));
128 #ifdef KSH
129 void coproc_init ARGS((void));
130 void coproc_read_close ARGS((int));
131 void coproc_readw_close ARGS((int));
132 void coproc_write_close ARGS((int));
133 int coproc_getfd ARGS((int, const char **));
134 void coproc_cleanup ARGS((int));
135 #endif /* KSH */
136 struct temp *maketemp ARGS((Area *, Temp_type, struct temp **));
137 /* jobs.c */
138 void j_init ARGS((int));
139 void j_exit ARGS((void));
140 void j_change ARGS((void));
141 int exchild ARGS((struct op *, int, int));
142 void startlast ARGS((void));
143 int waitlast ARGS((void));
144 int waitfor ARGS((const char *, int *));
145 int j_kill ARGS((const char *, int));
146 int j_resume ARGS((const char *, int));
147 int j_jobs ARGS((const char *, int, int));
148 void j_notify ARGS((void));
149 pid_t j_async ARGS((void));
150 int j_stopped_running ARGS((void));
151 /* lex.c */
152 int yylex ARGS((int));
153 void yyerror ARGS((const char *, ...))
154 GCC_FUNC_ATTR2(noreturn, format(printf, 1, 2));
155 Source * pushs ARGS((int, Area *));
156 void set_prompt ARGS((int, Source *));
157 void pprompt ARGS((const char *, int));
158 /* mail.c */
159 #ifdef KSH
160 void mcheck ARGS((void));
161 void mcset ARGS((long));
162 void mbset ARGS((char *));
163 void mpset ARGS((char *));
164 #endif /* KSH */
165 /* main.c */
166 int include ARGS((const char *, int, char **, int));
167 int command ARGS((const char *));
168 int shell ARGS((Source *volatile, int volatile));
169 void unwind ARGS((int)) GCC_FUNC_ATTR(noreturn);
170 void newenv ARGS((int));
171 void quitenv ARGS((void));
172 void cleanup_parents_env ARGS((void));
173 void cleanup_proc_env ARGS((void));
174 void aerror ARGS((Area *, const char *))
175 GCC_FUNC_ATTR(noreturn);
176 /* misc.c */
177 void setctypes ARGS((const char *, int));
178 void initctypes ARGS((void));
179 char * ulton ARGS((unsigned long, int));
180 char * str_save ARGS((const char *, Area *));
181 char * str_nsave ARGS((const char *, int, Area *));
182 int option ARGS((const char *));
183 char * getoptions ARGS((void));
184 void change_flag ARGS((enum sh_flag, int, int));
185 int parse_args ARGS((char **v, int what, int *));
186 int getn ARGS((const char *, int *));
187 int bi_getn ARGS((const char *, int *));
188 int gmatch ARGS((const char *, const char *, int));
189 int has_globbing ARGS((const char *, const char *));
190 const unsigned char *pat_scan ARGS((const unsigned char *,
191 const unsigned char *, int));
192 void qsortp ARGS((void **, size_t, int (*)(void *, void *)));
193 int xstrcmp ARGS((void *, void *));
194 void ksh_getopt_reset ARGS((Getopt *, int));
195 int ksh_getopt ARGS((char **, Getopt *, const char *));
196 void print_value_quoted ARGS((const char *));
197 void print_columns ARGS((struct shf *, int,
198 char *(*)(void *, int, char *, int),
199 void *, int, int));
200 int strip_nuls ARGS((char *, int));
201 char *str_zcpy ARGS((char *, const char *, int));
202 int blocking_read ARGS((int, char *, int));
203 int reset_nonblock ARGS((int));
204 char *ksh_get_wd ARGS((char *, int));
205 /* path.c */
206 int make_path ARGS((const char *, const char *,
207 char **, XString *, int *));
208 void simplify_path ARGS((char *));
209 char *get_phys_path ARGS((const char *));
210 void set_current_wd ARGS((char *));
211 /* syn.c */
212 void initkeywords ARGS((void));
213 struct op * compile ARGS((Source *));
214 /* table.c */
215 unsigned int hash ARGS((const char *));
216 void tinit ARGS((struct table *, Area *, int));
217 struct tbl * tsearch ARGS((struct table *, const char *, unsigned int));
218 struct tbl * tenter ARGS((struct table *, const char *, unsigned int));
219 void tdelete ARGS((struct tbl *));
220 void twalk ARGS((struct tstate *, struct table *));
221 struct tbl * tnext ARGS((struct tstate *));
222 struct tbl ** tsort ARGS((struct table *));
223 /* trace.c */
224 /* trap.c */
225 void inittraps ARGS((void));
226 #ifdef KSH
227 void alarm_init ARGS((void));
228 #endif /* KSH */
229 Trap * gettrap ARGS((const char *, int));
230 RETSIGTYPE trapsig ARGS((int));
231 void intrcheck ARGS((void));
232 int fatal_trap_check ARGS((void));
233 int trap_pending ARGS((void));
234 void runtraps ARGS((int));
235 void runtrap ARGS((Trap *));
236 void cleartraps ARGS((void));
237 void restoresigs ARGS((void));
238 void settrap ARGS((Trap *, char *));
239 int block_pipe ARGS((void));
240 void restore_pipe ARGS((int));
241 int setsig ARGS((Trap *, handler_t, int));
242 void setexecsig ARGS((Trap *, int));
243 /* tree.c */
244 int fptreef ARGS((struct shf *, int, const char *, ...));
245 char * snptreef ARGS((char *, int, const char *, ...));
246 struct op * tcopy ARGS((struct op *, Area *));
247 char * wdcopy ARGS((const char *, Area *));
248 char * wdscan ARGS((const char *, int));
249 char * wdstrip ARGS((const char *));
250 void tfree ARGS((struct op *, Area *));
251 /* var.c */
252 void newblock ARGS((void));
253 void popblock ARGS((void));
254 void initvar ARGS((void));
255 struct tbl * global ARGS((const char *));
256 struct tbl * local ARGS((const char *, bool_t));
257 char * str_val ARGS((struct tbl *));
258 long intval ARGS((struct tbl *));
259 int setstr ARGS((struct tbl *, const char *, int));
260 struct tbl *setint_v ARGS((struct tbl *, struct tbl *));
261 void setint ARGS((struct tbl *, long));
262 int getint ARGS((struct tbl *, long *));
263 struct tbl * typeset ARGS((const char *, Tflag, Tflag, int, int));
264 void unset ARGS((struct tbl *, int));
265 char * skip_varname ARGS((const char *, int));
266 char *skip_wdvarname ARGS((const char *, int));
267 int is_wdvarname ARGS((const char *, int));
268 int is_wdvarassign ARGS((const char *));
269 char ** makenv ARGS((void));
270 void change_random ARGS((void));
271 int array_ref_len ARGS((const char *));
272 char * arrayname ARGS((const char *));
273 void set_array ARGS((const char *, int, char **));
274 /* version.c */
275 /* vi.c: see edit.h */
278 /* Hack to avoid billions of compile warnings on SunOS 4.1.x */
279 #if defined(MUN) && defined(sun) && !defined(__svr4__)
280 extern void bcopy ARGS((const void *, void *, size_t));
281 extern intclose ARGS((FILE *));
282 extern intprintf ARGS((FILE *, const char *, ...));
283 extern intread ARGS((void *, int, int, FILE *));
284 extern int ioctl ARGS((int, int, void *));
285 extern int killpg ARGS((int, int));
286 extern int nice ARGS((int));
287 extern int readlink ARGS((const char *, char *, int));
288 extern int setpgrp ARGS((int, int));
289 extern int strcasecmp ARGS((const char *, const char *));
290 extern int tolower ARGS((int));
291 extern int toupper ARGS((int));
292 /* Include files aren't included yet */
293 extern int getrlimit ARGS(( /* int, struct rlimit * */ ));
294 extern int getrusage ARGS(( /* int, struct rusage * */ ));
295 extern int gettimeofday ARGS(( /* struct timeval *, struct timezone * */ ));
296 extern int setrlimit ARGS(( /* int, struct rlimit * */ ));
297 extern int lstat ARGS(( /* const char *, struct stat * */ ));
298 #endif