yes please... ok nicm
On Fri, Nov 06, 2015 at 10:18:20AM -0500, Ted Unangst wrote: > This removes the "rarely" used LESSCHARDEF env. The next diff will be for > LESSCHARSET, but I'm content to ax one branch at a time. > > > Index: charset.c > =================================================================== > RCS file: /cvs/src/usr.bin/less/charset.c,v > retrieving revision 1.12 > diff -u -p -r1.12 charset.c > --- charset.c 5 Nov 2015 22:18:27 -0000 1.12 > +++ charset.c 6 Nov 2015 15:17:18 -0000 > @@ -352,15 +352,6 @@ set_charset(void) > return; > > /* > - * LESSCHARSET is not defined: try LESSCHARDEF. > - */ > - s = lgetenv("LESSCHARDEF"); > - if (s != NULL && *s != '\0') { > - ichardef(s); > - return; > - } > - > - /* > * Try using the codeset name as the charset name. > */ > s = nl_langinfo(CODESET); > Index: less.1 > =================================================================== > RCS file: /cvs/src/usr.bin/less/less.1,v > retrieving revision 1.45 > diff -u -p -r1.45 less.1 > --- less.1 23 Nov 2014 09:56:32 -0000 1.45 > +++ less.1 6 Nov 2015 15:17:18 -0000 > @@ -1482,40 +1482,7 @@ It is the only character set that suppor > Selects a character set appropriate for Microsoft Windows (cp 1251). > .El > .Pp > -In rare cases, it may be desired to tailor > -.Nm > -to use a character set other than the ones definable by LESSCHARSET. > -In this case, the environment variable > -.Ev LESSCHARDEF > -can be used to define a character set. > -It should be set to a string where each character in the string represents > -one character in the character set. > -The character "." is used for a normal character, "c" for control, > -and "b" for binary. > -A decimal number may be used for repetition. > -For example, "bccc4b." would mean character 0 is binary, > -1, 2 and 3 are control, 4, 5, 6 and 7 are binary, and 8 is normal. > -All characters after the last are taken to be the same as the last, > -so characters 9 through 255 would be normal. > -(This is an example, and does not necessarily > -represent any real character set.) > -.Pp > -This table shows the value of LESSCHARDEF which is equivalent > -to each of the possible values for LESSCHARSET: > -.Bd -literal -offset indent > -ascii 8bcccbcc18b95.b > -dos 8bcccbcc12bc5b95.b. > -ebcdic 5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b > - 9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b. > -IBM-1047 4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc > - 191.b > -iso8859 8bcccbcc18b95.33b. > -koi8-r 8bcccbcc18b95.b128. > -latin1 8bcccbcc18b95.33b. > -next 8bcccbcc18b95.bb125.bb > -.Ed > -.Pp > -If neither LESSCHARSET nor LESSCHARDEF is set, > +If neither LESSCHARSET is not set, > but any of the strings "UTF-8", "UTF8", "utf-8" or "utf8" is found in the > .Ev LC_ALL , LC_CTYPE > or > @@ -1946,8 +1913,6 @@ end character in an ANSI color escape se > (default "0123456789;[?!"'#%()*+\ "). > .It Ev LESSBINFMT > Format for displaying non-printable, non-control characters. > -.It Ev LESSCHARDEF > -Defines a character set. > .It Ev LESSCHARSET > Selects a predefined character set. > .It Ev LESSCLOSE >