csh built-in printf now expands arguments. e.g.
printf '%d\n' `echo 23` now works as expected. PR: bin/2969 Submitted by: Gareth McCaughan <gjm11@dpmms.cam.ac.uk>
This commit is contained in:
parent
bc9e7c3b42
commit
0bc998d8ab
@ -36,7 +36,7 @@
|
|||||||
static char sccsid[] = "@(#)func.c 8.1 (Berkeley) 5/31/93";
|
static char sccsid[] = "@(#)func.c 8.1 (Berkeley) 5/31/93";
|
||||||
#else
|
#else
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id: func.c,v 1.9 1997/08/08 00:54:03 steve Exp $";
|
"$Id: func.c,v 1.10 1998/02/28 10:49:56 jraynard Exp $";
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
@ -1491,10 +1491,23 @@ doprintf(v, t)
|
|||||||
Char **v;
|
Char **v;
|
||||||
struct command *t;
|
struct command *t;
|
||||||
{
|
{
|
||||||
|
Char **newv;
|
||||||
char **c;
|
char **c;
|
||||||
extern int progprintf __P((int, char **));
|
extern int progprintf __P((int, char **));
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
gflag = 0;
|
||||||
|
tglob(v);
|
||||||
|
if (gflag) {
|
||||||
|
newv = globall(v);
|
||||||
|
if (newv == 0) {
|
||||||
|
stderror(ERR_NAME | ERR_NOMATCH);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
v = newv;
|
||||||
|
gargv=0;
|
||||||
|
}
|
||||||
|
|
||||||
ret = progprintf(blklen(v), c = short2blk(v));
|
ret = progprintf(blklen(v), c = short2blk(v));
|
||||||
(void) fflush(cshout);
|
(void) fflush(cshout);
|
||||||
(void) fflush(csherr);
|
(void) fflush(csherr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user