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/app/bdsh/cmds/modules/cat/cat.c

    r47b2d7e3 r1433ecda  
    8888                help_cmd_cat(HELP_SHORT);
    8989                printf(
    90                 "Usage:  %s [options] <file1> [file2] [...]\n"
    91                 "Options:\n"
    92                 "  -h, --help       A short option summary\n"
    93                 "  -v, --version    Print version information and exit\n"
    94                 "  -H, --head ##    Print only the first ## bytes\n"
    95                 "  -t, --tail ##    Print only the last ## bytes\n"
    96                 "  -b, --buffer ##  Set the read buffer size to ##\n"
    97                 "  -m, --more       Pause after each screen full\n"
    98                 "  -x, --hex        Print bytes as hex values\n"
    99                 "  -s, --stdin      Treat `-' in file list as standard input\n"
    100                 "  -n, --number     Number all output lines\n"
    101                 "Currently, %s is under development, some options don't work.\n",
    102                 cmdname, cmdname);
     90                    "Usage:  %s [options] <file1> [file2] [...]\n"
     91                    "Options:\n"
     92                    "  -h, --help       A short option summary\n"
     93                    "  -v, --version    Print version information and exit\n"
     94                    "  -H, --head ##    Print only the first ## bytes\n"
     95                    "  -t, --tail ##    Print only the last ## bytes\n"
     96                    "  -b, --buffer ##  Set the read buffer size to ##\n"
     97                    "  -m, --more       Pause after each screen full\n"
     98                    "  -x, --hex        Print bytes as hex values\n"
     99                    "  -s, --stdin      Treat `-' in file list as standard input\n"
     100                    "  -n, --number     Number all output lines\n"
     101                    "Currently, %s is under development, some options don't work.\n",
     102                    cmdname, cmdname);
    103103        }
    104104
     
    108108static void waitprompt(void)
    109109{
    110         console_set_pos(console, 0, console_rows-1);
     110        console_set_pos(console, 0, console_rows - 1);
    111111        console_set_color(console, COLOR_WHITE, COLOR_BLUE, 0);
    112112
    113113        printf("ENTER/SPACE/PAGE DOWN - next page, "
    114                "ESC/Q - quit, C - continue unpaged");
     114            "ESC/Q - quit, C - continue unpaged");
    115115        fflush(stdout);
    116116
     
    265265                        for (i = 0; i < bytes && !should_quit; i++) {
    266266                                if (hex) {
    267                                         paged_char(hexchars[((uint8_t)buff[i])/16]);
    268                                         paged_char(hexchars[((uint8_t)buff[i])%16]);
    269                                         paged_char(((count+i+1) & 0xf) == 0 ? '\n' : ' ');
    270                                 }
    271                                 else {
     267                                        paged_char(hexchars[((uint8_t)buff[i]) / 16]);
     268                                        paged_char(hexchars[((uint8_t)buff[i]) % 16]);
     269                                        paged_char(((count + i + 1) & 0xf) == 0 ? '\n' : ' ');
     270                                } else {
    272271                                        wchar_t c = str_decode(buff, &offset, bytes);
    273272                                        if (c == 0) {
     
    353352                        return CMD_SUCCESS;
    354353                case 'H':
    355                         if (!optarg || str_uint64_t(optarg, NULL, 10, false, &head) != EOK ) {
     354                        if (!optarg || str_uint64_t(optarg, NULL, 10, false, &head) != EOK) {
    356355                                puts("Invalid head size\n");
    357356                                return CMD_FAILURE;
     
    359358                        break;
    360359                case 't':
    361                         if (!optarg || str_uint64_t(optarg, NULL, 10, false, &tail) != EOK ) {
     360                        if (!optarg || str_uint64_t(optarg, NULL, 10, false, &tail) != EOK) {
    362361                                puts("Invalid tail size\n");
    363362                                return CMD_FAILURE;
     
    367366                        break;
    368367                case 'b':
    369                         if (!optarg || str_size_t(optarg, NULL, 10, false, &buffer) != EOK ) {
     368                        if (!optarg || str_size_t(optarg, NULL, 10, false, &buffer) != EOK) {
    370369                                puts("Invalid buffer size\n");
    371370                                return CMD_FAILURE;
     
    391390        if (argc < 1) {
    392391                printf("%s - incorrect number of arguments. Try `%s --help'\n",
    393                         cmdname, cmdname);
     392                    cmdname, cmdname);
    394393                return CMD_FAILURE;
    395394        }
Note: See TracChangeset for help on using the changeset viewer.