[BACK]Return to extern.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / bin / csh

Annotation of src/bin/csh/extern.h, Revision 1.22

1.22    ! perry       1: /* $NetBSD: extern.h,v 1.21 2007/07/16 18:26:10 christos Exp $ */
1.6       cgd         2:
1.1       cgd         3: /*-
1.5       mycroft     4:  * Copyright (c) 1991, 1993
                      5:  *     The Regents of the University of California.  All rights reserved.
1.1       cgd         6:  *
                      7:  * Redistribution and use in source and binary forms, with or without
                      8:  * modification, are permitted provided that the following conditions
                      9:  * are met:
                     10:  * 1. Redistributions of source code must retain the above copyright
                     11:  *    notice, this list of conditions and the following disclaimer.
                     12:  * 2. Redistributions in binary form must reproduce the above copyright
                     13:  *    notice, this list of conditions and the following disclaimer in the
                     14:  *    documentation and/or other materials provided with the distribution.
1.15      agc        15:  * 3. Neither the name of the University nor the names of its contributors
1.1       cgd        16:  *    may be used to endorse or promote products derived from this software
                     17:  *    without specific prior written permission.
                     18:  *
                     19:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     20:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     21:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     22:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     23:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     24:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     25:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     26:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     27:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     28:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     29:  * SUCH DAMAGE.
                     30:  *
1.6       cgd        31:  *     @(#)extern.h    8.1 (Berkeley) 5/31/93
1.1       cgd        32:  */
                     33:
1.14      wiz        34: #ifndef _EXTERN_H_
                     35: #define _EXTERN_H_
                     36:
1.1       cgd        37: #include <sys/cdefs.h>
                     38:
                     39: /*
                     40:  * csh.c
                     41:  */
1.14      wiz        42: int gethdir(Char *);
                     43: void dosource(Char **, struct command *);
1.22    ! perry      44: __dead void exitstat(void);
1.14      wiz        45: void goodbye(void);
                     46: void importpath(Char *);
                     47: void initdesc(void);
                     48: void pintr(int);
1.22    ! perry      49: __dead void pintr1(int);
1.14      wiz        50: void printprompt(void);
1.21      christos   51: void process(int);
1.14      wiz        52: void rechist(void);
                     53: void untty(void);
                     54: int vis_fputc(int, FILE *);
1.1       cgd        55:
                     56: #ifdef PROF
1.22    ! perry      57: __dead void done(int);
1.1       cgd        58: #else
1.22    ! perry      59: __dead void xexit(int);
1.1       cgd        60: #endif
                     61:
                     62: /*
                     63:  * dir.c
                     64:  */
1.14      wiz        65: void dinit(Char *);
                     66: void dodirs(Char **, struct command *);
                     67: Char *dcanon(Char *, Char *);
                     68: void dtildepr(Char *, Char *);
                     69: void dtilde(void);
                     70: void dochngd(Char **, struct command *);
                     71: Char *dnormalize(Char *);
                     72: void dopushd(Char **, struct command *);
                     73: void dopopd(Char **, struct command *);
1.1       cgd        74: struct directory;
1.14      wiz        75: void dfree(struct directory *);
1.1       cgd        76:
                     77: /*
                     78:  * dol.c
                     79:  */
1.14      wiz        80: void Dfix(struct command *);
                     81: Char *Dfix1(Char *);
                     82: void heredoc(Char *);
1.1       cgd        83:
                     84: /*
                     85:  * err.c
                     86:  */
1.14      wiz        87: void seterror(int, ...);
1.22    ! perry      88: __dead void stderror(int, ...);
1.1       cgd        89:
                     90: /*
                     91:  * exec.c
                     92:  */
1.22    ! perry      93: __dead void doexec(Char **, struct command *);
1.14      wiz        94: void dohash(Char **, struct command *);
                     95: void dounhash(Char **, struct command *);
                     96: void dowhich(Char **, struct command *);
                     97: void execash(Char **, struct command *);
                     98: void hashstat(Char **, struct command *);
                     99: void xechoit(Char **);
1.1       cgd       100:
                    101: /*
                    102:  * exp.c
                    103:  */
1.14      wiz       104: int expr(Char ***);
1.21      christos  105: int exp0(Char ***, int);
1.1       cgd       106:
                    107: /*
                    108:  * file.c
                    109:  */
                    110: #ifdef FILEC
1.14      wiz       111: int tenex(Char *, int);
1.1       cgd       112: #endif
                    113:
                    114: /*
                    115:  * func.c
                    116:  */
