diff options
author | christos <christos@pkgsrc.org> | 2005-12-10 22:10:47 +0000 |
---|---|---|
committer | christos <christos@pkgsrc.org> | 2005-12-10 22:10:47 +0000 |
commit | 812751529dff340973c0d378232a40b00040f90e (patch) | |
tree | 2c571696cfb9f19becf7b0931e16ca775267ebb2 /misc/fep | |
parent | c51dc000cdec20dee1183962febbb1128092aae9 (diff) | |
download | pkgsrc-812751529dff340973c0d378232a40b00040f90e.tar.gz |
make it work on 64 bit machines
Diffstat (limited to 'misc/fep')
-rw-r--r-- | misc/fep/Makefile | 4 | ||||
-rw-r--r-- | misc/fep/distinfo | 28 | ||||
-rw-r--r-- | misc/fep/patches/patch-aa | 14 | ||||
-rw-r--r-- | misc/fep/patches/patch-ab | 36 | ||||
-rw-r--r-- | misc/fep/patches/patch-ac | 58 | ||||
-rw-r--r-- | misc/fep/patches/patch-ad | 40 | ||||
-rw-r--r-- | misc/fep/patches/patch-ae | 149 | ||||
-rw-r--r-- | misc/fep/patches/patch-af | 18 | ||||
-rw-r--r-- | misc/fep/patches/patch-ag | 17 | ||||
-rw-r--r-- | misc/fep/patches/patch-ah | 17 | ||||
-rw-r--r-- | misc/fep/patches/patch-ai | 26 | ||||
-rw-r--r-- | misc/fep/patches/patch-aj | 305 | ||||
-rw-r--r-- | misc/fep/patches/patch-ak | 42 | ||||
-rw-r--r-- | misc/fep/patches/patch-al | 21 | ||||
-rw-r--r-- | misc/fep/patches/patch-am | 22 |
15 files changed, 601 insertions, 196 deletions
diff --git a/misc/fep/Makefile b/misc/fep/Makefile index 857ae187058..950a20595d5 100644 --- a/misc/fep/Makefile +++ b/misc/fep/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.16 2005/09/29 14:31:11 wiz Exp $ +# $NetBSD: Makefile,v 1.17 2005/12/10 22:10:47 christos Exp $ DISTNAME= fep PKGNAME= fep-1.0 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= misc MASTER_SITES= ftp://ftp.sra.co.jp/pub/cmd/fep/ diff --git a/misc/fep/distinfo b/misc/fep/distinfo index 359cd26a5c1..ff94c2624ed 100644 --- a/misc/fep/distinfo +++ b/misc/fep/distinfo @@ -1,18 +1,18 @@ -$NetBSD: distinfo,v 1.8 2005/09/13 19:40:59 christos Exp $ +$NetBSD: distinfo,v 1.9 2005/12/10 22:10:47 christos Exp $ SHA1 (fep.tar.gz) = 73fa55337b12dba3b91c9895e2c9adbbdfa9d960 RMD160 (fep.tar.gz) = 2a8b9eeecd5c76bec5cdb524ae6c650f298ccbde Size (fep.tar.gz) = 40137 bytes -SHA1 (patch-aa) = ea6b9663acc544e4e57c14f45468a03fc457e353 -SHA1 (patch-ab) = 3d05ad0b25a56ce588e7d31afa7685b18ca94bd6 -SHA1 (patch-ac) = 6f989e576260e95c035cb12c13d43b095414913b -SHA1 (patch-ad) = 696b57cb1b282e01549995b1bbf51b10aa881f0b -SHA1 (patch-ae) = dd89c7124376a77a3809a28025c2975fcdf445ab -SHA1 (patch-af) = a2d8a7c9050ee89f66c211d1ed818091163a8858 -SHA1 (patch-ag) = 1a8cd62babb699ff85ec4e8ec56ef844f7f401c7 -SHA1 (patch-ah) = c08a2af68c59f254cd33969a98d2376047ae4f0f -SHA1 (patch-ai) = f5b420c63c13612182ff5c093277e9a6bd608e48 -SHA1 (patch-aj) = 232e8089aa6ea73e0335df9d25a2268360074531 -SHA1 (patch-ak) = c7e65cb589f9267a11b688a8773704c7e13ab8a3 -SHA1 (patch-al) = b6f57757e7374e3268e45ac0a294c45d0bff7258 -SHA1 (patch-am) = 4b19832075292802c1ddf2fdc9083b7379eb4066 +SHA1 (patch-aa) = f62c430e029bdf8e434d9e492831192209bd6aab +SHA1 (patch-ab) = 7147246ff76e429d7738d5d0be8e3c75459e9352 +SHA1 (patch-ac) = 73738dbcbd081ad614e2bffb2937aa7574321dcb +SHA1 (patch-ad) = 5f8bcaba41ec6670abd0b72795183f73fa147e28 +SHA1 (patch-ae) = b8e52d9b943c98b4ac3a6f2700e644c58f8e9438 +SHA1 (patch-af) = 693871ad76a86e4ed398168a7ca4377a99b10924 +SHA1 (patch-ag) = 31eae85cc799d3af285c9228997ad2f3d7fac144 +SHA1 (patch-ah) = aba9d7f7f5ff8711ef90336ed2323af66751c42a +SHA1 (patch-ai) = 1102903b768dfbba91e2abad739c1d83ef0109bc +SHA1 (patch-aj) = ea21f974f38e5595ca929f4e3338fe17a52af12a +SHA1 (patch-ak) = 3ad3d79b87733fcbdfc234fb486fa01bee5abf8b +SHA1 (patch-al) = cdd6f747b8758fb7b9a3bdc84678533c59f5de6c +SHA1 (patch-am) = 6bc60fae9f09a62c9f6554c4450e63f70b28ad2d diff --git a/misc/fep/patches/patch-aa b/misc/fep/patches/patch-aa index 3aa7dbdd719..a3aad1f1e27 100644 --- a/misc/fep/patches/patch-aa +++ b/misc/fep/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.7 2005/09/13 19:25:57 christos Exp $ +$NetBSD: patch-aa,v 1.8 2005/12/10 22:10:47 christos Exp $ --- Makefile.orig 1993-06-09 22:51:22.000000000 -0400 -+++ Makefile 2004-02-20 09:37:24.000000000 -0500 -@@ -15,17 +15,24 @@ ++++ Makefile 2005-12-10 17:00:00.000000000 -0500 +@@ -15,17 +15,30 @@ DISTRIBUTION\ = Makefile fep.1 $(HEADER) $(SRC) feprc.sample README @@ -23,15 +23,21 @@ $NetBSD: patch-aa,v 1.7 2005/09/13 19:25:57 christos Exp $ +.if exists(/dev/ptmx) +CFLAGS += -DHAVE_PTMX +.endif ++.if exists(/usr/lib/libtermcap.a) +.if exists(/usr/lib/libcompat.a) +LDFLAGS = -ltermcap -lcompat +.else LDFLAGS = -ltermcap +.endif ++.elif exists(/usr/lib/libncurses.a) ++LDFLAGS = -lncurses ++.else ++LDFLAGS = -lcurses ++.endif all: $(TARGET) -@@ -37,7 +44,7 @@ +@@ -37,7 +50,7 @@ install: $(TARGET) install -s $(TARGET) $(INSTDIR) diff --git a/misc/fep/patches/patch-ab b/misc/fep/patches/patch-ab index 0fb29eef114..23bbd219d85 100644 --- a/misc/fep/patches/patch-ab +++ b/misc/fep/patches/patch-ab @@ -1,8 +1,21 @@ -$NetBSD: patch-ab,v 1.3 2003/11/11 10:42:32 wiz Exp $ +$NetBSD: patch-ab,v 1.4 2005/12/10 22:10:47 christos Exp $ ---- fep_alias.c.orig Sun Nov 13 07:50:58 1988 -+++ fep_alias.c -@@ -18,7 +18,7 @@ typedef struct _alias { +--- fep_alias.c.orig 1988-11-13 01:50:58.000000000 -0500 ++++ fep_alias.c 2005-12-10 16:59:27.000000000 -0500 +@@ -3,10 +3,11 @@ + #ifndef lint + static char rcsid[]= + "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ab,v 1.4 2005/12/10 22:10:47 christos Exp $ (SRA)"; +-#endif lint ++#endif /* lint */ + + #include <stdio.h> + #include <ctype.h> ++#include <stdlib.h> + #include "fep_defs.h" + #include "fep_glob.h" + +@@ -18,7 +19,7 @@ ALIAS alias_top = {"top", "top", (ALIAS *)0}; ALIAS *alias_list = &alias_top; @@ -11,7 +24,7 @@ $NetBSD: patch-ab,v 1.3 2003/11/11 10:42:32 wiz Exp $ /* * Functions -@@ -44,7 +44,7 @@ check_alias (comline) +@@ -44,7 +45,7 @@ while (isspace (*comline)) ++comline; @@ -20,3 +33,16 @@ $NetBSD: patch-ab,v 1.3 2003/11/11 10:42:32 wiz Exp $ return ((CHAR *)0); argc = mkargv (comline, argv, MAXARGS); +@@ -214,9 +215,9 @@ + if (alloc == 0) + return (0); + +- vp = (ALIAS *) calloc (sizeof (ALIAS), 1); +- vp->al_value = (char *)0; +- vp->al_next = (ALIAS *) 0; ++ vp = calloc (sizeof (ALIAS), 1); ++ vp->al_value = NULL; ++ vp->al_next = NULL; + vp->al_name = allocAndCopyThere (name); + + vp->al_next = last->al_next; diff --git a/misc/fep/patches/patch-ac b/misc/fep/patches/patch-ac index fe64c4fc125..0eefafbfd58 100644 --- a/misc/fep/patches/patch-ac +++ b/misc/fep/patches/patch-ac @@ -1,9 +1,13 @@ -$NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ +$NetBSD: patch-ac,v 1.4 2005/12/10 22:10:47 christos Exp $ ---- fep_com.c.orig Wed May 29 07:31:09 1991 -+++ fep_com.c -@@ -6,7 +6,17 @@ static char rcsid[]= - #endif lint +--- fep_com.c.orig 1991-05-29 01:31:09.000000000 -0400 ++++ fep_com.c 2005-12-10 16:59:27.000000000 -0500 +@@ -3,11 +3,23 @@ + #ifndef lint + static char rcsid[]= + "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ac,v 1.4 2005/12/10 22:10:47 christos Exp $ (SRA)"; +-#endif lint ++#endif /* lint */ #include <stdio.h> +#include <sys/ioctl.h> @@ -18,9 +22,12 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ #include <sgtty.h> +#endif #include <ctype.h> ++#include <inttypes.h> ++#include <stdlib.h> #include <sys/param.h> #include <sys/file.h> -@@ -31,7 +41,7 @@ executeBuiltInFunction (comline, more) + #include <sys/stat.h> +@@ -31,7 +43,7 @@ char *comline, **more; { register FunctionTableEnt *ftp; @@ -29,7 +36,7 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ char *search_string(); int argc; -@@ -93,7 +103,7 @@ is_same_command (a, b) +@@ -93,7 +105,7 @@ while (*a && *b && *a == *b) ++a, ++b; @@ -38,7 +45,7 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ return 1; else return 0; -@@ -295,7 +305,7 @@ unalias (comline) +@@ -295,7 +307,7 @@ set (comline) char *comline; { @@ -47,7 +54,7 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ char *cp, *index(); char *argv[MAXARGS]; int argc; -@@ -352,8 +362,13 @@ unset(comline) +@@ -352,8 +364,13 @@ extern int Transparency; extern int Through; @@ -63,7 +70,7 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ extern int master, slave; extern char slave_tty[]; -@@ -368,7 +383,11 @@ toggle_through() +@@ -368,7 +385,11 @@ { int r; int slave_fd; @@ -75,7 +82,7 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ if (Through == OFF) { -@@ -378,15 +397,26 @@ toggle_through() +@@ -378,15 +399,26 @@ return; } @@ -102,7 +109,7 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ if (r < 0) { perror (slave_tty); (void) close (slave_fd); -@@ -394,7 +424,11 @@ toggle_through() +@@ -394,7 +426,11 @@ (void) close (slave_fd); } else @@ -114,7 +121,7 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ if (r < 0) { printf ("Can't change pty mode.\n"); -@@ -410,7 +444,11 @@ toggle_through() +@@ -410,7 +446,11 @@ fix_transparency() { int r; @@ -126,7 +133,7 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ if (Through) return; -@@ -418,11 +456,17 @@ fix_transparency() +@@ -418,11 +458,17 @@ if (slave < 0) return; @@ -144,7 +151,7 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ if (r < 0) { perror (slave_tty); return; -@@ -432,9 +476,19 @@ fix_transparency() +@@ -432,9 +478,19 @@ * If find slave tty mode is cbreak or raw, fix tty mode of stdout to * same mode as slave and set Transparency ON. */ @@ -165,7 +172,7 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ if (r < 0) { perror ("stdout"); return; -@@ -445,7 +499,11 @@ fix_transparency() +@@ -445,7 +501,11 @@ } else { if (Transparency == ON) { @@ -178,7 +185,20 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ if (r < 0) { perror ("stdout"); return; -@@ -738,9 +796,9 @@ char *line; +@@ -623,10 +683,10 @@ + { + MORE *mp; + +- mp = (MORE *) malloc (sizeof (MORE)); ++ mp = malloc (sizeof (MORE)); + + if (mp == 0) +- return ((MORE*)0); ++ return (NULL); + else { + mp->cur_line = 0; + mp->max_line = maxline; +@@ -738,9 +798,9 @@ fep_pwd (line) char *line; { @@ -190,7 +210,7 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ printf ("%s\n", cwd); } -@@ -755,7 +813,7 @@ fep_echo (comline) +@@ -755,7 +815,7 @@ argc = mkargv (comline, argv, MAXARGS); argp = &argv[1]; @@ -199,7 +219,7 @@ $NetBSD: patch-ac,v 1.3 2003/11/11 10:42:32 wiz Exp $ putnewline = 0; ++argp; } -@@ -791,7 +849,7 @@ fep_command (comline) +@@ -791,7 +851,7 @@ int argc; int i; char **argp; diff --git a/misc/fep/patches/patch-ad b/misc/fep/patches/patch-ad index 5899a21e0fb..a1ed5451380 100644 --- a/misc/fep/patches/patch-ad +++ b/misc/fep/patches/patch-ad @@ -1,15 +1,21 @@ -$NetBSD: patch-ad,v 1.4 2003/11/11 10:42:32 wiz Exp $ +$NetBSD: patch-ad,v 1.5 2005/12/10 22:10:47 christos Exp $ ---- fep_defs.h.orig Mon May 10 07:23:33 1993 -+++ fep_defs.h -@@ -6,5 +6,5 @@ - #endif lint +--- fep_defs.h.orig 1993-05-10 01:23:33.000000000 -0400 ++++ fep_defs.h 2005-12-10 16:59:27.000000000 -0500 +@@ -3,9 +3,9 @@ + #ifndef lint + # define FEP_DEFS \ + "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ad,v 1.5 2005/12/10 22:10:47 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 */ -@@ -32,9 +32,9 @@ + #define OFF 0 /* off switch */ +@@ -31,21 +31,21 @@ + # 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 @@ -21,7 +27,23 @@ $NetBSD: patch-ad,v 1.4 2003/11/11 10:42:32 wiz Exp $ +#endif /* KANJI */ #define unctl(c) (((c)=='\177') ? '?' : ((c) >= 040) ? (c) : (c)|0100) #define toctrl(c) ((c)&~0100) -@@ -54,8 +54,8 @@ + #define ctrl(c) ((c)&037) + +-#define INDIRECTED (1<<(sizeof(char*)*8-1)) ++#define INDIRECTED (((intptr_t)1)<<(sizeof(char*)*8-1)) + /* this is actually 0x80000000 on 32 bit machine, + that addresses kernel address space */ +-#define isIndirect(f) ((u_int)(f)&(u_int)INDIRECTED) +-#define setIndirect(f) (FUNC)((u_int)(f)|(u_int)INDIRECTED) +-#define maskIndirect(f) (FUNC *)((u_int)(f)&~(u_int)INDIRECTED) ++#define isIndirect(f) ((intptr_t)(f)&(intptr_t)INDIRECTED) ++#define setIndirect(f) (FUNC)((intptr_t)(f)|(intptr_t)INDIRECTED) ++#define maskIndirect(f) (FUNC *)((intptr_t)(f)&~(intptr_t)INDIRECTED) + + /* + * Type of character +@@ -53,17 +53,17 @@ + #ifdef KANJI # define CHAR unsigned char # define CHARMASK 0377 -#else KANJI @@ -32,10 +54,12 @@ $NetBSD: patch-ad,v 1.4 2003/11/11 10:42:32 wiz Exp $ +#endif /* KANJI */ /* -@@ -64,5 +64,5 @@ + * 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 21550d85ecc..08a1b0384d1 100644 --- a/misc/fep/patches/patch-ae +++ b/misc/fep/patches/patch-ae @@ -1,12 +1,19 @@ -$NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ +$NetBSD: patch-ae,v 1.5 2005/12/10 22:10:47 christos Exp $ ---- fep_edit.c.orig Fri Jan 20 09:16:37 1995 -+++ fep_edit.c -@@ -8,7 +8,17 @@ static char rcsid[]= +--- fep_edit.c.orig 1995-01-20 03:16:37.000000000 -0500 ++++ fep_edit.c 2005-12-10 16:59:27.000000000 -0500 +@@ -3,13 +3,25 @@ + #ifndef lint + static char rcsid[]= + "$Id: patch-ae,v 1.5 2005/12/10 22:10:47 christos Exp $ (SRA)"; +-#endif lint ++#endif /* lint */ + #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> +#include <sys/ioctl.h> ++#include <inttypes.h> +#ifdef TERMIOS +#include <termios.h> +#ifdef __linux__ @@ -18,9 +25,11 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ #include <sgtty.h> +#endif #include <sys/time.h> ++#include <stdlib.h> #include <ctype.h> #include <sys/dir.h> -@@ -25,7 +35,7 @@ int MarkPosition = -1; /* Marked positi + #include <sys/file.h> +@@ -25,7 +37,7 @@ EDITMODE editmode = NOTYET; /* edtimode EMACS, VI */ EDITSTATUS editstatus = NOTEDITING;/* EDITING, NOTEDITING */ @@ -29,7 +38,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ int NeedNewLine; /* add new line flag */ int NeedSave; /* need to save to history */ int Transparency = OFF; /* transparent flag */ -@@ -86,7 +96,7 @@ BINDENT emacsBindings[] = { +@@ -86,7 +98,7 @@ /* ^X-^V */ {"\\^X\\^V", view_buffer}, /* ^X-^K */ {"\\^X\\^K", kill_to_top_of_line}, /* ^X-^L */ {"\\^X\\^L", fep_repaint}, @@ -38,7 +47,33 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ /* ^X-^D */ {"\\^X\\^D", send_eof}, /* ^X-( */ {"\\^X(", fep_start_script}, /* ^X-) */ {"\\^X)", fep_end_script}, -@@ -192,6 +202,30 @@ initEmacsBindings (cft, aft) +@@ -99,9 +111,9 @@ + init_bind_table () + { + +- curFuncTab = (FUNC *) calloc (sizeof (FUNC), 256); +- altFuncTab = (FUNC *) calloc (sizeof (FUNC), 256); +- if (curFuncTab == 0 || altFuncTab == 0) { ++ curFuncTab = calloc (sizeof (FUNC), 256); ++ altFuncTab = calloc (sizeof (FUNC), 256); ++ if (curFuncTab == NULL || altFuncTab == NULL) { + printf ("Can't allocate space for function table\n"); + exit (1); + } +@@ -167,9 +179,9 @@ + /* + * Initialize command line buffer + */ +- CommandLine = (CHAR *) calloc (maxline, 1); +- KillBuffer = (CHAR *) calloc (maxline, 1); +- if (CommandLine == 0 || KillBuffer == 0) { ++ CommandLine = calloc (maxline, 1); ++ KillBuffer = calloc (maxline, 1); ++ if (CommandLine == NULL || KillBuffer == NULL) { + perror ("Edit line buffer"); + exit (1); + } +@@ -192,6 +204,30 @@ #define import(table,key,fn) if((int)key>0)table[(int)key]=fn @@ -69,7 +104,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ /* Now, using cbreak mode import (cft, tchars_buf.t_startc, ignore); import (cft, tchars_buf.t_stopc, ignore); -@@ -212,6 +246,7 @@ initEmacsBindings (cft, aft) +@@ -212,6 +248,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); @@ -77,7 +112,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ #undef import -@@ -257,7 +292,7 @@ RETRY: +@@ -257,7 +294,7 @@ */ swallow_output(); @@ -86,7 +121,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ ++redirect_line; execute_command = CommandLine; goto RETURN; -@@ -301,7 +336,11 @@ RETRY: +@@ -301,7 +338,11 @@ * call send_eof */ if ( @@ -98,7 +133,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ && curFuncTab[c] != send_eof && ! look_var ("ignore-eof") && CommandLine [0] == '\0' -@@ -422,11 +461,11 @@ self_insert(c) +@@ -422,11 +463,11 @@ register int i, nbyte = 1, currentNull; #ifdef KANJI CHAR byte2; @@ -112,7 +147,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ errorBell(); return (0); } -@@ -441,7 +480,7 @@ self_insert(c) +@@ -441,7 +482,7 @@ nbyte = 2; } else @@ -121,7 +156,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ putChar (c); reverse_strcpy ( &CommandLine[CurrentPosition] + nbyte, -@@ -453,7 +492,7 @@ self_insert(c) +@@ -453,7 +494,7 @@ if (nbyte > 1) { CommandLine[CurrentPosition - 1] = byte2; } @@ -130,7 +165,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ printS (&CommandLine [CurrentPosition]); if (CommandLine[CurrentPosition] != '\0') { -@@ -557,7 +596,7 @@ moveto (position) +@@ -557,7 +598,7 @@ #ifdef KANJI && !(CurrentPosition + 1 == position && iskanji (CommandLine[CurrentPosition])) @@ -139,7 +174,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ ) (void) forward_n_character (1); } -@@ -581,10 +620,10 @@ beginning_of_line() +@@ -581,10 +622,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--; @@ -152,7 +187,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ /* * Move cursor to end of line -@@ -642,7 +681,7 @@ backward_n_character(n) +@@ -642,7 +683,7 @@ i--; } else @@ -161,7 +196,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ putchar (BS); i--; } -@@ -697,7 +736,7 @@ backward_n_word (n) +@@ -697,7 +738,7 @@ nchars++; } } @@ -170,7 +205,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ while (n--) { i--, nchars++; while (i > 0 && !iswordchar (CommandLine [i])) { -@@ -707,7 +746,7 @@ backward_n_word (n) +@@ -707,7 +748,7 @@ i--, nchars++; } } @@ -179,7 +214,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ return (backward_n_character (nchars)); } -@@ -758,7 +797,7 @@ backward_n_Word (n) +@@ -758,7 +799,7 @@ nchars++; } } @@ -188,7 +223,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ while (n--) { i--, nchars++; while (i > 0 && !isWordchar (CommandLine [i])) -@@ -766,7 +805,7 @@ backward_n_Word (n) +@@ -766,7 +807,7 @@ while (i > 0 && isWordchar (CommandLine [i - 1])) i--, nchars++; } @@ -197,7 +232,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ return (backward_n_character (nchars)); } -@@ -804,7 +843,7 @@ forward_n_character(n) +@@ -804,7 +845,7 @@ (void) putchar (CommandLine[i++]); } else @@ -206,7 +241,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ if (isctlchar(CommandLine[i])) { (void) putchar (unctl (CommandLine [i])); i++; -@@ -819,7 +858,7 @@ forward_n_character(n) +@@ -819,7 +860,7 @@ (void) putchar (CommandLine[i++]); } else @@ -215,7 +250,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ putChar (CommandLine [i++]); } -@@ -1000,9 +1039,9 @@ delete_previous_n_character(n) +@@ -1000,9 +1041,9 @@ i -= 2, nbyte += 2; else i -= 1, nbyte += 1; @@ -227,7 +262,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ deleteArea = howlong (&CommandLine[CurrentPosition - nbyte], nbyte); restArea = howlong (&CommandLine[CurrentPosition], 0); -@@ -1075,7 +1114,7 @@ delete_previous_n_word(n) +@@ -1075,7 +1116,7 @@ nchars++; } } @@ -236,7 +271,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ while (n--) { i--, nchars++; while (i > 0 && !iswordchar (CommandLine [i])) -@@ -1083,7 +1122,7 @@ delete_previous_n_word(n) +@@ -1083,7 +1124,7 @@ while (i > 0 && iswordchar (CommandLine [i - 1])) i--, nchars++; } @@ -245,7 +280,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ return (delete_previous_n_character (nchars)); } -@@ -1136,7 +1175,7 @@ delete_previous_n_Word(n) +@@ -1136,7 +1177,7 @@ nchars++; } } @@ -254,7 +289,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ while (n--) { i--, nchars++; while (i > 0 && !isWordchar (CommandLine [i])) -@@ -1144,7 +1183,7 @@ delete_previous_n_Word(n) +@@ -1144,7 +1185,7 @@ while (i > 0 && isWordchar (CommandLine [i - 1])) i--, nchars++; } @@ -263,7 +298,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ return (delete_previous_n_character (nchars)); } -@@ -1183,9 +1222,9 @@ delete_next_n_character (n) +@@ -1183,9 +1224,9 @@ else cp++, nbyte++; } @@ -275,7 +310,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ deleteArea = howlong (&CommandLine[CurrentPosition], nbyte); restArea = howlong (&CommandLine[CurrentPosition + nbyte], 0); -@@ -1481,7 +1520,11 @@ insert_and_flush(c) +@@ -1481,7 +1522,11 @@ */ send_eof() { @@ -287,19 +322,24 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ (void) self_insert (c); if (isctlchar (c)) -@@ -1738,9 +1781,9 @@ expand_file_name () +@@ -1737,11 +1782,11 @@ + char *fcp; # ifdef ALLOCA - fcp = (char *) alloca (strlen (dp->d_name) + 1); +- fcp = (char *) alloca (strlen (dp->d_name) + 1); -# else ALLOCA -+# else /* ALLOCA */ - fcp = (char *) malloc (strlen (dp->d_name) + 1); +- fcp = (char *) malloc (strlen (dp->d_name) + 1); -# endif ALLOCA +- if (fcp == 0) { ++ fcp = alloca (strlen (dp->d_name) + 1); ++# else /* ALLOCA */ ++ fcp = malloc (strlen (dp->d_name) + 1); +# endif /* ALLOCA */ - if (fcp == 0) { ++ if (fcp == NULL) { fputs ("\r\n", stdout); perror ("alloca:"); -@@ -1754,7 +1797,7 @@ expand_file_name () + reprint (); +@@ -1754,7 +1799,7 @@ fileList [i] = (char *) 0; if (*start_expand == '~' && look_var ("expand-tilde")) { @@ -308,7 +348,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ strcpy (buf, start_expand); p = x_dirname (buf); -@@ -1801,7 +1844,7 @@ expand_file_name () +@@ -1801,7 +1846,7 @@ # ifndef ALLOCA for (i = 0; fileList [i]; i++) free (fileList [i]); @@ -317,19 +357,24 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ closedir(dirp); return (0); -@@ -1929,9 +1972,9 @@ ls (dirp, prefixstring) +@@ -1928,11 +1973,11 @@ + continue; if (prefix (prefixstring, dp->d_name)) { # ifdef ALLOCA - fcp = (char *) alloca (strlen (dp->d_name) + 1); +- fcp = (char *) alloca (strlen (dp->d_name) + 1); -# else ALLOCA -+# else /* ALLOCA */ - fcp = (char *) malloc (strlen (dp->d_name) + 1); +- fcp = (char *) malloc (strlen (dp->d_name) + 1); -# endif ALLOCA +- if (fcp == 0) { ++ fcp = alloca (strlen (dp->d_name) + 1); ++# else /* ALLOCA */ ++ fcp = malloc (strlen (dp->d_name) + 1); +# endif /* ALLOCA */ - if (fcp == 0) { ++ if (fcp == NULL) { fputs ("\r\n", stdout); perror ("alloca:"); -@@ -1975,7 +2018,7 @@ BACK: + reprint (); +@@ -1975,7 +2020,7 @@ # ifndef ALLOCA for (i = 0; fileList [i]; i++) free (fileList [i]); @@ -338,7 +383,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ return; } -@@ -2022,7 +2065,7 @@ list_remote_file (host, pattern) +@@ -2022,7 +2067,7 @@ fputs ("\n", stdout); } } @@ -347,7 +392,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ bind_key (ft, func, s, dfunc) FUNC ft[]; /* Function table */ -@@ -2032,7 +2075,7 @@ bind_key (ft, func, s, dfunc) +@@ -2032,7 +2077,7 @@ { char tmps[16]; @@ -356,7 +401,7 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ tmps[0] = toctrl (s[2]); strcpy (&tmps[1], &s[3]); s = tmps; -@@ -2042,7 +2085,7 @@ bind_key (ft, func, s, dfunc) +@@ -2042,7 +2087,7 @@ * If the string contain only one character, put the function to * appropriate position in the table. */ @@ -365,3 +410,17 @@ $NetBSD: patch-ae,v 1.4 2003/11/11 10:42:32 wiz Exp $ if (isIndirect (ft[(int) *s])) free (maskIndirect (ft[(int) *s])); +@@ -2059,11 +2104,11 @@ + if (! (isIndirect (ft[(int) *s]))) { + register int i; + +- nft = (FUNC *) calloc (sizeof (FUNC), 256); ++ nft = calloc (sizeof (FUNC), 256); + /* + * If failed in allocating, return 0. + */ +- if (nft == 0) ++ if (nft == NULL) + return (0); + + /* diff --git a/misc/fep/patches/patch-af b/misc/fep/patches/patch-af index 18b42b09251..339b2d6b44c 100644 --- a/misc/fep/patches/patch-af +++ b/misc/fep/patches/patch-af @@ -1,16 +1,20 @@ -$NetBSD: patch-af,v 1.3 2003/11/11 10:42:32 wiz Exp $ +$NetBSD: patch-af,v 1.4 2005/12/10 22:10:47 christos Exp $ ---- fep_funcs.c.orig Wed May 29 07:31:18 1991 -+++ fep_funcs.c -@@ -6,6 +6,7 @@ static char rcsid[]= - #endif lint +--- fep_funcs.c.orig 1991-05-29 01:31:18.000000000 -0400 ++++ fep_funcs.c 2005-12-10 16:59:27.000000000 -0500 +@@ -3,9 +3,10 @@ + #ifndef lint + static char rcsid[]= + "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-af,v 1.4 2005/12/10 22:10:47 christos Exp $ (SRA)"; +-#endif lint ++#endif /* lint */ #include <stdio.h> +#include "fep_defs.h" #include "fep_funcs.h" /* -@@ -94,7 +95,7 @@ FunctionTableEnt FunctionNameTable[] = { +@@ -94,7 +95,7 @@ "Expand file name"}, {list_file_name, "list-file-name", "List file name"}, @@ -19,7 +23,7 @@ $NetBSD: patch-af,v 1.3 2003/11/11 10:42:32 wiz Exp $ "Terminate fep"}, {suspend, "suspend", "Suspend fep"}, -@@ -193,7 +194,7 @@ FunctionTableEnt BuiltinFuncTable[] = { +@@ -193,7 +194,7 @@ "Operation \"else\""}, {fep_endif, "fep-endif", "Operation \"endif\""}, diff --git a/misc/fep/patches/patch-ag b/misc/fep/patches/patch-ag index c427d3ad4e1..b8ae3e7744b 100644 --- a/misc/fep/patches/patch-ag +++ b/misc/fep/patches/patch-ag @@ -1,8 +1,17 @@ -$NetBSD: patch-ag,v 1.3 2003/11/11 10:42:32 wiz Exp $ +$NetBSD: patch-ag,v 1.4 2005/12/10 22:10:47 christos Exp $ ---- fep_funcs.h.orig Wed May 29 07:31:20 1991 -+++ fep_funcs.h -@@ -22,7 +22,7 @@ int delete_previous_character(); +--- fep_funcs.h.orig 1991-05-29 01:31:20.000000000 -0400 ++++ fep_funcs.h 2005-12-10 16:59:27.000000000 -0500 +@@ -3,7 +3,7 @@ + #ifndef lint + # define FEP_FUNCS \ + "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ag,v 1.4 2005/12/10 22:10:47 christos Exp $ (SRA)" +-#endif lint ++#endif /* lint */ + + /* + * command line edit functions +@@ -22,7 +22,7 @@ int delete_previous_word(); int delete_previous_Word(); int delete_to_kill_buffer(); diff --git a/misc/fep/patches/patch-ah b/misc/fep/patches/patch-ah index 28278e6fcd6..05b8bb29a51 100644 --- a/misc/fep/patches/patch-ah +++ b/misc/fep/patches/patch-ah @@ -1,8 +1,17 @@ -$NetBSD: patch-ah,v 1.3 2003/11/11 10:42:32 wiz Exp $ +$NetBSD: patch-ah,v 1.4 2005/12/10 22:10:47 christos Exp $ ---- fep_glob.h.orig Sun Aug 28 07:36:43 1988 -+++ fep_glob.h -@@ -29,6 +29,11 @@ extern char *term_clear; /* terminal cle +--- fep_glob.h.orig 1988-08-28 01:36:43.000000000 -0400 ++++ fep_glob.h 2005-12-10 16:59:27.000000000 -0500 +@@ -3,7 +3,7 @@ + #ifndef lint + # define FEP_GLOB \ + "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ah,v 1.4 2005/12/10 22:10:47 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 8feea4050ba..727e201e165 100644 --- a/misc/fep/patches/patch-ai +++ b/misc/fep/patches/patch-ai @@ -1,9 +1,13 @@ -$NetBSD: patch-ai,v 1.3 2003/11/11 10:42:32 wiz Exp $ +$NetBSD: patch-ai,v 1.4 2005/12/10 22:10:47 christos Exp $ ---- fep_hist.c.orig Fri Nov 25 12:45:42 1988 -+++ fep_hist.c -@@ -6,6 +6,8 @@ static char rcsid[]= - #endif lint +--- fep_hist.c.orig 1988-11-25 06:45:42.000000000 -0500 ++++ fep_hist.c 2005-12-10 16:59:27.000000000 -0500 +@@ -3,9 +3,11 @@ + #ifndef lint + static char rcsid[]= + "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ai,v 1.4 2005/12/10 22:10:47 christos Exp $ (SRA)"; +-#endif lint ++#endif /* lint */ #include <stdio.h> +#include <stdlib.h> @@ -11,7 +15,7 @@ $NetBSD: patch-ai,v 1.3 2003/11/11 10:42:32 wiz Exp $ #include <ctype.h> #include "fep_defs.h" #include "fep_glob.h" -@@ -255,7 +257,7 @@ historyExtract(string) +@@ -255,7 +257,7 @@ default: { @@ -20,7 +24,7 @@ $NetBSD: patch-ai,v 1.3 2003/11/11 10:42:32 wiz Exp $ strcpy (buf, "^"); strncat (buf, string, 64); -@@ -267,6 +269,7 @@ historyExtract(string) +@@ -267,6 +269,7 @@ char * search_reverse_history (string) @@ -28,7 +32,7 @@ $NetBSD: patch-ai,v 1.3 2003/11/11 10:42:32 wiz Exp $ { register int i; char *re_comp(); -@@ -291,6 +294,7 @@ search_reverse_history (string) +@@ -291,6 +294,7 @@ char * search_forward_history (string) @@ -36,7 +40,7 @@ $NetBSD: patch-ai,v 1.3 2003/11/11 10:42:32 wiz Exp $ { register int i; char *re_comp(); -@@ -412,7 +416,7 @@ char * +@@ -412,7 +416,7 @@ mk_home_relative (cp) char *cp; { @@ -45,7 +49,7 @@ $NetBSD: patch-ai,v 1.3 2003/11/11 10:42:32 wiz Exp $ /* * If variable "history-file" is not absolute path name, -@@ -540,7 +544,7 @@ read_history (file) +@@ -540,7 +544,7 @@ char *file; { FILE *fp; @@ -54,7 +58,7 @@ $NetBSD: patch-ai,v 1.3 2003/11/11 10:42:32 wiz Exp $ register int i; if ((fp = fopen (file, "r")) == NULL) { -@@ -550,7 +554,7 @@ read_history (file) +@@ -550,7 +554,7 @@ return; } diff --git a/misc/fep/patches/patch-aj b/misc/fep/patches/patch-aj index 538aab517d1..f87c1a49f27 100644 --- a/misc/fep/patches/patch-aj +++ b/misc/fep/patches/patch-aj @@ -1,11 +1,19 @@ -$NetBSD: patch-aj,v 1.5 2005/09/13 19:40:59 christos Exp $ +$NetBSD: patch-aj,v 1.6 2005/12/10 22:10:47 christos Exp $ --- fep_main.c.orig 1993-06-09 22:53:06.000000000 -0400 -+++ fep_main.c 2005-09-13 15:38:02.000000000 -0400 -@@ -6 +6 @@ ++++ fep_main.c 2005-12-10 16:59:27.000000000 -0500 +@@ -3,15 +3,24 @@ + #ifndef lint + static char rcsid[]= + "$Id: patch-aj,v 1.6 2005/12/10 22:10:47 christos Exp $ (SRA)"; -#endif lint +#endif /* lint */ -@@ -13 +13,8 @@ + + #include <stdio.h> + #include <signal.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/ioctl.h> -#include <sys/file.h> +#ifdef TERMIOS +#include <stdlib.h> @@ -15,23 +23,41 @@ $NetBSD: patch-aj,v 1.5 2005/09/13 19:40:59 christos Exp $ +#define _POSIX_VDISABLE '\0' +#endif +#else -@@ -14,0 +22,2 @@ + #include <sgtty.h> +#include <sys/file.h> +#endif -@@ -33 +42 @@ + #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 */ -@@ -41,3 +50,3 @@ + + char *myself; /* the command name */ + char *prompt = ""; /* prompt string */ +@@ -38,9 +47,9 @@ + /* delimiter characters */ + int master; /* file discriptor for pty master */ + int slave; /* file discriptor for pty slave */ -int mastermask; /* 1<<master */ -int stdinmask; /* 1<<fileno(stdin) */ -int selectmask; /* stdinmask | mastermask */ +fd_set mastermask; /* 1<<master */ +fd_set stdinmask; /* 1<<fileno(stdin) */ +fd_set selectmask; /* stdinmask | mastermask */ -@@ -51 +60 @@ + int selectnfds; /* max (fileno(stdin), master) + 1*/ + int child_pid; /* child pid */ + int ptyflag = ON; /* flag to use pty or not */ +@@ -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 */ -int catchsig(); /* function take care SIGCHILD */ +void catchsig __P((int)); /* function take care SIGCHILD */ -@@ -53,3 +62,8 @@ + -struct sgttyb initial_ttymode; /* initial tty mode */ -struct sgttyb master_ttymode; /* master tty mode */ -struct sgttyb slave_ttymode; /* slave tty mode */ @@ -43,82 +69,186 @@ $NetBSD: patch-aj,v 1.5 2005/09/13 19:40:59 christos Exp $ +struct ttystruct initial_ttymode; /* initial tty mode */ +struct ttystruct master_ttymode; /* master tty mode */ +struct ttystruct slave_ttymode; /* slave tty mode */ -@@ -61 +75 @@ + + int lines; /* terminal line size */ + int columns; /* terminal coulumn size */ + char *term_clear; /* terminal clear code */ + -void (*sighup)(), (*sigchld)(), (*sigtstp)(); +void (*sighup) __P((int)), (*sigchld) __P((int)), (*sigtstp) __P((int)); -@@ -63,0 +78 @@ + /* function buffer for signal */ + +#ifdef TIOCSETN -@@ -65,0 +81 @@ + struct tchars tchars_buf; /* tty characters */ + struct ltchars ltchars_buf; /* tty characters */ +#endif -@@ -71 +87 @@ + 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 */ -@@ -114,0 +131,4 @@ + + char master_tty[16]; /* master tty name */ + char slave_tty[16]; /* slave tty name */ +@@ -112,6 +128,10 @@ + + myself = argv[0]; + + setvbuf(stdin, NULL, _IONBF, 0); + setvbuf(stdout, NULL, _IONBF, 0); + setvbuf(stderr, NULL, _IONBF, 0); + -@@ -175 +195 @@ + /* + * Initialize binding table + */ +@@ -172,7 +192,7 @@ + histlen = atoi (argv[1]); + } + else { - histlen = atoi (&argv[1] + 2); + histlen = atoi (argv[1] + 2); -@@ -279 +299 @@ + } + break; + +@@ -276,7 +296,7 @@ + fix_signal () + { + #ifdef SIGWINCH - int sigwinch(); + void sigwinch __P((int)); -@@ -339 +359 @@ + #endif + + sighup = signal (SIGHUP, terminate); +@@ -336,7 +356,7 @@ + if (Through == OFF && Transparency == OFF && script_fp) + fwrite (inputline, sizeof(CHAR), strlen (inputline), script_fp); + } - terminate (); + terminate (0); -@@ -387 +407,2 @@ + } + + #define INPUT_BUFFER_SIZE 1024 +@@ -384,7 +404,8 @@ + { + char c; + int n; - int nfound, readfd, writefd = 0, execptfd = 0; + int nfound; + fd_set readfd, writefd, exceptfd; -@@ -399,3 +420,2 @@ + #ifdef USE_TIMEOUT + struct timeval **timeout = auto_tty_fix ? timeout_list : notimeout; + #else +@@ -396,9 +417,8 @@ + /* + * Sorry, this cording depends to an implementation of getc(). + */ -# define CHAR_IN_BUFFER (stdin->_cnt) - if (CHAR_IN_BUFFER) - goto RETURNCHAR; + FD_ZERO(&writefd); + FD_ZERO(&exceptfd); -@@ -412 +432 @@ + + RETRY: + readfd = selectmask; +@@ -409,13 +429,13 @@ + while ((nfound = select (selectnfds, &readfd, 0, 0, *timeout)) < 0) + if (errno != EINTR) { + perror ("select"); - terminate(); + terminate(1); -@@ -418 +438 @@ + } + + /* + * Found output from pty. + */ - if (readfd & mastermask) { + if (FD_ISSET(master, &readfd)) { -@@ -454 +474 @@ + int nbyte; + + /* +@@ -451,7 +471,7 @@ + /* + * Found input from terminal + */ - if (CHAR_IN_BUFFER || readfd & stdinmask) { + if (FD_ISSET(fileno(stdin), &readfd)) { -@@ -470,2 +490,2 @@ + + #ifndef USE_TIMEOUT + /* +@@ -467,8 +487,8 @@ + RETURNCHAR: + if ((c = getc (stdin)) == EOF) { + if (debug) - printf ("EOF chatched\n"); - terminate (); + printf ("EOF catched\n"); + terminate (1); -@@ -599 +619 @@ + } + else + return (c & CHARMASK); +@@ -596,7 +616,7 @@ + + swallow_output() + { - int readfd = mastermask; + fd_set readfd = mastermask; -@@ -607 +627 @@ + int r; + int nbyte; + int ncount = 10; +@@ -604,7 +624,7 @@ + while ( + ncount-- && + select (selectnfds, &readfd, 0, 0, TIMEOUT_NOBLOCK) > 0 && - readfd & mastermask + FD_ISSET(master, &mastermask) -@@ -639 +659,3 @@ + ) { + nbyte = buf_read (master, output_buffer); + if (nbyte > 0) { +@@ -636,21 +656,23 @@ + #include <sys/m_wait.h> + #endif + -catchsig() +void +catchsig(n) + int n; -@@ -641 +663 @@ + { - union wait status; + int status; -@@ -648 +670 @@ + struct rusage ru; + + if (wait3 (&status, WNOHANG | WUNTRACED, &ru) != child_pid) + return; + if (WIFSTOPPED (status) /* || WIFSIGNALED (status) */) { + if (debug) { - message ("Child has sttoped!!\n"); + message ("Child has stopped!!\n"); -@@ -653 +675 @@ + } + suspend (); + return; + } - terminate (); + terminate (WEXITSTATUS(status)); -@@ -677,0 +700,3 @@ + } + + exec_to_command(argv) +@@ -675,13 +697,37 @@ + dup2 (slave, 2); + (void) close (slave); + +#ifdef TERMIOS + tcsetattr(0, TCSANOW, &slave_ttymode); +#elif defined(TIOCSETN) -@@ -679 +704 @@ + ioctl (0, TIOCSETN, (char *) & slave_ttymode); - +#endif -@@ -684,0 +710,21 @@ + execvp (*argv, argv, 0); + perror (*argv); + exit (1); + } + +#ifdef TERMIOS +fix_tty() +{ @@ -140,22 +270,48 @@ $NetBSD: patch-aj,v 1.5 2005/09/13 19:40:59 christos Exp $ + +#elif defined(TIOCSETN) + -@@ -721,0 +768 @@ + fix_tty() + { + struct tchars tcbuf; +@@ -719,6 +765,7 @@ + ioctl (0, TIOCSETC, (char *) & tcbuf); + ioctl (0, TIOCSLTC, (char *) & lcbuf); + } +#endif -@@ -730 +777,3 @@ + + kill_process() + { +@@ -727,7 +774,9 @@ + (void) killpg (child_pid, SIGTERM); + } + -terminate() +void +terminate(n) + int n; -@@ -761,0 +811,3 @@ + { + extern int errno; + +@@ -759,10 +808,14 @@ + if (killpg (child_pid, SIGKILL) < 0) + perror ("kill"); + +#ifdef TERMIOS + tcsetattr(0, TCSANOW, &initial_ttymode); +#elif defined(TIOCSETN) -@@ -765 +817,2 @@ + ioctl (0, TIOCSETN, (char *) & initial_ttymode); + ioctl (0, TIOCSETC, (char *) & tchars_buf); + ioctl (0, TIOCSLTC, (char *) & ltchars_buf); - exit (0); +#endif + exit (n); -@@ -777,0 +831,35 @@ + } + + get_pty_master() +@@ -775,6 +828,41 @@ + master = 1; + return; + } +#ifdef HAVE_PTMX + if ((master = open("/dev/ptmx", O_RDWR)) == -1) { + perror ("Couldn't open pseudo tty"); @@ -191,17 +347,33 @@ $NetBSD: patch-aj,v 1.5 2005/09/13 19:40:59 christos Exp $ +#endif + } +#else -@@ -798,0 +887,4 @@ + for (c = 'p'; c <= 's'; c++) { + for (i = 0; i < 16; i++) { + sprintf (master_tty, "/dev/pty%c%x", c, i); +@@ -796,11 +884,16 @@ + } + + FOUND: +#endif +#ifdef TERMIOS + tcgetattr(0, &initial_ttymode); +#elif defined(TIOCSETN) -@@ -803,0 +896 @@ + ioctl (0, TIOCGETP, (char *) &initial_ttymode); + ioctl (0, TIOCGETC, (char *) &tchars_buf); + ioctl (0, TIOCGETD, (char *) &line_desc); + ioctl (0, TIOCGLTC, (char *) <chars_buf); + ioctl (0, TIOCLGET, (char *) &lmode_buf); +#endif -@@ -823 +916 @@ + + #ifdef TIOCGWINSZ + { +@@ -820,11 +913,15 @@ + # if defined(TIOCKGETC) && defined(TIOCKSETC) + ioctl (0, TIOCKGETC, (char *) &jtchars_buf); + # endif -#endif KANJI +#endif /* KANJI */ -@@ -825,3 +918,7 @@ + - stdinmask = 1 << fileno (stdin); - mastermask = 1 << master; - selectmask = stdinmask | mastermask; @@ -212,7 +384,13 @@ $NetBSD: patch-aj,v 1.5 2005/09/13 19:40:59 christos Exp $ + FD_SET(master, &mastermask); + FD_SET(fileno(stdin), &selectmask); + FD_SET(master, &selectmask); -@@ -840,0 +938,8 @@ + selectnfds = max (fileno(stdin), master) + 1; + + return; +@@ -838,11 +935,20 @@ + perror (slave_tty); + exit (1); + } + if (setsid() == -1) + perror ("setsid"); + if (ioctl (slave, TIOCSCTTY, 1) == -1) @@ -221,21 +399,52 @@ $NetBSD: patch-aj,v 1.5 2005/09/13 19:40:59 christos Exp $ +#ifdef TERMIOS + tcsetattr(slave, TCSANOW, &initial_ttymode); +#elif defined(TIOCSETN) -@@ -845,0 +951 @@ + ioctl (slave, TIOCSETN, (char *) &initial_ttymode); + ioctl (slave, TIOCSETC, (char *) &tchars_buf); + ioctl (slave, TIOCSLTC, (char *) <chars_buf); + ioctl (slave, TIOCLSET, (char *) &lmode_buf); + ioctl (slave, TIOCSETD, (char *) &line_desc); +#endif -@@ -854 +960 @@ + + #ifdef KANJI + # if defined(TIOCKGET) && defined(TIOCKSET) +@@ -851,7 +957,7 @@ + # if defined(TIOCKGETC) && defined(TIOCKSETC) + ioctl (slave, TIOCKSETC, (char *) &jtchars_buf); + # endif -#endif KANJI +#endif /* KANJI */ -@@ -869 +975,3 @@ + + #ifdef TIOCSWINSZ + { +@@ -866,16 +972,19 @@ + + recover_tty() + { - +#ifdef TERMIOS + tcsetattr(0, TCSANOW, &initial_ttymode); +#elif defined(TIOCSETN) -@@ -872,0 +981 @@ + ioctl (0, TIOCSETN, (char *) & initial_ttymode); + ioctl (0, TIOCSETC, (char *) & tchars_buf); + ioctl (0, TIOCSLTC, (char *) & ltchars_buf); +#endif -@@ -878 +987 @@ + } + + suspend() + { + long pid; - void (*func) (); + void (*func) __P((int)); -@@ -893 +1002 @@ + int omask; + extern int errno; + +@@ -890,7 +999,7 @@ + + if (kill (child_pid, SIGCONT) < 0 && errno == ESRCH) { + printf ("Where my child has gone?!\n"); - terminate (); + terminate (1); + } + killpg (child_pid, SIGCONT); + kill (0, SIGCONT); diff --git a/misc/fep/patches/patch-ak b/misc/fep/patches/patch-ak index 3fcdfed72db..62d38f381f8 100644 --- a/misc/fep/patches/patch-ak +++ b/misc/fep/patches/patch-ak @@ -1,8 +1,20 @@ -$NetBSD: patch-ak,v 1.3 2003/11/11 10:42:32 wiz Exp $ +$NetBSD: patch-ak,v 1.4 2005/12/10 22:10:47 christos Exp $ ---- fep_set.c.orig Wed May 29 07:31:24 1991 -+++ fep_set.c -@@ -67,10 +67,10 @@ VAR default_unset_vars [] = { +--- fep_set.c.orig 1991-05-29 01:31:24.000000000 -0400 ++++ fep_set.c 2005-12-10 16:59:27.000000000 -0500 +@@ -3,9 +3,10 @@ + #ifndef lint + static char rcsid[]= + "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-ak,v 1.4 2005/12/10 22:10:47 christos Exp $ (SRA)"; +-#endif lint ++#endif /* lint */ + + #include <stdio.h> ++#include <stdlib.h> + #include "fep_defs.h" + #include "fep_glob.h" + +@@ -67,10 +68,10 @@ #ifdef HASH #define HASHNUM 10 VAR *var_htab[HASHNUM]; @@ -15,7 +27,7 @@ $NetBSD: patch-ak,v 1.3 2003/11/11 10:42:32 wiz Exp $ /* * Functions -@@ -251,12 +251,12 @@ show_varlist () +@@ -251,12 +252,12 @@ for (; vp != (VAR *)0; vp = vp->v_next) printf ("%-16s %s\n", vp->v_name, vp->v_value); } @@ -30,7 +42,7 @@ $NetBSD: patch-ak,v 1.3 2003/11/11 10:42:32 wiz Exp $ } #ifdef HASH -@@ -273,7 +273,7 @@ static getindex (s) +@@ -273,7 +274,7 @@ return (sum % HASHNUM); } @@ -39,7 +51,7 @@ $NetBSD: patch-ak,v 1.3 2003/11/11 10:42:32 wiz Exp $ /* * Get pointer to VAR. -@@ -288,7 +288,7 @@ getvp (name, alloc, lastvp) +@@ -288,7 +289,7 @@ { #ifdef HASH register i = getindex (name); @@ -48,7 +60,7 @@ $NetBSD: patch-ak,v 1.3 2003/11/11 10:42:32 wiz Exp $ VAR *vp, *last = (VAR *)0; #ifdef HASH -@@ -296,7 +296,7 @@ getvp (name, alloc, lastvp) +@@ -296,7 +297,7 @@ if (strcmp (name, vp->v_value) == 0) return (vp); } @@ -57,7 +69,7 @@ $NetBSD: patch-ak,v 1.3 2003/11/11 10:42:32 wiz Exp $ for (vp = var_list->v_next, last = var_list; vp; last = vp, vp = vp->v_next) { int r; -@@ -309,7 +309,7 @@ getvp (name, alloc, lastvp) +@@ -309,14 +310,14 @@ else if (r < 0) break; } @@ -66,7 +78,17 @@ $NetBSD: patch-ak,v 1.3 2003/11/11 10:42:32 wiz Exp $ if (alloc == 0) return (0); -@@ -327,9 +327,9 @@ getvp (name, alloc, lastvp) + +- vp = (VAR *) calloc (sizeof (VAR), 1); +- vp->v_value = (char *)0; +- vp->v_next = (VAR *) 0; ++ vp = calloc (sizeof (VAR), 1); ++ vp->v_value = NULL; ++ vp->v_next = NULL; + vp->v_name = allocAndCopyThere (name); + + #ifdef HASH +@@ -327,9 +328,9 @@ else { var_htab[i] = vp; } diff --git a/misc/fep/patches/patch-al b/misc/fep/patches/patch-al index 7389694d79d..9f9eb9bef51 100644 --- a/misc/fep/patches/patch-al +++ b/misc/fep/patches/patch-al @@ -1,8 +1,17 @@ -$NetBSD: patch-al,v 1.2 2003/11/11 10:42:32 wiz Exp $ +$NetBSD: patch-al,v 1.3 2005/12/10 22:10:47 christos Exp $ ---- fep_util.c.orig Wed Dec 28 13:24:01 1988 -+++ fep_util.c -@@ -178,9 +178,9 @@ max (d1, d2) +--- fep_util.c.orig 1988-12-28 07:24:01.000000000 -0500 ++++ fep_util.c 2005-12-10 16:59:27.000000000 -0500 +@@ -3,7 +3,7 @@ + #ifndef lint + static char rcsid[]= + "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-al,v 1.3 2005/12/10 22:10:47 christos Exp $ (SRA)"; +-#endif lint ++#endif /* lint */ + + #ifndef MKARGDEBUG + +@@ -178,9 +178,9 @@ { return (d1 > d2 ? d1 : d2); } @@ -14,7 +23,7 @@ $NetBSD: patch-al,v 1.2 2003/11/11 10:42:32 wiz Exp $ #include <stdio.h> #include <ctype.h> -@@ -198,7 +198,7 @@ main() +@@ -198,7 +198,7 @@ showArgs (s); } } @@ -23,7 +32,7 @@ $NetBSD: patch-al,v 1.2 2003/11/11 10:42:32 wiz Exp $ showArgs (comline) char *comline; -@@ -402,4 +402,4 @@ iskanji_in_string (s, i) +@@ -402,4 +402,4 @@ else return (iskanji (*cp)); } diff --git a/misc/fep/patches/patch-am b/misc/fep/patches/patch-am index 27b3530ff9f..f15f3b48e2f 100644 --- a/misc/fep/patches/patch-am +++ b/misc/fep/patches/patch-am @@ -1,9 +1,13 @@ -$NetBSD: patch-am,v 1.2 2003/11/11 10:42:32 wiz Exp $ +$NetBSD: patch-am,v 1.3 2005/12/10 22:10:47 christos Exp $ ---- fep_vi.c.orig Wed May 29 07:31:27 1991 -+++ fep_vi.c -@@ -6,7 +6,17 @@ static char rcsid[]= - #endif lint +--- fep_vi.c.orig 1991-05-29 01:31:27.000000000 -0400 ++++ fep_vi.c 2005-12-10 16:59:27.000000000 -0500 +@@ -3,10 +3,20 @@ + #ifndef lint + static char rcsid[]= + "$Header: /cvsroot/pkgsrc/misc/fep/patches/patch-am,v 1.3 2005/12/10 22:10:47 christos Exp $ (SRA)"; +-#endif lint ++#endif /* lint */ #include <stdio.h> +#include <sys/ioctl.h> @@ -20,7 +24,7 @@ $NetBSD: patch-am,v 1.2 2003/11/11 10:42:32 wiz Exp $ #include <ctype.h> #include "fep_defs.h" #include "fep_glob.h" -@@ -107,7 +117,7 @@ BINDENT viComBindings[] = { +@@ -107,7 +117,7 @@ /* ^X-^V */ {"\\^X\\^V", view_buffer}, /* ^X-^X */ {"\\^X\\^X", expand_file_name}, /* ^X-? */ {"\\^X?", show_bindings}, @@ -29,7 +33,7 @@ $NetBSD: patch-am,v 1.2 2003/11/11 10:42:32 wiz Exp $ /* ^X-^D */ {"\\^X\\^D", send_eof}, /* ^X-( */ {"\\^X(", fep_start_script}, /* ^X-) */ {"\\^X)", fep_end_script}, -@@ -138,7 +148,7 @@ BINDENT viInsertBindings[] = { +@@ -138,7 +148,7 @@ /* ^X-^L */ {"\\^X\\^L", fep_repaint}, /* ^X-^X */ {"\\^X\\^X", expand_file_name}, /* ^X-? */ {"\\^X?", show_bindings}, @@ -38,7 +42,7 @@ $NetBSD: patch-am,v 1.2 2003/11/11 10:42:32 wiz Exp $ /* ^X-^D */ {"\\^X\\^D", send_eof}, /* ^X-^V */ {"\\^X\\^V", view_buffer}, /* ^X-( */ {"\\^X(", fep_start_script}, -@@ -161,7 +171,29 @@ FUNC cft[], aft[]; +@@ -161,7 +171,29 @@ cft[i] = self_insert; #define import(table,key,fn) if((int)key>0)table[(int)key]=fn @@ -69,7 +73,7 @@ $NetBSD: patch-am,v 1.2 2003/11/11 10:42:32 wiz Exp $ /* Now, using cbreak mode import (cft, tchars_buf.t_startx, ignore); import (cft, tchars_buf.t_stopc, ignore); -@@ -179,6 +211,7 @@ FUNC cft[], aft[]; +@@ -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); |