diff options
author | Federico Mena Quintero <federico@nuclecu.unam.mx> | 1999-03-31 04:38:06 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-03-31 04:38:06 +0800 |
commit | 1217f279ad9a5c79d61642a49eba38a552c1ec52 (patch) | |
tree | 27b455fe6085822691b25e3ed99059bcc4076599 | |
parent | 841b3a9102bf9be685571ae278128ddfec1afa46 (diff) | |
download | gsoc2013-evolution-1217f279ad9a5c79d61642a49eba38a552c1ec52.tar gsoc2013-evolution-1217f279ad9a5c79d61642a49eba38a552c1ec52.tar.gz gsoc2013-evolution-1217f279ad9a5c79d61642a49eba38a552c1ec52.tar.bz2 gsoc2013-evolution-1217f279ad9a5c79d61642a49eba38a552c1ec52.tar.lz gsoc2013-evolution-1217f279ad9a5c79d61642a49eba38a552c1ec52.tar.xz gsoc2013-evolution-1217f279ad9a5c79d61642a49eba38a552c1ec52.tar.zst gsoc2013-evolution-1217f279ad9a5c79d61642a49eba38a552c1ec52.zip |
Made static. Make it use the full year format for strftime().
1999-03-30 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gncal-todo.c (convert_time_t_to_char): Made static. Make it use
the full year format for strftime().
svn path=/trunk/; revision=791
-rw-r--r-- | calendar/ChangeLog | 5 | ||||
-rw-r--r-- | calendar/gncal-todo.c | 15 | ||||
-rw-r--r-- | calendar/gui/gncal-todo.c | 15 |
3 files changed, 17 insertions, 18 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 43ebb8ab47..6f338a09b2 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +1999-03-30 Federico Mena Quintero <federico@nuclecu.unam.mx> + + * gncal-todo.c (convert_time_t_to_char): Made static. Make it use + the full year format for strftime(). + 1999-03-27 Nuno Ferreira <nmrf@rnl.ist.utl.pt> * calobj.c: Include <config.h> So that strings get translated. diff --git a/calendar/gncal-todo.c b/calendar/gncal-todo.c index 669b07e07e..e1c708384b 100644 --- a/calendar/gncal-todo.c +++ b/calendar/gncal-todo.c @@ -473,22 +473,19 @@ gncal_todo_new (GnomeCalendar *calendar) return GTK_WIDGET (todo); } - - -char * +static char * convert_time_t_to_char (time_t t) { - char *buffer; + char buf[100]; struct tm *tm; - buffer = g_malloc(15); tm = localtime (&t); - strftime(buffer, 15, "%m/%d/%y", tm); + strftime(buf, sizeof (buf), "%m/%d/%Y", tm); - return buffer; + return g_strdup (buf); } -GtkStyle * +static GtkStyle * make_overdue_todo_style(GncalTodo *todo) { GtkStyle *overdue_style = NULL; @@ -531,7 +528,7 @@ insert_in_clist (GncalTodo *todo, iCalObject *ico) */ if(ico->dtend && todo_show_due_date) { - text[1] = convert_time_t_to_char(ico->dtend); + text[1] = convert_time_t_to_char (ico->dtend); /* Append the data's pointer so later it can be properly freed */ todo->data_ptrs = g_slist_append (todo->data_ptrs, text[1]); } diff --git a/calendar/gui/gncal-todo.c b/calendar/gui/gncal-todo.c index 669b07e07e..e1c708384b 100644 --- a/calendar/gui/gncal-todo.c +++ b/calendar/gui/gncal-todo.c @@ -473,22 +473,19 @@ gncal_todo_new (GnomeCalendar *calendar) return GTK_WIDGET (todo); } - - -char * +static char * convert_time_t_to_char (time_t t) { - char *buffer; + char buf[100]; struct tm *tm; - buffer = g_malloc(15); tm = localtime (&t); - strftime(buffer, 15, "%m/%d/%y", tm); + strftime(buf, sizeof (buf), "%m/%d/%Y", tm); - return buffer; + return g_strdup (buf); } -GtkStyle * +static GtkStyle * make_overdue_todo_style(GncalTodo *todo) { GtkStyle *overdue_style = NULL; @@ -531,7 +528,7 @@ insert_in_clist (GncalTodo *todo, iCalObject *ico) */ if(ico->dtend && todo_show_due_date) { - text[1] = convert_time_t_to_char(ico->dtend); + text[1] = convert_time_t_to_char (ico->dtend); /* Append the data's pointer so later it can be properly freed */ todo->data_ptrs = g_slist_append (todo->data_ptrs, text[1]); } |