[Pkg-mc-commits] r245 - in trunk/debian: . patches patches/bugs
Patrick Winnertz
winnie at alioth.debian.org
Fri Aug 14 17:27:52 UTC 2009
Author: winnie
Date: 2009-08-14 17:27:52 +0000 (Fri, 14 Aug 2009)
New Revision: 245
Added:
trunk/debian/patches/bugs/1533_german_date_cut_off.patch
Modified:
trunk/debian/changelog
trunk/debian/patches/series
Log:
Add a small patch to fix the date issue in german locale (Closes: #541104)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-08-14 12:10:47 UTC (rev 244)
+++ trunk/debian/changelog 2009-08-14 17:27:52 UTC (rev 245)
@@ -4,6 +4,8 @@
SMB protocol is not further possible with mc, due to security
issues. (Closes: #541267)
* Added patch to fix codejump if there is a number in the function name
+ * Added patch to fix the broken german date in the mc panels
+ (Closes: #541104)
-- Patrick Winnertz <winnie at debian.org> Fri, 14 Aug 2009 14:04:37 +0200
Added: trunk/debian/patches/bugs/1533_german_date_cut_off.patch
===================================================================
--- trunk/debian/patches/bugs/1533_german_date_cut_off.patch (rev 0)
+++ trunk/debian/patches/bugs/1533_german_date_cut_off.patch 2009-08-14 17:27:52 UTC (rev 245)
@@ -0,0 +1,60 @@
+diff --git a/src/util.c b/src/util.c
+index 213a286..2649182 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -58,6 +58,12 @@
+ #include "charsets.h"
+ #endif
+
++/*In order to use everywhere the same setup
++ for the locale we use defines */
++#define FMTYEAR _("%b %e %Y")
++#define FMTTIME _("%b %e %H:%M")
++
++
+ int easy_patterns = 1;
+
+ extern void str_replace(char *s, char from, char to)
+@@ -623,9 +629,9 @@ i18n_checktimelength (void)
+ char buf [MB_LEN_MAX * MAX_I18NTIMELENGTH + 1];
+ size_t a, b;
+
+- strftime (buf, sizeof(buf) - 1, _("%b %d %H:%M"), lt);
++ strftime (buf, sizeof(buf) - 1, FMTTIME, lt);
+ a = str_term_width1 (buf);
+- strftime (buf, sizeof(buf) - 1, _("%b %d %Y"), lt);
++ strftime (buf, sizeof(buf) - 1, FMTYEAR, lt);
+ b = str_term_width1 (buf);
+
+ length = max (a, b);
+@@ -644,18 +650,8 @@ file_date (time_t when)
+ {
+ static char timebuf [MB_LEN_MAX * MAX_I18NTIMELENGTH + 1];
+ time_t current_time = time ((time_t) 0);
+- static int i18n = 0;
+- static const char *fmtyear, *fmttime;
+ const char *fmt;
+
+- if (!i18n){
+- /* strftime() format string for old dates */
+- fmtyear = _("%b %e %Y");
+- /* strftime() format string for recent dates */
+- fmttime = _("%b %e %H:%M");
+- i18n = 1;
+- }
+-
+ if (current_time > when + 6L * 30L * 24L * 60L * 60L /* Old. */
+ || current_time < when - 60L * 60L) /* In the future. */
+ /* The file is fairly old or in the future.
+@@ -665,9 +661,9 @@ file_date (time_t when)
+ to allow for NFS server/client clock disagreement.
+ Show the year instead of the time of day. */
+
+- fmt = fmtyear;
++ fmt = FMTYEAR;
+ else
+- fmt = fmttime;
++ fmt = FMTTIME;
+
+ FMT_LOCALTIME(timebuf, sizeof (timebuf), fmt, when);
+
Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series 2009-08-14 12:10:47 UTC (rev 244)
+++ trunk/debian/patches/series 2009-08-14 17:27:52 UTC (rev 245)
@@ -28,6 +28,7 @@
bugs/1496_search_backwards_broken.patch
bugs/1527_fix_heap_corruption_on_large_filenames.patch
bugs/1521_ctrl-z-doesnt_work.patch
+bugs/1533_german_date_cut_off.patch
bugs/267_fix_codejump_on_functions_with_nums.patch
man/10_FSSTND_hu_man.patch
man/11_FSSTND_it_man.patch
More information about the Pkg-mc-commits
mailing list