1232633Smp/* $Header: /p/tcsh/cvsroot/tcsh/config_f.h,v 3.47 2011/02/05 20:34:55 christos Exp $ */
259243Sobrien/*
359243Sobrien * config_f.h -- configure various defines for tcsh
459243Sobrien *
559243Sobrien * This is included by config.h.
659243Sobrien *
759243Sobrien * Edit this to match your particular feelings; this is set up to the
859243Sobrien * way I like it.
959243Sobrien */
1059243Sobrien/*-
1159243Sobrien * Copyright (c) 1980, 1991 The Regents of the University of California.
1259243Sobrien * All rights reserved.
1359243Sobrien *
1459243Sobrien * Redistribution and use in source and binary forms, with or without
1559243Sobrien * modification, are permitted provided that the following conditions
1659243Sobrien * are met:
1759243Sobrien * 1. Redistributions of source code must retain the above copyright
1859243Sobrien *    notice, this list of conditions and the following disclaimer.
1959243Sobrien * 2. Redistributions in binary form must reproduce the above copyright
2059243Sobrien *    notice, this list of conditions and the following disclaimer in the
2159243Sobrien *    documentation and/or other materials provided with the distribution.
22100616Smp * 3. Neither the name of the University nor the names of its contributors
2359243Sobrien *    may be used to endorse or promote products derived from this software
2459243Sobrien *    without specific prior written permission.
2559243Sobrien *
2659243Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2759243Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2859243Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2959243Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
3059243Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3159243Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3259243Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3359243Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3459243Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3559243Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3659243Sobrien * SUCH DAMAGE.
3759243Sobrien */
3859243Sobrien#ifndef _h_config_f
3959243Sobrien#define _h_config_f
4059243Sobrien
4159243Sobrien/*
42145479Smp * SHORT_STRINGS Use at least 16 bit characters instead of 8 bit chars
4359243Sobrien * 	         This fixes up quoting problems and eases implementation
4459243Sobrien *	         of nls...
4559243Sobrien *
4659243Sobrien */
4759243Sobrien#define SHORT_STRINGS
4859243Sobrien
4959243Sobrien/*
50145479Smp * WIDE_STRINGS	Represent strings using wide characters
51145479Smp *		Allows proper function in multibyte encodings like UTF-8
52145479Smp */
53232633Smp#if defined (SHORT_STRINGS) && defined (NLS) && !defined (WINNT_NATIVE) && !defined(_OSD_POSIX)
54145479Smp# define WIDE_STRINGS
55232633Smp# if SIZEOF_WCHAR_T < 4
56232633Smp#  define UTF16_STRINGS
57232633Smp# endif
58145479Smp#endif
59145479Smp
60145479Smp/*
6159243Sobrien * LOGINFIRST   Source ~/.login before ~/.cshrc
6259243Sobrien */
6359243Sobrien#undef LOGINFIRST
6459243Sobrien
6559243Sobrien/*
6659243Sobrien * VIDEFAULT    Make the VI mode editor the default
6759243Sobrien */
6859243Sobrien#undef VIDEFAULT
6959243Sobrien
7059243Sobrien/*
7159243Sobrien * KAI          use "bye" command and rename "log" to "watchlog"
7259243Sobrien */
7359243Sobrien#undef KAI
7459243Sobrien
7559243Sobrien/*
7659243Sobrien * TESLA	drops DTR on logout. Historical note:
7759243Sobrien *		tesla.ee.cornell.edu was a vax11/780 with a develcon
7859243Sobrien *		switch that sometimes would not hang up.
7959243Sobrien */
8059243Sobrien#undef TESLA
8159243Sobrien
8259243Sobrien/*
8359243Sobrien * DOTLAST      put "." last in the default path, for security reasons
8459243Sobrien */
8559243Sobrien#define DOTLAST
8659243Sobrien
8759243Sobrien/*
8859243Sobrien * NODOT	Don't put "." in the default path, for security reasons
8959243Sobrien */
9059243Sobrien#undef NODOT
9159243Sobrien
9259243Sobrien/*
9359243Sobrien * AUTOLOGOUT	tries to determine if it should set autologout depending
9459243Sobrien *		on the name of the tty, and environment.
9559243Sobrien *		Does not make sense in the modern window systems!
9659243Sobrien */
9759243Sobrien#define AUTOLOGOUT
9859243Sobrien
9959243Sobrien/*
10059243Sobrien * SUSPENDED	Newer shells say 'Suspended' instead of 'Stopped'.
10159243Sobrien *		Define to get the same type of messages.
10259243Sobrien */
10359243Sobrien#define SUSPENDED
10459243Sobrien
10559243Sobrien/*
10659243Sobrien * KANJI	Ignore meta-next, and the ISO character set. Should
107145479Smp *		be used with SHORT_STRINGS (or WIDE_STRINGS)
10859243Sobrien *
10959243Sobrien */
110131962Smp#define KANJI
11159243Sobrien
11259243Sobrien/*
11359243Sobrien * DSPMBYTE	add variable "dspmbyte" and display multi-byte string at
11459243Sobrien *		only output, when "dspmbyte" is set. Should be used with
11559243Sobrien *		KANJI
11659243Sobrien */
117145479Smp#if defined (SHORT_STRINGS) && !defined (WIDE_STRINGS)
118145479Smp# define DSPMBYTE
119145479Smp#endif
12059243Sobrien
12159243Sobrien/*
12259243Sobrien * MBYTEDEBUG	when "dspmbyte" is changed, set multi-byte checktable to
12359243Sobrien *		variable "mbytemap".
12459243Sobrien *		(use for multi-byte table check)
12559243Sobrien */
12659243Sobrien#undef MBYTEDEBUG
12759243Sobrien
12859243Sobrien/*
12959243Sobrien * NEWGRP	Provide a newgrp builtin.
13059243Sobrien */
13159243Sobrien#undef NEWGRP
13259243Sobrien
13359243Sobrien/*
13459243Sobrien * SYSMALLOC	Use the system provided version of malloc and friends.
13559243Sobrien *		This can be much slower and no memory statistics will be
13659243Sobrien *		provided.
13759243Sobrien */
138232633Smp#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) || defined (__CYGWIN__) || defined(__GLIBC__)
13959243Sobrien# define SYSMALLOC
14059243Sobrien#else
14159243Sobrien# undef SYSMALLOC
14259243Sobrien#endif
14359243Sobrien
14459243Sobrien/*
14559243Sobrien * USE_ACCESS	Use access(2) rather than stat(2) when POSIX is defined.
14659243Sobrien *		POSIX says to use stat, but stat(2) is less accurate
14759243Sobrien *		than access(2) for determining file access.
14859243Sobrien */
14959243Sobrien#undef USE_ACCESS
15059243Sobrien
15159243Sobrien/*
15259243Sobrien * REMOTEHOST	Try to determine the remote host that we logged in from
15359243Sobrien *		using first getpeername, and then the utmp file. If
15459243Sobrien *		successful, set $REMOTEHOST to the name or address of the
15559243Sobrien *		host
15659243Sobrien */
15759243Sobrien#define REMOTEHOST
15859243Sobrien
15959243Sobrien/*
16059243Sobrien * COLOR_LS_F Do you want to use builtin color ls-F ?
16159243Sobrien *
16259243Sobrien */
16359243Sobrien#define COLOR_LS_F
16459243Sobrien
16559243Sobrien/*
16659243Sobrien * COLORCAT Do you want to colorful message ?
16759243Sobrien *
16859243Sobrien */
16959243Sobrien#undef COLORCAT
17059243Sobrien
17159243Sobrien/*
172100616Smp * FILEC    support for old style file completion
173100616Smp */
174100616Smp#define FILEC
175100616Smp
176100616Smp/*
17759243Sobrien * RCSID	This defines if we want rcs strings in the binary or not
17859243Sobrien *
17959243Sobrien */
18059243Sobrien#if !defined(lint) && !defined(SABER) && !defined(__CLCC__)
18159243Sobrien# ifndef __GNUC__
18259243Sobrien#  define RCSID(id) static char *rcsid = (id);
18359243Sobrien# else
184195609Smp#  define RCSID(id) static const char rcsid[] __attribute__((__used__)) = (id);
18559243Sobrien# endif /* !__GNUC__ */
18659243Sobrien#else
18759243Sobrien# define RCSID(id)	/* Nothing */
18859243Sobrien#endif /* !lint && !SABER */
18959243Sobrien
190145479Smp/* Consistency checks */
191145479Smp#ifdef WIDE_STRINGS
192145479Smp# ifdef WINNT_NATIVE
193145479Smp    #error "WIDE_STRINGS cannot be used together with WINNT_NATIVE"
194145479Smp# endif
195145479Smp
196145479Smp# ifndef SHORT_STRINGS
197145479Smp    #error "SHORT_STRINGS must be defined if WIDE_STRINGS is defined"
198145479Smp# endif
199145479Smp
200145479Smp# ifndef NLS
201145479Smp    #error "NLS must be defined if WIDE_STRINGS is defined"
202145479Smp# endif
203145479Smp
204145479Smp# ifdef DSPMBYTE
205145479Smp    #error "DSPMBYTE must not be defined if WIDE_STRINGS is defined"
206145479Smp# endif
207145479Smp#endif
208145479Smp
209145479Smp#if !defined (SHORT_STRINGS) && defined (DSPMBYTE)
210145479Smp    #error "SHORT_STRINGS must be defined if DSPMBYTE is defined"
211145479Smp#endif
212145479Smp
21359243Sobrien#endif /* _h_config_f */
214