Commit Graph

6 Commits

Author SHA1 Message Date
Aryadev Chavali
e5cba43a0e New module for parser functions
Same principle as main->lib (previous commit).
2023-09-02 16:14:49 +01:00
Aryadev Chavali
c9b6b04d19 New module for functions I no longer need to work on
lib.(h|c) basically has structures and functions I no longer want to
stare at in main.c
2023-09-02 16:14:43 +01:00
Aryadev Chavali
f1891b0c2e Better command line usage
Now you can use command line arguments to list a set of input files
for the interpreter to use.

Currently outputs the data parsed per file.
2023-09-02 16:06:09 +01:00
Aryadev Chavali
89b9c0f94d Chunk allocator for file handling
Apparently you can't just `fseek` because it's "not portable" and
"deeply offensive" or whatever, so here's a really dirty chunk based
allocator which uses `fread` to just read chunks of data at a time and
basically runs around this issue.

While it's slower than an fseek solution for general files, this
solution allows pipes and other _weird_ things that count as "files"
to just werk.
2023-09-02 15:52:40 +01:00
Aryadev Chavali
7d369f6fad Better error reporting
Using a buffer structure allows me to pass more information to
callers and a bit more discretion over how data is passed.

Better error reporting via having a file handle and reporting it
Emacs/GCC style.
2023-09-02 15:39:51 +01:00
Aryadev Chavali
2d33640c03 INIT
Simple parser, took like an hour.

Not very smart but at least it's like O(n).
2023-09-02 15:21:56 +01:00