Skip to content

Locale independent numbers parsing#799

Merged
bcoconni merged 9 commits intoJSBSim-Team:masterfrom
bcoconni:bcoconni/issue795
Dec 31, 2022
Merged

Locale independent numbers parsing#799
bcoconni merged 9 commits intoJSBSim-Team:masterfrom
bcoconni:bcoconni/issue795

Conversation

@bcoconni
Copy link
Member

Following the discussion in issue #795, the calls to atof() are replaced by a new function atof_locale_c that parses numbers assuming the decimal separator is the period . whatever is the current locale.

The code uses strtod_l that is not part of the C/C++ standard however the code compiles on all platforms that JSBSim supports.

@codecov
Copy link

codecov bot commented Dec 29, 2022

Codecov Report

Merging #799 (20916e1) into master (36dda4f) will increase coverage by 0.05%.
The diff coverage is 31.08%.

@@            Coverage Diff             @@
##           master     #799      +/-   ##
==========================================
+ Coverage   22.32%   22.37%   +0.05%     
==========================================
  Files         167      168       +1     
  Lines       19484    19535      +51     
==========================================
+ Hits         4349     4371      +22     
- Misses      15135    15164      +29     
Impacted Files Coverage Δ
src/input_output/FGInputSocket.cpp 0.00% <0.00%> (ø)
src/input_output/FGUDPInputSocket.cpp 0.00% <0.00%> (ø)
src/input_output/string_utilities.h 98.11% <ø> (ø)
src/math/FGFunction.cpp 0.00% <0.00%> (ø)
src/models/flight_control/FGSwitch.cpp 0.00% <0.00%> (ø)
src/models/propulsion/FGTurbine.cpp 0.00% <0.00%> (ø)
src/input_output/FGXMLElement.cpp 47.33% <25.00%> (ø)
src/input_output/string_utilities.cpp 95.65% <95.65%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@bcoconni bcoconni marked this pull request as ready for review December 29, 2022 22:36
@bcoconni bcoconni merged this pull request into JSBSim-Team:master Dec 31, 2022
bcoconni added a commit to bcoconni/jsbsim that referenced this pull request Dec 31, 2022
Fixes JSBSim-Team#795

Co-authored-by: Sean McLeod <sean@seanmcleod.com>
@bcoconni bcoconni deleted the bcoconni/issue795 branch January 1, 2023 18:03
bcoconni added a commit to bcoconni/jsbsim that referenced this pull request Apr 8, 2023
Fixes JSBSim-Team#795

Co-authored-by: Sean McLeod <sean@seanmcleod.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant