rename


git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@733 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/libasn1compiler/asn1c_C.c b/libasn1compiler/asn1c_C.c
index 5006a1b..62323a8 100644
--- a/libasn1compiler/asn1c_C.c
+++ b/libasn1compiler/asn1c_C.c
@@ -76,7 +76,7 @@
 } while(0)
 
 /* MKID() without checking for reserved keywords */
-#define	MKID_nr(id)	asn1c_make_identifier(0, (id), 0)
+#define	MKID_nc(id)	asn1c_make_identifier(0, (id), 0)
 #define	MKID(id)	asn1c_make_identifier(AMI_CHECK_RESERVED, (id), 0)
 
 int
@@ -160,7 +160,7 @@
 		REDIR(OT_STAT_DEFS);
 
 		OUT("static asn_INTEGER_enum_map_t asn_MAP_%s_value2enum[] = {\n",
-			MKID_nr(expr->Identifier));
+			MKID_nc(expr->Identifier));
 		qsort(v2e, el_count, sizeof(v2e[0]), compar_enumMap_byValue);
 		for(eidx = 0; eidx < el_count; eidx++) {
 			v2e[eidx].idx = eidx;
@@ -174,7 +174,7 @@
 		OUT("};\n");
 
 		OUT("static unsigned int asn_MAP_%s_enum2value[] = {\n",
-			MKID_nr(expr->Identifier));
+			MKID_nc(expr->Identifier));
 		qsort(v2e, el_count, sizeof(v2e[0]), compar_enumMap_byName);
 		for(eidx = 0; eidx < el_count; eidx++) {
 			OUT("\t%d%s\t/* %s(%" PRIdASN ") */\n",
@@ -187,14 +187,14 @@
 		OUT("};\n");
 
 		OUT("static asn_INTEGER_specifics_t asn_DEF_%s_specs = {\n",
-			MKID_nr(expr->Identifier));
+			MKID_nc(expr->Identifier));
 		INDENT(+1);
 		OUT("asn_MAP_%s_value2enum,\t"
 			"/* \"tag\" => N; sorted by tag */\n",
-			MKID_nr(expr->Identifier));
+			MKID_nc(expr->Identifier));
 		OUT("asn_MAP_%s_enum2value,\t"
 			"/* N => \"tag\"; sorted by N */\n",
-			MKID_nr(expr->Identifier));
+			MKID_nc(expr->Identifier));
 		OUT("%d,\t/* Number of elements in the maps */\n",
 			el_count);
 		OUT("%d,\t/* Enumeration is %sextensible */\n",
@@ -277,7 +277,7 @@
 	if(expr_elements_count(arg, expr)) {
 		int comp_mode = 0;	/* {root,ext=1,root,root,...} */
 
-		p = MKID_nr(expr->Identifier);
+		p = MKID_nc(expr->Identifier);
 		OUT("static asn_TYPE_member_t asn_MBR_%s[] = {\n", p);
 
 		elements = 0;
@@ -308,12 +308,12 @@
 	emit_tag2member_map(arg, tag2el, tag2el_count, 0);
 
 	OUT("static asn_SEQUENCE_specifics_t asn_DEF_%s_specs = {\n",
-		MKID_nr(expr->Identifier));
+		MKID_nc(expr->Identifier));
 	p = MKID(expr->Identifier);
 	INDENTED(
 		OUT("sizeof(struct %s),\n", p);
 		OUT("offsetof(struct %s, _asn_ctx),\n", p);
-		OUT("asn_DEF_%s_tag2el,\n", MKID_nr(expr->Identifier));
+		OUT("asn_DEF_%s_tag2el,\n", MKID_nc(expr->Identifier));
 		OUT("%d,\t/* Count of tags in the map */\n", tag2el_count);
 		OUT("%d,\t/* Start extensions */\n",
 			ext_start);
@@ -356,7 +356,7 @@
 		INDENTED(
 			out_identifiers_chain(arg, 0);
 			OUT("_PR_");
-			id = MKID_nr(v->Identifier);
+			id = MKID_nc(v->Identifier);
 			OUT("%s,\t/* Member %s is present */\n",
 				id, id)
 		);
@@ -384,7 +384,7 @@
 	}
 
 	INDENTED(
-		id = MKID_nr(expr->Identifier);
+		id = MKID_nc(expr->Identifier);
 		OUT("\n");
 		OUT("/* Presence bitmask: ASN_SET_ISPRESENT(p%s, %s_PR_x) */\n",
 			id, id);
@@ -445,7 +445,7 @@
 		int comp_mode = 0;	/* {root,ext=1,root,root,...} */
 
 		OUT("static asn_TYPE_member_t asn_MBR_%s[] = {\n",
-			MKID_nr(expr->Identifier));
+			MKID_nc(expr->Identifier));
 	
 		elements = 0;
 		INDENTED(TQ_FOR(v, &(expr->members), next) {
@@ -480,7 +480,7 @@
 	 * Emit a map of mandatory elements.
 	 */
 	OUT("static uint8_t asn_DEF_%s_mmap",
-		MKID_nr(expr->Identifier));
+		MKID_nc(expr->Identifier));
 	p = MKID(expr->Identifier);
 	OUT("[(%d + (8 * sizeof(unsigned int)) - 1) / 8]", elements);
 	OUT(" = {\n", p);
@@ -511,13 +511,13 @@
 	OUT("};\n");
 
 	OUT("static asn_SET_specifics_t asn_DEF_%s_specs = {\n",
-		MKID_nr(expr->Identifier));
+		MKID_nc(expr->Identifier));
 	p = MKID(expr->Identifier);
 	INDENTED(
 		OUT("sizeof(struct %s),\n", p);
 		OUT("offsetof(struct %s, _asn_ctx),\n", p);
 		OUT("offsetof(struct %s, _presence_map),\n", p);
-		p = MKID_nr(expr->Identifier);
+		p = MKID_nc(expr->Identifier);
 		OUT("asn_DEF_%s_tag2el,\n", p);
 		OUT("%d,\t/* Count of tags in the map */\n", tag2el_count);
 		if(tag2el_cxer)
@@ -648,7 +648,7 @@
 	tv_mode = emit_tags_vectors(arg, expr, &tags_count, &all_tags_count);
 
 	OUT("static asn_SET_OF_specifics_t asn_DEF_%s_specs = {\n",
-			MKID_nr(expr->Identifier));
+			MKID_nc(expr->Identifier));
 	p = MKID(expr->Identifier);
 	INDENTED(
 		OUT("sizeof(struct %s),\n", p);
@@ -692,7 +692,7 @@
 			}
 			out_identifiers_chain(arg, 0);
 			OUT("_PR_");
-			id = MKID_nr(v->Identifier);
+			id = MKID_nc(v->Identifier);
 			OUT("%s,\n", id, id);
 		}
 	);
