shithub: scc

Download patch

ref: ee2dcc9ef027dedf4a2b030464ea7c8c66a359e5
parent: bb37ffe1e43c9fa3c8475807c801f9e228f9100a
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed Jul 3 12:30:01 EDT 2013

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.

--- a/decl.c
+++ b/decl.c
@@ -74,7 +74,7 @@
 		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;
--- a/symbol.h
+++ b/symbol.h
@@ -63,7 +63,7 @@
 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);
 
--- a/types.c
+++ b/types.c
@@ -129,7 +129,7 @@
 }
 
 void
-ctype(struct ctype *cp, unsigned char mod)
+storage(struct ctype *cp, unsigned char mod)
 {
 	extern unsigned char curctx;
 
@@ -185,7 +185,7 @@
 		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: