summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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