Helper functions to get config values. More...
#include "config.h"
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "mutt/lib.h"
#include "helpers.h"
#include "quad.h"
#include "set.h"
#include "subset.h"
#include "types.h"
Go to the source code of this file.
Functions | |
bool | cs_subset_bool (const struct ConfigSubset *sub, const char *name) |
Get a boolean config item by name. | |
unsigned char | cs_subset_enum (const struct ConfigSubset *sub, const char *name) |
Get a enumeration config item by name. | |
long | cs_subset_long (const struct ConfigSubset *sub, const char *name) |
Get a long config item by name. | |
struct MbTable * | cs_subset_mbtable (const struct ConfigSubset *sub, const char *name) |
Get a Multibyte table config item by name. | |
short | cs_subset_number (const struct ConfigSubset *sub, const char *name) |
Get a number config item by name. | |
const char * | cs_subset_path (const struct ConfigSubset *sub, const char *name) |
Get a path config item by name. | |
enum QuadOption | cs_subset_quad (const struct ConfigSubset *sub, const char *name) |
Get a quad-value config item by name. | |
const struct Regex * | cs_subset_regex (const struct ConfigSubset *sub, const char *name) |
Get a regex config item by name. | |
const struct Slist * | cs_subset_slist (const struct ConfigSubset *sub, const char *name) |
Get a string-list config item by name. | |
short | cs_subset_sort (const struct ConfigSubset *sub, const char *name) |
Get a sort config item by name. | |
const char * | cs_subset_string (const struct ConfigSubset *sub, const char *name) |
Get a string config item by name. | |
Helper functions to get config values.
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/.
Definition in file helpers.c.
bool cs_subset_bool | ( | const struct ConfigSubset * | sub, |
const char * | name | ||
) |
Get a boolean config item by name.
sub | Config Subset |
name | Name of config item |
bool | Boolean value |
Definition at line 47 of file helpers.c.
unsigned char cs_subset_enum | ( | const struct ConfigSubset * | sub, |
const char * | name | ||
) |
Get a enumeration config item by name.
sub | Config Subset |
name | Name of config item |
num | Enumeration |
Definition at line 71 of file helpers.c.
long cs_subset_long | ( | const struct ConfigSubset * | sub, |
const char * | name | ||
) |
Get a long config item by name.
sub | Config Subset |
name | Name of config item |
num | Long value |
Definition at line 95 of file helpers.c.
struct MbTable * cs_subset_mbtable | ( | const struct ConfigSubset * | sub, |
const char * | name | ||
) |
Get a Multibyte table config item by name.
sub | Config Subset |
name | Name of config item |
ptr | Multibyte table |
Definition at line 119 of file helpers.c.
short cs_subset_number | ( | const struct ConfigSubset * | sub, |
const char * | name | ||
) |
Get a number config item by name.
sub | Config Subset |
name | Name of config item |
num | Number |
Definition at line 143 of file helpers.c.
const char * cs_subset_path | ( | const struct ConfigSubset * | sub, |
const char * | name | ||
) |
Get a path config item by name.
sub | Config Subset |
name | Name of config item |
ptr | Path |
NULL | Empty path |
Definition at line 168 of file helpers.c.
enum QuadOption cs_subset_quad | ( | const struct ConfigSubset * | sub, |
const char * | name | ||
) |
Get a quad-value config item by name.
sub | Config Subset |
name | Name of config item |
num | Quad-value |
Definition at line 192 of file helpers.c.
const struct Regex * cs_subset_regex | ( | const struct ConfigSubset * | sub, |
const char * | name | ||
) |
Get a regex config item by name.
sub | Config Subset |
name | Name of config item |
ptr | Regex |
NULL | Empty regex |
Definition at line 217 of file helpers.c.
const struct Slist * cs_subset_slist | ( | const struct ConfigSubset * | sub, |
const char * | name | ||
) |
Get a string-list config item by name.
sub | Config Subset |
name | Name of config item |
ptr | String list |
NULL | Empty string list |
Definition at line 242 of file helpers.c.
short cs_subset_sort | ( | const struct ConfigSubset * | sub, |
const char * | name | ||
) |
Get a sort config item by name.
sub | Config Subset |
name | Name of config item |
num | Sort |
Definition at line 266 of file helpers.c.
const char * cs_subset_string | ( | const struct ConfigSubset * | sub, |
const char * | name | ||
) |
Get a string config item by name.
sub | Config Subset |
name | Name of config item |
ptr | String |
NULL | Empty string |
Definition at line 291 of file helpers.c.