From 65361948ca7975553757a0e0df4ac7352413044c Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 14 May 2015 16:04:45 -0700 Subject: 1376 - update github docs --- html/000organization.cc.html | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'html/000organization.cc.html') 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 @@ -Mu - 000organization.cc +~/Desktop/s/mu/000organization.cc @@ -101,12 +101,12 @@ body { font-family: monospace; color: #d0d0d0; background-color: #000000; } //: Here's part of a layer in color: http://i.imgur.com/0eONnyX.png. Directives //: are shaded dark. //: -//: Layers do more than just shuffle code around. Their guarantee is that it -//: should be possible to stop loading after any file/layer, build and run the -//: program, and pass all tests for loaded features. (Relevant is +//: Layers do more than just shuffle code around. In a well-organized codebase +//: it should be possible to stop loading after any file/layer, build and run +//: the program, and pass all tests for loaded features. (Relevant is //: http://youtube.com/watch?v=c8N72t7aScY, a scene from "2001: A Space -//: Odyssey".) Use the included script called 'test_all_layers' to check the -//: guarantee if you make any changes. +//: Odyssey".) Get into the habit of running the included script called +//: 'test_all_layers' before you commit any changes. //: //: This 'subsetting guarantee' ensures that this directory contains a //: cleaned-up narrative of the evolution of this codebase. Organizing @@ -125,13 +125,14 @@ body { font-family: monospace; color: #d0d0d0; background-color: #000000; } // Types // End Types -// prototypes are auto-generated; define your functions in any order +// prototypes are auto-generated in the makefile; define your functions in any order #include "function_list" // by convention, files ending with '_list' are auto-generated // Globals // End Globals int main(int argc, char* argv[]) { + atexit(teardown); // End One-time Setup @@ -140,6 +141,13 @@ int main(int argc, return 0; // End Main } +//: our first directive; will move the include above the program +:(before "End Includes") +#include<stdlib.h> + +//: Without directives or with the :(code) directive, lines get added at the +//: end. +:(code) void setup() { // End Setup } @@ -147,9 +155,6 @@ void setup() { void teardown() { // End Teardown } - -//: Without directives or with the :(code) directive, lines get added at the -//: end. -- cgit 1.4.1-2-gfad0