meson: also indent scripts with 8 spaces

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-04-24 19:40:02 -04:00
parent dd6ab3df74
commit b884196cc1
21 changed files with 113 additions and 83 deletions

View File

@ -21,4 +21,7 @@
(eval . (c-set-offset 'arglist-close 0))))
(nxml-mode . ((nxml-child-indent . 2)
(fill-column . 119)))
(meson-mode . ((meson-indent-basic . 8))))
(meson-mode . ((meson-indent-basic . 8)))
(sh-mode . ((sh-basic-offset . 8)
(sh-indentation . 8)))
(awk-mode . ((c-basic-offset . 8))))

View File

@ -1,5 +1,9 @@
BEGIN{ print "static const char* const af_names[] = { "}
BEGIN{
print "static const char* const af_names[] = { "
}
!/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ {
printf " [%s] = \"%s\",\n", $1, $1
}
END{print "};"}
END{
print "};"
}

View File

@ -1,5 +1,9 @@
BEGIN{ print "static const char* const arphrd_names[] = { "}
BEGIN{
print "static const char* const arphrd_names[] = { "
}
!/CISCO/ {
printf " [ARPHRD_%s] = \"%s\",\n", $1, $1
}
END{print "};"}
END{
print "};"
}

View File

@ -1,5 +1,9 @@
BEGIN{ print "static const char* const capability_names[] = { "}
BEGIN{
print "static const char* const capability_names[] = { "
}
{
printf " [%s] = \"%s\",\n", $1, tolower($1)
}
END{print "};"}
END{
print "};"
}

View File

@ -1,4 +1,9 @@
BEGIN{ print "static const char* const errno_names[] = { " }
BEGIN{
print "static const char* const errno_names[] = { "
}
!/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ {
printf " [%s] = \"%s\",\n", $1, $1 }
END{ print "};" }
printf " [%s] = \"%s\",\n", $1, $1
}
END{
print "};"
}

View File

@ -9,4 +9,6 @@ keyword==1 {
/%%/ {
keyword=1
}
END { print ";" }
END {
print ";"
}

View File

@ -1,5 +1,9 @@
BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" }
BEGIN{
print "const char *audit_type_to_string(int type) {\n\tswitch(type) {"
}
{
printf " case AUDIT_%s: return \"%s\";\n", $1, $1
}
END{ print " default: return NULL;\n\t}\n}\n" }
END{
print " default: return NULL;\n\t}\n}\n"
}

View File

@ -1,7 +1,11 @@
BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" }
BEGIN{
print "const char *dns_type_to_string(int type) {\n\tswitch(type) {"
}
{
printf " case DNS_TYPE_%s: return ", $1;
sub(/_/, "-");
printf "\"%s\";\n", $1
}
END{ print " default: return NULL;\n\t}\n}\n" }
END{
print " default: return NULL;\n\t}\n}\n"
}