From cf29ffbef960c4c454d94919c6f27206f77961ff Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 May 1997 01:12:55 +0000 Subject: Update. 1997-05-25 03:00 Ulrich Drepper * elf/dynamic-link.h (_dl_verbose): New variable, declare. * elf/rtld.c (_dl_verbose): New variable, define. (dl_main): Define _dl-verbose based on DL_WARN environment variable. * sysdeps/i386/dl-machine.h (elf_machine_rel): Print warning about changed size in copy relocation only if symbol in shared object is larger or _dl_verbose is nonzero. * sysdeps/m68k/dl-machine.h (elf_machine_rel): Likewise. * sysdeps/powerpc/dl-machine.h (elf_machine_rel): Likewise. * sysdeps/sparc/dl-machine.h (elf_machine_rel): Likewise. * nis/nss_nis/nis-ethers.c: Don't use relative include paths, use <...>. * nis/nss_nis/nis-grp.c: Likewise. * nis/nss_nis/nis-hosts.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * nis/nss_nis/nis-proto.c: Likewise. * nis/nss_nis/nis-pwd.c: Likewise. * nis/nss_nis/nis-rpc.c: Likewise. * nis/nss_nis/nis-spwd.c: Likewise. * sysdeps/unix/sysv/sysd-stdio.c: Likewise. * wcsmbs/wcscoll.c: Likewise. * wcsmbs/wcstod.c: Likewise. * wcsmbs/wcstof.c: Likewise. * wcsmbs/wcstol.c: Likewise. * wcsmbs/wcstold.c: Likewise. * wcsmbs/wcsxfrm.c: Likewise. Reported by Zack Weinberg . * time/strftime.c: Implement # flag which changes case of output for %a, %b, %B, %p, and %Z format. When printing numbers, the given field width is always respected. This means that padding happens only up to the given width. Proposed by Stephen Gildea . 1997-05-25 00:44 Ulrich Drepper * sysdeps/i386/fpu/__math.h (logb): Fix thinko, reverse output values. Reported by Andreas Jaeger . 1997-05-24 21:03 Philip Blundell * db/btree/bt_open.c (__bt_open): Only try to use st_blksize (from struct stat) if it exists for this port. 1997-05-24 20:34 Philip Blundell * sysdeps/standalone/arm/errnos.h: Add EPERM. 1997-05-23 16:28 Philip Blundell * linewrap.h: New file, needed to compile argp without libio. 1997-05-24 11:59 Andreas Jaeger * manual/stdio.texi (Formatted Messages): Corrected some typos. 1997-05-24 11:58 Philip Blundell * sysdeps/stub/start.c: Fix typo. --- time/strftime.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'time') diff --git a/time/strftime.c b/time/strftime.c index 4cb6c9e..040b787 100644 --- a/time/strftime.c +++ b/time/strftime.c @@ -282,6 +282,7 @@ memcpy_uppcase (dest, src, len) return dest; } + #if ! HAVE_TM_GMTOFF /* Yield the difference between *A and *B, measured in seconds, ignoring leap seconds. */ @@ -464,6 +465,7 @@ strftime (s, maxsize, format, tp) int width = -1; int to_lowcase = 0; int to_uppcase = 0; + int change_case = 0; #if DO_MULTIBYTE @@ -555,6 +557,9 @@ strftime (s, maxsize, format, tp) case '^': to_uppcase = 1; continue; + case '#': + change_case = 1; + continue; default: break; @@ -592,9 +597,11 @@ strftime (s, maxsize, format, tp) switch (*f) { #define DO_NUMBER(d, v) \ - digits = d; number_value = v; goto do_number + digits = width == -1 ? d : width; \ + number_value = v; goto do_number #define DO_NUMBER_SPACEPAD(d, v) \ - digits = d; number_value = v; goto do_number_spacepad + digits = width == -1 ? d : width; \ + number_value = v; goto do_number_spacepad case '%': if (modifier != 0) @@ -605,12 +612,22 @@ strftime (s, maxsize, format, tp) case 'a': if (modifier != 0) goto bad_format; + if (change_case) + { + to_uppcase = 1; + to_lowcase = 0; + } cpy (aw_len, a_wkday); break; case 'A': if (modifier != 0) goto bad_format; + if (change_case) + { + to_uppcase = 1; + to_lowcase = 0; + } cpy (wkday_len, f_wkday); break; @@ -624,6 +641,11 @@ strftime (s, maxsize, format, tp) case 'B': if (modifier != 0) goto bad_format; + if (change_case) + { + to_uppcase = 1; + to_lowcase = 0; + } cpy (month_len, f_month); break; @@ -824,6 +846,11 @@ strftime (s, maxsize, format, tp) /* FALLTHROUGH */ case 'p': + if (change_case) + { + to_uppcase = 0; + to_lowcase = 1; + } cpy (ap_len, ampm); break; @@ -996,6 +1023,11 @@ strftime (s, maxsize, format, tp) DO_NUMBER (2, (tp->tm_year % 100 + 100) % 100); case 'Z': + if (change_case) + { + to_uppcase = 0; + to_lowcase = 1; + } cpy (zonelen, zone); break; -- cgit v1.1