OpenBSD CVS

CVS log for src/usr.bin/less/charset.c


[BACK] Up to [local] / src / usr.bin / less

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.26 / (download) - annotate - [select for diffs], Mon Sep 2 14:07:45 2019 UTC (4 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, HEAD
Changes since 1.25: +0 -25 lines
Diff to previous 1.25 (colored)

Delete what remains of the support for combining characters into
ligatures: it was incomplete (only for the Arabic script and only
for the single ligature LAM WITH ALEF) and it was implemented in a
way that is unsustainable (with a static table inside less).

If we ever want ligature support, we are better off making a fresh
start.  However, for languages like Arabic and Persian, even that
wouldn't really be useful without having bidirectional support first.

OK millert@
(and also considering comments from Mohammadreza Abdollahzadeh,
Evan Silberman, and benno@)

Revision 1.25 / (download) - annotate - [select for diffs], Sat Aug 31 13:44:29 2019 UTC (4 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.24: +21 -0 lines
Diff to previous 1.24 (colored)

New utility function mbtowc_left() because this functionality -
decoding a UTF-8 multibyte character to the left of a given byte -
is already needed at three places in line.c and will also be needed
for cleanup work in cmdbuf.c in the future.
OK millert@

Revision 1.24 / (download) - annotate - [select for diffs], Wed May 15 19:36:20 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

trivial patch to at least make the buggy functions control_char()
and get_wchar() static for now - until they can be deleted

Revision 1.23 / (download) - annotate - [select for diffs], Wed May 15 18:18:08 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Changes since 1.22: +0 -42 lines
Diff to previous 1.22 (colored)

Clean up all major UTF-8 issues in cvt.c.
This also allows to delete the buggy, now unused function put_wchar().
OK millert@

Revision 1.22 / (download) - annotate - [select for diffs], Tue May 7 14:26:38 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Changes since 1.21: +0 -12 lines
Diff to previous 1.21 (colored)

Completely clean up UTF-8 handling in the file filename.c:
Employ the usual form of an mbtowc(3) loop, eliminating two calls
to the bad function step_char() and reducing the number of nested
loops by one.  This also removes the last caller of the bad function
binary_char(), which is consequently deleted.
While here, count ASCII C0 non-whitespace control characters as
binary (except backspace and, with -R only, escape).
OK millert@

Revision 1.21 / (download) - annotate - [select for diffs], Thu Apr 20 21:23:16 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.20: +3 -1 lines
Diff to previous 1.20 (colored)

control_char() for ASCII needs to include both genuine control
characters and top-bit-set nonprintable characters (so both iscntrl()
and !isprint()), fixes behaviour broken in r1.15/r1.16, noticed by
deraadt@.

ok deraadt tedu

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jan 4 16:27:01 2017 UTC (7 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.19: +4 -3 lines
Diff to previous 1.19 (colored)

Avoid an out of bounds read when the environment variable LESSBINFMT
is set to "*".  Patch from Tobias Stoeckmann.  OK tb@

Revision 1.19 / (download) - annotate - [select for diffs], Sat Sep 17 15:06:41 2016 UTC (7 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

little bit more KNF

Revision 1.18 / (download) - annotate - [select for diffs], Wed Mar 16 15:36:26 2016 UTC (8 years, 2 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

style(9) includes

ok nicm@

Revision 1.17 / (download) - annotate - [select for diffs], Thu Nov 12 00:00:41 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.16: +7 -37 lines
Diff to previous 1.16 (colored)

Remove chardef[] and just use isprint/iscntrl directly, ok tedu

Revision 1.16 / (download) - annotate - [select for diffs], Sat Nov 7 18:06:38 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.15: +2 -143 lines
Diff to previous 1.15 (colored)

delete custom charset tables and just use ctype. init utf_mode from LC_CTYPE
ok nicm

Revision 1.15 / (download) - annotate - [select for diffs], Sat Nov 7 03:30:52 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.14: +0 -62 lines
Diff to previous 1.14 (colored)

remove some charsets we don't use. remove LESSCHARSET since setting it to
anything other than LC_CTYPE is likely a bug.
ok nicm

Revision 1.14 / (download) - annotate - [select for diffs], Fri Nov 6 16:20:37 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.13: +0 -9 lines
Diff to previous 1.13 (colored)

remove rarely used LESSCHARDEF support. ok nicm

Revision 1.13 / (download) - annotate - [select for diffs], Fri Nov 6 15:50:33 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.12: +2 -4 lines
Diff to previous 1.12 (colored)

Garrett D'Amore has agreed to moving his copyright line up above the
terms with the existing copyright, so it is clear it applies the same
terms.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Nov 5 22:18:27 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +1 -1 lines
Diff to previous 1.11 (colored)

whitespace

Revision 1.11 / (download) - annotate - [select for diffs], Thu Nov 5 22:08:43 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.10: +287 -416 lines
Diff to previous 1.10 (colored)

Replace less with the cleaned-up fork of less 458 maintained by Garrett
D'Amore at https://github.com/gdamore/less-fork. This has significantly
less portability goop, has a tidied up code style, uses terminfo instead
of termcap, and is has stricter POSIX compliance.

Many of our local changes have been accepted upstream: substantial
remaining local changes are code to read help files from /usr/share
rather than compiling them in, man page and help improvements, and some
tweaks to the default options.

Review and testing by millert, ok deraadt

Revision 1.10 / (download) - annotate - [select for diffs], Fri Apr 25 13:38:21 2014 UTC (10 years ago) by shadchin
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.9: +2 -3 lines
Diff to previous 1.9 (colored)

Merge Less 458 plus local patches

ok guenther@, ok jmc@ for man bits

Revision 1.1.1.4 / (download) - annotate - [select for diffs] (vendor branch), Fri Apr 25 13:33:41 2014 UTC (10 years ago) by shadchin
Branch: markn, MARK_NUDELMAN
CVS Tags: LESS_458
Changes since 1.1.1.3: +81 -5 lines
Diff to previous 1.1.1.3 (colored)

Import of Less 458

ok guenther@

Revision 1.9 / (download) - annotate - [select for diffs], Wed Sep 21 20:57:42 2011 UTC (12 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

Fix mismerged copyright notice
Use strlcpy() not snprintf() to copy a simple string.
OK deraadt@

Revision 1.8 / (download) - annotate - [select for diffs], Fri Sep 16 18:12:09 2011 UTC (12 years, 8 months ago) by shadchin
Branch: MAIN
Changes since 1.7: +912 -52 lines
Diff to previous 1.7 (colored)

Merge in less 444 plus local changes

ok nicm@

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Fri Sep 16 17:47:01 2011 UTC (12 years, 8 months ago) by shadchin
Branch: markn, MARK_NUDELMAN
CVS Tags: LESS_444
Changes since 1.1.1.2: +883 -46 lines
Diff to previous 1.1.1.2 (colored)

Import of Less 444

ok nicm@

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 25 23:36:11 2004 UTC (20 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)

isprint() doesn't consider all whitespace to be printable so use
isspace() too.  Problem noticed by cedric@ and diagnosed by deraadt@.
OK deraadt@.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Apr 17 20:00:56 2003 UTC (21 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.5: +54 -0 lines
Diff to previous 1.5 (colored)

Hard-code charset if SMALL

Revision 1.5 / (download) - annotate - [select for diffs], Sun Apr 13 18:26:25 2003 UTC (21 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.4: +96 -49 lines
Diff to previous 1.4 (colored)

Merge in less-381 w/ local changes and remove obsolete files.

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sun Apr 13 18:21:21 2003 UTC (21 years, 1 month ago) by millert
Branch: markn, MARK_NUDELMAN
CVS Tags: LESS_381
Changes since 1.1.1.1: +86 -37 lines
Diff to previous 1.1.1.1 (colored)

Stock less-390 with some unneeded DOS/Windoze files removed

Revision 1.4 / (download) - annotate - [select for diffs], Thu Mar 13 09:09:32 2003 UTC (21 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.3: +5 -5 lines
Diff to previous 1.3 (colored)

lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu

Revision 1.3 / (download) - annotate - [select for diffs], Mon Nov 19 19:02:14 2001 UTC (22 years, 6 months ago) by mpech
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.2: +8 -8 lines
Diff to previous 1.2 (colored)

kill more registers

millert@ ok

Revision 1.2 / (download) - annotate - [select for diffs], Mon Jan 29 01:58:00 2001 UTC (23 years, 3 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.1: +2 -0 lines
Diff to previous 1.1 (colored)

$OpenBSD$

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sat Sep 21 05:39:41 1996 UTC (27 years, 8 months ago) by etheisen
Branch: markn, MARK_NUDELMAN
CVS Tags: less_290, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

Import of unmolested less-290.

Revision 1.1 / (download) - annotate - [select for diffs], Sat Sep 21 05:39:41 1996 UTC (27 years, 8 months ago) by etheisen
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.