1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-18 01:18:51 +02:00

printf,seq,sleep,tail,timeout: accept current-locale floats

These commands now accept floating-point numbers in the
current locale, as well as in the C locale.
Compatibility problem reported by Robert Elz.
* NEWS: Document this.
* bootstrap.conf (gnulib_modules): Add cl-strtod, cl-strtold.
Remove c-strtold.
* doc/coreutils.texi (Floating point, tail invocation)
(printf invocation, timeout invocation, sleep invocation)
(seq invocation): Document this.
* gl/lib/cl-strtod.c, gl/lib/cl-strtod.h, gl/lib/cl-strtold.c:
* gl/modules/cl-strtod, gl/modules/cl-strtold: New files.
* src/printf.c, src/seq.c, src/sleep.c, src/tail.c, src/timeout.c:
Include cl-strtod.h instead of c-strtod.
* src/printf.c (vstrtold):
* src/seq.c (scan_arg, print_numbers):
* src/sleep.c (main):
* src/tail.c (parse_options):
* src/timeout.c (parse_duration):
Use cl_strtold instead of c_strtold.
This commit is contained in:
Paul Eggert
2019-01-26 16:37:01 -08:00
parent 3cd48057c7
commit 3fe8bc09be
13 changed files with 166 additions and 27 deletions
+24
View File
@@ -0,0 +1,24 @@
Description:
Convert string to double in current or C locale.
Files:
lib/cl-strtod.c
lib/cl-strtod.h
Depends-on:
c-strtod
configure.ac:
AC_REQUIRE([AC_C_RESTRICT])
Makefile.am:
lib_SOURCES += cl-strtod.c
Include:
"cl-strtod.h"
License:
GPL
Maintainer:
all
+23
View File
@@ -0,0 +1,23 @@
Description:
Convert string to long double in current or C locale.
Files:
lib/cl-strtold.c
Depends-on:
c-strtold
cl-strtod
configure.ac:
Makefile.am:
lib_SOURCES += cl-strtold.c
Include:
"cl-strtod.h"
License:
GPL
Maintainer:
all