Skip to content

Commit

Permalink
Many little changes; see NEWS.VER.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwsw committed Jan 13, 2007
1 parent df1431f commit 8e2cc74
Show file tree
Hide file tree
Showing 11 changed files with 378 additions and 281 deletions.
24 changes: 15 additions & 9 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ INSTALL_DATA = @INSTALL_DATA@
CFLAGS = @CFLAGS@
CFLAGS_COMPILE_ONLY = -c
LDFLAGS = @LDFLAGS@
CPPFLAGS = @CPPFLAGS@
O=o

LIBS = @LIBS@
Expand All @@ -29,6 +30,7 @@ sysconfdir = @sysconfdir@
mandir = @mandir@
manext = 1
manprefix =
DESTDIR =

#### End of system configuration section. ####

Expand Down Expand Up @@ -60,22 +62,26 @@ lessecho: lessecho.${O} version.${O}
${OBJ}: ${srcdir}/less.h ${srcdir}/funcs.h defines.h

install: all ${srcdir}/less.nro ${srcdir}/lesskey.nro ${srcdir}/lessecho.nro installdirs
${INSTALL_PROGRAM} less ${bindir}/${binprefix}less
${INSTALL_PROGRAM} lesskey ${bindir}/${binprefix}lesskey
${INSTALL_PROGRAM} lessecho ${bindir}/${binprefix}lessecho
${INSTALL_DATA} ${srcdir}/less.nro ${mandir}/man${manext}/${manprefix}less.${manext}
${INSTALL_DATA} ${srcdir}/lesskey.nro ${mandir}/man${manext}/${manprefix}lesskey.${manext}
${INSTALL_DATA} ${srcdir}/lessecho.nro ${mandir}/man${manext}/${manprefix}lessecho.${manext}
${INSTALL_PROGRAM} less ${DESTDIR}${bindir}/${binprefix}less
${INSTALL_PROGRAM} lesskey ${DESTDIR}${bindir}/${binprefix}lesskey
${INSTALL_PROGRAM} lessecho ${DESTDIR}${bindir}/${binprefix}lessecho
${INSTALL_DATA} ${srcdir}/less.nro ${DESTDIR}${mandir}/man${manext}/${manprefix}less.${manext}
${INSTALL_DATA} ${srcdir}/lesskey.nro ${DESTDIR}${mandir}/man${manext}/${manprefix}lesskey.${manext}
${INSTALL_DATA} ${srcdir}/lessecho.nro ${DESTDIR}${mandir}/man${manext}/${manprefix}lessecho.${manext}

install-strip:
${MAKE} INSTALL_PROGRAM='${INSTALL_PROGRAM} -s' install

installdirs: mkinstalldirs
${srcdir}/mkinstalldirs ${bindir} ${mandir}/man${manext}
${srcdir}/mkinstalldirs ${DESTDIR}${bindir} ${DESTDIR}${mandir}/man${manext}

uninstall:
rm -f ${bindir}/${binprefix}less ${bindir}/${binprefix}lesskey ${bindir}/${binprefix}lessecho
rm -f ${mandir}/man${manext}/${manprefix}less.${manext} ${mandir}/man${manext}/${manprefix}lesskey.${manext}
rm -f ${DESTDIR}${bindir}/${binprefix}less
rm -f ${DESTDIR}${bindir}/${binprefix}lesskey
rm -f ${DESTDIR}${bindir}/${binprefix}lessecho
rm -f ${DESTDIR}${mandir}/man${manext}/${manprefix}less.${manext}
rm -f ${DESTDIR}${mandir}/man${manext}/${manprefix}lesskey.${manext}
rm -f ${DESTDIR}${mandir}/man${manext}/${manprefix}lessecho.${manext}

info:
install-info:
Expand Down
18 changes: 17 additions & 1 deletion NEWS.VER
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,23 @@
======================================================================


Major changes between "less" versions 382 and @@VERSION@@
Major changes between "less" versions 394 and @@VERSION@@

* Allow "/dev/null" as synomym for "-" in LESSHISTFILE.

* Make -f work for directories.

* Support DESTDIR in Makefile.

* Make "t" cmd traverse tags in the correct order.

* Fix configure bugs.

* Update Unicode character tables.

======================================================================

Major changes between "less" versions 382 and 394

