pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/editors/mg2a mg2a: make this prehistoric C not fail wi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ce9920d24c8b
branches:  trunk
changeset: 338990:ce9920d24c8b
user:      nia <nia%pkgsrc.org@localhost>
date:      Mon Sep 02 21:41:40 2019 +0000

description:
mg2a: make this prehistoric C not fail with modern compilers

don't define our own strncpy/strncat, include the header instead.

diffstat:

 editors/mg2a/distinfo         |   6 +++---
 editors/mg2a/patches/patch-ac |  24 ++++++++++++++----------
 editors/mg2a/patches/patch-ap |  24 ++++++++++++++++--------
 3 files changed, 33 insertions(+), 21 deletions(-)

diffs (162 lines):

diff -r b4864fc9bff7 -r ce9920d24c8b editors/mg2a/distinfo
--- a/editors/mg2a/distinfo     Mon Sep 02 20:28:34 2019 +0000
+++ b/editors/mg2a/distinfo     Mon Sep 02 21:41:40 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2017/05/09 14:46:55 jperkin Exp $
+$NetBSD: distinfo,v 1.14 2019/09/02 21:41:40 nia Exp $
 
 SHA1 (mg2a.tar.Z) = c96f890f217eaacb78117f9c73f1ea3709ca8d3f
 RMD160 (mg2a.tar.Z) = 7083ec8b49eb89d1389dabfb915859af2bb40ee1
@@ -6,7 +6,7 @@
 Size (mg2a.tar.Z) = 383255 bytes
 SHA1 (patch-aa) = d10d168a9f224cd2dfd15fe28876f55e7073e4d2
 SHA1 (patch-ab) = 8d39fe754a6e7f92a8c5afdadaacf3882e471d82
-SHA1 (patch-ac) = 6ef1d0bc88241756cdd3a66050ebfaaf353edcdb
+SHA1 (patch-ac) = 69a094b062b61a531b949f815ade5568d3484638
 SHA1 (patch-ad) = d83892a713d75d830f553e58632d2fde55e53cc4
 SHA1 (patch-ae) = 13c976df16c34acffc14615d29ad91a3bdacd716
 SHA1 (patch-af) = 25270ccd23643cfb5b8da10bc069d9b63d9e5a09
@@ -18,7 +18,7 @@
 SHA1 (patch-am) = 3544b6609262899aabd0c0b7a29fdaeee3413d5f
 SHA1 (patch-an) = 77e7d17b8581b9ed72b3d514783bd41557d9b310
 SHA1 (patch-ao) = ebe3ad41e0ad49aa4ea6fe571dbf360af8c70a96
-SHA1 (patch-ap) = 49aca14c3ee0b1c3c84f3920eb875ec8700f9128
+SHA1 (patch-ap) = ddce5e811b0ba8a42af12e1bb5dc1031c524c88e
 SHA1 (patch-aq) = 1deef2a00054de186cd73f7d864c5764a41dc2b0
 SHA1 (patch-as) = bcdca9ca43ab34f51a623a5f0f385e62ce7125bf
 SHA1 (patch-at) = c585ce4f8cea93faf55de2c144167dc678bb0d62
diff -r b4864fc9bff7 -r ce9920d24c8b editors/mg2a/patches/patch-ac
--- a/editors/mg2a/patches/patch-ac     Mon Sep 02 20:28:34 2019 +0000
+++ b/editors/mg2a/patches/patch-ac     Mon Sep 02 21:41:40 2019 +0000
@@ -1,18 +1,22 @@
-$NetBSD: patch-ac,v 1.2 2000/07/10 18:26:54 tron Exp $
+$NetBSD: patch-ac,v 1.3 2019/09/02 21:41:40 nia Exp $
 
---- 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 @@
+--- sys/bsd/fileio.c.orig      1988-07-03 17:50:24.000000000 +0000
++++ sys/bsd/fileio.c
+@@ -2,15 +2,25 @@
   *            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 <stdlib.h>
++#include <string.h>
 +#include <sys/types.h>
 +#include <sys/stat.h>
  
  static        FILE    *ffp;
