Ignore:
Timestamp:
2018-03-02T20:34:50Z (8 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/dist/src/c/demos/tetris/scores.c

    r3061bc1 r8565a42  
    9999{
    100100        int i;
    101        
     101
    102102        clear_screen();
    103103        moveto(10, 0);
    104104        printf("\tRank \tLevel \tName\t                     points\n");
    105105        printf("\t========================================================\n");
    106        
     106
    107107        for (i = 0; i < NUMSPOTS - 1; i++)
    108108                printf("\t%6d %6d %-16s %20d\n",
    109109                    i + 1, scores[i].hs_level, scores[i].hs_name, scores[i].hs_score);
    110        
     110
    111111        if (!firstgame) {
    112112                printf("\t========================================================\n");
     
    114114                    scores[NUMSPOTS - 1].hs_level, scores[NUMSPOTS - 1].hs_name, scores[NUMSPOTS - 1].hs_score);
    115115        }
    116        
     116
    117117        printf("\n\n\n\n\tPress any key to return to main menu.");
    118118        getchar();
     
    126126        cons_event_t ev;
    127127        kbd_event_t *kev;
    128        
     128
    129129        clear_screen();
    130130        moveto(10, 10);
     
    134134        i = 6;
    135135        off = 6;
    136        
     136
    137137        moveto(10 , 28);
    138138        printf("%s%.*s", scores[NUMSPOTS - 1].hs_name, MAXLOGNAME-i,
    139139            "........................................");
    140        
     140
    141141        while (1) {
    142142                console_flush(console);
    143143                if (!console_get_event(console, &ev))
    144144                        exit(1);
    145                
     145
    146146                if (ev.type != CEV_KEY || ev.ev.key.type == KEY_RELEASE)
    147147                        continue;
    148                
     148
    149149                kev = &ev.ev.key;
    150                
     150
    151151                if (kev->key == KC_ENTER || kev->key == KC_NENTER)
    152152                        break;
    153                
     153
    154154                if (kev->key == KC_BACKSPACE) {
    155155                        if (i > 0) {
    156156                                wchar_t uc;
    157                                
     157
    158158                                --i;
    159159                                while (off > 0) {
     
    165165                                                break;
    166166                                }
    167                                
     167
    168168                                scores[NUMSPOTS - 1].hs_name[off] = '\0';
    169169                        }
     
    177177                        }
    178178                }
    179                
     179
    180180                moveto(10, 28);
    181181                printf("%s%.*s", scores[NUMSPOTS - 1].hs_name, MAXLOGNAME - i,
    182182                    "........................................");
    183183        }
    184        
     184
    185185        scores[NUMSPOTS - 1].hs_score = score;
    186186        scores[NUMSPOTS - 1].hs_level = level;
    187        
     187
    188188        i = NUMSPOTS - 1;
    189189        while ((i > 0) && (scores[i - 1].hs_score < score))
    190190                i--;
    191        
     191
    192192        for (j = NUMSPOTS - 2; j > i; j--)
    193193                copyhiscore(j, j-1);
    194        
     194
    195195        copyhiscore(i, NUMSPOTS - 1);
    196196}
     
    236236                return;
    237237        }
    238        
     238
    239239        cnt = fwrite(scores, sizeof(struct highscore), NUMSPOTS, f);
    240240        rc = fclose(f);
Note: See TracChangeset for help on using the changeset viewer.