2019-03-08 18:18:31 +01:00
|
|
|
/* SPDX-License-Identifier: ISC */
|
2019-01-19 17:26:41 +01:00
|
|
|
#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);
|
|
|
|
|
2019-01-29 22:03:33 +01:00
|
|
|
int mkdir_p(const char *path);
|
|
|
|
|
2019-03-08 09:24:10 +01:00
|
|
|
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);
|
|
|
|
|
2019-01-19 17:26:41 +01:00
|
|
|
#endif /* UTIL_H */
|