diff rogue4/options.c @ 225:4f6e056438eb

Merge the GCC5 and build fix branches.
author John "Elwin" Edwards
date Wed, 02 Mar 2016 21:28:34 -0500
parents 1b73a8641b37
children 50b89f165a34
line wrap: on
line diff
--- a/rogue4/options.c	Fri Feb 26 17:30:30 2016 -0500
+++ b/rogue4/options.c	Wed Mar 02 21:28:34 2016 -0500
@@ -36,7 +36,10 @@
 
 int allowchange(OPTION *opt);
 
-int	put_bool(), get_bool(), put_str(), get_str();
+void put_bool(bool *b);
+void put_str(char *str);
+int get_bool(bool *bp, WINDOW *win);
+int get_str(char *opt, WINDOW *win);
 
 OPTION	optlist[] = {
     {"terse",	 "Terse output: ",
@@ -63,7 +66,8 @@
  * option:
  *	Print and then set options from the terminal
  */
-option()
+void
+option(void)
 {
     register OPTION	*op;
     register int	retval;
@@ -125,8 +129,8 @@
  * put_bool
  *	Put out a boolean
  */
-put_bool(b)
-bool	*b;
+void
+put_bool(bool *b)
 {
     waddstr(hw, *b ? "True" : "False");
 }
@@ -135,8 +139,8 @@
  * put_str:
  *	Put out a string
  */
-put_str(str)
-char *str;
+void
+put_str(char *str)
 {
     waddstr(hw, str);
 }
@@ -145,9 +149,8 @@
  * get_bool:
  *	Allow changing a boolean option and print it out
  */
-get_bool(bp, win)
-bool *bp;
-WINDOW *win;
+int
+get_bool(bool *bp, WINDOW *win)
 {
     register int oy, ox;
     register bool op_bad;
@@ -196,9 +199,8 @@
  */
 #define MAXINP	50	/* max string to read from terminal or environment */
 
-get_str(opt, win)
-register char *opt;
-WINDOW *win;
+int
+get_str(char *opt, WINDOW *win)
 {
     register char *sp;
     register int c, oy, ox;
@@ -274,9 +276,8 @@
  * get_num:
  *	Get a numeric option
  */
-get_num(opt, win)
-short *opt;
-WINDOW *win;
+int
+get_num(short *opt, WINDOW *win)
 {
     register int i;
     char buf[MAXSTR];
@@ -295,8 +296,8 @@
  *	being "name=....", with the string being defined up to a comma
  *	or the end of the entire option string.
  */
-parse_opts(str)
-register char *str;
+void
+parse_opts(char *str)
 {
     register char *sp;
     register OPTION *op;
@@ -373,9 +374,8 @@
  * strucpy:
  *	Copy string using unctrol for things
  */
-strucpy(s1, s2, len)
-register char *s1, *s2;
-register int len;
+void
+strucpy(char *s1, char *s2, int len)
 {
     if (len > MAXINP)
 	len = MAXINP;