chiark
/
gitweb
/
~ian
/
pandemic-rising-tide.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da978d6
)
export some more stuff from Parse
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 28 Feb 2019 01:23:44 +0000
(
01:23
+0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 28 Feb 2019 01:23:44 +0000
(
01:23
+0000)
Parse.pm
patch
|
blob
|
history
diff --git
a/Parse.pm
b/Parse.pm
index 51cb1fa17e68bf948f8ce2dadb07dd724e33727a..c3ca96b7d4804a3d10023b04bc932bb64f674c8f 100644
(file)
--- a/
Parse.pm
+++ b/
Parse.pm
@@
-8,7
+8,7
@@
use Graph;
use Exporter;
our @ISA = qw(Exporter);
-our @EXPORT = qw(parse_input_graph o %region %adj);
+our @EXPORT = qw(parse_input_graph o
plag_prs
%region %adj);
our %region;
# $region{NAME}{Colour}
@@
-162,6
+162,14
@@
sub edge_id_to_other_id ($$) {
sub o { print @_ or die $!; }
+sub plag_prs ($) {
+ my ($t) = @_;
+ $t = $` if $t =~ m/\n/;
+ $t =~ s/ //g;
+ $t =~ s/-//g;
+ return "$t";
+}
+
sub parse_input_graph () {
read_in();
resolve_arefs();