From b207d273997f8162a08dbd2e8011c2bec4f4041b Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 13 Feb 2021 21:24:08 +0100 Subject: Define constants for exit codes based on sysexits.h --- src/package.lisp | 20 ++++++++++++++++++++ src/sysexits.lisp | 33 +++++++++++++++++++++++++++++++++ sysexits.asd | 8 ++++++++ 3 files changed, 61 insertions(+) create mode 100644 src/package.lisp create mode 100644 src/sysexits.lisp create mode 100644 sysexits.asd diff --git a/src/package.lisp b/src/package.lisp new file mode 100644 index 0000000..73011ec --- /dev/null +++ b/src/package.lisp @@ -0,0 +1,20 @@ +(defpackage :sysexits + (:use :cl) + + (:export + #:+ok+ + #:+usage+ + #:+dataerr+ + #:+noinput+ + #:+nouser+ + #:+nohost+ + #:+unavailable+ + #:+software+ + #:+oserr+ + #:+osfile+ + #:+cantcreat+ + #:+ioerr+ + #:+tempfail+ + #:+protocol+ + #:+noperm+ + #:+config+)) diff --git a/src/sysexits.lisp b/src/sysexits.lisp new file mode 100644 index 0000000..255d6b3 --- /dev/null +++ b/src/sysexits.lisp @@ -0,0 +1,33 @@ +(in-package :sysexits) + +(defconstant +ok+ 0) + +(defconstant +usage+ 64) + +(defconstant +dataerr+ 65) + +(defconstant +noinput+ 66) + +(defconstant +nouser+ 67) + +(defconstant +nohost+ 68) + +(defconstant +unavailable+ 69) + +(defconstant +software+ 70) + +(defconstant +oserr+ 71) + +(defconstant +osfile+ 72) + +(defconstant +cantcreat+ 73) + +(defconstant +ioerr+ 74) + +(defconstant +tempfail+ 75) + +(defconstant +protocol+ 76) + +(defconstant +noperm+ 77) + +(defconstant +config+ 78) diff --git a/sysexits.asd b/sysexits.asd new file mode 100644 index 0000000..5c55d40 --- /dev/null +++ b/sysexits.asd @@ -0,0 +1,8 @@ +(asdf:defsystem sysexits + :description "TODO" + :version "0.1.0" + + :components ((:module "src" + :serial t + :components ((:file "package") + (:file "sysexits"))))) -- cgit v1.2.3