summaryrefslogtreecommitdiff
path: root/games/agm/patches/patch-wordfuncs.c
blob: f78e69919b08edda34be9947bff9539699053bb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
$NetBSD: patch-wordfuncs.c,v 1.1 2016/07/27 20:37:27 kamil Exp $

Fix K&R code.

--- wordfuncs.c.orig	2016-07-27 20:12:55.365038920 +0000
+++ wordfuncs.c
@@ -14,9 +14,9 @@ char wordfuncs_RCSid[] = "Revision: 1.2 
 
 #include "agm.h"
 
-int contains (word, subword, length)
-    char *word, *subword;
-    unsigned int *length;
+#include <stdlib.h>
+
+int contains (char *word, char *subword, unsigned int *length)
 {
   char copyword[WORDLEN];
   char *cpos, *sloop;
@@ -36,8 +36,7 @@ int contains (word, subword, length)
   return TRUE;
 }
 
-int eliminate (word, subword, remains)
-    char *word, *subword, *remains;
+int eliminate (char *word, char *subword, char *remains)
 {
   char copyword[WORDLEN];
   char *remloop = remains, *copyloop = copyword;
@@ -55,8 +54,8 @@ int eliminate (word, subword, remains)
   *remloop = '\0';
 }
 
-minus_process (word, command)
-    char *word, *command;
+void
+minus_process (char *word, char *command)
 {
   char *minus_pos, copy[WORDLEN];
   unsigned int dummy;
@@ -78,9 +77,7 @@ minus_process (word, command)
   }
 }
 
-void copysmall (s1, s2)
-  char
-      *s1, *s2;
+void copysmall (char *s1, char *s2)
 {
   while (*s2 != '\0') {
     if (*s2 >= 'A' && *s2 <= 'Z') {