port-encoding returns #f if port encoding not set
authorAndy Wingo <wingo@pobox.com>
Sat, 9 Jan 2010 18:21:09 +0000 (19:21 +0100)
committerAndy Wingo <wingo@pobox.com>
Sat, 9 Jan 2010 18:21:09 +0000 (19:21 +0100)
* libguile/ports.c (scm_port_encoding): Instead of returning "NONE" if
  we don't know the encoding, return #f. Allows truncated-print to work
  if you don't have a locale set.

libguile/ports.c

index f56c092..7328767 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -2042,7 +2042,7 @@ SCM_DEFINE (scm_port_encoding, "port-encoding", 1, 0, 0,
   if (enc)
     return scm_from_locale_string (pt->encoding);
   else
-    return scm_from_locale_string ("NONE");
+    return SCM_BOOL_F;
 }
 #undef FUNC_NAME