view message_tie.pl @ 1580:df193e7c4e41

[Issue 1746] New: Enums with member initializers generate undefined symbols <pseus7@gmail.com> 2007-12-22 http://d.puremagic.com/issues/show_bug.cgi?id=1746
author thomask
date Fri, 22 Feb 2008 07:54:21 +0000
parents 7269c8972179
children
line wrap: on
line source

#!/usr/bin/perl

use strict;
use warnings;

my $message_pattern = shift;
my $last_cmd;

while (<>) {
	if (/^(run|norun|compile|nocompile): (.*)/) {
		$last_cmd = $2;
	} elsif (/$message_pattern/) {
		print "$last_cmd\n$_\n";
	}
}