From owner-freebsd-current@freebsd.org Thu Nov 28 21:09:07 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C41911B8420 for ; Thu, 28 Nov 2019 21:09:07 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-22.consmr.mail.gq1.yahoo.com (sonic301-22.consmr.mail.gq1.yahoo.com [98.137.64.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47P9HQ6KYXz45py for ; Thu, 28 Nov 2019 21:09:06 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: InjXviUVM1kToZR51lcPXy.WowW2NOsJ.j.ubeEv2.mln0dV_lOsKS4HqjU2OZK Xu7ZB_Cbm5aQXlaTmADzWrE_bK.JoXwL467DV.J9Z._i8FjHsUzN_RaTBGtZlhQccUDW1S9r0kz4 069VpgVzWhDXPbj6EhjX9LWsW38xZkhgdgZiGIV2XPKxdTn4CZ1ibhqOAB3_hZWIVlqx.O6GVQxn 4Hm46ynZgQRsrQWzUiWYnqVI2uyZosS0haxSyXSvtWxuLJTr5DUw.Qf5nj4i.2Cau_uKHZnLZj1R _6D3mGU2pOO9YMU3KylDnjelNKy6F3iwo2jJcMumKWRlYwZXIj4f9fGahoCBS9Wj.N3yvLPz.r_u 3jEQ4ZCl8f1YCMUSYGWBzDctSDmakaSsZixwuGkz_mfCa6NpjydPxP.h2yZKkFdcHQ8fIj.eAqiv rlPDcqsxl9WfLZwn3l0e18RI.OPTs5z8lT_xvP6._Yli528ZRYkjTMtdGCGja_DW7H_KcgB9S0Z5 RcOIYymUCBQQuIFo7UuPqucWMLOcOdOIzr4Lvi_.6xAYtyUMx961vUCNeW5YbAjI5krAmzRvl_bt D89GhMqR7ST6qj_AjvLDDdDBydEl30HopqYKCSvp_X.sTg7I2WffN7NtgJY8l5wyDXyj29M81wzO O6aLOX1_PQZOseILm.UA9dlksDlpSo1nXxEYZpIr5E0n9dNFpJHAzkH2RUX1cy5O4pJ._Y9IeHCj Rn0pH23kvf9cBLyL0gj0DMOQ1uOdHKFwkSfVOeUBq.H4mcaCxIVjloPPW.LYwEtKxhfcuTLhkrwI C2FCU1bWSIpariaKlKA7hCU7aeoZARBWHeOlN7o4ol5_y3HaEkwqzdebT5lQv4N9GJy016Faa_3J M5YFTnZkVIy9_HvY10usJTRu87fG6xpYBcrdz5lycHRwVBBRV8mWUcJVjF.iaF7yhSs5GtrcA7X1 jNdfjUQ2n3Wr1jZUEmqUVZVOAVG1_td39b.cQYGo.uFJCgFfdeo2Rtqst4K05vKHT71d.6w6HJrJ CA1UJXe7KZjH_bRqF4DWEDSnWr2gTutRnkTSCn1l4LUN9pbCmvJxJIQUVseOS1TApSr28owISuu2 _bePWHk.kddpcrj.t.5BWwR1Jt8UA63jA8r67l0fE9puq3Y_RIuVVaJerDpfKQ_Th1q1YwXMcg78 fM24zezcB1.OZhffwNdccDDiaknZJ92xR8FytWnYgkXsDpaCHWg1MfS7R5kmDtVa6.q2X8qcdbOl g1kdJdWlBrfD74eCfhrH0jjozpytxUtuEGLSyMwKMUG.x99jarZb1uv50TbyWKrOWt5HjdWiN99s bIRCEX9OZaOPszvl32gShu6lz0iGikUfzipjoSaFgsU59sW2a3dsRRtvIRMNvrFx2G3Doih3Qk4U eB0ygmdk9d4JUcDp3LXy78B6neQpvKD0AI6a1 Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Thu, 28 Nov 2019 21:09:04 +0000 Received: by smtp402.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 17ff6fe9fcd5c78ff9a126d9173bdbad; Thu, 28 Nov 2019 21:08:59 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Subject: Re: svn commit: r352558 - head/usr.bin/top Message-Id: <1BDFB387-930D-4F4D-8729-A5850F1C15B9@yahoo.com> Date: Thu, 28 Nov 2019 13:08:57 -0800 To: "daichi@freebsd.org" , svn-src-head@freebsd.org, FreeBSD Current X-Mailer: Apple Mail (2.3601.0.10) References: <1BDFB387-930D-4F4D-8729-A5850F1C15B9.ref@yahoo.com> X-Rspamd-Queue-Id: 47P9HQ6KYXz45py X-Spamd-Bar: / X-Spamd-Result: default: False [0.64 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (5.43), ipnet: 98.137.64.0/21(0.87), asn: 36647(0.70), country: US(-0.05)]; NEURAL_SPAM_MEDIUM(0.40)[0.405,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.74)[0.736,0]; RCVD_IN_DNSWL_NONE(0.00)[148.64.137.98.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 21:09:07 -0000 > Author: daichi > Date: Fri Sep 20 17:37:23 2019 > New Revision: 352558 > URL: > https://svnweb.freebsd.org/changeset/base/352558 > > > Log: > top(1): support multibyte characters in command names (ARGV array) > depending on locale. > > - add setlocale() > - remove printable() function > - add VIS_OCTAL and VIS_SAFE to the flag of strvisx() to display > non-printable characters that do not use C-style backslash sequences > in three digit octal sequence, or remove it > > This change allows multibyte characters to be displayed according to > locale. If it is recognized as a non-display character according to the > locale, it is displayed in three digit octal sequence. > Initially picking on tab characters as an example of what is probably a somewhat broader issue . . . Ever since this change, characters like tabs that do not fit in the next character cell when output, but for which they are !isprintable(...), now mess up the top display. Again using tab as an example: line wrapping from the text having been shifted over by more than one character cell. top does not track the line wrapping result in how it decides what to output for the following display updates. As stands I type "hh" to referesh the display when I care about clearing up the messy display. The removed !isprintable handling functionality had its uses and an alternative is needed for some types of characters if the display is not to be messed up by what some command lines that are echoed have in them. I picked on tab because it was obviously involved in some examples that I watched update. I'm not claiming tab is the only character that ends up with e cursor in an unexpected place now. In fact . . . Looking around I found: VIS_SAFE Only encode "unsafe" characters. Unsafe means control char- acters which may cause common terminals to perform unexpected functions. Currently this form allows space, tab, newline, backspace, bell, and return - in addition to all graphic characters - unencoded. So tab, newline, backspace, bell, and return are not encoded or replaced now but do not have top's expected cursor position result. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)