builtin: Fix handling of trailing IFS white spaces

The read built-in does not handle trailing IFS white spaces in
the right way, when there are more fields than variables.  Part
of the problem is that this case is handled outside of ifsbreakup.

Harald van Dijk wrote a patch to fix this by moving the magic
into ifsbreakup itself.

This patch further reorganises the ifsbreakup loop by having only
one loop over the whole string.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Harald van Dijk <harald@gigawatt.nl>
3 files changed
tree: e1da266bf7d2d64199e4856550e929fda791bcef
  1. src/
  2. autogen.sh
  3. ChangeLog
  4. ChangeLog.O
  5. configure.ac
  6. COPYING
  7. Makefile.am