diff -urN /usr/ports/games/xmille/files/patch-Imakefile games/xmille/files/patch-Imakefile --- /usr/ports/games/xmille/files/patch-Imakefile Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-Imakefile Fri Jun 15 01:48:39 2007 @@ -0,0 +1,64 @@ +--- Imakefile.orig Thu Apr 2 23:03:24 1992 ++++ Imakefile Thu Dec 4 21:52:59 2003 +@@ -1,11 +1,11 @@ +-/**/# +-/**/# +-/**/# Imakefile for xmille (Mille Bourne game) +-/**/# +-/**/# Dana Chee +-/**/# ++XCOMM # ++XCOMM # ++XCOMM # Imakefile for xmille (Mille Bourne game) ++XCOMM # ++XCOMM # Dana Chee ++XCOMM # + #define IHaveSubdirs +-#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS) DEFINES=$(DEFINES)' ++#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS) $(DEFINES)' + + HEADERS = ui.h + SRCS= comp.c end.c extern.c init.c mille.c misc.c move.c print.c \ +@@ -18,26 +18,26 @@ + SYS_LIBRARIES = -lm + SUBDIRS = control cards + +-/**/# +-/**/# This looks better with the timrom12 and timrom12b fonts supplied, +-/**/# but if you don't wish to install it, just use fixed. +-/**/# +-/**/# if you do want to use the timrom fonts, then uncomment this line +-/**/# and see the info below about font targets +-/**/# +-/**/#DEFINES = -DDEFAULT_FONT=\"timrom12\" -DDEFAULT_FONTB=\"timrom12b\" ++XCOMM # ++XCOMM # This looks better with the timrom12 and timrom12b fonts supplied, ++XCOMM # but if you don't wish to install it, just use fixed. ++XCOMM # ++XCOMM # if you do want to use the timrom fonts, then uncomment this line ++XCOMM # and see the info below about font targets ++XCOMM # ++XCOMM #DEFINES = -DDEFAULT_FONT=\"timrom12\" -DDEFAULT_FONTB=\"timrom12b\" + DEFINES = -DDEFAULT_FONT=\"fixed\" -DDEFAULT_FONTB=\"fixed\" + + MakeSubdirs($(SUBDIRS)) + + ComplexProgramTarget(xmille) + +-/**/# +-/**/# Otherwise, make these font targets (uncomment the following lines) +-/**/# +-/**/#FONTS = FontBaseObj(timrom12) FontBaseObj(timrom12b) +-/**/#FONTINSTDIR = $(FONTDIR)/misc +-/**/#FontTarget(timrom12) +-/**/#FontTarget(tomrom12b) +-/**/#all:: $(FONTS) ++XCOMM # ++XCOMM # Otherwise, make these font targets (uncomment the following lines) ++XCOMM # ++XCOMM #FONTS = FontBaseObj(timrom12) FontBaseObj(timrom12b) ++XCOMM #FONTINSTDIR = $(FONTDIR)/misc ++XCOMM #FontTarget(timrom12) ++XCOMM #FontTarget(tomrom12b) ++XCOMM #all:: $(FONTS) + diff -urN /usr/ports/games/xmille/files/patch-ab games/xmille/files/patch-ab --- /usr/ports/games/xmille/files/patch-ab Sat Dec 6 12:47:57 2003 +++ games/xmille/files/patch-ab Thu Jan 1 09:00:00 1970 @@ -1,64 +0,0 @@ ---- Imakefile.orig Thu Apr 2 23:03:24 1992 -+++ Imakefile Thu Dec 4 21:52:59 2003 -@@ -1,11 +1,11 @@ --/**/# --/**/# --/**/# Imakefile for xmille (Mille Bourne game) --/**/# --/**/# Dana Chee --/**/# -+XCOMM # -+XCOMM # -+XCOMM # Imakefile for xmille (Mille Bourne game) -+XCOMM # -+XCOMM # Dana Chee -+XCOMM # - #define IHaveSubdirs --#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS) DEFINES=$(DEFINES)' -+#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS) $(DEFINES)' - - HEADERS = ui.h - SRCS= comp.c end.c extern.c init.c mille.c misc.c move.c print.c \ -@@ -18,26 +18,26 @@ - SYS_LIBRARIES = -lm - SUBDIRS = control cards - --/**/# --/**/# This looks better with the timrom12 and timrom12b fonts supplied, --/**/# but if you don't wish to install it, just use fixed. --/**/# --/**/# if you do want to use the timrom fonts, then uncomment this line --/**/# and see the info below about font targets --/**/# --/**/#DEFINES = -DDEFAULT_FONT=\"timrom12\" -DDEFAULT_FONTB=\"timrom12b\" -+XCOMM # -+XCOMM # This looks better with the timrom12 and timrom12b fonts supplied, -+XCOMM # but if you don't wish to install it, just use fixed. -+XCOMM # -+XCOMM # if you do want to use the timrom fonts, then uncomment this line -+XCOMM # and see the info below about font targets -+XCOMM # -+XCOMM #DEFINES = -DDEFAULT_FONT=\"timrom12\" -DDEFAULT_FONTB=\"timrom12b\" - DEFINES = -DDEFAULT_FONT=\"fixed\" -DDEFAULT_FONTB=\"fixed\" - - MakeSubdirs($(SUBDIRS)) - - ComplexProgramTarget(xmille) - --/**/# --/**/# Otherwise, make these font targets (uncomment the following lines) --/**/# --/**/#FONTS = FontBaseObj(timrom12) FontBaseObj(timrom12b) --/**/#FONTINSTDIR = $(FONTDIR)/misc --/**/#FontTarget(timrom12) --/**/#FontTarget(tomrom12b) --/**/#all:: $(FONTS) -+XCOMM # -+XCOMM # Otherwise, make these font targets (uncomment the following lines) -+XCOMM # -+XCOMM #FONTS = FontBaseObj(timrom12) FontBaseObj(timrom12b) -+XCOMM #FONTINSTDIR = $(FONTDIR)/misc -+XCOMM #FontTarget(timrom12) -+XCOMM #FontTarget(tomrom12b) -+XCOMM #all:: $(FONTS) - diff -urN /usr/ports/games/xmille/files/patch-ac games/xmille/files/patch-ac --- /usr/ports/games/xmille/files/patch-ac Sun Feb 4 02:00:35 2001 +++ games/xmille/files/patch-ac Thu Jan 1 09:00:00 1970 @@ -1,12 +0,0 @@ ---- save.c.orig Thu Apr 2 05:56:45 1992 -+++ save.c Wed Jan 31 23:04:29 2001 -@@ -22,7 +22,9 @@ - * This routine saves the current game for use at a later date - */ - extern int errno; -+#ifndef __FreeBSD__ - extern char *sys_errlist[]; -+#endif - - save() { - diff -urN /usr/ports/games/xmille/files/patch-ad games/xmille/files/patch-ad --- /usr/ports/games/xmille/files/patch-ad Sun Feb 4 02:00:35 2001 +++ games/xmille/files/patch-ad Thu Jan 1 09:00:00 1970 @@ -1,17 +0,0 @@ ---- drawcard.c.orig Thu Apr 2 05:55:06 1992 -+++ drawcard.c Wed Jan 31 23:04:23 2001 -@@ -183,12 +183,12 @@ - WIDTH, HEIGHT); - - XSetForeground(dpy, cheap_gc, bits_p); -- XSetStipple(dpy, cheap_gc, bits); -+ XSetStipple(dpy, cheap_gc, mask); - XFillRectangle (dpy, cards[i].bits, cheap_gc, 0, 0, - WIDTH, HEIGHT); - - XSetForeground(dpy, cheap_gc, mask_p); -- XSetStipple(dpy, cheap_gc, mask); -+ XSetStipple(dpy, cheap_gc, bits); - XFillRectangle (dpy, cards[i].bits, cheap_gc, 0, 0, - WIDTH, HEIGHT); - diff -urN /usr/ports/games/xmille/files/patch-ae games/xmille/files/patch-ae --- /usr/ports/games/xmille/files/patch-ae Sun Feb 4 02:00:35 2001 +++ games/xmille/files/patch-ae Thu Jan 1 09:00:00 1970 @@ -1,11 +0,0 @@ ---- mille.c.orig Thu Mar 28 14:29:31 1996 -+++ mille.c Thu Feb 1 00:23:54 2001 -@@ -10,7 +10,7 @@ - - int rub(); - --/*char _sobuf[BUFSIZ];*/ -+char _sobuf[BUFSIZ]; - - main(ac, av) - reg int ac; diff -urN /usr/ports/games/xmille/files/patch-af games/xmille/files/patch-af --- /usr/ports/games/xmille/files/patch-af Sun Feb 4 02:00:35 2001 +++ games/xmille/files/patch-af Thu Jan 1 09:00:00 1970 @@ -1,11 +0,0 @@ ---- move.c.orig Thu Mar 28 15:13:44 1996 -+++ move.c Thu Feb 1 00:33:58 2001 -@@ -9,8 +9,6 @@ - #endif - #define CTRL(c) (c - 'A' + 1) - --#define ANIMATE 1 -- - /*extern FILE *outf;*/ - - char *Movenames[] = { diff -urN /usr/ports/games/xmille/files/patch-ag games/xmille/files/patch-ag --- /usr/ports/games/xmille/files/patch-ag Sun Feb 4 02:00:35 2001 +++ games/xmille/files/patch-ag Thu Jan 1 09:00:00 1970 @@ -1,11 +0,0 @@ ---- roll.c.orig Thu Apr 2 23:16:11 1992 -+++ roll.c Wed Jan 31 23:04:23 2001 -@@ -7,7 +7,7 @@ - - # define reg register - --# if (! defined ultrix && ! defined mips && ! defined vax) -+# if (! defined ultrix && ! defined mips && ! defined vax && ! defined __386BSD__ && ! defined __FreeBSD__) - # define MAXRAND 32767L - - roll(ndie, nsides) diff -urN /usr/ports/games/xmille/files/patch-ah games/xmille/files/patch-ah --- /usr/ports/games/xmille/files/patch-ah Sun Feb 4 02:00:35 2001 +++ games/xmille/files/patch-ah Thu Jan 1 09:00:00 1970 @@ -1,11 +0,0 @@ ---- varpush.c.orig Wed Jul 8 11:33:36 1987 -+++ varpush.c Thu Feb 1 00:27:53 2001 -@@ -36,7 +36,7 @@ - char buf[80]; - over: - printf("Debug file:"); -- gets(buf); -+ fgets(buf, sizeof(buf), stdin); - if ((outf = fopen(buf, "w")) == NULL) { - perror(buf); - goto over; diff -urN /usr/ports/games/xmille/files/patch-animate.c games/xmille/files/patch-animate.c --- /usr/ports/games/xmille/files/patch-animate.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-animate.c Fri Jun 15 02:11:43 2007 @@ -0,0 +1,13 @@ +--- animate.c.orig Thu Mar 28 15:16:53 1996 ++++ animate.c Fri Jun 15 02:11:35 2007 +@@ -9,6 +9,10 @@ + + extern int iscolor; + ++static do_animate(); ++static draw_square(); ++static compute_position(); ++ + animate_move (player, orig_type, orig_arg, dest_type, dest_arg) + { + #if 1 diff -urN /usr/ports/games/xmille/files/patch-control__affirm.c games/xmille/files/patch-control__affirm.c --- /usr/ports/games/xmille/files/patch-control__affirm.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-control__affirm.c Fri Jun 15 02:15:16 2007 @@ -0,0 +1,20 @@ +--- control/affirm.c.orig Tue Jul 12 02:55:50 1988 ++++ control/affirm.c Fri Jun 15 02:05:02 2007 +@@ -9,6 +9,7 @@ + # include "co_class.h" + # include + # include ++# include + + /* + * affirm window on screen +@@ -33,6 +34,9 @@ + static Window affirm, ok, cancel; + extern GC co_fore_gc; + static int OKstate, CANCELstate; ++ ++static int redisplayLabel(); ++ + + int + co_affirm(title, parent) diff -urN /usr/ports/games/xmille/files/patch-control__button.c games/xmille/files/patch-control__button.c --- /usr/ports/games/xmille/files/patch-control__button.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-control__button.c Fri Jun 15 02:15:36 2007 @@ -0,0 +1,32 @@ +--- control/button.c.orig Thu Apr 2 23:06:52 1992 ++++ control/button.c Fri Jun 15 02:05:02 2007 +@@ -5,6 +5,8 @@ + # include + # include + # include "control.h" ++# include ++# include + + extern Display *dpy; + +@@ -31,6 +33,12 @@ + static XContext perwindowContext; + static int nextButton; + ++static int buttonOn(); ++static int buttonOff(); ++static int buttonText(); ++ ++ ++ + Button + CcreateButton (text, width, gc, font, backcolor, borderwidth) + char *text; +@@ -40,7 +48,6 @@ + long backcolor; + int borderwidth; + { +- char *malloc (); + struct button *b; + int round, off; + int hround; diff -urN /usr/ports/games/xmille/files/patch-control__dispatch.c games/xmille/files/patch-control__dispatch.c --- /usr/ports/games/xmille/files/patch-control__dispatch.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-control__dispatch.c Fri Jun 15 02:15:46 2007 @@ -0,0 +1,33 @@ +--- control/dispatch.c.orig Tue Jul 12 02:11:32 1988 ++++ control/dispatch.c Fri Jun 15 02:05:02 2007 +@@ -5,6 +5,7 @@ + */ + + # include ++# include + + struct eventGroup { + struct eventGroup *prev; +@@ -54,9 +55,12 @@ + }; + + +-struct eventGroup *eventStack, *allocGroup(); ++struct eventGroup *eventStack; + extern Display *dpy; + ++static struct eventGroup* allocGroup(); ++ ++ + bindEvent (window, eventMask, func) + Window window; + unsigned long eventMask; +@@ -135,8 +139,6 @@ + static struct eventGroup * + allocGroup () + { +- char *malloc (); +- + return (struct eventGroup *) malloc (sizeof (struct eventGroup)); + } + diff -urN /usr/ports/games/xmille/files/patch-control__prompted.c games/xmille/files/patch-control__prompted.c --- /usr/ports/games/xmille/files/patch-control__prompted.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-control__prompted.c Fri Jun 15 02:16:09 2007 @@ -0,0 +1,49 @@ +--- control/prompted.c.orig Tue Jul 12 03:01:02 1988 ++++ control/prompted.c Fri Jun 15 02:05:02 2007 +@@ -9,6 +9,7 @@ + # include "co_class.h" + # include + # include ++# include + + /* + * prompted window on screen +@@ -38,6 +39,17 @@ + + static int prompted_done; + ++static int co_promptedEvent(); ++static int co_OKstate(); ++static int redisplayLabel(); ++static int textbox_event(); ++static int handle_char(); ++static int compute_width(); ++static int draw_char(); ++static int draw_string(); ++static int redisplayText(); ++ ++ + char * + co_prompted(title, parent) + char *title; +@@ -157,7 +169,7 @@ + prompted_done = 1; + break; + case '\b': +- case '\0177': ++ case 127: + if (retpointer > returnbuffer) { + c = *--retpointer; + *retpointer = '\0'; +@@ -190,9 +202,10 @@ + draw_char (pos, ch, on) + { + GC my; ++ char buf = ch; + + my = on ? co_fore_gc : co_back_gc; +- XDrawImageString (dpy, textbox, my, pos, TEXTBOX_VP, &ch, 1); ++ XDrawImageString (dpy, textbox, my, pos, TEXTBOX_VP, &buf, 1); + } + + static diff -urN /usr/ports/games/xmille/files/patch-drawcard.c games/xmille/files/patch-drawcard.c --- /usr/ports/games/xmille/files/patch-drawcard.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-drawcard.c Fri Jun 15 02:09:25 2007 @@ -0,0 +1,44 @@ +--- drawcard.c.orig Thu Apr 2 05:55:06 1992 ++++ drawcard.c Fri Jun 15 02:09:15 2007 +@@ -8,6 +8,8 @@ + # include "ui.h" + # include "card.h" + # include "background.h" ++# include ++ + + struct card_init { + char *bits; +@@ -64,6 +66,9 @@ + struct card backside; + struct card eraseCard; + ++static drawIm(); ++static redisplaybelow(); ++ + + bw_init_cards() + { +@@ -183,12 +188,12 @@ + WIDTH, HEIGHT); + + XSetForeground(dpy, cheap_gc, bits_p); +- XSetStipple(dpy, cheap_gc, bits); ++ XSetStipple(dpy, cheap_gc, mask); + XFillRectangle (dpy, cards[i].bits, cheap_gc, 0, 0, + WIDTH, HEIGHT); + + XSetForeground(dpy, cheap_gc, mask_p); +- XSetStipple(dpy, cheap_gc, mask); ++ XSetStipple(dpy, cheap_gc, bits); + XFillRectangle (dpy, cards[i].bits, cheap_gc, 0, 0, + WIDTH, HEIGHT); + +@@ -262,7 +267,6 @@ + struct card *c; + { + struct displayed *d, *p; +- char *malloc (); + + p = 0; + for (d = onscreen; d; d = d->next) { diff -urN /usr/ports/games/xmille/files/patch-extern.c games/xmille/files/patch-extern.c --- /usr/ports/games/xmille/files/patch-extern.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-extern.c Fri Jun 15 02:22:28 2007 @@ -0,0 +1,11 @@ +--- extern.c.orig Wed Jul 8 11:32:47 1987 ++++ extern.c Fri Jun 15 02:20:34 2007 +@@ -45,7 +45,7 @@ + 1, /* C_DRIVE_SAFE */ + 1, /* C_RIGHT_WAY */ + 0 /* C_INIT */ +- }; ++ }, + Numneed[NUM_CARDS] = { /* number of cards needed per hand */ + 0, /* C_25 */ + 0, /* C_50 */ diff -urN /usr/ports/games/xmille/files/patch-mille.c games/xmille/files/patch-mille.c --- /usr/ports/games/xmille/files/patch-mille.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-mille.c Fri Jun 15 02:28:26 2007 @@ -0,0 +1,44 @@ +--- mille.c.orig Thu Mar 28 14:29:31 1996 ++++ mille.c Fri Jun 15 02:27:49 2007 +@@ -1,16 +1,17 @@ + # include "mille.h" + # include ++# include + # ifdef attron + # include +-# endif attron ++# endif + + /* + * @(#)mille.c 1.3 (Berkeley) 5/10/83 + */ + +-int rub(); ++void rub( int ); + +-/*char _sobuf[BUFSIZ];*/ ++char _sobuf[BUFSIZ]; + + main(ac, av) + reg int ac; +@@ -123,9 +124,9 @@ + * Routine to trap rubouts, and make sure they really want to + * quit. + */ +-rub() { ++void rub( int signum ) { + +- signal(SIGINT, 1); ++ signal(SIGINT, SIG_IGN); + if (getyn("Really? ")) + die(); + signal(SIGINT, rub); +@@ -136,7 +137,7 @@ + */ + die() { + +- signal(SIGINT, 1); ++ signal(SIGINT, SIG_IGN); + if (outf) + fflush(outf); + finish_ui (); diff -urN /usr/ports/games/xmille/files/patch-misc.c games/xmille/files/patch-misc.c --- /usr/ports/games/xmille/files/patch-misc.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-misc.c Fri Jun 15 02:22:03 2007 @@ -0,0 +1,11 @@ +--- misc.c.orig Wed Jul 8 11:33:04 1987 ++++ misc.c Fri Jun 15 02:20:34 2007 +@@ -2,7 +2,7 @@ + # ifdef attron + # include + # define _tty cur_term->Nttyb +-# endif attron ++# endif + + /* + * @(#)misc.c 1.3 (Berkeley) 7/2/83 diff -urN /usr/ports/games/xmille/files/patch-move.c games/xmille/files/patch-move.c --- /usr/ports/games/xmille/files/patch-move.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-move.c Fri Jun 15 02:33:12 2007 @@ -0,0 +1,72 @@ +--- move.c.orig Thu Mar 28 15:13:44 1996 ++++ move.c Fri Jun 15 02:33:02 2007 +@@ -9,15 +9,16 @@ + #endif + #define CTRL(c) (c - 'A' + 1) + +-#define ANIMATE 1 +- + /*extern FILE *outf;*/ + + char *Movenames[] = { + "M_DISCARD", "M_DRAW", "M_PLAY", "M_ORDER" + }; + +-char *playcard (), *sprint (); ++char *playcard (), ++ *sprintDecimal( char* format, int arg ), ++ *sprintString( char* format, char* arg ); ++ + + domove() + { +@@ -203,7 +204,7 @@ + return ("limit of 50"); + case C_50: + if (pp->mileage + Value[card] > End) +- return sprint ("puts you over %d", End); ++ return sprintDecimal ("puts you over %d", End); + case C_25: + if (!pp->can_go) + return ("cannot move now"); +@@ -220,7 +221,7 @@ + + case C_GAS: case C_SPARE: case C_REPAIRS: + if (pp->battle != opposite(card)) +- return sprint ("can't play \"%s\"", C_name[card]); ++ return sprintString ("can't play \"%s\"", C_name[card]); + #ifdef ANIMATE + animate_move (Play, ANIMATE_HAND, Card_no, ANIMATE_BATTLE, card); + #endif +@@ -232,7 +233,7 @@ + case C_GO: + if (pp->battle != C_INIT && pp->battle != C_STOP + && !isrepair(pp->battle)) +- return sprint ("cannot play \"Go\"on a \"%s\"", ++ return sprintString ("cannot play \"Go\"on a \"%s\"", + C_name[pp->battle]); + #ifdef ANIMATE + animate_move (Play, ANIMATE_HAND, Card_no, ANIMATE_BATTLE, card); +@@ -339,12 +340,19 @@ + return 0; + } + +-char * +-sprint (string, arg) ++char* sprintDecimal( char* format, int arg ) ++{ ++ static char buf[512]; ++ ++ sprintf (buf, format, arg); ++ return buf; ++} ++ ++char* sprintString( char* format, char* arg ) + { + static char buf[512]; + +- sprintf (buf, string, arg); ++ sprintf (buf, format, arg); + return buf; + } + diff -urN /usr/ports/games/xmille/files/patch-roll.c games/xmille/files/patch-roll.c --- /usr/ports/games/xmille/files/patch-roll.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-roll.c Fri Jun 15 01:48:39 2007 @@ -0,0 +1,11 @@ +--- roll.c.orig Thu Apr 2 23:16:11 1992 ++++ roll.c Wed Jan 31 23:04:23 2001 +@@ -7,7 +7,7 @@ + + # define reg register + +-# if (! defined ultrix && ! defined mips && ! defined vax) ++# if (! defined ultrix && ! defined mips && ! defined vax && ! defined __386BSD__ && ! defined __FreeBSD__) + # define MAXRAND 32767L + + roll(ndie, nsides) diff -urN /usr/ports/games/xmille/files/patch-save.c games/xmille/files/patch-save.c --- /usr/ports/games/xmille/files/patch-save.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-save.c Fri Jun 15 02:30:43 2007 @@ -0,0 +1,82 @@ +--- save.c.orig Thu Apr 2 05:56:45 1992 ++++ save.c Fri Jun 15 02:20:34 2007 +@@ -1,43 +1,46 @@ + #include "mille.h" + #include + #include +-#include ++#include ++#include ++#include ++#include + # ifdef attron + # include + # define _tty cur_term->Nttyb +-# endif attron ++# endif + + /* + * @(#)save.c 1.4 (Berkeley) 7/3/83 + */ + + typedef struct stat Stat; +-typedef struct tm Time; + + char *ctime(); + + int read(), write(); ++char* GetpromptedInput( char* ); + + /* + * This routine saves the current game for use at a later date + */ + extern int errno; +-extern char *sys_errlist[]; ++/* extern char *sys_errlist[]; */ + + save() { + + reg char *sp; + reg int outf; +- reg Time *tp; ++ reg time_t *tp; + char buf[80]; +- Time tme; ++ time_t tme; + Stat junk; + + tp = &tme; + if (Fromfile && getyn("Same file? ")) +- strcpy(buf, Fromfile); ++ strncpy(buf, Fromfile,sizeof(buf)); + else { +- strcpy (buf, GetpromptedInput ("file: ")); ++ strncpy (buf, GetpromptedInput ("file: "), sizeof(buf)); + sp = buf + strlen (buf); + } + +@@ -50,12 +53,13 @@ + return FALSE; + + if ((outf = creat(buf, 0644)) < 0) { +- error(sys_errlist[errno]); ++ /* error(sys_errlist[errno]); */ ++ strerror(errno); + return FALSE; + } + Error (buf); + time(tp); /* get current time */ +- strcpy(buf, ctime(tp)); ++ strncpy(buf, ctime(tp), sizeof(buf)); + for (sp = buf; *sp != '\n'; sp++) + continue; + *sp = '\0'; +@@ -87,7 +91,7 @@ + } + varpush(inf, read); + close(inf); +- strcpy(buf, ctime(&sbuf.st_mtime)); ++ strncpy(buf, ctime(&sbuf.st_mtime),sizeof(buf)); + for (sp = buf; *sp != '\n'; sp++) + continue; + *sp = '\0'; diff -urN /usr/ports/games/xmille/files/patch-ui.c games/xmille/files/patch-ui.c --- /usr/ports/games/xmille/files/patch-ui.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-ui.c Fri Jun 15 02:49:54 2007 @@ -0,0 +1,33 @@ +--- ui.c.orig Tue Apr 2 12:55:55 1996 ++++ ui.c Fri Jun 15 02:20:34 2007 +@@ -7,6 +7,8 @@ + # include "mille.h" + # include "ui.h" + # include ++# include ++# include + + #ifdef CTRL + # undef CTRL +@@ -84,7 +86,9 @@ + return(orig); + if (XTextWidth (font, orig, len) < max) + return orig; +- strcpy (buf, orig); ++ if (len > sizeof(buf)) ++ len = sizeof(buf); ++ strncpy (buf, orig, len); + do { + buf[--len] = '\0'; + } while (len > 0 && XTextWidth (font, buf, len) >= max); +@@ -409,6 +413,10 @@ + Colormap def_cm; + + dpy = XOpenDisplay ((char *) 0); ++ if (!dpy) { ++ printf("Error: Can't open X Display\n"); ++ exit(1); ++ } + screen = DefaultScreen(dpy); + def_cm = DefaultColormap(dpy, screen); + diff -urN /usr/ports/games/xmille/files/patch-varpush.c games/xmille/files/patch-varpush.c --- /usr/ports/games/xmille/files/patch-varpush.c Thu Jan 1 09:00:00 1970 +++ games/xmille/files/patch-varpush.c Fri Jun 15 02:29:05 2007 @@ -0,0 +1,32 @@ +--- varpush.c.orig Wed Jul 8 11:33:36 1987 ++++ varpush.c Fri Jun 15 02:20:34 2007 +@@ -1,3 +1,5 @@ ++#include ++#include + # include "mille.h" + + /* +@@ -6,6 +8,13 @@ + + int read(), write(); + ++static void remove_terminating_newline( char* buf ) ++{ ++ int len = strlen(buf); ++ if ( buf[len-1] == '\n' ) ++ buf[len-1] = 0; ++} ++ + /* + * push variables around via the routine func() on the file + * channel file. func() is either read or write. +@@ -36,7 +45,8 @@ + char buf[80]; + over: + printf("Debug file:"); +- gets(buf); ++ fgets(buf,80,stdin); ++ remove_terminating_newline(buf); + if ((outf = fopen(buf, "w")) == NULL) { + perror(buf); + goto over;