Skip to content

Commit

Permalink
Make -M and = prompts include top & bottom line numbers.
Browse files Browse the repository at this point in the history
Update copyright to 2000 for v351.
  • Loading branch information
gwsw committed Mar 6, 2000
1 parent c73437a commit a1a31ea
Show file tree
Hide file tree
Showing 51 changed files with 71 additions and 67 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
------------

Less
Copyright (C) 1984-1999 Mark Nudelman
Copyright (C) 1984-2000 Mark Nudelman

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down
2 changes: 1 addition & 1 deletion Makefile.dsg
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ lessecho: lessecho.${O} version.${O}
${CC} ${LDFLAGS} -o $@ lessecho.${O} version.${O}

defines.h: defines.ds
update $< $@
command.com /c copy $< $@

${OBJ}: less.h defines.h funcs.h

Expand Down
2 changes: 2 additions & 0 deletions NEWS.VER
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

* Add --with-editor option to configure script.

* The -M prompt and = message now show the top and bottom line number.

* Fix bug in running the editor on a file whose name contains quotes, etc.

* Fix bug in horizontal scrolling of long lines.
Expand Down
5 changes: 4 additions & 1 deletion README.VER
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ INSTALLATION (Unix systems only):
3. It is a good idea to look over the generated Makefile and defines.h
and make sure they look ok. If you know of any peculiarities of
your system that configure might not have detected, you may fix the
Makefile now.
Makefile now. Take particular notice of the list of "terminal"
libraries in the LIBS definition in the Makefile; these may need
to be edited. The terminal libraries will be some subset of
-lncurses -lcurses -ltermcap -ltermlib

If you wish, you may edit defines.h to remove some optional features.
If you wish to build a "secure" version of less (which disables all
Expand Down
2 changes: 1 addition & 1 deletion brac.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion ch.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion charset.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion cmd.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion cmdbuf.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion command.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion decode.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion defines.ds
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion defines.o2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion defines.o9
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion defines.wn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion doscreen.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion edit.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion filename.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion forwback.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion ifile.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion input.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion jump.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion less.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
15 changes: 6 additions & 9 deletions less.nro.VER
Original file line number Diff line number Diff line change
Expand Up @@ -1294,14 +1294,14 @@ Each is broken into two lines here for readability only.
?n?f%f\ .?m(file\ %i\ of\ %m)\ ..?e(END)\ ?x-\ Next\\:\ %x.:
?pB%pB\\%:byte\ %bB?s/%s...%t
.sp
?f%f\ .?n?m(file\ %i\ of\ %m)\ ..?ltline\ %lt?L/%L.\ :byte\ %bB?s/%s.\ .
?e(END)\ ?x-\ Next\\:\ %x.:?pB%pB\\%..%t
?f%f\ .?n?m(file\ %i\ of\ %m)\ ..?ltlines\ %lt-%lb?L/%L.\ :
byte\ %bB?s/%s.\ .?e(END)\ ?x-\ Next\\:\ %x.:?pB%pB\\%..%t
.sp
.fi
And here is the default message produced by the = command:
.nf
.sp
?f%f\ .?m(file\ %i\ of\ %m)\ .?ltline\ %lt?L/%L.\ .
?f%f\ .?m(file\ %i\ of\ %m)\ .?ltlines\ %lt-%lb?L/%L.\ .
byte\ %bB?s/%s.\ ?e(END)\ :?pB%pB\\%..%t
.fi
.PP
Expand Down Expand Up @@ -1441,8 +1441,8 @@ lesskey(1)

.SH WARNINGS
The = command and prompts (unless changed by -P)
report the line number of the line at the top of the screen,
but the byte and percent of the line at the bottom of the screen.
report the line numbers of the lines at the top and bottom of the screen,
but the byte and percent of the line after the one at the bottom of the screen.
.PP
If the :e command is used to name more than one file,
and one of the named files has been viewed previously,
Expand All @@ -1469,14 +1469,11 @@ to treat some binary files as ordinary, non-binary files.
To workaround this problem, set the environment variable
LESSCHARSET to "ascii" (or whatever character set is appropriate).
.PP
The MS-DOS and Windows versions sometimes display incorrect
highlighting when lines are longer than the screen width.
.PP
See @@HOMEPAGE@@ for the latest list of known bugs in this
version of less.

.SH COPYRIGHT
Copyright (C) 1999 Mark Nudelman
Copyright (C) 2000 Mark Nudelman
.PP
less is part of the GNU project and is free software.
You can redistribute it and/or modify it
Expand Down
4 changes: 2 additions & 2 deletions lessecho.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand All @@ -24,7 +24,7 @@

#include "less.h"

static char *version = "$Revision: 1.4 $";
static char *version = "$Revision: 1.5 $";

static int quote_all = 0;
static char openquote = '"';
Expand Down
2 changes: 1 addition & 1 deletion lesskey.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion lesskey.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion lesskey.nro.VER
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ which start with a NUL character (0).
This NUL character should be represented as \e340 in a lesskey file.

.SH COPYRIGHT
Copyright (C) 1999 Mark Nudelman
Copyright (C) 2000 Mark Nudelman
.PP
lesskey is part of the GNU project and is free software;
you can redistribute it and/or modify it
Expand Down
2 changes: 1 addition & 1 deletion lglob.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion line.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion linenum.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion lsystem.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
11 changes: 6 additions & 5 deletions mark.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down Expand Up @@ -29,6 +29,7 @@ struct mark {
* The final one is lmark, for the "last mark"; addressed by the apostrophe.
*/
#define NMARKS ((2*26)+1) /* a-z, A-Z, lastmark */
#define LASTMARK (NMARKS-1)
static struct mark marks[NMARKS];

/*
Expand Down Expand Up @@ -109,7 +110,7 @@ getmark(c)
/*
* The "last mark".
*/
m = &marks[NMARKS-1];
m = &marks[LASTMARK];
break;
default:
/*
Expand Down Expand Up @@ -169,8 +170,8 @@ lastmark()
get_scrpos(&scrpos);
if (scrpos.pos == NULL_POSITION)
return;
marks[NMARKS-1].m_scrpos = scrpos;
marks[NMARKS-1].m_ifile = curr_ifile;
marks[LASTMARK].m_scrpos = scrpos;
marks[LASTMARK].m_ifile = curr_ifile;
}

/*
Expand All @@ -192,7 +193,7 @@ gomark(c)
* it has not been set to anything yet,
* set it to the beginning of the current file.
*/
if (m == &marks[NMARKS-1] && m->m_scrpos.pos == NULL_POSITION)
if (m == &marks[LASTMARK] && m->m_scrpos.pos == NULL_POSITION)
{
m->m_ifile = curr_ifile;
m->m_scrpos.pos = ch_zero();
Expand Down
2 changes: 1 addition & 1 deletion mkhelp.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
4 changes: 2 additions & 2 deletions optfunc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down Expand Up @@ -368,7 +368,7 @@ opt__V(type, s)
any_display = 1;
putstr("less ");
putstr(version);
putstr("\nCopyright (C) 1999 Mark Nudelman\n\n");
putstr("\nCopyright (C) 2000 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");
Expand Down
2 changes: 1 addition & 1 deletion option.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion option.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion opttbl.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion os.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion output.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
2 changes: 1 addition & 1 deletion pckeys.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-1999 Mark Nudelman
* Copyright (C) 1984-2000 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.
Expand Down
Loading

0 comments on commit a1a31ea

Please sign in to comment.