summary refs log tree commit diff
path: root/doc/rfc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/rfc')
-rw-r--r--doc/rfc/rfctags.pl30
1 files changed, 13 insertions, 17 deletions
diff --git a/doc/rfc/rfctags.pl b/doc/rfc/rfctags.pl
index 45e74f9a..05173d00 100644
--- a/doc/rfc/rfctags.pl
+++ b/doc/rfc/rfctags.pl
@@ -4,22 +4,18 @@ use warnings;
 use open ':encoding(ISO-8859-1)';
 
 ($,, $\) = ("\t", "\n");
-for my $rfc (@ARGV) {
-	open my $handle, '<', $rfc or die "${rfc}: $!";
-	while (<$handle>) {
-		chomp;
-		# Section headings
-		if (/^([\d.]+|[A-Z][.])\s+([^\t]+)?/) {
-			print $1, $rfc, $.;
-			print $2, $rfc, $. if $2;
-			print $1, $rfc, $. if $1 =~ /^([\d.]+)[.]$/;
-		}
-		# References
-		if (/^\s*(\[[\w-]+\])\s{2,}/) {
-			print $1, $rfc, $.;
-			print "\\$1", $rfc, $.; # vim ^] prepends \ to [
-		}
+while (<>) {
+	chomp;
+	# Section headings
+	if (/^([\d.]+|[A-Z][.])\s+([^\t]+)?/) {
+		print $1, $ARGV, $.;
+		print $2, $ARGV, $. if $2;
+		print $1, $ARGV, $. if $1 =~ /^([\d.]+)[.]$/;
 	}
-	die "${rfc}: $!" if $!;
-	close $handle;
+	# References
+	if (/^\s*(\[[\w-]+\])\s{2,}/) {
+		print $1, $ARGV, $.;
+		print "\\$1", $ARGV, $.; # vim ^] prepends \ to [
+	}
+	close ARGV if eof;
 }
;id=b7e36c72a604796209f7f7b11d88aa3b75c1b44f&follow=1'>Parse control commandsJune McEnroe 2020-08-15Read service pipesJune McEnroe 2020-08-15Implement non-blocking line-buffered readingJune McEnroe 2020-08-15Generate tags fileJune McEnroe 2020-08-15Just use CLOCK_MONOTONIC and clean up includesJune McEnroe 2020-08-15Reap childrenJune McEnroe 2020-08-14Implement serviceSignal, serviceStop, serviceRestartJune McEnroe 2020-08-14Reset restartInterval and restartDeadline on startJune McEnroe 2020-08-14Switch to timespec for timeoutsJune McEnroe 2020-08-14Implement serviceStartJune McEnroe 2020-08-14Flesh out Service structJune McEnroe 2020-08-14Build environment for servicesJune McEnroe 2020-08-14Implement spawntab parsingJune McEnroe 2020-08-14Open syslog, daemonize, write PIDJune McEnroe 2020-08-14Implement user and group lookupJune McEnroe 2020-08-14Add install targetJune McEnroe 2020-08-14Add spawnd skeletonJune McEnroe