Changeset a35b458 in mainline for uspace/app/blkdump/blkdump.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 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:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/blkdump/blkdump.c

    r3061bc1 ra35b458  
    7272        aoff64_t dev_nblocks;
    7373        bool toc = false;
    74        
     74
    7575        if (argc < 2) {
    7676                printf(NAME ": Error, argument missing.\n");
     
    9191                relative = true;
    9292        }
    93        
     93
    9494        if (str_cmp(*argv, "--offset") == 0) {
    9595                --argc; ++argv;
     
    109109                --argc; ++argv;
    110110        }
    111        
     111
    112112        if (str_cmp(*argv, "--count") == 0) {
    113113                --argc; ++argv;
     
    241241        size_t pos;
    242242        uint8_t b;
    243        
     243
    244244        if (length > bytes_per_row) {
    245245                length = bytes_per_row;
    246246        }
    247        
     247
    248248        /* Print hexadecimal values */
    249249        for (pos = 0; pos < length; pos++) {
     
    253253                printf("%02hhX ", data[pos]);
    254254        }
    255        
     255
    256256        /* Pad with spaces if we have less than 16 bytes */
    257257        for (pos = length; pos < bytes_per_row; pos++) {
     
    261261                printf("   ");
    262262        }
    263        
     263
    264264        /* Print printable characters */
    265265        for (pos = 0; pos < length; pos++) {
Note: See TracChangeset for help on using the changeset viewer.