Index: gnu/expr/ChangeLog
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/ChangeLog,v
retrieving revision 1.479
diff -c -r1.479 ChangeLog
*** gnu/expr/ChangeLog	9 Nov 2005 02:16:59 -0000	1.479
--- gnu/expr/ChangeLog	14 Nov 2005 19:32:23 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ 2005-11-14  thomas kirk  <tk@research.att.com>
+ 
+ 	* Expression.java (print): close OutPort.
+ 
  2005-11-08  Per Bothner  <per@bothner.com>
  
  	* ModuleContext.java (findInstance): Only re-use an instance if its
Index: gnu/expr/Expression.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/Expression.java,v
retrieving revision 1.26
diff -c -r1.26 Expression.java
*** gnu/expr/Expression.java	14 Oct 2005 07:17:50 -0000	1.26
--- gnu/expr/Expression.java	14 Nov 2005 19:32:23 -0000
***************
*** 59,65 ****
        {
  	OutPort out = new OutPort(ps);
  	print(out);
! 	out.flush();
        }
    }
  
--- 59,65 ----
        {
  	OutPort out = new OutPort(ps);
  	print(out);
! 	out.close();
        }
    }
  
Index: gnu/kawa/functions/ChangeLog
===================================================================
RCS file: /cvs/kawa/kawa/gnu/kawa/functions/ChangeLog,v
retrieving revision 1.73
diff -c -r1.73 ChangeLog
*** gnu/kawa/functions/ChangeLog	21 Jul 2005 06:52:47 -0000	1.73
--- gnu/kawa/functions/ChangeLog	14 Nov 2005 19:32:24 -0000
***************
*** 1,3 ****
--- 1,8 ----
+ 2005-11-14  thomas kirk  <tk@research.att.com>
+ 
+ 	* Format.java (formatToString, format$V): close OutPorts.
+ 	* ObjectFormat.java (format): close OutPort.
+ 
  2005-07-20  Per Bothner  <per@bothner.com>
  
  	* DisplayFormat.java (outBase, outRadix): New ThreadLocation fields.
Index: gnu/kawa/functions/Format.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/kawa/functions/Format.java,v
retrieving revision 1.4
diff -c -r1.4 Format.java
*** gnu/kawa/functions/Format.java	6 Apr 2003 05:33:22 -0000	1.4
--- gnu/kawa/functions/Format.java	14 Nov 2005 19:32:24 -0000
***************
*** 99,112 ****
        { 
  	OutPort port = new OutPort((java.io.Writer) port_arg);
          format(port, args, 1);
! 	port.flush();
  	return Values.empty;
        } 
      else if (port_arg instanceof java.io.OutputStream)
        { 
  	OutPort port = new OutPort((java.io.OutputStream) port_arg);
          format(port, args, 1);
! 	port.flush();
  	return Values.empty;
        }
      else
--- 99,112 ----
        { 
  	OutPort port = new OutPort((java.io.Writer) port_arg);
          format(port, args, 1);
! 	port.close();
  	return Values.empty;
        } 
      else if (port_arg instanceof java.io.OutputStream)
        { 
  	OutPort port = new OutPort((java.io.OutputStream) port_arg);
          format(port, args, 1);
! 	port.close();
  	return Values.empty;
        }
      else
Index: gnu/kawa/functions/ObjectFormat.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/kawa/functions/ObjectFormat.java,v
retrieving revision 1.7
diff -c -r1.7 ObjectFormat.java
*** gnu/kawa/functions/ObjectFormat.java	5 Jun 2005 05:30:27 -0000	1.7
--- gnu/kawa/functions/ObjectFormat.java	14 Nov 2005 19:32:24 -0000
***************
*** 91,97 ****
        {
  	OutPort oport = new OutPort(dst);
  	print(arg, oport, readable);
! 	oport.flush();
  	return true;
        }
      else
--- 91,97 ----
        {
  	OutPort oport = new OutPort(dst);
  	print(arg, oport, readable);
! 	oport.close();
  	return true;
        }
      else
***************
*** 99,105 ****
  	CharArrayWriter wr = new CharArrayWriter();
  	OutPort oport = new OutPort(wr);
  	print(arg, oport, readable);
