Changeset 42a0c8b


Ignore:
Timestamp:
Sep 16, 2011, 1:16:26 AM (13 years ago)
Author:
GitHub Merge Button <merge-button@github.com>
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.
Message:
Merge 6edc38b038b3087836f5666d5f0b5820e4499c2c into 732d5c0e9d9ef138feef0e02f8c2ad5840e830a2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Complete/Client.pm

    r58f4fb2 r6edc38b  
    205205BarnOwl::Completion::register_completer(set     => \&complete_set);
    206206BarnOwl::Completion::register_completer(unset   => \&complete_set);
    207 BarnOwl::Completion::register_completer(startup => \&complete_startup);
     207BarnOwl::Completion::register_completer(startup   => \&complete_startup);
     208BarnOwl::Completion::register_completer(unstartup => \&complete_startup);
    208209BarnOwl::Completion::register_completer(bindkey => \&complete_bindkey);
    209210BarnOwl::Completion::register_completer(print   => \&complete_print);
  • functions.c

    r3b17b57 r6646fdb  
    12231223  now = time(NULL);
    12241224
    1225   tmpbuff = owl_util_time_to_timestr(localtime(&now));
     1225  tmpbuff = owl_util_format_time(localtime(&now));
    12261226  fprintf(file, "[%d -  %s - %lds]: ",
    12271227          (int) getpid(), tmpbuff, now - owl_global_get_starttime(&g));
     
    13731373  owl_fmtext fm, attrfm;
    13741374  const owl_view *v;
     1375  char *time;
    13751376#ifdef HAVE_LIBZEPHYR
    13761377  const ZNotice_t *n;
     
    14031404  }
    14041405
    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);
    14061409
    14071410  if (!owl_message_is_type_admin(m)) {
     
    17761779  owl_fmtext_append_normal(&fm, "\n");
    17771780
    1778   tmpbuff = owl_util_time_to_timestr(localtime(&start));
     1781  tmpbuff = owl_util_format_time(localtime(&start));
    17791782  owl_fmtext_appendf_normal(&fm, "  Startup Time: %s\n", tmpbuff);
    17801783  g_free(tmpbuff);
     
    30723075      idle=owl_buddy_get_idle_time(b);
    30733076      if (idle!=0) {
    3074         timestr=owl_util_minutes_to_timestr(idle);
     3077        timestr=owl_util_format_minutes(idle);
    30753078      } else {
    30763079        timestr=g_strdup("");
     
    34013404
    34023405  now = time(NULL);
    3403   date = owl_util_time_to_timestr(localtime(&now));
     3406  date = owl_util_format_time(localtime(&now));
    34043407
    34053408  buff = g_strdup_printf("%s %s", date, string);
  • message.c

    rb9517cf r6646fdb  
    4343  /* save the time */
    4444  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';
    4647
    4748  m->fmtext = NULL;
     
    344345  if (m->timestr) return(m->timestr);
    345346  return("");
     347}
     348
     349CALLER_OWN char *owl_message_format_time(const owl_message *m)
     350{
     351  return owl_util_format_time(localtime(&m->time));
    346352}
    347353
     
    793799  if (m->timestr) g_free(m->timestr);
    794800  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';
    796803
    797804  /* set other info */
  • perl/lib/BarnOwl/Style/Default.pm

    r5738650 r732d5c0  
    113113        }
    114114        $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        }
    115118    }
    116119
  • util.c

    rf271129 r6646fdb  
    268268
    269269/* caller must free the return */
    270 CALLER_OWN char *owl_util_minutes_to_timestr(int in)
     270CALLER_OWN char *owl_util_format_minutes(int in)
    271271{
    272272  int days, hours;
     
    289289}
    290290
    291 CALLER_OWN char *owl_util_time_to_timestr(const struct tm *time)
     291CALLER_OWN char *owl_util_format_time(const struct tm *time)
    292292{
    293293  /* 32 chosen for first attempt because timestr will end up being
Note: See TracChangeset for help on using the changeset viewer.