Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: ports/nacl-spawn/cli_main.c

Issue 907563002: Simplify cli_main (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ports/nacl-spawn/cli_main.c
diff --git a/ports/nacl-spawn/cli_main.c b/ports/nacl-spawn/cli_main.c
new file mode 100644
index 0000000000000000000000000000000000000000..b8c37f5897865b13516760c181fa423fa74f792b
--- /dev/null
+++ b/ports/nacl-spawn/cli_main.c
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2014 The Native Client Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Define a typical entry point for command line tools spawned by bash
+ * (e.g., ls, objdump, and objdump). */
+
+#include "ppapi_simple/ps_main.h"
+#include "nacl_main.h"
+
+extern int nacl_main(int argc, char *argv[]);
Sam Clegg 2015/02/17 18:22:45 This is declared in nacl_main.h already.
gdeepti 2015/02/17 21:06:49 Acknowledged.
+void setup_nacl_spawn_env();
Sam Clegg 2015/02/17 18:22:45 Declare this in nacl_main.h too. Also, can can ch
gdeepti 2015/02/17 21:06:49 Done.
+
+int cli_main(int argc, char* argv[]) {
+ setup_nacl_spawn_env();
+ return nacl_main(argc, argv);
+}
+
+PPAPI_SIMPLE_REGISTER_MAIN(cli_main)

Powered by Google App Engine
This is Rietveld 408576698