delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/12/19/15:11:58

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
From: Mark Sheppard <mark AT ddf DOT net>
Date: Wed, 19 Dec 2001 20:11:35 +0000
To: cygwin AT cygwin DOT com
Subject: sscanf %as broken (was: linking with glut32.lib?)
Message-ID: <20011219201135.GL4554@ddf.net>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4 DOT 3 DOT 2 DOT 7 DOT 0 DOT 20011219110228 DOT 00b4da40 AT irispavp DOT igb DOT umontreal DOT ca>
Mime-Version: 1.0
In-Reply-To: <4.3.2.7.0.20011219110228.00b4da40@irispavp.igb.umontreal.ca>
User-Agent: Mutt/1.3.24i
X-PGP-Public-Key: https://www.ddf.net/~mark/
X-PGP-Fingerprint: 1BB3 0616 CB29 EAAC 5DE1 86D4 B3C0 D7A7 3F4C 9332

On 2001-12-19 (Wednesday) at 11:13:01 -0500, Andre Bleau wrote:
> 
> >I'm trying to get a GLUT application compiled under cygwin and am
> >having a spot of bother.  [...]
> 
> GLUT support is already included in cygwin's openGL package.

Thanks for that.  I hadn't realised GLUT and OpenGL were supported out
of the box like that.  I'd done some Googling trying to find
instructions for compiling GLUT programs and nothing I came across
mentioned an OpenGL Cygwin package.  Next time I'll read the package
list more carefully!

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:


  #include <stdio.h>

  int main(int argc, char *argv[]){
    char *string = "This is a string\n";
    char *word;

    if(!sscanf(string, "%as", &word)){
      fprintf(stderr, "No string in string.\n");
    }
    else{
      printf("Found `%s' in string.\n", word);
    }
    return 0;
  }


Mark.

--
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