/*--------------------------------*-C-*---------------------------------*
 * File:	feature.h
 *
 * Compile-time configuration.
 * Additional compile-time configuration in "defaults.h"
 * ----------------------------------------------------------------------
 * Copyright 1995,1996
 * mj olesen <olesen@me.QueensU.CA> Queen's Univ at Kingston
 *
 * You can do what you like with this source code provided you don't make
 * money from it and you include an unaltered copy of this message
 * (including the copyright).  As usual, the author accepts no
 * responsibility for anything, nor does he guarantee anything whatsoever.
 *----------------------------------------------------------------------*/
#ifndef _FEATURE_H
#define _FEATURE_H

/*----------------------------------------------------------------------*
 * system hacks:
 *----------------------------------------------------------------------*/
/* Consistent defines - please report on the necessity
 * @ Unixware: defines (__svr4__)
 */
#if defined (SVR4) && !defined (__svr4__)
# define __svr4__
#endif
#if defined (sun) && !defined (__sun__)
# define __sun__
#endif

/*
 * sun <sys/ioctl.h> isn't properly protected?
 * anyway, it causes problems when <termios.h> is also included
 */
#if defined (__sun__)
# undef HAVE_SYS_IOCTL_H
#endif

/*----------------------------------------------------------------------*
 * debugging:
 *
 * #define NDEBUG
 *	to disable whichever assert() macros are used in the code
 *
 * #define DEBUG_SCREEN
 *	to do self-check for internal screen corruption
 *
 * #define DEBUG_MALLOC
 *	to do self-check on out-of-bound memory usage
 *
 * #define DEBUG_CMD
 *	to output some data structures of command.c
 *	(key-buffer contents, command line, tty permissions)
 *
 * #define DEBUG_TTY
 *	to output tty settings
 *
 * #define DEBUG_COLORS
 *	to print out current color/renditions as they change
 *
 * #define DEBUG_SELECTION
 *	to use XK_Print to dump information about the current selection
 *----------------------------------------------------------------------*/
#define NDEBUG
#ifndef NDEBUG
/* #define DEBUG_SCREEN */
/* #define DEBUG_MALLOC */
/* #define DEBUG_CMD */
/* #define DEBUG_TTY */
/* #define DEBUG_COLORS */
/* #define DEBUG_SELECTION */
#endif

/*----------------------------------------------------------------------*
 * #define PRINTPIPE  "lpr"
 *	to define a printer pipe which will be used for emulation of an
 *	attached vt100 printer
 *----------------------------------------------------------------------*/
/* #define PRINTPIPE	"lpr" */

/*----------------------------------------------------------------------*
 * screen/colors:
 *
 * #define NO_BOLDCOLOR
 *	to suppress use of BOLD and BLINK attributes for setting
 *	high-intensity foreground and background, respectively.
 *	Simulate BOLD using overstrike characters.
 *
 * #define NO_CURSORCOLOR
 *	to avoid enabling a color cursor (-cr, cursorColor)
 *
 * #define NO_CURSORCOLOR2
 *	to avoid enabling a color cursor foreground (-cr2, cursorColor2)
 *
 * #define NO_SECONDARY_SCREEN
 *	to disable the secondary screen (ESC[?47h / ESC [?47l)
 *
 * #define REFRESH_PERIOD <num>
 *	to limit the number of screenfulls between screen refreshes
 *	during hard & fast scrolling [default = 1]
 *
 * #define USE_XCOPYAREA
 *	to use XCopyArea (in place of re-draws) to speed up rxvt.
 *	- I've been told this helps with some graphics adapters like the
 *	  PC's et4000. OK, it's good on monochrome Sun-3's that I've tried
 *	  too. /RN
 *	- sometimes looks worse and slower /mjo
 *
 * #define RXVT_GRAPHICS
 *	to use Rob Nation's own graphics mode
 *----------------------------------------------------------------------*/
/* #define NO_BOLDCOLOR */
/* #define NO_CURSORCOLOR */
/* #define NO_CURSORCOLOR2 */
/* #define NO_SECONDARY_SCREEN */
/* #define REFRESH_PERIOD	1*/
/* #define USE_XCOPYAREA */
/* #define RXVT_GRAPHICS */

