X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=userv.git;a=blobdiff_plain;f=parser.c;h=4565e3288233975bfa90cf9f4d6d88dbdc719cf7;hp=1bdf56d3441188e25a958b715100685fcfd6a860;hb=6cab4f8fc3de7f4e4cd5ab5a1989017ea8e695fe;hpb=d189ca5662e8b596fc8ae5857ba67e06c3806e17 diff --git a/parser.c b/parser.c index 1bdf56d..4565e32 100644 --- a/parser.c +++ b/parser.c @@ -1034,6 +1034,15 @@ x_err: return r; } +static int oldquote = 0; + +int dfg_lookupquotemode(int dtoken) { + int r; + r= pa_mnl(); if (r) return r; + oldquote = dtoken == tokv_word_includelookupquoteold; + return r; +} + int df_includelookup(int dtoken) { static char *buildbuf=0; int buildbuflen=0; @@ -1085,9 +1094,11 @@ int df_includelookup(int dtoken) { if (c=='/') { *q++= ':'; c= '-'; - } else if (!((c >= '0' && c <= '9') || + } else if (oldquote ? + !((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || - c == '-' || c == '_')) { + c == '-' || c == '_') : + (c==':')) { *q++= ':'; } *q++= c;