Ticket #2085: 2085-repl-deprecated-g_strcasecmp-by-g_ascii_strcasecmp.patch

File 2085-repl-deprecated-g_strcasecmp-by-g_ascii_strcasecmp.patch, 3.0 KB (added by vit_r, 14 years ago)

2085-repl-deprecated-g_strcasecmp-by-g_ascii_strcasecmp

  • lib/strutil/strutil8bit.c

    From ce86a63418c84606c16bc231124bf200a0c5271a Mon Sep 17 00:00:00 2001
    From: Vit Rosin <vit_r@list.ru>
    Date: Sat, 6 Mar 2010 21:15:19 +0000
    Subject: [PATCH] repl deprecated g_strcasecmp by g_ascii_strcasecmp
    
    ---
     lib/strutil/strutil8bit.c |    2 +-
     lib/vfs/mc-vfs/ftpfs.c    |    6 +++---
     src/setup.c               |    6 +++---
     3 files changed, 7 insertions(+), 7 deletions(-)
    
    diff --git a/lib/strutil/strutil8bit.c b/lib/strutil/strutil8bit.c
    index f8a934f..d19c849 100644
    a b str_8bit_ncompare (const char *t1, const char *t2) 
    643643static int 
    644644str_8bit_casecmp (const char *t1, const char *t2) 
    645645{ 
    646     return g_strcasecmp (t1, t2); 
     646    return g_ascii_strcasecmp (t1, t2); 
    647647} 
    648648 
    649649static int 
  • lib/vfs/mc-vfs/ftpfs.c

    diff --git a/lib/vfs/mc-vfs/ftpfs.c b/lib/vfs/mc-vfs/ftpfs.c
    index 93bfab6..6e7a3df 100644
    a b ftpfs_check_proxy (const char *host) 
    643643            if (!ld) 
    644644                return 0; 
    645645        } else 
    646             if (!g_strcasecmp (host, domain)) 
     646            if (!g_ascii_strcasecmp (host, domain)) 
    647647                return 0; 
    648648    } 
    649649 
    static int ftpfs_find_machine (const char *host, const char *domain) 
    19801980        if (ftpfs_netrc_next () == NETRC_NONE) 
    19811981            break; 
    19821982 
    1983         if (g_strcasecmp (host, buffer)) { 
     1983        if (g_ascii_strcasecmp (host, buffer)) { 
    19841984            /* Try adding our domain to short names in .netrc */ 
    19851985            const char *host_domain = strchr (host, '.'); 
    19861986            if (!host_domain) 
    19871987                continue; 
    19881988 
    19891989            /* Compare domain part */ 
    1990             if (g_strcasecmp (host_domain, domain)) 
     1990            if (g_ascii_strcasecmp (host_domain, domain)) 
    19911991                continue; 
    19921992 
    19931993            /* Compare local part */ 
  • src/setup.c

    diff --git a/src/setup.c b/src/setup.c
    index 78dfb1b..0a78a43 100644
    a b panel_load_setup (WPanel * panel, const char *section) 
    449449    buffer = mc_config_get_string (mc_panels_config, section, "list_mode", "full"); 
    450450    panel->list_type = list_full; 
    451451    for (i = 0; list_types[i].key; i++) 
    452         if (g_strcasecmp (list_types[i].key, buffer) == 0) 
     452        if (g_ascii_strcasecmp (list_types[i].key, buffer) == 0) 
    453453        { 
    454454            panel->list_type = list_types[i].list_type; 
    455455            break; 
    setup__load_panel_state (const char *section) 
    494494    buffer = mc_config_get_string (mc_panels_config, section, "display", "listing"); 
    495495 
    496496    for (i = 0; panel_types[i].opt_name != NULL; i++) 
    497         if (g_strcasecmp (panel_types[i].opt_name, buffer) == 0) 
     497        if (g_ascii_strcasecmp (panel_types[i].opt_name, buffer) == 0) 
    498498        { 
    499499            mode = panel_types[i].opt_type; 
    500500            break; 
    load_keys_from_section (const char *terminal, mc_config_t * cfg) 
    933933    { 
    934934 
    935935        /* copy=other causes all keys from [terminal:other] to be loaded.  */ 
    936         if (g_strcasecmp (*profile_keys, "copy") == 0) 
     936        if (g_ascii_strcasecmp (*profile_keys, "copy") == 0) 
    937937        { 
    938938            valcopy = mc_config_get_string (cfg, section_name, *profile_keys, ""); 
    939939            load_keys_from_section (valcopy, cfg);