Changeset 0bf84cc in mainline for fb/sysio.c


Ignore:
Timestamp:
2006-06-02T22:58:02Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
27386e6a
Parents:
59ed572
Message:

Added support for styles for ega framebuffer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fb/sysio.c

    r59ed572 r0bf84cc  
    6969}
    7070
     71static void set_style(int mode)
     72{
     73        char control[20];
     74       
     75        snprintf(control, 20, "\033[%df", mode);
     76        sysputs(control);
     77}
     78
    7179/** ANSI terminal emulation main thread */
    7280static void sysio_client_connection(ipc_callid_t iid, ipc_call_t *icall)
     
    7987        int lastrow=0;
    8088        int newcol,newrow;
     89        int fgcolor,bgcolor;
    8190
    8291        if (client_connected) {
     
    116125                        retval = 0;
    117126                        break;
     127                case FB_SET_STYLE:
     128                        fgcolor = IPC_GET_ARG1(call);
     129                        bgcolor = IPC_GET_ARG2(call);
     130                        if (fgcolor > bgcolor)
     131                                set_style(0);
     132                        else
     133                                set_style(7);
     134                        retval = 0;
     135                        break;
    118136                default:
    119137                        retval = ENOENT;
Note: See TracChangeset for help on using the changeset viewer.