home *** CD-ROM | disk | FTP | other *** search
- /*
- * e.h for e version 1.2
- * =====================
- *
- *------------------------------------------------------------------------------
- * terry jones, department of computer science, university of waterloo
- * waterloo ontario canada N2L 3G1
-
- * {ihnp4,allegra,decvax,utzoo,utcsri,clyde}!watmath!watdragon!tcjones
- * tcjones@dragon.waterloo.{cdn,edu} tcjones@WATER.bitnet
- * tcjones%watdragon@waterloo.csnet
- *------------------------------------------------------------------------------
- */
-
-
-
-
- /*
- * #includes common to all versions of uni*x
- *
- */
-
-
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/file.h>
- #include <signal.h>
- #include <ctype.h>
- #include <sys/param.h>
-
-
-
- /*
- * un*x version dependent #includes
- *
- */
-
-
- #ifdef sysV
- # ifdef GEC
- # include <local/ndir.h>
- # else
- # include <ndir.h>
- # endif
- # include <termio.h>
- # include <string.h>
- # include <fcntl.h>
- #else
- # include <sys/dir.h>
- # ifdef NFS
- # include <time.h>
- # include <sys/vnode.h>
- # include <ufs/inode.h>
- # include <sgtty.h>
- # else
- # include <sys/inode.h>
- # include <sys/ioctl.h>
- # endif
- # include <strings.h>
- #endif sysV
-
-
-
-
- /*
- * un*x dependent #defines
- *
- */
-
-
- #ifdef sysV
- # define VI "/usr/bin/vi"
- # define index strchr
- # define rindex strrchr
- #else
- # define VI "/usr/ucb/vi"
- #endif sysV
-
-
- /*
- * Other checks...
- *
- */
-
- #ifndef L_SET
- # define L_SET 0
- #endif
-
- #ifndef IREAD
- # define IREAD 0400
- # define IWRITE 0200
- #endif
-
-
-
- /*
- * The #defines for things that aren't portability concerns.
- *
- */
-
-
-
- #define HIST ".e"
- #define HIST_LINES 8
- #define HIST_CHARS 1024
- #define E_PATH "VIPATH"
- #define E_MODE 0644
- #define ARG_CHARS 1024
- #define MAX_ARGS 100
- #define MAX_PATH 1024
- #define BELL '\007'
- #define O_READ 00004
- #define G_READ 0004
-
-
-
- /*
- * #defines for the terminal() function.
- *
- */
-
- #define TERM_RECORD 0
- #define TERM_SET 1
- #define TERM_RESET 2
-
-
-
- /*
- * STRUCT_ASST should be defined if your UN*X is capable of doing
- * structural assignment. This is (supposedly) true for System III, System V,
- * UNIX/32V, BSD4.[23], v8 and v9. It's also in ANSI C, but *not* in
- * "The C programming language" by Kernhigan & Ritchie.
- *
- * This #define is only used in the function terminal(). Leave STRUCT_ASST
- * defined and if it doesn't break you're ok. If it does, undefine it and
- * you'll definitely be ok (but things will run slower - even though you
- * wont notice that anyway.) Words words words. Ho hum.
- *
- */
-
- #define STRUCT_ASST
-
-
- /*
- * A slightly dangerous one. NEVER call this as (for example) "is_delim(cp++)"
- * Or the incrementing will be done 4 times (not one).
- */
-
-
- #define is_delim(c) ((*c)==' '||(*c)==':'||(*c)=='\t'||(*c)=='\n')
-