1167465Smp/* $Header: /p/tcsh/cvsroot/tcsh/tw.h,v 3.25 2006/01/12 18:15:25 christos Exp $ */
259243Sobrien/*
359243Sobrien * tw.h: TwENEX functions headers
459243Sobrien */
559243Sobrien/*-
659243Sobrien * Copyright (c) 1980, 1991 The Regents of the University of California.
759243Sobrien * All rights reserved.
859243Sobrien *
959243Sobrien * Redistribution and use in source and binary forms, with or without
1059243Sobrien * modification, are permitted provided that the following conditions
1159243Sobrien * are met:
1259243Sobrien * 1. Redistributions of source code must retain the above copyright
1359243Sobrien *    notice, this list of conditions and the following disclaimer.
1459243Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1559243Sobrien *    notice, this list of conditions and the following disclaimer in the
1659243Sobrien *    documentation and/or other materials provided with the distribution.
17100616Smp * 3. Neither the name of the University nor the names of its contributors
1859243Sobrien *    may be used to endorse or promote products derived from this software
1959243Sobrien *    without specific prior written permission.
2059243Sobrien *
2159243Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2259243Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2359243Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2459243Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2559243Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2659243Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2759243Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2859243Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2959243Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3059243Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3159243Sobrien * SUCH DAMAGE.
3259243Sobrien */
3359243Sobrien#ifndef _h_tw
3459243Sobrien#define _h_tw
3559243Sobrien
3659243Sobrien#define TW_PATH		0x1000
3759243Sobrien#define TW_ZERO		0x0fff
3859243Sobrien
3959243Sobrien#define TW_NONE		0x0000
4059243Sobrien#define TW_COMMAND	0x0001
4159243Sobrien#define TW_VARIABLE	0x0002
4259243Sobrien#define TW_LOGNAME	0x0003
4359243Sobrien#define TW_FILE		0x0004
4459243Sobrien#define TW_DIRECTORY	0x0005
4559243Sobrien#define TW_VARLIST	0x0006
4659243Sobrien#define TW_USER		0x0007
4759243Sobrien#define TW_COMPLETION	0x0008
4859243Sobrien#define TW_ALIAS	0x0009
4959243Sobrien#define TW_SHELLVAR	0x000a
5059243Sobrien#define TW_ENVVAR	0x000b
5159243Sobrien#define TW_BINDING	0x000c
5259243Sobrien#define TW_WORDLIST	0x000d
5359243Sobrien#define TW_LIMIT	0x000e
5459243Sobrien#define TW_SIGNAL	0x000f
5559243Sobrien#define TW_JOB		0x0010
5659243Sobrien#define TW_EXPLAIN	0x0011
5759243Sobrien#define TW_TEXT		0x0012
5859243Sobrien#define TW_GRPNAME	0x0013
5959243Sobrien
6059243Sobrien#define TW_EXEC_CHK	0x01
6159243Sobrien#define TW_DIR_CHK	0x02
6259243Sobrien#define TW_TEXT_CHK	0x04
6359243Sobrien
6459243Sobrien#define TW_DIR_OK	0x10
6559243Sobrien#define TW_PAT_OK	0x20
6659243Sobrien#define TW_IGN_OK	0x40
6759243Sobrien
6859243Sobrien#ifndef TRUE
6959243Sobrien# define TRUE		1
7059243Sobrien#endif
7159243Sobrien#ifndef FALSE
7259243Sobrien# define FALSE		0
7359243Sobrien#endif
7459243Sobrien#define ON		1
7559243Sobrien#define OFF		0
7659243Sobrien#define ESC             CTL_ESC('\033')
7759243Sobrien
7859243Sobrien#define is_set(var)	adrof(var)
7959243Sobrien#define ismetahash(a)	(ismeta(a) && (a) != '#')
8059243Sobrien
8159243Sobrien#define SEARCHLIST "HPATH"	/* Env. param for helpfile searchlist */
8259243Sobrien#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 */
8359243Sobrien
8459243Sobrientypedef enum {
8559243Sobrien    LIST, LIST_ALL, RECOGNIZE, RECOGNIZE_ALL, RECOGNIZE_SCROLL,
8659243Sobrien    PRINT_HELP, SPELL, GLOB, GLOB_EXPAND, VARS_EXPAND, PATH_NORMALIZE,
8759243Sobrien    COMMAND_NORMALIZE
8859243Sobrien} COMMAND;
8959243Sobrien
9059243Sobrienstruct scroll_tab_list {
9159243Sobrien	Char *element;
9259243Sobrien	struct scroll_tab_list *next;
9359243Sobrien} ;
9459243Sobrien
9559243Sobrienextern struct scroll_tab_list *scroll_tab;
9659243Sobrienextern int curchoice;
9759243Sobrien
9859243Sobrienextern int non_unique_match;
9959243Sobrien
10059243Sobrienextern int match_unique_match;
10159243Sobrien
102145479Smpextern int InsideCompletion;
103145479Smp
104145479Smpextern struct varent completions;
105145479Smp
106145479Smpextern int color_context_ls;
107145479Smp
10859243Sobrien#include "tw.decls.h"
10959243Sobrien
11059243Sobrien#endif /* _h_tw */
111