Small typos, some reformatting.

Fixes PR10920
This commit is contained in:
Eli Barzilay 2010-05-21 16:30:16 -04:00
parent 682430b2c4
commit c4f67b3e74
21 changed files with 66 additions and 109 deletions

View File

@ -38,7 +38,7 @@ bindings such as @scheme[foo-bar] for foreign names like
]} ]}
@defproc[(list->cblock [lst list?][type ctype?]) any]{ @defproc[(list->cblock [lst list?] [type ctype?]) any]{
Allocates a memory block of an appropriate size, and initializes it Allocates a memory block of an appropriate size, and initializes it
using values from @scheme[lst] and the given @scheme[type]. The using values from @scheme[lst] and the given @scheme[type]. The
@ -46,7 +46,7 @@ using values from @scheme[lst] and the given @scheme[type]. The
according to the given @scheme[type].} according to the given @scheme[type].}
@defproc[(vector->cblock [vec vector?][type type?]) any]{ @defproc[(vector->cblock [vec vector?] [type type?]) any]{
Like @scheme[list->cblock], but for Racket vectors.} Like @scheme[list->cblock], but for Racket vectors.}
@ -75,7 +75,7 @@ symbol. The set of supported symbols is likely to expand in the
future.} future.}
@defproc[(cast [v any/c][from-type ctype?][to-type ctype?]) any/c]{ @defproc[(cast [v any/c] [from-type ctype?] [to-type ctype?]) any/c]{
Converts @scheme[v] from a value matching @scheme[from-type] to a Converts @scheme[v] from a value matching @scheme[from-type] to a
value matching @scheme[to-type], where @scheme[(ctype-sizeof from-type)] value matching @scheme[to-type], where @scheme[(ctype-sizeof from-type)]
@ -89,7 +89,7 @@ The conversion is equivalent to
(ptr-ref p to-type)) (ptr-ref p to-type))
]} ]}
@defproc[(cblock->list [cblock any/c][type ctype?][length exact-nonnegative-integer?]) @defproc[(cblock->list [cblock any/c] [type ctype?] [length exact-nonnegative-integer?])
list?]{ list?]{
Converts C @scheme[cblock], which is a vector of @scheme[type]s, to a Converts C @scheme[cblock], which is a vector of @scheme[type]s, to a
@ -98,7 +98,7 @@ Racket list. The arguments are the same as in the
there is no way to know where the block ends.} there is no way to know where the block ends.}
@defproc[(cblock->vector [cblock any/c][type ctype?][length exact-nonnegative-integer?]) @defproc[(cblock->vector [cblock any/c] [type ctype?] [length exact-nonnegative-integer?])
vector?]{ vector?]{
Like @scheme[cblock->vector], but for Racket vectors.} Like @scheme[cblock->vector], but for Racket vectors.}

View File