- extern        char    *getenv(), *strncpy();
-@@ -11,6 +14,12 @@
+-extern        char    *getenv(), *strncpy();
+ char  *adjustname();
+ 
+ /*
   * Open a file for reading.
   */
  ffropen(fn) char *fn; {
@@ -25,7 +29,7 @@
        if ((ffp=fopen(fn, "r")) == NULL)
                return (FIOFNF);
        return (FIOSUC);
-@@ -22,6 +31,12 @@
+@@ -22,6 +32,12 @@ ffropen(fn) char *fn; {
   * FALSE on error (cannot create).
   */
  ffwopen(fn) char *fn; {
@@ -38,7 +42,7 @@
        if ((ffp=fopen(fn, "w")) == NULL) {
                ewprintf("Cannot open file for writing");
                return (FIOERR);
-@@ -276,7 +291,7 @@
+@@ -276,7 +292,7 @@ char *suffix;
        if ((file = getenv("HOME")) == NULL) goto notfound;
        if (strlen(file)+7 >= NFILEN - 1) goto notfound;
        (VOID) strcpy(home, file);
@@ -47,7 +51,7 @@
        if (suffix != NULL) {
                (VOID) strcat(home, "-");
                (VOID) strcat(home, suffix);
-@@ -295,6 +310,18 @@
+@@ -295,6 +311,18 @@ notfound:
        if (access(file, F_OK ) == 0) return file;
  #endif
  
@@ -66,7 +70,7 @@
        return NULL;
  }
  #endif
-@@ -318,7 +345,8 @@
+@@ -318,7 +346,8 @@ char *frname, *toname;
        execve("cp", eargv, (char **)NULL);
        _exit(1);       /* shouldn't happen */
      }
diff -r b4864fc9bff7 -r ce9920d24c8b editors/mg2a/patches/patch-ap
--- a/editors/mg2a/patches/patch-ap     Mon Sep 02 20:28:34 2019 +0000
+++ b/editors/mg2a/patches/patch-ap     Mon Sep 02 21:41:40 2019 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ap,v 1.1 2006/06/30 15:59:58 tron Exp $
+$NetBSD: patch-ap,v 1.2 2019/09/02 21:41:40 nia Exp $
 
---- extend.c.orig      1988-07-03 18:48:52.000000000 +0100
-+++ extend.c   2006-06-30 16:56:09.000000000 +0100
+--- extend.c.orig      1988-07-03 17:48:52.000000000 +0000
++++ extend.c
 @@ -18,7 +18,9 @@
  #endif
  #endif
@@ -13,7 +13,7 @@
  extern        int rescan();
  
  /* insert a string, mainly for use from macros (created by selfinsert) */
-@@ -68,6 +70,8 @@
+@@ -68,6 +70,8 @@ int f, n;
   * don't have them.  Care is taken so running out of memory will leave
   * the keymap in a usable state.
   */
@@ -22,7 +22,7 @@
  static int remap(curmap, c, funct, pref_map)
  register KEYMAP       *curmap;/* pointer to the map being changed */
  int   c;              /* character being changed */
-@@ -80,7 +84,6 @@
+@@ -80,7 +84,6 @@ KEYMAP       *pref_map;      /* if funct==prefix, m
        KEYMAP  *mp;
        PF      *pfp;
        MAP_ELEMENT *mep;
@@ -30,7 +30,7 @@
  
        if(ele >= &curmap->map_element[curmap->map_num] || c < ele->k_base) {
            if(ele > &curmap->map_element[0] && (funct!=prefix ||
-@@ -225,13 +228,14 @@
+@@ -225,13 +228,14 @@ KEYMAP   *pref_map;      /* if funct==prefix, m
        return TRUE;
  }
  
@@ -46,7 +46,15 @@
      extern int nmaps;
  
      if((mp = (KEYMAP *)malloc((unsigned)(sizeof(KEYMAP)+
-@@ -550,6 +554,8 @@
+@@ -402,7 +406,6 @@ define_key(f, n)
+ {
+     static char buf[48] = "Define key map: ";
+     MAPS *mp;
+-    char *strncat();
+ 
+     buf[16] = '\0';
+     if(eread(buf, &buf[16], 48 - 16, EFNEW) != TRUE) return FALSE;
+@@ -550,6 +553,8 @@ load(fname) char *fname; {
        return TRUE;
  }
  
@@ -55,7 +63,7 @@
  /*
   * excline - run a line from a load file or eval-expression.
   * if FKEYS is defined, duplicate functionallity of dobind so function
-@@ -578,7 +584,6 @@
+@@ -578,7 +583,6 @@ register char *line;
  #endif
        PF      name_function();
        LINE    *lalloc();



Home | Main Index | Thread Index | Old Index