New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes in float parsing code #3

Merged
merged 2 commits into from Feb 10, 2012

Conversation

Projects
None yet
2 participants
@nijel
Copy link
Contributor

nijel commented Feb 9, 2012

Please merge these changes, which make Little-CMS actually work with CCMX files on locales not using . as decimals separator.

nijel added some commits Feb 9, 2012

Make float parsing work in different locales
Directly using atof is wrong as it is locale dependent and in some
languyages decimals separator is not . as is used in CCMX. This leads to
failure (or rather to trimming decimal part of the numbers).

This change uses printf to figure out what current locale use,
localeconv might sound as better to use, but it's definitely not thread
safe so it sounds like potential source of troubles.

@ghost ghost assigned mm2 Feb 10, 2012

mm2 pushed a commit that referenced this pull request Feb 10, 2012

Marti Maria
Merge pull request #3 from nijel/master
Ok, seems good. Thanks for sending the code!

@mm2 mm2 merged commit c00a690 into mm2:master Feb 10, 2012

@mm2

This comment has been minimized.

Copy link
Owner

mm2 commented Feb 10, 2012

Done, many thanks!

Regards
Marti

Michal Čihař
reply@reply.github.com
escribió:

Please merge these changes, which make Little-CMS actually work with
CCMX files on locales not using . as decimals separator.

You can merge this Pull Request by running:

git pull https://github.com/nijel/Little-CMS master

Or you can view, comment on it, or merge it online at:

#3

-- Commit Summary --

  • Split out float parsing to separate function
  • Make float parsing work in different locales

-- File Changes --

M src/cmscgats.c (51)

-- Patch Links --

https://github.com/mm2/Little-CMS/pull/3.patch
https://github.com/mm2/Little-CMS/pull/3.diff


Reply to this email directly or view it on GitHub:
#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment