[Commits] [SCM] claws branch, master, updated. 3.9.3-196-g28033d0

claws at claws-mail.org claws at claws-mail.org
Fri May 16 07:14:48 CEST 2014


The branch master of project "claws" (Claws Mail) has been updated
       via  28033d066dd59ca5347ad597e206980918764eea (commit)
      from  08057fc6b0e71a9178f95d63514be5260916b2c1 (commit)


- Log -----------------------------------------------------------------
commit 28033d066dd59ca5347ad597e206980918764eea
Author: Paul <paul at claws-mail.org>
Date:   Fri May 16 06:14:35 2014 +0100

    remove no-longer-needed fast_strftime()
    
    these date formats no longer rely on translations

diff --git a/src/common/utils.c b/src/common/utils.c
index 5dd2f2b..104c691 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -4945,11 +4945,6 @@ gint s_pm_up_len = 0;
 gint s_am_low_len = 0;
 gint s_pm_low_len = 0;
 
-const gchar *def_loc_format = NULL;
-const gchar *date_loc_format = NULL;
-const gchar *time_loc_format = NULL;
-const gchar *time_am_pm = NULL;
-
 static gboolean time_names_init_done = FALSE;
 
 static void init_time_names(void)
@@ -5016,12 +5011,6 @@ static void init_time_names(void)
 	s_pm_up_len = strlen(s_pm_up);
 	s_am_low_len = strlen(s_am_low);
 	s_pm_low_len = strlen(s_pm_low);
-	
-	def_loc_format = C_("For use by strftime (default date+time format)", "%a %b %e %H:%M:%S %Y");
-	date_loc_format = C_("For use by strftime (default date format)", "%m/%d/%y");
-	time_loc_format = C_("For use by strftime (default time format)", "%H:%M:%S");
-
-	time_am_pm = C_("For use by strftime (default 12-hour time format)", "%I:%M:%S %p");
 
 	time_names_init_done = TRUE;
 }
@@ -5078,7 +5067,7 @@ size_t fast_strftime(gchar *buf, gint buflen, const gchar *format, struct tm *lt
 				strncpy2(curpos, monthnames[lt->tm_mon], buflen - total_done);
 				break;
 			case 'c':
-				fast_strftime(subbuf, 64, def_loc_format, lt);
+				strftime(subbuf, 64, "%c", lt);
 				len = strlen(subbuf); CHECK_SIZE();
 				strncpy2(curpos, subbuf, buflen - total_done);
 				break;
@@ -5180,7 +5169,7 @@ size_t fast_strftime(gchar *buf, gint buflen, const gchar *format, struct tm *lt
 				}
 				break;
 			case 'r':
-				fast_strftime(subbuf, 64, time_am_pm, lt);
+				strftime(subbuf, 64, "%r", lt);
 				len = strlen(subbuf); CHECK_SIZE();
 				strncpy2(curpos, subbuf, buflen - total_done);
 				break;
@@ -5226,12 +5215,12 @@ size_t fast_strftime(gchar *buf, gint buflen, const gchar *format, struct tm *lt
 				snprintf(curpos, buflen - total_done, "%d", lt->tm_wday);
 				break;
 			case 'x':
-				fast_strftime(subbuf, 64, date_loc_format, lt);
+				strftime(subbuf, 64, "%x", lt);
 				len = strlen(subbuf); CHECK_SIZE();
 				strncpy2(curpos, subbuf, buflen - total_done);
 				break;
 			case 'X':
-				fast_strftime(subbuf, 64, time_loc_format, lt);
+				strftime(subbuf, 64, "%X", lt);
 				len = strlen(subbuf); CHECK_SIZE();
 				strncpy2(curpos, subbuf, buflen - total_done);
 				break;

-----------------------------------------------------------------------

Summary of changes:
 src/common/utils.c |   19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list