xtralib
0.1.0
A simple header-based drop-in library
|
New functions related to file handling and writing to stdout. More...
#include "common.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdlib.h>
#include <wchar.h>
#include <unistd.h>
#include <sys/shm.h>
#include <string.h>
#include <ctype.h>
Go to the source code of this file.
Typedefs | |
typedef uint8_t | u8 |
Functions | |
char | fpeek (FILE *stream) |
View the next character in stream, doesn't move pointer. More... | |
wchar_t | fpeek_wc (FILE *stream) |
Same as fpeek but for wchar_t. | |
char | fspeek (FILE *stream, long int offset, int position) |
View a character at position without moving pointer; Peeks a seek. More... | |
int | frpeek (FILE *stream, char c) |
A recursive peek that goes to end of line or EOF to get # of occurences. | |
int | frdpeek (FILE *stream, char d) |
A recursive peek that goes till the delimter d . | |
int | fcounts (FILE *stream) |
Character count of current line of buffer. | |
int | fcopy (FILE *dest, FILE *src) |
Copies data from src file tp dest file. | |
int | fexists (const char *file) |
int | fmove (const char *oldpath, char *newpath) |
void | sgets (char *str, int n) |
bool | promptYesOrNo (const char *question) |
void | printb (void const *const ptr) |
CHECK_PRINTF_FMT (1, 2) void eprintf(const char *fmt | |
CHECK_PRINTF_FMT (1, 3) void cprintf(const char *color | |
Variables | |
const char * | fmt |
New functions related to file handling and writing to stdout.
char fpeek | ( | FILE * | stream | ) |
View the next character in stream, doesn't move pointer.
char fspeek | ( | FILE * | stream, |
long int | offset, | ||
int | position | ||
) |
View a character at position without moving pointer; Peeks a seek.