diff options
author | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-06-02 14:17:04 +0200 |
---|---|---|
committer | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-06-02 14:17:04 +0200 |
commit | 18a4b6dde277f1a127cf1d8ce81accc2f47aae1a (patch) | |
tree | 6340b718457cbcd4c8218f339db3f37d5993a30a /re | |
parent | b61fcab3baf91ecd4b2ad4185e591cf339ad2b34 (diff) | |
download | ref-18a4b6dde277f1a127cf1d8ce81accc2f47aae1a.tar.gz |
Output Sr/Se (source/end of source) macros
These should be defined by the user and interpreted by troff.
Diffstat (limited to 're')
-rwxr-xr-x | re | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -100,10 +100,10 @@ while (<$fh>) { if ($bytes == $ref_bytes) { shift @references; my $file = $files{$bytes}; - my $end = shift @{$file_locations{$file}}; + my $end = shift @{$file_locations{$file}} || ''; my $loc = $locations{$bytes}; - print "\n$file:$loc-$end\n"; + print ".Sr $file $loc-$end\n"; seek $handles{$file}, $loc, 0; local $_; @@ -113,6 +113,9 @@ while (<$fh>) { last if $end and $bytes > $end; print; } + + print ".Se\n"; + next; } normal: |