From: "Christopher R. Hertel" <crh@NTS.Umn.EDU> Message-Id: <9804071732.ZM6311@Ruby.nts.umn.edu> Date: Tue, 7 Apr 1998 17:32:23 -0500 To: jallison@whistle.com Subject: skip_multibyte_char()
Jeremy,
Almost done with mangle.c. I have a question: Can mangled names ever
contain multi-byte characters?
In the original, Andrew does a simple test: If there is an extension
on the *long* name and it is less than three (lower case) characters
long, then he strips off the extension. In the reverse mapping, then,
he can reverse map a base name and add the short (dos-approved)
extension back on. The result is that the cache contains a "group"
reverse map, which can be used for a whole set of names (eg.
'mangled.*').
p = strrchr( mangled_stack[0], '.' );
if( p && (!strhasupper(p+1)) && (strlen(p+1) < (size_t)4) )
*p = 0;
Anyway, I'm being a tiny bit more careful, and saying that the
extension of the mangled name (converted to lower case) *must match*
the extension of the long name. This is correct, basically, as the
original test (above) implies the same thing, but does not test it
explicitly.
Anyway, I just want to avoid being bitten by multi-byte characters, if
they even *are* an issue (don't think so, but I always like to check).
Chris -)-----
-- Christopher R. Hertel -)----- University of Minnesota crh@nts.umn.edu Networking and Telecommunications Services