From b42c9662303d1a33ebe038d1895c08945cdbd40f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 5 Mar 2025 19:26:58 +0100 Subject: Cleanup and style update (avoid typedef) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/config-ini.h | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'src/config-ini.h') 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 */ -- cgit v1.2.3-70-g09d2