libc8
CHIP-8 utility library
Loading...
Searching...
No Matches
util.h
Go to the documentation of this file.
1
8#ifndef C8_UTIL_H
9#define C8_UTIL_H
10
11#define VERBOSE_PRINT(a, ...) if (a & ARG_VERBOSE) { printf(__VA_ARGS__); }
12
13int hex_to_int(char);
14int parse_int(const char*);
15char* trim(char*);
16
17#endif
char * trim(char *)
Trim leading and trailing whitespace from s
Definition: util.c:86
int hex_to_int(char)
Get the integer value of hexadecimal ASCII representation.
Definition: util.c:25
int parse_int(const char *)
Parse decimal or hexadecimal integer from s
Definition: util.c:48