tnow = time (NULL);
t_fmt = tnow - folder->ff->mtime < 31536000 ? "%b %d %H:%M" : "%b %d %Y";
}
- if (do_locales)
- setlocale(LC_TIME, NONULL (Locale)); /* use environment if $locale is not set */
- else
- setlocale(LC_TIME, "C");
- strftime (date, sizeof (date), t_fmt, localtime (&folder->ff->mtime));
+
+ if (!do_locales)
+ setlocale (LC_TIME, "C");
+ strftime (date, sizeof (date), t_fmt, localtime (&folder->ff->mtime));
+ if (!do_locales)
+ setlocale (LC_TIME, "");
mutt_format_s (dest, destlen, fmt, date);
}
{
char p[STRING];
- setlocale (LC_TIME, "");
#ifdef HAVE_LANGINFO_D_T_FMT
strftime (p, sizeof (p), nl_langinfo (D_T_FMT), localtime (&t));
#else
strftime (p, sizeof (p), "%c", localtime (&t));
#endif
- setlocale (LC_TIME, "C");
state_attach_puts (p, s);
}
}
*p = 0;
- if (do_locales && Locale)
- setlocale (LC_TIME, Locale);
-
{
time_t tt = 0;
tm = localtime (&tt);
}
- strftime (buf2, sizeof (buf2), dest, tm);
- if (do_locales)
- setlocale (LC_TIME, "C");
-
+ if (!do_locales)
+ setlocale (LC_TIME, "C");
+ strftime (buf2, sizeof (buf2), dest, tm);
+ if (!do_locales)
+ setlocale (LC_TIME, "");
+
snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
snprintf (dest, destlen, fmt, buf2);
if (len > 0)
int i;
gpgme_user_id_t uid = NULL;
- if (Locale)
- setlocale (LC_TIME, Locale);
-
is_pgp = key->protocol == GPGME_PROTOCOL_OpenPGP;
for (idx = 0, uid = key->uids; uid; idx++, uid = uid->next)
putc ('\n', fp);
}
}
-
- if (Locale)
- setlocale (LC_TIME, "C");
}
if (option (OPTCRYPTTIMESTAMP))
{
t = time(NULL);
- setlocale (LC_TIME, "");
strftime (p, sizeof (p), _(" (current time: %c)"), localtime (&t));
- setlocale (LC_TIME, "C");
}
else
*p = '\0';
#endif
WHERE char *Inbox;
WHERE char *Ispell;
-WHERE char *Locale;
WHERE char *MailcapPath;
WHERE char *Maildir;
#if defined(USE_IMAP) || defined(USE_POP)
}
*p = 0;
- if (do_locales && Locale)
- setlocale (LC_TIME, Locale);
-
if (op == '[' || op == 'D')
tm = localtime (&hdr->date_sent);
else if (op == '(')
tm = gmtime (&T);
}
- strftime (buf2, sizeof (buf2), dest, tm);
-
- if (do_locales)
- setlocale (LC_TIME, "C");
+ if (!do_locales)
+ setlocale (LC_TIME, "C");
+ strftime (buf2, sizeof (buf2), dest, tm);
+ if (!do_locales)
+ setlocale (LC_TIME, "");
mutt_format_s (dest, destlen, prefix, buf2);
if (len > 0 && op != 'd' && op != 'D') /* Skip ending op */
** from your spool mailbox to your $$mbox mailbox, or as a result of
** a ``$mbox-hook'' command.
*/
- { "locale", DT_STR, R_BOTH, UL &Locale, UL "C" },
- /*
- ** .pp
- ** The locale used by \fCstrftime(3)\fP to format dates. Legal values are
- ** the strings your system accepts for the locale environment variable \fC$$$LC_TIME\fP.
- */
{ "mail_check", DT_NUM, R_NONE, UL &BuffyTimeout, 5 },
/*
** .pp
exit(1);
}
+ setlocale (LC_ALL, "");
+
#ifdef ENABLE_NLS
/* FIXME what about init.c:1439 ? */
- setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, MUTTLOCALEDIR);
textdomain (PACKAGE);
#endif
- setlocale (LC_CTYPE, "");
-
mutt_error = mutt_nocurses_error;
mutt_message = mutt_nocurses_error;
SRAND (time (NULL));
}
*p = 0;
- if (do_locales && Locale)
- setlocale (LC_TIME, Locale);
tm = localtime (&key->gen_time);
- strftime (buf2, sizeof (buf2), dest, tm);
-
- if (do_locales)
- setlocale (LC_TIME, "C");
+ if (!do_locales)
+ setlocale (LC_TIME, "C");
+ strftime (buf2, sizeof (buf2), dest, tm);
+ if (!do_locales)
+ setlocale (LC_TIME, "");
snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
snprintf (dest, destlen, fmt, buf2);