1 /*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)extern.h 8.1 (Berkeley) 05/31/93 8 */ 9 10 #include <sys/cdefs.h> 11 12 /* 13 * csh.c 14 */ 15 int gethdir __P((Char *)); 16 void dosource __P((Char **, struct command *)); 17 void exitstat __P((void)); 18 void goodbye __P((void)); 19 void importpath __P((Char *)); 20 void initdesc __P((void)); 21 void pintr __P((int)); 22 void pintr1 __P((bool)); 23 void printprompt __P((void)); 24 void process __P((bool)); 25 void rechist __P((void)); 26 void untty __P((void)); 27 int vis_fputc __P((int, FILE *)); 28 29 #ifdef PROF 30 void done __P((int)); 31 #else 32 void xexit __P((int)); 33 #endif 34 35 /* 36 * dir.c 37 */ 38 void dinit __P((Char *)); 39 void dodirs __P((Char **, struct command *)); 40 Char *dcanon __P((Char *, Char *)); 41 void dtildepr __P((Char *, Char *)); 42 void dtilde __P((void)); 43 void dochngd __P((Char **, struct command *)); 44 Char *dnormalize __P((Char *)); 45 void dopushd __P((Char **, struct command *)); 46 void dopopd __P((Char **, struct command *)); 47 struct directory; 48 void dfree __P((struct directory *)); 49 50 /* 51 * dol.c 52 */ 53 void Dfix __P((struct command *)); 54 Char *Dfix1 __P((Char *)); 55 void heredoc __P((Char *)); 56 57 /* 58 * err.c 59 */ 60 void seterror __P((int, ...)); 61 void stderror __P((int, ...)); 62 63 /* 64 * exec.c 65 */ 66 void doexec __P((Char **, struct command *)); 67 void dohash __P((Char **, struct command *)); 68 void dounhash __P((Char **, struct command *)); 69 void dowhich __P((Char **, struct command *)); 70 void execash __P((Char **, struct command *)); 71 void hashstat __P((Char **, struct command *)); 72 void xechoit __P((Char **)); 73 74 /* 75 * exp.c 76 */ 77 int expr __P((Char ***)); 78 int exp0 __P((Char ***, bool)); 79 80 /* 81 * file.c 82 */ 83 #ifdef FILEC 84 int tenex __P((Char *, int)); 85 #endif 86 87 /* 88 * func.c 89 */ 90 void Setenv __P((Char *, Char *)); 91 void doalias __P((Char **, struct command *)); 92 void dobreak __P((Char **, struct command *)); 93 void docontin __P((Char **, struct command *)); 94 void doecho __P((Char **, struct command *)); 95 void doelse __P((Char **, struct command *)); 96 void doend __P((Char **, struct command *)); 97 void doeval __P((Char **, struct command *)); 98 void doexit __P((Char **, struct command *)); 99 void doforeach __P((Char **, struct command *)); 100 void doglob __P((Char **, struct command *)); 101 void dogoto __P((Char **, struct command *)); 102 void doif __P((Char **, struct command *)); 103 void dolimit __P((Char **, struct command *)); 104 void dologin __P((Char **, struct command *)); 105 void dologout __P((Char **, struct command *)); 106 void donohup __P((Char **, struct command *)); 107 void doonintr __P((Char **, struct command *)); 108 void doprintf __P((Char **, struct command *)); 109 void dorepeat __P((Char **, struct command *)); 110 void dosetenv __P((Char **, struct command *)); 111 void dosuspend __P((Char **, struct command *)); 112 void doswbrk __P((Char **, struct command *)); 113 void doswitch __P((Char **, struct command *)); 114 void doumask __P((Char **, struct command *)); 115 void dounlimit __P((Char **, struct command *)); 116 void dounsetenv __P((Char **, struct command *)); 117 void dowhile __P((Char **, struct command *)); 118 void dozip __P((Char **, struct command *)); 119 void func __P((struct command *, struct biltins *)); 120 struct biltins * 121 isbfunc __P((struct command *)); 122 void prvars __P((void)); 123 void gotolab __P((Char *)); 124 int srchx __P((Char *)); 125 void unalias __P((Char **, struct command *)); 126 void wfree __P((void)); 127 128 /* 129 * glob.c 130 */ 131 Char **dobackp __P((Char *, bool)); 132 void Gcat __P((Char *, Char *)); 133 Char *globone __P((Char *, int)); 134 int Gmatch __P((Char *, Char *)); 135 void ginit __P((void)); 136 Char **globall __P((Char **)); 137 void rscan __P((Char **, void (*)())); 138 void tglob __P((Char **)); 139 void trim __P((Char **)); 140 #ifdef FILEC 141 int sortscmp __P((const ptr_t, const ptr_t)); 142 #endif /* FILEC */ 143 144 /* 145 * hist.c 146 */ 147 void dohist __P((Char **, struct command *)); 148 struct Hist * 149 enthist __P((int, struct wordent *, bool)); 150 void savehist __P((struct wordent *)); 151 152 /* 153 * lex.c 154 */ 155 void addla __P((Char *)); 156 void bseek __P((struct Ain *)); 157 void btell __P((struct Ain *)); 158 void btoeof __P((void)); 159 void copylex __P((struct wordent *, struct wordent *)); 160 Char *domod __P((Char *, int)); 161 void freelex __P((struct wordent *)); 162 int lex __P((struct wordent *)); 163 void prlex __P((FILE *, struct wordent *)); 164 int readc __P((bool)); 165 void settell __P((void)); 166 void unreadc __P((int)); 167 168 /* 169 * misc.c 170 */ 171 int any __P((char *, int)); 172 Char **blkcat __P((Char **, Char **)); 173 Char **blkcpy __P((Char **, Char **)); 174 Char **blkend __P((Char **)); 175 void blkfree __P((Char **)); 176 int blklen __P((Char **)); 177 void blkpr __P((FILE *, Char **)); 178 Char **blkspl __P((Char **, Char **)); 179 void closem __P((void)); 180 Char **copyblk __P((Char **)); 181 int dcopy __P((int, int)); 182 int dmove __P((int, int)); 183 void donefds __P((void)); 184 Char lastchr __P((Char *)); 185 void lshift __P((Char **, int)); 186 int number __P((Char *)); 187 int prefix __P((Char *, Char *)); 188 Char **saveblk __P((Char **)); 189 void setzero __P((char *, int)); 190 Char *strip __P((Char *)); 191 char *strsave __P((char *)); 192 char *strspl __P((char *, char *)); 193 void udvar __P((Char *)); 194 195 #ifndef SHORT_STRINGS 196 # ifdef NOTUSED 197 char *strstr __P((const char *, const char *)); 198 # endif /* NOTUSED */ 199 char *strend __P((char *)); 200 #endif 201 202 /* 203 * parse.c 204 */ 205 void alias __P((struct wordent *)); 206 void freesyn __P((struct command *)); 207 struct command * 208 syntax __P((struct wordent *, struct wordent *, int)); 209 210 211 /* 212 * proc.c 213 */ 214 void dobg __P((Char **, struct command *)); 215 void dobg1 __P((Char **, struct command *)); 216 void dofg __P((Char **, struct command *)); 217 void dofg1 __P((Char **, struct command *)); 218 void dojobs __P((Char **, struct command *)); 219 void dokill __P((Char **, struct command *)); 220 void donotify __P((Char **, struct command *)); 221 void dostop __P((Char **, struct command *)); 222 void dowait __P((Char **, struct command *)); 223 void palloc __P((int, struct command *)); 224 void panystop __P((bool)); 225 void pchild __P((int)); 226 void pendjob __P((void)); 227 struct process * 228 pfind __P((Char *)); 229 int pfork __P((struct command *, int)); 230 void pgetty __P((int, int)); 231 void pjwait __P((struct process *)); 232 void pnote __P((void)); 233 void prestjob __P((void)); 234 void psavejob __P((void)); 235 void pstart __P((struct process *, int)); 236 void pwait __P((void)); 237 238 /* 239 * sem.c 240 */ 241 void execute __P((struct command *, int, int *, int *)); 242 void mypipe __P((int *)); 243 244 /* 245 * set.c 246 */ 247 struct varent 248 *adrof1 __P((Char *, struct varent *)); 249 void doset __P((Char **, struct command *)); 250 void dolet __P((Char **, struct command *)); 251 Char *putn __P((int)); 252 int getn __P((Char *)); 253 Char *value1 __P((Char *, struct varent *)); 254 void set __P((Char *, Char *)); 255 void set1 __P((Char *, Char **, struct varent *)); 256 void setq __P((Char *, Char **, struct varent *)); 257 void unset __P((Char **, struct command *)); 258 void unset1 __P((Char *[], struct varent *)); 259 void unsetv __P((Char *)); 260 void setNS __P((Char *)); 261 void shift __P((Char **, struct command *)); 262 void plist __P((struct varent *)); 263 264 /* 265 * time.c 266 */ 267 void donice __P((Char **, struct command *)); 268 void dotime __P((Char **, struct command *)); 269 void prusage __P((struct rusage *, struct rusage *, 270 struct timeval *, struct timeval *)); 271 void ruadd __P((struct rusage *, struct rusage *)); 272 void settimes __P((void)); 273 void tvadd __P((struct timeval *, struct timeval *)); 274 void tvsub __P((struct timeval *, struct timeval *, struct timeval *)); 275 void pcsecs __P((long)); 276 void psecs __P((long)); 277 278 /* 279 * alloc.c 280 */ 281 void Free __P((ptr_t)); 282 ptr_t Malloc __P((size_t)); 283 ptr_t Realloc __P((ptr_t, size_t)); 284 ptr_t Calloc __P((size_t, size_t)); 285 void showall __P((Char **, struct command *)); 286 287 /* 288 * str.c: 289 */ 290 #ifdef SHORT_STRINGS 291 Char *s_strchr __P((Char *, int)); 292 Char *s_strrchr __P((Char *, int)); 293 Char *s_strcat __P((Char *, Char *)); 294 #ifdef NOTUSED 295 Char *s_strncat __P((Char *, Char *, size_t)); 296 #endif 297 Char *s_strcpy __P((Char *, Char *)); 298 Char *s_strncpy __P((Char *, Char *, size_t)); 299 Char *s_strspl __P((Char *, Char *)); 300 size_t s_strlen __P((Char *)); 301 int s_strcmp __P((Char *, Char *)); 302 int s_strncmp __P((Char *, Char *, size_t)); 303 Char *s_strsave __P((Char *)); 304 Char *s_strend __P((Char *)); 305 Char *s_strstr __P((Char *, Char *)); 306 Char *str2short __P((char *)); 307 Char **blk2short __P((char **)); 308 char *short2str __P((Char *)); 309 char **short2blk __P((Char **)); 310 #endif 311 char *short2qstr __P((Char *)); 312 char *vis_str __P((Char *)); 313