Rev 1500 | Rev 1535 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1500 | Rev 1534 | ||
---|---|---|---|
Line 66... | Line 66... | ||
66 | 66 | ||
67 | snprintf(control, 20, "\033[%d;%df",row+1, col+1); |
67 | snprintf(control, 20, "\033[%d;%df",row+1, col+1); |
68 | sysputs(control); |
68 | sysputs(control); |
69 | } |
69 | } |
70 | 70 | ||
- | 71 | static void set_style(int mode) |
|
- | 72 | { |
|
- | 73 | char control[20]; |
|
- | 74 | ||
- | 75 | snprintf(control, 20, "\033[%df", mode); |
|
- | 76 | sysputs(control); |
|
- | 77 | } |
|
- | 78 | ||
71 | /** ANSI terminal emulation main thread */ |
79 | /** ANSI terminal emulation main thread */ |
72 | static void sysio_client_connection(ipc_callid_t iid, ipc_call_t *icall) |
80 | static void sysio_client_connection(ipc_callid_t iid, ipc_call_t *icall) |
73 | { |
81 | { |
74 | int retval; |
82 | int retval; |
75 | ipc_callid_t callid; |
83 | ipc_callid_t callid; |
76 | ipc_call_t call; |
84 | ipc_call_t call; |
77 | char c; |
85 | char c; |
78 | int lastcol=0; |
86 | int lastcol=0; |
79 | int lastrow=0; |
87 | int lastrow=0; |
80 | int newcol,newrow; |
88 | int newcol,newrow; |
- | 89 | int fgcolor,bgcolor; |
|
81 | 90 | ||
82 | if (client_connected) { |
91 | if (client_connected) { |
83 | ipc_answer_fast(iid, ELIMIT, 0,0); |
92 | ipc_answer_fast(iid, ELIMIT, 0,0); |
84 | return; |
93 | return; |
85 | } |
94 | } |
Line 113... | Line 122... | ||
113 | continue; |
122 | continue; |
114 | case FB_CLEAR: |
123 | case FB_CLEAR: |
115 | clrscr(); |
124 | clrscr(); |
116 | retval = 0; |
125 | retval = 0; |
117 | break; |
126 | 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; |
|
118 | default: |
136 | default: |
119 | retval = ENOENT; |
137 | retval = ENOENT; |
120 | } |
138 | } |
121 | ipc_answer_fast(callid,retval,0,0); |
139 | ipc_answer_fast(callid,retval,0,0); |
122 | } |
140 | } |