Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Interfaces

Date2005-10-25 14:26
FromMichael Gogins
SubjectRe: [Cs-dev] Interfaces
I will change to sprintf tonight. Thanks for the info, I did think it was ANSI.

Regards,
Mike

-----Original Message-----
From: Istvan Varga 
Sent: Oct 25, 2005 7:46 AM
To: csound-devel@lists.sourceforge.net
Subject: Re: [Cs-dev] Interfaces

Victor Lazzarini wrote:

> Sorted the SConstruct file. Now trying to build the interfaces lib.
> A problem occurs in filebuilding.cpp, because darwin doesn't seem
> to have gcvt(). I couldn't find fcvt() either.
> Is that right? I thought those were ANSI std C lib functions.

No, gcvt() is not ANSI C, it is an old System V function. For ANSI
C compliance, sprintf() should be used instead. Quoting from the
info page of gcvt():

  -- Function: char * gcvt (double VALUE, int NDIGIT, char *BUF)
      `gcvt' is functionally equivalent to `sprintf(buf, "%*g", ndigit,
      value'.  It is provided only for compatibility's sake.  It returns
      BUF.

      If NDIGIT decimal digits would exceed the precision of a `double'
      it is reduced to a system-specific value.

I already noticed it earlier, but did not comment on the use of gcvt()
as it is not my code and is not included in the main API library.


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel





-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net