dictre.h
author viric@llimona
Wed, 29 Aug 2007 00:19:14 +0200
changeset 14 a961bb8806b9
parent 10 188a0e3b3fb4
child 15 17a66ceb774a
permissions -rw-r--r--
first 'zparsetext'.

enum {
    MAXWORD=200,
    MAXDEF=10000
};

struct Words
{
    struct Word *first;
    int length;
};

struct Word
{
    char *w;
    int def;
};

struct Def
{
    char *d;
    int offset;
    int length;
};

/* write.c */
void write_dictionary(const char *name);

/* dict.c */
char * get_word(FILE *index);
int get_int(FILE *index);
char * get_def(FILE *fdefs, int offset, int length);
int str2int(const char *str);
int num_to_ia5(char *dest, int n);

/* filter.c */
void filter_all(const char *filter_par);

/* sort.c */
int sort_words();
/* load.c */
void load_init();
void load_dictionary(FILE *index, FILE *fdefs);
void print_words();

/* fastmalloc */
void * fastmalloc(int newsize);

/* repeated.c */
void new_hashdef(struct Def *ptr, int index);
int def_repeated(struct Def *ptr);
void init_repeated();
void remove_def(int i);


/* FOR ZPROCESS */
/* zdefs.c */
void zprocess_def(const char *root, char *def);


/* zhash.c */
void insert_word(const char *word, const char *unflexed);
void init_wordlist();
void dump_wordlist();

/* zrus.c */
char * mix_accents(char *a, const char *b);
void remove_accent(unsigned char *dest, const unsigned char *from);
int until_newword(const unsigned char *str, int *index);
int until_noword(const char *str, int *index);
int skip_newline(const char *str, int *index);
int is_ASCII(unsigned char c);

/* find.c */
void find_def(const char *word, char * def);