Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/library/stringOutStream.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/library/stringOutStream.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1380, Wed Sep 17 20:20:51 2003 UTC revision 1381, Wed Sep 17 21:28:41 2003 UTC
# Line 17  Line 17 
17     fun setString (r,s)   = r := [s]     fun setString (r,s)   = r := [s]
18    
19     fun openStringOut buffer =     fun openStringOut buffer =
20     let     let fun writeVec sl =
21               (buffer := CharVectorSlice.vector sl :: !buffer;
22                CharVectorSlice.length sl)
23           fun writeArr sl =
24               (buffer := CharArraySlice.vector sl :: !buffer;
25                CharArraySlice.length sl)
26         val writer =         val writer =
27             TextPrimIO.WR             TextPrimIO.WR
28                  { name       = "string stream",                  { name       = "string stream",
29                  chunkSize  = 512,                  chunkSize  = 512,
30                  writeVec   = SOME (fn {buf, i, sz = SOME n} =>                  writeVec   = SOME writeVec,
31                                        (buffer := buf :: !buffer; n)                  writeArr   = SOME writeArr,
32                                     |  {buf, i, sz = NONE} =>                  writeVecNB = SOME (SOME o writeVec),
33                                        (buffer := buf :: !buffer; size buf)),                  writeArrNB = SOME (SOME o writeArr),
                 writeArr   = NONE,  
                 writeVecNB = NONE,  
                 writeArrNB = NONE,  
34                  block      = NONE,                  block      = NONE,
35                  canOutput  = NONE,                  canOutput  = NONE,
36                  getPos     = NONE,                  getPos     = NONE,

Legend:
Removed from v.1380  
changed lines
  Added in v.1381

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0