summaryrefslogtreecommitdiffstats
path: root/adventure
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>2000-01-09 17:17:19 +0000
committerjsm <jsm@NetBSD.org>2000-01-09 17:17:19 +0000
commite55a4c69ad6dfa55e6a3262864f6dce13f495ba3 (patch)
treefcc3c3ed9fdd3560794ac0b86a6a63aae5d49e76 /adventure
parente52594208cfeed7af6be03a9000f99c31d0f403d (diff)
downloadbsdgames-darwin-e55a4c69ad6dfa55e6a3262864f6dce13f495ba3.tar.gz
bsdgames-darwin-e55a4c69ad6dfa55e6a3262864f6dce13f495ba3.tar.zst
bsdgames-darwin-e55a4c69ad6dfa55e6a3262864f6dce13f495ba3.zip
Use err(1, NULL) and warn(NULL) for `out of memory' error messages.
Diffstat (limited to 'adventure')
-rw-r--r--adventure/io.c10
-rw-r--r--adventure/vocab.c6
2 files changed, 8 insertions, 8 deletions
diff --git a/adventure/io.c b/adventure/io.c
index bbe54d92..e3c80e89 100644
--- a/adventure/io.c
+++ b/adventure/io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.11 1999/02/10 00:11:28 hubertf Exp $ */
+/* $NetBSD: io.c,v 1.12 2000/01/09 17:17:19 jsm Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: io.c,v 1.11 1999/02/10 00:11:28 hubertf Exp $");
+__RCSID("$NetBSD: io.c,v 1.12 2000/01/09 17:17:19 jsm Exp $");
#endif
#endif /* not lint */
@@ -361,7 +361,7 @@ rtrav()
if (locc != oldloc) { /* getting a new entry */
t = travel[locc] = (struct travlist *) malloc(sizeof(struct travlist));
if ( t == NULL)
- errx(1, "Out of memory!");
+ err(1, NULL);
/* printf("New travel list for %d\n",locc); */
entries = 0;
oldloc = locc;
@@ -384,7 +384,7 @@ rtrav()
if (entries++) {
t = t->next = (struct travlist *) malloc(sizeof(struct travlist));
if (t == NULL)
- errx(1, "Out of memory!");
+ err(1, NULL);
}
t->tverb = rnum(); /* get verb from the file */
t->tloc = n; /* table entry mod 1000 */
@@ -559,7 +559,7 @@ pspeak(m, skip) /* read, decrypt an print a ptext message */
msg = &ptext[m];
if ((tbuf = (char *) malloc(msg->txtlen + 1)) == NULL)
- errx(1, "Out of memory!");
+ err(1, NULL);
memcpy(tbuf, msg->seekadr, msg->txtlen + 1); /* Room to null */
s = tbuf;
diff --git a/adventure/vocab.c b/adventure/vocab.c
index 5acc8b96..f1e4d503 100644
--- a/adventure/vocab.c
+++ b/adventure/vocab.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vocab.c,v 1.9 1998/09/14 09:29:09 hubertf Exp $ */
+/* $NetBSD: vocab.c,v 1.10 2000/01/09 17:17:19 jsm Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)vocab.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: vocab.c,v 1.9 1998/09/14 09:29:09 hubertf Exp $");
+__RCSID("$NetBSD: vocab.c,v 1.10 2000/01/09 17:17:19 jsm Exp $");
#endif
#endif /* not lint */
@@ -165,7 +165,7 @@ vocab(word, type, value) /* look up or store a word */
h->val = value;
h->atab = malloc(length(word));
if (h->atab == NULL)
- errx(1, "Out of memory!");
+ err(1, NULL);
for (s = word, t = h->atab; *s;)
*t++ = *s++ ^ '=';
*t = 0 ^ '=';