summaryrefslogtreecommitdiff
path: root/editors/mg2a/patches
diff options
context:
space:
mode:
authortron <tron>2000-07-10 18:26:52 +0000
committertron <tron>2000-07-10 18:26:52 +0000
commita7d38e59cfa71c9f8f313f7e8cad430f36245978 (patch)
treecdafb92b9610c52b7a55af5ed31d563a31d10f20 /editors/mg2a/patches
parentf44d44c46bdfc23730c53c35d69236259d694720 (diff)
downloadpkgsrc-a7d38e59cfa71c9f8f313f7e8cad430f36245978.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/patches')
-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
13 files changed, 125 insertions, 57 deletions
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];