summaryrefslogtreecommitdiff
path: root/games/tt/files
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2003-09-24 18:14:21 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2003-09-24 18:14:21 +0000
commit9bab5786850ee98318387d121598f388ea2236d4 (patch)
tree7969b4e5142312e8431437b61625bed167174139 /games/tt/files
parent- Update to 0.9.12.1 (diff)
This is a new port of tetris game, written almost 15 years ago,
but being very playable, highly portable, well-tested, and still being developed! It is specifically designed to be played over terminal lines. Includes quite a few game-type options, and just overall-neat piece of software. PR: 56743 Submitted by: Alexey Dokuchaev <danfe@regency.nsu.ru>
Notes
Notes: svn path=/head/; revision=89266
Diffstat (limited to 'games/tt/files')
-rw-r--r--games/tt/files/patch-Makefile17
-rw-r--r--games/tt/files/patch-tt.c37
-rw-r--r--games/tt/files/patch-tt.h19
-rw-r--r--games/tt/files/patch-utils.c32
-rw-r--r--games/tt/files/patch-utils.h11
5 files changed, 116 insertions, 0 deletions
diff --git a/games/tt/files/patch-Makefile b/games/tt/files/patch-Makefile
new file mode 100644
index 000000000000..59546a2781f3
--- /dev/null
+++ b/games/tt/files/patch-Makefile
@@ -0,0 +1,17 @@
+--- Makefile.orig Thu Sep 11 15:09:08 2003
++++ Makefile Fri Sep 12 22:20:35 2003
+@@ -6,10 +6,10 @@
+ LINTFLAGS = -abh
+
+ # --- Choose one of these CFLAGS ---
+-CFLAGS = $(OPT) # Sun BSD, Red Hat Linux
+-#CFLAGS = $(OPT) -DSYSV # SCO System V
+-#CFLAGS = $(OPT) -DSYSV -DNO_NAP_SYSCALL # Generic System V?
+-#CFLAGS = $(OPT) -DNO_USLEEP_SYSCALL # Generic BSD?
++CFLAGS += $(OPT) # Sun BSD, Red Hat Linux
++#CFLAGS += $(OPT) -DSYSV # SCO System V
++#CFLAGS += $(OPT) -DSYSV -DNO_NAP_SYSCALL # Generic System V?
++#CFLAGS += $(OPT) -DNO_USLEEP_SYSCALL # Generic BSD?
+
+ # --- Choose one of these LDLIBS ---
+ LDLIBS = -lcurses -ltermcap # Sun and Generic BSD
diff --git a/games/tt/files/patch-tt.c b/games/tt/files/patch-tt.c
new file mode 100644
index 000000000000..c87cc23aa8eb
--- /dev/null
+++ b/games/tt/files/patch-tt.c
@@ -0,0 +1,37 @@
+--- tt.c.orig Tue May 27 17:46:22 2003
++++ tt.c Sat Sep 13 09:55:18 2003
+@@ -21,6 +21,7 @@
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <pwd.h>
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+
+@@ -32,19 +33,19 @@
+
+ /*-------------------------------------------------------------------------*/
+
+-extern time_t time ();
+-extern char *ctime ();
+-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 ();
+
+ static int get_key ();
+
+ /*-------------------------------------------------------------------------*/
+
+ char *LOCK_FILE = "/home/mike/lib/ttlock/ttlock";
+-char *SCORE_FILE = "/home/mike/lib/ttscores";
++char *SCORE_FILE = "/var/games/ttscores";
+
+ /* These four variables determine which game we're playing */
+ struct piece *pieces = pieces4;
diff --git a/games/tt/files/patch-tt.h b/games/tt/files/patch-tt.h
new file mode 100644
index 000000000000..d30e1715a86e
--- /dev/null
+++ b/games/tt/files/patch-tt.h
@@ -0,0 +1,19 @@
+--- tt.h.orig Sat Sep 13 09:20:29 2003
++++ tt.h Sat Sep 13 09:48:57 2003
+@@ -20,7 +20,7 @@
+ |* *|
+ \***************************************************************************/
+
+-#undef LOCKF /* Use lockf(3) instead of open(O_EXCL) */
++#define LOCKF /* Use lockf(3) instead of open(O_EXCL) */
+
+ /***************************************************************************\
+ |* *|
+@@ -187,5 +187,5 @@
+ /*--------------------------------------------------------------------------*/
+
+ /* This is probably still the most portable way ... */
+-extern int read(), close(), sleep(), unlink(), write(), getuid();
+-extern void usleep();
++//extern int read(), close(), sleep(), unlink(), write(), getuid();
++//extern void usleep();
diff --git a/games/tt/files/patch-utils.c b/games/tt/files/patch-utils.c
new file mode 100644
index 000000000000..a3c1c60cbe1b
--- /dev/null
+++ b/games/tt/files/patch-utils.c
@@ -0,0 +1,32 @@
+--- 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;
+ 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);
+ return (result);
+ }
diff --git a/games/tt/files/patch-utils.h b/games/tt/files/patch-utils.h
new file mode 100644
index 000000000000..1b5921090d35
--- /dev/null
+++ b/games/tt/files/patch-utils.h
@@ -0,0 +1,11 @@
+--- 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 ();