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
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].}
@defproc[(vector->cblock [vec vector?][type type?]) any]{
@defproc[(vector->cblock [vec vector?] [type type?]) any]{
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.}
@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
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))
]}
@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?]{
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.}
@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?]{
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.}
@defproc[(ctype->layout [type ctype?]) (flat-rec-contract rep
symbol?
(listof rep))]{
@defproc[(ctype->layout [type ctype?])
(flat-rec-contract rep symbol? (listof rep))]{
Returns a value to describe the eventual C representation of the
type. It can be any of the following symbols:

View File

@ -14,8 +14,7 @@
@title{Miscellaneous}
@defproc[(begin-busy-cursor)
void?]{
@defproc[(begin-busy-cursor) void?]{
Changes the cursor to a watch cursor for all windows in the current eventspace.
Use
@ -27,30 +26,15 @@ The cursor installed by
@scheme[begin-busy-cursor] overrides any window-specific cursors installed with
@method[window<%> set-cursor].
See also
@scheme[is-busy?].
See also @scheme[is-busy?].
}
@defproc[(bell)
void?]{
@defproc[(bell) void?]{
Rings the system bell.
}
@defproc[(end-busy-cursor)
void?]{
See
@scheme[begin-busy-cursor].
@defproc[(end-busy-cursor) void?]{
See @scheme[begin-busy-cursor].
}
@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
by the
@scheme[current-text-keymap-initializer] parameter.
}
@defproc[(textual-read-eval-print-loop)
void?]{
@defproc[(textual-read-eval-print-loop) void?]{
Similar to @scheme[read-eval-print-loop], except that evaluation uses
a newly created eventspace.
@ -259,30 +240,21 @@ break is sent (via @scheme[break-thread]) to the created eventspace's
@tech{handler thread}.}
@defproc[(hide-cursor-until-moved)
void?]{
@defproc[(hide-cursor-until-moved) void?]{
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
a window in a different eventspace or application.)
}
@defproc[(is-busy?)
boolean?]{
@defproc[(is-busy?) boolean?]{
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].
}
@defproc[(label->plain-label [label string])
string]{
@defproc[(label->plain-label [label string]) string?]{
Strips shortcut ampersands from @scheme[label], removes parenthesized
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)
namespace?]{
@defproc[(make-gui-empty-namespace) namespace?]{
Like @scheme[make-base-empty-namespace], but with
@scheme[scheme/class] and @schememodname[scheme/gui/base] also
attached to the result namespace.}
@defproc[(make-gui-namespace)
namespace?]{
@defproc[(make-gui-namespace) namespace?]{
Like @scheme[make-base-namespace], but with @scheme[scheme/class] and
@schememodname[scheme/gui/base] also required into the top-level

View File

@ -32,7 +32,7 @@ magic bytes indicating a @tech{WXME}-format stream (see
@secref["editorfileformat"]), @racket[#f] otherwise.}
@defproc[(wxme-port->text-port [in input-port?] [close? any/c #t])
@defproc[(wxme-port->text-port [in input-port?] [close? any/c #t])
input-port?]{
Takes an input port whose stream starts with @tech{WXME}-format data
@ -47,11 +47,11 @@ See @secref["snipclassmapping"] for information about the kinds of
non-text content that can be read.}
@defproc[(wxme-port->port [in input-port?]
@defproc[(wxme-port->port [in input-port?]
[close? any/c #t]
[snip-filter (any/c . -> . any/c) (lambda (_x) _x)])
input-port?]{
Takes an input port whose stream starts with @tech{WXME}-format data
and returns an input port that produces text content converted to
bytes, and non-text content as ``special'' values (see

View File

@ -1091,7 +1091,6 @@ converted to a path using @racket[bytes->path].}
(or/c (listof bytes?) bytes?)))])
path?]{
The inverse of @racket[path->main-collects-relative]: if @racket[rel]
is a pair that starts with @racket['collects], then it is converted
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?])
(and/c bytes?
immutable?)]{
(and/c bytes? immutable?)]{
Returns an immutable byte string with the same content
as @scheme[bstr], returning @scheme[bstr] itself if @scheme[bstr] is
immutable.

View File

@ -77,7 +77,7 @@ other words, it produces the same value as
prompt-tag)
]}
@defproc[(continuation-mark-set->list
@defproc[(continuation-mark-set->list
[mark-set continuation-mark-set?]
[key-v any/c]
[prompt-tag continuation-prompt-tag? (default-continuation-prompt-tag)])
@ -88,7 +88,7 @@ in @racket[mark-set], which is a set of marks returned by
the first point, if any, where continuation frames were originally
separated by a prompt tagged with @racket[prompt-tag]..}
@defproc[(continuation-mark-set->list*
@defproc[(continuation-mark-set->list*
[mark-set continuation-mark-set?]
[key-list (listof any/c)]
[none-v any/c #f]
@ -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[#f] otherwise.}
@defproc[(continuation-mark-set->context
[mark-set continuation-mark-set?])
@defproc[(continuation-mark-set->context [mark-set continuation-mark-set?])
list?]{
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? (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
@scheme[sym].
@ -98,7 +98,7 @@ used as an ephemeron key (see @secref["ephemerons"]).
@tech{uninterned} symbol. Calling @scheme[string->uninterned-symbol]
twice with the same @scheme[str] returns two distinct symbols.
@examples[(string->uninterned-symbol "Apple")
@examples[(string->uninterned-symbol "Apple")
(eq? 'a (string->uninterned-symbol "a"))
(eq? (string->uninterned-symbol "a")
(string->uninterned-symbol "a"))]}
@ -110,7 +110,7 @@ used as an ephemeron key (see @secref["ephemerons"]).
twice with equivalent @scheme[str]s returns the same symbol, but
@scheme[read] never produces the symbol.
@examples[(string->unreadable-symbol "Apple")
@examples[(string->unreadable-symbol "Apple")
(eq? 'a (string->unreadable-symbol "a"))
(eq? (string->unreadable-symbol "a")
(string->unreadable-symbol "a"))]}
@ -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],
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
@scheme[str], but with a leading @litchar{#:}.}

View File

@ -145,7 +145,6 @@ by @racket[kind], which must be one of the following:
@defproc[(path-list-string->path-list [str (or/c string? bytes?)]
[default-path-list (listof path?)])
(listof path?)]{
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
@ -587,7 +586,7 @@ bound through @racket[define-runtime-module-path].}
Reads all characters from @racket[path] and returns them as a string.
The @racket[mode-flag] argument is the same as for
@racket[open-input-file].}
@defproc[(file->bytes [path path-string?]
[#:mode mode-flag (or/c 'binary 'text) 'binary])
bytes?]{
@ -598,16 +597,16 @@ for @racket[open-input-file].}
@defproc[(file->value [path path-string?]
[#:mode mode-flag (or/c 'binary 'text) 'binary])
bytes?]{
any]{
Reads a single S-expression from @racket[path] using @racket[read].
The @racket[mode-flag] argument is the same as for
@racket[open-input-file].}
@defproc[(file->list [path path-string?]
[proc (input-port? . -> . any/c) read]
[#:mode mode-flag (or/c 'binary 'text) 'binary])
(listof any/c)]{
@defproc[(file->list [path path-string?]
[proc (input-port? . -> . any/c) read]
[#:mode mode-flag (or/c 'binary 'text) 'binary])
(listof any/c)]{
Repeatedly calls @racket[proc] to consume the contents of
@racket[path], until @racket[eof] is produced. The @racket[mode-flag]
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].}
@defproc[(file->bytes-lines [path path-string?]
[#:mode mode-flag (or/c 'binary 'text) 'binary]
[#:line-mode line-mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'any])
[#:mode mode-flag (or/c 'binary 'text) 'binary]
[#:line-mode line-mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'any])
(listof bytes?)]{
Like @racket[file->lines], but reading bytes and collecting them into

View File

@ -381,7 +381,7 @@ Like @racket[dynamic-require], but in a @tech{phase} that is @math{1}
more than the namespace's @tech{base phase}.}
@defproc[(module->language-info
@defproc[(module->language-info
[mod (or/c module-path? path? resolved-module-path?)]
[load? any/c #f])
(or/c #f (vector/c module-path? symbol? any/c))]{

View File

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

View File

@ -70,7 +70,7 @@ single path element.
See also @racket[string->some-system-path].}
@defproc[(bytes->path [bstr bytes?]
[type (or/c 'unix 'windows) (system-path-convention-type)])
[type (or/c 'unix 'windows) (system-path-convention-type)])
path?]{
Produces a path (for some platform) whose byte-string name is

View File

@ -65,10 +65,9 @@ produced by @scheme[define-struct],
typically, however, @scheme[name] is not used for reporting errors,
since the procedure name is typically hard-wired into an internal
check.}
@defproc[(procedure->method [proc procedure?])
procedure?]{
@defproc[(procedure->method [proc procedure?]) procedure?]{
Returns a procedure that is like @scheme[proc] except that, when applied
to the wrong number of arguments, the resulting error hides the first
argument as if the procedure had been compiled with the

View File

@ -462,11 +462,13 @@ of the generator.
(introspective-generator)
]}
@defproc[(sequence->generator [s sequence?]) (-> any?)]{ Returns a generator
that returns elements from the sequence, @scheme[s], each time the generator
is invoked.}
@defproc[(sequence->generator [s sequence?]) (-> any?)]{
@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.}
Returns a generator that returns elements from the sequence, @scheme[s],
each time the generator is invoked.}
@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

@ -531,7 +531,7 @@ supplied @racket[v]s, the @exnraise[exn:fail:contract].
(make-prefab-struct '(clown 1 (1 #f) #(0)) "Binky" "pie")
]}
@defproc[(prefab-key->struct-type [key (or/c symbol? list?)]
@defproc[(prefab-key->struct-type [key (or/c symbol? list?)]
[field-count (integer-in 0 32768)])
struct-type?]{

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.}
@defproc[(syntax->list [stx syntax?])
(or/c list? #f)]{
@defproc[(syntax->list [stx syntax?]) (or/c list? #f)]{
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

View File

@ -125,7 +125,7 @@ result is the result of @racket[expr].}
@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
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
string.}

View File

@ -55,7 +55,7 @@ order.}
Returns the length of @racket[vec] (i.e., the number of slots in the
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
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].}
@defproc[(vector->list [vec vector?])
list?]{
@defproc[(vector->list [vec vector?]) list?]{
Returns a list with the same length and elements as @racket[vec].}
@defproc[(list->vector [lst list?])
vector?]{
@defproc[(list->vector [lst list?]) vector?]{
Returns a mutable vector with the same length and elements as
@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],
which is normally defined using @racket[elemtag].}
@defproc[(module-path-prefix->string [mod-path module-path?])
string?]{
@defproc[(module-path-prefix->string [mod-path module-path?]) string?]{
Converts a module path to a string by resolving it to a path, and
using @racket[path->main-collects-relative].}

View File

@ -115,8 +115,7 @@ The optional @racket[using-render%] argument is as for
@racket[load-xref].}
@defproc[(xref-tag->index-entry [xref xref?]
[tag tag?])
@defproc[(xref-tag->index-entry [xref xref?] [tag tag?])
(or/c false/c entry?)]{
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
(use-last pict (or (pict-last bl-pict) bl-pict)))].}