Changeset 37eab7f for stylefunc.c


Ignore:
Timestamp:
Oct 25, 2003, 11:53:43 PM (18 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:
eec69e1
Parents:
8c92848
Message:
Added the loopback message type
Added the loopwrite command
File:
1 edited

Legend:

Unmodified
Added
Removed
  • stylefunc.c

    rec6ff52 r37eab7f  
    199199   
    200200    owl_free(indent);
     201  } else {
     202    char *text, *header, *indent;
     203   
     204    text=owl_message_get_body(m);
     205    header=owl_sprintf("%s from: %s to: %s",
     206                       owl_message_get_type(m),
     207                       owl_message_get_sender(m),
     208                       owl_message_get_recipient(m));
     209   
     210    indent=owl_malloc(strlen(text)+owl_text_num_lines(text)*OWL_MSGTAB+10);
     211    owl_text_indent(indent, text, OWL_MSGTAB);
     212    owl_fmtext_append_normal(fm, OWL_TABSTR);
     213    owl_fmtext_append_normal(fm, header);
     214    owl_fmtext_append_normal(fm, "\n");
     215    owl_fmtext_append_normal(fm, indent);
     216    if (text[strlen(text)-1]!='\n') {
     217      owl_fmtext_append_normal(fm, "\n");
     218    }
     219   
     220    owl_free(indent);
     221    owl_free(header);
    201222  }
    202223}
     
    395416   
    396417    owl_free(indent);
     418  } else {
     419    char *text, *header, *indent;
     420   
     421    text=owl_message_get_body(m);
     422    header=owl_sprintf("%s from: %s to: %s",
     423                       owl_message_get_type(m),
     424                       owl_message_get_sender(m),
     425                       owl_message_get_recipient(m));
     426   
     427    indent=owl_malloc(strlen(text)+owl_text_num_lines(text)*OWL_MSGTAB+10);
     428    owl_text_indent(indent, text, OWL_MSGTAB);
     429    owl_fmtext_append_normal(fm, OWL_TABSTR);
     430    owl_fmtext_append_normal(fm, header);
     431    owl_fmtext_append_normal(fm, "\n");
     432    owl_fmtext_append_normal(fm, indent);
     433    if (text[strlen(text)-1]!='\n') {
     434      owl_fmtext_append_normal(fm, "\n");
     435    }
     436   
     437    owl_free(indent);
     438    owl_free(header);
    397439  }
    398440}
     
    526568    owl_fmtext_append_normal(fm, "\n");
    527569    if (tmp) owl_free(tmp);
    528   }
     570  } else {
     571    owl_fmtext_append_spaces(fm, OWL_TAB);
     572    owl_fmtext_append_normal(fm, "< LOOPBACK                                     ");
     573   
     574    tmp=owl_strdup(owl_message_get_body(m));
     575    owl_util_tr(tmp, '\n', ' ');
     576    owl_fmtext_append_normal(fm, tmp);
     577    owl_fmtext_append_normal(fm, "\n");
     578    if (tmp) owl_free(tmp);
     579  }   
    529580
    530581}
     
    736787   
    737788    owl_free(indent);
     789  } else {
     790
    738791  }
    739792}
Note: See TracChangeset for help on using the changeset viewer.