[tex-k] Hardwired directory separators?

Douglas McKenna doug at mathemaesthetics.com
Wed Dec 6 06:27:10 CET 2017


Karl -

In the kpathsea source file "tex-file.c", there are two format initialization cases:

   case kpse_program_text_format:

and

  case kpse_program_binary_format:

at lines 731 and 737.  In each of these cases, a default path string is constructed, using

   concatn (".", ENV_SEP_STRING, "$TEXMF/", kpse->program_name, "//", NULL),

Is there a reason the platform-specific constant ENV_SEP_STRING is being used, but not the platform-specific constant DIR_SEP_STRING?

Should it not be:

   concatn (".", ENV_SEP_STRING, "$TEXMF", DIR_SEP_STRING,
                  kpse->program_name,
                  DIR_SEP_STRING, DIR_SEP_STRING, NULL);

I can imagine this being an oversight, except that I can't imagine how it would work on any other system with a different directory separator, other than the two cases are never used somehow.

Onward into the fog …

- Doug McKenna




More information about the tex-k mailing list