first 'zparsetext'.
#include <stdio.h>
#include "dictre.h"
static void new_word(const char *str)
{
printf("%s\n", str);
}
void zprocess_def(const char *root, char *def)
{
int index = 0;
int res;
/* Jump the first line (index word) Wait for \n */
skip_newline(def, &index);
++index;
res = until_newword(def, &index);
if (res == -1)
return;
/* Mark words */
do {
int end;
end = index;
res = until_noword(def, &end);
if (res == -1)
break;
def[end] = 0;
insert_word(&def[index], root);
index = end+1;
res = until_newword(def,&index);
if (res == -1)
break;
} while (1);
free(def);
free(root);
}