Re: Hugs on Linux/PPC

Michele Campeotto <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <[email protected]>
   I tried to investigate some more and found that the problem is at 
line 515-516 of input.c:

     lineBuffer[lineLength] = fgetc(inputStream);
     if (lineBuffer[lineLength] == EOF)
         break;

this line is checking a char with EOF, which is -1, while it should 
check the int returned by fgetc against EOF.
   I fixed the problem using a little hack:

     int c = fgetc(inputStream);
     lineBuffer[lineLength] = c;
     if (c == EOF)
         break;

   This probably isn't the correct solution, but at least it makes hugs 
work for me. :)


   Cheers

-- 
   Michele - www.micampe.it

   "Smile, it makes people wonder what you are thinking"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.