Changeset d559df9 for fmtext.c


Ignore:
Timestamp:
Jun 7, 2003, 12:09:47 PM (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:
b2b0773
Parents:
dafd919
Message:
AIM messages now go through format_msg() in .owlconf if it exists.
Additional Perl variables will need to be added so users can distinguish
  AIM login/logout messages from normal messages.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fmtext.c

    r5789230 rd559df9  
    457457}
    458458
    459 
     459 
     460/* the first column is column 0 */
     461/* the message is expected to end in a new line for now */
    460462void owl_fmtext_truncate_cols(owl_fmtext *in, int acol, int bcol, owl_fmtext *out)
    461463{
    462464  char *ptr1, *ptr2, *last;
    463465  int len, offset;
    464  
    465   /* the first column is column 0 */
    466 
    467   /* the message is expected to end in a new line for now */
    468466
    469467  last=in->textbuff+in->textlen-1;
     
    485483    len=bcol-acol;
    486484    if (len > (ptr2-(ptr1+acol))) {
     485      /* the whole line fits with room to spare, don't take a full 'len' */
    487486      len=ptr2-(ptr1+acol);
    488487    }
    489488    if (len>last-ptr1) {
     489      /* the whole rest of the text fits with room to spare, adjust for it */
    490490      len-=(last-ptr1);
    491491    }
    492492    if (len<=0) {
     493      /* saftey check */
    493494      owl_fmtext_append_normal(out, "\n");
    494495      ptr1=ptr2+1;
Note: See TracChangeset for help on using the changeset viewer.