]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/conf-test.c
hashtable: Implemented new HASH_TABLE_VARS parameter.
[libucw.git] / ucw / conf-test.c
index 26e0887ecad3ccf7963bcaa817ccc683c9acbbcc..e226fae955e42dedc9eb279e3433a90f5390c0e1 100644 (file)
@@ -133,7 +133,7 @@ commit_top(void *ptr UNUSED)
   return NULL;
 }
 
-static char *alphabet[] = { "alpha", "beta", "gamma", "delta", NULL };
+static const char * const alphabet[] = { "alpha", "beta", "gamma", "delta", NULL };
 static struct cf_section cf_top = {
   CF_INIT(init_top),
   CF_COMMIT(commit_top),
@@ -153,7 +153,7 @@ static struct cf_section cf_top = {
     CF_LOOKUP_DYN("look", &look, alphabet, 1000),
     CF_USER_ARY("numbers", numbers, &u16_type, 10),
     CF_BITMAP_INT("bitmap1", &bitmap1),
-    CF_BITMAP_LOOKUP("bitmap2", &bitmap2, ((char*[]) {
+    CF_BITMAP_LOOKUP("bitmap2", &bitmap2, ((const char* const[]) {
          "one", "two", "three", "four", "five", "six", "seven", "eight", 
          "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "seventeen", 
          "eighteen", "nineteen", "twenty", NULL        // hidden joke here
@@ -162,7 +162,7 @@ static struct cf_section cf_top = {
   }
 };
 
-static byte short_opts[] = CF_SHORT_OPTS "v";
+static char short_opts[] = CF_SHORT_OPTS "v";
 static struct option long_opts[] = {
        CF_LONG_OPTS
        {"verbose",     0, 0, 'v'},
@@ -209,6 +209,8 @@ main(int argc, char *argv[])
   //cf_reload("non-existent file");
   cf_load("non-existent file");
   cf_set("top.d1 -1.1; top.master b");
+  cf_reload(NULL);
+  cf_reload(NULL);
   */
 
   struct fastbuf *out = bfdopen(1, 1<<14);