]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/io/mmap/mmap-docs.factor
factor: trim using lists
[factor.git] / basis / io / mmap / mmap-docs.factor
index 9afc5286f5a58fc0358cf1f59eee6aa5bb92130e..f6d21b1d028190c809290e4dbee5f2568db3272e 100644 (file)
@@ -1,6 +1,5 @@
-USING: alien alien.c-types continuations destructors
-help.markup help.syntax kernel math quotations
-specialized-arrays ;
+USING: alien alien.c-types destructors help.markup help.syntax
+quotations specialized-arrays ;
 IN: io.mmap
 
 HELP: mapped-file
@@ -18,13 +17,13 @@ HELP: <mapped-file>
 { $errors "Throws an error if a memory mapping could not be established." } ;
 
 HELP: with-mapped-file
-{ $values { "path" "a pathname string" } { "quot" { $quotation "( mmap -- )" } } }
+{ $values { "path" "a pathname string" } { "quot" { $quotation ( mmap -- ) } } }
 { $contract "Opens a file for read/write access and maps its contents into memory, passing the " { $link mapped-file } " instance to the quotation. The mapped file is disposed of when the quotation returns, or if an error is thrown." }
 { $notes "This is a low-level word, because " { $link mapped-file } " objects simply expose their base address and length. Most applications should use " { $link "io.mmap.arrays" } " instead." }
 { $errors "Throws an error if a memory mapping could not be established." } ;
 
 HELP: with-mapped-file-reader
-{ $values { "path" "a pathname string" } { "quot" { $quotation "( mmap -- )" } } }
+{ $values { "path" "a pathname string" } { "quot" { $quotation ( mmap -- ) } } }
 { $contract "Opens a file for read-only access and maps its contents into memory, passing the " { $link mapped-file } " instance to the quotation. The mapped file is disposed of when the quotation returns, or if an error is thrown." }
 { $notes "This is a low-level word, because " { $link mapped-file } " objects simply expose their base address and length. See " { $link "io.mmap.arrays" } " for a discussion of how to access data in a mapped file." }
 { $errors "Throws an error if a memory mapping could not be established." } ;
@@ -49,9 +48,9 @@ HELP: with-mapped-array
     { $unchecked-example
         "USING: alien.c-types io.mmap prettyprint specialized-arrays ;"
         "SPECIALIZED-ARRAY: uint"
-""""resource:license.txt" uint [
+"resource:LICENSE.txt\" uint [
     [ . ] each
-] with-mapped-array"""
+] with-mapped-array"
         ""
     }
 }
@@ -80,7 +79,7 @@ ARTICLE: "io.mmap.examples" "Memory-mapped file examples"
     "SPECIALIZED-ARRAY: char"
     ""
     "\"mydata.dat\" char ["
-    "    4 <sliced-groups>"
+    "    4 <groups>"
     "    [ reverse! drop ] each"
     "] with-mapped-array"
 }