diff th_config.c @ 771:c17eadc60c3d

Rename th_ioctx struct to th_ioctx_t, for consistency. Breaks API.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 20 Feb 2023 23:33:45 +0200
parents 31bc1ed07cf5
children 4744e64ffa3a
line wrap: on
line diff
--- a/th_config.c	Sun Feb 12 14:08:09 2023 +0200
+++ b/th_config.c	Mon Feb 20 23:33:45 2023 +0200
@@ -319,7 +319,7 @@
 }
 
 
-static int th_cfg_read_sect(th_ioctx *fh, th_cfgitem_t *sect, int nesting)
+static int th_cfg_read_sect(th_ioctx_t *fh, th_cfgitem_t *sect, int nesting)
 {
     th_cfgparserctx_t ctx;
     th_cfgitem_t *item = NULL;
@@ -725,7 +725,7 @@
 }
 
 
-int th_cfg_read(th_ioctx *fh, th_cfgitem_t *cfg)
+int th_cfg_read(th_ioctx_t *fh, th_cfgitem_t *cfg)
 {
     if (fh == NULL || cfg == NULL)
         return THERR_NULLPTR;
@@ -736,7 +736,7 @@
 
 /* Write a configuration into file
  */
-static bool th_print_indent_a(th_ioctx *fh, const int nesting, const char *fmt, va_list ap)
+static bool th_print_indent_a(th_ioctx_t *fh, const int nesting, const char *fmt, va_list ap)
 {
     for (int i = 0; i < nesting * 4; i++)
     {
@@ -748,7 +748,7 @@
 }
 
 
-static bool th_print_indent(th_ioctx *fh, const int nesting, const char *fmt, ...)
+static bool th_print_indent(th_ioctx_t *fh, const int nesting, const char *fmt, ...)
 {
     bool ret;
     va_list ap;
@@ -785,7 +785,7 @@
 }
 
 
-static bool th_cfg_write_string_escaped(th_ioctx *fh, const char *str, const char delim)
+static bool th_cfg_write_string_escaped(th_ioctx_t *fh, const char *str, const char delim)
 {
     for (const char *ptr = str; *ptr; ptr++)
     {
@@ -806,7 +806,7 @@
 }
 
 
-static int th_cfg_write_item(th_ioctx *fh, const th_cfgitem_t *item)
+static int th_cfg_write_item(th_ioctx_t *fh, const th_cfgitem_t *item)
 {
     switch (item->type)
     {
@@ -839,7 +839,7 @@
 }
 
 
-static int th_cfg_write_sect(th_ioctx *fh, const th_cfgitem_t *item, const int nesting)
+static int th_cfg_write_sect(th_ioctx_t *fh, const th_cfgitem_t *item, const int nesting)
 {
     while (item != NULL)
     {
@@ -939,7 +939,7 @@
 }
 
 
-int th_cfg_write(th_ioctx *fh, const th_cfgitem_t *cfg)
+int th_cfg_write(th_ioctx_t *fh, const th_cfgitem_t *cfg)
 {
     if (fh == NULL || cfg == NULL)
         return THERR_NULLPTR;