summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/trek/utility.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/games/trek/utility.c b/games/trek/utility.c
index e1835a1..478c74f 100644
--- a/games/trek/utility.c
+++ b/games/trek/utility.c
@@ -42,6 +42,8 @@ static const char rcsid[] =
/*
** ASSORTED UTILITY ROUTINES
*/
+#include <stdio.h>
+#include <varargs.h>
/*
** BLOCK MOVE
@@ -141,14 +143,19 @@ char *s;
** SYSTEM ERROR
*/
-syserr(p0, p1, p2, p3, p4, p5)
+syserr(fmt, va_alist)
+const char *fmt;
+va_dcl
{
+ va_list ap;
extern int errno;
+ va_start(ap);
printf("\n\07TREK SYSERR: ");
- printf(p0, p1, p2, p3, p4, p5);
+ vfprintf(stdout, fmt, ap);
printf("\n");
if (errno)
printf("\tsystem error %d\n", errno);
+ va_end(ap);
exit(1);
}
OpenPOWER on IntegriCloud