! 	oport.flush();
  	int len = wr.size();
  	if (maxChars < 0 || len <= maxChars)
  	  {
--- 99,105 ----
  	CharArrayWriter wr = new CharArrayWriter();
  	OutPort oport = new OutPort(wr);
  	print(arg, oport, readable);
! 	oport.close();
  	int len = wr.size();
  	if (maxChars < 0 || len <= maxChars)
  	  {
Index: gnu/kawa/xml/ChangeLog
===================================================================
RCS file: /cvs/kawa/kawa/gnu/kawa/xml/ChangeLog,v
retrieving revision 1.98
diff -c -r1.98 ChangeLog
*** gnu/kawa/xml/ChangeLog	4 Nov 2005 06:28:57 -0000	1.98
--- gnu/kawa/xml/ChangeLog	14 Nov 2005 19:32:24 -0000
***************
*** 1,3 ****
--- 1,8 ----
+ 2005-11-14  thomas kirk  <tk@research.att.com>
+ 
+ 	* HttpPrinter.java (endDocument): close OutPort.
+ 	* KNode.java (toString): close OutPort.
+ 
  2005-11-03  Per Bothner  <per@bothner.com>
  
  	* KNode.java: Implement Consumable.
Index: gnu/kawa/xml/HttpPrinter.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/kawa/xml/HttpPrinter.java,v
retrieving revision 1.5
diff -c -r1.5 HttpPrinter.java
*** gnu/kawa/xml/HttpPrinter.java	2 Jul 2002 20:47:07 -0000	1.5
--- gnu/kawa/xml/HttpPrinter.java	14 Nov 2005 19:32:24 -0000
***************
*** 191,198 ****
      try
        {
  	// else ???;
! 	if (writer != null)
! 	  writer.flush();
  	if (ostream != null)
  	  ostream.flush();
        }
--- 191,199 ----
      try
        {
  	// else ???;
! 	if (writer != null) {
! 	  writer.close();
! 	}
  	if (ostream != null)
  	  ostream.flush();
        }
Index: gnu/kawa/xml/KNode.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/kawa/xml/KNode.java,v
retrieving revision 1.7
diff -c -r1.7 KNode.java
*** gnu/kawa/xml/KNode.java	4 Nov 2005 06:28:57 -0000	1.7
--- gnu/kawa/xml/KNode.java	14 Nov 2005 19:32:24 -0000
***************
*** 372,377 ****
--- 372,378 ----
      CharArrayOutPort wr = new CharArrayOutPort();
      XMLPrinter xp = new XMLPrinter(wr);
      ((NodeTree) sequence).consumeNext(ipos, xp);
+     wr.close();
      return wr.toString();
    }
  
Index: gnu/lists/AbstractFormat.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/lists/AbstractFormat.java,v
retrieving revision 1.3
diff -c -r1.3 AbstractFormat.java
*** gnu/lists/AbstractFormat.java	4 Nov 2005 06:39:11 -0000	1.3
--- gnu/lists/AbstractFormat.java	14 Nov 2005 19:32:25 -0000
***************
*** 104,109 ****
--- 104,110 ----
      CharArrayOutPort out = new CharArrayOutPort();
      writeObject(val, out);
      sbuf.append(out.toCharArray());
+     out.close();
      return sbuf;
    }
  
Index: gnu/lists/ChangeLog
===================================================================
RCS file: /cvs/kawa/kawa/gnu/lists/ChangeLog,v
retrieving revision 1.100
diff -c -r1.100 ChangeLog
*** gnu/lists/ChangeLog	4 Nov 2005 06:39:11 -0000	1.100
--- gnu/lists/ChangeLog	14 Nov 2005 19:32:25 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ 2005-11-14  thomas kirk  <tk@research.att.com>
+ 
+ 	* AbstractFormat.java (format): close OutPort.
+ 
  2005-11-03  Per Bothner  <per@bothner.com>
  
  	* AbstractFormat.java (beginAttribute, endAttribute): New methods.
Index: gnu/xml/ChangeLog
===================================================================
RCS file: /cvs/kawa/kawa/gnu/xml/ChangeLog,v
retrieving revision 1.74
diff -c -r1.74 ChangeLog
*** gnu/xml/ChangeLog	4 Nov 2005 06:40:49 -0000	1.74
--- gnu/xml/ChangeLog	14 Nov 2005 19:32:25 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ 2005-11-14  thomas kirk  <tk@research.att.com>
+ 
+ 	* NodeTree.java (toString): close CharArrayOutPort.
+ 
  2005-11-03  Per Bothner  <per@bothner.com>
  
  	* XMLPrinter.java (consume): Provide implementation.
Index: gnu/xml/NodeTree.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/xml/NodeTree.java,v
retrieving revision 1.11
diff -c -r1.11 NodeTree.java
*** gnu/xml/NodeTree.java	7 Oct 2005 06:31:28 -0000	1.11
--- gnu/xml/NodeTree.java	14 Nov 2005 19:32:25 -0000
***************
*** 207,212 ****
--- 207,213 ----
      CharArrayOutPort wr = new CharArrayOutPort();
      XMLPrinter xp = new XMLPrinter(wr);
      consume(xp);
+     wr.close();
      return wr.toString();
    }
  }
Index: gnu/xquery/testsuite/ChangeLog
===================================================================
RCS file: /cvs/kawa/kawa/gnu/xquery/testsuite/ChangeLog,v
retrieving revision 1.79
diff -c -r1.79 ChangeLog
*** gnu/xquery/testsuite/ChangeLog	7 Oct 2005 06:47:28 -0000	1.79
--- gnu/xquery/testsuite/ChangeLog	14 Nov 2005 19:32:25 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ 2005-11-14  thomas kirk  <tk@research.att.com>
+ 
+ 	* TestMisc.java (toString, eval): close CharArrayOutPort.
+ 
  2005-10-06  Per Bothner  <per@bothner.com>
  
  	* expectedmul.xml: Remove no-longer-emitted incorrect spaces.
Index: gnu/xquery/testsuite/TestMisc.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/xquery/testsuite/TestMisc.java,v
retrieving revision 1.52
diff -c -r1.52 TestMisc.java
*** gnu/xquery/testsuite/TestMisc.java	17 Aug 2005 03:18:57 -0000	1.52
--- gnu/xquery/testsuite/TestMisc.java	14 Nov 2005 19:32:25 -0000
***************
*** 538,543 ****
--- 538,544 ----
      CharArrayOutPort wr = new CharArrayOutPort();
      gnu.xml.XMLPrinter xp = new gnu.xml.XMLPrinter(wr);
      xp.writeObject(value);
+     wr.close();
      return wr.toString();
    }
  
***************
*** 621,627 ****
  	ctx.consumer = save;
        }
  
!     return new String(out.toCharArray());
    }
  
  }
--- 622,630 ----
  	ctx.consumer = save;
        }
  
!     String result = new String(out.toCharArray());
!     out.close();
!     return result;
    }
  
  }
