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> |
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 |
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 |
{ |
{ |
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"); |