summaryrefslogtreecommitdiff
path: root/wk5/pset/speller/dictionary.c
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-04-14 23:48:21 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-04-14 23:48:21 +0000
commitc2506942fdfd43c779c15b23c7ba3afdcc216d6b (patch)
tree3e27e509ef56ebcc82a26892a1fb03df14248d1d /wk5/pset/speller/dictionary.c
parente06adfcd94b39041c59f1bb2263de28012810c6a (diff)
Sun, Apr 14, 2024, 4:48 PM -07:00
Diffstat (limited to 'wk5/pset/speller/dictionary.c')
-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