代码拉取完成,页面将自动刷新
#! /usr/bin/awk -f
#
# Copyright © Adrian Perez <aperez@igalia.com>
#
# Converts an HTML template into a C header suitable for inclusion.
# Take a look at the HACKING.md file to know how to use it :-)
#
# This code is placed in the public domain.
BEGIN {
varname = 0;
print "/* Automagically generated, do not edit! */"
vars_count = 0;
}
/^<!--[[:space:]]*var[[:space:]]+[^[:space:]]+[[:space:]]*-->$/ {
if (varname) print ";";
if ($3 == "NONE") {
varname = 0;
next;
}
varname = $3;
vars[vars_count++] = varname;
print "static const u_char " varname "[] = \"\"";
next;
}
/^$/ {
if (!varname) next;
print "\"\\n\"";
next;
}
{
if (!varname) next;
# Order matters
gsub(/[\t\v\n\r\f]+/, "");
gsub(/\\/, "\\\\");
gsub(/"/, "\\\"");
print "\"" $0 "\""
}
END {
if (varname) print ";";
print "#define NFI_TEMPLATE_SIZE (0 \\";
for (var in vars) {
print "\t+ nfi_sizeof_ssz(" vars[var] ") \\";
}
print "\t)"
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。