Changeset 47d060d in mainline for uspace/lib


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

Implement telnet window size option

Location:
uspace/lib/vt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/vt/include/vt/vt100.h

    r5132379 r47d060d  
    157157extern vt100_t *vt100_create(void *, sysarg_t, sysarg_t,
    158158    vt100_cb_t *);
     159extern void vt100_resize(vt100_t *, sysarg_t, sysarg_t);
    159160extern void vt100_destroy(vt100_t *);
    160161
  • 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.