summary refs log tree commit diff
path: root/Src/params.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-08-10 16:19:11 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-08-10 16:19:11 +0000
commitf6ecbb7f4d74099a0d4b342996696159344f4235 (patch)
treeb5da55d82acdc4ff4f3d8c0972be03a75a32837e /Src/params.c
parent4239b1243a4795fc6e7207151334cce03dafe44e (diff)
downloadzsh-f6ecbb7f4d74099a0d4b342996696159344f4235.tar.gz
zsh-f6ecbb7f4d74099a0d4b342996696159344f4235.tar.xz
zsh-f6ecbb7f4d74099a0d4b342996696159344f4235.zip
12581: C_BASES option
Diffstat (limited to 'Src/params.c')
-rw-r--r--Src/params.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Src/params.c b/Src/params.c
index 9ef3e61ca..1439e9af8 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -3045,7 +3045,12 @@ convbase(char *s, zlong v, int base)
 	base = 10;
 
     if (base != 10) {
-	sprintf(s, "%d#", base);
+	if (isset(CBASES) && base == 16)
+	    sprintf(s, "0x");
+	else if (isset(CBASES) && base == 8 && isset(OCTALZEROES))
+	    sprintf(s, "0");
+	else
+	    sprintf(s, "%d#", base);
 	s += strlen(s);
     }
     for (x = v; x; digs++)