1(* 2 Title: Standard Basis Library: STREAM_IO signature 3 Copyright David C.J. Matthews 2000 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with this library; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18*) 19 20(* G&R 2004 status: checked. No change *) 21 22signature STREAM_IO = 23sig 24 type elem 25 type vector 26 type instream 27 type outstream 28 type out_pos 29 type reader 30 type writer 31 type pos 32 val input : instream -> vector * instream 33 val input1 : instream -> (elem * instream) option 34 val inputN : instream * int -> vector * instream 35 val inputAll : instream -> vector * instream 36 val canInput : instream * int -> int option 37 val closeIn : instream -> unit 38 val endOfStream : instream -> bool 39 val output : outstream * vector -> unit 40 val output1 : outstream * elem -> unit 41 val flushOut : outstream -> unit 42 val closeOut : outstream -> unit 43 val mkInstream : reader * vector -> instream 44 val getReader : instream -> reader * vector 45 val filePosIn : instream -> pos 46 val setBufferMode : outstream * IO.buffer_mode -> unit 47 val getBufferMode : outstream -> IO.buffer_mode 48 val mkOutstream : writer * IO.buffer_mode -> outstream 49 val getWriter : outstream -> writer * IO.buffer_mode 50 val getPosOut : outstream -> out_pos 51 val setPosOut : out_pos -> outstream 52 val filePosOut : out_pos -> pos 53end; 54