summaryrefslogtreecommitdiff
path: root/sysutils/pcvt-utils
diff options
context:
space:
mode:
authordholland <dholland>2011-10-01 21:42:16 +0000
committerdholland <dholland>2011-10-01 21:42:16 +0000
commit21d79224baaee8a00466df02e75e2f589e6308e8 (patch)
tree3e018689569c039710580ec230d95d4f13011597 /sysutils/pcvt-utils
parent87c171a51e3f491a9a865ecee6713db1a2a0f3df (diff)
downloadpkgsrc-21d79224baaee8a00466df02e75e2f589e6308e8.tar.gz
Buildlink with curses correctly. Fix build. Add patch comments.
PKGREVISION -> 2.
Diffstat (limited to 'sysutils/pcvt-utils')
-rw-r--r--sysutils/pcvt-utils/Makefile7
-rw-r--r--sysutils/pcvt-utils/distinfo19
-rw-r--r--sysutils/pcvt-utils/patches/patch-ab5
-rw-r--r--sysutils/pcvt-utils/patches/patch-ac7
-rw-r--r--sysutils/pcvt-utils/patches/patch-ad22
-rw-r--r--sysutils/pcvt-utils/patches/patch-ae20
-rw-r--r--sysutils/pcvt-utils/patches/patch-af83
-rw-r--r--sysutils/pcvt-utils/patches/patch-ag16
-rw-r--r--sysutils/pcvt-utils/patches/patch-ah267
-rw-r--r--sysutils/pcvt-utils/patches/patch-ai4
-rw-r--r--sysutils/pcvt-utils/patches/patch-fed_misc_c120
11 files changed, 520 insertions, 50 deletions
diff --git a/sysutils/pcvt-utils/Makefile b/sysutils/pcvt-utils/Makefile
index 36f0a373cbe..29fea93f602 100644
--- a/sysutils/pcvt-utils/Makefile
+++ b/sysutils/pcvt-utils/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.11 2008/02/28 11:58:49 rillig Exp $
+# $NetBSD: Makefile,v 1.12 2011/10/01 21:42:16 dholland Exp $
#
DISTNAME= netbsd-pcvt-20000611
PKGNAME= pcvt-utils-20000611
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_LOCAL}
@@ -13,7 +13,7 @@ COMMENT= Useful leftovers from pcvt: playvt and two font editors
PKG_DESTDIR_SUPPORT= user-destdir
-ONLY_FOR_PLATFORM= NetBSD-*-*
+ONLY_FOR_PLATFORM= NetBSD-*-*
USE_BSD_MAKEFILE= yes
WRKSRC= ${WRKDIR}/pcvt/Util
@@ -29,4 +29,5 @@ do-install:
${WRKSRC}/demo/*.vt \
${DESTDIR}${PREFIX}/share/playvt
+.include "../../mk/curses.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/pcvt-utils/distinfo b/sysutils/pcvt-utils/distinfo
index 684a63d0fa2..9a10463bfcd 100644
--- a/sysutils/pcvt-utils/distinfo
+++ b/sysutils/pcvt-utils/distinfo
@@ -1,14 +1,15 @@
-$NetBSD: distinfo,v 1.7 2007/10/30 02:22:54 bjs Exp $
+$NetBSD: distinfo,v 1.8 2011/10/01 21:42:16 dholland Exp $
SHA1 (netbsd-pcvt-20000611.tar.gz) = ea51ded62dc82635f1eda3cd198b29cf6f4941ea
RMD160 (netbsd-pcvt-20000611.tar.gz) = 33364b8503d286047163e9f4256374faa3c6b455
Size (netbsd-pcvt-20000611.tar.gz) = 315263 bytes
SHA1 (patch-aa) = 47dec68f79792803f9b4480c8fde812c97b49c46
-SHA1 (patch-ab) = cc05a87826f9573611bb0e70092b9f4b825584a8
-SHA1 (patch-ac) = 634aaf8fe965ade5c972c852fbb1710bf1028b2e
-SHA1 (patch-ad) = c6158765ff8ecc26dd9c297089c90b03c98172cb
-SHA1 (patch-ae) = d81e7ee5f59bf5d4e23d8f19868e190e2a8b2a53
-SHA1 (patch-af) = ea4c0a0fee930184532d7f6961ef951d1e882027
-SHA1 (patch-ag) = fe39a7224c9ea78d97750a90e110d805d353c0ad
-SHA1 (patch-ah) = c7654e13adc69f365b9674b7aa369f8ffb2c757f
-SHA1 (patch-ai) = 436e86ec12165a3f2f6f004226f00e36c9a21e71
+SHA1 (patch-ab) = f553c956aea18464bced85743a32f3a489870f67
+SHA1 (patch-ac) = 9defbfde072b72281a20902e8bc3cc359a46b98b
+SHA1 (patch-ad) = 7eca3b30d973f38e51cff98bdb12b58a033341b2
+SHA1 (patch-ae) = cc84e968dd2f73fd3328b87de642e9f0d92fc2ac
+SHA1 (patch-af) = bd625913a3693e15d305dd56113695953907e99b
+SHA1 (patch-ag) = ecc1633ca79c823f2105d9722228c4fd55646835
+SHA1 (patch-ah) = 4056eb297b3d155971f2bd96cf8e337a01d4850c
+SHA1 (patch-ai) = f35b612fe053b516503d23799db236fde94373f5
+SHA1 (patch-fed_misc_c) = 713f5a09db6dfbf7ea71b0a1c76304806d7e07f2
diff --git a/sysutils/pcvt-utils/patches/patch-ab b/sysutils/pcvt-utils/patches/patch-ab
index fb88d9b72d4..99763d9fdf0 100644
--- a/sysutils/pcvt-utils/patches/patch-ab
+++ b/sysutils/pcvt-utils/patches/patch-ab
@@ -1,4 +1,7 @@
-$NetBSD: patch-ab,v 1.1.1.1 2000/12/04 13:38:25 hubertf Exp $
+$NetBSD: patch-ab,v 1.2 2011/10/01 21:42:16 dholland Exp $
+
+- use modern C
+- use the right include files for netbsd with wscons
--- kbdio/kbdio.y.orig Mon Dec 4 13:57:07 2000
+++ kbdio/kbdio.y
diff --git a/sysutils/pcvt-utils/patches/patch-ac b/sysutils/pcvt-utils/patches/patch-ac
index 9f810e68c9a..cfebbf12f21 100644
--- a/sysutils/pcvt-utils/patches/patch-ac
+++ b/sysutils/pcvt-utils/patches/patch-ac
@@ -1,4 +1,6 @@
-$NetBSD: patch-ac,v 1.1.1.1 2000/12/04 13:38:25 hubertf Exp $
+$NetBSD: patch-ac,v 1.2 2011/10/01 21:42:16 dholland Exp $
+
+- use pkgsrc curses
--- fed/Makefile.orig Mon Dec 4 13:49:07 2000
+++ fed/Makefile
@@ -7,6 +9,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2000/12/04 13:38:25 hubertf Exp $
SRCS= fed.c select.c edit.c misc.c
-LDADD= -lncurses
+LDADD= -lcurses
- BINDIR= /usr/local/bin
+-BINDIR= /usr/local/bin
++BINDIR?= /usr/local/bin
MKMAN= no
diff --git a/sysutils/pcvt-utils/patches/patch-ad b/sysutils/pcvt-utils/patches/patch-ad
index 1c6f71e3256..e768d7f14ca 100644
--- a/sysutils/pcvt-utils/patches/patch-ad
+++ b/sysutils/pcvt-utils/patches/patch-ad
@@ -1,25 +1,29 @@
-$NetBSD: patch-ad,v 1.2 2002/05/11 20:25:05 wiz Exp $
+$NetBSD: patch-ad,v 1.3 2011/10/01 21:42:16 dholland Exp $
---- fed/fed.h.orig Sat Oct 7 22:44:48 1995
+- use pkgsrc curses
+- void main
+- use const for clean build
+
+--- fed/fed.h.orig 1995-10-07 21:44:48.000000000 +0000
+++ fed/fed.h
-@@ -32,7 +32,11 @@
+@@ -32,7 +32,7 @@
* fed.h, 3.00, last edit-date: [Sun Jan 2 20:10:31 1994]
*/
-+#ifdef __NetBSD__
+-#include <ncurses.h>
+#include <curses.h>
-+#else
- #include <ncurses.h>
-+#endif
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-@@ -109,7 +113,7 @@
+@@ -109,9 +113,9 @@ void invert ( void );
void setchr ( char type );
void setrow ( char type );
void setcol ( char type );
-void main ( int argc, char *argv[] );
+int main ( int argc, char *argv[] );
void readfont ( char *filename );
- void dis_cmd ( char *strg );
+-void dis_cmd ( char *strg );
++void dis_cmd ( const char *strg );
void clr_cmd ( void );
+ void save_ch ( void );
+ void move_ch ( int src, int dest );
diff --git a/sysutils/pcvt-utils/patches/patch-ae b/sysutils/pcvt-utils/patches/patch-ae
index bc73b5653b3..de4ae513c15 100644
--- a/sysutils/pcvt-utils/patches/patch-ae
+++ b/sysutils/pcvt-utils/patches/patch-ae
@@ -1,18 +1,22 @@
-$NetBSD: patch-ae,v 1.1.1.1 2000/12/04 13:38:25 hubertf Exp $
+$NetBSD: patch-ae,v 1.2 2011/10/01 21:42:16 dholland Exp $
---- fed/select.c.orig Mon Dec 4 13:46:59 2000
+- avoid symbol name conflict on "sr"
+
+--- fed/select.c.orig 1995-10-07 21:44:51.000000000 +0000
+++ fed/select.c
-@@ -46,7 +46,8 @@
+@@ -46,9 +46,8 @@
#include "fed.h"
-int sc, sr, scurchar;
+-
+-int edit();
+/* "sr" is defined in <curses.h> for some terminal capability?!? */
+int sc, fed_sr, scurchar;
- int edit();
-
-@@ -153,12 +154,12 @@
+ void sel_mode(void)
+ {
+@@ -153,12 +152,12 @@ int selectc()
case 'g':
case 'G':
dis_cmd(" Exchange: select Destination, then press RETURN or any other Key to ABORT");
@@ -27,7 +31,7 @@ $NetBSD: patch-ae,v 1.1.1.1 2000/12/04 13:38:25 hubertf Exp $
c = sc;
curchar = scurchar;
}
-@@ -174,12 +175,12 @@
+@@ -174,12 +173,12 @@ int selectc()
case 'm':
case 'M':
dis_cmd(" Move: select Destination, then press RETURN or any other Key to ABORT");
@@ -42,7 +46,7 @@ $NetBSD: patch-ae,v 1.1.1.1 2000/12/04 13:38:25 hubertf Exp $
c = sc;
curchar = scurchar;
}
-@@ -320,7 +321,7 @@
+@@ -320,7 +319,7 @@ void normal_uset(int r, int c)
mvwprintw(set_win,(r+1),((c*2)+1),"%c%c",h,l);
wmove(set_win,(r+1),((c*2)+1));
diff --git a/sysutils/pcvt-utils/patches/patch-af b/sysutils/pcvt-utils/patches/patch-af
index 7577c2b5670..f5bff9252e5 100644
--- a/sysutils/pcvt-utils/patches/patch-af
+++ b/sysutils/pcvt-utils/patches/patch-af
@@ -1,14 +1,87 @@
-$NetBSD: patch-af,v 1.2 2006/11/13 14:51:08 drochner Exp $
+$NetBSD: patch-af,v 1.3 2011/10/01 21:42:16 dholland Exp $
---- demo/playvt.c.orig 1997-11-01 07:49:36.000000000 +0100
+Use standard C.
+
+--- demo/playvt.c.orig 1997-11-01 06:49:36.000000000 +0000
+++ demo/playvt.c
-@@ -42,7 +42,9 @@ static char *id =
+@@ -30,7 +30,7 @@
+ *
+ */
+
+-static char *id =
++const char id[] =
+ "@(#)playvt.c, 1.00, Last Edit-Date: [Sun Jan 1 18:32:22 1995]";
+
+ /*---------------------------------------------------------------------------*
+@@ -42,22 +42,21 @@ static char *id =
*---------------------------------------------------------------------------*/
#include <stdio.h>
+#include <string.h>
#include <unistd.h>
+#include <stdlib.h>
++#include <err.h>
+
+-main(argc,argv)
+-int argc;
+-char *argv[];
+-{
+- extern int optind;
+- extern int opterr;
+- extern char *optarg;
++void usage(void);
+
++int
++main(int argc, char *argv[])
++{
+ int c;
+ FILE *fp = stdin;
+ volatile int i;
+ int delay = 0;
+- int fflag = -1;
+- char *filename;
++ char *filename = NULL;
+
+ while( (c = getopt(argc, argv, "d:f:")) != -1)
+ {
+@@ -69,7 +68,6 @@ char *argv[];
+
+ case 'f':
+ filename = optarg;
+- fflag = 1;
+ break;
+
+ case '?':
+@@ -79,15 +77,11 @@ char *argv[];
+ }
+ }
+
+- if(fflag == 1)
++ if(filename != NULL)
+ {
+ if((fp = fopen(filename, "r")) == NULL)
+ {
+- char buffer[80];
+- strcpy(buffer,"ERROR opening file ");
+- strcat(buffer,filename);
+- perror(buffer);
+- exit(1);
++ err(1, "ERROR opening file %s", filename);
+ }
+ }
+
+@@ -100,7 +94,8 @@ char *argv[];
+ }
+
- main(argc,argv)
- int argc;
+-usage()
++void
++usage(void)
+ {
+ fprintf(stderr,"\nplayvt - play a VT animation with programmable delay\n");
+ fprintf(stderr,"usage: playvt -f [filename] -d [delay]\n");
+@@ -108,4 +102,3 @@ usage()
+ fprintf(stderr," -d <delay> delay between characters\n");
+ exit(1);
+ }
+-
diff --git a/sysutils/pcvt-utils/patches/patch-ag b/sysutils/pcvt-utils/patches/patch-ag
index 9d07d0c6e3e..72f3d41ab0c 100644
--- a/sysutils/pcvt-utils/patches/patch-ag
+++ b/sysutils/pcvt-utils/patches/patch-ag
@@ -1,6 +1,9 @@
-$NetBSD: patch-ag,v 1.1 2002/05/11 20:25:05 wiz Exp $
+$NetBSD: patch-ag,v 1.2 2011/10/01 21:42:16 dholland Exp $
---- fed/fed.c.orig Sat Oct 7 22:44:47 1995
+- void main
+- fix printf format gcc objects to
+
+--- fed/fed.c.orig 1995-10-07 21:44:47.000000000 +0000
+++ fed/fed.c
@@ -48,7 +48,7 @@
@@ -11,3 +14,12 @@ $NetBSD: patch-ag,v 1.1 2002/05/11 20:25:05 wiz Exp $
{
int i;
int row, col;
+@@ -142,7 +142,7 @@ void main(int argc, char *argv[])
+
+ for(i=0; i<256; i++)
+ {
+- mvwprintw(set_win,row+1,col+1,"%02.2X",i);
++ mvwprintw(set_win,row+1,col+1,"%2.2X",i);
+ if(++row > 15)
+ {
+ row = 0;
diff --git a/sysutils/pcvt-utils/patches/patch-ah b/sysutils/pcvt-utils/patches/patch-ah
index 10c830bf51f..4800b82b634 100644
--- a/sysutils/pcvt-utils/patches/patch-ah
+++ b/sysutils/pcvt-utils/patches/patch-ah
@@ -1,8 +1,17 @@
-$NetBSD: patch-ah,v 1.2 2006/11/13 14:51:08 drochner Exp $
+$NetBSD: patch-ah,v 1.3 2011/10/01 21:42:16 dholland Exp $
---- fontedit/fontedit.c.orig 1995-10-07 22:44:58.000000000 +0100
+- use modern C
+- declare functions properly
+- use const for a clean build
+- use signed/unsigned consistently
+
+--- fontedit/fontedit.c.orig 1995-10-07 21:44:58.000000000 +0000
+++ fontedit/fontedit.c
-@@ -26,20 +26,21 @@ void clear_screen();
+@@ -22,24 +22,26 @@
+ * - eap@bucsf.bu.edu
+ */
+
+-void clear_screen();
#include <stdio.h>
#ifdef SYSV
#include <sys/termio.h>
@@ -18,6 +27,8 @@ $NetBSD: patch-ah,v 1.2 2006/11/13 14:51:08 drochner Exp $
#endif /* __NetBSD__ || __FreeBSD__ */
#include <signal.h>
+#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
#ifdef CURFIX
#define CURSORON "\033[?25h"
@@ -27,7 +38,7 @@ $NetBSD: patch-ah,v 1.2 2006/11/13 14:51:08 drochner Exp $
#define MAX_ROWS 10
#define MAX_COLS 8
-@@ -103,10 +104,10 @@ unsigned int current_entry;
+@@ -103,33 +105,51 @@ unsigned int current_entry;
#ifdef SYSV
struct termio old_stty, new_stty;
@@ -40,8 +51,37 @@ $NetBSD: patch-ah,v 1.2 2006/11/13 14:51:08 drochner Exp $
#if defined (__NetBSD__) || defined (__FreeBSD__)
struct termios old_stty, new_stty;
#endif /* __NetBSD__ || __FreeBSD__ */
-@@ -123,13 +124,13 @@ interrupt()
- void clear_screen();
+ FILE * font_file = (FILE *)0;
+
++void interrupt(void);
++void command(void);
++void pad(void);
++void init_restore(void);
++void clear_screen(void);
++void save_table(FILE *);
++void get_table(FILE *);
++void build_entry(unsigned);
++void extract_entry(unsigned);
++void send_entry(unsigned);
++void print_entry(unsigned, bool);
++void highlight(unsigned, unsigned, bool);
++void draw_current(void);
++void init_restore(void);
++void help(void);
++void warning(const char *);
++void move(int, int);
++int get_key(void);
+
+ /*
+ * Interrupt
+ * Exit gracefully.
+ */
+
+-interrupt()
++void
++interrupt(void)
+ {
+- void clear_screen();
#ifdef CURFIX
printf("%s\n",CURSORON);
-#endif CURFIX
@@ -57,7 +97,24 @@ $NetBSD: patch-ah,v 1.2 2006/11/13 14:51:08 drochner Exp $
#if defined (__NetBSD__) || defined (__FreeBSD__)
ioctl( 0, TIOCSETA, &old_stty );
#endif /* __NetBSD__ || __FreeBSD__ */
-@@ -180,13 +181,13 @@ char *argv[];
+@@ -142,13 +162,10 @@ interrupt()
+ * Main
+ * Grab input/output file and call main command processor.
+ */
+-
+-main( argc, argv )
+-int argc;
+-char *argv[];
++
++int
++main( int argc, char *argv[] )
+ {
+- void command(), init_restore(), clear_screen();
+- void save_table(), get_table(), extract_entry();
+
+ if ( argc != 2 ) {
+ fprintf( stderr, "usage: fontedit filename\n" );
+@@ -180,13 +197,13 @@ char *argv[];
}
#ifdef CURFIX
printf("%s\n",CURSOROFF);
@@ -74,7 +131,7 @@ $NetBSD: patch-ah,v 1.2 2006/11/13 14:51:08 drochner Exp $
#if defined (__NetBSD__) || defined (__FreeBSD__)
ioctl( 0, TIOCGETA, &old_stty );
#endif /* __NetBSD__ || __FreeBSD__ */
-@@ -196,7 +197,7 @@ char *argv[];
+@@ -196,7 +213,7 @@ char *argv[];
new_stty.c_lflag &= ~ICANON;
new_stty.c_cc[VMIN] = 1;
ioctl( 0, TCSETA, &new_stty );
@@ -83,7 +140,7 @@ $NetBSD: patch-ah,v 1.2 2006/11/13 14:51:08 drochner Exp $
#if defined (__NetBSD__) || defined (__FreeBSD__)
new_stty.c_lflag &= ~ICANON;
new_stty.c_lflag &= ~ECHO;
-@@ -207,17 +208,17 @@ char *argv[];
+@@ -207,17 +224,17 @@ char *argv[];
new_stty.sg_flags |= CBREAK;
new_stty.sg_flags &= ~ECHO;
ioctl( 0, TIOCSETP, &new_stty );
@@ -104,7 +161,7 @@ $NetBSD: patch-ah,v 1.2 2006/11/13 14:51:08 drochner Exp $
#if defined (__NetBSD__) || defined (__FreeBSD__)
ioctl( 0, TIOCSETA, &old_stty );
#endif /* __NetBSD__ || __FreeBSD__ */
-@@ -230,7 +231,7 @@ char *argv[];
+@@ -230,7 +247,7 @@ char *argv[];
fclose( font_file );
#ifdef CURFIX
printf("%s\n",CURSORON);
@@ -113,3 +170,193 @@ $NetBSD: patch-ah,v 1.2 2006/11/13 14:51:08 drochner Exp $
}
+@@ -243,17 +260,13 @@ char *argv[];
+ */
+
+ void
+-command()
++command(void)
+ {
+ register int c;
+ register int row, col;
+ register int i, j;
+ bool change, error, override;
+
+- void build_entry(), extract_entry(), send_entry(), print_entry();
+- void highlight(), draw_current(), init_restore(), help();
+- void warning();
+-
+ change = false;
+ error = false;
+ override = false;
+@@ -437,7 +450,7 @@ command()
+
+
+
+-char *key_table[] = {
++const char *key_table[] = {
+ "\033[1~", /* Find */
+ "\033[2~", /* Insert */
+ "\033[3~", /* Remove */
+@@ -471,7 +484,7 @@ char *key_table[] = {
+ */
+
+ int
+-get_key()
++get_key(void)
+ {
+ register char *p;
+ char s[10];
+@@ -501,7 +514,8 @@ get_key()
+ * Emit nulls so that the terminal can catch up.
+ */
+
+-pad()
++void
++pad(void)
+ {
+ int i;
+
+@@ -518,13 +532,11 @@ pad()
+ */
+
+ void
+-init_restore()
++init_restore(void)
+ {
+ register int row, col;
+- register int i;
++ register unsigned i;
+
+- void draw_current(), clear_screen(), print_entry();
+-
+ clear_screen();
+
+ for ( col = 0; col < MAX_COLS; ++col ) {
+@@ -585,7 +597,7 @@ init_restore()
+ */
+
+ void
+-draw_current()
++draw_current(void)
+ {
+ register int row, col;
+
+@@ -656,7 +668,7 @@ bool on;
+ */
+
+ void
+-clear_screen()
++clear_screen(void)
+ {
+ printf( "\033[H\033[J" ); /* Clear screen. */
+ fflush( stdout );
+@@ -668,6 +680,7 @@ clear_screen()
+ * move
+ */
+
++void
+ move( y, x )
+ int y, x;
+ {
+@@ -769,11 +782,11 @@ unsigned int entry_no;
+
+ void
+ send_entry( entry_no )
+-int entry_no;
++unsigned entry_no;
+ {
+ register char *fp = font_table[entry_no];
+
+- printf( "\033P1;%d;1;0;0;0{ @%c%c%c%c%c%c%c%c/%c%c%c%c%c%c%c%c\033\\",
++ printf( "\033P1;%u;1;0;0;0{ @%c%c%c%c%c%c%c%c/%c%c%c%c%c%c%c%c\033\\",
+ entry_no,
+ fp[ 0], fp[ 1], fp[ 2], fp[ 3], fp[ 4], fp[ 5], fp[ 6], fp[ 7],
+ fp[ 8], fp[ 9], fp[10], fp[11], fp[12], fp[13], fp[14], fp[15] );
+@@ -790,9 +803,9 @@ int entry_no;
+ */
+
+ void
+-print_entry( entry_no, highlight )
++print_entry( entry_no, dohighlight )
+ register unsigned int entry_no;
+-bool highlight;
++bool dohighlight;
+ {
+
+ register int y, x;
+@@ -803,14 +816,14 @@ bool highlight;
+
+ move( y * 2 + TABLE_ROW, x * 2 + TABLE_COL );
+
+- if ( highlight )
++ if ( dohighlight )
+ printf( "\033[7m" );
+
+ printf( "\033* @" ); /* select DRCS into G2 */
+ printf( "\033N" ); /* select single shift */
+ printf( "%c", entry_no ); /* Draw the character */
+
+- if ( highlight )
++ if ( dohighlight )
+ printf( "\033[0m" );
+ }
+
+@@ -822,15 +835,15 @@ bool highlight;
+ */
+
+ void
+-save_table( font_file )
+-FILE *font_file;
++save_table( the_font_file )
++FILE *the_font_file;
+ {
+ register char *fp;
+ register int i;
+
+ for ( i = 0; i < TOTAL_ENTRIES; ++i ) {
+ fp = font_table[i];
+- 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",
++ 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",
+ i,
+ fp[ 0], fp[ 1], fp[ 2], fp[ 3], fp[ 4], fp[ 5], fp[ 6], fp[ 7],
+ fp[ 8], fp[ 9], fp[10], fp[11], fp[12], fp[13], fp[14], fp[15] );
+@@ -845,8 +858,8 @@ FILE *font_file;
+ */
+
+ void
+-get_table( font_file )
+-FILE *font_file;
++get_table( the_font_file )
++FILE *the_font_file;
+ {
+ char s[256];
+ register char *p;
+@@ -854,7 +867,7 @@ FILE *font_file;
+ int i;
+ register int j;
+
+- while( fgets( s, 255, font_file ) ) {
++ while( fgets( s, 255, the_font_file ) ) {
+ if ( strncmp( s, "\033P1;", 4 ) != 0 )
+ continue; /* Bogus line */
+ p = &s[4];
+@@ -890,7 +903,7 @@ FILE *font_file;
+ */
+
+ void
+-help()
++help(void)
+ {
+ printf( "Font editor\n\n" );
+ printf( "F6 - Pixel on\n" );
+@@ -915,8 +928,7 @@ help()
+ */
+
+ void
+-warning( s )
+-char *s;
++warning( const char *s )
+ {
+ move( ERROR_ROW, ERROR_COL );
+ printf( "Warning: %s!\n", s );
diff --git a/sysutils/pcvt-utils/patches/patch-ai b/sysutils/pcvt-utils/patches/patch-ai
index 0f934265d19..c7e2a23fc1e 100644
--- a/sysutils/pcvt-utils/patches/patch-ai
+++ b/sysutils/pcvt-utils/patches/patch-ai
@@ -1,4 +1,6 @@
-$NetBSD: patch-ai,v 1.1 2007/10/30 02:22:54 bjs Exp $
+$NetBSD: patch-ai,v 1.2 2011/10/01 21:42:16 dholland Exp $
+
+configure for pkgsrc
--- Makefile.inc.orig 1999-06-04 14:47:33.000000000 -0400
+++ Makefile.inc
diff --git a/sysutils/pcvt-utils/patches/patch-fed_misc_c b/sysutils/pcvt-utils/patches/patch-fed_misc_c
new file mode 100644
index 00000000000..9f3387fa8aa
--- /dev/null
+++ b/sysutils/pcvt-utils/patches/patch-fed_misc_c
@@ -0,0 +1,120 @@
+$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();