[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Eliot-dev] Changes to eliot/dic/regexpmain.c
From: |
eliot-dev |
Subject: |
[Eliot-dev] Changes to eliot/dic/regexpmain.c |
Date: |
Sat, 05 Nov 2005 12:56:26 -0500 |
Index: eliot/dic/regexpmain.c
diff -u eliot/dic/regexpmain.c:1.9 eliot/dic/regexpmain.c:1.10
--- eliot/dic/regexpmain.c:1.9 Fri Nov 4 20:00:06 2005
+++ eliot/dic/regexpmain.c Sat Nov 5 17:56:22 2005
@@ -17,6 +17,13 @@
/* along with this program; if not, write to the Free Software */
/* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+/**
+ * \file regexpmain.c
+ * \brief Program used to test regexp
+ * \author Antoine Fraboulet
+ * \date 2005
+ */
+
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
@@ -54,6 +61,8 @@
{
int i;
memset (list,0,sizeof(*list));
+ list->minlength = 1;
+ list->maxlength = 15;
list->valid[0] = 1; // all letters
list->symbl[0] = RE_ALL_MATCH;
list->valid[1] = 1; // vowels
@@ -75,6 +84,12 @@
/********************************************************/
/********************************************************/
/********************************************************/
+void
+usage(int argc, char* argv[])
+{
+ fprintf(stderr,"usage: %s dictionary\n",argv[0]);
+ fprintf(stderr," dictionary : path to dawg eliot dictionary\n");
+}
int main(int argc, char* argv[])
{
@@ -84,6 +99,11 @@
char er[200];
strcpy(er,".");
struct search_RegE_list_t list;
+
+ if (argc < 2)
+ {
+ usage(argc,argv);
+ }
if (Dic_load(&dic,argv[1]))
{