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/dist/src/c/demos/edit/search.c

    r3061bc1 ra35b458  
    4848        if (search == NULL)
    4949                return NULL;
    50        
     50
    5151        wchar_t *p = str_to_awstr(pattern);
    5252        if (p == NULL) {
     
    5454                return NULL;
    5555        }
    56        
     56
    5757        search->pattern_length = wstr_length(p);
    58        
     58
    5959        if (reverse) {
    6060                /* Reverse the pattern */
     
    6767                }
    6868        }
    69        
     69
    7070        search->pattern = p;
    71        
     71
    7272        search->client_data = client_data;
    7373        search->ops = ops;
     
    7878                return NULL;
    7979        }
    80        
     80
    8181        search->pattern_pos = 0;
    82        
     82
    8383        search->back_table[0] = -1;
    8484        search->back_table[1] = 0;
     
    100100                }
    101101        }
    102        
     102
    103103        return search;
    104104}
     
    107107{
    108108        search_equals_fn eq = s->ops.equals;
    109        
     109
    110110        wchar_t cur_char;
    111111        errno_t rc = EOK;
     
    128128                }
    129129        }
    130        
     130
    131131        match->end = NULL;
    132132        match->length = 0;
    133        
     133
    134134        return rc;
    135135}
     
    139139        free(search->pattern);
    140140        free(search->back_table);
    141        
     141
    142142}
    143143
Note: See TracChangeset for help on using the changeset viewer.