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

  1. /* $Header: /u/christos/src/tcsh-6.03/RCS/tc.decls.h,v 3.21 1992/10/14 20:19:19 christos Exp $ */
  2. /*
  3.  * tc.decls.h: Function declarations from all the tcsh modules
  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_tc_decls
  38. #define _h_tc_decls
  39.  
  40. /*
  41.  * tc.alloc.c
  42.  */
  43. #ifndef SYSMALLOC
  44. extern    void          free        __P((ptr_t));
  45. extern    memalign_t      malloc    __P((size_t));
  46. extern    memalign_t      realloc    __P((ptr_t, size_t));
  47. extern    memalign_t      calloc    __P((size_t, size_t));
  48.  
  49. #else /* SYSMALLOC */
  50. extern    void          sfree        __P((ptr_t));
  51. extern    memalign_t      smalloc    __P((size_t));
  52. extern    memalign_t      srealloc    __P((ptr_t, size_t));
  53. extern    memalign_t      scalloc    __P((size_t, size_t));
  54. #endif /* SYSMALLOC */
  55. extern    void          showall    __P((Char **, struct command *));
  56.  
  57. /*
  58.  * tc.bind.c
  59.  */
  60. extern    void          dobindkey    __P((Char **, struct command *));
  61. extern    int          parseescape    __P((Char **));
  62. extern    unsigned char    *unparsestring    __P((Char *, unsigned char *, Char *));
  63. extern    void          dobind    __P((Char **, struct command *));
  64.  
  65.  
  66. /*
  67.  * tc.disc.c
  68.  */
  69. extern    int          setdisc    __P((int));
  70. extern    int          resetdisc    __P((int));
  71.  
  72. /*
  73.  * tc.func.c
  74.  */
  75. extern    Char         *expand_lex    __P((Char *, int, struct wordent *, 
  76.                          int, int));
  77. extern    Char         *sprlex    __P((Char *, struct wordent *));
  78. extern    void          Itoa        __P((int, Char *));
  79. extern    void          dolist    __P((Char **, struct command *));
  80. extern    void          dotelltc    __P((Char **, struct command *));
  81. extern    void          doechotc    __P((Char **, struct command *));
  82. extern    void          dosettc    __P((Char **, struct command *));
  83. extern    void          dowhich    __P((Char **, struct command *));
  84. extern    struct process     *find_stop_ed    __P((void));
  85. extern    void          fg_proc_entry    __P((struct process *));
  86. extern    sigret_t      alrmcatch    __P((int));
  87. extern    void          precmd    __P((void));
  88. extern    void          cwd_cmd    __P((void));
  89. extern    void          beep_cmd    __P((void));
  90. extern    void          period_cmd    __P((void));
  91. extern    void          aliasrun    __P((int, Char *, Char *));
  92. extern    void          setalarm    __P((int));
  93. extern    void          rmstar    __P((struct wordent *));
  94. extern    void          continue_jobs    __P((struct wordent *));
  95. extern    Char         *gettilde    __P((Char *));
  96. extern    Char         *getusername    __P((Char **));
  97. extern    void          doaliases    __P((Char **, struct command *));
  98. extern    void          shlvl        __P((int));
  99. extern    int          fixio        __P((int, int));
  100. extern    int          collate    __P((const Char *, const Char *));
  101. #ifdef HASHBANG
  102. extern    int          hashbang    __P((int, Char ***));
  103. #endif /* HASHBANG */
  104.  
  105.  
  106. /*
  107.  * tc.os.c
  108.  */
  109. #ifdef MACH
  110. extern    void          dosetpath    __P((Char **, struct command *));
  111. #endif /* MACH */
  112.  
  113. #ifdef TCF
  114. extern    void          dogetxvers    __P((Char **, struct command *));
  115. extern    void          dosetxvers    __P((Char **, struct command *));
  116. extern    void          dogetspath    __P((Char **, struct command *));
  117. extern    void          dosetspath    __P((Char **, struct command *));
  118. extern    char         *sitename    __P((pid_t));
  119. extern    void          domigrate    __P((Char **, struct command *));
  120. #endif /* TCF */
  121.  
  122. #ifdef WARP
  123. extern    void           dowarp    __P((Char **, struct command *));
  124. #endif /* WARP */
  125.  
  126. #ifdef masscomp
  127. extern    void          douniverse    __P((Char **, struct command *));
  128. #endif /* masscomp */
  129.  
  130. #ifdef _SEQUENT_
  131. extern    void           pr_stat_sub    __P((struct process_stats *, 
  132.                          struct process_stats *, 
  133.                          struct process_stats *));
  134. #endif /* _SEQUENT_ */
  135.  
  136. #ifdef NEEDtcgetpgrp
  137. extern    int           xtcgetpgrp    __P((int));
  138. extern    int          xtcsetpgrp    __P((int, int));
  139. # undef tcgetpgrp
  140. # define tcgetpgrp(a)       xtcgetpgrp(a)
  141. # undef tcsetpgrp
  142. # define tcsetpgrp(a, b)  xtcsetpgrp((a), (b))
  143. #endif /* NEEDtcgetpgrp */
  144.  
  145. #ifdef YPBUGS
  146. extern    void           fix_yp_bugs    __P((void));
  147. #endif /* YPBUGS */
  148. #ifdef STRCOLLBUG
  149. extern    void           fix_strcoll_bug    __P((void));
  150. #endif /* STRCOLLBUG */
  151.  
  152. extern    void           osinit    __P((void));
  153.  
  154. #ifdef NEEDmemmove
  155. extern void          *xmemmove    __P((ptr_t, const ptr_t, size_t));
  156. # define memmove(a, b, c) xmemmove((a), (b), (c))
  157. #endif /* NEEDmemmove */
  158.  
  159.  
  160. #ifdef NEEDgetwd
  161. extern    char         *xgetwd    __P((char *));
  162. # undef getwd
  163. # define getwd(a) xgetwd(a)
  164. #endif /* NEEDgetwd */
  165.  
  166. #ifdef NEEDgethostname
  167. extern    int           xgethostname    __P((char *, int));
  168. # undef gethostname
  169. # define gethostname(a, b) xgethostname((a), (b))
  170. #endif /* NEEDgethostname */
  171.  
  172. #ifdef NEEDnice
  173. extern    int           xnice    __P((int));
  174. # undef nice
  175. # define nice(a)      xnice(a)
  176. #endif /* NEEDnice */
  177.  
  178. #ifdef NEEDstrerror
  179. extern    char          *xstrerror    __P((int));
  180. # undef strerror
  181. # define strerror(a)       xstrerror(a)
  182. #endif /* NEEDstrerror */
  183.  
  184. #ifdef apollo
  185. extern    void          doinlib    __P((Char **, struct command *));
  186. extern    void          dover        __P((Char **, struct command *));
  187. extern    void          dorootnode    __P((Char **, struct command *));
  188. extern    int          getv        __P((Char *));
  189. #endif /* apollo */
  190.  
  191.  
  192. /*
  193.  * tc.printf.h
  194.  */
  195. extern    void          xprintf    __P((char *, ...));
  196. extern    void          xsprintf    __P((char *, char *, ...));
  197. extern    void          xvprintf    __P((char *, va_list));
  198. extern    void          xvsprintf    __P((char *, char *, va_list));
  199.  
  200. /*
  201.  * tc.prompt.c
  202.  */
  203. extern    void          printprompt    __P((int, char *));
  204. extern    void          tprintf    __P((int, Char *, Char *, size_t, 
  205.                          char *, time_t, ptr_t));
  206.  
  207. /*
  208.  * tc.sched.c
  209.  */
  210. extern    time_t          sched_next    __P((void));
  211. extern    void          dosched    __P((Char **, struct command *));
  212. extern    void          sched_run    __P((void));
  213.  
  214. /*
  215.  * tc.sig.c
  216.  */
  217. #ifndef BSDSIGS
  218. # ifdef UNRELSIGS
  219. #  ifdef COHERENT
  220. extern    sigret_t    (*xsignal    __P((int, sigret_t (*)(int)))) ();
  221. #   define signal(x,y)      xsignal(x,y)
  222. #  endif /* COHERENT */
  223. extern    sigret_t    (*xsigset    __P((int, sigret_t (*)(int)))) ();
  224. #  define sigset(x,y)      xsigset(x,y)
  225. extern    void          xsigrelse    __P((int));
  226. #  define sigrelse(x)      xsigrelse(x)
  227. extern    void          xsighold    __P((int));
  228. #  define sighold(x)      xsighold(x)
  229. extern    void          xsigignore    __P((int));
  230. #  define sigignore(x)      xsigignore(x)
  231. extern    void           xsigpause    __P((int));
  232. #  define sigpause(x)      xsigpause(x)
  233. extern    pid_t           ourwait    __P((int *));
  234. # endif /* UNRELSIGS */
  235. # ifdef SXA
  236. extern    void           sigpause    __P((int));
  237. # endif /* SXA */
  238. #endif /* !BSDSIGS */
  239.  
  240. #ifdef NEEDsignal
  241. extern    sigret_t    (*xsignal    __P((int, sigret_t (*)(int)))) ();
  242. # define signal(a, b)      xsignal(a, b)
  243. #endif /* NEEDsignal */
  244. #ifdef _SEQUENT_
  245. extern    sigmask_t      sigsetmask    __P((sigmask_t));
  246. extern    sigmask_t      sigblock    __P((sigmask_t));
  247. extern    void          bsd_sigpause    __P((sigmask_t));
  248. extern  sigret_t        (*bsd_signal    __P((int, sigret_t (*)(int)))) ();
  249. #endif /* _SEQUENT_ */
  250. #ifdef SIGSYNCH
  251. extern    sigret_t      synch_handler    __P((int));
  252. #endif /* SIGSYNCH */
  253.  
  254.  
  255. /*
  256.  * tc.str.c:
  257.  */
  258. #ifdef SHORT_STRINGS
  259. extern    Char         *s_strchr    __P((const Char *, int));
  260. extern    Char         *s_strrchr    __P((const Char *, int));
  261. extern    Char         *s_strcat    __P((Char *, const Char *));
  262. # ifdef NOTUSED
  263. extern    Char         *s_strncat    __P((Char *, const Char *, size_t));
  264. # endif /* NOTUSED */
  265. extern    Char         *s_strcpy    __P((Char *, const Char *));
  266. extern    Char         *s_strncpy    __P((Char *, const Char *, size_t));
  267. extern    Char         *s_strspl    __P((const Char *, const Char *));
  268. extern    size_t          s_strlen    __P((const Char *));
  269. extern    int          s_strcmp    __P((const Char *, const Char *));
  270. extern    int          s_strncmp    __P((const Char *, const Char *, 
  271.                          size_t));
  272. extern    Char         *s_strsave    __P((const Char *));
  273. extern    Char         *s_strend    __P((const Char *));
  274. extern    Char         *s_strstr    __P((const Char *, const Char *));
  275. extern    Char         *str2short    __P((const char *));
  276. extern    Char        **blk2short    __P((char **));
  277. extern    char         *short2str    __P((const Char *));
  278. extern    char        **short2blk    __P((Char **));
  279. #endif /* SHORT_STRINGS */
  280. extern    char         *short2qstr    __P((const Char *));
  281.  
  282.  
  283. /*
  284.  * tc.vers.h:
  285.  */
  286. extern    void          fix_version    __P((void));
  287. extern    char         *gethosttype    __P((void));
  288.  
  289. /*
  290.  * tc.who.c
  291.  */
  292. #ifndef HAVENOUTMP
  293. extern    void          initwatch    __P((void));
  294. extern    void          resetwatch    __P((void));
  295. extern    void          watch_login    __P((void));
  296. extern    char          *who_info    __P((ptr_t, int, char *));
  297. extern    void          dolog        __P((Char **, struct command *));
  298. #endif /* HAVENOUTMP */
  299.  
  300. #endif /* _h_tc_decls */
  301.