+ assert(arg->map->input);
+ logf (LOG_DEBUG, "set map %.*s", (int) strlen(s), s);
+ set_map_string(arg->map->input, arg->map->nmem, s, strlen(s), arg->string);
+ for (s = arg->string; *s; s++)
+ logf (LOG_DEBUG, " %3d", (unsigned char) *s);
+}
+
+/*
+ * Add a query map to the string contained in the argument.
+ */
+static void fun_add_qmap(const char *s, void *data, int num)
+{
+ chrwork *arg = (chrwork *) data;
+
+ assert(arg->map->q_input);
+ logf (LOG_DEBUG, "set qmap %.*s", (int) strlen(s), s);
+ set_map_string(arg->map->q_input, arg->map->nmem, s,
+ strlen(s), arg->string);
+ for (s = arg->string; *s; s++)
+ logf (LOG_DEBUG, " %3d", (unsigned char) *s);
+}
+
+
+static int scan_string(char *s,
+ void (*fun)(const char *c, void *data, int num),
+ void *data, int *num)
+{
+ unsigned char c, str[1024], begin, end, *p;
+