Lines Matching defs:score
1 /* update-game-score.c --- Update a score file
22 score file. It should be installed setuid, owned by an appropriate
80 fprintf (stdout, "Usage: update-game-score [-m MAX ] [ -r ] game/scorefile SCORE DATA\n");
81 fprintf (stdout, " update-game-score -h\n");
94 long score;
228 lose_syserr ("Couldn't allocate score file");
273 read_score (f, score)
275 struct score_entry *score;
283 score->score *= 10;
284 score->score += (c-48);
295 if (getdelim (&score->username, &count, ' ', f) < 1
296 || score->username == NULL)
299 score->username[strlen (score->username)-1] = '\0';
321 score->username = username;
325 score->data = NULL;
329 if (getline (&score->data, &len, f) < 0)
331 score->data[strlen (score->data)-1] = '\0';
351 score->data = buf;
352 score->data[cur] = '\0';
402 return (sb->score > sa->score) - (sb->score < sa->score);
412 return (sa->score > sb->score) - (sa->score < sb->score);
427 newscores[*count].score = newscore;
466 if (fprintf (f, "%ld %s %s\n", scores[i].score, scores[i].username,
536 /* update-game-score.c ends here */