-/* $NetBSD: hack.lev.c,v 1.9 2009/01/18 13:30:33 tnn Exp $ */
+/* $NetBSD: hack.lev.c,v 1.11 2009/08/12 07:28:40 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.lev.c,v 1.9 2009/01/18 13:30:33 tnn Exp $");
+__RCSID("$NetBSD: hack.lev.c,v 1.11 2009/08/12 07:28:40 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
boolean level_exists[MAXLEVEL + 1];
+static void savegoldchn(int, struct gold *);
+static void savetrapchn(int, struct trap *);
+
void
-savelev(fd, lev)
- int fd;
- xchar lev;
+savelev(int fd, xchar lev)
{
#ifndef NOWORM
struct wseg *wtmp, *wtmp2;
}
void
-bwrite(fd, loc, num)
- int fd;
- const void *loc;
- size_t num;
+bwrite(int fd, const void *loc, size_t num)
{
/* lint wants the 3rd arg of write to be an int; lint -p an unsigned */
if ((size_t)write(fd, loc, num) != num)
}
void
-saveobjchn(fd, otmp)
- int fd;
- struct obj *otmp;
+saveobjchn(int fd, struct obj *otmp)
{
struct obj *otmp2;
unsigned xl;
}
void
-savemonchn(fd, mtmp)
- int fd;
- struct monst *mtmp;
+savemonchn(int fd, struct monst *mtmp)
{
struct monst *mtmp2;
unsigned xl;
bwrite(fd, (char *) &minusone, sizeof(int));
}
-void
-savegoldchn(fd, gold)
- int fd;
- struct gold *gold;
+static void
+savegoldchn(int fd, struct gold *gold)
{
struct gold *gold2;
while (gold) {
bwrite(fd, nul, sizeof(struct gold));
}
-void
-savetrapchn(fd, trap)
- int fd;
- struct trap *trap;
+static void
+savetrapchn(int fd, struct trap *trap)
{
struct trap *trap2;
while (trap) {
}
void
-getlev(fd, pid, lev)
- int fd, pid;
- xchar lev;
+getlev(int fd, int pid, xchar lev)
{
struct gold *gold;
struct trap *trap;
}
void
-mread(fd, buf, len)
- int fd;
- char *buf;
- unsigned len;
+mread(int fd, char *buf, unsigned len)
{
int rlen;
}
void
-mklev()
+mklev(void)
{
if (getbones())
return;