1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-25 13:30:42 +02:00

users/14143 plus tweak in padding code:

use default IFS if IFS is unset
This commit is contained in:
Peter Stephenson 2009-05-20 09:04:39 +00:00
parent ad3d514ac7
commit feb29659f1
4 changed files with 17 additions and 5 deletions

View File

@ -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 $
*****************************************************

View File

@ -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))(

View File

@ -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;

View File

@ -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;