summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Brannon <chris@the-brannons.com>2021-04-05 04:33:23 -0700
committerChristopher Brannon <chris@the-brannons.com>2021-04-05 05:52:35 -0700
commit58e4d2539370035095bbb662ffca7b87a2790720 (patch)
treed484a1027f742fb552395f2e49470454094c4faa
parent4fd96b22c93f8aa82514b0940ce2fdf8e86ee60e (diff)
downloadchicken-xml-rpc-58e4d2539370035095bbb662ffca7b87a2790720.tar
chicken-xml-rpc-58e4d2539370035095bbb662ffca7b87a2790720.tar.gz
chicken-xml-rpc-58e4d2539370035095bbb662ffca7b87a2790720.tar.bz2
chicken-xml-rpc-58e4d2539370035095bbb662ffca7b87a2790720.tar.lz
chicken-xml-rpc-58e4d2539370035095bbb662ffca7b87a2790720.tar.xz
chicken-xml-rpc-58e4d2539370035095bbb662ffca7b87a2790720.tar.zst
chicken-xml-rpc-58e4d2539370035095bbb662ffca7b87a2790720.zip
Port to Chicken 5.
I imported the Chicken 4 version from subversion, to preserve history and make it obvious what I changed during the port.
-rw-r--r--tests/run.scm10
-rw-r--r--xml-rpc-client.scm4
-rw-r--r--xml-rpc-lolevel.scm7
-rw-r--r--xml-rpc-server.scm4
-rw-r--r--xml-rpc.egg9
-rw-r--r--xml-rpc.meta10
-rw-r--r--xml-rpc.setup17
7 files changed, 15 insertions, 46 deletions
diff --git a/tests/run.scm b/tests/run.scm
index 3c2a8af..439cecd 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -1,12 +1,4 @@
-(use test ssax intarweb sxpath-lolevel)
-;; Should use numbers, but that's a whole new can of worms...
-
-(load "../xml-rpc-lolevel")
-(load "../xml-rpc-client")
-(load "../xml-rpc-server")
-(import xml-rpc-lolevel)
-(import xml-rpc-client)
-(import xml-rpc-server)
+(import (chicken blob) (chicken port) test ssax intarweb sxpath-lolevel xml-rpc-client xml-rpc-lolevel xml-rpc-server srfi-4 srfi-13 srfi-69)
(test-begin "xml-rpc")
diff --git a/xml-rpc-client.scm b/xml-rpc-client.scm
index de65979..ae9cdaa 100644
--- a/xml-rpc-client.scm
+++ b/xml-rpc-client.scm
@@ -41,9 +41,7 @@
(module xml-rpc-client
(xml-rpc-server xml-rpc-response->values xml-rpc-methodcall)
-(import chicken scheme)
-(use srfi-13 data-structures http-client uri-common intarweb
- xml-rpc-lolevel ssax sxpath-lolevel)
+(import (chicken base) scheme srfi-13 http-client uri-common intarweb xml-rpc-lolevel ssax sxpath-lolevel)
(define (xml-rpc-response->values response-sxml)
(let* ((resp ((select-first-kid (ntype?? 'methodResponse)) response-sxml)))
diff --git a/xml-rpc-lolevel.scm b/xml-rpc-lolevel.scm
index b0df44f..5cabf1c 100644
--- a/xml-rpc-lolevel.scm
+++ b/xml-rpc-lolevel.scm
@@ -57,8 +57,7 @@
xml-rpc-base64->string xml-rpc-base64->u8vector xml-rpc-base64->blob
xml-rpc-datetime->vector)
-(import chicken scheme)
-(use data-structures posix srfi-1 srfi-4 srfi-69 base64 sxpath-lolevel)
+(import (chicken base) scheme srfi-1 srfi-4 srfi-69 base64 sxpath-lolevel (chicken time posix) (chicken condition) (chicken string) (chicken blob))
(define (signal-xml-rpc-error code msg . args)
(signal
@@ -114,8 +113,8 @@
(define xml-rpc-unparsers
(make-parameter `((,vector? . ,vector->xml-rpc-array)
- (,(conjoin number? exact?) . ,number->xml-rpc-int)
- (,number? . ,number->xml-rpc-double)
+ (,(disjoin flonum? ratnum?) . ,number->xml-rpc-double)
+ (,integer? . ,number->xml-rpc-int)
(,boolean? . ,boolean->xml-rpc-boolean)
(,string? . ,->xml-rpc-string)
(,symbol? . ,->xml-rpc-string)
diff --git a/xml-rpc-server.scm b/xml-rpc-server.scm
index 52eebcc..89bd852 100644
--- a/xml-rpc-server.scm
+++ b/xml-rpc-server.scm
@@ -42,9 +42,7 @@
(call-xml-rpc-proc xml-rpc-call->xml-rpc-response
make-xml-rpc-request-handler start-simple-xml-rpc-server)
-(import chicken scheme)
-(use srfi-13 srfi-18 extras data-structures tcp
- xml-rpc-lolevel sxpath-lolevel ssax intarweb)
+(import (chicken base) (chicken condition) (chicken format) (chicken io) scheme srfi-13 srfi-18 (chicken tcp) xml-rpc-lolevel sxpath-lolevel ssax intarweb)
(define (call-xml-rpc-proc call-sxml procedures)
(or (and-let* ((call ((select-first-kid (ntype?? 'methodCall)) call-sxml))
diff --git a/xml-rpc.egg b/xml-rpc.egg
new file mode 100644
index 0000000..bec2733
--- /dev/null
+++ b/xml-rpc.egg
@@ -0,0 +1,9 @@
+;;; xml-rpc.egg -*- Scheme -*-
+
+((synopsis "XML-RPC client/server")
+ (category web)
+ (dependencies base64 http-client intarweb ssax sxpath srfi-13)
+ (test-dependencies test) ; numbers
+ (license "BSD")
+ (author "Peter Bex, ported to Chicken 5 and maintained by Chris Brannon")
+ (components (extension xml-rpc-client) (extension xml-rpc-server) (extension xml-rpc-lolevel)))
diff --git a/xml-rpc.meta b/xml-rpc.meta
deleted file mode 100644
index ebcdafb..0000000
--- a/xml-rpc.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-;;; xml-rpc.meta -*- Scheme -*-
-
-((egg "xml-rpc.egg")
- (synopsis "XML-RPC client/server")
- (category web)
- (needs base64 http-client intarweb ssax sxpath)
- (test-depends test) ; numbers
- (doc-from-wiki)
- (license "BSD")
- (author "Peter Bex"))
diff --git a/xml-rpc.setup b/xml-rpc.setup
deleted file mode 100644
index fb3bb25..0000000
--- a/xml-rpc.setup
+++ /dev/null
@@ -1,17 +0,0 @@
-;-*- Scheme -*-
-
-(compile -s -O2 xml-rpc-lolevel.scm -j xml-rpc-lolevel)
-(compile -s -O2 xml-rpc-lolevel.import.scm)
-
-(compile -s -O2 xml-rpc-client.scm -j xml-rpc-client)
-(compile -s -O2 xml-rpc-client.import.scm)
-
-(compile -s -O2 xml-rpc-server.scm -j xml-rpc-server)
-(compile -s -O2 xml-rpc-server.import.scm)
-
-(install-extension
- 'xml-rpc
- '("xml-rpc-lolevel.so" "xml-rpc-lolevel.import.so"
- "xml-rpc-client.so" "xml-rpc-client.import.so"
- "xml-rpc-server.so" "xml-rpc-server.import.so")
- `((version 2.2)))