+ char x[4];
+
+ if (*cp == '\\' && cp[1])
+ {
+ if (!quote_mode)
+ {
+ pr("\"", client_data);
+ quote_mode = 1;
+ }
+ cp++;
+ if (*cp == '\"' || *cp == '\\')
+ pr("\\\"", client_data);
+ else
+ {
+ x[0] = *cp;
+ x[1] = '\0';
+ pr(x, client_data);
+ }
+ }
+ else if (*cp == '*')
+ {
+ if (quote_mode)
+ {
+ pr("\"", client_data);
+ quote_mode = 0;
+ }
+ pr("?", client_data);
+ }
+ else if (*cp == '?')
+ {
+ if (quote_mode)
+ {
+ pr("\"", client_data);
+ quote_mode = 0;
+ }
+ pr("#", client_data);
+ }
+ else
+ {
+ if (!quote_mode)
+ {
+ pr("\"", client_data);
+ quote_mode = 1;
+ }
+ x[0] = *cp;
+ x[1] = '\0';
+ pr(x, client_data);
+ }