From aea70b28bea10904c2aa6cff97d1093beec42e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sat, 29 Aug 2026 13:48:14 +0100 Subject: [PATCH] doc: printf: fix typos in format examples * src/printf.c (usage): Remove redundant quotes. Change ambiguous quotes. Fix typos in examples. Quoting changes suggested by Martin D Kealey. --- src/printf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/printf.c b/src/printf.c index 09abe6a94..4ce54a231 100644 --- a/src/printf.c +++ b/src/printf.c @@ -108,17 +108,17 @@ with examples including usage of width, precision, and flags.\n\ %s '[%-10s]' 'right pad' [right pad ]\n\ %c %s '%c %.3s' un unibyte u uni\n\ \n\ - %d %i \"%'d ;%i04i\" 1234 '-1' 1,234 ;-001\n\ + %d %i \"%'d ;%04i\" 1234 '-1' 1,234 ;-001\n\ %o '%#o' $((2#110100100)) 0644\n\ %u '%u' 0xFFFFFFFF 4294967295\n\ %x '0x%08x' 11259375 0x00abcdef\n\ \n\ %a %f '%1$a %1$f' 0.0009765625 0x8p-13 0.000977\n\ - %e %f '%1$e %1$f' 123.45678 1.234568e+02 123.456789\n\ + %e %f '%1$e %1$f' 123.456789 1.234568e+02 123.456789\n\ %g '%1$g %1$.2g' 1.2345678e3 1234.57 1.2e+03\n\ \n\ %b '%bfoo' 'bar\\cbaz' qux bar\n\ - %q '%q ' 'a' ';b' $'c\\n' a ';b' 'c'$'\\n'\n\ + %q '%q ' 'a' \\;b $'c\\n' a ';b' 'c'$'\\n'\n\ "), stdout); printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME); emit_ancillary_info (PROGRAM_NAME);