less, a paginator
Jim Scardelis
frodo at wcom.UUCP
Wed Jun 5 14:14:18 AEST 1985
> This is a pagination program similar to more or pg.
> It has been run on 4.1BSD, 4.2BSD and System V,
> but has not been tested on any other system.
> To install, delete everything down to the cut line below,
> put the file in an empty directory, and run sh on the file.
> Then read the file called INSTALLATION.
> Problems, complaints, praise to the author.
>
> Mark Nudelman nsc!nsc-pdc!mark
> National Semiconductor tektronix!reed!nsc-pdc!mark
>
Attached is a shar archive containing a diff file "screen.diff" to be
applied to screen.c, and "makefile.xen" for compiling less under
Xenix 3.0 on an IBM PC/AT.
# This is a shell archive. Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by frodo on Wed Jun 5 00:08:07 EDT 1985
# Contents: screen.diff makefile.xen
echo x - screen.diff
sed 's/^@//' > "screen.diff" <<'@//E*O*F screen.diff//'
8a9,12
> #if XENIX
> #include <sys/types.h>
> #include <sys/ioctl.h>
> #endif
@//E*O*F screen.diff//
chmod u=rw,g=r,o=r screen.diff
echo x - makefile.xen
sed 's/^@//' > "makefile.xen" <<'@//E*O*F makefile.xen//'
# Makefile for "less"
#
# Invoked as:
# make all
# or make install
# Plain "make" is equivalent to "make all".
#
# If you add or delete functions, remake funcs.h by doing:
# make newfuncs
# This depends on the coding convention of function headers looking like:
# " \t public <function-type> \n <function-name> ( ... ) "
#
# Also provided:
# make lint # Runs "lint" on all the sources.
# make clean # Removes "less" and the .o files.
# make clobber # Pretty much the same as make "clean".
##########################################################################
# System-specific parameters
# Define XENIX if running under XENIX 3.0
XENIX = 1
# TERMIO is 1 if your system has /usr/include/termio.h.
# This is normally the case for System 5.
# If TERMIO is 0 your system must have /usr/include/sgtty.h.
# This is normally the case for BSD.
TERMIO = 1
# off_t is the type which lseek() returns.
# It is also the type of lseek()'s second argument.
off_t = long
# REGCMP is 1 if your system has the regcmp() function.
# This is normally the case for System 5.
# RECOMP is 1 if your system has the re_comp() function.
# This is normally the case for BSD.
# If neither is 1, pattern matching is supported, but without metacharacters.
REGCMP = 1
RECOMP = 0
# LIBS is the list of libraries needed.
LIBS = -lcurses -ltermlib
# INSTALL_LESS is a list of the public versions of less.
# INSTALL_MAN is a list of the public versions of the manual page.
INSTALL_LESS = /usr/lbin/less
INSTALL_MAN = /usr/man/manl/less.l
# OPTIM is passed to the compiler and the loader.
# It is normally "-O" but may be, for example, "-g".
OPTIM = -O
##########################################################################
DEFS = "-DTERMIO=$(TERMIO)" \
"-Doff_t=$(off_t)" \
"-DREGCMP=$(REGCMP)" "-DRECOMP=$(RECOMP)"\
"-DXENIX=$(XENIX)"
CFLAGS = $(OPTIM) $(DEFS)
##########################################################################
SRC = main.c prim.c ch.c position.c input.c output.c screen.c \
line.c signal.c help.c ttyin.c command.c version.c
OBJ = main.o prim.o ch.o position.o input.o output.o screen.o \
line.o signal.o help.o ttyin.o command.o version.o
##########################################################################
all: less
less: $(OBJ)
cc $(OPTIM) -o less $(OBJ) $(LIBS)
install: install_man install_less
install_man: less.l
for f in $(INSTALL_MAN); do rm -f $$f; cp less.l $$f; done
touch install_man
install_less: less
for f in $(INSTALL_LESS); do rm -f $$f; cp less $$f; done
touch install_less
$(OBJ): less.h funcs.h
lint:
lint -h $(DEFS) $(SRC)
newfuncs:
mv funcs.h funcs.h.OLD
awk -f mkfuncs.awk $(SRC) >funcs.h
clean:
rm -f $(OBJ) less
clobber:
rm -f *.o less install_less install_man
@//E*O*F makefile.xen//
chmod u=rw,g=r,o=r makefile.xen
exit 0
--
uucp: {vax135|ihnp4}!timeinc!wcom!frodo
ARPA: 1891 at NJIT-EIES.MAILNET@MIT-MULTICS.ARPA
"The opinions expressed herein are those of my computer, and not necessarily
those of myself, Warner Computer Systems, or any other computer or
company along the line. "
More information about the Comp.sources.unix
mailing list