diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-09-02 16:10:59 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-09-02 16:14:43 +0100 |
commit | c9b6b04d190c1f9d0c4dfd7c4e66ac0743be18fd (patch) | |
tree | b15cb3c1d407bee7b8dfdd330f46b8cb084328de /lib.h | |
parent | f1891b0c2e85262a8f2dc0a0d13eea192fe00c26 (diff) | |
download | obf-c9b6b04d190c1f9d0c4dfd7c4e66ac0743be18fd.tar.gz obf-c9b6b04d190c1f9d0c4dfd7c4e66ac0743be18fd.tar.bz2 obf-c9b6b04d190c1f9d0c4dfd7c4e66ac0743be18fd.zip |
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
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +#ifndef LIB_H +#define LIB_H + +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> + +#define MAX(a, b) (a > b ? a : b) + +bool usable_character(char c); +char *fread_all(FILE *fp); +void print_error(const char *handle, size_t row, size_t column, + const char *reason); + +typedef struct Buffer +{ + const char *name; + size_t size; + char data[]; +} buffer_t; + +buffer_t *buffer_init_str(const char *name, const char *str, size_t str_size); +#endif |