xref: /freebsd/contrib/tcsh/tw.decls.h (revision 9122aeeaa60ee2a1381ea935d749194b32940e7a)
1c80476e4SDavid E. O'Brien /*
2c80476e4SDavid E. O'Brien  * tw.decls.h: Tenex external declarations
3c80476e4SDavid E. O'Brien  */
4c80476e4SDavid E. O'Brien /*-
5c80476e4SDavid E. O'Brien  * Copyright (c) 1980, 1991 The Regents of the University of California.
6c80476e4SDavid E. O'Brien  * All rights reserved.
7c80476e4SDavid E. O'Brien  *
8c80476e4SDavid E. O'Brien  * Redistribution and use in source and binary forms, with or without
9c80476e4SDavid E. O'Brien  * modification, are permitted provided that the following conditions
10c80476e4SDavid E. O'Brien  * are met:
11c80476e4SDavid E. O'Brien  * 1. Redistributions of source code must retain the above copyright
12c80476e4SDavid E. O'Brien  *    notice, this list of conditions and the following disclaimer.
13c80476e4SDavid E. O'Brien  * 2. Redistributions in binary form must reproduce the above copyright
14c80476e4SDavid E. O'Brien  *    notice, this list of conditions and the following disclaimer in the
15c80476e4SDavid E. O'Brien  *    documentation and/or other materials provided with the distribution.
1629301572SMark Peek  * 3. Neither the name of the University nor the names of its contributors
17c80476e4SDavid E. O'Brien  *    may be used to endorse or promote products derived from this software
18c80476e4SDavid E. O'Brien  *    without specific prior written permission.
19c80476e4SDavid E. O'Brien  *
20c80476e4SDavid E. O'Brien  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21c80476e4SDavid E. O'Brien  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22c80476e4SDavid E. O'Brien  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23c80476e4SDavid E. O'Brien  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24c80476e4SDavid E. O'Brien  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25c80476e4SDavid E. O'Brien  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26c80476e4SDavid E. O'Brien  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27c80476e4SDavid E. O'Brien  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28c80476e4SDavid E. O'Brien  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29c80476e4SDavid E. O'Brien  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30c80476e4SDavid E. O'Brien  * SUCH DAMAGE.
31c80476e4SDavid E. O'Brien  */
32c80476e4SDavid E. O'Brien #ifndef _h_tw_decls
33c80476e4SDavid E. O'Brien #define _h_tw_decls
34c80476e4SDavid E. O'Brien 
35c80476e4SDavid E. O'Brien /*
36c80476e4SDavid E. O'Brien  * tw.help.c
37c80476e4SDavid E. O'Brien  */
3845e5710bSMark Peek extern	void		  do_help		(const Char *);
39c80476e4SDavid E. O'Brien 
40c80476e4SDavid E. O'Brien /*
41c80476e4SDavid E. O'Brien  * tw.parse.c
42c80476e4SDavid E. O'Brien  */
4345e5710bSMark Peek extern	 Char		 *dollar		(const Char *);
443b6eaa7bSAndrey A. Chernov #ifndef __MVS__
4545e5710bSMark Peek extern	 int		  tenematch		(Char *, int, COMMAND);
4645e5710bSMark Peek extern	 int		  t_search		(struct Strbuf *, COMMAND, int,
4745e5710bSMark Peek 						 int, Char *, eChar);
483b6eaa7bSAndrey A. Chernov #endif
4945e5710bSMark Peek extern	 int		  starting_a_command	(Char *, Char *);
5045e5710bSMark Peek extern	 int		  fcompare		(const void *, const void *);
5145e5710bSMark Peek extern	 void		  print_by_column	(Char *, Char *[], int, int);
5245e5710bSMark Peek extern	 int		  StrQcmp		(const Char *, const Char *);
5345e5710bSMark Peek extern	 Char		 *tgetenv		(Char *);
54c80476e4SDavid E. O'Brien 
55c80476e4SDavid E. O'Brien /*
56c80476e4SDavid E. O'Brien  * tw.init.c
57c80476e4SDavid E. O'Brien  */
5845e5710bSMark Peek extern	 void		  tw_alias_start	(DIR *, const Char *);
5945e5710bSMark Peek extern	 void		  tw_cmd_start		(DIR *, const Char *);
6045e5710bSMark Peek extern	 void		  tw_logname_start	(DIR *, const Char *);
6145e5710bSMark Peek extern	 void		  tw_var_start		(DIR *, const Char *);
6245e5710bSMark Peek extern	 void		  tw_complete_start	(DIR *, const Char *);
6345e5710bSMark Peek extern	 void		  tw_file_start		(DIR *, const Char *);
6445e5710bSMark Peek extern	 void		  tw_vl_start		(DIR *, const Char *);
6545e5710bSMark Peek extern	 void		  tw_wl_start		(DIR *, const Char *);
6645e5710bSMark Peek extern	 void		  tw_bind_start		(DIR *, const Char *);
6745e5710bSMark Peek extern	 void		  tw_limit_start	(DIR *, const Char *);
6845e5710bSMark Peek extern	 void		  tw_sig_start		(DIR *, const Char *);
6945e5710bSMark Peek extern	 void		  tw_job_start		(DIR *, const Char *);
7045e5710bSMark Peek extern	 void		  tw_grpname_start	(DIR *, const Char *);
7145e5710bSMark Peek extern	 int		  tw_cmd_next		(struct Strbuf *,
7245e5710bSMark Peek 						 struct Strbuf *, int *);
7345e5710bSMark Peek extern	 int		  tw_logname_next	(struct Strbuf *,
7445e5710bSMark Peek 						 struct Strbuf *, int *);
7545e5710bSMark Peek extern	 int		  tw_shvar_next		(struct Strbuf *,
7645e5710bSMark Peek 						 struct Strbuf *, int *);
7745e5710bSMark Peek extern	 int		  tw_envvar_next	(struct Strbuf *,
7845e5710bSMark Peek 						 struct Strbuf *, int *);
7945e5710bSMark Peek extern	 int		  tw_var_next		(struct Strbuf *,
8045e5710bSMark Peek 						 struct Strbuf *, int *);
8145e5710bSMark Peek extern	 int		  tw_file_next		(struct Strbuf *,
8245e5710bSMark Peek 						 struct Strbuf *, int *);
8345e5710bSMark Peek extern	 int		  tw_wl_next		(struct Strbuf *,
8445e5710bSMark Peek 						 struct Strbuf *, int *);
8545e5710bSMark Peek extern	 int		  tw_bind_next		(struct Strbuf *,
8645e5710bSMark Peek 						 struct Strbuf *, int *);
8745e5710bSMark Peek extern	 int		  tw_limit_next		(struct Strbuf *,
8845e5710bSMark Peek 						 struct Strbuf *, int *);
8945e5710bSMark Peek extern	 int		  tw_sig_next		(struct Strbuf *,
9045e5710bSMark Peek 						 struct Strbuf *, int *);
9145e5710bSMark Peek extern	 int		  tw_job_next		(struct Strbuf *,
9245e5710bSMark Peek 						 struct Strbuf *, int *);
9345e5710bSMark Peek extern	 int		  tw_grpname_next	(struct Strbuf *,
9445e5710bSMark Peek 						 struct Strbuf *, int *);
9545e5710bSMark Peek extern	 void		  tw_dir_end		(void);
9645e5710bSMark Peek extern	 void		  tw_cmd_free		(void);
9745e5710bSMark Peek extern	 void		  tw_logname_end	(void);
9845e5710bSMark Peek extern	 void		  tw_grpname_end	(void);
9945e5710bSMark Peek extern	 void		  tw_item_add		(const struct Strbuf *);
10045e5710bSMark Peek extern	 Char	        **tw_item_get		(void);
10145e5710bSMark Peek extern	 void		  tw_item_free		(void);
10245e5710bSMark Peek extern	 Char		 *tw_item_find		(Char *);
103c80476e4SDavid E. O'Brien 
104c80476e4SDavid E. O'Brien /*
105c80476e4SDavid E. O'Brien  * tw.spell.c
106c80476e4SDavid E. O'Brien  */
10745e5710bSMark Peek extern	 int		  spell_me		(struct Strbuf *, int, Char *,
10845e5710bSMark Peek 						 eChar);
10945e5710bSMark Peek extern	 int		  spdir			(struct Strbuf *, const Char *,
11045e5710bSMark Peek 						 const Char *, Char *);
11145e5710bSMark Peek extern	 int		  spdist		(const Char *, const Char *);
112c80476e4SDavid E. O'Brien 
113c80476e4SDavid E. O'Brien /*
114c80476e4SDavid E. O'Brien  * tw.comp.c
115c80476e4SDavid E. O'Brien  */
11645e5710bSMark Peek extern	 void		  docomplete		(Char **, struct command *);
11745e5710bSMark Peek extern	 void		  douncomplete		(Char **, struct command *);
11845e5710bSMark Peek extern	 int		  tw_complete		(const Char *, Char **,
11945e5710bSMark Peek 						 Char **, int, eChar *);
120c80476e4SDavid E. O'Brien #ifdef COLOR_LS_F
121c80476e4SDavid E. O'Brien /*
122c80476e4SDavid E. O'Brien  * tw.color.c
123c80476e4SDavid E. O'Brien  */
12445e5710bSMark Peek extern	 void		  set_color_context	(void);
12545e5710bSMark Peek extern	 void		  print_with_color	(const Char *, size_t, Char);
12645e5710bSMark Peek extern	 void		  parseLS_COLORS	(const Char *);
127*19d2e3deSDmitry Chagin extern	 void		  parseLSCOLORS		(const Char *);
128c80476e4SDavid E. O'Brien #endif /* COLOR_LS_F */
129c80476e4SDavid E. O'Brien 
130c80476e4SDavid E. O'Brien #endif /* _h_tw_decls */
131