2 * tw.h: TwENEX functions headers
5 * Copyright (c) 1980, 1991 The Regents of the University of California.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
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.
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
35 #define TW_PATH 0x1000
36 #define TW_ZERO 0x0fff
38 #define TW_NONE 0x0000
39 #define TW_COMMAND 0x0001
40 #define TW_VARIABLE 0x0002
41 #define TW_LOGNAME 0x0003
42 #define TW_FILE 0x0004
43 #define TW_DIRECTORY 0x0005
44 #define TW_VARLIST 0x0006
45 #define TW_USER 0x0007
46 #define TW_COMPLETION 0x0008
47 #define TW_ALIAS 0x0009
48 #define TW_SHELLVAR 0x000a
49 #define TW_ENVVAR 0x000b
50 #define TW_BINDING 0x000c
51 #define TW_WORDLIST 0x000d
52 #define TW_LIMIT 0x000e
53 #define TW_SIGNAL 0x000f
55 #define TW_EXPLAIN 0x0011
56 #define TW_TEXT 0x0012
57 #define TW_GRPNAME 0x0013
59 #define TW_EXEC_CHK 0x01
60 #define TW_DIR_CHK 0x02
61 #define TW_TEXT_CHK 0x04
63 #define TW_DIR_OK 0x10
64 #define TW_PAT_OK 0x20
65 #define TW_IGN_OK 0x40
75 #define ESC CTL_ESC('\033')
77 #define is_set(var) adrof(var)
78 #define ismetahash(a) (ismeta(a) && (a) != '#')
80 #define SEARCHLIST "HPATH" /* Env. param for helpfile searchlist */
81 #define DEFAULTLIST ":/usr/man/cat1:/usr/man/cat8:/usr/man/cat6:/usr/local/man/cat1:/usr/local/man/cat8:/usr/local/man/cat6" /* if no HPATH */
84 LIST, LIST_ALL, RECOGNIZE, RECOGNIZE_ALL, RECOGNIZE_SCROLL,
85 PRINT_HELP, SPELL, GLOB, GLOB_EXPAND, VARS_EXPAND, PATH_NORMALIZE,
89 struct scroll_tab_list {
91 struct scroll_tab_list *next;
94 extern struct scroll_tab_list *scroll_tab;
97 extern int non_unique_match;
99 extern int match_unique_match;
101 extern int InsideCompletion;
103 extern struct varent completions;
105 extern int color_context_ls;
107 #include "tw.decls.h"