changeset 2731:3213c79d6672

[xemacs-hg @ 2005-04-14 09:44:24 by stephent] stderr_out doc <87ll7lbsmv.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Thu, 14 Apr 2005 09:44:27 +0000
parents 7031e143e4ee
children 2590b61c3f03
files src/ChangeLog src/print.c
diffstat 2 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Apr 14 05:58:46 2005 +0000
+++ b/src/ChangeLog	Thu Apr 14 09:44:27 2005 +0000
@@ -1,3 +1,7 @@
+2005-04-12  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* print.c (stderr_out): Document need to convert arguments.
+
 2005-04-06  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	(Fmap_char_table): Add note about proper usage.
--- a/src/print.c	Thu Apr 14 05:58:46 2005 +0000
+++ b/src/print.c	Thu Apr 14 09:44:27 2005 +0000
@@ -306,8 +306,17 @@
    window under MS Windows); do external-format conversion and call GETTEXT
    on the format string.  Automatically flush when done.
 
-   This is safe even when not initialized or when dying -- we don't do
-   conversion in such cases. */
+   NOTE: CIbyte means "internal format" data.  This includes the "..."
+   arguments.  For numerical arguments, we have to assume that vsprintf
+   will be a good boy and format them as ASCII.  For Mule internal coding
+   (and UTF-8 internal coding, if/when we get it), it is safe to pass
+   string values in internal format to be formatted, because zero octets
+   only occur in the NUL character itself.  Similarly, it is safe to pass
+   pure ASCII literal strings for these functions.  *Everything else must
+   be converted, including all external data.*
+
+   This function is safe to use even when not initialized or when dying --
+   we don't do conversion in such cases. */
 
 void
 stderr_out (const CIbyte *fmt, ...)