6#define _SCAN_GET(ctx) \
8 fd_t fd = (fd_t)(ctx)->private; \
11 if (read(fd, &c, 1) == 1) \
18#define _SCAN_UNGET(ctx, c) \
20 fd_t fd = (fd_t)(ctx)->private; \
23 seek(fd, -1, SEEK_CUR); \
static char format[MAX_NAME]
static int _scan(const char *_RESTRICT format, va_list arg, void *private)
uint64_t vscan(fd_t fd, const char *format, va_list args)
Wrapper for reading from a file descriptor using scan formatting with va_list.
#define ERR
Integer error value.
__UINT64_TYPE__ fd_t
A file descriptor.
__builtin_va_list va_list
__UINTPTR_TYPE__ uintptr_t