[tex-live] TexLive 20070128 doesn't work well under Win32

Akira Kakuto kakuto at fsci.fuk.kindai.ac.jp
Fri Feb 2 03:21:24 CET 2007


Hi,

> #ifdef MONOCASE_FILENAMES
> #if defined(WIN32) && !defined(__i386_pc_gnu__)
> /* This is way faster under Win32. */
> #include <windows.h>
> #define TRANSFORM(x) ((unsigned)CharLower((LPTSTR)(BYTE)(x)))
> #else
> #define TRANSFORM(x) (tolower(x))
> #endif
> #else
> #define TRANSFORM(x) (x)
> #endif
> 
> static unsigned
> hash P2C(hash_table_type, table,  const_string, key)
> {
>   unsigned n = 0;
> 
>   /* Our keys aren't often anagrams of each other, so no point in
>      weighting the characters.  */
> #ifdef WIN32
>   while (*key != 0) {
>     if(isknj(*key)) {
>       n = (n + n + (unsigned)(*key++)) % table.size;
>       n = (n + n + (unsigned)(*key++)) % table.size;
>     } else {
>       n = (n + n + TRANSFORM (*key++)) % table.size;
>     }
>   }
> #else
>   while (*key != 0)
>     n = (n + n + TRANSFORM (*key++)) % table.size;
> #endif
>   return n;
> }
> 
> maybe win32 and other type of build have different  define of
> MONOCASE_FILENAMES ?

Effectively win32 and other type of build are the same.
The above code is for filenames by Japanese KANJI characters.
(W32TeX is mainly for Japanese users, but I believe the above
code does not give bad effects for usual file names.)

Thanks,
Akira


More information about the tex-live mailing list