README
1=======================================================================
2=== NOTE: THIS IS A DISTRIBUTION OF less (version 290) ===
3=== PLEASE REPORT ANY PROBLEMS TO THE AUTHOR AT markn@3do.com. ===
4=======================================================================
5
6This is the distribution of "less", a paginator similar to "more" or "pg".
7The formatted manual page is in less.man.
8The manual page nroff source is in less.nro.
9Major changes made since the last posted version are in NEWS.
10
11=======================================================================
12INSTALLATION (Unix systems only):
13
141. Move the distributed source to its own directory and
15 unpack it by running "sh" or "unshar" on the distribution
16 files, if you have not already done so.
17
182. Type "sh configure".
19 This will generate a Makefile and a defines.h.
20 Warning: if you have a GNU sed, make sure it is version 2.05 or later.
21
223. It is a good idea to look over the generated Makefile and defines.h
23 and make sure they look ok. If you know of any peculiarities of
24 your system that configure might not have detected, you may fix the
25 Makefile now.
26
27 If you wish, you may edit defines.h to remove some optional features.
28 If you wish to build a "secure" version of less (which disables all
29 features which might allow a user to do unintended things to the system
30 on which less is running), edit defines.h and define SECURE to 1.
31 If you choose not to include some features in your version, you may
32 wish to edit the manual page "less.nro" and the help page "less.hlp"
33 to remove the descriptions of the features which you are removing.
34
354. Type "make" and watch the fun.
36
37 If you want less to find the help file in a directory other than
38 the default (/usr/local/share), define "datadir" to that directory.
39 For example: "make datadir=/usr/local/helpfiles"
40
415. If the make succeeds, it will generate a program "less"
42 in your current directory. Test the generated program.
43
446. When satisfied that it works, if you wish to install it
45 in a public place, type "make install".
46
47 The default install destinations are:
48 Executables (less, lesskey) in /usr/local/bin
49 Data files (less.hlp) in /usr/local/share
50 Documentation (less.nro, lesskey.nro) in /usr/local/man/man1
51 If you want to install any of these files elsewhere, define
52 bindir, datadir, and/or mandir to the appropriate directories.
53 datadir must be defined the same as in step 4.
54
55If you have any problems building or running "less", suggestions,
56complaints, etc., you may mail to the author at markn@3do.com
57
58Note to hackers: comments noting possible improvements are enclosed
59in double curly brackets {{ like this }}.
60
61
62
63=======================================================================
64INSTALLATION (MS-DOS systems only)
65
661. Move the distributed source to its own directory.
67 Make sure the source has been converted to have CR-LF rather than
68 LF as line terminators.
69
702. Rename MAKEFILE.DOS to MAKEFILE.
71
723. Look at MAKEFILE to make sure that the definitions for CC and LIBDIR
73 are correct. CC should be the name of your Microsoft C compiler and
74 LIBDIR should be the directory where the Microsoft C libraries
75 reside. If these definitions need to be changed, you can either
76 modify the definitions directly in MAKEFILE, or set your environment
77 variables CC and/or LIBDIR to override the definitions in MAKEFILE.
78
794. If you wish, you may edit DEFINES.DOS to remove some optional features.
80 If you choose not to include some features in your version, you may
81 wish to edit the manual page LESS.MAN and the help page LESS.HLP
82 to remove the descriptions of the features which you are removing.
83
845. Type "make" and watch the fun.
85 You may need to invoke "make -e", if your "make" requires the -e
86 flag to import environment variables.
87 If your compiler runs out of memory, try running "make -n >cmds.bat"
88 and then run cmds.bat.
89
906. If the make succeeds, it will generate a program "LESS.EXE"
91 in your current directory. Test the generated program.
92
937. When satisfied that it works, you may wish to install LESS.EXE,
94 LESSKEY.EXE and LESS.HLP in a directory which is included in
95 your PATH.
96
97
98
99=======================================================================
100INSTALLATION (OS/2 systems only)
101
1021. Move the distributed source to its own directory.
103
1042. Rename Makefile.os2 to Makefile.
105
1063. Check the Makefile to make sure the definitions look ok.
107
1084. If you wish, you may edit defines.os2 to remove some optional features.
109 If you choose not to include some features in your version, you may
110 wish to edit the manual page less.man and the help page less.hlp
111 to remove the descriptions of the features which you are removing.
112
1135. Type "make" and watch the fun.
114
1156. If the make succeeds, it will generate a program "less.exe"
116 in your current directory. Test the generated program.
117
1187. Make sure you have the emx runtime installed. You need the emx DLLs
119 emx.dll and emxlibcs.dll and also the termcap database, termcap.dat.
120 Make sure you have termcap.dat either in the default location or
121 somewhere in a directory listed in the PATH or INIT environment
122 variables.
123
1248. When satisfied that it works, you may wish to install less.exe,
125 lesskey.exe and less.hlp in a directory which is included in
126 your PATH.
127
128
README.CLESS
1
2Introduction
3============
4This is a patched version of less-278. Following paragraph taken from less.man
5describes the function of less:
6
7 Less is a program similar to more (1), but which allows
8 backward movement in the file as well as forward movement.
9 Also, less does not have to read the entire input file
10 before starting, so with large input files it starts up fas-
11 ter than text editors like vi (1).
12
13The patches enable reading of Chinese characters. A macro, HANZI, is added to
14initiate the patches. Therefore if you wish to compile the original less-252
15you can follow the installation instructions in README and INSTALL, and ignore
16the rest of this file.
17
18Name of the target program (i.e. less) is unchanged. The default is to read
19BIG5 code or GB code. You can switch to reading of normal ASCII text by setting
20the environment LESSCHARSET to 'ascii' (under C-shell, the command is 'setenv
21LESSCHARSET ascii'). Included are the less.bg5 and less.gb help files in BIG5
22code and GB code respectively. You can use either one as the help file by
23setting the environment LESSHELP to the appropriate full path (e.g. 'setenv
24LESSHELP /usr/local/lib/less/less.bg5'). Please refer to less.man for the
25details. If you have written a better version of help file in Chinese, please
26send it to me (in uuencoded form). Note that the default directory where these
27help files will be installed is /usr/local/share.
28
29
30Installation
31============
32Here is a suggested installation procedure (commands to execute):
33
341. configure
35
362. Edit defines.h to indicate your preferences. Probably you will only need to
37 consider the SECURE, HAVE_LOCALE and PROMPTEND macro.
38
393. make CFLAGS="-O2 -DHANZI" LDFLAGS=-s
40 - or, if you wish to place the help file somewhere else -
41 make CFLAGS="-O2 -DHANZI" LDFLAGS=-s datadir=/usr/local/lib/less
42
434. make install
44 - or, if you wish to place the help file somewhere else -
45 make datadir=/usr/local/lib/less install
46
47In case -O2 does not work with your compiler, try -O in step 2.
48
49
50Acknowledgement
51===============
52Thanks to Jiong-Yuan Su and Hai-Qing Zhu who translated the less.hlp file and
53prepared less.bg5 and less.gb respectively for the earlier versions.
54
55--
56Paul W. Shew (paul@vlsi.cis.nctu.edu.tw)
57
58