1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
|
/*
* sh.decls.h External declarations from sh*.c
*/
/*-
* Copyright (c) 1980, 1991 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef _h_sh_decls
#define _h_sh_decls
/*
* sh.c
*/
extern int gethdir __P((Char *));
extern void dosource __P((Char **, struct command *));
extern void exitstat __P((void));
extern void goodbye __P((Char **, struct command *));
extern void importpath __P((Char *));
extern void initdesc __P((void));
extern sigret_t pintr __P((int));
extern void pintr1 __P((bool));
extern void process __P((bool));
extern void untty __P((void));
#ifdef PROF
extern void done __P((int));
#else
extern void xexit __P((int));
#endif
/*
* sh.dir.c
*/
extern void dinit __P((Char *));
extern void dodirs __P((Char **, struct command *));
extern Char *dcanon __P((Char *, Char *));
extern void dtildepr __P((Char *));
extern void dtilde __P((void));
extern void dochngd __P((Char **, struct command *));
extern Char *dnormalize __P((Char *, int));
extern void dopushd __P((Char **, struct command *));
extern void dopopd __P((Char **, struct command *));
extern void dfree __P((struct directory *));
extern void dsetstack __P((void));
extern int getstakd __P((Char *, int));
extern void recdirs __P((Char *, int));
extern void loaddirs __P((Char *));
/*
* sh.dol.c
*/
extern void Dfix __P((struct command *));
extern Char *Dfix1 __P((Char *));
extern void heredoc __P((Char *));
/*
* sh.err.c
*/
extern void errinit __P((void));
extern void seterror __P((unsigned int, ...));
extern void stderror __P((unsigned int, ...));
/*
* sh.exec.c
*/
extern void doexec __P((struct command *));
extern void dohash __P((Char **, struct command *));
extern void dounhash __P((Char **, struct command *));
extern void execash __P((Char **, struct command *));
extern void hashstat __P((Char **, struct command *));
extern void xechoit __P((Char **));
extern int executable __P((Char *, Char *, bool));
extern int tellmewhat __P((struct wordent *, Char *));
extern void dowhere __P((Char **, struct command *));
extern int find_cmd __P((Char *, int));
#ifdef CATCH_EXEC
extern void doqrshmode __P((Char **, struct command *));
#endif
/*
* sh.exp.c
*/
extern Char *filetest __P((Char *, Char ***, bool));
extern int expr __P((Char ***));
extern int exp0 __P((Char ***, bool));
/*
* sh.file.c
*/
#ifdef FILEC
extern int tenex __P((Char *, int));
#endif
/*
* sh.func.c
*/
extern void tsetenv __P((Char *, Char *));
extern void Unsetenv __P((Char *));
extern void doalias __P((Char **, struct command *));
extern void dobreak __P((Char **, struct command *));
extern void docontin __P((Char **, struct command *));
extern void doecho __P((Char **, struct command *));
extern void doelse __P((Char **, struct command *));
extern void doend __P((Char **, struct command *));
extern void doeval __P((Char **, struct command *));
extern void doexit __P((Char **, struct command *));
extern void doforeach __P((Char **, struct command *));
extern void doglob __P((Char **, struct command *));
extern void dogoto __P((Char **, struct command *));
extern void doif __P((Char **, struct command *));
extern void dolimit __P((Char **, struct command *));
extern void dologin __P((Char **, struct command *));
extern void dologout __P((Char **, struct command *));
#ifdef NEWGRP
extern void donewgrp __P((Char **, struct command *));
#endif
extern void donohup __P((Char **, struct command *));
extern void dohup __P((Char **, struct command *));
extern void doonintr __P((Char **, struct command *));
extern void doprintenv __P((Char **, struct command *));
extern void dorepeat __P((Char **, struct command *));
extern void dofiletest __P((Char **, struct command *));
extern void dosetenv __P((Char **, struct command *));
extern void dosuspend __P((Char **, struct command *));
extern void doswbrk __P((Char **, struct command *));
extern void doswitch __P((Char **, struct command *));
extern void doumask __P((Char **, struct command *));
extern void dounlimit __P((Char **, struct command *));
extern void dounsetenv __P((Char **, struct command *));
extern void dowhile __P((Char **, struct command *));
extern void dozip __P((Char **, struct command *));
extern void func __P((struct command *,
struct biltins *));
extern void gotolab __P((Char *));
extern struct biltins *isbfunc __P((struct command *));
extern void prvars __P((void));
extern int srchx __P((Char *));
extern void unalias __P((Char **, struct command *));
extern void wfree __P((void));
extern void dobuiltins __P((Char **, struct command *));
extern void reexecute __P((struct command *));
/*
* sh.glob.c
*/
extern Char *globequal __P((Char *, Char *));
extern Char **dobackp __P((Char *, bool));
extern void Gcat __P((Char *, Char *));
extern Char *globone __P((Char *, int));
extern int Gmatch __P((Char *, Char *));
extern int Gnmatch __P((Char *, Char *, Char **));
extern void ginit __P((void));
extern Char **globall __P((Char **));
extern void rscan __P((Char **, void (*)(int)));
extern void tglob __P((Char **));
extern void trim __P((Char **));
#ifdef FILEC
extern int sortscmp __P((Char **, Char **));
#endif
extern void nlsinit __P((void));
/*
* sh.hist.c
*/
extern void dohist __P((Char **, struct command *));
extern struct Hist *enthist __P((int, struct wordent *, bool, bool));
extern void savehist __P((struct wordent *, bool));
extern void fmthist __P((int, ptr_t, char *, size_t));
extern void rechist __P((Char *, int));
extern void loadhist __P((Char *, bool));
/*
* sh.init.c
*/
extern void mesginit __P((void));
/*
* sh.lex.c
*/
extern void addla __P((Char *));
extern void bseek __P((struct Ain *));
extern void btell __P((struct Ain *));
extern void btoeof __P((void));
extern void copylex __P((struct wordent *,
struct wordent *));
extern Char *domod __P((Char *, int));
extern void freelex __P((struct wordent *));
extern int lex __P((struct wordent *));
extern void prlex __P((struct wordent *));
extern int readc __P((bool));
extern void settell __P((void));
extern void unreadc __P((int));
/*
* sh.misc.c
*/
extern int any __P((char *, int));
extern Char **blkcpy __P((Char **, Char **));
extern void blkfree __P((Char **));
extern int blklen __P((Char **));
extern void blkpr __P((Char **));
extern void blkexpand __P((Char **, Char *));
extern Char **blkspl __P((Char **, Char **));
extern void closem __P((void));
#ifndef CLOSE_ON_EXEC
extern void closech __P((void));
#endif /* !CLOSE_ON_EXEC */
extern Char **copyblk __P((Char **));
extern int dcopy __P((int, int));
extern int dmove __P((int, int));
extern void donefds __P((void));
extern Char lastchr __P((Char *));
extern void lshift __P((Char **, int));
extern int number __P((Char *));
extern int prefix __P((Char *, Char *));
extern Char **saveblk __P((Char **));
extern void setzero __P((char *, int));
extern Char *strip __P((Char *));
extern Char *quote __P((Char *));
extern Char *quote_meta __P((Char *, const Char *));
extern char *strsave __P((const char *));
extern void udvar __P((Char *));
#ifndef POSIX
extern char *strstr __P((const char *, const char *));
#endif /* !POSIX */
#ifndef SHORT_STRINGS
extern char *strspl __P((char *, char *));
extern char *strend __P((char *));
#endif /* SHORT_STRINGS */
/*
* sh.parse.c
*/
extern void alias __P((struct wordent *));
extern void freesyn __P((struct command *));
extern struct command *syntax __P((struct wordent *,
struct wordent *, int));
/*
* sh.print.c
*/
extern void drainoline __P((void));
extern void flush __P((void));
#ifdef BSDTIMES
extern void pcsecs __P((long));
#else /* !BSDTIMES */
# ifdef POSIX
extern void pcsecs __P((clock_t));
# else /* !POSIX */
extern void pcsecs __P((time_t));
# endif /* !POSIX */
#endif /* BSDTIMES */
#ifdef BSDLIMIT
extern void psecs __P((long));
#endif /* BSDLIMIT */
extern int putpure __P((int));
extern int putraw __P((int));
extern void xputchar __P((int));
/*
* sh.proc.c
*/
extern void dobg __P((Char **, struct command *));
extern void dobg1 __P((Char **, struct command *));
extern void dofg __P((Char **, struct command *));
extern void dofg1 __P((Char **, struct command *));
extern void dojobs __P((Char **, struct command *));
extern void dokill __P((Char **, struct command *));
extern void donotify __P((Char **, struct command *));
extern void dostop __P((Char **, struct command *));
extern void dowait __P((Char **, struct command *));
extern void palloc __P((int, struct command *));
extern void panystop __P((bool));
extern sigret_t pchild __P((int));
extern void pendjob __P((void));
extern int pfork __P((struct command *, int));
extern void pgetty __P((int, int));
extern void pjwait __P((struct process *));
extern void pnote __P((void));
extern void prestjob __P((void));
extern void psavejob __P((void));
extern int pstart __P((struct process *, int));
extern void pwait __P((void));
extern struct process *pfind __P((Char *));
/*
* sh.sem.c
*/
extern void execute __P((struct command *, int, int *,
int *));
extern void mypipe __P((int *));
/*
* sh.set.c
*/
extern struct varent *adrof1 __P((Char *, struct varent *));
extern void doset __P((Char **, struct command *));
extern void dolet __P((Char **, struct command *));
extern Char *putn __P((int));
extern int getn __P((Char *));
extern Char *value1 __P((Char *, struct varent *));
extern void set __P((Char *, Char *, int));
extern void set1 __P((Char *, Char **, struct varent *,
int));
extern void setq __P((Char *, Char **, struct varent *,
int));
extern void unset __P((Char **, struct command *));
extern void unset1 __P((Char *[], struct varent *));
extern void unsetv __P((Char *));
extern void setNS __P((Char *));
extern void shift __P((Char **, struct command *));
extern void plist __P((struct varent *, int));
#if defined(DSPMBYTE)
extern void update_dspmbyte_vars __P((void));
extern void autoset_dspmbyte __P((Char *));
#endif
/*
* sh.time.c
*/
extern void donice __P((Char **, struct command *));
extern void dotime __P((Char **, struct command *));
#ifdef BSDTIMES
extern void prusage __P((struct sysrusage *,
struct sysrusage *,
timeval_t *, timeval_t *));
extern void ruadd __P((struct sysrusage *,
struct sysrusage *));
#else /* BSDTIMES */
# ifdef _SEQUENT_
extern void prusage __P((struct process_stats *,
struct process_stats *,
timeval_t *, timeval_t *));
extern void ruadd __P((struct process_stats *,
struct process_stats *));
# else /* !_SEQUENT_ */
# ifdef POSIX
extern void prusage __P((struct tms *, struct tms *,
clock_t, clock_t));
# else /* !POSIX */
extern void prusage __P((struct tms *, struct tms *,
time_t, time_t));
# endif /* !POSIX */
# endif /* !_SEQUENT_ */
#endif /* BSDTIMES */
extern void settimes __P((void));
#if defined(BSDTIMES) || defined(_SEQUENT_)
extern void tvsub __P((struct timeval *,
struct timeval *,
struct timeval *));
#endif /* BSDTIMES || _SEQUENT_ */
#endif /* _h_sh_decls */
|