summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3fd9297)
raw | patch | inline | side by side (parent: 3fd9297)
author | Jonas Fonseca <fonseca@diku.dk> | |
Mon, 11 Sep 2006 20:40:22 +0000 (22:40 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Mon, 11 Sep 2006 20:41:10 +0000 (22:41 +0200) |
tig.c | patch | blob | history |
index a5255cd39de29da90218293fe9239471a860bfdf..2f32941b900d759539a9d59d8cd8659a8219ac6b 100644 (file)
--- a/tig.c
+++ b/tig.c
* Searching
*/
-static void search_view(struct view *view, enum request request, const char *search);
+static void search_view(struct view *view, enum request request);
static bool
find_next_line(struct view *view, unsigned long lineno, struct line *line)
if (!*opt_search)
report("No previous search");
else
- search_view(view, request, opt_search);
+ search_view(view, request);
return;
}
}
static void
-search_view(struct view *view, enum request request, const char *search)
+search_view(struct view *view, enum request request)
{
int regex_err;
return;
}
- regex_err = regcomp(view->regex, search, REG_EXTENDED);
+ regex_err = regcomp(view->regex, opt_search, REG_EXTENDED);
if (regex_err != 0) {
char buf[SIZEOF_STR] = "unknown error";
return;
}
- string_copy(view->grep, search);
+ string_copy(view->grep, opt_search);
find_next(view, request);
}
case REQ_SEARCH:
case REQ_SEARCH_BACK:
- search_view(view, request, opt_search);
+ search_view(view, request);
break;
case REQ_FIND_NEXT: