From 2997c7c834786873ea24e70ce9e45dc80f0ae8f8 Mon Sep 17 00:00:00 2001 From: Raymond Toy <toy.raymond@gmail.com> Date: Fri, 10 Feb 2012 22:45:33 -0800 Subject: [PATCH] Use fwrite to dump the string instead of putw. --- src/lisp/interr.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/lisp/interr.c b/src/lisp/interr.c index 9b1f2e706..ecdcbc0a4 100644 --- a/src/lisp/interr.c +++ b/src/lisp/interr.c @@ -178,16 +178,14 @@ debug_print(lispobj object) len = lisp_string->length >> 2; lisp_chars = (unsigned short int*) lisp_string->data; - - for (k = 0; k < len; ++k) { - /* - * Do we really want to dump out 4 bytes? Should we - * just print out the low 8 bits of each Lisp - * character? - */ - putw(*lisp_chars, stdout); - ++lisp_chars; - } + + /* + * Do we really want to dump out the entire contents of + * the utf-16 string? Should we just print out the low 8 + * bits of each Lisp character? Or maybe convert the + * utf-16 string to some more suitable encoding? + */ + fwrite(lisp_chars, sizeof(*lisp_chars), len, stdout); putchar('\n'); fflush(stdout); -- GitLab