aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2006-06-02 20:46:09 +0800
committerTor Lillqvist <tml@src.gnome.org>2006-06-02 20:46:09 +0800
commita5abdac57776097feb6da3d7ef0b36aa5b7b8593 (patch)
tree22a9aba69a1bc85b752e45f5aecd5360e0a80597
parentbda117750cd2db02093667af810fead5258988d5 (diff)
downloadgsoc2013-evolution-a5abdac57776097feb6da3d7ef0b36aa5b7b8593.tar
gsoc2013-evolution-a5abdac57776097feb6da3d7ef0b36aa5b7b8593.tar.gz
gsoc2013-evolution-a5abdac57776097feb6da3d7ef0b36aa5b7b8593.tar.bz2
gsoc2013-evolution-a5abdac57776097feb6da3d7ef0b36aa5b7b8593.tar.lz
gsoc2013-evolution-a5abdac57776097feb6da3d7ef0b36aa5b7b8593.tar.xz
gsoc2013-evolution-a5abdac57776097feb6da3d7ef0b36aa5b7b8593.tar.zst
gsoc2013-evolution-a5abdac57776097feb6da3d7ef0b36aa5b7b8593.zip
Don't need the Win32-only fix_percent_l() after all, this is taken care of
2006-06-02 Tor Lillqvist <tml@novell.com> * e-util.c: Don't need the Win32-only fix_percent_l() after all, this is taken care of in e_strftime(). (The check in e-d-s's configure.in for the support of %l and %k has now been made more reliable so it actually works also on Win32.) svn path=/trunk/; revision=32069
-rw-r--r--e-util/ChangeLog7
-rw-r--r--e-util/e-util.c31
2 files changed, 8 insertions, 30 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index b58407da92..3ac20fdfb5 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,10 @@
+2006-06-02 Tor Lillqvist <tml@novell.com>
+
+ * e-util.c: Don't need the Win32-only fix_percent_l() after all,
+ this is taken care of in e_strftime(). (The check in e-d-s's
+ configure.in for the support of %l and %k has now been made more
+ reliable so it actually works also on Win32.)
+
2006-06-02 Frederic Peters <fpeters@entrouvert.com>
* e-error.c: Set new scroll member to false in static
diff --git a/e-util/e-util.c b/e-util/e-util.c
index bfafdc8771..4415961c2b 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -709,24 +709,6 @@ e_sort (void *base,
#endif
}
-#ifdef G_OS_WIN32
-static void
-fix_percent_l(const char **fmt, char **newfmt)
-{
- /* %l is not implemented in the Microsoft C library. Use %I
- * instead. Don't bother that we get a leading zero instead of
- * leading blank for hours 0..9.
- */
- if (strstr(*fmt, "%l")!=NULL) {
- char *p;
- *newfmt=g_strdup(*fmt);
- p=strstr(*newfmt, "%l");
- p[1]='I';
- *fmt=*newfmt;
- }
-}
-#endif
-
/**
* Function to do a last minute fixup of the AM/PM stuff if the locale
* and gettext haven't done it right. Most English speaking countries
@@ -751,15 +733,9 @@ size_t e_strftime_fix_am_pm(char *s, size_t max, const char *fmt, const struct t
char *sp;
char *ffmt;
size_t ret;
-#ifdef G_OS_WIN32
- char *newfmt=NULL;
-#endif
if (strstr(fmt, "%p")==NULL && strstr(fmt, "%P")==NULL) {
/* No AM/PM involved - can use the fmt string directly */
-#ifdef G_OS_WIN32
- fix_percent_l(&fmt, &newfmt);
-#endif
ret=e_strftime(s, max, fmt, tm);
} else {
/* Get the AM/PM symbol from the locale */
@@ -770,9 +746,6 @@ size_t e_strftime_fix_am_pm(char *s, size_t max, const char *fmt, const struct t
* AM/PM have been defined in the locale
* so we can use the fmt string directly
**/
-#ifdef G_OS_WIN32
- fix_percent_l(&fmt, &newfmt);
-#endif
ret=e_strftime(s, max, fmt, tm);
} else {
/**
@@ -794,9 +767,7 @@ size_t e_strftime_fix_am_pm(char *s, size_t max, const char *fmt, const struct t
g_free(ffmt);
}
}
-#ifdef G_OS_WIN32
- g_free(newfmt);
-#endif
+
return(ret);
}