From 1c4fcaf43edea3d1a29fe6f4949f6397c314c67e Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 3 Jul 2017 18:40:06 -0400 Subject: [PATCH] Discard implementation of %L and %U format specifiers, now never used. --- adventure.yaml | 13 ++----------- misc.c | 14 -------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/adventure.yaml b/adventure.yaml index 93ff91a..5cbe9e0 100644 --- a/adventure.yaml +++ b/adventure.yaml @@ -108,18 +108,9 @@ # Message strings may include certain special character sequences to # denote that the program must provide parameters to insert into a # message when the message is printed. These sequences are: +# %d = an integer +# %s = an ASCII string # %S = The letter 'S' or nothing (if a given value is exactly 1) -# %W = A word (up to 10 characters) -# %L = A word mapped to lower-case letters -# %U = A word mapped to upper-case letters -# %C = A word mapped to lower-case, first letter capitalised -# %T = Several words of text, ending with a word of -1 -# %1 = A 1-digit number -# %2 = A 2-digit number -# ... -# %9 = A 9-digit number -# %B = Variable number of blanks -# %! = The entire message should be suppressed # %V = substitute program version string motions: !!omap diff --git a/misc.c b/misc.c index 0b00992..2b6a58b 100644 --- a/misc.c +++ b/misc.c @@ -190,20 +190,6 @@ void vspeak(const char* msg, bool blank, va_list ap) size -= len; } - // All-lowercase specifier. - if (msg[i] == 'L' || - msg[i] == 'C') { - packed_to_token(arg, renderp); /* unpack directly to destination */ - int len = strlen(renderp); - for (int j = 0; j < len; ++j) { - renderp[j] = tolower(renderp[j]); - } - if (msg[i] == 'C') // First char uppercase, rest lowercase. - renderp[0] = toupper(renderp[0]); - renderp += len; - size -= len; - } - previous_arg = arg; } } -- 2.31.1