]> Pileus Git - ~andy/fetchmail/blobdiff - ucs/norm_charmap.c
Correct title/topic, remove dates (6.3.22 isn't out yet), and re-sign.
[~andy/fetchmail] / ucs / norm_charmap.c
index 3020487160410ee5f9145652a943c46d7c610817..dedad326a44a872f4f1b44fff9d518dd5d9bf80e 100644 (file)
@@ -24,6 +24,9 @@
  *   http://www.cl.cam.ac.uk/~mgk25/ucs/norm_charmap.c
  */
 
+#include "config.h" /* import AC_C_CONST effects */
+#include "norm_charmap.h"
+
 #include <string.h>
 
 #ifdef TEST
@@ -36,9 +39,9 @@
 
 static char buf[16];
 
-char *norm_charmap(char *name)
+const char *norm_charmap(const char *name)
 {
-  char *p;
+  const char *p;
   
   if (!name)
     return name;
@@ -82,7 +85,7 @@ char *norm_charmap(char *name)
     p += 5;
     if (digit(*p)) {
       buf[9] = *p++;
-      if (digit(*p)) buf[10] = *p++;
+      if (digit(*p)) buf[10] = *p;
       return buf;
     }
   }
@@ -93,7 +96,7 @@ char *norm_charmap(char *name)
     p += 4;
     if (digit(*p)) {
       buf[10] = *p++;
-      if (digit(*p)) buf[11] = *p++;
+      if (digit(*p)) buf[11] = *p;
       return buf;
     }
   }