summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-07-10 17:35:21 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-07-10 17:35:21 +0200
commit8542895c95954f8bd015ba8436371a6bbdcf78c7 (patch)
tree5e8e114c1b447b66a41ae9380bfbd5f6308b0aa8
parentf473f77b8b0e6d57dec65ec30bc3fbc2534007fc (diff)
downloadref-8542895c95954f8bd015ba8436371a6bbdcf78c7.tar.gz
Rename project to ref
-rw-r--r--greet.ms2
-rwxr-xr-xref (renamed from re)6
-rw-r--r--ref.tmac (renamed from re.tmac)0
3 files changed, 4 insertions, 4 deletions
diff --git a/greet.ms b/greet.ms
index 99c9de1..5368ede 100644
--- a/greet.ms
+++ b/greet.ms
@@ -1,4 +1,4 @@
-.so re.tmac
+.so ref.tmac
.TL
.BI greet ,
an example C program
diff --git a/re b/ref
index 415de0f..7322246 100755
--- a/re
+++ b/ref
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# re -- reference-based literate programming system
+# ref -- reference-based literate programming system
use strict;
use warnings;
@@ -57,7 +57,7 @@ for (@references) {
}
$bytes{$file} += length($_);
}
- } elsif ($ident =~ m{^/(.*)/$}) {
+ } elsif ($ident =~ m{^/(.*?)/?$}) {
my $rx = new POSIX::Regex($1);
seek $handles{$file}, 0, 0;
$bytes{$file} = 0;
@@ -104,7 +104,7 @@ while (<$fh>) {
my $end = shift @{$file_locations{$file}} || '';
my $loc = $locations{$bytes};
- print ".Sr $file $loc-$end\n";
+ print ".Sr \"$file\" $loc $end\n";
seek $handles{$file}, $loc, 0;
local $_;
diff --git a/re.tmac b/ref.tmac
index 1bf5a92..1bf5a92 100644
--- a/re.tmac
+++ b/ref.tmac