diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 2000-06-29 07:55:43 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 2000-06-29 07:55:43 +0000 |
commit | afe22eb51e4f808aa964a4c9bffba4914baa8fe3 (patch) | |
tree | d8d0de568365f4b9e3c7318f1251df495dbd3226 /games/larn/scores.c | |
parent | 4c4981824991e9ac42791c3203847402110691a2 (diff) |
Prune some obsolete defines, in particular VT100. Eventually curses will
replace termios.
Use system-defined limits for path lengths and usernames.
Use strlcpy() for convenience and to avoid a possible buffer overflow or two.
Various small tweaks.
Diffstat (limited to 'games/larn/scores.c')
-rw-r--r-- | games/larn/scores.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/games/larn/scores.c b/games/larn/scores.c index 8978a21c51b..cc92637e24e 100644 --- a/games/larn/scores.c +++ b/games/larn/scores.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scores.c,v 1.6 1999/03/27 03:45:50 pjanzen Exp $ */ +/* $OpenBSD: scores.c,v 1.7 2000/06/29 07:55:42 pjanzen Exp $ */ /* $NetBSD: scores.c,v 1.10 1997/10/18 20:03:48 christos Exp $ */ /* @@ -27,7 +27,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: scores.c,v 1.6 1999/03/27 03:45:50 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: scores.c,v 1.7 2000/06/29 07:55:42 pjanzen Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -47,7 +47,7 @@ struct scofmt { /* This is the structure for the scoreboard */ short level; /* the level player was on when he died */ short hardlev;/* the level of difficulty player played at */ short order; /* the relative ordering place of this entry */ - char who[40];/* the name of the character */ + char who[LOGNAMESIZE];/* the name of the character */ char sciv[26][2]; /* the inventory list of the character */ }; struct wscofmt {/* This is the structure for the winning scoreboard */ @@ -57,7 +57,7 @@ struct wscofmt {/* This is the structure for the winning scoreboard */ long suid; /* the user id number of the player */ short hardlev;/* the level of difficulty player played at */ short order; /* the relative ordering place of this entry */ - char who[40];/* the name of the character */ + char who[LOGNAMESIZE];/* the name of the character */ }; struct log_fmt { /* 102 bytes struct for the log file */ @@ -77,7 +77,7 @@ struct log_fmt { /* 102 bytes struct for the log file */ short usage; /* usage of the cpu in % */ short lev; /* player level */ #endif - char who[12]; /* player name */ + char who[LOGIN_NAME_MAX]; /* player name */ char what[46]; /* what happened to player */ }; |