mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 02:38:31 +00:00
Trim down MODE= linkage slightly
This commit is contained in:
parent
046c7ebd4a
commit
c95c9d9508
13 changed files with 315 additions and 283 deletions
|
@ -498,6 +498,21 @@ privileged static size_t kformat(char *b, size_t n, const char *fmt, va_list va,
|
|||
goto FormatDecimal;
|
||||
}
|
||||
|
||||
case 'G':
|
||||
x = va_arg(va, int);
|
||||
if (weaken(strsignal)) {
|
||||
s = weaken(strsignal)(x);
|
||||
goto FormatString;
|
||||
} else {
|
||||
if (p + 3 <= e) {
|
||||
p[0] = 'S';
|
||||
p[1] = 'I';
|
||||
p[2] = 'G';
|
||||
}
|
||||
p += 3;
|
||||
goto FormatDecimal;
|
||||
}
|
||||
|
||||
case 'n':
|
||||
// nonstandard %n specifier
|
||||
// used to print newlines that work in raw terminal modes
|
||||
|
@ -823,6 +838,7 @@ privileged void kvprintf(const char *fmt, va_list v) {
|
|||
* - `u` unsigned
|
||||
* - `r` carriage
|
||||
* - `m` strerror
|
||||
* - `G` strsignal
|
||||
* - `X` uppercase
|
||||
* - `T` timestamp
|
||||
* - `x` hexadecimal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue