char insertion poopoo

This commit is contained in:
2023-08-21 12:53:38 +03:00
parent 71d791acdb
commit 56c807a9cd
2 changed files with 21 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ int _printf(const char *format, ...)
unsigned int identifiers = _contains(format, '%');
unsigned int BUFF_SIZE = _strlen(format) - (identifiers * 2);
char *buffer, *next;
char c;
va_list args;
va_start(args, format);
@@ -36,6 +37,11 @@ int _printf(const char *format, ...)
fmt_idx += 2;
break;
case 'c': /* add 1 byte and i++ */
c = va_arg(args, int);
*(buffer + buff_idx + 1) = c;
BUFF_SIZE = _strlen(buffer);
buff_idx += 1;
fmt_idx += 2;
break;
case '%': /*add 1 byte*/
break;