From 565a77a1d119aaae1cfcbd80c09899d6f138e157 Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Sun, 29 Apr 2007 14:47:59 +0200 Subject: [PATCH] Now using IOLIB-UTILS in all packages. Signed-off-by: Stelian Ionescu --- io-multiplex/common.lisp | 2 +- io-multiplex/defpackage.lisp | 2 +- io.encodings/defpackage.lisp | 2 +- io.encodings/external-format.lisp | 12 ++++++------ io.encodings/iso-8859-tables.lisp | 4 ++-- io.multiplex.asd | 2 +- protocols/dns-client/dns-query.lisp | 2 +- sockets/buffer.lisp | 2 +- sockets/gray-stream-methods.lisp | 8 ++++---- sockets/socket-options.lisp | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/io-multiplex/common.lisp b/io-multiplex/common.lisp index 496c054..6c20220 100644 --- a/io-multiplex/common.lisp +++ b/io-multiplex/common.lisp @@ -514,7 +514,7 @@ ;;;; ;; FIXME: Until a way to autodetect platform features is implemented -(iolib-utils:define-constant et::pollrdhup 0) +(define-constant et::pollrdhup 0) (defun wait-until-fd-ready (fd event-type &optional timeout) ;; FIXME: this conses badly for its return value diff --git a/io-multiplex/defpackage.lisp b/io-multiplex/defpackage.lisp index 6f068fc..39119b0 100644 --- a/io-multiplex/defpackage.lisp +++ b/io-multiplex/defpackage.lisp @@ -23,7 +23,7 @@ (defpackage :io.multiplex (:nicknames #:iomux) - (:use #:common-lisp #:cffi) + (:use #:common-lisp #:cffi #:iolib-utils) (:export ;; classes #:event-base #:event diff --git a/io.encodings/defpackage.lisp b/io.encodings/defpackage.lisp index f3ef41e..5bb8d78 100644 --- a/io.encodings/defpackage.lisp +++ b/io.encodings/defpackage.lisp @@ -4,7 +4,7 @@ (defpackage :io.encodings (:nicknames #:ioenc) - (:use #:common-lisp) + (:use #:common-lisp #:iolib-utils) (:export ;; External-format handling #:external-format #:make-external-format #:find-external-format diff --git a/io.encodings/external-format.lisp b/io.encodings/external-format.lisp index f7568ba..b394aa6 100644 --- a/io.encodings/external-format.lisp +++ b/io.encodings/external-format.lisp @@ -166,7 +166,7 @@ (when (eq name :default) (setq name *default-external-format*)) (when (stringp name) - (setf name (iolib-utils:ensure-keyword name))) + (setf name (ensure-keyword name))) (or (gethash name *external-formats*) (gethash (gethash name *external-format-aliases*) @@ -229,10 +229,10 @@ ,@(loop :for i :in indexes :collect (multiple-value-bind (index aliases) (get-name-and-aliases i) - (let ((table (iolib-utils:concat-symbol "+iso-8859-" index "-table+")) - (name (iolib-utils:ensure-keyword + (let ((table (concat-symbol "+iso-8859-" index "-table+")) + (name (ensure-keyword (concatenate 'string "ISO-8859-" index)))) - (push (iolib-utils:ensure-keyword + (push (ensure-keyword (concatenate 'string "ISO8859-" index)) aliases) `(define-external-format ,name ,aliases 1 @@ -266,7 +266,7 @@ ("15" :ISO_8859-15 :latin9 :latin-9 :l9 :csISOLatin9 :iso-ir-203) ("16" :ISO_8859-16 :latin10 :latin-10 :l10 :csISOLatin10 :iso-ir-226))) -(iolib-utils:define-constant +max-unicode-code-point+ #x10FFFF) +(define-constant +max-unicode-code-point+ #x10FFFF) #+ucs-chars (declaim (inline illegal-unicode-code-point)) #+ucs-chars @@ -446,7 +446,7 @@ ;;; ;;; -(iolib-utils:define-constant +replacement-char+ +(define-constant +replacement-char+ #+ucs-chars #xFFFD #-ucs-chars (char-code #\?)) diff --git a/io.encodings/iso-8859-tables.lisp b/io.encodings/iso-8859-tables.lisp index 9c3423d..5177143 100644 --- a/io.encodings/iso-8859-tables.lisp +++ b/io.encodings/iso-8859-tables.lisp @@ -23,8 +23,8 @@ `(progn ,@(loop :for (index table) :in tables :collect - (let ((name (iolib-utils:concat-symbol "+iso-8859-" index "-table+"))) - `(iolib-utils:define-constant ,name (map 'string #'code-char ,table)))))) + (let ((name (concat-symbol "+iso-8859-" index "-table+"))) + `(define-constant ,name (map 'string #'code-char ,table)))))) (define-iso-8859-tables (("1" #(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255)) diff --git a/io.multiplex.asd b/io.multiplex.asd index 58e98d7..5e1c4dd 100644 --- a/io.multiplex.asd +++ b/io.multiplex.asd @@ -16,7 +16,7 @@ :maintainer "Stelian Ionescu " :licence "GPL-2.1" :depends-on (:iolib-posix - :iolib-utils) + :iolib-utils-misc) :default-component-class muffled-source-file :pathname (merge-pathnames (make-pathname :directory '(:relative "io-multiplex")) *load-truename*) diff --git a/protocols/dns-client/dns-query.lisp b/protocols/dns-client/dns-query.lisp index 91cfd91..d23b213 100644 --- a/protocols/dns-client/dns-query.lisp +++ b/protocols/dns-client/dns-query.lisp @@ -42,7 +42,7 @@ (:default-initargs :qdcount 1 :ancount 0 :nscount 0 :arcount 0)) (defmacro define-flags-bitfield (name offset length &optional (type :integer)) - (let ((method-name (iolib-utils:concat-symbol name :-field))) + (let ((method-name (concat-symbol name :-field))) `(progn (defgeneric ,method-name (message)) (defmethod ,method-name ((message dns-message)) diff --git a/sockets/buffer.lisp b/sockets/buffer.lisp index cb7632c..5bae83f 100644 --- a/sockets/buffer.lisp +++ b/sockets/buffer.lisp @@ -23,7 +23,7 @@ ;;; Foreign Buffers ;;; -(iolib-utils:define-constant +bytes-per-iobuf+ (* 4 1024)) +(define-constant +bytes-per-iobuf+ (* 4 1024)) ;; FIXME: make this right ;; probably not all SIMPLE-ARRAYs are admissible diff --git a/sockets/gray-stream-methods.lisp b/sockets/gray-stream-methods.lisp index d54de24..1d3d123 100644 --- a/sockets/gray-stream-methods.lisp +++ b/sockets/gray-stream-methods.lisp @@ -21,7 +21,7 @@ (in-package :net.sockets) -(iolib-utils:define-constant +max-octets-per-char+ 6) +(define-constant +max-octets-per-char+ 6) ;; TODO: use the buffer pool ;; TODO: handle instance reinitialization @@ -506,11 +506,11 @@ (defmethod stream-fresh-line ((stream active-socket)) (write-char #\Newline stream) t) -(iolib-utils:define-constant +unix-line-terminator+ +(define-constant +unix-line-terminator+ (make-array 1 :element-type 'ub8 :initial-contents '(10))) -(iolib-utils:define-constant +dos-line-terminator+ +(define-constant +dos-line-terminator+ (make-array 2 :element-type 'ub8 :initial-contents '(13 10))) -(iolib-utils:define-constant +mac-line-terminator+ +(define-constant +mac-line-terminator+ (make-array 1 :element-type 'ub8 :initial-contents '(13))) (defun %write-line-terminator (stream line-terminator) diff --git a/sockets/socket-options.lisp b/sockets/socket-options.lisp index ee38a7f..9d681ad 100644 --- a/sockets/socket-options.lisp +++ b/sockets/socket-options.lisp @@ -99,7 +99,7 @@ (eval-when (:compile-toplevel :load-toplevel :execute) (defun make-sockopt-helper-name (action value-type) - (iolib-utils:concat-symbol action + (concat-symbol action '-socket-option- value-type)) @@ -128,7 +128,7 @@ (declare (type symbol action) (type symbol argtype) (type symbol os)) - (let ((eql-name (iolib-utils:ensure-keyword name)) + (let ((eql-name (ensure-keyword name)) (args (second (assoc argtype +helper-args-map+))) (helper-get (make-sockopt-helper-name :get argtype)) (helper-set (make-sockopt-helper-name :set argtype))) -- 2.11.4.GIT