From fc36fc593d3fe2728c886742c92ce0d4538c34d8 Mon Sep 17 00:00:00 2001 From: tomo Date: Sun, 16 Apr 2006 16:50:15 +0000 Subject: [PATCH] (print_concord_object): Support readable form. --- src/concord.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/src/concord.c b/src/concord.c index 2d9c0a7..f0bc9c7 100644 --- a/src/concord.c +++ b/src/concord.c @@ -362,20 +362,30 @@ print_concord_object (Lisp_Object obj, struct gcpro gcpro1, gcpro2; if (print_readably) - error ("printing unreadable object #", - lcobj->header.uid); - - write_c_string ("#genre)), - printcharfun); - write_c_string (":", printcharfun); - write_c_string (concord_genre_get_name (lcobj->genre), printcharfun); - write_c_string (";", printcharfun); - GCPRO2 (obj, printcharfun); - print_internal (lcobj->id, printcharfun, escapeflag); - UNGCPRO; - write_c_string ("\">", printcharfun); + { + write_c_string ("#s(concord-object", printcharfun); + write_c_string (" genre ", printcharfun); + write_c_string (concord_genre_get_name (lcobj->genre), printcharfun); + write_c_string (" =id ", printcharfun); + GCPRO2 (obj, printcharfun); + print_internal (lcobj->id, printcharfun, escapeflag); + UNGCPRO; + write_c_string (")", printcharfun); + } + else + { + write_c_string ("#genre)), + printcharfun); + write_c_string (":", printcharfun); + write_c_string (concord_genre_get_name (lcobj->genre), printcharfun); + write_c_string (";", printcharfun); + GCPRO2 (obj, printcharfun); + print_internal (lcobj->id, printcharfun, escapeflag); + UNGCPRO; + write_c_string ("\">", printcharfun); + } } static void -- 1.7.10.4