Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Aug 2019 07:37:34 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r351564 - stable/12/sys/kern
Message-ID:  <201908280737.x7S7bYud013164@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Wed Aug 28 07:37:34 2019
New Revision: 351564
URL: https://svnweb.freebsd.org/changeset/base/351564

Log:
  MFC r339624:
  
  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:
  stable/12/sys/kern/makesyscalls.sh
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/makesyscalls.sh
==============================================================================
--- stable/12/sys/kern/makesyscalls.sh	Wed Aug 28 04:55:17 2019	(r351563)
+++ stable/12/sys/kern/makesyscalls.sh	Wed Aug 28 07:37:34 2019	(r351564)
@@ -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?201908280737.x7S7bYud013164>