Subversion Repositories HelenOS

Rev

Rev 2479 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2479 Rev 2619
Line 115... Line 115...
115
    int newcol,newrow;
115
    int newcol,newrow;
116
    int fgcolor,bgcolor;
116
    int fgcolor,bgcolor;
117
    int i;
117
    int i;
118
 
118
 
119
    if (client_connected) {
119
    if (client_connected) {
120
        ipc_answer_fast(iid, ELIMIT, 0,0);
120
        ipc_answer_0(iid, ELIMIT);
121
        return;
121
        return;
122
    }
122
    }
123
   
123
   
124
    client_connected = 1;
124
    client_connected = 1;
125
    ipc_answer_fast(iid, 0, 0, 0); /* Accept connection */
125
    ipc_answer_0(iid, EOK); /* Accept connection */
126
    while (1) {
126
    while (1) {
127
        callid = async_get_call(&call);
127
        callid = async_get_call(&call);
128
        switch (IPC_GET_METHOD(call)) {
128
        switch (IPC_GET_METHOD(call)) {
129
            case IPC_M_PHONE_HUNGUP:
129
        case IPC_M_PHONE_HUNGUP:
130
                client_connected = 0;
130
            client_connected = 0;
131
                ipc_answer_fast(callid, 0, 0, 0);
131
            ipc_answer_0(callid, EOK);
132
                return; /* Exit thread */
132
            return; /* Exit thread */
133
            case FB_PUTCHAR:
133
        case FB_PUTCHAR:
134
                c = IPC_GET_ARG1(call);
134
            c = IPC_GET_ARG1(call);
135
                newrow = IPC_GET_ARG2(call);
135
            newrow = IPC_GET_ARG2(call);
136
                newcol = IPC_GET_ARG3(call);
136
            newcol = IPC_GET_ARG3(call);
Line 148... Line 148...
148
                lastrow = newrow;
148
            lastrow = newrow;
149
                lastcol = newcol;
149
            lastcol = newcol;
150
                retval = 0;
150
            retval = 0;
151
                break;
151
            break;
152
            case FB_GET_CSIZE:
152
        case FB_GET_CSIZE:
153
                ipc_answer_fast(callid, 0, HEIGHT, WIDTH);
153
            ipc_answer_2(callid, EOK, HEIGHT, WIDTH);
154
                continue;
154
            continue;
155
            case FB_CLEAR:
155
        case FB_CLEAR:
156
                clrscr();
156
            clrscr();
157
                retval = 0;
157
            retval = 0;
158
                break;
158
            break;
Line 177... Line 177...
177
                break;
177
            break;
178
            default:
178
        default:
179
                retval = ENOENT;
179
            retval = ENOENT;
180
        }
180
        }
181
       
181
       
182
        ipc_answer_fast(callid, retval, 0, 0);
182
        ipc_answer_0(callid, retval);
183
    }
183
    }
184
}
184
}
185
 
185
 
186
/** ANSI terminal emulation initialization */
186
/** ANSI terminal emulation initialization */
187
void sysio_init(void)
187
void sysio_init(void)