Do not use langinfo to determine date format spec, but %x, %X or %c.

Remove check for HAVE_LANGINFO_D_FMT.  Rather use standard strftime and
(standard?) strptime format specifiers %x (date), %X (time) and %c
(date&time, all in national representation).


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16049 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler
2007-05-05 21:02:56 +00:00
parent b9664b2cab
commit 9f44e3155d
5 changed files with 5 additions and 53 deletions

View File

@@ -31,14 +31,6 @@
/* to be renamed qofdate.c */
#include <ctype.h>
#ifdef HAVE_LANGINFO_H
#define HAVE_LANGINFO_D_FMT 1
#endif
#ifdef HAVE_LANGINFO_D_FMT
#include <langinfo.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -58,15 +50,9 @@
#define NANOS_PER_SECOND 1000000000
#ifdef HAVE_LANGINFO_D_FMT
# define GNC_D_FMT (nl_langinfo (D_FMT))
# define GNC_D_T_FMT (nl_langinfo (D_T_FMT))
# define GNC_T_FMT (nl_langinfo (T_FMT))
#else
# define GNC_D_FMT "%Y-%m-%d"
# define GNC_D_T_FMT "%Y-%m-%d %r"
# define GNC_T_FMT "%r"
#endif
#define GNC_D_FMT "%x"
#define GNC_D_T_FMT "%c"
#define GNC_T_FMT "%X"
/* This is now user configured through the gnome options system() */