[l2h] bug under win32

Victor Zagorski Victor Zagorski <zagorski@atom.krasnet.ru>
Sat, 5 Oct 2002 00:36:21 +0800


An error accures while trying to configure LaTeX2HTML Version 2002-2
(1.70) under Win32.

The code above cant understand the capabilities of Aladdin gs
<file:config.pl line:1052>
      while (<GS>) {
        chomp;
       if($flag == 0 && /Ghostscript\s*(?:Version|(?:PRE-|BETA |TESTER )RELEASE|)\s*(\d+[.]?\d*)/i) {
          $gs_version = $1;
          $flag = 1;
        }
        elsif($flag && /^\s*Available devices/i) {
          $flag = 2; # Now look for the devices
        }
        elsif($flag && /^\s*Search path/i) {
          $flag = 3; # Now look for the gs lib path
        }
        elsif ($flag == 2) {
          # if line starts with whitespace, then we're in the devices list
          if(/^\s+(.*?)\s*$/) {
            push(@gs_devs,split(/\s+/,$1));
          }
          else {
            $flag = 1; # no more devices
            redo;
          }
        }
        elsif ($flag == 3) {
          # if line starts with whitespace, then we're in the search path list
          if(/^\s+(.*?)\s*$/ && length($1)) {
            foreach(split(/\s*[$pathd]+\s*/,$1)) {
              push(@gs_lib_path,L2hos->path2os($_)) if(length && -d $_);
            }
          }
          else {
            $flag = 1;
            redo;
          } # no more path entries
        }
      }

I had fixed this by adding the following lines after the listd code:
      $gs_version = 6.01;
      @gs_devs = qw( pnmraw ppmraw pgnmraw pgmraw pbmraw ppm pgnm pgm pnm pbm );
      @gs_lib_path = qw( . c:/Aladdin/gs6.01/lib c:/Aladdin/fonts );

But I dislike it.

-- 
 Victor Zagorski 05.10.2002 00:28 
                           mailto:zagorski@atom.krasnet.ru