diff options
author | Mattias Andrée <m@maandree.se> | 2025-03-05 19:26:58 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-03-05 19:26:58 +0100 |
commit | b42c9662303d1a33ebe038d1895c08945cdbd40f (patch) | |
tree | c05b169b1d28e8d42b111290f9181d2cbad1138b /src/config-ini.h | |
parent | Merge redshift.h into common.h (diff) | |
download | redshift-ng-b42c9662303d1a33ebe038d1895c08945cdbd40f.tar.gz redshift-ng-b42c9662303d1a33ebe038d1895c08945cdbd40f.tar.bz2 redshift-ng-b42c9662303d1a33ebe038d1895c08945cdbd40f.tar.xz |
Cleanup and style update (avoid typedef)
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/config-ini.h')
-rw-r--r-- | src/config-ini.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/config-ini.h b/src/config-ini.h index 5cdcc72..b50bf71 100644 --- a/src/config-ini.h +++ b/src/config-ini.h @@ -20,30 +20,26 @@ #ifndef REDSHIFT_CONFIG_INI_H #define REDSHIFT_CONFIG_INI_H -typedef struct _config_ini_section config_ini_section_t; -typedef struct _config_ini_setting config_ini_setting_t; - -struct _config_ini_setting { - config_ini_setting_t *next; +struct config_ini_setting { + struct config_ini_setting *next; char *name; char *value; }; -struct _config_ini_section { - config_ini_section_t *next; +struct config_ini_section { + struct config_ini_section *next; char *name; - config_ini_setting_t *settings; + struct config_ini_setting *settings; }; -typedef struct { - config_ini_section_t *sections; -} config_ini_state_t; +struct config_ini_state { + struct config_ini_section *sections; +}; -int config_ini_init(config_ini_state_t *state, const char *filepath); -void config_ini_free(config_ini_state_t *state); +int config_ini_init(struct config_ini_state *state, const char *filepath); +void config_ini_free(struct config_ini_state *state); -config_ini_section_t *config_ini_get_section(config_ini_state_t *state, - const char *name); +struct config_ini_section *config_ini_get_section(struct config_ini_state *state, const char *name); #endif /* ! REDSHIFT_CONFIG_INI_H */ |