diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-15 04:22:02 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-15 04:22:02 +0000 |
commit | 757a5d508b180f5bb8e6b6251e49252f8c554a6a (patch) | |
tree | 3b8616f7b7f41cd1e9b48ae90c8374d6be0100a8 /wk5/pset/speller/dictionary.c | |
parent | de9458b0a8693c83299202d37406da4ad4d46a1e (diff) |
Sun, Apr 14, 2024, 9:22 PM -07:00
Diffstat (limited to 'wk5/pset/speller/dictionary.c')
-rw-r--r-- | wk5/pset/speller/dictionary.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index 695286a..27bbeaa 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -54,8 +54,14 @@ unsigned int size(void) { // TODO char c; - while (fread(&c, 1, 1, )) - return 0; + while (fread(&c, 1, 1, file)) + { + if (c == "\n") + { + n++; + } + } + return n; } // Unloads dictionary from memory, returning true if successful, else false |