# HG changeset patch # User Matti Hamalainen # Date 1676928993 -7200 # Node ID 1959ba53e9dc40c4c397149caf7ad108765e314d # Parent c17eadc60c3d3749c69f723f730b05ec9a5e3ecf Fix th_ioctx_t_ops -> th_ioctx_ops_t diff -r c17eadc60c3d -r 1959ba53e9dc th_ioctx.c --- a/th_ioctx.c Mon Feb 20 23:33:45 2023 +0200 +++ b/th_ioctx.c Mon Feb 20 23:36:33 2023 +0200 @@ -32,7 +32,7 @@ } -th_ioctx_t * th_io_new(const th_ioctx_t_ops *fops, const char *filename, const char *mode) +th_ioctx_t * th_io_new(const th_ioctx_ops_t *fops, const char *filename, const char *mode) { th_ioctx_t *ctx = th_malloc(sizeof(th_ioctx_t)); if (ctx == NULL) @@ -61,7 +61,7 @@ } -int th_io_fopen(th_ioctx_t **pctx, const th_ioctx_t_ops *fops, const char *filename, const char *mode) +int th_io_fopen(th_ioctx_t **pctx, const th_ioctx_ops_t *fops, const char *filename, const char *mode) { th_ioctx_t *ctx; int res; diff -r c17eadc60c3d -r 1959ba53e9dc th_ioctx.h --- a/th_ioctx.h Mon Feb 20 23:33:45 2023 +0200 +++ b/th_ioctx.h Mon Feb 20 23:36:33 2023 +0200 @@ -23,7 +23,7 @@ // Typedefs and structures // struct th_ioctx_t; -struct th_ioctx_t_ops; +struct th_ioctx_ops_t; /** I/O context structure @@ -56,11 +56,11 @@ void (*error)(struct th_ioctx_t *ctx, const int err, const char *msg); void (*msg)(struct th_ioctx_t *ctx, const int level, const char *msg); - const struct th_ioctx_t_ops *fops; ///< Pointer to I/O ops struct to be used with this context + const struct th_ioctx_ops_t *fops; ///< Pointer to I/O ops struct to be used with this context } th_ioctx_t; -typedef struct th_ioctx_t_ops +typedef struct th_ioctx_ops_t { char *name; ///< Name of this I/O ops definition @@ -82,21 +82,21 @@ int (*fputs)(const char *str, th_ioctx_t *ctx); int (*vfprintf)(th_ioctx_t *ctx, const char *fmt, va_list ap); -} th_ioctx_t_ops; +} th_ioctx_ops_t; // // Some basic iops // -extern const th_ioctx_t_ops th_stdio_io_ops, th_mem_io_ops; +extern const th_ioctx_ops_t th_stdio_io_ops, th_mem_io_ops; // // I/O context management functions // -th_ioctx_t * th_io_new(const th_ioctx_t_ops *fops, const char *filename, const char *mode); -int th_io_fopen(th_ioctx_t **pctx, const th_ioctx_t_ops *fops, const char *filename, const char *mode); +th_ioctx_t * th_io_new(const th_ioctx_ops_t *fops, const char *filename, const char *mode); +int th_io_fopen(th_ioctx_t **pctx, const th_ioctx_ops_t *fops, const char *filename, const char *mode); int th_io_reopen(th_ioctx_t *ctx, const char *mode); void th_io_close(th_ioctx_t *ctx); diff -r c17eadc60c3d -r 1959ba53e9dc th_ioctx_mem.c --- a/th_ioctx_mem.c Mon Feb 20 23:33:45 2023 +0200 +++ b/th_ioctx_mem.c Mon Feb 20 23:36:33 2023 +0200 @@ -239,7 +239,7 @@ } -const th_ioctx_t_ops th_mem_io_ops = +const th_ioctx_ops_t th_mem_io_ops = { "MemIO", diff -r c17eadc60c3d -r 1959ba53e9dc th_ioctx_stdio.c --- a/th_ioctx_stdio.c Mon Feb 20 23:33:45 2023 +0200 +++ b/th_ioctx_stdio.c Mon Feb 20 23:36:33 2023 +0200 @@ -143,7 +143,7 @@ } -const th_ioctx_t_ops th_stdio_io_ops = +const th_ioctx_ops_t th_stdio_io_ops = { "stdio",