[openbeosnetteam] Re: snprintf

> Metrowerks stdlib, for reasons I can't even begin to fathom, doesn't 
> have snprintf(). Therefore, I have been doing things like this when I 
> run across one:
> #ifdef _MWERKS_STDIO_H
>       sprintf(buf,"%s.%s",a,b);
> #else
>       snprintf(buf,255,"%s.%s",a,b);
> #endif
> 
> Is this all right?

I would like something like
#ifdef _MWERKS_STDIO_H
void
snprintf(char *buf,...)
{
        ...
}
#endif

in *one* place more. The Metrowerks "port" is just an intermediate 
thing, so there is no need to flood the code with unsafe things like 
this.

Adios...
   Axel.



Other related posts: