scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit ee2dcc9ef027dedf4a2b030464ea7c8c66a359e5
parent bb37ffe1e43c9fa3c8475807c801f9e228f9100a
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed,  3 Jul 2013 16:30:01 +0200

Change the name of ctype to storage

This functions calculates the modifications in the ctype struct
due to storage modificators, so storage is a better name than ctype,
because mktype also modifies the ctype.

Diffstat:
decl.c | 2+-
symbol.h | 2+-
types.c | 4++--
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/decl.c b/decl.c @@ -74,7 +74,7 @@ spec(register struct ctype *cp) switch (yytoken) { case TYPEDEF: case EXTERN: case STATIC: case AUTO: case REGISTER: case CONST: case VOLATILE: - ctype(cp, yytoken); + storage(cp, yytoken); break; case UNSIGNED: cp->c_unsigned = 1; diff --git a/symbol.h b/symbol.h @@ -63,7 +63,7 @@ extern void del_ctx(void); extern void freesyms(void); extern struct symbol *lookup(register const char *s, char ns); extern void insert(struct symbol *sym, unsigned char ctx); -extern void ctype(struct ctype *cp, unsigned char mod); +extern void storage(struct ctype *cp, unsigned char mod); extern struct ctype *newctype(void); extern void delctype(register struct ctype *tp); diff --git a/types.c b/types.c @@ -129,7 +129,7 @@ btype(unsigned char type, unsigned char tok) } void -ctype(struct ctype *cp, unsigned char mod) +storage(struct ctype *cp, unsigned char mod) { extern unsigned char curctx; @@ -185,7 +185,7 @@ ctype(struct ctype *cp, unsigned char mod) return; } bad_file_scope_storage: - error("file-scope declaration specifies ā€˜%sā€™", yytext); + error("file-scope declaration specifies '%s'", yytext); two_storage: error("Two or more storage specifier"); duplicated: