Sat Oct 1 21:42:16 2011 UTC ()
Buildlink with curses correctly. Fix build. Add patch comments.
PKGREVISION -> 2.


(dholland)
diff -r1.11 -r1.12 pkgsrc/sysutils/pcvt-utils/Makefile
diff -r1.7 -r1.8 pkgsrc/sysutils/pcvt-utils/distinfo
diff -r1.1.1.1 -r1.2 pkgsrc/sysutils/pcvt-utils/patches/patch-ab
diff -r1.1.1.1 -r1.2 pkgsrc/sysutils/pcvt-utils/patches/patch-ac
diff -r1.1.1.1 -r1.2 pkgsrc/sysutils/pcvt-utils/patches/patch-ae
diff -r1.2 -r1.3 pkgsrc/sysutils/pcvt-utils/patches/patch-ad
diff -r1.2 -r1.3 pkgsrc/sysutils/pcvt-utils/patches/patch-af
diff -r1.2 -r1.3 pkgsrc/sysutils/pcvt-utils/patches/patch-ah
diff -r1.1 -r1.2 pkgsrc/sysutils/pcvt-utils/patches/patch-ag
diff -r1.1 -r1.2 pkgsrc/sysutils/pcvt-utils/patches/patch-ai
diff -r0 -r1.1 pkgsrc/sysutils/pcvt-utils/patches/patch-fed_misc_c

