#include "types.h"
/**
- * bool_values - Valid strings for creating a Bool
+ * BoolValues - Valid strings for creating a Bool
*
* These strings are case-insensitive.
*/
-const char *bool_values[] = {
+const char *BoolValues[] = {
"no", "yes", "n", "y", "false", "true", "0", "1", "off", "on", NULL,
};
return CSR_ERR_CODE; /* LCOV_EXCL_LINE */
int num = -1;
- for (size_t i = 0; bool_values[i]; i++)
+ for (size_t i = 0; BoolValues[i]; i++)
{
- if (mutt_str_strcasecmp(bool_values[i], value) == 0)
+ if (mutt_str_strcasecmp(BoolValues[i], value) == 0)
{
num = i % 2;
break;
return CSR_ERR_INVALID | CSR_INV_TYPE;
}
- mutt_buffer_addstr(result, bool_values[index]);
+ mutt_buffer_addstr(result, BoolValues[index]);
return CSR_SUCCESS;
}
struct ConfigSet;
struct HashElem;
-extern const char *bool_values[];
+extern const char *BoolValues[];
void bool_init(struct ConfigSet *cs);
int bool_he_toggle(struct ConfigSet *cs, struct HashElem *he, struct Buffer *err);
#include "types.h"
/**
- * magic_values - Valid strings for mailbox types
+ * MagicValues - Valid strings for mailbox types
+ *
+ * These strings are case-insensitive.
*/
-const char *magic_values[] = {
+const char *MagicValues[] = {
NULL, "mbox", "MMDF", "MH", "Maildir", NULL,
};
}
int num = -1;
- for (size_t i = 1; magic_values[i]; i++)
+ for (size_t i = 1; MagicValues[i]; i++)
{
- if (mutt_str_strcasecmp(magic_values[i], value) == 0)
+ if (mutt_str_strcasecmp(MagicValues[i], value) == 0)
{
num = i;
break;
else
value = (int) cdef->initial;
- if ((value < 1) || (value >= (mutt_array_size(magic_values) - 1)))
+ if ((value < 1) || (value >= (mutt_array_size(MagicValues) - 1)))
{
mutt_debug(1, "Variable has an invalid value: %d\n", value);
return CSR_ERR_INVALID | CSR_INV_TYPE;
}
- mutt_buffer_addstr(result, magic_values[value]);
+ mutt_buffer_addstr(result, MagicValues[value]);
return CSR_SUCCESS;
}
if (!cs || !var || !cdef)
return CSR_ERR_CODE; /* LCOV_EXCL_LINE */
- if ((value < 1) || (value >= (mutt_array_size(magic_values) - 1)))
+ if ((value < 1) || (value >= (mutt_array_size(MagicValues) - 1)))
{
mutt_buffer_printf(err, "Invalid magic value: %ld", value);
return CSR_ERR_INVALID | CSR_INV_TYPE;
struct ConfigSet;
-extern const char *magic_values[];
+extern const char *MagicValues[];
/**
* enum MailboxType - Supported mailbox formats
#include "types.h"
/**
- * quad_values - Valid strings for creating a QuadValue
+ * QuadValues - Valid strings for creating a QuadValue
*
* These strings are case-insensitive.
*/
-const char *quad_values[] = {
+const char *QuadValues[] = {
"no", "yes", "ask-no", "ask-yes", NULL,
};
return CSR_ERR_CODE; /* LCOV_EXCL_LINE */
int num = -1;
- for (size_t i = 0; quad_values[i]; i++)
+ for (size_t i = 0; QuadValues[i]; i++)
{
- if (mutt_str_strcasecmp(quad_values[i], value) == 0)
+ if (mutt_str_strcasecmp(QuadValues[i], value) == 0)
{
num = i;
break;
else
value = (int) cdef->initial;
- if (value >= (mutt_array_size(quad_values) - 1))
+ if (value >= (mutt_array_size(QuadValues) - 1))
{
mutt_debug(1, "Variable has an invalid value: %d\n", value);
return CSR_ERR_INVALID | CSR_INV_TYPE;
}
- mutt_buffer_addstr(result, quad_values[value]);
+ mutt_buffer_addstr(result, QuadValues[value]);
return CSR_SUCCESS;
}
if (!cs || !var || !cdef)
return CSR_ERR_CODE; /* LCOV_EXCL_LINE */
- if ((value < 0) || (value >= (mutt_array_size(quad_values) - 1)))
+ if ((value < 0) || (value >= (mutt_array_size(QuadValues) - 1)))
{
mutt_buffer_printf(err, "Invalid quad value: %ld", value);
return CSR_ERR_INVALID | CSR_INV_TYPE;
char *var = cdef->var;
char value = *var;
- if ((value < 0) || (value >= (mutt_array_size(quad_values) - 1)))
+ if ((value < 0) || (value >= (mutt_array_size(QuadValues) - 1)))
{
mutt_buffer_printf(err, "Invalid quad value: %ld", value);
return CSR_ERR_INVALID | CSR_INV_TYPE;
struct ConfigSet;
struct HashElem;
-extern const char *quad_values[];
+extern const char *QuadValues[];
/**
* enum QuadOption - Possible values for a quad-option
return false;
}
- TEST_MSG("Cherry = %s\n", magic_values[VarCherry]);
+ TEST_MSG("Cherry = %s\n", MagicValues[VarCherry]);
TEST_MSG("Cherry's initial value is %s\n", value.data);
FREE(&value.data);