Imported Upstream version 487 upstream/487
authorJinWang An <jinwang.an@samsung.com>
Wed, 28 Dec 2022 07:13:18 +0000 (16:13 +0900)
committerJinWang An <jinwang.an@samsung.com>
Wed, 28 Dec 2022 07:13:18 +0000 (16:13 +0900)
69 files changed:
LICENSE
Makefile.aut
Makefile.wnm
NEWS
README
brac.c
ch.c
charset.c
charset.h
cmd.h
cmdbuf.c
command.c
compose.uni
configure
configure.ac
cvt.c
decode.c
defines.ds
defines.o2
defines.o9
defines.wn
edit.c
filename.c
forwback.c
funcs.h
help.c
ifile.c
input.c
jump.c
less.h
less.hlp
less.man
less.nro
lessecho.c
lessecho.man
lessecho.nro
lesskey.c
lesskey.h
lesskey.man
lesskey.nro
lglob.h
line.c
linenum.c
lsystem.c
main.c
mark.c
mkhelp.c
mkutable
optfunc.c
option.c
option.h
opttbl.c
os.c
output.c
pattern.c
pattern.h
pckeys.h
position.c
position.h
prompt.c
screen.c
scrsize.c
search.c
signal.c
tags.c
ttyin.c
ubin.uni
version.c
wide.uni

diff --git a/LICENSE b/LICENSE
index 376b8c8bed74c93fbd05ed7b860f1373e19538a4..832ca1b37075963e6c5a817dd368abfa91292d18 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -2,7 +2,7 @@
                           ------------
 
 Less
-Copyright (C) 1984-2015  Mark Nudelman
+Copyright (C) 1984-2016  Mark Nudelman
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
index 6d299c978463be5b8e782897e9085a327239ad9d..9cc04cea2735bcff078e597850f569fd4e3d64dd 100644 (file)
@@ -111,7 +111,7 @@ compose.uni: unicode/UnicodeData.txt
 ubin.uni: unicode/UnicodeData.txt
        ./mkutable -f2 Cc Cf Cs Co Zl Zp -- unicode/UnicodeData.txt > $@
 wide.uni: unicode/EastAsianWidth.txt
-       ./mkutable -f1 W -- unicode/EastAsianWidth.txt > $@
+       ./mkutable -f1 W -- unicode/EastAsianWidth.txt > $@
 
 distfiles: ${DISTFILES}
 
index 2e1cb60ac4dbc8083dc52bc2fe35cab4d327f0fe..1127328932ffd18fcf59d2ae1fb96ea62f756a48 100644 (file)
@@ -20,7 +20,7 @@ LIBS = user32.lib
 
 # This rule allows us to supply the necessary -D options
 # in addition to whatever the user asks for.
-.c.obj:
+.c.obj::
        $(CC) $(CFLAGS) $<
 
 OBJ = \
@@ -33,11 +33,8 @@ OBJ = \
 
 all: less.exe lesskey.exe
 
-# This is really horrible, but the command line is too long for 
-# MS-DOS if we try to link ${OBJ}.
 less.exe: $(OBJ)
-       -del lesskey.obj
-       $(LD) $(LDFLAGS) *.obj $(LIBS) /out:$@
+       $(LD) $(LDFLAGS) $** $(LIBS) /out:$@
 
 lesskey.exe: lesskey.obj version.obj
        $(LD) $(LDFLAGS) lesskey.obj version.obj $(LIBS) /out:$@
diff --git a/NEWS b/NEWS
index 43f1247377a299f2bb893ca23d6aac8702ff3775..ebdce64b4d0108af35f84a8b6141f72e8b55a570 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,26 @@
 
   To report bugs, suggestions or comments, send email to bug-less@gnu.org
 
+======================================================================
+
+       Major changes between "less" versions 481 and 487
+
+* New commands ESC-{ and ESC-} to shift to start/end of displayed lines.
+
+* Make search highlights work correctly when changing caselessness with -i.
+
+* New option -Da in Windows version to enable SGR mode.
+
+* Fix "nothing to search" error when top or bottom line on screen is empty.
+
+* Fix bug when terminal has no "cm" termcap entry.
+
+* Fix incorrect display when entering double-width chars in search string.
+
+* Fix bug in Unicode handling that missed some double width characters.
+
+* Update Unicode database to 9.0.0.
+
 ======================================================================
 
        Major changes between "less" versions 458 and 481
diff --git a/README b/README
index 726904dce4b7b3ce9bd45eac5170ce355d0f91fb..ee8903dec2b09c03c0310244757d909470d71f91 100644 (file)
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 
-                            Less, version 481
+                            Less, version 487
 
