expr-h.pl

来自「RSA加密/解密算法源码 asn1c-0.9.12」· PL 代码 · 共 54 行

PL
54
字号
#!/usr/bin/perlprint<<EOM;/* * This file is automatically generated by $0 * DO NOT EDIT MANUALLY, fix the $0 instead if necessary. */#ifndef	ASN1_PARSER_EXPR_STR_H#define	ASN1_PARSER_EXPR_STR_H#ifndef	__GNUC__#define	__attribute__(x)	/* unused */#endifstatic char *asn1p_expr_type2str[] __attribute__ ((unused)) = {EOMwhile(<>) {	chomp;	next if(/TYPE_MAX/);	next unless(/^[ \t]+(ASN_[A-Z]+_([A-Za-z0-9_]+))/);	print "\t[ $1 ]\t = ";	$_ = $2;	if($_ eq "RELATIVE_OID") {		print '"RELATIVE-OID"';	} else {		s/_/ /;		print '"'.$_.'"';	}	print ",\n";}print<<EOM;};/* * Convert the ASN.1 expression type back into the string representation. */#define	ASN_EXPR_TYPE2STR(type)					\\	(							\\	(((ssize_t)(type)) < 0					\\	|| ((size_t)(type)) >= sizeof(asn1p_expr_type2str)	\\		/ sizeof(asn1p_expr_type2str[0]))		\\		? (char *)0					\\		: asn1p_expr_type2str[(int)(type)]		\\	)#endif	/* ASN1_PARSER_EXPR_STR_H */EOM

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?