Subversion Repositories HelenOS

Rev

Rev 4258 | Rev 4266 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4258 Rev 4264
Line 287... Line 287...
287
/*   * Otherwise add new score at end (there is always room). */
287
/*   * Otherwise add new score at end (there is always room). */
288
/*   *\/ */
288
/*   *\/ */
289
/*  change = 0; */
289
/*  change = 0; */
290
/*  me = thisuser(); */
290
/*  me = thisuser(); */
291
/*  for (i = 0, sp = &scores[0]; i < nscores; i++, sp++) { */
291
/*  for (i = 0, sp = &scores[0]; i < nscores; i++, sp++) { */
292
/*      if (sp->hs_level != level || strcmp(sp->hs_name, me) != 0) */
292
/*      if (sp->hs_level != level || str_cmp(sp->hs_name, me) != 0) */
293
/*          continue; */
293
/*          continue; */
294
/*      if (score > sp->hs_score) { */
294
/*      if (score > sp->hs_score) { */
295
/*          (void)printf("%s bettered %s %d score of %d!\n", */
295
/*          (void)printf("%s bettered %s %d score of %d!\n", */
296
/*              "\nYou", "your old level", level, */
296
/*              "\nYou", "your old level", level, */
297
/*              sp->hs_score * sp->hs_level); */
297
/*              sp->hs_score * sp->hs_level); */
Line 415... Line 415...
415
/*  for (i = 0, sp = hs; i < num;) { */
415
/*  for (i = 0, sp = hs; i < num;) { */
416
/*      /\* */
416
/*      /\* */
417
/*       * This is O(n^2), but do you think we care? */
417
/*       * This is O(n^2), but do you think we care? */
418
/*       *\/ */
418
/*       *\/ */
419
/*      for (j = 0, pu = count; j < numnames; j++, pu++) */
419
/*      for (j = 0, pu = count; j < numnames; j++, pu++) */
420
/*          if (strcmp(sp->hs_name, pu->name) == 0) */
420
/*          if (str_cmp(sp->hs_name, pu->name) == 0) */
421
/*              break; */
421
/*              break; */
422
/*      if (j == numnames) { */
422
/*      if (j == numnames) { */
423
/*          /\* */
423
/*          /\* */
424
/*           * Add new user, set per-user count to 1. */
424
/*           * Add new user, set per-user count to 1. */
425
/*           *\/ */
425
/*           *\/ */
Line 552... Line 552...
552
/*       * we only get one score per level. */
552
/*       * we only get one score per level. */
553
/*       *\/ */
553
/*       *\/ */
554
/*      if (me != NULL && */
554
/*      if (me != NULL && */
555
/*          sp->hs_level == level && */
555
/*          sp->hs_level == level && */
556
/*          sp->hs_score == score && */
556
/*          sp->hs_score == score && */
557
/*          strcmp(sp->hs_name, me) == 0) { */
557
/*          str_cmp(sp->hs_name, me) == 0) { */
558
/*          putpad(SOstr); */
558
/*          putpad(SOstr); */
559
/*          highlight = 1; */
559
/*          highlight = 1; */
560
/*      } */
560
/*      } */
561
/*      (void)printf("%s", buf); */
561
/*      (void)printf("%s", buf); */
562
/*      if (highlight) { */
562
/*      if (highlight) { */