159243Sobrien/*
259243Sobrien * config_f.h -- configure various defines for tcsh
359243Sobrien *
459243Sobrien * This is included by config.h.
559243Sobrien *
659243Sobrien * Edit this to match your particular feelings; this is set up to the
759243Sobrien * way I like it.
859243Sobrien */
959243Sobrien/*-
1059243Sobrien * Copyright (c) 1980, 1991 The Regents of the University of California.
1159243Sobrien * All rights reserved.
1259243Sobrien *
1359243Sobrien * Redistribution and use in source and binary forms, with or without
1459243Sobrien * modification, are permitted provided that the following conditions
1559243Sobrien * are met:
1659243Sobrien * 1. Redistributions of source code must retain the above copyright
1759243Sobrien *    notice, this list of conditions and the following disclaimer.
1859243Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1959243Sobrien *    notice, this list of conditions and the following disclaimer in the
2059243Sobrien *    documentation and/or other materials provided with the distribution.
21100616Smp * 3. Neither the name of the University nor the names of its contributors
2259243Sobrien *    may be used to endorse or promote products derived from this software
2359243Sobrien *    without specific prior written permission.
2459243Sobrien *
2559243Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2659243Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2759243Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2859243Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2959243Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3059243Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3159243Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3259243Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3359243Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3459243Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3559243Sobrien * SUCH DAMAGE.
3659243Sobrien */
3759243Sobrien#ifndef _h_config_f
3859243Sobrien#define _h_config_f
3959243Sobrien
40316957Sdchagin#ifdef HAVE_FEATURES_H
41316957Sdchagin#include <features.h>		/* for __GLIBC__ */
42316957Sdchagin#endif
43316957Sdchagin
4459243Sobrien/*
45145479Smp * SHORT_STRINGS Use at least 16 bit characters instead of 8 bit chars
4659243Sobrien * 	         This fixes up quoting problems and eases implementation
4759243Sobrien *	         of nls...
4859243Sobrien *
4959243Sobrien */
5059243Sobrien#define SHORT_STRINGS
5159243Sobrien
5259243Sobrien/*
53145479Smp * WIDE_STRINGS	Represent strings using wide characters
54145479Smp *		Allows proper function in multibyte encodings like UTF-8
55145479Smp */
56316957Sdchagin#if defined (SHORT_STRINGS) && defined (NLS) && !defined (WINNT_NATIVE) && !defined(_OSD_POSIX) && SIZEOF_WCHAR_T > 1
57145479Smp# define WIDE_STRINGS
58231990Smp# if SIZEOF_WCHAR_T < 4
59231990Smp#  define UTF16_STRINGS
60231990Smp# endif
61145479Smp#endif
62145479Smp
63145479Smp/*
6459243Sobrien * LOGINFIRST   Source ~/.login before ~/.cshrc
6559243Sobrien */
6659243Sobrien#undef LOGINFIRST
6759243Sobrien
6859243Sobrien/*
6959243Sobrien * VIDEFAULT    Make the VI mode editor the default
7059243Sobrien */
7159243Sobrien#undef VIDEFAULT
7259243Sobrien
7359243Sobrien/*
7459243Sobrien * KAI          use "bye" command and rename "log" to "watchlog"
7559243Sobrien */
7659243Sobrien#undef KAI
7759243Sobrien
7859243Sobrien/*
7959243Sobrien * TESLA	drops DTR on logout. Historical note:
8059243Sobrien *		tesla.ee.cornell.edu was a vax11/780 with a develcon
8159243Sobrien *		switch that sometimes would not hang up.
8259243Sobrien */
8359243Sobrien#undef TESLA
8459243Sobrien
8559243Sobrien/*
8659243Sobrien * DOTLAST      put "." last in the default path, for security reasons
8759243Sobrien */
8859243Sobrien#define DOTLAST
8959243Sobrien
9059243Sobrien/*
9159243Sobrien * NODOT	Don't put "." in the default path, for security reasons
9259243Sobrien */
9359243Sobrien#undef NODOT
9459243Sobrien
9559243Sobrien/*
9659243Sobrien * AUTOLOGOUT	tries to determine if it should set autologout depending
9759243Sobrien *		on the name of the tty, and environment.
9859243Sobrien *		Does not make sense in the modern window systems!
9959243Sobrien */
10059243Sobrien#define AUTOLOGOUT
10159243Sobrien
10259243Sobrien/*
10359243Sobrien * SUSPENDED	Newer shells say 'Suspended' instead of 'Stopped'.
10459243Sobrien *		Define to get the same type of messages.
10559243Sobrien */
10659243Sobrien#define SUSPENDED
10759243Sobrien
10859243Sobrien/*
10959243Sobrien * KANJI	Ignore meta-next, and the ISO character set. Should
110145479Smp *		be used with SHORT_STRINGS (or WIDE_STRINGS)
11159243Sobrien *
11259243Sobrien */
113131962Smp#define KANJI
11459243Sobrien
11559243Sobrien/*
11659243Sobrien * DSPMBYTE	add variable "dspmbyte" and display multi-byte string at
11759243Sobrien *		only output, when "dspmbyte" is set. Should be used with
11859243Sobrien *		KANJI
11959243Sobrien */
120145479Smp#if defined (SHORT_STRINGS) && !defined (WIDE_STRINGS)
121145479Smp# define DSPMBYTE
122145479Smp#endif
12359243Sobrien
12459243Sobrien/*
12559243Sobrien * MBYTEDEBUG	when "dspmbyte" is changed, set multi-byte checktable to
12659243Sobrien *		variable "mbytemap".
12759243Sobrien *		(use for multi-byte table check)
12859243Sobrien */
12959243Sobrien#undef MBYTEDEBUG
13059243Sobrien
13159243Sobrien/*
13259243Sobrien * NEWGRP	Provide a newgrp builtin.
13359243Sobrien */
13459243Sobrien#undef NEWGRP
13559243Sobrien
13659243Sobrien/*
13759243Sobrien * SYSMALLOC	Use the system provided version of malloc and friends.
13859243Sobrien *		This can be much slower and no memory statistics will be
13959243Sobrien *		provided.
14059243Sobrien */
141316957Sdchagin#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) || defined (__CYGWIN__) || defined(__GLIBC__) || defined(__OpenBSD__) || defined(__APPLE__) || defined (__ANDROID__)
14259243Sobrien# define SYSMALLOC
14359243Sobrien#else
14459243Sobrien# undef SYSMALLOC
14559243Sobrien#endif
14659243Sobrien
14759243Sobrien/*
14859243Sobrien * USE_ACCESS	Use access(2) rather than stat(2) when POSIX is defined.
14959243Sobrien *		POSIX says to use stat, but stat(2) is less accurate
15059243Sobrien *		than access(2) for determining file access.
15159243Sobrien */
15259243Sobrien#undef USE_ACCESS
15359243Sobrien
15459243Sobrien/*
15559243Sobrien * REMOTEHOST	Try to determine the remote host that we logged in from
15659243Sobrien *		using first getpeername, and then the utmp file. If
15759243Sobrien *		successful, set $REMOTEHOST to the name or address of the
15859243Sobrien *		host
15959243Sobrien */
16059243Sobrien#define REMOTEHOST
16159243Sobrien
16259243Sobrien/*
16359243Sobrien * COLOR_LS_F Do you want to use builtin color ls-F ?
16459243Sobrien *
16559243Sobrien */
16659243Sobrien#define COLOR_LS_F
16759243Sobrien
16859243Sobrien/*
16959243Sobrien * COLORCAT Do you want to colorful message ?
17059243Sobrien *
17159243Sobrien */
17259243Sobrien#undef COLORCAT
17359243Sobrien
17459243Sobrien/*
175100616Smp * FILEC    support for old style file completion
176100616Smp */
177100616Smp#define FILEC
178100616Smp
179145479Smp/* Consistency checks */
180145479Smp#ifdef WIDE_STRINGS
181145479Smp# ifdef WINNT_NATIVE
182145479Smp    #error "WIDE_STRINGS cannot be used together with WINNT_NATIVE"
183145479Smp# endif
184145479Smp
185145479Smp# ifndef SHORT_STRINGS
186145479Smp    #error "SHORT_STRINGS must be defined if WIDE_STRINGS is defined"
187145479Smp# endif
188145479Smp
189145479Smp# ifndef NLS
190145479Smp    #error "NLS must be defined if WIDE_STRINGS is defined"
191145479Smp# endif
192145479Smp
193145479Smp# ifdef DSPMBYTE
194145479Smp    #error "DSPMBYTE must not be defined if WIDE_STRINGS is defined"
195145479Smp# endif
196145479Smp#endif
197145479Smp
198145479Smp#if !defined (SHORT_STRINGS) && defined (DSPMBYTE)
199145479Smp    #error "SHORT_STRINGS must be defined if DSPMBYTE is defined"
200145479Smp#endif
201145479Smp
20259243Sobrien#endif /* _h_config_f */
203