PatchworkOS
Loading...
Searching...
No Matches
readf.c
Go to the documentation of this file.
1#include <errno.h>
2#include <stdarg.h>
3#include <stdio.h>
4#include <sys/io.h>
5
6uint64_t readf(fd_t fd, const char* _RESTRICT format, ...)
7{
8 va_list args;
9 va_start(args, format);
10 uint64_t result = vreadf(fd, format, args);
11 va_end(args);
12 return result;
13}
uint64_t readf(fd_t fd, const char *_RESTRICT format,...)
Wrapper for reading a formatted string from a file.
Definition readf.c:6
uint64_t vreadf(fd_t fd, const char *_RESTRICT format, va_list args)
Wrapper for reading a formatted string from a file with a va_list.
Definition vreadf.c:6
__UINT64_TYPE__ fd_t
A file descriptor.
Definition fd_t.h:12
#define _RESTRICT
Definition config.h:17
#define va_start(ap, parmN)
Definition stdarg.h:14
#define va_end(ap)
Definition stdarg.h:13
__builtin_va_list va_list
Definition stdarg.h:9
__UINT64_TYPE__ uint64_t
Definition stdint.h:17