Commit Graph

67 Commits

Author SHA1 Message Date
Sebastian Bergmann
7f4dc8702a Bump copyright year, 3 of 3. 2008-12-31 11:12:40 +00:00
Scott MacVicar
36660c01ab Add asprintf, use regular system malloc and free and add checks in configure.in for the functions 2008-11-27 19:45:16 +00:00
Scott MacVicar
98766dcd57 Add vasprintf() so the buffer can be automatically calculated, you need to efree this when done though! 2008-11-21 21:49:52 +00:00
Dmitry Stogov
f9f69a5373 Fixed bug #43053 (Regression: some numbers shown in scientific notation). (int-e at gmx dot de)
some 64bit test files may need to be fixed
2008-09-15 11:47:27 +00:00
Marcus Boerger
602dd615e9 - Add %Z to *printf 2008-02-07 18:40:29 +00:00
Marcus Boerger
8954a96939 - WS 2008-02-07 12:45:42 +00:00
Sebastian Bergmann
9b620d50b4 Bump copyright year, 2 of 2. 2007-12-31 07:12:20 +00:00
Ilia Alshanetsky
6c4e9b52b9 MFB: Fixed bug #42785 (json_encode() formats doubles according to locale
rather then following standard syntax).
2007-10-01 15:25:01 +00:00
Derick Rethans
f009a49ff4 - We have to store the original (allocated) pointer here as it was freed after
the pointer itself was modified, otherwise we'll get an invalid free error
  here.
2007-09-04 11:19:33 +00:00
Antony Dovgal
77701c003a 'I32' and 'I' support (per request by Marcus) 2007-08-03 14:30:59 +00:00
Dmitry Stogov
740f5957ba Restore big exponent letter in var_export() ('1e300' -> '1E300') 2007-06-25 08:39:23 +00:00
Derick Rethans
ad8eca0b05 - Added the H modifier to create non-locale-aware non-fixed-precision float
representations.
- Fixed var_export() to use the new H modifier so that it can generate
  parsable PHP code for floats again, independent of the locale.
