config.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * mbsync - mailbox synchronizer
  3. * Copyright (C) 2000-2002 Michael R. Elkins <me@mutt.org>
  4. * Copyright (C) 2002-2006,2010-2012 Oswald Buddenhagen <ossi@users.sf.net>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. * As a special exception, mbsync may be linked with the OpenSSL library,
  20. * despite that library's more restrictive license.
  21. */
  22. #ifndef CONFIG_H
  23. #define CONFIG_H
  24. #include "common.h"
  25. typedef struct conffile {
  26. const char *file;
  27. FILE *fp;
  28. char *buf;
  29. int bufl;
  30. int line;
  31. int err;
  32. char *cmd, *val, *rest;
  33. } conffile_t;
  34. int parse_bool( conffile_t *cfile );
  35. int parse_int( conffile_t *cfile );
  36. int parse_size( conffile_t *cfile );
  37. int getcline( conffile_t *cfile );
  38. int merge_ops( int cops, int ops[] );
  39. int load_config( const char *filename, int pseudo );
  40. #endif