/*
 * THE - The Hessling Editor. A text editor similar to VM/CMS xedit.
 * Copyright (C) 1991-2001 Mark Hessling
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to:
 *
 *    The Free Software Foundation, Inc.
 *    675 Mass Ave,
 *    Cambridge, MA 02139 USA.
 *
 *
 * If you make modifications to this software that you feel increases
 * it usefulness for the rest of the community, please email the
 * changes, enhancements, bug fixes as well as any and all ideas to me.
 * This software is going to be maintained and enhanced as deemed
 * necessary by the community.
 *
 * Mark Hessling,  M.Hessling@qut.edu.au  http://www.lightlink.com/hessling/
 */

/*
$Id: thedefs.h,v 1.20 2013/07/10 02:07:44 mark Exp $
*/

/*---------------------------------------------------------------------*/
/* Include config.h generated by configure.                            */
/*---------------------------------------------------------------------*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#else
# define BUILD3001 1

# if defined(__OS2__) || defined(__EMX__)
#  if !defined(OS2) && !defined(MSDOS)
#    define OS2 3
#  endif
#  define HAVE_BEEP 1
#  define HAVE_BOX 1
#  define HAVE_CBREAK 1
#  define HAVE_CURS_SET 1
#  define HAVE_DERWIN 1
#  define HAVE_DOUPDATE 1
#  define HAVE_KEYPAD 1
#  define HAVE_NEWPAD 1
#  define HAVE_PREFRESH 1
#  define HAVE_NOCBREAK 1
#  define HAVE_NOTIMEOUT 1
#  ifndef HAVE_PROTO
#    define HAVE_PROTO 1
#  endif
#  define HAVE_RAW 1
#  define HAVE_RESET_PROG_MODE 1
#  define HAVE_RESET_SHELL_MODE 1
#  define HAVE_SLK_INIT 1
#  define HAVE_SLK_ATTRSET 1
#  define HAVE_TOUCHLINE 1
#  define HAVE_TYPEAHEAD 1
#  define HAVE_WATTRSET 1
#  define HAVE_WADDCHNSTR 1
#  define HAVE_WNOUTREFRESH 1
#  define HAVE_WHLINE 1
#  define HAVE_WVLINE 1
#  define HAVE_WBKGD 1
#  define RETSIGTYPE void
#  define TIME_WITH_SYS_TIME 1
#  define HAVE_RENAME 1
#  define HAVE_CTYPE_H 1
#  define HAVE_FCNTL_H 1
#  ifndef HAVE_MEMORY_H
#    define HAVE_MEMORY_H 1
#  endif
#  define HAVE_STDLIB_H 1
#  define HAVE_STRING_H 1
#  define HAVE_SYS_STAT_H 1
#  define HAVE_SYS_TYPES_H 1
#  ifdef __EMX__
#   define HAVE_UNISTD_H 1
#   define HAVE_SYS_FILE_H 1
#   define HAVE_STRICMP 1
#  endif
# endif

# if defined(__MSDOS__) || defined(MSDOS)
#  ifndef DOS
#    define DOS 6
#  endif
#  define HAVE_BEEP 1
#  define HAVE_BOX 1
#  define HAVE_CBREAK 1
#  define HAVE_CURS_SET 1
#  define HAVE_DERWIN 1
#  define HAVE_DOUPDATE 1
#  define HAVE_KEYPAD 1
#  define HAVE_NEWPAD 1
#  define HAVE_PREFRESH 1
#  define HAVE_NOCBREAK 1
#  define HAVE_NOTIMEOUT 1
#  ifndef HAVE_PROTO
#    define HAVE_PROTO 1
#  endif
#  define HAVE_RAW 1
#  define HAVE_RESET_PROG_MODE 1
#  define HAVE_RESET_SHELL_MODE 1
#  ifndef MSWIN
#    define HAVE_SLK_INIT 1
#    define HAVE_SLK_ATTRSET 1
#  endif
#  define HAVE_TIME_H 1
#  define HAVE_TOUCHLINE 1
#  define HAVE_TYPEAHEAD 1
#  define HAVE_WATTRSET 1
#  define HAVE_WADDCHNSTR 1
#  define HAVE_WNOUTREFRESH 1
#  define HAVE_WVLINE 1
#  define HAVE_WHLINE 1
#  define HAVE_WBKGD 1
#  define RETSIGTYPE void
#  define HAVE_RENAME 1
#  define HAVE_CTYPE_H 1
#  define HAVE_FCNTL_H 1
#  ifndef HAVE_MEMORY_H
#    define HAVE_MEMORY_H 1
#  endif
#  define HAVE_STDLIB_H 1
#  define HAVE_STRING_H 1
#  define HAVE_SYS_STAT_H 1
#  define HAVE_SYS_TYPES_H 1
# endif

# if defined(__NT__) || defined(WIN32)
#  define HAVE_BEEP 1
#  define HAVE_BOX 1
#  define HAVE_CBREAK 1
#  define HAVE_CURS_SET 1
#  define HAVE_DERWIN 1
#  define HAVE_DOUPDATE 1
#  define HAVE_KEYPAD 1
#  define HAVE_NEWPAD 1
#  define HAVE_PREFRESH 1
#  define HAVE_NOCBREAK 1
#  define HAVE_NOTIMEOUT 1
#  ifndef HAVE_PROTO
#    define HAVE_PROTO 1
#  endif
#  define HAVE_RAW 1
#  define HAVE_RESET_PROG_MODE 1
#  define HAVE_RESET_SHELL_MODE 1
#  define HAVE_RESIZE_TERM 1
#  define HAVE_SLK_INIT 1
#  define HAVE_SLK_ATTRSET 1
#  define HAVE_TOUCHLINE 1
#  define HAVE_TYPEAHEAD 1
#  define HAVE_WATTRSET 1
#  define HAVE_WADDCHNSTR 1
#  define HAVE_WNOUTREFRESH 1
#  define HAVE_WVLINE 1
#  define HAVE_WHLINE 1
#  define HAVE_WBKGD 1
#  define RETSIGTYPE void
#  define TIME_WITH_SYS_TIME 1
#  define HAVE_TIME_H 1
#  define HAVE_RENAME 1
#  define HAVE_STRCMPI 1
#  define HAVE_CTYPE_H 1
#  define HAVE_FCNTL_H 1
#  ifndef HAVE_MEMORY_H
#    define HAVE_MEMORY_H 1
#  endif
#  define HAVE_STDLIB_H 1
#  define HAVE_STRING_H 1
#  define HAVE_SYS_STAT_H 1
#  define HAVE_SYS_TYPES_H 1
#  define HAVE_LOCALE_H 1
#  define HAVE_SETLOCALE 1
# endif

# if defined(AMIGA) && defined(GCC)
#  define HAVE_BEEP 1
#  define HAVE_BOX 1
#  define HAVE_CBREAK 1
#  define HAVE_CURS_SET 1
#  define HAVE_DOUPDATE 1
#  define HAVE_KEYPAD 1
#  define HAVE_NOCBREAK 1
#  define HAVE_NODELAY 1
#  define HAVE_NOTIMEOUT 1
#  define HAVE_UNGETCH 1
#  ifndef HAVE_PROTO
#    define HAVE_PROTO 1
#  endif
#  define HAVE_RAW 1
#  define HAVE_RESET_PROG_MODE 1
#  define HAVE_RESET_SHELL_MODE 1
#  define HAVE_SLK_INIT 1
#  define HAVE_SLK_ATTRSET 1
#  define HAVE_TOUCHLINE 1
#  define HAVE_TYPEAHEAD 1
#  define HAVE_WATTRSET 1
#  define HAVE_WADDCHNSTR 1
#  define HAVE_WBKGD 1
#  define HAVE_WNOUTREFRESH 1
#  define HAVE_WVLINE 1
#  define HAVE_WHLINE 1
#  define RETSIGTYPE void
#  define STDC_HEADERS 1
#  define TIME_WITH_SYS_TIME 1
#  define USE_NCURSES 1
#  define USE_REGINA 1
#  define HAVE_STRCASECMP 1
#  define HAVE_READLINK 1
#  define HAVE_RENAME 1
#  define HAVE_LSTAT 1
#  define HAVE_CHOWN 1
#  define HAVE_CTYPE_H 1
#  define HAVE_ALLOCA_H 1
#  define HAVE_DIRENT_H 1
#  define HAVE_FCNTL_H 1
#  define HAVE_MEMORY_H 1
#  define HAVE_STDARG_H 1
#  define HAVE_STDLIB_H 1
#  define HAVE_STRING_H 1
#  define HAVE_TIME_H 1
#  define HAVE_SYS_FILE_H 1
#  define HAVE_SYS_STAT_H 1
#  define HAVE_SYS_TYPES_H 1
#  define HAVE_SYS_WAIT_H 1
#  define HAVE_UNISTD_H 1
# endif

# if defined(VMS)
#  define HAVE_BOX 1
#  ifndef HAVE_PROTO
#    define HAVE_PROTO 1
#  endif
#  define RETSIGTYPE void
#  define STDC_HEADERS 1
/*#  define USE_REGINA 1 */
#  define NOREXX 1
#  define HAVE_RENAME 1
/*#  define HAVE_LSTAT 1 */
#  define HAVE_CHOWN 1
#  define HAVE_BEGY 1
#  define HAVE_CTYPE_H 1
#  define HAVE_ALLOCA_H 1
#  define HAVE_DIRENT_H 1
#  define HAVE_ERRNO_H 1
#  define HAVE_FCNTL_H 1
#  define HAVE_MEMORY_H 1
#  define HAVE_STDARG_H 1
#  define HAVE_STDLIB_H 1
#  define HAVE_STRING_H 1
#  define HAVE_TIME_H 1
#  define HAVE_SYS_FILE_H 1
#  define HAVE_SYS_STAT_H 1
#  define HAVE_SYS_TYPES_H 1
#  define HAVE_SYS_WAIT_H 1
#  define HAVE_UNISTD_H 1
#  define _XOPEN_SOURCE_EXTENDED
#  define _BSD44_CURSES
#  define HAVE_BSD_CURSES
#  define wnoutrefresh(a) refresh()
# endif
#endif

