Changeset 1b20da0 in mainline for uspace/app/bdsh


Ignore:
Timestamp:
2018-02-28T17:52:03Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3061bc1
Parents:
df6ded8
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
Message:

style: Remove trailing whitespace on non-empty lines, in certain file types.

Command used: tools/srepl '\([^[:space:]]\)\s\+$' '\1' -- *.c *.h *.py *.sh *.s *.S *.ag

Location:
uspace/app/bdsh
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/cp/cp.c

    rdf6ded8 r1b20da0  
    231231                        /* e.g. cp file_name existing_file */
    232232
    233                         /* dest already exists, 
     233                        /* dest already exists,
    234234                         * if force is set we will try to remove it.
    235235                         * if interactive is set user input is required.
     
    414414                vfs_put(fd1);
    415415                vfs_put(fd2);
    416                 return -1;     
     416                return -1;
    417417        }
    418418
     
    486486        for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) {
    487487                c = getopt_long(argc, argv, "hvVfirb:", long_options, &opt_ind);
    488                 switch (c) { 
     488                switch (c) {
    489489                case 'h':
    490490                        help_cmd_cp(1);
  • uspace/app/bdsh/cmds/modules/ls/ls.c

    rdf6ded8 r1b20da0  
    129129 *                              0 otherwise.
    130130 */
    131 static signed int ls_scan_dir(const char *d, DIR *dirp, 
     131static signed int ls_scan_dir(const char *d, DIR *dirp,
    132132    struct dir_elem_t **dir_list_ptr)
    133133{
     
    198198        /* Populate the directory list. */
    199199        if (ls.recursive) {
    200                 tmp = (struct dir_elem_t *) realloc(*dir_list_ptr, 
     200                tmp = (struct dir_elem_t *) realloc(*dir_list_ptr,
    201201                    nbdirs * sizeof(struct dir_elem_t));
    202202                if (!tmp) {
    203203                        cli_error(CL_ENOMEM, "ls: failed to scan %s", d);
    204204                        goto out;
    205                 } 
     205                }
    206206                *dir_list_ptr = tmp;
    207207
     
    253253        }
    254254
    255         nbdirs = ls_scan_dir(path, dirp, &dir_list); 
     255        nbdirs = ls_scan_dir(path, dirp, &dir_list);
    256256        if (nbdirs == -1) {
    257257                ret = CMD_FAILURE;
     
    292292                        ret = CMD_FAILURE;
    293293                        goto out;
    294                 }       
     294                }
    295295        }
    296296   
    297         ret = CMD_SUCCESS; 
     297        ret = CMD_SUCCESS;
    298298
    299299out:
     
    405405                if (ls.recursive)
    406406                        ret = ls_recursive(de.name, dirp);
    407                 else 
     407                else
    408408                        ret = ls_scan_dir(de.name, dirp, NULL);
    409409
  • uspace/app/bdsh/cmds/modules/printf/printf.c

    rdf6ded8 r1b20da0  
    6060
    6161/** Print a formatted data with lib printf.
    62  * 
     62 *
    6363 * Currently available format flags are:
    6464 * '%d' - integer.
    6565 * '%u' - unsigned integer.
    6666 * '%s' - null-terminated string.
    67  ***** 
     67 *****
    6868 * @param ch  formatted flag.
    6969 * @param arg string with data to print.
     
    8888
    8989/** Process a control character.
    90  * 
     90 *
    9191 * Currently available characters are:
    9292 * '\n' - new line.
    93  ***** 
     93 *****
    9494 * @param ch  Control character.
    9595 */
     
    107107
    108108
    109 /** Prints formatted data. 
     109/** Prints formatted data.
    110110 *
    111111 * Accepted format flags:
     
    143143
    144144                case '\\':
    145                         if (esc_flag) 
     145                        if (esc_flag)
    146146                                goto emit;
    147147                        esc_flag = true;
     
    149149
    150150                case '%':
    151                         if (esc_flag) 
     151                        if (esc_flag)
    152152                                goto emit;
    153153                        ch = str_decode(fmt, &pos, fmt_sz);
    154                         if (!ch) { 
     154                        if (!ch) {
    155155                                putchar('%');
    156156                                break;
     
    170170                                break;
    171171                        }
    172                         putchar(ch);   
     172                        putchar(ch);
    173173                        break;
    174174
     
    177177                        esc_flag = false;
    178178                }
    179         }       
     179        }
    180180
    181181        return CMD_SUCCESS;
  • uspace/app/bdsh/cmds/modules/sleep/sleep.c

    rdf6ded8 r1b20da0  
    9292
    9393                int ndigits = endptr - nptr;
    94                 for (; ndigits < 6; ndigits++) 
     94                for (; ndigits < 6; ndigits++)
    9595                        frac_seconds *= 10;
    9696                for (; ndigits > 6; ndigits--)
  • uspace/app/bdsh/input.c

    rdf6ded8 r1b20da0  
    107107        /* Until full support for pipes is implemented, allow for a simple case:
    108108         * [from <file> |] command [| to <file>]
    109          * 
     109         *
    110110         * First find the pipes and check that there are no more
    111111         */
  • uspace/app/bdsh/tok.c

    rdf6ded8 r1b20da0  
    4545
    4646/** Initialize the token parser
    47  * 
     47 *
    4848 * @param tok the tokenizer structure to initialize
    4949 * @param input the input string to tokenize
     
    5353errno_t tok_init(tokenizer_t *tok, char *input, token_t *out_tokens,
    5454    size_t max_tokens)
    55 {       
     55{
    5656        tok->in = input;
    5757        tok->in_offset = 0;
Note: See TracChangeset for help on using the changeset viewer.