summaryrefslogtreecommitdiffhomepage
path: root/source.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-07-09 19:58:37 +0200
committerJo-Philipp Wich <jo@mein.io>2021-07-11 15:49:14 +0200
commitff52440341bcb8c61105ff144bfcb210315207e4 (patch)
treeb7eb1c47cb8034e5188b86f480e3e61f44ee6ced /source.c
parent1d60418132460c23b216a2f8a9e0ea8897d32ea4 (diff)
treewide: consolidate typedef naming
Ensure that all custom typedef and vector declaration type names end with a "_t" suffix. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'source.c')
-rw-r--r--source.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source.c b/source.c
index 21b9124..e5a924f 100644
--- a/source.c
+++ b/source.c
@@ -19,11 +19,11 @@
#include "source.h"
-uc_source *
+uc_source_t *
uc_source_new_file(const char *path)
{
FILE *fp = fopen(path, "rb");
- uc_source *src;
+ uc_source_t *src;
if (!fp)
return NULL;
@@ -41,11 +41,11 @@ uc_source_new_file(const char *path)
return src;
}
-uc_source *
+uc_source_t *
uc_source_new_buffer(const char *name, char *buf, size_t len)
{
FILE *fp = fmemopen(buf, len, "rb");
- uc_source *src;
+ uc_source_t *src;
if (!fp)
return NULL;
@@ -64,9 +64,9 @@ uc_source_new_buffer(const char *name, char *buf, size_t len)
}
size_t
-uc_source_get_line(uc_source *source, size_t *offset)
+uc_source_get_line(uc_source_t *source, size_t *offset)
{
- uc_lineinfo *lines = &source->lineinfo;
+ uc_lineinfo_t *lines = &source->lineinfo;
size_t i, pos = 0, line = 0, lastoff = 0;
for (i = 0; i < lines->count; i++) {
@@ -88,8 +88,8 @@ uc_source_get_line(uc_source *source, size_t *offset)
return 0;
}
-uc_source *
-uc_source_get(uc_source *source)
+uc_source_t *
+uc_source_get(uc_source_t *source)
{
if (!source)
return NULL;
@@ -100,7 +100,7 @@ uc_source_get(uc_source *source)
}
void
-uc_source_put(uc_source *source)
+uc_source_put(uc_source_t *source)
{
if (!source)
return;