chiark / gitweb /
auditor wip
[dgit-junk.git] / i18n-diff-auditor
1 #!/usr/bin/perl -w
2 use strict;
3 use Carp;
4
5 my @d = <>;
6
7 sub l_ok ($) {
8     my ($i) = @_;
9     return unless $i < @d;
10     $_ = $d[$i];
11     1;
12 }
13
14 sub l ($) { confess unless l_ok $_[0]; };
15
16 our ($ifilehead, $ihunkhead, $ichunk);
17 our ($before, $after);
18
19 for ($ifilehead = 0; l_ok $ifilehead; $ifilehead++) {
20     m{^diff} or next;
21     while (l_ok $ifilehead and m{^index|^---|^\Q+++\E}) { }
22     $ihunkhead = $ifilehead;
23     while (l_ok $ihunkhead) {
24         m{^\@\@} or confess;
25         $ichunk = $ihunkhead + 1;
26         for (;;) {
27             l_ok $ichunk or last;
28             
29         while (l_ok $ichunk and 
30     }
31         
32     confess unless m{^\@\@};
33            
34
35 while (<>){
36     if (m/^diff.*/) {
37         my $headline = 
38 }