xref: /dragonfly/contrib/tcsh-6/tw.decls.h (revision 0db87cb7)
1 /* $Header: /p/tcsh/cvsroot/tcsh/tw.decls.h,v 3.22 2006/01/12 18:15:25 christos Exp $ */
2 /*
3  * tw.decls.h: Tenex external declarations
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. Neither the name of the University nor the names of its contributors
18  *    may be used to endorse or promote products derived from this software
19  *    without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  */
33 #ifndef _h_tw_decls
34 #define _h_tw_decls
35 
36 /*
37  * tw.help.c
38  */
39 extern	void		  do_help		(const Char *);
40 
41 /*
42  * tw.parse.c
43  */
44 extern	 Char		 *dollar		(const Char *);
45 #ifndef __MVS__
46 extern	 int		  tenematch		(Char *, int, COMMAND);
47 extern	 int		  t_search		(struct Strbuf *, COMMAND, int,
48 						 int, Char *, eChar);
49 #endif
50 extern	 int		  starting_a_command	(Char *, Char *);
51 extern	 int		  fcompare		(const void *, const void *);
52 extern	 void		  print_by_column	(Char *, Char *[], int, int);
53 extern	 int		  StrQcmp		(const Char *, const Char *);
54 extern	 Char		 *tgetenv		(Char *);
55 
56 /*
57  * tw.init.c
58  */
59 extern	 void		  tw_alias_start	(DIR *, const Char *);
60 extern	 void		  tw_cmd_start		(DIR *, const Char *);
61 extern	 void		  tw_logname_start	(DIR *, const Char *);
62 extern	 void		  tw_var_start		(DIR *, const Char *);
63 extern	 void		  tw_complete_start	(DIR *, const Char *);
64 extern	 void		  tw_file_start		(DIR *, const Char *);
65 extern	 void		  tw_vl_start		(DIR *, const Char *);
66 extern	 void		  tw_wl_start		(DIR *, const Char *);
67 extern	 void		  tw_bind_start		(DIR *, const Char *);
68 extern	 void		  tw_limit_start	(DIR *, const Char *);
69 extern	 void		  tw_sig_start		(DIR *, const Char *);
70 extern	 void		  tw_job_start		(DIR *, const Char *);
71 extern	 void		  tw_grpname_start	(DIR *, const Char *);
72 extern	 int		  tw_cmd_next		(struct Strbuf *,
73 						 struct Strbuf *, int *);
74 extern	 int		  tw_logname_next	(struct Strbuf *,
75 						 struct Strbuf *, int *);
76 extern	 int		  tw_shvar_next		(struct Strbuf *,
77 						 struct Strbuf *, int *);
78 extern	 int		  tw_envvar_next	(struct Strbuf *,
79 						 struct Strbuf *, int *);
80 extern	 int		  tw_var_next		(struct Strbuf *,
81 						 struct Strbuf *, int *);
82 extern	 int		  tw_file_next		(struct Strbuf *,
83 						 struct Strbuf *, int *);
84 extern	 int		  tw_wl_next		(struct Strbuf *,
85 						 struct Strbuf *, int *);
86 extern	 int		  tw_bind_next		(struct Strbuf *,
87 						 struct Strbuf *, int *);
88 extern	 int		  tw_limit_next		(struct Strbuf *,
89 						 struct Strbuf *, int *);
90 extern	 int		  tw_sig_next		(struct Strbuf *,
91 						 struct Strbuf *, int *);
92 extern	 int		  tw_job_next		(struct Strbuf *,
93 						 struct Strbuf *, int *);
94 extern	 int		  tw_grpname_next	(struct Strbuf *,
95 						 struct Strbuf *, int *);
96 extern	 void		  tw_dir_end		(void);
97 extern	 void		  tw_cmd_free		(void);
98 extern	 void		  tw_logname_end	(void);
99 extern	 void		  tw_grpname_end	(void);
100 extern	 void		  tw_item_add		(const struct Strbuf *);
101 extern	 Char	        **tw_item_get		(void);
102 extern	 void		  tw_item_free		(void);
103 extern	 Char		 *tw_item_find		(Char *);
104 
105 /*
106  * tw.spell.c
107  */
108 extern	 int		  spell_me		(struct Strbuf *, int, Char *,
109 						 eChar);
110 extern	 int		  spdir			(struct Strbuf *, const Char *,
111 						 const Char *, Char *);
112 extern	 int		  spdist		(const Char *, const Char *);
113 
114 /*
115  * tw.comp.c
116  */
117 extern	 void		  docomplete		(Char **, struct command *);
118 extern	 void		  douncomplete		(Char **, struct command *);
119 extern	 int		  tw_complete		(const Char *, Char **,
120 						 Char **, int, eChar *);
121 #ifdef COLOR_LS_F
122 /*
123  * tw.color.c
124  */
125 extern	 void		  set_color_context	(void);
126 extern	 void		  print_with_color	(const Char *, size_t, Char);
127 extern	 void		  parseLS_COLORS	(const Char *);
128 #endif /* COLOR_LS_F */
129 
130 #endif /* _h_tw_decls */
131