Csound Csound-dev Csound-tekno Search About

[Cs-dev] sscanf() not working in argdecode.c

Date2008-03-23 20:17
FromAnthony Kozar
Subject[Cs-dev] sscanf() not working in argdecode.c
I have noticed that the call to sscanf() in the code below (and the similar
code throughout argdecode.c) does not work properly on MacOS 9.

    else if (!(strncmp (s, "m-amps=", 7))) {
      int n;
      s += 7;
      if (*s=='\0') dieu(csound, Str("no message amps"));
      sscanf(s, "%n", &n);
      if (n) O->msglevel |= AMPLMSG;
      else O->msglevel &= ~AMPLMSG;
      return 1;
    }

The value of n is always set to 0 regardless of what number follows the
equal sign.

Does it work elsewhere?

Anthony Kozar
mailing-lists-1001 AT anthonykozar DOT net
http://anthonykozar.net/


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-03-23 20:31
FromFelipe Sateler
SubjectRe: [Cs-dev] sscanf() not working in argdecode.c
AttachmentsNone  None  None  

Date2008-03-23 20:57
Fromroot
SubjectRe: [Cs-dev] sscanf() not working in argdecode.c
Hum; is this code just bust and should use %d rather than %n
==John ff


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net