[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] strftime.c: Support lowercase output
From: |
Jakub Martisko |
Subject: |
[PATCH] strftime.c: Support lowercase output |
Date: |
Wed, 13 Apr 2016 10:53:55 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
While doing cleanup, found following bug/feature request. Combination of
^(upper case) and #(opposite case) flags should set to_lowercase flag in
strftime.c.
https://sourceware.org/bugzilla/show_bug.cgi?id=15527
https://bugzilla.redhat.com/show_bug.cgi?id=749704
>From 060489d0faa5ef4ebdbefd2bed495df1d2adb60c Mon Sep 17 00:00:00 2001
From: Jakub Martisko <address@hidden>
Date: Tue, 12 Apr 2016 15:06:01 +0200
Subject: [PATCH] strftime.c: Support lowercase output
* lib/strftime.c: Combination of to_upcase and change_case now sets
to_lowcase to true and to_upcase and change_case to false. This produces
lowercase output when both # and ^ flags are used
Reported at bugzilla.redhat.com/show_bug.cgi?id=749704
---
lib/strftime.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/strftime.c b/lib/strftime.c
index 4e65190..bb1f4de 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -640,6 +640,12 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
}
break;
}
+ if (to_uppcase == true && change_case == true)
+ {
+ change_case = false;
+ to_uppcase = false;
+ to_lowcase=true;
+ }
/* As a GNU extension we allow the field width to be specified. */
if (ISDIGIT (*f))
--
2.5.0
- [PATCH] strftime.c: Support lowercase output,
Jakub Martisko <=