C-libraries and Control-C

Hans Aberg haberg@matematik.su.se
Fri, 13 Oct 2000 19:47:08 +0200


At 17.51 +0200 0-10-13, Koen Claessen wrote:
>I have linked a C-library to Hugs (I used H/Direct).
>
>What I want is that some cleaning up of the C-libraries
>state is done when the user presses control-C. Is there
>any way to specify this without recompiling Hugs?

I do not know the answer of this question -- and you do not say which Hugs
you are using -- probably STG under UNIX.

If you want to tweak Hugs 98 though while awaiting the answer from the
experts, you could put in your private my_cleanup() either where ctrlbrk()
jumps on your platform if the cleanup should only take place when an
interrupt occurs, or at the beginning at interpreter() right after the
setjump, if you want the cleanup always take place when Hugs resets its
state.

  Hans Aberg
                  * Email: Hans Aberg <mailto:haberg@member.ams.org>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>