aboutsummaryrefslogtreecommitdiff
path: root/textproc/wordnet/files/patch-src__wn.c
blob: 79de996ee71dd18d56f9b64931d9f255ee2db64c (plain) (blame)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
--- src/wn.c	Fri May  6 13:29:09 2005
+++ src/wn.c	Wed Dec 21 01:41:13 2005
@@ -8,14 +8,14 @@
 #include <string.h>
 #include <stdlib.h>
 #include "wn.h"
 
-static char *Id = "$Id: wn.c,v 1.13 2005/01/31 19:19:09 wn Rel $";
+__FBSDID("$Id: wn.c,v 1.13 2005/01/31 19:19:09 wn Rel $");
 
 static struct {
-    char *option;		/* user's search request */
+    const char *option;		/* user's search request */
     int search;			/* search to pass findtheinfo() */
     int pos;			/* part-of-speech to pass findtheinfo() */
     int helpmsgidx;		/* index into help message table */
-    char *label;		/* text for search header message */
+    const char *label;		/* text for search header message */
 } *optptr, optlist[] = {
     { "-synsa", SIMPTR,	ADJ, 0, "Similarity" },
@@ -83,7 +84,7 @@
 
 struct {
-    char *template;		/* template for generic search message */
-    char *option;		/* text for help message */
-    char *helpstr;	
+    const char *template;		/* template for generic search message */
+    const char *option;		/* text for help message */
+    const char *helpstr;	
 } searchstr[] = {		/* index by search type type */
     { NULL, NULL, NULL },
@@ -122,11 +123,11 @@
 };
 
-static int getoptidx(char *), cmdopt(char *);
+static int getoptidx(const char *), cmdopt(const char *);
 static int searchwn(int, char *[]);
-static int do_search(char *, int, int, int, char *);
+static int do_search(char *, int, int, int, const char *);
 static int do_is_defined(char *);
 static void printusage(), printlicense(),
-       printsearches(char *, int, unsigned long);
-static int error_message(char *);
+       printsearches(const char *, int, unsigned long);
+static int error_message(const char *);
 
 main(int argc,char *argv[])
@@ -214,9 +215,10 @@
 }
 
-static int do_search(char *searchword, int pos, int search, int whichsense,
-		     char *label)
+static int
+do_search(char *searchword, int pos, int search, int whichsense,
+    const char *label)
 {
     int totsenses = 0;
-    char *morphword, *outbuf;
+    const char *morphword, *outbuf;
 
     outbuf = findtheinfo(searchword, pos, search, whichsense);
@@ -242,5 +244,5 @@
     int i, found = 0;
     unsigned int search;
-    char *morphword;
+    const char *morphword;
 
     if (searchword[0] == '-') {
@@ -274,5 +276,6 @@
 }
 
-static void printsearches(char *word, int dbase, unsigned long search)
+static void
+printsearches(const char *word, int dbase, unsigned long search)
 {
     int j;
@@ -316,5 +319,6 @@
 }
 
-static int cmdopt(char *str)
+static int
+cmdopt(const char *str)
 {
 
@@ -332,5 +336,6 @@
 }
 
-static int getoptidx(char *searchtype)
+static int
+getoptidx(const char *searchtype)
 {
     int i;
@@ -343,5 +348,6 @@
 }
 
-static int error_message(char *msg)
+static int
+error_message(const char *msg)
 {
     fprintf(stderr, msg);