Changeset 5639bf2 for stylefunc.c


Ignore:
Timestamp:
Jun 21, 2003, 11:17:28 AM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
be0a79f
Parents:
b1299da
Message:
'M' now displays a message using the default style regardless
  of the current style.
Removed some memory leaks introduced in new use of styles.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • stylefunc.c

    rc3ab155 r5639bf2  
    33static const char fileIdent[] = "$Id$";
    44
     5/* In all of these functions, 'fm' is expected to already be
     6 * initialized.
     7 */
     8   
    59void owl_stylefunc_basic(owl_fmtext *fm, owl_message *m)
    610{
     
    109113    indent=owl_malloc(strlen(text)+owl_text_num_lines(text)*OWL_MSGTAB+10);
    110114    owl_text_indent(indent, text, OWL_MSGTAB);
    111     owl_fmtext_init_null(fm);
    112115    owl_fmtext_append_normal(fm, OWL_TABSTR);
    113116    owl_fmtext_append_normal(fm, "To: ");
     
    134137   
    135138    if (owl_message_is_loginout(m)) {
    136       owl_fmtext_init_null(fm);
    137139      owl_fmtext_append_normal(fm, OWL_TABSTR);
    138140      if (owl_message_is_login(m)) {
     
    147149      indent=owl_malloc(strlen(owl_message_get_body(m))+owl_text_num_lines(owl_message_get_body(m))*OWL_MSGTAB+10);
    148150      owl_text_indent(indent, owl_message_get_body(m), OWL_MSGTAB);
    149       owl_fmtext_init_null(fm);
    150151      owl_fmtext_append_bold(fm, OWL_TABSTR);
    151152      owl_fmtext_append_bold(fm, "AIM from ");
     
    160161      indent=owl_malloc(strlen(owl_message_get_body(m))+owl_text_num_lines(owl_message_get_body(m))*OWL_MSGTAB+10);
    161162      owl_text_indent(indent, owl_message_get_body(m), OWL_MSGTAB);
    162       owl_fmtext_init_null(fm);
    163163      owl_fmtext_append_normal(fm, OWL_TABSTR);
    164164      owl_fmtext_append_normal(fm, "AIM sent to ");
     
    179179    indent=owl_malloc(strlen(text)+owl_text_num_lines(text)*OWL_MSGTAB+10);
    180180    owl_text_indent(indent, text, OWL_MSGTAB);
    181     owl_fmtext_init_null(fm);
    182181    owl_fmtext_append_normal(fm, OWL_TABSTR);
    183182    owl_fmtext_append_bold(fm, "OWL ADMIN ");
     
    222221   
    223222    /* set the message for printing */
    224     owl_fmtext_init_null(fm);
    225223    owl_fmtext_append_normal(fm, OWL_TABSTR);
    226224   
     
    301299    indent=owl_malloc(strlen(text)+owl_text_num_lines(text)*OWL_MSGTAB+10);
    302300    owl_text_indent(indent, text, OWL_MSGTAB);
    303     owl_fmtext_init_null(fm);
    304301    owl_fmtext_append_normal(fm, OWL_TABSTR);
    305302    owl_fmtext_append_normal(fm, "Zephyr sent to ");
     
    326323   
    327324    if (owl_message_is_loginout(m)) {
    328       owl_fmtext_init_null(fm);
    329325      owl_fmtext_append_normal(fm, OWL_TABSTR);
    330326      if (owl_message_is_login(m)) {
     
    339335      indent=owl_malloc(strlen(owl_message_get_body(m))+owl_text_num_lines(owl_message_get_body(m))*OWL_MSGTAB+10);
    340336      owl_text_indent(indent, owl_message_get_body(m), OWL_MSGTAB);
    341       owl_fmtext_init_null(fm);
    342337      owl_fmtext_append_bold(fm, OWL_TABSTR);
    343338      owl_fmtext_append_bold(fm, "AIM from ");
     
    352347      indent=owl_malloc(strlen(owl_message_get_body(m))+owl_text_num_lines(owl_message_get_body(m))*OWL_MSGTAB+10);
    353348      owl_text_indent(indent, owl_message_get_body(m), OWL_MSGTAB);
    354       owl_fmtext_init_null(fm);
    355349      owl_fmtext_append_normal(fm, OWL_TABSTR);
    356350      owl_fmtext_append_normal(fm, "AIM sent to ");
     
    371365    indent=owl_malloc(strlen(text)+owl_text_num_lines(text)*OWL_MSGTAB+10);
    372366    owl_text_indent(indent, text, OWL_MSGTAB);
    373     owl_fmtext_init_null(fm);
    374367    owl_fmtext_append_normal(fm, OWL_TABSTR);
    375368    owl_fmtext_append_bold(fm, "OWL ADMIN ");
Note: See TracChangeset for help on using the changeset viewer.