[llvm-commits] CVS: llvm-www/demo/index.cgi

Brian Gaeke gaeke at cs.uiuc.edu
Thu Nov 20 10:27:01 PST 2003


Changes in directory llvm-www/demo:

index.cgi updated: 1.4 -> 1.5

---
Log message:

Remove unused EXPLAIN_PARAGRAPH variable.
Enrich the email message sent to Chris.


---
Diffs of the changes:  (+12 -5)

Index: llvm-www/demo/index.cgi
diff -u llvm-www/demo/index.cgi:1.4 llvm-www/demo/index.cgi:1.5
--- llvm-www/demo/index.cgi:1.4	Tue Nov 18 23:56:54 2003
+++ llvm-www/demo/index.cgi	Thu Nov 20 10:26:00 2003
@@ -5,7 +5,7 @@
 # doing remote web JO99C compilations.  (It could still be used for that
 # purpose, though the two scripts have diverged somewhat.)
 #
-# Last modified $Date: 2003/11/19 05:56:54 $
+# Last modified $Date: 2003/11/20 16:26:00 $
 #
 
 use CGI;
@@ -20,8 +20,6 @@
 $FORM_URL          = 'http://llvm.cs.uiuc.edu/demo/index.cgi';
 $CONTACT_ADDRESS   = 'gaeke -at- uiuc.edu';
 $LOGO_IMAGE_URL    = 'cathead.png';
-$EXPLAIN_PARAGRAPH = <<END;
-END
 @PREPENDPATHDIRS =
   ( '/home/vadve/gaeke/llvm/tools/Debug', '/home/vadve/gaeke/bin' );
 $ENV{'LLVM_LIB_SEARCH_PATH'} =
@@ -287,11 +285,20 @@
         print syntaxHighlightLLVM($HtmlResult);
     } else {
         print "<p>Hmm, that's weird, llvm-dis didn't produce any output.</p>\n";
-        unlink( $inputFile, $bytecodeFile, $outputFile, $disassemblyFile );
     }
     addlog( $source, $pid, $UnhilightedResult );
+
+	my ($ip, $host, $lg, $lines);
+	chomp ($lines = `wc -l < $inputFile`);
+	$lg = $c->param('language');
+	$ip = $c->remote_addr();
+	chomp ($host = `host $ip`) if $ip;
     mailto( 'lattner at cs.uiuc.edu',
-            "--- Source: ---\n$source\n--- Result: ---\n$UnhilightedResult\n" );
+            "--- Query: ---\nFrom: ($ip) $host\nInput: $lines lines of $lg\n"
+          . "--- Source: ---\n$source\n"
+          . "--- Result: ---\n$UnhilightedResult\n" );
+
+	unlink( $inputFile, $bytecodeFile, $outputFile, $disassemblyFile );
 }
 
 print $c->hr, "<address>$CONTACT_ADDRESS</address>", $c->end_html;





More information about the llvm-commits mailing list