Changeset 47d060d in mainline for uspace/lib/vt/src/vt100.c


Ignore:
Timestamp:
2024-10-04T19:23:16Z (8 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
c7ecd290
Parents:
5132379
Message:

Implement telnet window size option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/vt/src/vt100.c

    r5132379 r47d060d  
    206206}
    207207
     208/** Resize VT instance.
     209 *
     210 * @param vt VT instance
     211 * @param cols New number of columns
     212 * @param rows New number of rows
     213 */
     214void vt100_resize(vt100_t *vt, sysarg_t cols, sysarg_t rows)
     215{
     216        vt->cols = cols;
     217        vt->rows = rows;
     218
     219        if (vt->cur_col > cols - 1)
     220                vt->cur_col = cols - 1;
     221        if (vt->cur_row > rows - 1)
     222                vt->cur_row = rows - 1;
     223}
     224
    208225/** Destroy VT instance.
    209226 *
Note: See TracChangeset for help on using the changeset viewer.