解决了一些小问题

This commit is contained in:
fslongjin
2022-03-18 19:18:36 +08:00
parent 75eea551e6
commit 71d6af78d8
12 changed files with 484 additions and 465 deletions

View File

@ -112,9 +112,9 @@ void auto_newline()
if (pos.y > pos.max_y)
{
pos.y = pos.max_y;
int lines_to_scroll = 2;
scroll(true, lines_to_scroll * pos.char_size_y, true);
pos.y -= (lines_to_scroll - 1);
int lines_to_scroll = 1;
scroll(true, lines_to_scroll * pos.char_size_y, false);
pos.y -= (lines_to_scroll-1);
}
}
@ -405,7 +405,7 @@ static int vsprintf(char *buf, const char *fmt, va_list args)
return str - buf;
}
static char *write_num(char *str, ll num, int base, int field_width, int precision, int flags)
static char *write_num(char *str, ul num, int base, int field_width, int precision, int flags)
{
/**
* @brief 将数字按照指定的要求转换成对应的字符串

View File

@ -88,7 +88,7 @@ static int vsprintf(char *buf, const char *fmt, va_list args);
* @param precision 精度
* @param flags 标志位
*/
static char *write_num(char *str, ll num, int base, int field_width, int precision, int flags);
static char *write_num(char *str,ul num, int base, int field_width, int precision, int flags);
static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags);