diff options
author | Preston Pan <preston@nullring.xyz> | 2024-01-05 20:32:11 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2024-01-05 20:32:11 -0800 |
commit | 4590a4995424e9dbd79bf0761490c53ce8064b8c (patch) | |
tree | 15187a9a4a0c188add0b8af32ef5a19431da7ad3 /main.c | |
parent | 77262bf18c407e04b926a0efbea09b31c672f374 (diff) |
add some documentation
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -33,8 +33,12 @@ int main(int argc, char **argv) { version(); } - FILE *fp = fopen(argv[1], "rb"); - ssize_t bytes_read = getdelim(&INBUF, &len, '\0', fp); + FILE *FP = fopen(argv[1], "rb"); + ssize_t bytes_read = getdelim(&INBUF, &len, '\0', FP); + if (FP != NULL) { + fflush(FP); + fclose(FP); + } PARSER = init_parser(INBUF); STACK = init_array(10); |