pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/graphics/icoutils



Module Name:    pkgsrc
Committed By:   rillig
Date:           Tue Mar 24 06:29:41 UTC 2020

Modified Files:
        pkgsrc/graphics/icoutils: Makefile distinfo
Added Files:
        pkgsrc/graphics/icoutils/patches: patch-common_hmap.c
            patch-common_string-utils.c

Log Message:
graphics/icoutils: fix 'subscript has type char'


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/graphics/icoutils/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/graphics/icoutils/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/icoutils/patches/patch-common_hmap.c \
    pkgsrc/graphics/icoutils/patches/patch-common_string-utils.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/icoutils/Makefile
diff -u pkgsrc/graphics/icoutils/Makefile:1.7 pkgsrc/graphics/icoutils/Makefile:1.8
--- pkgsrc/graphics/icoutils/Makefile:1.7       Thu Oct 24 20:43:21 2019
+++ pkgsrc/graphics/icoutils/Makefile   Tue Mar 24 06:29:40 2020
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2019/10/24 20:43:21 nia Exp $
+# $NetBSD: Makefile,v 1.8 2020/03/24 06:29:40 rillig Exp $
 
 DISTNAME=      icoutils-0.32.3
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    graphics
 MASTER_SITES=  https://savannah.nongnu.org/download/icoutils/
 EXTRACT_SUFX=  .tar.bz2

Index: pkgsrc/graphics/icoutils/distinfo
diff -u pkgsrc/graphics/icoutils/distinfo:1.2 pkgsrc/graphics/icoutils/distinfo:1.3
--- pkgsrc/graphics/icoutils/distinfo:1.2       Sat Sep 21 12:14:05 2019
+++ pkgsrc/graphics/icoutils/distinfo   Tue Mar 24 06:29:40 2020
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.2 2019/09/21 12:14:05 nia Exp $
+$NetBSD: distinfo,v 1.3 2020/03/24 06:29:40 rillig Exp $
 
 SHA1 (icoutils-0.32.3.tar.bz2) = 6fe61b85b2a44bd1a8a7d8e03eeb0efa45f2a7fd
 RMD160 (icoutils-0.32.3.tar.bz2) = 0ce5252ba66e100ac8aa1dd0850479ff41ec02a3
 SHA512 (icoutils-0.32.3.tar.bz2) = 982a051a5dc4a63bb2a9f23e78e5a88e481e5c7a9c25789253e1c396e40d4c093e5a9b399966d660e4f2da21ce15d539cb9d20bfd8126b1138f148b86baa6726
 Size (icoutils-0.32.3.tar.bz2) = 609286 bytes
+SHA1 (patch-common_hmap.c) = 0ee879db27f6bf632e2ce171a1fcf44194b5a6ab
+SHA1 (patch-common_string-utils.c) = 8fe8ce50925101331623e3719ffab51016146e2b

Added files:

Index: pkgsrc/graphics/icoutils/patches/patch-common_hmap.c
diff -u /dev/null pkgsrc/graphics/icoutils/patches/patch-common_hmap.c:1.1
--- /dev/null   Tue Mar 24 06:29:41 2020
+++ pkgsrc/graphics/icoutils/patches/patch-common_hmap.c        Tue Mar 24 06:29:40 2020
@@ -0,0 +1,17 @@
+$NetBSD: patch-common_hmap.c,v 1.1 2020/03/24 06:29:40 rillig Exp $
+
+hmap.c:77:30: error: array subscript has type 'char' [-Werror=char-subscripts]
+
+https://savannah.nongnu.org/bugs/index.php?58033
+
+--- common/hmap.c.orig 2012-05-03 23:14:50.000000000 +0000
++++ common/hmap.c
+@@ -74,7 +74,7 @@ strcasehash(const char *str)
+     uint32_t hash = 0;
+ 
+     for (; *str != '\0'; str++)
+-      hash = (hash << 5) - hash + tolower(*str);
++      hash = (hash << 5) - hash + tolower((unsigned char)*str);
+ 
+     return hash;
+ }
Index: pkgsrc/graphics/icoutils/patches/patch-common_string-utils.c
diff -u /dev/null pkgsrc/graphics/icoutils/patches/patch-common_string-utils.c:1.1
--- /dev/null   Tue Mar 24 06:29:41 2020
+++ pkgsrc/graphics/icoutils/patches/patch-common_string-utils.c        Tue Mar 24 06:29:40 2020
@@ -0,0 +1,75 @@
+$NetBSD: patch-common_string-utils.c,v 1.1 2020/03/24 06:29:40 rillig Exp $
+
+string-utils.c:147:7: error: array subscript has type 'char' [-Werror=char-subscripts]
+(and a few others)
+
+https://savannah.nongnu.org/bugs/index.php?58033
+
+--- common/string-utils.c.orig 2012-05-03 23:14:50.000000000 +0000
++++ common/string-utils.c
+@@ -30,6 +30,10 @@
+ #include "error.h"            /* common */
+ #include "string-utils.h"     /* common */
+ 
++static int is_alnum(unsigned char ch) { return isalnum(ch); }
++static int is_space(unsigned char ch) { return isspace(ch); }
++static int to_lower(unsigned char ch) { return tolower(ch); }
++
+ /**
+  * Return a zero-based of a character in a string.
+  */
+@@ -144,7 +148,7 @@ ends_with_nocase(const char *str, const 
+               return false;
+ 
+       for (c = 0; end[c] != '\0'; c++) {
+-              if (tolower(end[c]) != tolower(str[c+diff]))
++              if (to_lower(end[c]) != to_lower(str[c+diff]))
+                       return false;
+       }
+ 
+@@ -184,7 +188,7 @@ starts_with_nocase(const char *str, cons
+ {
+       int c;
+       for (c = 0; str[c] != '\0'; c++) {
+-              if (tolower(str[c]) != tolower(start[c]))
++              if (to_lower(str[c]) != to_lower(start[c]))
+                       break;
+       }
+       return (start[c] == '\0');
+@@ -230,7 +234,7 @@ str_convert(char *str, int (*convert)(in
+ int
+ iswordchar(int ch)
+ {
+-      return isalnum(ch) || ch == '_';
++      return is_alnum(ch) || ch == '_';
+ }
+ 
+ /**
+@@ -398,10 +402,10 @@ word_get_index(const char *str, int pos)
+       int c;
+ 
+       for (c = 0; str[c] != '\0' && c < pos; c++) {
+-              if (!in_word && !isspace(str[c])) {
++              if (!in_word && !is_space(str[c])) {
+                       in_word = true;
+               }
+-              if (in_word && isspace(str[c])) {
++              if (in_word && is_space(str[c])) {
+                       in_word = false;
+                       words++;
+               }
+@@ -419,12 +423,12 @@ word_get(const char *str, int idx)
+       int c;
+ 
+       for (c = 0; str[c] != '\0'; c++) {
+-              if (!in_word && !isspace(str[c])) {
++              if (!in_word && !is_space(str[c])) {
+                       words++;
+                       start = c;
+                       in_word = true;
+               }
+-              if (in_word && isspace(str[c])) {
++              if (in_word && is_space(str[c])) {
+                       if (words > idx)
+                               return substring(str, start, c);
+                       in_word = false;



Home | Main Index | Thread Index | Old Index