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

luoyi luoyi.ly at gmail.com
Fri Feb 2 02:41:26 CET 2007


In kpathsea/hash.c :

#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 ?


More information about the tex-live mailing list