about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--Doc/Zsh/params.yo3
-rw-r--r--Src/subst.c7
-rw-r--r--Src/utils.c2
4 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ae50b04f..f30f025fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
+2009-05-20  Peter Stephenson  <pws@csr.com>
+
+	* users/14143 plus extra fix in padding code: Doc/Zsh/params.yo,
+	Src/subst.c, Src/utils.c: use default IFS if IFS is unset.
+
 2009-05-19  Peter Stephenson  <pws@csr.com>
 
+	* 26973: Doc/Zsh/contrib.yo, Functions/Misc/zmathfuncdef: make
+	zmathfuncdef replace functions and list existing functions.
+
 	* Config/version.mk: 4.3.9-dev-5 (4.3.9-dev-4 not recorded).
 
 	* Greg Klanderman: 26972: Src/utils.c: fix problem ni 26964.
@@ -11730,5 +11738,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4690 $
+* $Revision: 1.4691 $
 *****************************************************
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index f77d36db4..18c146802 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -893,6 +893,9 @@ character together with any adjacent IFS white space character delimit
 a field.  If an IFS white space character appears twice consecutively
 in the IFS, this character is treated as if it were not an IFS white
 space character.
+
+If the parameter is unset, the default is used.  Note this has
+a different effect from setting the parameter to an empty string.
 )
 vindex(KEYTIMEOUT)
 item(tt(KEYTIMEOUT))(
diff --git a/Src/subst.c b/Src/subst.c
index 8a695cee9..5d14c458a 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -714,9 +714,10 @@ dopadding(char *str, int prenum, int postnum, char *preone, char *postone,
     convchar_t cchar;
 
     MB_METACHARINIT();
-    if (*ifs)
-	def = dupstrpfx(ifs, MB_METACHARLEN(ifs));
-    else
+    if (!ifs || *ifs) {
+	char *tmpifs = ifs ? ifs : DEFAULT_IFS;
+	def = dupstrpfx(tmpifs, MB_METACHARLEN(tmpifs));
+    } else
 	def = "";
     if (preone && !*preone)
 	preone = def;
diff --git a/Src/utils.c b/Src/utils.c
index e7a4595b8..00d51a320 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3162,7 +3162,7 @@ inittyptab(void)
     }
 #ifdef MULTIBYTE_SUPPORT
     set_widearray(wordchars, &wordchars_wide);
-    set_widearray(ifs, &ifs_wide);
+    set_widearray(ifs ? ifs : DEFAULT_IFS, &ifs_wide);
 #endif
     for (s = SPECCHARS; *s; s++)
 	typtab[STOUC(*s)] |= ISPECIAL;