[comp.windows.x] twm and "NoCaseSensitive"

schoch@sheba.arc.nasa.gov (Steve Schoch) (11/07/90)

If you want your icons sorted in case insensitve order in your window
manager you say "NoCaseSensitive" in your .twmrc.  This causes twm to
use XmuCompareISOLatin1() instead of strcmp() when it sorts the
icon names.

The problem is that when given two strings that are different,
XmuCompareISOLatin1() returns the difference of the first non-match,
without first converting them to lower-case.  In short it does something
like this:

	for(...; *first && *second; first++,second++) {
		a = tolower(*first);
		b = tolower(*second);
		if (a != b)
			break;
	}
	return (*first - *second);

In order to have the ordering correct, the function should return (a - b),
not (*first - *second).  Has this been fixed in a patch that I missed?

	Steve