aboutsummaryrefslogtreecommitdiff
path: root/fpconv.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add updated netlib dtoa.c from https://netlib.sandia.gov/fp/dtoa.c lijunlong2023-02-221-1/+11
| | | Co-authored-by: Jesper Lundgren <jesperlundgren@exosite.com>
* optimization: add void to functions with no arguments to prevent compiler ↵lijunlong2023-02-221-2/+2
| | | | warning.
* fixed the warning "inline function ‘fpconv_init’ declared but never ↵2.1.0.3rc2Yichun Zhang (agentzh)2015-11-011-1/+1
| | | | defined" from gcc.
* Rename USE_INTERNAL_DTOA to USE_INTERNAL_FPCONVMark Pulford2012-03-041-1/+1
|
* Use internal dtoa/strtod for double conversionMark Pulford2012-03-041-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | The internal Lua CJSON dtoa/strtod routines have locale support disabled. This avoids problems under locales with comma decimal separators. Build changes: - CMake: Check for big endian architectures - Makefile: Provide option to build with dtoa.c Modifications to dtoa.c: - Include locale dtoa_config.h configuration - Rename Infinity/NaN to inf/nan to match common C libraries - Rename strtod() -> internal_strtod() to prevent conflict with libc function Modifications to g_fmt.c: - Return output string length (instead of original buffer pointer) - Provide precision as an argument to g_fmt() - Silence compilations warnings from vendor source - while(a = b) - Unused label "done:" - Only swap to scientific notation when once the number of decimal digits required exceeds the precision available. This matches standard printf format %g. - Display a "0" in front of numbers < 1.
* Sanitise locale code, comments and documentationMark Pulford2012-01-011-2/+5
|
* Add fpconv to work around comma decimal pointsMark Pulford2011-12-301-0/+11
Create a separate buffer and translate comma <> dot before calling strtod(), and after calling sprintf() as required. - Add "update_locale" Lua API call and init locale on module load. - Move sprintf format string to fpconv