summaryrefslogtreecommitdiffstats
path: root/larn/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'larn/main.c')
-rw-r--r--larn/main.c60
1 files changed, 25 insertions, 35 deletions
diff --git a/larn/main.c b/larn/main.c
index b74d1fac..1b442d6d 100644
--- a/larn/main.c
+++ b/larn/main.c
@@ -1,9 +1,9 @@
-/* $NetBSD: main.c,v 1.24 2009/08/12 08:04:05 dholland Exp $ */
+/* $NetBSD: main.c,v 1.25 2012/06/19 05:30:43 dholland Exp $ */
/* main.c */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.24 2009/08/12 08:04:05 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.25 2012/06/19 05:30:43 dholland Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -75,9 +75,7 @@ static char *termtypes[] = {"vt100", "vt101", "vt102", "vt103", "vt125",
************
*/
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
int i;
int hard;
@@ -330,7 +328,7 @@ main(argc, argv)
show character's inventory
*/
static void
-showstr()
+showstr(void)
{
int i, number;
for (number = 3, i = 0; i < 26; i++)
@@ -342,7 +340,7 @@ showstr()
}
void
-qshowstr()
+qshowstr(void)
{
int i, j, k, sigsav;
srcount = 0;
@@ -369,8 +367,7 @@ qshowstr()
* subroutine to clear screen depending on # lines to display
*/
static void
-t_setup(count)
- int count;
+t_setup(int count)
{
if (count < 20) { /* how do we clear the screen? */
cl_up(79, count);
@@ -385,8 +382,7 @@ t_setup(count)
* subroutine to restore normal display screen depending on t_setup()
*/
static void
-t_endup(count)
- int count;
+t_endup(int count)
{
if (count < 18) /* how did we clear the screen? */
draws(0, MAXX, 0, (count > MAXY) ? MAXY : count);
@@ -400,7 +396,7 @@ t_endup(count)
function to show the things player is wearing only
*/
static void
-showwear()
+showwear(void)
{
int i, j, sigsav, count;
sigsav = nosignal;
@@ -449,7 +445,7 @@ showwear()
function to show the things player can wield only
*/
static void
-showwield()
+showwield(void)
{
int i, j, sigsav, count;
sigsav = nosignal;
@@ -507,7 +503,7 @@ showwield()
* function to show the things player can read only
*/
static void
-showread()
+showread(void)
{
int i, j, sigsav, count;
sigsav = nosignal;
@@ -539,7 +535,7 @@ showread()
* function to show the things player can eat only
*/
static void
-showeat()
+showeat(void)
{
int i, j, sigsav, count;
sigsav = nosignal;
@@ -569,7 +565,7 @@ showeat()
function to show the things player can quaff only
*/
static void
-showquaff()
+showquaff(void)
{
int i, j, sigsav, count;
sigsav = nosignal;
@@ -596,9 +592,7 @@ showquaff()
}
static void
-show1(idx, str2)
- int idx;
- const char *str2[];
+show1(int idx, const char *str2[])
{
lprintf("\n%c) %s", idx + 'a', objectname[iven[idx]]);
if (str2 != 0 && str2[ivenarg[idx]][0] != 0)
@@ -653,7 +647,7 @@ show3(int indx)
subroutine to randomly create monsters if needed
*/
static void
-randmonst()
+randmonst(void)
{
if (c[TIMESTOP])
return; /* don't make monsters if time is stopped */
@@ -671,7 +665,7 @@ randmonst()
get and execute a command
*/
static void
-parse()
+parse(void)
{
int i, j, k, flag;
while (1) {
@@ -980,7 +974,7 @@ parse()
}
void
-parse2()
+parse2(void)
{
if (c[HASTEMONST])
movemonst();
@@ -990,8 +984,7 @@ parse2()
}
static void
-run(dir)
- int dir;
+run(int dir)
{
int i;
i = 1;
@@ -1015,7 +1008,7 @@ run(dir)
function to wield a weapon
*/
static void
-wield()
+wield(void)
{
int i;
while (1) {
@@ -1053,15 +1046,13 @@ wield()
common routine to say you don't have an item
*/
static void
-ydhi(x)
- int x;
+ydhi(int x)
{
cursors();
lprintf("\nYou don't have item %c!", x);
}
static void
-ycwi(x)
- int x;
+ycwi(int x)
{
cursors();
lprintf("\nYou can't wield item %c!", x);
@@ -1071,7 +1062,7 @@ ycwi(x)
function to wear armor
*/
static void
-wear()
+wear(void)
{
int i;
while (1) {
@@ -1123,7 +1114,7 @@ wear()
function to drop an object
*/
static void
-dropobj()
+dropobj(void)
{
int i;
unsigned char *p;
@@ -1187,7 +1178,7 @@ dropobj()
* readscr() Subroutine to read a scroll one is carrying
*/
static void
-readscr()
+readscr(void)
{
int i;
while (1) {
@@ -1260,7 +1251,7 @@ eatcookie(void)
* subroutine to quaff a potion one is carrying
*/
static void
-quaff()
+quaff(void)
{
int i;
while (1) {
@@ -1308,8 +1299,7 @@ whatitem(const char *str)
and allow * to mean return amt, else return the number entered
*/
unsigned long
-readnum(mx)
- long mx;
+readnum(long mx)
{
int i;
unsigned long amt = 0;