diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-24 22:49:29 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-24 22:49:29 -0700 |
commit | 6d8ef6b12d37336a92c7a6b20b4b66f3ab424464 (patch) | |
tree | 49c4b2b75ebc85540861b2682e3d48fe958c5dc8 /cpp/001help | |
parent | 0b0cfb6f1f4579eef463ffcb41ba782ddbd56035 (diff) | |
download | mu-6d8ef6b12d37336a92c7a6b20b4b66f3ab424464.tar.gz |
1189 - add extensions to all layers
I'm sick of fighting vim's filetype detection. No modeline and files highlight in random colors. I add a modeline and it stops highlighting tangle comments. Even though it read my #$%# vimrc! Fuck this shite.
Diffstat (limited to 'cpp/001help')
-rw-r--r-- | cpp/001help | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/cpp/001help b/cpp/001help deleted file mode 100644 index 2c48d297..00000000 --- a/cpp/001help +++ /dev/null @@ -1,44 +0,0 @@ -//: Everything this project/binary supports. -//: This should give you a sense for what to look forward to in later layers. - -:(before "End Commandline Parsing") -if (argc <= 1 || is_equal(argv[1], "--help")) { - // this is the functionality later layers will provide - // currently no automated tests for commandline arg parsing - cerr << "To load files and run 'main':\n" - << " mu file1.mu file2.mu ...\n" - << "To run all tests:\n" - << " mu test\n" - << "To load files and then run all tests:\n" - << " mu test file1.mu file2.mu ...\n" - ; - return 0; -} - -//:: Helper function used by the above fragment of code (and later layers too, -//:: who knows?). -//: The :(code) directive appends function definitions to the end of the -//: project. Regardless of where functions are defined, we can call them -//: anywhere we like as long as we format the function header in a specific -//: way: put it all on a single line without indent, end the line with ') {' -//: and no trailing whitespace. As long as functions uniformly start this -//: way, our makefile contains a little command to automatically generate -//: declarations for them. -:(code) -bool is_equal(char* s, const char* lit) { - return strncmp(s, lit, strlen(lit)) == 0; -} - -:(before "End Includes") -#include<iostream> -using std::istream; -using std::ostream; -using std::iostream; -using std::cin; -using std::cout; -using std::cerr; - -#include<cstring> -#include<string> -using std::string; -const size_t NOT_FOUND = string::npos; |