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; |
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'; |