Philip Hazel wrote: > On Sun, 30 Dec 2007, Sheri wrote:
>
>
>> "Add a call to |_set_printf_count_output(1)| at the beginning of |main|
>> in pcregrep.c; by default VC CRT does not support the format "%n" and
>> the program pcregrep.exe using such format would crash."
>>
>
> %n is utterly Standard C - standardised around 1990. I try very hard to
> write only Standard C, 1990 version, only deviating when I have to
> interact with the operating system, in the interests of portability.
> Consequently, I'm afraid I have no interest in messing about for the
> benefit of environments that cannot support Standard 1990 C. I know this
> sounds harsh, but one has to draw a line somewhere. (I *have* deviated
> from this in the matter of providing for the absence of certain Standard
> library functions, notably memmove(), but that's as far as I'm prepared
> to go, and I muttered an awful lot when I did it. :-)
>
> Philip
>
> Well, personally I think you should do something about it. The Microsoft
toolchain is prevalent on Windows and I don't think pcregrep should
crash! if built there. It doesn't look like much is involved to fix it
(I'm not a programmer, was my research not straightforward?) I tried
building pcregrep in VC because I wondered if possibly the directory
recursion might work differently. :)
Where is Bob Rossi, couldn't he look at this? He once suggested the
following regarding a similar issue in the cpp program (but Craig did
something different):