Changeset 1180a88e in mainline for fb/sysio.c


Ignore:
Timestamp:
2006-06-02T08:52:59Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
838c48e
Parents:
10569b1
Message:

Doc updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fb/sysio.c

    r10569b1 r1180a88e  
    4141static int client_connected = 0;
    4242
    43 #define CLRSCR   "\033[2J"
    44 
    4543static void sysput(char c)
    4644{
     
    5351}
    5452
     53/** Send clearscreen sequence to console */
     54static void clrscr(void)
     55{
     56        sysputs("\033[2J");
     57}
     58
     59/** Send ansi sequence to console to change cursor position */
    5560static void curs_goto(unsigned int row, unsigned int col)
    5661{
    5762        char control[20];
    5863
    59         if (row > 100 || col > 100)
     64        if (row > 200 || col > 200)
    6065                return;
    6166
     
    6469}
    6570
     71/** ANSI terminal emulation main thread */
    6672static void sysio_client_connection(ipc_callid_t iid, ipc_call_t *icall)
    6773{
     
    107113                        continue;
    108114                case FB_CLEAR:
    109                         sysputs(CLRSCR);
     115                        clrscr();
    110116                        retval = 0;
    111117                        break;
     
    117123}
    118124
     125/** ANSI terminal emulation initialization */
    119126void sysio_init(void)
    120127{
    121128        async_set_client_connection(sysio_client_connection);
    122         sysputs(CLRSCR);
     129        clrscr();
    123130        curs_goto(0,0);
    124131}
Note: See TracChangeset for help on using the changeset viewer.