2021-08-18 04:54:35 -04:00
|
|
|
/* defines.h -- customization based on gcc predefined macroes */
|
2015-02-16 00:41:59 -05:00
|
|
|
#ifndef __DEFINES_H__
|
|
|
|
#define __DEFINES_H__
|
|
|
|
|
2021-08-18 04:54:35 -04:00
|
|
|
#if __unix__
|
|
|
|
# define UNIX 1
|
|
|
|
# if __NetBSD__
|
|
|
|
# define BSD 1
|
|
|
|
# define POSIX 1
|
2021-08-18 22:07:13 -04:00
|
|
|
# elif __linux__
|
2021-08-18 04:54:35 -04:00
|
|
|
# define USG 1
|
|
|
|
# define SVR4 1 /* locks */
|
|
|
|
# define POSIX 1
|
|
|
|
# else /* __CYGWIN__ */
|
|
|
|
# define USG 1
|
|
|
|
//# define POSIX 1
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# error Missing gcc predefined __unix__
|
|
|
|
#endif
|
2013-10-09 01:15:38 -04:00
|
|
|
|
2021-07-30 04:24:52 -04:00
|
|
|
#define NSTRING 128 /* # of bytes, string buffers */
|
2013-10-10 23:20:06 -04:00
|
|
|
|
2021-08-18 04:54:35 -04:00
|
|
|
#define TERMCAP 1 /* UNIX */
|
|
|
|
#define XONXOFF 1 /* UNIX */
|
|
|
|
|
|
|
|
#define VISMAC 0 /* update display during keyboard macros */
|
|
|
|
|
|
|
|
#define MSDOS 0
|
|
|
|
#define IBMPC MSDOS
|
|
|
|
#define COLOR MSDOS
|
|
|
|
|
|
|
|
|
|
|
|
#define FILOCK (SVR4 | BSD)
|
|
|
|
#define ENVFUNC 1 /* only two types so far (USG | BSD) */
|
|
|
|
|
|
|
|
#define PKCODE 1 /* include P.K. extensions, define always */
|
|
|
|
#define SCROLLCODE 1 /* scrolling code P.K. */
|
|
|
|
|
|
|
|
/* Dynamic RAM tracking and reporting redefinitions */
|
|
|
|
#define RAMSIZE 0 /* dynamic RAM memory usage tracking */
|
|
|
|
#if RAMSIZE
|
|
|
|
# define RAMSHOW 1 /* auto dynamic RAM reporting */
|
|
|
|
# include <stdlib.h>
|
|
|
|
void *allocate( size_t size) ;
|
|
|
|
void release( void *ptr) ;
|
2021-08-18 22:07:13 -04:00
|
|
|
|
2021-08-21 22:53:02 -04:00
|
|
|
# define malloc allocate
|
|
|
|
# define free release
|
2021-08-18 04:54:35 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* De-allocate memory always on exit (if the operating system or main
|
|
|
|
program can not
|
|
|
|
*/
|
|
|
|
#define CLEAN 0 /* de-alloc memory on exit */
|
|
|
|
#if CLEAN
|
|
|
|
# define exit(a) cexit(a)
|
|
|
|
|
|
|
|
void cexit( int status) ;
|
|
|
|
#endif
|
|
|
|
|
2015-02-16 00:41:59 -05:00
|
|
|
#endif
|
2021-08-18 04:54:35 -04:00
|
|
|
/* end of predefs.h */
|