quotearg_colon("a:b") should result in "\"a:b\"" ("a:b") rather than
    "\"a\\:b\"" ("a\:b") (ie. keep the displayed output as a valid C
    string literal

Definitely desirable.

    the "c" quoting style now outputs "\"?\"\"?/\""
    ("?""?/") rather than "\"?\\?/\"" ("?\?/"), 

Sorry, I'm not following this.  What's the original filename?

    this assumes that C string concatenation is acceptable in that style

Then we'll have to say that.  I did not imagine that it would be
necessary.  Indeed, it seems problematic to me, it means a parsing
program has to recognize whether the character after the first string
constant is another string constant or (I guess) a :.  That seems like
nontrivial complexity to be adding.

    #include "quotearg.h"
    ...
    set_quoting_style (NULL, c_maybe_quoting_style);
    quotearg_colon (string);

Excellent.

Can we add something to the .texi about this?


Meanwhile, I had sent a proposed simple change to rms for standards.texi
about this.  No problem with the principle, but he wants to specify the
exact list of troublesome characters and one escape to use for each, not
just say "like C string constants".

I suppose we could always use \OOO, but somehow using \n and the like
seems like it would be much more readable.  So it'll take me a little
time to work up that list.  And I'm not sure what effect this new
wrinkle will have on your code, sorry.

Thanks,
karl


Reply via email to