Mercurial > dwindows
diff gtk/dw.c @ 1861:c836603d3f14
Add dw_shutdown() function which does the same thing as dw_exit() ...
except it doesn't actually end the process. Useful for bindings
that are expecting to do their own cleanup after the script exits.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 01 Mar 2013 16:51:08 +0000 |
parents | 4790589f52a9 |
children | f3ae396b3585 |
line wrap: on
line diff
--- a/gtk/dw.c Fri Mar 01 13:01:59 2013 +0000 +++ b/gtk/dw.c Fri Mar 01 16:51:08 2013 +0000 @@ -10157,15 +10157,24 @@ /* * Cleanly terminates a DW session, should be signal handler safe. + */ +void dw_shutdown(void) +{ + if ( dbgfp != NULL ) + { + fclose( dbgfp ); + dbgfp = NULL; + } +} + +/* + * Cleanly terminates a DW session, should be signal handler safe. * Parameters: * exitcode: Exit code reported to the operating system. */ void dw_exit(int exitcode) { - if ( dbgfp != NULL ) - { - fclose( dbgfp ); - } + dw_shutdown(); exit(exitcode); }