Changeset 42a0c8b
- Timestamp:
- Sep 16, 2011, 1:16:26 AM (13 years ago)
- Parents:
- 732d5c0 (diff), 6edc38b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl/Complete/Client.pm
r58f4fb2 r6edc38b 205 205 BarnOwl::Completion::register_completer(set => \&complete_set); 206 206 BarnOwl::Completion::register_completer(unset => \&complete_set); 207 BarnOwl::Completion::register_completer(startup => \&complete_startup); 207 BarnOwl::Completion::register_completer(startup => \&complete_startup); 208 BarnOwl::Completion::register_completer(unstartup => \&complete_startup); 208 209 BarnOwl::Completion::register_completer(bindkey => \&complete_bindkey); 209 210 BarnOwl::Completion::register_completer(print => \&complete_print); -
functions.c
r3b17b57 r6646fdb 1223 1223 now = time(NULL); 1224 1224 1225 tmpbuff = owl_util_ time_to_timestr(localtime(&now));1225 tmpbuff = owl_util_format_time(localtime(&now)); 1226 1226 fprintf(file, "[%d - %s - %lds]: ", 1227 1227 (int) getpid(), tmpbuff, now - owl_global_get_starttime(&g)); … … 1373 1373 owl_fmtext fm, attrfm; 1374 1374 const owl_view *v; 1375 char *time; 1375 1376 #ifdef HAVE_LIBZEPHYR 1376 1377 const ZNotice_t *n; … … 1403 1404 } 1404 1405 1405 owl_fmtext_appendf_normal(&fm, " Time : %s\n", owl_message_get_timestr(m)); 1406 time = owl_message_format_time(m); 1407 owl_fmtext_appendf_normal(&fm, " Time : %s\n", time); 1408 g_free(time); 1406 1409 1407 1410 if (!owl_message_is_type_admin(m)) { … … 1776 1779 owl_fmtext_append_normal(&fm, "\n"); 1777 1780 1778 tmpbuff = owl_util_ time_to_timestr(localtime(&start));1781 tmpbuff = owl_util_format_time(localtime(&start)); 1779 1782 owl_fmtext_appendf_normal(&fm, " Startup Time: %s\n", tmpbuff); 1780 1783 g_free(tmpbuff); … … 3072 3075 idle=owl_buddy_get_idle_time(b); 3073 3076 if (idle!=0) { 3074 timestr=owl_util_ minutes_to_timestr(idle);3077 timestr=owl_util_format_minutes(idle); 3075 3078 } else { 3076 3079 timestr=g_strdup(""); … … 3401 3404 3402 3405 now = time(NULL); 3403 date = owl_util_ time_to_timestr(localtime(&now));3406 date = owl_util_format_time(localtime(&now)); 3404 3407 3405 3408 buff = g_strdup_printf("%s %s", date, string); -
message.c
rb9517cf r6646fdb 43 43 /* save the time */ 44 44 m->time = time(NULL); 45 m->timestr = owl_util_time_to_timestr(localtime(&m->time)); 45 m->timestr = g_strdup(ctime(&m->time)); 46 m->timestr[strlen(m->timestr)-1] = '\0'; 46 47 47 48 m->fmtext = NULL; … … 344 345 if (m->timestr) return(m->timestr); 345 346 return(""); 347 } 348 349 CALLER_OWN char *owl_message_format_time(const owl_message *m) 350 { 351 return owl_util_format_time(localtime(&m->time)); 346 352 } 347 353 … … 793 799 if (m->timestr) g_free(m->timestr); 794 800 m->time = n->z_time.tv_sec; 795 m->timestr = owl_util_time_to_timestr(localtime(&m->time)); 801 m->timestr = g_strdup(ctime(&m->time)); 802 m->timestr[strlen(m->timestr)-1] = '\0'; 796 803 797 804 /* set other info */ -
perl/lib/BarnOwl/Style/Default.pm
r5738650 r732d5c0 113 113 } 114 114 $header .= '@b{' . maybe($m->pretty_sender) . '}'; 115 if (defined($m->realm) && $m->realm ne BarnOwl::zephyr_getrealm()) { 116 $header .= ' {' . $self->humanize($m->realm, 1) . '}'; 117 } 115 118 } 116 119 -
util.c
rf271129 r6646fdb 268 268 269 269 /* caller must free the return */ 270 CALLER_OWN char *owl_util_ minutes_to_timestr(int in)270 CALLER_OWN char *owl_util_format_minutes(int in) 271 271 { 272 272 int days, hours; … … 289 289 } 290 290 291 CALLER_OWN char *owl_util_ time_to_timestr(const struct tm *time)291 CALLER_OWN char *owl_util_format_time(const struct tm *time) 292 292 { 293 293 /* 32 chosen for first attempt because timestr will end up being
Note: See TracChangeset
for help on using the changeset viewer.