-    This is the distribution of less, version 481, released 31 Aug 2015.
+    This is the distribution of less, version 487, released 25 Oct 2016.
     This program is part of the GNU project (http://www.gnu.org).
 
     This program is free software.  You may redistribute it and/or
diff --git a/brac.c b/brac.c
index 10a0843caa69da17187963d69c08e0c7e270f7c2..5119f4e59f0bf82866829811e7dc08e8ca77afa7 100644 (file)
--- a/brac.c
+++ b/brac.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
diff --git a/ch.c b/ch.c
index da729c5dec06d2eaee07dd823a602327b52b3312..ddebb73a9cb061b3dccadb469e621a8cf1b3a439 100644 (file)
--- a/ch.c
+++ b/ch.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 4c62664e73d1008a48dc8bb564314c3c4c56f272..16613cc79396bd5f61185a16d0f71fe958258a86 100644 (file)
--- a/charset.c
+++ b/charset.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -64,6 +64,8 @@ struct cs_alias {
        char *oname;
 } cs_aliases[] = {
        { "UTF-8",              "utf-8" },
+       { "utf8",               "utf-8" },
+       { "UTF8",               "utf-8" },
        { "ANSI_X3.4-1968",     "ascii" },
        { "US-ASCII",           "ascii" },
        { "latin1",             "iso8859" },
index bb1e4376cbd5051f49680f44dc7f0983c2e7d5c1..a4e3bf1d96b485537d3e955426ea2f7c8d19aa89 100644 (file)
--- a/charset.h
+++ b/charset.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
diff --git a/cmd.h b/cmd.h
index 8a943d1522dcb714ff5e16a3796e82a92a7af450..dd07ff8fd5fb7bbaeb9e45187a0651e289b2496b 100644 (file)
--- a/cmd.h
+++ b/cmd.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -67,6 +67,8 @@
 #define        A_FILTER                55
 #define        A_F_UNTIL_HILITE        56
 #define        A_GOEND_BUF             57
+#define        A_LLSHIFT               58
+#define        A_RRSHIFT               59
 
 #define        A_INVALID               100
 #define        A_NOACTION              101
index 69d7414e9734b41cb6ae136e43c82967f60e34ae..540b84d4d709a2dc5813f0e8a17d47415ed26af1 100644 (file)
--- a/cmdbuf.c
+++ b/cmdbuf.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -149,20 +149,18 @@ cmd_putstr(s)
        while (*s != '\0')
        {
                char *ns = s;
+               int width;
                ch = step_char(&ns, +1, endline);
                while (s < ns)
                        putchr(*s++);
                if (!utf_mode)
-               {
-                       cmd_col++;
-                       prompt_col++;
-               } else if (!is_composing_char(ch) &&
-                          !is_combining_char(prev_ch, ch))
-               {
-                       int width = is_wide_char(ch) ? 2 : 1;
-                       cmd_col += width;
-                       prompt_col += width;
-               }
+                       width = 1;
+               else if (is_composing_char(ch) || is_combining_char(prev_ch, ch))
+                       width = 0;
+               else
+                       width = is_wide_char(ch) ? 2 : 1;
+               cmd_col += width;
+               prompt_col += width;
                prev_ch = ch;
        }
 }
@@ -187,6 +185,8 @@ len_cmdbuf()
 
 /*
  * Common part of cmd_step_right() and cmd_step_left().
+ * {{ Returning pwidth and bswidth separately is a historical artifact
+ *    since they're always the same. Maybe clean this up someday. }}
  */
        static char *
 cmd_step_common(p, ch, len, pwidth, bswidth)
@@ -197,58 +197,32 @@ cmd_step_common(p, ch, len, pwidth, bswidth)
        int *bswidth;
 {
        char *pr;
+       int width;
 
        if (len == 1)
        {
                pr = prchar((int) ch);
-               if (pwidth != NULL || bswidth != NULL)
-               {
-                       int len = (int) strlen(pr);
-                       if (pwidth != NULL)
-                               *pwidth = len;
-                       if (bswidth != NULL)
-                               *bswidth = len;
-               }
+               width = (int) strlen(pr);
        } else
        {
                pr = prutfchar(ch);
-               if (pwidth != NULL || bswidth != NULL)
+               if (is_composing_char(ch))
+                       width = 0;
+               else if (is_ubin_char(ch))
+                       width = (int) strlen(pr);
+               else
                {
-                       if (is_composing_char(ch))
-                       {
-                               if (pwidth != NULL)
-                                       *pwidth = 0;
-                               if (bswidth != NULL)
-                                       *bswidth = 0;
-                       } else if (is_ubin_char(ch))
-                       {
-                               int len = (int) strlen(pr);
-                               if (pwidth != NULL)
-                                       *pwidth = len;
-                               if (bswidth != NULL)
-                                       *bswidth = len;
-                       } else
-                       {
-                               LWCHAR prev_ch = step_char(&p, -1, cmdbuf);
-                               if (is_combining_char(prev_ch, ch))
-                               {
-                                       if (pwidth != NULL)
-                                               *pwidth = 0;
-                                       if (bswidth != NULL)
-                                               *bswidth = 0;
-                               } else
-                               {
-                                       if (pwidth != NULL)
-                                               *pwidth = is_wide_char(ch)
-                                                       ?       2
-                                                       :       1;
-                                       if (bswidth != NULL)
-                                               *bswidth = 1;
-                               }
-                       }
+                       LWCHAR prev_ch = step_char(&p, -1, cmdbuf);
+                       if (is_combining_char(prev_ch, ch))
+                               width = 0;
+                       else
+                               width = is_wide_char(ch) ? 2 : 1;
                }
        }
-
+       if (pwidth != NULL)
+               *pwidth = width;
+       if (bswidth != NULL)
+               *bswidth = width;
        return (pr);
 }
 
index c31fa81a3218329e0774758b5d64b341f6e63285..955a18fbdeacc2bbd35ff421b27be342c677b8f8 100644 (file)
--- a/command.c
+++ b/command.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -1779,6 +1779,16 @@ commands()
                        screen_trashed = 1;
                        break;
 
+               case A_LLSHIFT:
+                       hshift = 0;
+                       screen_trashed = 1;
+                       break;
+
+               case A_RRSHIFT:
+                       hshift = rrshift();
+                       screen_trashed = 1;
+                       break;
+
                case A_PREFIX:
                        /*
                         * The command is incomplete (more chars are needed).
index b814ce9916ae03beebd5759d277595a4677dc2ae..e3e1fa4017ebb3db9c8ce22ea0f254827d0f0219 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by "./mkutable -f2 Mn Me -- unicode/UnicodeData.txt" on Mon Jul 14 16:21:21 PDT 2014 */
+/* Generated by "./mkutable -f2 Mn Me -- unicode/UnicodeData.txt" on Tue Sep 20 10:51:43 PDT 2016 */
        { 0x0300, 0x036f }, /* Mn */
        { 0x0483, 0x0487 }, /* Mn */
        { 0x0488, 0x0489 }, /* Me */
@@ -23,7 +23,8 @@
        { 0x0825, 0x0827 }, /* Mn */
        { 0x0829, 0x082d }, /* Mn */
        { 0x0859, 0x085b }, /* Mn */
-       { 0x08e4, 0x0902 }, /* Mn */
+       { 0x08d4, 0x08e1 }, /* Mn */
+       { 0x08e3, 0x0902 }, /* Mn */
        { 0x093a, 0x093a }, /* Mn */
        { 0x093c, 0x093c }, /* Mn */
        { 0x0941, 0x0948 }, /* Mn */
        { 0x17c9, 0x17d3 }, /* Mn */
        { 0x17dd, 0x17dd }, /* Mn */
        { 0x180b, 0x180d }, /* Mn */
+       { 0x1885, 0x1886 }, /* Mn */
        { 0x18a9, 0x18a9 }, /* Mn */
        { 0x1920, 0x1922 }, /* Mn */
        { 0x1927, 0x1928 }, /* Mn */
        { 0x1cf4, 0x1cf4 }, /* Mn */
        { 0x1cf8, 0x1cf9 }, /* Mn */
        { 0x1dc0, 0x1df5 }, /* Mn */
-       { 0x1dfc, 0x1dff }, /* Mn */
+       { 0x1dfb, 0x1dff }, /* Mn */
        { 0x20d0, 0x20dc }, /* Mn */
        { 0x20dd, 0x20e0 }, /* Me */
        { 0x20e1, 0x20e1 }, /* Mn */
        { 0xa66f, 0xa66f }, /* Mn */
        { 0xa670, 0xa672 }, /* Me */
        { 0xa674, 0xa67d }, /* Mn */
-       { 0xa69f, 0xa69f }, /* Mn */
+       { 0xa69e, 0xa69f }, /* Mn */
        { 0xa6f0, 0xa6f1 }, /* Mn */
        { 0xa802, 0xa802 }, /* Mn */
        { 0xa806, 0xa806 }, /* Mn */
        { 0xa80b, 0xa80b }, /* Mn */
        { 0xa825, 0xa826 }, /* Mn */
-       { 0xa8c4, 0xa8c4 }, /* Mn */
+       { 0xa8c4, 0xa8c5 }, /* Mn */
        { 0xa8e0, 0xa8f1 }, /* Mn */
        { 0xa926, 0xa92d }, /* Mn */
        { 0xa947, 0xa951 }, /* Mn */
        { 0xabed, 0xabed }, /* Mn */
        { 0xfb1e, 0xfb1e }, /* Mn */
        { 0xfe00, 0xfe0f }, /* Mn */
-       { 0xfe20, 0xfe2d }, /* Mn */
+       { 0xfe20, 0xfe2f }, /* Mn */
        { 0x101fd, 0x101fd }, /* Mn */
        { 0x102e0, 0x102e0 }, /* Mn */
        { 0x10376, 0x1037a }, /* Mn */
        { 0x11173, 0x11173 }, /* Mn */
        { 0x11180, 0x11181 }, /* Mn */
        { 0x111b6, 0x111be }, /* Mn */
+       { 0x111ca, 0x111cc }, /* Mn */
        { 0x1122f, 0x11231 }, /* Mn */
        { 0x11234, 0x11234 }, /* Mn */
        { 0x11236, 0x11237 }, /* Mn */
+       { 0x1123e, 0x1123e }, /* Mn */
        { 0x112df, 0x112df }, /* Mn */
        { 0x112e3, 0x112ea }, /* Mn */
-       { 0x11301, 0x11301 }, /* Mn */
+       { 0x11300, 0x11301 }, /* Mn */
        { 0x1133c, 0x1133c }, /* Mn */
        { 0x11340, 0x11340 }, /* Mn */
        { 0x11366, 0x1136c }, /* Mn */
        { 0x11370, 0x11374 }, /* Mn */
+       { 0x11438, 0x1143f }, /* Mn */
+       { 0x11442, 0x11444 }, /* Mn */
+       { 0x11446, 0x11446 }, /* Mn */
        { 0x114b3, 0x114b8 }, /* Mn */
        { 0x114ba, 0x114ba }, /* Mn */
        { 0x114bf, 0x114c0 }, /* Mn */
        { 0x115b2, 0x115b5 }, /* Mn */
        { 0x115bc, 0x115bd }, /* Mn */
        { 0x115bf, 0x115c0 }, /* Mn */
+       { 0x115dc, 0x115dd }, /* Mn */
        { 0x11633, 0x1163a }, /* Mn */
        { 0x1163d, 0x1163d }, /* Mn */
        { 0x1163f, 0x11640 }, /* Mn */
        { 0x116ad, 0x116ad }, /* Mn */
        { 0x116b0, 0x116b5 }, /* Mn */
        { 0x116b7, 0x116b7 }, /* Mn */
+       { 0x1171d, 0x1171f }, /* Mn */
+       { 0x11722, 0x11725 }, /* Mn */
+       { 0x11727, 0x1172b }, /* Mn */
+       { 0x11c30, 0x11c36 }, /* Mn */
+       { 0x11c38, 0x11c3d }, /* Mn */
+       { 0x11c3f, 0x11c3f }, /* Mn */
+       { 0x11c92, 0x11ca7 }, /* Mn */
+       { 0x11caa, 0x11cb0 }, /* Mn */
+       { 0x11cb2, 0x11cb3 }, /* Mn */
+       { 0x11cb5, 0x11cb6 }, /* Mn */
        { 0x16af0, 0x16af4 }, /* Mn */
        { 0x16b30, 0x16b36 }, /* Mn */
        { 0x16f8f, 0x16f92 }, /* Mn */
        { 0x1d185, 0x1d18b }, /* Mn */
        { 0x1d1aa, 0x1d1ad }, /* Mn */
        { 0x1d242, 0x1d244 }, /* Mn */
+       { 0x1da00, 0x1da36 }, /* Mn */
+       { 0x1da3b, 0x1da6c }, /* Mn */
+       { 0x1da75, 0x1da75 }, /* Mn */
+       { 0x1da84, 0x1da84 }, /* Mn */
+       { 0x1da9b, 0x1da9f }, /* Mn */
+       { 0x1daa1, 0x1daaf }, /* Mn */
+       { 0x1e000, 0x1e006 }, /* Mn */
+       { 0x1e008, 0x1e018 }, /* Mn */
+       { 0x1e01b, 0x1e021 }, /* Mn */
+       { 0x1e023, 0x1e024 }, /* Mn */
+       { 0x1e026, 0x1e02a }, /* Mn */
        { 0x1e8d0, 0x1e8d6 }, /* Mn */
+       { 0x1e944, 0x1e94a }, /* Mn */
        { 0xe0100, 0xe01ef }, /* Mn */
index 234aec49f749a7d72cc3d90f15ece99bd562c9b0..53b4634d07abcf68417d2c2b6e82ed8a4f1ab0c7 100755 (executable)
--- a/configure
+++ b/configure
@@ -1305,10 +1305,10 @@ Optional Features:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-secure  Compile in secure mode
-  --with-no-float  Do not use floating point
-  --with-regex={auto,gnu,pcre,posix,regcmp,re_comp,regcomp,regcomp-local,none}  Select a regular expression library  auto
-  --with-editor=PROGRAM   use PROGRAM as the default editor vi
+  --with-secure           Compile in secure mode
+  --with-no-float         Do not use floating point
+  --with-regex=LIB        select regular expression library (LIB is one of auto,none,gnu,pcre,posix,regcmp,re_comp,regcomp,regcomp-local) [auto]
+  --with-editor=PROGRAM   use PROGRAM as the default editor [vi]
 
 Some influential environment variables:
   CC          C compiler command
index 4ac9a351ddd6ff8ee0a3c252d80e6263d3c3d4a0..42bdd6b2cbd0aac8903ca8539023062a973f95c4 100644 (file)
@@ -365,13 +365,13 @@ fi
 
 # Compile in secure mode?
 AC_ARG_WITH(secure,
-  [  --with-secure  Compile in secure mode],
+  [  --with-secure           Compile in secure mode],
   AC_DEFINE(SECURE_COMPILE, 1), AC_DEFINE(SECURE_COMPILE, 0))
 
 # Should we use floating point?
 AC_MSG_CHECKING(for floating point)
 AC_ARG_WITH(no-float,
-  [  --with-no-float  Do not use floating point],
+  [  --with-no-float         Do not use floating point],
   WANT_NO_FLOAT=1, WANT_NO_FLOAT=0)
 if test $WANT_NO_FLOAT = 0; then
   AC_TRY_LINK(, [double f1 = 12.5; double f2 = f1*f1/2.5;], 
@@ -388,7 +388,7 @@ supported_regex=""
 # Select a regular expression library.
 WANT_REGEX=auto
 AC_ARG_WITH(regex,
-  [  --with-regex={auto,gnu,pcre,posix,regcmp,re_comp,regcomp,regcomp-local,none}  Select a regular expression library  [auto]],
+  [  --with-regex=LIB        select regular expression library (LIB is one of auto,none,gnu,pcre,posix,regcmp,re_comp,regcomp,regcomp-local) [[auto]]],
   WANT_REGEX="$withval")
 
 if test $have_regex = no; then
@@ -484,7 +484,7 @@ fi
 AC_MSG_RESULT(regular expression library: $supported_regex)
 
 AC_ARG_WITH(editor,
-  [  --with-editor=PROGRAM   use PROGRAM as the default editor [vi]],
+  [  --with-editor=PROGRAM   use PROGRAM as the default editor [[vi]]],
   AC_DEFINE_UNQUOTED(EDIT_PGM, "$withval"), AC_DEFINE(EDIT_PGM, "vi"))
 
 AH_TOP([
diff --git a/cvt.c b/cvt.c
index d9836418e13feb775536d2dba523a3ced67314a6..dc20b9c7b22a872a0ee6d36b74958585bffbbba1 100644 (file)
--- a/cvt.c
+++ b/cvt.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 1cd159973153f9521451851b3402adf25e13072e..a24f6efb7acf857ee4f766bce1cc3ff6b7970982 100644 (file)
--- a/decode.c
+++ b/decode.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -94,8 +94,12 @@ static unsigned char cmdtable[] =
        ESC,']',0,                      A_RSHIFT,
        ESC,'(',0,                      A_LSHIFT,
        ESC,')',0,                      A_RSHIFT,
+       ESC,'{',0,                      A_LLSHIFT,
+       ESC,'}',0,                      A_RRSHIFT,
        SK(SK_RIGHT_ARROW),0,           A_RSHIFT,
        SK(SK_LEFT_ARROW),0,            A_LSHIFT,
+       SK(SK_CTL_RIGHT_ARROW),0,       A_RRSHIFT,
+       SK(SK_CTL_LEFT_ARROW),0,        A_LLSHIFT,
        '{',0,                          A_F_BRACKET|A_EXTRA,    '{','}',0,
        '}',0,                          A_B_BRACKET|A_EXTRA,    '{','}',0,
        '(',0,                          A_F_BRACKET|A_EXTRA,    '(',')',0,
index 6ef2771ab5fa7b582c0d3f4a25b28a43552ed13f..6009129db2a54ac0586bb98f932460bfce1aec8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index f58693f5af4a74a1c5e497b8279982c20e0f84bb..615686b8a80a86f8faad5ec9edc5acddda48ae37 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 9ebc636428aec7809d620670f7cb8034beb890e2..2e7b95745713014ed53a85ef0023a6faec82aa69 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index f37911d7daacb9ffdaa96460feb6a06e3fbd3f76..6d6e242df0cbe0095dcd6715f14c4eb5d76c8778 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
diff --git a/edit.c b/edit.c
index 2a35adec48d204bba899df085346604776341f65..c508f94aaf0292f7052cd43c15602c0914c108d3 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 9631f1c2b3d819552dc0ebeb68b16ee1e548e349..62cc6e5a1134569b71d93e03caf5bb9198d3482c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 721a0286a7b85860699f0dd1f002fcd3cd8af541..83ae78efb28c8203203ef1b237278b1b58884073 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
diff --git a/funcs.h b/funcs.h
index 53550f0cc46fc50c5e96c44d69a9bb630211dac4..ac63c371bc77b7f773e524f2305a3eeb2ab40c06 100644 (file)
--- a/funcs.h
+++ b/funcs.h
        public void null_line ();
        public POSITION forw_raw_line ();
        public POSITION back_raw_line ();
+       public int rrshift ();
        public void clr_linenum ();
        public void add_lnum ();
        public LINENUM find_linenum ();
        public POSITION next_unfiltered ();
        public POSITION prev_unfiltered ();
        public int is_hilited ();
-       public void chg_caseless ();
        public void chg_hilite ();
+       public void chg_caseless ();
        public int search ();
        public void prep_hilite ();
        public void set_filter_pattern ();
diff --git a/help.c b/help.c
index aba711677f7aaabf616417d51f6da521e23a0e67..3b0d1bd94f72ac75f275999228ce09538a8e8d20 100644 (file)
--- a/help.c
+++ b/help.c
@@ -23,8 +23,10 @@ constant char helpdata[] = {
 ' ',' ','E','S','C','-','S','P','A','C','E',' ',' ',' ',' ',' ',' ',' ',' ',' ','*',' ',' ','F','o','r','w','a','r','d',' ',' ','o','n','e',' ','w','i','n','d','o','w',',',' ','b','u','t',' ','d','o','n','\'','t',' ','s','t','o','p',' ','a','t',' ','e','n','d','-','o','f','-','f','i','l','e','.','\n',
 ' ',' ','d',' ',' ','^','D',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*',' ',' ','F','o','r','w','a','r','d',' ',' ','o','n','e',' ','h','a','l','f','-','w','i','n','d','o','w',' ','(','a','n','d',' ','s','e','t',' ','h','a','l','f','-','w','i','n','d','o','w',' ','t','o',' ','_','\b','N',')','.','\n',
 ' ',' ','u',' ',' ','^','U',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*',' ',' ','B','a','c','k','w','a','r','d',' ','o','n','e',' ','h','a','l','f','-','w','i','n','d','o','w',' ','(','a','n','d',' ','s','e','t',' ','h','a','l','f','-','w','i','n','d','o','w',' ','t','o',' ','_','\b','N',')','.','\n',
-' ',' ','E','S','C','-',')',' ',' ','R','i','g','h','t','A','r','r','o','w',' ','*',' ',' ','L','e','f','t',' ',' ','o','n','e',' ','h','a','l','f',' ','s','c','r','e','e','n',' ','w','i','d','t','h',' ','(','o','r',' ','_','\b','N',' ','p','o','s','i','t','i','o','n','s',')','.','\n',
-' ',' ','E','S','C','-','(',' ',' ','L','e','f','t','A','r','r','o','w',' ',' ','*',' ',' ','R','i','g','h','t',' ','o','n','e',' ','h','a','l','f',' ','s','c','r','e','e','n',' ','w','i','d','t','h',' ','(','o','r',' ','_','\b','N',' ','p','o','s','i','t','i','o','n','s',')','.','\n',
+' ',' ','E','S','C','-',')',' ',' ','R','i','g','h','t','A','r','r','o','w',' ','*',' ',' ','R','i','g','h','t',' ','o','n','e',' ','h','a','l','f',' ','s','c','r','e','e','n',' ','w','i','d','t','h',' ','(','o','r',' ','_','\b','N',' ','p','o','s','i','t','i','o','n','s',')','.','\n',
+' ',' ','E','S','C','-','(',' ',' ','L','e','f','t','A','r','r','o','w',' ',' ','*',' ',' ','L','e','f','t',' ',' ','o','n','e',' ','h','a','l','f',' ','s','c','r','e','e','n',' ','w','i','d','t','h',' ','(','o','r',' ','_','\b','N',' ','p','o','s','i','t','i','o','n','s',')','.','\n',
+' ',' ','E','S','C','-','}',' ',' ','^','R','i','g','h','t','A','r','r','o','w',' ',' ',' ','R','i','g','h','t',' ','t','o',' ','l','a','s','t',' ','c','o','l','u','m','n',' ','d','i','s','p','l','a','y','e','d','.','\n',
+' ',' ','E','S','C','-','{',' ',' ','^','L','e','f','t','A','r','r','o','w',' ',' ',' ',' ','L','e','f','t',' ',' ','t','o',' ','f','i','r','s','t',' ','c','o','l','u','m','n','.','\n',
 ' ',' ','F',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','F','o','r','w','a','r','d',' ','f','o','r','e','v','e','r',';',' ','l','i','k','e',' ','"','t','a','i','l',' ','-','f','"','.','\n',
 ' ',' ','E','S','C','-','F',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','L','i','k','e',' ','F',' ','b','u','t',' ','s','t','o','p',' ','w','h','e','n',' ','s','e','a','r','c','h',' ','p','a','t','t','e','r','n',' ','i','s',' ','f','o','u','n','d','.','\n',
 ' ',' ','r',' ',' ','^','R',' ',' ','^','L',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','R','e','p','a','i','n','t',' ','s','c','r','e','e','n','.','\n',
@@ -102,6 +104,7 @@ constant char helpdata[] = {
 '\n',
 ' ',' ','!','_','\b','c','_','\b','o','_','\b','m','_','\b','m','_','\b','a','_','\b','n','_','\b','d',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','E','x','e','c','u','t','e',' ','t','h','e',' ','s','h','e','l','l',' ','c','o','m','m','a','n','d',' ','w','i','t','h',' ','$','S','H','E','L','L','.','\n',
 ' ',' ','|','X','\b','X','_','\b','c','_','\b','o','_','\b','m','_','\b','m','_','\b','a','_','\b','n','_','\b','d',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','P','i','p','e',' ','f','i','l','e',' ','b','e','t','w','e','e','n',' ','c','u','r','r','e','n','t',' ','p','o','s',' ','&',' ','m','a','r','k',' ','X','\b','X',' ','t','o',' ','s','h','e','l','l',' ','c','o','m','m','a','n','d','.','\n',
+' ',' ','s',' ','_','\b','f','_','\b','i','_','\b','l','_','\b','e',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','S','a','v','e',' ','i','n','p','u','t',' ','t','o',' ','a',' ','f','i','l','e','.','\n',
 ' ',' ','v',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','E','d','i','t',' ','t','h','e',' ','c','u','r','r','e','n','t',' ','f','i','l','e',' ','w','i','t','h',' ','$','V','I','S','U','A','L',' ','o','r',' ','$','E','D','I','T','O','R','.','\n',
 ' ',' ','V',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','P','r','i','n','t',' ','v','e','r','s','i','o','n',' ','n','u','m','b','e','r',' ','o','f',' ','"','l','e','s','s','"','.','\n',
 ' ','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','\n',
diff --git a/ifile.c b/ifile.c
index fea2ea1ea9154c4d3a876c6158a08b1b9cd90e4c..c73333274da7697097e4359a978fd914b378a73e 100644 (file)
--- a/ifile.c
+++ b/ifile.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
diff --git a/input.c b/input.c
index 9419a02711b538b0396c49ae3dd85a9879924392..26ab7c022a6508e76f5f51e5f2bf8413ce820936 100644 (file)
--- a/input.c
+++ b/input.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
diff --git a/jump.c b/jump.c
index 8373d8b549701971114fc40e891efb69819a20a0..b5ec9dd8f339d6c0c66d1f19c05f8ad342c15669 100644 (file)
--- a/jump.c
+++ b/jump.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -124,7 +124,11 @@ repaint()
         */
        get_scrpos(&scrpos);
        pos_clear();
-       jump_loc(scrpos.pos, scrpos.ln);
+       if (scrpos.pos == NULL_POSITION)
+               /* Screen hasn't been drawn yet. */
+               jump_loc(0, 0);
+       else
+               jump_loc(scrpos.pos, scrpos.ln);
 }
 
 /*
diff --git a/less.h b/less.h
index f57fb1ecf06198f6ed0987c3465ecd9a37f57c45..79ce721870f73942e265dd46a5e2ccbfba79d92a 100644 (file)
--- a/less.h
+++ b/less.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 2a8e3e7233e71cf50be78b1346e9cf862348f864..255dc7e0ab2b4dd58d70924cdd92171f8ef152f8 100644 (file)
--- a/less.hlp
+++ b/less.hlp
   ESC-SPACE         *  Forward  one window, but don't stop at end-of-file.
   d  ^D             *  Forward  one half-window (and set half-window to _\bN).
   u  ^U             *  Backward one half-window (and set half-window to _\bN).
-  ESC-)  RightArrow *  Left  one half screen width (or _\bN positions).
-  ESC-(  LeftArrow  *  Right one half screen width (or _\bN positions).
+  ESC-)  RightArrow *  Right one half screen width (or _\bN positions).
+  ESC-(  LeftArrow  *  Left  one half screen width (or _\bN positions).
+  ESC-}  ^RightArrow   Right to last column displayed.
+  ESC-{  ^LeftArrow    Left  to first column.
   F                    Forward forever; like "tail -f".
   ESC-F                Like F but stop when search pattern is found.
   r  ^R  ^L            Repaint screen.
 
   !_\bc_\bo_\bm_\bm_\ba_\bn_\bd             Execute the shell command with $SHELL.
   |X\bX_\bc_\bo_\bm_\bm_\ba_\bn_\bd            Pipe file between current pos & mark X\bX to shell command.
+  s _\bf_\bi_\bl_\be               Save input to a file.
   v                    Edit the current file with $VISUAL or $EDITOR.
   V                    Print version number of "less".
  ---------------------------------------------------------------------------
index 151816a0a43bebb44c6a86ab38e70b79924268ad..0705407007cade51063cfeda41d5980514e21077 100644 (file)
--- a/less.man
+++ b/less.man
@@ -100,20 +100,27 @@ LESS(1)                     General Commands Manual                    LESS(1)
               becomes the default for future  RIGHTARROW  and  LEFTARROW  com-
               mands.
 
+       ESC-} or ^RIGHTARROW
+              Scroll  horizontally  right  to show the end of the longest dis-
+              played line.
+
+       ESC-{ or ^LEFTARROW
+              Scroll horizontally left back to the first column.
+
        r or ^R or ^L
               Repaint the screen.
 
-       R      Repaint  the  screen,  discarding any buffered input.  Useful if
+       R      Repaint the screen, discarding any buffered  input.   Useful  if
               the file is changing while it is being viewed.
 
-       F      Scroll forward, and keep trying to read when the end of file  is
-              reached.   Normally  this  command would be used when already at
-              the end of the file.  It is a way to monitor the tail of a  file
-              which  is  growing  while  it is being viewed.  (The behavior is
+       F      Scroll  forward, and keep trying to read when the end of file is
+              reached.  Normally this command would be used  when  already  at
+              the  end of the file.  It is a way to monitor the tail of a file
+              which is growing while it is being  viewed.   (The  behavior  is
               similar to the "tail -f" command.)
 
-       ESC-F  Like F, but as soon as a line is found which  matches  the  last
-              search  pattern, the terminal bell is rung and forward scrolling
+       ESC-F  Like  F,  but  as soon as a line is found which matches the last
+              search pattern, the terminal bell is rung and forward  scrolling
               stops.
 
        g or < or ESC-<
@@ -121,12 +128,12 @@ LESS(1)                     General Commands Manual                    LESS(1)
               ing: this may be slow if N is large.)
 
        G or > or ESC->
-              Go  to  line N in the file, default the end of the file.  (Warn-
-              ing: this may be slow if N is large, or if N  is  not  specified
+              Go to line N in the file, default the end of the  file.   (Warn-
+              ing:  this  may  be slow if N is large, or if N is not specified
               and standard input, rather than a file, is being read.)
 
-       ESC-G  Same  as  G, except if no number N is specified and the input is
-              standard input,  goes  to  the  last  line  which  is  currently
+       ESC-G  Same as G, except if no number N is specified and the  input  is
+              standard  input,  goes  to  the  last  line  which  is currently
               buffered.
 
        p or % Go to a position N percent into the file.  N should be between 0
@@ -135,48 +142,48 @@ LESS(1)                     General Commands Manual                    LESS(1)
        P      Go to the line containing byte offset N in the file.
 
        {      If a left curly bracket appears in the top line displayed on the
-              screen,  the  {  command  will  go  to  the matching right curly
-              bracket.  The matching right curly bracket is positioned on  the
+              screen, the { command  will  go  to  the  matching  right  curly
+              bracket.   The matching right curly bracket is positioned on the
               bottom line of the screen.  If there is more than one left curly
-              bracket on the top line, a number N may be used to  specify  the
+              bracket  on  the top line, a number N may be used to specify the
               N-th bracket on the line.
 
        }      If a right curly bracket appears in the bottom line displayed on
-              the screen, the } command will go to  the  matching  left  curly
-              bracket.   The  matching left curly bracket is positioned on the
-              top line of the screen.  If there is more than one  right  curly
-              bracket  on  the top line, a number N may be used to specify the
+              the  screen,  the  }  command will go to the matching left curly
+              bracket.  The matching left curly bracket is positioned  on  the
+              top  line  of the screen.  If there is more than one right curly
+              bracket on the top line, a number N may be used to  specify  the
               N-th bracket on the line.
 
        (      Like {, but applies to parentheses rather than curly brackets.
 
        )      Like }, but applies to parentheses rather than curly brackets.
 
-       [      Like {, but applies to square brackets rather than curly  brack-
+       [      Like  {, but applies to square brackets rather than curly brack-
               ets.
 
-       ]      Like  }, but applies to square brackets rather than curly brack-
+       ]      Like }, but applies to square brackets rather than curly  brack-
               ets.
 
-       ESC-^F Followed by two characters, acts like {, but uses the two  char-
-              acters  as  open and close brackets, respectively.  For example,
-              "ESC ^F < >" could be used to go forward to the > which  matches
+       ESC-^F Followed  by two characters, acts like {, but uses the two char-
+              acters as open and close brackets, respectively.   For  example,
+              "ESC  ^F < >" could be used to go forward to the > which matches
               the < in the top displayed line.
 
-       ESC-^B Followed  by two characters, acts like }, but uses the two char-
-              acters as open and close brackets, respectively.   For  example,
+       ESC-^B Followed by two characters, acts like }, but uses the two  char-
+              acters  as  open and close brackets, respectively.  For example,
               "ESC ^B < >" could be used to go backward to the < which matches
               the > in the bottom displayed line.
 
-       m      Followed by any lowercase letter,  marks  the  current  position
+       m      Followed  by  any  lowercase  letter, marks the current position
               with that letter.
 
-       '      (Single  quote.)   Followed  by any lowercase letter, returns to
+       '      (Single quote.)  Followed by any lowercase  letter,  returns  to
               the position which was previously marked with that letter.  Fol-
-              lowed  by another single quote, returns to the position at which
+              lowed by another single quote, returns to the position at  which
               the last "large" movement command was executed.  Followed by a ^
-              or  $,  jumps  to the beginning or end of the file respectively.
-              Marks are preserved when a new file is examined, so the  '  com-
+              or $, jumps to the beginning or end of  the  file  respectively.
+              Marks  are  preserved when a new file is examined, so the ' com-
               mand can be used to switch between input files.
 
        ^X^X   Same as single quote.
@@ -184,39 +191,39 @@ LESS(1)                     General Commands Manual                    LESS(1)
        /pattern
               Search forward in the file for the N-th line containing the pat-
               tern.  N defaults to 1.  The pattern is a regular expression, as
-              recognized  by  the  regular expression library supplied by your
-              system.  The search starts at the first line displayed (but  see
+              recognized by the regular expression library  supplied  by  your
+              system.   The search starts at the first line displayed (but see
               the -a and -j options, which change this).
 
-              Certain  characters  are  special if entered at the beginning of
-              the pattern; they modify the type of search rather  than  become
+              Certain characters are special if entered at  the  beginning  of
+              the  pattern;  they modify the type of search rather than become
               part of the pattern:
 
               ^N or !
                      Search for lines which do NOT match the pattern.
 
               ^E or *
-                     Search  multiple  files.   That is, if the search reaches
-                     the END of the current file without finding a match,  the
-                     search  continues  in  the  next file in the command line
+                     Search multiple files.  That is, if  the  search  reaches
+                     the  END of the current file without finding a match, the
+                     search continues in the next file  in  the  command  line
                      list.
 
               ^F or @
-                     Begin the search at the first line of the FIRST  file  in
-                     the  command  line  list, regardless of what is currently
-                     displayed on the screen or the settings of the -a  or  -j
+                     Begin  the  search at the first line of the FIRST file in
+                     the command line list, regardless of  what  is  currently
+                     displayed  on  the screen or the settings of the -a or -j
                      options.
 
-              ^K     Highlight  any text which matches the pattern on the cur-
+              ^K     Highlight any text which matches the pattern on the  cur-
                      rent screen, but don't move to the first match (KEEP cur-
                      rent position).
 
-              ^R     Don't  interpret  regular expression metacharacters; that
+              ^R     Don't interpret regular expression  metacharacters;  that
                      is, do a simple textual comparison.
 
        ?pattern
-              Search backward in the file for the  N-th  line  containing  the
-              pattern.   The search starts at the last line displayed (but see
+              Search  backward  in  the  file for the N-th line containing the
+              pattern.  The search starts at the last line displayed (but  see
               the -a and -j options, which change this).
 
               Certain characters are special as in the / command:
@@ -225,15 +232,15 @@ LESS(1)                     General Commands Manual                    LESS(1)
                      Search for lines which do NOT match the pattern.
 
               ^E or *
-                     Search multiple files.  That is, if  the  search  reaches
-                     the  beginning  of  the  current  file  without finding a
-                     match, the search continues in the previous file  in  the
+                     Search  multiple  files.   That is, if the search reaches
+                     the beginning of  the  current  file  without  finding  a
+                     match,  the  search continues in the previous file in the
                      command line list.
 
               ^F or @
                      Begin the search at the last line of the last file in the
-                     command line list, regardless of what is  currently  dis-
-                     played  on  the  screen  or  the settings of the -a or -j
+                     command  line  list, regardless of what is currently dis-
+                     played on the screen or the settings  of  the  -a  or  -j
                      options.
 
               ^K     As in forward searches.
@@ -246,36 +253,36 @@ LESS(1)                     General Commands Manual                    LESS(1)
        ESC-?pattern
               Same as "?*".
 
-       n      Repeat previous search, for N-th line containing the  last  pat-
-              tern.   If the previous search was modified by ^N, the search is
-              made for the N-th line NOT containing the pattern.  If the  pre-
-              vious  search  was  modified  by ^E, the search continues in the
-              next (or previous) file if not satisfied in  the  current  file.
-              If  the  previous  search was modified by ^R, the search is done
-              without using regular expressions.  There is no  effect  if  the
+       n      Repeat  previous  search, for N-th line containing the last pat-
+              tern.  If the previous search was modified by ^N, the search  is
+              made  for the N-th line NOT containing the pattern.  If the pre-
+              vious search was modified by ^E, the  search  continues  in  the
+              next  (or  previous)  file if not satisfied in the current file.
+              If the previous search was modified by ^R, the  search  is  done
+              without  using  regular  expressions.  There is no effect if the
               previous search was modified by ^F or ^K.
 
        N      Repeat previous search, but in the reverse direction.
 
-       ESC-n  Repeat  previous  search,  but  crossing  file  boundaries.  The
+       ESC-n  Repeat previous  search,  but  crossing  file  boundaries.   The
               effect is as if the previous search were modified by *.
 
-       ESC-N  Repeat previous search, but in the reverse direction and  cross-
+       ESC-N  Repeat  previous search, but in the reverse direction and cross-
               ing file boundaries.
 
-       ESC-u  Undo  search  highlighting.   Turn  off  highlighting of strings
+       ESC-u  Undo search highlighting.   Turn  off  highlighting  of  strings
               matching the current search pattern.  If highlighting is already
-              off  because of a previous ESC-u command, turn highlighting back
-              on.  Any search command will also  turn  highlighting  back  on.
+              off because of a previous ESC-u command, turn highlighting  back
+              on.   Any  search  command  will also turn highlighting back on.
               (Highlighting can also be disabled by toggling the -G option; in
               that case search commands do not turn highlighting back on.)
 
        &pattern
-              Display only lines which match the pattern; lines which  do  not
-              match  the  pattern  are not displayed.  If pattern is empty (if
-              you type & immediately followed  by  ENTER),  any  filtering  is
-              turned  off, and all lines are displayed.  While filtering is in
-              effect, an ampersand  is  displayed  at  the  beginning  of  the
+              Display  only  lines which match the pattern; lines which do not
+              match the pattern are not displayed.  If pattern  is  empty  (if
+              you  type  &  immediately  followed  by ENTER), any filtering is
+              turned off, and all lines are displayed.  While filtering is  in
+              effect,  an  ampersand  is  displayed  at  the  beginning of the
               prompt, as a reminder that some lines in the file may be hidden.
 
               Certain characters are special as in the / command:
@@ -283,98 +290,98 @@ LESS(1)                     General Commands Manual                    LESS(1)
               ^N or !
                      Display only lines which do NOT match the pattern.
 
-              ^R     Don't  interpret  regular expression metacharacters; that
+              ^R     Don't interpret regular expression  metacharacters;  that
                      is, do a simple textual comparison.
 
        :e [filename]
-              Examine a new file.  If the filename is missing,  the  "current"
-              file  (see  the :n and :p commands below) from the list of files
-              in the command line is re-examined.  A percent sign (%)  in  the
-              filename  is  replaced by the name of the current file.  A pound
-              sign (#) is replaced by the  name  of  the  previously  examined
-              file.    However,  two  consecutive  percent  signs  are  simply
+              Examine  a  new file.  If the filename is missing, the "current"
+              file (see the :n and :p commands below) from the list  of  files
+              in  the  command line is re-examined.  A percent sign (%) in the
+              filename is replaced by the name of the current file.   A  pound
+              sign  (#)  is  replaced  by  the name of the previously examined
+              file.   However,  two  consecutive  percent  signs  are   simply
               replaced with a single percent sign.  This allows you to enter a
-              filename  that  contains a percent sign in the name.  Similarly,
-              two consecutive pound signs are replaced  with  a  single  pound
-              sign.   The  filename  is inserted into the command line list of
-              files so that it can be seen by subsequent :n and  :p  commands.
+              filename that contains a percent sign in the  name.   Similarly,
+              two  consecutive  pound  signs  are replaced with a single pound
+              sign.  The filename is inserted into the command  line  list  of
+              files  so  that it can be seen by subsequent :n and :p commands.
               If the filename consists of several files, they are all inserted
-              into the list of files and the first one is  examined.   If  the
+              into  the  list  of files and the first one is examined.  If the
               filename contains one or more spaces, the entire filename should
               be enclosed in double quotes (also see the -" option).
 
        ^X^V or E
-              Same as :e.  Warning: some systems use ^V as a special  literal-
-              ization  character.  On such systems, you may not be able to use
+              Same  as :e.  Warning: some systems use ^V as a special literal-
+              ization character.  On such systems, you may not be able to  use
               ^V.
 
-       :n     Examine the next file (from the list of files given in the  com-
-              mand  line).   If a number N is specified, the N-th next file is
+       :n     Examine  the next file (from the list of files given in the com-
+              mand line).  If a number N is specified, the N-th next  file  is
               examined.
 
        :p     Examine the previous file in the command line list.  If a number
               N is specified, the N-th previous file is examined.
 
-       :x     Examine  the first file in the command line list.  If a number N
+       :x     Examine the first file in the command line list.  If a number  N
               is specified, the N-th file in the list is examined.
 
        :d     Remove the current file from the list of files.
 
-       t      Go to the next tag, if there were more than one matches for  the
+       t      Go  to the next tag, if there were more than one matches for the
               current tag.  See the -t option for more details about tags.
 
-       T      Go  to the previous tag, if there were more than one matches for
+       T      Go to the previous tag, if there were more than one matches  for
               the current tag.
 
        = or ^G or :f
-              Prints some information about the file being  viewed,  including
-              its  name and the line number and byte offset of the bottom line
-              being displayed.  If possible, it also prints the length of  the
-              file,  the  number  of  lines in the file and the percent of the
+              Prints  some  information about the file being viewed, including
+              its name and the line number and byte offset of the bottom  line
+              being  displayed.  If possible, it also prints the length of the
+              file, the number of lines in the file and  the  percent  of  the
               file above the last displayed line.
 
-       -      Followed by one of the command line option letters (see  OPTIONS
-              below),  this will change the setting of that option and print a
-              message describing the new setting.   If  a  ^P  (CONTROL-P)  is
+       -      Followed  by one of the command line option letters (see OPTIONS
+              below), this will change the setting of that option and print  a
+              message  describing  the  new  setting.   If a ^P (CONTROL-P) is
               entered immediately after the dash, the setting of the option is
-              changed but no message is printed.  If the option letter  has  a
-              numeric  value (such as -b or -h), or a string value (such as -P
-              or -t), a new value may be entered after the option letter.   If
-              no  new  value is entered, a message describing the current set-
+              changed  but  no message is printed.  If the option letter has a
+              numeric value (such as -b or -h), or a string value (such as  -P
+              or  -t), a new value may be entered after the option letter.  If
+              no new value is entered, a message describing the  current  set-
               ting is printed and nothing is changed.
 
-       --     Like the - command, but takes a long option  name  (see  OPTIONS
+       --     Like  the  -  command, but takes a long option name (see OPTIONS
               below) rather than a single option letter.  You must press ENTER
-              or RETURN after typing the option name.  A ^P immediately  after
-              the  second dash suppresses printing of a message describing the
+              or  RETURN after typing the option name.  A ^P immediately after
+              the second dash suppresses printing of a message describing  the
               new setting, as in the - command.
 
-       -+     Followed by one of the command line  option  letters  this  will
-              reset  the  option  to  its  default setting and print a message
-              describing the new setting.  (The "-+\e[4mX\e[24m" command  does  the  same
-              thing  as  "-+\e[4mX\e[24m"  on  the command line.)  This does not work for
+       -+     Followed  by  one  of  the command line option letters this will
+              reset the option to its default  setting  and  print  a  message
+              describing  the  new  setting.  (The "-+\e[4mX\e[24m" command does the same
+              thing as "-+\e[4mX\e[24m" on the command line.)  This  does  not  work  for
               string-valued options.
 
-       --+    Like the -+ command, but takes a long option name rather than  a
+       --+    Like  the -+ command, but takes a long option name rather than a
               single option letter.
 
-       -!     Followed  by  one  of the command line option letters, this will
-              reset the option to the "opposite" of its  default  setting  and
-              print  a message describing the new setting.  This does not work
+       -!     Followed by one of the command line option  letters,  this  will
+              reset  the  option  to the "opposite" of its default setting and
+              print a message describing the new setting.  This does not  work
               for numeric or string-valued options.
 
-       --!    Like the -! command, but takes a long option name rather than  a
+       --!    Like  the -! command, but takes a long option name rather than a
               single option letter.
 
-       _      (Underscore.)   Followed  by one of the command line option let-
-              ters, this will print a message describing the  current  setting
+       _      (Underscore.)  Followed by one of the command line  option  let-
+              ters,  this  will print a message describing the current setting
               of that option.  The setting of the option is not changed.
 
        __     (Double underscore.)  Like the _ (underscore) command, but takes
               a long option name rather than a single option letter.  You must
               press ENTER or RETURN after typing the option name.
 
-       +cmd   Causes  the specified cmd to be executed each time a new file is
+       +cmd   Causes the specified cmd to be executed each time a new file  is
               examined.  For example, +G causes \e[4mless\e[24m to initially display each
               file starting at the end rather than the beginning.
 
@@ -383,49 +390,49 @@ LESS(1)                     General Commands Manual                    LESS(1)
        q or Q or :q or :Q or ZZ
               Exits \e[4mless.\e[0m
 
-       The  following four commands may or may not be valid, depending on your
+       The following four commands may or may not be valid, depending on  your
        particular installation.
 
-       v      Invokes an editor to edit the current file  being  viewed.   The
+       v      Invokes  an  editor  to edit the current file being viewed.  The
               editor is taken from the environment variable VISUAL if defined,
-              or EDITOR if VISUAL is not defined, or defaults to "vi" if  nei-
-              ther  VISUAL  nor EDITOR is defined.  See also the discussion of
+              or  EDITOR if VISUAL is not defined, or defaults to "vi" if nei-
+              ther VISUAL nor EDITOR is defined.  See also the  discussion  of
               LESSEDIT under the section on PROMPTS below.
 
        ! shell-command
-              Invokes a shell to run the shell-command given.  A percent  sign
-              (%)  in the command is replaced by the name of the current file.
+              Invokes  a shell to run the shell-command given.  A percent sign
+              (%) in the command is replaced by the name of the current  file.
               A pound sign (#) is replaced by the name of the previously exam-
-              ined  file.   "!!"  repeats the last shell command.  "!" with no
-              shell command simply invokes a  shell.   On  Unix  systems,  the
-              shell  is taken from the environment variable SHELL, or defaults
-              to "sh".  On MS-DOS and OS/2 systems, the shell  is  the  normal
+              ined file.  "!!" repeats the last shell command.   "!"  with  no
+              shell  command  simply  invokes  a  shell.  On Unix systems, the
+              shell is taken from the environment variable SHELL, or  defaults
+              to  "sh".   On  MS-DOS and OS/2 systems, the shell is the normal
               command processor.
 
        | <m> shell-command
-              <m>  represents  any  mark letter.  Pipes a section of the input
-              file to the given shell command.  The section of the file to  be
-              piped  is  between  the first line on the current screen and the
-              position marked by the letter.  <m> may also be ^ or $ to  indi-
+              <m> represents any mark letter.  Pipes a section  of  the  input
+              file  to the given shell command.  The section of the file to be
+              piped is between the first line on the current  screen  and  the
+              position  marked by the letter.  <m> may also be ^ or $ to indi-
               cate beginning or end of file respectively.  If <m> is . or new-
               line, the current screen is piped.
 
        s filename
-              Save the input to a file.  This only works if  the  input  is  a
+              Save  the  input  to  a file.  This only works if the input is a
               pipe, not an ordinary file.
 
 \e[1mOPTIONS\e[0m
-       Command  line options are described below.  Most options may be changed
+       Command line options are described below.  Most options may be  changed
        while \e[4mless\e[24m is running, via the "-" command.
 
-       Most options may be given in one of two forms: either a  dash  followed
-       by  a  single  letter, or two dashes followed by a long option name.  A
-       long option name may be abbreviated as  long  as  the  abbreviation  is
+       Most  options  may be given in one of two forms: either a dash followed
+       by a single letter, or two dashes followed by a long  option  name.   A
+       long  option  name  may  be  abbreviated as long as the abbreviation is
        unambiguous.  For example, --quit-at-eof may be abbreviated --quit, but
        not --qui, since both --quit-at-eof and --quiet begin with --qui.  Some
-       long  option names are in uppercase, such as --QUIT-AT-EOF, as distinct
-       from --quit-at-eof.  Such option names need only have their first  let-
-       ter  capitalized; the remainder of the name may be in either case.  For
+       long option names are in uppercase, such as --QUIT-AT-EOF, as  distinct
+       from  --quit-at-eof.  Such option names need only have their first let-
+       ter capitalized; the remainder of the name may be in either case.   For
        example, --Quit-at-eof is equivalent to --QUIT-AT-EOF.
 
        Options are also taken from the environment variable "LESS".  For exam-
@@ -438,76 +445,76 @@ LESS(1)                     General Commands Manual                    LESS(1)
 
        LESS="-options"; export LESS
 
-       On MS-DOS, you don't need the quotes, but you should replace  any  per-
+       On  MS-DOS,  you don't need the quotes, but you should replace any per-
        cent signs in the options string by double percent signs.
 
-       The  environment variable is parsed before the command line, so command
-       line options override the LESS  environment  variable.   If  an  option
-       appears  in  the LESS variable, it can be reset to its default value on
+       The environment variable is parsed before the command line, so  command
+       line  options  override  the  LESS  environment variable.  If an option
+       appears in the LESS variable, it can be reset to its default  value  on
        the command line by beginning the command line option with "-+".
 
-       Some options like -k or -D require a string to follow the  option  let-
-       ter.   The  string  for  that option is considered to end when a dollar
-       sign ($) is found.  For example, you can set two -D options  on  MS-DOS
+       Some  options  like -k or -D require a string to follow the option let-
+       ter.  The string for that option is considered to  end  when  a  dollar
+       sign  ($)  is found.  For example, you can set two -D options on MS-DOS
        like this:
 
        LESS="Dn9.1$Ds4.1"
 
-       If  the  --use-backslash  option appears earlier in the options, then a
-       dollar sign or backslash may be included literally in an option  string
+       If the --use-backslash option appears earlier in the  options,  then  a
+       dollar  sign or backslash may be included literally in an option string
        by preceding it with a backslash.  If the --use-backslash option is not
-       in effect, then backslashes are not treated specially, and there is  no
+       in  effect, then backslashes are not treated specially, and there is no
        way to include a dollar sign in the option string.
 
        -? or --help
-              This  option displays a summary of the commands accepted by \e[4mless\e[0m
-              (the same as the h  command).   (Depending  on  how  your  shell
-              interprets  the  question mark, it may be necessary to quote the
+              This option displays a summary of the commands accepted by  \e[4mless\e[0m
+              (the  same  as  the  h  command).   (Depending on how your shell
+              interprets the question mark, it may be necessary to  quote  the
               question mark, thus: "-\?".)
 
        -a or --search-skip-screen
-              By default, forward searches start at the top of  the  displayed
-              screen  and  backwards  searches start at the bottom of the dis-
-              played screen (except for repeated searches invoked by the n  or
-              N  commands,  which  start  after  or  before  the "target" line
+              By  default,  forward searches start at the top of the displayed
+              screen and backwards searches start at the bottom  of  the  dis-
+              played  screen (except for repeated searches invoked by the n or
+              N commands, which  start  after  or  before  the  "target"  line
               respectively; see the -j option for more about the target line).
-              The  -a  option  causes forward searches to instead start at the
-              bottom of the screen and backward searches to start at  the  top
+              The -a option causes forward searches to instead  start  at  the
+              bottom  of  the screen and backward searches to start at the top
               of the screen, thus skipping all lines displayed on the screen.
 
        -A or --SEARCH-SKIP-SCREEN
-              Causes  all forward searches (not just non-repeated searches) to
-              start just after the target line, and all backward  searches  to
-              start  just before the target line.  Thus, forward searches will
+              Causes all forward searches (not just non-repeated searches)  to
+              start  just  after the target line, and all backward searches to
+              start just before the target line.  Thus, forward searches  will
               skip part of the displayed screen (from the first line up to and
-              including  the  target line).  Similarly backwards searches will
+              including the target line).  Similarly backwards  searches  will
               skip the displayed screen from the last line up to and including
               the target line.  This was the default behavior in less versions
               prior to 441.
 
        -b\e[4mn\e[24m or --buffers=\e[4mn\e[0m
-              Specifies the amount of buffer space  \e[4mless\e[24m  will  use  for  each
-              file,  in  units  of kilobytes (1024 bytes).  By default 64 K of
-              buffer space is used for each file (unless the file is  a  pipe;
-              see  the  -B  option).   The  -b option specifies instead that \e[4mn\e[0m
+              Specifies  the  amount  of  buffer  space \e[4mless\e[24m will use for each
+              file, in units of kilobytes (1024 bytes).  By  default  64 K  of
+              buffer  space  is used for each file (unless the file is a pipe;
+              see the -B option).  The -b  option  specifies  instead  that  \e[4mn\e[0m
               kilobytes of buffer space should be used for each file.  If \e[4mn\e[24m is
-              -1,  buffer  space is unlimited; that is, the entire file can be
+              -1, buffer space is unlimited; that is, the entire file  can  be
               read into memory.
 
        -B or --auto-buffers
               By default, when data is read from a pipe, buffers are allocated
               automatically as needed.  If a large amount of data is read from
-              the pipe, this can cause a large amount of memory  to  be  allo-
+              the  pipe,  this  can cause a large amount of memory to be allo-
               cated.  The -B option disables this automatic allocation of buf-
               fers for pipes, so that only 64 K (or the amount of space speci-
               fied by the -b option) is used for the pipe.  Warning: use of -B
-              can result in erroneous display, since only  the  most  recently
-              viewed  part  of  the  piped data is kept in memory; any earlier
+              can  result  in  erroneous display, since only the most recently
+              viewed part of the piped data is kept  in  memory;  any  earlier
               data is lost.
 
        -c or --clear-screen
-              Causes full screen repaints to be  painted  from  the  top  line
-              down.   By  default,  full screen repaints are done by scrolling
+              Causes  full  screen  repaints  to  be painted from the top line
+              down.  By default, full screen repaints are  done  by  scrolling
               from the bottom of the screen.
 
        -C or --CLEAR-SCREEN
@@ -515,19 +522,20 @@ LESS(1)                     General Commands Manual                    LESS(1)
 
        -d or --dumb
               The -d option suppresses the error message normally displayed if
-              the  terminal is dumb; that is, lacks some important capability,
+              the terminal is dumb; that is, lacks some important  capability,
               such as the ability to clear the screen or scroll backward.  The
-              -d  option  does  not otherwise change the behavior of \e[4mless\e[24m on a
+              -d option does not otherwise change the behavior of  \e[4mless\e[24m  on  a
               dumb terminal.
 
        -D\e[1mx\e[4m\e[22mcolor\e[24m or --color=\e[1mx\e[4m\e[22mcolor\e[0m
               [MS-DOS only] Sets the color of the text displayed.  \e[1mx \e[22mis a sin-
-              gle  character  which  selects  the  type of text whose color is
-              being set: n=normal, s=standout, d=bold, u=underlined,  k=blink.
-              \e[4mcolor\e[24m  is  a  pair  of numbers separated by a period.  The first
-              number selects the foreground color and the second  selects  the
-              background  color of the text.  A single number \e[4mN\e[24m is the same as
-              \e[4mN.M\e[24m, where \e[4mM\e[24m is the normal background color.
+              gle character which selects the type  of  text  whose  color  is
+              being  set: n=normal, s=standout, d=bold, u=underlined, k=blink.
+              \e[4mcolor\e[24m is a pair of numbers separated by  a  period.   The  first
+              number  selects  the foreground color and the second selects the
+              background color of the text.  A single number \e[4mN\e[24m is the same  as
+              \e[4mN.M\e[24m, where \e[4mM\e[24m is the normal background color.  \e[1mx \e[22mmay also be \e[1ma \e[22mto
+              toggle strict ANSI sequence rendering (SGR mode).
 
 
        -e or --quit-at-eof
@@ -1609,7 +1617,7 @@ LESS(1)                     General Commands Manual                    LESS(1)
 
 
 \e[1mCOPYRIGHT\e[0m
-       Copyright (C) 1984-2015  Mark Nudelman
+       Copyright (C) 1984-2016  Mark Nudelman
 
        less is part of the GNU project and is free software.  You  can  redis-
        tribute  it and/or modify it under the terms of either (1) the GNU Gen-
@@ -1637,4 +1645,4 @@ LESS(1)                     General Commands Manual                    LESS(1)
 
 
 
-                           Version 481: 31 Aug 2015                    LESS(1)
+                           Version 487: 25 Oct 2016                    LESS(1)
index b3d98746aad9fb449e414eaa8c2ddd454cb8d98b..c08ffd64436ed66b525de30beab1691669bc05ca 100644 (file)
--- a/less.nro
+++ b/less.nro
@@ -1,4 +1,4 @@
-.TH LESS 1 "Version 481: 31 Aug 2015"
+.TH LESS 1 "Version 487: 25 Oct 2016"
 .SH NAME
 less \- opposite of more
 .SH SYNOPSIS
@@ -101,6 +101,10 @@ Scroll horizontally left N characters, default half the screen width
 (see the \-# option).
 If a number N is specified, it becomes the default for future RIGHTARROW
 and LEFTARROW commands.
+.IP "ESC-} or ^RIGHTARROW"
+Scroll horizontally right to show the end of the longest displayed line.
+.IP "ESC-{ or ^LEFTARROW"
+Scroll horizontally left back to the first column.
 .IP "r or ^R or ^L"
 Repaint the screen.
 .IP R
@@ -547,6 +551,7 @@ The first number selects the foreground color and the second selects
 the background color of the text.
 A single number \fIN\fP is the same as \fIN.M\fP,
 where \fIM\fP is the normal background color.
+\fBx\fP may also be \fBa\fP to toggle strict ANSI sequence rendering (SGR mode).
 
 .IP "\-e or \-\-quit-at-eof"
 Causes
@@ -1740,7 +1745,7 @@ The name of the editor (used for the v command).
 lesskey(1)
 
 .SH COPYRIGHT
-Copyright (C) 1984-2015  Mark Nudelman
+Copyright (C) 1984-2016  Mark Nudelman
 .PP
 less is part of the GNU project and is free software.
 You can redistribute it and/or modify it
index fb0b22ddc0001d1723aa3b88d2828ce85c8f39e6..ec7e0803163a53d0ef0b1317d9268d092ce2b842 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 56ba94312f9792f248dc45ec1bc0bbd95c29b1c2..5f26d4aff315e438dbe8dba79a491e74c0fd8279 100644 (file)
@@ -51,4 +51,4 @@ LESSECHO(1)                 General Commands Manual                LESSECHO(1)
 
 
 
-                           Version 481: 31 Aug 2015                LESSECHO(1)
+                           Version 487: 25 Oct 2016                LESSECHO(1)
index 78b893f18d977049510092bc274de9456866e12d..d1302c838c4dabf6f805c3e129bad643bdfb680e 100644 (file)
@@ -1,4 +1,4 @@
-.TH LESSECHO 1 "Version 481: 31 Aug 2015"
+.TH LESSECHO 1 "Version 487: 25 Oct 2016"
 .SH NAME
 lessecho \- expand metacharacters
 .SH SYNOPSIS
index 298748b9a04a26468ea8d8d755bf569440f82515..f565ec62f7641342a9115710ab3953af0f4552d9 100644 (file)
--- a/lesskey.c
+++ b/lesskey.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -104,6 +104,7 @@ struct cmdname cmdnames[] =
        { "display-flag",         A_DISP_OPTION },
        { "display-option",       A_DISP_OPTION },
        { "end",                  A_GOEND },
+       { "end-scroll",           A_RRSHIFT },
        { "examine",              A_EXAMINE },
        { "filter",               A_FILTER },
        { "first-cmd",            A_FIRSTCMD },
@@ -130,6 +131,7 @@ struct cmdname cmdnames[] =
        { "next-file",            A_NEXT_FILE },
        { "next-tag",             A_NEXT_TAG },
        { "noaction",             A_NOACTION },
+       { "no-scroll",            A_LLSHIFT },
        { "percent",              A_PERCENT },
        { "pipe",                 A_PIPE },
        { "prev-file",            A_PREV_FILE },
index 34b8c1758c7b609070b6236f474fb59cbd6f51d4..1b6f350b0715ac4f2cfb8f3c3e95f598d4e7a852 100644 (file)
--- a/lesskey.h
+++ b/lesskey.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 2e9000fd61ee23dff551c204cca182d72acb699e..9811e8e9a705a00c804ea394792586782ecc8f17 100644 (file)
@@ -117,7 +117,7 @@ LESSKEY(1)                  General Commands Manual                 LESSKEY(1)
             \n        forw-line
             e         forw-line
             j         forw-line
-            \kd  forw-line
+            \kd       forw-line
             ^E        forw-line
             ^N        forw-line
             k         back-line
@@ -132,15 +132,15 @@ LESSKEY(1)                  General Commands Manual                 LESSKEY(1)
             ^D        forw-scroll
             u         back-scroll
             ^U        back-scroll
-            \40  forw-screen
+            \40       forw-screen
             f         forw-screen
             ^F        forw-screen
             ^V        forw-screen
-            \kD  forw-screen
+            \kD       forw-screen
             b         back-screen
             ^B        back-screen
             \ev       back-screen
-            \kU  back-screen
+            \kU       back-screen
             z         forw-window
             w         back-window
             \e\40          forw-screen-force
@@ -152,7 +152,7 @@ LESSKEY(1)                  General Commands Manual                 LESSKEY(1)
             ^L        repaint
             \eu       undo-hilite
             g         goto-line
-            \kh  goto-line
+            \kh       goto-line
             <         goto-line
             \e<       goto-line
             p         percent
@@ -163,6 +163,8 @@ LESSKEY(1)                  General Commands Manual                 LESSKEY(1)
             \e)       right-scroll
             \kl       left-scroll
             \kr       right-scroll
+            \e{       no-scroll
+            \e}       end-scroll
             {         forw-bracket {}
             }         back-bracket {}
             (         forw-bracket ()
@@ -174,7 +176,7 @@ LESSKEY(1)                  General Commands Manual                 LESSKEY(1)
             G         goto-end
             \e>       goto-end
             >         goto-end
-            \ke  goto-end
+            \ke       goto-end
             \eG       goto-end-buffered
             =         status
             ^G        status
@@ -333,7 +335,7 @@ LESSKEY(1)                  General Commands Manual                 LESSKEY(1)
 
 
 \e[1mCOPYRIGHT\e[0m
-       Copyright (C) 1984-2015  Mark Nudelman
+       Copyright (C) 1984-2016  Mark Nudelman
 
        less  is  part of the GNU project and is free software.  You can redis-
        tribute it and/or modify it under the terms of either (1) the GNU  Gen-
@@ -357,4 +359,4 @@ LESSKEY(1)                  General Commands Manual                 LESSKEY(1)
 
 
 
-                           Version 481: 31 Aug 2015                 LESSKEY(1)
+                           Version 487: 25 Oct 2016                 LESSKEY(1)
index 826332de5eff85833fa2a98fa56ea9a7fa915862..252496cac8ac8f9bdadc6ffb2cd5bbd0f7bed945 100644 (file)
@@ -1,4 +1,4 @@
-.TH LESSKEY 1 "Version 481: 31 Aug 2015"
+.TH LESSKEY 1 "Version 487: 25 Oct 2016"
 .SH NAME
 lesskey \- specify key bindings for less
 .SH SYNOPSIS
@@ -134,7 +134,7 @@ default command keys used by less:
        \en             forw-line 
        e               forw-line 
        j               forw-line 
-       \ekd    forw-line
+       \ekd            forw-line
        ^E              forw-line 
        ^N              forw-line 
        k               back-line 
@@ -149,15 +149,15 @@ default command keys used by less:
        ^D              forw-scroll 
        u               back-scroll 
        ^U              back-scroll 
-       \e40    forw-screen 
+       \e40            forw-screen 
        f               forw-screen 
        ^F              forw-screen 
        ^V              forw-screen 
-       \ekD    forw-screen
+       \ekD            forw-screen
        b               back-screen 
        ^B              back-screen 
        \eev            back-screen 
-       \ekU    back-screen
+       \ekU            back-screen
        z               forw-window 
        w               back-window 
        \ee\e40         forw-screen-force
@@ -169,7 +169,7 @@ default command keys used by less:
        ^L              repaint 
        \eeu            undo-hilite
        g               goto-line 
-       \ekh    goto-line
+       \ekh            goto-line
        <               goto-line 
        \ee<            goto-line 
        p               percent 
@@ -180,6 +180,8 @@ default command keys used by less:
        \ee)            right-scroll
        \ekl            left-scroll
        \ekr            right-scroll
+       \ee{            no-scroll
+       \ee}            end-scroll
        {               forw-bracket {}
        }               back-bracket {}
        (               forw-bracket ()
@@ -191,7 +193,7 @@ default command keys used by less:
        G               goto-end 
        \ee>            goto-end 
        >               goto-end 
-       \eke    goto-end
+       \eke            goto-end
        \eeG            goto-end-buffered
        =               status 
        ^G              status 
@@ -359,7 +361,7 @@ which start with a NUL character (0).
 This NUL character should be represented as \e340 in a lesskey file.
 
 .SH COPYRIGHT
-Copyright (C) 1984-2015  Mark Nudelman
+Copyright (C) 1984-2016  Mark Nudelman
 .PP
 less is part of the GNU project and is free software.
 You can redistribute it and/or modify it
diff --git a/lglob.h b/lglob.h
index 87b5fb45cc7c0a4362a28c0deab508c235d7fb58..0ebf1f62dd6ff9f152e1ae3309ec44a5a36f45a9 100644 (file)
--- a/lglob.h
+++ b/lglob.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
diff --git a/line.c b/line.c
index e54835d4744b86a740843f2d21d0db499d1f82bb..f09a13a963ca6cfdfaeced6cf014cf9383ba5b57 100644 (file)
--- a/line.c
+++ b/line.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -16,6 +16,7 @@
 
 #include "less.h"
 #include "charset.h"
+#include "position.h"
 
 static char *linebuf = NULL;   /* Buffer which holds the current output line */
 static char *attr = NULL;      /* Extension of linebuf to hold attributes */
@@ -215,7 +216,7 @@ plinenum(pos)
                sprintf(linebuf+curr, "%*s ", n, buf);
                n++;  /* One space after the line number. */
                for (i = 0; i < n; i++)
-                       attr[curr+i] = AT_NORMAL;
+                       attr[curr+i] = AT_BOLD;
                curr += n;
                column += n;
                lmargin += n;
@@ -1255,3 +1256,30 @@ back_raw_line(curr_pos, linep, line_lenp)
                *line_lenp = size_linebuf - 1 - n;
        return (new_pos);
 }
+
+/*
+ * Find the shift necessary to show the end of the longest displayed line.
+ */
+       public int
+rrshift()
+{
+       POSITION pos;
+       int save_width;
+       int line;
+       int longest = 0;
+
+       save_width = sc_width;
+       sc_width = INT_MAX;
+       hshift = 0;
+       pos = position(TOP);
+       for (line = 0; line < sc_height && pos != NULL_POSITION; line++)
+       {
+               pos = forw_line(pos);
+               if (column > longest)
+                       longest = column;
+       }
+       sc_width = save_width;
+       if (longest < sc_width)
+               return 0;
+       return longest - sc_width;
+}
index 6d078ec86969eef2f367e6ef42134981909d4a48..c1a8128f14d11aff79eab221cd44616b650109f0 100644 (file)
--- a/linenum.c
+++ b/linenum.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 8a7cb8f2a971d22ea874a80958ea4e07fdd1f3cb..ea3cfb0159d1bd5d7fcd9cd666eeddb06dfac165 100644 (file)
--- a/lsystem.c
+++ b/lsystem.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
diff --git a/main.c b/main.c
index 149999cd4b537fa1d2b38bb969c18c845305772a..960d1203e1c20d6f07f1b035332a2ecebc347635 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
diff --git a/mark.c b/mark.c
index 44d606fc9d2e90f1c8ea31f3a535ff484de1cf4e..9d3e049636440313f22fcefeceb9df92125d4cf5 100644 (file)
--- a/mark.c
+++ b/mark.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index d4e406337f967b38417d46a7498155b779c8cb1e..fb486ef9bd050ade8d5296fcfcb6ca866b0555fc 100644 (file)
--- a/mkhelp.c
+++ b/mkhelp.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 803335b924eb36d4934036b2f980a1053f6b72be..ff107b51f007cc66cca96a6cd1f3869fa807537f 100755 (executable)
--- a/mkutable
+++ b/mkutable
@@ -4,14 +4,14 @@ use strict;
 my $USAGE = <<__EOF__;
    usage: mkutable [-n] [-f#] type... [--] [<] UnicodeData.txt
           -n = take non-matching types
-         -f = zero-based type field (default 2)
+      -f = zero-based type field (default 2)
 __EOF__
 
 use vars qw( $opt_f $opt_n );
 use Getopt::Std;
 my $type_field = 2;
 
-exit (main() ? 1 : 0);
+exit (main() ? 0 : 1);
 
 sub main {
     my $date = `date`;
@@ -28,48 +28,58 @@ sub main {
         $types{$arg} = 1;
     }
     my %out = ( 'types' => \%types );
-    my $last_code = 0;
 
     print $header;
+    my $last_code = 0;
     while (<>) {
         chomp;
         s/#.*//;
         my @fields = split /;/;
         next if not @fields;
-        my $code = hex $fields[0];
+        my ($lo_code, $hi_code);
+        my $codes = $fields[0];
+        if ($codes =~ /(\w+)\.\.(\w+)/) {
+            $lo_code = hex $1;
+            $hi_code = hex $2;
+        } else {
+            $lo_code = $hi_code = hex $fields[0];
+        }
         my $type = $fields[$type_field];
         $type =~ s/\s//g;
-        while (++$last_code < $code) {
-            output(\%out, $last_code, '?');
+        for ($last_code = $lo_code; $last_code <= $hi_code; ++$last_code) {
+            output(\%out, $last_code, $type);
         }
-        output(\%out, $code, $type);
     }
-    output(\%out, $last_code+1, '?');
+    output(\%out, $last_code);
+    return 1;
 }
 
 sub output {
     my ($out, $code, $type) = @_;
-    my $match = ${${$out}{types}}{$type};
-    my $type_change = (not $$out{start_type} or $type ne $$out{start_type});
-    $match = not $match if $opt_n;
-    if ($match and (not $$out{in_run} or $type_change)) {
-        end_run($out, $code-1);
+    my $type_ok = ($type and ${${$out}{types}}{$type});
+    $type_ok = not $type_ok if $opt_n;
+    my $prev_code = $$out{prev_code};
+
+    if (not $type_ok) {
+        end_run($out, $prev_code);
+    } elsif (not $$out{in_run} or $type ne $$out{run_type} or $code != $prev_code+1) {
+        end_run($out, $prev_code);
         start_run($out, $code, $type);
-    } elsif (not $match and $$out{in_run}) {
-        end_run($out, $code-1);
     }
+    $$out{prev_code} = $code;
 }
 
 sub start_run {
     my ($out, $code, $type) = @_;
     $$out{start_code} = $code;
-    $$out{start_type} = $type;
+    $$out{prev_code} = $code;
+    $$out{run_type} = $type;
     $$out{in_run} = 1;
 }
 
 sub end_run {
     my ($out, $code) = @_;
     return if not $$out{in_run};
-    printf "\t{ 0x%04x, 0x%04x }, /* %s */\n", $$out{start_code}, $code, $$out{start_type};
+    printf "\t{ 0x%04x, 0x%04x }, /* %s */\n", $$out{start_code}, $code, $$out{run_type};
     $$out{in_run} = 0;
 }
index c3bb6b2d9eb1ee67cdd96c1f701ef620278ec870..44f8e5fa70380ee75dd74ecf2a15134b4862e30e 100644 (file)
--- a/optfunc.c
+++ b/optfunc.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -67,6 +67,7 @@ extern int bo_fg_color, bo_bg_color;
 extern int ul_fg_color, ul_bg_color;
 extern int so_fg_color, so_bg_color;
 extern int bl_fg_color, bl_bg_color;
+extern int sgr_mode;
 #endif
 
 
@@ -517,7 +518,7 @@ opt__V(type, s)
                putstr("no ");
 #endif
                putstr("regular expressions)\n");
-               putstr("Copyright (C) 1984-2015  Mark Nudelman\n\n");
+               putstr("Copyright (C) 1984-2016  Mark Nudelman\n\n");
                putstr("less comes with NO WARRANTY, to the extent permitted by law.\n");
                putstr("For information about the terms of redistribution,\n");
                putstr("see the file named README in the less distribution.\n");
@@ -573,6 +574,8 @@ opt_D(type, s)
        int type;
        char *s;
 {
+       PARG p;
+
        switch (type)
        {
        case INIT:
@@ -594,8 +597,11 @@ opt_D(type, s)
                case 's':
                        colordesc(s, &so_fg_color, &so_bg_color);
                        break;
+               case 'a':
+                       sgr_mode = !sgr_mode;
+                       break;
                default:
-                       error("-D must be followed by n, d, u, k or s", NULL_PARG);
+                       error("-D must be followed by n, d, u, k, s or a", NULL_PARG);
                        break;
                }
                if (type == TOGGLE)
@@ -605,6 +611,8 @@ opt_D(type, s)
                }
                break;
        case QUERY:
+               p.p_string = (sgr_mode) ? "on" : "off";
+               error("SGR mode is %s", &p);
                break;
        }
 }
index 256f5697b6b5dcfed91614e30e09a3bdd5056d54..f0f3b30104028123b5c99b42261ce084a6bc028f 100644 (file)
--- a/option.c
+++ b/option.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index dc97d75f77c96900ea2d078a35eca76df0ec83df..38e08f75aba3a28a3db661d76ac630aabe56c95c 100644 (file)
--- a/option.h
+++ b/option.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index b896391aa3f292daf99dae55998c5a407f2ab1e9..03838374c958669de5ce8b34a49d65bfc08ea900 100644 (file)
--- a/opttbl.c
+++ b/opttbl.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -176,10 +176,10 @@ static struct loption option[] =
        },
 #if MSDOS_COMPILER
        { 'D', &D__optname,
-               STRING|REPAINT|NO_QUERY, 0, NULL, opt_D,
+               STRING|REPAINT, 0, NULL, opt_D,
                {
                        "color desc: ", 
-                       "Ddknsu0123456789.",
+                       "Dadknsu0123456789.",
                        NULL
                }
        },
diff --git a/os.c b/os.c
index 530abe19d4cc50d47caa06886c296b8817f2d266..61f116bf85621226820cf682c42d014f430a440d 100644 (file)
--- a/os.c
+++ b/os.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index d6cfc382672022b6eec0c90b47f54b66545791d8..77e6b3957d54d99ae5fc0b647e462990358d6986 100644 (file)
--- a/output.c
+++ b/output.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -37,6 +37,7 @@ extern int bo_fg_color, bo_bg_color;
 extern int ul_fg_color, ul_bg_color;
 extern int so_fg_color, so_bg_color;
 extern int bl_fg_color, bl_bg_color;
+extern int sgr_mode;
 #endif
 
 /*
@@ -126,8 +127,9 @@ flush()
                         * the -D command-line option.
                         */
                        char *anchor, *p, *p_next;
-                       unsigned char fg, bg;
+                       static unsigned char fg, fgi, bg, bgi;
                        static unsigned char at;
+                       unsigned char f, b;
 #if MSDOS_COMPILER==WIN32C
                        /* Screen colors used by 3x and 4x SGR commands. */
                        static unsigned char screen_color[] = {
@@ -147,6 +149,13 @@ flush()
                        };
 #endif
 
+                       if (fg == 0 && bg == 0)
+                       {
+                               fg  = nm_fg_color & 7;
+                               fgi = nm_fg_color & 8;
+                               bg  = nm_bg_color & 7;
+                               bgi = nm_bg_color & 8;
+                       }
                        for (anchor = p_next = obuf;
                             (p_next = memchr(p_next, ESC, ob - p_next)) != NULL; )
                        {
@@ -173,18 +182,21 @@ flush()
                                                 */
                                                p++;
                                                anchor = p_next = p;
-                                               at = 0;
+                                               fg  = nm_fg_color & 7;
+                                               fgi = nm_fg_color & 8;
+                                               bg  = nm_bg_color & 7;
+                                               bgi = nm_bg_color & 8;
+                                               at  = 0;
                                                WIN32setcolors(nm_fg_color, nm_bg_color);
                                                continue;
                                        }
                                        p_next = p;
+                                       at &= ~32;
 
                                        /*
                                         * Select foreground/background colors
                                         * based on the escape sequence. 
                                         */
-                                       fg = nm_fg_color;
-                                       bg = nm_bg_color;
                                        while (!is_ansi_end(*p))
                                        {
                                                char *q;
@@ -212,17 +224,35 @@ flush()
                                                        break;
                                                }
                                                if (*q == ';')
+                                               {
                                                        q++;
+                                                       at |= 32;
+                                               }
 
                                                switch (code)
                                                {
                                                default:
                                                /* case 0: all attrs off */
-                                                       fg = nm_fg_color;
-                                                       bg = nm_bg_color;
-                                                       at = 0;
+                                                       fg = nm_fg_color & 7;
+                                                       bg = nm_bg_color & 7;
+                                                       at &= 32;
+                                                       /*
+                                                        * \e[0m use normal
+                                                        * intensities, but
+                                                        * \e[0;...m resets them
+                                                        */
+                                                       if (at & 32)
+                                                       {
+                                                               fgi = 0;
+                                                               bgi = 0;
+                                                       } else
+                                                       {
+                                                               fgi = nm_fg_color & 8;
+                                                               bgi = nm_bg_color & 8;
+                                                       }
                                                        break;
                                                case 1: /* bold on */
+                                                       fgi = 8;
                                                        at |= 1;
                                                        break;
                                                case 3: /* italic on */
@@ -230,16 +260,19 @@ flush()
                                                        at |= 2;
                                                        break;
                                                case 4: /* underline on */
+                                                       bgi = 8;
                                                        at |= 4;
                                                        break;
                                                case 5: /* slow blink on */
                                                case 6: /* fast blink on */
+                                                       bgi = 8;
                                                        at |= 8;
                                                        break;
                                                case 8: /* concealed on */
-                                                       fg = (bg & 7) | 8;
+                                                       at |= 16;
                                                        break;
                                                case 22: /* bold off */
+                                                       fgi = 0;
                                                        at &= ~1;
                                                        break;
                                                case 23: /* italic off */
@@ -247,62 +280,84 @@ flush()
                                                        at &= ~2;
                                                        break;
                                                case 24: /* underline off */
+                                                       bgi = 0;
                                                        at &= ~4;
                                                        break;
+                                               case 28: /* concealed off */
+                                                       at &= ~16;
+                                                       break;
                                                case 30: case 31: case 32:
                                                case 33: case 34: case 35:
                                                case 36: case 37:
-                                                       fg = (fg & 8) | (screen_color[code - 30]);
+                                                       fg = screen_color[code - 30];
+                                                       at |= 32;
                                                        break;
                                                case 39: /* default fg */
-                                                       fg = nm_fg_color;
+                                                       fg = nm_fg_color & 7;
+                                                       at |= 32;
                                                        break;
                                                case 40: case 41: case 42:
                                                case 43: case 44: case 45:
                                                case 46: case 47:
-                                                       bg = (bg & 8) | (screen_color[code - 40]);
+                                                       bg = screen_color[code - 40];
+                                                       at |= 32;
                                                        break;
-                                               case 49: /* default fg */
-                                                       bg = nm_bg_color;
+                                               case 49: /* default bg */
+                                                       bg = nm_bg_color & 7;
+                                                       at |= 32;
                                                        break;
                                                }
                                                p = q;
                                        }
                                        if (!is_ansi_end(*p) || p == p_next)
                                                break;
-                                       if (at & 1)
+                                       /*
+                                        * In SGR mode, the ANSI sequence is
+                                        * always honored; otherwise if an attr
+                                        * is used by itself ("\e[1m" versus
+                                        * "\e[1;33m", for example), set the
+                                        * color assigned to that attribute.
+                                        */
+                                       if (sgr_mode || (at & 32))
                                        {
-                                               /*
-                                                * If \e[1m use defined bold
-                                                * color, else set intensity.
-                                                */
-                                               if (p[-2] == '[')
+                                               if (at & 2)
                                                {
-#if MSDOS_COMPILER==WIN32C
-                                                       fg |= FOREGROUND_INTENSITY;
-                                                       bg |= BACKGROUND_INTENSITY;
-#else
-                                                       fg = bo_fg_color;
-                                                       bg = bo_bg_color;
-#endif
+                                                       f = bg | bgi;
+                                                       b = fg | fgi;
                                                } else
-                                                       fg |= 8;
-                                       } else if (at & 2)
-                                       {
-                                               fg = so_fg_color;
-                                               bg = so_bg_color;
-                                       } else if (at & 4)
-                                       {
-                                               fg = ul_fg_color;
-                                               bg = ul_bg_color;
-                                       } else if (at & 8)
+                                               {
+                                                       f = fg | fgi;
+                                                       b = bg | bgi;
+                                               }
+                                       } else
                                        {
-                                               fg = bl_fg_color;
-                                               bg = bl_bg_color;
+                                               if (at & 1)
+                                               {
+                                                       f = bo_fg_color;
+                                                       b = bo_bg_color;
+                                               } else if (at & 2)
+                                               {
+                                                       f = so_fg_color;
+                                                       b = so_bg_color;
+                                               } else if (at & 4)
+                                               {
+                                                       f = ul_fg_color;
+                                                       b = ul_bg_color;
+                                               } else if (at & 8)
+                                               {
+                                                       f = bl_fg_color;
+                                                       b = bl_bg_color;
+                                               } else
+                                               {
+                                                       f = nm_fg_color;
+                                                       b = nm_bg_color;
+                                               }
                                        }
-                                       fg &= 0xf;
-                                       bg &= 0xf;
-                                       WIN32setcolors(fg, bg);
+                                       if (at & 16)
+                                               f = b ^ 8;
+                                       f &= 0xf;
+                                       b &= 0xf;
+                                       WIN32setcolors(f, b);
                                        p_next = anchor = p + 1;
                                } else
                                        p_next++;
index 71141c7d05fe2c690df127f6c010e4ef57cef969..97a73e9b0e27fbfa085de41c8eaefe7d63d765f9 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index ca4b8648c69c238a9ce278b0b7d4f2b6a3fe9873..67035952af24c5643c6b717ff10b3b7ea67716db 100644 (file)
--- a/pattern.h
+++ b/pattern.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 8fb6800902c10b3ef2bad6bce32e346207ae0d60..61493ecbde3a22e73ed690d40d397c632290c281 100644 (file)
--- a/pckeys.h
+++ b/pckeys.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index dc80fd636154f8680189cb7b2ec80146c47b5ef6..4f8e60f48c2409ddf7ac708516bc68bcade36d1e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index e0e2bff490e4be7581dda6499e82e6fe1ce2efed..a0b20c5b6f3a7cda9a52b94dfadc212efd3a8a5c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 50ced97bf7132bb1c047e626a5991c07fd93ef76..bd2213ca02e2230fb0c3372d283bcb3643abc812 100644 (file)
--- a/prompt.c
+++ b/prompt.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index 8f8a433aff64f393d1ce93f365502b9e355db7ca..ad3fca1639dd2eceb8475b4917fac28a076093ce 100644 (file)
--- a/screen.c
+++ b/screen.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -151,6 +151,7 @@ public int bl_fg_color;             /* Color of blinking text */
 public int bl_bg_color;
 static int sy_fg_color;                /* Color of system text (before less) */
 static int sy_bg_color;
+public int sgr_mode;           /* Honor ANSI sequences rather than using above */
 
 #else
 
@@ -1106,6 +1107,7 @@ get_term()
        so_bg_color = 9;
        bl_fg_color = 15;
        bl_bg_color = 0;
+       sgr_mode = 0;
 
        /*
         * Get size of the screen.
@@ -1448,6 +1450,9 @@ _settextposition(int row, int col)
        static void
 initcolor()
 {
+#if MSDOS_COMPILER==BORLANDC || MSDOS_COMPILER==DJGPPC
+       intensevideo();
+#endif
        SETCOLORS(nm_fg_color, nm_bg_color);
 #if 0
        /*
@@ -2432,7 +2437,16 @@ win32_kbhit(tty)
                        currentKey.scan = PCK_CTL_DELETE;
                        break;
                }
+       } else if (ip.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED)
+       {
+               switch (currentKey.scan)
+               {
+               case PCK_SHIFT_TAB: /* tab */
+                       currentKey.ascii = 0;
+                       break;
+               }
        }
