1
0
Fork 0
mirror of https://github.com/pygos/pkg-utils.git synced 2024-05-19 12:46:13 +02:00
pkg-utils/include/util/util.h
David Oberhollenzer f7e4aec2ea Add utility function to iterate over lines in a file
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-08 17:32:59 +01:00

20 lines
422 B
C

#ifndef UTIL_H
#define UTIL_H
#include <sys/types.h>
int canonicalize_name(char *filename);
ssize_t write_retry(int fd, void *data, size_t size);
ssize_t read_retry(int fd, void *buffer, size_t size);
int mkdir_p(const char *path);
typedef int (*linecb_t)(void *usr, const char *filename,
size_t linenum, char *line);
int foreach_line_in_file(const char *filename, void *usr, linecb_t fun);
#endif /* UTIL_H */