chiark / gitweb /
tree-wide: make ++/-- usage consistent WRT spacing
[elogind.git] / src / basic / fileio.h
index b2f1b0dc6aeab85397b61914e7988b6540d5ff8c..0635147b756d38c9fe96c6fe48d7ab82a3118714 100644 (file)
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
 #pragma once
 
 /***
@@ -47,19 +45,21 @@ int read_full_stream(FILE *f, char **contents, size_t *size);
 int verify_file(const char *fn, const char *blob, bool accept_extra_nl);
 
 int parse_env_file(const char *fname, const char *separator, ...) _sentinel_;
+#if 0 /// UNNEEDED by elogind
 int load_env_file(FILE *f, const char *fname, const char *separator, char ***l);
 int load_env_file_pairs(FILE *f, const char *fname, const char *separator, char ***l);
 
 int write_env_file(const char *fname, char **l);
-#if 0 /// UNNEEDED by elogind
+
 int executable_is_script(const char *path, char **interpreter);
 #endif // 0
+
 int get_proc_field(const char *filename, const char *pattern, const char *terminator, char **field);
 
 DIR *xopendirat(int dirfd, const char *name, int flags);
 
-int search_and_fopen(const char *path, const char *mode, const char *root, const char **search, FILE **_f);
 #if 0 /// UNNEEDED by elogind
+int search_and_fopen(const char *path, const char *mode, const char *root, const char **search, FILE **_f);
 int search_and_fopen_nulstr(const char *path, const char *mode, const char *root, const char *search, FILE **_f);
 #endif // 0
 #define FOREACH_LINE(line, f, on_error)                         \
@@ -80,10 +80,12 @@ int open_tmpfile(const char *path, int flags);
 #endif // 0
 
 int tempfn_xxxxxx(const char *p, const char *extra, char **ret);
-int tempfn_random(const char *p, const char *extra, char **ret);
 #if 0 /// UNNEEDED by elogind
+int tempfn_random(const char *p, const char *extra, char **ret);
 int tempfn_random_child(const char *p, const char *extra, char **ret);
 
 int write_timestamp_file_atomic(const char *fn, usec_t n);
 int read_timestamp_file(const char *fn, usec_t *ret);
+
+int fputs_with_space(FILE *f, const char *s, const char *separator, bool *space);
 #endif // 0