mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 10:19:26 +00:00
b8ba871bd9
files, curses, db, regex etc that we already have). The other glue will follow shortly. Obtained from: Keith Bostic <bostic@bostic.com>
28 lines
564 B
Perl
28 lines
564 B
Perl
sub make {
|
|
open MAKE, "make 2>&1 1>/dev/null |";
|
|
while(<MAKE>) {
|
|
if (($file, $line, $msg) = /([^: ]*):(\d*):(.+)/) {
|
|
if ($file == $prevfile && $line == $prevline) {
|
|
$error[-1]->[2] .= "\n$msg";
|
|
} else {
|
|
push @error, [$file, $line, $msg];
|
|
($prevline, $prevfile) = ($line, $file);
|
|
}
|
|
}
|
|
}
|
|
close MAKE;
|
|
}
|
|
|
|
sub nexterror {
|
|
if ($index <= $#error) {
|
|
my $error = $error[$index++];
|
|
$curscr->Edit($error->[0]);
|
|
$curscr->SetCursor($error->[1],0);
|
|
$curscr->Msg($error->[2]);
|
|
}
|
|
}
|
|
|
|
# preverror is left as an exercise
|
|
|
|
1;
|