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