/*---------------------------------------------------------------------*/
/* The following values can be changed to suit your needs.             */
/*---------------------------------------------------------------------*/
#define MAX_FILE_NAME             1000  /* maximum length of fully qualified file */
#define MAX_LENGTH_OF_LINE        1000  /* default maximum length of a line */
#define MAX_COMMANDS                10  /* default maximum number of commands allowed on command line */
#define MAX_RECV                    20  /* number of lines that can be recovered */
#define MAX_SAVED_COMMANDS          20  /* number of commands that can be retrieved */
#define MAX_NUMTABS                 32  /* number of tab stops that can be defined */
#define MAXIMUM_POPUP_KEYS          20  /* maximum number of keys in popup menu */
#define MAXIMUM_DIALOG_LINES       100  /* maximum number of lines in a dailog */

/*---------------------------------------------------------------------*/
/* The following values should not be changed unless you know what you */
/* are doing !                                                         */
/*---------------------------------------------------------------------*/
typedef unsigned short ROWTYPE;
typedef unsigned short COLTYPE;
typedef unsigned char  CHARTYPE;
typedef long           LENGTHTYPE; /* was unsigned short */ /* MUST be signed!!! */
typedef long           LINETYPE;
typedef unsigned char  SELECTTYPE;
/*---------------------------------------------------------------------*/
/* A default char type to avoid compiler warnings.                     */
/*---------------------------------------------------------------------*/
typedef char           DEFCHAR;
