From 973ae30e7c4f7a1afb385dd3d8eeea178f981445 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Mon, 8 Jul 2024 13:24:39 +0200 Subject: fix deprecated prototypes --- src/token822.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/token822.c') diff --git a/src/token822.c b/src/token822.c index 34d8c24..b4913ab 100644 --- a/src/token822.c +++ b/src/token822.c @@ -9,23 +9,16 @@ static struct token822 comma = {TOKEN822_COMMA}; void token822_reverse(token822_alloc *ta) { - int i; - int n; + int n = ta->len - 1; struct token822 temp; - n = ta->len - 1; - for (i = 0; i + i < n; ++i) { + for (int i = 0; i + i < n; ++i) { temp = ta->t[i]; ta->t[i] = ta->t[n - i]; ta->t[n - i] = temp; } } -GEN_ALLOC_ready(token822_alloc, struct token822, t, len, a, i, n, x, 30, token822_ready); -GEN_ALLOC_readyplus(token822_alloc, struct token822, t, len, a, i, n, x, 30, token822_readyplus); -GEN_ALLOC_append( - token822_alloc, struct token822, t, len, a, i, n, x, 30, token822_readyplus, token822_append); - static int needspace(int t1, int t2) { if (!t1) return 0; @@ -449,7 +442,7 @@ int token822_parse(token822_alloc *ta, stralloc *sa, stralloc *buf) return 1; } -static int gotaddr(token822_alloc *taout, token822_alloc *taaddr, int (*callback)()) +static int gotaddr(token822_alloc *taout, token822_alloc *taaddr, int (*callback)(token822_alloc *)) { int i; -- cgit v1.2.3