summaryrefslogtreecommitdiff
path: root/editors/mg2a
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2000-07-10 18:26:52 +0000
committertron <tron@pkgsrc.org>2000-07-10 18:26:52 +0000
commit4d21cec0816fef3a94dabc6dad99948633e8db0f (patch)
treecdafb92b9610c52b7a55af5ed31d563a31d10f20 /editors/mg2a
parent313fdce0d11dbd0a4f7e6411bb70324e90ea24ff (diff)
downloadpkgsrc-4d21cec0816fef3a94dabc6dad99948633e8db0f.tar.gz
Update "mg2a" package to version to version 1.11:
Don't attempt to edit non regular files. Patches supplied by John Refling in PR pkg/10536.
Diffstat (limited to 'editors/mg2a')
-rw-r--r--editors/mg2a/Makefile11
-rw-r--r--editors/mg2a/files/patch-sum28
-rw-r--r--editors/mg2a/patches/patch-aa6
-rw-r--r--editors/mg2a/patches/patch-ab6
-rw-r--r--editors/mg2a/patches/patch-ac42
-rw-r--r--editors/mg2a/patches/patch-ad6
-rw-r--r--editors/mg2a/patches/patch-ae6
-rw-r--r--editors/mg2a/patches/patch-af6
-rw-r--r--editors/mg2a/patches/patch-ag6
-rw-r--r--editors/mg2a/patches/patch-ah33
-rw-r--r--editors/mg2a/patches/patch-ai6
-rw-r--r--editors/mg2a/patches/patch-aj6
-rw-r--r--editors/mg2a/patches/patch-ak6
-rw-r--r--editors/mg2a/patches/patch-al30
-rw-r--r--editors/mg2a/patches/patch-am23
-rw-r--r--editors/mg2a/pkg/DESCR2
16 files changed, 143 insertions, 80 deletions
diff --git a/editors/mg2a/Makefile b/editors/mg2a/Makefile
index 0f8137c2583..89423055ec7 100644
--- a/editors/mg2a/Makefile
+++ b/editors/mg2a/Makefile
@@ -1,17 +1,12 @@
-# $NetBSD: Makefile,v 1.2 2000/04/01 00:30:53 dmcmahill Exp $
-# Top level for mg2a package make... nothing unusual
-# in this package - john refling
-#
+# $NetBSD: Makefile,v 1.3 2000/07/10 18:26:52 tron Exp $
DISTNAME= mg2a
-PKGNAME= mg2a-1.10
+PKGNAME= mg2a-1.11
CATEGORIES= editors
MASTER_SITES= ftp://ftp.wustl.edu/languages/c/unix-c/editors/
EXTRACT_SUFX= .tar.Z
-MAINTAINER= refling@comet.lbl.gov
-
-USE_CONFIGURE= NO
+MAINTAINER= tron@netbsd.org
post-extract:
cd ${WRKSRC} ; ${CP} sys/bsd/Makefile .
diff --git a/editors/mg2a/files/patch-sum b/editors/mg2a/files/patch-sum
index 8aa13c57812..0f3fea66c7d 100644
--- a/editors/mg2a/files/patch-sum
+++ b/editors/mg2a/files/patch-sum
@@ -1,15 +1,15 @@
-$NetBSD: patch-sum,v 1.1.1.1 2000/04/01 00:21:26 dmcmahill Exp $
+$NetBSD: patch-sum,v 1.2 2000/07/10 18:26:53 tron Exp $
-MD5 (patch-aa) = 2541320144d55ce5eed7efbf8896538f
-MD5 (patch-ab) = c43942f4e96803b675bc665a8bf28600
-MD5 (patch-ac) = ecd6121e1bd40e630ab18bd40033b903
-MD5 (patch-ad) = 9c34c36e763eb4692490d732ad3d43e2
-MD5 (patch-ae) = 93dca2ad564196d175148b8195c64027
-MD5 (patch-af) = 0b4e5ba1ff6308993929d8e8db120a7c
-MD5 (patch-ag) = f1aea692c077a41211604174f816da35
-MD5 (patch-ah) = f397a38be402339aef525d15a486fbe8
-MD5 (patch-ai) = 421222da260bcef76048698779e5c1c9
-MD5 (patch-aj) = 9bd09f14735dd013db6207c4e18832dc
-MD5 (patch-ak) = 7fda46e3314817aa30ca56ade0322210
-MD5 (patch-al) = e8b855cdc23bc2de2982b97996a1c25e
-MD5 (patch-am) = 1bb778cacc8b00ad2521678ed214de54
+MD5 (patch-aa) = 53cd2f2393dd778d448ef825f0ae83f9
+MD5 (patch-ab) = a77659d79c373121467dbb8683f3ceec
+MD5 (patch-ac) = c1fb51b5e5bb7fcfb85fb176842c5554
+MD5 (patch-ad) = c2a0a0dfa0e1f297e723c261e9bd5b4b
+MD5 (patch-ae) = 61b2251dd9ac1ada0cfb77ef4ebd540f
+MD5 (patch-af) = f55e9679867c0a21316019907d5ef278
+MD5 (patch-ag) = 487295fa8e37591f5c0794d102ee4370
+MD5 (patch-ah) = e7451c6abf7e84546dd1be81cb92b9db
+MD5 (patch-ai) = 7bfa76b501bfbdd680a55fdafa3edacb
+MD5 (patch-aj) = be23950cb69f816c503f155f55b3c6f3
+MD5 (patch-ak) = 3ca11164fc1b0065a192f4001cb8e3ce
+MD5 (patch-al) = ec2d53a5ce5c03a43060ba2e9d4a4758
+MD5 (patch-am) = c265a115e6e5cdfc2b3437fd751fa81d
diff --git a/editors/mg2a/patches/patch-aa b/editors/mg2a/patches/patch-aa
index 3cf8c2dc473..ad5b3155659 100644
--- a/editors/mg2a/patches/patch-aa
+++ b/editors/mg2a/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-aa,v 1.2 2000/07/10 18:26:54 tron Exp $
---- ./sys/bsd/spawn.c.orig Sun Jul 3 10:51:00 1988
-+++ ./sys/bsd/spawn.c Thu Mar 30 08:35:32 2000
+--- sys/bsd/spawn.c.orig Sun Jul 3 10:51:00 1988
++++ sys/bsd/spawn.c Wed May 31 16:36:30 2000
@@ -38,7 +38,9 @@
*/
/*ARGSUSED*/
diff --git a/editors/mg2a/patches/patch-ab b/editors/mg2a/patches/patch-ab
index 72341904a6b..e67e1492e6c 100644
--- a/editors/mg2a/patches/patch-ab
+++ b/editors/mg2a/patches/patch-ab
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-ab,v 1.2 2000/07/10 18:26:54 tron Exp $
---- ./sys/bsd/ttyio.c.orig Sun Jul 3 10:51:02 1988
-+++ ./sys/bsd/ttyio.c Thu Mar 30 08:35:33 2000
+--- sys/bsd/ttyio.c.orig Sun Jul 3 10:51:02 1988
++++ sys/bsd/ttyio.c Wed May 31 16:36:30 2000
@@ -35,13 +35,17 @@
ttopen() {
register char *tv_stype;
diff --git a/editors/mg2a/patches/patch-ac b/editors/mg2a/patches/patch-ac
index f80aff356ff..26cddc4cda5 100644
--- a/editors/mg2a/patches/patch-ac
+++ b/editors/mg2a/patches/patch-ac
@@ -1,16 +1,44 @@
-$NetBSD: patch-ac,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-ac,v 1.2 2000/07/10 18:26:54 tron Exp $
---- ./sys/bsd/fileio.c.orig Sun Jul 3 10:50:24 1988
-+++ ./sys/bsd/fileio.c Thu Mar 30 08:35:33 2000
-@@ -2,6 +2,7 @@
+--- sys/bsd/fileio.c.orig Sun Jul 3 10:50:24 1988
++++ sys/bsd/fileio.c Wed May 31 16:38:11 2000
+@@ -2,6 +2,9 @@
* bsd (4.2, others?), Sun (3.2, ?) and Ultrix-32 (?) file I/O.
*/
#include "def.h"
+#include <unistd.h> /* refling added this per compiler */
++#include <sys/types.h>
++#include <sys/stat.h>
static FILE *ffp;
extern char *getenv(), *strncpy();
-@@ -276,7 +277,7 @@
+@@ -11,6 +14,12 @@
+ * Open a file for reading.
+ */
+ ffropen(fn) char *fn; {
++ // prevent opening non-regular files - refling
++ struct stat st;
++ if (fn == NULL || 0 == strlen(fn) || (0 == stat(fn, &st) && ((st.st_mode & S_IFMT) != S_IFREG))) {
++ ewprintf("not a regular file");
++ return(FIOERR);
++ }
+ if ((ffp=fopen(fn, "r")) == NULL)
+ return (FIOFNF);
+ return (FIOSUC);
+@@ -22,6 +31,12 @@
+ * FALSE on error (cannot create).
+ */
+ ffwopen(fn) char *fn; {
++ // prevent opening non-regular files - refling
++ struct stat st;
++ if (fn == NULL || 0 == strlen(fn) || (0 == stat(fn, &st) && ((st.st_mode & S_IFMT) != S_IFREG))) {
++ ewprintf("not a regular file");
++ return(FIOERR);
++ }
+ if ((ffp=fopen(fn, "w")) == NULL) {
+ ewprintf("Cannot open file for writing");
+ return (FIOERR);
+@@ -276,7 +291,7 @@
if ((file = getenv("HOME")) == NULL) goto notfound;
if (strlen(file)+7 >= NFILEN - 1) goto notfound;
(VOID) strcpy(home, file);
@@ -19,7 +47,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
if (suffix != NULL) {
(VOID) strcat(home, "-");
(VOID) strcat(home, suffix);
-@@ -295,6 +296,18 @@
+@@ -295,6 +310,18 @@
if (access(file, F_OK ) == 0) return file;
#endif
@@ -38,7 +66,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
return NULL;
}
#endif
-@@ -318,7 +331,8 @@
+@@ -318,7 +345,8 @@
execve("cp", eargv, (char **)NULL);
_exit(1); /* shouldn't happen */
}
diff --git a/editors/mg2a/patches/patch-ad b/editors/mg2a/patches/patch-ad
index 8c93fecd616..ed169f486d7 100644
--- a/editors/mg2a/patches/patch-ad
+++ b/editors/mg2a/patches/patch-ad
@@ -1,7 +1,7 @@
-$NetBSD: patch-ad,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-ad,v 1.2 2000/07/10 18:26:54 tron Exp $
---- ./sys/bsd/fullpath.c.orig Thu Mar 30 08:35:33 2000
-+++ ./sys/bsd/fullpath.c Thu Mar 30 08:35:33 2000
+--- sys/bsd/fullpath.c.orig Wed May 31 16:36:31 2000
++++ sys/bsd/fullpath.c Wed May 31 16:36:31 2000
@@ -0,0 +1,23 @@
+/* test program by John P. Refling *
+#include <stdlib.h>
diff --git a/editors/mg2a/patches/patch-ae b/editors/mg2a/patches/patch-ae
index ce4f4494cc1..bae07ecfcb9 100644
--- a/editors/mg2a/patches/patch-ae
+++ b/editors/mg2a/patches/patch-ae
@@ -1,7 +1,7 @@
-$NetBSD: patch-ae,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-ae,v 1.2 2000/07/10 18:26:54 tron Exp $
---- ./sys/default/tty.c.orig Sun Jul 3 10:50:35 1988
-+++ ./sys/default/tty.c Thu Mar 30 08:35:34 2000
+--- sys/default/tty.c.orig Sun Jul 3 10:50:35 1988
++++ sys/default/tty.c Wed May 31 16:36:31 2000
@@ -144,7 +144,8 @@
#endif
diff --git a/editors/mg2a/patches/patch-af b/editors/mg2a/patches/patch-af
index e70076c6993..1ad3c8842c5 100644
--- a/editors/mg2a/patches/patch-af
+++ b/editors/mg2a/patches/patch-af
@@ -1,7 +1,7 @@
-$NetBSD: patch-af,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-af,v 1.2 2000/07/10 18:26:54 tron Exp $
---- ./Makefile.orig Thu Mar 30 08:35:28 2000
-+++ ./Makefile Thu Mar 30 08:35:34 2000
+--- Makefile.orig Wed May 31 16:36:29 2000
++++ Makefile Wed May 31 16:36:31 2000
@@ -17,7 +17,7 @@
# REGEX -- create regular expression functions
#
diff --git a/editors/mg2a/patches/patch-ag b/editors/mg2a/patches/patch-ag
index 7e25e47b467..7214ef82bf0 100644
--- a/editors/mg2a/patches/patch-ag
+++ b/editors/mg2a/patches/patch-ag
@@ -1,7 +1,7 @@
-$NetBSD: patch-ag,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-ag,v 1.2 2000/07/10 18:26:54 tron Exp $
---- ./dir.c.orig Sun Jul 3 10:50:52 1988
-+++ ./dir.c Thu Mar 30 08:35:34 2000
+--- dir.c.orig Sun Jul 3 10:50:52 1988
++++ dir.c Wed May 31 16:36:32 2000
@@ -11,6 +11,7 @@
#ifndef getwd /* may be a #define */
char *getwd();
diff --git a/editors/mg2a/patches/patch-ah b/editors/mg2a/patches/patch-ah
index 0660732352d..a668a77240c 100644
--- a/editors/mg2a/patches/patch-ah
+++ b/editors/mg2a/patches/patch-ah
@@ -1,8 +1,16 @@
-$NetBSD: patch-ah,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-ah,v 1.2 2000/07/10 18:26:54 tron Exp $
---- ./main.c.orig Sun Jul 3 10:49:25 1988
-+++ ./main.c Thu Mar 30 08:35:35 2000
-@@ -20,6 +20,35 @@
+--- main.c.orig Sun Jul 3 10:49:25 1988
++++ main.c Wed May 31 16:39:32 2000
+@@ -6,6 +6,7 @@
+ #include "macro.h"
+ #endif
+
++static char *idstr = "mg2a v. 1.11 - refling";
+ int thisflag; /* Flags, this command */
+ int lastflag; /* Flags, last command */
+ int curgoal; /* Goal column */
+@@ -20,6 +21,35 @@
static VOID edinit();
@@ -38,7 +46,7 @@ $NetBSD: patch-ah,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
VOID
main(argc, argv)
int argc;
-@@ -27,6 +56,8 @@
+@@ -27,11 +57,21 @@
{
#ifndef NO_STARTUP
char *startupfile();
@@ -47,7 +55,20 @@ $NetBSD: patch-ah,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
#endif
char *cp;
VOID vtinit(), makename(), eerase();
-@@ -47,7 +78,9 @@
+ BUFFER *findbuffer();
+
++ // cheap attempt to avoid starting up if illegal file - refling
++ struct stat st;
++ if (argc > 1 && 0 == stat(argv[1], &st))
++ if ((st.st_mode & S_IFMT) != S_IFREG) {
++ fprintf(stderr, "%s is not a regular file (0x%x)\n", argv[1], st.st_mode & S_IFMT);
++ exit(1);
++ }
++
+ #ifdef SYSINIT
+ SYSINIT; /* system dependent. */
+ #endif
+@@ -47,7 +87,9 @@
*/
update();
#ifndef NO_STARTUP /* User startup file. */
diff --git a/editors/mg2a/patches/patch-ai b/editors/mg2a/patches/patch-ai
index 63fd59b9430..04afb635fff 100644
--- a/editors/mg2a/patches/patch-ai
+++ b/editors/mg2a/patches/patch-ai
@@ -1,7 +1,7 @@
-$NetBSD: patch-ai,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-ai,v 1.2 2000/07/10 18:26:54 tron Exp $
---- ./REPACK.orig Thu Mar 30 08:35:35 2000
-+++ ./REPACK Thu Mar 30 08:35:35 2000
+--- REPACK.orig Wed May 31 16:36:32 2000
++++ REPACK Wed May 31 16:36:32 2000
@@ -0,0 +1,7 @@
+# John Refling
+rm -f ../mg2a_src
diff --git a/editors/mg2a/patches/patch-aj b/editors/mg2a/patches/patch-aj
index 1fdd01824ad..5e1a71556f1 100644
--- a/editors/mg2a/patches/patch-aj
+++ b/editors/mg2a/patches/patch-aj
@@ -1,7 +1,7 @@
-$NetBSD: patch-aj,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-aj,v 1.2 2000/07/10 18:26:54 tron Exp $
---- ./mg.rc.orig Thu Mar 30 08:35:35 2000
-+++ ./mg.rc Thu Mar 30 08:35:35 2000
+--- mg.rc.orig Wed May 31 16:36:33 2000
++++ mg.rc Wed May 31 16:36:33 2000
@@ -0,0 +1,51 @@
+; Small key definition file for VT100 terminals using the termcap
+; driver. This only works if XKEYS is defined during compilation.
diff --git a/editors/mg2a/patches/patch-ak b/editors/mg2a/patches/patch-ak
index bc1f5d4bc9e..a78f76c6e99 100644
--- a/editors/mg2a/patches/patch-ak
+++ b/editors/mg2a/patches/patch-ak
@@ -1,7 +1,7 @@
-$NetBSD: patch-ak,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-ak,v 1.2 2000/07/10 18:26:54 tron Exp $
---- ./mg.1.orig Thu Mar 30 08:35:36 2000
-+++ ./mg.1 Thu Mar 30 08:35:36 2000
+--- mg.1.orig Wed May 31 16:36:35 2000
++++ mg.1 Wed May 31 16:36:35 2000
@@ -0,0 +1,1062 @@
+.Dd January 28, 2000
+.Dt MG 1
diff --git a/editors/mg2a/patches/patch-al b/editors/mg2a/patches/patch-al
index 4dec1ff9add..046e17c0d28 100644
--- a/editors/mg2a/patches/patch-al
+++ b/editors/mg2a/patches/patch-al
@@ -1,14 +1,17 @@
-$NetBSD: patch-al,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-al,v 1.2 2000/07/10 18:26:55 tron Exp $
---- ./README.NetBSD.orig Thu Mar 30 08:35:36 2000
-+++ ./README.NetBSD Thu Mar 30 08:35:36 2000
-@@ -0,0 +1,37 @@
-+Modified by John P. Refling, Dec 1999. This is version 1.00 of the
-+mods. Basically consists of the port to NetBSD and a change to the
-+mg.rc startup file name and search paths.
+--- README.NetBSD.orig Wed May 31 16:36:36 2000
++++ README.NetBSD Wed May 31 16:36:36 2000
+@@ -0,0 +1,49 @@
++Version 1.11
++~~~~~~~~~~~~
++(May 2000) don't edit non-regular files.
+
-+Version 1.10 (Jan 2000) added journaling and the inital mirroring
-+of files:
++
++
++Version 1.10
++~~~~~~~~~~~~
++(Jan 2000) added journaling and the inital mirroring of files:
+
+Journaling
+~~~~~~~~~~
@@ -40,3 +43,12 @@ $NetBSD: patch-al,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+If the environment variable MG_DOT_ORIG is set, then the edited
+file is copied to a .orig file, if the .orig file does not exist.
+Helpful for creating diffs.
++
++
++
++Version 1.00
++~~~~~~~~~~~~
++Modified by John P. Refling, Dec 1999. This is version 1.00 of the
++mods. Basically consists of the port to NetBSD and a change to the
++mg.rc startup file name and search paths.
++
diff --git a/editors/mg2a/patches/patch-am b/editors/mg2a/patches/patch-am
index 0464ff7dfd3..2e967776504 100644
--- a/editors/mg2a/patches/patch-am
+++ b/editors/mg2a/patches/patch-am
@@ -1,8 +1,19 @@
-$NetBSD: patch-am,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+$NetBSD: patch-am,v 1.2 2000/07/10 18:26:55 tron Exp $
---- ./file.c.orig Sun Jul 3 10:48:57 1988
-+++ ./file.c Thu Mar 30 08:37:30 2000
-@@ -447,14 +447,151 @@
+--- file.c.orig Sun Jul 3 10:48:57 1988
++++ file.c Wed May 31 16:36:36 2000
+@@ -2,6 +2,10 @@
+ * File commands.
+ */
+ #include "def.h"
++#include <stdio.h> // refling
++#include <sys/types.h>
++#include <sys/stat.h>
++
+
+ BUFFER *findbuffer();
+ VOID makename();
+@@ -447,14 +451,147 @@
writeout(bp, fn) register BUFFER *bp; char *fn; {
register int s;
@@ -11,10 +22,6 @@ $NetBSD: patch-am,v 1.1.1.1 2000/04/01 00:21:27 dmcmahill Exp $
+// ------------------> the file to save, and there is an EMPTY file
+// ------------------> name with the same name as we wish to save
+
-+#include <stdio.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+
+// main(int argc, char **argv) {
+ char *last_slash, *file_name_no_dir, dir_name[1000], cmd[1000], *end_of_dirname;
+// in[1000];
diff --git a/editors/mg2a/pkg/DESCR b/editors/mg2a/pkg/DESCR
index e014e6ef7bf..5b1bbf249be 100644
--- a/editors/mg2a/pkg/DESCR
+++ b/editors/mg2a/pkg/DESCR
@@ -9,7 +9,7 @@ The NetBSD version has a few minor cosmetic changes, better locating
of the startup file (mg.rc), journaling and original mirroring of
files.
-A similarly small and fast MSDOS version is available at
+A similarly small and fast MSDOS version will be available sometime at
ftp://ftp.cdrom.com/pub/simtelnet/msdos/editor/mg2a_exe.zip, without
my enhancements. Hopefully , I'll have time to make a port of this
enhanced version to MSDOS under djgpp (LFN support), and post it as: