Remove the need for backslashes in syscalls.master.

Join non-special lines together until we hit a line containing a '}'
character. This allows the function declaration body to be split
across multiple lines without backslash continuation characters.

Continue to join lines ending with backslashes to allow gradual
migration and to support out-of-tree syscall vectors

Reviewed by:	emaste, kib
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D17488
This commit is contained in:
Brooks Davis 2018-10-22 22:13:00 +00:00
parent c7864b97d3
commit 9d7051d920
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339624

View File

@ -68,13 +68,33 @@ if [ -n "$2" ]; then
fi
sed -e '
:join
# FreeBSD ID, includes, comments, and blank lines
/.*\$FreeBSD/b done_joining
/^[#;]/b done_joining
/^$/b done_joining
# Join lines ending in backslash
:joining
/\\$/{a\
N
s/\\\n//
b join
b joining
}
# OBSOL, etc lines without function signatures
/^[0-9][^{]*$/b done_joining
# Join incomplete signatures. The { must appear on the first line
# and the } must appear on the last line (modulo lines joined by
# backslashes).
/^[^}]*$/{a\
N
s/\n//
b joining
}
:done_joining
2,${
/^#/!s/\([{}()*,]\)/ \1 /g
}