cvs diff -r1.11 -r1.12 pkgsrc/sysutils/pcvt-utils/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/pcvt-utils/Makefile 2008/02/28 11:58:49 1.11
+++ pkgsrc/sysutils/pcvt-utils/Makefile 2011/10/01 21:42:16 1.12
@@ -1,32 +1,33 @@ @@ -1,32 +1,33 @@
1# $NetBSD: Makefile,v 1.11 2008/02/28 11:58:49 rillig Exp $ 1# $NetBSD: Makefile,v 1.12 2011/10/01 21:42:16 dholland Exp $
2# 2#
3 3
4DISTNAME= netbsd-pcvt-20000611 4DISTNAME= netbsd-pcvt-20000611
5PKGNAME= pcvt-utils-20000611 5PKGNAME= pcvt-utils-20000611
6PKGREVISION= 1 6PKGREVISION= 2
7CATEGORIES= sysutils 7CATEGORIES= sysutils
8MASTER_SITES= ${MASTER_SITE_LOCAL} 8MASTER_SITES= ${MASTER_SITE_LOCAL}
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/arch/i386/isa/pcvt/ 11HOMEPAGE= http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/arch/i386/isa/pcvt/
12COMMENT= Useful leftovers from pcvt: playvt and two font editors 12COMMENT= Useful leftovers from pcvt: playvt and two font editors
13 13
14PKG_DESTDIR_SUPPORT= user-destdir 14PKG_DESTDIR_SUPPORT= user-destdir
15 15
16ONLY_FOR_PLATFORM= NetBSD-*-* 16ONLY_FOR_PLATFORM= NetBSD-*-*
17USE_BSD_MAKEFILE= yes 17USE_BSD_MAKEFILE= yes
18WRKSRC= ${WRKDIR}/pcvt/Util 18WRKSRC= ${WRKDIR}/pcvt/Util
19 19
20AUTO_MKDIRS= yes 20AUTO_MKDIRS= yes
21 21
22do-install: 22do-install:
23 ${INSTALL_PROGRAM} \ 23 ${INSTALL_PROGRAM} \
24 ${WRKSRC}/demo/playvt \ 24 ${WRKSRC}/demo/playvt \
25 ${WRKSRC}/fed/fed \ 25 ${WRKSRC}/fed/fed \
26 ${WRKSRC}/fontedit/fontedit \ 26 ${WRKSRC}/fontedit/fontedit \
27 ${DESTDIR}${PREFIX}/bin 27 ${DESTDIR}${PREFIX}/bin
28 ${INSTALL_DATA} \ 28 ${INSTALL_DATA} \
29 ${WRKSRC}/demo/*.vt \ 29 ${WRKSRC}/demo/*.vt \
30 ${DESTDIR}${PREFIX}/share/playvt 30 ${DESTDIR}${PREFIX}/share/playvt
31 31
 32.include "../../mk/curses.buildlink3.mk"
32.include "../../mk/bsd.pkg.mk" 33.include "../../mk/bsd.pkg.mk"

cvs diff -r1.7 -r1.8 pkgsrc/sysutils/pcvt-utils/distinfo (expand / switch to unified diff)

--- pkgsrc/sysutils/pcvt-utils/distinfo 2007/10/30 02:22:54 1.7
+++ pkgsrc/sysutils/pcvt-utils/distinfo 2011/10/01 21:42:16 1.8
@@ -1,14 +1,15 @@ @@ -1,14 +1,15 @@
1$NetBSD: distinfo,v 1.7 2007/10/30 02:22:54 bjs Exp $ 1$NetBSD: distinfo,v 1.8 2011/10/01 21:42:16 dholland Exp $
2 2
3SHA1 (netbsd-pcvt-20000611.tar.gz) = ea51ded62dc82635f1eda3cd198b29cf6f4941ea 3SHA1 (netbsd-pcvt-20000611.tar.gz) = ea51ded62dc82635f1eda3cd198b29cf6f4941ea
4RMD160 (netbsd-pcvt-20000611.tar.gz) = 33364b8503d286047163e9f4256374faa3c6b455 4RMD160 (netbsd-pcvt-20000611.tar.gz) = 33364b8503d286047163e9f4256374faa3c6b455
5Size (netbsd-pcvt-20000611.tar.gz) = 315263 bytes 5Size (netbsd-pcvt-20000611.tar.gz) = 315263 bytes
6SHA1 (patch-aa) = 47dec68f79792803f9b4480c8fde812c97b49c46 6SHA1 (patch-aa) = 47dec68f79792803f9b4480c8fde812c97b49c46
7SHA1 (patch-ab) = cc05a87826f9573611bb0e70092b9f4b825584a8 7SHA1 (patch-ab) = f553c956aea18464bced85743a32f3a489870f67
8SHA1 (patch-ac) = 634aaf8fe965ade5c972c852fbb1710bf1028b2e 8SHA1 (patch-ac) = 9defbfde072b72281a20902e8bc3cc359a46b98b
9SHA1 (patch-ad) = c6158765ff8ecc26dd9c297089c90b03c98172cb 9SHA1 (patch-ad) = 7eca3b30d973f38e51cff98bdb12b58a033341b2
10SHA1 (patch-ae) = d81e7ee5f59bf5d4e23d8f19868e190e2a8b2a53 10SHA1 (patch-ae) = cc84e968dd2f73fd3328b87de642e9f0d92fc2ac
11SHA1 (patch-af) = ea4c0a0fee930184532d7f6961ef951d1e882027 11SHA1 (patch-af) = bd625913a3693e15d305dd56113695953907e99b
12SHA1 (patch-ag) = fe39a7224c9ea78d97750a90e110d805d353c0ad 12SHA1 (patch-ag) = ecc1633ca79c823f2105d9722228c4fd55646835
13SHA1 (patch-ah) = c7654e13adc69f365b9674b7aa369f8ffb2c757f 13SHA1 (patch-ah) = 4056eb297b3d155971f2bd96cf8e337a01d4850c
14SHA1 (patch-ai) = 436e86ec12165a3f2f6f004226f00e36c9a21e71 14SHA1 (patch-ai) = f35b612fe053b516503d23799db236fde94373f5
 15SHA1 (patch-fed_misc_c) = 713f5a09db6dfbf7ea71b0a1c76304806d7e07f2

cvs diff -r1.1.1.1 -r1.2 pkgsrc/sysutils/pcvt-utils/patches/patch-ab (expand / switch to unified diff)

--- pkgsrc/sysutils/pcvt-utils/patches/patch-ab 2000/12/04 13:38:25 1.1.1.1
+++ pkgsrc/sysutils/pcvt-utils/patches/patch-ab 2011/10/01 21:42:16 1.2
@@ -1,14 +1,17 @@ @@ -1,14 +1,17 @@
1$NetBSD: patch-ab,v 1.1.1.1 2000/12/04 13:38:25 hubertf Exp $ 1$NetBSD: patch-ab,v 1.2 2011/10/01 21:42:16 dholland Exp $
 2
 3- use modern C
 4- use the right include files for netbsd with wscons
2 5
3--- kbdio/kbdio.y.orig Mon Dec 4 13:57:07 2000 6--- kbdio/kbdio.y.orig Mon Dec 4 13:57:07 2000
4+++ kbdio/kbdio.y 7+++ kbdio/kbdio.y
5@@ -40,7 +40,13 @@ 8@@ -40,7 +40,13 @@
6 #include <math.h> 9 #include <math.h>
7 #include <sys/fcntl.h> 10 #include <sys/fcntl.h>
8 #include <machine/cpufunc.h> 11 #include <machine/cpufunc.h>
9+#include <unistd.h> 12+#include <unistd.h>
10+#if WSCONS 13+#if WSCONS
11+#include <sys/ioctl.h> 14+#include <sys/ioctl.h>
12+#include <dev/wscons/wsdisplay_usl_io.h> 15+#include <dev/wscons/wsdisplay_usl_io.h>
13+#else 16+#else
14 #include <machine/pcvt_ioctl.h> 17 #include <machine/pcvt_ioctl.h>

cvs diff -r1.1.1.1 -r1.2 pkgsrc/sysutils/pcvt-utils/patches/patch-ac (expand / switch to unified diff)

--- pkgsrc/sysutils/pcvt-utils/patches/patch-ac 2000/12/04 13:38:25 1.1.1.1
+++ pkgsrc/sysutils/pcvt-utils/patches/patch-ac 2011/10/01 21:42:16 1.2
@@ -1,12 +1,15 @@ @@ -1,12 +1,15 @@
1$NetBSD: patch-ac,v 1.1.1.1 2000/12/04 13:38:25 hubertf Exp $ 1$NetBSD: patch-ac,v 1.2 2011/10/01 21:42:16 dholland Exp $
 2
 3- use pkgsrc curses
2 4
3--- fed/Makefile.orig Mon Dec 4 13:49:07 2000 5--- fed/Makefile.orig Mon Dec 4 13:49:07 2000
4+++ fed/Makefile 6+++ fed/Makefile
5@@ -1,6 +1,6 @@ 7@@ -1,6 +1,6 @@
6 PROG= fed 8 PROG= fed
7 SRCS= fed.c select.c edit.c misc.c 9 SRCS= fed.c select.c edit.c misc.c
8-LDADD= -lncurses 10-LDADD= -lncurses
9+LDADD= -lcurses 11+LDADD= -lcurses
10 BINDIR= /usr/local/bin 12-BINDIR= /usr/local/bin
 13+BINDIR?= /usr/local/bin
11  14
12 MKMAN= no 15 MKMAN= no

cvs diff -r1.1.1.1 -r1.2 pkgsrc/sysutils/pcvt-utils/patches/patch-ae (expand / switch to unified diff)

--- pkgsrc/sysutils/pcvt-utils/patches/patch-ae 2000/12/04 13:38:25 1.1.1.1
+++ pkgsrc/sysutils/pcvt-utils/patches/patch-ae 2011/10/01 21:42:16 1.2
@@ -1,53 +1,57 @@ @@ -1,53 +1,57 @@
1$NetBSD: patch-ae,v 1.1.1.1 2000/12/04 13:38:25 hubertf Exp $ 1$NetBSD: patch-ae,v 1.2 2011/10/01 21:42:16 dholland Exp $
2 2
3--- fed/select.c.orig Mon Dec 4 13:46:59 2000 3- avoid symbol name conflict on "sr"
 4
 5--- fed/select.c.orig 1995-10-07 21:44:51.000000000 +0000
4+++ fed/select.c 6+++ fed/select.c
5@@ -46,7 +46,8 @@ 7@@ -46,9 +46,8 @@
6  8
7 #include "fed.h" 9 #include "fed.h"
8  10
9-int sc, sr, scurchar; 11-int sc, sr, scurchar;
 12-
 13-int edit();
10+/* "sr" is defined in <curses.h> for some terminal capability?!? */ 14+/* "sr" is defined in <curses.h> for some terminal capability?!? */
11+int sc, fed_sr, scurchar; 15+int sc, fed_sr, scurchar;
12  16
13 int edit(); 17 void sel_mode(void)
14  18 {
15@@ -153,12 +154,12 @@ 19@@ -153,12 +152,12 @@ int selectc()
16 case 'g': 20 case 'g':
17 case 'G': 21 case 'G':
18 dis_cmd(" Exchange: select Destination, then press RETURN or any other Key to ABORT"); 22 dis_cmd(" Exchange: select Destination, then press RETURN or any other Key to ABORT");
19- sr = r; 23- sr = r;
20+ fed_sr = r; 24+ fed_sr = r;
21 sc = c; 25 sc = c;
22 scurchar = curchar; 26 scurchar = curchar;
23 if((curchar = sel_dest()) == -1) 27 if((curchar = sel_dest()) == -1)
24 { /* failsafe */ 28 { /* failsafe */
25- r = sr; 29- r = sr;
26+ r = fed_sr; 30+ r = fed_sr;
27 c = sc; 31 c = sc;
28 curchar = scurchar; 32 curchar = scurchar;
29 } 33 }
30@@ -174,12 +175,12 @@ 34@@ -174,12 +173,12 @@ int selectc()
31 case 'm': 35 case 'm':
32 case 'M': 36 case 'M':
33 dis_cmd(" Move: select Destination, then press RETURN or any other Key to ABORT"); 37 dis_cmd(" Move: select Destination, then press RETURN or any other Key to ABORT");
34- sr = r; 38- sr = r;
35+ fed_sr = r; 39+ fed_sr = r;
36 sc = c; 40 sc = c;
37 scurchar = curchar; 41 scurchar = curchar;
38 if((curchar = sel_dest()) == -1) 42 if((curchar = sel_dest()) == -1)
39 { /* failsafe */ 43 { /* failsafe */
40- r = sr; 44- r = sr;
41+ r = fed_sr; 45+ r = fed_sr;
42 c = sc; 46 c = sc;
43 curchar = scurchar; 47 curchar = scurchar;
44 } 48 }
45@@ -320,7 +321,7 @@ 49@@ -320,7 +319,7 @@ void normal_uset(int r, int c)
46 mvwprintw(set_win,(r+1),((c*2)+1),"%c%c",h,l); 50 mvwprintw(set_win,(r+1),((c*2)+1),"%c%c",h,l);
47 wmove(set_win,(r+1),((c*2)+1)); 51 wmove(set_win,(r+1),((c*2)+1));
48  52
49- if((r==sr) && (c==sc)) 53- if((r==sr) && (c==sc))
50+ if((r==fed_sr) && (c==sc)) 54+ if((r==fed_sr) && (c==sc))
51 { 55 {
52 wattron(set_win,A_REVERSE); 56 wattron(set_win,A_REVERSE);
53 mvwprintw(set_win,(r+1),((c*2)+1),"%c%c",h,l); 57 mvwprintw(set_win,(r+1),((c*2)+1),"%c%c",h,l);

cvs diff -r1.2 -r1.3 pkgsrc/sysutils/pcvt-utils/patches/patch-ad (expand / switch to unified diff)

--- pkgsrc/sysutils/pcvt-utils/patches/patch-ad 2002/05/11 20:25:05 1.2
+++ pkgsrc/sysutils/pcvt-utils/patches/patch-ad 2011/10/01 21:42:16 1.3
@@ -1,25 +1,29 @@ @@ -1,25 +1,29 @@
1$NetBSD: patch-ad,v 1.2 2002/05/11 20:25:05 wiz Exp $ 1$NetBSD: patch-ad,v 1.3 2011/10/01 21:42:16 dholland Exp $
2 2
3--- fed/fed.h.orig Sat Oct 7 22:44:48 1995 3- use pkgsrc curses
 4- void main
 5- use const for clean build
 6
 7--- fed/fed.h.orig 1995-10-07 21:44:48.000000000 +0000
4+++ fed/fed.h 8+++ fed/fed.h
5@@ -32,7 +32,11 @@ 9@@ -32,7 +32,7 @@
6 * fed.h, 3.00, last edit-date: [Sun Jan 2 20:10:31 1994] 10 * fed.h, 3.00, last edit-date: [Sun Jan 2 20:10:31 1994]
7 */ 11 */
8  12
9+#ifdef __NetBSD__ 13-#include <ncurses.h>
10+#include <curses.h> 14+#include <curses.h>
11+#else 
12 #include <ncurses.h> 
13+#endif 
14 #include <stdlib.h> 15 #include <stdlib.h>
15 #include <string.h> 16 #include <string.h>
16 #include <unistd.h> 17 #include <unistd.h>
17@@ -109,7 +113,7 @@ 18@@ -109,9 +113,9 @@ void invert ( void );
18 void setchr ( char type ); 19 void setchr ( char type );
19 void setrow ( char type ); 20 void setrow ( char type );
20 void setcol ( char type ); 21 void setcol ( char type );
21-void main ( int argc, char *argv[] ); 22-void main ( int argc, char *argv[] );
22+int main ( int argc, char *argv[] ); 23+int main ( int argc, char *argv[] );
23 void readfont ( char *filename ); 24 void readfont ( char *filename );
24 void dis_cmd ( char *strg ); 25-void dis_cmd ( char *strg );
 26+void dis_cmd ( const char *strg );
25 void clr_cmd ( void ); 27 void clr_cmd ( void );
 28 void save_ch ( void );
 29 void move_ch ( int src, int dest );

cvs diff -r1.2 -r1.3 pkgsrc/sysutils/pcvt-utils/patches/patch-af (expand / switch to unified diff)

--- pkgsrc/sysutils/pcvt-utils/patches/patch-af 2006/11/13 14:51:08 1.2
+++ pkgsrc/sysutils/pcvt-utils/patches/patch-af 2011/10/01 21:42:16 1.3
@@ -1,14 +1,87 @@ @@ -1,14 +1,87 @@
1$NetBSD: patch-af,v 1.2 2006/11/13 14:51:08 drochner Exp $ 1$NetBSD: patch-af,v 1.3 2011/10/01 21:42:16 dholland Exp $
2 2
3--- demo/playvt.c.orig 1997-11-01 07:49:36.000000000 +0100 3Use standard C.
 4
 5--- demo/playvt.c.orig 1997-11-01 06:49:36.000000000 +0000
4+++ demo/playvt.c 6+++ demo/playvt.c
5@@ -42,7 +42,9 @@ static char *id = 7@@ -30,7 +30,7 @@
 8 *
 9 */
 10
 11-static char *id =
 12+const char id[] =
 13 "@(#)playvt.c, 1.00, Last Edit-Date: [Sun Jan 1 18:32:22 1995]";
 14
 15 /*---------------------------------------------------------------------------*
 16@@ -42,22 +42,21 @@ static char *id =
6 *---------------------------------------------------------------------------*/ 17 *---------------------------------------------------------------------------*/
7  18
8 #include <stdio.h> 19 #include <stdio.h>
9+#include <string.h> 20+#include <string.h>
10 #include <unistd.h> 21 #include <unistd.h>
11+#include <stdlib.h> 22+#include <stdlib.h>
 23+#include <err.h>
 24
 25-main(argc,argv)
 26-int argc;
 27-char *argv[];
 28-{
 29- extern int optind;
 30- extern int opterr;
 31- extern char *optarg;
 32+void usage(void);
 33
 34+int
 35+main(int argc, char *argv[])
 36+{
 37 int c;
 38 FILE *fp = stdin;
 39 volatile int i;
 40 int delay = 0;
 41- int fflag = -1;
 42- char *filename;
 43+ char *filename = NULL;
 44
 45 while( (c = getopt(argc, argv, "d:f:")) != -1)
 46 {
 47@@ -69,7 +68,6 @@ char *argv[];
 48
 49 case 'f':
 50 filename = optarg;
 51- fflag = 1;
 52 break;
 53
 54 case '?':
 55@@ -79,15 +77,11 @@ char *argv[];
 56 }
 57 }
 58
 59- if(fflag == 1)
 60+ if(filename != NULL)
 61 {
 62 if((fp = fopen(filename, "r")) == NULL)
 63 {
 64- char buffer[80];
 65- strcpy(buffer,"ERROR opening file ");
 66- strcat(buffer,filename);
 67- perror(buffer);
 68- exit(1);
 69+ err(1, "ERROR opening file %s", filename);
 70 }
 71 }
 72
 73@@ -100,7 +94,8 @@ char *argv[];
 74 }
 75
12  76
13 main(argc,argv) 77-usage()
14 int argc; 78+void
 79+usage(void)
 80 {
 81 fprintf(stderr,"\nplayvt - play a VT animation with programmable delay\n");
 82 fprintf(stderr,"usage: playvt -f [filename] -d [delay]\n");
 83@@ -108,4 +102,3 @@ usage()
 84 fprintf(stderr," -d <delay> delay between characters\n");
 85 exit(1);
 86 }
 87-

cvs diff -r1.2 -r1.3 pkgsrc/sysutils/pcvt-utils/patches/patch-ah (expand / switch to unified diff)

--- pkgsrc/sysutils/pcvt-utils/patches/patch-ah 2006/11/13 14:51:08 1.2
+++ pkgsrc/sysutils/pcvt-utils/patches/patch-ah 2011/10/01 21:42:16 1.3
@@ -1,115 +1,362 @@ @@ -1,115 +1,362 @@
1$NetBSD: patch-ah,v 1.2 2006/11/13 14:51:08 drochner Exp $ 1$NetBSD: patch-ah,v 1.3 2011/10/01 21:42:16 dholland Exp $
2 2
3--- fontedit/fontedit.c.orig 1995-10-07 22:44:58.000000000 +0100 3- use modern C
 4- declare functions properly
 5- use const for a clean build
 6- use signed/unsigned consistently
 7
 8--- fontedit/fontedit.c.orig 1995-10-07 21:44:58.000000000 +0000
4+++ fontedit/fontedit.c 9+++ fontedit/fontedit.c
5@@ -26,20 +26,21 @@ void clear_screen(); 10@@ -22,24 +22,26 @@
 11 * - eap@bucsf.bu.edu
 12 */
 13
 14-void clear_screen();
6 #include <stdio.h> 15 #include <stdio.h>
7 #ifdef SYSV 16 #ifdef SYSV
8 #include <sys/termio.h> 17 #include <sys/termio.h>
9-#endif SYSV 18-#endif SYSV
10+#endif /* SYSV */ 19+#endif /* SYSV */
11 #ifdef BSD 20 #ifdef BSD
12 #include <sys/ioctl.h> 21 #include <sys/ioctl.h>
13-#endif BSD 22-#endif BSD
14+#endif /* BSD */ 23+#endif /* BSD */
15 #if defined (__NetBSD__) || defined (__FreeBSD__) 24 #if defined (__NetBSD__) || defined (__FreeBSD__)
16 #include <sys/termios.h> 25 #include <sys/termios.h>
17 #include <sys/ioctl.h> 26 #include <sys/ioctl.h>
18 #endif /* __NetBSD__ || __FreeBSD__ */ 27 #endif /* __NetBSD__ || __FreeBSD__ */
19 #include <signal.h> 28 #include <signal.h>
20+#include <stdlib.h> 29+#include <stdlib.h>
 30+#include <string.h>
 31+#include <unistd.h>
21  32
22 #ifdef CURFIX 33 #ifdef CURFIX
23 #define CURSORON "\033[?25h" 34 #define CURSORON "\033[?25h"
24 #define CURSOROFF "\033[?25l" 35 #define CURSOROFF "\033[?25l"
25-#endif CURFIX 36-#endif CURFIX
26+#endif /* CURFIX */ 37+#endif /* CURFIX */
27  38
28 #define MAX_ROWS 10 39 #define MAX_ROWS 10
29 #define MAX_COLS 8 40 #define MAX_COLS 8
30@@ -103,10 +104,10 @@ unsigned int current_entry; 41@@ -103,33 +105,51 @@ unsigned int current_entry;
31  42
32 #ifdef SYSV 43 #ifdef SYSV
33 struct termio old_stty, new_stty; 44 struct termio old_stty, new_stty;
34-#endif SYSV 45-#endif SYSV
35+#endif /* SYSV */ 46+#endif /* SYSV */
36 #ifdef BSD 47 #ifdef BSD
37 struct sgttyb old_stty, new_stty; 48 struct sgttyb old_stty, new_stty;
38-#endif BSD 49-#endif BSD
39+#endif /* BSD */ 50+#endif /* BSD */
40 #if defined (__NetBSD__) || defined (__FreeBSD__) 51 #if defined (__NetBSD__) || defined (__FreeBSD__)
41 struct termios old_stty, new_stty; 52 struct termios old_stty, new_stty;
42 #endif /* __NetBSD__ || __FreeBSD__ */ 53 #endif /* __NetBSD__ || __FreeBSD__ */
43@@ -123,13 +124,13 @@ interrupt() 54 FILE * font_file = (FILE *)0;
44 void clear_screen(); 55
 56+void interrupt(void);
 57+void command(void);
 58+void pad(void);
 59+void init_restore(void);
 60+void clear_screen(void);
 61+void save_table(FILE *);
 62+void get_table(FILE *);
 63+void build_entry(unsigned);
 64+void extract_entry(unsigned);
 65+void send_entry(unsigned);
 66+void print_entry(unsigned, bool);
 67+void highlight(unsigned, unsigned, bool);
 68+void draw_current(void);
 69+void init_restore(void);
 70+void help(void);
 71+void warning(const char *);
 72+void move(int, int);
 73+int get_key(void);
 74
 75 /*
 76 * Interrupt
 77 * Exit gracefully.
 78 */
 79
 80-interrupt()
 81+void
 82+interrupt(void)
 83 {
 84- void clear_screen();
45 #ifdef CURFIX 85 #ifdef CURFIX
46 printf("%s\n",CURSORON);  86 printf("%s\n",CURSORON);
47-#endif CURFIX  87-#endif CURFIX
48+#endif /* CURFIX */ 88+#endif /* CURFIX */
49 #ifdef SYSV 89 #ifdef SYSV
50 ioctl( 0, TCSETA, &old_stty ); 90 ioctl( 0, TCSETA, &old_stty );
51-#endif SYSV 91-#endif SYSV
52+#endif /* SYSV */ 92+#endif /* SYSV */
53 #ifdef BSD 93 #ifdef BSD
54 ioctl( 0, TIOCSETP, &old_stty ); 94 ioctl( 0, TIOCSETP, &old_stty );
55-#endif BSD 95-#endif BSD
56+#endif /* BSD */ 96+#endif /* BSD */
57 #if defined (__NetBSD__) || defined (__FreeBSD__) 97 #if defined (__NetBSD__) || defined (__FreeBSD__)
58 ioctl( 0, TIOCSETA, &old_stty ); 98 ioctl( 0, TIOCSETA, &old_stty );
59 #endif /* __NetBSD__ || __FreeBSD__ */ 99 #endif /* __NetBSD__ || __FreeBSD__ */
60@@ -180,13 +181,13 @@ char *argv[]; 100@@ -142,13 +162,10 @@ interrupt()
 101 * Main
 102 * Grab input/output file and call main command processor.
 103 */
 104-
 105-main( argc, argv )
 106-int argc;
 107-char *argv[];
 108+
 109+int
 110+main( int argc, char *argv[] )
 111 {
 112- void command(), init_restore(), clear_screen();
 113- void save_table(), get_table(), extract_entry();
 114
 115 if ( argc != 2 ) {
 116 fprintf( stderr, "usage: fontedit filename\n" );
 117@@ -180,13 +197,13 @@ char *argv[];
61 } 118 }
62 #ifdef CURFIX 119 #ifdef CURFIX
63 printf("%s\n",CURSOROFF); 120 printf("%s\n",CURSOROFF);
64-#endif CURFIX 121-#endif CURFIX
65+#endif /* CURFIX */ 122+#endif /* CURFIX */
66 #ifdef SYSV 123 #ifdef SYSV
67 ioctl( 0, TCGETA, &old_stty ); 124 ioctl( 0, TCGETA, &old_stty );
68-#endif SYSV 125-#endif SYSV
69+#endif /* SYSV */ 126+#endif /* SYSV */
70 #ifdef BSD 127 #ifdef BSD
71 ioctl( 0, TIOCGETP, &old_stty ); 128 ioctl( 0, TIOCGETP, &old_stty );
72-#endif BSD 129-#endif BSD
73+#endif /* BSD */ 130+#endif /* BSD */
74 #if defined (__NetBSD__) || defined (__FreeBSD__) 131 #if defined (__NetBSD__) || defined (__FreeBSD__)
75 ioctl( 0, TIOCGETA, &old_stty ); 132 ioctl( 0, TIOCGETA, &old_stty );
76 #endif /* __NetBSD__ || __FreeBSD__ */ 133 #endif /* __NetBSD__ || __FreeBSD__ */
77@@ -196,7 +197,7 @@ char *argv[]; 134@@ -196,7 +213,7 @@ char *argv[];
78 new_stty.c_lflag &= ~ICANON; 135 new_stty.c_lflag &= ~ICANON;
79 new_stty.c_cc[VMIN] = 1; 136 new_stty.c_cc[VMIN] = 1;
80 ioctl( 0, TCSETA, &new_stty ); 137 ioctl( 0, TCSETA, &new_stty );
81-#endif SYSV 138-#endif SYSV
82+#endif /* SYSV */ 139+#endif /* SYSV */
83 #if defined (__NetBSD__) || defined (__FreeBSD__) 140 #if defined (__NetBSD__) || defined (__FreeBSD__)
84 new_stty.c_lflag &= ~ICANON; 141 new_stty.c_lflag &= ~ICANON;
85 new_stty.c_lflag &= ~ECHO; 142 new_stty.c_lflag &= ~ECHO;
86@@ -207,17 +208,17 @@ char *argv[]; 143@@ -207,17 +224,17 @@ char *argv[];
87 new_stty.sg_flags |= CBREAK;  144 new_stty.sg_flags |= CBREAK;
88 new_stty.sg_flags &= ~ECHO; 145 new_stty.sg_flags &= ~ECHO;
89 ioctl( 0, TIOCSETP, &new_stty ); 146 ioctl( 0, TIOCSETP, &new_stty );
90-#endif BSD 147-#endif BSD
91+#endif /* BSD */ 148+#endif /* BSD */
92 current_entry = 1; 149 current_entry = 1;
93 extract_entry( current_entry ); 150 extract_entry( current_entry );
94 init_restore(); 151 init_restore();
95 command(); 152 command();
96 #ifdef SYSV 153 #ifdef SYSV
97 ioctl( 0, TCSETA, &old_stty ); 154 ioctl( 0, TCSETA, &old_stty );
98-#endif SYSV 155-#endif SYSV
99+#endif /* SYSV */ 156+#endif /* SYSV */
100 #ifdef BSD 157 #ifdef BSD
101 ioctl( 0, TIOCSETP, &old_stty ); 158 ioctl( 0, TIOCSETP, &old_stty );
102-#endif BSD 159-#endif BSD
103+#endif /* BSD */ 160+#endif /* BSD */
104 #if defined (__NetBSD__) || defined (__FreeBSD__) 161 #if defined (__NetBSD__) || defined (__FreeBSD__)
105 ioctl( 0, TIOCSETA, &old_stty ); 162 ioctl( 0, TIOCSETA, &old_stty );
106 #endif /* __NetBSD__ || __FreeBSD__ */ 163 #endif /* __NetBSD__ || __FreeBSD__ */
107@@ -230,7 +231,7 @@ char *argv[]; 164@@ -230,7 +247,7 @@ char *argv[];
108 fclose( font_file ); 165 fclose( font_file );
109 #ifdef CURFIX 166 #ifdef CURFIX
110 printf("%s\n",CURSORON); 167 printf("%s\n",CURSORON);
111-#endif CURFIX 168-#endif CURFIX
112+#endif /* CURFIX */ 169+#endif /* CURFIX */
113 } 170 }
114  171
115  172
 173@@ -243,17 +260,13 @@ char *argv[];
 174 */
 175
 176 void
 177-command()
 178+command(void)
 179 {
 180 register int c;
 181 register int row, col;
 182 register int i, j;
 183 bool change, error, override;
 184
 185- void build_entry(), extract_entry(), send_entry(), print_entry();
 186- void highlight(), draw_current(), init_restore(), help();
 187- void warning();
 188-
 189 change = false;
 190 error = false;
 191 override = false;
 192@@ -437,7 +450,7 @@ command()
 193
 194
 195
 196-char *key_table[] = {
 197+const char *key_table[] = {
 198 "\033[1~", /* Find */
 199 "\033[2~", /* Insert */
 200 "\033[3~", /* Remove */
 201@@ -471,7 +484,7 @@ char *key_table[] = {
 202 */
 203
 204 int
 205-get_key()
 206+get_key(void)
 207 {
 208 register char *p;
 209 char s[10];
 210@@ -501,7 +514,8 @@ get_key()
 211 * Emit nulls so that the terminal can catch up.
 212 */
 213
 214-pad()
 215+void
 216+pad(void)
 217 {
 218 int i;
 219
 220@@ -518,13 +532,11 @@ pad()
 221 */
 222
 223 void
 224-init_restore()
 225+init_restore(void)
 226 {
 227 register int row, col;
 228- register int i;
 229+ register unsigned i;
 230
 231- void draw_current(), clear_screen(), print_entry();
 232-
 233 clear_screen();
 234
 235 for ( col = 0; col < MAX_COLS; ++col ) {
 236@@ -585,7 +597,7 @@ init_restore()
 237 */
 238
 239 void
 240-draw_current()
 241+draw_current(void)
 242 {
 243 register int row, col;
 244
 245@@ -656,7 +668,7 @@ bool on;
 246 */
 247
 248 void
 249-clear_screen()
 250+clear_screen(void)
 251 {
 252 printf( "\033[H\033[J" ); /* Clear screen. */
 253 fflush( stdout );
 254@@ -668,6 +680,7 @@ clear_screen()
 255 * move
 256 */
 257
 258+void
 259 move( y, x )
 260 int y, x;
 261 {
 262@@ -769,11 +782,11 @@ unsigned int entry_no;
 263
 264 void
 265 send_entry( entry_no )
 266-int entry_no;
 267+unsigned entry_no;
 268 {
 269 register char *fp = font_table[entry_no];
 270
 271- printf( "\033P1;%d;1;0;0;0{ @%c%c%c%c%c%c%c%c/%c%c%c%c%c%c%c%c\033\\",
 272+ printf( "\033P1;%u;1;0;0;0{ @%c%c%c%c%c%c%c%c/%c%c%c%c%c%c%c%c\033\\",
 273 entry_no,
 274 fp[ 0], fp[ 1], fp[ 2], fp[ 3], fp[ 4], fp[ 5], fp[ 6], fp[ 7],
 275 fp[ 8], fp[ 9], fp[10], fp[11], fp[12], fp[13], fp[14], fp[15] );
 276@@ -790,9 +803,9 @@ int entry_no;
 277 */
 278
 279 void
 280-print_entry( entry_no, highlight )
 281+print_entry( entry_no, dohighlight )
 282 register unsigned int entry_no;
 283-bool highlight;
 284+bool dohighlight;
 285 {
 286
 287 register int y, x;
 288@@ -803,14 +816,14 @@ bool highlight;
 289
 290 move( y * 2 + TABLE_ROW, x * 2 + TABLE_COL );
 291
 292- if ( highlight )
 293+ if ( dohighlight )
 294 printf( "\033[7m" );
 295
 296 printf( "\033* @" ); /* select DRCS into G2 */
 297 printf( "\033N" ); /* select single shift */
 298 printf( "%c", entry_no ); /* Draw the character */
 299
 300- if ( highlight )
 301+ if ( dohighlight )
 302 printf( "\033[0m" );
 303 }
 304
 305@@ -822,15 +835,15 @@ bool highlight;
 306 */
 307
 308 void
 309-save_table( font_file )
 310-FILE *font_file;
 311+save_table( the_font_file )
 312+FILE *the_font_file;
 313 {
 314 register char *fp;
 315 register int i;
 316
 317 for ( i = 0; i < TOTAL_ENTRIES; ++i ) {
 318 fp = font_table[i];
 319- fprintf( font_file, "\033P1;%d;1;0;0;0{ @%c%c%c%c%c%c%c%c/%c%c%c%c%c%c%c%c\033\\\n",
 320+ fprintf( the_font_file, "\033P1;%d;1;0;0;0{ @%c%c%c%c%c%c%c%c/%c%c%c%c%c%c%c%c\033\\\n",
 321 i,
 322 fp[ 0], fp[ 1], fp[ 2], fp[ 3], fp[ 4], fp[ 5], fp[ 6], fp[ 7],
 323 fp[ 8], fp[ 9], fp[10], fp[11], fp[12], fp[13], fp[14], fp[15] );
 324@@ -845,8 +858,8 @@ FILE *font_file;
 325 */
 326
 327 void
 328-get_table( font_file )
 329-FILE *font_file;
 330+get_table( the_font_file )
 331+FILE *the_font_file;
 332 {
 333 char s[256];
 334 register char *p;
 335@@ -854,7 +867,7 @@ FILE *font_file;
 336 int i;
 337 register int j;
 338
 339- while( fgets( s, 255, font_file ) ) {
 340+ while( fgets( s, 255, the_font_file ) ) {
 341 if ( strncmp( s, "\033P1;", 4 ) != 0 )
 342 continue; /* Bogus line */
 343 p = &s[4];
 344@@ -890,7 +903,7 @@ FILE *font_file;
 345 */
 346
 347 void
 348-help()
 349+help(void)
 350 {
 351 printf( "Font editor\n\n" );
 352 printf( "F6 - Pixel on\n" );
 353@@ -915,8 +928,7 @@ help()
 354 */
 355
 356 void
 357-warning( s )
 358-char *s;
 359+warning( const char *s )
 360 {
 361 move( ERROR_ROW, ERROR_COL );
 362 printf( "Warning: %s!\n", s );

cvs diff -r1.1 -r1.2 pkgsrc/sysutils/pcvt-utils/patches/patch-ag (expand / switch to unified diff)

--- pkgsrc/sysutils/pcvt-utils/patches/patch-ag 2002/05/11 20:25:05 1.1
+++ pkgsrc/sysutils/pcvt-utils/patches/patch-ag 2011/10/01 21:42:16 1.2
@@ -1,13 +1,25 @@ @@ -1,13 +1,25 @@
1$NetBSD: patch-ag,v 1.1 2002/05/11 20:25:05 wiz Exp $ 1$NetBSD: patch-ag,v 1.2 2011/10/01 21:42:16 dholland Exp $
2 2
3--- fed/fed.c.orig Sat Oct 7 22:44:47 1995 3- void main
 4- fix printf format gcc objects to
 5
 6--- fed/fed.c.orig 1995-10-07 21:44:47.000000000 +0000
4+++ fed/fed.c 7+++ fed/fed.c
5@@ -48,7 +48,7 @@ 8@@ -48,7 +48,7 @@
6  9
7 #include "fed.h" 10 #include "fed.h"
8  11
9-void main(int argc, char *argv[]) 12-void main(int argc, char *argv[])
10+int main(int argc, char *argv[]) 13+int main(int argc, char *argv[])
11 { 14 {
12 int i; 15 int i;
13 int row, col; 16 int row, col;
 17@@ -142,7 +142,7 @@ void main(int argc, char *argv[])
 18
 19 for(i=0; i<256; i++)
 20 {
 21- mvwprintw(set_win,row+1,col+1,"%02.2X",i);
 22+ mvwprintw(set_win,row+1,col+1,"%2.2X",i);
 23 if(++row > 15)
 24 {
 25 row = 0;

cvs diff -r1.1 -r1.2 pkgsrc/sysutils/pcvt-utils/patches/patch-ai (expand / switch to unified diff)

--- pkgsrc/sysutils/pcvt-utils/patches/patch-ai 2007/10/30 02:22:54 1.1
+++ pkgsrc/sysutils/pcvt-utils/patches/patch-ai 2011/10/01 21:42:16 1.2
@@ -1,14 +1,16 @@ @@ -1,14 +1,16 @@
1$NetBSD: patch-ai,v 1.1 2007/10/30 02:22:54 bjs Exp $ 1$NetBSD: patch-ai,v 1.2 2011/10/01 21:42:16 dholland Exp $
 2
 3configure for pkgsrc
2 4
3--- Makefile.inc.orig 1999-06-04 14:47:33.000000000 -0400 5--- Makefile.inc.orig 1999-06-04 14:47:33.000000000 -0400
4+++ Makefile.inc 6+++ Makefile.inc
5@@ -4,8 +4,8 @@ ECHO ?= echo 7@@ -4,8 +4,8 @@ ECHO ?= echo
6  8
7 BINDIR ?= /usr/bin 9 BINDIR ?= /usr/bin
8 FONTDIR = /usr/share/pcvt/fonts 10 FONTDIR = /usr/share/pcvt/fonts
9-LIBDIR = /usr/lib 11-LIBDIR = /usr/lib
10-LIBMODE = 644 12-LIBMODE = 644
11+LIBDIR ?= /usr/lib 13+LIBDIR ?= /usr/lib
12+LIBMODE ?= 644 14+LIBMODE ?= 644
13  15
14 INCDIR= ${DESTDIR}/usr/include/machine 16 INCDIR= ${DESTDIR}/usr/include/machine

File Added: pkgsrc/sysutils/pcvt-utils/patches/patch-fed_misc_c
$NetBSD: patch-fed_misc_c,v 1.1 2011/10/01 21:42:16 dholland Exp $

- use const for clean build
- don't use sprintf (or perror)
- fix wrong printf formats

--- fed/misc.c.orig	1995-10-07 21:44:49.000000000 +0000
+++ fed/misc.c
@@ -46,14 +46,15 @@
 
 #include "fed.h"
 
-#include <stdlib.h>
-#include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <stdlib.h>
+#include <string.h>
+#include <err.h>
 
 static unsigned char *fonttab;		/* ptr to font in core memory */
 
-static char *bitmask[] = {
+static const char *bitmask[] = {
 		"....",			/*  0 */
 		"...*",			/*  1 */
 		"..*.",			/*  2 */
@@ -83,22 +84,17 @@ void readfont(char *filename)
 	FILE *in;
 	struct stat sbuf, *sbp;
 	int ret;
-	char buffer[1024];
 	
 	sbp = &sbuf;
 	
 	if((in = fopen(filename, "r")) == NULL)
 	{
-		sprintf(buffer, "cannot open file %s for reading", filename);
-		perror(buffer);
-		exit(1);
+		err(1, "cannot open file %s for reading", filename);
 	}
 
 	if((fstat(fileno(in), sbp)) != 0)
 	{
-		sprintf(buffer, "cannot fstat file %s", filename);
-		perror(buffer);
-		exit(1);
+		err(1, "cannot fstat file %s", filename);
 	}
 
 	switch(sbp->st_size)
@@ -129,7 +125,7 @@ void readfont(char *filename)
 			break;
 			
 		default:
-			fprintf(stderr,"error, file %s is no valid font file, size=%d\n",filename,sbp->st_size);
+			fprintf(stderr,"error, file %s is no valid font file, size=%lld\n",filename,(long long)sbp->st_size);
 			exit(1);
 	}			
 
@@ -144,9 +140,7 @@ void readfont(char *filename)
 
 	if((ret = fread(fonttab, sizeof(*fonttab), sbp->st_size, in)) != sbp->st_size)
 	{
-		sprintf(buffer,"error reading file %s, size = %d, ret = %d\n",filename,sbp->st_size, ret);
-		perror(buffer);
-		exit(1);
+		err(1, "error reading file %s, size = %lld, ret = %d\n",filename,(long long)sbp->st_size, ret);
 	}		
 }
 
@@ -156,8 +150,7 @@ void readfont(char *filename)
 void writefont()
 {
 	FILE *in, *out;
-	int ret;
-	char buffer[1024];
+	size_t ret;
 	
 	if((in = fopen(lfilename, "r")) != NULL)
 	{
@@ -168,9 +161,7 @@ void writefont()
 		strcat(wfn, ".BAK");
 		if((out = fopen(wfn, "w")) == NULL)
 		{
-			sprintf(buffer, "cannot open file %s for writing", wfn);
-			perror(buffer);
-			exit(1);
+			err(1, "cannot open file %s for writing", wfn);
 		}
 
 		while(( c = fgetc(in) ) != EOF )
@@ -182,23 +173,19 @@ void writefont()
 			
 	if((out = fopen(lfilename, "w")) == NULL)
 	{
-		sprintf(buffer, "cannot open file %s for writing", lfilename);
-		perror(buffer);
-		exit(1);
+		err(1, "cannot open file %s for writing", lfilename);
 	}
 
 	if((ret = fwrite(fonttab, sizeof(*fonttab), lfilesize, out)) != lfilesize)
 	{
-		sprintf(buffer,"error writing file %s, size=%d, ret=%d\n",lfilename,lfilesize, ret);
-		perror(buffer);
-		exit(1);
+		err(1, "error writing file %s, size=%d, ret=%lu\n",lfilename,lfilesize, ret);
 	}		
 }
 
 /*---------------------------------------------------------------------------*
  *	display a string
  *---------------------------------------------------------------------------*/
-void dis_cmd(char *strg)
+void dis_cmd(const char *strg)
 {
 	move(22,0);
 	clrtoeol();