From 1169d774d4ba1ae21ef1240360b559c051e08fde Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sun, 18 Sep 2005 13:23:32 +0000 Subject: [PATCH] *** empty log message *** --- ase/lsp/print.c | 14 +++++++++++--- ase/test/lsp/lisp.c | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ase/lsp/print.c b/ase/lsp/print.c index 29fa25ae..cf83e738 100644 --- a/ase/lsp/print.c +++ b/ase/lsp/print.c @@ -1,5 +1,5 @@ /* - * $Id: print.c,v 1.8 2005-09-18 13:06:43 bacon Exp $ + * $Id: print.c,v 1.9 2005-09-18 13:23:32 bacon Exp $ */ #include @@ -61,7 +61,15 @@ void xp_lsp_print_debug (xp_lsp_obj_t* obj) #define OUTPUT_STR(lsp,str) \ do { \ - if (lsp->output_func(XP_LSP_IO_DATA, lsp->output_arg, (void*)str, xp_strlen(str)) == -1) { \ + if (lsp->output_func(XP_LSP_IO_DATA, lsp->output_arg, (xp_char_t*)str, xp_strlen(str)) == -1) { \ + lsp->errnum = XP_LSP_ERR_OUTPUT; \ + return -1; \ + } \ + } while (0) + +#define OUTPUT_STRX(lsp,str,len) \ + do { \ + if (lsp->output_func(XP_LSP_IO_DATA, lsp->output_arg, (xp_char_t*)str, len) == -1) { \ lsp->errnum = XP_LSP_ERR_OUTPUT; \ return -1; \ } \ @@ -71,7 +79,7 @@ int xp_lsp_print (xp_lsp_t* lsp, const xp_lsp_obj_t* obj) { xp_char_t buf[256]; - if (lsp->output_func != XP_NULL) { + if (lsp->output_func == XP_NULL) { lsp->errnum = XP_LSP_ERR_OUTPUT_NOT_ATTACHED; return -1; } diff --git a/ase/test/lsp/lisp.c b/ase/test/lsp/lisp.c index fea792b5..56712fe5 100644 --- a/ase/test/lsp/lisp.c +++ b/ase/test/lsp/lisp.c @@ -171,7 +171,7 @@ int xp_main (int argc, xp_char_t* argv[]) if ((obj = xp_lsp_eval (lsp, obj)) != XP_NULL) { xp_lsp_print (lsp, obj); - xp_printf (XP_TEXT("\n")); + xp_sio_puts (xp_sio_out, XP_TEXT("\n")); } else { if (lsp->errnum == XP_LSP_ERR_ABORT) break;