Commit Graph

9 Commits

Author SHA1 Message Date
Aryadev Chavali
3c39df6c95 Implement SIZE_FMT and vec_append_fmt
SIZE_FMT gets the size of a cstr with the given sprintf formatted
string and arguments using `snprintf`.

vec_append_fmt formats a cstr with the given sprintf arguments then
appends it to the given vector.

This simplifies a little bit of the wordy implementation of the
assembler.
2024-12-24 23:08:52 +00:00
Aryadev Chavali
493b98c524 Change vec_append signature to ensure ptr is constant 2024-12-24 22:54:57 +00:00
Aryadev Chavali
ffc8068a74 Introduce and implement vec_t
A vec_t is a dynamic array, separate to a buffer.  Should make it
easier to distinguish purposes using these two data types.
2024-12-19 08:44:53 +00:00
Aryadev Chavali
2a4d7addae Delete buffer stretchy functions
A buffer should be a strictly sized array representing a file in
memory.  No dynamic size functions.
2024-12-19 08:44:10 +00:00
Aryadev Chavali
22d1f712ae Fix MAX macro 2024-12-19 08:43:38 +00:00
Aryadev Chavali
7554cc40fd Moved MEMORY_DEFAULT to lib.h 2024-12-03 03:17:44 +00:00
Aryadev Chavali
82eec8b529 Implement buffer_t functions to make it stretchy 2024-12-03 03:17:44 +00:00
Aryadev Chavali
c824772fc7 Introduce some nice typedefs in lib.h 2024-12-03 00:21:33 +00: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