Ticket #1950: strutil.diff

File strutil.diff, 787 bytes (added by pavlinux, 12 years ago)

FOR LATEST MASTER

  • lib/strutil/strutilutf8.c

    diff --git a/lib/strutil/strutilutf8.c b/lib/strutil/strutilutf8.c
    index f58536b..05ede73 100644
    a b  
    3838static const char replch[] = "\xEF\xBF\xBD"; 
    3939 
    4040static int 
    41 str_unichar_iscombiningmark (gunichar uni) 
     41str_unichar_iscombiningmark(gunichar uni) 
    4242{ 
    43     int type = g_unichar_type (uni); 
    44     return (type == G_UNICODE_COMBINING_MARK) 
    45         || (type == G_UNICODE_ENCLOSING_MARK) 
    46         || (type == G_UNICODE_NON_SPACING_MARK); 
     43        GUnicodeType type = g_unichar_type(uni); 
     44 
     45        switch (type) { 
     46        case G_UNICODE_COMBINING_MARK:   break; 
     47        case G_UNICODE_ENCLOSING_MARK:   break; 
     48        case G_UNICODE_NON_SPACING_MARK: break; 
     49        default:  
     50             type = G_UNICODE_CONTROL;   break; 
     51        } 
     52  return((int) type); 
    4753} 
    4854 
    4955static void