[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Eliot-dev] Changes to eliot/dic/dic_search.c [antoine-1]
From: |
eliot-dev |
Subject: |
[Eliot-dev] Changes to eliot/dic/dic_search.c [antoine-1] |
Date: |
Sun, 23 Oct 2005 16:58:28 -0400 |
Index: eliot/dic/dic_search.c
diff -u eliot/dic/dic_search.c:1.12.2.2 eliot/dic/dic_search.c:1.12.2.3
--- eliot/dic/dic_search.c:1.12.2.2 Sun Oct 23 18:38:18 2005
+++ eliot/dic/dic_search.c Sun Oct 23 20:58:19 2005
@@ -17,8 +17,6 @@
/* along with this program; if not, write to the Free Software */
/* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id: dic_search.c,v 1.12.2.2 2005/10/23 18:38:18 afrab Exp $ */
-
/**
* \file dic_search.c
* \brief Dictionary lookup functions
@@ -342,8 +340,8 @@
void
-Dic_search_cross_rec(struct params_cross_t *params,
- char wordlist[RES_CROS_MAX][DIC_WORD_MAX],
+Dic_search_cross_rec(struct params_cross_t *params,
+ char wordlist[RES_CROS_MAX][DIC_WORD_MAX],
Dawg_edge *edgeptr)
{
Dawg_edge *current = params->dic->dawg + edgeptr->ptr;
@@ -420,7 +418,7 @@
int minlength;
int maxlength;
automaton automaton;
- struct search_RegE_list_t *charlist;
+ struct search_RegE_list_t *charlist;
char word[DIC_WORD_MAX];
int wordlen;
int wordlistlen;
@@ -428,9 +426,9 @@
};
void
-Dic_search_regexp_rec(struct params_regexp_t *params,
+Dic_search_regexp_rec(struct params_regexp_t *params,
int state,
- Dawg_edge *edgeptr,
+ Dawg_edge *edgeptr,
char wordlist[RES_REGE_MAX][DIC_WORD_MAX])
{
int next_state;
@@ -439,13 +437,13 @@
if (automaton_get_accept(params->automaton,state) && edgeptr->term)
{
int l = strlen(params->word);
- if (params->wordlistlen < params->wordlistlenmax &&
+ if (params->wordlistlen < params->wordlistlenmax &&
params->minlength <= l &&
params->maxlength >= l)
{
strcpy(wordlist[params->wordlistlen++],params->word);
}
- }
+ }
/* we now drive the search by exploring the dictionary */
current = params->dic->dawg + edgeptr->ptr;
do {
@@ -464,10 +462,10 @@
}
- /**
+ /**
* function prototype for parser generated by bison
*/
-int regexpparse(yyscan_t scanner, NODE** root,
+int regexpparse(yyscan_t scanner, NODE** root,
struct search_RegE_list_t *list,
struct regexp_error_report_t *err);
@@ -477,8 +475,8 @@
struct search_RegE_list_t *list)
{
int i,p,n,value;
- int ptl[REGEXP_MAX+1];
- int PS [REGEXP_MAX+1];
+ int ptl[REGEXP_MAX+1];
+ int PS [REGEXP_MAX+1];
NODE* root;
yyscan_t scanner;
YY_BUFFER_STATE buf;
@@ -519,7 +517,7 @@
#ifdef DEBUG_FLEX_IS_BROKEN
fprintf(stderr,"parser error at pos %d - %d : %s\n",
report.pos1, report.pos2, report.msg);
-#endif
+#endif
regexp_delete_tree(root);
return ;
}
@@ -544,7 +542,7 @@
params.wordlistlen = 0;
params.wordlistlenmax = RES_REGE_MAX;
Dic_search_regexp_rec(¶ms, automaton_get_init(a), dic->dawg +
dic->root, wordlist);
-
+
automaton_delete(a);
}
regexp_delete_tree(root);