home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Unix / Shells / tcsh / Source / sh.decls.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-21  |  12.5 KB  |  365 lines

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