Skip to content
Snippets Groups Projects
Commit 5be87a14 authored by Franck Dary's avatar Franck Dary
Browse files

Fixed a mistake on the getter and added a way to get the current state of the global variable

parent 70a4f826
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
#define DICO_START_STR "##_DICO_START_##"
#define DICO_END_STR "##_DICO_END_##"
typedef struct
struct dico
{
char *name;
int nbelem;
......@@ -16,7 +16,7 @@ typedef struct
hash *htable;
char **array;
static bool add_unknown_strings;
} dico;
};
dico *dico_new(char *name, int size);
void dico_free(dico *d);
......@@ -29,6 +29,7 @@ dico *dico_read(char *filename, float ratio);
dico *dico_read_fh(FILE *f, float ratio);
dico *dico_extract_from_corpus(char *filename, int column, char *dico_name);
bool dico_get_add_unknown_strings();
void dico_set_add_unknown_strings();
void dico_unset_add_unknown_strings();
......
......@@ -6,6 +6,11 @@
bool dico::add_unknown_strings;
bool dico_get_add_unknown_strings()
{
return dico::add_unknown_strings;
}
void dico_set_add_unknown_strings()
{
dico::add_unknown_strings = true;
......@@ -13,7 +18,7 @@ void dico_set_add_unknown_strings()
void dico_unset_add_unknown_strings()
{
dico::add_unknown_strings = true;
dico::add_unknown_strings = false;
}
dico *dico_new(char *name, int size)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment