summary refs log tree commit diff
path: root/locale/programs/charmap-kw.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-09-09 14:08:46 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-09-09 14:16:40 -0700
commit3f02b772a42c10fd172b6e5a8baa50d7ef9c59fc (patch)
tree2f28f78e53be228299596a7abc3560a2cc8f6af8 /locale/programs/charmap-kw.h
parent5cb226d7e4e710939cff7288bf9970cb52ec0dfa (diff)
downloadglibc-3f02b772a42c10fd172b6e5a8baa50d7ef9c59fc.tar.gz
glibc-3f02b772a42c10fd172b6e5a8baa50d7ef9c59fc.tar.xz
glibc-3f02b772a42c10fd172b6e5a8baa50d7ef9c59fc.zip
Regenerate charmap-kw.h, locfile-kw.h
This propagates the recent http->https URL changes.
Since I used gperf 3.1 to regenerate, this is also a minor
internal-to-localedef API change.
URL problem reported by Joseph Myers in:
https://www.sourceware.org/ml/libc-alpha/2019-09/msg00143.html
* locale/programs/charmap-kw.h, locale/programs/locfile-kw.h:
Regenerate with gperf 3.1.
* locale/programs/linereader.h (kw_hash_fct_t):
* locale/programs/repertoire.c (repertoiremap_hash):
2nd arg is now size_t not unsigned, for compatibility with gperf 3.1.
Diffstat (limited to 'locale/programs/charmap-kw.h')
-rw-r--r--locale/programs/charmap-kw.h22
1 files changed, 8 insertions, 14 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;