[cmucl-commit] [git] CMU Common Lisp branch master updated. snapshot-2012-09-3-geb7aef5
Raymond Toy
rtoy at common-lisp.net
Wed Sep 5 02:49:27 UTC 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".
The branch, master has been updated
via eb7aef5b50c77b2ada5ec883b446b18e18348012 (commit)
from 1a44615f74ceea56690f10c70bf00ccb8d5413f2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit eb7aef5b50c77b2ada5ec883b446b18e18348012
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Tue Sep 4 19:49:17 2012 -0700
Output lisp strings in utf8 format in ldb print.
print.c:
* Use utf16_output to output strings as utf8 instead of raw utf16.
interr.c:
* Make utf16_output public instead of static.
interr.h:
* Declare utf16_output.
diff --git a/src/lisp/interr.c b/src/lisp/interr.c
index 5b43b6a..6b46957 100644
--- a/src/lisp/interr.c
+++ b/src/lisp/interr.c
@@ -262,7 +262,7 @@ utf16_codepoint(unsigned short int* utf16, int len, int* consumed)
* Send the utf-16 Lisp unicode string to standard output as a
* utf8-encoded sequence of octets.
*/
-static void
+void
utf16_output(unsigned short int* utf16, int len)
{
while (len) {
diff --git a/src/lisp/interr.h b/src/lisp/interr.h
index 29f4eb7..2611c64 100644
--- a/src/lisp/interr.h
+++ b/src/lisp/interr.h
@@ -14,6 +14,7 @@ extern void lose(char *fmt, ...);
extern void set_lossage_handler(void fun(void));
extern void internal_error(os_context_t * context);
+extern void utf16_output(unsigned short int* utf16, int len);
extern lispobj debug_print(lispobj string);
#endif /* _INTERR_H_ */
diff --git a/src/lisp/print.c b/src/lisp/print.c
index 34aa0ce..b4758d8 100644
--- a/src/lisp/print.c
+++ b/src/lisp/print.c
@@ -376,14 +376,7 @@ print_string(struct vector* vector)
uint16_t *charptr = (uint16_t *) vector->data;
int len = fixnum_value(vector->length);
- while (len-- > 0) {
- if (*charptr == '"') {
- putchar('\\');
- }
- /* Just dump out the UTF-16 data */
- fwrite(charptr, sizeof(*charptr), 1, stdout);
- charptr++;
- }
+ utf16_output(charptr, len);
#endif
}
-----------------------------------------------------------------------
Summary of changes:
src/lisp/interr.c | 2 +-
src/lisp/interr.h | 1 +
src/lisp/print.c | 9 +--------
3 files changed, 3 insertions(+), 9 deletions(-)
hooks/post-receive
--
CMU Common Lisp
More information about the cmucl-commit
mailing list