Fix use of deprecated types, for now and the future.
[gnutls.git] / src / cfg / shared.h
blob8cbb97d56063eb466d61d19196fc50eb90d085a6
1 /*
2 * libcfg+ - precise command line & config file parsing library
4 * shared.h - shared stuff for command line and config file
5 * parsing header file
6 * ____________________________________________________________
8 * Developed by Ondrej Jombik <nepto@platon.sk>
9 * and Lubomir Host <rajo@platon.sk>
10 * Copyright (c) 2001-2004 Platon SDG, http://platon.sk/
11 * All rights reserved.
13 * See README file for more information about this software.
14 * See COPYING file for license information.
16 * Download the latest version from
17 * http://platon.sk/projects/libcfg+/
20 /* $Platon: libcfg+/src/shared.h,v 1.13 2004/01/12 06:03:09 nepto Exp $ */
22 /**
23 * @file shared.h
24 * @brief shared stuff for command line and config file parsing header file
25 * @author Ondrej Jombik <nepto@platon.sk>
26 * @author Lubomir Host <rajo@platon.sk>
27 * @version \$Platon: libcfg+/src/shared.h,v 1.13 2004/01/12 06:03:09 nepto Exp $
28 * @date 2001-2004
31 #ifndef _PLATON_CFG_SHARED_H
32 #define _PLATON_CFG_SHARED_H
34 /**
35 * Free current variables (cur_opt, cur_arg) in context
36 * and sets cur_opt_type to CFG_NONE_OPTION.
38 * @param con initialized context with initialized current variables
39 * @return void
41 void __cfg_free_currents(const CFG_CONTEXT con);
43 /**
44 * Process current option and argument. It suppose that in context con
45 * are cur_opt, cur_arg and cur_type set.
47 * @param con initialized context
48 * @param ret_val option return value (val) @see cfg_context
49 * @param arg_used if option argument was used
50 * @return CFG_OK on success, CFG_ERROR_* on error
52 int __cfg_process_currents(const CFG_CONTEXT con, int *ret_val, int *arg_used);
54 /**
55 * Allocate and initialize variables cur_opt and cur_arg in initialized
56 * command line context according to con->argv[con->cur_idx].
58 * @param con initialized command line context
59 * @return CFG_OK on success, CFG_ERR_NOMEM on not enough memory error
61 int __cfg_cmdline_set_currents(const CFG_CONTEXT con);
63 /**
64 * Allocate and initialize variables cur_opt and cur_arg in initialized
65 * config file context according to input string (parameter buf).
67 * @param con initialized command line context
68 * @param buf input string
69 * @return CFG_OK on success, CFG_ERR_NOMEM on not enough memory error
71 int __cfg_cfgfile_set_currents(const CFG_CONTEXT con, char *buf);
73 #endif /* #ifndef _PLATON_CFG_SHARED_H */