1 /* Copyright (C) 2001-2019 Artifex Software, Inc. 2 All Rights Reserved. 3 4 This software is provided AS-IS with no warranty, either express or 5 implied. 6 7 This software is distributed under license and may not be copied, 8 modified or distributed except as expressly authorized under the terms 9 of the license contained in the file LICENSE in this distribution. 10 11 Refer to licensing information at http://www.artifex.com or contact 12 Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, 13 CA 94945, U.S.A., +1(415)492-9861, for further information. 14 */ 15 16 17 /* Declarations for exits */ 18 19 #ifndef gsexit_INCLUDED 20 # define gsexit_INCLUDED 21 22 #include "std.h" 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