diff options
Diffstat (limited to 'games/tetris')
-rw-r--r-- | games/tetris/tetris.6 | 8 | ||||
-rw-r--r-- | games/tetris/tetris.c | 10 | ||||
-rw-r--r-- | games/tetris/tetris.h | 3 |
3 files changed, 9 insertions, 12 deletions
diff --git a/games/tetris/tetris.6 b/games/tetris/tetris.6 index d5590e7a01d..cf039a6f816 100644 --- a/games/tetris/tetris.6 +++ b/games/tetris/tetris.6 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tetris.6,v 1.16 2015/07/27 18:48:04 sobrado Exp $ +.\" $OpenBSD: tetris.6,v 1.17 2015/11/20 07:40:23 tb Exp $ .\" .\" Copyright (c) 1992, 1993 .\" The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\" .\" @(#)tetris.6 8.1 (Berkeley) 5/31/93 .\" -.Dd $Mdocdate: July 27 2015 $ +.Dd $Mdocdate: November 20 2015 $ .Dt TETRIS 6 .Os .Sh NAME @@ -146,8 +146,8 @@ Scores which are the highest on a given level are marked with asterisks .Dq * . .Sh FILES -.Bl -tag -width /var/games/tetris.scoresxx -.It Pa /var/games/tetris.scores +.Bl -tag -width $HOME/tetris.scoresxx +.It Pa $HOME/tetris.scores high score file .El .Sh AUTHORS diff --git a/games/tetris/tetris.c b/games/tetris/tetris.c index eff466b7b5f..41d68e318d1 100644 --- a/games/tetris/tetris.c +++ b/games/tetris/tetris.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tetris.c,v 1.25 2014/11/16 04:49:49 guenther Exp $ */ +/* $OpenBSD: tetris.c,v 1.26 2015/11/20 07:40:23 tb Exp $ */ /* $NetBSD: tetris.c,v 1.2 1995/04/22 07:42:47 cgd Exp $ */ /*- @@ -61,7 +61,6 @@ const struct shape *curshape; const struct shape *nextshape; long fallrate; int score; -gid_t gid, egid; char key_msg[100]; int showpreview, classic; @@ -157,11 +156,10 @@ main(int argc, char *argv[]) const char *errstr; int ch, i, j; - keys = "jkl pq"; + if (pledge("stdio rpath wpath cpath tty", NULL) == -1) + err(1, "pledge"); - gid = getgid(); - egid = getegid(); - setegid(gid); + keys = "jkl pq"; classic = showpreview = 0; while ((ch = getopt(argc, argv, "ck:l:ps")) != -1) diff --git a/games/tetris/tetris.h b/games/tetris/tetris.h index 4de192d8e5c..5eb3421db77 100644 --- a/games/tetris/tetris.h +++ b/games/tetris/tetris.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tetris.h,v 1.10 2008/08/10 12:23:25 krw Exp $ */ +/* $OpenBSD: tetris.h,v 1.11 2015/11/20 07:40:23 tb Exp $ */ /* $NetBSD: tetris.h,v 1.2 1995/04/22 07:42:48 cgd Exp $ */ /*- @@ -167,7 +167,6 @@ extern long fallrate; /* less than 1 million; smaller => faster */ #define PRE_PENALTY 0.75 extern int score; /* the obvious thing */ -extern gid_t gid, egid; extern char key_msg[100]; extern int showpreview; |