Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
x0r
cl-smtp
Commits
5b45d12d
Commit
5b45d12d
authored
Sep 05, 2007
by
Jan Idzikowski
Browse files
fixed acl error in base64-encode-file, use excl:usb8-array-to-base64-string for acl
parent
1dbd2375
Changes
1
Hide whitespace changes
Inline
Side-by-side
attachments.lisp
View file @
5b45d12d
...
...
@@ -2,6 +2,7 @@
;;; This file is part of CL-SMTP, the Lisp SMTP Client
;;; Copyright (C) 2004/2005/2006/2007 Jan Idzikowski
;;; This library is free software; you can redistribute it and/or
...
...
@@ -80,6 +81,7 @@
&key
(
buffer-size
256
)
;; in KB
(
wrap-at-column
76
))
(
declare
(
ignorable
wrap-at-column
))
(
let*
((
max-buffer-size
(
*
buffer-size
1024
))
(
byte-count
0
)
(
buffer
(
make-array
max-buffer-size
...
...
@@ -98,15 +100,22 @@
(
return
i
)
(
setf
(
aref
buffer
i
)
bchar
)))))
(
print-debug
(
format
nil
"~%** Byte Count ~a~%"
byte-count
))
;; encode the buffer and write out to stream
(
cl-base64:usb8-array-to-base64-stream
(
if
(
<
byte-count
max-buffer-size
)
(
trimmed-buffer
byte-count
buffer
)
buffer
)
sock
:columns
wrap-at-column
)
(
force-output
sock
)
;;-- when finished reading exit do loop
(
when
(
<
byte-count
max-buffer-size
)
;; encode the buffer and write out to stream
#+
allegro
(
write-string
(
excl:usb8-array-to-base64-string
(
if
(
<
byte-count
max-buffer-size
)
(
trimmed-buffer
byte-count
buffer
)
buffer
)
wrap-at-column
)
sock
)
#-
allegro
(
s-base64:encode-base64-bytes
(
if
(
<
byte-count
max-buffer-size
)
(
trimmed-buffer
byte-count
buffer
)
buffer
)
sock
t
)
(
force-output
sock
)
;;-- when finished reading exit do loop
(
when
(
<
byte-count
max-buffer-size
)
(
return
)))))))
(
defun
trimmed-buffer
(
byte-count
buffer
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment