The OS doesn't support sprintf so you must use StrPrintF.  I assume the
#define is to force you to use the supported routine.  In fact, the Palm OS
does not support most standard C API calls, so use the Palm version of them.

----- Original Message ----- 
From: "Jan Bandouch" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, March 15, 2004 5:12 AM
Subject: Re: sprintf override by StrPrintF. Why?


> > Give this a try. One caveat--it doesn't round up the least significant
> > digit. Also, you can probably get rid of the overflow stuff at the end.
>
> Thanks Steve,
> I'm still searching for a "easier" solution, before I'll give your code
> a try, as I have somehow a problem in reimplementing a basic funtion
> from the standard library.
>
> So another question for the experts:
> I've found out why sprintf() shows weird behaviour, and that is a
> "#define sprintf StrPrintF" in /Core/System/Unix/unix_stdio.h. So I
> never actually call the "real" sprintf().
>
> What's the reason for that? Are there any serious problems with the
> original sprintf()? I'd like to override that setting, but as it is a
> #define, I would need to change the include file, or #undef the #define,
> which isn't nice programming in my opinion. And I don't know what hidden
> problems could occur, that you guys we're aware of.
>
> Thanks,
> Jan
>
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to