util.h (397B)
1 2 #ifndef BTCS_UTIL_H 3 #define BTCS_UTIL_H 4 5 #include <stdbool.h> 6 #include <stdlib.h> 7 #include <stdio.h> 8 #include <stdint.h> 9 10 typedef intptr_t ssize_t; 11 12 13 int read_arg_or_stdin(const char *arg, unsigned char *buf, size_t buflen, size_t *written); 14 bool hex_decode(const char *str, size_t *slen, void *buf, size_t bufsize); 15 ssize_t getline(char **lineptr, size_t *n, FILE *stream); 16 17 #endif /* UTIL_H */