Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Programming exercise/challenge
Date: Wed, 27 Jan 2021 07:57:18 -0800
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <867dnyl6e9.fsf@linuxsc.com>
References: <86wnxwkyol.fsf@linuxsc.com> <86r1o1hxtn.fsf@linuxsc.com> <20201209030320.4dad4f2c624e613bd47fceed@gmail.com> <86a6tlqdh8.fsf@linuxsc.com> <86wnw2lwwn.fsf@linuxsc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="a3a7a3546220eb2a4a7cfe4d4683198c"; logging-data="13758"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19KpUnCdOlfTPRVpJ1iBCknq8liXaVgSrw="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:6Xuu/OaOHn6u2ZSi87aBPm78oaw= sha1:DzCeXnCeTDhyV4qInc9kiuhnnDY=
Xref: csiph.com comp.lang.c:158652
Bart writes:
> On 24/01/2021 05:35, Tim Rentsch wrote:
>
>> Bart writes:
>>
>> (4) In the initial if() test, when c==inquote, the character
>> after the end of the string/character constant is output
>> without checking it. What should happen on this input
>>
>> "\\"/*comment*/"\\"
>>
>> and what actually does happen?
>
> I've redone string handling and the current version is below; it also
> gets rid of some junk that was present before, as well as removing
> extraneous spaces from the output as suggested. Block comments reduce
> to one space. [...]
Much better.