about summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/charmap-kw.h22
-rw-r--r--locale/programs/linereader.h2
-rw-r--r--locale/programs/locfile-kw.h20
-rw-r--r--locale/programs/repertoire.c4
4 files changed, 18 insertions, 30 deletions
diff --git a/locale/programs/charmap-kw.h b/locale/programs/charmap-kw.h
index 4495122c80..2f0ac00543 100644
--- a/locale/programs/charmap-kw.h
+++ b/locale/programs/charmap-kw.h
@@ -1,4 +1,4 @@
-/* ANSI-C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
 /* Command-line: gperf -acCgopt -k'1,2,5,9,$' -L ANSI-C -N charmap_hash charmap-kw.gperf  */
 
 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -25,7 +25,7 @@
       && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
       && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
 /* The character set is not based on ISO-646.  */
-#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
 #endif
 
 #line 1 "charmap-kw.gperf"
@@ -46,7 +46,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include <string.h>
 
@@ -69,7 +69,7 @@ inline
 #endif
 #endif
 static unsigned int
-hash (register const char *str, register unsigned int len)
+hash (register const char *str, register size_t len)
 {
   static const unsigned char asso_values[] =
     {
@@ -100,7 +100,7 @@ hash (register const char *str, register unsigned int len)
       36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
       36, 36, 36, 36, 36, 36
     };
-  register int hval = len;
+  register unsigned int hval = len;
 
   switch (hval)
     {
@@ -125,14 +125,8 @@ hash (register const char *str, register unsigned int len)
   return hval + asso_values[(unsigned char)str[len - 1]];
 }
 
-#ifdef __GNUC__
-__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
 const struct keyword_t *
-charmap_hash (register const char *str, register unsigned int len)
+charmap_hash (register const char *str, register size_t len)
 {
   static const struct keyword_t wordlist[] =
     {
@@ -181,9 +175,9 @@ charmap_hash (register const char *str, register unsigned int len)
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
     {
-      register int key = hash (str, len);
+      register unsigned int key = hash (str, len);
 
-      if (key <= MAX_HASH_VALUE && key >= 0)
+      if (key <= MAX_HASH_VALUE)
         {
           register const char *s = wordlist[key].name;
 
diff --git a/locale/programs/linereader.h b/locale/programs/linereader.h
index 6cc2e811ee..90976ee4e6 100644
--- a/locale/programs/linereader.h
+++ b/locale/programs/linereader.h
@@ -29,7 +29,7 @@
 #include "repertoire.h"
 #include "record-status.h"
 
-typedef const struct keyword_t *(*kw_hash_fct_t) (const char *, unsigned int);
+typedef const struct keyword_t *(*kw_hash_fct_t) (const char *, size_t);
 struct charset_t;
 struct localedef_t;
 
diff --git a/locale/programs/locfile-kw.h b/locale/programs/locfile-kw.h
index eea233af2e..3cb8a49046 100644
--- a/locale/programs/locfile-kw.h
+++ b/locale/programs/locfile-kw.h
@@ -1,4 +1,4 @@
-/* ANSI-C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
 /* Command-line: gperf -acCgopt -k'1,2,5,9,$' -L ANSI-C -N locfile_hash locfile-kw.gperf  */
 
 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -25,7 +25,7 @@
       && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
       && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
 /* The character set is not based on ISO-646.  */
-#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
 #endif
 
 #line 1 "locfile-kw.gperf"
@@ -69,7 +69,7 @@ inline
 #endif
 #endif
 static unsigned int
-hash (register const char *str, register unsigned int len)
+hash (register const char *str, register size_t len)
 {
   static const unsigned short asso_values[] =
     {
@@ -100,7 +100,7 @@ hash (register const char *str, register unsigned int len)
       631, 631, 631, 631, 631, 631, 631, 631, 631, 631,
       631, 631, 631, 631, 631, 631
     };
-  register int hval = len;
+  register unsigned int hval = len;
 
   switch (hval)
     {
@@ -125,14 +125,8 @@ hash (register const char *str, register unsigned int len)
   return hval + asso_values[(unsigned char)str[len - 1]];
 }
 
-#ifdef __GNUC__
-__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
 const struct keyword_t *
-locfile_hash (register const char *str, register unsigned int len)
+locfile_hash (register const char *str, register size_t len)
 {
   static const struct keyword_t wordlist[] =
     {
@@ -611,9 +605,9 @@ locfile_hash (register const char *str, register unsigned int len)
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
     {
-      register int key = hash (str, len);
+      register unsigned int key = hash (str, len);
 
-      if (key <= MAX_HASH_VALUE && key >= 0)
+      if (key <= MAX_HASH_VALUE)
         {
           register const char *s = wordlist[key].name;
 
diff --git a/locale/programs/repertoire.c b/locale/programs/repertoire.c
index f971f88978..1918034172 100644
--- a/locale/programs/repertoire.c
+++ b/locale/programs/repertoire.c
@@ -37,7 +37,7 @@
 
 /* Simple keyword hashing for the repertoiremap.  */
 static const struct keyword_t *repertoiremap_hash (const char *str,
-						   unsigned int len);
+						   size_t len);
 static void repertoire_new_char (struct linereader *lr, hash_table *ht,
 				 hash_table *rt, struct obstack *ob,
 				 uint32_t value, const char *from,
@@ -358,7 +358,7 @@ repertoire_compare (const void *p1, const void *p2)
 
 
 static const struct keyword_t *
-repertoiremap_hash (const char *str, unsigned int len)
+repertoiremap_hash (const char *str, size_t len)
 {
   static const struct keyword_t wordlist[] =
   {