+static void add_non_space(const char *start, const char *end,
+ WRBUF term_dict,
+ char *dst_term, int *dst_ptr,
+ const char **map, int q_map_match)
+{
+ size_t sz = end - start;
+ memcpy(dst_term + *dst_ptr, start, sz);
+ (*dst_ptr) += sz;
+ if (!q_map_match)
+ {
+ while (start < end)
+ {
+ if (strchr(REGEX_CHARS, *start))
+ wrbuf_putc(term_dict, '\\');
+ wrbuf_putc(term_dict, *start);
+ start++;
+ }
+ }
+ else
+ {
+ char tmpbuf[80];
+ esc_str(tmpbuf, sizeof(tmpbuf), map[0], strlen(map[0]));
+
+ wrbuf_puts(term_dict, map[0]);
+ }
+}
+