From: jsancho Date: Mon, 1 Aug 2011 18:08:35 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=b5c968767be22ea1aeff7806c191a223c204184b;p=gacela.git --- diff --git a/src/gacela.c b/src/gacela.c index d1a15fb..a75fe73 100644 --- a/src/gacela.c +++ b/src/gacela.c @@ -165,7 +165,8 @@ gacela_client (SCM rec_channel, SCM send_channel) ctrl_c = 0; else { buffer = scm_read (rec_channel); - printf ("%s\n", scm_to_locale_string (buffer)); + if (strlen (scm_to_locale_string (buffer)) > 0) + printf ("%s\n", scm_to_locale_string (buffer)); } } free (line); diff --git a/src/gacela_server.scm b/src/gacela_server.scm index 6349b6c..fbd2b2e 100644 --- a/src/gacela_server.scm +++ b/src/gacela_server.scm @@ -79,7 +79,8 @@ (cond ((eof-object? exp) (close rec-channel)) (else - (write (format #f "~a" (eval-string exp)) send-channel))))) + (let ((result (eval-string exp))) + (write (if (eq? result *unspecified*) "" (format #f "~a" result)) send-channel)))))) (lambda (key . args) (let ((fmt (string-concatenate (list (cadr args) "~%"))) (params (caddr args)))