Changeset 6b13103 for irc_im.c


Ignore:
Timestamp:
2015-01-16T19:50:23Z (6 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
1065dd4, eabe6d4
Parents:
6f10697
Message:

Replace isdigit/isalpha/.../tolower/toupper with glib variants

This fixes warnings about passing signed chars to them (apparently they
are implemented as macros that do array lookups without checks in some
platforms, yay)

Specifically:

functions=isalnum|isalpha|isdigit|isspace|isxdigit|tolower|toupper
sed -ir "s/$functions/g_ascii_&/g" /*.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_im.c

    r6f10697 r6b13103  
    7373                {
    7474                        char *s;
    75                         for( s = bu->ic->acc->tag; isalnum( *s ); s ++ );
     75                        for( s = bu->ic->acc->tag; g_ascii_isalnum( *s ); s ++ );
    7676                        /* Only use the tag if we got to the end of the string.
    7777                           (So allow alphanumerics only. Hopefully not too
     
    316316           TODO(wilmer): Do the same with away msgs again! */
    317317        for( s = iu->fullname; *s; s ++ )
    318                 if( isspace( *s ) ) *s = ' ';
     318                if( g_ascii_isspace( *s ) ) *s = ' ';
    319319       
    320320        if( ( bu->ic->flags & OPT_LOGGED_IN ) && set_getbool( &bee->set, "display_namechanges" ) )
Note: See TracChangeset for help on using the changeset viewer.