summaryrefslogtreecommitdiff
path: root/src/token822.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-08 13:24:39 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-08 13:24:39 +0200
commit973ae30e7c4f7a1afb385dd3d8eeea178f981445 (patch)
tree1a5d8be5b3ff273a141b6144bf3031b1bc3deb2d /src/token822.c
parent66404f0bfbd78e635ff6381ca30b25157e0e1a09 (diff)
fix deprecated prototypes
Diffstat (limited to 'src/token822.c')
-rw-r--r--src/token822.c13
1 files changed, 3 insertions, 10 deletions
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;