about summary refs log tree commit diff stats
path: root/html/000organization.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-14 16:04:45 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-14 16:04:45 -0700
commit65361948ca7975553757a0e0df4ac7352413044c (patch)
tree22063c089f67cb0d82623f2edc2c16b7e4389d41 /html/000organization.cc.html
parent64586540eccbc0880341782d329b419ab9d002de (diff)
downloadmu-65361948ca7975553757a0e0df4ac7352413044c.tar.gz
1376 - update github docs
Diffstat (limited to 'html/000organization.cc.html')
-rw-r--r--html/000organization.cc.html25
1 files changed, 15 insertions, 10 deletions
diff --git a/html/000organization.cc.html b/html/000organization.cc.html
index 5984921c..b50b0238 100644
--- a/html/000organization.cc.html
+++ b/html/000organization.cc.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-<title>Mu - 000organization.cc</title>
+<title>~/Desktop/s/mu/000organization.cc</title>
 <meta name="Generator" content="Vim/7.4">
 <meta name="plugin-version" content="vim7.4_v1">
 <meta name="syntax" content="cpp">
@@ -101,12 +101,12 @@ body { font-family: monospace; color: #d0d0d0; background-color: #000000; }
 <span class="Comment">//: Here's part of a layer in color: <a href="http://i.imgur.com/0eONnyX.png">http://i.imgur.com/0eONnyX.png</a>. Directives</span>
 <span class="Comment">//: are shaded dark.</span>
 <span class="Comment">//:</span>
-<span class="Comment">//: Layers do more than just shuffle code around. Their guarantee is that it</span>
-<span class="Comment">//: should be possible to stop loading after any file/layer, build and run the</span>
-<span class="Comment">//: program, and pass all tests for loaded features. (Relevant is</span>
+<span class="Comment">//: Layers do more than just shuffle code around. In a well-organized codebase</span>
+<span class="Comment">//: it should be possible to stop loading after any file/layer, build and run</span>
+<span class="Comment">//: the program, and pass all tests for loaded features. (Relevant is</span>
 <span class="Comment">//: <a href="http://youtube.com/watch?v=c8N72t7aScY">http://youtube.com/watch?v=c8N72t7aScY</a>, a scene from &quot;2001: A Space</span>
-<span class="Comment">//: Odyssey&quot;.) Use the included script called 'test_all_layers' to check the</span>
-<span class="Comment">//: guarantee if you make any changes.</span>
+<span class="Comment">//: Odyssey&quot;.) Get into the habit of running the included script called</span>
+<span class="Comment">//: 'test_all_layers' before you commit any changes.</span>
 <span class="Comment">//:</span>
 <span class="Comment">//: This 'subsetting guarantee' ensures that this directory contains a</span>
 <span class="Comment">//: cleaned-up narrative of the evolution of this codebase. Organizing</span>
@@ -125,13 +125,14 @@ body { font-family: monospace; color: #d0d0d0; background-color: #000000; }
 <span class="Comment">// Types</span>
 <span class="Comment">// End Types</span>
 
-<span class="Comment">// prototypes are auto-generated; define your functions in any order</span>
+<span class="Comment">// prototypes are auto-generated in the makefile; define your functions in any order</span>
 <span class="PreProc">#include </span><span class="Constant">&quot;function_list&quot;</span>  <span class="Comment">// by convention, files ending with '_list' are auto-generated</span>
 
 <span class="Comment">// Globals</span>
 <span class="Comment">// End Globals</span>
 
 int main<span class="Delimiter">(</span>int argc<span class="Delimiter">,</span> char* argv[]<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  atexit<span class="Delimiter">(</span>teardown<span class="Delimiter">);</span>
 
   <span class="Comment">// End One-time Setup</span>
 
@@ -140,6 +141,13 @@ int main<span class="Delimiter">(</span>int argc<span class="Delimiter">,</span>
   <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span>  <span class="Comment">// End Main</span>
 <span class="Delimiter">}</span>
 
+<span class="Comment">//: our first directive; will move the include above the program</span>
+<span class="Delimiter">:(before &quot;End Includes&quot;)</span>
+<span class="PreProc">#include</span><span class="Constant">&lt;stdlib.h&gt;</span>
+
+<span class="Comment">//: Without directives or with the :(code) directive, lines get added at the</span>
+<span class="Comment">//: end.</span>
+<span class="Delimiter">:(code)</span>
 void setup<span class="Delimiter">()</span> <span class="Delimiter">{</span>
   <span class="Comment">// End Setup</span>
 <span class="Delimiter">}</span>
@@ -147,9 +155,6 @@ void setup<span class="Delimiter">()</span> <span class="Delimiter">{</span>
 void teardown<span class="Delimiter">()</span> <span class="Delimiter">{</span>
   <span class="Comment">// End Teardown</span>
 <span class="Delimiter">}</span>
-
-<span class="Comment">//: Without directives or with the :(code) directive, lines get added at the</span>
-<span class="Comment">//: end.</span>
 </pre>
 </body>
 </html>