/[emacs]/emacs/lib-src/update-game-score.c
ViewVC logotype

Diff of /emacs/lib-src/update-game-score.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by walters, Wed Apr 10 19:10:23 2002 UTC revision 1.6 by schwab, Sun Apr 14 01:02:36 2002 UTC
# Line 249  read_score(FILE *f, struct score_entry * Line 249  read_score(FILE *f, struct score_entry *
249    ungetc(c, f);    ungetc(c, f);
250  #ifdef HAVE_GETDELIM  #ifdef HAVE_GETDELIM
251    {    {
252      int count = 0;      size_t count = 0;
253      if (getdelim(&score->username, &count, ' ', f) < 1      if (getdelim(&score->username, &count, ' ', f) < 1
254          || score->username == NULL)          || score->username == NULL)
255        return -1;        return -1;
# Line 279  read_score(FILE *f, struct score_entry * Line 279  read_score(FILE *f, struct score_entry *
279  #endif  #endif
280  #ifdef HAVE_GETLINE  #ifdef HAVE_GETLINE
281    score->data = NULL;    score->data = NULL;
282    errno = ESUCCES;    errno = 0;
283    {    {
284      int len;      size_t len;
285      if (getline(&score->data, &len, f) < 0)      if (getline(&score->data, &len, f) < 0)
286        return -1;        return -1;
287      score->data[strlen(score->data)-1] = '\0';      score->data[strlen(score->data)-1] = '\0';

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26