ObjFW  Check-in [6dff0f5922]

Overview
Comment:Always use "." for the decimal point

This is achieved by replacing the locale's decimal point with "." after
formatting and replacing "." with the locale's decimal point before
parsing.

To still use the decimal point from the locale for formatting, the new
flag "," is introduced to formats. This is useful for just printing a
string to the user that is not saved to a file or sent via a network.

While this is an ugly hack, there is no better way to do this other than
implementing the functionality of printf and strtod myself, as POSIX
does not specify versions of these that take a locale as an argument.
While this is a lot of work and error-prone, I will most likely end up
doing this eventually.

This commit also enables the locale in OFApplication to notice when
things break. As a nice side effect, ofhttp now uses the locale's
decimal point in its user interface.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6dff0f59220b3915dfe2e699b4278eaa20ae05ba2780621ef5f9409a54dec868
User & Date: js on 2017-01-07 02:34:39
Other Links: manifest | tags
Context
2017-01-07
03:26
Use strtof_l, strtod_l and asprintf_l if available check-in: 0ad678f125 user: js tags: trunk
02:34
Always use "." for the decimal point check-in: 6dff0f5922 user: js tags: trunk
00:37
Add of_ascii_{to{upper,lower},is{alpha,alnum}} check-in: d9eb7b50b3 user: js tags: trunk
Changes