less:基于 C 语言的文件查看工具项目

less

分支6Tags438
文件最后提交记录最后更新时间
修复小问题 1 个月前
lesstest: make remaketest use same env vars as original test. 6 个月前
Update Unicode tables. 1 年前
lesstest: Add README, extract and ltview to release. 2 年前
Update text of GPL. 4 年前
Clarify that README has more specific instructions than INSTALL. 5 年前
Update year in copyright messages. 1 年前
Delete emoji modifier characters from output. This is visually nicer than displaying them as hex codepoints as was done in c1e2880cecfcc5a10f39321df97dc9e8fac67ac6 and a69d8e4639dd8e7d27bf3d0eb5f98d98dd1fc662. The -U option can be used to get the hex codepoint display. LESSUTFCHARDEF can be used to set the modifiers to be composing rather than deleted, which is even better if the terminal supports the characters. However, this is not fully tested, since I have not found any terminal that fully supports all modifiers correctly. Related to #637. 9 个月前
Fix non-autoconf Makefiles. 2 年前
dos: fix djgpp build Only DJGPP build was tested, but these changes should help other dos build envs too. There were two issues: - undefined vt_enabled at win_flush() at output.c . - Write to read-only memory ("text") at WIN32textout() at screen.c . And, the DJGPP Makefile.dsg explicitly invokes command.com /c copy ... so try also cmd.exe and (*nix) cp, so that it can also cross-compile. Note that command.com is also used explicitly at the make targets clean, distclean, realclean, and it remains unmodified, so those will not work when cross compiling on Windows or *nix, but one can always clean the build manually. Also, Makefile.dsg doesn't generate funcs.h and help.c, so they should exist (e.g. a release tarball) or using e.g. Makefile.{aut|wng}. The build was surprisingly smooth, without even a single warning. Interestingly, after stripping, it's nearly twice as big compared to a windows 32 bit build (400k in DJGPP, about 200k windows binary). Tested in dosbox after (cross) compiling with DJGPP, and with the DJGPP DPMI loader CWSDPMI.EXE at the same dir, and, alternatively, with the DPMI loader embedded to create a standalone less.exe: EXE2COFF less.exe # creates "less" coff image. COPY /B CWSDSTUB.EXE+less less.exe # cat CWSDSTUB.EXE less >less.exe Colors/SGR (at the help page, and with -R) seem to work fine too. UTF-8 displays broken by default, which I guess is expected. Used DJGPP tools (gcc 12.2): https://github.com/andrewwutw/build-djgpp 2 年前
Fix non-autoconf Makefiles. 2 年前
Fix 169d87c4edd07fa1ba4a0fa6e90d2ac950cc26fe. The compiler's -U option doesn't work like that. 7 个月前
Fix non-autoconf Makefiles. 2 年前
Fix non-autoconf Makefiles. 2 年前
Fix non-autoconf Makefiles. 2 年前
Fix non-autoconf Makefiles. 2 年前
Fix non-autoconf Makefiles. 2 年前
Windows: mingw: Makefile.wng: allow native funcs.h, help.c We already have buildgen.c which can be used to generate funcs.h and help.c without grep/sed/perl/sh/etc, which can be useful in mingw setups on Windows which don't bring the whole posix arsenal with them. The default is still the posix tools, but now adding WINGEN=1 will use buildgen.c instead of the posix tools. The compiler which is used with buildgen.c is the same compiler used at the rest of Makefile.wng, so it should be native (not cross build). 2 年前
windows: msvc: Makefile.wnm: allow generating funcs.h, help.c Previously the mscv Makefile.wnm didn't have rules to generate funcs.h and help.c, meaning that it could only be used to build release tarballs (which already have these files), but not git snapshots. Now we have a new independent rule "generated" (not part of "all"), which generates them. Because typical msvc setups do't have the tools which are used elsewhere to generate these files, this commit adds buildgen.c which, when compiled, can be used instead. It's not part of "all" because when cross compiling, e.g. an arm binary on Windows 64, buildgen.exe should be native and not arm, so this allows making "generated" with a native toolchain, and then "all" using the arm toolchain. 2 年前
Add ESC-f command. Like ESC-F but on finding a search match, just rings the terminal bell but does not exit F mode. Related to #680. 6 个月前
Update README INSTALLATION section (#218) As per #139 [1], there was a missing target for the installation steps, which made it fail to install. This commit fixes that. [1] - https://github.com/gwsw/less/issues/139#issuecomment-832064664 Signed-off-by: Isabella Basso <isabbasso@riseup.net>4 年前
Add SECURITY.md. 4 年前
Update year in copyright messages. 1 年前
修复小问题 1 个月前
windows: msvc: Makefile.wnm: allow generating funcs.h, help.c Previously the mscv Makefile.wnm didn't have rules to generate funcs.h and help.c, meaning that it could only be used to build release tarballs (which already have these files), but not git snapshots. Now we have a new independent rule "generated" (not part of "all"), which generates them. Because typical msvc setups do't have the tools which are used elsewhere to generate these files, this commit adds buildgen.c which, when compiled, can be used instead. It's not part of "all" because when cross compiling, e.g. an arm binary on Windows 64, buildgen.exe should be native and not arm, so this allows making "generated" with a native toolchain, and then "all" using the arm toolchain. 2 年前
Declare ignore_eoi as lbool rather than int. 6 个月前
Delete emoji modifier characters from output. This is visually nicer than displaying them as hex codepoints as was done in c1e2880cecfcc5a10f39321df97dc9e8fac67ac6 and a69d8e4639dd8e7d27bf3d0eb5f98d98dd1fc662. The -U option can be used to get the hex codepoint display. LESSUTFCHARDEF can be used to set the modifiers to be composing rather than deleted, which is even better if the terminal supports the characters. However, this is not fully tested, since I have not found any terminal that fully supports all modifiers correctly. Related to #637. 9 个月前
Update year in copyright messages. 1 年前
Add ESC-f command. Like ESC-F but on finding a search match, just rings the terminal bell but does not exit F mode. Related to #680. 6 个月前
Add --autosave option. Related to #678. 6 个月前
Add ESC-f command. Like ESC-F but on finding a search match, just rings the terminal bell but does not exit F mode. Related to #680. 6 个月前
More Unicode chars to treat as binary. 9 个月前
修复小问题 1 个月前
Initial work to support terminfo. Less itself seems to be mostly working, but lesstest does not work. 8 个月前
Update copyright date. 5 年前
Update year in copyright messages. 1 年前
Add ESC-f command. Like ESC-F but on finding a search match, just rings the terminal bell but does not exit F mode. Related to #680. 6 个月前
Increase size of line number pool from 200 to 1024. 1 年前
Increase size of line number pool from 200 to 1024. 1 年前
Increase size of line number pool from 200 to 1024. 1 年前
Increase size of line number pool from 200 to 1024. 1 年前
Change some function calls that pass 0 and 1 as lbools to be FALSE and TRUE. 7 个月前
Update year in copyright messages. 1 年前
Fix problem if shell_coption() ever returns a string longer than 2. 7 个月前
Treat U+00AD and U+200D as binary characters. Treat U+00AD (SOFT HYPHEN) and U+200D (ZERO WIDTH JOINER) as binary characters, so that we never send them to the terminal. Terminals do not display these characters consistently, so the screen content cannot be known after printing them. Related to #637. 9 个月前
Declare ignore_eoi as lbool rather than int. 6 个月前
修复小问题 1 个月前
Update year in copyright messages. 1 年前
Declare ignore_eoi as lbool rather than int. 6 个月前
Fixed file modes (#98) * Clean-up nroff again * Clean-up nroff again * Clean-up nroff again * Fixed file modes5 年前
Fix problem with --form-feed. With --form-feed enabled, there are certain circumstances where we still shouldn't stop scrolling at a form feed, such as when repainting the whole screen. Related to #672. 6 个月前
Update year in copyright messages. 1 年前
Doc. 9 个月前
Add ESC-f command. Like ESC-F but on finding a search match, just rings the terminal bell but does not exit F mode. Related to #680. 6 个月前
Add ESC-f command. Like ESC-F but on finding a search match, just rings the terminal bell but does not exit F mode. Related to #680. 6 个月前
Update year in copyright messages. 1 年前
Revise lessecho(1) synopsis. * lessecho.nro.VER: Document lessecho --version. Set as a hanging paragraph (HP) so that on terminals with a narrow line length--such as Solaris 10, DWB 3.3, and Plan 9 troffs' default of 65n--lines that break are indented. Synopsize the only option that doesn't take an option, -a, first, as is conventional. Set option literals in bold. Set synopsis metacharacters (brackets and ellipses) in roman. Set ellipsis more pleasantly on typesetters. See groff_man_style(7). 7 个月前
Update year in copyright messages. 1 年前
Update year in copyright messages. 1 年前
man pages: Fix unescaped hyphens. groff_man_style(7): Several special characters are also widely portable. Except for \-, \[em], and \[ga], AT&T troff did not consistently define the characters listed below, but its descendants, like DWB, Plan 9, or Solaris 10 troff, can be made to support them by defining them in font description files, making them aliases of existing glyphs if necessary; see groff_font(5). groff’s extended notation for special characters, \[xx], is also supported by mandoc(1), Heirloom Doctools troff, and neatroff, but not DWB, Plan 9, or Solaris 10 troffs. \- Minus sign. \- produces the basic Latin hyphen‐minus (U+002D) specifying Unix command‐line options and frequently used in file names. “-” is a hyphen in roff; some output devices format it as U+2010 (hyphen). With groff man(7), because \- is not a hyphenation break point, this change also prevents less's long option names from breaking across lines, which makes copy-and-paste from the man page more convenient. Before and after ---------------- --- less-unescaped-hyphens-fix-1.txt 2025-10-20 18:31:09.349221082 -0500 +++ less-unescaped-hyphens-fix-2.txt 2025-10-20 18:35:55.888070305 -0500 @@ -141 +141 @@ - --exit‐follow‐on‐close option is in effect, less will automati‐ + --exit-follow-on-close option is in effect, less will automati‐ @@ -216 +216 @@ - to switch between input files. The --save‐marks option causes + to switch between input files. The --save-marks option causes @@ -560 +560 @@ - ride LESS_OSC8_file, you must set LESS_OSC8_file to "‐" to indi‐ + ride LESS_OSC8_file, you must set LESS_OSC8_file to "-" to indi‐ @@ -595,2 +595,2 @@ - option names are in uppercase, such as --QUIT‐AT‐EOF, as distinct from - --quit‐at‐eof. Such option names need only have their first letter + option names are in uppercase, such as --QUIT-AT-EOF, as distinct from + --quit-at-eof. Such option names need only have their first letter @@ -598 +598 @@ - ample, --Quit‐at‐eof is equivalent to --QUIT‐AT‐EOF. + ample, --Quit-at-eof is equivalent to --QUIT-AT-EOF. @@ -625 +625 @@ - If the --use‐backslash option appears earlier in the options, then a + If the --use-backslash option appears earlier in the options, then a @@ -627 +627 @@ - by preceding it with a backslash. If the --use‐backslash option is not + by preceding it with a backslash. If the --use-backslash option is not @@ -637 +637 @@ - -a or --search‐skip‐screen + -a or --search-skip-screen @@ -647 +647 @@ - -A or --SEARCH‐SKIP‐SCREEN + -A or --SEARCH-SKIP-SCREEN @@ -666 +666 @@ - -B or --auto‐buffers + -B or --auto-buffers @@ -678 +678 @@ - -c or --clear‐screen + -c or --clear-screen @@ -683 +683 @@ - -C or --CLEAR‐SCREEN + -C or --CLEAR-SCREEN @@ -718 +718 @@ - 1‐5 The text in a search result which matches the first + 1-5 The text in a search result which matches the first @@ -777 +777 @@ - acter is a "‐" or is omitted, the corresponding color is set to + acter is a "-" or is omitted, the corresponding color is set to @@ -785 +785 @@ - #SGR). If either integer is a "‐" or is omitted, the corre‐ + #SGR). If either integer is a "-" or is omitted, the corre‐ @@ -839 +839 @@ - -e or --quit‐at‐eof + -e or --quit-at-eof @@ -844 +844 @@ - -E or --QUIT‐AT‐EOF + -E or --QUIT-AT-EOF @@ -855 +855 @@ - -F or --quit‐if‐one‐screen + -F or --quit-if-one-screen @@ -860 +860 @@ - -g or --hilite‐search + -g or --hilite-search @@ -867 +867 @@ - -G or --HILITE‐SEARCH + -G or --HILITE-SEARCH @@ -871 +871 @@ - -hn or --max‐back‐scroll=n + -hn or --max-back-scroll=n @@ -877 +877 @@ - -i or --ignore‐case + -i or --ignore-case @@ -884 +884 @@ - -I or --IGNORE‐CASE + -I or --IGNORE-CASE @@ -888 +888 @@ - -jn or --jump‐target=n + -jn or --jump-target=n @@ -915 +915 @@ - -J or --status‐column + -J or --status-column @@ -937 +937 @@ - -kfilename or --lesskey‐file=filename + -kfilename or --lesskey-file=filename @@ -943 +943 @@ - "--lesskey‐content" below. + "--lesskey-content" below. @@ -945 +945 @@ - --lesskey‐src=filename + --lesskey-src=filename @@ -954 +954 @@ - file exists. Note the warning under "--lesskey‐content" below. + file exists. Note the warning under "--lesskey-content" below. @@ -956 +956 @@ - --lesskey‐content=text + --lesskey-content=text @@ -966 +966 @@ - --lesskey‐src or --lesskey‐content). When using a lesskey file + --lesskey-src or --lesskey-content). When using a lesskey file @@ -972 +972 @@ - -K or --quit‐on‐intr + -K or --quit-on-intr @@ -979 +979 @@ - -L or --no‐lessopen + -L or --no-lessopen @@ -985 +985 @@ - -m or --long‐prompt + -m or --long-prompt @@ -989 +989 @@ - -M or --LONG‐PROMPT + -M or --LONG-PROMPT @@ -992 +992 @@ - -n or --line‐numbers + -n or --line-numbers @@ -1000 +1000 @@ - -N or --LINE‐NUMBERS + -N or --LINE-NUMBERS @@ -1004 +1004 @@ - -ofilename or --log‐file=filename + -ofilename or --log-file=filename @@ -1010 +1010 @@ - -Ofilename or --LOG‐FILE=filename + -Ofilename or --LOG-FILE=filename @@ -1061 +1061 @@ - -r or --raw‐control‐chars + -r or --raw-control-chars @@ -1078 +1078 @@ - -R or --RAW‐CONTROL‐CHARS + -R or --RAW-CONTROL-CHARS @@ -1121 +1121 @@ - -s or --squeeze‐blank‐lines + -s or --squeeze-blank-lines @@ -1125 +1125 @@ - -S or --chop‐long‐lines + -S or --chop-long-lines @@ -1147 +1147 @@ - -Ttagsfile or --tag‐file=tagsfile + -Ttagsfile or --tag-file=tagsfile @@ -1150 +1150 @@ - -u or --underline‐special + -u or --underline-special @@ -1155 +1155 @@ - -U or --UNDERLINE‐SPECIAL + -U or --UNDERLINE-SPECIAL @@ -1174 +1174 @@ - See also the --proc‐backspace, --proc‐tab, and --proc‐return op‐ + See also the --proc-backspace, --proc-tab, and --proc-return op‐ @@ -1180 +1180 @@ - -w or --hilite‐unread + -w or --hilite-unread @@ -1186 +1186 @@ - ment. If the --status‐line option is in effect, the entire line + ment. If the --status-line option is in effect, the entire line @@ -1191 +1191 @@ - -W or --HILITE‐UNREAD + -W or --HILITE-UNREAD @@ -1200 +1200 @@ - "‐x9,17" will set tabs at positions 9, 17, 25, 33, etc. The de‐ + "-x9,17" will set tabs at positions 9, 17, 25, 33, etc. The de‐ @@ -1203 +1203 @@ - -X or --no‐init + -X or --no-init @@ -1209 +1209 @@ - -yn or --max‐forw‐scroll=n + -yn or --max-forw-scroll=n @@ -1263 +1263 @@ - --exit‐follow‐on‐close + --exit-follow-on-close @@ -1268,2 +1268,2 @@ - --file‐size - If --file‐size is specified, less will determine the size of the + --file-size + If --file-size is specified, less will determine the size of the @@ -1275 +1275 @@ - --follow‐name + --follow-name @@ -1278 +1278 @@ - inal file despite its name change. If --follow‐name is speci‐ + inal file despite its name change. If --follow-name is speci‐ @@ -1285 +1285 @@ - --form‐feed + --form-feed @@ -1330 +1330 @@ - --line‐num‐width=n + --line-num-width=n @@ -1334 +1334 @@ - --match‐shift=n + --match-shift=n @@ -1380 +1380 @@ - --wheel‐lines option. Mouse input works only on terminals which + --wheel-lines option. Mouse input works only on terminals which @@ -1387 +1387 @@ - --no‐edit‐warn + --no-edit-warn @@ -1392 +1392 @@ - --no‐keypad + --no-keypad @@ -1397 +1397 @@ - --no‐histdups + --no-histdups @@ -1405 +1405 @@ - --no‐number‐headers + --no-number-headers @@ -1410 +1410 @@ - --no‐paste + --no-paste @@ -1418 +1418 @@ - --no‐search‐header‐lines + --no-search-header-lines @@ -1422 +1422 @@ - --no‐search‐header‐columns + --no-search-header-columns @@ -1426 +1426 @@ - --no‐search‐headers + --no-search-headers @@ -1429 +1429 @@ - --no‐vbell + --no-vbell @@ -1432 +1432 @@ - --proc‐backspace + --proc-backspace @@ -1442 +1442 @@ - --PROC‐BACKSPACE + --PROC-BACKSPACE @@ -1446 +1446 @@ - --proc‐return + --proc-return @@ -1454 +1454 @@ - --PROC‐RETURN + --PROC-RETURN @@ -1458 +1458 @@ - --proc‐tab + --proc-tab @@ -1465 +1465 @@ - --PROC‐TAB + --PROC-TAB @@ -1469 +1469 @@ - --redraw‐on‐quit + --redraw-on-quit @@ -1482 +1482 @@ - --save‐marks + --save-marks @@ -1486 +1486 @@ - --search‐options=... + --search-options=... @@ -1490,6 +1490,6 @@ - ginning of every search pattern. For example, setting --search‐ - options=W is the same as typing ^W at the beginning of every - pattern. The value may also contain a digit between 1 and 5, - which has the same effect as typing ^S followed by that digit at - the beginning of every search pattern. The value "‐" disables - all default search modifiers. + ginning of every search pattern. For example, setting + --search-options=W is the same as typing ^W at the beginning of + every pattern. The value may also contain a digit between 1 and + 5, which has the same effect as typing ^S followed by that digit + at the beginning of every search pattern. The value "-" dis‐ + ables all default search modifiers. @@ -1497 +1497 @@ - --show‐preproc‐errors + --show-preproc-errors @@ -1501 +1501 @@ - --status‐col‐width=n + --status-col-width=n @@ -1505 +1505 @@ - --status‐line + --status-line @@ -1511 +1511 @@ - --use‐backslash + --use-backslash @@ -1513 +1513 @@ - this one. After the --use‐backslash option, any backslash in an + this one. After the --use-backslash option, any backslash in an @@ -1525 +1525 @@ - --wheel‐lines=n + --wheel-lines=n @@ -1835 +1835 @@ - IBM‐1047 + IBM-1047 @@ -1838 +1838 @@ - by setting either LESSCHARSET=IBM‐1047 or LC_CTYPE=en_US in your + by setting either LESSCHARSET=IBM-1047 or LC_CTYPE=en_US in your @@ -1841 +1841 @@ - koi8‐r Selects a Russian character set. + koi8-r Selects a Russian character set. @@ -1845 +1845 @@ - utf‐8 Selects the UTF‐8 encoding of the ISO 10646 character set. + utf-8 Selects the UTF‐8 encoding of the ISO 10646 character set. @@ -1873 +1873 @@ - IBM‐1047 4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc + IBM-1047 4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc @@ -1876 +1876 @@ - koi8‐r 8bcccbcc18b95.b128. + koi8-r 8bcccbcc18b95.b128. @@ -1881,2 +1881,2 @@ - "UTF‐8", "UTF8", "utf‐8" or "utf8" is found in the LC_ALL, LC_CTYPE or - LANG environment variables, then the default character set is utf‐8. + "UTF-8", "UTF8", "utf-8" or "utf8" is found in the LC_ALL, LC_CTYPE or + LANG environment variables, then the default character set is utf-8. @@ -1890 +1890 @@ - character set is utf‐8. + character set is utf-8. @@ -1909 +1909 @@ - When the character set is utf‐8, the LESSUTFBINFMT environment variable + When the character set is utf-8, the LESSUTFBINFMT environment variable @@ -1921 +1921 @@ - When the character set is utf‐8, in rare cases it may be desirable to + When the character set is utf-8, in rare cases it may be desirable to @@ -2157 +2157 @@ - lesskey use of lesskey files (‐k and --lesskey‐src) + lesskey use of lesskey files (-k and --lesskey-src) @@ -2171 +2171 @@ - tags use of tags files (‐t) + tags use of tags files (-t) @@ -2319,2 +2319,2 @@ - The value is parsed as if it were the parameter of a --lesskey‐ - content option. + The value is parsed as if it were the parameter of a + --lesskey-content option. @@ -2419 +2419 @@ - paste. This is used when the --no‐paste option is in effect. + paste. This is used when the --no-paste option is in effect. @@ -2669 +2669 @@ - \kp‐ ‐ on the numeric keypad + \kp- - on the numeric keypad @@ -2816 +2816 @@ - \kp‐ noaction ‐ + \kp- noaction - @@ -2917 +2917 @@ - \kp‐ noaction ‐ + \kp- noaction - 7 个月前
Make lesskey support keypad keys. 8 个月前
build: Make mingw build work properly from autotools This change makes a mingw build work from the standard autotools ./configure workflow. There are two mostly independent changes: 1. Change the mingw detection preprocessor macro to the standard __MINGW32__ which is defined by the compiler (rather than expecting MINGW to be set by the defines header). 2. In the autotools-emitted defines.h make the values of MSDOS_COMPILER and PATHNAME_SEP appropriately automatically. I understand that there already is a spearate Makefile for mingw. However, it would be convenient to make the autotools version just work as well. In paprticular, I'm working on packaging less for https://github.com/JuliaPackaging/Yggdrasil. The system sets various defaults when it detects an autotools build. Of course, it would be possible to manually apply these for a mingw build, but it would be easier if the autotools build just worked. 10 个月前
Rename ignaw to defer_wrap. xn can officially mean two things, and there's no way to tell whether the terminal behaves like one or the other: The first interpretation, by almost all terminals, including VT100, means the cursor stays at the last column after printing one printable char at the last column, and only wraps to the next line (and possibly scrolls) when an additional printable char is printed (e.g. printing a printable char to the last column and then printing SGR sequences doesn't wrap). The second interpretation (no terminal which I know of behaves like this), means "if newline is printed right after it wrapped (and possibly scrolled), then ignore this newline". Less uses the first interpretation, so rename the variable to something more consistent with that interpretation. 6 个月前
Increase size of line number pool from 200 to 1024. 1 年前
Fix problem if shell_coption() ever returns a string longer than 2. 7 个月前
Change behavior of HOME & END, and implement shift and ctrl versions. Previous HOME was like g (go to beginning of file) and END was like G (go to end of file). Change HOME to be like ESC-{ (go to beginning of line) and change END to be like ESC-} (go to end of line). This is more consistent with other applications. Also implement ctl-HOME and shift-HOME to be like g-ESC-{ (go to beginning of file and beginning of line) and implement ctl-END and shift-END to be like G-ESC-} (go to end of file and end of line). The ctl- versions depend on the terminfo entry for the terminal containing the nonstandard kHOM5 and kEND5 caps. Related to #658. 7 个月前
Add --autosave option. Related to #678. 6 个月前
Allow SOURCE_DATE_EPOCH to override timestamps in generated files. Related to #567. 1 年前
Use SOURCE_DATE_EPOCH to build man pages. Expand c02f7554a1e5685e4332fb6857e95761953c8db4 to use the SOURCE_DATE_EPOCH environment variable to create the timestamps in the .nro man page files. Also change mkhelp.py to use SOURCE_DATE_EPOCH like mkhelp.pl. Related to #583. 1 年前
windows: mingw: Makefile.wng: use mkhelp.sh if perl is missing On Windows perl can be installed, but it's a non-trivial dependency. If perl is missing to process less.hlp, then try also the newly added mkhelp.sh script (which uses od and awk in standard POSIX syntax). The makefile already assumes grep and sed (for funcs.h), and it's highly likely that sh, od, and awk are available as well. The minimum requirements are now a mingw compiler, gnu make, sh or cmd.exe, and gnu coreutils or busybox[-w32] - on *nix or Windows. 2 年前
Reconstruct version 394. Versions between 382 and 394 are lost. 19 年前
Delete emoji modifier characters from output. This is visually nicer than displaying them as hex codepoints as was done in c1e2880cecfcc5a10f39321df97dc9e8fac67ac6 and a69d8e4639dd8e7d27bf3d0eb5f98d98dd1fc662. The -U option can be used to get the hex codepoint display. LESSUTFCHARDEF can be used to set the modifiers to be composing rather than deleted, which is even better if the terminal supports the characters. However, this is not fully tested, since I have not found any terminal that fully supports all modifiers correctly. Related to #637. 9 个月前
Delete emoji modifier characters from output. This is visually nicer than displaying them as hex codepoints as was done in c1e2880cecfcc5a10f39321df97dc9e8fac67ac6 and a69d8e4639dd8e7d27bf3d0eb5f98d98dd1fc662. The -U option can be used to get the hex codepoint display. LESSUTFCHARDEF can be used to set the modifiers to be composing rather than deleted, which is even better if the terminal supports the characters. However, this is not fully tested, since I have not found any terminal that fully supports all modifiers correctly. Related to #637. 9 个月前
Add --autosave option. Related to #678. 6 个月前
An O_STRING option always has an ofunc handler, but let's be safe. 6 个月前
Update year in copyright messages. 1 年前
Add --autosave option. Related to #678. 6 个月前
Declare ignore_eoi as lbool rather than int. 6 个月前
Remove unused variable at_prompt. 7 个月前
Fix hang with ^S modifier if search matches empty string. b71a5788d added a loop in match_pattern that iterates through matches in a line looking for one that also satisfies any SUBSEARCH requirement in effect (via the ^S modifier). It starts each search at the end of the string matched by the previous search. But if a search matches an empty string, this will get stuck in the loop, continually searching from the same point. Related to #634. 10 个月前
Update year in copyright messages. 1 年前
Reassign some PCK_ values. 7 个月前
Don't allow sindex_from_sline to return sc_height. sindex_from_sline returns an sindex clipped to the screen size. However it should limit the result to sc_height-1, not sc_height, since the bottom line is for the prompt and not file content. Related to #681. 6 个月前
Update year in copyright messages. 1 年前
Update year in copyright messages. 1 年前
Fixed typo2 年前
Fix const errors in local regexp.c. 2 年前
Fix const errors in local regexp.c. 2 年前
Clarify comment. 6 个月前
Update year in copyright messages. 1 年前
Fix ESC-u command. The ESC-u command should not clear the compiled search string, it should just hide or unhide the hilites. This has been broken for a while. 6 个月前
Make SIGHUP do an orderly exit like SIGTERM. 6 个月前
Improve error handling for numeric command line options. Some numeric command line options would erroneously accept a negative value even though less would misbehave when using such a value. This improves error handling so that passing a negative value to an option that does not accept it will produce an error message. Related to #675. 6 个月前
Update year in copyright messages. 1 年前
Delete emoji modifier characters from output. This is visually nicer than displaying them as hex codepoints as was done in c1e2880cecfcc5a10f39321df97dc9e8fac67ac6 and a69d8e4639dd8e7d27bf3d0eb5f98d98dd1fc662. The -U option can be used to get the hex codepoint display. LESSUTFCHARDEF can be used to set the modifiers to be composing rather than deleted, which is even better if the terminal supports the characters. However, this is not fully tested, since I have not found any terminal that fully supports all modifiers correctly. Related to #637. 9 个月前
Add ESC-f command. Like ESC-F but on finding a search match, just rings the terminal bell but does not exit F mode. Related to #680. 6 个月前
Make some emoji modifier chars be treated as binary. Related to 023bc6404b41ccb77f74d7a267edce1b0a6b2dfe, some more chars have been found to be printed differently on different terminals. So treat them as binary. 9 个月前
Make src parameter to xbuf_set be constant. 8 个月前
Use size_t where appropriate. gcc -Wconversion warning output is reduced from 975 lines to 679 lines. 2 年前
This is the source code distribution of "less".
This program is part of the GNU project (https://www.gnu.org).

This program is free software.  You may redistribute it and/or
modify it under the terms of either:

1. The GNU General Public License, as published by the Free
   Software Foundation; either version 3, or (at your option) any
   later version.  A copy of this license is in the file COPYING.
or
2. The Less License, in the file LICENSE.

Please report any problems at https://github.com/gwsw/less/issues.
See https://greenwoodsoftware.com/less for the latest info.
Source repository is at https://github.com/gwsw/less.git.

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

You should build from a clone of a git repository ONLY IF you are doing development on the less source itself. If you are merely using less as a tool, you should download a release from https://greenwoodsoftware.com and NOT from github.

The formatted manual page is in less.man. The manual page nroff source is in less.nro. Major changes made since the last posted version are in NEWS.

======================================================================= INSTALLATION (Unix & Linux systems only):

  1. Move the distributed source to its own directory and unpack it, if you have not already done so.

  2. If you are building from a clone of a git repository, type "make -f Makefile.aut distfiles". If you are building from a numbered release package (a tar or zip file with a name like less-999.tar.gz or less-999.zip downloaded from greenwoodsoftware.com, not from github), you should skip this step.

  3. Type "sh configure". This will generate a Makefile and a defines.h. Warning: if you have a GNU sed, make sure it is version 2.05 or later.

    The file INSTALL describes the usage of the configure program in general. In addition, these options to configure are supported:

    --with-editor=program Specifies the default editor program used by the "v" command. The default is "vi".

    --with-regex=lib Specifies the regular expression library used by less for pattern matching. The default is "auto", which means the configure program finds a regular expression library automatically. Other values are: gnu Use the GNU regex library. pcre Use the PCRE library. pcre2 Use the PCRE2 library. posix Use the POSIX-compatible regcomp. regcmp Use the regcmp library. re_comp Use the re_comp library. regcomp Use the V8-compatible regcomp. regcomp-local Use Henry Spencer's V8-compatible regcomp (source is supplied with less). none No regular expressions, only simple string matching.

    --with-secure Builds a "secure" version of less, with some features disabled to prevent users from viewing other files, accessing shell commands, etc.

  4. 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. 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 choose not to include some features in your version, you may wish to edit the manual page "less.nro" and the help page "less.hlp" to remove the descriptions of the features which you are removing. If you edit less.hlp, you should run "make -f Makefile.aut help.c".

  5. Type "make" and watch the fun.

  6. If the make succeeds, it will generate the programs "less", "lesskey" and "lessecho" in your current directory. Test the generated programs.

  7. When satisfied that it works, if you wish to install it in a public place, type "make install".

    The default install destinations are: Executables (less, lesskey, lessecho) in /usr/local/bin Documentation (less.nro, lesskey.nro) in /usr/local/man/man1 If you want to install any of these files elsewhere, define bindir and/or mandir to the appropriate directories.

Note to hackers: comments noting possible improvements are enclosed in double curly brackets {{ like this }}.

(Note that the above note was originally written at a time when "hackers" most commonly meant "enthusiastic and dedicated computer programmers", not "persons who attempt to circumvent computer security".)

======================================================================= INSTALLATION (MS-DOS systems only, with Microsoft C, Borland C, or DJGPP)

  1. Move the distributed source to its own directory. Depending on your compiler, you may need to convert the source to have CR-LF rather than LF as line terminators.

  2. If you are using Microsoft C, rename MAKEFILE.DSU to MAKEFILE. If you are using Borland C, rename MAKEFILE.DSB to MAKEFILE. If you are using DJGPP, rename MAKEFILE.DSG to MAKEFILE.

  3. Look at MAKEFILE to make sure that the definitions for CC and LIBDIR are correct. CC should be the name of your C compiler and LIBDIR should be the directory where the C libraries reside (for Microsoft C only). If these definitions need to be changed, you can either modify the definitions directly in MAKEFILE, or set your environment variables CC and/or LIBDIR to override the definitions in MAKEFILE.

  4. If you wish, you may edit DEFINES.DS to remove some optional features. If you choose not to include some features in your version, you may wish to edit the manual page LESS.MAN and the help page HELP.C to remove the descriptions of the features which you are removing.

  5. Run your "make" program and watch the fun. If your "make" requires a flag to import environment variables, you should use that flag. If your compiler runs out of memory, try running "make -n >cmds.bat" and then run cmds.bat.

  6. If the make succeeds, it will generate the programs "LESS.EXE" and "LESSKEY.EXE" in your current directory. Test the generated programs.

  7. When satisfied that it works, you may wish to install LESS.EXE and LESSKEY.EXE in a directory which is included in your PATH.

======================================================================= INSTALLATION (Windows-95, Windows-98 and Windows-NT systems only, with Borland C or Microsoft Visual C++)

  1. Move the distributed source to its own directory.

  2. If you are using Borland C, rename Makefile.wnb to Makefile. If you are using Microsoft Visual C++, rename Makefile.wnm to Makefile.

  3. Check the Makefile to make sure the definitions look ok.

  4. If you wish, you may edit defines.wn to remove some optional features. If you choose not to include some features in your version, you may wish to edit the manual page less.man and the help page help.c to remove the descriptions of the features which you are removing.

  5. Type "make" and watch the fun.

  6. If the make succeeds, it will generate the programs "less.exe" and "lesskey.exe" in your current directory. Test the generated programs.

  7. When satisfied that it works, if you wish to install it in a public place, type "make install". See step 6 of the Unix installation instructions for details on how to change the default installation directories.

======================================================================= INSTALLATION (OS/2 systems only, with EMX C)

  1. Move the distributed source to its own directory.

  2. Rename Makefile.o2e to Makefile.

  3. Check the Makefile to make sure the definitions look ok.

  4. If you wish, you may edit defines.o2 to remove some optional features. If you choose not to include some features in your version, you may wish to edit the manual page less.man and the help page help.c to remove the descriptions of the features which you are removing.

  5. Type "make" and watch the fun.

  6. If the make succeeds, it will generate the programs "less.exe" and "lesskey.exe" in your current directory. Test the generated programs.

  7. Make sure you have the emx runtime installed. You need the emx DLLs emx.dll and emxlibcs.dll and also the termcap database, termcap.dat. Make sure you have termcap.dat either in the default location or somewhere in a directory listed in the PATH or INIT environment variables.

  8. When satisfied that it works, you may wish to install less.exe, lesskey.exe and scrsize.exe in a directory which is included in your PATH. scrsize.exe is required only if you use a terminal emulator such as xterm or rxvt.

======================================================================= INSTALLATION (OS-9 systems only, with Microware C or Ultra C)

  1. Move the distributed source to its own directory.

  2. If you are using Microware C, rename Makefile.o9c to Makefile. If you are using Ultra C, rename Makefile.o9u to Makefile.

  3. Check the Makefile to make sure the definitions look ok.

  4. If you wish, you may edit defines.o9 to remove some optional features. If you choose not to include some features in your version, you may wish to edit the manual page less.man and the help page help.c to remove the descriptions of the features which you are removing.

  5. Type "dmake" and watch the fun. The standard OS-9 "make" will probably not work. If you don't have dmake, you can get a copy from os9archive.rtsi.com.

  6. If the make succeeds, it will generate the programs "less" and "lesskey" in your current directory. Test the generated programs.

  7. When satisfied that it works, if you wish to install it in a public place, type "dmake install". See step 6 of the Unix installation instructions for details on how to change the default installation directories.

======================================================================= ACKNOWLEDGMENTS: Some versions of the less distribution are packaged using Info-ZIP's compression utility. Info-ZIP's software is free and can be obtained as source code or executables from various anonymous-ftp sites, including ftp.uu.net:/pub/archiving/zip.

下载使用量

0

项目总下载次数(含Clone、Pull、 zip 包及 release 下载),每日凌晨更新

语言类型

C45.03%
HTML32.79%
Ada8.12%
Roff7.64%
C++1.58%