1 /* $Id: sysdef.h,v 1.1.1.1.2.1 2003/02/23 14:32:58 amura Exp $ */ 2 /* 3 * System V system header file 4 */ 5 6 /* 7 * $Log: sysdef.h,v $ 8 * Revision 1.1.1.1.2.1 2003/02/23 14:32:58 amura 9 * canna_init() must be called after setttysize() on ttyio.c 10 * 11 * Revision 1.1.1.1 2000/06/27 01:47:59 amura 12 * import to CVS 13 * 14 */ 15 16 #include <stdio.h> 17 #include <unistd.h> /* 00.04.15 by amura */ 18 19 #define HAVE_GETCWD 20 21 #define KBLOCK 8192 /* Kill grow. */ 22 #define GOOD 0 /* Good exit status. */ 23 #define MAXPATH 256 /* Maximum length of path for chdir */ 24 #ifndef NO_SHELL /* 91.01.10 by K.Maeda */ 25 #define CMDLINELENGTH 128 /* Maximum length of shell command. */ 26 #endif /* NO_SHELL */ 27 #define BSMAP FALSE /* Bs map feature can use. */ 28 /* (default mode is bsmap off) */ 29 #define MAKEBACKUP TRUE /* Making backup file is on. */ 30 31 typedef long RSIZE; /* Type for file/region sizes */ 32 typedef short KCHAR; /* Type for internal keystrokes */ 33 34 #if 0 35 #ifdef _POSIX_JOB_CONTROL /* This is trick */ 36 # if (0 - _POSIX_JOB_CONTROL - 1) != -1 37 # define HAVE_GETSID 38 # endif 39 #endif 40 #endif 41 42 /* 43 * Macros used by the buffer name making code. 44 * Start at the end of the file name, scan to the left 45 * until BDC1 (or BDC2, if defined) is reached. The buffer 46 * name starts just to the right of that location, and 47 * stops at end of string (or at the next BDC3 character, 48 * if defined). BDC2 and BDC3 are mainly for VMS. 49 */ 50 #define BDC1 '/' /* Buffer names. */ 51 52 #define MALLOCROUND(m) (m+=7,m&=~7) /* round up to 8 byte boundry */ 53 54 #define fncmp strcmp /* file name comparison */ 55 #define bcopy(s,d,n) memcpy(d,s,n) /* memory-to-memory copy */ 56 #define bzero(s,n) memset(s,0,n) /* 91.01.21 Add by H.Kaneko. */ 57 #define bcmp(s,d,n) memcmp(s,d,n) /* 91.02.04 Add by Y.Nimura. */ 58 /* 91.02.04 strncmp -> memcmp */ 59 /* by S.Yoshida */ 60 #ifndef SVR2 /* SVID2(==SVR3) has rmdir. 00.04.03 by amura */ 61 #define unlinkdir(fn) rmdir(fn) /* unlink directory */ 62 #endif 63 char *getenv(); 64 #define gettermtype() getenv("TERM") /* determine terminal type */ 65 char *getcwd(); 66