26 #define ANSI_RED "\x1b[31m"
27 #define ANSI_GREEN "\x1b[32m"
28 #define ANSI_YELLOW "\x1b[33m"
29 #define ANSI_BLUE "\x1b[34m"
30 #define ANSI_MAGENTA "\x1b[35m"
31 #define ANSI_CYAN "\x1b[36m"
32 #define ASNI_WHITE "\x1b[37m"
34 #define ANSI_RESET "\x1b[0m"
36 #if defined(__GNUC__) || defined(__clang__)
37 #define CHECK_PRINTF_FMT(a, b) __attribute__ ((format (printf, a, b)))
39 #define CHECK_PRINTF_FMT(...)
57 char fpeek(FILE *stream);
60 char fspeek(FILE *stream,
long int offset,
int position);
62 int frpeek(FILE *stream,
char c);
64 int frdpeek(FILE *stream,
char d) ;
68 int fcopy(FILE *dest, FILE *src);
70 int fexists(
const char *file);
72 int fmove(
const char *oldpath,
char *newpath);
78 void sgets(
char* str,
int n);
80 bool promptYesOrNo(
const char *question);
87 void printb(
void const *
const ptr);
90 CHECK_PRINTF_FMT(1, 2) void eprintf(const
char *fmt, ...);
92 CHECK_PRINTF_FMT(1, 3)
void cprintf(const
char * color, const
char * fmt, ...);
int fcounts(FILE *stream)
Character count of current line of buffer.
Definition: io.c:105
int frpeek(FILE *stream, char c)
A recursive peek that goes to end of line or EOF to get # of occurences.
Definition: io.c:60
char fspeek(FILE *stream, long int offset, int position)
View a character at position without moving pointer; Peeks a seek.
Definition: io.c:41
int frdpeek(FILE *stream, char d)
A recursive peek that goes till the delimter d.
Definition: io.c:81
int fcopy(FILE *dest, FILE *src)
Copies data from src file tp dest file.
Definition: io.c:123
char fpeek(FILE *stream)
View the next character in stream, doesn't move pointer.
Definition: io.c:19
wchar_t fpeek_wc(FILE *stream)
Same as fpeek but for wchar_t.
Definition: io.c:30
New functions and types related to string and string manipulation.