summaryrefslogtreecommitdiff
path: root/wk5/pset
diff options
context:
space:
mode:
Diffstat (limited to 'wk5/pset')
-rw-r--r--wk5/pset/speller/dictionary.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c
index 509844d..8625d73 100644
--- a/wk5/pset/speller/dictionary.c
+++ b/wk5/pset/speller/dictionary.c
@@ -36,7 +36,15 @@ unsigned int hash(const char *word)
bool load(const char *dictionary)
{
// TODO
- return fopen(dictionary, "r");
+ FILE *file = fopen(dictionary, "r");
+ if (file != NULL)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
// Returns number of words in dictionary if loaded, else 0 if not yet loaded