+ else
+ {
+ char *result_str;
+ int i, slen = 5;
+
+ /* determine length of regular expression */
+ for (i = 0; i<w.no_eq; i++)
+ slen += strlen(w.eq[i]) + 1;
+ result_str = nmem_malloc(res->nmem, slen + 5);
+
+ /* build the regular expression */
+ *result_str = '\0';
+ slen = 0;
+ for (i = 0; i<w.no_eq; i++)
+ {
+ result_str[slen++] = i ? '|' : '(';
+ strcpy(result_str + slen, w.eq[i]);
+ slen += strlen(w.eq[i]);
+ }
+ result_str[slen++] = ')';
+ result_str[slen] = '\0';
+
+ /* each eq will map to this regular expression */
+ for (i = 0; i<w.no_eq; i++)
+ {
+ set_map_string(res->q_input, res->nmem,
+ w.eq[i], strlen(w.eq[i]),
+ result_str, 0);
+ }
+ }