Changeset ab936440 in mainline for uspace/lib/clui/tinput.c


Ignore:
Timestamp:
2019-02-12T20:42:42Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f31ca47
Parents:
7f7817a9 (diff), 4805495 (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:
Matthieu Riolo <matthieu.riolo@…> (2019-02-12 20:26:18)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-02-12 20:42:42)
Message:

Merge branch 'master' into bdsh_alias

Conflicts:

uspace/app/bdsh/Makefile
uspace/app/bdsh/cmds/modules/modules.h

Ccheck correction and removing header which includes itself

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/clui/tinput.c

    r7f7817a9 rab936440  
    5656} seek_dir_t;
    5757
     58static void tinput_update_origin(tinput_t *);
    5859static void tinput_init(tinput_t *);
    5960static void tinput_insert_string(tinput_t *, const char *);
     
    7172static void tinput_console_set_lpos(tinput_t *ti, unsigned lpos)
    7273{
    73         console_set_pos(ti->console, LIN_TO_COL(ti, lpos),
    74             LIN_TO_ROW(ti, lpos));
     74        unsigned col = LIN_TO_COL(ti, lpos);
     75        unsigned row = LIN_TO_ROW(ti, lpos);
     76
     77        assert(col < ti->con_cols);
     78        assert(row < ti->con_rows);
     79        console_set_pos(ti->console, col, row);
    7580}
    7681
     
    163168static void tinput_position_caret(tinput_t *ti)
    164169{
     170        tinput_update_origin(ti);
    165171        tinput_console_set_lpos(ti, ti->text_coord + ti->pos);
    166172}
     
    232238
    233239        tinput_display_tail(ti, ti->pos - 1, 0);
    234         tinput_update_origin(ti);
    235240        tinput_position_caret(ti);
    236241}
     
    276281
    277282        tinput_display_tail(ti, ti->pos - ilen, 0);
    278         tinput_update_origin(ti);
    279283        tinput_position_caret(ti);
    280284}
Note: See TracChangeset for help on using the changeset viewer.