1.14      wiz       117: void Setenv(Char *, Char *);
                    118: void doalias(Char **, struct command *);
                    119: void dobreak(Char **, struct command *);
                    120: void docontin(Char **, struct command *);
                    121: void doecho(Char **, struct command *);
                    122: void doelse(Char **, struct command *);
                    123: void doend(Char **, struct command *);
                    124: void doeval(Char **, struct command *);
                    125: void doexit(Char **, struct command *);
                    126: void doforeach(Char **, struct command *);
                    127: void doglob(Char **, struct command *);
                    128: void dogoto(Char **, struct command *);
                    129: void doif(Char **, struct command *);
                    130: void dolimit(Char **, struct command *);
                    131: void dologin(Char **, struct command *);
                    132: void dologout(Char **, struct command *);
                    133: void donohup(Char **, struct command *);
                    134: void doonintr(Char **, struct command *);
                    135: void doprintf(Char **, struct command *);
                    136: void dorepeat(Char **, struct command *);
                    137: void dosetenv(Char **, struct command *);
                    138: void dosuspend(Char **, struct command *);
                    139: void doswbrk(Char **, struct command *);
                    140: void doswitch(Char **, struct command *);
                    141: void doumask(Char **, struct command *);
                    142: void dounlimit(Char **, struct command *);
                    143: void dounsetenv(Char **, struct command *);
                    144: void dowhile(Char **, struct command *);
                    145: void dozip(Char **, struct command *);
                    146: void func(struct command *, struct biltins *);
                    147: struct biltins *isbfunc(struct command *);
                    148: void prvars(void);
                    149: void gotolab(Char *);
                    150: int srchx(Char *);
                    151: void unalias(Char **, struct command *);
                    152: void wfree(void);
1.1       cgd       153:
                    154: /*
                    155:  * glob.c
                    156:  */
1.21      christos  157: Char **dobackp(Char *, int);
1.14      wiz       158: void Gcat(Char *, Char *);
                    159: Char *globone(Char *, int);
                    160: int  Gmatch(Char *, Char *);
                    161: void ginit(void);
                    162: Char **globall(Char **);
                    163: void rscan(Char **, void (*)(int));
                    164: void tglob(Char **);
                    165: void trim(Char **);
1.1       cgd       166: #ifdef FILEC
1.14      wiz       167: int sortscmp(const ptr_t, const ptr_t);
1.1       cgd       168: #endif /* FILEC */
                    169:
                    170: /*
                    171:  * hist.c
                    172:  */
1.14      wiz       173: void dohist(Char **, struct command *);
1.21      christos  174: struct Hist *enthist(int, struct wordent *, int);
1.14      wiz       175: void savehist(struct wordent *);
1.1       cgd       176:
                    177: /*
                    178:  * lex.c
                    179:  */
1.14      wiz       180: void addla(Char *);
                    181: void bseek(struct Ain *);
                    182: void btell(struct Ain *);
                    183: void btoeof(void);
                    184: void copylex(struct wordent *, struct wordent *);
                    185: Char *domod(Char *, int);
                    186: void freelex(struct wordent *);
                    187: int lex(struct wordent *);
                    188: void prlex(FILE *, struct wordent *);
1.21      christos  189: int readc(int);
1.14      wiz       190: void settell(void);
                    191: void unreadc(int);
1.1       cgd       192:
                    193: /*
                    194:  * misc.c
                    195:  */
1.17      christos  196: int any(const char *, int);
1.14      wiz       197: Char **blkcat(Char **, Char **);
                    198: Char **blkcpy(Char **, Char **);
                    199: Char **blkend(Char **);
                    200: void blkfree(Char **);
                    201: int blklen(Char **);
                    202: void blkpr(FILE *, Char **);
                    203: Char **blkspl(Char **, Char **);
                    204: void closem(void);
                    205: Char **copyblk(Char **);
                    206: int dcopy(int, int);
                    207: int dmove(int, int);
                    208: void donefds(void);
                    209: Char lastchr(Char *);
                    210: void lshift(Char **, int);
                    211: int number(Char *);
                    212: int prefix(Char *, Char *);
                    213: Char **saveblk(Char **);
                    214: Char *strip(Char *);
                    215: Char *quote(Char *);
1.17      christos  216: char *strsave(const char *);
1.14      wiz       217: char *strspl(char *, char *);
1.22    ! perry     218: __dead void udvar(Char *);
1.1       cgd       219:
1.5       mycroft   220: #ifndef        SHORT_STRINGS
                    221: # ifdef NOTUSED
