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