summaryrefslogtreecommitdiff
path: root/src/util/snprintf.c
Commit message (Collapse)AuthorAge
* use lrint and casts to avoid compiler warnings about type conversionrhaas2013-07-04
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@5030 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed formatting for the %g format conversion for small numbers.goodale2006-11-14
| | | | | | | Fixes PR 2058. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4386 17b73243-c579-4c4c-a9d2-2d5706c11dac
* As discussed in today's Cactus call, applying patches from 14 Febswhite2006-03-02
| | | | | | | Patches mailing list. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4263 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed gcc compiler warnings about local variables named after global symbolstradke2005-04-05
| | | | | | | and potentially uninitialized variables. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4021 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Rename pow10 to mypow10 because pow10 is defined on some systems in <math.h>schnetter2005-03-24
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4018 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Rename "round" to "myround". Otherwise, the function "round" has theschnetter2004-12-28
| | | | | | | | same name as the one from <math.h> (which is #included) but has a different return type, which is an error for gcc 4.0. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3944 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added support for 'g' format.goodale2004-12-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3941 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added support for E format.goodale2004-12-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3940 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fix bug which ate zeros after decimal places for output.goodale2004-12-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3939 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Undo my previous commit because it was GPL code.tradke2004-12-17
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3936 17b73243-c579-4c4c-a9d2-2d5706c11dac
* New version of snprintf() and vsnprintf(). These are taken from the glib 1.2.8tradke2004-12-17
| | | | | | | | | source code. They have integrated a fix to correctly convert floating point numbers into their string representation. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3935 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed type conversions for gcc 3.0 .goodale2001-06-23
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2247 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added Util_asprintf,Util_asnprintf,Util_snprintf,Util_vsnprintf.goodale2001-05-24
asprintf is like sprintf, but the first arg is a char ** and should basically be the address of a null pointer. The routine allocates enough space and passes back the new buffer pointer. asnprintf is as above, but the buffer need not be null. The thirs argument is the size of the current buffer, and if the string would be larger than that, the current buffer is freed and a new buffer big enough is allocated. snprintf and vsnprintf are pretty standard, except we don't have them on all platforms so I hunted down a file on the internet, written by Patrick Powel (papowell@astart.com), to give us a portable version of the functionality. It may not be entirely up to scratch with floating point - I've not tested it too thouroughly yet. This should enable us to make the web-server stuff a bit more secure against buffer-overruns. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2210 17b73243-c579-4c4c-a9d2-2d5706c11dac