Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3C21A373.3C40BCB4@syntrex.com> Date: Thu, 20 Dec 2001 09:38:11 +0100 From: Pavel Tsekov X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686) X-Accept-Language: en MIME-Version: 1.0 To: Mark Sheppard CC: cygwin AT cygwin DOT com Subject: Re: sscanf %as broken (was: linking with glut32.lib?) References: <4 DOT 3 DOT 2 DOT 7 DOT 0 DOT 20011219110228 DOT 00b4da40 AT irispavp DOT igb DOT umontreal DOT ca> <20011219201135 DOT GL4554 AT ddf DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit The man page of the glibc sscanf explains it all - see this: a Indicates that the conversion will be s, the needed memory space for the string will be malloc'ed and the pointer to it will be assigned to the char pointer variable, which does not have to be initialised before. This flag does not exist in ANSI C. In other words this is a glibc artifact and cygwin uses newlib as its C runtime library. Mark Sheppard wrote: > > On 2001-12-19 (Wednesday) at 11:13:01 -0500, Andre Bleau wrote: > > > Anyway I've now got it compiling cleanly, but there's a totally > unrelated runtime error which after investigation looks like it's > caused by sscanf(3) not working properly with "%as". The following > code which works under Linux (sscanf returns 1) but not under Cygwin > (sscanf returns 0) demonstrates the problem: -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/