Subversion Repositories HelenOS-historic

Rev

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

Rev 1649 Rev 1719
Line 118... Line 118...
118
 
118
 
119
    if (client_connected) {
119
    if (client_connected) {
120
        ipc_answer_fast(iid, ELIMIT, 0,0);
120
        ipc_answer_fast(iid, ELIMIT, 0,0);
121
        return;
121
        return;
122
    }
122
    }
-
 
123
   
123
    client_connected = 1;
124
    client_connected = 1;
124
    ipc_answer_fast(iid, 0, 0, 0); /* Accept connection */
125
    ipc_answer_fast(iid, 0, 0, 0); /* Accept connection */
125
    while (1) {
126
    while (1) {
126
        callid = async_get_call(&call);
127
        callid = async_get_call(&call);
127
        switch (IPC_GET_METHOD(call)) {
128
        switch (IPC_GET_METHOD(call)) {
Line 131... Line 132...
131
            return; /* Exit thread */
132
                return; /* Exit thread */
132
        case FB_PUTCHAR:
133
            case FB_PUTCHAR:
133
            c = IPC_GET_ARG1(call);
134
                c = IPC_GET_ARG1(call);
134
            newrow = IPC_GET_ARG2(call);
135
                newrow = IPC_GET_ARG2(call);
135
            newcol = IPC_GET_ARG3(call);
136
                newcol = IPC_GET_ARG3(call);
136
            if (lastcol != newcol || lastrow!=newrow)
137
                if ((lastcol != newcol) || (lastrow != newrow))
137
                curs_goto(newrow, newcol);
138
                    curs_goto(newrow, newcol);
138
            lastcol = newcol + 1;
139
                lastcol = newcol + 1;
139
            lastrow = newrow;
140
                lastrow = newrow;
140
            sysput(c);
141
                sysput(c);
141
            retval = 0;
142
                retval = 0;
Line 144... Line 145...
144
            newrow = IPC_GET_ARG1(call);
145
                newrow = IPC_GET_ARG1(call);
145
            newcol = IPC_GET_ARG2(call);
146
                newcol = IPC_GET_ARG2(call);
146
            curs_goto(newrow, newcol);
147
                curs_goto(newrow, newcol);
147
            lastrow = newrow;
148
                lastrow = newrow;
148
            lastcol = newcol;
149
                lastcol = newcol;
-
 
150
                retval = 0;
149
            break;
151
                break;
150
        case FB_GET_CSIZE:
152
            case FB_GET_CSIZE:
151
            ipc_answer_fast(callid, 0, HEIGHT, WIDTH);
153
                ipc_answer_fast(callid, 0, HEIGHT, WIDTH);
152
            continue;
154
                continue;
153
        case FB_CLEAR:
155
            case FB_CLEAR:
Line 163... Line 165...
163
                set_style(7);
165
                    set_style(7);
164
            retval = 0;
166
                retval = 0;
165
            break;
167
                break;
166
        case FB_SCROLL:
168
            case FB_SCROLL:
167
            i = IPC_GET_ARG1(call);
169
                i = IPC_GET_ARG1(call);
168
            if (i > HEIGHT || i < -HEIGHT) {
170
                if ((i > HEIGHT) || (i < -HEIGHT)) {
169
                retval = EINVAL;
171
                    retval = EINVAL;
170
                break;
172
                    break;
171
            }
173
                }
172
            scroll(i);
174
                scroll(i);
173
            curs_goto(lastrow, lastcol);
175
                curs_goto(lastrow, lastcol);
174
            retval = 0;
176
                retval = 0;
175
            break;
177
                break;
176
 
-
 
177
        default:
178
            default:
178
            retval = ENOENT;
179
                retval = ENOENT;
179
        }
180
        }
-
 
181
       
180
        ipc_answer_fast(callid,retval,0,0);
182
        ipc_answer_fast(callid, retval, 0, 0);
181
    }
183
    }
182
}
184
}
183
 
185
 
184
/** ANSI terminal emulation initialization */
186
/** ANSI terminal emulation initialization */
Line 192... Line 194...
192
}
194
}
193
 
195
 
194
/**
196
/**
195
 * @}
197
 * @}
196
 */
198
 */
197
 
-