Difficulties with Turbo-C 2.0 TLIB

Uwe Hoch uh at materna.uucp
Wed Dec 21 20:15:17 AEST 1988


In article <458 at astbe.UUCP> mey at astbe.UUCP (Thomas Meyer) writes:
>
>Did anyone had similar experiences and can give an explanation ?
>Are there more known bugs ?

Yes, we found two bugs and one documentation fault in the german handbooks
of TC 2.0.

1. If the pseudo-function "__emit__" should be used, the file "dos.h" MUST
be included. Otherwise the compiler fails with a curios error message. This is
NOT documented in the german handbooks.

2. In the following program the linker fails to include the format functions
for scanf.

#include <stdio.h>

void y (float *R)
{
   sscanf("1.24","%f",R);
}

void x (void *Data)
{
   y((float *)Data);

}

void main (void)
{
float R;

   x(&R);
}

Question: Is this a compiler or a linker error??? The same program works fine
with MS-C 5.1.

3. The function "intr" of the standard library works not always correct. The
BP-Register is not set up with the value you put into the corresponding
data structure. The error seems to be, that the wrong offset is computed to
get BP from the stack (the last statment before the assembly "int" statment).
I found the error in all model libraries with the Turbo Debugger (very good
tool for debugging Turbo C :-) ). Also I have patched the libraries, so that
the function now works fine. Unfortunately I have no sources of the library
functions, so if someone has them, he can look for the error.

The last two errors have been reported to Heimsoeth Software, the offical
german distributor of Borland two or three weeks ago, but the guys have not
sent any answer to me until now.  Though I'm still a fan of all Borland
products, especially of the new debugger.

Uwe Hoch
Dr. Materna GmbH
Vosskuhle 38
D-4600 Dortmund 1
West Germany
E-Mail: USENET: uh at materna.uucp
         	..!seismo!mcvax!unido!materna!uh



More information about the Comp.lang.c mailing list