Update to version 15.0.

This commit is contained in:
Alexey Dokuchaev 2007-03-07 21:30:44 +00:00
parent ef251613e6
commit 818d50f480
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=186851
5 changed files with 26 additions and 52 deletions

View file

@ -6,7 +6,7 @@
#
PORTNAME= tt
PORTVERSION= 14.0
PORTVERSION= 15.0
CATEGORIES= games
MASTER_SITES= http://www.miketaylor.org.uk/tech/tt/
@ -16,7 +16,7 @@ COMMENT= Tetris for Terminals
ALL_TARGET= tt
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tt ${PREFIX}/bin
${INSTALL_PROGRAM} -g games -m 2555 ${WRKSRC}/tt ${PREFIX}/bin
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}

View file

@ -1,3 +1,3 @@
MD5 (tt-14.0.tar.gz) = 9d6c558f07ed5b904e4e8ffcfc6b43c4
SHA256 (tt-14.0.tar.gz) = 11bc49190e22b9a396c265947ead4807edabc6cfef7e03254f9e71211f26c56e
SIZE (tt-14.0.tar.gz) = 32585
MD5 (tt-15.0.tar.gz) = dbf69201eb802cbcda4e2bc5fbbdbb27
SHA256 (tt-15.0.tar.gz) = 0cff24a7cdc0de7bc292943f0c01e7e1562072d78d1a653ca5bd5bfc80cf3aee
SIZE (tt-15.0.tar.gz) = 45319

View file

@ -13,17 +13,14 @@
/*-------------------------------------------------------------------------*/
-extern time_t time ();
-extern char *ctime ();
-extern char *malloc ();
-extern char *getenv ();
-extern char *getlogin ();
+/* extern time_t time ();
extern char *ctime ();
-/*extern char *malloc ();*/
+extern char *malloc ();
extern char *getenv ();
extern char *getlogin ();
-extern struct passwd *getpwuid ();
+//extern time_t time ();
+//extern char *ctime ();
+//extern char *malloc ();
+//extern char *getenv ();
+//extern char *getlogin ();
+//extern struct passwd *getpwuid ();
+extern struct passwd *getpwuid (); */
static int get_key ();
@ -35,3 +32,12 @@
/* These four variables determine which game we're playing */
struct piece *pieces = pieces4;
@@ -198,7 +199,7 @@
(void) umask (0000); /* 000 octal, just to make the point */
#ifdef LOCKF
- if ((lock_fd = open (SCORE_FILE, O_RDWR | O_CREAT, 0666)) == -1)
+ if ((lock_fd = open (SCORE_FILE, O_RDWR | O_CREAT, 0664)) == -1)
die (LE_OPEN, "Couldn't open(2) score-file for lockf()");
while (i++ < 5) { /* Make up to five attempts */

View file

@ -1,32 +1,11 @@
--- utils.c.orig Fri Sep 12 18:01:20 2003
+++ utils.c Fri Sep 12 22:21:05 2003
@@ -30,8 +30,7 @@
# include <poll.h>
#endif
#include <curses.h>
-#undef va_start /* required with Red Hat's ncurses :-P */
-#include <varargs.h>
+#include <stdarg.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/ioctl.h> /* M001 */
@@ -75,16 +74,13 @@
\***************************************************************************/
/*VARARGS*/
-char *form (va_alist)
- va_dcl
+char *form (const char *fmt_string, ...)
{
va_list pvar;
- char *fmt_string;
@@ -82,7 +82,7 @@
static char result[LINELEN];
- va_start (pvar);
- fmt_string = va_arg (pvar, char*);
- (void) vsprintf (result, fmt_string, pvar);
+ va_start (pvar, fmt_string);
+ (void) vsnprintf (result, LINELEN, fmt_string, pvar);
va_end (pvar);
va_start (ap, fmt);
- (void) vsprintf (result, fmt, ap);
+ (void) vsnprintf (result, LINELEN, fmt, ap);
va_end (ap);
return (result);
}

View file

@ -1,11 +0,0 @@
--- utils.h.orig Fri Sep 12 22:12:44 2003
+++ utils.h Fri Sep 12 22:13:00 2003
@@ -12,7 +12,7 @@
\***************************************************************************/
extern char *basename ();
-extern char *form ();
+extern char *form (const char *fmt_string, ...);
extern void die ();
extern void get_termcap ();
extern void flush_keyboard ();