delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/12/20/03:38:50

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <ptsekov AT syntrex DOT com>
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 <mark AT ddf DOT net>
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>

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/

- Raw text -


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