|
Dunst
Lightweight notification daemon
|
#include "option_parser.h"#include <glib.h>#include <stdbool.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include "dunst.h"#include "log.h"#include "utils.h"#include "settings.h"#include "rules.h"#include "settings_data.h"
Include dependency graph for option_parser.c:Go to the source code of this file.
Macros | |
| #define | STRING_PARSE_RET(string, value) |
| #define | UINT_MAX_N(bits) |
Functions | |
| int | string_parse_enum (const void *data, const char *s, void *ret) |
| int | string_parse_enum_list (const void *data, char **s, void *ret_void) |
| int | string_parse_enum_list_to_single (const void *data, char **s, int *ret) |
| Parse a string list of enum values and return a single integer with the values bit-flipped into it. | |
| int | string_parse_corners (const void *data, const char *s, void *ret) |
| bool | string_parse_int_list (char **s, int **ret, bool allow_empty) |
| Parse a list of integers. | |
| int | string_parse_list (const void *data, const char *s, void *ret) |
| int | string_parse_sepcolor (const void *data, const char *s, void *ret) |
| int | string_parse_color (const char *s, struct color *ret) |
| Parse a color string. | |
| int | string_parse_gradient (const char *s, struct gradient **ret) |
| int | string_parse_bool (const void *data, const char *s, void *ret) |
| int | string_parse_maybe_int (const void *data, const char *s, void *ret) |
| Parse a string that may represent an integer value. | |
| int | get_setting_id (const char *key, const char *section) |
| int | string_parse_length (void *ret_in, const char *s) |
| bool | set_from_string (void *target, struct setting setting, const char *value) |
| bool | set_setting (struct setting setting, char *value) |
| int | set_rule_value (struct rule *r, struct setting setting, char *value) |
| bool | set_rule (struct setting setting, char *value, char *section) |
| void | set_defaults (void) |
| void | save_settings (struct ini *ini) |
| void | cmdline_load (int argc, char *argv[]) |
| static int | cmdline_find_option (const char *key, int start) |
| static const char * | cmdline_get_value (const char *key, int start, int *found) |
| char * | cmdline_get_string_offset (const char *key, const char *def, int start, int *found) |
| char * | cmdline_get_string (const char *key, const char *def, const char *description) |
| char * | cmdline_get_path (const char *key, const char *def, const char *description) |
| char ** | cmdline_get_list (const char *key, const char *def, const char *description) |
| gint64 | cmdline_get_time (const char *key, gint64 def, const char *description) |
| int | cmdline_get_int (const char *key, int def, const char *description) |
| double | cmdline_get_double (const char *key, double def, const char *description) |
| int | cmdline_get_bool (const char *key, int def, const char *description) |
| bool | cmdline_is_set (const char *key) |
| void | cmdline_usage_append (const char *key, const char *type, const char *description) |
| const char * | cmdline_create_usage (void) |
Variables | |
| static int | cmdline_argc |
| static char ** | cmdline_argv |
| static char * | usage_str = NULL |
Definition in file option_parser.c.
| #define STRING_PARSE_RET | ( | string, | |
| value ) |
Definition at line 29 of file option_parser.c.
| #define UINT_MAX_N | ( | bits | ) |
Definition at line 203 of file option_parser.c.
| const char * cmdline_create_usage | ( | void | ) |
Definition at line 738 of file option_parser.c.
|
static |
Definition at line 586 of file option_parser.c.
| int cmdline_get_bool | ( | const char * | key, |
| int | def, | ||
| const char * | description ) |
Definition at line 698 of file option_parser.c.
| double cmdline_get_double | ( | const char * | key, |
| double | def, | ||
| const char * | description ) |
Definition at line 687 of file option_parser.c.
| int cmdline_get_int | ( | const char * | key, |
| int | def, | ||
| const char * | description ) |
Definition at line 676 of file option_parser.c.
| char ** cmdline_get_list | ( | const char * | key, |
| const char * | def, | ||
| const char * | description ) |
Definition at line 652 of file option_parser.c.
| char * cmdline_get_path | ( | const char * | key, |
| const char * | def, | ||
| const char * | description ) |
Definition at line 641 of file option_parser.c.
| char * cmdline_get_string | ( | const char * | key, |
| const char * | def, | ||
| const char * | description ) |
Definition at line 635 of file option_parser.c.
| char * cmdline_get_string_offset | ( | const char * | key, |
| const char * | def, | ||
| int | start, | ||
| int * | found ) |
Definition at line 623 of file option_parser.c.
| gint64 cmdline_get_time | ( | const char * | key, |
| gint64 | def, | ||
| const char * | description ) |
Definition at line 663 of file option_parser.c.
|
static |
Definition at line 605 of file option_parser.c.
| bool cmdline_is_set | ( | const char * | key | ) |
Definition at line 709 of file option_parser.c.
| void cmdline_load | ( | int | argc, |
| char * | argv[] ) |
Definition at line 580 of file option_parser.c.
| void cmdline_usage_append | ( | const char * | key, |
| const char * | type, | ||
| const char * | description ) |
Definition at line 714 of file option_parser.c.
| int get_setting_id | ( | const char * | key, |
| const char * | section ) |
Definition at line 310 of file option_parser.c.
| void save_settings | ( | struct ini * | ini | ) |
Definition at line 525 of file option_parser.c.
| void set_defaults | ( | void | ) |
Definition at line 507 of file option_parser.c.
| bool set_from_string | ( | void * | target, |
| struct setting | setting, | ||
| const char * | value ) |
Definition at line 391 of file option_parser.c.
| bool set_rule | ( | struct setting | setting, |
| char * | value, | ||
| char * | section ) |
Definition at line 498 of file option_parser.c.
Definition at line 490 of file option_parser.c.
| bool set_setting | ( | struct setting | setting, |
| char * | value ) |
Definition at line 480 of file option_parser.c.
| int string_parse_bool | ( | const void * | data, |
| const char * | s, | ||
| void * | ret ) |
Definition at line 286 of file option_parser.c.
| int string_parse_color | ( | const char * | s, |
| struct color * | ret ) |
| int string_parse_corners | ( | const void * | data, |
| const char * | s, | ||
| void * | ret ) |
Definition at line 96 of file option_parser.c.
| int string_parse_enum | ( | const void * | data, |
| const char * | s, | ||
| void * | ret ) |
Definition at line 31 of file option_parser.c.
| int string_parse_enum_list | ( | const void * | data, |
| char ** | s, | ||
| void * | ret_void ) |
Definition at line 46 of file option_parser.c.
| int string_parse_enum_list_to_single | ( | const void * | data, |
| char ** | s, | ||
| int * | ret ) |
Parse a string list of enum values and return a single integer with the values bit-flipped into it.
This is only useful when the enum values all occupy different bits (for exampel 1<<0, 1<<1 and 1<<2) and the order doesn't matter.
Definition at line 78 of file option_parser.c.
| int string_parse_gradient | ( | const char * | s, |
| struct gradient ** | ret ) |
Definition at line 255 of file option_parser.c.
| bool string_parse_int_list | ( | char ** | s, |
| int ** | ret, | ||
| bool | allow_empty ) |
Parse a list of integers.
Definition at line 109 of file option_parser.c.
| int string_parse_length | ( | void * | ret_in, |
| const char * | s ) |
Definition at line 349 of file option_parser.c.
| int string_parse_list | ( | const void * | data, |
| const char * | s, | ||
| void * | ret ) |
Definition at line 137 of file option_parser.c.
| int string_parse_maybe_int | ( | const void * | data, |
| const char * | s, | ||
| void * | ret ) |
Parse a string that may represent an integer value.
Definition at line 298 of file option_parser.c.
| int string_parse_sepcolor | ( | const void * | data, |
| const char * | s, | ||
| void * | ret ) |
Definition at line 177 of file option_parser.c.
|
static |
Definition at line 25 of file option_parser.c.
|
static |
Definition at line 26 of file option_parser.c.
|
static |
Definition at line 27 of file option_parser.c.