aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hashtab.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hashtab.c b/hashtab.c
index ea097ad..be5e3d3 100644
--- a/hashtab.c
+++ b/hashtab.c
@@ -134,7 +134,7 @@ hash_free(struct hash_tab *ht)
134 } 134 }
135} 135}
136 136
137int 137static int
138getword(FILE *fp, char *buf, int size, int first(int), int rest(int)) 138getword(FILE *fp, char *buf, int size, int first(int), int rest(int))
139{ 139{
140 int i = 0, c; 140 int i = 0, c;
@@ -163,19 +163,19 @@ getword(FILE *fp, char *buf, int size, int first(int), int rest(int))
163 return c > 0; 163 return c > 0;
164} 164}
165 165
166int 166static int
167first(int c) 167first(int c)
168{ 168{
169 return isalpha(c); 169 return isalpha(c);
170} 170}
171 171
172int 172static int
173rest(int c) 173rest(int c)
174{ 174{
175 return isalpha(c) || c == '_'; 175 return isalpha(c) || c == '_';
176} 176}
177 177
178void 178static void
179print(const char *key, T data, void *cl) 179print(const char *key, T data, void *cl)
180{ 180{
181 fprintf(cl, "%s: %d\n", key, data); 181 fprintf(cl, "%s: %d\n", key, data);
@@ -190,7 +190,7 @@ main()
190 hash_init(ht); 190 hash_init(ht);
191 191
192 while ( getword(stdin, word, sizeof word, first, rest) ) { 192 while ( getword(stdin, word, sizeof word, first, rest) ) {
193 int *p = hash_lookup(ht, word, 0, 1); 193 T *p = hash_lookup(ht, word, 0, 1);
194 if ( p != NULL ) 194 if ( p != NULL )
195 ++(*p); 195 ++(*p);
196 } 196 }