On Fri, 06 Aug 1999 22:11:37 +0100, Arnd Hanses wrote:
>+#define EXTENSION_MARKER '.' /* Let through the 'full-stop' */
[...]
+ inline static
+LString toAsciiAlnum(LString const &string)
+{
+ LString tmp(string);
+ for (int i = 0; i < tmp.length(); i++) {
+ tmp[i] &= MASK_RANGE; /* make test result
+ ** foreseeable */
+ if ( !( isalnum(tmp[i]) ) &&
+ tmp[i] != EXTENSION_MARKER )
+ tmp[i] = REPLACER;
}
-#endif
- return real_file;
+ return tmp;
}
Better also let path through the underscore '_':
#define EXTENSION_MARKER '.' /* Let through the 'full-stop' */
#define BLANK_MARKER '_' /* Let through the
'underscore' */
inline static
LString toAsciiAlnum(LString const &string)
{
LString tmp(string);
for (int i = 0; i < tmp.length(); i++) {
tmp[i] &= MASK_RANGE; /* make test result
** foreseeable */
if ( !( isalnum(tmp[i]) ) && tmp[i] != BLANK_MARKER
&& tmp[i] != EXTENSION_MARKER )
tmp[i] = REPLACER;
}
return tmp;
}
Greets,
Arnd