[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Eliot-dev] Changes to eliot/dic/listdic.c [antoine-1]
From: |
eliot-dev |
Subject: |
[Eliot-dev] Changes to eliot/dic/listdic.c [antoine-1] |
Date: |
Sun, 23 Oct 2005 16:58:32 -0400 |
Index: eliot/dic/listdic.c
diff -u eliot/dic/listdic.c:1.4.2.2 eliot/dic/listdic.c:1.4.2.3
--- eliot/dic/listdic.c:1.4.2.2 Sun Oct 23 18:38:18 2005
+++ eliot/dic/listdic.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: listdic.c,v 1.4.2.2 2005/10/23 18:38:18 afrab Exp $ */
-
/**
* \file listdic.c
* \brief Program used to list a dictionary
@@ -39,24 +37,24 @@
if (i.term) /* edge points at a complete word */
{
*s = '\0';
- fprintf (out,"%s\n", buf);
+ fprintf (out,"%s\n", buf);
}
- if (i.ptr)
+ if (i.ptr)
{ /* Compute index: is it non-zero ? */
Dawg_edge *p = dic->dawg + i.ptr;
do { /* for each edge out of this node */
*s = p->chr + 'a' - 1;
- print_dic_rec (out,dic,buf,s + 1, *p);
+ print_dic_rec (out,dic,buf,s + 1, *p);
}
while (!(*p++).last);
}
}
-void
+void
dic_load(Dictionary* dic, char* filename)
{
int res;
- if ((res = Dic_load(dic, filename)) != 0)
+ if ((res = Dic_load(dic, filename)) != 0)
{
switch (res) {
case 1: printf("chargement: problème d'ouverture de %s\n",filename);
break;
@@ -76,7 +74,7 @@
FILE* fout;
Dictionary dic;
static char buf[80];
-
+
dic_load(&dic,filename);
if (strcmp(out,"stdout") == 0)
@@ -178,7 +176,7 @@
int i;
Dictionary dic;
dic_load(&dic,filename);
-
+
printf("offs binary structure \n");
printf("---- -------- | ------------------\n");
for(i=0; i < (dic->nedges + 1); i++)
@@ -197,7 +195,7 @@
}
-int
+int
main(int argc, char *argv[])
{
int arg_count;
@@ -206,12 +204,12 @@
int option_print_dic_hex = 0;
int option_print_dic_list = 0;
- if (argc < 2)
+ if (argc < 2)
{
usage(argv[0]);
exit(1);
}
-
+
arg_count = 1;
while(argv[arg_count][0] == '-')
{
@@ -226,7 +224,7 @@
}
arg_count++;
}
-
+
if (option_print_header || option_print_all)
{
print_header(argv[arg_count]);