2022-06-16 10:44:35 +00:00
|
|
|
// SPDX-FileCopyrightText: 2000-2002 Michael R. Elkins <me@mutt.org>
|
|
|
|
// SPDX-FileCopyrightText: 2002-2022 Oswald Buddenhagen <ossi@users.sf.net>
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later WITH LicenseRef-isync-GPL-exception
|
2013-12-08 19:46:40 +00:00
|
|
|
/*
|
|
|
|
* mbsync - mailbox synchronizer
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
2017-04-02 13:42:18 +00:00
|
|
|
typedef struct {
|
2013-12-08 19:46:40 +00:00
|
|
|
const char *file;
|
|
|
|
FILE *fp;
|
|
|
|
char *buf;
|
|
|
|
int bufl;
|
|
|
|
int line;
|
|
|
|
int err;
|
2022-01-12 11:49:17 +00:00
|
|
|
int ms_warn, renew_warn;
|
2022-05-30 21:04:52 +00:00
|
|
|
int path_len;
|
2013-12-08 19:46:40 +00:00
|
|
|
char *cmd, *val, *rest;
|
|
|
|
} conffile_t;
|
|
|
|
|
2022-04-24 12:30:10 +00:00
|
|
|
extern char FieldDelimiter;
|
|
|
|
|
2014-07-12 18:35:55 +00:00
|
|
|
#define ARG_OPTIONAL 0
|
|
|
|
#define ARG_REQUIRED 1
|
|
|
|
|
2022-05-30 21:04:52 +00:00
|
|
|
char *expand_strdup( const char *s, const conffile_t *cfile );
|
2022-02-08 14:02:15 +00:00
|
|
|
|
2014-07-12 18:35:55 +00:00
|
|
|
char *get_arg( conffile_t *cfile, int required, int *comment );
|
|
|
|
|
2019-07-28 19:24:17 +00:00
|
|
|
char parse_bool( conffile_t *cfile );
|
2013-12-08 19:46:40 +00:00
|
|
|
int parse_int( conffile_t *cfile );
|
2020-07-08 15:27:37 +00:00
|
|
|
uint parse_size( conffile_t *cfile );
|
2013-12-08 19:46:40 +00:00
|
|
|
int getcline( conffile_t *cfile );
|
2022-01-11 15:16:25 +00:00
|
|
|
int merge_ops( int cops, int ops[], const char *chan_name );
|
2020-10-05 09:56:30 +00:00
|
|
|
int load_config( const char *filename );
|
2013-12-08 19:46:40 +00:00
|
|
|
|
|
|
|
#endif
|