+
        return (TRUE);
 }
 
index 91fc03f250c2aaa5a9be566e821eda6107f37045..c928ebae8f475ca98b616efe55b43479e6776895 100644 (file)
--- a/scrsize.c
+++ b/scrsize.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
index e824acb4a3fc37d579804085e5eeed44f4794bdb..750b74a10298cb4df9c76e38d217ff0890f53145 100644 (file)
--- a/search.c
+++ b/search.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -1015,27 +1015,6 @@ hilite_line(linepos, line, line_len, chpos, sp, ep, cvt_ops)
 }
 #endif
 
-/*
- * Change the caseless-ness of searches.  
- * Updates the internal search state to reflect a change in the -i flag.
- */
-       public void
-chg_caseless()
-{
-       if (!is_ucase_pattern)
-               /*
-                * Pattern did not have uppercase.
-                * Just set the search caselessness to the global caselessness.
-                */
-               is_caseless = caseless;
-       else
-               /*
-                * Pattern did have uppercase.
-                * Discard the pattern; we can't change search caselessness now.
-                */
-               clear_pattern(&search_info);
-}
-
 #if HILITE_SEARCH
 /*
  * Find matching text which is currently on screen and highlight it.
@@ -1114,18 +1093,18 @@ search_pos(search_type)
                         * Search does not include current screen.
                         */
                        if (search_type & SRCH_FORW)