@@ -794,14 +794,14 @@
 	emit_tag2member_map(arg, tag2el, tag2el_count, 0);
 
 	OUT("static asn_CHOICE_specifics_t asn_DEF_%s_specs = {\n",
-		MKID_nr(expr->Identifier));
+		MKID_nc(expr->Identifier));
 	p = MKID(expr->Identifier);
 	INDENTED(
 		OUT("sizeof(struct %s),\n", p);
 		OUT("offsetof(struct %s, _asn_ctx),\n", p);
 		OUT("offsetof(struct %s, present),\n", p);
 		OUT("sizeof(((struct %s *)0)->present),\n", p);
-		OUT("asn_DEF_%s_tag2el,\n", MKID_nr(expr->Identifier));
+		OUT("asn_DEF_%s_tag2el,\n", MKID_nc(expr->Identifier));
 		OUT("%d,\t/* Count of tags in the map */\n", tag2el_count);
 		OUT("%d\t/* Whether extensible */\n",
 			check_if_extensible(expr));
@@ -944,7 +944,7 @@
 		type_name = asn1c_type_name(arg, expr, TNF_SAFE);
 		OUT("/* This type is equivalent to %s */\n", type_name);
 		if(HIDE_INNER_DEFS) OUT("/* ");
-		OUT("#define\tasn_DEF_%s\t", MKID_nr(expr->Identifier));
+		OUT("#define\tasn_DEF_%s\t", MKID_nc(expr->Identifier));
 		type_name = asn1c_type_name(arg, expr, TNF_SAFE);
 		OUT("asn_DEF_%s", type_name);
 		if(HIDE_INNER_DEFS)
@@ -1122,7 +1122,7 @@
 
 	REDIR(OT_FUNC_DECLS);
 
-	p = MKID_nr(expr->Identifier);
+	p = MKID_nc(expr->Identifier);
 	if(HIDE_INNER_DEFS) {
 		OUT("/* extern asn_TYPE_descriptor_t asn_DEF_%s;"
 			"\t// (Use -fall-defs-global to expose) */\n", p);
@@ -1374,7 +1374,7 @@
 	asn1p_expr_t *expr = arg->expr;
 
 	OUT("static asn_TYPE_tag2member_t asn_DEF_%s_tag2el%s[] = {\n",
-		MKID_nr(expr->Identifier), opt_modifier?opt_modifier:"");
+		MKID_nc(expr->Identifier), opt_modifier?opt_modifier:"");
 	if(tag2el_count) {
 		int i;
 		for(i = 0; i < tag2el_count; i++) {
@@ -1441,7 +1441,7 @@
 
 #define	EMIT_TAGS_TABLE(name, tags, tags_count)	do {			\
 		OUT("static ber_tlv_tag_t asn_DEF_%s%s_tags[] = {\n",	\
-			MKID_nr(expr->Identifier), name);		\
+			MKID_nc(expr->Identifier), name);		\
 		INDENT(+1);						\
 		/* Print the array of collected tags */			\
 		for(i = 0; i < tags_count; i++) {			\
@@ -1573,10 +1573,10 @@
 		&& expr->_anonymous_type
 			&& !strcmp(expr->Identifier, "Member")) {
 		OUT("(void *)&asn_DEF_%s_Member,\n",
-			MKID_nr(arg->expr->Identifier));
+			MKID_nc(arg->expr->Identifier));
 	} else if(complex_contents) {
 		OUT("(void *)&asn_DEF_%s,\n",
-			MKID_nr(expr->Identifier));
+			MKID_nc(expr->Identifier));
 	} else {
 		OUT("(void *)&asn_DEF_%s,\n",
 			asn1c_type_name(arg, expr, TNF_SAFE));
@@ -1586,7 +1586,7 @@
 		if(arg->flags & A1C_NO_CONSTRAINTS) {
 			OUT("0,\t/* No check because of -fno-constraints */\n");
 		} else {
-			char *id = MKID_nr(expr->Identifier);
+			char *id = MKID_nc(expr->Identifier);
 			if(expr->_anonymous_type
 					&& !strcmp(expr->Identifier, "Member"))
 				id = asn1c_type_name(arg, expr, TNF_SAFE);
@@ -1617,7 +1617,7 @@
 	if(expr->_anonymous_type && !strcmp(expr->Identifier, "Member"))
 		p = asn1c_type_name(arg, expr, TNF_SAFE);
 	else
-		p = MKID_nr(expr->Identifier);
+		p = MKID_nc(expr->Identifier);
 	OUT("static int\n");
 	OUT("memb_%s_%d_constraint(asn_TYPE_descriptor_t *td, const void *sptr,\n", p, global_memb_unique);
 	INDENT(+1);
@@ -1647,7 +1647,7 @@
 	if(HIDE_INNER_DEFS)
 		OUT("static /* Use -fall-defs-global to expose */\n");
 	OUT("asn_TYPE_descriptor_t asn_DEF_%s = {\n",
-		MKID_nr(expr->Identifier));
+		MKID_nc(expr->Identifier));
 	p = MKID(expr->Identifier);
 	INDENT(+1);
 		OUT("\"%s\",\n", expr->_anonymous_type?"":expr->Identifier);
@@ -1671,7 +1671,7 @@
 			OUT("0,\t/* Use generic outmost tag fetcher */\n");
 		}
 
-		p = MKID_nr(expr->Identifier);
+		p = MKID_nc(expr->Identifier);
 		if(tags_count) {
 			OUT("asn_DEF_%s_tags,\n", p);
 			OUT("sizeof(asn_DEF_%s_tags)\n", p);
@@ -1800,7 +1800,7 @@
 	if(check_reserved_keywords)
 		id = MKID(expr->Identifier);
 	else
-		id = MKID_nr(expr->Identifier);
+		id = MKID_nc(expr->Identifier);
 	OUT("%s", id);
 
 	return 0;