mirror of https://github.com/0Nera/BMOSP.git
Удаление лишних переменных
This commit is contained in:
parent
365aacf4bc
commit
687ec44829
|
@ -176,7 +176,6 @@ void tool_format(void (*putc)(char c), const char *format_string, va_list args)
|
||||||
while (*format_string != '\0') {
|
while (*format_string != '\0') {
|
||||||
if (*format_string == '%') {
|
if (*format_string == '%') {
|
||||||
char buf[48];
|
char buf[48];
|
||||||
uint64_t i_temp = 0;
|
|
||||||
uint64_t point = 0;
|
uint64_t point = 0;
|
||||||
char *arg_s;
|
char *arg_s;
|
||||||
int64_t arg_d = 0;
|
int64_t arg_d = 0;
|
||||||
|
@ -191,7 +190,6 @@ void tool_format(void (*putc)(char c), const char *format_string, va_list args)
|
||||||
if (is_digit(*(format_string + 1))) { arg_u *= 10; }
|
if (is_digit(*(format_string + 1))) { arg_u *= 10; }
|
||||||
|
|
||||||
format_string++;
|
format_string++;
|
||||||
i_temp++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
width = arg_u;
|
width = arg_u;
|
||||||
|
@ -208,15 +206,15 @@ void tool_format(void (*putc)(char c), const char *format_string, va_list args)
|
||||||
|
|
||||||
if (width) { width -= tool_strlen(arg_s); }
|
if (width) { width -= tool_strlen(arg_s); }
|
||||||
|
|
||||||
while (width > 0) {
|
|
||||||
putc(' ');
|
|
||||||
width--;
|
|
||||||
}
|
|
||||||
// Вывод каждого символа строки
|
// Вывод каждого символа строки
|
||||||
while (*arg_s != '\0') {
|
while (*arg_s != '\0') {
|
||||||
putc(*arg_s);
|
putc(*arg_s);
|
||||||
arg_s++;
|
arg_s++;
|
||||||
}
|
}
|
||||||
|
while (width > 0) {
|
||||||
|
putc(' ');
|
||||||
|
width--;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
arg_d = va_arg(args, int64_t);
|
arg_d = va_arg(args, int64_t);
|
||||||
|
|
Loading…
Reference in New Issue