@ -42,9 +42,8 @@ Returns the size or alignment of a given @scheme[type] for the current
platform.} platform.}
@defproc[(ctype->layout [type ctype?]) (flat-rec-contract rep @defproc[(ctype->layout [type ctype?])
symbol? (flat-rec-contract rep symbol? (listof rep))]{
(listof rep))]{
Returns a value to describe the eventual C representation of the Returns a value to describe the eventual C representation of the
type. It can be any of the following symbols: type. It can be any of the following symbols:

View File

@ -14,8 +14,7 @@
@title{Miscellaneous} @title{Miscellaneous}
@defproc[(begin-busy-cursor) @defproc[(begin-busy-cursor) void?]{
void?]{
Changes the cursor to a watch cursor for all windows in the current eventspace. Changes the cursor to a watch cursor for all windows in the current eventspace.
Use Use
@ -27,30 +26,15 @@ The cursor installed by
@scheme[begin-busy-cursor] overrides any window-specific cursors installed with @scheme[begin-busy-cursor] overrides any window-specific cursors installed with
@method[window<%> set-cursor]. @method[window<%> set-cursor].
See also See also @scheme[is-busy?].
@scheme[is-busy?].
} }
@defproc[(bell) @defproc[(bell) void?]{
void?]{
Rings the system bell. Rings the system bell.
} }
@defproc[(end-busy-cursor) @defproc[(end-busy-cursor) void?]{
void?]{ See @scheme[begin-busy-cursor].
See
@scheme[begin-busy-cursor].
} }
@defproc*[([(file-creator-and-type [filename path] @defproc*[([(file-creator-and-type [filename path]
@ -234,12 +218,9 @@ The keymap for the read-eval-print loop's editor is initialized by
calling the current keymap initializer procedure, which is determined calling the current keymap initializer procedure, which is determined
by the by the
@scheme[current-text-keymap-initializer] parameter. @scheme[current-text-keymap-initializer] parameter.
} }
@defproc[(textual-read-eval-print-loop) @defproc[(textual-read-eval-print-loop) void?]{
void?]{
Similar to @scheme[read-eval-print-loop], except that evaluation uses Similar to @scheme[read-eval-print-loop], except that evaluation uses
a newly created eventspace. a newly created eventspace.
@ -259,30 +240,21 @@ break is sent (via @scheme[break-thread]) to the created eventspace's
@tech{handler thread}.} @tech{handler thread}.}
@defproc[(hide-cursor-until-moved) @defproc[(hide-cursor-until-moved) void?]{
void?]{
Hides the cursor until the user moves the mouse or clicks the mouse Hides the cursor until the user moves the mouse or clicks the mouse
button. (For some platforms, the cursor is not hidden if it is over button. (For some platforms, the cursor is not hidden if it is over
a window in a different eventspace or application.) a window in a different eventspace or application.)
} }
@defproc[(is-busy?) @defproc[(is-busy?) boolean?]{
boolean?]{
Returns @scheme[#t] if a busy cursor has been installed with Returns @scheme[#t] if a busy cursor has been installed with
@scheme[begin-busy-cursor] and not removed with @scheme[begin-busy-cursor] and not removed with
@scheme[end-busy-cursor]. @scheme[end-busy-cursor].
} }
@defproc[(label->plain-label [label string]) @defproc[(label->plain-label [label string]) string?]{
string]{
Strips shortcut ampersands from @scheme[label], removes parenthesized Strips shortcut ampersands from @scheme[label], removes parenthesized
ampersand--character combinations along with any surrounding space, ampersand--character combinations along with any surrounding space,
@ -292,15 +264,13 @@ Strips shortcut ampersands from @scheme[label], removes parenthesized
} }
@defproc[(make-gui-empty-namespace) @defproc[(make-gui-empty-namespace) namespace?]{
namespace?]{
Like @scheme[make-base-empty-namespace], but with Like @scheme[make-base-empty-namespace], but with
@scheme[scheme/class] and @schememodname[scheme/gui/base] also @scheme[scheme/class] and @schememodname[scheme/gui/base] also
attached to the result namespace.} attached to the result namespace.}
@defproc[(make-gui-namespace) @defproc[(make-gui-namespace) namespace?]{
namespace?]{
Like @scheme[make-base-namespace], but with @scheme[scheme/class] and Like @scheme[make-base-namespace], but with @scheme[scheme/class] and
@schememodname[scheme/gui/base] also required into the top-level @schememodname[scheme/gui/base] also required into the top-level

View File

@ -1091,7 +1091,6 @@ converted to a path using @racket[bytes->path].}
(or/c (listof bytes?) bytes?)))]) (or/c (listof bytes?) bytes?)))])
path?]{ path?]{
The inverse of @racket[path->main-collects-relative]: if @racket[rel] The inverse of @racket[path->main-collects-relative]: if @racket[rel]
is a pair that starts with @racket['collects], then it is converted is a pair that starts with @racket['collects], then it is converted
back to a path relative to @racket[(find-collects-dir)]. back to a path relative to @racket[(find-collects-dir)].

View File

@ -48,8 +48,7 @@ positions are initialized with the given @scheme[b]s.
@defproc[(bytes->immutable-bytes [bstr bytes?]) @defproc[(bytes->immutable-bytes [bstr bytes?])
(and/c bytes? (and/c bytes? immutable?)]{
immutable?)]{
Returns an immutable byte string with the same content Returns an immutable byte string with the same content
as @scheme[bstr], returning @scheme[bstr] itself if @scheme[bstr] is as @scheme[bstr], returning @scheme[bstr] itself if @scheme[bstr] is
immutable. immutable.

View File

@ -144,8 +144,7 @@ Returns @racket[#t] if @racket[v] is a mark set created by
@racket[continuation-marks] or @racket[current-continuation-marks], @racket[continuation-marks] or @racket[current-continuation-marks],
@racket[#f] otherwise.} @racket[#f] otherwise.}
@defproc[(continuation-mark-set->context @defproc[(continuation-mark-set->context [mark-set continuation-mark-set?])
[mark-set continuation-mark-set?])
list?]{ list?]{
Returns a list representing an approximate ``@index["stack Returns a list representing an approximate ``@index["stack

View File

@ -79,7 +79,7 @@ used as an ephemeron key (see @secref["ephemerons"]).
(symbol-unreadable? (gensym)) (symbol-unreadable? (gensym))
(symbol-unreadable? (string->unreadable-symbol "Apple"))]} (symbol-unreadable? (string->unreadable-symbol "Apple"))]}
@defproc[(symbol->string [sym symbol?]) symbol?]{Returns a freshly @defproc[(symbol->string [sym symbol?]) string?]{Returns a freshly
allocated mutable string whose characters are the same as in allocated mutable string whose characters are the same as in
@scheme[sym]. @scheme[sym].
@ -150,7 +150,7 @@ Returns @scheme[#t] if @scheme[v] is a keyword, @scheme[#f] otherwise.}
Returns a string for the @scheme[display]ed form of @scheme[keyword], Returns a string for the @scheme[display]ed form of @scheme[keyword],
not including the leading @litchar{#:}.} not including the leading @litchar{#:}.}
@defproc[(string->keyword [str string?]) keyword]{ @defproc[(string->keyword [str string?]) keyword?]{
Returns a keyword whose @scheme[display]ed form is the same as that of Returns a keyword whose @scheme[display]ed form is the same as that of
@scheme[str], but with a leading @litchar{#:}.} @scheme[str], but with a leading @litchar{#:}.}

View File

@ -146,7 +146,6 @@ by @racket[kind], which must be one of the following:
[default-path-list (listof path?)]) [default-path-list (listof path?)])
(listof path?)]{ (listof path?)]{
Parses a string or byte string containing a list of paths, and returns Parses a string or byte string containing a list of paths, and returns
a list of path strings. Under @|AllUnix|, paths in a path list are a list of path strings. Under @|AllUnix|, paths in a path list are
separated by a @litchar{:}; under Windows, paths are separated by a separated by a @litchar{:}; under Windows, paths are separated by a
@ -598,16 +597,16 @@ for @racket[open-input-file].}
@defproc[(file->value [path path-string?] @defproc[(file->value [path path-string?]
[#:mode mode-flag (or/c 'binary 'text) 'binary]) [#:mode mode-flag (or/c 'binary 'text) 'binary])
bytes?]{ any]{
Reads a single S-expression from @racket[path] using @racket[read]. Reads a single S-expression from @racket[path] using @racket[read].
The @racket[mode-flag] argument is the same as for The @racket[mode-flag] argument is the same as for
@racket[open-input-file].} @racket[open-input-file].}
@defproc[(file->list [path path-string?] @defproc[(file->list [path path-string?]
[proc (input-port? . -> . any/c) read] [proc (input-port? . -> . any/c) read]
[#:mode mode-flag (or/c 'binary 'text) 'binary]) [#:mode mode-flag (or/c 'binary 'text) 'binary])
(listof any/c)]{ (listof any/c)]{
Repeatedly calls @racket[proc] to consume the contents of Repeatedly calls @racket[proc] to consume the contents of
@racket[path], until @racket[eof] is produced. The @racket[mode-flag] @racket[path], until @racket[eof] is produced. The @racket[mode-flag]
argument is the same as for @racket[open-input-file]. } argument is the same as for @racket[open-input-file]. }
@ -624,8 +623,8 @@ Read all characters from @racket[path], breaking them into lines. The
@racket[open-input-file].} @racket[open-input-file].}
@defproc[(file->bytes-lines [path path-string?] @defproc[(file->bytes-lines [path path-string?]
[#:mode mode-flag (or/c 'binary 'text) 'binary] [#:mode mode-flag (or/c 'binary 'text) 'binary]
[#:line-mode line-mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'any]) [#:line-mode line-mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'any])
(listof bytes?)]{ (listof bytes?)]{
Like @racket[file->lines], but reading bytes and collecting them into Like @racket[file->lines], but reading bytes and collecting them into

View File

@ -734,8 +734,8 @@ generator.}
@section-index["numbers" "little-endian"] @section-index["numbers" "little-endian"]
@section-index["numbers" "converting"] @section-index["numbers" "converting"]
@defproc[(number->string [z number?] @defproc[(number->string [z number?] [radix (or/c 2 8 10 16) 10])
[radix (or/c 2 8 10 16) 10]) string?]{ string?]{
Returns a string that is the printed form of @racket[z] Returns a string that is the printed form of @racket[z]
in the base specific by @racket[radix]. If @racket[z] is inexact, in the base specific by @racket[radix]. If @racket[z] is inexact,
@racket[radix] must be @racket[10], otherwise the @racket[radix] must be @racket[10], otherwise the
@ -801,8 +801,7 @@ least-significant eight bits, and so on.}
[size-n (or/c 2 4 8)] [size-n (or/c 2 4 8)]
[signed? any/c] [signed? any/c]
[big-endian? any/c (system-big-endian?)] [big-endian? any/c (system-big-endian?)]
[dest-bstr (and/c bytes? [dest-bstr (and/c bytes? (not/c immutable?))
(not/c immutable?))
(make-bytes size-n)] (make-bytes size-n)]
[start exact-nonnegative-integer? 0]) [start exact-nonnegative-integer? 0])
bytes?]{ bytes?]{
@ -844,9 +843,8 @@ provides the least-significant eight bits, and so on.}
@defproc[(real->floating-point-bytes [x real?] @defproc[(real->floating-point-bytes [x real?]
[size-n (or/c 4 8)] [size-n (or/c 4 8)]
[big-endian? any/c (system-big-endian?)] [big-endian? any/c (system-big-endian?)]
[dest-bstr (and/c bytes? [dest-bstr (and/c bytes? (not/c immutable?))
(not/c immutable?)) (make-bytes size-n)]
(make-bytes size-n)]
[start exact-nonnegative-integer? 0]) [start exact-nonnegative-integer? 0])
bytes?]{ bytes?]{

View File

@ -66,8 +66,7 @@ typically, however, @scheme[name] is not used for reporting errors,
since the procedure name is typically hard-wired into an internal since the procedure name is typically hard-wired into an internal
check.} check.}
@defproc[(procedure->method [proc procedure?]) @defproc[(procedure->method [proc procedure?]) procedure?]{
procedure?]{
Returns a procedure that is like @scheme[proc] except that, when applied Returns a procedure that is like @scheme[proc] except that, when applied
to the wrong number of arguments, the resulting error hides the first to the wrong number of arguments, the resulting error hides the first

View File

@ -462,11 +462,13 @@ of the generator.
(introspective-generator) (introspective-generator)
]} ]}
@defproc[(sequence->generator [s sequence?]) (-> any?)]{ Returns a generator @defproc[(sequence->generator [s sequence?]) (-> any?)]{
that returns elements from the sequence, @scheme[s], each time the generator
is invoked.}
@defproc[(sequence->repeated-generator [s sequence?]) (-> any?)]{ Returns a generator Returns a generator that returns elements from the sequence, @scheme[s],
that returns elements from the sequence, @scheme[s], similar to each time the generator is invoked.}
@scheme[sequence->generator] but looping over the values in the sequence
when no more values are left.} @defproc[(sequence->repeated-generator [s sequence?]) (-> any?)]{
Returns a generator that returns elements from the sequence, @scheme[s],
similar to @scheme[sequence->generator] but looping over the values in
the sequence when no more values are left.}

View File

@ -121,8 +121,7 @@ pair-valued @tech{syntax object} @italic{only} for parentheses in the
source. See @secref["parse-pair"] for more information.} source. See @secref["parse-pair"] for more information.}
@defproc[(syntax->list [stx syntax?]) @defproc[(syntax->list [stx syntax?]) (or/c list? #f)]{
(or/c list? #f)]{
Returns a list of @tech{syntax object}s or @scheme[#f]. The result is a list Returns a list of @tech{syntax object}s or @scheme[#f]. The result is a list
of @tech{syntax object}s when @scheme[(syntax->datum stx)] would produce a of @tech{syntax object}s when @scheme[(syntax->datum stx)] would produce a

View File

@ -125,7 +125,7 @@ result is the result of @racket[expr].}
@note-lib-only[racket/date] @note-lib-only[racket/date]
@defproc[(date->string [date date?][time? any/c #f]) string?]{ @defproc[(date->string [date date?] [time? any/c #f]) string?]{
Converts a date to a string. The returned string contains the time of Converts a date to a string. The returned string contains the time of
day only if @racket[time?]. See also @racket[date-display-format].} day only if @racket[time?]. See also @racket[date-display-format].}
@ -171,4 +171,3 @@ calculations.}
Converts a Julian number (Scalinger's off-by-one version) into a Converts a Julian number (Scalinger's off-by-one version) into a
string.} string.}

View File

@ -55,7 +55,7 @@ order.}
Returns the length of @racket[vec] (i.e., the number of slots in the Returns the length of @racket[vec] (i.e., the number of slots in the
vector).} vector).}
@defproc[(vector-ref [vec vector?][pos exact-nonnegative-integer?]) any/c]{ @defproc[(vector-ref [vec vector?] [pos exact-nonnegative-integer?]) any/c]{
Returns the element in slot @racket[pos] of @racket[vec]. The first Returns the element in slot @racket[pos] of @racket[vec]. The first
slot is position @racket[0], and the last slot is one less than slot is position @racket[0], and the last slot is one less than
@ -69,14 +69,12 @@ slot is position @racket[0], and the last slot is one less than
Updates the slot @racket[pos] of @racket[vec] to contain @racket[v].} Updates the slot @racket[pos] of @racket[vec] to contain @racket[v].}
@defproc[(vector->list [vec vector?]) @defproc[(vector->list [vec vector?]) list?]{
list?]{
Returns a list with the same length and elements as @racket[vec].} Returns a list with the same length and elements as @racket[vec].}
@defproc[(list->vector [lst list?]) @defproc[(list->vector [lst list?]) vector?]{
vector?]{
Returns a mutable vector with the same length and elements as Returns a mutable vector with the same length and elements as
@racket[lst].} @racket[lst].}

View File

@ -415,8 +415,7 @@ The tag @racket[t] refers to the content form of
The @tech{decode}d @racket[pre-content] is hyperlinked to @racket[t], The @tech{decode}d @racket[pre-content] is hyperlinked to @racket[t],
which is normally defined using @racket[elemtag].} which is normally defined using @racket[elemtag].}
@defproc[(module-path-prefix->string [mod-path module-path?]) @defproc[(module-path-prefix->string [mod-path module-path?]) string?]{
string?]{
Converts a module path to a string by resolving it to a path, and Converts a module path to a string by resolving it to a path, and
using @racket[path->main-collects-relative].} using @racket[path->main-collects-relative].}

View File

@ -115,8 +115,7 @@ The optional @racket[using-render%] argument is as for
@racket[load-xref].} @racket[load-xref].}
@defproc[(xref-tag->index-entry [xref xref?] @defproc[(xref-tag->index-entry [xref xref?] [tag tag?])
[tag tag?])
(or/c false/c entry?)]{ (or/c false/c entry?)]{
Extract an @racket[entry] structure that provides addition information Extract an @racket[entry] structure that provides addition information

View File

@ -290,4 +290,3 @@ The same as @racket[pict-last], provided for backward compatibility.}
Mainly for backward compatibility: returns @racket[(if bl-pict Mainly for backward compatibility: returns @racket[(if bl-pict
(use-last pict (or (pict-last bl-pict) bl-pict)))].} (use-last pict (or (pict-last bl-pict) bl-pict)))].}