Commit Graph

25 Commits

Author SHA1 Message Date
Ilia Maslakov
156b79609c Ticket #1487 (Whole words search)
thanx Daniel Borca <dborca@yahoo.com> for the patch

    * fix special_chars in regex.c
    * add whole_words into mc_search_struct
    * add 'Whole words' into 'Search', 'Replace' 'File find' dialogs

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-08-22 11:24:00 +00:00
Slava Zanko
0dc26a14d4 Changed types in structure 'mc_search_struct' from 'gsize' to 'otff_t'
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-12 15:04:37 +03:00
Sergei Trofimovich
f050f5e686 fixed compiler hints: -Wwrite-strings option helped a lot
Some crufty ugly APIs (slang stuff, putenv) now have explicit (char*) casts.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-07-17 12:00:03 +03:00
Slava Zanko
ce1d670972 Ticket #393 (slow search in viewer)
* Replace search prepare algorithm
    * Added function for update search status.
    * Added callback for update search status into external places
    * Added new message box 'Seeking to search result' at end of search process
    * Fixed search in file with different charset.
    * Fixed backward search in nroff'ed text
    * Added named enum for return values of callback functions for search
    * Fixed wrong search with 'pcre' search engine.
    * Fixed search in underlined text.
    * Fixed wrong offset of nroff'ed text where text is underlined.
    * Fixed calculating of next search position. Fixed double-search one text in nroff'ed area.
    * Last found text stay selected if no more found.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-09 09:44:44 +03:00
Slava Zanko
1b03ffad49 Ticket #1396 (need build option --with-search-engine for select regex engine)
Added '--with-search-engine' into configure script.
Changed behavior of lib_pcre m4-module. Now used pkg-config

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-07 11:17:10 +03:00
Andrew Borodin
d5f1442438 Ticket 1375: new design of 'Find File' dialog.
* src/find.c:
  + New design of 'Find File' dialog.
  + íodification of search results dialog: listbox
    which contains search results is not scrolled now.
    New behavior avoids dialog blinking :) and allows the walk
    through the list during search.
    Added counter of found items.
  + Check regexp before search.
  + For glib >= 2.14.0, use GQueue for directory queue.
  + Fixed memory leak.
  + Some optimization.
  + More type accuracy.
  + Formatting. Fixed typo. Clean up.

* src/widget.c:
  (listbox_select_by_number): don't operate with non-existing list.

* src/search/*:
  + (mc_search_prepare): new function that allows check if regexp
    is valid before search (Slava Zanko).
  + Removed redundant chek for g_free ().
    Use g_free() instead of free().

Signed-off-by: Andrew Borodin <borodin@borodin.zarya>
2009-06-25 10:56:16 +04:00
Slava Zanko
38601bd224 Removed support of POSIX regexp. Now handled only glib-regexp and pcre
POSIX regexp don't support search by code of character (like \x<HEX>).

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-19 21:47:31 +03:00
Slava Zanko
86e3d2123c Fixed work with copying/moving files by mask into subdirs
For example, we need to move files:
some_test.ext
this_is_file.ext

into subdirs, named as first char of filenames:
./s/
./d/

Select needed files and press F5(F6)
Source mask: ?*
to: \1/\1\2

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-12 17:10:38 +03:00
Slava Zanko
786174fac8 Renamed function shell_is_char_escaped to strutils_is_char_escaped; removed function mc_search_is_char_escaped
* All calls of function mc_search_is_char_escaped replaced to strutils_is_char_escaped

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-12 10:31:59 +03:00
Slava Zanko
a0d56381e0 Search Replace now handled \U,\u,\L,\l and \E modificators.
Also function mc_search__regex_is_char_escaped() renamed to mc_search_is_char_escaped() and moved into global visibility scope.
2009-06-12 10:31:58 +03:00
Slava Zanko
5e6c14a928 Just identation of regex.c and search.h
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-12 10:31:58 +03:00
Slava Zanko
2d4ee6f616 search engine: Added new syntax for replace tokenks.
Now \<digit> handle just first 0-9 search groups.
If you need to access to more search groups, need to use
${digits} syntax.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-12 10:31:58 +03:00
Slava Zanko
dbb953bfbe Fixed Select/Unselect file mask. now mask applied to entire filename, not to part of filename
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-10 14:20:27 +03:00
Mikhail S. Pobolovets
4fd6869be2 Warning fix: return discards qualifiers from pointer target type
search.c:312:
        return discards qualifiers from pointer target type

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-05-10 14:22:24 +03:00
Slava Zanko
087ef15b1f Total replacement to mc_search stuff in all places 2009-05-06 19:12:32 +03:00
Slava Zanko
293310f727 refactoring: rename edit/editcmd_dialog.c:editcmd_dialog__get_search_types_list to
to src/search/lib.c:mc_search_get_types_strings_array
2009-05-06 10:50:12 +03:00
Slava Zanko
0eb537d8d5 Search engine:
* fixed double-free memory
 * changed logic of parce regexp-string for \x{HEX} token
 * added template file hex.c for HEX search type
2009-05-05 22:28:27 +03:00
Slava Zanko
2276e9b513 Search engine: now used regexp external engines:
* glib
 * pcre
 * POSIX regex

External engine selected automatically, if present.
2009-05-05 16:19:32 +03:00
Slava Zanko
dcf90bf6ec Search engine: added Wildcard search (glob matching) 2009-04-30 16:06:24 +03:00
Slava Zanko
15b2d19428 Search engine: fix errors with backward regex-search 2009-04-30 14:21:39 +03:00
Slava Zanko
602f3c5796 Search engine: backward search now works 2009-04-30 12:35:24 +03:00
Slava Zanko
a802e51566 Search engine: regex replace now works correct 2009-04-30 10:32:45 +03:00
Slava Zanko
def581b24d Search engine:
* add function for prepare replacement string

edit/editcmd.c:
 * changes for correct replace

WARNING! replace don't fully works!
2009-04-29 18:45:21 +03:00
Slava Zanko
74c8c748b3 internal editor: change search/replace dialogs:
replace dialog:
 * removed 'replace order' field
 * removed 'scanf' and 'regex' chackboxes
 * added selectbox element for choise type of search
 * confirm replace and 'replace all' now radiobuttons

search dialog:
 * removed 'replace order' field
 * removed 'scanf' and 'regex' chackboxes
 * added selectbox element for choise type of search
2009-04-29 16:13:12 +03:00
Slava Zanko
b2442d1b1e Reorganize source structure: move search engine files into src/search subdir 2009-04-25 10:25:13 +03:00