Changeset 1a96db9 in mainline for uspace/lib/output/src


Ignore:
Timestamp:
2025-10-08T18:09:09Z (3 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
c111da2
Parents:
32ae27bb
Message:

Implement carriage return in console.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/output/src/chargrid.c

    r32ae27bb r1a96db9  
    11/*
     2 * Copyright (c) 2025 Jiri Svoboda
    23 * Copyright (c) 2006 Josef Cejka
    34 * All rights reserved.
     
    180181}
    181182
     183/** Return cursor to the beginning of the line.
     184 *
     185 * @param scrbuf Chargrid.
     186 *
     187 * @return Number of rows which have been affected. In usual
     188 *         situations this is 1.
     189 *
     190 */
     191sysarg_t chargrid_cr(chargrid_t *scrbuf)
     192{
     193        assert(scrbuf->col < scrbuf->cols);
     194        assert(scrbuf->row < scrbuf->rows);
     195
     196        scrbuf->col = 0;
     197        return 1;
     198}
     199
    182200/** Jump to a new row in chargrid.
    183201 *
Note: See TracChangeset for help on using the changeset viewer.