Changeset 09489b89 for stylefunc.c


Ignore:
Timestamp:
Jul 2, 2003, 6:15:24 PM (17 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
373b7e7
Parents:
7c9c847
Message:
First pass at making owl build without zephyr
File:
1 edited

Legend:

Unmodified
Added
Removed
  • stylefunc.c

    r778d0a9 r09489b89  
    99void owl_stylefunc_basic(owl_fmtext *fm, owl_message *m)
    1010{
     11#ifdef HAVE_LIBZEPHYR
    1112  char *body, *indent, *ptr, *zsigbuff, frombuff[LINE];
    1213  ZNotice_t *n;
     14#endif
    1315
    1416  if (owl_message_is_type_zephyr(m) && owl_message_is_direction_in(m)) {
     17#ifdef HAVE_LIBZEPHYR
    1518    n=owl_message_get_notice(m);
    16 
     19 
    1720    /* get the body */
    1821    body=owl_strdup(owl_message_get_body(m));
     
    3134    strcpy(frombuff, owl_message_get_sender(m));
    3235    ptr=strchr(frombuff, '@');
    33     if (ptr && !strncmp(ptr+1, ZGetRealm(), strlen(ZGetRealm()))) {
     36    if (ptr && !strncmp(ptr+1, owl_zephyr_get_realm(), strlen(owl_zephyr_get_realm()))) {
    3437      *ptr='\0';
    3538    }
     
    8487      }
    8588      owl_fmtext_append_normal(fm, frombuff);
    86       if (strcasecmp(owl_message_get_realm(m), ZGetRealm())) {
     89      if (strcasecmp(owl_message_get_realm(m), owl_zephyr_get_realm()) {
    8790        owl_fmtext_append_normal(fm, " {");
    8891        owl_fmtext_append_normal(fm, owl_message_get_realm(m));
     
    112115    owl_free(body);
    113116    owl_free(indent);
     117#endif
    114118  } else if (owl_message_is_type_zephyr(m) && owl_message_is_direction_out(m)) {
    115119    char *indent, *text, *zsigbuff, *foo;
     
    200204void owl_stylefunc_default(owl_fmtext *fm, owl_message *m)
    201205{
     206#ifdef HAVE_LIBZEPHYR
    202207  char *body, *indent, *ptr, *zsigbuff, frombuff[LINE];
    203208  ZNotice_t *n;
     209#endif
    204210
    205211  if (owl_message_is_type_zephyr(m) && owl_message_is_direction_in(m)) {
     212#ifdef HAVE_LIBZEPHYR
    206213    n=owl_message_get_notice(m);
    207  
     214
    208215    /* get the body */
    209216    body=owl_malloc(strlen(owl_message_get_body(m))+30);
     
    222229    strcpy(frombuff, owl_message_get_sender(m));
    223230    ptr=strchr(frombuff, '@');
    224     if (ptr && !strncmp(ptr+1, ZGetRealm(), strlen(ZGetRealm()))) {
     231    if (ptr && !strncmp(ptr+1, owl_zephyr_get_realm(), strlen(owl_zephyr_get_realm()))) {
    225232      *ptr='\0';
    226233    }
     
    254261      }
    255262      owl_fmtext_append_normal(fm, " for ");
    256       ptr=short_zuser(n->z_class_inst);
     263      ptr=short_zuser(owl_zephyr_get_instance(m));
    257264      owl_fmtext_append_bold(fm, ptr);
    258265      owl_free(ptr);
     
    276283        owl_fmtext_append_normal(fm, "} ");
    277284      }
    278       if (n->z_opcode[0]!='\0') {
     285      if (strccmp(owl_zephyr_get_opcode(m), "")) {
    279286        owl_fmtext_append_normal(fm, " [");
    280287        owl_fmtext_append_normal(fm, owl_message_get_opcode(m));
     
    304311    owl_free(body);
    305312    owl_free(indent);
     313#endif
    306314  } else if (owl_message_is_type_zephyr(m) && owl_message_is_direction_out(m)) {
    307315    char *indent, *text, *zsigbuff, *foo;
     
    395403  char *baseformat="%s %-13.13s %-11.11s %-12.12s ";
    396404  char *sender, *recip;
     405#ifdef HAVE_LIBZEPHYR
    397406  ZNotice_t *n;
    398 
     407#endif
    399408
    400409  sender=short_zuser(owl_message_get_sender(m));
     
    402411 
    403412  if (owl_message_is_type_zephyr(m)) {
     413#ifdef HAVE_LIBZEPHYR
    404414    n=owl_message_get_notice(m);
    405415   
     
    472482    owl_free(sender);
    473483    owl_free(recip);
    474    
     484#endif
    475485  } else if (owl_message_is_type_aim(m)) {
    476486    owl_fmtext_append_spaces(fm, OWL_TAB);
Note: See TracChangeset for help on using the changeset viewer.