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