2007-06-19 12:19:27 +00:00
Antony Dovgal
c94da398b9 add support for %I64(u|d) to sprintf() utilities 2007-04-12 22:00:56 +00:00
Dmitry Stogov
e43c55d20f ZTS fix 2007-04-09 15:35:49 +00:00
Antony Dovgal
ce78040c39 fix CS/WS 2007-02-26 11:55:32 +00:00
Dmitry Stogov
5b2c00bfff ZTS fix 2007-02-26 10:22:44 +00:00
Marcus Boerger
49add78645 - Make [v]s[nl]printf compatible with 5.2 versions and [v]spprintf of head 2007-02-24 18:33:03 +00:00
Marcus Boerger
1c66194f86 - Add [v]slprintf 2007-02-24 18:24:06 +00:00
Sebastian Bergmann
3717df72ae Bump year. 2007-01-01 09:29:37 +00:00
Antony Dovgal
884fb55a29 -NAN should not be possible 2006-12-19 13:26:39 +00:00
Antony Dovgal
0632620997 inf->INF
nan->NAN
2006-12-19 13:15:30 +00:00
Dmitry Stogov
fb7237eebd Support for systems without locale.h 2006-12-19 13:13:48 +00:00
Dmitry Stogov
869003830b Fixed bug #39815 (SOAP double encoding is not locale-independent) 2006-12-19 11:55:16 +00:00
Hannes Magnusson
44693bbf85 - make %f locale aware again
- fix precision loss with %F (noticed by Sebastian Nohn)
- add new tests
2006-12-18 09:25:32 +00:00
Antony Dovgal
4789badd3a use BSD licensed implementation of double-to-string utilities instead of LGPL one
this patch also fixes thread safety issues in zend_strtod()
2006-12-06 09:50:28 +00:00
Marcus Boerger
a372669d4a - Fixed Bug #35978 %n format string specifier wrongly implemented 2006-01-24 20:57:56 +00:00
foobar
251c5173fd bump year and license version 2006-01-01 13:10:10 +00:00
Marcus Boerger
3563b7d571 - Support full range of floats 2005-12-26 14:46:34 +00:00
Marcus Boerger
27986dbc88 - Fix memory corruption in s*printf() (see bug #27678) 2005-12-26 13:39:17 +00:00
Marcus Boerger
2e67d648fc - WS: Make function detection work in my editor 2005-11-01 11:12:27 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Frank M. Kromann
816bcd3aff Fix win32 build. 2004-11-15 21:04:09 +00:00
Derick Rethans
61364b5bb1 - MFH4.3: Cleaned up some of the locale mess:
* all internal use of sprintf, snprintf and the like will always
    use the . as thousands seperator (if php.h is included only!).
  * echo, printf() and sprintf() always render locale-aware
  * added the %F modifier for non-locale aware rendering for floats
2004-11-15 13:42:22 +00:00
Marcus Boerger
43e44e4e9f Bugfix #28012, now for snprintf 2004-04-15 23:08:22 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Marcus Boerger
2c454d7a1f Bugfix #25930 Can't compile snprintf.c 2003-10-21 07:36:43 +00:00
Ilia Alshanetsky
6ac36d1a00 More NaN & INF handling fixes. 2003-09-29 23:44:07 +00:00
Marcus Boerger
9f329adb02 Add length modifier L 2003-09-14 09:50:36 +00:00
Marcus Boerger
9b98e42f35 - Add length modifiers(ll, j, t, h, hh)
# Still missing formats (%a, %A)
# Still missing modifier (l) in (%lc, %ls)
# Still missing modifier (L) in (%La, %LA, %Le, %LE, %Lf, %LF, %Lg, %LG)
# C99 requires any conversion to be able to produce at least 4095
# characters. Implementation only allows less then 512.
#
# Only inside ext/mbstring etc. we could use %lc and %ls. And none of the
# rest should affect us until we stay with double and avoid long double.
2003-09-14 09:12:54 +00:00
Marcus Boerger
af574b9699 - Fix %p to prepend '0x' as suggested by C99.
- Add 'z' prefix.
# Now you can use '%zd' in [v]spprintf() and everything that utilizes it
# like error messages BUT you still cannot rely on it in [v]s[n]printf()
# calls.
2003-09-13 16:49:24 +00:00
Marcus Boerger
4ea2599301 Clearify 2003-08-08 19:48:33 +00:00
Marcus Boerger
2ede480de2 Bugfix #24063 (marcus/ilia) 2003-08-08 19:47:30 +00:00
Marcus Boerger
244795a4df Fix text output of numbers with absolute exponent greater than or equal 80.
#
# Probably not last conclusion on wisdom. But i looked up current apache
# sources and they have the same error and so this must do the trick.
#
2003-07-17 21:26:25 +00:00
Ilia Alshanetsky
8cb5c9c6ba Fixed bug #24063 (*printf() did not handle scientific notation correctly) 2003-06-30 01:03:21 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Ilia Alshanetsky
4f4cc4f7a3 Sanity check that ensures proper handling of 'E' doubles/floats as well as
prevents an unlikely buffer overflow.
2003-05-05 19:54:28 +00:00
foobar
411478e1f6 Fixed bug #20256 (snprintf() not defined) 2003-02-25 09:44:12 +00:00
foobar
8e3f23e3c0 ws fixes + missing $Id$ tags, headers added 2003-02-19 08:40:19 +00:00
Ilia Alshanetsky
f9669f6c49 Modified fix for bug #22187 so that it does not affect handling of numbers
represented in scientific notation.
2003-02-13 19:02:34 +00:00
Ilia Alshanetsky
f924aaf647 Fixed bug #22187 (spprintf function did not handle floats correctly). 2003-02-12 20:41:53 +00:00