Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/less merge less 335.



details:   https://anonhg.NetBSD.org/src/rev/2da72d3902a9
branches:  trunk
changeset: 471624:2da72d3902a9
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Apr 06 05:57:34 1999 +0000

description:
merge less 335.

diffstat:

 usr.bin/less/less/brac.c       |   4 +-
 usr.bin/less/less/ch.c         |   6 +-
 usr.bin/less/less/charset.c    |  10 ++-
 usr.bin/less/less/cmdbuf.c     |   4 +-
 usr.bin/less/less/command.c    |  18 +++++++-
 usr.bin/less/less/decode.c     |   4 +-
 usr.bin/less/less/defines.h    |   4 +-
 usr.bin/less/less/edit.c       |   4 +-
 usr.bin/less/less/filename.c   |   4 +-
 usr.bin/less/less/forwback.c   |   9 +---
 usr.bin/less/less/funcs.h      |   5 +-
 usr.bin/less/less/ifile.c      |   7 +-
 usr.bin/less/less/less.1       |  66 ++++++++++++++++++++++++-------
 usr.bin/less/less/less.h       |  80 +++++++++++++++++++++++++++++++++++---
 usr.bin/less/less/line.c       |   4 +-
 usr.bin/less/less/linenum.c    |   4 +-
 usr.bin/less/less/lsystem.c    |   4 +-
 usr.bin/less/less/main.c       |  43 +++++++++++++-------
 usr.bin/less/less/mark.c       |   4 +-
 usr.bin/less/less/option.c     |   4 +-
 usr.bin/less/less/option.h     |   4 +-
 usr.bin/less/less/opttbl.c     |  14 +++---
 usr.bin/less/less/os.c         |  24 ++++++++++-
 usr.bin/less/less/output.c     |  86 ++++++++++++++++++++++++++++-------------
 usr.bin/less/less/prompt.c     |  86 +++++++++++++++++++++++++++++------------
 usr.bin/less/less/screen.c     |  86 +++++++++++++++++++++---------------------
 usr.bin/less/less/search.c     |  71 ++++++++++++++++++++++++++++++----
 usr.bin/less/less/signal.c     |  10 +++-
 usr.bin/less/lesskey/lesskey.1 |   8 +-
 usr.bin/less/lesskey/lesskey.c |  25 +++++++++++-
 30 files changed, 495 insertions(+), 207 deletions(-)

diffs (truncated from 1544 to 300 lines):

diff -r 94b6e8328b00 -r 2da72d3902a9 usr.bin/less/less/brac.c
--- a/usr.bin/less/less/brac.c  Tue Apr 06 05:55:06 1999 +0000
+++ b/usr.bin/less/less/brac.c  Tue Apr 06 05:57:34 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: brac.c,v 1.2 1998/02/22 14:57:28 christos Exp $        */
+/*     $NetBSD: brac.c,v 1.3 1999/04/06 05:57:34 mrg Exp $     */
 
 /*
- * Copyright (c) 1984,1985,1989,1994,1995,1996  Mark Nudelman
+ * Copyright (c) 1984,1985,1989,1994,1995,1996,1999  Mark Nudelman
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -r 94b6e8328b00 -r 2da72d3902a9 usr.bin/less/less/ch.c
--- a/usr.bin/less/less/ch.c    Tue Apr 06 05:55:06 1999 +0000
+++ b/usr.bin/less/less/ch.c    Tue Apr 06 05:57:34 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: ch.c,v 1.2 1998/02/22 14:57:28 christos Exp $  */
+/*     $NetBSD: ch.c,v 1.3 1999/04/06 05:57:34 mrg Exp $       */
 
 /*
- * Copyright (c) 1984,1985,1989,1994,1995,1996  Mark Nudelman
+ * Copyright (c) 1984,1985,1989,1994,1995,1996,1999  Mark Nudelman
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -69,7 +69,7 @@
        POSITION fpos;
        int nbufs;
        long block;
-       int offset;
+       unsigned int offset;
        POSITION fsize;
 };
 
diff -r 94b6e8328b00 -r 2da72d3902a9 usr.bin/less/less/charset.c
--- a/usr.bin/less/less/charset.c       Tue Apr 06 05:55:06 1999 +0000
+++ b/usr.bin/less/less/charset.c       Tue Apr 06 05:57:34 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: charset.c,v 1.2 1998/02/22 14:57:28 christos Exp $     */
+/*     $NetBSD: charset.c,v 1.3 1999/04/06 05:57:35 mrg Exp $  */
 
 /*
- * Copyright (c) 1984,1985,1989,1994,1995,1996  Mark Nudelman
+ * Copyright (c) 1984,1985,1989,1994,1995,1996,1999  Mark Nudelman
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -47,11 +47,13 @@
        char *desc;
 } charsets[] = {
        { "ascii",      "8bcccbcc18b95.b"               },
-       { "latin1",     "8bcccbcc18b95.33b."            },
        { "dos",        "8bcccbcc12bc5b95.b."           },
+       { "ebcdic",     "5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b." },
+       { "iso8859",    "8bcccbcc18b95.33b."            },
        { "koi8-r",     "8bcccbcc18b95.b128."           },
+       { "latin1",     "8bcccbcc18b95.33b."            },
        { "next",       "8bcccbcc18b95.bb125.bb"        },
-       { NULL }
+       { NULL, NULL }
 };
 
 #define        IS_BINARY_CHAR  01
diff -r 94b6e8328b00 -r 2da72d3902a9 usr.bin/less/less/cmdbuf.c
--- a/usr.bin/less/less/cmdbuf.c        Tue Apr 06 05:55:06 1999 +0000
+++ b/usr.bin/less/less/cmdbuf.c        Tue Apr 06 05:57:34 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: cmdbuf.c,v 1.2 1998/02/22 14:57:29 christos Exp $      */
+/*     $NetBSD: cmdbuf.c,v 1.3 1999/04/06 05:57:35 mrg Exp $   */
 
 /*
- * Copyright (c) 1984,1985,1989,1994,1995,1996  Mark Nudelman
+ * Copyright (c) 1984,1985,1989,1994,1995,1996,1999  Mark Nudelman
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -r 94b6e8328b00 -r 2da72d3902a9 usr.bin/less/less/command.c
--- a/usr.bin/less/less/command.c       Tue Apr 06 05:55:06 1999 +0000
+++ b/usr.bin/less/less/command.c       Tue Apr 06 05:57:34 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: command.c,v 1.5 1998/02/22 14:57:29 christos Exp $     */
+/*     $NetBSD: command.c,v 1.6 1999/04/06 05:57:35 mrg Exp $  */
 
 /*
- * Copyright (c) 1984,1985,1989,1994,1995,1996  Mark Nudelman
+ * Copyright (c) 1984,1985,1989,1994,1995,1996,1999  Mark Nudelman
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -51,6 +51,7 @@
 extern int ignore_eoi;
 extern int secure;
 extern int hshift;
+extern int show_attn;
 extern char *every_first_cmd;
 extern char *curr_altfilename;
 extern char version[];
@@ -80,6 +81,7 @@
 static int number;             /* The number typed by the user */
 static char optchar;
 static int optflag;