* Add history file to save search and shell command history between
invocations of less.
Expand Down
580 changes: 326 additions & 254 deletions charset.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cmdbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ histfile_name()
name = lgetenv("LESSHISTFILE");
if (name != NULL && *name != '\0')
{
if (strcmp(name, "-") == 0)
if (strcmp(name, "-") == 0 || strcmp(name, "/dev/null") == 0)
/* $LESSHISTFILE == "-" means don't use a history file. */
return (NULL);
return (save(name));
Expand Down
6 changes: 1 addition & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,7 @@ AC_MSG_CHECKING(for sys_errlist)
AC_TRY_LINK(, [extern char *sys_errlist[]; static char **x; x = sys_errlist;],
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)], [AC_MSG_RESULT(no)])

AC_MSG_CHECKING(for sigset_t)
AC_TRY_LINK([
#include <signal.h>
], [sigset_t s; s = 0;],
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGSET_T)], [AC_MSG_RESULT(no)])
AC_CHECK_TYPES([sigset_t],,,[#include <signal.h>])

AC_MSG_CHECKING(for sigemptyset)
AC_TRY_LINK([
Expand Down
2 changes: 1 addition & 1 deletion filename.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ bad_file(filename)
register char *m = NULL;

filename = shell_unquote(filename);
if (is_dir(filename))
if (!force_open && is_dir(filename))
{
static char is_a_dir[] = " is a directory";

Expand Down
2 changes: 1 addition & 1 deletion less.hlp.VER
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
-m -M .... --long-prompt --LONG-PROMPT
Set prompt style.
-n -N .... --line-numbers --LINE-NUMBERS
Use line numbers.
Don't use line numbers.
-o [_f_i_l_e] . --log-file=[_f_i_l_e]
Copy to log file (standard input only).
-O [_f_i_l_e] . --LOG-FILE=[_f_i_l_e]
Expand Down
4 changes: 3 additions & 1 deletion less.nro.VER
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ Also suppresses the warning message when a binary file is opened.
By default,
.I less
will refuse to open non-regular files.
Note that some operating systems will not allow directories
to be read, even if \-f is set.
.IP "\-F or \-\-quit-if-one-screen"
Causes
.I less
Expand Down Expand Up @@ -1509,7 +1511,7 @@ Normally should be set to "global" if your system has the
Name of the history file used to remember search commands and
shell commands between invocations of
.I less.
If set to "\-", a history file is not used.
If set to "\-" or "/dev/null", a history file is not used.
The default is "$HOME/.lesshst" on Unix systems, "$HOME/_lesshst" on
DOS and Windows systems, or "$HOME/lesshst.ini" or "$INIT/lesshst.ini"
on OS/2 systems.
Expand Down
3 changes: 1 addition & 2 deletions signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,12 @@ init_signals(on)
#endif
#ifdef SIGWINCH
(void) LSIGNAL(SIGWINCH, winch);
#else
#endif
#ifdef SIGWIND
(void) LSIGNAL(SIGWIND, winch);
#endif
#ifdef SIGQUIT
(void) LSIGNAL(SIGQUIT, SIG_IGN);
#endif
#endif
} else
{
Expand Down
10 changes: 5 additions & 5 deletions tags.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static int getentry();
*
* Use either pattern or line number.
* findgtag() always uses line number, so pattern is always NULL.
* findctag() usually either pattern (in which case line number is 0),
* findctag() uses either pattern (in which case line number is 0),
* or line number (in which case pattern is NULL).
*/
struct taglist {
Expand All @@ -75,10 +75,10 @@ struct tag {
static struct tag *curtag;

#define TAG_INS(tp) \
(tp)->next = taglist.tl_first; \
(tp)->prev = TAG_END; \
taglist.tl_first->prev = (tp); \
taglist.tl_first = (tp);
(tp)->next = TAG_END; \
(tp)->prev = taglist.tl_last; \
taglist.tl_last->next = (tp); \
taglist.tl_last = (tp);

#define TAG_RM(tp) \
(tp)->next->prev = (tp)->prev; \
Expand Down
8 changes: 7 additions & 1 deletion version.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,12 @@ v392 10/14/05 Fix line wrapping bug.
v393 10/19/05 Allow multiple attributes per char; fix bold+underline bug
(thanks again to Charles Levert).
v394 11/8/05 Fix prompt bug; fix compile problem in Windows build.
-----------------------------------------------------------------
v395 1/12/07 Update Unicode tables (thanks to Charles Levert);
don't chmod if LESSHISTFILE = /dev/null;
make -f work for directories; support DESTDIR in Makefile;
fix setset_t detection in configure;
make "t" cmd traverse tags in correct order
*/

char version[] = "394";
char version[] = "395";

0 comments on commit 8e2cc74

Please sign in to comment.