Proposed More patch

Cathey, Jim jcathey at ciena.com
Tue Mar 1 22:01:28 UTC 2011


Please forgive the un-real patch-oid format, but we're not
set up to do it better right now.  We've got a script that
pipes GNU ls -C into BB more, and it really messes up the
tabs.  I made a quick patch to more.c which seems to help.
Any reason this shouldn't be permanent?  The crude conversion
is hardly less crude than the original, but works a lot better.

	/* Crudely convert tabs into spaces, which are
	* a bajillion times easier to deal with. */
	if (c == '\t') {
---		spaces = CONVERTED_TAB_SIZE - 1;
+++		spaces = CONVERTED_TAB_SIZE - (len % CONVERTED_TAB_SIZE)
- 1;
		c = ' ';
	}

-- Jim



More information about the busybox mailing list