commit: Respect the CODESYS argument in #'open-database; don't autodetect EOL.

Aidan Kehoe aidan-guest at alioth.debian.org
Sat Dec 22 09:03:21 EST 2007


changeset:   4351:bc3b9f61018efe778ecbbab927c5d8f37b60a629
tag:         tip
user:        Aidan Kehoe <kehoea at parhasard.net>
date:        Sat Dec 22 15:02:04 2007 +0100
files:       src/ChangeLog src/database.c
description:
Respect the CODESYS argument in #'open-database; don't autodetect EOL.

2007-12-22  Aidan Kehoe  <kehoea at parhasard.net>

	* database.c (Fopen_database):
	Actually respect the CODESYS argument; don't require EOL
	autodetection from the coding system, because autodetection mostly
	fails with reads of small amounts of data. It might be possible
	with an implicit #'map-database on open, though I don't think
	that's a great idea.
	* database.c (print_database):
	Give the coding system used for text conversion when printing a
	database object.


diff -r 50889296c05cd0f9ea1295d66479ea49fb3ead8e -r bc3b9f61018efe778ecbbab927c5d8f37b60a629 src/ChangeLog
--- a/src/ChangeLog	Sat Dec 22 02:14:23 2007 -0800
+++ b/src/ChangeLog	Sat Dec 22 15:02:04 2007 +0100
@@ -1,3 +1,15 @@ 2007-12-20  Jerry James  <james at xemacs.o
+2007-12-22  Aidan Kehoe  <kehoea at parhasard.net>
+
+	* database.c (Fopen_database):
+	Actually respect the CODESYS argument; don't require EOL
+	autodetection from the coding system, because autodetection mostly
+	fails with reads of small amounts of data. It might be possible
+	with an implicit #'map-database on open, though I don't think
+	that's a great idea.
+	* database.c (print_database):
+	Give the coding system used for text conversion when printing a
+	database object. 
+
 2007-12-20  Jerry James  <james at xemacs.org>
 
 	* sound.c: Fix unused parameter warnings when HAVE_ALSA_SOUND.
diff -r 50889296c05cd0f9ea1295d66479ea49fb3ead8e -r bc3b9f61018efe778ecbbab927c5d8f37b60a629 src/database.c
--- a/src/database.c	Sat Dec 22 02:14:23 2007 -0800
+++ b/src/database.c	Sat Dec 22 15:02:04 2007 +0100
@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA.  */
 
 #include "sysfile.h"
 #include "buffer.h"
+#include "file-coding.h"
 
 #ifndef HAVE_DATABASE
 #error HAVE_DATABASE not defined!!
@@ -181,11 +182,16 @@ print_database (Lisp_Object obj, Lisp_Ob
 			 3, db->fname, db->funcs->get_type (db),
 			 db->funcs->get_subtype (db));
 
-  write_fmt_string (printcharfun, "%s) 0x%x>",
+  write_fmt_string (printcharfun, "%s) ",
 		    (!DATABASE_LIVE_P (db)    ? "closed"    :
 		     (db->access_ & O_WRONLY) ? "writeonly" :
-		     (db->access_ & O_RDWR)   ? "readwrite" : "readonly"),
-		    db->header.uid);
+		     (db->access_ & O_RDWR)   ? "readwrite" : "readonly"));
+
+  write_fmt_string_lisp (printcharfun, "coding: %s ", 1,
+                         XSYMBOL_NAME (XCODING_SYSTEM_NAME
+                                       (db->coding_system)));
+
+  write_fmt_string (printcharfun, "0x%x>", db->header.uid);
 }
 
 static void
@@ -654,7 +660,7 @@ variable `database-coding-system'.
   if (NILP (codesys))
     codesys = Vdatabase_coding_system;
 
-  codesys = get_coding_system_for_text_file (Vdatabase_coding_system, 1);
+  codesys = get_coding_system_for_text_file (codesys, 0);
 
 #ifdef HAVE_DBM
   if (NILP (type) || EQ (type, Qdbm))





More information about the XEmacs-Patches mailing list