From 1d0e41c90ad9a0b49cfb54b7fc714828282ce787 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 17 Sep 2020 00:31:17 +0200 Subject: [PATCH] :art: Toggle stdin (and fix naming for windows --- include/arg.h | 2 +- src/arg.c | 2 +- src/gwion.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.43.0