diff options
author | Freya Murphy <freya@freyacat.org> | 2024-02-01 15:53:11 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-02-01 15:53:11 -0500 |
commit | ef384ad9a7f81c1b5dac1bb9a80f9faf3e8023df (patch) | |
tree | 8a32d38c8152f57c09e01a39587237c99c4614fc /include | |
parent | update makefile (diff) | |
download | corn-ef384ad9a7f81c1b5dac1bb9a80f9faf3e8023df.tar.gz corn-ef384ad9a7f81c1b5dac1bb9a80f9faf3e8023df.tar.bz2 corn-ef384ad9a7f81c1b5dac1bb9a80f9faf3e8023df.zip |
display mem formatted
Diffstat (limited to 'include')
-rw-r--r-- | include/lib.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/lib.h b/include/lib.h index 3be1f8b..d808833 100644 --- a/include/lib.h +++ b/include/lib.h @@ -157,6 +157,14 @@ char *ultoa(unsigned long int n, char *buffer, int radix); char *ulltoa(unsigned long long int n, char *buffer, int radix); /** + * Converts a byte count to a human readable file size + * @param bytes - the bytes to convert + * @param buf - the buffer to store it in + * @preturns - bus + */ +char *btoa(size_t bytes, char *buf); + +/** * Converts the string in str to an int value based on the given base. * The endptr is updated to where the string was no longer valid. * @param str - the string buffer |