1 ;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*-
3 ;; This code is free software; you can redistribute it and/or
4 ;; modify it under the terms of the version 2.1 of
5 ;; the GNU Lesser General Public License as published by
6 ;; the Free Software Foundation, as clarified by the
7 ;; preamble found here:
8 ;; http://opensource.franz.com/preamble.html
10 ;; This program is distributed in the hope that it will be useful,
11 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ;; GNU General Public License for more details.
15 ;; You should have received a copy of the GNU Lesser General
16 ;; Public License along with this library; if not, write to the
17 ;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 ;; Boston, MA 02110-1301, USA
20 (in-package :io.encodings
)
23 (defmacro shrink-vector
(str size
)
24 #+allegro
`(excl::.primcall
'sys
::shrink-svector
,str
,size
)
25 #+cmu
`(lisp::shrink-vector
,str
,size
)
26 #+lispworks
`(system::shrink-vector$vector
,str
,size
)
27 #+sbcl
`(sb-kernel:shrink-vector
,str
,size
)
28 #+scl
`(common-lisp::shrink-vector
,str
,size
)
29 #-
(or allegro cmu lispworks sbcl scl
) `(subseq ,str
0 ,size
))
32 (error "A required &KEY or &OPTIONAL argument was not supplied."))