/*----------------------------------------------------------------------*
 * resources:
 *
 * #define REAL_RESOURCES
 *	to use XGetDefaults()
 *
 * #define FAKE_RESOURCES
 *	to use a substitute for using XGetDefaults().
 *	If all you want to do is put rxvt defaults in ~/.Xdefaults file,
 *	use this, and save 60-160KBytes memory!
 *	[default]
 *
 * #define NO_RESOURCES
 *	to blow off the Xdefaults altogether
 *
 * #define XAPPLOADDIR	"/usr/lib/X11/app-defaults"
 *	to define where to find installed application defaults for rxvt
 *	Only used with FAKE_RESOURCES
 *----------------------------------------------------------------------*/
/* #define REAL_RESOURCES */
/* #define FAKE_RESOURCES */
/* #define NO_RESOURCES */
#ifndef XAPPLOADDIR
/* #define XAPPLOADDIR	"/usr/lib/X11/app-defaults" */
#endif

/*----------------------------------------------------------------------*
 * keys:
 *
 * #define CURSOR_SHIFT
 * #define CURSOR_CTRL
 *	to transmit shift/ctrl information for cursor keys
 *	eg.   Up = "ESC[A"
 *	    S-Up = "ESC[a"
 *	    C-Up = "ESC[\001"
 *
 * #define NO_DELETE_KEY
 *	to use the unadulterated X server value for the Delete key
 *
 * #define DONT_GUESS_BACKSPACE
 *	to use ^H for the Backspace key and avoid using the current stty
 *	setting of erase to guess a Backspace value of either ^H or ^?
 *
 * #define HOTKEY meta
 * #define HOTKEY ctrl
 * #define HOTKEY shift
 *	choose one of these values to be the `hotkey' for scrolling,
 *	changing fonts, etc [default = meta]
 *
 * #define LINUX_KEYS
 *	to use key Home = "ESC[1~", End = "ESC[4~"
 *	instead of Home = "ESC[7~", End = "ESC[8~"	[default]
 *
 * #define KEYSYM_RESOURCE
 *	to enable the keysym resource which allows you to define
 *	strings associated with various KeySyms (0xFF00 - 0xFFFF).
 *	Only works with FAKE_RESOURCES.
 *----------------------------------------------------------------------*/
#define CURSOR_SHIFT
#define CURSOR_CTRL
#if defined (__sun__) || defined (__svr4__)
# define NO_DELETE_KEY		/* favoured settings for these systems */
#endif
/* #define NO_DELETE_KEY */
/* #define DONT_GUESS_BACKSPACE */

/* #define HOTKEY meta */
/* #define LINUX_KEYS */
/* #define KEYSYM_RESOURCE */

/*----------------------------------------------------------------------*
 * mouse/selection:
 *
 * #define NO_MOUSE_REPORT
 *	to disable the XTerm mouse report protocol
 *
 * #define NO_MOUSE_REPORT_SCROLLBAR
 *	to disable sending escape sequences (up, down, page up/down)
 *	from the scrollbar when XTerm mouse reporting is enabled
 *
 * #define NO_MULTIPLE_CLICK
 *	to disable the double/triple click selection support
 *	Integrated by A. Haritsis <ah@doc.ic.ac.uk>
 *	based on code by Edward. Der-Hua Liu, Taiwan
 *
 * #define MULTICLICK_TIME <num>
 *	set delay between multiple click events [default = 500]
 *----------------------------------------------------------------------*/
/* #define NO_MOUSE_REPORT */
/* #define NO_MOUSE_REPORT_SCROLLBAR */
/* #define NO_MULTIPLE_CLICK */
/* #define MULTICLICK_TIME 500 */

/*----------------------------------------------------------------------*
 * scrollbar:
 *
 * #define NO_SCROLLBAR
 *	to remove the scrollbar entirely
 *
 * #define XTERM_SCROLLBAR
 *	to only use the XTerm-style scrollbar - no arrows, bitmapped
 *
 * If neither is defined, the regular scrollbar will be used.  The default
 * appearance (with/without arrows) is compile-time defined in
 * "defaults.h" and can be run-time selected.
 *
 * ---------------------------------------------------------------------*
 * #define SB_WIDTH	<width>
 *	to choose the scrollbar width - should be an even number
 *		XTERM_SCROLLBAR [default = 12]
 *		others [default = 14]
 *----------------------------------------------------------------------*/
/* #define NO_SCROLLBAR */
/* #define XTERM_SCROLLBAR */
/* #define SB_WIDTH 12 */

/*----------------------------------------------------------------------*
 * bell:
 *
 * #define NO_MAPALERT
 *	to disable automatic de-iconify when a bell is received
 *
 * #define MAPALERT_OPTION
 *	to have mapAlert behaviour selectable with mapAlert resource,
 *	-/+ma command-line option and a toggle key [default = XK_I]
 *
 *----------------------------------------------------------------------*/
