- read(rawscores, &oldbest, sizeof(short));
- if (flag) return (score > oldbest ? 1 : 0);
-
- /* Update this jokers best */
- if (score > oldbest) {
- lseek(rawscores, ((long)uid)*sizeof(short), 0);
- write(rawscores, &score, sizeof(short));
- pr("You bettered your previous best of $%d\n", oldbest);
- } else
- pr("Your best to date is $%d\n", oldbest);
-
- /* See if we have a new champ */
- p = getpwuid(allbwho);
- if (p == NULL || score > allbscore) {
- lseek(rawscores, (long)0, 0);
- write(rawscores, &score, sizeof(short));
- write(rawscores, &uid, sizeof(short));
- if (p != NULL)
- pr("You beat %s's old record of $%d!\n",
- p->pw_name, allbscore);
- else
- pr("You set a new record!\n");
- } else
- pr("The highest is %s with $%d\n",
+ write(rawscores, &score, sizeof(short));
+ pr("You bettered your previous best of $%d\n", oldbest);
+ } else
+ pr("Your best to date is $%d\n", oldbest);
+
+ /* See if we have a new champ */
+ p = getpwuid(allbwho);
+ if (p == NULL || score > allbscore) {
+ lseek(rawscores, (long)0, 0);
+ write(rawscores, &score, sizeof(short));
+ write(rawscores, &uid, sizeof(short));
+ if (allbwho)
+ pr("You beat %s's old record of $%d!\n",