-/* $NetBSD: io.c,v 1.10 2007/12/15 16:32:05 perry Exp $ */
+/* $NetBSD: io.c,v 1.14 2009/08/31 08:27:16 dholland Exp $ */
/*
* io.c - input/output routines for Phantasia
*/
-#include "include.h"
-#undef bool
#include <sys/cdefs.h>
+
+#include <ctype.h>
+#include <math.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+#include "phantdefs.h"
+#include "phantstruct.h"
+#include "phantglobs.h"
+//#include "pathnames.h"
+
+#undef bool
#include <curses.h>
+static void catchalarm(int) __dead;
+
void
-getstring(cp, mx)
- char *cp;
- int mx;
+getstring(char *cp, int mx)
{
char *inptr; /* pointer into string for next string */
int x, y; /* original x, y coordinates on screen */
}
void
-more(where)
- int where;
+more(int where)
{
mvaddstr(where, 0, "-- more --");
getanswer(" ", FALSE);
}
double
-infloat()
+infloat(void)
{
double result; /* return value */
}
int
-inputoption()
+inputoption(void)
{
++Player.p_age; /* increase age */
}
void
-interrupt()
+interrupt(void)
{
char line[81]; /* a place to store data already on screen */
int loop; /* counter */
}
int
-getanswer(choices, def)
- const char *choices;
- phbool def;
+getanswer(const char *choices, phbool def)
{
int ch; /* input */
volatile int loop; /* counter */
return (*choices);
}
-void
-catchalarm(dummy)
- int dummy __attribute__((__unused__));
+static void
+catchalarm(int dummy __unused)
{
longjmp(Timeoenv, 1);
}