pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/editors/mg2a Rewrite to use "stdarg.h" instead of "var...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/90fb8492ad95
branches:  trunk
changeset: 461851:90fb8492ad95
user:      tron <tron%pkgsrc.org@localhost>
date:      Mon Sep 22 20:22:36 2003 +0000

description:
Rewrite to use "stdarg.h" instead of "varargs.h" to fix build problem
with GCC 3.3.1.

diffstat:

 editors/mg2a/distinfo         |    4 +-
 editors/mg2a/patches/patch-an |   13 +++
 editors/mg2a/patches/patch-ao |  156 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 172 insertions(+), 1 deletions(-)

diffs (192 lines):

diff -r d42acd11a7fc -r 90fb8492ad95 editors/mg2a/distinfo
--- a/editors/mg2a/distinfo     Mon Sep 22 19:49:10 2003 +0000
+++ b/editors/mg2a/distinfo     Mon Sep 22 20:22:36 2003 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2001/04/19 11:01:02 agc Exp $
+$NetBSD: distinfo,v 1.3 2003/09/22 20:22:36 tron Exp $
 
 SHA1 (mg2a.tar.Z) = c96f890f217eaacb78117f9c73f1ea3709ca8d3f
 Size (mg2a.tar.Z) = 383255 bytes
@@ -15,3 +15,5 @@
 SHA1 (patch-ak) = 5562aca00c8631dfb18bdadbb6a2d1fe1a11c295
 SHA1 (patch-al) = b8595b33d45b73b709bcdbf1d2e255d57f02735b
 SHA1 (patch-am) = 3544b6609262899aabd0c0b7a29fdaeee3413d5f
