1 /* Copyright (C) 1994, 2001 Aladdin Enterprises. All rights reserved. 2 3 This software is provided AS-IS with no warranty, either express or 4 implied. 5 6 This software is distributed under license and may not be copied, 7 modified or distributed except as expressly authorized under the terms 8 of the license contained in the file LICENSE in this distribution. 9 10 For more information about licensing, please refer to 11 http://www.ghostscript.com/licensing/. For information on 12 commercial licensing, go to http://www.artifex.com/licensing/ or 13 contact Artifex Software, Inc., 101 Lucas Valley Road #110, 14 San Rafael, CA 94903, U.S.A., +1(415)492-9861. 15 */ 16 17 /* $Id: gsexit.h,v 1.10 2004/08/04 19:36:12 stefan Exp $ */ 18 /* Declarations for exits */ 19 20 #ifndef gsexit_INCLUDED 21 # define gsexit_INCLUDED 22 23 24 /** The client must provide this. 25 * normally they do exit cleanup and error messaging 26 * without calling system exit() returning to the caller. 27 */ 28 int gs_to_exit(const gs_memory_t *mem, int exit_status); 29 30 /** some clients prefer this to return the postscript error code 31 * to the caller otherwise the same as gs_to_exit() 32 */ 33 int gs_to_exit_with_code(const gs_memory_t *mem, int exit_status, int code); 34 35 /** The client must provide this. 36 * After possible cleanup it may call gp_do_exit() which calls exit() in a platform 37 * independent way. This is a fatal error so returning is not a good idea. 38 */ 39 void gs_abort(const gs_memory_t *mem); 40 41 #endif /* gsexit_INCLUDED */ 42