diff --git a/src/util.c b/src/util.c
index 12b7ef7..fbe5359 100644
a
|
b
|
load_mc_home_file (const char *filename, char **allocated_filename) |
635 | 635 | } |
636 | 636 | |
637 | 637 | /* Check strftime() results. Some systems (i.e. Solaris) have different |
638 | | short-month-name sizes for different locales */ |
| 638 | short-month-name sizes for different locales and months */ |
639 | 639 | size_t |
640 | 640 | i18n_checktimelength (void) |
641 | 641 | { |
642 | | size_t length; |
| 642 | size_t length = 0; |
643 | 643 | time_t testtime = time (NULL); |
644 | 644 | struct tm* lt = localtime(&testtime); |
645 | 645 | |
… |
… |
i18n_checktimelength (void) |
648 | 648 | length = str_term_width1 (_(INVALID_TIME_TEXT)); |
649 | 649 | } else { |
650 | 650 | char buf [MB_LEN_MAX * MAX_I18NTIMELENGTH + 1]; |
651 | | size_t a, b; |
652 | 651 | |
653 | | strftime (buf, sizeof(buf) - 1, FMTTIME, lt); |
654 | | a = str_term_width1 (buf); |
655 | | strftime (buf, sizeof(buf) - 1, FMTYEAR, lt); |
656 | | b = str_term_width1 (buf); |
| 652 | for (lt->tm_mon = 0, lt->tm_mday = 1; lt->tm_mon < 12; lt->tm_mon++) { |
| 653 | strftime (buf, sizeof(buf) - 1, FMTTIME, lt); |
| 654 | length = max ((size_t)str_term_width1 (buf), length); |
| 655 | strftime (buf, sizeof(buf) - 1, FMTYEAR, lt); |
| 656 | length = max ((size_t)str_term_width1 (buf), length); |
| 657 | } |
657 | 658 | |
658 | | length = max (a, b); |
659 | 659 | length = max ((size_t)str_term_width1 (_(INVALID_TIME_TEXT)), length); |
660 | 660 | } |
661 | 661 | |