/* #define NO_MAPALERT */
/* #define MAPALERT_OPTION */

/*----------------------------------------------------------------------*
 * keys handling:
 *
 * #define META8_OPTION
 *	to allow run-time selection of Meta (Alt) to set the 8th bit on
 *----------------------------------------------------------------------*/
/* #define META8_OPTION */

/*----------------------------------------------------------------------*
 * fonts:
 *
 * #define GREEK_SUPPORT
 *	to include support for the Greek Elot-928 & IBM-437 keyboard
 *	by A. Haritsis <ah@doc.ic.ac.uk>
 *
 * Please read instructions in README.greek
 *	- toggle via keysym: Mode_switch
 * ---------------------------------------------------------------------*
 * #define KANJI
 *	to compile with Kanji support
 *	after compilation, rename executable as `kxvt' (or `pxvt')
 *----------------------------------------------------------------------*/
/* #define GREEK_SUPPORT */
/* #define KANJI */

/*----------------------------------------------------------------------*
 * #define DISPLAY_IS_IP
 *	to have DISPLAY environment variable and ESC[7n transmit
 *	display with an IP number
 *
 * #define ENABLE_DISPLAY_ANSWER
 *	to have ESC[7n transmit the display name.  This has been cited
 *	as a potential security hole.
 *
 * #define ESCZ_RXVT_ANSWER
 *	to have the ESC Z transmit ;2C instead of default ;2c
 *----------------------------------------------------------------------*/
/* #define DISPLAY_IS_IP */
/* #define ENABLE_DISPLAY_ANSWER */
/* #define ESCZ_RXVT_ANSWER */

/*----------------------------------------------------------------------*
 * utmp:
 *
 * #define UTMP_SUPPORT
 *	for utmp support to update `/etc/utmp' to show rxvt logins.
 *
 * For this to work, there are a two options:
 *	1) Rxvt setuid root
 *	   - potential security hole (do at your own risk)
 *	     but is reported to be okay
 *		su
 *		chown root.root rxvt
 *		chmod a+s rxvt
 *	2) Rxvt setuid/setgid to match the user/group that owns `/etc/utmp'
 *
 * #define UTMP_FILENAME "/var/adm/utmp"	(Irix, dec alpha)
 * #define UTMP_FILENAME "/var/run/utmp"	(FreeBSD, NetBSD 0.9)
 *	to define where the utmp file is located if it isn't /etc/utmp
 *
 * #define TTYTAB_FILENAME "/etc/ttys"		(FreeBSD, NetBSD 0.9)
 *	for BSD-type systems, to define where the tty table is located
 *	if it isn't /etc/ttytab
 *----------------------------------------------------------------------*/
/* #define UTMP_SUPPORT */
#ifdef UTMP_SUPPORT
# ifndef UTMP_FILENAME
/* #  define UTMP_FILENAME	"/var/adm/utmp" */
/* #  define UTMP_FILENAME	"/var/adm/utmp" */
# endif
# ifndef TTYTAB_FILENAME
/* #  define TTYTAB_FILENAME "/etc/ttys" */
# endif
#endif

/*----------------------------------------------------------------------*
 * end of user configuration section -- sort out conflicts
 *----------------------------------------------------------------------*/
/* Kanji likely means not also greek */
#ifdef KANJI
# undef GREEK_SUPPORT
#endif

/*
 * disable printer-pipe if seteuid/geteuid don't exist, since
 * these provide the security that prevents a security hole
 */
#ifndef HAVE_SETEUID
# undef PRINTPIPE
#endif

#ifdef NO_MOUSE_REPORT
# ifndef NO_MOUSE_REPORT_SCROLLBAR
#  define NO_MOUSE_REPORT_SCROLLBAR
# endif
#endif

#ifdef NO_MAPALERT
# undef MAPALERT_OPTION
#endif

#ifdef NO_RESOURCES
# undef REAL_RESOURCES
# undef FAKE_RESOURCES
#else
# ifdef REAL_RESOURCES
#  undef FAKE_RESOURCES
# else
#  ifndef FAKE_RESOURCES
#   define FAKE_RESOURCES
#  endif
# endif
#endif
#ifndef FAKE_RESOURCES
# undef KEYSYM_RESOURCE
#endif

#ifdef NO_SCROLLBAR
# undef XTERM_SCROLLBAR
#endif

#endif	/* whole file */
/*----------------------- end-of-file (C header) -----------------------*/
