about summary refs log tree commit diff stats
path: root/subx/001help.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-10-11 01:38:47 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-10-11 01:38:47 -0700
commitf8831a023d91556eb105edc27e7cbb61bde573ca (patch)
treee36bf6a03e7aaba119044c2929255e5faa7f6b31 /subx/001help.cc
parenta7c35665a5b092eab1f4be159bd3f1e43f038283 (diff)
downloadmu-f8831a023d91556eb105edc27e7cbb61bde573ca.tar.gz
4014 - core skeleton for x86 interpreter
Diffstat (limited to 'subx/001help.cc')
-rw-r--r--subx/001help.cc20
1 files changed, 4 insertions, 16 deletions
diff --git a/subx/001help.cc b/subx/001help.cc
index ca1cb106..d4c3334f 100644
--- a/subx/001help.cc
+++ b/subx/001help.cc
@@ -2,24 +2,12 @@
 //: This should give you a sense for what to look forward to in later layers.
 
 :(before "End Commandline Parsing")
-if (argc != 1) {
+if (argc <= 1 || is_equal(argv[1], "--help")) {
   //: this is the functionality later layers will provide
   // currently no automated tests for commandline arg parsing
-  return 1;
-}
-
-//: Support for option parsing.
-//: Options always begin with '--' and are always the first arguments. An
-//: option will never follow a non-option.
-:(before "End Commandline Parsing")
-char** arg = &argv[1];
-while (argc > 1 && starts_with(*arg, "--")) {
-  if (false)
-    ;  // no-op branch just so any further additions can consistently always start with 'else'
-  // End Commandline Options(*arg)
-  else
-    cerr << "skipping unknown option " << *arg << '\n';
-  --argc;  ++argv;  ++arg;
+  cerr << "Usage:\n"
+       << "  subx test\n";
+  return 0;
 }
 
 //:: Helper function used by the above fragment of code (and later layers too,