r16071 - gnucash/trunk/lib/libc - On strptime('%X') and Windows, first translate the time picture to a format spec, cf. #437751.
Andreas Köhler
andi5 at cvs.gnucash.org
Fri May 11 16:21:19 EDT 2007
Author: andi5
Date: 2007-05-11 16:21:18 -0400 (Fri, 11 May 2007)
New Revision: 16071
Trac: http://svn.gnucash.org/trac/changeset/16071
Modified:
gnucash/trunk/lib/libc/strptime.c
Log:
On strptime('%X') and Windows, first translate the time picture to a format spec, cf. #437751.
Modified: gnucash/trunk/lib/libc/strptime.c
===================================================================
--- gnucash/trunk/lib/libc/strptime.c 2007-05-11 17:35:00 UTC (rev 16070)
+++ gnucash/trunk/lib/libc/strptime.c 2007-05-11 20:21:18 UTC (rev 16071)
@@ -955,23 +955,30 @@
if (*decided != raw)
{
char *locale_string = get_locale_string (LOCALE_STIMEFORMAT);
- if (!recursive (locale_string))
+ char *posix_t_fmt = translate_picture (locale_string);
+
+ free (locale_string);
+
+ if (!recursive (posix_t_fmt))
{
if (*decided == loc)
- return NULL;
+ {
+ free (posix_t_fmt);
+ return NULL;
+ }
else
- rp = rp_backup;
+ {
+ rp = rp_backup;
+ }
}
else
{
- free (locale_string);
- locale_string = get_locale_string (LOCALE_STIMEFORMAT);
- if (strcmp (locale_string, HERE_T_FMT))
+ if (strcmp (posix_t_fmt, HERE_T_FMT))
*decided = loc;
- free (locale_string);
+ free (posix_t_fmt);
break;
}
- free (locale_string);
+ free (posix_t_fmt);
*decided = raw;
}
#endif
More information about the gnucash-changes
mailing list