summaryrefslogtreecommitdiff
path: root/src/node_options.h
diff options
context:
space:
mode:
authorEvan Lucas <evanlucas@me.com>2015-06-01 09:15:10 -0500
committerEvan Lucas <evanlucas@me.com>2015-06-01 11:25:32 -0500
commit5b6f575c1f5d4b82e03e2a78066b7707747e110e (patch)
tree229a072c17b64b9811d6b43cb5ea0a8d6f71b5e8 /src/node_options.h
parentc0e7bf2d8ceb65ad3840bc4ebf3cbd9fef8e8c14 (diff)
downloadandroid-node-v8-5b6f575c1f5d4b82e03e2a78066b7707747e110e.tar.gz
android-node-v8-5b6f575c1f5d4b82e03e2a78066b7707747e110e.tar.bz2
android-node-v8-5b6f575c1f5d4b82e03e2a78066b7707747e110e.zip
Revert "src: add getopt option parser"
This reverts commit c0e7bf2d8ceb65ad3840bc4ebf3cbd9fef8e8c14. There are a few edge cases that can cause a crash and need to be properly handled. PR-URL: https://github.com/nodejs/io.js/pull/1862 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/node_options.h')
-rw-r--r--src/node_options.h62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/node_options.h b/src/node_options.h
deleted file mode 100644
index 1d356a1a15..0000000000
--- a/src/node_options.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef SRC_NODE_OPTIONS_H_
-#define SRC_NODE_OPTIONS_H_
-
-#include "node_version.h"
-#include "util.h"
-#include "getopt.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-namespace node {
-
-class NodeOptions {
- public:
- bool print_eval = false;
- bool force_repl = false;
- bool trace_deprecation = false;
- bool throw_deprecation = false;
- bool abort_on_uncaught_exception = false;
- bool trace_sync_io = false;
- const char* eval_string = nullptr;
- unsigned int preload_module_count = 0;
- const char** preload_modules = nullptr;
- bool use_debug_agent = false;
- bool debug_wait_connect = false;
- int debug_port = 5858;
- bool no_deprecation = false;
-#if defined(NODE_HAVE_I18N_SUPPORT)
- // Path to ICU data (for i18n / Intl)
- const char* icu_data_dir = nullptr;
-#endif
-
- NodeOptions() = default;
-
- // Print help to stdout
- void PrintHelp();
-
- // Parse command line arguments.
- //
- // argv is modified in place. exec_argv and v8_argv are out arguments that
- // ParseArgs() allocates memory for and stores a pointer to the output
- // vector in. The caller should free them with delete[].
- //
- // On exit:
- //
- // * argv contains the arguments with node and V8 options filtered out.
- // * exec_argv contains both node and V8 options and nothing else.
- // * v8_argv contains argv[0] plus any V8 options
- void ParseArgs(int* argc,
- const char** argv,
- int* exec_argc,
- const char*** exec_argv,
- int* v8_argc,
- const char*** v8_argv);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NodeOptions);
-};
-
-} // namespace node
-
-#endif // SRC_NODE_OPTIONS_H_