home *** CD-ROM | disk | FTP | other *** search
- #ifndef ORIEXIT_H
- # define ORIEXIT_H
- /*{{{}}}*/
- /*{{{ get the standard exit codes*/
- # ifndef NOSYSEXIT
- # include <sysexits.h>
- # else
- /*{{{ define missing exitcodes to the 'standard' in UNIX'es*/
- # ifndef EX_OK
- # define EX_OK 0
- # endif
- # ifndef EX_USAGE
- # define EX_USAGE 64
- # endif
- # ifndef EX_DATAERR
- # define EX_DATAERR 65
- # endif
- # ifndef EX_NOINPUT
- # define EX_NOINPUT 66
- # endif
- # ifndef EX_UNAVAILABLE
- # define EX_UNAVAILABLE 69
- # endif
- # ifndef EX_SOFTWARE
- # define EX_SOFTWARE 70
- # endif
- # ifndef EX_OSERR
- # define EX_OSERR 71
- # endif
- # ifndef EX_CANTCREAT
- # define EX_CANTCREAT 73
- # endif
- # ifndef EX_NOPERM
- # define EX_NOPERM 77
- # endif
- /*}}} */
- # endif
- /*}}} */
- /*{{{ set start value for own exits*/
- /* the non-standard exits below use the codes */
- /* */
- /* ORIEXITBASE */
- /* ORIEXITBASE+1 */
- /* : */
- /* */
- /* maybe some systems need the values 1,.. for other purposes */
-
- # ifndef ORIEXITBASE
- # define ORIEXITBASE 1
- # endif
- /*}}} */
- /*{{{ definition of all used Exitcodes in a enum*/
- typedef enum
- { r_ok=EX_OK, /* successful termination */
-
- r_arg_err=EX_USAGE, /* invalid command line arguments */
- r_eof=EX_NOINPUT, /* can't open stdin:'eof or no contr. term */
- r_init_err=EX_UNAVAILABLE, /* service unavailable: rc,screen,keyboard */
- r_ocl_err=EX_SOFTWARE, /* internal software error, long line, OCL */
- r_mem_full=EX_OSERR, /* system error: cannot malloc */
- r_file_nok=EX_CANTCREAT, /* can't create output: quit and file chg. */
-
- r_sig=ORIEXITBASE, /* signal die, maybe tried to dump */
- r_vir_err, /* virtual line handling crash (tmp-file) */
- exit_failure /* should never appear, dummy for rest */
- } RETURNS;
- /*}}} */
- #endif
-