Mercurial > emacs
comparison lib-src/update-game-score.c @ 44566:7a0ad319b38f
(read_score): Fix type of second parameter
of getdelim to be of type size_t instead of int. Use 0 instead of
ESUCCES.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Sun, 14 Apr 2002 01:02:36 +0000 |
parents | a0dc261f564a |
children | 90866353c7bd |
comparison
equal
deleted
inserted
replaced
44565:9bdd94e7a205 | 44566:7a0ad319b38f |
---|---|
247 if (c == EOF) | 247 if (c == EOF) |
248 return -1; | 248 return -1; |
249 ungetc(c, f); | 249 ungetc(c, f); |
250 #ifdef HAVE_GETDELIM | 250 #ifdef HAVE_GETDELIM |
251 { | 251 { |
252 int count = 0; | 252 size_t count = 0; |
253 if (getdelim(&score->username, &count, ' ', f) < 1 | 253 if (getdelim(&score->username, &count, ' ', f) < 1 |
254 || score->username == NULL) | 254 || score->username == NULL) |
255 return -1; | 255 return -1; |
256 } | 256 } |
257 #else | 257 #else |
277 score->username = username; | 277 score->username = username; |
278 } | 278 } |
279 #endif | 279 #endif |
280 #ifdef HAVE_GETLINE | 280 #ifdef HAVE_GETLINE |
281 score->data = NULL; | 281 score->data = NULL; |
282 errno = ESUCCES; | 282 errno = 0; |
283 { | 283 { |
284 int len; | 284 size_t len; |
285 if (getline(&score->data, &len, f) < 0) | 285 if (getline(&score->data, &len, f) < 0) |
286 return -1; | 286 return -1; |
287 score->data[strlen(score->data)-1] = '\0'; | 287 score->data[strlen(score->data)-1] = '\0'; |
288 } | 288 } |
289 #else | 289 #else |