1 /* 2 * 3 * Copyright (C) 2018-2020, OFFIS e.V. 4 * All rights reserved. See COPYRIGHT file for details. 5 * 6 * This software and supporting documentation were developed by 7 * 8 * OFFIS e.V. 9 * R&D Division Health 10 * Escherweg 2 11 * D-26121 Oldenburg, Germany 12 * 13 * 14 * Module: ofstd 15 * 16 * Author: Joerg Riesmeier 17 * 18 * Purpose: Common exit codes for command line tools 19 * 20 */ 21 22 23 #ifndef OFEXIT_H 24 #define OFEXIT_H 25 26 #include "dcmtk/config/osconfig.h" 27 28 29 /* common exit codes for DCMTK command line tools 30 * (EXIT_SUCCESS and EXIT_FAILURE are standard codes 31 * but their numerical values are not standardized) 32 */ 33 34 // general (0-19) 35 #define EXITCODE_NO_ERROR 0 36 #define EXITCODE_COMMANDLINE_SYNTAX_ERROR 1 37 #define EXITCODE_INSUFFICIENT_PRIVILEGES 2 38 #define EXITCODE_SETUID_FAILED 3 39 #define EXITCODE_MEMORY_EXHAUSTED 4 40 #define EXITCODE_NOOPENSSL 5 41 42 // input file errors (20-39) 43 #define EXITCODE_CANNOT_READ_INPUT_FILE 20 44 #define EXITCODE_NO_INPUT_FILES 21 45 #define EXITCODE_INVALID_INPUT_FILE 22 46 #define EXITCODE_NO_VALID_INPUT_FILES 23 47 #define EXITCODE_INVALID_INPUT_DIRECTORY 25 48 49 // output file errors (40-59) 50 #define EXITCODE_CANNOT_WRITE_OUTPUT_FILE 40 51 #define EXITCODE_INVALID_OUTPUT_DIRECTORY 45 52 53 // network errors (60-79) 54 // - defined in the respective modules / tools 55 56 // processing errors (80-99) 57 // - defined in the respective modules / tools 58 59 // application-specific or user-defined errors (100-127) 60 // - defined in the respective modules / tools 61 62 // GNU recommends that the codes 128-255 be reserved for serious errors: 63 // - https://www.gnu.org/software/libc/manual/html_node/Exit-Status.html 64 65 #endif 66