]> git.jsancho.org Git - gacela.git/blobdiff - src/gacela_server.scm
(no commit message)
[gacela.git] / src / gacela_server.scm
index eff695409226b04d30ee3512c266577957b97c1a..caaf6b595e526c654ccf1af979a52e6af90b1def 100644 (file)
         (catch #t
                (lambda ()
                  (let ((exp (read rec-channel)))
-                   (format #t "~a~%" exp)
                    (cond ((eof-object? exp)
                           (close rec-channel))
                          (else
-                          (format #t "~a~%" (primitive-eval (car exp)))
-                          (format send-channel "~a" (primitive-eval (car exp)))))))
+                          (write (format #f "~a" (eval-string exp)) send-channel)))))
                (lambda (key . args)
                  (let ((fmt (string-concatenate (list (cadr args) "~%")))
                        (params (caddr args)))
-                   (if params
-                       (apply format (cons send-channel (cons fmt params)))
-                       (format send-channel fmt))))))))
+                   (write
+                    (if params
+                        (apply format (cons #f (cons fmt params)))
+                        (format #f fmt))
+                    send-channel))))
+        (force-output send-channel))))