tCase-insensitive matching - dedup - deduplicating backup program
 (HTM) git clone git://git.z3bra.org/dedup.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 198d1ebbb704dd80f0740ab3859a7fc5fa54769a
 (DIR) parent d28e04853298face6e9a03a8c2b76bffcb394b32
 (HTM) Author: sin <sin@2f30.org>
       Date:   Sun,  7 Apr 2019 13:27:49 +0100
       
       Case-insensitive matching
       
       Diffstat:
         M compress.c                          |       3 ++-
         M hash.c                              |       3 ++-
       
       2 files changed, 4 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/compress.c b/compress.c
       t@@ -3,6 +3,7 @@
        #include <err.h>
        #include <stdint.h>
        #include <string.h>
       +#include <strings.h>
        
        #include <lz4.h>
        
       t@@ -164,7 +165,7 @@ compr_name2type(char *name)
                struct algomap *algo;
        
                for (algo = &algomap[0]; algo->name != NULL; algo++)
       -                if (strcmp(algo->name, name) == 0)
       +                if (strcasecmp(algo->name, name) == 0)
                                break;
                if (algo->name == NULL)
                        return -1;
 (DIR) diff --git a/hash.c b/hash.c
       t@@ -1,6 +1,7 @@
        #include <stdint.h>
        #include <stdlib.h>
        #include <string.h>
       +#include <strings.h>
        
        #include "blake2.h"
        #include "dedup.h"
       t@@ -111,7 +112,7 @@ hash_name2type(char *name)
                struct algomap *algo;
        
                for (algo = &algomap[0]; algo->name != NULL; algo++)
       -                if (strcmp(algo->name, name) == 0)
       +                if (strcasecmp(algo->name, name) == 0)
                                break;
                if (algo->name == NULL)
                        return -1;