1.14      wiz       222: char *strstr(const char *, const char *);
1.5       mycroft   223: # endif /* NOTUSED */
1.14      wiz       224: char *strend(char *);
1.1       cgd       225: #endif
                    226:
                    227: /*
                    228:  * parse.c
                    229:  */
1.14      wiz       230: void alias(struct wordent *);
                    231: void freesyn(struct command *);
                    232: struct command *syntax(struct wordent *, struct wordent *, int);
1.1       cgd       233:
                    234:
                    235: /*
                    236:  * proc.c
                    237:  */
1.14      wiz       238: void dobg(Char **, struct command *);
                    239: void dobg1(Char **, struct command *);
                    240: void dofg(Char **, struct command *);
                    241: void dofg1(Char **, struct command *);
                    242: void dojobs(Char **, struct command *);
                    243: void dokill(Char **, struct command *);
                    244: void donotify(Char **, struct command *);
                    245: void dostop(Char **, struct command *);
                    246: void dowait(Char **, struct command *);
                    247: void palloc(int, struct command *);
1.21      christos  248: void panystop(int);
1.14      wiz       249: void pchild(int);
                    250: void pendjob(void);
                    251: struct process *pfind(Char *);
                    252: int pfork(struct command *, int);
                    253: void pgetty(int, int);
                    254: void pjwait(struct process *);
                    255: void pnote(void);
                    256: void prestjob(void);
                    257: void psavejob(void);
                    258: void pstart(struct process *, int);
                    259: void pwait(void);
1.1       cgd       260:
                    261: /*
                    262:  * sem.c
                    263:  */
1.14      wiz       264: void execute(struct command *, int, int *, int *);
                    265: void mypipe(int *);
1.1       cgd       266:
                    267: /*
                    268:  * set.c
                    269:  */
1.14      wiz       270: struct varent*adrof1(Char *, struct varent *);
                    271: void doset(Char **, struct command *);
                    272: void dolet(Char **, struct command *);
                    273: Char *putn(int);
                    274: int getn(Char *);
                    275: Char *value1(Char *, struct varent *);
                    276: void set(Char *, Char *);
                    277: void set1(Char *, Char **, struct varent *);
                    278: void setq(Char *, Char **, struct varent *);
                    279: void unset(Char **, struct command *);
                    280: void unset1(Char *[], struct varent *);
                    281: void unsetv(Char *);
                    282: void setNS(Char *);
                    283: void shift(Char **, struct command *);
                    284: void plist(struct varent *);
1.1       cgd       285:
                    286: /*
                    287:  * time.c
                    288:  */
1.14      wiz       289: void donice(Char **, struct command *);
                    290: void dotime(Char **, struct command *);
1.18      matt      291: void prusage(FILE *, struct rusage *, struct rusage *, struct timeval *,
1.14      wiz       292:              struct timeval *);
                    293: void ruadd(struct rusage *, struct rusage *);
                    294: void settimes(void);
                    295: void psecs(long);
1.1       cgd       296:
                    297: /*
                    298:  * alloc.c
                    299:  */
1.14      wiz       300: void Free(ptr_t);
                    301: ptr_t Malloc(size_t);
                    302: ptr_t Realloc(ptr_t, size_t);
                    303: ptr_t Calloc(size_t, size_t);
                    304: void showall(Char **, struct command *);
1.1       cgd       305:
                    306: /*
                    307:  * str.c:
                    308:  */
                    309: #ifdef SHORT_STRINGS
1.14      wiz       310: Char *s_strchr(Char *, int);
                    311: Char *s_strrchr(Char *, int);
                    312: Char *s_strcat(Char *, Char *);
1.1       cgd       313: #ifdef NOTUSED
1.14      wiz       314: Char *s_strncat(Char *, Char *, size_t);
1.1       cgd       315: #endif
1.14      wiz       316: Char *s_strcpy(Char *, Char *);
                    317: Char *s_strncpy(Char *, Char *, size_t);
                    318: Char *s_strspl(Char *, Char *);
                    319: size_t s_strlen(Char *);
                    320: int s_strcmp(Char *, Char *);
                    321: int s_strncmp(Char *, Char *, size_t);
                    322: Char *s_strsave(Char *);
                    323: Char *s_strend(Char *);
                    324: Char *s_strstr(Char *, Char *);
                    325: Char *str2short(const char *);
                    326: Char **blk2short(char **);
                    327: char *short2str(Char *);
                    328: char **short2blk(Char **);
1.1       cgd       329: #endif
1.14      wiz       330: char *short2qstr(Char *);
                    331: char *vis_str(Char *);
                    332:
                    333: #endif /* !_EXTERN_H_ */

CVSweb <webmaster@jp.NetBSD.org>