Subversion Repositories HelenOS

Rev

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

Rev 2479 Rev 2621
Line 93... Line 93...
93
}
93
}
94
 
94
 
95
 
95
 
96
void clear_screen(void)
96
void clear_screen(void)
97
{
97
{
98
    async_msg(con_phone, CONSOLE_CLEAR, 0);
98
    async_msg_0(con_phone, CONSOLE_CLEAR);
99
    moveto(0,0);
99
    moveto(0, 0);
100
}
100
}
101
 
101
 
102
/*
102
/*
103
 * Clear the screen, forgetting the current contents in the process.
103
 * Clear the screen, forgetting the current contents in the process.
104
 */
104
 */
105
void
105
void
106
scr_clear(void)
106
scr_clear(void)
107
{
107
{
108
 
108
 
109
    resume_normal();
109
    resume_normal();
110
    async_msg(con_phone, CONSOLE_CLEAR, 0);
110
    async_msg_0(con_phone, CONSOLE_CLEAR);
111
    curscore = -1;
111
    curscore = -1;
112
    memset((char *)curscreen, 0, sizeof(curscreen));
112
    memset((char *)curscreen, 0, sizeof(curscreen));
113
}
113
}
114
 
114
 
115
/*
115
/*
Line 117... Line 117...
117
 */
117
 */
118
void
118
void
119
scr_init(void)
119
scr_init(void)
120
{
120
{
121
    con_phone = get_fd_phone(1);
121
    con_phone = get_fd_phone(1);
122
    async_msg(con_phone, CONSOLE_CURSOR_VISIBILITY, 0);
122
    async_msg_1(con_phone, CONSOLE_CURSOR_VISIBILITY, 0);
123
    resume_normal();
123
    resume_normal();
124
    scr_clear();
124
    scr_clear();
125
}
125
}
126
 
126
 
127
void moveto(int r, int c)
127
void moveto(int r, int c)
Line 129... Line 129...
129
    async_msg_2(con_phone, CONSOLE_GOTO, r, c);
129
    async_msg_2(con_phone, CONSOLE_GOTO, r, c);
130
}
130
}
131
 
131
 
132
static void fflush(void)
132
static void fflush(void)
133
{
133
{
134
    async_msg(con_phone, CONSOLE_FLUSH, 0);
134
    async_msg_0(con_phone, CONSOLE_FLUSH);
135
}
135
}
136
 
136
 
137
winsize_t winsize;
137
winsize_t winsize;
138
 
138
 
139
static int get_display_size(winsize_t *ws)
139
static int get_display_size(winsize_t *ws)
140
{
140
{
141
    return async_req_2(con_phone, CONSOLE_GETSIZE, 0, 0, &ws->ws_row, &ws->ws_col);
141
    return async_req_0_2(con_phone, CONSOLE_GETSIZE, &ws->ws_row,
-
 
142
        &ws->ws_col);
142
}
143
}
143
 
144
 
144
/*
145
/*
145
 * Set up screen mode.
146
 * Set up screen mode.
146
 */
147
 */