1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 16:50:58 +01:00

11467: [#<base>] syntax for output base

zsh-users/3071: compdump tweak to avoid // in path
This commit is contained in:
Peter Stephenson 2000-05-19 18:22:50 +00:00
parent e20600c8a4
commit 8d17d2f02d
6 changed files with 62 additions and 11 deletions

View file

@ -1964,10 +1964,13 @@ arithsubst(char *a, char **bptr, char *rest)
singsub(&a);
v = matheval(a);
if (v.type & MN_FLOAT)
if ((v.type & MN_FLOAT) && !outputradix)
b = convfloat(v.u.d, 0, 0, NULL);
else
convbase(buf, v.u.l, 0);
else {
if (v.type & MN_FLOAT)
v.u.l = (zlong) v.u.d;
convbase(buf, v.u.l, outputradix);
}
t = *bptr = (char *) hcalloc(strlen(*bptr) + strlen(b) +
strlen(rest) + 1);
t--;