# HG changeset patch
# User devi
# Date 1126468564 -10800
# Node ID 06260270cbe0547fa9a38ff589562b5e836a9150
# Parent  05d496f33d7608aeb0a2946909f48e22c7765c59
Добавлена функция, которая выдаёт результаты
обработки в виде XML.
!!!Недоделан quoting спец.символов XML

diff -r 05d496f33d76 -r 06260270cbe0 lm-report
--- a/lm-report	Tue Jun 28 09:16:07 2005 +0300
+++ b/lm-report	Sun Sep 11 22:56:04 2005 +0300
@@ -412,7 +412,7 @@
 			}
 			$last_output_length+=length($_);
 			#if (!$cl{"suppress_output"} || $last_output_length < 5000) {
-			if ($last_output_length < 5000) {
+			if ($last_output_length < 50000) {
 				#print "(",length($_),")" if (length($_) > 2000) ;
 				$vt->process("$_"."\n") 
 			}
@@ -943,6 +943,66 @@
 	close(CONFIG);
 }
 
+
+sub print_command_lines2
+{
+	my $output_filename=$_[0];
+	open(OUT, ">", $output_filename)
+		or die "Can't open $output_filename for writing\n";
+
+
+	print OUT <<OUT;
+<log>
+OUT
+
+	my $cl;
+	for my $i (@Command_Lines_Index) {
+
+		
+		$cl = $Command_Lines[$i];
+
+
+# Printing out
+		print OUT <<OUT;
+	<command>
+		<day>$cl->{day}</day>
+		<hour>$cl->{hour}</hour>
+		<min>$cl->{min}</min>
+		<sec>$cl->{sec}</sec>
+		<tty>$cl->{tty}</tty>
+		<uid>$cl->{uid}</uid>
+		<euid>$cl->{euid}</euid>
+		<prompt>$cl->{prompt}</prompt>
+		<cline>$cl->{cline}</cline>
+		<status>$cl->{err}</cline>
+		<output>
+$cl->{output}</output>
+	</command>
+OUT
+	}
+
+	for my $diff (@Diffs) {
+
+		print OUT <<OUT;
+	<diff>
+		<path>$diff->{path}</path>
+		<uid>$diff->{uid}</uid>
+		<day>$diff->{day}</day>
+		<hour>$diff->{hour}</hour>
+		<min>$diff->{min}</min>
+		<sec>$diff->{sec}</sec>
+		<text>
+$diff->{text}</text>
+	</diff>
+OUT
+	}
+
+	print OUT <<OUT;
+</log>
+OUT
+}
+
+
 $| = 1;
 
 my %file_config;