Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=dD/4hOc3Xpj4SsZtXg/ELVbXUyskURNj8J3abIfCFLk=; b=DeY4HsAN5H94NmoXWJAZbHdqWAX+waMJ6B5iXrcshX9cjJvzbPLinoS1FIQvr4+I30 bXE4GERZeBtFAdNYrmBJMk0q06B6zbGXgiMZan7QgqveLCttGlX9MvTFoyumLWCQ+NlM uSDqUdI0p6sp5oWmgmlxL1HQg032F6PXqCIWSfobB4VgPB7zRIIONRt0eSoXfYcm972g dypGGOSgAgawGL2ISzBDnnpf2YUbIB6/P6HPhPuys3+TdAZoxX3XjBsdROvEYzhKmysv SPL/Ng2cL5crqQ/FUNYTru+iGrBiBkHnJMVa0PvWtEMqrfYsZfzQAdb3bO3o8OdQ6jPQ ek2g== Subject: [PATCH 1/9] fcvextract.pl: Use 'linelabel' env in extracted snippet References: From: Akira Yokosawa Message-ID: <58cc38ff-9db7-768d-6be8-232c103b7b26@gmail.com> Date: Sun, 23 Sep 2018 16:22:39 +0900 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit To: "Paul E. McKenney" Cc: perfbook@vger.kernel.org, Akira Yokosawa List-ID: From 48dcad932a43762eab4f5f7b8d7845428136d612 Mon Sep 17 00:00:00 2001 From: Akira Yokosawa Date: Wed, 29 Aug 2018 20:43:57 +0900 Subject: [PATCH 1/9] fcvextract.pl: Use 'linelabel' env in extracted snippet For consistency with commit 6bf7a51b7b9d ("Add 'linelabel' and 'lineref' environment"), enclose "VerbatimL" env in "linelabel" env in extracted code snippet. Signed-off-by: Akira Yokosawa --- utilities/fcvextract.pl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/utilities/fcvextract.pl b/utilities/fcvextract.pl index 8c6025a..cba96e7 100755 --- a/utilities/fcvextract.pl +++ b/utilities/fcvextract.pl @@ -42,7 +42,7 @@ # Verbatim environment of fancyvrb package): # # --- -# \renewcommand{\lnlblbase}{ln:toolsoftrade:api-pthreads:waitall} +# \begin{linelabel}[ln:toolsoftrade:api-pthreads:waitall] # \begin{VerbatimL}[commandchars=\%\[\]] # int pid; # int status; @@ -57,6 +57,7 @@ # } # }%lnlbl[loopb] # \end{VerbatimL} +# \end{linelabel} # --- # # corresponds to a meta command embedded in @@ -78,12 +79,12 @@ # This script converts the \lnlbl{} commands with these charcters # reverse-converted. # -# To make the actual labels to have the full form of: +# To make the actual labels to have the full form of # # "ln::::" # -# in LaTeX processing, this script will generate a \renewcommand{} -# command as shown above. The macro is used within \lnlbl{} command. +# in LaTeX processing, this script will enclose the snippet with +# a pair of \begin{linelabel} and \end{linelabel} as shown above. # # To omit a line in extracted snippet, put "\fcvexclude" in comment # on the line. @@ -142,7 +143,7 @@ while($line = <>) { print "% Do not edit!\n" ; print "% Generated by utilities/fcvextract.pl.\n" ; if ($line =~ /labelbase=([^,]+)/) { - print "\\renewcommand\{\\lnlblbase\}\{$1\}\n" ; + print "\\begin\{linelabel}\[$1\]\n" ; } print "\\begin\{VerbatimL\}" ; if ($line =~ /commandchars=([^,]+).*\]$/) { @@ -161,7 +162,7 @@ while($line = <>) { } } if ($extracting == 2) { - print "\\end\{VerbatimL\}\n" ; + print "\\end\{VerbatimL\}\n\\end\{linelabel\}\n" ; exit 0; } else { exit 1; -- 2.7.4