aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1998-02-20 13:47:02 +0800
committersteve <steve@FreeBSD.org>1998-02-20 13:47:02 +0800
commit04aaa2afb0390f152f51e14796e1daac3ee4fd38 (patch)
tree039225bfd1ed9662d734743afe784c7b30d152a8 /games
parentfd93ac11099f789a46da990582ccfaf516e41e68 (diff)
downloadfreebsd-ports-gnome-04aaa2afb0390f152f51e14796e1daac3ee4fd38.tar.gz
freebsd-ports-gnome-04aaa2afb0390f152f51e14796e1daac3ee4fd38.tar.zst
freebsd-ports-gnome-04aaa2afb0390f152f51e14796e1daac3ee4fd38.zip
Initial import of the old ladder game.
PR: 5783 Submitted by: Stefan Zehl <sec@42.org>
Diffstat (limited to 'games')
-rw-r--r--games/ladder/Makefile23
-rw-r--r--games/ladder/distinfo1
-rw-r--r--games/ladder/files/patch-aa19
-rw-r--r--games/ladder/files/patch-ab121
-rw-r--r--games/ladder/pkg-comment1
-rw-r--r--games/ladder/pkg-descr1
-rw-r--r--games/ladder/pkg-plist2
7 files changed, 168 insertions, 0 deletions
diff --git a/games/ladder/Makefile b/games/ladder/Makefile
new file mode 100644
index 000000000000..c4a7ee501286
--- /dev/null
+++ b/games/ladder/Makefile
@@ -0,0 +1,23 @@
+# New ports collection makefile for: ladder
+# Version required: 1
+# Date created: 18 Feb 1998
+# Whom: Stefan Zehl <sec@42.org>
+#
+# $Id$
+#
+
+DISTNAME= ladder
+PKGNAME= ladder-1.00
+CATEGORIES= games
+MASTER_SITES= http://www.srv.net/~kth/ \
+ ftp://ftp.42.org/pub/unix/games/
+EXTRACT_SUFX= .tar
+
+MAINTAINER= sec@42.org
+
+RESTRICTED= "possible copyright problems ?"
+
+NO_WRKSUBDIR= true
+EXTRACT_BEFORE_ARGS=-xf
+
+.include <bsd.port.mk>
diff --git a/games/ladder/distinfo b/games/ladder/distinfo
new file mode 100644
index 000000000000..b620925c867a
--- /dev/null
+++ b/games/ladder/distinfo
@@ -0,0 +1 @@
+MD5 (ladder.tar) = 274ff1614ad21808ca62ab839b2f313a
diff --git a/games/ladder/files/patch-aa b/games/ladder/files/patch-aa
new file mode 100644
index 000000000000..f6ee39682ddd
--- /dev/null
+++ b/games/ladder/files/patch-aa
@@ -0,0 +1,19 @@
+--- ladder.c.org Wed Feb 18 19:26:47 1998
++++ ladder.c Wed Feb 18 19:33:09 1998
+@@ -82,7 +82,7 @@
+ mvaddstr(r,LM,"Version: n/a");
+ mvaddstr(r,RM0,"Up = k|8 Down = j|2 Left = h|4 Right = l|6");
+ r++;
+- mvprintw(r,LM,"Terminal: %s",termname());
++ mvprintw(r,LM,"Terminal: %s",getenv("TERM"));
+ mvaddstr(r,RM0,"Jump = Space Stop = Other");
+ r++;
+ mvprintw(r,LM,"Play Speed: %d",speed + 1);
+--- ladder.h.org Wed Feb 18 19:19:51 1998
++++ ladder.h Wed Feb 18 19:26:29 1998
+@@ -1,4 +1,4 @@
+-#include <ncurses/curses.h>
++#include <ncurses.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <signal.h>
diff --git a/games/ladder/files/patch-ab b/games/ladder/files/patch-ab
new file mode 100644
index 000000000000..c2d28576ecf7
--- /dev/null
+++ b/games/ladder/files/patch-ab
@@ -0,0 +1,121 @@
+--- Makefile.org Mon Oct 27 00:15:08 1997
++++ Makefile Wed Feb 18 22:34:28 1998
+@@ -3,11 +3,11 @@
+ OBJS = ladder.o lplay.o ltime.o lscore.o lscreens.o
+
+ CC = gcc
+-CFLAGS = -O -pedantic -I/usr/include/ncurses
++CFLAGS = -O2 -pedantic -Wall
+ LDFLAGS = -s
+ M4 = m4
+ LIBS = -lncurses
+-SCOREFILE = ./ladder.scores
++SCOREFILE = /var/games/ladder.scores
+
+ .SUFFIXES: .o .c .m4
+
+@@ -21,6 +21,14 @@
+ $(CC) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBS)
+
+ $(OBJS): ladder.h
++
++clean:
++ -$(RM) $(OBJS) $(TARGET) *.core
++
++all: $(TARGET)
++
++install:
++ install -c -s -o games -g bin -m 4555 ladder ${PREFIX}/bin
+
+ # ladder.c: ladder.m4
+
+--- ladder.c.org Mon Oct 27 00:07:23 1997
++++ ladder.c Wed Feb 18 22:33:55 1998
+@@ -14,7 +14,7 @@
+ char *d = t;
+ int i;
+
+- for( ; *s; *s++ )
++ for( ; *s; s++ )
+ if( *s & 0200 )
+ for( i = 210 - (unsigned char)*s; i; i-- )
+ *d++ = ' ';
+--- lplay.c.org Tue Nov 11 20:01:51 1997
++++ lplay.c Wed Feb 18 22:33:56 1998
+@@ -54,7 +54,7 @@
+ mvaddstr(row,0,t);
+
+ /* find points of release */
+- for( s = t; s = strchr(s,CRELEAS); s++ )
++ for( s = t; (s = strchr(s,CRELEAS)); s++ )
+ {
+ rel->row = row;
+ rel->col = s - t;
+@@ -67,7 +67,7 @@
+
+ /* find lad */
+ for( row = 0; row < DIMROW; row++ )
+- for( s = t = bg[row]; s = strchr(s,CLAD); s++ )
++ for( s = t = bg[row]; (s = strchr(s,CLAD)); s++ )
+ {
+ /* nasty, check for CLAD's surrounded by CFREEs */
+ if( s[-1] != CFREE || s[1] != CFREE )
+@@ -433,6 +433,8 @@
+ else
+ dir = STOP;
+ break;
++ default:
++ break;
+ }
+ }
+
+--- lscore.c.org Mon Oct 27 00:07:24 1997
++++ lscore.c Wed Feb 18 22:33:56 1998
+@@ -21,7 +21,7 @@
+ FILE *lfp;
+
+ for( i = 3; i; i-- )
+- if( lfp = fopen(lf,"r") )
++ if( (lfp = fopen(lf,"r")) )
+ {
+ fclose(lfp);
+ sleep(2);
+@@ -47,7 +47,7 @@
+
+ lock_score();
+ memset(scores,0,sizeof(scores));
+- if( sfp = fopen(sf,"r") )
++ if( (sfp = fopen(sf,"r")) )
+ {
+ for( scp = scores; scp < &scores[MAXSCORE]; scp++ )
+ if( fscanf(sfp,"%d%d%d%d",
+@@ -67,8 +67,8 @@
+ SCORE *scp;
+ for( scp = &scores[MAXSCORE]; scp > scores; scp-- )
+ if( scp[0].score > scp[-1].score ||
+- scp[0].score == scp[-1].score &&
+- scp[0].level >= scp[-1].level )
++ (scp[0].score == scp[-1].score &&
++ scp[0].level >= scp[-1].level ))
+ {
+ SCORE tmp = scp[0];
+ scp[0] = scp[-1];
+@@ -113,7 +113,7 @@
+ if( scores[i].score )
+ {
+ printw("%5d00 %2d ",scores[i].score,scores[i].level + 1);
+- if( pw = getpwuid(scores[i].uid) )
++ if( (pw = getpwuid(scores[i].uid)) )
+ addstr(pw->pw_name);
+ else
+ printw("UID %d",scores[i].uid);
+--- ltime.c.org Mon Oct 27 00:07:24 1997
++++ ltime.c Wed Feb 18 22:33:56 1998
+@@ -2,6 +2,7 @@
+ #include <sys/types.h>
+ #include <sys/times.h>
+ #include <sys/time.h>
++#include <unistd.h>
+
+ static void waittcs(unsigned int tcs)
+ {
diff --git a/games/ladder/pkg-comment b/games/ladder/pkg-comment
new file mode 100644
index 000000000000..70f8275192f0
--- /dev/null
+++ b/games/ladder/pkg-comment
@@ -0,0 +1 @@
+The old "ladder" game.
diff --git a/games/ladder/pkg-descr b/games/ladder/pkg-descr
new file mode 100644
index 000000000000..5ad32c5d237d
--- /dev/null
+++ b/games/ladder/pkg-descr
@@ -0,0 +1 @@
+A port of the old and known "ladder" game.
diff --git a/games/ladder/pkg-plist b/games/ladder/pkg-plist
new file mode 100644
index 000000000000..ffb36b3a0562
--- /dev/null
+++ b/games/ladder/pkg-plist
@@ -0,0 +1,2 @@
+bin/ladder
+@unexec rm /var/games/ladder.scores