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


Ignore:
Timestamp:
2012-08-14T18:16:39Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
669f5cae
Parents:
76d92db1 (diff), 4802dd7 (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.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    r76d92db1 rcddcc4a3  
    601601       
    602602        unsigned int cols = max(1, (ti->con_cols + 1) / (max_length + 1));
    603         unsigned int col_width = ti->con_cols / cols;
     603        unsigned int padding = 0;
     604        if ((cols * max_length) + (cols - 1) < ti->con_cols) {
     605                padding = ti->con_cols - (cols * max_length) - (cols - 1);
     606        }
     607        unsigned int col_width = max_length + padding / cols;
    604608        unsigned int rows = cnum / cols + ((cnum % cols) != 0);
    605609       
Note: See TracChangeset for help on using the changeset viewer.