21 *x = cols - (*x % cols);
38 DoAdjust( x, y, dx, dy, cols, rows );
39 if( *y==(rows+1) && *x==1 ) {
51 int current_x, current_y;
53 size_t pos, len, tmp_buffer_len = 0;
60 cursor_visible = (
fb_Locate( 0, 0, -1, 0, 0 ) & 0x10000) != 0;
70 size_t delete_char_count = 0, add_char =
FALSE;
99 char mask[2] = { ((result.
data !=
NULL) && (pos < len)? result.
data[pos]:
' '),
'\0' };
107 DoMove( ¤t_x, ¤t_y, -1, 0, cols, rows );
109 delete_char_count = 1;
114 tmp_buffer_len = ((pos + 8) / 8 * 8) - pos;
115 memset( tmp_buffer, 32, tmp_buffer_len );
120 DoMove( ¤t_x, ¤t_y, -pos, 0, cols, rows );
122 delete_char_count = len;
128 delete_char_count = 1;
137 DoMove( ¤t_x, ¤t_y, -1, 0, cols, rows );
145 DoMove( ¤t_x, ¤t_y, 1, 0, cols, rows );
151 DoMove( ¤t_x, ¤t_y, -pos, 0, cols, rows );
156 DoMove( ¤t_x, ¤t_y, len-pos, 0, cols, rows );
162 DoMove( ¤t_x, ¤t_y, -cols, 0, cols, rows );
168 if( (pos + cols) <= len ) {
169 DoMove( ¤t_x, ¤t_y, cols, 0, cols, rows );
175 if( (k >= 32) && (k <= 255) ) {
176 tmp_buffer[0] = (char) k;
184 if( (delete_char_count != 0) || add_char ) {
189 if( delete_char_count ) {
193 pos + 1 + delete_char_count,
194 len - pos - delete_char_count);
197 len -= delete_char_count;
208 fb_Locate( current_y, current_x, -1, 0, 0 );
214 tmp_buffer[tmp_buffer_len] = 0;
218 int old_x = current_x, old_y = current_y;
225 len += tmp_buffer_len;
233 if( pos==(len-tmp_buffer_len) ) {
234 current_x = old_x; current_y = old_y;
235 DoMove( ¤t_x, ¤t_y, tmp_buffer_len, 0, cols, rows );
237 int tmp_x_2 = old_x, tmp_y_2 = old_y;
238 DoAdjust( &tmp_x_2, &tmp_y_2, len - pos, 0, cols, rows );
239 if( tmp_y_2 > (rows+1) || (tmp_y_2==(rows+1) && tmp_x_2>1) ) {
240 DoMove( ¤t_x, ¤t_y, -(len - pos - tmp_buffer_len), 0, cols, rows );
242 current_x = old_x; current_y = old_y;
243 DoMove( ¤t_x, ¤t_y, tmp_buffer_len, 0, cols, rows );
246 pos += tmp_buffer_len;
253 }
while (k!=
'\r' && k!=
'\n');
259 DoMove( ¤t_x, ¤t_y, len - pos, 0, cols, rows );