Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games WARNS=5
details: https://anonhg.NetBSD.org/src/rev/ef8e51c5a228
branches: trunk
changeset: 779785:ef8e51c5a228
user: dholland <dholland%NetBSD.org@localhost>
date: Tue Jun 19 05:30:43 2012 +0000
description:
WARNS=5
diffstat:
games/larn/create.c | 49 +++++++++++++----------------
games/larn/diag.c | 10 ++---
games/larn/display.c | 36 +++++++++------------
games/larn/global.c | 72 ++++++++++++++++++-------------------------
games/larn/help.c | 10 +++---
games/larn/io.c | 75 ++++++++++++++++++--------------------------
games/larn/main.c | 60 +++++++++++++++---------------------
games/larn/monster.c | 85 +++++++++++++++++++-------------------------------
games/larn/moreobj.c | 22 +++++-------
games/larn/movem.c | 14 +++----
games/larn/nap.c | 7 +--
games/larn/object.c | 54 +++++++++++++-------------------
games/larn/regen.c | 6 +-
games/larn/savelev.c | 8 ++--
games/larn/scores.c | 46 ++++++++++-----------------
games/larn/signal.c | 20 ++++-------
games/larn/store.c | 31 +++++++++---------
games/larn/tok.c | 13 +++----
games/monop/cards.c | 15 +++-----
games/monop/execute.c | 16 ++++-----
games/monop/getinp.c | 10 ++---
games/monop/houses.c | 17 ++++------
games/monop/jail.c | 13 +++----
games/monop/misc.c | 30 +++++++----------
games/monop/monop.c | 17 ++++------
games/monop/morg.c | 15 ++++----
games/monop/print.c | 14 +++----
games/monop/prop.c | 21 ++++--------
games/monop/rent.c | 7 +--
games/monop/roll.c | 7 +--
games/monop/spec.c | 14 ++++----
games/monop/trade.c | 21 +++++-------
32 files changed, 350 insertions(+), 485 deletions(-)
diffs (truncated from 3141 to 300 lines):
diff -r ae79316b1c59 -r ef8e51c5a228 games/larn/create.c
--- a/games/larn/create.c Tue Jun 19 04:59:19 2012 +0000
+++ b/games/larn/create.c Tue Jun 19 05:30:43 2012 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: create.c,v 1.11 2008/02/03 19:29:50 dholland Exp $ */
+/* $NetBSD: create.c,v 1.12 2012/06/19 05:30:43 dholland Exp $ */
/* create.c Larn is copyrighted 1986 by Noah Morgan. */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: create.c,v 1.11 2008/02/03 19:29:50 dholland Exp $");
+__RCSID("$NetBSD: create.c,v 1.12 2012/06/19 05:30:43 dholland Exp $");
#endif /* not lint */
#include "header.h"
@@ -29,7 +29,7 @@
this is called at the beginning of a game and at no other time
*/
void
-makeplayer()
+makeplayer(void)
{
int i;
scbr();
@@ -72,8 +72,7 @@
Note that it is here we remove genocided monsters from the present level.
*/
void
-newcavelevel(x)
- int x;
+newcavelevel(int x)
{
int i, j;
if (beenhere[level])
@@ -116,8 +115,7 @@
static int mx, mxl, mxh, my, myl, myh, tmp2;
static void
-makemaze(k)
- int k;
+makemaze(int k)
{
int i, j, tmp;
int z;
@@ -177,8 +175,7 @@
function to eat away a filled in maze
*/
void
-eat(xx, yy)
- int xx, yy;
+eat(int xx, int yy)
{
int dir, try;
dir = rnd(4);
@@ -241,8 +238,7 @@
* - random object
*/
static int
-cannedlevel(k)
- int k;
+cannedlevel(int k)
{
char *row;
int i, j;
@@ -318,8 +314,7 @@
level V3 has potion of cure dianthroritis and demon prince
*/
static void
-treasureroom(lv)
- int lv;
+treasureroom(int lv)
{
int tx, ty, xsize, ysize;
@@ -341,8 +336,7 @@
* the coordinate given is that of the upper left corner of the room
*/
static void
-troom(lv, xsize, ysize, tx, ty, glyph)
- int lv, xsize, ysize, tx, ty, glyph;
+troom(int lv, int xsize, int ysize, int tx, int ty, int glyph)
{
int i, j;
int tp1, tp2;
@@ -399,8 +393,7 @@
subroutine to create the objects in the maze for the given level
*/
static void
-makeobject(j)
- int j;
+makeobject(int j)
{
int i;
if (j == 0) {
@@ -493,11 +486,13 @@
*/
static void
-fillmroom(n, what, arg)
- int n, arg;
- char what;
+fillmroom(int n, int what_i, int arg)
{
int i;
+ char what;
+
+ /* truncate to char width (just in case it matters) */
+ what = (char)what_i;
for (i = 0; i < n; i++)
fillroom(what, arg);
}
@@ -514,11 +509,13 @@
* uses a random walk
*/
static void
-fillroom(what, arg)
- int arg;
- char what;
+fillroom(int what_i, int arg)
{
int x, y;
+ char what;
+
+ /* truncate to char width (just in case it matters) */
+ what = (char)what_i;
#ifdef EXTRA
c[FILLROOM]++;
@@ -552,8 +549,7 @@
monsters
*/
int
-fillmonst(what)
- int what;
+fillmonst(int what)
{
int x, y, trys;
for (trys = 5; trys > 0; --trys) { /* max # of creation attempts */
@@ -575,8 +571,7 @@
if sethp(1) then wipe out old monsters else leave them there
*/
static void
-sethp(flg)
- int flg;
+sethp(int flg)
{
int i, j;
if (flg)
diff -r ae79316b1c59 -r ef8e51c5a228 games/larn/diag.c
--- a/games/larn/diag.c Tue Jun 19 04:59:19 2012 +0000
+++ b/games/larn/diag.c Tue Jun 19 05:30:43 2012 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: diag.c,v 1.12 2008/02/03 19:20:41 dholland Exp $ */
+/* $NetBSD: diag.c,v 1.13 2012/06/19 05:30:43 dholland Exp $ */
/* diag.c Larn is copyrighted 1986 by Noah Morgan. */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: diag.c,v 1.12 2008/02/03 19:20:41 dholland Exp $");
+__RCSID("$NetBSD: diag.c,v 1.13 2012/06/19 05:30:43 dholland Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -176,8 +176,7 @@
*/
static time_t zzz = 0;
int
-savegame(fname)
- char *fname;
+savegame(char *fname)
{
int i, k;
struct sphere *sp;
@@ -242,8 +241,7 @@
}
void
-restoregame(fname)
- char *fname;
+restoregame(char *fname)
{
int i, k;
struct sphere *sp, *sp2;
diff -r ae79316b1c59 -r ef8e51c5a228 games/larn/display.c
--- a/games/larn/display.c Tue Jun 19 04:59:19 2012 +0000
+++ b/games/larn/display.c Tue Jun 19 05:30:43 2012 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: display.c,v 1.9 2009/08/12 08:04:05 dholland Exp $ */
+/* $NetBSD: display.c,v 1.10 2012/06/19 05:30:43 dholland Exp $ */
/* display.c Larn is copyrighted 1986 by Noah Morgan. */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: display.c,v 1.9 2009/08/12 08:04:05 dholland Exp $");
+__RCSID("$NetBSD: display.c,v 1.10 2012/06/19 05:30:43 dholland Exp $");
#endif /* not lint */
#include "header.h"
@@ -26,26 +26,26 @@
now for the bottom line of the display
*/
void
-bottomline()
+bottomline(void)
{
recalc();
bot1f = 1;
}
void
-bottomhp()
+bottomhp(void)
{
bot2f = 1;
}
void
-bottomspell()
+bottomspell(void)
{
bot3f = 1;
}
void
-bottomdo()
+bottomdo(void)
{
if (bot1f) {
bot3f = bot1f = bot2f = 0;
@@ -63,7 +63,7 @@
}
void
-bot_linex()
+bot_linex(void)
{
int i;
if (cbak[SPELLS] <= -50 || (always)) {
@@ -142,7 +142,7 @@
called from ogold()
*/
void
-bottomgold()
+bottomgold(void)
{
botsub(makecode(GOLD, 69, 19), "%-6ld");
/* botsub(GOLD,"%-6ld",69,19); */
@@ -244,8 +244,7 @@
static int d_xmin = 0, d_xmax = MAXX, d_ymin = 0, d_ymax = MAXY;
void
-draws(xmin, xmax, ymin, ymax)
- int xmin, xmax, ymin, ymax;
+draws(int xmin, int xmax, int ymin, int ymax)
{
int i, idx;
if (xmin == 0 && xmax == MAXX) { /* clear section of screen as
@@ -283,7 +282,7 @@
u_char screen[MAXX][MAXY]; /* template for the screen */
static u_char d_flag;
void
-drawscreen()
+drawscreen(void)
{
int i, j, kk;
int lastx, lasty; /* variables used to optimize the
@@ -376,8 +375,7 @@
subroutine to display a cell location on the screen
*/
void
-showcell(x, y)
- int x, y;
+showcell(int x, int y)
{
int i, j, kk, mm;
if (c[BLINDCOUNT])
@@ -441,8 +439,7 @@
used in godirect() in monster.c for missile weapons display
*/
void
-show1cell(x, y)
- int x, y;
+show1cell(int x, int y)
{
if (c[BLINDCOUNT])
return; /* see nothing if blind */
@@ -475,7 +472,7 @@
cursor values start from 1 up
*/
void
-showplayer()
+showplayer(void)
{
cursor(playerx + 1, playery + 1);
oldx = playerx;
@@ -494,8 +491,8 @@
short diroffx[] = {0, 0, 1, 0, -1, 1, -1, 1, -1};
short diroffy[] = {0, 1, 0, -1, 0, -1, -1, 1, 1};
int
Home |
Main Index |
Thread Index |
Old Index