Ticket #1671: i18n_checktimelength may vary depending on the season
commit28eda668032a73e2a433d84b23b8e2a92d04663f
authorYury V. Zaytsev <yury@shurup.com>
Sun, 2 May 2010 11:07:16 +0000 (2 13:07 +0200)
committerYury V. Zaytsev <yury@shurup.com>
Sun, 2 May 2010 11:21:09 +0000 (2 13:21 +0200)
tree7d2f3bbb12eea4ae255c4369c54d66b67c3c60bf
parent5ba9fde28c0ac393ec1f002a5b32d02453ecac03
Ticket #1671: i18n_checktimelength may vary depending on the season

On some systems i18n_checktimelength may vary not only depending on the
locale but also on the current month. This patch introduces a cyclic
check that loops through all of the months to find out which one has the
longest name.

However, since this function is called on every pannel reload and now
makes 24 calls to str_term_width1 and strftime it makes sense to
introduce a cache for the resulting value.

Thanks to Sergey Fionov <fionov@gmail.com> for the initial patch.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
lib/util.c