Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Oct 2018 22:13:00 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339624 - head/sys/kern
Message-ID:  <201810222213.w9MMD0P2054991@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Mon Oct 22 22:13:00 2018
New Revision: 339624
URL: https://svnweb.freebsd.org/changeset/base/339624

Log:
  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

Modified:
  head/sys/kern/makesyscalls.sh

Modified: head/sys/kern/makesyscalls.sh
==============================================================================
--- head/sys/kern/makesyscalls.sh	Mon Oct 22 21:51:59 2018	(r339623)
+++ head/sys/kern/makesyscalls.sh	Mon Oct 22 22:13:00 2018	(r339624)
@@ -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
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810222213.w9MMD0P2054991>