Use SHARED-INITIALIZE instead of INITIALIZE-INSTANCE for FILE-DEVICEs.
[iolib.git] / io.streams / zeta / types.lisp
blob272223b1e2ddd0f2b429a1b7201aca5032880365
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; --- Various types.
4 ;;;
6 (in-package :io.zeta-streams)
8 ;;;-------------------------------------------------------------------------
9 ;;; Data Types
10 ;;;-------------------------------------------------------------------------
12 (deftype ub8 () '(unsigned-byte 8))
13 (deftype ub16 () '(unsigned-byte 16))
14 (deftype ub32 () '(unsigned-byte 32))
15 (deftype ub64 () '(unsigned-byte 64))
16 (deftype sb8 () '(signed-byte 8))
17 (deftype sb16 () '(signed-byte 16))
18 (deftype sb32 () '(signed-byte 32))
19 (deftype sb64 () '(signed-byte 64))
21 (deftype ub8-vector (&optional (size '*))
22 `(array ub8 (,size)))
24 (deftype ub8-simple-vector (&optional (size '*))
25 `(simple-array ub8 (,size)))
27 (deftype ub8-complex-vector (&optional (size '*))
28 `(and (ub8-vector ,size)
29 (not (ub8-simple-vector ,size))))
31 (deftype ub16-vector (&optional (size '*))
32 `(array ub16 (,size)))
34 (deftype ub16-simple-vector (&optional (size '*))
35 `(simple-array ub16 (,size)))
37 (deftype ub16-complex-vector (&optional (size '*))
38 `(and (ub16-vector ,size)
39 (not (ub16-simple-vector ,size))))
42 ;;;-------------------------------------------------------------------------
43 ;;; Argument Types
44 ;;;-------------------------------------------------------------------------
46 (deftype stream-buffering ()
47 '(member :line :full))
49 (deftype file-direction ()
50 '(member :input :output :io))
52 (deftype file-if-exists ()
53 '(member :default :error :error-if-symlink :delete :overwrite))
55 (deftype file-if-does-not-exist ()
56 '(member :default :error :create))
58 (deftype file-flags ()
59 '(unsigned-byte 32))
61 (deftype file-mode ()
62 '(unsigned-byte 32))