+static POSITION bottompos;
 #if PIPEC
 static char pipec;
 #endif
@@ -102,6 +104,7 @@
        static void
 cmd_exec()
 {
+       clear_attn();
        lower_left();
        flush();
 }
@@ -473,6 +476,7 @@
         * Make sure the screen is displayed.
         */
        make_display();
+       bottompos = position(BOTTOM_PLUS_ONE);
 
        /*
         * If the -E flag is set and we've hit EOF on the last file, quit.
@@ -864,6 +868,8 @@
                        if (number <= 0)
                                number = get_swindow();
                        cmd_exec();
+                       if (show_attn)
+                               set_attnpos(bottompos);
                        forward(number, 0, 1);
                        break;
 
@@ -891,6 +897,8 @@
                        if (number <= 0)
                                number = 1;
                        cmd_exec();
+                       if (show_attn == OPT_ONPLUS && number > 1)
+                               set_attnpos(bottompos);
                        forward(number, 0, 0);
                        break;
 
@@ -911,6 +919,8 @@
                        if (number <= 0)
                                number = 1;
                        cmd_exec();
+                       if (show_attn == OPT_ONPLUS && number > 1)
+                               set_attnpos(bottompos);
                        forward(number, 1, 0);
                        break;
 
@@ -931,6 +941,8 @@
                        if (number <= 0)
                                number = get_swindow();
                        cmd_exec();
+                       if (show_attn == OPT_ONPLUS)
+                               set_attnpos(bottompos);
                        forward(number, 1, 0);
                        break;
 
@@ -963,6 +975,8 @@
                        if (number > 0)
                                wscroll = number;
                        cmd_exec();
+                       if (show_attn == OPT_ONPLUS)
+                               set_attnpos(bottompos);
                        forward(wscroll, 0, 0);
                        break;
 
diff -r 94b6e8328b00 -r 2da72d3902a9 usr.bin/less/less/decode.c
--- a/usr.bin/less/less/decode.c        Tue Apr 06 05:55:06 1999 +0000
+++ b/usr.bin/less/less/decode.c        Tue Apr 06 05:57:34 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: decode.c,v 1.2 1998/02/22 14:57:29 christos Exp $      */
+/*     $NetBSD: decode.c,v 1.3 1999/04/06 05:57:35 mrg Exp $   */
 
 /*
- * Copyright (c) 1984,1985,1989,1994,1995,1996  Mark Nudelman
+ * Copyright (c) 1984,1985,1989,1994,1995,1996,1999  Mark Nudelman
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -r 94b6e8328b00 -r 2da72d3902a9 usr.bin/less/less/defines.h
--- a/usr.bin/less/less/defines.h       Tue Apr 06 05:55:06 1999 +0000
+++ b/usr.bin/less/less/defines.h       Tue Apr 06 05:57:34 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: defines.h,v 1.2 1998/02/22 14:57:29 christos Exp $     */
+/*     $NetBSD: defines.h,v 1.3 1999/04/06 05:57:35 mrg Exp $  */
 
 /* defines.h.  Generated automatically by configure.  */
 /* defines.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -289,7 +289,7 @@
 /* #undef HAVE_SYS_STREAM_H */
 
 /* Define if you have the <termcap.h> header file.  */
