Changeset 6197702 for lib/misc.c


Ignore:
Timestamp:
2010-10-09T18:41:19Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
d150a9d
Parents:
23b29c6 (diff), 27b407f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging OTR branch. It's more or less a plugin if you enable it, and
otherwise a no-op. DO NOT INSTALL THIS ON PUBLIC SERVERS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/misc.c

    r23b29c6 r6197702  
    157157        char *s = out, *cs;
    158158        int i, matched;
     159        int taglen;
    159160       
    160161        memset( out, 0, sizeof( out ) );
     
    173174                                in ++;
    174175                       
     176                        taglen = in - cs - 1;   /* not <0 because the above loop runs at least once */
    175177                        if( *in )
    176178                        {
    177                                 if( g_strncasecmp( cs+1, "br", 2) == 0 )
     179                                if( g_strncasecmp( cs+1, "b", taglen) == 0 )
     180                                        *(s++) = '\x02';
     181                                else if( g_strncasecmp( cs+1, "/b", taglen) == 0 )
     182                                        *(s++) = '\x02';
     183                                else if( g_strncasecmp( cs+1, "i", taglen) == 0 )
     184                                        *(s++) = '\x1f';
     185                                else if( g_strncasecmp( cs+1, "/i", taglen) == 0 )
     186                                        *(s++) = '\x1f';
     187                                else if( g_strncasecmp( cs+1, "br", taglen) == 0 )
    178188                                        *(s++) = '\n';
    179189                                in ++;
Note: See TracChangeset for help on using the changeset viewer.