-Subproject commit 750eae810b8603f1229a93d6bbf856ce8f9f9bd7
+Subproject commit 6d0584e789c5dbee8f2fc9b8fa95781d271c738c
struct Vector_ config;
struct SoundInfo_ *si;
m_bool loop;
+ m_bool stdin;
} Arg;
ANN void arg_release(Arg*);
CHECK_OB((tmp = option_argument(ca)))
arg_set_pass(gwion, tmp);
break;
+ case '\0':
+ arg->stdin = 1;
+ break;
default:
gw_err(_("invalid arguments"));
return GW_ERROR;
ANN static int is_reg(const m_str path) {
struct stat s;
stat(path, &s);
- return S_ISREG(s.st_mode);
+ return S_ISREG(s.st_mode) || !S_ISFIFO(s.st_mode);
}
#else
ANN static m_bool is_reg(const m_str path) {
if(gwion_engine(gwion)) {
gwion_cleaner(gwion);
gwion_compile(gwion, &arg->add);
+ if(arg->stdin)
+ compile_file(gwion, "stdin", stdin);
return GW_OK;
}
}
ANN static Fptr_Def import_fptr(const Gwi gwi, ae_flag flag) {
Func_Base *base = gwi_func_base(gwi, gwi->ck);
- return new_fptr_def(gwi->gwion->mp, base, flag | ae_flag_builtin);
+ return new_fptr_def(gwi->gwion->mp, base);
}
ANN Type gwi_fptr_end(const Gwi gwi, const ae_flag flag) {
// create a matching signature
// TODO: we could check first if there a matching existing one
Func_Base *const fbase = cpy_func_base(env->gwion->mp, bin->lhs->info->type->e->d.func->def->base);
- const Fptr_Def fptr_def = new_fptr_def(env->gwion->mp, fbase, bin->lhs->info->type->e->d.func->def->base->flag);
+ const Fptr_Def fptr_def = new_fptr_def(env->gwion->mp, fbase);
char name[13 + strlen(env->curr->name) +
num_digit(bin->rhs->pos->first.line) + num_digit(bin->rhs->pos->first.column)];
sprintf(name, "generated@%s@%u:%u", env->curr->name, bin->rhs->pos->first.line, bin->rhs->pos->first.column);
fbase->tmpl->base = 0;
fbase->tmpl->call = cpy_type_list(env->gwion->mp, types);
if(template_push_types(env, fbase->tmpl) > 0) {
- const Fptr_Def fptr = new_fptr_def(env->gwion->mp, fbase, base->base->flag);
+ const Fptr_Def fptr = new_fptr_def(env->gwion->mp, fbase);
if(traverse_fptr_def(env, fptr) > 0 &&
(base->base->ret_type = known_type(env, base->base->td)) &&
(!exp->args || !!check_exp(env, exp->args))) {