cl-ipp

Internet Printing Protocol (IPP) for Common Lisp
git clone https://logand.com/git/cl-ipp.git/
Log | Files | Refs

commit 6f541051fc8b5e190ae711f1ee551484de5799bf
parent 7a7fa1e49a807a0e12e78b3d60021ce8d166ab0e
Author: Tomas Hlavaty <tom@logand.com>
Date:   Wed,  7 Aug 2013 09:23:13 +0200

defvar *ipp-client* removed

Diffstat:
Mipp.lisp | 48+++++++++++++++++++++++++-----------------------
1 file changed, 25 insertions(+), 23 deletions(-)

diff --git a/ipp.lisp b/ipp.lisp @@ -28,7 +28,6 @@ (defvar *input-stream*) (defvar *output-stream*) -(defvar *ipp-client*) (defun read-octet () (let ((s *input-stream*)) @@ -259,18 +258,20 @@ (with-open-file (*input-stream* "response.dat" :element-type '(unsigned-byte 8)) (read-ipp 314)) -(defun ipp (printer-uri request-file response-file data-file request-id operation groups) +(defun ipp (ipp-client printer-uri request-file response-file + data-file request-id operation groups) (with-open-file (*output-stream* request-file :element-type '(unsigned-byte 8) :direction :output :if-exists :supersede :if-does-not-exist :create) (write-ipp data-file request-id operation groups)) - (funcall *ipp-client* printer-uri request-file response-file) + (funcall ipp-client printer-uri request-file response-file) (with-open-file (*input-stream* response-file :element-type '(unsigned-byte 8)) (read-ipp request-id))) -(defun print-job (printer-uri +(defun print-job (ipp-client + printer-uri request-file response-file data-file @@ -288,7 +289,8 @@ job-k-octets job-impressions job-media-sheets) - (ipp printer-uri + (ipp ipp-client + printer-uri request-file response-file data-file @@ -337,15 +339,15 @@ :content-type "application/ipp")) #+nil -(let ((ipp::*ipp-client* 'ipp-client)) - (ipp:print-job "http://localhost:631/printers/Virtual_PDF_Printer" - "request2.dat" - "response2.dat" - "test.txt" - 314 - "utf-8" - "en" - :requesting-user-name "tomas")) +(ipp:print-job 'ipp-client + "http://localhost:631/printers/Virtual_PDF_Printer" + "request2.dat" + "response2.dat" + "test.txt" + 314 + "utf-8" + "en" + :requesting-user-name "tomas") (defpackage :ipp.curl (:use :cl) @@ -374,12 +376,12 @@ :content-type "application/ipp")) #+nil -(let ((ipp::*ipp-client* 'ipp-client)) - (ipp:print-job "http://localhost:631/printers/Virtual_PDF_Printer" - "request2.dat" - "response2.dat" - "test.txt" - 314 - "utf-8" - "en" - :requesting-user-name "tomas")) +(ipp:print-job 'ipp-client + "http://localhost:631/printers/Virtual_PDF_Printer" + "request2.dat" + "response2.dat" + "test.txt" + 314 + "utf-8" + "en" + :requesting-user-name "tomas")