#!/usr/bin/perl
# Copyright (c) 2002 SuSE GmbH Nuernberg, Germany.  All rights reserved.
#
# Author: Marcus Schaefer <sax@suse.de>, 2002
# xapi script: create xorg.conf configuration file using ISaX
# --
#
# CVS ID:
# --------
# Status: Up-to-date
#
use strict;
use Env;

#---[ getLog ]----
sub getLog {
#-----------------------------------------------
# get (EE) and (WW) warn/error messages from
# X11 log file
#
	my $info;
	my $file = $_[0];
	my $log  = qx (cat $file | grep "^\([EW]");
	my @line = split (/\n/,$log);
	my $anz  = @line;
	$info = $line[$anz-2]."<br>";
	$info = $info.$line[$anz-1];
	return ($info);
}

my $ltext = getLog ($ARGV[0]);
print "<small><pre>".$ltext."</pre></small>";
