Use IOLIB/ in package names
[iolib.git] / src / streams / zeta / types.lisp
blob90eec17e8c44f7c64af32e564d25aeaa1b6ced1e
1 ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; --- Various types.
4 ;;;
6 (in-package :iolib/zstreams)
8 (deftype octet () '(unsigned-byte 8))
9 (deftype ub8 () '(unsigned-byte 8))
10 (deftype ub16 () '(unsigned-byte 16))
11 (deftype ub32 () '(unsigned-byte 32))
12 (deftype ub64 () '(unsigned-byte 64))
13 (deftype sb8 () '(signed-byte 8))
14 (deftype sb16 () '(signed-byte 16))
15 (deftype sb32 () '(signed-byte 32))
16 (deftype sb64 () '(signed-byte 64))
18 (deftype ub8-vector (&optional (size '*))
19 `(array ub8 (,size)))
21 (deftype ub8-simple-vector (&optional (size '*))
22 `(simple-array ub8 (,size)))
24 (deftype ub8-complex-vector (&optional (size '*))
25 `(and (ub8-vector ,size)
26 (not (ub8-simple-vector ,size))))
28 (deftype ub16-vector (&optional (size '*))
29 `(array ub16 (,size)))
31 (deftype ub16-simple-vector (&optional (size '*))
32 `(simple-array ub16 (,size)))
34 (deftype ub16-complex-vector (&optional (size '*))
35 `(and (ub16-vector ,size)
36 (not (ub16-simple-vector ,size))))
38 (deftype ub32-vector (&optional (size '*))
39 `(array ub32 (,size)))
41 (deftype ub32-simple-vector (&optional (size '*))
42 `(simple-array ub32 (,size)))
44 (deftype ub32-complex-vector (&optional (size '*))
45 `(and (ub32-vector ,size)
46 (not (ub32-simple-vector ,size))))
48 (deftype ub64-vector (&optional (size '*))
49 `(array ub64 (,size)))
51 (deftype ub64-simple-vector (&optional (size '*))
52 `(simple-array ub64 (,size)))
54 (deftype ub64-complex-vector (&optional (size '*))
55 `(and (ub64-vector ,size)
56 (not (ub64-simple-vector ,size))))
58 ;;;-------------------------------------------------------------------------
59 ;;; Argument Types
60 ;;;-------------------------------------------------------------------------
62 (deftype stream-buffering ()
63 '(member nil :line :full))
65 (deftype file-direction ()
66 '(member :input :output :io))
68 (deftype file-if-exists ()
69 '(member :default :error :error-if-symlink :delete :overwrite))
71 (deftype file-if-does-not-exist ()
72 '(member :default :error :create))
74 (deftype file-flags ()
75 '(unsigned-byte 32))
77 (deftype file-mode ()
78 '(unsigned-byte 32))