]> granicus.if.org Git - procps-ng/commit
top: refresh interval accepts non-locale decimal value
authorJan Rybar <jrybar@redhat.com>
Sat, 5 Aug 2017 22:00:00 +0000 (00:00 +0200)
committerCraig Small <csmall@enc.com.au>
Sat, 19 Aug 2017 10:46:39 +0000 (20:46 +1000)
commit62da5ee3ce61846cdc6dcd5be334bd6b1e4089f1
tree787b8123b7520ebd5b78f852739e9a1f8a9a9e4a
parentbb19ac0926424c1403acdfbeebd11a7adef2389c
top: refresh interval accepts non-locale decimal value

For the past 3 years top has fully honored that locale
LC_NUMERIC setting which impacts his refresh interval.
For the past nearly 5 years top has saved that refresh
value in a locale independent form in his config file.

With this commit we'll intentionally break top so that
a comma or period will be accepted for the radix point
regardless of what that LC_NUMERIC may have suggested.

The current locale LC_NUMERIC will, however, determine
how the delay interval is displayed in the 'd' prompt.

[ This position is better than the approach employed ]
[ by those coreutils 'sleep' and 'timeout' programs. ]
[ Both claim to permit floating point arguments. But ]
[ neither one will accept the comma separator should ]
[ the locale be a country that in fact uses a comma. ]

Reference(s):
https://gitlab.com/procps-ng/procps/merge_requests/50

Prototyped by: Jan Rybar <jrybar@redhat.com>
Signed-off-by: Jim Warner <james.warner@comcast.net>
NEWS
top/top.c