dic_search.h

Go to the documentation of this file.
00001 /* Eliot                                                                     */
00002 /* Copyright (C) 1999  Antoine Fraboulet                                     */
00003 /*                                                                           */
00004 /* This file is part of Eliot.                                               */
00005 /*                                                                           */
00006 /* Eliot is free software; you can redistribute it and/or modify             */
00007 /* it under the terms of the GNU General Public License as published by      */
00008 /* the Free Software Foundation; either version 2 of the License, or         */
00009 /* (at your option) any later version.                                       */
00010 /*                                                                           */
00011 /* Eliot is distributed in the hope that it will be useful,                  */
00012 /* but WITHOUT ANY WARRANTY; without even the implied warranty of            */
00013 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             */
00014 /* GNU General Public License for more details.                              */
00015 /*                                                                           */
00016 /* You should have received a copy of the GNU General Public License         */
00017 /* along with this program; if not, write to the Free Software               */
00018 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00019 
00020 /**
00021  *  \file   dic_search.h
00022  *  \brief  Dictionary lookup functions
00023  *  \author Antoine Fraboulet
00024  *  \date   2002
00025  */
00026 
00027 #ifndef _DIC_SEARCH_H_
00028 #define _DIC_SEARCH_H_
00029 #if defined(__cplusplus)
00030 extern "C"
00031   {
00032 #endif
00033 
00034     /**
00035      * number of results for Rack+1 search (Dic_search_7pl1)
00036      */
00037 #define RES_7PL1_MAX 200
00038 
00039     /**
00040      * number of results for Extensions search (Dic_search_Racc)
00041      */
00042 #define RES_RACC_MAX 100
00043 
00044     /**
00045      * number of results for Benjamin search (Dic_search_Benj)
00046      */
00047 #define RES_BENJ_MAX 100
00048 
00049     /**
00050      * number of results for CrossWords search (Dic_search_Cros)
00051      */
00052 #define RES_CROS_MAX 200
00053 
00054     /**
00055      * number of results for Regular Expression search (Dic_search_RegE)
00056      */
00057 #define RES_REGE_MAX 200
00058 
00059     /**
00060      * Search for a word in the dictionnary
00061      * @param dic : dictionary
00062      * @param path : lookup word
00063      * @return 1 present, 0 error
00064      */
00065 int  Dic_search_word(Dictionary dic, const char* path);
00066 
00067     /**
00068      * Search for all feasible word with "rack" plus one letter
00069      * @param dic : dictionary
00070      * @param rack : letters
00071      * @param wordlist : results
00072      */
00073 void Dic_search_7pl1(Dictionary dic, const char* rack, char wordlist[DIC_LETTERS][RES_7PL1_MAX][DIC_WORD_MAX], int joker);
00074 
00075     /**
00076      * Search for all feasible word adding a letter in front or at the end
00077      * @param dic : dictionary
00078      * @param word : word
00079      * @param wordlist : results
00080      */
00081 void Dic_search_Racc(Dictionary dic, const char* word, char wordlist[RES_RACC_MAX][DIC_WORD_MAX]);
00082 
00083     /**
00084      * Search for benjamins
00085      * @param dic : dictionary
00086      * @param rack : letters
00087      * @param wordlist : results
00088      */
00089 void Dic_search_Benj(Dictionary dic, const char* word, char wordlist[RES_BENJ_MAX][DIC_WORD_MAX]);
00090 
00091     /**
00092      * Search for crosswords
00093      * @param dic : dictionary
00094      * @param rack : letters
00095      * @param wordlist : results
00096      */
00097 void Dic_search_Cros(Dictionary dic, const char* mask, char wordlist[RES_CROS_MAX][DIC_WORD_MAX]);
00098 
00099     /**
00100      * Search for words matching a regular expression
00101      * @param dic : dictionary
00102      * @param re : regular expression
00103      * @param wordlist : results
00104      */
00105 void Dic_search_RegE(Dictionary dic, const char* re, char wordlist[RES_REGE_MAX][DIC_WORD_MAX], struct search_RegE_list_t *list);
00106 
00107 #if defined(__cplusplus)
00108   }
00109 #endif
00110 #endif /* _DIC_SEARCH_H_ */

Generated on Thu Dec 29 02:01:14 2005 for Eliot by  doxygen 1.4.5