コード例 #1
0
ファイル: gen_str.c プロジェクト: doniexun/ucc-c-compiler
void print_type(type *ref, decl *d)
{
	char buf[TYPE_STATIC_BUFSIZ];

	fprintf(cc1_out, "%s",
			type_to_str_r_spel(buf, ref, d ? d->spel : NULL));

	if(ref->type == type_attr){
		attribute *da;
		for(da = ref->bits.attr; da; da = da->next){
			fprintf(cc1_out, " __attribute__((%s))",
					attribute_to_str(da));
		}
	}
}
コード例 #2
0
ファイル: decl.c プロジェクト: bobrippling/ucc-c-compiler
const char *decl_store_spel_type_to_str_r(
		char buf[DECL_STATIC_BUFSIZ],
		enum decl_storage store,
		const char *spel,
		type *ty)
{
	char *bufp = buf;

	if(store)
		bufp += snprintf(bufp, DECL_STATIC_BUFSIZ, "%s ", decl_store_to_str(store));

	type_to_str_r_spel(bufp, ty, spel);

	return buf;
}
コード例 #3
0
ファイル: type.c プロジェクト: 8l/ucc-c-compiler
const char *type_to_str_r(char buf[TYPE_STATIC_BUFSIZ], type *r)
{
	return type_to_str_r_spel(buf, r, NULL);
}