diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/editfns.c | 15 |
2 files changed, 8 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ae796a64db7..9b88e6a2fa3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2007-06-07 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * s/ms-w32.h: Don't define HAVE_TZNAME. | ||
| 4 | |||
| 5 | * editfns.c (Fcurrent_time_zone): Remove hack for Japanese Windows. | ||
| 6 | |||
| 1 | 2007-06-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 7 | 2007-06-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 8 | ||
| 3 | * mac.c (xrm_get_preference_database): Remove BLOCK_INPUT. | 9 | * mac.c (xrm_get_preference_database): Remove BLOCK_INPUT. |
diff --git a/src/editfns.c b/src/editfns.c index 37498e3b6f7..2f759a38dd0 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1974,6 +1974,7 @@ the data it can't find. */) | |||
| 1974 | int offset = tm_diff (t, &gmt); | 1974 | int offset = tm_diff (t, &gmt); |
| 1975 | char *s = 0; | 1975 | char *s = 0; |
| 1976 | char buf[6]; | 1976 | char buf[6]; |
| 1977 | |||
| 1977 | #ifdef HAVE_TM_ZONE | 1978 | #ifdef HAVE_TM_ZONE |
| 1978 | if (t->tm_zone) | 1979 | if (t->tm_zone) |
| 1979 | s = (char *)t->tm_zone; | 1980 | s = (char *)t->tm_zone; |
| @@ -1984,19 +1985,6 @@ the data it can't find. */) | |||
| 1984 | #endif | 1985 | #endif |
| 1985 | #endif /* not HAVE_TM_ZONE */ | 1986 | #endif /* not HAVE_TM_ZONE */ |
| 1986 | 1987 | ||
| 1987 | #if defined HAVE_TM_ZONE || defined HAVE_TZNAME | ||
| 1988 | if (s) | ||
| 1989 | { | ||
| 1990 | /* On Japanese w32, we can get a Japanese string as time | ||
| 1991 | zone name. Don't accept that. */ | ||
| 1992 | char *p; | ||
| 1993 | for (p = s; *p && (isalnum ((unsigned char)*p) || *p == ' '); ++p) | ||
| 1994 | ; | ||
| 1995 | if (p == s || *p) | ||
| 1996 | s = NULL; | ||
| 1997 | } | ||
| 1998 | #endif | ||
| 1999 | |||
| 2000 | if (!s) | 1988 | if (!s) |
| 2001 | { | 1989 | { |
| 2002 | /* No local time zone name is available; use "+-NNNN" instead. */ | 1990 | /* No local time zone name is available; use "+-NNNN" instead. */ |
| @@ -2004,6 +1992,7 @@ the data it can't find. */) | |||
| 2004 | sprintf (buf, "%c%02d%02d", (offset < 0 ? '-' : '+'), am/60, am%60); | 1992 | sprintf (buf, "%c%02d%02d", (offset < 0 ? '-' : '+'), am/60, am%60); |
| 2005 | s = buf; | 1993 | s = buf; |
| 2006 | } | 1994 | } |
| 1995 | |||
| 2007 | return Fcons (make_number (offset), Fcons (build_string (s), Qnil)); | 1996 | return Fcons (make_number (offset), Fcons (build_string (s), Qnil)); |
| 2008 | } | 1997 | } |
| 2009 | else | 1998 | else |