diff options
author | will <will@FreeBSD.org> | 2000-06-22 13:27:52 +0800 |
---|---|---|
committer | will <will@FreeBSD.org> | 2000-06-22 13:27:52 +0800 |
commit | d4e7781ca778b6de2b816e418d67e4b2ab188dc5 (patch) | |
tree | c006535bfceed2a75386f4c91858975c8d16a59a /misc | |
parent | 2f27f10ca604e5c983a3dad9e7a6daf2db9aae57 (diff) | |
download | freebsd-ports-gnome-d4e7781ca778b6de2b816e418d67e4b2ab188dc5.tar.gz freebsd-ports-gnome-d4e7781ca778b6de2b816e418d67e4b2ab188dc5.tar.zst freebsd-ports-gnome-d4e7781ca778b6de2b816e418d67e4b2ab188dc5.zip |
Forgot to move this patch, which adds color support. We use proper make
logic to include the color support here.
Submitted by: KATO Tsuguru <tkato@prontomail.ne.jp>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/less/files/patch-ab | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/misc/less/files/patch-ab b/misc/less/files/patch-ab new file mode 100644 index 000000000000..fb9dcb946beb --- /dev/null +++ b/misc/less/files/patch-ab @@ -0,0 +1,41 @@ +--- charset.c.orig Thu Mar 23 05:36:33 2000 ++++ charset.c Mon Jun 19 22:33:43 2000 +@@ -267,6 +267,10 @@ + control_char(c) + int c; + { ++#ifdef COLOR_LESS ++ if (c == ESC) ++ return 0; ++#endif + c &= 0377; + return (chardef[c] & IS_CONTROL_CHAR); + } +@@ -281,6 +285,20 @@ + { + static char buf[8]; + ++#ifdef COLOR_LESS ++ if(c == ESC) ++ sprintf(buf, "%c", ESC); ++ else ++ { ++ c &= 0377; ++ if (!control_char(c)) ++ sprintf(buf, "%c", c); ++ else if (!control_char(c ^ 0100)) ++ sprintf(buf, "^%c", c ^ 0100); ++ else ++ sprintf(buf, binfmt, c); ++ } ++#else + c &= 0377; + if (!control_char(c)) + sprintf(buf, "%c", c); +@@ -290,5 +308,6 @@ + sprintf(buf, "^%c", c ^ 0100); + else + sprintf(buf, binfmt, c); ++#endif + return (buf); + } |