]> mj.ucw.cz Git - libucw.git/blobdiff - lib/kmp-test.c
The pkg-config variables have no default value.
[libucw.git] / lib / kmp-test.c
index e245fcff0de8e8f9a184cee6aef7e5242955c5e9..c066e6ea916246c20a08d759fc781bb4cec87eb6 100644 (file)
@@ -56,9 +56,9 @@ test1(void)
 #define KMP_USE_UTF8
 #define KMP_TOLOWER
 #define KMP_ONLYALPHA
-#define KMP_STATE_VARS byte *str; uns id;
+#define KMP_STATE_VARS char *str; uns id;
 #define KMP_ADD_EXTRA_ARGS uns id
-#define KMP_VARS byte *start;
+#define KMP_VARS char *start;
 #define KMP_ADD_INIT(kmp,src) kmp->u.start = src
 #define KMP_ADD_NEW(kmp,src,s) do{ TRACE("Inserting string %s with id %d", kmp->u.start, id); \
   s->u.str = kmp->u.start; s->u.id = id; }while(0)
@@ -94,7 +94,7 @@ test2(void)
 #define KMP_PREFIX(x) kmp3_##x
 #define KMP_STATE_VARS uns index;
 #define KMP_ADD_EXTRA_ARGS uns index
-#define KMP_VARS byte *start;
+#define KMP_VARS char *start;
 #define KMP_ADD_INIT(kmp,src) kmp->u.start = src
 #define KMP_ADD_NEW(kmp,src,s) s->u.index = index
 #define KMP_ADD_DUP(kmp,src,s) *(kmp->u.start) = 0
@@ -113,7 +113,7 @@ test3(void)
   {
     mp_flush(pool);
     uns n = random_max(100);
-    byte *s[n];
+    char *s[n];
     struct kmp3_struct kmp;
     kmp3_init(&kmp);
     for (uns i = 0; i < n; i++)
@@ -167,7 +167,7 @@ kmp4_eq(struct kmp4_struct *kmp UNUSED, byte *a, byte *b)
 static inline uns
 kmp4_hash(struct kmp4_struct *kmp UNUSED, struct kmp4_state *s, byte *c)
 {
-  return (c ? (*c << 16) : 0) + (uns)(addr_int_t)s;
+  return (c ? (*c << 16) : 0) + (uns)(uintptr_t)s;
 }
 
 #define KMP_PREFIX(x) kmp4_##x