nightmaremail

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 5806288c361b44e976e7db89a79c11efd7af068a
parent 20c4811b01dce3946ee30fe13795c67316acda29
Author: Rolf Eike Beer <eike@sf-mail.de>
Date:   Fri,  8 May 2020 20:38:02 +0200

genalloc: generate C89 function interfaces

While at it drop the register specification.

Diffstat:
Mgen_allocdefs.h | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gen_allocdefs.h b/gen_allocdefs.h @@ -2,7 +2,7 @@ #define GEN_ALLOC_DEFS_H #define GEN_ALLOC_readyplus(ta,type,field,len,a,i,n,x,base,ta_rplus) \ -static int ta_rplus ## _internal (register ta *x, register unsigned int n, unsigned int pluslen) \ +static int ta_rplus ## _internal (ta *x, unsigned int n, unsigned int pluslen) \ { register unsigned int i; \ if (x->field) { \ i = x->a; n += pluslen; \ @@ -13,17 +13,17 @@ static int ta_rplus ## _internal (register ta *x, register unsigned int n, unsig return 1; } \ x->len = 0; \ return !!(x->field = (type *) alloc((x->a = n) * sizeof(type))); } \ -int ta_rplus(x,n) register ta *x; register unsigned int n; \ +int ta_rplus(ta *x, unsigned int n) \ { return ta_rplus ## _internal (x, n, x->len); } /* this needs a GEN_ALLOC_readyplus call before as it reuses the internal helper * function. */ #define GEN_ALLOC_ready(ta,type,field,len,a,i,n,x,base,ta_ready) \ -int ta_ready(x,n) register ta *x; register unsigned int n; \ +int ta_ready(ta *x, unsigned int n) \ { return ta_ready ## plus_internal (x, n, 0); } #define GEN_ALLOC_append(ta,type,field,len,a,i,n,x,base,ta_rplus,ta_append) \ -int ta_append(x,i) register ta *x; register type *i; \ +int ta_append(ta *x, type *i) \ { if (!ta_rplus(x,1)) return 0; x->field[x->len++] = *i; return 1; } #endif