scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit a91ac5f206e09a9f469430ee20f33eba870cfd9c
parent 34a2f1d2c53189e62586d8b42d82c12b7aacd503
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 11 Jul 2014 22:59:14 +0200

Add Funpar for struct funpar

All the others main structures have a typedef, so it is logical
add one for struct funpar.

Diffstat:
Mcc1/cc1.h | 3++-
Mcc1/decl.c | 6+++---
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/cc1/cc1.h b/cc1/cc1.h @@ -12,7 +12,7 @@ struct user_opt { unsigned char pcompare; }; -extern struct user_opt options; +extern struct user_opt options; extern void error(const char *fmt, ...); extern void warn(signed char flag, const char *fmt, ...); extern void unexpected(void); @@ -31,6 +31,7 @@ enum { typedef struct ctype Type; typedef struct symbol Symbol; +typedef struct funpar Funpar; typedef struct field { char *name; diff --git a/cc1/decl.c b/cc1/decl.c @@ -15,7 +15,7 @@ struct dcldata { union { unsigned short nelem; Symbol *sym; - struct funpar *pars; + Funpar *pars; uint8_t qlf; } u; }; @@ -46,7 +46,7 @@ fundcl(struct dcldata *dp) dp->u.pars = NULL; do { - struct funpar *fp; + Funpar *fp; Type *tp; if ((tp = parameter()) == voidtype) { @@ -62,7 +62,7 @@ fundcl(struct dcldata *dp) if (!dp->u.pars) { dp->u.pars = fp; } else { - register struct funpar *p, *q; + register Funpar *p, *q; for (p = dp->u.pars; q = p->next; p = q) /* nothing */;