[Unetwork-cvs] CVS update: unetwork/src/http.lisp unetwork/src/nntp.lisp unetwork/src/pop3.lisp unetwork/src/smtp.lisp unetwork/src/url.lisp

Matthieu Villeneuve mvilleneuve at common-lisp.net
Fri Mar 12 17:12:05 UTC 2004


Update of /project/unetwork/cvsroot/unetwork/src
In directory common-lisp.net:/tmp/cvs-serv8353

Modified Files:
	http.lisp nntp.lisp pop3.lisp smtp.lisp url.lisp 
Log Message:
Fixed constant definitions
Date: Fri Mar 12 12:12:05 2004
Author: mvilleneuve

Index: unetwork/src/http.lisp
diff -u unetwork/src/http.lisp:1.1 unetwork/src/http.lisp:1.2
--- unetwork/src/http.lisp:1.1	Fri Mar 12 09:46:38 2004
+++ unetwork/src/http.lisp	Fri Mar 12 12:12:04 2004
@@ -12,8 +12,11 @@
 
 (in-package :unetwork)
 
-(defconstant +http-default-port+ 80)
-(defconstant +http-default-path+ "/")
+(unless (boundp '+http-default-port+)
+  (defconstant +http-default-port+ 80))
+
+(unless (boundp '+http-default-path+)
+  (defconstant +http-default-path+ "/"))
 
 (defgeneric http-get (uri)
   (:documentation "Get a resource designated by an URI. Returns two


Index: unetwork/src/nntp.lisp
diff -u unetwork/src/nntp.lisp:1.1 unetwork/src/nntp.lisp:1.2
--- unetwork/src/nntp.lisp:1.1	Fri Mar 12 09:46:38 2004
+++ unetwork/src/nntp.lisp	Fri Mar 12 12:12:04 2004
@@ -12,7 +12,8 @@
 
 (in-package :unetwork)
 
-(defconstant +nntp-default-port 119)
+(unless (boundp '+nntp-default-port)
+  (defconstant +nntp-default-port 119))
 
 (defun nntp-open-connection (server user password
                              &optional (port +nntp-default-port))


Index: unetwork/src/pop3.lisp
diff -u unetwork/src/pop3.lisp:1.1 unetwork/src/pop3.lisp:1.2
--- unetwork/src/pop3.lisp:1.1	Fri Mar 12 09:46:38 2004
+++ unetwork/src/pop3.lisp	Fri Mar 12 12:12:04 2004
@@ -12,10 +12,14 @@
 
 (in-package :unetwork)
 
-(defconstant +pop3-default-port+  110)
+(unless (boundp '+pop3-default-port+)
+  (defconstant +pop3-default-port+  110))
 
-(defconstant +pop3-status-ok+ "+OK")
-(defconstant +pop3-status-error+ "-ERR")
+(unless (boundp '+pop3-status-ok+)
+  (defconstant +pop3-status-ok+ "+OK"))
+
+(unless (boundp '+pop3-status-error+)
+  (defconstant +pop3-status-error+ "-ERR"))
 
 (defun pop3-open-connection (server &optional (port +pop3-default-port+))
   "Open a connection to a POP3 server. Returns the connection socket."


Index: unetwork/src/smtp.lisp
diff -u unetwork/src/smtp.lisp:1.1 unetwork/src/smtp.lisp:1.2
--- unetwork/src/smtp.lisp:1.1	Fri Mar 12 09:46:38 2004
+++ unetwork/src/smtp.lisp	Fri Mar 12 12:12:04 2004
@@ -12,7 +12,8 @@
 
 (in-package :unetwork)
 
-(defconstant +smtp-default-port+ 25)
+(unless (boundp '+smtp-default-port+)
+  (defconstant +smtp-default-port+ 25))
 
 (defun smtp-open-connection (server &optional (port +smtp-default-port+))
   "Open a connection to a SMTP server. Returns the connection socket."


Index: unetwork/src/url.lisp
diff -u unetwork/src/url.lisp:1.1 unetwork/src/url.lisp:1.2
--- unetwork/src/url.lisp:1.1	Fri Mar 12 09:46:38 2004
+++ unetwork/src/url.lisp	Fri Mar 12 12:12:04 2004
@@ -12,11 +12,13 @@
 
 (in-package :unetwork)
 
-(defconstant +url-decoded-chars+
-  #(#\$ #\& #\+ #\, #\/ #\: #\; #\= #\? #\@))
+(unless (boundp '+url-decoded-chars+)
+  (defconstant +url-decoded-chars+
+    #(#\$ #\& #\+ #\, #\/ #\: #\; #\= #\? #\@)))
 
-(defconstant +url-encoded-chars+
-  #("%24" "%26" "%2B" "%2C" "%2F" "%3A" "%3B" "%3D" "%3F" "%40"))
+(unless (boundp '+url-encoded-chars+)
+  (defconstant +url-encoded-chars+
+    #("%24" "%26" "%2B" "%2C" "%2F" "%3A" "%3B" "%3D" "%3F" "%40")))
 
 (defun url-encode (string)
   "URL-encodes a string."





More information about the Unetwork-cvs mailing list