Ticket #2085: 2085-repl-deprecated-g_strncasecmp-by-g_ascii_strncasecmp.patch

File 2085-repl-deprecated-g_strncasecmp-by-g_ascii_strncasecmp.patch, 1.2 KB (added by vit_r, 15 years ago)

repl-deprecated-g_strncasecmp-by-g_ascii_strncasecmp

  • lib/strutil/strutil8bit.c

    From fba4721e7ef7c65c63540c161910aa5863a915ed Mon Sep 17 00:00:00 2001
    From: Vit Rosin <vit_r@list.ru>
    Date: Sat, 6 Mar 2010 17:47:53 +0000
    Subject: [PATCH] repl deprecated g_strncasecmp by g_ascii_strncasecmp
    
    ---
     lib/strutil/strutil8bit.c |    2 +-
     lib/vfs/mc-vfs/ftpfs.c    |    2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/lib/strutil/strutil8bit.c b/lib/strutil/strutil8bit.c
    index f8a934f..4fa7233 100644
    a b str_8bit_casecmp (const char *t1, const char *t2) 
    649649static int 
    650650str_8bit_ncasecmp (const char *t1, const char *t2) 
    651651{ 
    652     return g_strncasecmp (t1, t2, min (strlen (t1), strlen (t2))); 
     652    return g_ascii_strncasecmp (t1, t2, min (strlen (t1), strlen (t2))); 
    653653} 
    654654 
    655655static 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..77bb910 100644
    a b static int ftpfs_find_machine (const char *host, const char *domain) 
    19911991                continue; 
    19921992 
    19931993            /* Compare local part */ 
    1994             if (g_strncasecmp (host, buffer, host_domain - host)) 
     1994            if (g_ascii_strncasecmp (host, buffer, host_domain - host)) 
    19951995                continue; 
    19961996        } 
    19971997