/[eliot]/eliot/dic/regexpmain.c
ViewVC logotype

Diff of /eliot/dic/regexpmain.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by ipkiss, Sun Oct 23 14:53:43 2005 UTC revision 1.8.2.1 by afrab, Sun Oct 23 17:13:56 2005 UTC
# Line 19  Line 19 
19    
20  /* $Id$ */  /* $Id$ */
21    
22    /**
23     *  \file   regexpmain.c
24     *  \brief  Program used to test regexp
25     *  \author Antoine Fraboulet
26     *  \date   2005
27     */
28    
29  #include "config.h"  #include "config.h"
30  #include <stdio.h>  #include <stdio.h>
31  #include <stdlib.h>  #include <stdlib.h>
# Line 56  void init_letter_lists(struct search_Reg Line 63  void init_letter_lists(struct search_Reg
63  {  {
64    int i;    int i;
65    memset (list,0,sizeof(*list));    memset (list,0,sizeof(*list));
66      list->minlength = 1;
67      list->maxlength = 15;
68    list->valid[0] = 1; // all letters    list->valid[0] = 1; // all letters
69    list->symbl[0] = RE_ALL_MATCH;    list->symbl[0] = RE_ALL_MATCH;
70    list->valid[1] = 1; // vowels    list->valid[1] = 1; // vowels
# Line 77  void init_letter_lists(struct search_Reg Line 86  void init_letter_lists(struct search_Reg
86  /********************************************************/  /********************************************************/
87  /********************************************************/  /********************************************************/
88  /********************************************************/  /********************************************************/
89    void
90    usage(int argc, char* argv[])
91    {
92      fprintf(stderr,"usage: %s dictionary\n",argv[0]);
93      fprintf(stderr,"   dictionary : path to dawg eliot dictionary\n");
94    }
95    
96  int main(int argc, char* argv[])  int main(int argc, char* argv[])
97  {  {
# Line 87  int main(int argc, char* argv[]) Line 102  int main(int argc, char* argv[])
102    strcpy(er,".");    strcpy(er,".");
103    struct search_RegE_list_t list;    struct search_RegE_list_t list;
104    
105      if (argc < 2)
106        {
107          usage(argc,argv);
108        }
109    
110    if (Dic_load(&dic,argv[1]))    if (Dic_load(&dic,argv[1]))
111      {      {
112        fprintf(stdout,"impossible de lire le dictionnaire\n");        fprintf(stdout,"impossible de lire le dictionnaire\n");

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.8.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26