]> 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 7418eb0a196e48b5a6d42a6f9aa6d0c98fb39338..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,11 +79,11 @@ 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"
 }
-"Normalize a file containing packed quadrupes of floats:"
+"Normalize a file containing packed quadruples of floats:"
 { $code
     "USING: kernel io.mmap math.vectors math.vectors.simd" "sequences specialized-arrays ;"
     "SPECIALIZED-ARRAY: float-4"