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

📄 shortcut.awk

📁 一个C源代码分析器
💻 AWK
字号:
# Icky intimate knowledge of MiG output.BEGIN { print "/* This file is generated by shortcut.awk.  */";	echo=1;	inproto=0; proto=""; arglist="";      }$1 == "LINTLIBRARY" { print "#include <mach.h>"; next }# Copy the first line of the definition, but# replace the function name (RPC) with CALL.$NF == rpc \  {    for (i = 1; i < NF; ++i) printf "%s ", $i;    print call;    next;  }# Collect the lines of the prototype in PROTO, and extract the parameter# names into ARGLIST.NF == 1 && $1 == ")" { inproto=0 }inproto { proto = proto $0;	  arg = $NF;	  gsub(/[^a-zA-Z0-9_,]/, "", arg);	  arglist = arglist arg;	}NF == 1 && $1 == "(" { inproto=1 }/^{$/ { echo=0; }echo == 1 { print $0; }/^}$/ \  {    print "{";    print "  kern_return_t err;";    print "  extern kern_return_t " syscall " (" proto ");";    print "  err = " syscall " (" arglist ");";    print "  if (err == MACH_SEND_INTERRUPTED)";    print "    err = " rpc " (" arglist ");";    print "  return err;"    print "}";    echo = 1;  }

⌨️ 快捷键说明

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