Subversion Repositories HelenOS-historic

Rev

Rev 1575 | Rev 1610 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1575 Rev 1590
Line 91... Line 91...
91
static void resume_normal(void)
91
static void resume_normal(void)
92
{
92
{
93
    set_style(0xe0e0e0, 0);
93
    set_style(0xe0e0e0, 0);
94
}
94
}
95
 
95
 
-
 
96
 
-
 
97
void clear_screen(void)
-
 
98
{
-
 
99
    send_call(con_phone, CONSOLE_CLEAR, 0);
-
 
100
    moveto(0,0);
-
 
101
}
-
 
102
 
96
/*
103
/*
97
 * Clear the screen, forgetting the current contents in the process.
104
 * Clear the screen, forgetting the current contents in the process.
98
 */
105
 */
99
void
106
void
100
scr_clear(void)
107
scr_clear(void)
Line 116... Line 123...
116
    send_call(con_phone, CONSOLE_CURSOR_VISIBILITY, 0);
123
    send_call(con_phone, CONSOLE_CURSOR_VISIBILITY, 0);
117
    resume_normal();
124
    resume_normal();
118
    scr_clear();
125
    scr_clear();
119
}
126
}
120
 
127
 
121
static void moveto(int r, int c)
128
void moveto(int r, int c)
122
{
129
{
123
    send_call_2(con_phone, CONSOLE_GOTO, r, c);
130
    send_call_2(con_phone, CONSOLE_GOTO, r, c);
124
}
131
}
125
 
132
 
126
static void fflush(void)
133
static void fflush(void)
127
{
134
{
128
    send_call(con_phone, CONSOLE_FLUSH, 0);
135
    send_call(con_phone, CONSOLE_FLUSH, 0);
129
}
136
}
130
 
137
 
131
struct winsize {
138
winsize_t winsize;
132
    ipcarg_t ws_row;
-
 
133
    ipcarg_t ws_col;
-
 
134
};
-
 
135
 
139
 
136
static int get_display_size(struct winsize *ws)
140
static int get_display_size(winsize_t *ws)
137
{
141
{
138
    return sync_send_2(con_phone, CONSOLE_GETSIZE, 0, 0, &ws->ws_row, &ws->ws_col);
142
    return sync_send_2(con_phone, CONSOLE_GETSIZE, 0, 0, &ws->ws_row, &ws->ws_col);
139
}
143
}
140
 
144
 
141
static void
145
static void
Line 151... Line 155...
151
 * Set up screen mode.
155
 * Set up screen mode.
152
 */
156
 */
153
void
157
void
154
scr_set(void)
158
scr_set(void)
155
{
159
{
156
    struct winsize ws;
160
    winsize_t ws;
157
 
161
 
158
    Rows = 0, Cols = 0;
162
    Rows = 0, Cols = 0;
159
    if (get_display_size(&ws) == 0) {
163
    if (get_display_size(&ws) == 0) {
160
        Rows = ws.ws_row;
164
        Rows = ws.ws_row;
161
        Cols = ws.ws_col;
165
        Cols = ws.ws_col;