efficient $(<<<foo) and $(<<EOF … ) implementation, requested by izabera

This commit is contained in:
tg
2016-06-26 00:44:59 +00:00
parent 582e745958
commit a41a62dad7
4 changed files with 54 additions and 15 deletions

5
exec.c
View File

@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.174 2016/06/26 00:09:35 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.175 2016/06/26 00:44:58 tg Exp $");
#ifndef MKSH_DEFAULT_EXECSHELL
#define MKSH_DEFAULT_EXECSHELL MKSH_UNIXROOT "/bin/sh"
@ -34,7 +34,6 @@ static int comexec(struct op *, struct tbl * volatile, const char **,
static void scriptexec(struct op *, const char **) MKSH_A_NORETURN;
static int call_builtin(struct tbl *, const char **, const char *, bool);
static int iosetup(struct ioword *, struct tbl *);
static int herein(struct ioword *, char **);
static const char *do_selectargs(const char **, bool);
static Test_op dbteste_isa(Test_env *, Test_meta);
static const char *dbteste_getopnd(Test_env *, Test_op, bool);
@ -1557,7 +1556,7 @@ hereinval(struct ioword *iop, int sub, char **resbuf, struct shf *shf)
return (0);
}
static int
int
herein(struct ioword *iop, char **resbuf)
{
int fd = -1;