]> granicus.if.org Git - procps-ng/commit
top: correct an insidious occasional truncation buglet
authorJim Warner <james.warner@comcast.net>
Mon, 2 Oct 2017 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Mon, 2 Oct 2017 11:23:13 +0000 (22:23 +1100)
commit1bc25e920ab25e8dabf279b43cd918ed84f9c37d
tree7355dade9758857c746e5bd28ab0230d7a19ba4d
parente189569db29ca7531fa8e53b7489d1830cf12b6f
top: correct an insidious occasional truncation buglet

With the help of our Swedish translator, hopefully the
final buglet has now been vanquished in the multi-byte
translation support. This one was a real nasty bugger.

Although it didn't occur with every terminal emulator,
occasionally random text lines were being chopped off.

As it turns out, those terminals were blameless. There
were two separate places in top's show_special routine
where potential multi-byte sequences were inadequately
addressed. Solution: exploit existing utf-8 functions.

[ it also became apparent that the translation hints ]
[ in the top_nls module were deficient. so a special ]
[ caution was added regarding the final line of txt. ]

Reference(s):
https://gitlab.com/procps-ng/procps/issues/68

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c
top/top.h
top/top_nls.c