[comp.os.minix] Bug in C68II - a new one

archer%segin4.segin.fr@relay.prime.com (Vincent Archer) (08/20/90)

Here's both a bug report in C68II, and its fix (less work for you CvW :-)
Try compiling & executing the 5-line program:

main()
{
printf("Is that good?\
\no, wait, were's the newline?\n");
}

You'll get:

Is that good?no, wait, were's the newline?

The fix is pretty simple: In getsym.c:getsch(), at line 257, you have:

    case '\n':
      getch();               <=== the line 257
      return getsch();

Simply delete the offending line, and you've got it all. For a \-newline,
getch() (get next character) was called thrice; obviously one more time than
necessary to wipe out the backslash and the newline character. That's why
the first character of the next line was not taken into account...

Let's call this patch2. Now, if you really need a cdif... :-)


    Vincent


Vincent Archer             | Email:archer%segin4.segin.fr@relay.prime.com
"People that are good at finding excuses are never good at anything else"

HBO043%DJUKFA11.BITNET@cunyvm.cuny.edu (Christoph van Wuellen) (08/21/90)

Well, lets call this patch2.
Besides, the net reported two serious bugs:
continue; in a do-while loop jumps to the wrong place
there is a typing error in validate() which may cause wrong registers
to be restorefatal error G_POP that was
reported to me yesterday.

I think I should emit patch2 soon. The diffs are not very small since
I have put c68 under SCCS, which affects each file through the
version string.

C.v.W.