skip_multibyte_char()
Christopher R. Hertel
crh at NTS.Umn.EDU
Tue Apr 7 22:32:23 GMT 1998
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 at nts.umn.edu Networking and Telecommunications Services
More information about the samba-technical
mailing list