Date: Sat, 8 May 1993 07:38 EST From: "Wonkoo Kim, EE, U. of Pittsburgh" Subject: BCC2GRX initgraph()/closegraph() To: djgpp AT sun DOT soe DOT clarkson DOT EDU (cf. Hi, Hartmut.) Investigating the excepion 0 problem, I found that the BCC2GRX's initgraph() and closegraph() didn't behave correctly. Just one calls to them is okay, but if a program calls initgraph() ... closegraph() sequences more than once, then the video didn't set up to graphics mode. It is still in text mode after the 2nd initgraph() call (before 2nd closegraph()). Verifying the closegraph() function, I realize that it is implemented the same way as restorecrtmode() function. I think it is incorrect. closegraph() should reset the global variable __gr_INIT to FALSE if I am right. This fooled the 2nd initgraph() function call. Do you agree, Hartmut? (Please give an answer how to fix it. I am using BCC2GRX 1.1) Though I didn't test with corrected library, I bet the exception 0 problem will be gone, because the exception 0 in my program was occurred inside a part that computes screen parameters obtained by graphics function calls. The 1st call to this part was okay, but the 2nd call failed after the 2nd initgraph(), which means that incorrect graphics mode gave incorrect parameters to my program, and this could cause the exception. Thanks. Best regards, Wonkoo.