+SHA1 (patch-an) = 69f7c9bf33805f94cdfcb0793833be032bb26bed
+SHA1 (patch-ao) = 83090ee4aef4c12385169a5ab4e7f29febc7c3ac
diff -r d42acd11a7fc -r 90fb8492ad95 editors/mg2a/patches/patch-an
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/mg2a/patches/patch-an     Mon Sep 22 20:22:36 2003 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-an,v 1.1 2003/09/22 20:22:37 tron Exp $
+
+--- def.h.orig 1988-07-03 19:50:05.000000000 +0200
++++ def.h      2003-09-22 21:31:40.000000000 +0200
+@@ -288,7 +288,7 @@
+ extern        WINDOW  *wpopup();
+ extern        LINE    *lalloc();
+ extern        LINE    *lallocx();
+-extern        VOID    ewprintf();
++extern        VOID    ewprintf(char *, ...);
+ extern        int     nrow;
+ extern        int     ncol;
+ extern        int     ttrow;
diff -r d42acd11a7fc -r 90fb8492ad95 editors/mg2a/patches/patch-ao
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/mg2a/patches/patch-ao     Mon Sep 22 20:22:36 2003 +0000
@@ -0,0 +1,156 @@
+$NetBSD: patch-ao,v 1.1 2003/09/22 20:22:37 tron Exp $
+
+--- echo.c.orig        1988-07-03 19:50:08.000000000 +0200
++++ echo.c     2003-09-22 22:20:46.000000000 +0200
+@@ -6,23 +6,15 @@
+  * of the display screen. Used by the entire
+  * known universe.
+  */
+-/*
+- * The varargs lint directive comments are 0 an attempt to get lint to shup
+- * up about CORRECT usage of varargs.h.  It won't.
+- */
+ #include      "def.h"
+ #include      "key.h"
+-#ifdef        LOCAL_VARARGS
+-#include      "varargs.h"
+-#else
+-#include      <varargs.h>
+-#endif
++#include      <stdarg.h>
+ #ifndef NO_MACRO
+ #  include    "macro.h"
+ #endif
+ 
+ static int    veread();
+-VOID          ewprintf();
++VOID          ewprintf(char *, ...);
+ static VOID   eformat();
+ static VOID   eputi();
+ static VOID   eputl();
+@@ -111,20 +103,13 @@
+  * place. This is always a new message, there is no auto
+  * completion, and the return is echoed as such.
+  */
+-/*VARARGS 0*/
+-ereply(va_alist)
+-va_dcl
++ereply(char *fp, char *buf, int nbuf, ...)
+ {
+       va_list pvar;
+-      register char *fp, *buf;
+-      register int nbuf;
+       register int i;
+ 
+-      va_start(pvar);
+-      fp = va_arg(pvar, char *);
+-      buf = va_arg(pvar, char *);
+-      nbuf = va_arg(pvar, int);
+-      i = veread(fp, buf, nbuf, EFNEW|EFCR, &pvar);
++      va_start(pvar, nbuf);
++      i = veread(fp, buf, nbuf, EFNEW|EFCR, pvar);
+       va_end(pvar);
+       return i;
+ }
+@@ -138,24 +123,18 @@
+  * new prompt), an EFFUNC (autocomplete), or EFCR (echo
+  * the carriage return as CR).
+  */
+-/* VARARGS 0 */
+-eread(va_alist)
+-va_dcl
++eread(char *fp, char *buf, int nbuf, int flag, ...)
+ {
+       va_list pvar;
+-      char *fp, *buf;
+-      int nbuf, flag, i;
+-      va_start(pvar);
+-      fp   = va_arg(pvar, char *);
+-      buf  = va_arg(pvar, char *);
+-      nbuf = va_arg(pvar, int);
+-      flag = va_arg(pvar, int);
+-      i = veread(fp, buf, nbuf, flag, &pvar);
++      int i;
++
++      va_start(pvar, flag);
++      i = veread(fp, buf, nbuf, flag, pvar);
+       va_end(pvar);
+       return i;
+ }
+ 
+-static veread(fp, buf, nbuf, flag, ap) char *fp; char *buf; va_list *ap; {
++static veread(fp, buf, nbuf, flag, ap) char *fp; char *buf; va_list ap; {
+       register int    cpos;
+       register int    i;
+       register int    c;
+@@ -425,22 +404,18 @@
+  * echo line. The formatting is done by a call
+  * to the standard formatting routine.
+  */
+-/*VARARGS 0 */
+ VOID
+-ewprintf(va_alist)
+-va_dcl
++ewprintf(char *fp, ...)
+ {
+       va_list pvar;
+-      register char *fp;
+ 
+ #ifndef NO_MACRO
+       if(inmacro) return;
+ #endif
+-      va_start(pvar);
+-      fp = va_arg(pvar, char *);
++      va_start(pvar, fp);
+       ttcolor(CTEXT);
+       ttmove(nrow-1, 0);
+-      eformat(fp, &pvar);
++      eformat(fp, pvar);
+       va_end(pvar);
+       tteeol();
+       ttflush();
+@@ -459,7 +434,7 @@
+ static VOID
+ eformat(fp, ap)
+ register char *fp;
+-register va_list *ap;
++va_list ap;
+ {
+       register int c;
+       char    kname[NKNAME];
+@@ -473,7 +448,7 @@
+                       c = *fp++;
+                       switch (c) {
+                       case 'c':
+-                              (VOID) keyname(kname, va_arg(*ap, int));
++                              (VOID) keyname(kname, va_arg(ap, int));
+                               eputs(kname);
+                               break;
+ 
+@@ -488,22 +463,22 @@
+                               break;
+ 
+                       case 'd':
+-                              eputi(va_arg(*ap, int), 10);
++                              eputi(va_arg(ap, int), 10);
+                               break;
+ 
+                       case 'o':
+-                              eputi(va_arg(*ap, int), 8);
++                              eputi(va_arg(ap, int), 8);
+                               break;
+ 
+                       case 's':
+-                              eputs(va_arg(*ap, char *));
++                              eputs(va_arg(ap, char *));
+                               break;
+ 
+                       case 'l':/* explicit longword */
+                               c = *fp++;
+                               switch(c) {
+                               case 'd':
+-                                      eputl((long)va_arg(*ap, long), 10);
++                                      eputl((long)va_arg(ap, long), 10);
+                                       break;
+                               default:
+                                       eputc(c);



Home | Main Index | Thread Index | Old Index