Ignore:
Timestamp:
2018-04-04T15:42:37Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

File:
1 edited

Legend:

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

    r47b2d7e3 r1433ecda  
    5252
    5353static volatile const char copyright[] =
    54         "@(#) Copyright (c) 1992, 1993\n"
    55         "\tThe Regents of the University of California.  All rights reserved.\n";
     54    "@(#) Copyright (c) 1992, 1993\n"
     55    "\tThe Regents of the University of California.  All rights reserved.\n";
    5656
    5757#include <sys/time.h>
     
    122122                                /* This row is to be elided */
    123123                                rows++;
    124                                 memset(&board[base], 0, sizeof(cell) * (B_COLS - 2));
     124                                memset(&board[base], 0, sizeof(cell) *(B_COLS - 2));
    125125
    126126                                scr_update();
     
    185185        printf("Level = %d (press keys 1 - 9 to change)", level);
    186186        moveto(9, 10);
    187         printf("Preview is %s (press 'p' to change)", (showpreview ? "on ": "off"));
     187        printf("Preview is %s (press 'p' to change)", (showpreview ? "on " : "off"));
    188188        moveto(12, 10);
    189189        printf("Press 'h' to show hiscore table.");
     
    204204                int i = getchar();
    205205
    206                 switch(i) {
    207                         case 'p':
    208                                 showpreview = !showpreview;
    209                                 moveto(9, 21);
    210                                 if (showpreview)
    211                                         printf("on ");
    212                                 else
    213                                         printf("off");
    214                                 break;
    215                         case 'h':
    216                                 loadscores();
    217                                 showscores(firstgame);
    218                                 tetris_menu_draw(*level);
    219                                 break;
    220                         case 's':
    221                                 firstgame = 0;
    222                                 return 1;
    223                         case 'q':
    224                                 return 0;
    225                         case '1':
    226                         case '2':
    227                         case '3':
    228                         case '4':
    229                         case '5':
    230                         case '6':
    231                         case '7':
    232                         case '8':
    233                         case '9':
    234                                 *level = i - '0';
    235                                 moveto(8, 18);
    236                                 printf("%d", *level);
    237                                 break;
     206                switch (i) {
     207                case 'p':
     208                        showpreview = !showpreview;
     209                        moveto(9, 21);
     210                        if (showpreview)
     211                                printf("on ");
     212                        else
     213                                printf("off");
     214                        break;
     215                case 'h':
     216                        loadscores();
     217                        showscores(firstgame);
     218                        tetris_menu_draw(*level);
     219                        break;
     220                case 's':
     221                        firstgame = 0;
     222                        return 1;
     223                case 'q':
     224                        return 0;
     225                case '1':
     226                case '2':
     227                case '3':
     228                case '4':
     229                case '5':
     230                case '6':
     231                case '7':
     232                case '8':
     233                case '9':
     234                        *level = i - '0';
     235                        moveto(8, 18);
     236                        printf("%d", *level);
     237                        break;
    238238                }
    239239        }
     
    259259
    260260        while ((ch = getopt(argc, argv, "ck:ps")) != -1)
    261                 switch(ch) {
     261                switch (ch) {
    262262                case 'c':
    263263                        /*
Note: See TracChangeset for help on using the changeset viewer.