1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include <stdarg.h> 5 #include <stdio.h> 6 7 #include "macro.h" 8 9 int parse_env_filev(FILE *f, const char *fname, va_list ap); 10 int parse_env_file_sentinel(FILE *f, const char *fname, ...) _sentinel_; 11 #define parse_env_file(f, fname, ...) parse_env_file_sentinel(f, fname, __VA_ARGS__, NULL) 12 int load_env_file(FILE *f, const char *fname, char ***l); 13 int load_env_file_pairs(FILE *f, const char *fname, char ***l); 14 15 int merge_env_file(char ***env, FILE *f, const char *fname); 16 17 int write_env_file(const char *fname, char **l); 18