Changeset 8565a42 in mainline for uspace/app/edit


Ignore:
Timestamp:
2018-03-02T20:34:50Z (8 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

Location:
uspace/app/edit
Files:
3 edited

Legend:

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

    r3061bc1 r8565a42  
    8989         */
    9090        int ideal_column;
    91        
     91
    9292        char *previous_search;
    9393        bool previous_search_reverse;
     
    533533                pane.rflags |= REDRAW_TEXT;
    534534        }
    535        
     535
    536536        if (update_ideal_column)
    537537                pane.ideal_column = c_new.column;
    538        
     538
    539539        caret_update();
    540540}
     
    609609        const char *old_fname = (doc.file_name != NULL) ? doc.file_name : "";
    610610        char *fname;
    611        
     611
    612612        fname = prompt("Save As", old_fname);
    613613        if (fname == NULL) {
     
    816816
    817817        /* Clear the remaining rows if file is short. */
    818        
     818
    819819        int i;
    820820        sysarg_t j;
     
    906906                                console_flush(con);
    907907                        }
    908        
     908
    909909                        if ((csel_end.row == rbc.row) && (csel_end.column == s_column)) {
    910910                                console_flush(con);
     
    912912                                console_flush(con);
    913913                        }
    914        
     914
    915915                        c = str_decode(row_buf, &pos, size);
    916916                        if (c != '\t') {
     
    12181218        coord.row = row;
    12191219        coord.column = column;
    1220        
     1220
    12211221        spt_t pt;
    12221222        sheet_get_cell_pt(doc.sh, &coord, align_dir, &pt);
    1223        
     1223
    12241224        caret_move(pt, select, true);
    12251225}
     
    12631263{
    12641264        char *sline;
    1265        
     1265
    12661266        sline = prompt("Go to line", "");
    12671267        if (sline == NULL) {
     
    12691269                return;
    12701270        }
    1271        
     1271
    12721272        char *endptr;
    12731273        int line = strtol(sline, &endptr, 10);
     
    12781278        }
    12791279        free(sline);
    1280        
     1280
    12811281        caret_move_absolute(line, pane.ideal_column, dir_before, false);
    12821282}
     
    13371337{
    13381338        char *pattern;
    1339        
     1339
    13401340        const char *prompt_text = "Find next";
    13411341        if (reverse)
    13421342                prompt_text = "Find previous";
    1343        
     1343
    13441344        const char *default_value = "";
    13451345        if (pane.previous_search)
    13461346                default_value = pane.previous_search;
    1347        
     1347
    13481348        pattern = prompt(prompt_text, default_value);
    13491349        if (pattern == NULL) {
     
    13511351                return;
    13521352        }
    1353        
     1353
    13541354        if (pane.previous_search)
    13551355                free(pane.previous_search);
    13561356        pane.previous_search = pattern;
    13571357        pane.previous_search_reverse = reverse;
    1358        
     1358
    13591359        search(pattern, reverse);
    13601360}
     
    13661366                return;
    13671367        }
    1368        
     1368
    13691369        search(pane.previous_search, pane.previous_search_reverse);
    13701370}
     
    13731373{
    13741374        status_display("Searching...");
    1375        
     1375
    13761376        spt_t sp, producer_pos;
    13771377        tag_get_pt(&pane.caret_pos, &sp);
    1378        
     1378
    13791379        /* Start searching on the position before/after caret */
    13801380        if (!reverse) {
     
    13851385        }
    13861386        producer_pos = sp;
    1387        
     1387
    13881388        search_ops_t ops = search_spt_ops;
    13891389        if (reverse)
    13901390                ops = search_spt_reverse_ops;
    1391        
     1391
    13921392        search_t *search = search_init(pattern, &producer_pos, ops, reverse);
    13931393        if (search == NULL) {
     
    13951395                return;
    13961396        }
    1397        
     1397
    13981398        match_t match;
    13991399        errno_t rc = search_next_match(search, &match);
     
    14021402                search_fini(search);
    14031403        }
    1404        
     1404
    14051405        if (match.end) {
    14061406                status_display("Match found.");
     
    14231423                status_display("Not found.");
    14241424        }
    1425        
     1425
    14261426        search_fini(search);
    14271427}
     
    17161716        console_set_pos(con, 0, scr_rows - 1);
    17171717        console_set_style(con, STYLE_INVERTED);
    1718        
     1718
    17191719        int pos = -(scr_columns - 3);
    17201720        printf(" %*s ", pos, str);
  • uspace/app/edit/search.c

    r3061bc1 r8565a42  
    4949        if (search == NULL)
    5050                return NULL;
    51        
     51
    5252        wchar_t *p = str_to_awstr(pattern);
    5353        if (p == NULL) {
     
    5555                return NULL;
    5656        }
    57        
     57
    5858        search->pattern_length = wstr_length(p);
    59        
     59
    6060        if (reverse) {
    6161                /* Reverse the pattern */
     
    6868                }
    6969        }
    70        
     70
    7171        search->pattern = p;
    72        
     72
    7373        search->client_data = client_data;
    7474        search->ops = ops;
     
    7979                return NULL;
    8080        }
    81        
     81
    8282        search->pattern_pos = 0;
    83        
     83
    8484        search->back_table[0] = -1;
    8585        search->back_table[1] = 0;
     
    101101                }
    102102        }
    103        
     103
    104104        return search;
    105105}
     
    108108{
    109109        search_equals_fn eq = s->ops.equals;
    110        
     110
    111111        wchar_t cur_char;
    112112        errno_t rc = EOK;
     
    129129                }
    130130        }
    131        
     131
    132132        match->end = NULL;
    133133        match->length = 0;
    134        
     134
    135135        return rc;
    136136}
     
    140140        free(search->pattern);
    141141        free(search->back_table);
    142        
     142
    143143}
    144144
  • uspace/app/edit/sheet.c

    r3061bc1 r8565a42  
    263263        coord.row = row;
    264264        coord.column = 65536;
    265        
     265
    266266        sheet_get_cell_pt(sh, &coord, dir_before, &pt);
    267267        spt_get_coord(&pt, &coord);
Note: See TracChangeset for help on using the changeset viewer.