[llvm-commits] CVS: llvm-www/demo/index.cgi
Chris Lattner
lattner at cs.uiuc.edu
Tue Nov 18 17:04:06 PST 2003
Changes in directory llvm-www/demo:
index.cgi updated: 1.2 -> 1.3
---
Log message:
Convert to look more like an LLVM page. Clarify some of the prose
---
Diffs of the changes: (+53 -29)
Index: llvm-www/demo/index.cgi
diff -u llvm-www/demo/index.cgi:1.2 llvm-www/demo/index.cgi:1.3
--- llvm-www/demo/index.cgi:1.2 Wed Nov 12 15:10:24 2003
+++ llvm-www/demo/index.cgi Tue Nov 18 17:02:55 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/12 21:10:24 $
+# Last modified $Date: 2003/11/18 23:02:55 $
#
use CGI;
@@ -17,17 +17,10 @@
if (! -d "/tmp/webcompile") { mkdir ("/tmp/webcompile", 0777); }
$LOGFILE = '/tmp/webcompile/log.txt';
-$FORM_TITLE = 'Try out LLVM in your Browser!';
$FORM_URL = 'http://llvm.cs.uiuc.edu/demo/index.cgi';
$CONTACT_ADDRESS = 'gaeke -at- uiuc.edu';
$LOGO_IMAGE_URL = 'cathead.png';
$EXPLAIN_PARAGRAPH = <<END;
- Bitter Melon the cat says, paste a C/C++ program in the text box or upload one
- from your computer, and you can see the equivalent LLVM code, meow!!
- But no sneaky pasting in syntax errors, now...
- Oh, and if you're considering uploading a file from a larger C program,
- consider preprocessing it (e.g., with the <tt>-save-temps</tt> or
- <tt>-E</tt> options to <tt>gcc</tt>) first.
END
@PREPENDPATHDIRS =
( '/home/vadve/gaeke/llvm/tools/Debug', '/home/vadve/gaeke/bin' );
@@ -108,26 +101,48 @@
}
$c = new CGI;
-print $c->header,
- $c->start_html(
- -title => $FORM_TITLE,
- -BGCOLOR => '#99bbff'
- ),
- $c->h3($FORM_TITLE);
-if ($LOGO_IMAGE_URL) { print "<img src=\"$LOGO_IMAGE_URL\" />"; }
+print $c->header;
-print "<p>$EXPLAIN_PARAGRAPH</p>",
- $c->start_multipart_form( 'POST', $FORM_URL );
+print <<EOF;
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Try out LLVM in your browser!</title>
+ <link rel="stylesheet" href="../llvm.css" type="text/css">
+</head>
+<body leftmargin="10" marginwidth="10">
+
+<div class="www_title">
+ The <strong>LLVM</strong> Compiler Infrastructure
+</div><br>
+
+<div class="www_sectiontitle">
+ Try out LLVM in your browser!
+</div>
+EOF
+
+
+if ($LOGO_IMAGE_URL) {
+ print "<img align=right width=100 height=114 src=\"$LOGO_IMAGE_URL\" />";
+}
+
+print <<END;
+
+<p>Bitter Melon the cat says, paste a C/C++ program in the text box or upload
+ one from your computer, and you can see the equivalent LLVM code, meow!!</p>
+
+<p>If you want to upload a file from a program with header files, you should
+ preprocess it (e.g., with the <tt>-save-temps</tt> or <tt>-E</tt> options to
+ <tt>gcc</tt>) first.</p>
+
+END
+
+
+print $c->start_multipart_form( 'POST', $FORM_URL );
print "Upload a file: ";
print $c->filefield( -name => 'uploaded_file', -default => '' );
-print "<p>Or type your ";
-print $c->radio_group(
- -name => 'language',
- -values => [ 'C', 'C++' ],
- -default => 'C'
-);
-print " source text below:</p>";
+print "<p>Or type your source code in below:</p>\n";
$source = $c->param('source');
print $c->textarea(
@@ -137,12 +152,21 @@
-default => $source
);
-print "<p />";
-print $c->checkbox(
- -name => 'cxxdemangle',
- -label =>
-'Demangle C++ names in output using c++filt (warning: may produce asyntactic output)'
+print "<p />\n";
+
+print "<p>By the way, what language is this code in?: ", $c->radio_group(
+ -name => 'language',
+ -values => [ 'C', 'C++' ],
+ -default => 'C'
);
+print "</p>\n";
+
+
+print "<p>Click here if you want Bitter Melon to run the resulting code through c++filt. Warning, the LLVM code produced will probably not be lexically valid, but it will be easier to read.</p><ul>",
+ $c->checkbox(
+ -name => 'cxxdemangle',
+ -label => 'Demangle C++ names with c++filt'
+), "</ul>";
print "<p>", $c->submit, "\n", $c->endform;
More information about the llvm-commits
mailing list