summaryrefslogtreecommitdiff
path: root/misc/fep
diff options
context:
space:
mode:
authorchristos <christos@pkgsrc.org>2003-11-07 16:35:51 +0000
committerchristos <christos@pkgsrc.org>2003-11-07 16:35:51 +0000
commit640729785050f0941b0a2d62543e057e6b04ccb5 (patch)
treefafbe7a8cc90bbe2515cf247e6430cf346c18c41 /misc/fep
parente49cfa955cd399b27fb399433765e1f87b102f8d (diff)
downloadpkgsrc-640729785050f0941b0a2d62543e057e6b04ccb5.tar.gz
- kill gcc-3 preprocessor warnings about #{else,endif} TAG
- exit with the child's exit value and with non zero on error
Diffstat (limited to 'misc/fep')
-rw-r--r--misc/fep/distinfo26
-rw-r--r--misc/fep/patches/patch-aa6
-rw-r--r--misc/fep/patches/patch-ab15
-rw-r--r--misc/fep/patches/patch-ac14
-rw-r--r--misc/fep/patches/patch-ad50
-rw-r--r--misc/fep/patches/patch-ae235
-rw-r--r--misc/fep/patches/patch-af14
-rw-r--r--misc/fep/patches/patch-ag15
-rw-r--r--misc/fep/patches/patch-ah15
-rw-r--r--misc/fep/patches/patch-ai14
-rw-r--r--misc/fep/patches/patch-aj79
-rw-r--r--misc/fep/patches/patch-ak154
12 files changed, 499 insertions, 138 deletions
diff --git a/misc/fep/distinfo b/misc/fep/distinfo
index 844b3ce48b0..b05c8508113 100644
--- a/misc/fep/distinfo
+++ b/misc/fep/distinfo
@@ -1,15 +1,17 @@
-$NetBSD: distinfo,v 1.3 2003/03/09 04:39:29 salo Exp $
+$NetBSD: distinfo,v 1.4 2003/11/07 16:35:51 christos Exp $
SHA1 (fep.tar.gz) = 73fa55337b12dba3b91c9895e2c9adbbdfa9d960
Size (fep.tar.gz) = 40137 bytes
-SHA1 (patch-aa) = a24a99e7823e3e00a2356714b8bfed9224618d3a
-SHA1 (patch-ab) = 9f778dfbf3a2c427680edc50ee49bd42444d96f0
-SHA1 (patch-ac) = dca990ac75afa7f34ef9fbd1f58702d7a144a0e0
-SHA1 (patch-ad) = a507e7f8b7d2b21d09f0403fa243fcf7120afa78
-SHA1 (patch-ae) = 2c2fc7c43c4a8d641c76318df76f902ec3ccb62c
-SHA1 (patch-af) = d5e38e18b69ccd81a0d98385f7fb746c5c29b4e2
-SHA1 (patch-ag) = 6d2fd45f147fcad933589e548df939ae097e0239
-SHA1 (patch-ah) = 9e22fa41d866e916090c73c17f234f19d1d47fa3
-SHA1 (patch-ai) = 8b3208fe4d162357b763366bd9c8baa7272d30b5
-SHA1 (patch-aj) = c2d1950ddd1a1683148176c30e086599d824002e
-SHA1 (patch-ak) = 98b33fb196f2a300fa5ce947e466801b8fcf1af4
+SHA1 (patch-aa) = 1f8abf4fd9437fac506274d5bd02e641465ed19d
+SHA1 (patch-ab) = 33ed4137d8dc1006c57b3d2f77c736c5dcfd88f1
+SHA1 (patch-ac) = 35886a142911bc6da8b6661de86ab803d5f506f9
+SHA1 (patch-ad) = bd19298f8277a0385d3612a2a99f9f586eeb156c
+SHA1 (patch-ae) = aa6ca28dac7ebbca2f00513d8f60ef4064e13024
+SHA1 (patch-af) = d4422c9f033e16c8ad137723e4c82f051aad3b7b
+SHA1 (patch-ag) = 1bdc893ab86462fe1347ab8366f105bbed50fe87
+SHA1 (patch-ah) = d63de2c13396fa4657282433cf22f086d6141cdb
+SHA1 (patch-ai) = 409c63c5cb5283735ea83f047f65357caf9e6331
+SHA1 (patch-aj) = 3266b9c80e104290b62460acc73a1c1ab2accee4
+SHA1 (patch-ak) = d1b517c222d26c74c325773220039e1319a57554
+SHA1 (patch-al) = f82284b2ddea4d3ec8cc7d00e8654b1f28354796
+SHA1 (patch-am) = 9d8e7fb850cf08bfe80726a9cfad657adebd130d
diff --git a/misc/fep/patches/patch-aa b/misc/fep/patches/patch-aa
index 68a9037244c..03a5e01e7bf 100644
--- a/misc/fep/patches/patch-aa
+++ b/misc/fep/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.4 2000/02/07 03:18:08 christos Exp $
+$NetBSD: patch-aa,v 1.5 2003/11/07 16:35:51 christos Exp $
---- Makefile.orig Wed Jun 9 22:51:22 1993
-+++ Makefile Sun Feb 6 21:48:47 2000
+--- Makefile.orig 1993-06-09 22:51:22.000000000 -0400
++++ Makefile 2003-11-07 11:13:19.000000000 -0500
@@ -15,17 +15,21 @@
DISTRIBUTION\
= Makefile fep.1 $(HEADER) $(SRC) feprc.sample README
diff --git a/misc/fep/patches/patch-ab b/misc/fep/patches/patch-ab
index 6bee6c49775..f1c80b79e92 100644
--- a/misc/fep/patches/patch-ab
+++ b/misc/fep/patches/patch-ab
@@ -1,7 +1,16 @@
-$NetBSD: patch-ab,v 1.1 2000/02/07 03:18:10 christos Exp $
+$NetBSD: patch-ab,v 1.2 2003/11/07 16:35:51 christos Exp $
---- fep_alias.c.orig Sun Nov 13 01:50:58 1988
-+++ fep_alias.c Sun Feb 6 21:07:44 2000
+--- fep_alias.c.orig 1988-11-13 01:50:58.000000000 -0500
++++ fep_alias.c 2003-11-07 11:23:03.000000000 -0500
+@@ -3,7 +3,7 @@
+ #ifndef lint
+ static char rcsid[]=
+ "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ab,v 1.2 2003/11/07 16:35:51 christos Exp $ (SRA)";
+-#endif lint
++#endif /* lint */
+
+ #include <stdio.h>
+ #include <ctype.h>
@@ -18,7 +18,7 @@
ALIAS alias_top = {"top", "top", (ALIAS *)0};
diff --git a/misc/fep/patches/patch-ac b/misc/fep/patches/patch-ac
index f2e2a3307fe..b4d810b968c 100644
--- a/misc/fep/patches/patch-ac
+++ b/misc/fep/patches/patch-ac
@@ -1,9 +1,13 @@
-$NetBSD: patch-ac,v 1.1 2000/02/07 03:18:10 christos Exp $
+$NetBSD: patch-ac,v 1.2 2003/11/07 16:35:51 christos Exp $
---- fep_com.c.orig Wed May 29 01:31:09 1991
-+++ fep_com.c Sun Feb 6 21:47:53 2000
-@@ -6,7 +6,17 @@
- #endif lint
+--- fep_com.c.orig 1991-05-29 01:31:09.000000000 -0400
++++ fep_com.c 2003-11-07 11:22:46.000000000 -0500
+@@ -3,10 +3,20 @@
+ #ifndef lint
+ static char rcsid[]=
+ "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ac,v 1.2 2003/11/07 16:35:51 christos Exp $ (SRA)";
+-#endif lint
++#endif /* lint */
#include <stdio.h>
+#include <sys/ioctl.h>
diff --git a/misc/fep/patches/patch-ad b/misc/fep/patches/patch-ad
index fd07ab9adaa..af6fa5e2ac5 100644
--- a/misc/fep/patches/patch-ad
+++ b/misc/fep/patches/patch-ad
@@ -1,11 +1,51 @@
-$NetBSD: patch-ad,v 1.2 2000/02/13 14:20:42 dmcmahill Exp $
+$NetBSD: patch-ad,v 1.3 2003/11/07 16:35:51 christos Exp $
---- fep_defs.h.orig Mon May 10 01:23:33 1993
-+++ fep_defs.h Sun Feb 13 09:17:42 2000
-@@ -6,5 +6,5 @@
- #endif lint
+--- fep_defs.h.orig 1993-05-10 01:23:33.000000000 -0400
++++ fep_defs.h 2003-11-07 11:14:52.000000000 -0500
+@@ -3,9 +3,9 @@
+ #ifndef lint
+ # define FEP_DEFS \
+ "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ad,v 1.3 2003/11/07 16:35:51 christos Exp $ (SRA)"
+-#endif lint
++#endif /* lint */
-#define MAXCOMLEN 512 /* maximum command length */
+#define MAXCMDLEN 512 /* maximum command length */
#define MAXARGS 64 /* maximum number of arguments */
#define ON 1 /* on switch */
+ #define OFF 0 /* off switch */
+@@ -31,11 +31,11 @@
+ # define isctlchar(c) (c && !iskanji(c) && (!(c&0140) || c=='\177'))
+ # define iswordchar(c) (c && (iskanji(c) || isalnum(c) || iscntrl(c)))
+ # define isWordchar(c) ((c) && !isspace((c)))
+-#else KANJI
++#else /* KANJI */
+ # define isctlchar(c) (c && (!(c&0140) || c=='\177'))
+ # define iswordchar(c) (isalnum(c) || iscntrl(c))
+ # define isWordchar(c) ((c) && !isspace((c)))
+-#endif KANJI
++#endif /* KANJI */
+ #define unctl(c) (((c)=='\177') ? '?' : ((c) >= 040) ? (c) : (c)|0100)
+ #define toctrl(c) ((c)&~0100)
+ #define ctrl(c) ((c)&037)
+@@ -53,17 +53,17 @@
+ #ifdef KANJI
+ # define CHAR unsigned char
+ # define CHARMASK 0377
+-#else KANJI
++#else /* KANJI */
+ # define CHAR char
+ # define CHARMASK 0177
+-#endif KANJI
++#endif /* KANJI */
+
+ /*
+ * Only one machine I know alloca() works is vax.
+ */
+ #ifdef vax
+ # define ALLOCA
+-#endif vax
++#endif /* vax */
+
+ /*
+ * Typedef's
diff --git a/misc/fep/patches/patch-ae b/misc/fep/patches/patch-ae
index 6fa9416cce3..e64b76f4c43 100644
--- a/misc/fep/patches/patch-ae
+++ b/misc/fep/patches/patch-ae
@@ -1,8 +1,14 @@
-$NetBSD: patch-ae,v 1.2 2003/03/09 04:39:29 salo Exp $
+$NetBSD: patch-ae,v 1.3 2003/11/07 16:35:51 christos Exp $
---- fep_edit.c.orig 1995-01-20 09:16:37.000000000 +0100
-+++ fep_edit.c 2003-03-09 05:26:37.000000000 +0100
-@@ -8,7 +8,17 @@
+--- fep_edit.c.orig 1995-01-20 03:16:37.000000000 -0500
++++ fep_edit.c 2003-11-07 11:25:48.000000000 -0500
+@@ -3,12 +3,22 @@
+ #ifndef lint
+ static char rcsid[]=
+ "$Id: patch-ae,v 1.3 2003/11/07 16:35:51 christos Exp $ (SRA)";
+-#endif lint
++#endif /* lint */
+
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -98,7 +104,12 @@ $NetBSD: patch-ae,v 1.2 2003/03/09 04:39:29 salo Exp $
&& curFuncTab[c] != send_eof
&& ! look_var ("ignore-eof")
&& CommandLine [0] == '\0'
-@@ -426,7 +465,7 @@
+@@ -422,11 +461,11 @@
+ register int i, nbyte = 1, currentNull;
+ #ifdef KANJI
+ CHAR byte2;
+-#endif KANJI
++#endif /* KANJI */
currentNull = strlen (CommandLine);
@@ -107,6 +118,169 @@ $NetBSD: patch-ae,v 1.2 2003/03/09 04:39:29 salo Exp $
errorBell();
return (0);
}
+@@ -441,7 +480,7 @@
+ nbyte = 2;
+ }
+ else
+-#endif KANJI
++#endif /* KANJI */
+ putChar (c);
+ reverse_strcpy (
+ &CommandLine[CurrentPosition] + nbyte,
+@@ -453,7 +492,7 @@
+ if (nbyte > 1) {
+ CommandLine[CurrentPosition - 1] = byte2;
+ }
+-#endif KANJI
++#endif /* KANJI */
+ printS (&CommandLine [CurrentPosition]);
+
+ if (CommandLine[CurrentPosition] != '\0') {
+@@ -557,7 +596,7 @@
+ #ifdef KANJI
+ && !(CurrentPosition + 1 == position
+ && iskanji (CommandLine[CurrentPosition]))
+-#endif KANJI
++#endif /* KANJI */
+ )
+ (void) forward_n_character (1);
+ }
+@@ -581,10 +620,10 @@
+ #ifdef KANJI
+ #define INC(i) if(iskanji(CommandLine[i])) i+=2; else i++;
+ #define DEC(i) if(i>=2 && iskanji_in_string(CommandLine, i-2)) i-=2; else i--;
+-#else KANJI
++#else /* KANJI */
+ #define INC(i) i++
+ #define DEC(i) i--
+-#endif KANJI
++#endif /* KANJI */
+
+ /*
+ * Move cursor to end of line
+@@ -642,7 +681,7 @@
+ i--;
+ }
+ else
+-#endif KANJI
++#endif /* KANJI */
+ putchar (BS);
+ i--;
+ }
+@@ -697,7 +736,7 @@
+ nchars++;
+ }
+ }
+-#else KANJI
++#else /* KANJI */
+ while (n--) {
+ i--, nchars++;
+ while (i > 0 && !iswordchar (CommandLine [i])) {
+@@ -707,7 +746,7 @@
+ i--, nchars++;
+ }
+ }
+-#endif KANJI
++#endif /* KANJI */
+ return (backward_n_character (nchars));
+ }
+
+@@ -758,7 +797,7 @@
+ nchars++;
+ }
+ }
+-#else KANJI
++#else /* KANJI */
+ while (n--) {
+ i--, nchars++;
+ while (i > 0 && !isWordchar (CommandLine [i]))
+@@ -766,7 +805,7 @@
+ while (i > 0 && isWordchar (CommandLine [i - 1]))
+ i--, nchars++;
+ }
+-#endif KANJI
++#endif /* KANJI */
+ return (backward_n_character (nchars));
+ }
+
+@@ -804,7 +843,7 @@
+ (void) putchar (CommandLine[i++]);
+ }
+ else
+-#endif KANJI
++#endif /* KANJI */
+ if (isctlchar(CommandLine[i])) {
+ (void) putchar (unctl (CommandLine [i]));
+ i++;
+@@ -819,7 +858,7 @@
+ (void) putchar (CommandLine[i++]);
+ }
+ else
+-#endif KANJI
++#endif /* KANJI */
+ putChar (CommandLine [i++]);
+ }
+
+@@ -1000,9 +1039,9 @@
+ i -= 2, nbyte += 2;
+ else
+ i -= 1, nbyte += 1;
+-#else KANJI
++#else /* KANJI */
+ nbyte = n;
+-#endif KANJI
++#endif /* KANJI */
+
+ deleteArea = howlong (&CommandLine[CurrentPosition - nbyte], nbyte);
+ restArea = howlong (&CommandLine[CurrentPosition], 0);
+@@ -1075,7 +1114,7 @@
+ nchars++;
+ }
+ }
+-#else KANJI
++#else /* KANJI */
+ while (n--) {
+ i--, nchars++;
+ while (i > 0 && !iswordchar (CommandLine [i]))
+@@ -1083,7 +1122,7 @@
+ while (i > 0 && iswordchar (CommandLine [i - 1]))
+ i--, nchars++;
+ }
+-#endif KANJI
++#endif /* KANJI */
+
+ return (delete_previous_n_character (nchars));
+ }
+@@ -1136,7 +1175,7 @@
+ nchars++;
+ }
+ }
+-#else KANJI
++#else /* KANJI */
+ while (n--) {
+ i--, nchars++;
+ while (i > 0 && !isWordchar (CommandLine [i]))
+@@ -1144,7 +1183,7 @@
+ while (i > 0 && isWordchar (CommandLine [i - 1]))
+ i--, nchars++;
+ }
+-#endif KANJI
++#endif /* KANJI */
+
+ return (delete_previous_n_character (nchars));
+ }
+@@ -1183,9 +1222,9 @@
+ else
+ cp++, nbyte++;
+ }
+-#else KANJI
++#else /* KANJI */
+ nbyte = n;
+-#endif KANJI
++#endif /* KANJI */
+
+ deleteArea = howlong (&CommandLine[CurrentPosition], nbyte);
+ restArea = howlong (&CommandLine[CurrentPosition + nbyte], 0);
@@ -1481,7 +1520,11 @@
*/
send_eof()
@@ -119,6 +293,18 @@ $NetBSD: patch-ae,v 1.2 2003/03/09 04:39:29 salo Exp $
(void) self_insert (c);
if (isctlchar (c))
+@@ -1738,9 +1781,9 @@
+
+ # ifdef ALLOCA
+ fcp = (char *) alloca (strlen (dp->d_name) + 1);
+-# else ALLOCA
++# else /* ALLOCA */
+ fcp = (char *) malloc (strlen (dp->d_name) + 1);
+-# endif ALLOCA
++# endif /* ALLOCA */
+ if (fcp == 0) {
+ fputs ("\r\n", stdout);
+ perror ("alloca:");
@@ -1754,7 +1797,7 @@
fileList [i] = (char *) 0;
@@ -128,6 +314,45 @@ $NetBSD: patch-ae,v 1.2 2003/03/09 04:39:29 salo Exp $
strcpy (buf, start_expand);
p = x_dirname (buf);
+@@ -1801,7 +1844,7 @@
+ # ifndef ALLOCA
+ for (i = 0; fileList [i]; i++)
+ free (fileList [i]);
+-# endif ALLOCA
++# endif /* ALLOCA */
+
+ closedir(dirp);
+ return (0);
+@@ -1929,9 +1972,9 @@
+ if (prefix (prefixstring, dp->d_name)) {
+ # ifdef ALLOCA
+ fcp = (char *) alloca (strlen (dp->d_name) + 1);
+-# else ALLOCA
++# else /* ALLOCA */
+ fcp = (char *) malloc (strlen (dp->d_name) + 1);
+-# endif ALLOCA
++# endif /* ALLOCA */
+ if (fcp == 0) {
+ fputs ("\r\n", stdout);
+ perror ("alloca:");
+@@ -1975,7 +2018,7 @@
+ # ifndef ALLOCA
+ for (i = 0; fileList [i]; i++)
+ free (fileList [i]);
+-# endif ALLOCA
++# endif /* ALLOCA */
+ return;
+ }
+
+@@ -2022,7 +2065,7 @@
+ fputs ("\n", stdout);
+ }
+ }
+-#endif RINFO
++#endif /* RINFO */
+
+ bind_key (ft, func, s, dfunc)
+ FUNC ft[]; /* Function table */
@@ -2032,7 +2075,7 @@
{
char tmps[16];
diff --git a/misc/fep/patches/patch-af b/misc/fep/patches/patch-af
index b4a58e79f31..d98d9c4f57e 100644
--- a/misc/fep/patches/patch-af
+++ b/misc/fep/patches/patch-af
@@ -1,9 +1,13 @@
-$NetBSD: patch-af,v 1.1 2000/02/07 03:18:12 christos Exp $
+$NetBSD: patch-af,v 1.2 2003/11/07 16:35:51 christos Exp $
---- fep_funcs.c.orig Wed May 29 01:31:18 1991
-+++ fep_funcs.c Sun Feb 6 22:14:13 2000
-@@ -6,6 +6,7 @@
- #endif lint
+--- fep_funcs.c.orig 1991-05-29 01:31:18.000000000 -0400
++++ fep_funcs.c 2003-11-07 11:23:22.000000000 -0500
+@@ -3,9 +3,10 @@
+ #ifndef lint
+ static char rcsid[]=
+ "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-af,v 1.2 2003/11/07 16:35:51 christos Exp $ (SRA)";
+-#endif lint
++#endif /* lint */
#include <stdio.h>
+#include "fep_defs.h"
diff --git a/misc/fep/patches/patch-ag b/misc/fep/patches/patch-ag
index 6e509dc14a2..ffb0a3f4705 100644
--- a/misc/fep/patches/patch-ag
+++ b/misc/fep/patches/patch-ag
@@ -1,7 +1,16 @@
-$NetBSD: patch-ag,v 1.1 2000/02/07 03:18:12 christos Exp $
+$NetBSD: patch-ag,v 1.2 2003/11/07 16:35:51 christos Exp $
---- fep_funcs.h.orig Wed May 29 01:31:20 1991
-+++ fep_funcs.h Sun Jan 23 20:05:24 2000
+--- fep_funcs.h.orig 1991-05-29 01:31:20.000000000 -0400
++++ fep_funcs.h 2003-11-07 11:16:49.000000000 -0500
+@@ -3,7 +3,7 @@
+ #ifndef lint
+ # define FEP_FUNCS \
+ "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ag,v 1.2 2003/11/07 16:35:51 christos Exp $ (SRA)"
+-#endif lint
++#endif /* lint */
+
+ /*
+ * command line edit functions
@@ -22,7 +22,7 @@
int delete_previous_word();
int delete_previous_Word();
diff --git a/misc/fep/patches/patch-ah b/misc/fep/patches/patch-ah
index 8a83bc16852..03a27359c46 100644
--- a/misc/fep/patches/patch-ah
+++ b/misc/fep/patches/patch-ah
@@ -1,7 +1,16 @@
-$NetBSD: patch-ah,v 1.1 2000/02/07 03:18:12 christos Exp $
+$NetBSD: patch-ah,v 1.2 2003/11/07 16:35:51 christos Exp $
---- fep_glob.h.orig Sun Aug 28 01:36:43 1988
-+++ fep_glob.h Sun Feb 6 21:01:37 2000
+--- fep_glob.h.orig 1988-08-28 01:36:43.000000000 -0400
++++ fep_glob.h 2003-11-07 11:17:00.000000000 -0500
+@@ -3,7 +3,7 @@
+ #ifndef lint
+ # define FEP_GLOB \
+ "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ah,v 1.2 2003/11/07 16:35:51 christos Exp $ (SRA)"
+-#endif lint
++#endif /* lint */
+
+ extern FUNC *curFuncTab; /* function table */
+ extern FUNC *altFuncTab; /* altanative function table */
@@ -29,6 +29,11 @@
* tty control caracters.
* defined in fep_main.c
diff --git a/misc/fep/patches/patch-ai b/misc/fep/patches/patch-ai
index f2f538c5baf..a1a3dd864a2 100644
--- a/misc/fep/patches/patch-ai
+++ b/misc/fep/patches/patch-ai
@@ -1,9 +1,13 @@
-$NetBSD: patch-ai,v 1.1 2000/02/07 03:18:13 christos Exp $
+$NetBSD: patch-ai,v 1.2 2003/11/07 16:35:51 christos Exp $
---- fep_hist.c.orig Fri Nov 25 06:45:42 1988
-+++ fep_hist.c Sun Feb 6 21:08:02 2000
-@@ -6,6 +6,8 @@
- #endif lint
+--- fep_hist.c.orig 1988-11-25 06:45:42.000000000 -0500
++++ fep_hist.c 2003-11-07 11:20:24.000000000 -0500
+@@ -3,9 +3,11 @@
+ #ifndef lint
+ static char rcsid[]=
+ "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ai,v 1.2 2003/11/07 16:35:51 christos Exp $ (SRA)";
+-#endif lint
++#endif /* lint */
#include <stdio.h>
+#include <stdlib.h>
diff --git a/misc/fep/patches/patch-aj b/misc/fep/patches/patch-aj
index caaafaa43a4..b42551081c2 100644
--- a/misc/fep/patches/patch-aj
+++ b/misc/fep/patches/patch-aj
@@ -1,8 +1,16 @@
-$NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
+$NetBSD: patch-aj,v 1.2 2003/11/07 16:35:51 christos Exp $
---- fep_main.c.orig Wed Jun 9 22:53:06 1993
-+++ fep_main.c Sun Feb 6 22:00:22 2000
-@@ -10,8 +10,17 @@
+--- fep_main.c.orig 1993-06-09 22:53:06.000000000 -0400
++++ fep_main.c 2003-11-07 11:28:23.000000000 -0500
+@@ -3,15 +3,24 @@
+ #ifndef lint
+ static char rcsid[]=
+ "$Id: patch-aj,v 1.2 2003/11/07 16:35:51 christos Exp $ (SRA)";
+-#endif lint
++#endif /* lint */
+
+ #include <stdio.h>
+ #include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
@@ -21,6 +29,15 @@ $NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/errno.h>
+@@ -30,7 +39,7 @@
+ #ifdef STAT
+ static char fep_statrc[] = FEP_STAT;
+ #endif
+-#endif lint
++#endif /* lint */
+
+ char *myself; /* the command name */
+ char *prompt = ""; /* prompt string */
@@ -38,9 +47,9 @@
/* delimiter characters */
int master; /* file discriptor for pty master */
@@ -34,7 +51,7 @@ $NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
int selectnfds; /* max (fileno(stdin), master) + 1*/
int child_pid; /* child pid */
int ptyflag = ON; /* flag to use pty or not */
-@@ -48,21 +57,28 @@
+@@ -48,27 +57,34 @@
int debug = OFF; /* debug switch */
int auto_tty_fix = ON; /* fix tty mode automaticaly */
FILE *script_fp = NULL; /* script file pointer */
@@ -68,6 +85,13 @@ $NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
int lmode_buf; /* local mode */
int line_desc; /* line descipline */
#ifdef KANJI
+ struct jtchars jtchars_buf; /* kanji tty characters */
+ int kmode_buf; /* kanji mode */
+-#endif KANJI
++#endif /* KANJI */
+
+ char master_tty[16]; /* master tty name */
+ char slave_tty[16]; /* slave tty name */
@@ -112,6 +128,10 @@
myself = argv[0];
@@ -124,7 +148,7 @@ $NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
if (errno != EINTR) {
perror ("select");
- terminate();
-+ terminate(0);
++ terminate(1);
}
/*
@@ -144,12 +168,14 @@ $NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
#ifndef USE_TIMEOUT
/*
-@@ -468,7 +488,7 @@
+@@ -467,8 +487,8 @@
+ RETURNCHAR:
if ((c = getc (stdin)) == EOF) {
if (debug)
- printf ("EOF chatched\n");
+- printf ("EOF chatched\n");
- terminate ();
-+ terminate (0);
++ printf ("EOF catched\n");
++ terminate (1);
}
else
return (c & CHARMASK);
@@ -171,7 +197,7 @@ $NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
) {
nbyte = buf_read (master, output_buffer);
if (nbyte > 0) {
-@@ -636,9 +656,11 @@
+@@ -636,21 +656,23 @@
#include <sys/m_wait.h>
#endif
@@ -185,12 +211,17 @@ $NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
struct rusage ru;
if (wait3 (&status, WNOHANG | WUNTRACED, &ru) != child_pid)
-@@ -650,7 +672,7 @@
+ return;
+ if (WIFSTOPPED (status) /* || WIFSIGNALED (status) */) {
+ if (debug) {
+- message ("Child has sttoped!!\n");
++ message ("Child has stopped!!\n");
+ }
suspend ();
return;
}
- terminate ();
-+ terminate (0);
++ terminate (WEXITSTATUS(status));
}
exec_to_command(argv)
@@ -252,7 +283,7 @@ $NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
{
extern int errno;
-@@ -759,9 +808,13 @@
+@@ -759,10 +808,14 @@
if (killpg (child_pid, SIGKILL) < 0)
perror ("kill");
@@ -262,10 +293,12 @@ $NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
ioctl (0, TIOCSETN, (char *) & initial_ttymode);
ioctl (0, TIOCSETC, (char *) & tchars_buf);
ioctl (0, TIOCSLTC, (char *) & ltchars_buf);
+- exit (0);
+#endif
- exit (0);
++ exit (n);
}
+ get_pty_master()
@@ -796,11 +849,15 @@
}
@@ -282,9 +315,12 @@ $NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
#ifdef TIOCGWINSZ
{
-@@ -822,9 +879,13 @@
+@@ -820,11 +877,15 @@
+ # if defined(TIOCKGETC) && defined(TIOCKSETC)
+ ioctl (0, TIOCKGETC, (char *) &jtchars_buf);
# endif
- #endif KANJI
+-#endif KANJI
++#endif /* KANJI */
- stdinmask = 1 << fileno (stdin);
- mastermask = 1 << master;
@@ -315,6 +351,15 @@ $NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
#ifdef KANJI
# if defined(TIOCKGET) && defined(TIOCKSET)
+@@ -851,7 +916,7 @@
+ # if defined(TIOCKGETC) && defined(TIOCKSETC)
+ ioctl (slave, TIOCKSETC, (char *) &jtchars_buf);
+ # endif
+-#endif KANJI
++#endif /* KANJI */
+
+ #ifdef TIOCSWINSZ
+ {
@@ -866,16 +931,19 @@
recover_tty()
@@ -342,7 +387,7 @@ $NetBSD: patch-aj,v 1.1 2000/02/07 03:18:13 christos Exp $
if (kill (child_pid, SIGCONT) < 0 && errno == ESRCH) {
printf ("Where my child has gone?!\n");
- terminate ();
-+ terminate (0);
++ terminate (1);
}
killpg (child_pid, SIGCONT);
kill (0, SIGCONT);
diff --git a/misc/fep/patches/patch-ak b/misc/fep/patches/patch-ak
index 1884491777d..1d701ada29b 100644
--- a/misc/fep/patches/patch-ak
+++ b/misc/fep/patches/patch-ak
@@ -1,79 +1,89 @@
-$NetBSD: patch-ak,v 1.1 2000/02/07 03:18:14 christos Exp $
+$NetBSD: patch-ak,v 1.2 2003/11/07 16:35:51 christos Exp $
---- fep_vi.c.orig Wed May 29 01:31:27 1991
-+++ fep_vi.c Sun Feb 6 21:46:29 2000
-@@ -6,7 +6,17 @@
- #endif lint
+--- fep_set.c.orig 2003-11-07 11:18:26.000000000 -0500
++++ fep_set.c 2003-11-07 11:19:08.000000000 -0500
+@@ -3,7 +3,7 @@
+ #ifndef lint
+ static char rcsid[]=
+ "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ak,v 1.2 2003/11/07 16:35:51 christos Exp $ (SRA)";
+-#endif lint
++#endif /* lint */
#include <stdio.h>
-+#include <sys/ioctl.h>
-+#ifdef TERMIOS
-+#include <termios.h>
-+#ifdef __linux__
-+#ifndef _POSIX_VDISABLE
-+#define _POSIX_VDISABLE '\0'
-+#endif
-+#endif
-+#else
- #include <sgtty.h>
-+#endif
- #include <ctype.h>
#include "fep_defs.h"
- #include "fep_glob.h"
-@@ -107,7 +117,7 @@
- /* ^X-^V */ {"\\^X\\^V", view_buffer},
- /* ^X-^X */ {"\\^X\\^X", expand_file_name},
- /* ^X-? */ {"\\^X?", show_bindings},
-- /* ^X-^C */ {"\\^X\\^C", terminate},
-+ /* ^X-^C */ {"\\^X\\^C", (FUNC)terminate},
- /* ^X-^D */ {"\\^X\\^D", send_eof},
- /* ^X-( */ {"\\^X(", fep_start_script},
- /* ^X-) */ {"\\^X)", fep_end_script},
-@@ -138,7 +148,7 @@
- /* ^X-^L */ {"\\^X\\^L", fep_repaint},
- /* ^X-^X */ {"\\^X\\^X", expand_file_name},
- /* ^X-? */ {"\\^X?", show_bindings},
-- /* ^X-^C */ {"\\^X\\^C", terminate},
-+ /* ^X-^C */ {"\\^X\\^C", (FUNC)terminate},
- /* ^X-^D */ {"\\^X\\^D", send_eof},
- /* ^X-^V */ {"\\^X\\^V", view_buffer},
- /* ^X-( */ {"\\^X(", fep_start_script},
-@@ -161,7 +171,29 @@
- cft[i] = self_insert;
+@@ -67,10 +67,10 @@
+ #ifdef HASH
+ #define HASHNUM 10
+ VAR *var_htab[HASHNUM];
+-#else HASH
++#else /* HASH */
+ VAR var_top = {"top", "top", (char *)0, (VAR *)0};
+ VAR *var_list = &var_top;
+-#endif HASH
++#endif /* HASH */
- #define import(table,key,fn) if((int)key>0)table[(int)key]=fn
--
-+#ifdef TERMIOS
-+ /* Now, using cbreak mode
-+ import (cft, initial_ttymode.c_cc[VSTART], ignore);
-+ import (cft, initial_ttymode.c_cc[VSTOP], ignore);
-+ */
-+ import (cft, initial_ttymode.c_cc[VINTR], insert_and_flush);
-+ import (aft, initial_ttymode.c_cc[VINTR], insert_and_flush);
-+ import (cft, initial_ttymode.c_cc[VQUIT], insert_and_flush);
-+ import (cft, initial_ttymode.c_cc[VEOF], send_eof);
-+#ifdef VSWTC
-+ import (cft, initial_ttymode.c_cc[VSWTC], insert_and_flush);
-+#endif
-+ import (cft, initial_ttymode.c_cc[VSUSP], insert_and_flush);
-+#ifdef VDSUSP
-+ import (cft, initial_ttymode.c_cc[VDSUSP], self_insert);
-+#endif
-+ import (cft, initial_ttymode.c_cc[VREPRINT], reprint);
-+ import (cft, initial_ttymode.c_cc[VDISCARD], self_insert);
-+ import (cft, initial_ttymode.c_cc[VWERASE], delete_previous_word);
-+ import (cft, initial_ttymode.c_cc[VLNEXT], literal_next);
-+ import (cft, initial_ttymode.c_cc[VERASE], delete_previous_character);
-+ import (cft, initial_ttymode.c_cc[VKILL], delete_line);
-+#else
- /* Now, using cbreak mode
- import (cft, tchars_buf.t_startx, ignore);
- import (cft, tchars_buf.t_stopc, ignore);
-@@ -179,6 +211,7 @@
- import (cft, ltchars_buf.t_lnextc, literal_next);
- import (cft, initial_ttymode.sg_erase, delete_previous_character);
- import (cft, initial_ttymode.sg_kill, delete_line);
-+#endif
+ /*
+ * Functions
+@@ -251,12 +251,12 @@
+ for (; vp != (VAR *)0; vp = vp->v_next)
+ printf ("%-16s %s\n", vp->v_name, vp->v_value);
+ }
+-#else HASH
++#else /* HASH */
+ register VAR *vp;
- #undef import
+ for (vp = var_list->v_next; vp; vp = vp->v_next)
+ printf ("%-16s %s\n", vp->v_name, vp->v_value);
+-#endif HASH
++#endif /* HASH */
+ }
+ #ifdef HASH
+@@ -273,7 +273,7 @@
+
+ return (sum % HASHNUM);
+ }
+-#endif HASH
++#endif /* HASH */
+
+ /*
+ * Get pointer to VAR.
+@@ -288,7 +288,7 @@
+ {
+ #ifdef HASH
+ register i = getindex (name);
+-#endif HASH
++#endif /* HASH */
+ VAR *vp, *last = (VAR *)0;
+
+ #ifdef HASH
+@@ -296,7 +296,7 @@
+ if (strcmp (name, vp->v_value) == 0)
+ return (vp);
+ }
+-#else HASH
++#else /* HASH */
+ for (vp = var_list->v_next, last = var_list; vp; last = vp, vp = vp->v_next) {
+ int r;
+
+@@ -309,7 +309,7 @@
+ else if (r < 0)
+ break;
+ }
+-#endif HASH
++#endif /* HASH */
+
+ if (alloc == 0)
+ return (0);
+@@ -327,9 +327,9 @@
+ else {
+ var_htab[i] = vp;
+ }
+-#else HASH
++#else /* HASH */
+ vp->v_next = last->v_next;
+ last->v_next = vp;
+-#endif HASH
++#endif /* HASH */
+ return (vp);
+ }