1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05: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.
This commit is contained in:
Kalle Olavi Niemitalo 2008-07-14 22:26:38 +03:00 committed by Kalle Olavi Niemitalo
parent 442b0d83b0
commit 2aec302d47

View File

@ -248,6 +248,7 @@ get_range(struct document *document, int y, int height, int l,
return 0;
}
#ifdef HAVE_REGEX_H
/* Returns a string |doc| that is a copy of the text in the search nodes
* from |s1| to |s1 + doclen - 1| with the space at the end of each line
* converted to a new-line character (LF). */
@ -279,7 +280,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;