-                               linenum = BOTTOM_PLUS_ONE;
+                               linenum = sc_height-1; /* BOTTOM_PLUS_ONE */
                        else
-                               linenum = TOP;
+                               linenum = 0; /* TOP */
                } else if (how_search == OPT_ONPLUS && !(search_type & SRCH_AFTER_TARGET))
                {
                        /*
                         * Search includes all of displayed screen.
                         */
                        if (search_type & SRCH_FORW)
-                               linenum = TOP;
+                               linenum = 0; /* TOP */
                        else
-                               linenum = BOTTOM_PLUS_ONE;
+                               linenum = sc_height-1; /* BOTTOM_PLUS_ONE */
                } else 
                {
                        /*
@@ -1380,6 +1359,30 @@ hist_pattern(search_type)
 #endif /* CMD_HISTORY */
 }
 
+/*
+ * Change the caseless-ness of searches.  
+ * Updates the internal search state to reflect a change in the -i flag.
+ */
+       public void
+chg_caseless()
+{
+       if (!is_ucase_pattern)
+               /*
+                * Pattern did not have uppercase.
+                * Just set the search caselessness to the global caselessness.
+                */
+               is_caseless = caseless;
+       else
+       {
+               /*
+                * Pattern did have uppercase.
+                * Regenerate the pattern using the new state.
+                */
+               clear_pattern(&search_info);
+               hist_pattern(search_info.search_type);
+       }
+}
+
 /*
  * Search for the n-th occurrence of a specified pattern, 
  * either forward or backward.
index 37a9793be49c03b78ed71d7c74269c4f6aa7d07b..24f78f102c2e9b4d43797f2b3cb4e35c5e3a1fdb 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
diff --git a/tags.c b/tags.c
index 5acf3747b7e97122b1ea23c182dbcec50b83ea34..0566be71871329bbd47749d73569e49fdecbc591 100644 (file)
--- a/tags.c
+++ b/tags.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
diff --git a/ttyin.c b/ttyin.c
index 129eea158b63b888e117ebdcfd490e9d752c1d7a..58892e1456190749aea3d78be0c71e5860b69946 100644 (file)
--- a/ttyin.c
+++ b/ttyin.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -135,8 +135,8 @@ getchr()
 #if 0 /* allow entering arbitrary hex chars for testing */
                /* ctrl-A followed by two hex chars makes a byte */
        {
-               int hex_in = 0;
-               int hex_value = 0;
+               static int hex_in = 0;
+               static int hex_value = 0;
                if (c == CONTROL('A'))
                {
                        hex_in = 2;
index 39ec303f76505e5b95fb64ad17bd0ced11c75121..17c45903003fc10a8de8ec6d52777af66b9a298d 100644 (file)
--- a/ubin.uni
+++ b/ubin.uni
@@ -1,4 +1,4 @@
-/* Generated by "./mkutable -f2 Cc Cf Cs Co Zl Zp -- unicode/UnicodeData.txt" on Mon Jul 14 16:21:22 PDT 2014 */
+/* Generated by "./mkutable -f2 Cc Cf Cs Co Zl Zp -- unicode/UnicodeData.txt" on Tue Sep 20 10:51:43 PDT 2016 */
        { 0x0000, 0x001f }, /* Cc */
        { 0x007f, 0x009f }, /* Cc */
        { 0x00ad, 0x00ad }, /* Cf */
@@ -6,6 +6,7 @@
        { 0x061c, 0x061c }, /* Cf */
        { 0x06dd, 0x06dd }, /* Cf */
        { 0x070f, 0x070f }, /* Cf */
+       { 0x08e2, 0x08e2 }, /* Cf */
        { 0x180e, 0x180e }, /* Cf */
        { 0x200b, 0x200f }, /* Cf */
        { 0x2028, 0x2028 }, /* Zl */
index 87b0b42bc85568f95ca56ef92b9209eaa819ec18..dde1af0dd6e03384522998ea9f9beabe24f9251c 100644 (file)
--- a/version.c
+++ b/version.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1984-2015  Mark Nudelman
+ * Copyright (C) 1984-2016  Mark Nudelman
  *
  * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.
@@ -789,8 +789,22 @@ v477  5/19/15   Fix off-by-one in jump_forw_buffered;
                 don't add FAKE_* files to cmd history.
 v478  5/21/15   Fix nonportable pointer usage in hilite tree.
 v479  7/6/15    Allow %% escapes in LESSOPEN variable.
-v480  7/24/15  Fix bug in no-regex searches; support MSVC v1900.
-v481  8/20/15  Fix broken -g option.
+v480  7/24/15   Fix bug in no-regex searches; support MSVC v1900.
+v481  8/20/15   Fix broken -g option.
+-----------------------------------------------------------------
+v482  2/25/16   Update Unicode database to "2015-06-16, 20:24:00 GMT [KW]".
+v483  2/27/16   Regenerate hilite when change search caselessness.
+                (Thanks to Jason Hood)
+                Fix bug when terminal has no "cm". (Thanks to Noel Cragg)
+v484  9/20/16   Update to Unicode 9.0.0 database.
+v485  10/21/16  Fix "nothing to search" bug when top/bottom line is empty;
+                Display line numbers in bold. (thanks to Jason Hood);
+                Fix incorrect display when entering double-width chars in 
+               search string.
+v486  10/22/16  New commands ESC-{ and ESC-} to shift to start/end of 
+                displayed lines; new option -Da in Windows version to 
+               enable SGR mode (thanks to Jason Hood).
+v487  10/23/16  configure --help formatting.
 */
 
-char version[] = "481";
+char version[] = "487";
index b43f7d3598fc4ff5d80846b394f6fc4b230c150c..17c385914f7a88e57c72242dd741e7498aa74a62 100644 (file)
--- a/wide.uni
+++ b/wide.uni
-/* Generated by "./mkutable -f1 W -- unicode/EastAsianWidth.txt" on Mon Jul 14 16:21:23 PDT 2014 */
-       { 0x1100, 0x1100 }, /* W */
+/* Generated by "./mkutable -f1 W F -- unicode/EastAsianWidth.txt" on Tue Sep 20 10:51:43 PDT 2016 */
+       { 0x1100, 0x115f }, /* W */
+       { 0x231a, 0x231b }, /* W */
        { 0x2329, 0x232a }, /* W */
-       { 0x2e80, 0x2e80 }, /* W */
-       { 0x2e9b, 0x2e9b }, /* W */
-       { 0x2f00, 0x2f00 }, /* W */
-       { 0x2ff0, 0x2ff0 }, /* W */
-       { 0x3001, 0x3001 }, /* W */
-       { 0x3004, 0x3012 }, /* W */
-       { 0x3014, 0x301e }, /* W */
-       { 0x3020, 0x3021 }, /* W */
-       { 0x302a, 0x302a }, /* W */
-       { 0x302e, 0x302e }, /* W */
-       { 0x3030, 0x3031 }, /* W */
-       { 0x3036, 0x3036 }, /* W */
-       { 0x3038, 0x3038 }, /* W */
-       { 0x303b, 0x303e }, /* W */
-       { 0x3041, 0x3041 }, /* W */
-       { 0x3099, 0x3099 }, /* W */
-       { 0x309b, 0x309b }, /* W */
-       { 0x309d, 0x309d }, /* W */
-       { 0x309f, 0x30a1 }, /* W */
-       { 0x30fb, 0x30fc }, /* W */
-       { 0x30ff, 0x30ff }, /* W */
-       { 0x3105, 0x3105 }, /* W */
-       { 0x3131, 0x3131 }, /* W */
-       { 0x3190, 0x3190 }, /* W */
-       { 0x3192, 0x3192 }, /* W */
-       { 0x3196, 0x3196 }, /* W */
-       { 0x31a0, 0x31a0 }, /* W */
-       { 0x31c0, 0x31c0 }, /* W */
-       { 0x31f0, 0x31f0 }, /* W */
-       { 0x3200, 0x3200 }, /* W */
-       { 0x3220, 0x3220 }, /* W */
-       { 0x322a, 0x322a }, /* W */
-       { 0x3250, 0x3251 }, /* W */
-       { 0x3260, 0x3260 }, /* W */
-       { 0x3280, 0x3280 }, /* W */
-       { 0x328a, 0x328a }, /* W */
-       { 0x32b1, 0x32b1 }, /* W */
-       { 0x32c0, 0x32c0 }, /* W */
-       { 0x3300, 0x3300 }, /* W */
-       { 0x3400, 0x3400 }, /* W */
-       { 0x4db6, 0x4db6 }, /* W */
-       { 0x4e00, 0x4e00 }, /* W */
-       { 0x9fcd, 0x9fcd }, /* W */
-       { 0xa000, 0xa000 }, /* W */
-       { 0xa015, 0xa016 }, /* W */
-       { 0xa490, 0xa490 }, /* W */
-       { 0xa960, 0xa960 }, /* W */
-       { 0xac00, 0xac00 }, /* W */
-       { 0xf900, 0xf900 }, /* W */
-       { 0xfa6e, 0xfa6e }, /* W */
-       { 0xfa70, 0xfa70 }, /* W */
-       { 0xfada, 0xfada }, /* W */
-       { 0xfe10, 0xfe10 }, /* W */
-       { 0xfe17, 0xfe19 }, /* W */
-       { 0xfe30, 0xfe31 }, /* W */
-       { 0xfe33, 0xfe33 }, /* W */
-       { 0xfe35, 0xfe45 }, /* W */
-       { 0xfe47, 0xfe49 }, /* W */
-       { 0xfe4d, 0xfe4d }, /* W */
-       { 0xfe50, 0xfe50 }, /* W */
-       { 0xfe54, 0xfe54 }, /* W */
-       { 0xfe58, 0xfe5f }, /* W */
-       { 0xfe62, 0xfe64 }, /* W */
-       { 0xfe68, 0xfe6a }, /* W */
-       { 0x1b000, 0x1b000 }, /* W */
-       { 0x1f200, 0x1f200 }, /* W */
-       { 0x1f210, 0x1f210 }, /* W */
-       { 0x1f240, 0x1f240 }, /* W */
-       { 0x1f250, 0x1f250 }, /* W */
-       { 0x20000, 0x20000 }, /* W */
-       { 0x2a6d7, 0x2a6d7 }, /* W */
-       { 0x2a700, 0x2a700 }, /* W */
-       { 0x2b735, 0x2b735 }, /* W */
-       { 0x2b740, 0x2b740 }, /* W */
-       { 0x2b81e, 0x2b81e }, /* W */
-       { 0x2f800, 0x2f800 }, /* W */
-       { 0x2fa1e, 0x2fa1e }, /* W */
-       { 0x30000, 0x30000 }, /* W */
+       { 0x23e9, 0x23ec }, /* W */
+       { 0x23f0, 0x23f0 }, /* W */
+       { 0x23f3, 0x23f3 }, /* W */
+       { 0x25fd, 0x25fe }, /* W */
+       { 0x2614, 0x2615 }, /* W */
+       { 0x2648, 0x2653 }, /* W */
+       { 0x267f, 0x267f }, /* W */
+       { 0x2693, 0x2693 }, /* W */
+       { 0x26a1, 0x26a1 }, /* W */
+       { 0x26aa, 0x26ab }, /* W */
+       { 0x26bd, 0x26be }, /* W */
+       { 0x26c4, 0x26c5 }, /* W */
+       { 0x26ce, 0x26ce }, /* W */
+       { 0x26d4, 0x26d4 }, /* W */
+       { 0x26ea, 0x26ea }, /* W */
+       { 0x26f2, 0x26f3 }, /* W */
+       { 0x26f5, 0x26f5 }, /* W */
+       { 0x26fa, 0x26fa }, /* W */
+       { 0x26fd, 0x26fd }, /* W */
+       { 0x2705, 0x2705 }, /* W */
+       { 0x270a, 0x270b }, /* W */
+       { 0x2728, 0x2728 }, /* W */
+       { 0x274c, 0x274c }, /* W */
+       { 0x274e, 0x274e }, /* W */
+       { 0x2753, 0x2755 }, /* W */
+       { 0x2757, 0x2757 }, /* W */
+       { 0x2795, 0x2797 }, /* W */
+       { 0x27b0, 0x27b0 }, /* W */
+       { 0x27bf, 0x27bf }, /* W */
+       { 0x2b1b, 0x2b1c }, /* W */
+       { 0x2b50, 0x2b50 }, /* W */
+       { 0x2b55, 0x2b55 }, /* W */
+       { 0x2e80, 0x2e99 }, /* W */
+       { 0x2e9b, 0x2ef3 }, /* W */
+       { 0x2f00, 0x2fd5 }, /* W */
+       { 0x2ff0, 0x2ffb }, /* W */
+       { 0x3000, 0x3000 }, /* F */
+       { 0x3001, 0x303e }, /* W */
+       { 0x3041, 0x3096 }, /* W */
+       { 0x3099, 0x30ff }, /* W */
+       { 0x3105, 0x312d }, /* W */
+       { 0x3131, 0x318e }, /* W */
+       { 0x3190, 0x31ba }, /* W */
+       { 0x31c0, 0x31e3 }, /* W */
+       { 0x31f0, 0x321e }, /* W */
+       { 0x3220, 0x3247 }, /* W */
+       { 0x3250, 0x32fe }, /* W */
+       { 0x3300, 0x4dbf }, /* W */
+       { 0x4e00, 0xa48c }, /* W */
+       { 0xa490, 0xa4c6 }, /* W */
+       { 0xa960, 0xa97c }, /* W */
+       { 0xac00, 0xd7a3 }, /* W */
+       { 0xf900, 0xfaff }, /* W */
+       { 0xfe10, 0xfe19 }, /* W */
+       { 0xfe30, 0xfe52 }, /* W */
+       { 0xfe54, 0xfe66 }, /* W */
+       { 0xfe68, 0xfe6b }, /* W */
+       { 0xff01, 0xff60 }, /* F */
+       { 0xffe0, 0xffe6 }, /* F */
+       { 0x16fe0, 0x16fe0 }, /* W */
+       { 0x17000, 0x187ec }, /* W */
+       { 0x18800, 0x18af2 }, /* W */
+       { 0x1b000, 0x1b001 }, /* W */
+       { 0x1f004, 0x1f004 }, /* W */
+       { 0x1f0cf, 0x1f0cf }, /* W */
+       { 0x1f18e, 0x1f18e }, /* W */
+       { 0x1f191, 0x1f19a }, /* W */
+       { 0x1f200, 0x1f202 }, /* W */
+       { 0x1f210, 0x1f23b }, /* W */
+       { 0x1f240, 0x1f248 }, /* W */
+       { 0x1f250, 0x1f251 }, /* W */
+       { 0x1f300, 0x1f320 }, /* W */
+       { 0x1f32d, 0x1f335 }, /* W */
+       { 0x1f337, 0x1f37c }, /* W */
+       { 0x1f37e, 0x1f393 }, /* W */
+       { 0x1f3a0, 0x1f3ca }, /* W */
+       { 0x1f3cf, 0x1f3d3 }, /* W */
+       { 0x1f3e0, 0x1f3f0 }, /* W */
+       { 0x1f3f4, 0x1f3f4 }, /* W */
+       { 0x1f3f8, 0x1f43e }, /* W */
+       { 0x1f440, 0x1f440 }, /* W */
+       { 0x1f442, 0x1f4fc }, /* W */
+       { 0x1f4ff, 0x1f53d }, /* W */
+       { 0x1f54b, 0x1f54e }, /* W */
+       { 0x1f550, 0x1f567 }, /* W */
+       { 0x1f57a, 0x1f57a }, /* W */
+       { 0x1f595, 0x1f596 }, /* W */
+       { 0x1f5a4, 0x1f5a4 }, /* W */
+       { 0x1f5fb, 0x1f64f }, /* W */
+       { 0x1f680, 0x1f6c5 }, /* W */
+       { 0x1f6cc, 0x1f6cc }, /* W */
+       { 0x1f6d0, 0x1f6d2 }, /* W */
+       { 0x1f6eb, 0x1f6ec }, /* W */
+       { 0x1f6f4, 0x1f6f6 }, /* W */
+       { 0x1f910, 0x1f91e }, /* W */
+       { 0x1f920, 0x1f927 }, /* W */
+       { 0x1f930, 0x1f930 }, /* W */
+       { 0x1f933, 0x1f93e }, /* W */
+       { 0x1f940, 0x1f94b }, /* W */
+       { 0x1f950, 0x1f95e }, /* W */
+       { 0x1f980, 0x1f991 }, /* W */
+       { 0x1f9c0, 0x1f9c0 }, /* W */
+       { 0x20000, 0x2fffd }, /* W */
+       { 0x30000, 0x3fffd }, /* W */