aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2021-02-13 21:24:08 +0100
committerTeddy Wing2021-02-13 21:24:08 +0100
commitb207d273997f8162a08dbd2e8011c2bec4f4041b (patch)
tree11b9370db2a35b736028dc3f07e4203d72cc3b76
downloadcl-sysexits-b207d273997f8162a08dbd2e8011c2bec4f4041b.tar.bz2
Define constants for exit codes based on sysexits.h
-rw-r--r--src/package.lisp20
-rw-r--r--src/sysexits.lisp33
-rw-r--r--sysexits.asd8
3 files changed, 61 insertions, 0 deletions
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")))))