From eab1b679e07aa9debd2c85efca6629cb71b32ec0 Mon Sep 17 00:00:00 2001 From: Adam Weinberger Date: Mon, 28 Jul 2014 18:13:49 +0000 Subject: Rename editors/ patch-xy patches to reflect the files they modify. --- editors/apel/Makefile | 3 +- editors/apel/files/patch-APEL-MK | 11 + editors/apel/files/patch-ac | 11 - editors/bpatch/files/patch-Makefile | 42 + editors/bpatch/files/patch-aa | 42 - editors/bpatch/files/patch-ab | 347 ------ editors/bpatch/files/patch-bpatch.c | 347 ++++++ editors/bvi/files/patch-ab | 11 - editors/bvi/files/patch-io.c | 11 + editors/flim/files/patch-FLIM-CFG | 11 + editors/flim/files/patch-aa | 11 - editors/flim/files/patch-ac | 15 - editors/flim/files/patch-ad | 15 - editors/flim/files/patch-mime-en.texi | 15 + editors/flim/files/patch-mime-ja.texi | 15 + editors/gnotepad+/files/patch-Makefile.in | 30 + editors/gnotepad+/files/patch-aa | 30 - editors/nedit/files/patch-Makefile | 15 + editors/nedit/files/patch-aa | 15 - editors/nedit/files/patch-ab | 13 - editors/nedit/files/patch-ac | 22 - editors/nedit/files/patch-ad | 12 - editors/nedit/files/patch-doc_nc.man | 12 + .../nedit/files/patch-makefiles_Makefile.freebsd | 22 + editors/nedit/files/patch-source_Makefile.common | 13 + editors/nvi-m17n/files/patch-ac | 51 - editors/nvi-m17n/files/patch-include_sys_queue.h | 51 + editors/semi/files/patch-SEMI-CFG | 11 + editors/semi/files/patch-aa | 14 - editors/semi/files/patch-ab | 14 - editors/semi/files/patch-ac | 11 - editors/semi/files/patch-mime-ui-en.texi | 14 + editors/semi/files/patch-mime-ui-ja.texi | 14 + editors/uemacs/files/patch-Makefile | 15 + editors/uemacs/files/patch-aa | 15 - editors/uemacs/files/patch-ab | 1257 -------------------- editors/uemacs/files/patch-ac | 25 - editors/uemacs/files/patch-ad | 20 - editors/uemacs/files/patch-ae | 12 - editors/uemacs/files/patch-af | 13 - editors/uemacs/files/patch-ag | 25 - editors/uemacs/files/patch-freebsd_estruct.h | 1257 ++++++++++++++++++++ editors/uemacs/files/patch-freebsd_makefile | 13 + editors/uemacs/files/patch-h_epath.h | 12 + editors/uemacs/files/patch-src_bind.c | 25 + editors/uemacs/files/patch-src_lock.c | 20 + editors/uemacs/files/patch-src_unix.c | 25 + editors/vigor/files/patch-Makefile.in | 11 + editors/vigor/files/patch-aa | 11 - 49 files changed, 2013 insertions(+), 2014 deletions(-) create mode 100644 editors/apel/files/patch-APEL-MK delete mode 100644 editors/apel/files/patch-ac create mode 100644 editors/bpatch/files/patch-Makefile delete mode 100644 editors/bpatch/files/patch-aa delete mode 100644 editors/bpatch/files/patch-ab create mode 100644 editors/bpatch/files/patch-bpatch.c delete mode 100644 editors/bvi/files/patch-ab create mode 100644 editors/bvi/files/patch-io.c create mode 100644 editors/flim/files/patch-FLIM-CFG delete mode 100644 editors/flim/files/patch-aa delete mode 100644 editors/flim/files/patch-ac delete mode 100644 editors/flim/files/patch-ad create mode 100644 editors/flim/files/patch-mime-en.texi create mode 100644 editors/flim/files/patch-mime-ja.texi create mode 100644 editors/gnotepad+/files/patch-Makefile.in delete mode 100644 editors/gnotepad+/files/patch-aa create mode 100644 editors/nedit/files/patch-Makefile delete mode 100644 editors/nedit/files/patch-aa delete mode 100644 editors/nedit/files/patch-ab delete mode 100644 editors/nedit/files/patch-ac delete mode 100644 editors/nedit/files/patch-ad create mode 100644 editors/nedit/files/patch-doc_nc.man create mode 100644 editors/nedit/files/patch-makefiles_Makefile.freebsd create mode 100644 editors/nedit/files/patch-source_Makefile.common delete mode 100644 editors/nvi-m17n/files/patch-ac create mode 100644 editors/nvi-m17n/files/patch-include_sys_queue.h create mode 100644 editors/semi/files/patch-SEMI-CFG delete mode 100644 editors/semi/files/patch-aa delete mode 100644 editors/semi/files/patch-ab delete mode 100644 editors/semi/files/patch-ac create mode 100644 editors/semi/files/patch-mime-ui-en.texi create mode 100644 editors/semi/files/patch-mime-ui-ja.texi create mode 100644 editors/uemacs/files/patch-Makefile delete mode 100644 editors/uemacs/files/patch-aa delete mode 100644 editors/uemacs/files/patch-ab delete mode 100644 editors/uemacs/files/patch-ac delete mode 100644 editors/uemacs/files/patch-ad delete mode 100644 editors/uemacs/files/patch-ae delete mode 100644 editors/uemacs/files/patch-af delete mode 100644 editors/uemacs/files/patch-ag create mode 100644 editors/uemacs/files/patch-freebsd_estruct.h create mode 100644 editors/uemacs/files/patch-freebsd_makefile create mode 100644 editors/uemacs/files/patch-h_epath.h create mode 100644 editors/uemacs/files/patch-src_bind.c create mode 100644 editors/uemacs/files/patch-src_lock.c create mode 100644 editors/uemacs/files/patch-src_unix.c create mode 100644 editors/vigor/files/patch-Makefile.in delete mode 100644 editors/vigor/files/patch-aa (limited to 'editors') diff --git a/editors/apel/Makefile b/editors/apel/Makefile index cf5996557414..3bb4dda8cb51 100644 --- a/editors/apel/Makefile +++ b/editors/apel/Makefile @@ -32,9 +32,8 @@ MAKE_ARGS+= PREFIX="${STAGEDIR}${LOCALBASE}" \ VERSION_SPECIFIC_LISPDIR="${STAGEDIR}${APEL_VERSION_SPECIFIC_LISPDIR}" OPTIONS_DEFINE= DOCS -OPTINOS_DEFAULT= DOCS +OPTIONS_DEFAULT=DOCS -.include .include .if ${EMACS_VER:C/\..*//} >= 23 diff --git a/editors/apel/files/patch-APEL-MK b/editors/apel/files/patch-APEL-MK new file mode 100644 index 000000000000..a602fff48d9f --- /dev/null +++ b/editors/apel/files/patch-APEL-MK @@ -0,0 +1,11 @@ +--- APEL-MK.orig Wed Dec 22 13:14:21 1999 ++++ APEL-MK Wed May 10 23:45:36 2000 +@@ -41,7 +41,7 @@ + ;; Make "emu" subdirectory. + "emu" + ;; Don't make "emu" subdirectory. +- "")) ++ "emu")) + + ;; The directories where APEL and EMU modules will be installed. + ;; These two variables will be generated from other variables above. diff --git a/editors/apel/files/patch-ac b/editors/apel/files/patch-ac deleted file mode 100644 index a602fff48d9f..000000000000 --- a/editors/apel/files/patch-ac +++ /dev/null @@ -1,11 +0,0 @@ ---- APEL-MK.orig Wed Dec 22 13:14:21 1999 -+++ APEL-MK Wed May 10 23:45:36 2000 -@@ -41,7 +41,7 @@ - ;; Make "emu" subdirectory. - "emu" - ;; Don't make "emu" subdirectory. -- "")) -+ "emu")) - - ;; The directories where APEL and EMU modules will be installed. - ;; These two variables will be generated from other variables above. diff --git a/editors/bpatch/files/patch-Makefile b/editors/bpatch/files/patch-Makefile new file mode 100644 index 000000000000..9be47a63af6f --- /dev/null +++ b/editors/bpatch/files/patch-Makefile @@ -0,0 +1,42 @@ +--- /dev/null Mon Mar 18 12:50:49 1996 ++++ Makefile Mon Mar 18 19:30:47 1996 +@@ -0,0 +1,39 @@ ++# This may have to change on your system. ++# You may have to fiddle with various combinations of curses, termcap, ++# terminfo, etc. Good luck! ++PREFIX?= /usr/local ++BINDIR= ${PREFIX}/bin ++MANDIR= ${PREFIX}/man/man1 ++ ++LIBS = -lncurses ++#LIBS = -ltermlib ++#LIBS = -lterminfo ++#for sysV ++#LIBS = -lcurses ++ ++# However you need getopt. ++#GETOPT = -lgetopt ++#not for sysV! (nor for some BSD) ++#GETOPT = ++ ++# If you're running on a 4.[23] system, you probably want this. ++#WORK = -DMOD_HAX ++#sysV ++#WORK = ++ ++#BSD or thereabouts ++CFLAGS+= $(WORK) ++#Microport sysV/AT, large model, for sdb debugger ++#CFLAGS = -g -Ml ++ ++all: bpatch ++ ++clean: ++ rm -f bpatch bpatch.o *.core ++ ++bpatch: bpatch.o ++ $(CC) -o bpatch $(CFLAGS) bpatch.o $(GETOPT) $(LIBS) ++ ++install: bpatch bpatch.1 ++ $(BSD_INSTALL_PROGRAM) bpatch $(DESTDIR)$(BINDIR) ++ $(BSD_INSTALL_MAN) bpatch.1 $(DESTDIR)$(MANDIR) diff --git a/editors/bpatch/files/patch-aa b/editors/bpatch/files/patch-aa deleted file mode 100644 index 9be47a63af6f..000000000000 --- a/editors/bpatch/files/patch-aa +++ /dev/null @@ -1,42 +0,0 @@ ---- /dev/null Mon Mar 18 12:50:49 1996 -+++ Makefile Mon Mar 18 19:30:47 1996 -@@ -0,0 +1,39 @@ -+# This may have to change on your system. -+# You may have to fiddle with various combinations of curses, termcap, -+# terminfo, etc. Good luck! -+PREFIX?= /usr/local -+BINDIR= ${PREFIX}/bin -+MANDIR= ${PREFIX}/man/man1 -+ -+LIBS = -lncurses -+#LIBS = -ltermlib -+#LIBS = -lterminfo -+#for sysV -+#LIBS = -lcurses -+ -+# However you need getopt. -+#GETOPT = -lgetopt -+#not for sysV! (nor for some BSD) -+#GETOPT = -+ -+# If you're running on a 4.[23] system, you probably want this. -+#WORK = -DMOD_HAX -+#sysV -+#WORK = -+ -+#BSD or thereabouts -+CFLAGS+= $(WORK) -+#Microport sysV/AT, large model, for sdb debugger -+#CFLAGS = -g -Ml -+ -+all: bpatch -+ -+clean: -+ rm -f bpatch bpatch.o *.core -+ -+bpatch: bpatch.o -+ $(CC) -o bpatch $(CFLAGS) bpatch.o $(GETOPT) $(LIBS) -+ -+install: bpatch bpatch.1 -+ $(BSD_INSTALL_PROGRAM) bpatch $(DESTDIR)$(BINDIR) -+ $(BSD_INSTALL_MAN) bpatch.1 $(DESTDIR)$(MANDIR) diff --git a/editors/bpatch/files/patch-ab b/editors/bpatch/files/patch-ab deleted file mode 100644 index 5b2ad8225f32..000000000000 --- a/editors/bpatch/files/patch-ab +++ /dev/null @@ -1,347 +0,0 @@ ---- bpatch.c.orig 1990-01-17 15:33:33.000000000 +0100 -+++ bpatch.c 2012-11-30 15:20:18.000000000 +0100 -@@ -90,10 +90,15 @@ - /*E*/ - /*S includes, globals, and defines */ - /*Page Eject*/ --#include -+#include - #include - #include - #include -+#include -+#include -+#include -+#include -+#include - #include - #include - -@@ -103,14 +108,18 @@ - void icc (); - void copyrec (); - void schwapp (); -- --/* added declarations, mostly for cleanliness */ --extern long lseek(); --extern long atol(); --extern char *strncpy(); --extern void exit(); --extern unsigned sleep(); /* signal problems ??? if sleep called */ --extern void perror(); -+void breakp (); -+void reset (); -+int ckfile (char *, long *); -+int bread (int, char *, int, int); -+void errmsg (char *, unsigned); -+void show (int, char[16][16], char *, long, int, long, char, int, int, int, int, int, int); -+void dbg_msg (register char *); -+void dohelp (); -+void search (register int); -+int arrow (register int, register int*, register int *); -+void outstr (char *); -+void outch (register char); - - /* set up for calls to outstr and errmsg, etc, */ - /* by use of sprintf to fill outbuf */ -@@ -190,7 +199,7 @@ - #ifdef MOD_HAX - #else /* use original code... */ - /* plus some more for restoring terminal function */ -- struct termio asis, aswas; -+ struct termios asis, aswas; - #endif /* MOD_HAX */ - - /*S main - control all the work from here */ -@@ -202,6 +211,7 @@ - * - *********************************************************************/ - /*E*/ -+int - main (argc, argv) - int argc; - char *argv[]; -@@ -210,12 +220,10 @@ - extern WINDOW *newwin (); - - register char *cp; /* general purpose char ptr */ -- extern char *gets (); /* get string from stdin */ - char m = '\017'; /* mask for hex edit */ - char response[512]; /* general purpose buffer */ - int z; /* character read in */ - -- int breakp (); /* signal trapping function */ - int c; /* current screen column */ - int change = 0; /* true if cmd line option toggled */ - int fid; /* file descriptor */ -@@ -234,8 +242,7 @@ - extern char *optarg; /* getopt pointer to opt arg */ - - extern long getnum (); -- extern char *instr (); /* get a string from the cmd line */ -- extern int reset (); /* exit function - reset terminal */ -+ extern char *myinstr (); /* get a string from the cmd line */ - - /* ------------------------------------------------------------ */ - /* set up signal handling */ -@@ -333,19 +340,27 @@ - alphawin = subwin (stdscr, 16, 16, 4, 57); - keypad (alphawin, TRUE); - errwin = subwin (stdscr, 1, 80, 23, 0); -+ if (errwin == NULL) -+ errwin = stdscr; -+ if (hexwin == NULL || alphawin == NULL) -+ { -+ fprintf(stderr, "Can't create all necessary curses windows.\n"); -+ reset (0); -+ exit (2); -+ } - - #ifdef MOD_HAX - /* This is not exactly what the original code does, - but it's good enough. -r$ */ - raw(); - #else /* use original code... */ -- ioctl (0, TCGETA, &asis); -+ tcgetattr (0, &asis); - aswas = asis; /* save termio stuff for later restore */ - asis.c_cc[VINTR] = '\0'; - asis.c_iflag &= ~IXON; - asis.c_iflag &= ~IXOFF; - asis.c_iflag &= ~IXANY; -- ioctl (0, TCSETA, &asis); -+ tcsetattr (0, TCSANOW, &asis); - #endif /* MOD_HAX */ - } - -@@ -398,7 +413,7 @@ - { - position = lseek (fid, ((long )recno) * 256, 0); - -- if ((bytes = bread (fid, record, 256, block)) < 0) -+ if ((bytes = bread (fid, (char *)record, 256, block)) < 0) - { - sprintf(outbuf, "error on reading file %s", filename); - errmsg (outbuf, SLEEP_TIME); -@@ -478,7 +493,9 @@ - } - pbrk = 0; - fprintf (stderr, "\007"); -- gets (response); -+ fgets (response, 512, stdin); -+ if ((cp = strchr (response, '\n'))) -+ *cp = 0; - - if (pbrk) status = EOF; - } -@@ -617,7 +634,7 @@ - - case '\006': /* new file (^F) */ - close (fid); -- fid = ckfile (cp = instr (), &size); -+ fid = ckfile (cp = myinstr (), &size); - if (fid < 0) - { - fid = ckfile (filename, &size); -@@ -832,7 +849,8 @@ - touchwin (alphawin); - wrefresh (alphawin); - -- while ((z = wgetch (alphawin)) != DEL) -+ while ((z = wgetch (alphawin)) != KEY_DC && -+ z != KEY_BACKSPACE) - { - if (!arrow (z, &r, &c)) - { -@@ -902,7 +920,8 @@ - touchwin (hexwin); - wrefresh (hexwin); - -- while ((z = wgetch (hexwin)) != DEL) -+ while ((z = wgetch (hexwin)) != KEY_DC -+ && z != KEY_BACKSPACE) - { - if (!arrow (z, &r, &c)) - { -@@ -1083,21 +1102,9 @@ - /*E*/ - /*checked typing of parameters as declared in fucntion */ - /* versus declarations at call */ --show (bytes, record, filename, size, recno, position, -- m,reclen, dump, ebcdic, swab_opt, block, honly) --int bytes; --char record[16][16]; --char *filename; --long size; --int recno; --long position; --char m; --int reclen; --int dump; --int ebcdic; --int swab_opt; --int block; --int honly; -+void -+show (int bytes, char record[16][16], char *filename, long size, int recno, long position, -+ char m, int reclen, int dump, int ebcdic, int swab_opt, int block, int honly) - { - int i; - int j; -@@ -1281,7 +1288,7 @@ - /*S breakp - set pbrk on interrupt */ - /*H breakp */ - /*E*/ --int breakp (i) -+void breakp (i) - int i; - { - int s; -@@ -1448,6 +1455,7 @@ - /*S ckfile - check on existence, accessibility, and type of file */ - /*H ckfile */ - /*E*/ -+int - ckfile (filename, sizep) - char *filename; - long *sizep; -@@ -1515,6 +1523,7 @@ - /*S dohelp - display help text */ - /*H dohelp */ - /*E*/ -+void - dohelp () - { - static char *helptxt[] = { -@@ -1592,6 +1601,7 @@ - /*S reset - reset terminal to original state */ - /*H reset */ - /*E*/ -+void - reset (sig) - int sig; - { -@@ -1600,7 +1610,7 @@ - move (23, 0); - refresh (); - #ifndef MOD_HAX -- ioctl (0, TCSETA, &aswas); -+ tcsetattr (0, TCSANOW, &aswas); - #endif - endwin (); - } -@@ -1610,17 +1620,17 @@ - fprintf (stderr, "killed with signal %d\n", sig); - exit (sig); - } -- return (0); - } - /*S arrow - determine if current character is a cursor control key */ - /*H arrow */ - /*E*/ -+int - arrow (k, r, c) - register int k; - register int *r; - register int *c; - { -- register ret = 1; -+ register int ret = 1; - - /* watch out for conflict of VI_* amd KEY_* definitions */ - if (k == KEY_UP || k == VI_UP) -@@ -1673,6 +1683,7 @@ - /*S dbg_msg - print a debug message */ - /*H dbg_msg */ - /*E*/ -+void - dbg_msg (msg) - register char *msg; - { -@@ -1683,11 +1694,11 @@ - - return; - } --/*S instr - get a character string from the terminal */ --/*H instr */ -+/*S myinstr - get a character string from the terminal */ -+/*H myinstr */ - /*E*/ - char * --instr () -+myinstr () - { - static char buf[512]; - -@@ -1815,6 +1826,7 @@ - /*S search - look for an ascii string in the file */ - /*H search */ - /*E*/ -+void - search (fid) - register int fid; - { -@@ -1827,13 +1839,13 @@ - register int matched = 0; - register int srch_len; - -- register char *cp = instr (); -+ register char *cp = myinstr (); - register char *rp; - - int row, col; - - srch_len = strlen (cp); -- copyrec (record, lrecord, sizeof record); -+ copyrec ((char *)record, lrecord, sizeof record); - lrecord[256] = '\0'; - - pbrk = 0; -@@ -1875,7 +1887,7 @@ - { - recno = currec; - stay = 0; -- copyrec (record, unch_rec, sizeof record); -+ copyrec ((char *)record, (char *)unch_rec, sizeof record); - werase (errwin); - touchwin (errwin); - wrefresh (errwin); -@@ -1891,6 +1903,7 @@ - } - /* simplified call to errmsg(), by using sprintf to load format */ - /* sleep_time is not implemented and awaits cleaning up of the signals (?) */ -+void - errmsg (fmt, sleep_time) - unsigned sleep_time; - char *fmt; -@@ -1911,7 +1924,7 @@ - } - else - { -- fprintf (stderr, fmt); -+ fprintf (stderr, "%s", fmt); - fprintf (stderr, "\n"); - } - /* signal problem ?? if sleep called -@@ -1921,16 +1934,17 @@ - return; - } - /* simplified call to outstr(), by using sprintf to load format */ -+void - outstr (fmt) - char *fmt; - { -- if (dump) printf (fmt); -- else printw (fmt); -+ if (dump) printf ("%s", fmt); -+ else printw ("%s", fmt); - - return; - } --outch (ch) --register char ch; -+void -+outch (register char ch) - { - if (dump) putchar (ch); - else addch (ch); diff --git a/editors/bpatch/files/patch-bpatch.c b/editors/bpatch/files/patch-bpatch.c new file mode 100644 index 000000000000..5b2ad8225f32 --- /dev/null +++ b/editors/bpatch/files/patch-bpatch.c @@ -0,0 +1,347 @@ +--- bpatch.c.orig 1990-01-17 15:33:33.000000000 +0100 ++++ bpatch.c 2012-11-30 15:20:18.000000000 +0100 +@@ -90,10 +90,15 @@ + /*E*/ + /*S includes, globals, and defines */ + /*Page Eject*/ +-#include ++#include + #include + #include + #include ++#include ++#include ++#include ++#include ++#include + #include + #include + +@@ -103,14 +108,18 @@ + void icc (); + void copyrec (); + void schwapp (); +- +-/* added declarations, mostly for cleanliness */ +-extern long lseek(); +-extern long atol(); +-extern char *strncpy(); +-extern void exit(); +-extern unsigned sleep(); /* signal problems ??? if sleep called */ +-extern void perror(); ++void breakp (); ++void reset (); ++int ckfile (char *, long *); ++int bread (int, char *, int, int); ++void errmsg (char *, unsigned); ++void show (int, char[16][16], char *, long, int, long, char, int, int, int, int, int, int); ++void dbg_msg (register char *); ++void dohelp (); ++void search (register int); ++int arrow (register int, register int*, register int *); ++void outstr (char *); ++void outch (register char); + + /* set up for calls to outstr and errmsg, etc, */ + /* by use of sprintf to fill outbuf */ +@@ -190,7 +199,7 @@ + #ifdef MOD_HAX + #else /* use original code... */ + /* plus some more for restoring terminal function */ +- struct termio asis, aswas; ++ struct termios asis, aswas; + #endif /* MOD_HAX */ + + /*S main - control all the work from here */ +@@ -202,6 +211,7 @@ + * + *********************************************************************/ + /*E*/ ++int + main (argc, argv) + int argc; + char *argv[]; +@@ -210,12 +220,10 @@ + extern WINDOW *newwin (); + + register char *cp; /* general purpose char ptr */ +- extern char *gets (); /* get string from stdin */ + char m = '\017'; /* mask for hex edit */ + char response[512]; /* general purpose buffer */ + int z; /* character read in */ + +- int breakp (); /* signal trapping function */ + int c; /* current screen column */ + int change = 0; /* true if cmd line option toggled */ + int fid; /* file descriptor */ +@@ -234,8 +242,7 @@ + extern char *optarg; /* getopt pointer to opt arg */ + + extern long getnum (); +- extern char *instr (); /* get a string from the cmd line */ +- extern int reset (); /* exit function - reset terminal */ ++ extern char *myinstr (); /* get a string from the cmd line */ + + /* ------------------------------------------------------------ */ + /* set up signal handling */ +@@ -333,19 +340,27 @@ + alphawin = subwin (stdscr, 16, 16, 4, 57); + keypad (alphawin, TRUE); + errwin = subwin (stdscr, 1, 80, 23, 0); ++ if (errwin == NULL) ++ errwin = stdscr; ++ if (hexwin == NULL || alphawin == NULL) ++ { ++ fprintf(stderr, "Can't create all necessary curses windows.\n"); ++ reset (0); ++ exit (2); ++ } + + #ifdef MOD_HAX + /* This is not exactly what the original code does, + but it's good enough. -r$ */ + raw(); + #else /* use original code... */ +- ioctl (0, TCGETA, &asis); ++ tcgetattr (0, &asis); + aswas = asis; /* save termio stuff for later restore */ + asis.c_cc[VINTR] = '\0'; + asis.c_iflag &= ~IXON; + asis.c_iflag &= ~IXOFF; + asis.c_iflag &= ~IXANY; +- ioctl (0, TCSETA, &asis); ++ tcsetattr (0, TCSANOW, &asis); + #endif /* MOD_HAX */ + } + +@@ -398,7 +413,7 @@ + { + position = lseek (fid, ((long )recno) * 256, 0); + +- if ((bytes = bread (fid, record, 256, block)) < 0) ++ if ((bytes = bread (fid, (char *)record, 256, block)) < 0) + { + sprintf(outbuf, "error on reading file %s", filename); + errmsg (outbuf, SLEEP_TIME); +@@ -478,7 +493,9 @@ + } + pbrk = 0; + fprintf (stderr, "\007"); +- gets (response); ++ fgets (response, 512, stdin); ++ if ((cp = strchr (response, '\n'))) ++ *cp = 0; + + if (pbrk) status = EOF; + } +@@ -617,7 +634,7 @@ + + case '\006': /* new file (^F) */ + close (fid); +- fid = ckfile (cp = instr (), &size); ++ fid = ckfile (cp = myinstr (), &size); + if (fid < 0) + { + fid = ckfile (filename, &size); +@@ -832,7 +849,8 @@ + touchwin (alphawin); + wrefresh (alphawin); + +- while ((z = wgetch (alphawin)) != DEL) ++ while ((z = wgetch (alphawin)) != KEY_DC && ++ z != KEY_BACKSPACE) + { + if (!arrow (z, &r, &c)) + { +@@ -902,7 +920,8 @@ + touchwin (hexwin); + wrefresh (hexwin); + +- while ((z = wgetch (hexwin)) != DEL) ++ while ((z = wgetch (hexwin)) != KEY_DC ++ && z != KEY_BACKSPACE) + { + if (!arrow (z, &r, &c)) + { +@@ -1083,21 +1102,9 @@ + /*E*/ + /*checked typing of parameters as declared in fucntion */ + /* versus declarations at call */ +-show (bytes, record, filename, size, recno, position, +- m,reclen, dump, ebcdic, swab_opt, block, honly) +-int bytes; +-char record[16][16]; +-char *filename; +-long size; +-int recno; +-long position; +-char m; +-int reclen; +-int dump; +-int ebcdic; +-int swab_opt; +-int block; +-int honly; ++void ++show (int bytes, char record[16][16], char *filename, long size, int recno, long position, ++ char m, int reclen, int dump, int ebcdic, int swab_opt, int block, int honly) + { + int i; + int j; +@@ -1281,7 +1288,7 @@ + /*S breakp - set pbrk on interrupt */ + /*H breakp */ + /*E*/ +-int breakp (i) ++void breakp (i) + int i; + { + int s; +@@ -1448,6 +1455,7 @@ + /*S ckfile - check on existence, accessibility, and type of file */ + /*H ckfile */ + /*E*/ ++int + ckfile (filename, sizep) + char *filename; + long *sizep; +@@ -1515,6 +1523,7 @@ + /*S dohelp - display help text */ + /*H dohelp */ + /*E*/ ++void + dohelp () + { + static char *helptxt[] = { +@@ -1592,6 +1601,7 @@ + /*S reset - reset terminal to original state */ + /*H reset */ + /*E*/ ++void + reset (sig) + int sig; + { +@@ -1600,7 +1610,7 @@ + move (23, 0); + refresh (); + #ifndef MOD_HAX +- ioctl (0, TCSETA, &aswas); ++ tcsetattr (0, TCSANOW, &aswas); + #endif + endwin (); + } +@@ -1610,17 +1620,17 @@ + fprintf (stderr, "killed with signal %d\n", sig); + exit (sig); + } +- return (0); + } + /*S arrow - determine if current character is a cursor control key */ + /*H arrow */ + /*E*/ ++int + arrow (k, r, c) + register int k; + register int *r; + register int *c; + { +- register ret = 1; ++ register int ret = 1; + + /* watch out for conflict of VI_* amd KEY_* definitions */ + if (k == KEY_UP || k == VI_UP) +@@ -1673,6 +1683,7 @@ + /*S dbg_msg - print a debug message */ + /*H dbg_msg */ + /*E*/ ++void + dbg_msg (msg) + register char *msg; + { +@@ -1683,11 +1694,11 @@ + + return; + } +-/*S instr - get a character string from the terminal */ +-/*H instr */ ++/*S myinstr - get a character string from the terminal */ ++/*H myinstr */ + /*E*/ + char * +-instr () ++myinstr () + { + static char buf[512]; + +@@ -1815,6 +1826,7 @@ + /*S search - look for an ascii string in the file */ + /*H search */ + /*E*/ ++void + search (fid) + register int fid; + { +@@ -1827,13 +1839,13 @@ + register int matched = 0; + register int srch_len; + +- register char *cp = instr (); ++ register char *cp = myinstr (); + register char *rp; + + int row, col; + + srch_len = strlen (cp); +- copyrec (record, lrecord, sizeof record); ++ copyrec ((char *)record, lrecord, sizeof record); + lrecord[256] = '\0'; + + pbrk = 0; +@@ -1875,7 +1887,7 @@ + { + recno = currec; + stay = 0; +- copyrec (record, unch_rec, sizeof record); ++ copyrec ((char *)record, (char *)unch_rec, sizeof record); + werase (errwin); + touchwin (errwin); + wrefresh (errwin); +@@ -1891,6 +1903,7 @@ + } + /* simplified call to errmsg(), by using sprintf to load format */ + /* sleep_time is not implemented and awaits cleaning up of the signals (?) */ ++void + errmsg (fmt, sleep_time) + unsigned sleep_time; + char *fmt; +@@ -1911,7 +1924,7 @@ + } + else + { +- fprintf (stderr, fmt); ++ fprintf (stderr, "%s", fmt); + fprintf (stderr, "\n"); + } + /* signal problem ?? if sleep called +@@ -1921,16 +1934,17 @@ + return; + } + /* simplified call to outstr(), by using sprintf to load format */ ++void + outstr (fmt) + char *fmt; + { +- if (dump) printf (fmt); +- else printw (fmt); ++ if (dump) printf ("%s", fmt); ++ else printw ("%s", fmt); + + return; + } +-outch (ch) +-register char ch; ++void ++outch (register char ch) + { + if (dump) putchar (ch); + else addch (ch); diff --git a/editors/bvi/files/patch-ab b/editors/bvi/files/patch-ab deleted file mode 100644 index 2503c09c8149..000000000000 --- a/editors/bvi/files/patch-ab +++ /dev/null @@ -1,11 +0,0 @@ ---- io.c.orig Tue Nov 2 04:44:10 1999 -+++ io.c Fri Nov 26 18:06:58 1999 -@@ -119,7 +119,7 @@ - } else if (S_ISBLK(buf.st_mode)) { - filemode = BLOCK_SPECIAL; - } else if (S_ISREG(buf.st_mode)) { -- if ((unsigned long)buf.st_size > (unsigned long)SIZE_T_MAX) { -+ if (buf.st_size > SIZE_T_MAX) { - move(maxy, 0); - endwin(); - printf("File too large\n"); diff --git a/editors/bvi/files/patch-io.c b/editors/bvi/files/patch-io.c new file mode 100644 index 000000000000..2503c09c8149 --- /dev/null +++ b/editors/bvi/files/patch-io.c @@ -0,0 +1,11 @@ +--- io.c.orig Tue Nov 2 04:44:10 1999 ++++ io.c Fri Nov 26 18:06:58 1999 +@@ -119,7 +119,7 @@ + } else if (S_ISBLK(buf.st_mode)) { + filemode = BLOCK_SPECIAL; + } else if (S_ISREG(buf.st_mode)) { +- if ((unsigned long)buf.st_size > (unsigned long)SIZE_T_MAX) { ++ if (buf.st_size > SIZE_T_MAX) { + move(maxy, 0); + endwin(); + printf("File too large\n"); diff --git a/editors/flim/files/patch-FLIM-CFG b/editors/flim/files/patch-FLIM-CFG new file mode 100644 index 000000000000..450d2b6f8af6 --- /dev/null +++ b/editors/flim/files/patch-FLIM-CFG @@ -0,0 +1,11 @@ +--- FLIM-CFG.orig Tue Sep 15 15:26:08 1998 ++++ FLIM-CFG Sun May 9 01:33:26 1999 +@@ -8,6 +8,8 @@ + + (add-to-list 'load-path + (expand-file-name "../../site-lisp/apel" data-directory)) ++(add-to-list 'load-path ++ (expand-file-name "../site-lisp/emu" data-directory)) + + (if (boundp 'LISPDIR) + (progn diff --git a/editors/flim/files/patch-aa b/editors/flim/files/patch-aa deleted file mode 100644 index 450d2b6f8af6..000000000000 --- a/editors/flim/files/patch-aa +++ /dev/null @@ -1,11 +0,0 @@ ---- FLIM-CFG.orig Tue Sep 15 15:26:08 1998 -+++ FLIM-CFG Sun May 9 01:33:26 1999 -@@ -8,6 +8,8 @@ - - (add-to-list 'load-path - (expand-file-name "../../site-lisp/apel" data-directory)) -+(add-to-list 'load-path -+ (expand-file-name "../site-lisp/emu" data-directory)) - - (if (boundp 'LISPDIR) - (progn diff --git a/editors/flim/files/patch-ac b/editors/flim/files/patch-ac deleted file mode 100644 index 5c237662fd29..000000000000 --- a/editors/flim/files/patch-ac +++ /dev/null @@ -1,15 +0,0 @@ ---- ./mime-en.texi.orig 2002-10-08 15:50:05.000000000 +0000 -+++ ./mime-en.texi 2014-06-28 06:58:47.000000000 +0000 -@@ -1,7 +1,11 @@ - \input texinfo.tex - @c Generated automatically from mime-en.sgml by sinfo 3.7. - @setfilename mime-en.info --@settitle{FLIM 1.14 Reference Manual about MIME Features} -+@settitle FLIM 1.14 Reference Manual about MIME Features -+@dircategory The Emacs editor and associated tools -+@direntry -+* mime-en: (mime-en). MIME features for GNU Emacs. (English) -+@end direntry - @titlepage - @title FLIM 1.14 Reference Manual about MIME Features - @author MORIOKA Tomohiko diff --git a/editors/flim/files/patch-ad b/editors/flim/files/patch-ad deleted file mode 100644 index 25bba1ca109f..000000000000 --- a/editors/flim/files/patch-ad +++ /dev/null @@ -1,15 +0,0 @@ ---- ./mime-ja.texi.orig 2002-10-08 15:50:05.000000000 +0000 -+++ ./mime-ja.texi 2014-06-28 06:59:01.000000000 +0000 -@@ -1,7 +1,11 @@ - \input texinfo.tex - @c Generated automatically from mime-ja.sgml by sinfo 3.7. - @setfilename mime-ja.info --@settitle{FLIM 1.14 MIME 機能説明書} -+@settitle FLIM 1.14 MIME 機能説明書 -+@dircategory The Emacs editor and associated tools -+@direntry -+* mime-ja: (mime-ja). MIME features for GNU Emacs. (Japanese) -+@end direntry - @titlepage - @title FLIM 1.14 MIME 機能説明書 - @author 守岡 知彦 diff --git a/editors/flim/files/patch-mime-en.texi b/editors/flim/files/patch-mime-en.texi new file mode 100644 index 000000000000..5c237662fd29 --- /dev/null +++ b/editors/flim/files/patch-mime-en.texi @@ -0,0 +1,15 @@ +--- ./mime-en.texi.orig 2002-10-08 15:50:05.000000000 +0000 ++++ ./mime-en.texi 2014-06-28 06:58:47.000000000 +0000 +@@ -1,7 +1,11 @@ + \input texinfo.tex + @c Generated automatically from mime-en.sgml by sinfo 3.7. + @setfilename mime-en.info +-@settitle{FLIM 1.14 Reference Manual about MIME Features} ++@settitle FLIM 1.14 Reference Manual about MIME Features ++@dircategory The Emacs editor and associated tools ++@direntry ++* mime-en: (mime-en). MIME features for GNU Emacs. (English) ++@end direntry + @titlepage + @title FLIM 1.14 Reference Manual about MIME Features + @author MORIOKA Tomohiko diff --git a/editors/flim/files/patch-mime-ja.texi b/editors/flim/files/patch-mime-ja.texi new file mode 100644 index 000000000000..25bba1ca109f --- /dev/null +++ b/editors/flim/files/patch-mime-ja.texi @@ -0,0 +1,15 @@ +--- ./mime-ja.texi.orig 2002-10-08 15:50:05.000000000 +0000 ++++ ./mime-ja.texi 2014-06-28 06:59:01.000000000 +0000 +@@ -1,7 +1,11 @@ + \input texinfo.tex + @c Generated automatically from mime-ja.sgml by sinfo 3.7. + @setfilename mime-ja.info +-@settitle{FLIM 1.14 MIME 機能説明書} ++@settitle FLIM 1.14 MIME 機能説明書 ++@dircategory The Emacs editor and associated tools ++@direntry ++* mime-ja: (mime-ja). MIME features for GNU Emacs. (Japanese) ++@end direntry + @titlepage + @title FLIM 1.14 MIME 機能説明書 + @author 守岡 知彦 diff --git a/editors/gnotepad+/files/patch-Makefile.in b/editors/gnotepad+/files/patch-Makefile.in new file mode 100644 index 000000000000..8a6d751bb623 --- /dev/null +++ b/editors/gnotepad+/files/patch-Makefile.in @@ -0,0 +1,30 @@ +--- Makefile.in.orig Wed May 10 09:11:34 2000 ++++ Makefile.in Mon Jun 5 20:59:43 2000 +@@ -97,8 +97,8 @@ + + CLEANFILES = *~ .deps/* + +-Applicationsdir = $(datadir)/gnome/apps/Applications +-Applications_DATA = gnotepad+.desktop gnotepad+.spec ++@HAVE_GNOME_TRUE@Applicationsdir = $(datadir)/gnome/apps/Applications ++@HAVE_GNOME_TRUE@Applications_DATA = gnotepad+.desktop gnotepad+.spec + + SUBDIRS = docs po intl src + +@@ -217,7 +217,6 @@ + + install-ApplicationsDATA: $(Applications_DATA) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(DESTDIR)$(Applicationsdir) + @list='$(Applications_DATA)'; for p in $$list; do \ + if test -f $(srcdir)/$$p; then \ + echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(Applicationsdir)/$$p"; \ +@@ -431,7 +430,7 @@ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install + installdirs: installdirs-recursive + installdirs-am: +- $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(Applicationsdir) \ ++ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 \ + $(DESTDIR)$(pkgdatadir) + + diff --git a/editors/gnotepad+/files/patch-aa b/editors/gnotepad+/files/patch-aa deleted file mode 100644 index 8a6d751bb623..000000000000 --- a/editors/gnotepad+/files/patch-aa +++ /dev/null @@ -1,30 +0,0 @@ ---- Makefile.in.orig Wed May 10 09:11:34 2000 -+++ Makefile.in Mon Jun 5 20:59:43 2000 -@@ -97,8 +97,8 @@ - - CLEANFILES = *~ .deps/* - --Applicationsdir = $(datadir)/gnome/apps/Applications --Applications_DATA = gnotepad+.desktop gnotepad+.spec -+@HAVE_GNOME_TRUE@Applicationsdir = $(datadir)/gnome/apps/Applications -+@HAVE_GNOME_TRUE@Applications_DATA = gnotepad+.desktop gnotepad+.spec - - SUBDIRS = docs po intl src - -@@ -217,7 +217,6 @@ - - install-ApplicationsDATA: $(Applications_DATA) - @$(NORMAL_INSTALL) -- $(mkinstalldirs) $(DESTDIR)$(Applicationsdir) - @list='$(Applications_DATA)'; for p in $$list; do \ - if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(Applicationsdir)/$$p"; \ -@@ -431,7 +430,7 @@ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install - installdirs: installdirs-recursive - installdirs-am: -- $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(Applicationsdir) \ -+ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 \ - $(DESTDIR)$(pkgdatadir) - - diff --git a/editors/nedit/files/patch-Makefile b/editors/nedit/files/patch-Makefile new file mode 100644 index 000000000000..f2e9fc0158cb --- /dev/null +++ b/editors/nedit/files/patch-Makefile @@ -0,0 +1,15 @@ +--- Makefile.orig 2004-10-01 04:51:05.000000000 +0800 ++++ Makefile 2014-06-15 11:03:09.564113068 +0800 +@@ -44,6 +44,12 @@ docs: + # that doesn't work since we require the user to specify the target. More + # thought is needed + ++install:: ++ (cd source; make -f Makefile.freebsd install) ++ ${INSTALL} ${COPY} -m 644 doc/nedit.man $(DESTDIR)${PREFIX}/man/man1/nedit.1 ++ ${INSTALL} ${COPY} -m 644 doc/nc.man $(DESTDIR)${PREFIX}/man/man1/nclient.1 ++ ${INSTALL} ${COPY} -m 644 NEdit.ad $(DESTDIR)${LOCALBASE}/lib/X11/app-defaults/NEdit.ad ++ + clean: + (cd util; $(MAKE) -f Makefile.common clean) + (cd Xlt; $(MAKE) -f Makefile.common clean) diff --git a/editors/nedit/files/patch-aa b/editors/nedit/files/patch-aa deleted file mode 100644 index f2e9fc0158cb..000000000000 --- a/editors/nedit/files/patch-aa +++ /dev/null @@ -1,15 +0,0 @@ ---- Makefile.orig 2004-10-01 04:51:05.000000000 +0800 -+++ Makefile 2014-06-15 11:03:09.564113068 +0800 -@@ -44,6 +44,12 @@ docs: - # that doesn't work since we require the user to specify the target. More - # thought is needed - -+install:: -+ (cd source; make -f Makefile.freebsd install) -+ ${INSTALL} ${COPY} -m 644 doc/nedit.man $(DESTDIR)${PREFIX}/man/man1/nedit.1 -+ ${INSTALL} ${COPY} -m 644 doc/nc.man $(DESTDIR)${PREFIX}/man/man1/nclient.1 -+ ${INSTALL} ${COPY} -m 644 NEdit.ad $(DESTDIR)${LOCALBASE}/lib/X11/app-defaults/NEdit.ad -+ - clean: - (cd util; $(MAKE) -f Makefile.common clean) - (cd Xlt; $(MAKE) -f Makefile.common clean) diff --git a/editors/nedit/files/patch-ab b/editors/nedit/files/patch-ab deleted file mode 100644 index f10542e16308..000000000000 --- a/editors/nedit/files/patch-ab +++ /dev/null @@ -1,13 +0,0 @@ ---- source/Makefile.common.orig 2004-03-21 22:25:56.000000000 +0800 -+++ source/Makefile.common 2014-06-15 11:03:55.335101520 +0800 -@@ -28,6 +28,10 @@ nedit: $(OBJS) ../util/libNUtil.a $(XMLL - nc: nc.o server_common.o ../util/libNUtil.a - $(CC) $(CFLAGS) nc.o server_common.o ../util/libNUtil.a $(LIBS) -o $@ - -+install: nedit nc -+ ${INSTALL} ${COPY} ${STRIP} nedit $(DESTDIR)${PREFIX}/bin -+ ${INSTALL} ${COPY} ${STRIP} nc $(DESTDIR)${PREFIX}/bin/nclient -+ - help.o: help.c - $(CC) $(CFLAGS) $(BIGGER_STRINGS) -c help.c -o $@ - diff --git a/editors/nedit/files/patch-ac b/editors/nedit/files/patch-ac deleted file mode 100644 index ee6893bd2899..000000000000 --- a/editors/nedit/files/patch-ac +++ /dev/null @@ -1,22 +0,0 @@ ---- makefiles/Makefile.freebsd.orig Sun Sep 28 15:03:10 2003 -+++ makefiles/Makefile.freebsd Sat Feb 7 15:00:18 2004 -@@ -1,6 +1,6 @@ - # $Id: Makefile.freebsd,v 1.5.2.1 2003/09/28 15:03:10 edg Exp $ --CC=cc --AR=ar -+CC?=cc -+AR?=ar - - # For editres, add -DEDITRES to CFLAGS and -lXmu to LIBS - # -@@ -10,8 +10,8 @@ - # To test if the Motif library exports the runtime version - # add -DHAVE__XMVERSIONSTRING to CFLAGS - # --CFLAGS=-O -I${PREFIX}/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DUSE_XMIM --LIBS= ${MOTIFLIB} -L${PREFIX}/lib -lm -lXpm -lXext -lXt -lSM -lICE -lX11 -+CFLAGS+=-O -I${LOCALBASE}/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DUSE_XMIM -DBUILD_UNTESTED_NEDIT -+LIBS+= ${MOTIFLIB} -L${LOCALBASE}/lib -lm -lXpm -lXext -lXt -lSM -lICE -lX11 - - include Makefile.common - diff --git a/editors/nedit/files/patch-ad b/editors/nedit/files/patch-ad deleted file mode 100644 index 12cdc67f5583..000000000000 --- a/editors/nedit/files/patch-ad +++ /dev/null @@ -1,12 +0,0 @@ ---- doc/nc.man.orig Thu Nov 20 18:40:13 2003 -+++ doc/nc.man Sat Feb 7 14:54:18 2004 -@@ -285,6 +285,9 @@ - .PP - For more information see NEdit's online help, or \fInedit.doc\fR in the NEdit - distribution kit. -+.PP -+In FreeBSD, \fInc\fR is installed as \fInclient\fR so it does not -+conflict with the \fInetcat\fR port which also installs an \fInc\fR. - .SH "SEE ALSO" - .IX Header "SEE ALSO" - \&\fInedit\fR\|(1), X(1), \fImwm\fR\|(1), \fIctags\fR\|(1), \fIetags\fR\|(1) diff --git a/editors/nedit/files/patch-doc_nc.man b/editors/nedit/files/patch-doc_nc.man new file mode 100644 index 000000000000..12cdc67f5583 --- /dev/null +++ b/editors/nedit/files/patch-doc_nc.man @@ -0,0 +1,12 @@ +--- doc/nc.man.orig Thu Nov 20 18:40:13 2003 ++++ doc/nc.man Sat Feb 7 14:54:18 2004 +@@ -285,6 +285,9 @@ + .PP + For more information see NEdit's online help, or \fInedit.doc\fR in the NEdit + distribution kit. ++.PP ++In FreeBSD, \fInc\fR is installed as \fInclient\fR so it does not ++conflict with the \fInetcat\fR port which also installs an \fInc\fR. + .SH "SEE ALSO" + .IX Header "SEE ALSO" + \&\fInedit\fR\|(1), X(1), \fImwm\fR\|(1), \fIctags\fR\|(1), \fIetags\fR\|(1) diff --git a/editors/nedit/files/patch-makefiles_Makefile.freebsd b/editors/nedit/files/patch-makefiles_Makefile.freebsd new file mode 100644 index 000000000000..ee6893bd2899 --- /dev/null +++ b/editors/nedit/files/patch-makefiles_Makefile.freebsd @@ -0,0 +1,22 @@ +--- makefiles/Makefile.freebsd.orig Sun Sep 28 15:03:10 2003 ++++ makefiles/Makefile.freebsd Sat Feb 7 15:00:18 2004 +@@ -1,6 +1,6 @@ + # $Id: Makefile.freebsd,v 1.5.2.1 2003/09/28 15:03:10 edg Exp $ +-CC=cc +-AR=ar ++CC?=cc ++AR?=ar + + # For editres, add -DEDITRES to CFLAGS and -lXmu to LIBS + # +@@ -10,8 +10,8 @@ + # To test if the Motif library exports the runtime version + # add -DHAVE__XMVERSIONSTRING to CFLAGS + # +-CFLAGS=-O -I${PREFIX}/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DUSE_XMIM +-LIBS= ${MOTIFLIB} -L${PREFIX}/lib -lm -lXpm -lXext -lXt -lSM -lICE -lX11 ++CFLAGS+=-O -I${LOCALBASE}/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DUSE_XMIM -DBUILD_UNTESTED_NEDIT ++LIBS+= ${MOTIFLIB} -L${LOCALBASE}/lib -lm -lXpm -lXext -lXt -lSM -lICE -lX11 + + include Makefile.common + diff --git a/editors/nedit/files/patch-source_Makefile.common b/editors/nedit/files/patch-source_Makefile.common new file mode 100644 index 000000000000..f10542e16308 --- /dev/null +++ b/editors/nedit/files/patch-source_Makefile.common @@ -0,0 +1,13 @@ +--- source/Makefile.common.orig 2004-03-21 22:25:56.000000000 +0800 ++++ source/Makefile.common 2014-06-15 11:03:55.335101520 +0800 +@@ -28,6 +28,10 @@ nedit: $(OBJS) ../util/libNUtil.a $(XMLL + nc: nc.o server_common.o ../util/libNUtil.a + $(CC) $(CFLAGS) nc.o server_common.o ../util/libNUtil.a $(LIBS) -o $@ + ++install: nedit nc ++ ${INSTALL} ${COPY} ${STRIP} nedit $(DESTDIR)${PREFIX}/bin ++ ${INSTALL} ${COPY} ${STRIP} nc $(DESTDIR)${PREFIX}/bin/nclient ++ + help.o: help.c + $(CC) $(CFLAGS) $(BIGGER_STRINGS) -c help.c -o $@ + diff --git a/editors/nvi-m17n/files/patch-ac b/editors/nvi-m17n/files/patch-ac deleted file mode 100644 index 283366a97955..000000000000 --- a/editors/nvi-m17n/files/patch-ac +++ /dev/null @@ -1,51 +0,0 @@ ---- ../include/sys/queue.h.old Wed Jan 10 07:16:01 2001 -+++ ../include/sys/queue.h Wed Jan 10 07:17:02 2001 -@@ -33,8 +33,10 @@ - * @(#)queue.h 8.5 (Berkeley) 8/20/94 - */ - --#ifndef _SYS_QUEUE_H_ --#define _SYS_QUEUE_H_ -+#ifndef _SYS_QUEUE_HACK_H_ -+#define _SYS_QUEUE_HACK_H_ -+ -+#include - - /* - * This file defines three types of data structures: lists, tail queues, -@@ -65,6 +67,7 @@ - * For details on the use of these macros, see the queue(3) manual page. - */ - -+#ifndef LIST_HEAD - /* - * List definitions. - */ -@@ -114,7 +117,9 @@ - (elm)->field.le_prev; \ - *(elm)->field.le_prev = (elm)->field.le_next; \ - } -+#endif /* LIST_HEAD */ - -+#ifndef TAILQ_HEAD - /* - * Tail queue definitions. - */ -@@ -180,7 +185,9 @@ - (head)->tqh_last = (elm)->field.tqe_prev; \ - *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ - } -+#endif /* TAILQ_HEAD */ - -+#ifndef CIRCLEQ_HEAD - /* - * Circular queue definitions. - */ -@@ -256,4 +263,6 @@ - (elm)->field.cqe_prev->field.cqe_next = \ - (elm)->field.cqe_next; \ - } --#endif /* !_SYS_QUEUE_H_ */ -+#endif /* CIRCLEQ_HEAD */ -+ -+#endif /* !_SYS_QUEUE_HACK_H_ */ diff --git a/editors/nvi-m17n/files/patch-include_sys_queue.h b/editors/nvi-m17n/files/patch-include_sys_queue.h new file mode 100644 index 000000000000..283366a97955 --- /dev/null +++ b/editors/nvi-m17n/files/patch-include_sys_queue.h @@ -0,0 +1,51 @@ +--- ../include/sys/queue.h.old Wed Jan 10 07:16:01 2001 ++++ ../include/sys/queue.h Wed Jan 10 07:17:02 2001 +@@ -33,8 +33,10 @@ + * @(#)queue.h 8.5 (Berkeley) 8/20/94 + */ + +-#ifndef _SYS_QUEUE_H_ +-#define _SYS_QUEUE_H_ ++#ifndef _SYS_QUEUE_HACK_H_ ++#define _SYS_QUEUE_HACK_H_ ++ ++#include + + /* + * This file defines three types of data structures: lists, tail queues, +@@ -65,6 +67,7 @@ + * For details on the use of these macros, see the queue(3) manual page. + */ + ++#ifndef LIST_HEAD + /* + * List definitions. + */ +@@ -114,7 +117,9 @@ + (elm)->field.le_prev; \ + *(elm)->field.le_prev = (elm)->field.le_next; \ + } ++#endif /* LIST_HEAD */ + ++#ifndef TAILQ_HEAD + /* + * Tail queue definitions. + */ +@@ -180,7 +185,9 @@ + (head)->tqh_last = (elm)->field.tqe_prev; \ + *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ + } ++#endif /* TAILQ_HEAD */ + ++#ifndef CIRCLEQ_HEAD + /* + * Circular queue definitions. + */ +@@ -256,4 +263,6 @@ + (elm)->field.cqe_prev->field.cqe_next = \ + (elm)->field.cqe_next; \ + } +-#endif /* !_SYS_QUEUE_H_ */ ++#endif /* CIRCLEQ_HEAD */ ++ ++#endif /* !_SYS_QUEUE_HACK_H_ */ diff --git a/editors/semi/files/patch-SEMI-CFG b/editors/semi/files/patch-SEMI-CFG new file mode 100644 index 000000000000..2c7aa48962d6 --- /dev/null +++ b/editors/semi/files/patch-SEMI-CFG @@ -0,0 +1,11 @@ +--- SEMI-CFG.orig Wed Sep 16 15:48:58 1998 ++++ SEMI-CFG Sun May 9 21:54:02 1999 +@@ -11,6 +11,8 @@ + (add-to-list 'load-path + (expand-file-name "../../site-lisp/apel" data-directory)) + (add-to-list 'load-path ++ (expand-file-name "../site-lisp/emu" data-directory)) ++(add-to-list 'load-path + (expand-file-name "." data-directory)) + + (when (boundp 'LISPDIR) diff --git a/editors/semi/files/patch-aa b/editors/semi/files/patch-aa deleted file mode 100644 index 2634e47e7c17..000000000000 --- a/editors/semi/files/patch-aa +++ /dev/null @@ -1,14 +0,0 @@ ---- ./mime-ui-en.texi.orig 2002-10-15 06:59:21.000000000 +0000 -+++ ./mime-ui-en.texi 2014-06-29 07:49:25.000000000 +0000 -@@ -1,6 +1,10 @@ - \input texinfo.tex - @setfilename mime-ui-en.info --@settitle{SEMI 1.14 Manual} -+@settitle SEMI 1.14 Manual -+@dircategory The Emacs editor and associated tools -+@direntry -+* mime-ui-en: (mime-ui-en). MIME user interface for GNU Emacs. (English) -+@end direntry - @titlepage - @title SEMI 1.14 Manual - @author MORIOKA Tomohiko diff --git a/editors/semi/files/patch-ab b/editors/semi/files/patch-ab deleted file mode 100644 index 4e926a4d6024..000000000000 --- a/editors/semi/files/patch-ab +++ /dev/null @@ -1,14 +0,0 @@ ---- ./mime-ui-ja.texi.orig 2002-10-15 06:59:21.000000000 +0000 -+++ ./mime-ui-ja.texi 2014-06-29 07:49:58.000000000 +0000 -@@ -1,6 +1,10 @@ - \input texinfo.tex - @setfilename mime-ui-ja.info --@settitle{SEMI 1.14 説明書} -+@settitle SEMI 1.14 説明書 -+@dircategory The Emacs editor and associated tools -+@direntry -+* mime-ui-ja: (mime-ui-ja). MIME user interface for GNU Emacs. (Japanese) -+@end direntry - @titlepage - @title SEMI 1.14 説明書 - @author 守岡 知彦 diff --git a/editors/semi/files/patch-ac b/editors/semi/files/patch-ac deleted file mode 100644 index 2c7aa48962d6..000000000000 --- a/editors/semi/files/patch-ac +++ /dev/null @@ -1,11 +0,0 @@ ---- SEMI-CFG.orig Wed Sep 16 15:48:58 1998 -+++ SEMI-CFG Sun May 9 21:54:02 1999 -@@ -11,6 +11,8 @@ - (add-to-list 'load-path - (expand-file-name "../../site-lisp/apel" data-directory)) - (add-to-list 'load-path -+ (expand-file-name "../site-lisp/emu" data-directory)) -+(add-to-list 'load-path - (expand-file-name "." data-directory)) - - (when (boundp 'LISPDIR) diff --git a/editors/semi/files/patch-mime-ui-en.texi b/editors/semi/files/patch-mime-ui-en.texi new file mode 100644 index 000000000000..2634e47e7c17 --- /dev/null +++ b/editors/semi/files/patch-mime-ui-en.texi @@ -0,0 +1,14 @@ +--- ./mime-ui-en.texi.orig 2002-10-15 06:59:21.000000000 +0000 ++++ ./mime-ui-en.texi 2014-06-29 07:49:25.000000000 +0000 +@@ -1,6 +1,10 @@ + \input texinfo.tex + @setfilename mime-ui-en.info +-@settitle{SEMI 1.14 Manual} ++@settitle SEMI 1.14 Manual ++@dircategory The Emacs editor and associated tools ++@direntry ++* mime-ui-en: (mime-ui-en). MIME user interface for GNU Emacs. (English) ++@end direntry + @titlepage + @title SEMI 1.14 Manual + @author MORIOKA Tomohiko diff --git a/editors/semi/files/patch-mime-ui-ja.texi b/editors/semi/files/patch-mime-ui-ja.texi new file mode 100644 index 000000000000..4e926a4d6024 --- /dev/null +++ b/editors/semi/files/patch-mime-ui-ja.texi @@ -0,0 +1,14 @@ +--- ./mime-ui-ja.texi.orig 2002-10-15 06:59:21.000000000 +0000 ++++ ./mime-ui-ja.texi 2014-06-29 07:49:58.000000000 +0000 +@@ -1,6 +1,10 @@ + \input texinfo.tex + @setfilename mime-ui-ja.info +-@settitle{SEMI 1.14 説明書} ++@settitle SEMI 1.14 説明書 ++@dircategory The Emacs editor and associated tools ++@direntry ++* mime-ui-ja: (mime-ui-ja). MIME user interface for GNU Emacs. (Japanese) ++@end direntry + @titlepage + @title SEMI 1.14 説明書 + @author 守岡 知彦 diff --git a/editors/uemacs/files/patch-Makefile b/editors/uemacs/files/patch-Makefile new file mode 100644 index 000000000000..c99bac366539 --- /dev/null +++ b/editors/uemacs/files/patch-Makefile @@ -0,0 +1,15 @@ +--- Makefile.orig 2014-05-11 17:18:47.000000000 -0700 ++++ Makefile 2014-05-11 17:20:45.000000000 -0700 +@@ -0,0 +1,12 @@ ++# ++# simple makefile for uemacs ++# ++ ++all: ++ (cd freebsd; make emacs) ++ ++install: all ++ ${BSD_INSTALL_PROGRAM} freebsd/emacs ${DESTDIR}${PREFIX}/bin/uemacs ++ mkdir -p ${DESTDIR}${PREFIX}/share/uemacs ++ ${BSD_INSTALL_DATA} cmd/* ${DESTDIR}${PREFIX}/share/uemacs ++ mv ${DESTDIR}${PREFIX}/share/uemacs/emacs.rc ${DESTDIR}${PREFIX}/share/uemacs/.emacsrc diff --git a/editors/uemacs/files/patch-aa b/editors/uemacs/files/patch-aa deleted file mode 100644 index c99bac366539..000000000000 --- a/editors/uemacs/files/patch-aa +++ /dev/null @@ -1,15 +0,0 @@ ---- Makefile.orig 2014-05-11 17:18:47.000000000 -0700 -+++ Makefile 2014-05-11 17:20:45.000000000 -0700 -@@ -0,0 +1,12 @@ -+# -+# simple makefile for uemacs -+# -+ -+all: -+ (cd freebsd; make emacs) -+ -+install: all -+ ${BSD_INSTALL_PROGRAM} freebsd/emacs ${DESTDIR}${PREFIX}/bin/uemacs -+ mkdir -p ${DESTDIR}${PREFIX}/share/uemacs -+ ${BSD_INSTALL_DATA} cmd/* ${DESTDIR}${PREFIX}/share/uemacs -+ mv ${DESTDIR}${PREFIX}/share/uemacs/emacs.rc ${DESTDIR}${PREFIX}/share/uemacs/.emacsrc diff --git a/editors/uemacs/files/patch-ab b/editors/uemacs/files/patch-ab deleted file mode 100644 index ec8b19672881..000000000000 --- a/editors/uemacs/files/patch-ab +++ /dev/null @@ -1,1257 +0,0 @@ ---- freebsd/estruct.h.orig Wed Mar 25 14:21:05 1998 -+++ freebsd/estruct.h Wed Mar 25 14:25:34 1998 -@@ -0,0 +1,1254 @@ -+/* ESTRUCT: Structure and preprocesser defined for -+ MicroEMACS 4.00 -+ -+ (C)Copyright 1995 by Daniel Lawrence -+ written by Daniel Lawrence -+ based on code by Dave G. Conroy, -+ Steve Wilhite and George Jones -+*/ -+ -+#ifdef LATTICE -+#undef LATTICE /* don't use their definitions...use ours */ -+#endif -+#ifdef MSDOS -+#undef MSDOS -+#endif -+#ifdef WINNT -+#undef WINNT -+#endif -+#ifdef AMIGA -+#undef AMIGA -+#endif -+#ifdef EGA -+#undef EGA -+#endif -+#ifdef CTRLZ -+#undef CTRLZ -+#endif -+ -+/* Program Identification..... -+ -+ PROGNAME should always be MicroEMACS for a distribution -+ unmodified version. People using MicroEMACS as a shell -+ for other products should change this to reflect their -+ product. Macros can query this via the $progname variable -+*/ -+ -+#define PROGNAME "MicroEMACS" -+#define VERSION "4.00" -+ -+/* Machine/OS definitions */ -+/* [Set one of these!!] */ -+ -+#define AMIGA 0 /* AmigaDOS */ -+#define AOSVS 0 /* Data General AOS/VS */ -+#define AUX 0 /* Apple UNIX for Macintosh */ -+#define AIX 0 /* IBM UNIX for various machines*/ -+#define AVIION 0 /* Data General AViiON */ -+#define BSD 0 /* UNIX BSD 4.2 and ULTRIX */ -+#define FINDER 0 /* Macintosh OS */ -+#define FREEBSD 1 /* FREEBSD 386 version 2 or + */ -+#define HPUX8 0 /* HPUX HP 9000 ver 8 or less */ -+#define HPUX9 0 /* HPUX HP 9000 ver 9 */ -+#define MPE 0 /* HP MPE/XL */ -+#define MSDOS 0 /* MS-DOS */ -+#define WINNT 0 /* MS-Win NT */ -+#define OS2 0 /* Microsoft or IBM OS/2 */ -+#define SMOS 0 /* Supermax UNIX System V */ -+#define SUN 0 /* SUN v4.0 */ -+#define TOS 0 /* ST520, TOS */ -+#define USG 0 /* UNIX system V */ -+#define VMS 0 /* VAX/VMS */ -+#define WMCS 0 /* Wicat's MCS */ -+#define XENIX 0 /* IBM-PC SCO XENIX */ -+ -+/* Compiler definitions */ -+/* [Set one of these!!] */ -+#define ALCYON 0 /* ALCYON Atari ST compiler */ -+#define AZTEC 0 /* Aztec C 4.00e ONLY for the amiga now... */ -+#define DGC 0 /* Data General AOS/VS C... */ -+#define GCC 1 /* the GNU C compiler */ -+#define IC 0 /* Rational Systems Instant C */ -+#define LATTICE 0 /* Lattice 2.14 through 3.0 compilers */ -+#define MSC 0 /* MicroSoft C compile version 3 thru 7 */ -+#define MWC 0 /* Mark Williams C */ -+#define TURBO 0 /* Turbo C and Borland C++ under MSDOS */ -+#define UNIX 0 /* a standard UNIX compiler (cc) */ -+#define ZTC 0 /* Zortech C/C++ 1.02 thru 2.10 under MSDOS */ -+ -+/* Machine stack growth direction. */ -+/* [Set this to 1 if your machine stack grows UP!!!] */ -+/* data general mv/eclipse series stack grows up. */ -+/* dec vax series stack grows down... got it??? */ -+ -+#define STACK_GROWS_UP 0 -+ -+/* Debugging options */ -+#define RAMSIZE 0 /* dynamic RAM memory usage tracking */ -+#define RAMSHOW 0 /* auto dynamic RAM reporting */ -+#define RAMTRCK 0 /* send debug info to MALLOC.DAT */ -+#define DEBUG_SEARCH 0 /* pop some search info on patterns */ -+ -+/* Special keyboard/network definitions */ -+ -+#define ATKBD 0 /* AT-style keyboard with F11, F12 & grey keys */ -+#define WANGPC 0 /* WangPC - mostly escape sequences */ -+#define VT100 1 /* Handle VT100 style keypad - NOT VMS. */ -+#define KEYPAD 0 /* VMS - turn on and off application */ -+ /* keypad automatically */ -+#define XONDATA 0 /* VMS - set to force /NOTTSYNC/NOHOSTSY */ -+#define RMSIO 0 /* VMS - skip the rotten C runtime and */ -+ /* use RMS directly */ -+#define OPTMEM 0 /* VMS 5.0 and up - use a less standard */ -+ /* but more efficient memory allocator */ -+ -+/* Terminal Output definitions */ -+/* [Set one of these!!] */ -+ -+#define ANSI 0 /* ANSI escape sequences */ -+#define DASHER 0 /* DG Dasher 2xx/4xx crts */ -+#define DG10 0 /* Data General system/10 */ -+#define FMR 0 /* Fujitsu FMR series driver */ -+#define HP110 0 /* HP110 screen driver */ -+#define HP150 0 /* HP150 screen driver */ -+#define I55 0 /* IBM PS55 DOS J4.0/V */ -+#define IBMPC 0 /* IBM-PC CGA/MONO/EGA/VGA drvr */ -+#define MAC 0 /* Macintosh */ -+#define NEC 0 /* NEC-9801VM driver */ -+#define OS2NPM 0 /* OS/2 non-Presentation Mgr. */ -+#define SMG 0 /* SMG library on VMS */ -+#define ST52 0 /* Atari 520/1040ST screen */ -+#define TERMCAP 1 /* Use TERMCAP */ -+#define TIPC 0 /* TI Profesional PC driver */ -+#define VT52 0 /* VT52 terminal (Zenith). */ -+#define NTCON 0 /* Windows NT console */ -+#define XVT 0 /* XVT windowing system */ -+#define Z309 0 /* Zenith 100 PC family driver */ -+ -+/* Windowing system style (pick one) */ -+ -+#define WINDOW_TEXT 1 /* [default] Text mode */ -+#define WINDOW_MSWIN 0 /* MicroSoft Windows */ -+#define WINDOW_MSWIN32 0 /* MicroSoft Windows 32 bit API */ -+#define WINDOW_X 0 /* X/Unix */ -+ -+/* Language text options (pick one) */ -+ -+#define ENGLISH 1 /* [default] */ -+#define FRENCH 0 -+#define SPANISH 0 -+#define GERMAN 0 -+#define DUTCH 0 -+#define PLATIN 0 /* Pig Latin */ -+#define JAPAN 0 -+#define LATIN 0 /* real Latin */ -+ -+/* Configuration options */ -+ -+#define TYPEAH 1 /* type ahead causes update to be skipped */ -+#define LOGFLG 0 /* send all executed commands to EMACS.LOG */ -+#define VISMAC 0 /* update display during keyboard macros */ -+#define CTRLZ 0 /* add a ^Z at end of files under MSDOS only */ -+#define CLEAN 0 /* de-alloc memory on exit */ -+#define CALLED 0 /* is emacs a called subroutine? or stand alone */ -+ -+#define REVSTA 1 /* Status line appears in reverse video */ -+#define COLOR 1 /* color commands and windows */ -+ -+#define FILOCK 0 /* file locking under unix BSD 4.2 */ -+#define ISRCH 1 /* Incremental searches like ITS EMACS */ -+#define FLABEL 0 /* function key label code [HP150] */ -+#define CRYPT 1 /* file encryption enabled? */ -+#define MAGIC 1 /* include regular expression matching? */ -+#define MOUSE 1 /* Include routines for mouse actions */ -+#define NOISY 1 /* Use a fancy BELL if it exists */ -+#define CTAGS 1 /* include vi-like tagging? */ -+#define SPEECH 0 /* spoken EMACS, for the sight impared [not ready] */ -+#define VARARG 1 /* use varargs.h for mlwrite() */ -+ -+#if XVT -+#undef COLOR -+#define COLOR 1 /* overide this to be TRUE for XVT always */ -+#endif -+ -+/* Character set options */ -+/* [Set one of these!!] */ -+#define ASCII 1 /* always using ASCII char sequences for now */ -+#define EBCDIC 0 /* later IBM mainfraim versions will use EBCDIC */ -+ -+/* handle constant and voids properly */ -+ -+#if VMS -+#define CONST readonly -+#define VOID void -+#define NOSHARE noshare -+#else -+#if AOSVS -+#define CONST $shared $align(1) /* fake a const */ -+#define VOID -+#define NOSHARE $low32k $align(1) /* attempt to optimize read/write vars. */ -+#else -+ -+#if __STDC__ || MSC || TURBO || GCC || (AMIGA && LATTICE) -+#define CONST const -+#define VOID void -+#define NOSHARE -+#else -+#define CONST -+#if IC -+#define VOID void -+#else -+#define VOID -+#endif -+#define NOSHARE -+#endif -+ -+#endif -+#endif -+ -+/* System dependant library redefinitions, structures and includes */ -+ -+/* multibyte character support? */ -+ -+#if NEC || FMR || I55 -+#define DBCS 1 /* double byte character sets enabled */ -+#define INSDEL 1 /* use insert/delete line display optimizations */ -+ -+/* define DBCS prefix bytes */ -+#define is2char(ch) (((ch&0xff) >= 0x81 && (ch&0xff) <= 0x9f) || ((ch&0xff) >=0xe0 && (ch&0xff) <= 0xfc)) -+ -+#else -+#define DBCS 0 -+#define INSDEL 0 -+#endif -+ -+/* Can we catch the SIGWINCH (the window size change signal)? */ -+ -+#if AIX || HPUX9 || FREEBSD -+#define HANDLE_WINCH 1 -+#else -+#define HANDLE_WINCH 0 -+#endif -+ -+/* Prototypes in use? */ -+ -+#if MSC || TURBO || IC || VMS || GCC || ZTC -+#define PROTO 1 -+#else -+#define PROTO 0 -+#endif -+ -+/* the following define allows me to initialize unions... -+ otherwise we make them structures (like the keybinding table) */ -+ -+#if __STDC__ || MSC || TURBO || IC || ZTC -+#define ETYPE union -+#else -+#define ETYPE struct -+#endif -+ -+/* Instant C can't do stat()s. Arrrg. No file locking for you */ -+#if IC && MSDOS -+#undef FILOCK -+#define FILOCK 0 -+#endif -+ -+/* Mark Williams/Atari has no standard or varargs or directory functions */ -+#if TOS & MWC -+#undef VARARG -+#define VARARG 0 -+#undef FILOCK -+#define FILOCK 0 -+#endif -+ -+/* MS-Windows */ -+ -+#if WINNT || WINDOW_MSWIN || WINDOW_MSWIN32 -+#if WINDOW_MSWIN32 -+#undef WINDOW_MSWIN -+#define WINDOW_MSWIN 1 -+#endif -+#if WINDOW_MSWIN && WINNT -+#undef WINDOW_MSWIN32 -+#define WINDOW_MSWIN32 1 -+#endif -+#undef VOID /* windows.h will wind up defining this */ -+#include /* --------- Huge include file here !!! ---------*/ -+#if NTCON -+#include -+#include -+#include -+#endif -+ -+#undef NEAR -+#define NEAR -+#define DNEAR -+#if MSC || IC -+#undef CDECL -+#define CDECL __cdecl -+#define DUMMYSZ 1 /* dummy size for unsized extern arrays to avoid -+ silly DGROUP fixup */ -+#else -+#if TURBO -+#define DUMMYSZ /* nothing */ -+#else -+#define CDECL _cdecl /* ZTC */ -+#define DUMMYSZ /* nothing */ -+#endif -+#endif -+ -+#if WINNT -+#define EXPORT /* Windows NT doesn't like this */ -+#endif -+ -+#if WINDOW_MSWIN -+#undef TYPEAH -+#define TYPEAH 0 /* typeahead is handled at the term driver level */ -+#undef CALLED -+#define CALLED 1 /* under MS Windows, "main" resides in the sys driver */ -+#if MSC -+#define EXPORT __export -+#else -+#define EXPORT _export /* Fine for TURBO and ZTC */ -+#endif -+#endif -+#else -+ -+/* neither Windows NT nor MS-Windows */ -+ -+#define DUMMYSZ /* nothing */ -+ -+#if MSDOS & (TURBO | MSC | TIPC) -+#define NEAR -+#define DNEAR -+#define PASCAL pascal -+#define CDECL cdecl -+#else -+#if MSDOS & ZTC -+#define NEAR -+#define DNEAR -+#define PASCAL _pascal -+#define CDECL _cdecl -+#else -+#define NEAR -+#define DNEAR -+#define PASCAL -+#define CDECL -+#endif -+#endif -+ -+#endif -+ -+#if TURBO -+#include -+#include -+#undef peek -+#undef poke -+#define peek(a,b,c,d) movedata(a,b,FP_SEG(c),FP_OFF(c),d) -+#define poke(a,b,c,d) movedata(FP_SEG(c),FP_OFF(c),a,b,d) -+#endif -+ -+#if IC -+#include -+#undef peek -+#undef poke -+#define peek(a,b,c,d) movedata(a,b,FP_SEG(c),FP_OFF(c),d) -+#define poke(a,b,c,d) movedata(FP_SEG(c),FP_OFF(c),a,b,d) -+#endif -+ -+#if LATTICE & MSDOS -+/* you may have to remove this one definition with LATTICE version -+ 3.2 and above */ -+#define unsigned -+#endif -+ -+#if IC -+#define inp inportb -+#define outp outportb -+#define intdos(a, b) int86(33, a, b) -+#endif -+ -+#if AZTEC -+#undef putc -+#undef getc -+#if MSDOS -+#define getc a1getc -+#define int86 sysint -+#define intdos(a, b) sysint(33, a, b) -+#define inp inportb -+#define outp outportb -+#else -+#define getc agetc -+#endif -+#define putc aputc -+ -+struct XREG { -+ unsigned ax,bx,cx,dx,si,di,ds,es; -+}; -+ -+struct HREG { -+ char al,ah,bl,bh,cl,ch,dl,dh,d1,d2,e1,e2; -+}; -+ -+union REGS { -+ struct XREG x; -+ struct HREG h; -+}; -+ -+struct SREGS { -+ unsigned cs, ss, ds, es; -+}; -+#endif -+ -+#if MSDOS & MWC -+#include -+#define int86(a, b, c) intcall(b, c, a) -+#define intdos(a, b) intcall(a, b, DOSINT) -+#define inp(a) in(a) -+#define outp(a, b) out(a, b) -+#define movmem(a, b, c) memcpy(b, a, c) -+ -+struct XREG { -+ unsigned int ax,bx,cx,dx,si,di,ds,es,flags; -+}; -+ -+struct HREG { -+ char al,ah,bl,bh,cl,ch,dl,dh; -+ unsigned int ds,es,flags; -+}; -+ -+union REGS { -+ struct XREG x; -+ struct HREG h; -+}; -+#endif -+ -+#if MSDOS & MSC -+#include -+#include -+#define peek(a,b,c,d) movedata(a,b,FP_SEG(c),FP_OFF(c),d) -+#define poke(a,b,c,d) movedata(FP_SEG(c),FP_OFF(c),a,b,d) -+#define movmem(a, b, c) memcpy(b, a, c) -+#define _strrev(a) strrev(a) -+#endif -+ -+#if MSDOS & LATTICE -+#undef CPM -+#undef LATTICE -+#include -+#undef CPM -+#endif -+ -+/* System V doesn't name this the same as others */ -+#if USG | AIX | AUX | SUN | (OS2 & MSC) -+#define movmem(a, b, c) memcpy(b, a, c) -+#endif -+ -+/* this keeps VMS happy */ -+#if VMS -+#define getname xgetname -+#define unlink(a) delete(a) -+#endif -+ -+/* some options for AOS/VS */ -+#if AOSVS -+#define ORMDNI 1 -+#endif -+ -+/* define some ability flags */ -+ -+#if (IBMPC | Z309 | FMR | TIPC) & !(WINDOW_MSWIN | WINDOW_MSWIN32) -+#define MEMMAP 1 -+#else -+#define MEMMAP 0 -+#endif -+ -+#if MSDOS | WINNT | OS2 | USG | AIX | AUX | SMOS | HPUX8 | HPUX9 | BSD | FREEBSD | (TOS & MWC) | WMCS | SUN | MPE -+#define ENVFUNC 1 -+#else -+#define ENVFUNC 0 -+#endif -+ -+#if AUX -+#define RETCHAR '\n' -+#else -+#define RETCHAR '\r' -+#endif -+ -+#if MPE -+#define DIRSEPSTR "." -+#define DIRSEPCHAR '.' -+#else -+#if TOS || MSDOS || WINNT || OS2 -+#define DIRSEPSTR "\\" -+#define DIRSEPCHAR '\\' -+#define DRIVESEPCHAR ':' -+#else -+#define DIRSEPSTR "/" -+#define DIRSEPCHAR '/' -+#define DRIVESEPCHAR '\0' -+#endif -+#endif -+ -+#if VARARG -+#if (GCC == 0) && (USG || AIX || AUX || BSD || FREEBSD || SUN || XENIX || HPUX8 || HPUX9 || AVIION || MPE) -+#define VARG 1 -+#define SARG 0 -+#include -+#else -+#define VARG 0 -+#define SARG 1 -+#include -+#endif -+#endif -+ -+#if ZTC -+#include -+#define movmem(a, b, c) memcpy(b, a, c) -+#endif -+ -+/* Emacs global flag bit definitions (for gflags) */ -+ -+#define GFREAD 1 /* read first file in at startup */ -+#define GFSDRAW 2 /* suppress a screen redraw */ -+#define GFEXIT 4 /* exit from emacs pending */ -+ -+/* internal constants */ -+ -+#define NBINDS 300 /* max # of bound keys */ -+#if AOSVS | VMS | WINNT | SUN | BSD | FREEBSD | USG | ZENIX | HPUX8 | HPUX9 | OS2 -+#define NFILEN 256 -+#else -+#define NFILEN 80 /* # of bytes, file name */ -+#endif -+#define NBUFN 128 /* # of bytes, buffer name */ -+#define NLINE 256 /* # of bytes, input line */ -+#define NSTRING 128 /* # of bytes, string buffers */ -+#define NKBDM 4096 /* # of strokes, keyboard macro */ -+#define NPAT 128 /* # of bytes, pattern */ -+#define HUGE 1000 /* Huge number */ -+#define NLOCKS 256 /* max # of file locks active */ -+#define NCOLORS 16 /* number of supported colors */ -+#define KBLOCK 250 /* sizeof kill buffer chunks */ -+#define NRING 16 /* # of buffers in kill ring */ -+#define NBLOCK 16 /* line block chunk size */ -+#define NVSIZE 16 /* max #chars in a var name */ -+#define NMARKS 16 /* number of marks */ -+#define MAXSYM 32 /* max # chars in symbol to expand */ -+#define MINFLEN 3 /* min # chars to match &func */ -+ -+#define CTRL 0x0100 /* Control flag, or'ed in */ -+#define META 0x0200 /* Meta flag, or'ed in */ -+#define CTLX 0x0400 /* ^X flag, or'ed in */ -+#define SPEC 0x0800 /* special key (function keys) */ -+#define MOUS 0x1000 /* alternative input device (mouse) */ -+#define SHFT 0x2000 /* shifted (for function keys) */ -+#define ALTD 0x4000 /* ALT key... */ -+#define MENU MOUS+SPEC /* menu selection (WINDOW_MSWIN) */ -+ -+#define BINDNUL 0 /* not bound to anything */ -+#define BINDFNC 1 /* key bound to a function */ -+#define BINDBUF 2 /* key bound to a buffer */ -+ -+#ifdef FALSE -+#undef FALSE -+#endif -+#ifdef TRUE -+#undef TRUE -+#endif -+ -+#define FALSE 0 /* False, no, bad, etc. */ -+#define TRUE 1 /* True, yes, good, etc. */ -+#define ABORT 2 /* Death, ^G, abort, etc. */ -+#define FAILD 3 /* not-quite fatal false return */ -+ -+#define STOP 0 /* keyboard macro not in use */ -+#define PLAY 1 /* playing */ -+#define RECORD 2 /* recording */ -+ -+/* Completion types */ -+ -+#define CMP_BUFFER 0 -+#define CMP_COMMAND 1 -+#define CMP_FILENAME 2 -+ -+/* Directive definitions */ -+ -+#define DIF 0 -+#define DELSE 1 -+#define DENDIF 2 -+#define DGOTO 3 -+#define DRETURN 4 -+#define DENDM 5 -+#define DWHILE 6 -+#define DENDWHILE 7 -+#define DBREAK 8 -+#define DFORCE 9 -+ -+#define NUMDIRS 10 -+ -+/* -+ * PTBEG, PTEND, FORWARD, and REVERSE are all toggle-able values for -+ * routines that need directions. -+ */ -+#define PTBEG 0 /* Leave the point at the beginning on search */ -+#define PTEND 1 /* Leave the point at the end on search */ -+#define FORWARD 0 /* do things in a forward direction */ -+#define REVERSE 1 /* do things in a backwards direction */ -+ -+#define FIOSUC 0 /* File I/O, success. */ -+#define FIOFNF 1 /* File I/O, file not found. */ -+#define FIOEOF 2 /* File I/O, end of file. */ -+#define FIOERR 3 /* File I/O, error. */ -+#define FIOMEM 4 /* File I/O, out of memory */ -+#define FIOFUN 5 /* File I/O, eod of file/bad line*/ -+#define FIODEL 6 /* Can't delete/rename file */ -+ -+#if WINDOW_MSWIN -+/* values for the fbusy flag */ -+#define FREADING 1 /* file read in progress */ -+#define FWRITING 2 /* file write in progress */ -+/* if no file activity, the value FALSE is used */ -+#endif -+ -+#define CFCPCN 0x0001 /* Last command was C-P, C-N */ -+#define CFKILL 0x0002 /* Last command was a kill */ -+#define CFSRCH 0x0004 /* last command was a search */ -+#define CFYANK 0x0008 /* last command was a yank */ -+ -+#define SRNORM 0 /* end past, begin front */ -+#define SRBEGIN 1 /* always at front */ -+#define SREND 2 /* always one past end */ -+ -+#define BELL 0x07 /* a bell character */ -+#define TAB 0x09 /* a tab character */ -+ -+#if USG | AIX | AUX | SMOS | HPUX8 | HPUX9 | BSD | FREEBSD | SUN | XENIX | AVIION -+#define PATHCHR ':' -+#else -+#if WMCS || MPE -+#define PATHCHR ',' -+#else -+#define PATHCHR ';' -+#endif -+#endif -+ -+#define INTWIDTH sizeof(int) * 3 -+#define LONGWIDTH sizeof(long) * 3 -+ -+/* Macro argument token types */ -+ -+#define TKNUL 0 /* end-of-string */ -+#define TKARG 1 /* interactive argument */ -+#define TKBUF 2 /* buffer argument */ -+#define TKVAR 3 /* user variables */ -+#define TKENV 4 /* environment variables */ -+#define TKFUN 5 /* function.... */ -+#define TKDIR 6 /* directive */ -+#define TKLBL 7 /* line label */ -+#define TKLIT 8 /* numeric literal */ -+#define TKSTR 9 /* quoted string literal */ -+#define TKCMD 10 /* command name */ -+ -+/* Internal defined functions */ -+ -+#define nextab(a) (a - (a % tabsize)) + tabsize -+ -+/* DIFCASE represents the integer difference between upper -+ and lower case letters. It is an xor-able value, which is -+ fortunate, since the relative positions of upper to lower -+ case letters is the opposite of ascii in ebcdic. -+*/ -+ -+#if ASCII -+#define DIFCASE 0x20 -+#else -+#define DIFCASE 0x40 -+#endif -+ -+/* Dynamic RAM tracking and reporting redefinitions */ -+ -+#if RAMSIZE -+#define malloc allocate -+#define free release -+#else -+#if VMS & OPTMEM -+#define malloc VAXC$MALLOC_OPT -+#define free VAXC$FREE_OPT -+#define calloc VAXC$CALLOC_OPT -+#define realloc VAXC$REALLOC_OPT -+#define cfree VAXC$CFREE_OPT -+#endif -+#endif -+ -+/* under MS Windows, we use dialog boxes to prompt the user for filenames */ -+#if WINDOW_MSWIN -+#define FILENAMEREPLY(p,b,nb) filenamedlg(p,b,nb,TRUE) -+#else -+#define FILENAMEREPLY(p,b,nb) mlreply(p,b,nb) -+#endif -+ -+/* formal parameters to procedures are stored as a linked list -+ of argument names using the following simple structure: -+*/ -+ -+typedef struct PARG { -+ struct PARG *next; /* ptr to next linked argument */ -+ char name[NVSIZE+1]; /* name of the argument */ -+} PARG; -+ -+/* UNDO definitions and types */ -+ -+typedef int OPTYPE; /* type of operation being recorded/played back */ -+ -+#define OP_CMND 1 /* beginning of command */ -+#define OP_DELC 2 /* delete a single character */ -+#define OP_INSC 3 /* insert a single character */ -+#define OP_DSTR 4 /* delete a string of characters */ -+#define OP_ISTR 5 /* insert a string of characters */ -+#define OP_REPC 6 /* replace a character */ -+#define OP_CPOS 7 /* set the cursor position */ -+ -+/* object to be undone! */ -+ -+typedef union OBJECT { -+ char obj_char; /* a character */ -+ char obj_string[1]; /* many characters */ -+ char *obj_sptr; /* a ptr to a character */ -+} OBJECT; -+ -+typedef struct UNDO_OBJ { -+ struct UNDO_OBJ *next; /* ptr to next undo object */ -+ OPTYPE type; /* type of operation */ -+ long line_num; /* line offset from buffer beginning */ -+ int offset; /* offset into that line */ -+ long count; /* repetitions? */ -+ OBJECT undo_obj; /* object to be undone */ -+} UNDO_OBJ; -+ -+/* -+ * There is a window structure allocated for every active display window. The -+ * windows are kept in a big list, in top to bottom screen order, with the -+ * listhead at "wheadp". Each window contains its own values of dot and mark. -+ * The flag field contains some bits that are set by commands to guide -+ * redisplay. Although this is a bit of a compromise in terms of decoupling, -+ * the full blown redisplay is just too expensive to run for every input -+ * character. -+ */ -+typedef struct EWINDOW { -+ struct EWINDOW *w_wndp; /* Next window */ -+ struct BUFFER *w_bufp; /* Buffer displayed in window */ -+ struct LINE *w_linep; /* Top line in the window */ -+ struct LINE *w_dotp; /* Line containing "." */ -+ short w_doto; /* Byte offset for "." */ -+ struct LINE *w_markp[NMARKS]; /* Line containing "mark" */ -+ short w_marko[NMARKS]; /* Byte offset for "mark" */ -+ char w_toprow; /* Origin 0 top row of window */ -+ char w_ntrows; /* # of rows of text in window */ -+ char w_force; /* If NZ, forcing row. */ -+ char w_flag; /* Flags. */ -+#if COLOR -+ char w_fcolor; /* current forground color */ -+ char w_bcolor; /* current background color */ -+#endif -+ int w_fcol; /* first column displayed */ -+} EWINDOW; -+ -+#define WFFORCE 0x01 /* Window needs forced reframe */ -+#define WFMOVE 0x02 /* Movement from line to line */ -+#define WFEDIT 0x04 /* Editing within a line */ -+#define WFHARD 0x08 /* Better to a full display */ -+#define WFMODE 0x10 /* Update mode line. */ -+#define WFCOLR 0x20 /* Needs a color change */ -+ -+/* This structure holds the information about each line appearing on the -+ * video display. The redisplay module uses an array of virtual display -+ * lines. On systems that do not have direct access to display memory, -+ * there is also an array of physical display lines used to minimize -+ * video updating. In most cases, these two arrays are unique. If -+ * WINDOW_MSWIN is 1, there is a pair of such arrays in each SCREEN -+ * structure. -+ */ -+ -+typedef struct VIDEO { -+ int v_flag; /* Flags */ -+#if COLOR -+ int v_fcolor; /* current forground color */ -+ int v_bcolor; /* current background color */ -+ int v_rfcolor; /* requested forground color */ -+ int v_rbcolor; /* requested background color */ -+#endif -+ int v_left; /* left edge of reverse video */ -+ int v_right; /* right right of reverse video */ -+#if INSDEL && MEMMAP == 0 -+ int v_rline; /* requested screen line # */ -+#endif -+ char v_text[1]; /* Screen data. */ -+} VIDEO; -+ -+#define VFNEW 0x0001 /* contents not meaningful yet */ -+#define VFCHG 0x0002 /* Changed flag */ -+#define VFEXT 0x0004 /* extended (beyond column 80) */ -+#define VFCOL 0x0008 /* color change requested */ -+ -+/* -+ * This structure holds the information about each separate "screen" -+ * within the current editing session. On a character based system, these -+ * screens overlay each other, and can individually be brought to front. -+ * On a windowing system like MicroSoft Windows 3.0, OS/2, the Macintosh, -+ * Intuition, Sunview or X-windows, each screen is represented in an OS -+ * window. The terminolgy is wrong in emacs..... -+ * -+ * EMACS The outside World -+ * screen window -+ * window pane -+ */ -+ -+typedef struct SCREEN { -+ struct SCREEN *s_next_screen; /* link to next screen in list */ -+ EWINDOW *s_first_window; /* head of linked list of windows */ -+ EWINDOW *s_cur_window; /* current window in this screen */ -+ char *s_screen_name; /* name of the current window */ -+ short s_roworg; /* row origin of stored screen */ -+ short s_colorg; /* column origin of stored screen */ -+ short s_nrow; /* row width of stored screen */ -+ short s_ncol; /* column origin of stored screen */ -+#if WINDOW_MSWIN -+ VIDEO **s_virtual; /* virtual screen contents */ -+ VIDEO **s_physical; /* physical screen contents */ -+ HWND s_drvhandle; /* handle for the "term" driver */ -+#endif -+} SCREEN; -+ -+/* -+ * Text is kept in buffers. A buffer header, described below, exists for every -+ * buffer in the system. The buffers are kept in a big list, so that commands -+ * that search for a buffer by name can find the buffer header. There is a -+ * safe store for the dot and mark in the header, but this is only valid if -+ * the buffer is not being displayed (that is, if "b_nwnd" is 0). The text for -+ * the buffer is kept in a circularly linked list of lines, with a pointer to -+ * the header line in "b_linep". Buffers may be "Inactive" which means the -+ * files associated with them have not been read in yet. These get read in -+ * at "use buffer" time. -+ * Some buffers are really procedures and have a little extra information -+ * stored with them. -+ */ -+typedef struct BUFFER { -+ struct BUFFER *b_bufp; /* Link to next BUFFER */ -+ struct LINE *b_dotp; /* Link to "." LINE structure */ -+ short b_doto; /* Offset of "." in above LINE */ -+ struct LINE *b_markp[NMARKS]; /* The same as the above two, */ -+ short b_marko[NMARKS]; /* but for the "mark" */ -+ int b_fcol; /* first col to display */ -+ struct LINE *b_linep; /* Link to the header LINE */ -+ struct LINE *b_topline; /* Link to narrowed top text */ -+ struct LINE *b_botline; /* Link to narrowed bottom text */ -+ char b_active; /* window activated flag */ -+ char b_nwnd; /* Count of windows on buffer */ -+ char b_exec; /* how many active executions */ -+ char b_flag; /* Flags */ -+ int b_mode; /* editor mode of this buffer */ -+ char b_fname[NFILEN]; /* File name */ -+ char b_bname[NBUFN]; /* Buffer name */ -+#if CRYPT -+ char b_key[NPAT]; /* current encrypted key */ -+#endif -+ int b_numargs; /* number of arguments to procedure */ -+ PARG *b_args; /* ptr to the first argument */ -+ UNDO_OBJ *undo_head; /* head of undo stack for buffer */ -+ long undo_count; /* # of undo operations stacked */ -+ long last_access; /* time of last access */ -+} BUFFER; -+ -+#define BFINVS 0x01 /* Internal invisable buffer */ -+#define BFCHG 0x02 /* Changed since last write */ -+#define BFTRUNC 0x04 /* buffer was truncated when read */ -+#define BFNAROW 0x08 /* buffer has been narrowed */ -+ -+#define NOTPROC -1 /* buffer is not a procedure */ -+ -+/* mode flags */ -+#define NUMMODES 11 /* # of defined modes */ -+ -+#define MDWRAP 0x0001 /* word wrap */ -+#define MDCMOD 0x0002 /* C indentation and fence match*/ -+#define MDSPELL 0x0004 /* spell error parsing */ -+#define MDEXACT 0x0008 /* Exact matching for searches */ -+#define MDVIEW 0x0010 /* read-only buffer */ -+#define MDOVER 0x0020 /* overwrite mode */ -+#define MDMAGIC 0x0040 /* regular expresions in search */ -+#define MDCRYPT 0x0080 /* encrytion mode active */ -+#define MDASAVE 0x0100 /* auto-save mode */ -+#define MDREPL 0x0200 /* replace mode */ -+#define MDABBR 0x0400 /* abbreviation expansion mode */ -+ -+/* -+ * The starting position of a region, and the size of the region in -+ * characters, is kept in a region structure. Used by the region commands. -+ */ -+typedef struct { -+ struct LINE *r_linep; /* Origin LINE address. */ -+ short r_offset; /* Origin LINE offset. */ -+ long r_size; /* Length in characters. */ -+} REGION; -+ -+/* -+ * All text is kept in circularly linked lists of "LINE" structures. These -+ * begin at the header line (which is the blank line beyond the end of the -+ * buffer). This line is pointed to by the "BUFFER". Each line contains a the -+ * number of bytes in the line (the "used" size), the size of the text array, -+ * and the text. The end of line is not stored as a byte; it's implied. -+ */ -+typedef struct LINE { -+ struct LINE *l_fp; /* Link to the next line */ -+ struct LINE *l_bp; /* Link to the previous line */ -+ short l_size; /* Allocated size */ -+ short l_used; /* Used size */ -+ char l_text[1]; /* A bunch of characters. */ -+} LINE; -+ -+#define lforw(lp) ((lp)->l_fp) -+#define lback(lp) ((lp)->l_bp) -+#if UNIX && (SUN || HPUX8 || HPUX9 || BSD || FREEBSD) -+#define lgetc(lp, n) ((unsigned char)(lp)->l_text[(n)]) -+#else -+#define lgetc(lp, n) ((lp)->l_text[(n)]) -+#endif -+#define lputc(lp, n, c) ((lp)->l_text[(n)]=(c)) -+#define lused(lp) ((lp)->l_used) -+#define lsize(lp) ((lp)->l_size) -+#define ltext(lp) ((lp)->l_text) -+ -+/* This structure is used to hold a user variables name and its -+ current value. These are used for both the global and the -+ local symbol tables. -+*/ -+ -+typedef struct UVAR { -+ char u_name[NVSIZE + 1]; /* name of user variable */ -+ char *u_value; /* value (string) */ -+} UVAR; -+ -+#define VT_NONE 0 /* don't declare it if not found */ -+#define VT_LOCAL 1 /* local to the current procedure */ -+#define VT_GLOBAL 2 /* global to all procedures */ -+ -+/* A UTABLE is a user variable table.... containing some header -+ information and an array of user variable names and definitions. -+ They are held together in a linked list, the last member of -+ the list being the global user variable table. -+*/ -+ -+typedef struct UTABLE { -+ struct UTABLE *next; /* ptr to next user variable table */ -+ int size; /* max number of variables in table */ -+ BUFFER *bufp; /* ptr to buffer holding procedure -+ assosiated with this symbol table. */ -+ UVAR uv[1]; /* list of variable names/definitions -+ in this variable table */ -+} UTABLE; -+ -+/* -+ * The editor communicates with the display using a high level interface. A -+ * "TERM" structure holds useful variables, and indirect pointers to routines -+ * that do useful operations. The low level get and put routines are here too. -+ * This lets a terminal, in addition to having non standard commands, have -+ * funny get and put character code too. The calls might get changed to -+ * "termp->t_field" style in the future, to make it possible to run more than -+ * one terminal type. -+ */ -+#if PROTO -+typedef struct { -+ short t_mrow; /* max number of rows allowable */ -+ short t_nrow; /* current number of rows used */ -+ short t_mcol; /* max Number of columns. */ -+ short t_ncol; /* current Number of columns. */ -+ short t_roworg; /* origin row (normally zero) */ -+ short t_colorg; /* origin column (normally zero)*/ -+ short t_margin; /* min margin for extended lines*/ -+ short t_scrsiz; /* size of scroll region " */ -+ int t_pause; /* # times thru update to pause */ -+ int (PASCAL NEAR *t_open)(void); /* Open terminal at the start.*/ -+ int (PASCAL NEAR *t_close)(void); /* Close terminal at end. */ -+ int (PASCAL NEAR *t_kopen)(void); /* Open keyboard */ -+ int (PASCAL NEAR *t_kclose)(void); /* Close keyboard */ -+ int (PASCAL NEAR *t_getchar)(void); /* Get character from keyboard. */ -+ int (PASCAL NEAR *t_putchar)(int); /* Put character to display.*/ -+ int (PASCAL NEAR *t_flush)(void); /* Flush output buffers. */ -+ int (PASCAL NEAR *t_move)(int, int);/* Move the cursor, origin 0.*/ -+ int (PASCAL NEAR *t_eeol)(void); /* Erase to end of line. */ -+ int (PASCAL NEAR *t_eeop)(void); /* Erase to end of page. */ -+ int (PASCAL NEAR *t_clrdesk)(void); /* Clear the page totally */ -+ int (PASCAL NEAR *t_beep)(void); /* Beep. */ -+ int (PASCAL NEAR *t_rev)(int); /* set reverse video state */ -+ int (PASCAL NEAR *t_rez)(char *); /* change screen resolution */ -+#if COLOR -+ int (PASCAL NEAR *t_setfor)(int); /* set forground color */ -+ int (PASCAL NEAR *t_setback)(int); /* set background color */ -+#endif -+#if INSDEL -+ int (PASCAL NEAR *t_insline)(int); /* insert a screen line */ -+ int (PASCAL NEAR *t_delline)(int); /* delete a screen line */ -+#endif -+#if WINDOW_MSWIN -+ int (PASCAL NEAR *t_sleep)(int); /* go to sleep for a while */ -+ int (PASCAL NEAR *t_newscr)(SCREEN *); /* create new screen display */ -+ int (PASCAL NEAR *t_delscr)(SCREEN *); /* destroy screen display */ -+ int (PASCAL NEAR *t_selscr)(SCREEN *); /* select screen display */ -+ int (PASCAL NEAR *t_sizscr)(SCREEN *); /* resize screen display */ -+ int (PASCAL NEAR *t_topscr)(SCREEN *); /* bring screen to top */ -+#endif -+} TERM; -+#else /* TERM structure, no prototyping.*/ -+ -+typedef struct { -+ short t_mrow; /* max number of rows allowable */ -+ short t_nrow; /* current number of rows used */ -+ short t_mcol; /* max Number of columns. */ -+ short t_ncol; /* current Number of columns. */ -+ short t_roworg; /* origin row (normally zero) */ -+ short t_colorg; /* origin column (normally zero)*/ -+ short t_margin; /* min margin for extended lines*/ -+ short t_scrsiz; /* size of scroll region " */ -+ int t_pause; /* # times thru update to pause */ -+ int (PASCAL NEAR *t_open)(); /* Open terminal at the start. */ -+ int (PASCAL NEAR *t_close)(); /* Close terminal at end. */ -+ int (PASCAL NEAR *t_kopen)(); /* Open keyboard */ -+ int (PASCAL NEAR *t_kclose)(); /* close keyboard */ -+ int (PASCAL NEAR *t_getchar)(); /* Get character from keyboard. */ -+ int (PASCAL NEAR *t_putchar)(); /* Put character to display. */ -+ int (PASCAL NEAR *t_flush)(); /* Flush output buffers. */ -+ int (PASCAL NEAR *t_move)(); /* Move the cursor, origin 0. */ -+ int (PASCAL NEAR *t_eeol)(); /* Erase to end of line. */ -+ int (PASCAL NEAR *t_eeop)(); /* Erase to end of page. */ -+ int (PASCAL NEAR *t_clrdesk)(); /* Clear the page totally */ -+ int (PASCAL NEAR *t_beep)(); /* Beep. */ -+ int (PASCAL NEAR *t_rev)(); /* set reverse video state */ -+ int (PASCAL NEAR *t_rez)(); /* change screen resolution */ -+#if COLOR -+ int (PASCAL NEAR *t_setfor)(); /* set forground color */ -+ int (PASCAL NEAR *t_setback)(); /* set background color */ -+#endif -+#if INSDEL -+ int (PASCAL NEAR *t_insline)(); /* insert a screen line */ -+ int (PASCAL NEAR *t_delline)(); /* delete a screen line */ -+#endif -+#if WINDOW_MSWIN -+ int (PASCAL NEAR *t_sleep)(); /* go to sleep for a while */ -+ int (PASCAL NEAR *t_newscr)(); /* create new screen display */ -+ int (PASCAL NEAR *t_delscr)(); /* destroy screen display */ -+ int (PASCAL NEAR *t_selscr)(); /* select screen display */ -+ int (PASCAL NEAR *t_sizscr)(); /* resize screen display */ -+ int (PASCAL NEAR *t_topscr)(); /* bring screen to top */ -+#endif -+} TERM; -+#endif -+ -+ -+/* TEMPORARY macros for terminal I/O (to be placed in a machine -+ dependant place later) */ -+ -+#define TTopen (*term.t_open) -+#define TTclose (*term.t_close) -+#define TTkopen (*term.t_kopen) -+#define TTkclose (*term.t_kclose) -+#define TTgetc (*term.t_getchar) -+#define TTputc (*term.t_putchar) -+#define TTflush (*term.t_flush) -+#define TTmove (*term.t_move) -+#define TTeeol (*term.t_eeol) -+#define TTeeop (*term.t_eeop) -+#define TTclrdesk (*term.t_clrdesk) -+#define TTbeep (*term.t_beep) -+#define TTrev (*term.t_rev) -+#define TTrez (*term.t_rez) -+#if COLOR -+#define TTforg (*term.t_setfor) -+#define TTbacg (*term.t_setback) -+#endif -+ -+/* Structure for the table of current key bindings */ -+ -+ETYPE EPOINTER { -+ int (PASCAL NEAR *fp)(); /* C routine to invoke */ -+ BUFFER *buf; /* buffer to execute */ -+}; -+ -+typedef struct { -+ short k_code; /* Key code */ -+ short k_type; /* binding type (C function or EMACS buffer) */ -+ ETYPE EPOINTER k_ptr; /* ptr to thing to execute */ -+} KEYTAB; -+ -+/* structure for the name binding table */ -+ -+typedef struct { -+ char *n_name; /* name of function key */ -+ int (PASCAL NEAR *n_func)(); /* function name is bound to */ -+} NBIND; -+ -+/* The editor holds deleted text chunks in the KILL buffer. The -+ kill buffer is logically a stream of ascii characters, however -+ due to its unpredicatable size, it gets implemented as a linked -+ list of chunks. (The d_ prefix is for "deleted" text, as k_ -+ was taken up by the keycode structure) -+*/ -+ -+typedef struct KILL { -+ struct KILL *d_next; /* link to next chunk, NULL if last */ -+ char d_chunk[KBLOCK]; /* deleted text */ -+} KILL; -+ -+/* When emacs's command interpetor needs to get a variable's name, -+ rather than it's value, it is passed back as a VDESC variable -+ description structure. The v_num field is a index into the -+ appropriate variable table. -+*/ -+ -+typedef struct VDESC { -+ int v_type; /* type of variable */ -+ int v_num; /* ordinal pointer to variable in list */ -+ UTABLE *v_ut; /* ptr to appropriate user table if user var */ -+} VDESC; -+ -+/* The !WHILE directive in the execution language needs to -+ stack references to pending whiles. These are stored linked -+ to each currently open procedure via a linked list of -+ the following structure -+*/ -+ -+typedef struct WHBLOCK { -+ LINE *w_begin; /* ptr to !while statement */ -+ LINE *w_end; /* ptr to the !endwhile statement*/ -+ int w_type; /* block type */ -+ struct WHBLOCK *w_next; /* next while */ -+} WHBLOCK; -+ -+#define BTWHILE 1 -+#define BTBREAK 2 -+ -+/* Abbreviations are short symbols that expand to longer strings -+ when typed into a buffer with no intervening whitespace or commands. -+ This structure grows dynamically as needed. -+*/ -+ -+typedef struct ABBREV { -+ struct ABBREV *ab_next; /* pointer to the next abbreviation */ -+ char ab_sym[MAXSYM + 1]; /* name to expand */ -+ char ab_exp[1]; /* string to expand to */ -+} ABBREV; -+ -+/* Search definitions... */ -+ -+/* HICHAR - 1 is the largest character we will deal with. -+ * BMAPSIZE represents the number of bytes in the bitmap. -+ */ -+#define HICHAR 256 -+#define BMAPSIZE HICHAR >> 3 -+ -+/* -+ * Jump table structures. -+ */ -+typedef struct { -+ int jump; -+ int patlen; -+ int delta[HICHAR]; -+ char patrn[NPAT]; -+} DELTA; -+ -+#if MAGIC -+/* -+ * Defines for the metacharacters in the regular expression -+ * search routines. MCNIL and GROUP are used in both search -+ * and replace metachar-arrays. -+ */ -+#define MCNIL 0 /* Like the '\0' for strings.*/ -+#define JMPTABLE 1 -+#define LITSTRING 2 /* Literal string.*/ -+#define LITCHAR 3 /* Literal character.*/ -+#define ANY 4 /* Any character but the .*/ -+#define CCL 5 -+#define NCCL 6 -+#define BOL 7 -+#define EOL 8 -+#define BOWRD 9 -+#define EOWRD 10 -+#define GRPBEG 11 /* Signal start of group.*/ -+#define GRPEND 12 /* Signal end of group.*/ -+#define GROUP 13 /* String of group match.*/ -+#define DITTO 14 /* Replacement with match string.*/ -+ -+#define CLOSURE 0x0100 /* An or-able value for a closure modifier.*/ -+#define CLOSURE_1 0x0200 /* An or-able value for a closure modifier.*/ -+#define ZEROONE 0x0400 /* An or-able value for a closure modifier.*/ -+ -+#define ALLCLOS (CLOSURE | CLOSURE_1 | ZEROONE) -+#define MASKCLO (~ALLCLOS) -+ -+#define MC_ANY '.' /* 'Any' character (except newline).*/ -+#define MC_CCL '[' /* Character class.*/ -+#define MC_NCCL '^' /* Negate character class.*/ -+#define MC_RCCL '-' /* Range in character class.*/ -+#define MC_ECCL ']' /* End of character class.*/ -+#define MC_BOL '^' /* Beginning of line.*/ -+#define MC_EOL '$' /* End of line.*/ -+#define MC_CLOSURE '*' /* Closure - zero to many characters match.*/ -+#define MC_CLOSURE_1 '+' /* Closure - one to many characters match.*/ -+#define MC_ZEROONE '?' /* Closure - zero to one characters match.*/ -+#define MC_DITTO '&' /* Use matched string in replacement.*/ -+#define MC_GRPBEG '(' /* Start of group (begun with a backslash).*/ -+#define MC_GRPEND ')' /* End of group (begun with a backslash).*/ -+#define MC_BOWRD '<' /* Beginning of word (begun with a backslash).*/ -+#define MC_EOWRD '>' /* End of word (begun with a backslash).*/ -+#define MC_ESC '\\' /* Escape - suppress meta-meaning.*/ -+ -+#define MAXGROUPS 10 /* 1 + maximum # of r. e. groups. */ -+#define BIT(n) (1 << (n)) /* An integer with one bit set.*/ -+ -+/* Typedefs that define the bitmap type for searching (EBITMAP), -+ * the meta-character structure for MAGIC mode searching (MC), -+ * and the meta-character structure for MAGIC mode replacment (RMC). -+ */ -+typedef char *EBITMAP; -+ -+typedef struct { -+ short int mc_type; -+ union { -+ int lchar; -+ int group_no; -+ char *lstring; -+ DELTA *jmptable; -+ EBITMAP cclmap; -+ } u; -+} MC; -+ -+typedef struct { -+ short int mc_type; -+ union { -+ int group_no; -+ char *rstr; -+ } u; -+} RMC; -+#endif -+ -+/* -+ This is the message which should be added to any "About MicroEMACS" -+ boxes on any of the machines with window managers. -+ -+ -+ ------------------------------------------ -+ | | -+ | MicroEMACS v4.xx | -+ | for the ............ | -+ | | -+ | Text Editor and Corrector | -+ | | -+ | written by Daniel M. Lawrence | -+ | [based on code by Dave Conroy] | -+ | | -+ | Send inquiries and donations to: | -+ | 617 New York St | -+ | Lafayette, IN 47901 | -+ | | -+ ------------------------------------------ -+*/ diff --git a/editors/uemacs/files/patch-ac b/editors/uemacs/files/patch-ac deleted file mode 100644 index e511ee39a9f2..000000000000 --- a/editors/uemacs/files/patch-ac +++ /dev/null @@ -1,25 +0,0 @@ ---- src/bind.c.orig Sun Nov 19 03:09:20 1995 -+++ src/bind.c Wed Mar 25 15:00:37 1998 -@@ -634,7 +634,8 @@ - register char *sp; /* pointer into path spec */ - register int i; /* index */ - static char fspec[NFILEN]; /* full path spec to search */ -- -+ char patha[NFILEN]; -+ - /* if we have an absolute path.. check only there! */ - sp = fname; - while (*sp) { -@@ -689,9 +690,11 @@ - #if OS2 - path = getenv("DPATH"); - #else -- path = getenv("PATH"); -+ strncpy(patha, getenv("PATH"), NFILEN - 25); -+ strcat(patha, ":%%PREFIX%%/share/uemacs"); - #endif - #endif -+ path = patha; - if (path != NULL) - while (*path) { - diff --git a/editors/uemacs/files/patch-ad b/editors/uemacs/files/patch-ad deleted file mode 100644 index ac37d4230303..000000000000 --- a/editors/uemacs/files/patch-ad +++ /dev/null @@ -1,20 +0,0 @@ ---- src/lock.c.orig Sun Nov 19 03:09:22 1995 -+++ src/lock.c Wed Mar 25 13:56:13 1998 -@@ -10,10 +10,17 @@ - - #if FILOCK - -+#if BSD -+#undef BSD -+#include -+#endif -+ - #if BSD || FREEBSD || WMCS || SUN || XENIX || HPUX8 || HPUX9 || AVIION || USG || AIX || AUX - #include -+#if !(defined(BSD) && (BSD >= 199103)) - extern int sys_nerr; /* number of system error messages defined */ - extern char *sys_errlist[]; /* list of message texts */ -+#endif - #endif - - #if MSC diff --git a/editors/uemacs/files/patch-ae b/editors/uemacs/files/patch-ae deleted file mode 100644 index 0d567efcbbcc..000000000000 --- a/editors/uemacs/files/patch-ae +++ /dev/null @@ -1,12 +0,0 @@ ---- h/epath.h.orig Sun Nov 19 03:09:52 1995 -+++ h/epath.h Wed Mar 25 13:57:22 1998 -@@ -68,7 +68,8 @@ - { - ".emacsrc", - "emacs.hlp", -- "/usr/local/", -+ "/usr/local/share/uemacs/", -+ "/usr/local/lib/uemacs/", - "/usr/lib/", - "" - }; diff --git a/editors/uemacs/files/patch-af b/editors/uemacs/files/patch-af deleted file mode 100644 index 714cfa903fd4..000000000000 --- a/editors/uemacs/files/patch-af +++ /dev/null @@ -1,13 +0,0 @@ ---- freebsd/makefile.orig Sat Nov 18 13:19:02 1995 -+++ freebsd/makefile Wed Mar 25 15:07:14 1998 -@@ -14,8 +14,8 @@ - - # options and arguments to the C compiler - --#CFLAGS += -I. -I$(HDIR) --CFLAGS = -O -I. -I$(HDIR) -+CFLAGS += -I. -I$(HDIR) -+#CFLAGS = -O -I. -I$(HDIR) - - # list of header files - diff --git a/editors/uemacs/files/patch-ag b/editors/uemacs/files/patch-ag deleted file mode 100644 index b595477251ed..000000000000 --- a/editors/uemacs/files/patch-ag +++ /dev/null @@ -1,25 +0,0 @@ ---- src/unix.c.orig Sat Nov 13 14:57:12 1999 -+++ src/unix.c Sat Nov 13 15:04:45 1999 -@@ -816,9 +816,19 @@ - exit(1); - } - -- /* Get size from termcap */ -- term.t_nrow = tgetnum("li") - 1; -- term.t_ncol = tgetnum("co"); -+ /* -+ * If LINES and/or COLUMNS are set in the environment then use those -+ * values, otherwise get them from termcap. -+ */ -+ if ((cp = getenv("LINES")) == NULL || sscanf(cp, "%d", -+ &term.t_nrow) != 1) -+ term.t_nrow = tgetnum("li"); -+ term.t_nrow -= 1; -+ -+ if ((cp = getenv("COLUMNS")) == NULL || sscanf(cp, "%d", -+ &term.t_ncol) != 1) -+ term.t_ncol = tgetnum("co"); -+ - if (term.t_nrow < 3 || term.t_ncol < 3) { - puts("Screen size is too small!"); - exit(1); diff --git a/editors/uemacs/files/patch-freebsd_estruct.h b/editors/uemacs/files/patch-freebsd_estruct.h new file mode 100644 index 000000000000..ec8b19672881 --- /dev/null +++ b/editors/uemacs/files/patch-freebsd_estruct.h @@ -0,0 +1,1257 @@ +--- freebsd/estruct.h.orig Wed Mar 25 14:21:05 1998 ++++ freebsd/estruct.h Wed Mar 25 14:25:34 1998 +@@ -0,0 +1,1254 @@ ++/* ESTRUCT: Structure and preprocesser defined for ++ MicroEMACS 4.00 ++ ++ (C)Copyright 1995 by Daniel Lawrence ++ written by Daniel Lawrence ++ based on code by Dave G. Conroy, ++ Steve Wilhite and George Jones ++*/ ++ ++#ifdef LATTICE ++#undef LATTICE /* don't use their definitions...use ours */ ++#endif ++#ifdef MSDOS ++#undef MSDOS ++#endif ++#ifdef WINNT ++#undef WINNT ++#endif ++#ifdef AMIGA ++#undef AMIGA ++#endif ++#ifdef EGA ++#undef EGA ++#endif ++#ifdef CTRLZ ++#undef CTRLZ ++#endif ++ ++/* Program Identification..... ++ ++ PROGNAME should always be MicroEMACS for a distribution ++ unmodified version. People using MicroEMACS as a shell ++ for other products should change this to reflect their ++ product. Macros can query this via the $progname variable ++*/ ++ ++#define PROGNAME "MicroEMACS" ++#define VERSION "4.00" ++ ++/* Machine/OS definitions */ ++/* [Set one of these!!] */ ++ ++#define AMIGA 0 /* AmigaDOS */ ++#define AOSVS 0 /* Data General AOS/VS */ ++#define AUX 0 /* Apple UNIX for Macintosh */ ++#define AIX 0 /* IBM UNIX for various machines*/ ++#define AVIION 0 /* Data General AViiON */ ++#define BSD 0 /* UNIX BSD 4.2 and ULTRIX */ ++#define FINDER 0 /* Macintosh OS */ ++#define FREEBSD 1 /* FREEBSD 386 version 2 or + */ ++#define HPUX8 0 /* HPUX HP 9000 ver 8 or less */ ++#define HPUX9 0 /* HPUX HP 9000 ver 9 */ ++#define MPE 0 /* HP MPE/XL */ ++#define MSDOS 0 /* MS-DOS */ ++#define WINNT 0 /* MS-Win NT */ ++#define OS2 0 /* Microsoft or IBM OS/2 */ ++#define SMOS 0 /* Supermax UNIX System V */ ++#define SUN 0 /* SUN v4.0 */ ++#define TOS 0 /* ST520, TOS */ ++#define USG 0 /* UNIX system V */ ++#define VMS 0 /* VAX/VMS */ ++#define WMCS 0 /* Wicat's MCS */ ++#define XENIX 0 /* IBM-PC SCO XENIX */ ++ ++/* Compiler definitions */ ++/* [Set one of these!!] */ ++#define ALCYON 0 /* ALCYON Atari ST compiler */ ++#define AZTEC 0 /* Aztec C 4.00e ONLY for the amiga now... */ ++#define DGC 0 /* Data General AOS/VS C... */ ++#define GCC 1 /* the GNU C compiler */ ++#define IC 0 /* Rational Systems Instant C */ ++#define LATTICE 0 /* Lattice 2.14 through 3.0 compilers */ ++#define MSC 0 /* MicroSoft C compile version 3 thru 7 */ ++#define MWC 0 /* Mark Williams C */ ++#define TURBO 0 /* Turbo C and Borland C++ under MSDOS */ ++#define UNIX 0 /* a standard UNIX compiler (cc) */ ++#define ZTC 0 /* Zortech C/C++ 1.02 thru 2.10 under MSDOS */ ++ ++/* Machine stack growth direction. */ ++/* [Set this to 1 if your machine stack grows UP!!!] */ ++/* data general mv/eclipse series stack grows up. */ ++/* dec vax series stack grows down... got it??? */ ++ ++#define STACK_GROWS_UP 0 ++ ++/* Debugging options */ ++#define RAMSIZE 0 /* dynamic RAM memory usage tracking */ ++#define RAMSHOW 0 /* auto dynamic RAM reporting */ ++#define RAMTRCK 0 /* send debug info to MALLOC.DAT */ ++#define DEBUG_SEARCH 0 /* pop some search info on patterns */ ++ ++/* Special keyboard/network definitions */ ++ ++#define ATKBD 0 /* AT-style keyboard with F11, F12 & grey keys */ ++#define WANGPC 0 /* WangPC - mostly escape sequences */ ++#define VT100 1 /* Handle VT100 style keypad - NOT VMS. */ ++#define KEYPAD 0 /* VMS - turn on and off application */ ++ /* keypad automatically */ ++#define XONDATA 0 /* VMS - set to force /NOTTSYNC/NOHOSTSY */ ++#define RMSIO 0 /* VMS - skip the rotten C runtime and */ ++ /* use RMS directly */ ++#define OPTMEM 0 /* VMS 5.0 and up - use a less standard */ ++ /* but more efficient memory allocator */ ++ ++/* Terminal Output definitions */ ++/* [Set one of these!!] */ ++ ++#define ANSI 0 /* ANSI escape sequences */ ++#define DASHER 0 /* DG Dasher 2xx/4xx crts */ ++#define DG10 0 /* Data General system/10 */ ++#define FMR 0 /* Fujitsu FMR series driver */ ++#define HP110 0 /* HP110 screen driver */ ++#define HP150 0 /* HP150 screen driver */ ++#define I55 0 /* IBM PS55 DOS J4.0/V */ ++#define IBMPC 0 /* IBM-PC CGA/MONO/EGA/VGA drvr */ ++#define MAC 0 /* Macintosh */ ++#define NEC 0 /* NEC-9801VM driver */ ++#define OS2NPM 0 /* OS/2 non-Presentation Mgr. */ ++#define SMG 0 /* SMG library on VMS */ ++#define ST52 0 /* Atari 520/1040ST screen */ ++#define TERMCAP 1 /* Use TERMCAP */ ++#define TIPC 0 /* TI Profesional PC driver */ ++#define VT52 0 /* VT52 terminal (Zenith). */ ++#define NTCON 0 /* Windows NT console */ ++#define XVT 0 /* XVT windowing system */ ++#define Z309 0 /* Zenith 100 PC family driver */ ++ ++/* Windowing system style (pick one) */ ++ ++#define WINDOW_TEXT 1 /* [default] Text mode */ ++#define WINDOW_MSWIN 0 /* MicroSoft Windows */ ++#define WINDOW_MSWIN32 0 /* MicroSoft Windows 32 bit API */ ++#define WINDOW_X 0 /* X/Unix */ ++ ++/* Language text options (pick one) */ ++ ++#define ENGLISH 1 /* [default] */ ++#define FRENCH 0 ++#define SPANISH 0 ++#define GERMAN 0 ++#define DUTCH 0 ++#define PLATIN 0 /* Pig Latin */ ++#define JAPAN 0 ++#define LATIN 0 /* real Latin */ ++ ++/* Configuration options */ ++ ++#define TYPEAH 1 /* type ahead causes update to be skipped */ ++#define LOGFLG 0 /* send all executed commands to EMACS.LOG */ ++#define VISMAC 0 /* update display during keyboard macros */ ++#define CTRLZ 0 /* add a ^Z at end of files under MSDOS only */ ++#define CLEAN 0 /* de-alloc memory on exit */ ++#define CALLED 0 /* is emacs a called subroutine? or stand alone */ ++ ++#define REVSTA 1 /* Status line appears in reverse video */ ++#define COLOR 1 /* color commands and windows */ ++ ++#define FILOCK 0 /* file locking under unix BSD 4.2 */ ++#define ISRCH 1 /* Incremental searches like ITS EMACS */ ++#define FLABEL 0 /* function key label code [HP150] */ ++#define CRYPT 1 /* file encryption enabled? */ ++#define MAGIC 1 /* include regular expression matching? */ ++#define MOUSE 1 /* Include routines for mouse actions */ ++#define NOISY 1 /* Use a fancy BELL if it exists */ ++#define CTAGS 1 /* include vi-like tagging? */ ++#define SPEECH 0 /* spoken EMACS, for the sight impared [not ready] */ ++#define VARARG 1 /* use varargs.h for mlwrite() */ ++ ++#if XVT ++#undef COLOR ++#define COLOR 1 /* overide this to be TRUE for XVT always */ ++#endif ++ ++/* Character set options */ ++/* [Set one of these!!] */ ++#define ASCII 1 /* always using ASCII char sequences for now */ ++#define EBCDIC 0 /* later IBM mainfraim versions will use EBCDIC */ ++ ++/* handle constant and voids properly */ ++ ++#if VMS ++#define CONST readonly ++#define VOID void ++#define NOSHARE noshare ++#else ++#if AOSVS ++#define CONST $shared $align(1) /* fake a const */ ++#define VOID ++#define NOSHARE $low32k $align(1) /* attempt to optimize read/write vars. */ ++#else ++ ++#if __STDC__ || MSC || TURBO || GCC || (AMIGA && LATTICE) ++#define CONST const ++#define VOID void ++#define NOSHARE ++#else ++#define CONST ++#if IC ++#define VOID void ++#else ++#define VOID ++#endif ++#define NOSHARE ++#endif ++ ++#endif ++#endif ++ ++/* System dependant library redefinitions, structures and includes */ ++ ++/* multibyte character support? */ ++ ++#if NEC || FMR || I55 ++#define DBCS 1 /* double byte character sets enabled */ ++#define INSDEL 1 /* use insert/delete line display optimizations */ ++ ++/* define DBCS prefix bytes */ ++#define is2char(ch) (((ch&0xff) >= 0x81 && (ch&0xff) <= 0x9f) || ((ch&0xff) >=0xe0 && (ch&0xff) <= 0xfc)) ++ ++#else ++#define DBCS 0 ++#define INSDEL 0 ++#endif ++ ++/* Can we catch the SIGWINCH (the window size change signal)? */ ++ ++#if AIX || HPUX9 || FREEBSD ++#define HANDLE_WINCH 1 ++#else ++#define HANDLE_WINCH 0 ++#endif ++ ++/* Prototypes in use? */ ++ ++#if MSC || TURBO || IC || VMS || GCC || ZTC ++#define PROTO 1 ++#else ++#define PROTO 0 ++#endif ++ ++/* the following define allows me to initialize unions... ++ otherwise we make them structures (like the keybinding table) */ ++ ++#if __STDC__ || MSC || TURBO || IC || ZTC ++#define ETYPE union ++#else ++#define ETYPE struct ++#endif ++ ++/* Instant C can't do stat()s. Arrrg. No file locking for you */ ++#if IC && MSDOS ++#undef FILOCK ++#define FILOCK 0 ++#endif ++ ++/* Mark Williams/Atari has no standard or varargs or directory functions */ ++#if TOS & MWC ++#undef VARARG ++#define VARARG 0 ++#undef FILOCK ++#define FILOCK 0 ++#endif ++ ++/* MS-Windows */ ++ ++#if WINNT || WINDOW_MSWIN || WINDOW_MSWIN32 ++#if WINDOW_MSWIN32 ++#undef WINDOW_MSWIN ++#define WINDOW_MSWIN 1 ++#endif ++#if WINDOW_MSWIN && WINNT ++#undef WINDOW_MSWIN32 ++#define WINDOW_MSWIN32 1 ++#endif ++#undef VOID /* windows.h will wind up defining this */ ++#include /* --------- Huge include file here !!! ---------*/ ++#if NTCON ++#include ++#include ++#include ++#endif ++ ++#undef NEAR ++#define NEAR ++#define DNEAR ++#if MSC || IC ++#undef CDECL ++#define CDECL __cdecl ++#define DUMMYSZ 1 /* dummy size for unsized extern arrays to avoid ++ silly DGROUP fixup */ ++#else ++#if TURBO ++#define DUMMYSZ /* nothing */ ++#else ++#define CDECL _cdecl /* ZTC */ ++#define DUMMYSZ /* nothing */ ++#endif ++#endif ++ ++#if WINNT ++#define EXPORT /* Windows NT doesn't like this */ ++#endif ++ ++#if WINDOW_MSWIN ++#undef TYPEAH ++#define TYPEAH 0 /* typeahead is handled at the term driver level */ ++#undef CALLED ++#define CALLED 1 /* under MS Windows, "main" resides in the sys driver */ ++#if MSC ++#define EXPORT __export ++#else ++#define EXPORT _export /* Fine for TURBO and ZTC */ ++#endif ++#endif ++#else ++ ++/* neither Windows NT nor MS-Windows */ ++ ++#define DUMMYSZ /* nothing */ ++ ++#if MSDOS & (TURBO | MSC | TIPC) ++#define NEAR ++#define DNEAR ++#define PASCAL pascal ++#define CDECL cdecl ++#else ++#if MSDOS & ZTC ++#define NEAR ++#define DNEAR ++#define PASCAL _pascal ++#define CDECL _cdecl ++#else ++#define NEAR ++#define DNEAR ++#define PASCAL ++#define CDECL ++#endif ++#endif ++ ++#endif ++ ++#if TURBO ++#include ++#include ++#undef peek ++#undef poke ++#define peek(a,b,c,d) movedata(a,b,FP_SEG(c),FP_OFF(c),d) ++#define poke(a,b,c,d) movedata(FP_SEG(c),FP_OFF(c),a,b,d) ++#endif ++ ++#if IC ++#include ++#undef peek ++#undef poke ++#define peek(a,b,c,d) movedata(a,b,FP_SEG(c),FP_OFF(c),d) ++#define poke(a,b,c,d) movedata(FP_SEG(c),FP_OFF(c),a,b,d) ++#endif ++ ++#if LATTICE & MSDOS ++/* you may have to remove this one definition with LATTICE version ++ 3.2 and above */ ++#define unsigned ++#endif ++ ++#if IC ++#define inp inportb ++#define outp outportb ++#define intdos(a, b) int86(33, a, b) ++#endif ++ ++#if AZTEC ++#undef putc ++#undef getc ++#if MSDOS ++#define getc a1getc ++#define int86 sysint ++#define intdos(a, b) sysint(33, a, b) ++#define inp inportb ++#define outp outportb ++#else ++#define getc agetc ++#endif ++#define putc aputc ++ ++struct XREG { ++ unsigned ax,bx,cx,dx,si,di,ds,es; ++}; ++ ++struct HREG { ++ char al,ah,bl,bh,cl,ch,dl,dh,d1,d2,e1,e2; ++}; ++ ++union REGS { ++ struct XREG x; ++ struct HREG h; ++}; ++ ++struct SREGS { ++ unsigned cs, ss, ds, es; ++}; ++#endif ++ ++#if MSDOS & MWC ++#include ++#define int86(a, b, c) intcall(b, c, a) ++#define intdos(a, b) intcall(a, b, DOSINT) ++#define inp(a) in(a) ++#define outp(a, b) out(a, b) ++#define movmem(a, b, c) memcpy(b, a, c) ++ ++struct XREG { ++ unsigned int ax,bx,cx,dx,si,di,ds,es,flags; ++}; ++ ++struct HREG { ++ char al,ah,bl,bh,cl,ch,dl,dh; ++ unsigned int ds,es,flags; ++}; ++ ++union REGS { ++ struct XREG x; ++ struct HREG h; ++}; ++#endif ++ ++#if MSDOS & MSC ++#include ++#include ++#define peek(a,b,c,d) movedata(a,b,FP_SEG(c),FP_OFF(c),d) ++#define poke(a,b,c,d) movedata(FP_SEG(c),FP_OFF(c),a,b,d) ++#define movmem(a, b, c) memcpy(b, a, c) ++#define _strrev(a) strrev(a) ++#endif ++ ++#if MSDOS & LATTICE ++#undef CPM ++#undef LATTICE ++#include ++#undef CPM ++#endif ++ ++/* System V doesn't name this the same as others */ ++#if USG | AIX | AUX | SUN | (OS2 & MSC) ++#define movmem(a, b, c) memcpy(b, a, c) ++#endif ++ ++/* this keeps VMS happy */ ++#if VMS ++#define getname xgetname ++#define unlink(a) delete(a) ++#endif ++ ++/* some options for AOS/VS */ ++#if AOSVS ++#define ORMDNI 1 ++#endif ++ ++/* define some ability flags */ ++ ++#if (IBMPC | Z309 | FMR | TIPC) & !(WINDOW_MSWIN | WINDOW_MSWIN32) ++#define MEMMAP 1 ++#else ++#define MEMMAP 0 ++#endif ++ ++#if MSDOS | WINNT | OS2 | USG | AIX | AUX | SMOS | HPUX8 | HPUX9 | BSD | FREEBSD | (TOS & MWC) | WMCS | SUN | MPE ++#define ENVFUNC 1 ++#else ++#define ENVFUNC 0 ++#endif ++ ++#if AUX ++#define RETCHAR '\n' ++#else ++#define RETCHAR '\r' ++#endif ++ ++#if MPE ++#define DIRSEPSTR "." ++#define DIRSEPCHAR '.' ++#else ++#if TOS || MSDOS || WINNT || OS2 ++#define DIRSEPSTR "\\" ++#define DIRSEPCHAR '\\' ++#define DRIVESEPCHAR ':' ++#else ++#define DIRSEPSTR "/" ++#define DIRSEPCHAR '/' ++#define DRIVESEPCHAR '\0' ++#endif ++#endif ++ ++#if VARARG ++#if (GCC == 0) && (USG || AIX || AUX || BSD || FREEBSD || SUN || XENIX || HPUX8 || HPUX9 || AVIION || MPE) ++#define VARG 1 ++#define SARG 0 ++#include ++#else ++#define VARG 0 ++#define SARG 1 ++#include ++#endif ++#endif ++ ++#if ZTC ++#include ++#define movmem(a, b, c) memcpy(b, a, c) ++#endif ++ ++/* Emacs global flag bit definitions (for gflags) */ ++ ++#define GFREAD 1 /* read first file in at startup */ ++#define GFSDRAW 2 /* suppress a screen redraw */ ++#define GFEXIT 4 /* exit from emacs pending */ ++ ++/* internal constants */ ++ ++#define NBINDS 300 /* max # of bound keys */ ++#if AOSVS | VMS | WINNT | SUN | BSD | FREEBSD | USG | ZENIX | HPUX8 | HPUX9 | OS2 ++#define NFILEN 256 ++#else ++#define NFILEN 80 /* # of bytes, file name */ ++#endif ++#define NBUFN 128 /* # of bytes, buffer name */ ++#define NLINE 256 /* # of bytes, input line */ ++#define NSTRING 128 /* # of bytes, string buffers */ ++#define NKBDM 4096 /* # of strokes, keyboard macro */ ++#define NPAT 128 /* # of bytes, pattern */ ++#define HUGE 1000 /* Huge number */ ++#define NLOCKS 256 /* max # of file locks active */ ++#define NCOLORS 16 /* number of supported colors */ ++#define KBLOCK 250 /* sizeof kill buffer chunks */ ++#define NRING 16 /* # of buffers in kill ring */ ++#define NBLOCK 16 /* line block chunk size */ ++#define NVSIZE 16 /* max #chars in a var name */ ++#define NMARKS 16 /* number of marks */ ++#define MAXSYM 32 /* max # chars in symbol to expand */ ++#define MINFLEN 3 /* min # chars to match &func */ ++ ++#define CTRL 0x0100 /* Control flag, or'ed in */ ++#define META 0x0200 /* Meta flag, or'ed in */ ++#define CTLX 0x0400 /* ^X flag, or'ed in */ ++#define SPEC 0x0800 /* special key (function keys) */ ++#define MOUS 0x1000 /* alternative input device (mouse) */ ++#define SHFT 0x2000 /* shifted (for function keys) */ ++#define ALTD 0x4000 /* ALT key... */ ++#define MENU MOUS+SPEC /* menu selection (WINDOW_MSWIN) */ ++ ++#define BINDNUL 0 /* not bound to anything */ ++#define BINDFNC 1 /* key bound to a function */ ++#define BINDBUF 2 /* key bound to a buffer */ ++ ++#ifdef FALSE ++#undef FALSE ++#endif ++#ifdef TRUE ++#undef TRUE ++#endif ++ ++#define FALSE 0 /* False, no, bad, etc. */ ++#define TRUE 1 /* True, yes, good, etc. */ ++#define ABORT 2 /* Death, ^G, abort, etc. */ ++#define FAILD 3 /* not-quite fatal false return */ ++ ++#define STOP 0 /* keyboard macro not in use */ ++#define PLAY 1 /* playing */ ++#define RECORD 2 /* recording */ ++ ++/* Completion types */ ++ ++#define CMP_BUFFER 0 ++#define CMP_COMMAND 1 ++#define CMP_FILENAME 2 ++ ++/* Directive definitions */ ++ ++#define DIF 0 ++#define DELSE 1 ++#define DENDIF 2 ++#define DGOTO 3 ++#define DRETURN 4 ++#define DENDM 5 ++#define DWHILE 6 ++#define DENDWHILE 7 ++#define DBREAK 8 ++#define DFORCE 9 ++ ++#define NUMDIRS 10 ++ ++/* ++ * PTBEG, PTEND, FORWARD, and REVERSE are all toggle-able values for ++ * routines that need directions. ++ */ ++#define PTBEG 0 /* Leave the point at the beginning on search */ ++#define PTEND 1 /* Leave the point at the end on search */ ++#define FORWARD 0 /* do things in a forward direction */ ++#define REVERSE 1 /* do things in a backwards direction */ ++ ++#define FIOSUC 0 /* File I/O, success. */ ++#define FIOFNF 1 /* File I/O, file not found. */ ++#define FIOEOF 2 /* File I/O, end of file. */ ++#define FIOERR 3 /* File I/O, error. */ ++#define FIOMEM 4 /* File I/O, out of memory */ ++#define FIOFUN 5 /* File I/O, eod of file/bad line*/ ++#define FIODEL 6 /* Can't delete/rename file */ ++ ++#if WINDOW_MSWIN ++/* values for the fbusy flag */ ++#define FREADING 1 /* file read in progress */ ++#define FWRITING 2 /* file write in progress */ ++/* if no file activity, the value FALSE is used */ ++#endif ++ ++#define CFCPCN 0x0001 /* Last command was C-P, C-N */ ++#define CFKILL 0x0002 /* Last command was a kill */ ++#define CFSRCH 0x0004 /* last command was a search */ ++#define CFYANK 0x0008 /* last command was a yank */ ++ ++#define SRNORM 0 /* end past, begin front */ ++#define SRBEGIN 1 /* always at front */ ++#define SREND 2 /* always one past end */ ++ ++#define BELL 0x07 /* a bell character */ ++#define TAB 0x09 /* a tab character */ ++ ++#if USG | AIX | AUX | SMOS | HPUX8 | HPUX9 | BSD | FREEBSD | SUN | XENIX | AVIION ++#define PATHCHR ':' ++#else ++#if WMCS || MPE ++#define PATHCHR ',' ++#else ++#define PATHCHR ';' ++#endif ++#endif ++ ++#define INTWIDTH sizeof(int) * 3 ++#define LONGWIDTH sizeof(long) * 3 ++ ++/* Macro argument token types */ ++ ++#define TKNUL 0 /* end-of-string */ ++#define TKARG 1 /* interactive argument */ ++#define TKBUF 2 /* buffer argument */ ++#define TKVAR 3 /* user variables */ ++#define TKENV 4 /* environment variables */ ++#define TKFUN 5 /* function.... */ ++#define TKDIR 6 /* directive */ ++#define TKLBL 7 /* line label */ ++#define TKLIT 8 /* numeric literal */ ++#define TKSTR 9 /* quoted string literal */ ++#define TKCMD 10 /* command name */ ++ ++/* Internal defined functions */ ++ ++#define nextab(a) (a - (a % tabsize)) + tabsize ++ ++/* DIFCASE represents the integer difference between upper ++ and lower case letters. It is an xor-able value, which is ++ fortunate, since the relative positions of upper to lower ++ case letters is the opposite of ascii in ebcdic. ++*/ ++ ++#if ASCII ++#define DIFCASE 0x20 ++#else ++#define DIFCASE 0x40 ++#endif ++ ++/* Dynamic RAM tracking and reporting redefinitions */ ++ ++#if RAMSIZE ++#define malloc allocate ++#define free release ++#else ++#if VMS & OPTMEM ++#define malloc VAXC$MALLOC_OPT ++#define free VAXC$FREE_OPT ++#define calloc VAXC$CALLOC_OPT ++#define realloc VAXC$REALLOC_OPT ++#define cfree VAXC$CFREE_OPT ++#endif ++#endif ++ ++/* under MS Windows, we use dialog boxes to prompt the user for filenames */ ++#if WINDOW_MSWIN ++#define FILENAMEREPLY(p,b,nb) filenamedlg(p,b,nb,TRUE) ++#else ++#define FILENAMEREPLY(p,b,nb) mlreply(p,b,nb) ++#endif ++ ++/* formal parameters to procedures are stored as a linked list ++ of argument names using the following simple structure: ++*/ ++ ++typedef struct PARG { ++ struct PARG *next; /* ptr to next linked argument */ ++ char name[NVSIZE+1]; /* name of the argument */ ++} PARG; ++ ++/* UNDO definitions and types */ ++ ++typedef int OPTYPE; /* type of operation being recorded/played back */ ++ ++#define OP_CMND 1 /* beginning of command */ ++#define OP_DELC 2 /* delete a single character */ ++#define OP_INSC 3 /* insert a single character */ ++#define OP_DSTR 4 /* delete a string of characters */ ++#define OP_ISTR 5 /* insert a string of characters */ ++#define OP_REPC 6 /* replace a character */ ++#define OP_CPOS 7 /* set the cursor position */ ++ ++/* object to be undone! */ ++ ++typedef union OBJECT { ++ char obj_char; /* a character */ ++ char obj_string[1]; /* many characters */ ++ char *obj_sptr; /* a ptr to a character */ ++} OBJECT; ++ ++typedef struct UNDO_OBJ { ++ struct UNDO_OBJ *next; /* ptr to next undo object */ ++ OPTYPE type; /* type of operation */ ++ long line_num; /* line offset from buffer beginning */ ++ int offset; /* offset into that line */ ++ long count; /* repetitions? */ ++ OBJECT undo_obj; /* object to be undone */ ++} UNDO_OBJ; ++ ++/* ++ * There is a window structure allocated for every active display window. The ++ * windows are kept in a big list, in top to bottom screen order, with the ++ * listhead at "wheadp". Each window contains its own values of dot and mark. ++ * The flag field contains some bits that are set by commands to guide ++ * redisplay. Although this is a bit of a compromise in terms of decoupling, ++ * the full blown redisplay is just too expensive to run for every input ++ * character. ++ */ ++typedef struct EWINDOW { ++ struct EWINDOW *w_wndp; /* Next window */ ++ struct BUFFER *w_bufp; /* Buffer displayed in window */ ++ struct LINE *w_linep; /* Top line in the window */ ++ struct LINE *w_dotp; /* Line containing "." */ ++ short w_doto; /* Byte offset for "." */ ++ struct LINE *w_markp[NMARKS]; /* Line containing "mark" */ ++ short w_marko[NMARKS]; /* Byte offset for "mark" */ ++ char w_toprow; /* Origin 0 top row of window */ ++ char w_ntrows; /* # of rows of text in window */ ++ char w_force; /* If NZ, forcing row. */ ++ char w_flag; /* Flags. */ ++#if COLOR ++ char w_fcolor; /* current forground color */ ++ char w_bcolor; /* current background color */ ++#endif ++ int w_fcol; /* first column displayed */ ++} EWINDOW; ++ ++#define WFFORCE 0x01 /* Window needs forced reframe */ ++#define WFMOVE 0x02 /* Movement from line to line */ ++#define WFEDIT 0x04 /* Editing within a line */ ++#define WFHARD 0x08 /* Better to a full display */ ++#define WFMODE 0x10 /* Update mode line. */ ++#define WFCOLR 0x20 /* Needs a color change */ ++ ++/* This structure holds the information about each line appearing on the ++ * video display. The redisplay module uses an array of virtual display ++ * lines. On systems that do not have direct access to display memory, ++ * there is also an array of physical display lines used to minimize ++ * video updating. In most cases, these two arrays are unique. If ++ * WINDOW_MSWIN is 1, there is a pair of such arrays in each SCREEN ++ * structure. ++ */ ++ ++typedef struct VIDEO { ++ int v_flag; /* Flags */ ++#if COLOR ++ int v_fcolor; /* current forground color */ ++ int v_bcolor; /* current background color */ ++ int v_rfcolor; /* requested forground color */ ++ int v_rbcolor; /* requested background color */ ++#endif ++ int v_left; /* left edge of reverse video */ ++ int v_right; /* right right of reverse video */ ++#if INSDEL && MEMMAP == 0 ++ int v_rline; /* requested screen line # */ ++#endif ++ char v_text[1]; /* Screen data. */ ++} VIDEO; ++ ++#define VFNEW 0x0001 /* contents not meaningful yet */ ++#define VFCHG 0x0002 /* Changed flag */ ++#define VFEXT 0x0004 /* extended (beyond column 80) */ ++#define VFCOL 0x0008 /* color change requested */ ++ ++/* ++ * This structure holds the information about each separate "screen" ++ * within the current editing session. On a character based system, these ++ * screens overlay each other, and can individually be brought to front. ++ * On a windowing system like MicroSoft Windows 3.0, OS/2, the Macintosh, ++ * Intuition, Sunview or X-windows, each screen is represented in an OS ++ * window. The terminolgy is wrong in emacs..... ++ * ++ * EMACS The outside World ++ * screen window ++ * window pane ++ */ ++ ++typedef struct SCREEN { ++ struct SCREEN *s_next_screen; /* link to next screen in list */ ++ EWINDOW *s_first_window; /* head of linked list of windows */ ++ EWINDOW *s_cur_window; /* current window in this screen */ ++ char *s_screen_name; /* name of the current window */ ++ short s_roworg; /* row origin of stored screen */ ++ short s_colorg; /* column origin of stored screen */ ++ short s_nrow; /* row width of stored screen */ ++ short s_ncol; /* column origin of stored screen */ ++#if WINDOW_MSWIN ++ VIDEO **s_virtual; /* virtual screen contents */ ++ VIDEO **s_physical; /* physical screen contents */ ++ HWND s_drvhandle; /* handle for the "term" driver */ ++#endif ++} SCREEN; ++ ++/* ++ * Text is kept in buffers. A buffer header, described below, exists for every ++ * buffer in the system. The buffers are kept in a big list, so that commands ++ * that search for a buffer by name can find the buffer header. There is a ++ * safe store for the dot and mark in the header, but this is only valid if ++ * the buffer is not being displayed (that is, if "b_nwnd" is 0). The text for ++ * the buffer is kept in a circularly linked list of lines, with a pointer to ++ * the header line in "b_linep". Buffers may be "Inactive" which means the ++ * files associated with them have not been read in yet. These get read in ++ * at "use buffer" time. ++ * Some buffers are really procedures and have a little extra information ++ * stored with them. ++ */ ++typedef struct BUFFER { ++ struct BUFFER *b_bufp; /* Link to next BUFFER */ ++ struct LINE *b_dotp; /* Link to "." LINE structure */ ++ short b_doto; /* Offset of "." in above LINE */ ++ struct LINE *b_markp[NMARKS]; /* The same as the above two, */ ++ short b_marko[NMARKS]; /* but for the "mark" */ ++ int b_fcol; /* first col to display */ ++ struct LINE *b_linep; /* Link to the header LINE */ ++ struct LINE *b_topline; /* Link to narrowed top text */ ++ struct LINE *b_botline; /* Link to narrowed bottom text */ ++ char b_active; /* window activated flag */ ++ char b_nwnd; /* Count of windows on buffer */ ++ char b_exec; /* how many active executions */ ++ char b_flag; /* Flags */ ++ int b_mode; /* editor mode of this buffer */ ++ char b_fname[NFILEN]; /* File name */ ++ char b_bname[NBUFN]; /* Buffer name */ ++#if CRYPT ++ char b_key[NPAT]; /* current encrypted key */ ++#endif ++ int b_numargs; /* number of arguments to procedure */ ++ PARG *b_args; /* ptr to the first argument */ ++ UNDO_OBJ *undo_head; /* head of undo stack for buffer */ ++ long undo_count; /* # of undo operations stacked */ ++ long last_access; /* time of last access */ ++} BUFFER; ++ ++#define BFINVS 0x01 /* Internal invisable buffer */ ++#define BFCHG 0x02 /* Changed since last write */ ++#define BFTRUNC 0x04 /* buffer was truncated when read */ ++#define BFNAROW 0x08 /* buffer has been narrowed */ ++ ++#define NOTPROC -1 /* buffer is not a procedure */ ++ ++/* mode flags */ ++#define NUMMODES 11 /* # of defined modes */ ++ ++#define MDWRAP 0x0001 /* word wrap */ ++#define MDCMOD 0x0002 /* C indentation and fence match*/ ++#define MDSPELL 0x0004 /* spell error parsing */ ++#define MDEXACT 0x0008 /* Exact matching for searches */ ++#define MDVIEW 0x0010 /* read-only buffer */ ++#define MDOVER 0x0020 /* overwrite mode */ ++#define MDMAGIC 0x0040 /* regular expresions in search */ ++#define MDCRYPT 0x0080 /* encrytion mode active */ ++#define MDASAVE 0x0100 /* auto-save mode */ ++#define MDREPL 0x0200 /* replace mode */ ++#define MDABBR 0x0400 /* abbreviation expansion mode */ ++ ++/* ++ * The starting position of a region, and the size of the region in ++ * characters, is kept in a region structure. Used by the region commands. ++ */ ++typedef struct { ++ struct LINE *r_linep; /* Origin LINE address. */ ++ short r_offset; /* Origin LINE offset. */ ++ long r_size; /* Length in characters. */ ++} REGION; ++ ++/* ++ * All text is kept in circularly linked lists of "LINE" structures. These ++ * begin at the header line (which is the blank line beyond the end of the ++ * buffer). This line is pointed to by the "BUFFER". Each line contains a the ++ * number of bytes in the line (the "used" size), the size of the text array, ++ * and the text. The end of line is not stored as a byte; it's implied. ++ */ ++typedef struct LINE { ++ struct LINE *l_fp; /* Link to the next line */ ++ struct LINE *l_bp; /* Link to the previous line */ ++ short l_size; /* Allocated size */ ++ short l_used; /* Used size */ ++ char l_text[1]; /* A bunch of characters. */ ++} LINE; ++ ++#define lforw(lp) ((lp)->l_fp) ++#define lback(lp) ((lp)->l_bp) ++#if UNIX && (SUN || HPUX8 || HPUX9 || BSD || FREEBSD) ++#define lgetc(lp, n) ((unsigned char)(lp)->l_text[(n)]) ++#else ++#define lgetc(lp, n) ((lp)->l_text[(n)]) ++#endif ++#define lputc(lp, n, c) ((lp)->l_text[(n)]=(c)) ++#define lused(lp) ((lp)->l_used) ++#define lsize(lp) ((lp)->l_size) ++#define ltext(lp) ((lp)->l_text) ++ ++/* This structure is used to hold a user variables name and its ++ current value. These are used for both the global and the ++ local symbol tables. ++*/ ++ ++typedef struct UVAR { ++ char u_name[NVSIZE + 1]; /* name of user variable */ ++ char *u_value; /* value (string) */ ++} UVAR; ++ ++#define VT_NONE 0 /* don't declare it if not found */ ++#define VT_LOCAL 1 /* local to the current procedure */ ++#define VT_GLOBAL 2 /* global to all procedures */ ++ ++/* A UTABLE is a user variable table.... containing some header ++ information and an array of user variable names and definitions. ++ They are held together in a linked list, the last member of ++ the list being the global user variable table. ++*/ ++ ++typedef struct UTABLE { ++ struct UTABLE *next; /* ptr to next user variable table */ ++ int size; /* max number of variables in table */ ++ BUFFER *bufp; /* ptr to buffer holding procedure ++ assosiated with this symbol table. */ ++ UVAR uv[1]; /* list of variable names/definitions ++ in this variable table */ ++} UTABLE; ++ ++/* ++ * The editor communicates with the display using a high level interface. A ++ * "TERM" structure holds useful variables, and indirect pointers to routines ++ * that do useful operations. The low level get and put routines are here too. ++ * This lets a terminal, in addition to having non standard commands, have ++ * funny get and put character code too. The calls might get changed to ++ * "termp->t_field" style in the future, to make it possible to run more than ++ * one terminal type. ++ */ ++#if PROTO ++typedef struct { ++ short t_mrow; /* max number of rows allowable */ ++ short t_nrow; /* current number of rows used */ ++ short t_mcol; /* max Number of columns. */ ++ short t_ncol; /* current Number of columns. */ ++ short t_roworg; /* origin row (normally zero) */ ++ short t_colorg; /* origin column (normally zero)*/ ++ short t_margin; /* min margin for extended lines*/ ++ short t_scrsiz; /* size of scroll region " */ ++ int t_pause; /* # times thru update to pause */ ++ int (PASCAL NEAR *t_open)(void); /* Open terminal at the start.*/ ++ int (PASCAL NEAR *t_close)(void); /* Close terminal at end. */ ++ int (PASCAL NEAR *t_kopen)(void); /* Open keyboard */ ++ int (PASCAL NEAR *t_kclose)(void); /* Close keyboard */ ++ int (PASCAL NEAR *t_getchar)(void); /* Get character from keyboard. */ ++ int (PASCAL NEAR *t_putchar)(int); /* Put character to display.*/ ++ int (PASCAL NEAR *t_flush)(void); /* Flush output buffers. */ ++ int (PASCAL NEAR *t_move)(int, int);/* Move the cursor, origin 0.*/ ++ int (PASCAL NEAR *t_eeol)(void); /* Erase to end of line. */ ++ int (PASCAL NEAR *t_eeop)(void); /* Erase to end of page. */ ++ int (PASCAL NEAR *t_clrdesk)(void); /* Clear the page totally */ ++ int (PASCAL NEAR *t_beep)(void); /* Beep. */ ++ int (PASCAL NEAR *t_rev)(int); /* set reverse video state */ ++ int (PASCAL NEAR *t_rez)(char *); /* change screen resolution */ ++#if COLOR ++ int (PASCAL NEAR *t_setfor)(int); /* set forground color */ ++ int (PASCAL NEAR *t_setback)(int); /* set background color */ ++#endif ++#if INSDEL ++ int (PASCAL NEAR *t_insline)(int); /* insert a screen line */ ++ int (PASCAL NEAR *t_delline)(int); /* delete a screen line */ ++#endif ++#if WINDOW_MSWIN ++ int (PASCAL NEAR *t_sleep)(int); /* go to sleep for a while */ ++ int (PASCAL NEAR *t_newscr)(SCREEN *); /* create new screen display */ ++ int (PASCAL NEAR *t_delscr)(SCREEN *); /* destroy screen display */ ++ int (PASCAL NEAR *t_selscr)(SCREEN *); /* select screen display */ ++ int (PASCAL NEAR *t_sizscr)(SCREEN *); /* resize screen display */ ++ int (PASCAL NEAR *t_topscr)(SCREEN *); /* bring screen to top */ ++#endif ++} TERM; ++#else /* TERM structure, no prototyping.*/ ++ ++typedef struct { ++ short t_mrow; /* max number of rows allowable */ ++ short t_nrow; /* current number of rows used */ ++ short t_mcol; /* max Number of columns. */ ++ short t_ncol; /* current Number of columns. */ ++ short t_roworg; /* origin row (normally zero) */ ++ short t_colorg; /* origin column (normally zero)*/ ++ short t_margin; /* min margin for extended lines*/ ++ short t_scrsiz; /* size of scroll region " */ ++ int t_pause; /* # times thru update to pause */ ++ int (PASCAL NEAR *t_open)(); /* Open terminal at the start. */ ++ int (PASCAL NEAR *t_close)(); /* Close terminal at end. */ ++ int (PASCAL NEAR *t_kopen)(); /* Open keyboard */ ++ int (PASCAL NEAR *t_kclose)(); /* close keyboard */ ++ int (PASCAL NEAR *t_getchar)(); /* Get character from keyboard. */ ++ int (PASCAL NEAR *t_putchar)(); /* Put character to display. */ ++ int (PASCAL NEAR *t_flush)(); /* Flush output buffers. */ ++ int (PASCAL NEAR *t_move)(); /* Move the cursor, origin 0. */ ++ int (PASCAL NEAR *t_eeol)(); /* Erase to end of line. */ ++ int (PASCAL NEAR *t_eeop)(); /* Erase to end of page. */ ++ int (PASCAL NEAR *t_clrdesk)(); /* Clear the page totally */ ++ int (PASCAL NEAR *t_beep)(); /* Beep. */ ++ int (PASCAL NEAR *t_rev)(); /* set reverse video state */ ++ int (PASCAL NEAR *t_rez)(); /* change screen resolution */ ++#if COLOR ++ int (PASCAL NEAR *t_setfor)(); /* set forground color */ ++ int (PASCAL NEAR *t_setback)(); /* set background color */ ++#endif ++#if INSDEL ++ int (PASCAL NEAR *t_insline)(); /* insert a screen line */ ++ int (PASCAL NEAR *t_delline)(); /* delete a screen line */ ++#endif ++#if WINDOW_MSWIN ++ int (PASCAL NEAR *t_sleep)(); /* go to sleep for a while */ ++ int (PASCAL NEAR *t_newscr)(); /* create new screen display */ ++ int (PASCAL NEAR *t_delscr)(); /* destroy screen display */ ++ int (PASCAL NEAR *t_selscr)(); /* select screen display */ ++ int (PASCAL NEAR *t_sizscr)(); /* resize screen display */ ++ int (PASCAL NEAR *t_topscr)(); /* bring screen to top */ ++#endif ++} TERM; ++#endif ++ ++ ++/* TEMPORARY macros for terminal I/O (to be placed in a machine ++ dependant place later) */ ++ ++#define TTopen (*term.t_open) ++#define TTclose (*term.t_close) ++#define TTkopen (*term.t_kopen) ++#define TTkclose (*term.t_kclose) ++#define TTgetc (*term.t_getchar) ++#define TTputc (*term.t_putchar) ++#define TTflush (*term.t_flush) ++#define TTmove (*term.t_move) ++#define TTeeol (*term.t_eeol) ++#define TTeeop (*term.t_eeop) ++#define TTclrdesk (*term.t_clrdesk) ++#define TTbeep (*term.t_beep) ++#define TTrev (*term.t_rev) ++#define TTrez (*term.t_rez) ++#if COLOR ++#define TTforg (*term.t_setfor) ++#define TTbacg (*term.t_setback) ++#endif ++ ++/* Structure for the table of current key bindings */ ++ ++ETYPE EPOINTER { ++ int (PASCAL NEAR *fp)(); /* C routine to invoke */ ++ BUFFER *buf; /* buffer to execute */ ++}; ++ ++typedef struct { ++ short k_code; /* Key code */ ++ short k_type; /* binding type (C function or EMACS buffer) */ ++ ETYPE EPOINTER k_ptr; /* ptr to thing to execute */ ++} KEYTAB; ++ ++/* structure for the name binding table */ ++ ++typedef struct { ++ char *n_name; /* name of function key */ ++ int (PASCAL NEAR *n_func)(); /* function name is bound to */ ++} NBIND; ++ ++/* The editor holds deleted text chunks in the KILL buffer. The ++ kill buffer is logically a stream of ascii characters, however ++ due to its unpredicatable size, it gets implemented as a linked ++ list of chunks. (The d_ prefix is for "deleted" text, as k_ ++ was taken up by the keycode structure) ++*/ ++ ++typedef struct KILL { ++ struct KILL *d_next; /* link to next chunk, NULL if last */ ++ char d_chunk[KBLOCK]; /* deleted text */ ++} KILL; ++ ++/* When emacs's command interpetor needs to get a variable's name, ++ rather than it's value, it is passed back as a VDESC variable ++ description structure. The v_num field is a index into the ++ appropriate variable table. ++*/ ++ ++typedef struct VDESC { ++ int v_type; /* type of variable */ ++ int v_num; /* ordinal pointer to variable in list */ ++ UTABLE *v_ut; /* ptr to appropriate user table if user var */ ++} VDESC; ++ ++/* The !WHILE directive in the execution language needs to ++ stack references to pending whiles. These are stored linked ++ to each currently open procedure via a linked list of ++ the following structure ++*/ ++ ++typedef struct WHBLOCK { ++ LINE *w_begin; /* ptr to !while statement */ ++ LINE *w_end; /* ptr to the !endwhile statement*/ ++ int w_type; /* block type */ ++ struct WHBLOCK *w_next; /* next while */ ++} WHBLOCK; ++ ++#define BTWHILE 1 ++#define BTBREAK 2 ++ ++/* Abbreviations are short symbols that expand to longer strings ++ when typed into a buffer with no intervening whitespace or commands. ++ This structure grows dynamically as needed. ++*/ ++ ++typedef struct ABBREV { ++ struct ABBREV *ab_next; /* pointer to the next abbreviation */ ++ char ab_sym[MAXSYM + 1]; /* name to expand */ ++ char ab_exp[1]; /* string to expand to */ ++} ABBREV; ++ ++/* Search definitions... */ ++ ++/* HICHAR - 1 is the largest character we will deal with. ++ * BMAPSIZE represents the number of bytes in the bitmap. ++ */ ++#define HICHAR 256 ++#define BMAPSIZE HICHAR >> 3 ++ ++/* ++ * Jump table structures. ++ */ ++typedef struct { ++ int jump; ++ int patlen; ++ int delta[HICHAR]; ++ char patrn[NPAT]; ++} DELTA; ++ ++#if MAGIC ++/* ++ * Defines for the metacharacters in the regular expression ++ * search routines. MCNIL and GROUP are used in both search ++ * and replace metachar-arrays. ++ */ ++#define MCNIL 0 /* Like the '\0' for strings.*/ ++#define JMPTABLE 1 ++#define LITSTRING 2 /* Literal string.*/ ++#define LITCHAR 3 /* Literal character.*/ ++#define ANY 4 /* Any character but the .*/ ++#define CCL 5 ++#define NCCL 6 ++#define BOL 7 ++#define EOL 8 ++#define BOWRD 9 ++#define EOWRD 10 ++#define GRPBEG 11 /* Signal start of group.*/ ++#define GRPEND 12 /* Signal end of group.*/ ++#define GROUP 13 /* String of group match.*/ ++#define DITTO 14 /* Replacement with match string.*/ ++ ++#define CLOSURE 0x0100 /* An or-able value for a closure modifier.*/ ++#define CLOSURE_1 0x0200 /* An or-able value for a closure modifier.*/ ++#define ZEROONE 0x0400 /* An or-able value for a closure modifier.*/ ++ ++#define ALLCLOS (CLOSURE | CLOSURE_1 | ZEROONE) ++#define MASKCLO (~ALLCLOS) ++ ++#define MC_ANY '.' /* 'Any' character (except newline).*/ ++#define MC_CCL '[' /* Character class.*/ ++#define MC_NCCL '^' /* Negate character class.*/ ++#define MC_RCCL '-' /* Range in character class.*/ ++#define MC_ECCL ']' /* End of character class.*/ ++#define MC_BOL '^' /* Beginning of line.*/ ++#define MC_EOL '$' /* End of line.*/ ++#define MC_CLOSURE '*' /* Closure - zero to many characters match.*/ ++#define MC_CLOSURE_1 '+' /* Closure - one to many characters match.*/ ++#define MC_ZEROONE '?' /* Closure - zero to one characters match.*/ ++#define MC_DITTO '&' /* Use matched string in replacement.*/ ++#define MC_GRPBEG '(' /* Start of group (begun with a backslash).*/ ++#define MC_GRPEND ')' /* End of group (begun with a backslash).*/ ++#define MC_BOWRD '<' /* Beginning of word (begun with a backslash).*/ ++#define MC_EOWRD '>' /* End of word (begun with a backslash).*/ ++#define MC_ESC '\\' /* Escape - suppress meta-meaning.*/ ++ ++#define MAXGROUPS 10 /* 1 + maximum # of r. e. groups. */ ++#define BIT(n) (1 << (n)) /* An integer with one bit set.*/ ++ ++/* Typedefs that define the bitmap type for searching (EBITMAP), ++ * the meta-character structure for MAGIC mode searching (MC), ++ * and the meta-character structure for MAGIC mode replacment (RMC). ++ */ ++typedef char *EBITMAP; ++ ++typedef struct { ++ short int mc_type; ++ union { ++ int lchar; ++ int group_no; ++ char *lstring; ++ DELTA *jmptable; ++ EBITMAP cclmap; ++ } u; ++} MC; ++ ++typedef struct { ++ short int mc_type; ++ union { ++ int group_no; ++ char *rstr; ++ } u; ++} RMC; ++#endif ++ ++/* ++ This is the message which should be added to any "About MicroEMACS" ++ boxes on any of the machines with window managers. ++ ++ ++ ------------------------------------------ ++ | | ++ | MicroEMACS v4.xx | ++ | for the ............ | ++ | | ++ | Text Editor and Corrector | ++ | | ++ | written by Daniel M. Lawrence | ++ | [based on code by Dave Conroy] | ++ | | ++ | Send inquiries and donations to: | ++ | 617 New York St | ++ | Lafayette, IN 47901 | ++ | | ++ ------------------------------------------ ++*/ diff --git a/editors/uemacs/files/patch-freebsd_makefile b/editors/uemacs/files/patch-freebsd_makefile new file mode 100644 index 000000000000..714cfa903fd4 --- /dev/null +++ b/editors/uemacs/files/patch-freebsd_makefile @@ -0,0 +1,13 @@ +--- freebsd/makefile.orig Sat Nov 18 13:19:02 1995 ++++ freebsd/makefile Wed Mar 25 15:07:14 1998 +@@ -14,8 +14,8 @@ + + # options and arguments to the C compiler + +-#CFLAGS += -I. -I$(HDIR) +-CFLAGS = -O -I. -I$(HDIR) ++CFLAGS += -I. -I$(HDIR) ++#CFLAGS = -O -I. -I$(HDIR) + + # list of header files + diff --git a/editors/uemacs/files/patch-h_epath.h b/editors/uemacs/files/patch-h_epath.h new file mode 100644 index 000000000000..0d567efcbbcc --- /dev/null +++ b/editors/uemacs/files/patch-h_epath.h @@ -0,0 +1,12 @@ +--- h/epath.h.orig Sun Nov 19 03:09:52 1995 ++++ h/epath.h Wed Mar 25 13:57:22 1998 +@@ -68,7 +68,8 @@ + { + ".emacsrc", + "emacs.hlp", +- "/usr/local/", ++ "/usr/local/share/uemacs/", ++ "/usr/local/lib/uemacs/", + "/usr/lib/", + "" + }; diff --git a/editors/uemacs/files/patch-src_bind.c b/editors/uemacs/files/patch-src_bind.c new file mode 100644 index 000000000000..e511ee39a9f2 --- /dev/null +++ b/editors/uemacs/files/patch-src_bind.c @@ -0,0 +1,25 @@ +--- src/bind.c.orig Sun Nov 19 03:09:20 1995 ++++ src/bind.c Wed Mar 25 15:00:37 1998 +@@ -634,7 +634,8 @@ + register char *sp; /* pointer into path spec */ + register int i; /* index */ + static char fspec[NFILEN]; /* full path spec to search */ +- ++ char patha[NFILEN]; ++ + /* if we have an absolute path.. check only there! */ + sp = fname; + while (*sp) { +@@ -689,9 +690,11 @@ + #if OS2 + path = getenv("DPATH"); + #else +- path = getenv("PATH"); ++ strncpy(patha, getenv("PATH"), NFILEN - 25); ++ strcat(patha, ":%%PREFIX%%/share/uemacs"); + #endif + #endif ++ path = patha; + if (path != NULL) + while (*path) { + diff --git a/editors/uemacs/files/patch-src_lock.c b/editors/uemacs/files/patch-src_lock.c new file mode 100644 index 000000000000..ac37d4230303 --- /dev/null +++ b/editors/uemacs/files/patch-src_lock.c @@ -0,0 +1,20 @@ +--- src/lock.c.orig Sun Nov 19 03:09:22 1995 ++++ src/lock.c Wed Mar 25 13:56:13 1998 +@@ -10,10 +10,17 @@ + + #if FILOCK + ++#if BSD ++#undef BSD ++#include ++#endif ++ + #if BSD || FREEBSD || WMCS || SUN || XENIX || HPUX8 || HPUX9 || AVIION || USG || AIX || AUX + #include ++#if !(defined(BSD) && (BSD >= 199103)) + extern int sys_nerr; /* number of system error messages defined */ + extern char *sys_errlist[]; /* list of message texts */ ++#endif + #endif + + #if MSC diff --git a/editors/uemacs/files/patch-src_unix.c b/editors/uemacs/files/patch-src_unix.c new file mode 100644 index 000000000000..b595477251ed --- /dev/null +++ b/editors/uemacs/files/patch-src_unix.c @@ -0,0 +1,25 @@ +--- src/unix.c.orig Sat Nov 13 14:57:12 1999 ++++ src/unix.c Sat Nov 13 15:04:45 1999 +@@ -816,9 +816,19 @@ + exit(1); + } + +- /* Get size from termcap */ +- term.t_nrow = tgetnum("li") - 1; +- term.t_ncol = tgetnum("co"); ++ /* ++ * If LINES and/or COLUMNS are set in the environment then use those ++ * values, otherwise get them from termcap. ++ */ ++ if ((cp = getenv("LINES")) == NULL || sscanf(cp, "%d", ++ &term.t_nrow) != 1) ++ term.t_nrow = tgetnum("li"); ++ term.t_nrow -= 1; ++ ++ if ((cp = getenv("COLUMNS")) == NULL || sscanf(cp, "%d", ++ &term.t_ncol) != 1) ++ term.t_ncol = tgetnum("co"); ++ + if (term.t_nrow < 3 || term.t_ncol < 3) { + puts("Screen size is too small!"); + exit(1); diff --git a/editors/vigor/files/patch-Makefile.in b/editors/vigor/files/patch-Makefile.in new file mode 100644 index 000000000000..0f5d0fab8073 --- /dev/null +++ b/editors/vigor/files/patch-Makefile.in @@ -0,0 +1,11 @@ +--- Makefile.in.orig Mon Jan 17 18:22:56 2000 ++++ Makefile.in Mon Jan 17 18:24:17 2000 +@@ -82,7 +82,7 @@ + ($(mkdir) $(mandir)/cat1 && $(chmod) $(dmode) $(mandir)/cat1) + @echo "Installing man pages: $(mandir) ..." + cd $(mandir)/cat1 && $(rm) -f `echo vi.0 | sed '$(transform)'` +- $(cp) $(srcdir)/docs/USD.doc/vi.man/vi.0 \ ++ $(cp) `echo $(srcdir)/docs/USD.doc/vi.man/vi.0 |sed '$(transform)'` \ + $(mandir)/cat1/`echo vi.0 | sed '$(transform)'` + cd $(mandir)/cat1 && $(chmod) $(fmode) `echo vi.0 | sed '$(transform)'` + cd $(mandir)/cat1 && $(rm) -f `echo ex.0 | sed '$(transform)'` diff --git a/editors/vigor/files/patch-aa b/editors/vigor/files/patch-aa deleted file mode 100644 index 0f5d0fab8073..000000000000 --- a/editors/vigor/files/patch-aa +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in.orig Mon Jan 17 18:22:56 2000 -+++ Makefile.in Mon Jan 17 18:24:17 2000 -@@ -82,7 +82,7 @@ - ($(mkdir) $(mandir)/cat1 && $(chmod) $(dmode) $(mandir)/cat1) - @echo "Installing man pages: $(mandir) ..." - cd $(mandir)/cat1 && $(rm) -f `echo vi.0 | sed '$(transform)'` -- $(cp) $(srcdir)/docs/USD.doc/vi.man/vi.0 \ -+ $(cp) `echo $(srcdir)/docs/USD.doc/vi.man/vi.0 |sed '$(transform)'` \ - $(mandir)/cat1/`echo vi.0 | sed '$(transform)'` - cd $(mandir)/cat1 && $(chmod) $(fmode) `echo vi.0 | sed '$(transform)'` - cd $(mandir)/cat1 && $(rm) -f `echo ex.0 | sed '$(transform)'` -- cgit v1.2.3