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