1 | /* $Header: /afs/dev.mit.edu/source/repository/third/tcsh/tw.h,v 1.1.1.2 1998-10-03 21:10:21 danw Exp $ */ |
---|
2 | /* |
---|
3 | * tw.h: TwENEX functions headers |
---|
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_tw |
---|
38 | #define _h_tw |
---|
39 | |
---|
40 | #define TW_PATH 0x1000 |
---|
41 | #define TW_ZERO 0x0fff |
---|
42 | |
---|
43 | #define TW_NONE 0x0000 |
---|
44 | #define TW_COMMAND 0x0001 |
---|
45 | #define TW_VARIABLE 0x0002 |
---|
46 | #define TW_LOGNAME 0x0003 |
---|
47 | #define TW_FILE 0x0004 |
---|
48 | #define TW_DIRECTORY 0x0005 |
---|
49 | #define TW_VARLIST 0x0006 |
---|
50 | #define TW_USER 0x0007 |
---|
51 | #define TW_COMPLETION 0x0008 |
---|
52 | #define TW_ALIAS 0x0009 |
---|
53 | #define TW_SHELLVAR 0x000a |
---|
54 | #define TW_ENVVAR 0x000b |
---|
55 | #define TW_BINDING 0x000c |
---|
56 | #define TW_WORDLIST 0x000d |
---|
57 | #define TW_LIMIT 0x000e |
---|
58 | #define TW_SIGNAL 0x000f |
---|
59 | #define TW_JOB 0x0010 |
---|
60 | #define TW_EXPLAIN 0x0011 |
---|
61 | #define TW_TEXT 0x0012 |
---|
62 | #define TW_GRPNAME 0x0013 |
---|
63 | |
---|
64 | #define TW_EXEC_CHK 0x01 |
---|
65 | #define TW_DIR_CHK 0x02 |
---|
66 | #define TW_TEXT_CHK 0x04 |
---|
67 | |
---|
68 | #define TW_DIR_OK 0x10 |
---|
69 | #define TW_PAT_OK 0x20 |
---|
70 | #define TW_IGN_OK 0x40 |
---|
71 | |
---|
72 | #ifndef TRUE |
---|
73 | # define TRUE 1 |
---|
74 | #endif |
---|
75 | #ifndef FALSE |
---|
76 | # define FALSE 0 |
---|
77 | #endif |
---|
78 | #define ON 1 |
---|
79 | #define OFF 0 |
---|
80 | #define FILSIZ 512 /* Max reasonable file name length */ |
---|
81 | #define ESC CTL_ESC('\033') |
---|
82 | #define equal(a, b) (strcmp(a, b) == 0) |
---|
83 | |
---|
84 | #define is_set(var) adrof(var) |
---|
85 | #define ismetahash(a) (ismeta(a) && (a) != '#') |
---|
86 | |
---|
87 | #define SEARCHLIST "HPATH" /* Env. param for helpfile searchlist */ |
---|
88 | #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 */ |
---|
89 | |
---|
90 | typedef enum { |
---|
91 | LIST, LIST_ALL, RECOGNIZE, RECOGNIZE_ALL, RECOGNIZE_SCROLL, |
---|
92 | PRINT_HELP, SPELL, GLOB, GLOB_EXPAND, VARS_EXPAND, PATH_NORMALIZE, |
---|
93 | COMMAND_NORMALIZE |
---|
94 | } COMMAND; |
---|
95 | |
---|
96 | struct scroll_tab_list { |
---|
97 | Char *element; |
---|
98 | struct scroll_tab_list *next; |
---|
99 | } ; |
---|
100 | |
---|
101 | extern struct scroll_tab_list *scroll_tab; |
---|
102 | extern int curchoice; |
---|
103 | |
---|
104 | extern int non_unique_match; |
---|
105 | |
---|
106 | extern int match_unique_match; |
---|
107 | |
---|
108 | #include "tw.decls.h" |
---|
109 | |
---|
110 | #endif /* _h_tw */ |
---|