pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/editors/ce make this compile with gcc3: varargs -> stdarg



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cb33950ea23e
branches:  trunk
changeset: 467297:cb33950ea23e
user:      agc <agc%pkgsrc.org@localhost>
date:      Wed Jan 28 14:43:01 2004 +0000

description:
make this compile with gcc3: varargs -> stdarg

diffstat:

 editors/ce/distinfo         |    3 +-
 editors/ce/patches/patch-ad |  118 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 120 insertions(+), 1 deletions(-)

diffs (135 lines):

diff -r 5be5c022dda0 -r cb33950ea23e editors/ce/distinfo
--- a/editors/ce/distinfo       Wed Jan 28 14:42:21 2004 +0000
+++ b/editors/ce/distinfo       Wed Jan 28 14:43:01 2004 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1.1.1 2002/04/08 19:59:08 schmonz Exp $
+$NetBSD: distinfo,v 1.2 2004/01/28 14:43:01 agc Exp $
 
 SHA1 (ce-4.4.tar.gz) = f5ab8a5ff1e81212c020831675d3b06a4425fa3d
 Size (ce-4.4.tar.gz) = 207221 bytes
 SHA1 (patch-aa) = 4705b744bd5edbfb48fcbcdbfc56bc2970359089
 SHA1 (patch-ab) = 33aa1a7959d865f09f1e92fcc8d4941a8a13aefb
 SHA1 (patch-ac) = bcd8a6b14e04cc76f3afc30a4e2d8e79aad70389
+SHA1 (patch-ad) = bb705fd400901b5fb512653342c031e5da6044d2
diff -r 5be5c022dda0 -r cb33950ea23e editors/ce/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/ce/patches/patch-ad       Wed Jan 28 14:43:01 2004 +0000
@@ -0,0 +1,118 @@
+$NetBSD: patch-ad,v 1.1 2004/01/28 14:43:01 agc Exp $
+
+--- ml.c.orig  1997-05-16 19:43:51.000000000 +0100
++++ ml.c       2004-01-28 14:40:11.000000000 +0000
+@@ -354,22 +354,19 @@
+  * author, Paul Placeway (paul%tut.cis.ohio-state.edu@localhost)
+  */
+ 
+-#include <varargs.h>
++#include <stdarg.h>
+ 
+ /*VARARGS0*/
+-mlwrite(va_alist)
+-va_dcl
++mlwrite(char *fp, ...)
+ {
+-      register char *fp;
+       va_list ap;
+ 
+       if (clexec)
+               return; 
+-      va_start(ap);
+-      fp = va_arg(ap, char *);
++      va_start(ap, fp);
+       movecursor(term.t_nrow,0);
+       (*term.t_color)(CTEXT);
+-      (void) mlprintf(fp, &ap);
++      (void) mlprintf(fp, ap);
+       va_end(ap);
+       (*term.t_eeol)();
+       (*term.t_flush)();
+@@ -389,9 +386,7 @@
+ static char prbuf[128];
+ 
+ /*VARARGS*/
+-mlprintf (fp, ap)
+-register char *fp;
+-va_list               *ap;
++mlprintf (char *fp, ...)
+ {
+       register char *f, *bp;
+       register long l;
+@@ -399,9 +394,11 @@
+       register int i;
+       register int fmt;
+       register char pad = ' ';
++      va_list ap;
+       int flush_left = 0, f_width = 0, prec = INF, hash = 0, do_long = 0;
+       int sign = 0;
+ 
++      va_start(ap, fp);
+       f = fp;
+       for (; *f; f++) {
+               CHKTTCOL();
+@@ -419,7 +416,7 @@
+                               f++;
+                       }
+                       if (*f == '*') {        /* field width */
+-                              f_width = va_arg(*ap, int);
++                              f_width = va_arg(ap, int);
+                               f++;
+                       } else if (ISDIGIT(*f)) {
+                               f_width = atoi (f);
+@@ -429,7 +426,7 @@
+                       if (*f == '.') {        /* precision */
+                               f++;
+                               if (*f == '*') {
+-                                      prec = va_arg(*ap, int);
++                                      prec = va_arg(ap, int);
+                                       f++;
+                               } else if (ISDIGIT(*f)) {
+                                       prec = atoi (f);
+@@ -454,9 +451,9 @@
+                       switch (fmt) {  /* do the format */
+                           case 'd':
+                               if (do_long)
+-                                      l = va_arg(*ap, long);
++                                      l = va_arg(ap, long);
+                               else
+-                                      l = (long) ( va_arg(*ap, int) );
++                                      l = (long) ( va_arg(ap, int) );
+                               if (l < 0) {
+                                       sign = 1;                   
+                                       l = -l;
+@@ -485,9 +482,9 @@
+                           case 'x':
+                           case 'u':
+                               if (do_long)
+-                                      u = va_arg(*ap, unsigned long);
++                                      u = va_arg(ap, unsigned long);
+                               else
+-                                      u = (unsigned long) (va_arg(*ap, unsigned));
++                                      u = (unsigned long) (va_arg(ap, unsigned));
+                               if (fmt == 'u') { /* unsigned decimal */
+                                       do {
+                                               *bp++ = u % 10 + '0';
+@@ -525,11 +522,11 @@
+                                       }
+                               break;
+                           case 'c':
+-                              i = va_arg(*ap, int);
++                              i = va_arg(ap, int);
+                               mlputchar(i);
+                               break;
+                           case 's':
+-                              bp = va_arg(*ap, char *);
++                              bp = va_arg(ap, char *);
+                               f_width = f_width - strlen(bp);
+                               if (!flush_left)
+                                       while (f_width-- > 0) {
+@@ -553,6 +550,7 @@
+                       pad = ' ';
+               }
+       }
++      va_end(ap);
+       return 0;
+ }
+ 



Home | Main Index | Thread Index | Old Index