]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - test.html
Should now run programs in the browser, just need to compile the examples and load...
[xonotic/gmqcc.git] / test.html
index 90eaf3513c79c97f7e37f0c23e182a057358820c..557baa745c29881d6213f28851fd30dff9603f13 100644 (file)
--- a/test.html
+++ b/test.html
@@ -1,89 +1,90 @@
 <!doctype html>
 <html>
-  <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="chrome=1">
-    <title>GMQCC by graphitemaster</title>
+    <head>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="chrome=1">
+        <title>GMQCC by graphitemaster</title>
 
-    <link rel="stylesheet" href="stylesheets/styles.css">
-    <link rel="stylesheet" href="stylesheets/pygment_trac.css">
-    <script src="javascripts/scale.fix.js"></script>
-    <script src="javascript/vm.js"></script>
-    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-    <!--[if lt IE 9]>
-    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
-    <![endif]-->
-  </head>
-  <body>
-    <a href="https://github.com/graphitemaster/gmqcc"><div class="fork"></div></a>
-    <div class="wrapper">
-      <header>
-          
-        <h1 class="header">GMQCC</h1>
-        <p class="header">An Improved Quake C Compiler</p>
+        <link rel="stylesheet" href="stylesheets/styles.css">
+        <link rel="stylesheet" href="stylesheets/pygment_trac.css">
+        <script src="javascripts/scale.fix.js"></script>
+        <!--[if lt IE 9]>
+        <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+        <![endif]-->
+    </head>
+    <body>
+        <a href="https://github.com/graphitemaster/gmqcc"><div class="fork"></div></a>
+        <div class="wrapper">
+            <header>
+                <h1 class="header">GMQCC</h1>
+                <p class="header">An Improved Quake C Compiler</p>
 
-        <ul>
-          <li class="download"><a class="buttons" href="https://github.com/graphitemaster/gmqcc/zipball/master">Download ZIP</a></li>
-          <li class="download"><a class="buttons" href="https://github.com/graphitemaster/gmqcc/tarball/master">Download TAR</a></li>
-          <li><a class="buttons issues" href="https://github.com/graphitemaster/gmqcc/issues">Issues</a></li>
-          <li><a class="buttons test"   href="test.html">Try it</a></li>
-          <li><a class="buttons github" href="https://github.com/graphitemaster/gmqcc">View On GitHub</a></li>
-        </ul>
-
-      </header>
-      <section>
-        <h3>Try it from your browser</h3>
-        Load Example:
-        <select id="eg" onchange="update()">
-            <option value="1">Hello World</option>
-            <option value="2">Loops</option>
-        </select>
-        &nbsp;
-        Standard:
-        <select id="std" onchange="update()">
-            <option value="qcc">QCC</option>
-            <option value="fteqcc">FTEQCC</option>
-            <option value="gmqcc">GMQCC</option>
-        </select>
-        <textarea id="input" rows="18" cols="100%"></textarea>
-        <button onclick="compile();">Compile &amp; Run</button>
-        <h4>Compiler Output:</h4>
-        <textarea id="output" rows="8" cols="100%"></textarea>
-        <h4>Execution Output:</h4>
-        <textarea id="exec" rows="8", cols="100%"></textarea>
-      </section>
-      <footer>
-        <script type="text/javascript" src="http://www.ohloh.net/p/602517/widgets/project_partner_badge.js"></script>
-      </footer>
-    </div>
-       <script type='text/javascript'>
-      var Module = {
-        preRun: [],
-        noInitialRun: true,
-        postRun: [],
-        print: (function() {
-          var element = document.getElementById('output');
-          element.value = ''; // clear browser cache
-          return function(text) {
-            // These replacements are necessary if you render to raw HTML
-            //text = text.replace(/&/g, "&amp;");
-            //text = text.replace(/</g, "&lt;");
-            //text = text.replace(/>/g, "&gt;");
-            //text = text.replace('\n', '<br>', 'g');
-            element.value += text + "\n";
-            element.scrollTop = 99999; // focus on bottom
-          };
-        })(),
-        printErr: function(text) {
-          if (0) { // XXX disabled for safety typeof dump == 'function') {
-            dump(text + '\n'); // fast, straight to the real console
-          } else {
-            console.log(text);
-          }
-        }
-      };
-    </script>  
+                <ul>
+                    <li class="download"><a href="https://github.com/graphitemaster/gmqcc/zipball/master">Download ZIP</a></li>
+                    <li class="download"><a href="https://github.com/graphitemaster/gmqcc/tarball/master">Download TAR</a></li>
+                    <li class="buttons"><a href="https://github.com/graphitemaster/gmqcc/issues">Issues</a></li>
+                    <li class="Buttons"><a href="test.html">Try it</a></li>
+                    <li class="buttons"><a href="https://github.com/graphitemaster/gmqcc">View On GitHub</a></li>
+                </ul>
+            </header>
+            <section>
+                <h3>Try it from your browser</h3>
+                Load Program:
+                <select id="eg" onchange="update()">
+                    <option selected value="1">Builtins</option>
+                    <option value="2">Calls</option>
+                    <option value="3">Equality</option>
+                    <option value="4">Field Parameters</option>
+                    <option value="5">Field Definitions</option>
+                    <option value="6">Fields</option>
+                    <option value="7">Functions As Paramaters</option>
+                    <option value="8">Global Definitions</option>
+                    <option value="9">If</option>
+                    <option value="10">Loops</option>
+                    <option value="11">Math</option>
+                    <option value="12">Digraphs and Trigraphs</option>
+                    <option value="13">Variadic Arguments</option>
+                </select>
+                <textarea id="input" rows="25" cols="100%" disabled="disabled"></textarea>
+                <br>
+                <button onclick="compile()">Execute</button>
+                <textarea id="args">Test</textarea>
+                <h4>Execution Output:</h4>
+                <textarea id="output" rows="25", cols="100%"></textarea>
+            </section>
+            <footer>
+                <!--<script type="text/javascript" src="http://www.ohloh.net/p/602517/widgets/project_partner_badge.js"></script>-->
+            </footer>
+        </div>
+        <script>
+            var Module = {
+                preRun: [],
+                noInitialRun: true,
+                postRun: [],
+                print: (function() {
+                    var element = document.getElementById('output');
+                    element.value = ''; // clear browser cache
+                    return function(text) {
+                        // These replacements are necessary if you render to raw HTML
+                        //text = text.replace(/&/g, "&amp;");
+                        //text = text.replace(/</g, "&lt;");
+                        //text = text.replace(/>/g, "&gt;");
+                        //text = text.replace('\n', '<br>', 'g');
+                        element.value += text + "\n";
+                        element.scrollTop = 99999; // focus on bottom
+                    };
+                })(),
+                printErr: function(text) {
+                    if (0) { // XXX disabled for safety typeof dump == 'function') {
+                        dump(text + '\n'); // fast, straight to the real console
+                    } else {
+                        console.log(text);
+                    }
+                }
+            };
+        </script>
         <script src="javascripts/compiler.js"></script>
-    <!--[if !IE]><script>fixScale(document);</script><![endif]-->
-  </body>    
+        <script src="javascripts/vm.js"></script>
+        <!--[if !IE]><script>fixScale(document);</script><![endif]-->
+    </body>    
 </html>