httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hotwired.com (Dean Gaudet)
Subject Re: WWW Form Bug Report: "mod_status.c doesn't compile" on SunOS 4.x
Date Thu, 25 Apr 1996 19:47:32 GMT
In article <9604231621.aa16600@gonzo.ben.algroup.co.uk> you write:
>OK, so what is the char * that sprintf returns when it is broken?

It's one of those useless "oh here's a pointer you gave me already"
returns.  Just as useless as strcpy, memcpy, etc.  Every time I sit
down and write on a new project I end up writing a strcpy that returns
the pointer to the null terminator of the destination.  That's so
much more useful... wow, you can implement concatenation in better than
O(n^2).

You're basically screwed for portability.  I usually steal sprintf from
glibc and stick it right in the source code.  You might want to steal
snprintf from BSD4.4 sources and mandate its use instead.

Dean

Mime
View raw message