Mercurial > hg > th-libs
changeset 772:1959ba53e9dc
Fix th_ioctx_t_ops -> th_ioctx_ops_t
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 20 Feb 2023 23:36:33 +0200 |
parents | c17eadc60c3d |
children | 4744e64ffa3a |
files | th_ioctx.c th_ioctx.h th_ioctx_mem.c th_ioctx_stdio.c |
diffstat | 4 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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);