2013-12-08 19:46:40 +00:00
|
|
|
/*
|
|
|
|
* mbsync - mailbox synchronizer
|
|
|
|
* Copyright (C) 2000-2002 Michael R. Elkins <me@mutt.org>
|
|
|
|
* Copyright (C) 2002-2006,2010-2012 Oswald Buddenhagen <ossi@users.sf.net>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* As a special exception, mbsync may be linked with the OpenSSL library,
|
|
|
|
* despite that library's more restrictive license.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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;
|
deprecate master/slave terminology
the underlying metaphor refers to an inhumane practice, so using it
casually is rightfully offensive to many people. it isn't even a
particularly apt metaphor, as it suggests a strict hierarchy that is
counter to mbsync's highly symmetrical mode of operation.
the far/near terminology has been chosen as the replacement, as it is a
natural fit for the push/pull terminology. on the downside, due to these
not being nouns, a few uses are a bit awkward, and several others had to
be amended to include 'side'. also, it's conceptually quite close to
remote/local, which matches the typical use case, but is maybe a bit too
suggestive of actually non-existing limitations.
the new f/n suffixes of the -C/-R/-X options clash with pre-existing
options, so direct concatenation of short options is even less practical
than before (some suffixes of -D already clashed), but doing that leads
to unreadable command lines anyway.
as with previous deprecations, all pre-existing command line and config
options keep working, but yield a warning. the state files are silently
upgraded.
2020-07-22 17:44:26 +00:00
|
|
|
int ms_warn;
|
2013-12-08 19:46:40 +00:00
|
|
|
char *cmd, *val, *rest;
|
|
|
|
} conffile_t;
|
|
|
|
|
2014-07-12 18:35:55 +00:00
|
|
|
#define ARG_OPTIONAL 0
|
|
|
|
#define ARG_REQUIRED 1
|
|
|
|
|
|
|
|
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 );
|
|
|
|
int merge_ops( int cops, int ops[] );
|
2020-10-05 09:56:30 +00:00
|
|
|
int load_config( const char *filename );
|
2013-12-08 19:46:40 +00:00
|
|
|
|
|
|
|
#endif
|