since my DD-WRT build is now moving to pcre2, i thought i'd give a stab at
providing pcre2 support.
since brainslayer is using an ass-old version of MC, i have provided a
patch set of the changes necessary to use pcre2.
it compiles fine and from what i can see, it runs fine.
but i haven't tested the search properly because i don't want to restart
my router to accommodate the newer glib/pcre (i used LD_LIBRARY_PATH with
the newer libraries to test the new executable).
--
Ticket URL: <http://www.midnight-commander.org/ticket/4450>
Midnight Commander <https://midnight-commander.org>
Midnight Development Center
Comment (by broly):
if anyone wants to fix any potential bugs that may arise from my changes,
use these:
https://github.com/apache/httpd/commit/c602ba14811ede722017c4e59e4e30d9990227b4
#diff-4d479e1bf17e6539c339b182d3c0861a1bd0b0ccbad5226c437d0e30f8cae0c7
https://github.com/i3/i3/issues/4682#issuecomment-973076704
--
Ticket URL: <http://www.midnight-commander.org/ticket/4450#comment:1>
* component: mc-core => mc-search
--
Ticket URL: <http://www.midnight-commander.org/ticket/4450#comment:2>
Comment (by andrew_b):
The patch is corrupted:
{{{
$ git apply shitty_pcre2.patch
shitty_pcre2.patch:27: trailing whitespace.
lc_mc_search->num_results = pcre2_match (regex,
shitty_pcre2.patch:53: trailing whitespace.
int pcre_options =
shitty_pcre2.patch:56: trailing whitespace.
#else
shitty_pcre2.patch:62: trailing whitespace.
pcre_options |=
shitty_pcre2.patch:70: trailing whitespace.
pcre_options |=
error: corrupt patch at line 113
}}}
--
Ticket URL: <http://www.midnight-commander.org/ticket/4450#comment:3>
Comment (by broly):
Replying to [comment:3 andrew_b]:
> The patch is corrupted:
> {{{
> $ git apply shitty_pcre2.patch
> shitty_pcre2.patch:27: trailing whitespace.
> lc_mc_search->num_results = pcre2_match (regex,
> shitty_pcre2.patch:53: trailing whitespace.
> int pcre_options =
> shitty_pcre2.patch:56: trailing whitespace.
> #else
> shitty_pcre2.patch:62: trailing whitespace.
> pcre_options |=
> shitty_pcre2.patch:70: trailing whitespace.
> pcre_options |=
> error: corrupt patch at line 113
>
> }}}
sorry for the late reply. turns out trying to jam in a forgotten macro
corrupted the patch, because i didn't wanna make a new diff and then
delete all of the differences for the */Makefile.in files xD
the updated patch has been tested and applied on my end this time. check
it out.
--
Ticket URL: <http://www.midnight-commander.org/ticket/4450#comment:4>
* owner: => andrew_b
* status: new => accepted
* branch_state: no branch => on review
* milestone: Future Releases => 4.8.30
Comment:
Branch: 4450_pcre2
changeset:49624e473bef82ab56e5e89271f6c4b4cd0f9e5c
@broly it would be nice if you revealed your real name for AUTHORS file.
--
Ticket URL: <http://www.midnight-commander.org/ticket/4450#comment:5>
* votes: => andrew_b
* branch_state: on review => approved
--
Ticket URL: <http://www.midnight-commander.org/ticket/4450#comment:6>
* status: accepted => testing
* votes: andrew_b => committed-master
* resolution: => fixed
* branch_state: approved => merged
Comment:
Merged to master: [86a9e0be2cdf01297c902bc4d52dbca778911834].
--
Ticket URL: <http://www.midnight-commander.org/ticket/4450#comment:7>
* status: testing => closed
--
Ticket URL: <http://www.midnight-commander.org/ticket/4450#comment:8>
Comment (by eugenesan):
I've been doing some testing with PCRE2 enabled MC and found that it is
~2x faster but provides different search results, which is concerning.
I performed "Find File" with "Content[Regular expression]: ^.*pcre.*$" on
a tree of mixed text, binaries and archives (total ~90k / 3GB).
PCRE2 compiled MC provided ~0.005% (4476 vs 4453) less results when
compared to default search engine.
Most of the misses where in binary files (.jar archives to be precise).
--
Ticket URL: <http://www.midnight-commander.org/ticket/4450#comment:9>