summaryrefslogtreecommitdiffstats
path: root/battlestar
diff options
context:
space:
mode:
Diffstat (limited to 'battlestar')
-rw-r--r--battlestar/com1.c6
-rw-r--r--battlestar/com4.c8
-rw-r--r--battlestar/com6.c6
-rw-r--r--battlestar/dayobjs.c6
-rw-r--r--battlestar/extern.h44
-rw-r--r--battlestar/getcom.c6
-rw-r--r--battlestar/globals.c14
-rw-r--r--battlestar/init.c16
-rw-r--r--battlestar/misc.c10
-rw-r--r--battlestar/nightobjs.c6
-rw-r--r--battlestar/parse.c8
-rw-r--r--battlestar/room.c8
12 files changed, 69 insertions, 69 deletions
diff --git a/battlestar/com1.c b/battlestar/com1.c
index ae6aa7a3..7ce85a67 100644
--- a/battlestar/com1.c
+++ b/battlestar/com1.c
@@ -1,4 +1,4 @@
-/* $NetBSD: com1.c,v 1.6 1997/10/11 02:06:58 lukem Exp $ */
+/* $NetBSD: com1.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)com1.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: com1.c,v 1.6 1997/10/11 02:06:58 lukem Exp $");
+__RCSID("$NetBSD: com1.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $");
#endif
#endif /* not lint */
@@ -75,7 +75,7 @@ convert(tothis) /* Converts day to night and vice versa. */
int tothis; /* Day objects are permanent. Night objects
* are added */
{ /* at dusk, and subtracted at dawn. */
- struct objs *p;
+ const struct objs *p;
int i, j;
if (tothis == TONIGHT) {
diff --git a/battlestar/com4.c b/battlestar/com4.c
index de377095..bbc41e49 100644
--- a/battlestar/com4.c
+++ b/battlestar/com4.c
@@ -1,4 +1,4 @@
-/* $NetBSD: com4.c,v 1.6 1997/10/11 02:07:04 lukem Exp $ */
+/* $NetBSD: com4.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)com4.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: com4.c,v 1.6 1997/10/11 02:07:04 lukem Exp $");
+__RCSID("$NetBSD: com4.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $");
#endif
#endif /* not lint */
@@ -192,7 +192,7 @@ take(from)
int
throw(name)
- char *name;
+ const char *name;
{
int n;
int deposit = 0;
@@ -273,7 +273,7 @@ throw(name)
int
drop(name)
- char *name;
+ const char *name;
{
int firstnumber, value;
diff --git a/battlestar/com6.c b/battlestar/com6.c
index adb34a62..9132880e 100644
--- a/battlestar/com6.c
+++ b/battlestar/com6.c
@@ -1,4 +1,4 @@
-/* $NetBSD: com6.c,v 1.9 1997/10/13 21:05:36 cjs Exp $ */
+/* $NetBSD: com6.c,v 1.10 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)com6.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: com6.c,v 1.9 1997/10/13 21:05:36 cjs Exp $");
+__RCSID("$NetBSD: com6.c,v 1.10 1999/02/10 01:36:50 hubertf Exp $");
#endif
#endif /* not lint */
@@ -136,7 +136,7 @@ post(ch)
sigprocmask(SIG_SETMASK, &osigset, (sigset_t *) 0);
}
-char *
+const char *
rate()
{
int score;
diff --git a/battlestar/dayobjs.c b/battlestar/dayobjs.c
index b6d44302..6b43bb37 100644
--- a/battlestar/dayobjs.c
+++ b/battlestar/dayobjs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dayobjs.c,v 1.6 1997/10/11 02:07:16 lukem Exp $ */
+/* $NetBSD: dayobjs.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,13 +38,13 @@
#if 0
static char sccsid[] = "@(#)dayobjs.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: dayobjs.c,v 1.6 1997/10/11 02:07:16 lukem Exp $");
+__RCSID("$NetBSD: dayobjs.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $");
#endif
#endif /* not lint */
#include "extern.h"
-struct objs dayobjs[] = {
+const struct objs dayobjs[] = {
{236, HORSE},
{237, CAR},
{275, POT},
diff --git a/battlestar/extern.h b/battlestar/extern.h
index c659bb89..afe2c0e2 100644
--- a/battlestar/extern.h
+++ b/battlestar/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.9 1998/09/13 15:27:26 hubertf Exp $ */
+/* $NetBSD: extern.h,v 1.10 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -223,7 +223,7 @@
#define MAXCUMBER 10
struct room {
- char *name;
+ const char *name;
int link[8];
#define north link[0]
#define south link[1]
@@ -233,7 +233,7 @@ struct room {
#define access link[5]
#define down link[6]
#define flyhere link[7]
- char *desc;
+ const char *desc;
unsigned int objects[NUMOFWORDS];
};
extern struct room dayfile[];
@@ -241,11 +241,11 @@ extern struct room nightfile[];
struct room *location;
/* object characteristics */
-char *objdes[NUMOFOBJECTS];
-char *objsht[NUMOFOBJECTS];
-char *ouch[NUMOFINJURIES];
-int objwt[NUMOFOBJECTS];
-int objcumber[NUMOFOBJECTS];
+const char *const objdes[NUMOFOBJECTS];
+const char *const objsht[NUMOFOBJECTS];
+const char *const ouch[NUMOFINJURIES];
+const int objwt[NUMOFOBJECTS];
+const int objcumber[NUMOFOBJECTS];
/* current input line */
#define NWORD 20 /* words per line */
@@ -286,7 +286,7 @@ char injuries[NUMOFINJURIES];
char uname[9];
struct wlist {
- char *string;
+ const char *string;
int value, article;
struct wlist *next;
};
@@ -300,13 +300,13 @@ struct objs {
short room;
short obj;
};
-extern struct objs dayobjs[];
-extern struct objs nightobjs[];
+extern const struct objs dayobjs[];
+extern const struct objs nightobjs[];
void blast __P((void));
void bury __P((void));
-int card __P((char *, int));
-int checkout __P((char *));
+int card __P((const char *, int));
+int checkout __P((const char *));
void chime __P((void));
void convert __P((int));
void crash __P((void));
@@ -317,14 +317,14 @@ void dig __P((void));
int draw __P((void));
void drink __P((void));
int drive __P((void));
-int drop __P((char *));
+int drop __P((const char *));
int eat __P((void));
void endfly __P((void));
int fight __P((int, int));
int follow __P((void));
void getutmp __P((char *));
int give __P((void));
-int hash __P((char *));
+int hash __P((const char *));
void initialize __P((char));
void install __P((struct wlist *));
int jump __P((void));
@@ -355,18 +355,18 @@ void succumb __P((int));
int take __P((unsigned int[]));
int takeoff __P((void));
void target __P((void));
-int throw __P((char *));
-int ucard __P((unsigned int *));
+int throw __P((const char *));
+int ucard __P((const unsigned int *));
int use __P((void));
int visual __P((void));
int wearit __P((void));
void whichway __P((struct room));
-int wizard __P((char *));
+int wizard __P((const char *));
void wordinit __P((void));
void writedes __P((void));
int zzz __P((void));
-char *getcom __P((char *, int, char *, char *));
+char *getcom __P((char *, int, const char *, const char *));
char *getword __P((char *, char *, int));
-char *rate __P((void));
-char *truedirec __P((int, char));
-struct wlist *lookup __P((char *));
+const char *rate __P((void));
+const char *truedirec __P((int, char));
+struct wlist *lookup __P((const char *));
diff --git a/battlestar/getcom.c b/battlestar/getcom.c
index 841d376a..76e236fb 100644
--- a/battlestar/getcom.c
+++ b/battlestar/getcom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getcom.c,v 1.5 1997/10/11 02:07:21 lukem Exp $ */
+/* $NetBSD: getcom.c,v 1.6 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)getcom.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: getcom.c,v 1.5 1997/10/11 02:07:21 lukem Exp $");
+__RCSID("$NetBSD: getcom.c,v 1.6 1999/02/10 01:36:50 hubertf Exp $");
#endif
#endif /* not lint */
@@ -48,7 +48,7 @@ char *
getcom(buf, size, prompt, error)
char *buf;
int size;
- char *prompt, *error;
+ const char *prompt, *error;
{
for (;;) {
fputs(prompt, stdout);
diff --git a/battlestar/globals.c b/battlestar/globals.c
index 1b3fc71c..5eebe951 100644
--- a/battlestar/globals.c
+++ b/battlestar/globals.c
@@ -1,4 +1,4 @@
-/* $NetBSD: globals.c,v 1.6 1997/10/11 02:07:23 lukem Exp $ */
+/* $NetBSD: globals.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)globals.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: globals.c,v 1.6 1997/10/11 02:07:23 lukem Exp $");
+__RCSID("$NetBSD: globals.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $");
#endif
#endif /* not lint */
@@ -47,7 +47,7 @@ __RCSID("$NetBSD: globals.c,v 1.6 1997/10/11 02:07:23 lukem Exp $");
int WEIGHT = MAXWEIGHT;
int CUMBER = MAXCUMBER;
-char *objdes[NUMOFOBJECTS] = {
+const char *const objdes[NUMOFOBJECTS] = {
"There is a knife here",
"There is an exquisitely crafted sword and scabbard here.",
0, /* can land from here */
@@ -115,7 +115,7 @@ char *objdes[NUMOFOBJECTS] = {
};
-char *objsht[NUMOFOBJECTS] = {
+const char *const objsht[NUMOFOBJECTS] = {
"knife",
"fine sword",
0,
@@ -182,7 +182,7 @@ char *objsht[NUMOFOBJECTS] = {
"diamond block"
};
-char *ouch[NUMOFINJURIES] = {
+const char *const ouch[NUMOFINJURIES] = {
"some minor abrasions",
"some minor lacerations",
"a minor puncture wound",
@@ -198,7 +198,7 @@ char *ouch[NUMOFINJURIES] = {
"a broken neck"
};
-int objwt[NUMOFOBJECTS] = {
+const int objwt[NUMOFOBJECTS] = {
1, 5, 0, 10, 15, 2, 10, 10,
3, 5, 50, 2500, 2, 1, 100, 1,
2, 1, 1, 1, 60, 10, 5, 0,
@@ -209,7 +209,7 @@ int objwt[NUMOFOBJECTS] = {
50, 45, 45, 100, 2000, 30, 20, 10
};
-int objcumber[NUMOFOBJECTS] = {
+const int objcumber[NUMOFOBJECTS] = {
1, 5, 0, 150, 10, 1, 5, 2,
2, 1, 5, 10, 1, 1, 10, 1,
1, 1, 1, 1, 7, 5, 4, 0,
diff --git a/battlestar/init.c b/battlestar/init.c
index a582545f..852b5b04 100644
--- a/battlestar/init.c
+++ b/battlestar/init.c
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.7 1997/10/11 02:07:25 lukem Exp $ */
+/* $NetBSD: init.c,v 1.8 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)init.c 8.4 (Berkeley) 4/30/95";
#else
-__RCSID("$NetBSD: init.c,v 1.7 1997/10/11 02:07:25 lukem Exp $");
+__RCSID("$NetBSD: init.c,v 1.8 1999/02/10 01:36:50 hubertf Exp $");
#endif
#endif /* not lint */
@@ -48,7 +48,7 @@ void
initialize(startup)
char startup;
{
- struct objs *p;
+ const struct objs *p;
puts("Version 4.2, fall 1984.");
puts("First Adventure game written by His Lordship, the honorable");
@@ -83,7 +83,7 @@ getutmp(uname)
strcpy(uname, ptr ? ptr->pw_name : "");
}
-char *list[] = { /* hereditary wizards */
+const char *const list[] = { /* hereditary wizards */
"riggle",
"chris",
"edward",
@@ -94,7 +94,7 @@ char *list[] = { /* hereditary wizards */
0
};
-char *badguys[] = {
+const char *const badguys[] = {
"wnj",
"root",
"ted",
@@ -103,7 +103,7 @@ char *badguys[] = {
int
wizard(uname)
- char *uname;
+ const char *uname;
{
int flag;
@@ -114,9 +114,9 @@ wizard(uname)
int
checkout(uname)
- char *uname;
+ const char *uname;
{
- char **ptr;
+ const char *const *ptr;
for (ptr = list; *ptr; ptr++)
if (strcmp(*ptr, uname) == 0)
diff --git a/battlestar/misc.c b/battlestar/misc.c
index dacba04d..89d636ac 100644
--- a/battlestar/misc.c
+++ b/battlestar/misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.6 1997/10/11 02:07:27 lukem Exp $ */
+/* $NetBSD: misc.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: misc.c,v 1.6 1997/10/11 02:07:27 lukem Exp $");
+__RCSID("$NetBSD: misc.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $");
#endif
#endif /* not lint */
@@ -46,10 +46,10 @@ __RCSID("$NetBSD: misc.c,v 1.6 1997/10/11 02:07:27 lukem Exp $");
int
card(array, size) /* for beenthere, injuries */
- char *array;
+ const char *array;
int size;
{
- char *end = array + size;
+ const char *end = array + size;
int i = 0;
while (array < end)
@@ -60,7 +60,7 @@ card(array, size) /* for beenthere, injuries */
int
ucard(array)
- unsigned int *array;
+ const unsigned int *array;
{
int j = 0, n;
diff --git a/battlestar/nightobjs.c b/battlestar/nightobjs.c
index ffcb4dcb..3c6b8d47 100644
--- a/battlestar/nightobjs.c
+++ b/battlestar/nightobjs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: nightobjs.c,v 1.6 1997/10/11 02:07:31 lukem Exp $ */
+/* $NetBSD: nightobjs.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,13 +38,13 @@
#if 0
static char sccsid[] = "@(#)nightobjs.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: nightobjs.c,v 1.6 1997/10/11 02:07:31 lukem Exp $");
+__RCSID("$NetBSD: nightobjs.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $");
#endif
#endif /* not lint */
#include "extern.h"
-struct objs nightobjs[] = {
+const struct objs nightobjs[] = {
{218, PAJAMAS},
{235, NATIVE},
{92, PAPAYAS},
diff --git a/battlestar/parse.c b/battlestar/parse.c
index ccf5d01b..8d85e6c5 100644
--- a/battlestar/parse.c
+++ b/battlestar/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.6 1997/10/11 02:07:33 lukem Exp $ */
+/* $NetBSD: parse.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)parse.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: parse.c,v 1.6 1997/10/11 02:07:33 lukem Exp $");
+__RCSID("$NetBSD: parse.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $");
#endif
#endif /* not lint */
@@ -55,7 +55,7 @@ wordinit()
int
hash(s)
- char *s;
+ const char *s;
{
int hashval = 0;
@@ -69,7 +69,7 @@ hash(s)
struct wlist *
lookup(s)
- char *s;
+ const char *s;
{
struct wlist *wp;
diff --git a/battlestar/room.c b/battlestar/room.c
index f464982e..8cdabae7 100644
--- a/battlestar/room.c
+++ b/battlestar/room.c
@@ -1,4 +1,4 @@
-/* $NetBSD: room.c,v 1.6 1997/10/11 02:07:35 lukem Exp $ */
+/* $NetBSD: room.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)room.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: room.c,v 1.6 1997/10/11 02:07:35 lukem Exp $");
+__RCSID("$NetBSD: room.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $");
#endif
#endif /* not lint */
@@ -48,7 +48,7 @@ void
writedes()
{
int compass;
- char *p;
+ const char *p;
int c;
printf("\n\t%s\n", location[position].name);
@@ -114,7 +114,7 @@ whichway(here)
}
}
-char *
+const char *
truedirec(way, option)
int way;
char option;