⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 awk.svc

📁 RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
💻 SVC
字号:
###########################################################################  Component:	RDBG#  Module:	awk.svc##  Synopsis:	AWK script which transforms the server skeleton produced#		by rpcgen(1) into something suitable for RDB servers.############################################################################ $Id: awk.svc,v 1.4 2002/02/01 17:00:01 joel Exp $#BEGIN {    headerstarted = 0    withinproc = 0    brack = 0}$1 ~ /^\/\*HEADER_START\*\/$/ {    headerstarted = 1    printf("#include <rpc/types.h>\n");    printf("#include <rpc/rpc.h>\n");    printf("#include <stdio.h>\n");    printf("#include <stdlib.h>\n");    printf("#include <string.h>\n");    printf("#include <bsp.h>\n");    printf("#include <rdbg/servrpc.h>\n");    printf("#include <rdbg/%s>\n", THEPROG);    printf("#define fprintf(a,b,c) printf(b,c)\n");}$1 ~ /^\/\*HEADER_END\*\/$/ {    headerstarted = 0}{    if (headerstarted == 1) {	print $0    } else if ($1 ~ /.*_2.*/) {	withinproc = 1	printf("void\n");	print $0    } else if (withinproc == 1) {	if ($1 == "switch") {	    print "\tDPRINTF ((\"remotedeb_2: %s (%d)\\n\", "	    print "\t\t(unsigned) rqstp->rq_proc < "	    print "\t\t(unsigned) (sizeof names / sizeof names[0]) ?"	    print "\t\tnames [rqstp->rq_proc] : \"???\", "	    print "\t\t(int) rqstp->rq_proc));\n"	}	for (i = 1; i <= NF; i++) {	    if ($i == "{") {		brack++;	    } else if ($i == "}") {		brack--;		if (brack == 0) {		    withinproc = 0;		}	    }        }	if ($1 != "_rpcsvcdirty" ) {	    print $0        }    }}

⌨️ 快捷键说明

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