Added support for %i option.

This commit is contained in:
creationship27 2022-08-03 15:29:30 +00:00
parent 04d88513b0
commit 3f59011518
2 changed files with 2 additions and 2 deletions

View file

@ -231,7 +231,7 @@ Sets an environment variable by `name` with `data` of length `len`. On success r
| getchar_ifany | non-blocking, returns 0 if there was no key press, UNICODE otherwise | | getchar_ifany | non-blocking, returns 0 if there was no key press, UNICODE otherwise |
| putchar | as usual, stdout only (no stream redirects) | | putchar | as usual, stdout only (no stream redirects) |
String formating is limited; only supports padding via positive number prefixes, `%d`, `%x`, `%X`, `%c`, `%s`, `%q` and String formating is limited; only supports padding via positive number prefixes, `%d`, `%i`, `%x`, `%X`, `%c`, `%s`, `%q` and
`%p` (no `%e`, `%f`, `%g`, no asterisk and dollar). When `UEFI_NO_UTF8` is defined, then formating operates on wchar_t, so `%p` (no `%e`, `%f`, `%g`, no asterisk and dollar). When `UEFI_NO_UTF8` is defined, then formating operates on wchar_t, so
it also supports the non-standard `%S` (printing an UTF-8 string) and `%Q` (printing an escaped UTF-8 string). These it also supports the non-standard `%S` (printing an UTF-8 string) and `%Q` (printing an escaped UTF-8 string). These
functions don't allocate memory, but in return the total length of the output string cannot be longer than `BUFSIZ` functions don't allocate memory, but in return the total length of the output string cannot be longer than `BUFSIZ`

View file

@ -544,7 +544,7 @@ int vsnprintf(char_t *dst, size_t maxlen, const char_t *fmt, __builtin_va_list a
fmt++; fmt++;
continue; continue;
} else } else
if(*fmt==CL('d')) { if(*fmt==CL('d') || *fmt==CL('i')) {
arg = __builtin_va_arg(args, int64_t); arg = __builtin_va_arg(args, int64_t);
sign=0; sign=0;
if(arg<0) { if(arg<0) {