1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-27 01:25:34 +00:00

1030: Wrap get_search_region_from_search_nodes in #ifdef HAVE_REGEX_H

This change avoids the following error:

gcc -DHAVE_CONFIG_H -I../../.. -I/home/Kalle/src/elinks-0.11/src -I/home/Kalle/prefix/include -I/usr/include/smjs -I/usr/include -I/usr/include/lua50 -I/usr/include -I/usr/include -O0 -ggdb -Wall -Wall -Werror -fno-strict-aliasing -Wno-pointer-sign -Wno-address -fno-strict-overflow -o search.o -c /home/Kalle/src/elinks-0.11/src/viewer/text/search.c
cc1: warnings being treated as errors
/home/Kalle/src/elinks-0.11/src/viewer/text/search.c:257: warning: 'get_search_region_from_search_nodes' defined but not used
make[3]: *** [search.o] Error 1
make[3]: Leaving directory `/home/Kalle/build/i686-pc-linux-gnu/elinks-0.11/src/viewer/text'

get_search_region_from_search_nodes is called only from
search_for_pattern, which already was inside #ifdef HAVE_REGEX_H.
(cherry picked from commit 2aec302d47)
This commit is contained in:
Kalle Olavi Niemitalo 2008-07-14 22:26:38 +03:00 committed by Kalle Olavi Niemitalo
parent e83f76b79e
commit e287ca9265

View File

@ -262,6 +262,7 @@ get_range(struct document *document, int y, int height, int l,
return 0;
}
#ifdef HAVE_REGEX_H
/** Returns a string @c doc that is a copy of the text in the search
* nodes from @a s1 to (@a s1 + @a doclen - 1) with the space at the
* end of each line converted to a new-line character (LF). */
@ -293,7 +294,6 @@ get_search_region_from_search_nodes(struct search *s1, struct search *s2,
return doc;
}
#ifdef HAVE_REGEX_H
struct regex_match_context {
struct search *s1;
struct search *s2;