delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/11/16/14:58:33

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3FB7DCDC.B97E29A9@phekda.freeserve.co.uk>
Date: Sun, 16 Nov 2003 20:23:56 +0000
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: Problems with sscanf & suppressions [PATCH]
References: <200311161909 DOT hAGJ9bqY004445 AT speedy DOT ludd DOT luth DOT se>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

ams AT ludd DOT luth DOT se wrote:
> 
> According to Richard Dawe:
[snip]
> > +sscanf_testcase_t sscanf_testcases[] = {
> > +  /* No assignment */
> > +  { "", "%*[0123456789]%*c", EOF, "", "" },
> > +  { "X", "%*[0123456789]%*c", 0, "", "" },
> > +  { "1", "%*[0123456789]%*c", EOF, "", "" },
> > +  { "1X2", "%*[0123456789]%*[0123456789]", 1, "", "" },
> > +  { "1,2", "%*[0123456789],%*[0123456789]", 2, "", "" },
> 
> If I'm not mistaken the last two lines are coded to check that
> sscanf() returns 1 and 2. That's wrong. There were no
> assignments. Thus sscanf() should return 0.
[snip]

Yes, you are right. I'll see if I can write a new patch next weekend.

Just as well I didn't commit that patch! ;) Thanks for reviewing.

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

"You can't evaluate a man by logic alone." -- McCoy, "I, Mudd", Star Trek

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019