On Sunday 23 March 2008 17:17:18 Anthony Kozar wrote: > 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? man sscanf: n Nothing is expected; instead, the number of characters consumed thus far from the input is stored through the next pointer, which must be a pointer to int. This is not a conversion, although it can be suppressed with the * assignment-suppression character. Which is why it is always 0 (no characters had been consumed). It should be sscanf("%d",&n); -- Felipe Sateler