Changeset ad15610 for perlconfig.c


Ignore:
Timestamp:
Aug 8, 2007, 6:01:51 PM (13 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
ce7b824
Parents:
b51d257
Message:
Applying ctl's variable shuffling patch for better ANSI C-ness. closes #18
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    rf6b319c rad15610  
    137137  char *key,*val;
    138138  HV * hash;
     139  struct tm tm;
    139140
    140141  hash = (HV*)SvRV(msg);
     
    162163    } else if (!strcmp(key, "time")) {
    163164      m->timestr = owl_strdup(val);
    164       struct tm tm;
    165165      strptime(val, "%a %b %d %T %Y", &tm);
    166166      m->time = mktime(&tm);
     
    445445  int i, count;
    446446  char * ret = NULL;
     447  SV *rv;
    447448  STRLEN n_a;
    448449  dSP;
     
    467468    if(count != 1)
    468469      croak("Perl command %s returned more than one value!", cmd->name);
    469     SV * rv = POPs;
     470    rv = POPs;
    470471    if(SvTRUE(rv)) {
    471472      ret = owl_strdup(SvPV(rv, n_a));
     
    488489  SV *cb = (SV*)(e->cbdata);
    489490  unsigned int n_a;
     491  dSP;
     492
    490493  if(cb == NULL) {
    491494    owl_function_error("Perl callback is NULL!");
    492495  }
    493 
    494   dSP;
    495496
    496497  ENTER;
     
    516517void owl_perlconfig_mainloop()
    517518{
     519  dSP;
    518520  if (!owl_perlconfig_is_function("BarnOwl::Hooks::_mainloop_hook"))
    519521    return;
    520   dSP ;
    521522  PUSHMARK(SP) ;
    522523  call_pv("BarnOwl::Hooks::_mainloop_hook", G_DISCARD|G_EVAL);
Note: See TracChangeset for help on using the changeset viewer.