~mdw
/
fwd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
file.c (file_read): Copy name when duplicating input file spec.
[fwd]
/
file.c
diff --git
a/file.c
b/file.c
index
31e1e07
..
88b7666
100644
(file)
--- a/
file.c
+++ b/
file.c
@@
-242,13
+242,15
@@
static void file_fspec(fspec *f, scanner *sc)
static void file_read(fdata *f, scanner *sc)
{
file_fspec(&f->in, sc);
static void file_read(fdata *f, scanner *sc)
{
file_fspec(&f->in, sc);
- if (sc->t != ',') {
+ if (sc->t == ',') {
+ token(sc);
+ file_fspec(&f->out, sc);
+ } else {
f->out = f->in;
if (f->out.type == FTYPE_FD && f->out.u.fd == rstdin)
f->out.u.fd = rstdout;
f->out = f->in;
if (f->out.type == FTYPE_FD && f->out.u.fd == rstdin)
f->out.u.fd = rstdout;
- } else {
- token(sc);
- file_fspec(&f->out, sc);
+ else if (f->out.type == FTYPE_NAME)
+ f->out.u.name = xstrdup(f->in.u.name);
}
f->fa = fattr_global;
f->fo = file_opts;
}
f->fa = fattr_global;
f->fo = file_opts;
@@
-488,7
+490,7
@@
static void fsource_attach(source *s, scanner *sc, target *t)
ee->ops->close(ee);
goto tidy;
}
ee->ops->close(ee);
goto tidy;
}
- endpt_join(e, ee);
+ endpt_join(e, ee
, fs->s.desc
);
/* --- Dispose of the source and target now --- */
/* --- Dispose of the source and target now --- */