Changeset 282ec9b


Ignore:
Timestamp:
Jul 9, 2003, 2:12:36 AM (18 years ago)
Author:
Erik Nygren <nygren@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:
a7a42b9
Parents:
5d9c664
Message:
        Make sure that a newline is always at the end of messages
	        returned by perl style formatting functions.
	Add owl::login to legacy variables populated for format_msg.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    rf1e629d r282ec9b  
    11$Id$
     2
     32.0.8-pre-3
     4        Make sure that a newline is always at the end of messages
     5                returned by perl style formatting functions.
     6        Add owl::login to legacy variables populated for format_msg.
    27
    382.0.8-pre-2
  • owl.h

    rf1e629d r282ec9b  
    2121static const char owl_h_fileIdent[] = "$Id$";
    2222
    23 #define OWL_VERSION         2.0.8-pre-2
    24 #define OWL_VERSION_STRING "2.0.8-pre-2"
     23#define OWL_VERSION         2.0.8-pre-3
     24#define OWL_VERSION_STRING "2.0.8-pre-3"
    2525
    2626#define OWL_DEBUG 0
  • perlwrap.pm

    rf1e629d r282ec9b  
    123123    $owl::time       = $m->time      ;
    124124    $owl::host       = $m->host      ;
     125    $owl::login      = $m->login     ;
    125126    if ($m->fields) {
    126127        @owl::fields = @{$m->fields};
  • style.c

    rf1e629d r282ec9b  
    5454    (* s->formatfunc)(fm, m);
    5555  } else if (s->type==OWL_STYLE_TYPE_PERL) {
    56     char *body, *indent;
     56    char *body, *indent, curlen;
    5757
    5858    /* run the perl function */
    5959    body=owl_perlconfig_getmsg(m, 1, s->perlfuncname);
    6060   
    61     /* indent */
    62     indent=owl_malloc(strlen(body)+owl_text_num_lines(body)*OWL_TAB+10);
     61    /* indent and ensure ends with a newline */
     62    indent=owl_malloc(strlen(body)+(owl_text_num_lines(body))*OWL_TAB+10);
    6363    owl_text_indent(indent, body, OWL_TAB);
    64    
     64    curlen = strlen(indent);
     65    if (curlen==0 || indent[curlen-1] != '\n') {
     66      indent[curlen] = '\n';
     67      indent[curlen+1] = '\0';
     68    }
     69
    6570    /* fmtext_append.  This needs to change */
    6671    owl_fmtext_append_ztext(fm, indent);
Note: See TracChangeset for help on using the changeset viewer.