Changeset 2752 in project
- Timestamp:
- 12/21/06 17:33:06 (14 years ago)
- Files:
-
- 1 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
doc-indices/grovel
r2432 r2752 4 4 |# 5 5 6 7 6 (use utils regex-case posix) 8 9 7 10 8 (set-sharp-read-syntax! -
hart/hart.scm
r2751 r2752 1 (use srfi-1 hart-support)2 3 4 1 ;;;Hart macros. 5 2 -
hart/hart.setup
r2751 r2752 4 4 'hart 5 5 '("hart.scm" "hart-support.so") 6 '((syntax) (require-at-runtime hart )))6 '((syntax) (require-at-runtime hart-support))) 7 7 -
wiki/Unit extras
r2646 r2752 813 813 814 814 815 ==== any? 816 817 [procedure] (any? X) 818 819 Ignores it's argument and always returns {{#t}}. This is actually useful sometimes. 820 815 821 816 822 === Binary searching … … 826 832 searched value is equal to the current item, negative if the searched 827 833 value is ''less'' than the current item, and positive otherwise. 834 Returns the index of the found value or {{#f}} otherwise. 828 835 829 836 Previous: [[Unit eval]] -
wiki/faq
r2178 r2752 458 458 {{make-record-instance}} 459 459 {{locative-ref}} {{locative-set!}} {{locative?}} {{locative->object}} {{identity}} 460 {{cpu-time}} {{error}} {{call/cc}} 460 {{cpu-time}} {{error}} {{call/cc}} {{any?}} 461 461 462 462 == Garbage collection -
wiki/fps
r2748 r2752 63 63 (import fps) 64 64 65 The same can be achieved with the {{modules}} egg (note that importing {{fps}} at top-level 66 still clobbers some library functions). 67 65 68 66 69 === Requirements -
wiki/syntactic-closures
r2729 r2752 2 2 3 3 == syntactic-closures 4 5 An implementation of {{syntax-rules}} and a hygienic low-level 6 macro system. 4 7 5 8 === Usage -
xml-rpc/hello-client.scm
r2552 r2752 4 4 (define hello (srv "hello")) 5 5 6 (print "-> " (hello (:optional (command-line-arguments) "you"))) 6 (for-each 7 (lambda (arg) 8 (print "-> " (hello arg)) ) 9 (let ((args (command-line-arguments))) 10 (if (null? args) 11 '("you") 12 args) ) ) 13 -
xml-rpc/hello.scm
r2552 r2752 4 4 (sprintf "Hello, ~A!" var) ) 5 5 6 ((http:make-server 4242) )6 ((http:make-server 4242) #t) -
xml-rpc/xml-rpc-client.scm
r64 r2752 15 15 (define-constant fault-response-code 1) 16 16 (define-constant invalid-response-format-code 2) 17 (define-constant version "1. 8")17 (define-constant version "1.13") 18 18 19 19 (define xml-rpc:version -
xml-rpc/xml-rpc-server-support.scm
r2572 r2752 46 46 (with-input-from-string data (cut SSAX:XML->SXML (current-input-port) '())) 47 47 data) ] ) 48 (handle-exceptions ex 49 (write-fault-response ex) 48 (handle-exceptions ex (write-fault-response ex r) 50 49 (match data 51 50 [(or `(*TOP* (*PI* xml . ,_) (|methodCall| ,mname . ,params)) … … 59 58 [`((params (param ,x) ...)) 60 59 (receive results (call-proc m (map xml-rpc:unmarshall-value x)) 61 (write-result-response results ) ) ]60 (write-result-response results r) ) ] 62 61 [() 63 62 (receive results (call-proc m '()) 64 (write-result-response results ) ) ]63 (write-result-response results r) ) ] 65 64 [r (xml-rpc:error invalid-parameter-format-code "invalid parameter format" r)] ) 66 (write-undefined-method-response name ) ) ) ]65 (write-undefined-method-response name r) ) ) ] 67 66 [r (xml-rpc:error invalid-rpc-format-code "invalid rpc format" r)] ) ] 68 67 [r (xml-rpc:error invalid-rpc-format-code "invalid rpc format" r)] ) ) ) ) ) ) … … 84 83 (define exn-message (condition-property-accessor 'exn 'message)) 85 84 86 (define (write-response s) 87 (http:write-response-header) 85 (define (write-response s req) 86 (http:write-response-header 87 200 "OK" '() (current-output-port) 88 (http:request-protocol req) ) 88 89 (printf "Content-type: text/xml\r\nContent-length: ~A\r\n\r\n~A" 89 90 (string-length s) 90 91 s) ) 91 92 92 (define (write-fault-response ex )93 (define (write-fault-response ex req) 93 94 (let ([o (open-output-string)]) 94 95 (fprintf o #<<EOF … … 113 114 (exn-message ex) 114 115 (->string ex) ) ) 115 (write-response (get-output-string o) ) ) )116 (write-response (get-output-string o) req) ) ) 116 117 117 (define (write-undefined-method-response name )118 (define (write-undefined-method-response name req) 118 119 (write-fault-response 119 (make-property-condition 'exn 'message (sprintf "undefined method ~S" name)) ) ) 120 (make-property-condition 'exn 'message (sprintf "undefined method ~S" name)) 121 req) ) 120 122 121 (define (write-result-response results )123 (define (write-result-response results req) 122 124 (let ([o (open-output-string)]) 123 125 (display "<?xml version=\"1.0\"?><methodResponse>" o) … … 129 131 (display "</params>" o) ) 130 132 (display "</methodResponse>\n" o) 131 (write-response (get-output-string o) ) ) )133 (write-response (get-output-string o) req) ) ) 132 134 133 135 (define (xml-rpc:method-documentation name . url) -
xml-rpc/xml-rpc.html
r2572 r2752 16 16 <h3>Version:</h3> 17 17 <ul> 18 <li>1.13 19 Server replies with proper protocol [guess who reported it?] 18 20 <li>1.12 19 21 Fixed another bug, again reported by Daishi -
xml-rpc/xml-rpc.setup
r2572 r2752 14 14 '("xml-rpc-server.scm" "xml-rpc-server-support.so" "xml-rpc-utils.so") 15 15 '((syntax) 16 (documentation "xml-rpx.html") (version 1.1 2)16 (documentation "xml-rpx.html") (version 1.13) 17 17 (require-at-runtime xml-rpc-server-support)) )
Note: See TracChangeset
for help on using the changeset viewer.