From b367e7bd88517d657981f72d6d0a7d5dc80ef70e Mon Sep 17 00:00:00 2001 From: hans-christoph Date: Mon, 13 Jul 2009 10:59:35 +0000 Subject: =?UTF-8?q?Check=20Compose:=20Perlskript=20zur=20=C3=9Cberpr=C3=BC?= =?UTF-8?q?fung=20der=20Pr=C3=A4fixeigenschaft?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.neo-layout.org@1926 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- Compose/check-compose.pl | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 Compose/check-compose.pl diff --git a/Compose/check-compose.pl b/Compose/check-compose.pl new file mode 100755 index 0000000..8e3b139 --- /dev/null +++ b/Compose/check-compose.pl @@ -0,0 +1,41 @@ +#!/usr/bin/perl -w + +# Dieses Skript prüft übergebene Compose-Dateien auf Präfix-Eigenschaft +# Beispiel-Aufruf: +# +# ./check-compose.pl *.neo + +use strict; + +my %prefix; +my %code; + +while (my $line = <>) { + chomp $line; + next unless ($line =~ /^([^#]+):/); + + my @codes = split (/\s+/, $1); + + for my $i (0..$#codes-1) { + $prefix{"@codes[0..$i]"} = $line; + + if ($code{"@codes[0..$i]"}) { + print <