16 confess $i unless l_ok $i;
19 our ($ifilehead, $ihunkhead, $ichunkstart, $ichunkend);
20 our ($before, $after);
22 sub analyse_chunk () {
23 print Dumper($before, $after);
26 for ($ifilehead = 0; l_ok $ifilehead; $ifilehead++) {
28 while (l_ok $ifilehead and m{^index|^---|^\Q+++\E}) { }
29 $ihunkhead = $ifilehead;
30 while (l_ok $ihunkhead) {
31 m{^\@\@} or confess "$_ ?";
32 my $i = $ihunkhead + 1;
34 if (!l_ok $i or m{^ } or m{^\@\@}) {
35 if (defined $ichunkstart) {
38 $ichunkstart = $ichunkend = $before = $after = undef;
43 my $which = $& eq '-' ? \$before : \$after;