Date: Fri, 29 Aug 2003 13:52:51 -0400 Message-Id: <200308291752.h7THqpoT012953@envy.delorie.com> From: DJ Delorie To: djgpp-workers AT delorie DOT com In-reply-to: <200308291742.h7THgvTw005443@speedy.ludd.luth.se> (message from Martin Str|mberg on Fri, 29 Aug 2003 19:42:57 +0200 (CEST)) Subject: Re: (fwd) Re: sscanf's return value References: <200308291742 DOT h7THgvTw005443 AT speedy DOT ludd DOT luth DOT se> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > I posted the following and still no comment. I think they agree > (silence is golden). The previous articles made their option > clear. Anyone not thinking so, please follow-up the article or one > of its siblings in the newsgroup. Hence we do have a bug in > *scanf(). (No I'm not volunteering to correct it.) Glibc 2.3.2-27.9 (RHL9) agrees with you: sscanf("", "%*[0123456789]%*c") = -1 sscanf("X", "%*[0123456789]%*c") = 0 sscanf("1", "%*[0123456789]%*c") = -1 sscanf("1X2", "%*[0123456789]%*[0123456789]") = 0