-/* #undef HAVE_TERMCAP_H */
+#define HAVE_TERMCAP_H 1
 
 /* Define if you have the <termio.h> header file.  */
 /* #undef HAVE_TERMIO_H */
diff -r 94b6e8328b00 -r 2da72d3902a9 usr.bin/less/less/edit.c
--- a/usr.bin/less/less/edit.c  Tue Apr 06 05:55:06 1999 +0000
+++ b/usr.bin/less/less/edit.c  Tue Apr 06 05:57:34 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: edit.c,v 1.2 1998/02/22 14:57:29 christos Exp $        */
+/*     $NetBSD: edit.c,v 1.3 1999/04/06 05:57:35 mrg Exp $     */
 
 /*
- * Copyright (c) 1984,1985,1989,1994,1995,1996  Mark Nudelman
+ * Copyright (c) 1984,1985,1989,1994,1995,1996,1999  Mark Nudelman
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -r 94b6e8328b00 -r 2da72d3902a9 usr.bin/less/less/filename.c
--- a/usr.bin/less/less/filename.c      Tue Apr 06 05:55:06 1999 +0000
+++ b/usr.bin/less/less/filename.c      Tue Apr 06 05:57:34 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: filename.c,v 1.2 1998/02/22 14:57:29 christos Exp $    */
+/*     $NetBSD: filename.c,v 1.3 1999/04/06 05:57:35 mrg Exp $ */
 
 /*
- * Copyright (c) 1984,1985,1989,1994,1995,1996  Mark Nudelman
+ * Copyright (c) 1984,1985,1989,1994,1995,1996,1999  Mark Nudelman
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -r 94b6e8328b00 -r 2da72d3902a9 usr.bin/less/less/forwback.c
--- a/usr.bin/less/less/forwback.c      Tue Apr 06 05:55:06 1999 +0000
+++ b/usr.bin/less/less/forwback.c      Tue Apr 06 05:57:34 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: forwback.c,v 1.4 1998/02/22 14:57:29 christos Exp $    */
+/*     $NetBSD: forwback.c,v 1.5 1999/04/06 05:57:35 mrg Exp $ */
 
 /*
- * Copyright (c) 1984,1985,1989,1994,1995,1996  Mark Nudelman
+ * Copyright (c) 1984,1985,1989,1994,1995,1996,1999  Mark Nudelman
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -161,11 +161,6 @@
                } else
                {
                        clear_bot();
-                       /*
-                        * Remove the top n lines and scroll the rest
-                        * upward, leaving cursor at first new blank line.
-                        */
-                       remove_top(n);
                }
 
                if (pos != position(BOTTOM_PLUS_ONE) || empty_screen())
diff -r 94b6e8328b00 -r 2da72d3902a9 usr.bin/less/less/funcs.h
--- a/usr.bin/less/less/funcs.h Tue Apr 06 05:55:06 1999 +0000
+++ b/usr.bin/less/less/funcs.h Tue Apr 06 05:57:34 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: funcs.h,v 1.2 1998/02/22 14:57:30 christos Exp $       */
+/*     $NetBSD: funcs.h,v 1.3 1999/04/06 05:57:35 mrg Exp $    */
 
 
 /* brac.c */
@@ -127,6 +127,7 @@
 public void if_dump __P((void));
 
 /* input.c */
+public void set_attnpos __P((POSITION));
 public POSITION forw_line __P((POSITION));
 public POSITION back_line __P((POSITION));
 
@@ -162,7 +163,6 @@
 
 /* main.c */
 int main __P((int, char *[]));
-public void strtcpy __P((char *, char *, unsigned int));
 public char *save __P((char *));
 public VOID_POINTER ecalloc __P((int, unsigned int));
 public char *skipsp __P((char *));
@@ -283,6 +283,7 @@
 public void chg_hilite __P((void));
 public int search __P((int, char *, int));
 public void prep_hilite __P((POSITION, POSITION, int));
+public void clear_attn __P((void));
 
 /* signal.c */
 public RETSIGTYPE winch __P((int));
diff -r 94b6e8328b00 -r 2da72d3902a9 usr.bin/less/less/ifile.c
--- a/usr.bin/less/less/ifile.c Tue Apr 06 05:55:06 1999 +0000
+++ b/usr.bin/less/less/ifile.c Tue Apr 06 05:57:34 1999 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: ifile.c,v 1.2 1998/02/22 14:57:30 christos Exp $       */
+/*     $NetBSD: ifile.c,v 1.3 1999/04/06 05:57:35 mrg Exp $    */
 
 /*
- * Copyright (c) 1984,1985,1989,1994,1995,1996  Mark Nudelman
+ * Copyright (c) 1984,1985,1989,1994,1995,1996,1999  Mark Nudelman
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -63,7 +63,8 @@
 /*
  * Anchor for linked list.
  */
-static struct ifile anchor = { &anchor, &anchor, 0 };



Home | Main Index | Thread Index | Old Index