Date: Mon, 9 Mar 1998 17:41:15 -0800 (PST) Message-Id: <199803100141.RAA17259@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Peter Palotas , Thomas Demmer From: Nate Eldredge Subject: Re: MSS 10B Cc: djgpp AT delorie DOT com Precedence: bulk At 09:00 3/8/1998 -0500, Peter Palotas wrote: >At 19.59 1998-03-08 +0100, you wrote: > >Hi Tom, > >>Peter, >>bad news, your program does not work together with >>TurboVision. Programs using TV fail to compile, >>I get a syntax error where TV overloads the new[] >>operator > >I guess I forgot to mention this problem in the documentation. >For the new[] operator overload I have no concrete solution yet, because >MSS needs to overload the new operator itself, and there will be a >conflict. I will try to find a solution as soon as possible though. I don't >think there will ever be a really GOOD solution for this though. This is not a *good* solution, but it might help. G++ routes `new' calls to `malloc'. With a little linker magic, I believe you can get all `malloc' calls rerouted to your own routine. See the `--wrap' option to `ld'. This doesn't allow you to get the line numbers, though. I suppose if you were *really* masochistic, you could make the user compile with `-g', then look at the stack for the address of their function and use the debug info to translate that into file and line number. `libdbg.a' has some routines that might help with that. HTH Nate Eldredge eldredge AT ap DOT net