[comp.sys.ibm.pc.programmer] Turbo C 2.0 "automatic" text mode

jmbj@grebyn.com (Jim Bittman) (06/03/90)

I've just recently discovered a problem (at least for me) with
Turbo C 2.0.  It appears that just having a call to their
"window" routine, in a module that is linked but never called,
causes the program to automatically reset the
video mode.  I have a module that looks like this:

FILE1.C
main()
{
}

FILE2.c
has a call to "window"

dos> tcc -ms file1.c file2.c
dos> file1 (resets video mode from graphics to text!)
dos> tcc -ms file1.c
dos> file1 (just returns graphics prompt.)

I'm curios if anyone else has experienced this, or maybe this is a
"feature" that I just can't use...
Thanks for all help!
Jim Bittman, jmbj@grebyn.com

I consider this an annoyance, is there a workaround?

JXS118@psuvm.psu.edu (Jeff Siegel, Op from Atherton Hall) (06/10/90)

In article <20098@grebyn.com>, jmbj@grebyn.com (Jim Bittman) says:
>
>I've just recently discovered a problem (at least for me) with
>Turbo C 2.0.  It appears that just having a call to their
>"window" routine, in a module that is linked but never called,
>causes the program to automatically reset the
>video mode.  I have a module that looks like this:
>
>FILE1.C
>main()
>{
>}
>
>FILE2.c
>has a call to "window"
>
>dos> tcc -ms file1.c file2.c
>dos> file1 (resets video mode from graphics to text!)
>dos> tcc -ms file1.c
>dos> file1 (just returns graphics prompt.)
>
>I'm curios if anyone else has experienced this, or maybe this is a
>"feature" that I just can't use...

No, there is no work around. Why you would need one, I'm not sure. You
Can't write anything to the screen in graphics mode with out using initgraph
first, which clears the screen anyway. Having window() linked signals the
internal startup code to call _CRTINIT which switches you back to text mode.



Jeff

berg@cip-s07.informatik.rwth-aachen.de (Solitair) (06/13/90)

--
Sincerely,                         | berg@cip-s01.informatik.rwth-aachen.de
           Stephen R. van den Berg | ...!uunet!mcsun!unido!rwthinf!cip-s01!berg