Hello community, here is the log from the commit of package ugrep for openSUSE:Factory checked in at 2020-09-04 11:12:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ugrep (Old) and /work/SRC/openSUSE:Factory/.ugrep.new.3399 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ugrep" Fri Sep 4 11:12:22 2020 rev:8 rq:831660 version:2.5.5 Changes: -------- --- /work/SRC/openSUSE:Factory/ugrep/ugrep.changes 2020-08-20 22:33:47.256120479 +0200 +++ /work/SRC/openSUSE:Factory/.ugrep.new.3399/ugrep.changes 2020-09-04 11:13:02.755058895 +0200 @@ -1,0 +2,9 @@ +Thu Sep 3 11:44:21 UTC 2020 - Andreas Stieger <[email protected]> + +- ugrep 2.5.5: + * build improvements + * workaround missing lz4 macro + * updated Dockerfile + * updated tests + +------------------------------------------------------------------- Old: ---- ugrep-2.5.3.tar.gz New: ---- ugrep-2.5.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ugrep.spec ++++++ --- /var/tmp/diff_new_pack.O9JY3J/_old 2020-09-04 11:13:03.387059213 +0200 +++ /var/tmp/diff_new_pack.O9JY3J/_new 2020-09-04 11:13:03.391059215 +0200 @@ -17,7 +17,7 @@ Name: ugrep -Version: 2.5.3 +Version: 2.5.5 Release: 0 Summary: Universal grep: a feature-rich grep implementation with focus on speed License: BSD-3-Clause ++++++ ugrep-2.5.3.tar.gz -> ugrep-2.5.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/Dockerfile new/ugrep-2.5.5/Dockerfile --- old/ugrep-2.5.3/Dockerfile 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/Dockerfile 2020-09-02 16:35:50.000000000 +0200 @@ -19,10 +19,10 @@ wget \ unzip \ libpcre2-dev \ - libboost-all-dev \ libz-dev \ libbz2-dev \ - liblzma-dev + liblzma-dev \ + liblz4-dev RUN cd / &&\ git clone https://github.com/Genivia/ugrep diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/Makefile.in new/ugrep-2.5.5/Makefile.in --- old/ugrep-2.5.3/Makefile.in 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/Makefile.in 2020-09-02 16:35:50.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -174,8 +174,8 @@ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -637,6 +637,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -679,6 +683,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -864,7 +870,7 @@ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ + dist-zstd distcheck distclean distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-hook install-dvi \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/README.md new/ugrep-2.5.5/README.md --- old/ugrep-2.5.3/README.md 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/README.md 2020-09-02 16:35:50.000000000 +0200 @@ -197,6 +197,14 @@ You can use the standard NetBSD package installer (pkgsrc): <http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/textproc/ugrep/README.html> +### Haiku + + $ pkgman install cmd:ugrep + +Check <https://github.com/haikuports/haikuports/tree/master/app-text/ugrep> for +version info. To build and try `ugrep` locally, see "All platforms" build +steps further below. + ### All platforms: step 1 download Clone `ugrep` with @@ -300,7 +308,7 @@ $ autoreconf -fi $ ./build.sh -### For developers +### Dockerfile for developers A Dockerfile is included to build `ugrep` in a Ubuntu container. @@ -394,8 +402,9 @@ which was reported as an issue to the maintainers. [Hyperscan simple grep](https://github.com/intel/hyperscan/tree/master/examples) -returns a few more matches than other greps due to its "all matches reported" -pattern matching behavior. Option `-w` was emulated using the pattern +was compiled with all optimizations enabled. This grep tool returns a few more +matches than other greps due to its "all matches reported" pattern matching +behavior. Option `-w` was emulated using the pattern `\b(char|int|long|size_t|void)\b`. Option `-f` was emulated as follows: paste -d'|' -s words1+1000 > pattern.txt @@ -1857,7 +1866,8 @@ The begin of a pattern always matches the first character of an approximate match as a practical strategy to prevent many false "randomized" matches for short patterns. This also greatly improves search speed. Make the first -character optional to optionally match it, e.g. `p?attern`. +character optional to optionally match it, e.g. `p?attern` or use a dot as +the start of the pattern to match any wide character (but this is slow). Newlines (`\n`) and NUL (`\0`) characters are never deleted or substituted to ensure that fuzzy matches do not extend the pattern match beyond the number of @@ -1960,7 +1970,7 @@ - [`openssl`](https://wiki.openssl.org/index.php/Command_Line_Utilities) to convert certificates and key files to text and other formats - [`exiftool`](http://exiftool.sourceforge.net) to read meta information - embedded in images. + embedded in image and video media formats. Also decompressors may be used as filter utilities, such as `unzip`, `gunzip`, `bunzip2`, `unlzma`, and `unxz` that decompress files to standard output when @@ -3675,36 +3685,35 @@ each file processed. -P, --perl-regexp - Interpret PATTERN as a Perl regular expression. This option is - not available in this build configuration of ugrep. + Interpret PATTERN as a Perl regular expression using PCRE2. -p, --no-dereference - If -R or -r is specified, no symbolic links are followed, even + If -R or -r is specified, no symbolic links are followed, even when they are specified on the command line. --pager[=COMMAND] - When output is sent to the terminal, uses COMMAND to page - through the output. The default COMMAND is `less -R'. Enables + When output is sent to the terminal, uses COMMAND to page + through the output. The default COMMAND is `less -R'. Enables --heading and --line-buffered. --pretty - When output is sent to a terminal, enables --color, --heading, + When output is sent to a terminal, enables --color, --heading, -n, --sort and -T when not explicitly disabled or set. -Q[DELAY], --query[=DELAY] - Query mode: user interface to perform interactive searches. - This mode requires an ANSI capable terminal. An optional DELAY - argument may be specified to reduce or increase the response + Query mode: user interface to perform interactive searches. + This mode requires an ANSI capable terminal. An optional DELAY + argument may be specified to reduce or increase the response time to execute searches after the last key press, in increments - of 100ms, where the default is 5 (0.5s delay). No whitespace - may be given between -Q and its argument DELAY. Initial pat- - terns may be specified with -e PATTERN, i.e. a PATTERN argument + of 100ms, where the default is 5 (0.5s delay). No whitespace + may be given between -Q and its argument DELAY. Initial pat- + terns may be specified with -e PATTERN, i.e. a PATTERN argument requires option -e. Press F1 or CTRL-Z to view the help screen. Press F2 or CTRL-Y to invoke an editor to edit the file shown on - screen. The editor is taken from the environment variable - GREP_EDIT if defined, or EDITOR. Press Tab and Shift-Tab to - navigate directories and to select a file to search. Press - Enter to select lines to output. Press Alt-l for option -l to + screen. The editor is taken from the environment variable + GREP_EDIT if defined, or EDITOR. Press Tab and Shift-Tab to + navigate directories and to select a file to search. Press + Enter to select lines to output. Press Alt-l for option -l to list files, Alt-n for -n, etc. Enables --heading. -q, --quiet, --silent @@ -3712,23 +3721,23 @@ match has been found. -R, --dereference-recursive - Recursively read all files under each directory. Follow all - symbolic links, unlike -r. When -J1 is specified, files are + Recursively read all files under each directory. Follow all + symbolic links, unlike -r. When -J1 is specified, files are searched in the same order as specified. Note that when no FILE - arguments are specified and input is read from a terminal, + arguments are specified and input is read from a terminal, recursive searches are performed as if -R is specified. -r, --recursive - Recursively read all files under each directory, following sym- - bolic links only if they are on the command line. When -J1 is + Recursively read all files under each directory, following sym- + bolic links only if they are on the command line. When -J1 is specified, files are searched in the same order as specified. -S, --dereference - If -r is specified, all symbolic links are followed, like -R. + If -r is specified, all symbolic links are followed, like -R. The default is not to follow symbolic links. -s, --no-messages - Silent mode: nonexistent and unreadable files are ignored, i.e. + Silent mode: nonexistent and unreadable files are ignored, i.e. their error messages are suppressed. --save-config[=FILE] @@ -3736,53 +3745,53 @@ is a `-', write the configuration to standard output. --separator[=SEP] - Use SEP as field separator between file name, line number, col- + Use SEP as field separator between file name, line number, col- umn number, byte offset, and the matched line. The default is a colon (`:'). --sort[=KEY] - Displays matching files in the order specified by KEY in recur- + Displays matching files in the order specified by KEY in recur- sive searches. KEY can be `name' to sort by pathname (default), - `best' to sort by best match with option -Z (sort by best match - requires two passes over the input files), `size' to sort by + `best' to sort by best match with option -Z (sort by best match + requires two passes over the input files), `size' to sort by file size, `used' to sort by last access time, `changed' to sort - by last modification time, and `created' to sort by creation - time. Sorting is reversed with `rname', `rbest', `rsize', - `rused', `rchanged', or `rcreated'. Archive contents are not - sorted. Subdirectories are sorted and displayed after matching - files. FILE arguments are searched in the same order as speci- + by last modification time, and `created' to sort by creation + time. Sorting is reversed with `rname', `rbest', `rsize', + `rused', `rchanged', or `rcreated'. Archive contents are not + sorted. Subdirectories are sorted and displayed after matching + files. FILE arguments are searched in the same order as speci- fied. Normally ugrep displays matches in no particular order to improve performance. --stats - Display statistics on the number of files and directories + Display statistics on the number of files and directories searched, and the inclusion and exclusion constraints applied. -T, --initial-tab - Add a tab space to separate the file name, line number, column + Add a tab space to separate the file name, line number, column number, and byte offset with the matched line. -t TYPES, --file-type=TYPES - Search only files associated with TYPES, a comma-separated list - of file types. Each file type corresponds to a set of filename + Search only files associated with TYPES, a comma-separated list + of file types. Each file type corresponds to a set of filename extensions passed to option -O. For capitalized file types, the search is expanded to include files with matching file signature magic bytes, as if passed to option -M. When a type is preceded - by a `!' or a `^', excludes files of the specified type. This - option may be repeated. The possible file types can be (where - -tlist displays a detailed list): `actionscript', `ada', `asm', - `asp', `aspx', `autoconf', `automake', `awk', `Awk', `basic', + by a `!' or a `^', excludes files of the specified type. This + option may be repeated. The possible file types can be (where + -tlist displays a detailed list): `actionscript', `ada', `asm', + `asp', `aspx', `autoconf', `automake', `awk', `Awk', `basic', `batch', `bison', `c', `c++', `clojure', `csharp', `css', `csv', - `dart', `Dart', `delphi', `elisp', `elixir', `erlang', `for- - tran', `gif', `Gif', `go', `groovy', `gsp', `haskell', `html', - `jade', `java', `jpeg', `Jpeg', `js', `json', `jsp', `julia', - `kotlin', `less', `lex', `lisp', `lua', `m4', `make', `mark- - down', `matlab', `node', `Node', `objc', `objc++', `ocaml', - `parrot', `pascal', `pdf', `Pdf', `perl', `Perl', `php', `Php', - `png', `Png', `prolog', `python', `Python', `r', `rpm', `Rpm', - `rst', `rtf', `Rtf', `ruby', `Ruby', `rust', `scala', `scheme', - `shell', `Shell', `smalltalk', `sql', `svg', `swift', `tcl', - `tex', `text', `tiff', `Tiff', `tt', `typescript', `verilog', + `dart', `Dart', `delphi', `elisp', `elixir', `erlang', `for- + tran', `gif', `Gif', `go', `groovy', `gsp', `haskell', `html', + `jade', `java', `jpeg', `Jpeg', `js', `json', `jsp', `julia', + `kotlin', `less', `lex', `lisp', `lua', `m4', `make', `mark- + down', `matlab', `node', `Node', `objc', `objc++', `ocaml', + `parrot', `pascal', `pdf', `Pdf', `perl', `Perl', `php', `Php', + `png', `Png', `prolog', `python', `Python', `r', `rpm', `Rpm', + `rst', `rtf', `Rtf', `ruby', `Ruby', `rust', `scala', `scheme', + `shell', `Shell', `smalltalk', `sql', `svg', `swift', `tcl', + `tex', `text', `tiff', `Tiff', `tt', `typescript', `verilog', `vhdl', `vim', `xml', `Xml', `yacc', `yaml'. --tabs[=NUM] @@ -3790,17 +3799,17 @@ of NUM may be 1, 2, 4, or 8. The default tab size is 8. --tag[=TAG[,END]] - Disables colors to mark up matches with TAG. END marks the end + Disables colors to mark up matches with TAG. END marks the end of a match if specified, otherwise TAG. The default is `___'. -U, --binary Disables Unicode matching for binary file matching, forcing PAT- - TERN to match bytes, not Unicode characters. For example, -U - '\xa3' matches byte A3 (hex) instead of the Unicode code point + TERN to match bytes, not Unicode characters. For example, -U + '\xa3' matches byte A3 (hex) instead of the Unicode code point U+00A3 represented by the two-byte UTF-8 sequence C2 A3. -u, --ungroup - Do not group multiple pattern matches on the same matched line. + Do not group multiple pattern matches on the same matched line. Output the matched line again for each additional pattern match, using `+' as the field separator. @@ -3808,17 +3817,17 @@ Display version information and exit. -v, --invert-match - Selected lines are those not matching any of the specified pat- + Selected lines are those not matching any of the specified pat- terns. -W, --with-hex - Output binary matches in hexadecimal, leaving text matches + Output binary matches in hexadecimal, leaving text matches alone. This option is equivalent to the --binary-files=with-hex option. -w, --word-regexp - The PATTERN is searched for as a word (as if surrounded by \< - and \>). If a PATTERN is specified, or -e PATTERN or -N PAT- + The PATTERN is searched for as a word (as if surrounded by \< + and \>). If a PATTERN is specified, or -e PATTERN or -N PAT- TERN, then this option does not apply to -f FILE patterns. -X, --hex @@ -3826,67 +3835,67 @@ --binary-files=hex option. See also option --hexdump. -x, --line-regexp - Only input lines selected against the entire PATTERN is consid- - ered to be matching lines (as if surrounded by ^ and $). If a - PATTERN is specified, or -e PATTERN or -N PATTERN, then this + Only input lines selected against the entire PATTERN is consid- + ered to be matching lines (as if surrounded by ^ and $). If a + PATTERN is specified, or -e PATTERN or -N PATTERN, then this option does not apply to -f FILE patterns. - --xml Output file matches in XML. If -H, -n, -k, or -b is specified, + --xml Output file matches in XML. If -H, -n, -k, or -b is specified, additional values are output. See also options --format and -u. -Y, --empty - Permits empty matches. By default, empty matches are disabled, - unless a pattern begins with `^' or ends with `$'. With this - option, empty-matching pattern, such as x? and x*, match all + Permits empty matches. By default, empty matches are disabled, + unless a pattern begins with `^' or ends with `$'. With this + option, empty-matching pattern, such as x? and x*, match all input, not only lines containing the character `x'. -y, --any-line Any matching or non-matching line is output. Non-matching lines - are output with the `-' separator as context of the matching + are output with the `-' separator as context of the matching lines. See also options -A, -B, and -C. -Z[MAX], --fuzzy[=MAX] Fuzzy mode: report approximate pattern matches within MAX - errors. By default, MAX is 1: one deletion, insertion or sub- - stitution is allowed. When `+' and/or `-' precede MAX, only + errors. By default, MAX is 1: one deletion, insertion or sub- + stitution is allowed. When `+' and/or `-' precede MAX, only insertions and/or deletions are allowed, respectively. When `~' - precedes MAX, substitution counts as one error. For example, - -Z+~3 allows up to three insertions or substitutions, but no - deletions. The first character of an approximate match always - matches the begin of a pattern. Option --sort=best orders - matching files by best match. No whitespace may be given + precedes MAX, substitution counts as one error. For example, + -Z+~3 allows up to three insertions or substitutions, but no + deletions. The first character of an approximate match always + matches the begin of a pattern. Option --sort=best orders + matching files by best match. No whitespace may be given between -Z and its argument. -z, --decompress - Decompress files to search, when compressed. Archives (.cpio, - .pax, .tar, and .zip) and compressed archives (e.g. .taz, .tgz, - .tpz, .tbz, .tbz2, .tb2, .tz2, .tlz, and .txz) are searched and - matching pathnames of files in archives are output in braces. - If -g, -O, -M, or -t is specified, searches files within ar- - chives whose name matches globs, matches file name extensions, - matches file signature magic bytes, or matches file types, - respectively. Supported compression formats: gzip (.gz), com- + Decompress files to search, when compressed. Archives (.cpio, + .pax, .tar, and .zip) and compressed archives (e.g. .taz, .tgz, + .tpz, .tbz, .tbz2, .tb2, .tz2, .tlz, and .txz) are searched and + matching pathnames of files in archives are output in braces. + If -g, -O, -M, or -t is specified, searches files within ar- + chives whose name matches globs, matches file name extensions, + matches file signature magic bytes, or matches file types, + respectively. Supported compression formats: gzip (.gz), com- press (.Z), zip, bzip2 (requires suffix .bz, .bz2, .bzip2, .tbz, - .tbz2, .tb2, .tz2), lzma and xz (requires suffix .lzma, .tlz, + .tbz2, .tb2, .tz2), lzma and xz (requires suffix .lzma, .tlz, .xz, .txz), lz4 (requires suffix .lz4). -0, --null - Prints a zero-byte (NUL) after the file name. This option can - be used with commands such as `find -print0' and `xargs -0' to + Prints a zero-byte (NUL) after the file name. This option can + be used with commands such as `find -print0' and `xargs -0' to process arbitrary file names. - A `--' signals the end of options; the rest of the parameters are FILE + A `--' signals the end of options; the rest of the parameters are FILE arguments, allowing filenames to begin with a `-' character. Long options may start with `--no-' to disable, when applicable. - The regular expression pattern syntax is an extended form of the POSIX + The regular expression pattern syntax is an extended form of the POSIX ERE syntax. For an overview of the syntax see README.md or visit: https://github.com/Genivia/ugrep - Note that `.' matches any non-newline character. Pattern `\n' matches - a newline character. Multiple lines may be matched with patterns that + Note that `.' matches any non-newline character. Pattern `\n' matches + a newline character. Multiple lines may be matched with patterns that match one or more newline characters. EXIT STATUS @@ -3898,53 +3907,53 @@ >1 An error occurred. - If -q or --quiet or --silent is used and a line is selected, the exit + If -q or --quiet or --silent is used and a line is selected, the exit status is 0 even if an error occurred. CONFIGURATION - The ug command is intended for context-dependent interactive searching - and is equivalent to the ugrep --config command to load the default + The ug command is intended for context-dependent interactive searching + and is equivalent to the ugrep --config command to load the default configuration file `.ugrep' when present in the working directory or in the home directory. A configuration file contains `NAME=VALUE' pairs per line, where `NAME` - is the name of a long option (without `--') and `=VALUE' is an argu- - ment, which is optional and may be omitted depending on the option. + is the name of a long option (without `--') and `=VALUE' is an argu- + ment, which is optional and may be omitted depending on the option. Empty lines and lines starting with a `#' are ignored. - The --config=FILE option and its abbreviated form ---FILE load the - specified configuration file located in the working directory or, when - not found, located in the home directory. An error is produced when + The --config=FILE option and its abbreviated form ---FILE load the + specified configuration file located in the working directory or, when + not found, located in the home directory. An error is produced when FILE is not found or cannot be read. - Command line options are parsed in the following order: the configura- - tion file is loaded first, followed by the remaining options and argu- + Command line options are parsed in the following order: the configura- + tion file is loaded first, followed by the remaining options and argu- ments on the command line. - The --save-config option saves a `.ugrep' configuration file to the - working directory with a subset of the current options. The --save- - config=FILE option saves the configuration to FILE. The configuration + The --save-config option saves a `.ugrep' configuration file to the + working directory with a subset of the current options. The --save- + config=FILE option saves the configuration to FILE. The configuration is written to standard output when FILE is a `-'. GLOBBING - Globbing is used by options -g, --include, --include-dir, --include- - from, --exclude, --exclude-dir, --exclude-from to match pathnames and - basenames in recursive searches. Glob arguments for these options + Globbing is used by options -g, --include, --include-dir, --include- + from, --exclude, --exclude-dir, --exclude-from to match pathnames and + basenames in recursive searches. Glob arguments for these options should be quoted to prevent shell globbing. - Globbing supports gitignore syntax and the corresponding matching - rules. When a glob ends in a path separator it matches directories as + Globbing supports gitignore syntax and the corresponding matching + rules. When a glob ends in a path separator it matches directories as if --include-dir or --exclude-dir is specified. When a glob contains a - path separator `/', the full pathname is matched. Otherwise the base- + path separator `/', the full pathname is matched. Otherwise the base- name of a file or directory is matched. For example, *.h matches foo.h - and bar/foo.h. bar/*.h matches bar/foo.h but not foo.h and not - bar/bar/foo.h. Use a leading `/' to force /*.h to match foo.h but not + and bar/foo.h. bar/*.h matches bar/foo.h but not foo.h and not + bar/bar/foo.h. Use a leading `/' to force /*.h to match foo.h but not bar/foo.h. - When a glob starts with a `^' or a `!' as in -g^GLOB, the match is + When a glob starts with a `^' or a `!' as in -g^GLOB, the match is negated. Likewise, a `!' (but not a `^') may be used with globs in the - files specified --include-from, --exclude-from, and --ignore-files to - negate the glob match. Empty lines or lines starting with a `#' are + files specified --include-from, --exclude-from, and --ignore-files to + negate the glob match. Empty lines or lines starting with a `#' are ignored. Glob Syntax and Conventions @@ -3959,12 +3968,12 @@ [!a-z] Matches one character not in the selected range of characters. - / When used at the begin of a glob, matches if pathname has no /. + / When used at the begin of a glob, matches if pathname has no /. When used at the end of a glob, matches directories only. **/ Matches zero or more directories. - /** When used at the end of a glob, matches everything after the /. + /** When used at the end of a glob, matches everything after the /. \? Matches a ? (or any character specified after the backslash). @@ -4001,51 +4010,51 @@ a\?b Matches a?b, but not a, b, ab, axb, a/b - Note that exclude glob patterns take priority over include glob pat- - terns when specified with options -g, --exclude, --exclude-dir, + Note that exclude glob patterns take priority over include glob pat- + terns when specified with options -g, --exclude, --exclude-dir, --include and include-dir. - Glob patterns specified with prefix `!' in any of the files associated - with --include-from, --exclude-from and --ignore-files will negate a - previous glob match. That is, any matching file or directory excluded - by a previous glob pattern specified in the files associated with - --exclude-from or --ignore-file will become included again. Likewise, - any matching file or directory included by a previous glob pattern - specified in the files associated with --include-from will become + Glob patterns specified with prefix `!' in any of the files associated + with --include-from, --exclude-from and --ignore-files will negate a + previous glob match. That is, any matching file or directory excluded + by a previous glob pattern specified in the files associated with + --exclude-from or --ignore-file will become included again. Likewise, + any matching file or directory included by a previous glob pattern + specified in the files associated with --include-from will become excluded again. ENVIRONMENT GREP_PATH - May be used to specify a file path to pattern files. The file - path is used by option -f to open a pattern file, when the pat- + May be used to specify a file path to pattern files. The file + path is used by option -f to open a pattern file, when the pat- tern file does not exist. GREP_EDITOR - May be used to specify an editor command to invoke with CTRL-Y - while using the query UI with option -Q. When undefined, the + May be used to specify an editor command to invoke with CTRL-Y + while using the query UI with option -Q. When undefined, the command defined by EDITOR is invoked. GREP_COLOR - May be used to specify ANSI SGR parameters to highlight matches - when option --color is used, e.g. 1;35;40 shows pattern matches + May be used to specify ANSI SGR parameters to highlight matches + when option --color is used, e.g. 1;35;40 shows pattern matches in bold magenta text on a black background. Deprecated in favor of GREP_COLORS, but still supported. GREP_COLORS - May be used to specify ANSI SGR parameters to highlight matches - and other attributes when option --color is used. Its value is - a colon-separated list of ANSI SGR parameters that defaults to + May be used to specify ANSI SGR parameters to highlight matches + and other attributes when option --color is used. Its value is + a colon-separated list of ANSI SGR parameters that defaults to cx=33:mt=1;31:fn=1;35:ln=1;32:cn=1;32:bn=1;32:se=36. The mt=, - ms=, and mc= capabilities of GREP_COLORS take priority over + ms=, and mc= capabilities of GREP_COLORS take priority over GREP_COLOR. Option --colors takes priority over GREP_COLORS. GREP_COLORS - Colors are specified as string of colon-separated ANSI SGR parameters - of the form `what=substring', where `substring' is a semicolon-sepa- - rated list of ANSI SGR codes or `k' (black), `r' (red), `g' (green), - `y' (yellow), `b' (blue), `m' (magenta), `c' (cyan), `w' (white). - Upper case specifies background colors. A `+' qualifies a color as - bright. A foreground and a background color may be combined with one + Colors are specified as string of colon-separated ANSI SGR parameters + of the form `what=substring', where `substring' is a semicolon-sepa- + rated list of ANSI SGR codes or `k' (black), `r' (red), `g' (green), + `y' (yellow), `b' (blue), `m' (magenta), `c' (cyan), `w' (white). + Upper case specifies background colors. A `+' qualifies a color as + bright. A foreground and a background color may be combined with one or more font properties `n' (normal), `f' (faint), `h' (highlight), `i' (invert), `u' (underline). Substrings may be specified for: @@ -4057,10 +4066,10 @@ mt= SGR substring for matching text in any matching line. - ms= SGR substring for matching text in a selected line. The sub- + ms= SGR substring for matching text in a selected line. The sub- string mt= by default. - mc= SGR substring for matching text in a context line. The sub- + mc= SGR substring for matching text in a context line. The sub- string mt= by default. fn= SGR substring for file names. @@ -4074,7 +4083,7 @@ se= SGR substring for separators. FORMAT - Option --format=FORMAT specifies an output format for file matches. + Option --format=FORMAT specifies an output format for file matches. Fields may be used in FORMAT, which expand into the following values: %[ARG]F @@ -4173,7 +4182,7 @@ %u select unique lines only, unless option -u is used. - %1 the first regex group capture of the match, and so on up to + %1 the first regex group capture of the match, and so on up to group %9, same as %[1]#; requires option -P. %[NUM]# @@ -4191,22 +4200,22 @@ %% the percentage sign. - The [ARG] part of a field is optional and may be omitted. When - present, the argument must be placed in [] brackets, for example %[,]F + The [ARG] part of a field is optional and may be omitted. When + present, the argument must be placed in [] brackets, for example %[,]F to output a comma, the pathname, and a separator. %[SEP]$ and %u are switches and do not send anything to the output. - The separator used by %F, %H, %N, %K, %B, %S, and %G may be changed by - preceding the field by %[SEP]$. When [SEP] is not provided, this - reverts the separator to the default separator or the separator speci- + The separator used by %F, %H, %N, %K, %B, %S, and %G may be changed by + preceding the field by %[SEP]$. When [SEP] is not provided, this + reverts the separator to the default separator or the separator speci- fied with --separator. Formatted output is written for each matching pattern, which means that - a line may be output multiple times when patterns match more than once - on the same line. If field %u is specified anywhere in a format + a line may be output multiple times when patterns match more than once + on the same line. If field %u is specified anywhere in a format string, matching lines are output only once, unless option -u, - --ungroup is specified or when more than one line of input matched the + --ungroup is specified or when more than one line of input matched the search pattern. Additional formatting options: @@ -4277,7 +4286,7 @@ $ ugrep -n -f c++/comments myfile.cpp - List the lines that need fixing in a C/C++ source file by looking for + List the lines that need fixing in a C/C++ source file by looking for the word `FIXME' while skipping any `FIXME' in quoted strings: $ ugrep -e FIXME -N '"(\\.|\\\r?\n|[^\\\n"])*"' myfile.cpp @@ -4307,7 +4316,7 @@ $ ugrep -z -tc++ -n FIXME project.tgz - Recursively find lines with `FIXME' in C/C++ files, but do not search + Recursively find lines with `FIXME' in C/C++ files, but do not search any `bak' and `old' directories: $ ugrep -n FIXME -tc++ -g^bak/,^old/ @@ -4317,9 +4326,9 @@ $ ugrep -z -w --filter='pdf:pdftotext % -' copyright - Match the binary pattern `A3hhhhA3hh' (hex) in a binary file without - Unicode pattern matching -U (which would otherwise match `\xaf' as a - Unicode character U+00A3 with UTF-8 byte sequence C2 A3) and display + Match the binary pattern `A3hhhhA3hh' (hex) in a binary file without + Unicode pattern matching -U (which would otherwise match `\xaf' as a + Unicode character U+00A3 with UTF-8 byte sequence C2 A3) and display the results in hex with -X using `less -R' as a pager: $ ugrep --pager -UXo '\xa3[\x00-\xff]{2}\xa3[\x00-\xff]' a.out @@ -4332,12 +4341,12 @@ $ ugrep -l '' --ignore-files - List all files containing a RPM signature, located in the `rpm' direc- + List all files containing a RPM signature, located in the `rpm' direc- tory and recursively below up to two levels deeper (3 levels total): $ ugrep -3 -l -tRpm '' rpm/ - Monitor the system log for bug reports and ungroup multiple matches on + Monitor the system log for bug reports and ungroup multiple matches on a line: $ tail -f /var/log/system.log | ugrep -u -i -w bug @@ -4353,8 +4362,8 @@ LICENSE - ugrep is released under the BSD-3 license. All parts of the software - have reasonable copyright terms permitting free redistribution. This + ugrep is released under the BSD-3 license. All parts of the software + have reasonable copyright terms permitting free redistribution. This includes the ability to reuse all or parts of the ugrep source tree. SEE ALSO @@ -4362,7 +4371,7 @@ - ugrep 2.5.3 August 18, 2020 UGREP(1) + ugrep 2.5.5 September 02, 2020 UGREP(1) 🔝 [Back to table of contents](#toc) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/aclocal.m4 new/ugrep-2.5.5/aclocal.m4 --- old/ugrep-2.5.3/aclocal.m4 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/aclocal.m4 2020-09-02 16:35:50.000000000 +0200 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,12 +51,12 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -118,7 +118,7 @@ # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,7 +170,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -201,7 +201,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -392,7 +392,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -431,7 +431,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -458,7 +460,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -655,7 +657,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -676,7 +678,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -697,7 +699,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -740,7 +742,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -781,7 +783,7 @@ # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -808,7 +810,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -837,7 +839,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -884,7 +886,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -903,7 +905,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -984,7 +986,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1044,7 +1046,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1072,7 +1074,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1091,7 +1093,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, Binary files old/ugrep-2.5.3/bin/win32/ugrep.exe and new/ugrep-2.5.5/bin/win32/ugrep.exe differ Binary files old/ugrep-2.5.3/bin/win64/ugrep.exe and new/ugrep-2.5.5/bin/win64/ugrep.exe differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/build.sh new/ugrep-2.5.5/build.sh --- old/ugrep-2.5.3/build.sh 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/build.sh 2020-09-02 16:35:50.000000000 +0200 @@ -11,22 +11,28 @@ echo echo "Building ugrep..." -# fix git clone timestamp issues causing build failures -touch config.h.in lib/Makefile.in src/Makefile.in - # configure with colors enabled by default or the command arguments -OPTIONS=${1:---enable-color} +OPTIONS=${@:---enable-color} echo echo "./configure $OPTIONS" echo +# appease automake when the original timestamps are lost, when using git clone +touch aclocal.m4 Makefile.am lib/Makefile.am src/Makefile.am +sleep 1 +touch config.h.in Makefile.in lib/Makefile.in src/Makefile.in +sleep 1 +touch configure + ./configure $OPTIONS echo echo "make -j clean all" echo +make clean + if ! make -j ; then echo "Failed to build ugrep: please run the following two commands:" echo "$ autoreconf -fi" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/configure new/ugrep-2.5.5/configure --- old/ugrep-2.5.3/configure 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/configure 2020-09-02 16:35:50.000000000 +0200 @@ -9399,7 +9399,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/lib/Makefile.in new/ugrep-2.5.5/lib/Makefile.in --- old/ugrep-2.5.3/lib/Makefile.in 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/lib/Makefile.in 2020-09-02 16:35:50.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/makemake.sh new/ugrep-2.5.5/makemake.sh --- old/ugrep-2.5.3/makemake.sh 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/makemake.sh 2020-09-02 16:35:50.000000000 +0200 @@ -13,11 +13,10 @@ sed -i .bak 's/lib_LIBRARIES/noinst_LIBRARIES/' lib/Makefile.am rm -f lib/Makefile.am.bak -# run autoconf and automake stuff +# run autoconf and automake stuff with maintainer mode disabled aclocal autoheader automake --add-missing --foreign autoconf automake -touch config.h.in ./configure --enable-color diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/man/ugrep.1 new/ugrep-2.5.5/man/ugrep.1 --- old/ugrep-2.5.3/man/ugrep.1 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/man/ugrep.1 2020-09-02 16:35:50.000000000 +0200 @@ -1,4 +1,4 @@ -.TH UGREP "1" "August 18, 2020" "ugrep 2.5.3" "User Commands" +.TH UGREP "1" "September 02, 2020" "ugrep 2.5.5" "User Commands" .SH NAME \fBugrep\fR, \fBug\fR -- file pattern searcher .SH SYNOPSIS @@ -453,8 +453,7 @@ file processed. .TP \fB\-P\fR, \fB\-\-perl\-regexp\fR -Interpret PATTERN as a Perl regular expression. -This option is not available in this build configuration of ugrep. +Interpret PATTERN as a Perl regular expression using PCRE2. .TP \fB\-p\fR, \fB\-\-no\-dereference\fR If \fB\-R\fR or \fB\-r\fR is specified, no symbolic links are followed, even when diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/src/Makefile.in new/ugrep-2.5.5/src/Makefile.in --- old/ugrep-2.5.3/src/Makefile.in 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/src/Makefile.in 2020-09-02 16:35:50.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/src/query.cpp new/ugrep-2.5.5/src/query.cpp --- old/ugrep-2.5.3/src/query.cpp 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/src/query.cpp 2020-09-02 16:35:50.000000000 +0200 @@ -632,7 +632,7 @@ { get_stdin(); - if (!VKey::setup(VKey::RAW)) + if (!VKey::setup(VKey::TTYRAW)) abort("no keyboard detected"); if (!Screen::setup("ugrep --query")) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/src/ugrep.cpp new/ugrep-2.5.5/src/ugrep.cpp --- old/ugrep-2.5.3/src/ugrep.cpp 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/src/ugrep.cpp 2020-09-02 16:35:50.000000000 +0200 @@ -67,7 +67,7 @@ */ // ugrep version -#define UGREP_VERSION "2.5.3" +#define UGREP_VERSION "2.5.5" #include "ugrep.hpp" #include "glob.hpp" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/src/ugrep.hpp new/ugrep-2.5.5/src/ugrep.hpp --- old/ugrep-2.5.3/src/ugrep.hpp 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/src/ugrep.hpp 2020-09-02 16:35:50.000000000 +0200 @@ -176,7 +176,7 @@ Flag() : value(UNDEFINED) { } Flag(bool flag) : value(flag ? T : F) { } - bool operator=(bool flag) { value = flag ? T : F; return flag; } + Flag operator=(bool flag) { value = flag ? T : F; return *this; } operator bool() const { return is_true(); } bool is_undefined() const { return value == UNDEFINED; } bool is_defined() const { return value != UNDEFINED; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/src/vkey.cpp new/ugrep-2.5.5/src/vkey.cpp --- old/ugrep-2.5.3/src/vkey.cpp 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/src/vkey.cpp 2020-09-02 16:35:50.000000000 +0200 @@ -752,7 +752,7 @@ #endif } -// setup vkey in VKey::NORMAL tty or VKey::RAW raw tty mode (cfmakeraw), returns 0 on success <0 on failure +// setup vkey in VKey::NORMAL tty or VKey::TTYRAW raw tty mode (cfmakeraw), returns 0 on success <0 on failure bool VKey::setup(int mode) { #ifdef OS_WIN @@ -767,7 +767,7 @@ DWORD inMode = oldInMode & ~(ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT); - if (mode == VKey::RAW) + if (mode == VKey::TTYRAW) inMode &= ~ENABLE_PROCESSED_INPUT; // get event when window is resized @@ -801,7 +801,7 @@ tcgetattr(tty, &oldterm); tcgetattr(tty, &newterm); - if (mode == VKey::RAW) + if (mode == VKey::TTYRAW) cfmakeraw(&newterm); else newterm.c_lflag &= ~(ECHO | ICANON); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/src/vkey.hpp new/ugrep-2.5.5/src/vkey.hpp --- old/ugrep-2.5.3/src/vkey.hpp 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/src/vkey.hpp 2020-09-02 16:35:50.000000000 +0200 @@ -215,7 +215,7 @@ public: static const int NORMAL = 0; // VKey::setup in tty normal mode - static const int RAW = 1; // VKey::setup in tty raw mode (cfmakeraw) + static const int TTYRAW = 1; // VKey::setup in tty raw mode (cfmakeraw) static const int META = 31; // META/ALT/OPTION/CTRL-_ @@ -259,7 +259,7 @@ return 255 + '@' + num; // FN1..FN12 is 256+'A'..256+'L' } - // setup vkey in VKey::NORMAL tty or VKey::RAW raw tty mode (cfmakeraw), returns 0 on success <0 on failure + // setup vkey in VKey::NORMAL tty or VKey::TTYRAW raw tty mode (cfmakeraw), returns 0 on success <0 on failure static bool setup(int mode = NORMAL); // release vkey resources and restore tty diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/src/zstream.hpp new/ugrep-2.5.5/src/zstream.hpp --- old/ugrep-2.5.3/src/zstream.hpp 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/src/zstream.hpp 2020-09-02 16:35:50.000000000 +0200 @@ -28,7 +28,7 @@ /** @file zstream.hpp -@brief file decompression streams +@brief file decompression streams - zstreambuf extends std::streambuf @author Robert van Engelen - [email protected] @copyright (c) 2019-2020, Robert van Engelen, Genivia Inc. All rights reserved. @copyright (c) BSD-3 License - see LICENSE.txt @@ -65,15 +65,19 @@ #ifdef HAVE_LIBLZ4 #include <lz4.h> typedef LZ4_streamDecode_t *lz4_stream; +// define LZ4_DECODER_RING_BUFFER_SIZE when not defined by old lz4 +#ifndef LZ4_DECODER_RING_BUFFER_SIZE +#define LZ4_DECODER_RING_BUFFER_SIZE(maxBlockSize) (65536 + 14 + (maxBlockSize)) +#endif #else struct lz4_stream; #endif -// TODO zip decompression crc check disabled as this is too slow, we should optimize crc32() with a table +// zip decompression crc check disabled as this is too slow, we should optimize crc32() with a table // use zip crc integrity check at the cost of a significant slow down? // #define WITH_ZIP_CRC32 -// buffer size to hold compressed data copied from compressed files +// buffer size to hold compressed data that is block-wise copied from compressed files #ifndef Z_BUF_LEN #define Z_BUF_LEN 65536 #endif @@ -143,16 +147,16 @@ uint32_t crc; // zip crc-32 uint64_t size; // zip compressed file size uint64_t usize; // zip uncompressed file size (unused) - std::string name; // zip file name from local file header or extra field + std::string name; // zip file name from local file header or zip extra field protected: - static constexpr size_t ZIPBLOCK = 65536; // block size to read zip data, at least 64K to fit long 64K pathnames + static const size_t ZIPBLOCK = 65536; // block size to read zip data, at least 64K to fit long 64K pathnames - static constexpr uint16_t COMPRESS_HEADER_MAGIC = 0x9d1f; // compress header magic - static constexpr uint16_t DEFLATE_HEADER_MAGIC = 0x8b1f; // zlib deflate header magic - static constexpr uint32_t ZIP_HEADER_MAGIC = 0x04034b50; // zip local file header magic - static constexpr uint32_t ZIP_DESCRIPTOR_MAGIC = 0x08074b50; // zip descriptor magic + static const uint16_t COMPRESS_HEADER_MAGIC = 0x9d1f; // compress header magic + static const uint16_t DEFLATE_HEADER_MAGIC = 0x8b1f; // zlib deflate header magic + static const uint32_t ZIP_HEADER_MAGIC = 0x04034b50; // zip local file header magic + static const uint32_t ZIP_DESCRIPTOR_MAGIC = 0x08074b50; // zip descriptor magic // read zip local file header if we are at a header, read the header, file name, and extra field bool header() @@ -242,6 +246,7 @@ { z_strm_ = new z_stream; } + catch (const std::bad_alloc&) { cannot_decompress(pathname_, "out of memory"); @@ -277,6 +282,7 @@ { bz_strm_ = new bz_stream; } + catch (const std::bad_alloc&) { cannot_decompress(pathname_, "out of memory"); @@ -327,6 +333,7 @@ { lzma_strm_ = new lzma_stream; } + catch (const std::bad_alloc&) { cannot_decompress(pathname_, "out of memory"); @@ -367,10 +374,11 @@ zcrc_ = 0xffffffff; zend_ = false; + return true; } - // read and decompress zip file data into buf[0..len-1], return number of bytes decompressed + // read and decompress zip file data into buf[0..len-1], return number of bytes decompressed, 0 for EOF or -1 for error std::streamsize decompress(unsigned char *buf, size_t len) { // if no more data to decompress, then return 0 to indicate EOF @@ -892,6 +900,7 @@ file_ = NULL; } } + catch (const std::bad_alloc&) { cannot_decompress(pathname_, "out of memory"); @@ -917,6 +926,7 @@ file_ = NULL; } } + catch (const std::bad_alloc&) { cannot_decompress(pathname_, "out of memory"); @@ -933,6 +943,7 @@ { lz4file_ = new LZ4(); } + catch (const std::bad_alloc&) { cannot_decompress(pathname_, "out of memory"); @@ -972,6 +983,7 @@ file_ = NULL; } } + catch (const std::bad_alloc&) { errno = ENOMEM; @@ -1004,6 +1016,7 @@ file_ = NULL; } } + catch (const std::bad_alloc&) { errno = ENOMEM; @@ -1245,12 +1258,13 @@ // lz4 state data struct LZ4 { - static const size_t MAX_BLOCK_SIZE = 4194304; // lz4 4MB max block size + static const size_t MAX_BLOCK_SIZE = 4194304; // lz4 4MB max block size + static const size_t RING_BUFFER_SIZE = LZ4_DECODER_RING_BUFFER_SIZE(MAX_BLOCK_SIZE); LZ4() : strm(LZ4_createStreamDecode()), - buf(static_cast<unsigned char*>(malloc(LZ4_DECODER_RING_BUFFER_SIZE(MAX_BLOCK_SIZE)))), + buf(static_cast<unsigned char*>(malloc(RING_BUFFER_SIZE))), loc(0), len(0), crc(0), @@ -1751,7 +1765,7 @@ } // decompress lz4file_->zbuf[] block into lz4file_->buf[] - if (lz4file_->loc >= LZ4_DECODER_RING_BUFFER_SIZE(LZ4::MAX_BLOCK_SIZE) - LZ4::MAX_BLOCK_SIZE) + if (lz4file_->loc >= LZ4::RING_BUFFER_SIZE - LZ4::MAX_BLOCK_SIZE) lz4file_->loc = 0; int ret = LZ4_decompress_safe_continue(lz4file_->strm, reinterpret_cast<char*>(lz4file_->zbuf + lz4file_->zloc), reinterpret_cast<char*>(lz4file_->buf + lz4file_->loc), size, LZ4::MAX_BLOCK_SIZE); lz4file_->zloc += size; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-2.5.3/tests/verify.sh new/ugrep-2.5.5/tests/verify.sh --- old/ugrep-2.5.3/tests/verify.sh 2020-08-18 22:50:16.000000000 +0200 +++ new/ugrep-2.5.5/tests/verify.sh 2020-09-02 16:35:50.000000000 +0200 @@ -234,13 +234,13 @@ fi done +if [ "$have_libz" == yes ]; then printf . $UG -z -c Hello archive.cpio | $DIFF out/archive.cpio.out || ERR "-z -c Hello archive.cpio" printf . $UG -z -c Hello archive.pax | $DIFF out/archive.pax.out || ERR "-z -c Hello archive.pax" printf . $UG -z -c Hello archive.tar | $DIFF out/archive.tar.out || ERR "-z -c Hello archive.tar" -if [ "$have_libz" == yes ]; then printf . $UG -z -c Hello archive.tgz | $DIFF out/archive.tgz.out || ERR "-z -c Hello archive.tgz" printf . @@ -265,13 +265,13 @@ fi fi +if [ "$have_libz" == yes ]; then printf . $UG -z -c -tShell Hello archive.cpio | $DIFF out/archive-t.cpio.out || ERR "-z -c -tShell Hello archive.cpio" printf . $UG -z -c -tShell Hello archive.pax | $DIFF out/archive-t.pax.out || ERR "-z -c -tShell Hello archive.pax" printf . $UG -z -c -tShell Hello archive.tar | $DIFF out/archive-t.tar.out || ERR "-z -c -tShell Hello archive.tar" -if [ "$have_libz" == yes ]; then printf . $UG -z -c -tShell Hello archive.tgz | $DIFF out/archive-t.tgz.out || ERR "-z -c -tShell Hello archive.tgz" printf .
