1 /*
2  * THE - The Hessling Editor. A text editor similar to VM/CMS xedit.
3  * Copyright (C) 1991-2001 Mark Hessling
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of
8  * the License, or any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to:
17  *
18  *    The Free Software Foundation, Inc.
19  *    675 Mass Ave,
20  *    Cambridge, MA 02139 USA.
21  *
22  *
23  * If you make modifications to this software that you feel increases
24  * it usefulness for the rest of the community, please email the
25  * changes, enhancements, bug fixes as well as any and all ideas to me.
26  * This software is going to be maintained and enhanced as deemed
27  * necessary by the community.
28  *
29  * Mark Hessling,  M.Hessling@qut.edu.au  http://www.lightlink.com/hessling/
30  */
31 
32 /*
33 $Id: thedefs.h,v 1.20 2013/07/10 02:07:44 mark Exp $
34 */
35 
36 /*---------------------------------------------------------------------*/
37 /* Include config.h generated by configure.                            */
38 /*---------------------------------------------------------------------*/
39 #ifdef HAVE_CONFIG_H
40 # include "config.h"
41 #else
42 # define BUILD3001 1
43 
44 # if defined(__OS2__) || defined(__EMX__)
45 #  if !defined(OS2) && !defined(MSDOS)
46 #    define OS2 3
47 #  endif
48 #  define HAVE_BEEP 1
49 #  define HAVE_BOX 1
50 #  define HAVE_CBREAK 1
51 #  define HAVE_CURS_SET 1
52 #  define HAVE_DERWIN 1
53 #  define HAVE_DOUPDATE 1
54 #  define HAVE_KEYPAD 1
55 #  define HAVE_NEWPAD 1
56 #  define HAVE_PREFRESH 1
57 #  define HAVE_NOCBREAK 1
58 #  define HAVE_NOTIMEOUT 1
59 #  ifndef HAVE_PROTO
60 #    define HAVE_PROTO 1
61 #  endif
62 #  define HAVE_RAW 1
63 #  define HAVE_RESET_PROG_MODE 1
64 #  define HAVE_RESET_SHELL_MODE 1
65 #  define HAVE_SLK_INIT 1
66 #  define HAVE_SLK_ATTRSET 1
67 #  define HAVE_TOUCHLINE 1
68 #  define HAVE_TYPEAHEAD 1
69 #  define HAVE_WATTRSET 1
70 #  define HAVE_WADDCHNSTR 1
71 #  define HAVE_WNOUTREFRESH 1
72 #  define HAVE_WHLINE 1
73 #  define HAVE_WVLINE 1
74 #  define HAVE_WBKGD 1
75 #  define RETSIGTYPE void
76 #  define TIME_WITH_SYS_TIME 1
77 #  define HAVE_RENAME 1
78 #  define HAVE_CTYPE_H 1
79 #  define HAVE_FCNTL_H 1
80 #  ifndef HAVE_MEMORY_H
81 #    define HAVE_MEMORY_H 1
82 #  endif
83 #  define HAVE_STDLIB_H 1
84 #  define HAVE_STRING_H 1
85 #  define HAVE_SYS_STAT_H 1
86 #  define HAVE_SYS_TYPES_H 1
87 #  ifdef __EMX__
88 #   define HAVE_UNISTD_H 1
89 #   define HAVE_SYS_FILE_H 1
90 #   define HAVE_STRICMP 1
91 #  endif
92 # endif
93 
94 # if defined(__MSDOS__) || defined(MSDOS)
95 #  ifndef DOS
96 #    define DOS 6
97 #  endif
98 #  define HAVE_BEEP 1
99 #  define HAVE_BOX 1
100 #  define HAVE_CBREAK 1
101 #  define HAVE_CURS_SET 1
102 #  define HAVE_DERWIN 1
103 #  define HAVE_DOUPDATE 1
104 #  define HAVE_KEYPAD 1
105 #  define HAVE_NEWPAD 1
106 #  define HAVE_PREFRESH 1
107 #  define HAVE_NOCBREAK 1
108 #  define HAVE_NOTIMEOUT 1
109 #  ifndef HAVE_PROTO
110 #    define HAVE_PROTO 1
111 #  endif
112 #  define HAVE_RAW 1
113 #  define HAVE_RESET_PROG_MODE 1
114 #  define HAVE_RESET_SHELL_MODE 1
115 #  ifndef MSWIN
116 #    define HAVE_SLK_INIT 1
117 #    define HAVE_SLK_ATTRSET 1
118 #  endif
119 #  define HAVE_TIME_H 1
120 #  define HAVE_TOUCHLINE 1
121 #  define HAVE_TYPEAHEAD 1
122 #  define HAVE_WATTRSET 1
123 #  define HAVE_WADDCHNSTR 1
124 #  define HAVE_WNOUTREFRESH 1
125 #  define HAVE_WVLINE 1
126 #  define HAVE_WHLINE 1
127 #  define HAVE_WBKGD 1
128 #  define RETSIGTYPE void
129 #  define HAVE_RENAME 1
130 #  define HAVE_CTYPE_H 1
131 #  define HAVE_FCNTL_H 1
132 #  ifndef HAVE_MEMORY_H
133 #    define HAVE_MEMORY_H 1
134 #  endif
135 #  define HAVE_STDLIB_H 1
136 #  define HAVE_STRING_H 1
137 #  define HAVE_SYS_STAT_H 1
138 #  define HAVE_SYS_TYPES_H 1
139 # endif
140 
141 # if defined(__NT__) || defined(WIN32)
142 #  define HAVE_BEEP 1
143 #  define HAVE_BOX 1
144 #  define HAVE_CBREAK 1
145 #  define HAVE_CURS_SET 1
146 #  define HAVE_DERWIN 1
147 #  define HAVE_DOUPDATE 1
148 #  define HAVE_KEYPAD 1
149 #  define HAVE_NEWPAD 1
150 #  define HAVE_PREFRESH 1
151 #  define HAVE_NOCBREAK 1
152 #  define HAVE_NOTIMEOUT 1
153 #  ifndef HAVE_PROTO
154 #    define HAVE_PROTO 1
155 #  endif
156 #  define HAVE_RAW 1
157 #  define HAVE_RESET_PROG_MODE 1
158 #  define HAVE_RESET_SHELL_MODE 1
159 #  define HAVE_RESIZE_TERM 1
160 #  define HAVE_SLK_INIT 1
161 #  define HAVE_SLK_ATTRSET 1
162 #  define HAVE_TOUCHLINE 1
163 #  define HAVE_TYPEAHEAD 1
164 #  define HAVE_WATTRSET 1
165 #  define HAVE_WADDCHNSTR 1
166 #  define HAVE_WNOUTREFRESH 1
167 #  define HAVE_WVLINE 1
168 #  define HAVE_WHLINE 1
169 #  define HAVE_WBKGD 1
170 #  define RETSIGTYPE void
171 #  define TIME_WITH_SYS_TIME 1
172 #  define HAVE_TIME_H 1
173 #  define HAVE_RENAME 1
174 #  define HAVE_STRCMPI 1
175 #  define HAVE_CTYPE_H 1
176 #  define HAVE_FCNTL_H 1
177 #  ifndef HAVE_MEMORY_H
178 #    define HAVE_MEMORY_H 1
179 #  endif
180 #  define HAVE_STDLIB_H 1
181 #  define HAVE_STRING_H 1
182 #  define HAVE_SYS_STAT_H 1
183 #  define HAVE_SYS_TYPES_H 1
184 #  define HAVE_LOCALE_H 1
185 #  define HAVE_SETLOCALE 1
186 # endif
187 
188 # if defined(AMIGA) && defined(GCC)
189 #  define HAVE_BEEP 1
190 #  define HAVE_BOX 1
191 #  define HAVE_CBREAK 1
192 #  define HAVE_CURS_SET 1
193 #  define HAVE_DOUPDATE 1
194 #  define HAVE_KEYPAD 1
195 #  define HAVE_NOCBREAK 1
196 #  define HAVE_NODELAY 1
197 #  define HAVE_NOTIMEOUT 1
198 #  define HAVE_UNGETCH 1
199 #  ifndef HAVE_PROTO
200 #    define HAVE_PROTO 1
201 #  endif
202 #  define HAVE_RAW 1
203 #  define HAVE_RESET_PROG_MODE 1
204 #  define HAVE_RESET_SHELL_MODE 1
205 #  define HAVE_SLK_INIT 1
206 #  define HAVE_SLK_ATTRSET 1
207 #  define HAVE_TOUCHLINE 1
208 #  define HAVE_TYPEAHEAD 1
209 #  define HAVE_WATTRSET 1
210 #  define HAVE_WADDCHNSTR 1
211 #  define HAVE_WBKGD 1
212 #  define HAVE_WNOUTREFRESH 1
213 #  define HAVE_WVLINE 1
214 #  define HAVE_WHLINE 1
215 #  define RETSIGTYPE void
216 #  define STDC_HEADERS 1
217 #  define TIME_WITH_SYS_TIME 1
218 #  define USE_NCURSES 1
219 #  define USE_REGINA 1
220 #  define HAVE_STRCASECMP 1
221 #  define HAVE_READLINK 1
222 #  define HAVE_RENAME 1
223 #  define HAVE_LSTAT 1
224 #  define HAVE_CHOWN 1
225 #  define HAVE_CTYPE_H 1
226 #  define HAVE_ALLOCA_H 1
227 #  define HAVE_DIRENT_H 1
228 #  define HAVE_FCNTL_H 1
229 #  define HAVE_MEMORY_H 1
230 #  define HAVE_STDARG_H 1
231 #  define HAVE_STDLIB_H 1
232 #  define HAVE_STRING_H 1
233 #  define HAVE_TIME_H 1
234 #  define HAVE_SYS_FILE_H 1
235 #  define HAVE_SYS_STAT_H 1
236 #  define HAVE_SYS_TYPES_H 1
237 #  define HAVE_SYS_WAIT_H 1
238 #  define HAVE_UNISTD_H 1
239 # endif
240 
241 # if defined(VMS)
242 #  define HAVE_BOX 1
243 #  ifndef HAVE_PROTO
244 #    define HAVE_PROTO 1
245 #  endif
246 #  define RETSIGTYPE void
247 #  define STDC_HEADERS 1
248 /*#  define USE_REGINA 1 */
249 #  define NOREXX 1
250 #  define HAVE_RENAME 1
251 /*#  define HAVE_LSTAT 1 */
252 #  define HAVE_CHOWN 1
253 #  define HAVE_BEGY 1
254 #  define HAVE_CTYPE_H 1
255 #  define HAVE_ALLOCA_H 1
256 #  define HAVE_DIRENT_H 1
257 #  define HAVE_ERRNO_H 1
258 #  define HAVE_FCNTL_H 1
259 #  define HAVE_MEMORY_H 1
260 #  define HAVE_STDARG_H 1
261 #  define HAVE_STDLIB_H 1
262 #  define HAVE_STRING_H 1
263 #  define HAVE_TIME_H 1
264 #  define HAVE_SYS_FILE_H 1
265 #  define HAVE_SYS_STAT_H 1
266 #  define HAVE_SYS_TYPES_H 1
267 #  define HAVE_SYS_WAIT_H 1
268 #  define HAVE_UNISTD_H 1
269 #  define _XOPEN_SOURCE_EXTENDED
270 #  define _BSD44_CURSES
271 #  define HAVE_BSD_CURSES
272 #  define wnoutrefresh(a) refresh()
273 # endif
274 #endif
275 
276 /*---------------------------------------------------------------------*/
277 /* The following values can be changed to suit your needs.             */
278 /*---------------------------------------------------------------------*/
279 #define MAX_FILE_NAME             1000  /* maximum length of fully qualified file */
280 #define MAX_LENGTH_OF_LINE        1000  /* default maximum length of a line */
281 #define MAX_COMMANDS                10  /* default maximum number of commands allowed on command line */
282 #define MAX_RECV                    20  /* number of lines that can be recovered */
283 #define MAX_SAVED_COMMANDS          20  /* number of commands that can be retrieved */
284 #define MAX_NUMTABS                 32  /* number of tab stops that can be defined */
285 #define MAXIMUM_POPUP_KEYS          20  /* maximum number of keys in popup menu */
286 #define MAXIMUM_DIALOG_LINES       100  /* maximum number of lines in a dailog */
287 
288 /*---------------------------------------------------------------------*/
289 /* The following values should not be changed unless you know what you */
290 /* are doing !                                                         */
291 /*---------------------------------------------------------------------*/
292 typedef unsigned short ROWTYPE;
293 typedef unsigned short COLTYPE;
294 typedef unsigned char  CHARTYPE;
295 typedef long           LENGTHTYPE; /* was unsigned short */ /* MUST be signed!!! */
296 typedef long           LINETYPE;
297 typedef unsigned char  SELECTTYPE;
298 /*---------------------------------------------------------------------*/
299 /* A default char type to avoid compiler warnings.                     */
300 /*---------------------------------------------------------------------*/
301 typedef char           DEFCHAR;
302