From: Jérémie Astor Date: Wed, 16 Sep 2020 22:31:17 +0000 (+0200) Subject: :art: Toggle stdin (and fix naming for windows X-Git-Tag: nightly~1279 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=1d0e41c90ad9a0b49cfb54b7fc714828282ce787;p=gwion.git :art: Toggle stdin (and fix naming for windows --- diff --git a/include/arg.h b/include/arg.h index d092cc67..ae9746ad 100644 --- a/include/arg.h +++ b/include/arg.h @@ -9,7 +9,7 @@ typedef struct Arg_ { struct Vector_ config; struct SoundInfo_ *si; m_bool loop; - m_bool stdin; + m_bool read_stdin; } Arg; ANN void arg_release(Arg*); diff --git a/src/arg.c b/src/arg.c index 46c0c1ff..d3e9489b 100644 --- a/src/arg.c +++ b/src/arg.c @@ -118,7 +118,7 @@ ANN m_bool _arg_parse(const Gwion gwion, Arg* arg) { arg_set_pass(gwion, tmp); break; case '\0': - arg->stdin = 1; + arg->read_stdin = !!arg->read_stdin; break; default: gw_err(_("invalid arguments")); diff --git a/src/gwion.c b/src/gwion.c index 07b221e3..dfd4363a 100644 --- a/src/gwion.c +++ b/src/gwion.c @@ -79,7 +79,7 @@ ANN static m_bool gwion_ok(const Gwion gwion, Arg* arg) { if(gwion_engine(gwion)) { gwion_cleaner(gwion); gwion_compile(gwion, &arg->add); - if(arg->stdin) + if(arg->read_stdin) compile_file(gwion, "stdin", stdin); return GW_OK; }