summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>2014-08-29 12:48:09 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2014-09-08 00:40:51 +0200
commit7f78fc8d64d36714d6b3da3af9e6d33aa2104fd1 (patch)
tree925ea5dcade8c3086217b823c44a15cdf2e32f5d
parentb2cff5c69296fc59a92eb48f8379c2acb095d914 (diff)
downloadneardal-7f78fc8d64d36714d6b3da3af9e6d33aa2104fd1.tar.gz
neardal-7f78fc8d64d36714d6b3da3af9e6d33aa2104fd1.tar.bz2
neardal-7f78fc8d64d36714d6b3da3af9e6d33aa2104fd1.zip
Minor style cleanup.
-rw-r--r--ncl/ncl.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ncl/ncl.c b/ncl/ncl.c
index c4950c8..8f2d5c8 100644
--- a/ncl/ncl.c
+++ b/ncl/ncl.c
@@ -278,13 +278,13 @@ int main(int argc, char *argv[])
NCLError err;
GOptionContext *context;
GError *error = NULL;
- char *execCmdLineStr = NULL;
- char *scriptFileStr = NULL;
+ char *opt_command = NULL;
+ char *opt_script = NULL;
gboolean opt_keep_running = FALSE;
GOptionEntry options[] = {
- { "exec", 'e', 0, G_OPTION_ARG_STRING, &execCmdLineStr,
+ { "exec", 'e', 0, G_OPTION_ARG_STRING, &opt_command,
"Execute command", "command" },
- { "script", 's', 0, G_OPTION_ARG_STRING , &scriptFileStr,
+ { "script", 's', 0, G_OPTION_ARG_STRING , &opt_script,
"Execute script", "filename" },
{ "keep", 'k', 0, G_OPTION_ARG_NONE, &opt_keep_running,
"Keep running after command/script execution" },
@@ -302,20 +302,20 @@ int main(int argc, char *argv[])
}
g_option_context_free(context);
- err = ncl_prv_init(execCmdLineStr);
+ err = ncl_prv_init(opt_command);
if (err != NCLERR_NOERROR) {
ncl_finalize();
return NCLERR_INIT;
}
- if (!scriptFileStr && !execCmdLineStr)
+ if (!opt_script && !opt_command)
opt_keep_running = TRUE;
- if (scriptFileStr)
- ncl_prv_parse_script_file(scriptFileStr);
+ if (opt_script)
+ ncl_prv_parse_script_file(opt_script);
- if (execCmdLineStr) {
- gNclCtx.errOnExit = ncl_exec(execCmdLineStr);
+ if (opt_command) {
+ gNclCtx.errOnExit = ncl_exec(opt_command);
while (g_main_context_pending(NULL))
g_main_context_iteration(NULL, FALSE);
}
@@ -326,7 +326,7 @@ int main(int argc, char *argv[])
(GIOFunc) ncl_prv_kbinput_cb, &gNclCtx);
g_io_channel_unref(gNclCtx.channel);
- if (!scriptFileStr && !execCmdLineStr)
+ if (!opt_script && !opt_command)
ncl_exec(LISTCMD_NAME);
rl_callback_handler_install(NCL_PROMPT, ncl_parse_line);