fix '(nonnegative|positive)-exact-integer?' contracts (moving 'exact-' to the front where it belongs)

svn: r10960
This commit is contained in:
Matthew Flatt 2008-07-29 12:56:05 +00:00
parent 21e3f5f6c5
commit 2c813c53c5
68 changed files with 545 additions and 545 deletions

View File

@ -318,7 +318,7 @@ the current state of the text field.}
'vertical-label 'horizontal-label
'deleted))
'(vertical)]
[selection nonnegative-exact-integer? 0]
[selection exact-nonnegative-integer? 0]
[font (is-a?/c font%) normal-control-font]
[enabled any/c #t]
[vert-margin (integer-in 0 1000) 2]
@ -345,7 +345,7 @@ the currently selected element in the radio box.}
[style (listof (one-of/c 'horizontal-label 'vertical-label
'deleted))
null]
[selection nonnegative-exact-integer? 0]
[selection exact-nonnegative-integer? 0]
[font (is-a?/c font%) @scheme[normal-control-font]]
[enabled any/c #t]
[vert-margin (integer-in 0 1000) 2]
@ -373,7 +373,7 @@ the currently selected element in the choice control.}
'vertical-label 'horizontal-label
'deleted))
'(single)]
[selection (or/c nonnegative-exact-integer? false/c) #f]
[selection (or/c exact-nonnegative-integer? false/c) #f]
[font (is-a?/c font%) @scheme[view-control-font]]
[label-font (is-a?/c font%) @scheme[normal-control-font]]
[enabled any/c #t]

View File

@ -12,8 +12,8 @@ module provides a toolbox for creating cards games.}
@section{Creating Tables and Cards}
@defproc[(make-table [title string? "Cards"]
[w nonnegative-exact-integer? 7]
[h nonnegative-exact-integer? 3])
[w exact-nonnegative-integer? 7]
[h exact-nonnegative-integer? 3])
table<%>]{
Returns a table. The table is named by @scheme[title], and it is
@ -153,7 +153,7 @@ Create an instance with @scheme[make-table].
@defmethod[(add-cards [cards (listof (is-a?/c card<%>))]
[x real?]
[y real?]
[offset-proc (nonnegative-exact-integer?
[offset-proc (exact-nonnegative-integer?
. -> . (values real? real?))
(lambda (i) (values 0 0))])
void?]{
@ -196,7 +196,7 @@ Removes @scheme[card] from the table.}
@defmethod[(move-cards [cards (listof (is-a?/c card<%>))]
[x real?]
[y real?]
[offset-proc (nonnegative-exact-integer? . -> . (values real? real?))
[offset-proc (exact-nonnegative-integer? . -> . (values real? real?))
(lambda (i) (values 0 0))])
void?]{
@ -251,8 +251,8 @@ Removes @scheme[card] from the table.}
Returns a list of all cards on the table in stacking order from front
to back.}
@defmethod*[([(table-width) nonnegative-exact-integer?]
[(table-height) nonnegative-exact-integer?])]{
@defmethod*[([(table-width) exact-nonnegative-integer?]
[(table-height) exact-nonnegative-integer?])]{
Returns the width/height of the table in pixels.}
@ -382,12 +382,12 @@ Removes @scheme[card] from the table.}
Create instances with @scheme[make-deck] or @scheme[make-card].
@defmethod[(card-width) nonnegative-exact-integer?]{
@defmethod[(card-width) exact-nonnegative-integer?]{
Returns the width of the card in pixels. All cards have the same
width.}
@defmethod[(card-height) nonnegative-exact-integer?]{
@defmethod[(card-height) exact-nonnegative-integer?]{
Returns the height of the card in pixels. All cards have the same
height.}

View File

@ -16,8 +16,8 @@ The library also re-exports: @scheme[pregexp], and it re-exports
@deftogether[(
@defproc[(pregexp-match [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f]
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
[output-port (or/c output-port? false/c) #f])
(or/c (listof (or/c (cons (or/c string? bytes?)
(or/c string? bytes?))
@ -25,17 +25,17 @@ The library also re-exports: @scheme[pregexp], and it re-exports
false/c)]
@defproc[(pregexp-match-positions [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f]
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
[output-port (or/c output-port? false/c) #f])
(or/c (listof (or/c (cons nonnegative-exact-integer?
nonnegative-exact-integer?)
(or/c (listof (or/c (cons exact-nonnegative-integer?
exact-nonnegative-integer?)
false/c))
false/c)]
@defproc[(pregexp-split [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f])
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f])
(listof (or/c string? bytes?))]
@defproc[(pregexp-replace [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes?)]

View File

@ -26,9 +26,9 @@ See also @scheme[tcp-redirect] and @scheme[make-ssl-tcp@].
@defsignature[tcp^ ()]{
@defproc[(tcp-listen [port-no (and/c nonnegative-exact-integer?
@defproc[(tcp-listen [port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))]
[max-allow-wait nonnegative-exact-integer? 4]
[max-allow-wait exact-nonnegative-integer? 4]
[reuse? any/c #f]
[hostname (or/c string? false/c) #f])
#, @sigelem[tcp^ tcp-listener?]]{
@ -36,10 +36,10 @@ See also @scheme[tcp-redirect] and @scheme[make-ssl-tcp@].
Like @scheme[tcp-listen] from @schememodname[scheme/tcp].}
@defproc[(tcp-connect [hostname string?]
[port-no (and/c nonnegative-exact-integer?
[port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))]
[local-hostname (or/c string? false/c) #f]
[local-port-no (or/c (and/c nonnegative-exact-integer?
[local-port-no (or/c (and/c exact-nonnegative-integer?
(integer-in 1 65535))
false/c)
#f])
@ -48,10 +48,10 @@ Like @scheme[tcp-listen] from @schememodname[scheme/tcp].}
Like @scheme[tcp-connect] from @schememodname[scheme/tcp].}
@defproc[(tcp-connect/enable-break [hostname string?]
[port-no (and/c nonnegative-exact-integer?
[port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))]
[local-hostname (or/c string? false/c) #f]
[local-port-no (or/c (and/c nonnegative-exact-integer?
[local-port-no (or/c (and/c exact-nonnegative-integer?
(integer-in 1 65535))
false/c)])
(values input-port? output-port?)]{

View File

@ -126,7 +126,7 @@ Returns @scheme[#t] if @scheme[v] is a value produced by
@defproc[(ssl-listen
(port-no (integer-in 1 65535))
[queue-k nonnegative-exact-integer?]
[queue-k exact-nonnegative-integer?]
[reuse? any/c #f]
[hostname-or-#f (or/c string? false/c) #f]
[server-protocol

View File

@ -110,7 +110,7 @@ The default value of this parameter is therefore @scheme[#t], making
it mimic plain I/O interactions.}
@defparam[max-history n nonnegative-exact-integer?]{
@defparam[max-history n exact-nonnegative-integer?]{
A parameter that determines the number of history entries to save,
defaults to @scheme[100].}
@ -194,7 +194,7 @@ the user via the up-arrow key.}
Adds the given byte string to the @|readline| history, which is
accessible to the user via the up-arrow key.}
@defproc[(history-length) nonnegative-exact-integer?]{
@defproc[(history-length) exact-nonnegative-integer?]{
Returns the length of the history list.}

View File

@ -56,7 +56,7 @@ Like @scheme[list->cblock], but for Scheme vectors.}
@declare-exporting[scribblings/foreign/unsafe-foreign]
@defproc[(cblock->list [cblock any/c][type ctype?][length nonnegative-exact-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
@ -65,7 +65,7 @@ Scheme 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 nonnegative-exact-integer?])
@defproc[(cblock->vector [cblock any/c][type ctype?][length exact-nonnegative-integer?])
vector?]{
Like @scheme[cblock->vector], but for Scheme vectors.}

View File

@ -127,20 +127,20 @@ easily lead to a segmentation fault or memory corruption.}
@defproc*[([(memmove [cptr cpointer?]
[src-cptr cpointer?]
[count nonnegative-exact-integer?]
[count exact-nonnegative-integer?]
[type ctype? _byte])
void?]
[(memmove [cptr cpointer?]
[offset exact-integer?]
[src-cptr cpointer?]
[count nonnegative-exact-integer?]
[count exact-nonnegative-integer?]
[type ctype? _byte])
void?]
[(memmove [cptr cpointer?]
[offset exact-integer?]
[src-cptr cpointer?]
[src-offset exact-integer?]
[count nonnegative-exact-integer?]
[count exact-nonnegative-integer?]
[type ctype? _byte])
void?])]{
@ -153,20 +153,20 @@ instances when supplied.}
@defproc*[([(memcpy [cptr cpointer?]
[src-cptr cpointer?]
[count nonnegative-exact-integer?]
[count exact-nonnegative-integer?]
[type ctype? _byte])
void?]
[(memcpy [cptr cpointer?]
[offset exact-integer?]
[src-cptr cpointer?]
[count nonnegative-exact-integer?]
[count exact-nonnegative-integer?]
[type ctype? _byte])
void?]
[(memcpy [cptr cpointer?]
[offset exact-integer?]
[src-cptr cpointer?]
[src-offset exact-integer?]
[count nonnegative-exact-integer?]
[count exact-nonnegative-integer?]
[type ctype? _byte])
void?])]{
@ -175,13 +175,13 @@ and source overlap.}
@defproc*[([(memset [cptr cpointer?]
[byte byte?]
[count nonnegative-exact-integer?]
[count exact-nonnegative-integer?]
[type ctype? _byte])
void?]
[(memset [cptr cpointer?]
[offset exact-integer?]
[byte byte?]
[count nonnegative-exact-integer?]
[count exact-nonnegative-integer?]
[type ctype? _byte])
void?])]{

View File

@ -32,14 +32,14 @@ Returns @scheme[#t] if @scheme[v] is a @tech{C type}, @scheme[#f]
otherwise.}
@defproc*[([(ctype-sizeof [type ctype?]) nonnegative-exact-integer?]
[(ctype-alignof [ctype ctype?]) nonnegative-exact-integer?])]{
@defproc*[([(ctype-sizeof [type ctype?]) exact-nonnegative-integer?]
[(ctype-alignof [ctype ctype?]) exact-nonnegative-integer?])]{
Returns the size or alignment of a given @scheme[type] for the current
platform.}
@defproc[(compiler-sizeof [sym symbol?]) nonnegative-exact-integer?]{
@defproc[(compiler-sizeof [sym symbol?]) exact-nonnegative-integer?]{
Possible values for @scheme[symbol] are @scheme['int], @scheme['char],
@scheme['short], @scheme['long], @scheme['*], @scheme['void],

View File

@ -149,7 +149,7 @@
See
@method[text:basic<%> set-styles-fixed].
}
@defmethod*[#:mode augment (((after-insert (start nonnegative-exact-integer?) (len nonnegative-exact-integer?)) void))]{
@defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void))]{
See
@method[text:basic<%> set-styles-fixed].
@ -209,7 +209,7 @@
Starts an edit-sequence by calling
@method[editor<%> begin-edit-sequence].
}
@defmethod*[#:mode augment (((after-insert (start nonnegative-exact-integer?) (len nonnegative-exact-integer?)) void))]{
@defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void))]{
Replaces all non-breaking space characters
@scheme[(integer->char 160)]
@ -255,10 +255,10 @@
@scheme[keymap:get-search]
}
@defmethod[#:mode augment (after-insert [start nonnegative-exact-integer?][len nonnegative-exact-integer?]) void?]{
@defmethod[#:mode augment (after-insert [start exact-nonnegative-integer?][len exact-nonnegative-integer?]) void?]{
Re-does any search now that the contents of the window have changed.
}
@defmethod[#:mode augment (after-delete [start nonnegative-exact-integer?][len nonnegative-exact-integer?]) void?]{
@defmethod[#:mode augment (after-delete [start exact-nonnegative-integer?][len exact-nonnegative-integer?]) void?]{
Re-does any search now that the contents of the window have changed.
}
@ -512,7 +512,7 @@
@scheme[top-level-window<%>]
as the frame.
}
@defmethod*[#:mode augment (((after-insert (start nonnegative-exact-integer?) (len nonnegative-exact-integer?)) void))]{
@defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void))]{
Calls the
@method[frame:text-info<%> editor-position-changed]
@ -522,7 +522,7 @@
@scheme[top-level-window<%>]
as the frame.
}
@defmethod*[#:mode augment (((after-delete (start nonnegative-exact-integer?) (len nonnegative-exact-integer?)) void))]{
@defmethod*[#:mode augment (((after-delete (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void))]{
Calls the
@method[frame:text-info<%> editor-position-changed]

View File

@ -61,7 +61,7 @@ the bitmap is selected into another DC, attached as a button label, etc.).
}
@defmethod[(get-depth)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Gets the color depth of the bitmap. See also @method[bitmap%
is-color?].

View File

@ -25,7 +25,7 @@ See also
[style (listof (one-of/c 'horizontal-label 'vertical-label
'deleted))
null]
[selection nonnegative-exact-integer? 0]
[selection exact-nonnegative-integer? 0]
[font (is-a?/c font%) normal-control-font]
[enabled any/c #t]
[vert-margin (integer-in 0 1000) 2]

View File

@ -364,7 +364,7 @@ See also @method[dc<%> set-smoothing] for information on the
[x real?]
[y real?]
[combine? any/c #f]
[offset nonnegative-exact-integer? 0]
[offset exact-nonnegative-integer? 0]
[angle real? 0])
void?]{
@ -557,7 +557,7 @@ set-text-background].
@defmethod[(get-text-extent [string string?]
[font (or/c (is-a?/c font%) false/c) #f]
[combine? any/c #f]
[offset nonnegative-exact-integer? 0])
[offset exact-nonnegative-integer? 0])
(values nonnegative-real?
nonnegative-real?
nonnegative-real?

View File

@ -377,9 +377,9 @@ If @scheme[style] includes @scheme['password], the dialog's text field
[message (or/c string? false/c)]
[choices (listof string?)]
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%) false/c) #f]
[init-choices (listof nonnegative-exact-integer?) null]
[init-choices (listof exact-nonnegative-integer?) null]
[style (listof (one-of/c 'single 'multiple 'extended)) '(single)])
(or/c (listof nonnegative-exact-integer?) false/c)]{
(or/c (listof exact-nonnegative-integer?) false/c)]{
Gets a list box selection from the user via a modal dialog, using
@scheme[parent] as the parent window if it is specified. The dialog's

View File

@ -25,12 +25,12 @@ Finds a snip data class from the list with the given name, returning
}
@defmethod[(find-position [class (is-a?/c editor-data-class%)])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns an index into the list for the specified class.
}
@defmethod[(nth [n nonnegative-exact-integer?])
@defmethod[(nth [n exact-nonnegative-integer?])
(or/c (is-a?/c editor-data-class%) false/c)]{
Returns the @scheme[n]th class in the list (counting from 0), returning
@scheme[#f] if the list has @scheme[n] or less classes.
@ -38,7 +38,7 @@ Returns the @scheme[n]th class in the list (counting from 0), returning
}
@defmethod[(number)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the number of editor data classes in the list.

View File

@ -209,8 +209,8 @@ Opens @scheme[filename] (in @scheme['binary] mode) and checks whether it looks
}
@defproc[(open-input-text-editor [text-editor (is-a?/c text%)]
[start-position nonnegative-exact-integer? 0]
[end-position (or/c nonnegative-exact-integer? (one/of 'end)) 'end]
[start-position exact-nonnegative-integer? 0]
[end-position (or/c exact-nonnegative-integer? (one/of 'end)) 'end]
[snip-filter ((is-a?/c snip%) . -> . any/c) (lambda (s) s)]
[port-name any/c @scheme[text-editor]]
[expect-to-read-all? any/c #f])
@ -257,7 +257,7 @@ The result port must not be used if @scheme[text-editor] changes in any
}
@defproc[(open-output-text-editor [text-editor (is-a?/c text%)]
[start-position (or/c nonnegative-exact-integer? (one/of 'end)) 'end]
[start-position (or/c exact-nonnegative-integer? (one/of 'end)) 'end]
[special-filter (any/c . -> . any/c) (lambda (x) x)]
[port-name any/c @scheme[text-editor]])
output-port]{

View File

@ -543,7 +543,7 @@ The first snip in a text editor is the one at @techlink{position}
}
@defmethod[(find-scroll-line [location real?])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Maps a vertical @techlink{location} within the editor to a vertical
scroll position.
@ -1215,7 +1215,7 @@ The @scheme[localx], @scheme[localy], @scheme[width], and @scheme[height]
@defmethod[(num-scroll-lines)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Reports the number of scroll positions available within the editor.
@ -2206,7 +2206,7 @@ Setting the height is disallowed when the editor is internally locked
}
@defmethod[(set-max-undo-history [count (or/c nonnegative-exact-integer? (one/of 'forever))])
@defmethod[(set-max-undo-history [count (or/c exact-nonnegative-integer? (one/of 'forever))])
void?]{
Sets the maximum number of undoables that will be remembered by the

View File

@ -11,14 +11,14 @@ An @scheme[editor-snip%] object is a @scheme[snip%] object that
@defconstructor[([editor (or/c (is-a?/c text%) false/c) #f]
[with-border? any/c #t]
[left-margin nonnegative-exact-integer? 5]
[top-margin nonnegative-exact-integer? 5]
[right-margin nonnegative-exact-integer? 5]
[bottom-margin nonnegative-exact-integer? 5]
[left-inset nonnegative-exact-integer? 1]
[top-inset nonnegative-exact-integer? 1]
[right-inset nonnegative-exact-integer? 1]
[bottom-inset nonnegative-exact-integer? 1]
[left-margin exact-nonnegative-integer? 5]
[top-margin exact-nonnegative-integer? 5]
[right-margin exact-nonnegative-integer? 5]
[bottom-margin exact-nonnegative-integer? 5]
[left-inset exact-nonnegative-integer? 1]
[top-inset exact-nonnegative-integer? 1]
[right-inset exact-nonnegative-integer? 1]
[bottom-inset exact-nonnegative-integer? 1]
[min-width (or/c (and/c real? (not/c negative?)) (one/of 'none)) 'none]
[max-width (or/c (and/c real? (not/c negative?)) (one/of 'none)) 'none]
[min-height (or/c (and/c real? (not/c negative?)) (one/of 'none)) 'none]
@ -120,10 +120,10 @@ If the editor is a text editor, then @scheme[1] is normally subtracted
}
@defmethod[(get-inset [l (box/c nonnegative-exact-integer?)]
[t (box/c nonnegative-exact-integer?)]
[r (box/c nonnegative-exact-integer?)]
[b (box/c nonnegative-exact-integer?)])
@defmethod[(get-inset [l (box/c exact-nonnegative-integer?)]
[t (box/c exact-nonnegative-integer?)]
[r (box/c exact-nonnegative-integer?)]
[b (box/c exact-nonnegative-integer?)])
void?]{
Gets the current border insets for the snip. The inset sets how much space
@ -137,10 +137,10 @@ is left between the edge of the snip and the border.
}
@defmethod[(get-margin [l (box/c nonnegative-exact-integer?)]
[t (box/c nonnegative-exact-integer?)]
[r (box/c nonnegative-exact-integer?)]
[b (box/c nonnegative-exact-integer?)])
@defmethod[(get-margin [l (box/c exact-nonnegative-integer?)]
[t (box/c exact-nonnegative-integer?)]
[r (box/c exact-nonnegative-integer?)]
[b (box/c exact-nonnegative-integer?)])
void?]{
Gets the current margins for the snip. The margin sets how much space
@ -244,10 +244,10 @@ When an @scheme[editor-snip%] object is not inserted in an editor, it
}
@defmethod[(set-inset [l nonnegative-exact-integer?]
[t nonnegative-exact-integer?]
[r nonnegative-exact-integer?]
[b nonnegative-exact-integer?])
@defmethod[(set-inset [l exact-nonnegative-integer?]
[t exact-nonnegative-integer?]
[r exact-nonnegative-integer?]
[b exact-nonnegative-integer?])
void?]{
Sets the current border insets for the snip. The inset sets how much
@ -256,10 +256,10 @@ Sets the current border insets for the snip. The inset sets how much
}
@defmethod[(set-margin [l nonnegative-exact-integer?]
[t nonnegative-exact-integer?]
[r nonnegative-exact-integer?]
[b nonnegative-exact-integer?])
@defmethod[(set-margin [l exact-nonnegative-integer?]
[t exact-nonnegative-integer?]
[r exact-nonnegative-integer?]
[b exact-nonnegative-integer?])
void?]{
Sets the current margins for the snip. The margin sets how much space

View File

@ -22,7 +22,7 @@ Returns @scheme[#t] if there has been an error reading from the
}
@defmethod[(read [data (and/c bytes? (not/c immutable?))])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Reads characters to fill the supplied vector. The return value is the
number of characters read, which may be less than the number
@ -33,14 +33,14 @@ Reads characters to fill the supplied vector. The return value is the
}
@defmethod[(seek [pos nonnegative-exact-integer?])
@defmethod[(seek [pos exact-nonnegative-integer?])
void?]{
Moves to the specified absolute position in the stream.
}
@defmethod[(skip [n nonnegative-exact-integer?])
@defmethod[(skip [n exact-nonnegative-integer?])
void?]{
Skips past the next @scheme[n] characters in the stream.
@ -48,7 +48,7 @@ Skips past the next @scheme[n] characters in the stream.
}
@defmethod[(tell)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the current stream position.

View File

@ -30,7 +30,7 @@ Reading from a bad stream always gives @scheme[0].
}
@defmethod[(get-bytes [len (or/c (box/c nonnegative-exact-integer?) false/c) #f])
@defmethod[(get-bytes [len (or/c (box/c exact-nonnegative-integer?) false/c) #f])
(or/c bytes? false/c)]{
Like @method[editor-stream-in% get-unterminated-bytes], but the last
@ -69,7 +69,7 @@ Returns the next floating-point value in the stream.
}
@defmethod[(get-unterminated-bytes [len (or/c (box/c nonnegative-exact-integer?) false/c) #f])
@defmethod[(get-unterminated-bytes [len (or/c (box/c exact-nonnegative-integer?) false/c) #f])
(or/c bytes? false/c)]{
Returns the next byte string from the stream. Reading from a bad
@ -83,7 +83,7 @@ Note that when @method[editor-stream-out% put] is not given a byte
}
@defmethod[(jump-to [pos nonnegative-exact-integer?])
@defmethod[(jump-to [pos exact-nonnegative-integer?])
void?]{
Jumps to a given position in the stream.
@ -105,7 +105,7 @@ See @method[editor-stream-in% set-boundary].
}
@defmethod[(set-boundary [n nonnegative-exact-integer?])
@defmethod[(set-boundary [n exact-nonnegative-integer?])
void?]{
Sets a file-reading boundary at @scheme[n] bytes past the current
@ -122,7 +122,7 @@ Boundaries help keep a subroutine from reading too much data leading
}
@defmethod[(skip [n nonnegative-exact-integer?])
@defmethod[(skip [n exact-nonnegative-integer?])
void?]{
Skips past the next @scheme[n] bytes in the stream.
@ -130,7 +130,7 @@ Skips past the next @scheme[n] bytes in the stream.
}
@defmethod[(tell)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the current stream position.

View File

@ -22,7 +22,7 @@ Returns @scheme[#t] if there has been an error writing to the stream,
}
@defmethod[(seek [pos nonnegative-exact-integer?])
@defmethod[(seek [pos exact-nonnegative-integer?])
void?]{
Moves to the specified absolute position in the stream.
@ -30,7 +30,7 @@ Moves to the specified absolute position in the stream.
}
@defmethod[(tell)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the current stream position.

View File

@ -18,7 +18,7 @@ An out-stream base---possibly an
}
@defmethod[(jump-to [pos nonnegative-exact-integer?])
@defmethod[(jump-to [pos exact-nonnegative-integer?])
void?]{
Jumps to a given position in the stream.
@ -49,7 +49,7 @@ This method is called by @scheme[write-editor-global-header].
}
@defmethod*[([(put [n nonnegative-exact-integer?]
@defmethod*[([(put [n exact-nonnegative-integer?]
[v bytes?])
(is-a?/c editor-stream-out%)]
[(put [v bytes?])
@ -90,7 +90,7 @@ Numbers written to a stream with @method[editor-stream-out% put-fixed]
}
@defmethod[(tell)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the current stream position.

View File

@ -13,14 +13,14 @@ Under X and Mac OS X, flushes pending display messages such that the
}
@defproc[(get-display-depth)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the depth of the main display (a value of 1 denotes a monochrome display).
}
@defproc[(get-display-left-top-inset [avoid-bars? bool @scheme[#f]])
(values nonnegative-exact-integer? nonnegative-exact-integer?)]{
(values exact-nonnegative-integer? exact-nonnegative-integer?)]{
When the optional argument is @scheme[#f] (the default), this function
returns the offset of the main screen's origin from the
@ -36,7 +36,7 @@ When the optional argument is true, this function returns the amount
}
@defproc[(get-display-size [full-screen? bool @scheme[#f]])
(values nonnegative-exact-integer? nonnegative-exact-integer?)]{
(values exact-nonnegative-integer? exact-nonnegative-integer?)]{
@index["screen resolution"]{Gets} the physical size of the display in
pixels. Under Windows, this size does not include the task bar by

View File

@ -32,7 +32,7 @@ See also @scheme[choice%].
'vertical-label 'horizontal-label
'deleted))
'(single)]
[selection (or/c nonnegative-exact-integer? false/c) #f]
[selection (or/c exact-nonnegative-integer? false/c) #f]
[font (is-a?/c font%) view-control-font]
[label-font (is-a?/c font%) normal-control-font]
[enabled any/c #t]
@ -110,7 +110,7 @@ See also @xmethod[list-control<%> append].
}
@defmethod[(delete [n nonnegative-exact-integer?])
@defmethod[(delete [n exact-nonnegative-integer?])
void?]{
Deletes the item indexed by @scheme[n]. @|lbnumnote| If @scheme[n] is equal
@ -121,7 +121,7 @@ Selected items that are not deleted remain selected, and no other
}
@defmethod[(get-data [n nonnegative-exact-integer?])
@defmethod[(get-data [n exact-nonnegative-integer?])
any/c]{
Returns the data for the item indexed by @scheme[n], or @scheme[#f]
@ -135,7 +135,7 @@ See also @method[list-box% append] and @method[list-box% set-data].
@defmethod[(get-first-visible-item)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Reports the index of the item currently scrolled to the top of the
list box. @|lbnumnote|
@ -151,7 +151,7 @@ Returns the font used for the control's label, which is optionally
}
@defmethod[(get-selections)
(listof nonnegative-exact-integer?)]{
(listof exact-nonnegative-integer?)]{
Returns a list of indices for all currently selected items.
@|lbnumnote|
@ -162,7 +162,7 @@ For single-selection lists, the result is always either @scheme[null] or
}
@defmethod[(is-selected? [n nonnegative-exact-integer?])
@defmethod[(is-selected? [n exact-nonnegative-integer?])
boolean?]{
Returns @scheme[#t] if the item index by @scheme[n] is selected,
@ -175,7 +175,7 @@ Returns @scheme[#t] if the item index by @scheme[n] is selected,
}
@defmethod[(number-of-visible-items)
positive-exact-integer?]{
exact-positive-integer?]{
Returns the maximum number of items in the list box that are visible
to the user with the control's current size (rounding down if the
@ -183,7 +183,7 @@ Returns the maximum number of items in the list box that are visible
}
@defmethod[(select [n nonnegative-exact-integer?]
@defmethod[(select [n exact-nonnegative-integer?]
[select? any/c #t])
void?]{
@ -212,7 +212,7 @@ Clears the list box and installs a new list of items.
}
@defmethod[(set-data [n nonnegative-exact-integer?]
@defmethod[(set-data [n exact-nonnegative-integer?]
[data any/c])
void?]{
@ -225,7 +225,7 @@ See also @method[list-box% append].
}
@defmethod[(set-first-visible-item [n nonnegative-exact-integer?])
@defmethod[(set-first-visible-item [n exact-nonnegative-integer?])
void?]{
Scrolls the list box so that the item indexed by @scheme[n] is at the
@ -238,7 +238,7 @@ Scrolls the list box so that the item indexed by @scheme[n] is at the
}
@defmethod[(set-string [n nonnegative-exact-integer?]
@defmethod[(set-string [n exact-nonnegative-integer?]
[label label-string?])
void?]{

View File

@ -37,7 +37,7 @@ Removes all user-selectable items from the control.
}
@defmethod[(find-string [s string])
(or/c nonnegative-exact-integer? false/c)]{
(or/c exact-nonnegative-integer? false/c)]{
Finds a user-selectable item matching the given string. If no matching
choice is found, @scheme[#f] is returned, otherwise the index of the
matching choice is returned (items are indexed from @scheme[0]).
@ -45,14 +45,14 @@ Finds a user-selectable item matching the given string. If no matching
}
@defmethod[(get-number)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the number of user-selectable items in the control (which is
also one more than the greatest index in the list control).
}
@defmethod[(get-selection)
(or/c nonnegative-exact-integer? false/c)]{
(or/c exact-nonnegative-integer? false/c)]{
Returns the index of the currently selected item (items are indexed
from @scheme[0]). If the choice item currently contains no choices or no
selections, @scheme[#f] is returned. If multiple selections are
@ -61,7 +61,7 @@ Returns the index of the currently selected item (items are indexed
}
@defmethod[(get-string [n nonnegative-exact-integer?])
@defmethod[(get-string [n exact-nonnegative-integer?])
(and/c immutable? label-string?)]{
Returns the item for the given index (items are indexed from
@ -79,7 +79,7 @@ Returns the currently selected item. If the control currently
}
@defmethod[(set-selection [n nonnegative-exact-integer?])
@defmethod[(set-selection [n exact-nonnegative-integer?])
void?]{
Selects the item specified by the given index (items are indexed from
@scheme[0]). If the given index larger than the greatest index in the

View File

@ -188,8 +188,8 @@ See also @scheme[write-resource].}
@defproc[(get-window-text-extent [string string]
[font (is-a?/c font%)]
[combine? any/c #f])
(values nonnegative-exact-integer?
nonnegative-exact-integer?)]{
(values exact-nonnegative-integer?
exact-nonnegative-integer?)]{
Returns the pixel size of a string drawn as a window's label or value
when drawn with the given font. The optional @scheme[combine?]

View File

@ -168,8 +168,8 @@ Sets the printer command used to print a file under X. See
}
@defmethod[(set-editor-margin [h nonnegative-exact-integer?]
[v nonnegative-exact-integer?])
@defmethod[(set-editor-margin [h exact-nonnegative-integer?]
[v exact-nonnegative-integer?])
void?]{
Sets the horizontal and vertical margins used when printing an editor

View File

@ -28,7 +28,7 @@ Whenever the user changes the selected radio button, the radio box's
'vertical-label 'horizontal-label
'deleted))
'(vertical)]
[selection nonnegative-exact-integer? 0]
[selection exact-nonnegative-integer? 0]
[font (is-a?/c font%) normal-control-font]
[enabled any/c #t]
[vert-margin (integer-in 0 1000) 2]
@ -75,7 +75,7 @@ By default, the first radio button is initially selected. If
@defmethod*[#:mode override
([(enable [enable? any/c])
void?]
[(enable [n nonnegative-exact-integer?]
[(enable [n exact-nonnegative-integer?]
[enable? any/c])
void?])]{
@ -90,7 +90,7 @@ If two arguments are provided, then if @scheme[enable?] is
}
@defmethod[(get-item-label [n nonnegative-exact-integer?])
@defmethod[(get-item-label [n exact-nonnegative-integer?])
string?]{
Gets the label of a radio button by position. Radio buttons are
@ -99,7 +99,7 @@ Gets the label of a radio button by position. Radio buttons are
}
@defmethod[(get-item-plain-label [n nonnegative-exact-integer?])
@defmethod[(get-item-plain-label [n exact-nonnegative-integer?])
string?]{
Like @method[radio-box% get-item-label], except that the label must be
@ -108,14 +108,14 @@ a string and @litchar{&}s in the label are removed.
}
@defmethod[(get-number)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the number of radio buttons in the radio box.
}
@defmethod[(get-selection)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Gets the position of the selected radio button. Radio buttons are
numbered from @scheme[0].
@ -125,7 +125,7 @@ numbered from @scheme[0].
@defmethod*[#:mode override
([(is-enabled?)
boolean?]
[(is-enabled? [n nonnegative-exact-integer?])
[(is-enabled? [n exact-nonnegative-integer?])
boolean?])]{
If no arguments are provided, the enable state of the entire radio box
@ -139,7 +139,7 @@ box, @|MismatchExn|.
}
@defmethod[(set-selection [n nonnegative-exact-integer?])
@defmethod[(set-selection [n exact-nonnegative-integer?])
void?]{
Sets the selected radio button by position. (The control's callback

View File

@ -10,9 +10,9 @@ A @scheme[readable-snip<%>] object is treated specially by the port
generate the read result for the snip.
@defmethod[(read-special [source any/c]
[line (or/c nonnegative-exact-integer? false/c)]
[column (or/c nonnegative-exact-integer? false/c)]
[position (or/c nonnegative-exact-integer? false/c)])
[line (or/c exact-nonnegative-integer? false/c)]
[column (or/c exact-nonnegative-integer? false/c)]
[position (or/c exact-nonnegative-integer? false/c)])
any/c]{
The arguments are the same as the arguments to a procedure returned by

View File

@ -27,13 +27,13 @@ Finds a snip class from the list with the given name, returning
}
@defmethod[(find-position [class (is-a?/c snip-class%)])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns an index into the list for the specified class.
}
@defmethod[(nth [n nonnegative-exact-integer?])
@defmethod[(nth [n exact-nonnegative-integer?])
(or/c (is-a?/c snip-class%) false/c)]{
Returns the @scheme[n]th class in the list, or @scheme[#f] if
@ -42,7 +42,7 @@ Returns the @scheme[n]th class in the list, or @scheme[#f] if
}
@defmethod[(number)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the number of snip classes in the list.

View File

@ -214,7 +214,7 @@ Draws nothing.
@defmethod[(find-scroll-step [y real?])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
@methspec{
@ -361,7 +361,7 @@ following symbols:
@defmethod[(get-num-scroll-steps)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
@methspec{
@ -378,7 +378,7 @@ Returns @scheme[1].
}}
@defmethod[(get-scroll-step-offset [offset nonnegative-exact-integer?])
@defmethod[(get-scroll-step-offset [offset exact-nonnegative-integer?])
(and/c real? (not/c negative?))]{
@methspec{
@ -414,8 +414,8 @@ Returns the snip's style. See also @method[snip% set-style].
}
@defmethod[(get-text [offset nonnegative-exact-integer?]
[num nonnegative-exact-integer?]
@defmethod[(get-text [offset exact-nonnegative-integer?]
[num exact-nonnegative-integer?]
[flattened? any/c #f])
string?]{
@methspec{
@ -439,10 +439,10 @@ Returns @scheme[""].
}}
@defmethod[(get-text! [buffer mutable string]
[offset nonnegative-exact-integer?]
[num nonnegative-exact-integer?]
[buffer-offset nonnegative-exact-integer?])
@defmethod[(get-text! [buffer (and/c string? (not/c immutable?))]
[offset exact-nonnegative-integer?]
[num exact-nonnegative-integer?]
[buffer-offset exact-nonnegative-integer?])
void?]{
@methspec{
@ -617,7 +617,7 @@ Does nothing.
@defmethod[(partial-offset [dc (is-a?/c dc<%>)]
[x real?]
[y real?]
[len nonnegative-exact-integer?])
[len exact-nonnegative-integer?])
real?]{
@methspec{
@ -807,7 +807,7 @@ Does nothing.
}}
@defmethod[(split [position nonnegative-exact-integer?]
@defmethod[(split [position exact-nonnegative-integer?]
[first (box/c (is-a?/c snip%))]
[second (box/c (is-a?/c snip%))])
void?]{

View File

@ -8,7 +8,7 @@ An instance of @scheme[string-snip%] is created automatically when
on-new-string-snip].
@defconstructor*/make[(([allocsize nonnegative-exact-integer? 0])
@defconstructor*/make[(([allocsize exact-nonnegative-integer? 0])
([s string?]))]{
Creates a string snip whose initial content is @scheme[s], if
@ -20,8 +20,8 @@ Creates a string snip whose initial content is @scheme[s], if
@defmethod[(insert [s string?]
[len nonnegative-exact-integer?]
[pos nonnegative-exact-integer? 0])
[len exact-nonnegative-integer?]
[pos exact-nonnegative-integer? 0])
void?]{
Inserts @scheme[s] (with length @scheme[len]) into the snip at relative
@ -30,7 +30,7 @@ Inserts @scheme[s] (with length @scheme[len]) into the snip at relative
}
@defmethod[(read [len nonnegative-exact-integer?]
@defmethod[(read [len exact-nonnegative-integer?]
[f (is-a?/c editor-stream-in%)])
void?]{

View File

@ -91,7 +91,7 @@ notify-on-change].
}
@defmethod[(index-to-style [i nonnegative-exact-integer?])
@defmethod[(index-to-style [i exact-nonnegative-integer?])
(or/c (is-a?/c style<%>) false/c)]{
Returns the style associated with the given index, or @scheme[#f] for
@ -136,7 +136,7 @@ The return value from @method[style-list% notify-on-change] is an
@defmethod[(number)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the number of styles in the list.
@ -152,7 +152,7 @@ Like @method[style-list% new-named-style], except that if the name is
}
@defmethod[(style-to-index [style (is-a?/c style<%>)])
(or/c nonnegative-exact-integer? false/c)]{
(or/c exact-nonnegative-integer? false/c)]{
Returns the index for a particular style. The index for a style's base
style (and shift style, if it is a join style) is guaranteed to be

View File

@ -66,7 +66,7 @@ The label string @scheme[choice] can contain @litchar{&}, which (in
}
@defmethod[(delete [n nonnegative-exact-integer?])
@defmethod[(delete [n exact-nonnegative-integer?])
void?]{
Deletes an existing tab. If @scheme[n] is equal to or larger than the
@ -74,7 +74,7 @@ Deletes an existing tab. If @scheme[n] is equal to or larger than the
}
@defmethod[(get-item-label [n nonnegative-exact-integer?])
@defmethod[(get-item-label [n exact-nonnegative-integer?])
string?]{
Gets the label of a tab by position. Tabs are numbered from @scheme[0].
@ -84,14 +84,14 @@ If @scheme[n] is equal to or larger than the number of tabs in the panel,
}
@defmethod[(get-number)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the number of tabs on the panel.
}
@defmethod[(get-selection)
(or/c nonnegative-exact-integer? false/c)]{
(or/c exact-nonnegative-integer? false/c)]{
Returns the index (counting from 0) of the currently selected tab. If
the panel has no tabs, the result is @scheme[#f].
@ -106,7 +106,7 @@ Removes all tabs from the panel and installs tabs with the given
}
@defmethod[(set-item-label [n nonnegative-exact-integer?]
@defmethod[(set-item-label [n exact-nonnegative-integer?]
[label label-string?])
string?]{
@ -115,7 +115,7 @@ Set the label for tab @scheme[n] to @scheme[label]. If @scheme[n] is equal to
}
@defmethod[(set-selection [n nonnegative-exact-integer?])
@defmethod[(set-selection [n exact-nonnegative-integer?])
void?]{
Sets the currently selected tab by index (counting from 0).

View File

@ -33,8 +33,8 @@ A new @scheme[style-list%] object is created for the new editor. See
@defmethod[#:mode pubment
(after-change-style [start nonnegative-exact-integer?]
[len nonnegative-exact-integer?])
(after-change-style [start exact-nonnegative-integer?]
[len exact-nonnegative-integer?])
void?]{
@methspec{
@ -56,8 +56,8 @@ Does nothing.
}}
@defmethod[#:mode pubment
(after-delete [start nonnegative-exact-integer?]
[len nonnegative-exact-integer?])
(after-delete [start exact-nonnegative-integer?]
[len exact-nonnegative-integer?])
void?]{
@methspec{
@ -84,8 +84,8 @@ Does nothing.
}}
@defmethod[#:mode pubment
(after-insert [start nonnegative-exact-integer?]
[len nonnegative-exact-integer?])
(after-insert [start exact-nonnegative-integer?]
[len exact-nonnegative-integer?])
void?]{
@methspec{
@ -111,7 +111,7 @@ Does nothing.
}}
@defmethod[#:mode pubment
(after-merge-snips [pos nonnegative-exact-integer?])
(after-merge-snips [pos exact-nonnegative-integer?])
void?]{
@methspec{
@ -177,7 +177,7 @@ Does nothing.
@defmethod[#:mode pubment
(after-split-snip [pos nonnegative-exact-integer?])
(after-split-snip [pos exact-nonnegative-integer?])
void?]{
@methspec{
@ -195,8 +195,8 @@ Does nothing.
}}
@defmethod[(call-clickback [start nonnegative-exact-integer?]
[end nonnegative-exact-integer?])
@defmethod[(call-clickback [start exact-nonnegative-integer?]
[end exact-nonnegative-integer?])
void?]{
Simulates a user click that invokes a clickback, if the given range of
@ -206,8 +206,8 @@ Simulates a user click that invokes a clickback, if the given range of
}
@defmethod[#:mode pubment
(can-change-style? [start nonnegative-exact-integer?]
[len nonnegative-exact-integer?])
(can-change-style? [start exact-nonnegative-integer?]
[len exact-nonnegative-integer?])
boolean?]{
@methspec{
@ -232,8 +232,8 @@ Returns @scheme[#t].
}
@defmethod[#:mode pubment
(can-delete? [start nonnegative-exact-integer?]
[len nonnegative-exact-integer?])
(can-delete? [start exact-nonnegative-integer?]
[len exact-nonnegative-integer?])
boolean?]{
@methspec{
@ -261,8 +261,8 @@ Returns @scheme[#t].
}}
@defmethod[#:mode pubment
(can-insert? [start nonnegative-exact-integer?]
[len nonnegative-exact-integer?])
(can-insert? [start exact-nonnegative-integer?]
[len exact-nonnegative-integer?])
boolean?]{
@methspec{
@ -325,13 +325,13 @@ See also @method[text% hide-caret].
@defmethod*[#:mode extend
([(change-style [delta (or/c (is-a?/c style-delta%) false/c)]
[start (or/c nonnegative-exact-integer? (one/of 'start)) 'start]
[end (or/c nonnegative-exact-integer? (one/of 'end)) 'end]
[start (or/c exact-nonnegative-integer? (one/of 'start)) 'start]
[end (or/c exact-nonnegative-integer? (one/of 'end)) 'end]
[counts-as-mod? any/c #t])
void?]
[(change-style [style (or/c (is-a?/c style<%>) false/c)]
[start (or/c nonnegative-exact-integer? (one/of 'start)) 'start]
[end (or/c nonnegative-exact-integer? (one/of 'end)) 'end]
[start (or/c exact-nonnegative-integer? (one/of 'start)) 'start]
[end (or/c exact-nonnegative-integer? (one/of 'end)) 'end]
[counts-as-mod? any/c #t])
void?])]{
@ -352,8 +352,8 @@ When @scheme[style] is provided: @InStyleListNote[]
@defmethod[#:mode extend
(copy [extend? any/c]
[time (and/c exact? integer?)]
[start (or/c nonnegative-exact-integer? (one/of 'start)) 'start]
[end (or/c nonnegative-exact-integer? (one/of 'end)) 'end])
[start (or/c exact-nonnegative-integer? (one/of 'start)) 'start]
[end (or/c exact-nonnegative-integer? (one/of 'end)) 'end])
void?]{
Copies specified range of text into the clipboard. If @scheme[extend?] is
@ -383,8 +383,8 @@ In addition to the default @xmethod[editor<%> copy-self-to] work,
@defmethod[#:mode override
(cut [extend? any/c]
[time (and/c exact? integer?)]
[start (or/c nonnegative-exact-integer? (one/of 'start)) 'start]
[end (or/c nonnegative-exact-integer? (one/of 'end)) 'end])
[start (or/c exact-nonnegative-integer? (one/of 'start)) 'start]
[end (or/c exact-nonnegative-integer? (one/of 'end)) 'end])
void?]{
Copies and then deletes the specified range. If @scheme[extend?] is not
@ -399,8 +399,8 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If
}
@defmethod*[([(delete [start (or/c nonnegative-exact-integer? (one/of 'start))]
[end (or/c nonnegative-exact-integer? (one/of 'back)) 'back]
@defmethod*[([(delete [start (or/c exact-nonnegative-integer? (one/of 'start))]
[end (or/c exact-nonnegative-integer? (one/of 'back)) 'back]
[scroll-ok? any/c #t])
void?]
[(delete)
@ -422,8 +422,8 @@ Deletes the specified range or the currently selected text (when no
}
@defmethod[(do-copy [start nonnegative-exact-integer?]
[end nonnegative-exact-integer?]
@defmethod[(do-copy [start exact-nonnegative-integer?]
[end exact-nonnegative-integer?]
[time (and/c exact? integer?)]
[extend? any/c])
void?]{
@ -446,7 +446,7 @@ Copy the data from @scheme[start] to @scheme[end], extending the current
}}
@defmethod[(do-paste [start nonnegative-exact-integer?]
@defmethod[(do-paste [start exact-nonnegative-integer?]
[time (and/c exact? integer?)])
void?]{
@methspec{
@ -467,7 +467,7 @@ Pastes into the @techlink{position} @scheme[start].
}}
@defmethod[(do-paste-x-selection [start nonnegative-exact-integer?]
@defmethod[(do-paste-x-selection [start exact-nonnegative-integer?]
[time (and/c exact? integer?)])
void?]{
@methspec{
@ -501,7 +501,7 @@ See also @method[text% delete].
@defmethod[(find-line [y real?]
[on-it? (or/c (box/c any/c) false/c) #f])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Given a @techlink{location} in the editor, returns the line at the
@techlink{location}. @|LineNumbering|
@ -533,7 +533,7 @@ Given a snip, returns the next snip in the editor (after the given
[at-eol? (or/c (box/c any/c) false/c) #f]
[on-it? (or/c (box/c any/c) false/c) #f]
[edge-close? (or/c (box/c real?) false/c) #f])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Given a @techlink{location} in the editor, returns the @techlink{position} at the
@techlink{location}.
@ -555,12 +555,12 @@ See @|ateoldiscuss| for a discussion of the @scheme[at-eol?] argument.
}
@defmethod[(find-position-in-line [line nonnegative-exact-integer?]
@defmethod[(find-position-in-line [line exact-nonnegative-integer?]
[x real?]
[at-eol? (or/c (box/c any/c) false/c) #f]
[on-it? (or/c (box/c any/c) false/c) #f]
[edge-close? (or/c (box/c real?) false/c) #f])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Given a @techlink{location} within a line of the editor, returns the
@techlink{position} at the @techlink{location}. @|LineNumbering|
@ -577,9 +577,9 @@ See @method[text% find-position] for a discussion of
}
@defmethod[(find-snip [pos nonnegative-exact-integer?]
@defmethod[(find-snip [pos exact-nonnegative-integer?]
[direction (one-of/c 'before-or-none 'before 'after 'after-or-none)]
[s-pos (or/c (box/c nonnegative-exact-integer?) false/c) #f])
[s-pos (or/c (box/c exact-nonnegative-integer?) false/c) #f])
(or/c (is-a?/c snip%) false/c)]{
Returns the snip at a given @techlink{position}, or @scheme[#f] if an appropriate
@ -611,11 +611,11 @@ can be any of the following:
@defmethod[(find-string [str string?]
[direction (one-of/c 'forward 'backward) 'forward]
[start (or/c nonnegative-exact-integer? (one/of 'start)) 'start]
[end (or/c nonnegative-exact-integer? (one/of 'eof)) 'eof]
[start (or/c exact-nonnegative-integer? (one/of 'start)) 'start]
[end (or/c exact-nonnegative-integer? (one/of 'eof)) 'eof]
[get-start? any/c #t]
[case-sensitive? any/c #t])
(or/c nonnegative-exact-integer? false/c)]{
(or/c exact-nonnegative-integer? false/c)]{
Finds an exact-match string in the editor and returns its @techlink{position}.
If the string is not found, @scheme[#f] is returned.
@ -643,11 +643,11 @@ If @scheme[case-sensitive?] is @scheme[#f], then an uppercase and lowercase
@defmethod[(find-string-all [str string?]
[direction (one-of/c 'forward 'backward) 'forward]
[start (or/c nonnegative-exact-integer? (one/of 'start)) 'start]
[end (or/c nonnegative-exact-integer? (one/of 'eof)) 'eof]
[start (or/c exact-nonnegative-integer? (one/of 'start)) 'start]
[end (or/c exact-nonnegative-integer? (one/of 'eof)) 'eof]
[get-start? any/c #t]
[case-sensitive any/c #t])
(listof nonnegative-exact-integer?)]{
(listof exact-nonnegative-integer?)]{
Finds all occurrences of a string using @method[text% find-string]. If
no occurrences are found, the empty list is returned. The arguments
@ -656,8 +656,8 @@ Finds all occurrences of a string using @method[text% find-string]. If
}
@defmethod[(find-wordbreak [start (or/c (box/c nonnegative-exact-integer?) false/c)]
[end (or/c (box/c nonnegative-exact-integer?) false/c)]
@defmethod[(find-wordbreak [start (or/c (box/c exact-nonnegative-integer?) false/c)]
[end (or/c (box/c exact-nonnegative-integer?) false/c)]
[reason (one-of/c 'caret 'line 'selection 'user1 'user2)])
void?]{
@ -711,11 +711,11 @@ Turns off the hiliting and shows the normal selection range again; see
}
@defmethod[(flash-on [start nonnegative-exact-integer?]
[end nonnegative-exact-integer?]
@defmethod[(flash-on [start exact-nonnegative-integer?]
[end exact-nonnegative-integer?]
[at-eol? any/c #f]
[scroll? any/c #t]
[timeout nonnegative-exact-integer? 500])
[timeout exact-nonnegative-integer? 500])
void?]{
Temporarily hilites a region in the editor without changing the
@ -754,7 +754,7 @@ See also @method[text% set-between-threshold].
}
@defmethod[(get-character [start nonnegative-exact-integer?])
@defmethod[(get-character [start exact-nonnegative-integer?])
char?]{
Returns the character following the @techlink{position}
@ -768,7 +768,7 @@ If @scheme[start] is greater than or equal to the last
@defmethod[(get-end-position)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the ending @techlink{position} of the current selection. See
also @method[text% get-position].
@ -804,8 +804,8 @@ Returns @scheme[#t] if the editor is in overwrite mode, @scheme[#f]
}
@defmethod[(get-position [start (or/c (box/c nonnegative-exact-integer?) false/c)]
[end (or/c (box/c nonnegative-exact-integer?) false/c) #f])
@defmethod[(get-position [start (or/c (box/c exact-nonnegative-integer?) false/c)]
[end (or/c (box/c exact-nonnegative-integer?) false/c) #f])
void?]{
Returns the current selection range in @techlink{position}s. If
@ -821,8 +821,8 @@ and @method[text% get-end-position].
}
@defmethod[(get-region-data [start nonnegative-exact-integer?]
[end nonnegative-exact-integer?])
@defmethod[(get-region-data [start exact-nonnegative-integer?]
[end exact-nonnegative-integer?])
(or/c (is-a?/c editor-data%) false/c)]{
Gets extra data associated with a given region. See
@ -854,7 +854,7 @@ Returns an inexact number that increments every time the editor is
@defmethod[(get-snip-position [snip (is-a?/c snip%)])
(or/c nonnegative-exact-integer? false/c)]{
(or/c exact-nonnegative-integer? false/c)]{
Returns the starting @techlink{position} of a given snip or
@scheme[#f] if the snip is not in this editor.
@ -862,7 +862,7 @@ Returns the starting @techlink{position} of a given snip or
}
@defmethod[(get-snip-position-and-location [snip (is-a?/c snip%)]
[pos (or/c (box/c nonnegative-exact-integer?) false/c)]
[pos (or/c (box/c exact-nonnegative-integer?) false/c)]
[x (or/c (box/c real?) false/c) #f]
[y (or/c (box/c real?) false/c) #f])
boolean?]{
@ -881,7 +881,7 @@ When @techlink{location} information is requested: @|OVD| @|FCA|
@defmethod[(get-start-position)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the starting @techlink{position} of the current selection. See also
@method[text% get-position].
@ -911,7 +911,7 @@ See also @method[text% set-styles-sticky].
}
@defmethod[(get-tabs [length (or/c (box/c nonnegative-exact-integer?) false/c) #f]
@defmethod[(get-tabs [length (or/c (box/c exact-nonnegative-integer?) false/c) #f]
[tab-width (or/c (box/c real?) false/c) #f]
[in-units (or/c (box/c any/c) false/c) #f])
(listof real?)]{
@ -931,8 +931,8 @@ See also
}
@defmethod[(get-text [start nonnegative-exact-integer? 0]
[end (or/c nonnegative-exact-integer? (one/of 'eof)) 'eof]
@defmethod[(get-text [start exact-nonnegative-integer? 0]
[end (or/c exact-nonnegative-integer? (one/of 'eof)) 'eof]
[flattened? any/c #f]
[force-cr? any/c #f])
string?]{
@ -964,8 +964,8 @@ Returns the distance from the top of the editor to the alignment
}
@defmethod[(get-visible-line-range [start (or/c (box/c nonnegative-exact-integer?) false/c)]
[end (or/c (box/c nonnegative-exact-integer?) false/c)]
@defmethod[(get-visible-line-range [start (or/c (box/c exact-nonnegative-integer?) false/c)]
[end (or/c (box/c exact-nonnegative-integer?) false/c)]
[all? any/c #t])
void?]{
@ -985,8 +985,8 @@ If the editor is displayed by multiple canvases and @scheme[all?] is
}
@defmethod[(get-visible-position-range [start (or/c (box/c nonnegative-exact-integer?) false/c)]
[end (or/c (box/c nonnegative-exact-integer?) false/c)]
@defmethod[(get-visible-position-range [start (or/c (box/c exact-nonnegative-integer?) false/c)]
[end (or/c (box/c exact-nonnegative-integer?) false/c)]
[all? any/c #t])
void?]{
@ -1032,24 +1032,24 @@ See also @method[text% caret-hidden?] and @method[editor<%> lock].
@defmethod*[#:mode override
([(insert [str string?]
[start nonnegative-exact-integer?]
[end (or/c nonnegative-exact-integer? (one/of 'same)) 'same]
[start exact-nonnegative-integer?]
[end (or/c exact-nonnegative-integer? (one/of 'same)) 'same]
[scroll-ok? any/c #t])
void?]
[(insert [n nonnegative-exact-integer?]
[(insert [n exact-nonnegative-integer?]
[str string?]
[start nonnegative-exact-integer?]
[end (or/c nonnegative-exact-integer? (one/of 'same)) 'same]
[start exact-nonnegative-integer?]
[end (or/c exact-nonnegative-integer? (one/of 'same)) 'same]
[scroll-ok? any/c #t])
void?]
[(insert [str string?])
void?]
[(insert [n nonnegative-exact-integer?]
[(insert [n exact-nonnegative-integer?]
[str string?])
void?]
[(insert [snip (is-a?/c snip%)]
[start nonnegative-exact-integer?]
[end (or/c nonnegative-exact-integer? (one/of 'same)) 'same]
[start exact-nonnegative-integer?]
[end (or/c exact-nonnegative-integer? (one/of 'same)) 'same]
[scroll-ok? any/c #t])
void?]
[(insert [snip (is-a?/c snip%)])
@ -1057,8 +1057,8 @@ See also @method[text% caret-hidden?] and @method[editor<%> lock].
[(insert [char char?])
void?]
[(insert [char char?]
[start nonnegative-exact-integer?]
[end (or/c nonnegative-exact-integer? (one/of 'same)) 'same])
[start exact-nonnegative-integer?]
[end (or/c exact-nonnegative-integer? (one/of 'same)) 'same])
void?])]{
Inserts text or a snip into @this-obj[] at @techlink{position}
@ -1101,8 +1101,8 @@ See also @method[text% get-styles-sticky].
([(kill [time (and/c exact? integer?) 0])
void?]
[(kill [time (and/c exact? integer?)]
[start nonnegative-exact-integer?]
[end nonnegative-exact-integer?])
[start exact-nonnegative-integer?]
[end exact-nonnegative-integer?])
void?])]{
Cuts the text in the given region. If @scheme[start] and @scheme[end]
@ -1118,7 +1118,7 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If
@defmethod[(last-line)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the number of the last line in the editor. Lines are numbered
starting with @scheme[0], so this is one less than the number of lines
@ -1131,7 +1131,7 @@ Returns the number of the last line in the editor. Lines are numbered
@defmethod[(last-paragraph)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the number of the last paragraph in the editor. Paragraphs are
numbered starting with @scheme[0], so this is one less than the
@ -1142,16 +1142,16 @@ Returns the number of the last paragraph in the editor. Paragraphs are
}
@defmethod[(last-position)
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the last selection @techlink{position} in the editor. This is
also the number of @techlink{item}s in the editor.
}
@defmethod[(line-end-position [line nonnegative-exact-integer?]
@defmethod[(line-end-position [line exact-nonnegative-integer?]
[visible? any/c #t])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the last @techlink{position} of a given line. @|LineNumbering|
@ -1171,8 +1171,8 @@ If the line ends with invisible @techlink{item}s (such as a carriage
}
@defmethod[(line-length [i nonnegative-exact-integer?])
nonnegative-exact-integer?]{
@defmethod[(line-length [i exact-nonnegative-integer?])
exact-nonnegative-integer?]{
Returns the number of @techlink{item}s in a given
line. @|LineNumbering|
@ -1182,7 +1182,7 @@ line. @|LineNumbering|
}
@defmethod[(line-location [line nonnegative-exact-integer?]
@defmethod[(line-location [line exact-nonnegative-integer?]
[top? any/c #t])
real?]{
@ -1198,8 +1198,8 @@ If @scheme[top?] is not @scheme[#f], the @techlink{location} for the
}
@defmethod[(line-paragraph [start nonnegative-exact-integer?])
nonnegative-exact-integer?]{
@defmethod[(line-paragraph [start exact-nonnegative-integer?])
exact-nonnegative-integer?]{
Returns the paragraph number of the paragraph containing the line.
@|LineNumbering| @|ParagraphNumbering|
@ -1208,9 +1208,9 @@ Returns the paragraph number of the paragraph containing the line.
}
@defmethod[(line-start-position [line nonnegative-exact-integer?]
@defmethod[(line-start-position [line exact-nonnegative-integer?]
[visible? any/c #t])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the first @techlink{position} of the given line. @|LineNumbering|
@ -1285,8 +1285,8 @@ See also @method[text% set-position].
@defmethod[#:mode pubment
(on-change-style [start nonnegative-exact-integer?]
[len nonnegative-exact-integer?])
(on-change-style [start exact-nonnegative-integer?]
[len exact-nonnegative-integer?])
void?]{
@methspec{
@ -1363,8 +1363,8 @@ Tracks clicks on a clickback (see @method[text% set-clickback]) of
@defmethod[#:mode pubment
(on-delete [start nonnegative-exact-integer?]
[len nonnegative-exact-integer?])
(on-delete [start exact-nonnegative-integer?]
[len exact-nonnegative-integer?])
void?]{
@methspec{
@ -1394,8 +1394,8 @@ Does nothing.
@defmethod[#:mode pubment
(on-insert [start nonnegative-exact-integer?]
[len nonnegative-exact-integer?])
(on-insert [start exact-nonnegative-integer?]
[len exact-nonnegative-integer?])
void?]{
@methspec{
@ -1493,8 +1493,8 @@ Does nothing.
}}
@defmethod[(paragraph-end-line [paragraph nonnegative-exact-integer?])
nonnegative-exact-integer?]{
@defmethod[(paragraph-end-line [paragraph exact-nonnegative-integer?])
exact-nonnegative-integer?]{
Returns the ending line of a given paragraph. @|ParagraphNumbering| @|LineNumbering|
@ -1503,9 +1503,9 @@ Returns the ending line of a given paragraph. @|ParagraphNumbering| @|LineNumber
}
@defmethod[(paragraph-end-position [paragraph nonnegative-exact-integer?]
@defmethod[(paragraph-end-position [paragraph exact-nonnegative-integer?]
[visible? any/c #f])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the ending @techlink{position} of a given paragraph. @|ParagraphNumbering|
@ -1520,8 +1520,8 @@ If the paragraph ends with invisible @techlink{item}s (such as a carriage
}
@defmethod[(paragraph-start-line [paragraph nonnegative-exact-integer?])
nonnegative-exact-integer?]{
@defmethod[(paragraph-start-line [paragraph exact-nonnegative-integer?])
exact-nonnegative-integer?]{
Returns the starting line of a given paragraph. @|ParagraphNumbering| @|LineNumbering|
@ -1530,9 +1530,9 @@ Returns the starting line of a given paragraph. @|ParagraphNumbering| @|LineNumb
}
@defmethod[(paragraph-start-position [paragraph nonnegative-exact-integer?]
@defmethod[(paragraph-start-position [paragraph exact-nonnegative-integer?]
[visible? any/c #f])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the starting @techlink{position} of a given paragraph. @|ParagraphNumbering|
@ -1548,8 +1548,8 @@ If the paragraph starts with invisible @techlink{item}s and @scheme[visible?] is
@defmethod[#:mode override
(paste [time (and/c exact? integer?)]
[start (or/c nonnegative-exact-integer? (one/of 'end)) 'end]
[end (or/c nonnegative-exact-integer? (one/of 'same)) 'same])
[start (or/c exact-nonnegative-integer? (one/of 'end)) 'end]
[end (or/c exact-nonnegative-integer? (one/of 'same)) 'same])
void?]{
Pastes into the specified range. If @scheme[start] is @scheme['end], then
@ -1586,8 +1586,8 @@ If the previous operation on the editor was not a paste, calling
@defmethod[#:mode override
(paste-x-selection [time (and/c exact? integer?)]
[start (or/c nonnegative-exact-integer? (one/of 'end)) 'end]
[end (or/c nonnegative-exact-integer? (one/of 'same)) 'same])
[start (or/c exact-nonnegative-integer? (one/of 'end)) 'end]
[end (or/c exact-nonnegative-integer? (one/of 'same)) 'same])
void?]{
Pastes into the specified range. If @scheme[start] is @scheme['end], then
@ -1600,9 +1600,9 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If
}
@defmethod[(position-line [start nonnegative-exact-integer?]
@defmethod[(position-line [start exact-nonnegative-integer?]
[at-eol? any/c #f])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the line number of the line containing a given @techlink{position}. @|LineNumbering|
@ -1615,7 +1615,7 @@ See @|ateoldiscuss| for a discussion of @scheme[at-eol?].
}
@defmethod[(position-location [start nonnegative-exact-integer?]
@defmethod[(position-location [start exact-nonnegative-integer?]
[x (or/c (box/c real?) false/c) #f]
[y (or/c (box/c real?) false/c) #f]
[top? any/c #t]
@ -1646,7 +1646,7 @@ maximum bottom @techlink{location} for the whole line is returned in @scheme[y].
}
@defmethod[(position-locations [start nonnegative-exact-integer?]
@defmethod[(position-locations [start exact-nonnegative-integer?]
[top-x (or/c (box/c real?) false/c) #f]
[top-y (or/c (box/c real?) false/c) #f]
[bottom-x (or/c (box/c real?) false/c) #f]
@ -1662,9 +1662,9 @@ and ``bottom'' results at once.
}
@defmethod[(position-paragraph [start nonnegative-exact-integer?]
@defmethod[(position-paragraph [start exact-nonnegative-integer?]
[at-eol? any/c #f])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
See @|ateoldiscuss| for a discussion of @scheme[at-eol?].
@ -1675,7 +1675,7 @@ Returns the paragraph number of the paragraph containing a given @techlink{posit
@defmethod[#:mode extend
(read-from-file [stream (is-a?/c editor-stream-in%)]
[start (or/c nonnegative-exact-integer? (one/of 'start))]
[start (or/c exact-nonnegative-integer? (one/of 'start))]
[overwrite-styles? any/c #t])
boolean?]{
@ -1685,8 +1685,8 @@ New data is inserted at the @techlink{position} indicated by @scheme[start], or
}
@defmethod[(remove-clickback [start nonnegative-exact-integer?]
[end nonnegative-exact-integer?])
@defmethod[(remove-clickback [start exact-nonnegative-integer?]
[end exact-nonnegative-integer?])
void?]{
Removes all clickbacks installed for exactly the range @scheme[start]
@ -1695,9 +1695,9 @@ Removes all clickbacks installed for exactly the range @scheme[start]
}
@defmethod[(scroll-to-position [start nonnegative-exact-integer?]
@defmethod[(scroll-to-position [start exact-nonnegative-integer?]
[at-eol? any/c #f]
[end (or/c nonnegative-exact-integer? (one/of 'same)) 'same]
[end (or/c exact-nonnegative-integer? (one/of 'same)) 'same]
[bias (one-of/c 'start 'end 'none) 'none])
boolean?]{
@ -1784,11 +1784,11 @@ See also
}
@defmethod[(set-clickback [start nonnegative-exact-integer?]
[end nonnegative-exact-integer?]
@defmethod[(set-clickback [start exact-nonnegative-integer?]
[end exact-nonnegative-integer?]
[f ((is-a?/c text%
nonnegative-exact-integer?
nonnegative-exact-integer?)
exact-nonnegative-integer?
exact-nonnegative-integer?)
. -> . any)]
[hilite-delta (or/c (is-a?/c style-delta%) false/c) #f]
[call-on-down? any/c #f])
@ -1852,7 +1852,7 @@ Enables or disables overwrite mode. See @method[text%
}
@defmethod[(set-paragraph-alignment [paragraph nonnegative-exact-integer?]
@defmethod[(set-paragraph-alignment [paragraph exact-nonnegative-integer?]
[alignment (one-of/c 'left 'center 'right)])
void?]{
@ -1870,7 +1870,7 @@ Sets a paragraph-specific horizontal alignment. The alignment is only
}
@defmethod[(set-paragraph-margins [paragraph nonnegative-exact-integer?]
@defmethod[(set-paragraph-margins [paragraph exact-nonnegative-integer?]
[first-left (and/c real? (not/c negative?))]
[left (and/c real? (not/c negative?))]
[right (and/c real? (not/c negative?))])
@ -1891,8 +1891,8 @@ The first line of the paragraph is indented by @scheme[first-left] points
}
@defmethod[(set-position [start nonnegative-exact-integer?]
[end (or/c nonnegative-exact-integer? (one/of 'same)) 'same]
@defmethod[(set-position [start exact-nonnegative-integer?]
[end (or/c exact-nonnegative-integer? (one/of 'same)) 'same]
[at-eol? any/c #f]
[scroll? any/c #t]
[seltype (one-of/c 'default 'x 'local) 'default])
@ -1935,8 +1935,8 @@ See also @scheme[editor-set-x-selection-mode].
@defmethod[(set-position-bias-scroll [bias (one-of/c 'start-only 'start 'none 'end 'end-only)]
[start nonnegative-exact-integer?]
[end (or/c nonnegative-exact-integer? (one/of 'same)) 'same]
[start exact-nonnegative-integer?]
[end (or/c exact-nonnegative-integer? (one/of 'same)) 'same]
[ateol? any/c #f]
[scroll? any/c #t]
[seltype (one-of/c 'default 'x 'local) 'default])
@ -1958,8 +1958,8 @@ See also @method[text% scroll-to-position].
}
@defmethod[(set-region-data [start nonnegative-exact-integer?]
[end nonnegative-exact-integer?]
@defmethod[(set-region-data [start exact-nonnegative-integer?]
[end exact-nonnegative-integer?]
[data (is-a?/c editor-data%)])
void?]{
@ -2010,8 +2010,8 @@ Setting tabs is disallowed when the editor is internally locked for
}
@defmethod[(set-wordbreak-func [f ((is-a?/c text%) (or/c (box/c nonnegative-exact-integer?) false/c)
(or/c (box/c nonnegative-exact-integer?) false/c)
@defmethod[(set-wordbreak-func [f ((is-a?/c text%) (or/c (box/c exact-nonnegative-integer?) false/c)
(or/c (box/c exact-nonnegative-integer?) false/c)
symbol?
. -> . any)])
void?]{
@ -2048,7 +2048,7 @@ If @scheme[map] is @scheme[#f], then the standard map
}
@defmethod[(split-snip [pos nonnegative-exact-integer?])
@defmethod[(split-snip [pos exact-nonnegative-integer?])
void?]{
Given a @techlink{position}, splits the snip that includes the
@ -2064,8 +2064,8 @@ Splitting a snip is disallowed when the editor is internally locked
@defmethod[#:mode extend
(write-to-file [stream (is-a?/c editor-stream-out%)]
[start nonnegative-exact-integer? 0]
[end (or/c nonnegative-exact-integer? (one/of 'eof)) 'eof])
[start exact-nonnegative-integer? 0]
[end (or/c exact-nonnegative-integer? (one/of 'eof)) 'eof])
boolean?]{
If @scheme[start] is 0 and @scheme[end] is @scheme['eof] negative,

View File

@ -185,9 +185,9 @@ An interface to be implemented by values returned from a snip reader.
The only method is @method[readable<%> read-special].
@defmethod[(read-special [source any/c]
[line (or/c nonnegative-exact-integer? false/c)]
[column (or/c nonnegative-exact-integer? false/c)]
[position (or/c nonnegative-exact-integer? false/c)])
[line (or/c exact-nonnegative-integer? false/c)]
[column (or/c exact-nonnegative-integer? false/c)]
[position (or/c exact-nonnegative-integer? false/c)])
any/c]{
Like @method[readable-snip<%> read-special], but for non-graphical
@ -413,9 +413,9 @@ No data is available.
}
@defmethod[(read-special [source any/c]
[line (or/c nonnegative-exact-integer? false/c)]
[column (or/c nonnegative-exact-integer? false/c)]
[position (or/c nonnegative-exact-integer? false/c)])
[line (or/c exact-nonnegative-integer? false/c)]
[column (or/c exact-nonnegative-integer? false/c)]
[position (or/c exact-nonnegative-integer? false/c)])
any/c]{
Generates a special comment using @scheme[make-special-comment]. The
@ -446,9 +446,9 @@ Returns @scheme[#t] if whitespace is elimited from the contained XML
literal, @scheme[#f] otherwise.}
@defmethod[(read-special [source any/c]
[line (or/c nonnegative-exact-integer? false/c)]
[column (or/c nonnegative-exact-integer? false/c)]
[position (or/c nonnegative-exact-integer? false/c)])
[line (or/c exact-nonnegative-integer? false/c)]
[column (or/c exact-nonnegative-integer? false/c)]
[position (or/c exact-nonnegative-integer? false/c)])
any/c]{
Generates a @scheme[quasiquote] S-expression that enclosed the XML,
@ -480,9 +480,9 @@ Returns @scheme[#t] if the box corresponds to a splicing unquote,
@scheme[#f] for a non-splicing unquote.}
@defmethod[(read-special [source any/c]
[line (or/c nonnegative-exact-integer? false/c)]
[column (or/c nonnegative-exact-integer? false/c)]
[position (or/c nonnegative-exact-integer? false/c)])
[line (or/c exact-nonnegative-integer? false/c)]
[column (or/c exact-nonnegative-integer? false/c)]
[position (or/c exact-nonnegative-integer? false/c)])
any/c]{
Generates an S-expression for the code in the box.}
@ -511,9 +511,9 @@ mode.
No data is available.}
@defmethod[(read-special [source any/c]
[line (or/c nonnegative-exact-integer? false/c)]
[column (or/c nonnegative-exact-integer? false/c)]
[position (or/c nonnegative-exact-integer? false/c)])
[line (or/c exact-nonnegative-integer? false/c)]
[column (or/c exact-nonnegative-integer? false/c)]
[position (or/c exact-nonnegative-integer? false/c)])
any/c]{
Generates a string containing the text.}

View File

@ -423,15 +423,15 @@ Closes the given converter, so that it can no longer be used with
@defproc[(bytes-convert [converter bytes-converter?]
[src-bstr bytes?]
[src-start-pos nonnegative-exact-integer? 0]
[src-end-pos nonnegative-exact-integer? (bytes-length src-bstr)]
[src-start-pos exact-nonnegative-integer? 0]
[src-end-pos exact-nonnegative-integer? (bytes-length src-bstr)]
[dest-bstr (or/c bytes? false/c) #f]
[dest-start-pos nonnegative-exact-integer? 0]
[dest-end-pos (or/c nonnegative-exact-integer? false/c)
[dest-start-pos exact-nonnegative-integer? 0]
[dest-end-pos (or/c exact-nonnegative-integer? false/c)
(and dest-bstr
(bytes-length dest-bstr))])
(values (or/c bytes? nonnegative-exact-integer?)
nonnegative-exact-integer?
(values (or/c bytes? exact-nonnegative-integer?)
exact-nonnegative-integer?
(one-of 'complete 'continues 'aborts 'error))]{
Converts the bytes from @scheme[src-start-pos] to @scheme[src-end-pos]
@ -499,11 +499,11 @@ sequence and reset the converter, use @scheme[bytes-convert-end].}
@defproc[(bytes-convert-end [converter bytes-converter?]
[dest-bstr (or/c bytes? false/c) #f]
[dest-start-pos nonnegative-exact-integer? 0]
[dest-end-pos (or/c nonnegative-exact-integer? false/c)
[dest-start-pos exact-nonnegative-integer? 0]
[dest-end-pos (or/c exact-nonnegative-integer? false/c)
(and dest-bstr
(bytes-length dest-bstr))])
(values (or/c bytes? nonnegative-exact-integer?)
(values (or/c bytes? exact-nonnegative-integer?)
(one-of 'complete 'continues))]{
Like @scheme[bytes-convert], but instead of converting bytes, this

View File

@ -1627,7 +1627,7 @@ methods whose names are local (i.e., declared with
@scheme[define-local-member-names]).}
@defproc[(object-method-arity-includes? [object object?][sym symbol?][cnt nonnegative-exact-integer?])
@defproc[(object-method-arity-includes? [object object?][sym symbol?][cnt exact-nonnegative-integer?])
boolean?]{
Returns @scheme[#t] if @scheme[object] has a method named @scheme[sym]
@ -1662,10 +1662,10 @@ K%
@defproc[(class-info [class class?])
(values symbol?
nonnegative-exact-integer?
exact-nonnegative-integer?
(listof symbol?)
(any/c nonnegative-exact-integer? . -> . any/c)
(any/c nonnegative-exact-integer? any/c . -> . any/c)
(any/c exact-nonnegative-integer? . -> . any/c)
(any/c exact-nonnegative-integer? any/c . -> . any/c)
(or/c class? false/c)
boolean?)]{

View File

@ -145,7 +145,7 @@ between @scheme[j] and @scheme[k], inclusive.}
A flat contract that requires the input to be an exact non-negative integer.}
@defproc[(string-len/c [len nonnegative-exact-integer?]) flat-contract?]{
@defproc[(string-len/c [len exact-nonnegative-integer?]) flat-contract?]{
Returns a flat contract that recognizes strings that have fewer than
@scheme[len] characters.}

View File

@ -56,7 +56,7 @@ which is the main variant of PLT Scheme, and not normally available in
PLT Scheme CGC.}}
@defproc[(custodian-require-memory [limit-cust custodian?]
[need-amt nonnegative-exact-integer?]
[need-amt exact-nonnegative-integer?]
[stop-cust custodian?]) void?]{
Registers a require check if PLT Scheme is compiled with support for
@ -69,7 +69,7 @@ garbage collection (see @secref["gc-model"]) where allocating
tigger some shutdown, then @scheme[stop-cust] is shut down.}
@defproc[(custodian-limit-memory [limit-cust custodian?]
[limit-amt nonnegative-exact-integer?]
[limit-amt exact-nonnegative-integer?]
[stop-cust custodian? limit-cust]) void?]{
Registers a limit check if PLT Scheme is compiled with support for

View File

@ -11,31 +11,31 @@ written.
@defproc[(make-input-port [name any/c]
[read-in (bytes?
. -> . (one-of/c nonnegative-exact-integer?
. -> . (one-of/c exact-nonnegative-integer?
eof-object?
procedure?
evt?))]
[peek (bytes? nonnegative-exact-integer? (or/c evt? false/c)
. -> . (one-of/c nonnegative-exact-integer?
[peek (bytes? exact-nonnegative-integer? (or/c evt? false/c)
. -> . (one-of/c exact-nonnegative-integer?
eof-object?
procedure?
evt?
false/c))]
[close (-> any)]
[get-progress-evt (or/c (-> evt?) false/c) #f]
[commit (or/c (positive-exact-integer? evt? evt? . -> . any)
[commit (or/c (exact-positive-integer? evt? evt? . -> . any)
false/c)
#f]
[get-location (or/c
(()
. ->* .
((or/c positive-exact-integer? false/c)
(or/c nonnegative-exact-integer? false/c)
(or/c positive-exact-integer? false/c)))
((or/c exact-positive-integer? false/c)
(or/c exact-nonnegative-integer? false/c)
(or/c exact-positive-integer? false/c)))
false/c)
#f]
[count-lines! (-> any) void]
[init-position positive-exact-integer? 1]
[init-position exact-positive-integer? 1]
[buffer-mode (or/c (case-> ((one-of/c 'block 'none) . -> . any)
(-> (one-of/c 'block 'none #f)))
false/c)
@ -653,12 +653,12 @@ s
@defproc[(make-output-port [name any/c]
[evt evt?]
[write-out (bytes? nonnegative-exact-integer?
nonnegative-exact-integer?
[write-out (bytes? exact-nonnegative-integer?
exact-nonnegative-integer?
boolean?
boolean?
. -> .
(or/c nonnegative-exact-integer?
(or/c exact-nonnegative-integer?
false/c
evt?))]
[close (-> any)]
@ -670,8 +670,8 @@ s
false/c)
#f]
[get-write-evt (or/c
(bytes? nonnegative-exact-integer?
nonnegative-exact-integer?
(bytes? exact-nonnegative-integer?
exact-nonnegative-integer?
. -> .
evt?)
false/c)
@ -683,13 +683,13 @@ s
[get-location (or/c
(()
. ->* .
((or/c positive-exact-integer? false/c)
(or/c nonnegative-exact-integer? false/c)
(or/c positive-exact-integer? false/c)))
((or/c exact-positive-integer? false/c)
(or/c exact-nonnegative-integer? false/c)
(or/c exact-positive-integer? false/c)))
false/c)
#f]
[count-lines! (-> any) void]
[init-position positive-exact-integer? 1]
[init-position exact-positive-integer? 1]
[buffer-mode (or/c (case->
((one-of/c 'block 'line 'none) . -> . any)
(-> (one-of/c 'block 'line 'none #f)))

View File

@ -233,7 +233,7 @@ side-effects of @scheme[proc]) in an unspecified order. The procedure
@defproc[(dict-count [dict dict?])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the number of keys mapped by @scheme[dict], usually in
constant time.

View File

@ -87,7 +87,7 @@ for end users.}
@defproc*[([(raise-type-error [name symbol?][expected string?][v any/c]) any]
[(raise-type-error [name symbol?][expected string?][bad-pos nonnegative-exact-integer?][v any/c]) any])]{
[(raise-type-error [name symbol?][expected string?][bad-pos exact-nonnegative-integer?][v any/c]) any])]{
Creates an @scheme[exn:fail:contract] value and @scheme[raise]s it as
an exception. The @scheme[name] argument is used as the source
@ -331,7 +331,7 @@ A parameter whose value is used as the maximum number of characters
used to print a Scheme value that is embedded in a primitive error
message.}
@defparam[error-print-context-length cnt nonnegative-exact-integer?]{
@defparam[error-print-context-length cnt exact-nonnegative-integer?]{
A parameter whose value is used by the default error display handler
as the maximum number of lines of context (or ``stack trace'') to
@ -339,7 +339,7 @@ print; a single ``...'' line is printed if more lines are available
after the first @scheme[cnt] lines. A @scheme[0] value for
@scheme[cnt] disables context printing entirely.}
@defparam[error-value->string-handler proc (any/c nonnegative-exact-integer?
@defparam[error-value->string-handler proc (any/c exact-nonnegative-integer?
. -> .
string?)]{
@ -526,10 +526,10 @@ Returns the @scheme[srcloc]-getting procedure associated with @scheme[v].}
@defstruct[srcloc ([source any/c]
[line (or/c positive-exact-integer? false/c)]
[column (or/c nonnegative-exact-integer? false/c)]
[position (or/c positive-exact-integer? false/c)]
[span (or/c nonnegative-exact-integer? false/c)])
[line (or/c exact-positive-integer? false/c)]
[column (or/c exact-nonnegative-integer? false/c)]
[position (or/c exact-positive-integer? false/c)]
[span (or/c exact-nonnegative-integer? false/c)])
#:inspector #f]{
The fields of an @scheme[srcloc] instance are as follows:

View File

@ -283,7 +283,7 @@ given file or directory path. On error (e.g., if no such file exists),
the @exnraise[exn:fail:filesystem]. Under @|AllUnix|, permissions are
checked for the current effective user instead of the real user.}
@defproc[(file-size [path path-string?]) nonnegative-exact-integer?]{
@defproc[(file-size [path path-string?]) exact-nonnegative-integer?]{
Returns the (logical) size of the specified file in bytes. Under Mac
OS X, this size excludes the resource-fork size. On error (e.g., if no

View File

@ -193,7 +193,7 @@ caveat above about concurrent modification.}
@defproc[(hash-count [hash hash?])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the number of keys mapped by @scheme[hash]. If
@scheme[hash] is not created with @scheme['weak], then the
@ -203,7 +203,7 @@ above about concurrent modification.}
@defproc[(hash-iterate-first [hash hash?])
(or/c false/c nonnegative-exact-integer?)]{
(or/c false/c exact-nonnegative-integer?)]{
Returns @scheme[#f] if @scheme[hash] contains no elements, otherwise
it returns an integer that is a index to the first element in the hash
@ -214,8 +214,8 @@ refer to the first item only as long as no items are added to or
removed from @scheme[hash].}
@defproc[(hash-iterate-next [hash hash?]
[pos nonnegative-exact-integer?])
(or/c false/c nonnegative-exact-integer?)]{
[pos exact-nonnegative-integer?])
(or/c false/c exact-nonnegative-integer?)]{
Returns either an integer that is an index to the element in
@scheme[hash] after the element indexed by @scheme[pos] (which is not
@ -227,7 +227,7 @@ only as long as no items are added to or removed from @scheme[hash].}
@defproc[(hash-iterate-key [hash hash?]
[pos nonnegative-exact-integer?])
[pos exact-nonnegative-integer?])
any]{
Returns the key for the element in @scheme[hash] at index
@ -236,7 +236,7 @@ Returns the key for the element in @scheme[hash] at index
@defproc[(hash-iterate-value [hash hash?]
[pos nonnegative-exact-integer?])
[pos exact-nonnegative-integer?])
any]{
Returns the value for the element in @scheme[hash] at index

View File

@ -167,7 +167,7 @@ The @scheme[collect-garbage] procedure provides some control over the
timing of collections, but garbage will obviously be collected even if
this procedure is never called.}
@defproc[(current-memory-use [cust custodian? #f]) nonnegative-exact-integer?]{
@defproc[(current-memory-use [cust custodian? #f]) exact-nonnegative-integer?]{
Returns an estimate of the number of bytes of memory occupied by
reachable data from @scheme[cust]. (The estimate is calculated

View File

@ -73,18 +73,18 @@ Returns a newly allocated list with the same elements as
@defproc[(mlength [mlst mlist?])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the number of elements in @scheme[mlst].}
@defproc[(mlist-ref [mlst mlist?][pos nonnegative-exact-integer?])
@defproc[(mlist-ref [mlst mlist?][pos exact-nonnegative-integer?])
any/c]{
Like @scheme[list-ref], but for @tech{mutable lists}.}
@defproc[(mlist-tail [mlst mlist?][pos nonnegative-exact-integer?])
@defproc[(mlist-tail [mlst mlist?][pos exact-nonnegative-integer?])
any/c]{
Like @scheme[list-tail], but for @tech{mutable lists}.}

View File

@ -13,9 +13,9 @@
For information about TCP in general, see @italic{TCP/IP Illustrated,
Volume 1} by W. Richard Stevens.
@defproc[(tcp-listen [port-no (and/c nonnegative-exact-integer?
@defproc[(tcp-listen [port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))]
[max-allow-wait nonnegative-exact-integer? 4]
[max-allow-wait exact-nonnegative-integer? 4]
[reuse? any/c #f]
[hostname (or/c string? false/c) #f])
tcp-listener?]
@ -62,10 +62,10 @@ If the server cannot be started by @scheme[tcp-listen], the
@defproc[(tcp-connect [hostname string?]
[port-no (and/c nonnegative-exact-integer?
[port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))]
[local-hostname (or/c string? false/c) #f]
[local-port-no (or/c (and/c nonnegative-exact-integer?
[local-port-no (or/c (and/c exact-nonnegative-integer?
(integer-in 1 65535))
false/c)
#f])
@ -119,10 +119,10 @@ If a connection cannot be established by @scheme[tcp-connect], the
@exnraise[exn:fail:network].}
@defproc[(tcp-connect/enable-break [hostname string?]
[port-no (and/c nonnegative-exact-integer?
[port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))]
[local-hostname (or/c string? false/c) #f]
[local-port-no (or/c (and/c nonnegative-exact-integer?
[local-port-no (or/c (and/c exact-nonnegative-integer?
(integer-in 1 65535))
false/c)])
(values input-port? output-port?)]{
@ -283,7 +283,7 @@ non-@scheme[#f], then the socket's protocol family is IPv4.}
@defproc[(udp-bind! [udp-socket udp?]
[hostname-string (or/c string? false/c)]
[port-no (and/c nonnegative-exact-integer?
[port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))])
void?]{
@ -319,7 +319,7 @@ If @scheme[udp-socket] is already bound or closed, the
@defproc[(udp-connect! [udp-socket udp?]
[hostname-string (or/c string? false/c)]
[port-no (or/c (and/c nonnegative-exact-integer?
[port-no (or/c (and/c exact-nonnegative-integer?
(integer-in 1 65535))
false/c)])
void?]{
@ -344,11 +344,11 @@ If @scheme[udp-socket] is closed, the @exnraise[exn:fail:network].}
@defproc[(udp-send-to [udp-socket udp?]
[hostname string?]
[port-no (and/c nonnegative-exact-integer?
[port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))]
[bstr bytes?]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
void]{
Sends @scheme[(subbytes bytes start-pos end-pos)] as a datagram from
@ -368,8 +368,8 @@ If @scheme[udp-socket] is closed or connected, the
@defproc[(udp-send [udp-socket udp?]
[bstr bytes?]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
void]{
Like @scheme[udp-send-to], except that @scheme[udp-socket] must be
@ -379,11 +379,11 @@ connected, and the datagram goes to the connection target. If
@defproc[(udp-send-to* [udp-socket udp?]
[hostname string?]
[port-no (and/c nonnegative-exact-integer?
[port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))]
[bstr bytes?]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
boolean?]{
Like @scheme[udp-send-to], but never blocks; if the socket's outgoing
@ -392,8 +392,8 @@ otherwise the datagram is queued and the result is @scheme[#t].}
@defproc[(udp-send* [udp-socket udp?]
[bstr bytes?]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
boolean?]{
Like @scheme[udp-send], except that (like @scheme[udp-send-to]) it
@ -401,11 +401,11 @@ never blocks and returns @scheme[#f] or @scheme[#t].}
@defproc[(udp-send-to/enable-break [udp-socket udp?]
[hostname string?]
[port-no (and/c nonnegative-exact-integer?
[port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))]
[bstr bytes?]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
void]{
Like @scheme[udp-send-to], but breaking is enabled (see
@ -417,8 +417,8 @@ is raised, but not both.}
@defproc[(udp-send/enable-break [udp-socket udp?]
[bstr bytes?]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
void]{
Like @scheme[udp-send], except that breaks are enabled like
@ -427,9 +427,9 @@ Like @scheme[udp-send], except that breaks are enabled like
@defproc[(udp-receive! [udp-socket udp?]
[bstr (and/c bytes? (not immutable?))]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
(values nonnegative-exact-integer?
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
(values exact-nonnegative-integer?
string?
(integer-in 1 65535))]{
@ -454,9 +454,9 @@ the length of @scheme[bstr], the @exnraise[exn:fail:contract].}
@defproc[(udp-receive!* [udp-socket udp?]
[bstr (and/c bytes? (not immutable?))]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
(values (or/c nonnegative-exact-integer? false/c)
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
(values (or/c exact-nonnegative-integer? false/c)
(or/c string? false/c)
(or/c (integer-in 1 65535) false/c))]{
@ -465,9 +465,9 @@ datagram is available, the three result values are all @scheme[#f].}
@defproc[(udp-receive!/enable-break [udp-socket udp?]
[bstr (and/c bytes? (not immutable?))]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
(values nonnegative-exact-integer?
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
(values exact-nonnegative-integer?
string?
(integer-in 1 65535))]{
@ -517,11 +517,11 @@ would block.}
@defproc[(udp-send-to-evt [udp-socket udp?]
[hostname string?]
[port-no (and/c nonnegative-exact-integer?
[port-no (and/c exact-nonnegative-integer?
(integer-in 1 65535))]
[bstr bytes?]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
evt?]{
Returns a @tech{synchronizable event}. The event is in a blocking
@ -534,8 +534,8 @@ bstr start-pos end-pos)], and the synchronization result is
@defproc[(udp-send-evt [udp-socket udp?]
[bstr bytes?]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
evt?]{
Returns a @tech{synchronizable event}. The event is in a blocking
@ -549,8 +549,8 @@ attempt.}
@defproc[(udp-receive!-evt [udp-socket udp?]
[bstr (and/c bytes? (not immutable?))]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
evt?]{
Returns a @tech{synchronizable event}. The event is in a blocking

View File

@ -593,7 +593,7 @@ produces @scheme[+nan.0] in the case that neither @scheme[y] nor
@defproc*[([(random [k (integer-in 1 4294967087)]
[generator pseudo-random-generator?
(current-pseudo-random-generator)])
nonnegative-exact-integer?]
exact-nonnegative-integer?]
[(random [generator pseudo-random-generator?
(current-pseudo-random-generator)])
(and/c real? inexact? (>/c 0) (</c 1))])]{
@ -700,7 +700,7 @@ which can be overriden by @litchar{#b}, @litchar{#o}, @litchar{#d}, or
(string->number "111" 7) (string->number "#b111" 7)]
}
@defproc[(real->decimal-string [n real?] [decimal-digits nonnegative-exact-integer? 2])
@defproc[(real->decimal-string [n real?] [decimal-digits exact-nonnegative-integer? 2])
string?]{
Prints @scheme[n] into a string and returns the string. The printed

View File

@ -117,12 +117,12 @@ is the value produced by @scheme[(proc _i)].
@section{List Operations}
@defproc[(length [lst list?])
nonnegative-exact-integer?]{
exact-nonnegative-integer?]{
Returns the number of elements in @scheme[lst].}
@defproc[(list-ref [lst any/c] [pos nonnegative-exact-integer?])
@defproc[(list-ref [lst any/c] [pos exact-nonnegative-integer?])
any/c]{
Returns the element of @scheme[lst] at position @scheme[pos], where
@ -134,7 +134,7 @@ The @scheme[lst] argument need not actually be a list; @scheme[lst]
must merely start with a chain of at least @scheme[pos] pairs.}
@defproc[(list-tail [lst any/c] [pos nonnegative-exact-integer?])
@defproc[(list-tail [lst any/c] [pos exact-nonnegative-integer?])
any/c]{
Returns the list after the first @scheme[pos] elements of
@ -515,7 +515,7 @@ Like @scheme[assoc], but finds an element using the predicate
@defproc[(last-pair [p pair?]) pair?]{
Returns the last pair of a (possibly improper) list.}
@defproc[(take [lst any/c] [pos nonnegative-exact-integer?]) list?]{
@defproc[(take [lst any/c] [pos exact-nonnegative-integer?]) list?]{
Returns a fresh list whose elements are the first @scheme[pos] elements of
@scheme[lst]. If @scheme[lst] has fewer than
@scheme[pos] elements, the @exnraise[exn:fail:contract].
@ -528,10 +528,10 @@ must merely start with a chain of at least @scheme[pos] pairs.
(take 'non-list 0)
]}
@defproc[(drop [lst any/c] [pos nonnegative-exact-integer?]) any/c]{
@defproc[(drop [lst any/c] [pos exact-nonnegative-integer?]) any/c]{
Just like @scheme[list-tail].}
@defproc[(split-at [lst any/c] [pos nonnegative-exact-integer?])
@defproc[(split-at [lst any/c] [pos exact-nonnegative-integer?])
(values list? any/c)]{
Returns the same result as
@ -539,7 +539,7 @@ Returns the same result as
except that it can be faster.}
@defproc[(take-right [lst any/c] [pos nonnegative-exact-integer?]) any/c]{
@defproc[(take-right [lst any/c] [pos exact-nonnegative-integer?]) any/c]{
Returns the @scheme[list]'s @scheme[pos]-length tail. If @scheme[lst]
has fewer than @scheme[pos] elements, then the
@exnraise[exn:fail:contract].
@ -552,7 +552,7 @@ must merely end with a chain of at least @scheme[pos] pairs.
(take-right 'non-list 0)
]}
@defproc[(drop-right [lst any/c] [pos nonnegative-exact-integer?]) list?]{
@defproc[(drop-right [lst any/c] [pos exact-nonnegative-integer?]) list?]{
Returns a fresh list whose elements are the prefix of @scheme[lst],
dropping its @scheme[pos]-length tail. If @scheme[lst] has fewer than
@scheme[pos] elements, then the @exnraise[exn:fail:contract].
@ -565,7 +565,7 @@ must merely end with a chain of at least @scheme[pos] pairs.
(drop-right 'non-list 0)
]}
@defproc[(split-at-right [lst any/c] [pos nonnegative-exact-integer?])
@defproc[(split-at-right [lst any/c] [pos exact-nonnegative-integer?])
(values list? any/c)]{
Returns the same result as

View File

@ -7,7 +7,7 @@ A Scheme @deftech{pipe} is internal to Scheme, and not related to
OS-level pipes (which are @tech{file-stream ports}) for communicating
between different processes.
@defproc[(make-pipe [limit positive-exact-integer? #f]
@defproc[(make-pipe [limit exact-positive-integer? #f]
[input-name any/c 'pipe]
[output-name any/c 'pipe])
(values input-port? output-port?)]{

View File

@ -76,8 +76,8 @@ If @scheme[mode] is not provided, the current mode is returned, or
@scheme[file-stream-port] is an input port and @scheme[mode] is
@scheme['line], the @exnraise[exn:fail:contract].}
@defproc*[([(file-position [port port?]) nonnegative-exact-integer?]
[(file-position [port port?] [pos (or/c nonnegative-exact-integer? eof-object?)]) void?])]{
@defproc*[([(file-position [port port?]) exact-nonnegative-integer?]
[(file-position [port port?] [pos (or/c exact-nonnegative-integer? eof-object?)]) void?])]{
Returns or sets the current read/write position of @scheme[port].

View File

@ -48,13 +48,13 @@ input ports as it becomes available.}
[get-location (or/c
(->
(values
(or/c positive-exact-integer? false/c)
(or/c nonnegative-exact-integer? false/c)
(or/c positive-exact-integer? false/c)))
(or/c exact-positive-integer? false/c)
(or/c exact-nonnegative-integer? false/c)
(or/c exact-positive-integer? false/c)))
false/c)
#f]
[count-lines! (-> any) void]
[init-position positive-exact-integer? 1]
[init-position exact-positive-integer? 1]
[buffer-mode (or/c (case-> ((one-of/c 'block 'none) . -> . any)
(-> (one-of/c 'block 'none #f)))
false/c)

View File

@ -50,9 +50,9 @@ counting is automatically enabled for the port. Line counting cannot
be disabled for a port after it is enabled.}
@defproc[(port-next-location [port port?])
(values (or/c positive-exact-integer? false/c)
(or/c nonnegative-exact-integer? false/c)
(or/c positive-exact-integer? false/c))]{
(values (or/c exact-positive-integer? false/c)
(or/c exact-nonnegative-integer? false/c)
(or/c exact-positive-integer? false/c))]{
Returns three values: an integer or @scheme[#f] for the line number of
the next read/written item, an integer or @scheme[#f] for the next

View File

@ -226,7 +226,7 @@ must require no more keywords than the ones listed din
(show #:init 0 1 2 3 #:extra 4 #:more 7)
]}
@defstruct[arity-at-least ([value nonnegative-exact-integer?])]{
@defstruct[arity-at-least ([value exact-nonnegative-integer?])]{
This structure type is used for the result of @scheme[procedure-arity].
See also @scheme[procedure-arity?].}

View File

@ -203,8 +203,8 @@ case-sensitively.
@defproc[(regexp-match [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f]
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
[output-port (or/c output-port? false/c) #f])
(or/c (listof (or/c (cons (or/c string? bytes?)
(or/c string? bytes?))
@ -303,8 +303,8 @@ bytes. To avoid such interleaving, use @scheme[regexp-match-peek]
@defproc[(regexp-match* [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f])
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f])
(listof (or/c string? bytes?))]{
Like @scheme[regexp-match], but the result is a list of strings or
@ -334,8 +334,8 @@ port).
@defproc[(regexp-try-match
[pattern (or/c string? bytes? regexp? byte-regexp?)]
[input input-port?]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f]
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
[output-port (or/c output-port? false/c) #f])
(or/c (listof (or/c (cons (or/c string? bytes?)
(or/c string? bytes?))
@ -355,11 +355,11 @@ fails.}
@defproc[(regexp-match-positions [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f]
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
[output-port (or/c output-port? false/c) #f])
(or/c (listof (or/c (cons nonnegative-exact-integer?
nonnegative-exact-integer?)
(or/c (listof (or/c (cons exact-nonnegative-integer?
exact-nonnegative-integer?)
false/c))
false/c)]{
@ -386,10 +386,10 @@ positions indicate the number of bytes that were read, including
@defproc[(regexp-match-positions* [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f])
(listof (cons nonnegative-exact-integer?
nonnegative-exact-integer?))]{
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f])
(listof (cons exact-nonnegative-integer?
exact-nonnegative-integer?))]{
Like @scheme[regexp-match-positions], but returns multiple matches
like @scheme[regexp-match*].
@ -401,8 +401,8 @@ like @scheme[regexp-match*].
@defproc[(regexp-match? [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f]
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
[output-port (or/c output-port? false/c) #f])
boolean?]{
@ -430,8 +430,8 @@ entire content of @scheme[input] matches @scheme[pattern].
@defproc[(regexp-match-peek [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input input-port?]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f]
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
[progress (or/c evt false/c) #f])
(or/c (listof (or/c (cons bytes? bytes?)
false/c))
@ -460,11 +460,11 @@ information if another process meanwhile reads from
@defproc[(regexp-match-peek-positions [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input input-port?]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f]
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
[progress (or/c evt false/c) #f])
(or/c (listof (or/c (cons nonnegative-exact-integer?
nonnegative-exact-integer?)
(or/c (listof (or/c (cons exact-nonnegative-integer?
exact-nonnegative-integer?)
false/c))
false/c)]{
@ -475,8 +475,8 @@ bytes from @scheme[input-port] instead of reading them, and with a
@defproc[(regexp-match-peek-immediate [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input input-port?]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f]
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
[progress (or/c evt false/c) #f])
(or/c (listof (or/c (cons bytes? bytes?)
false/c))
@ -490,11 +490,11 @@ match fails if not-yet-available characters might be used to match
@defproc[(regexp-match-peek-positions-immediate [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input input-port?]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f]
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f]
[progress (or/c evt false/c) #f])
(or/c (listof (or/c (cons nonnegative-exact-integer?
nonnegative-exact-integer?)
(or/c (listof (or/c (cons exact-nonnegative-integer?
exact-nonnegative-integer?)
false/c))
false/c)]{
@ -506,10 +506,10 @@ used to match @scheme[pattern].}
@defproc[(regexp-match-peek-positions* [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input input-port?]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f])
(listof (cons nonnegative-exact-integer?
nonnegative-exact-integer?))]{
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f])
(listof (cons exact-nonnegative-integer?
exact-nonnegative-integer?))]{
Like @scheme[regexp-match-peek-positions], but returns multiple matches like
@scheme[regexp-match*].}
@ -519,8 +519,8 @@ Like @scheme[regexp-match-peek-positions], but returns multiple matches like
@defproc[(regexp-split [pattern (or/c string? bytes? regexp? byte-regexp?)]
[input (or/c string? bytes? input-port?)]
[start-pos nonnegative-exact-integer? 0]
[end-pos (or/c nonnegative-exact-integer? false/c) #f])
[start-pos exact-nonnegative-integer? 0]
[end-pos (or/c exact-nonnegative-integer? false/c) #f])
(listof (or/c string? bytes?))]{
The complement of @scheme[regexp-match*]: the result is a list of

View File

@ -19,7 +19,7 @@ thread is eventually unblocked.
In addition to its use with semaphore-specific procedures, semaphores
can be used as events; see @secref["sync"].
@defproc[(make-semaphore [init nonnegative-exact-integer? 0]) semaphore?]{
@defproc[(make-semaphore [init exact-nonnegative-integer? 0]) semaphore?]{
Creates and returns a new semaphore with the counter initially set to
@scheme[init]. If @scheme[init-k] is larger than a semaphore's maximum

View File

@ -70,7 +70,7 @@ is opened in text mode, @scheme['linefeed] is usually the appropriate
(or/c bytes? eof-object?)]{
Like @scheme[read-line], but reads bytes and produces a byte string.}
@defproc[(read-string [amt nonnegative-exact-integer?]
@defproc[(read-string [amt exact-nonnegative-integer?]
[in input-port? (current-input-port)])
(or/c string? eof-object)]{
@ -91,16 +91,16 @@ If an error occurs during reading, some characters may be lost; that
is, if @scheme[read-string] successfully reads some characters before
encountering an error, the characters are dropped.}
@defproc[(read-bytes [amt nonnegative-exact-integer?]
@defproc[(read-bytes [amt exact-nonnegative-integer?]
[in input-port? (current-input-port)])
(or/c bytes? eof-object)]{
Like @scheme[read-string], but reads bytes and produces a byte string.}
@defproc[(read-string! [str (and/c string? (not/c immutable?))]
[in input-port? (current-input-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (string-length str)])
(or/c positive-exact-integer? eof-object?)]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (string-length str)])
(or/c exact-positive-integer? eof-object?)]{
Reads characters from @scheme[in] like @scheme[read-string], but puts
them into @scheme[str] starting from index @scheme[start-pos]
@ -120,17 +120,17 @@ not modified at indices @math{@scheme[start-pos]+m} though
@defproc[(read-bytes! [bstr bytes?]
[in input-port? (current-input-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
(or/c positive-exact-integer? eof-object?)]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
(or/c exact-positive-integer? eof-object?)]{
Like @scheme[read-string!], but reads bytes, puts them into a byte
string, and returns the number of bytes read.}
@defproc[(read-bytes-avail! [bstr bytes?]
[in input-port? (current-input-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
(or/c positive-exact-integer? eof-object? procedure?)]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
(or/c exact-positive-integer? eof-object? procedure?)]{
Like @scheme[read-bytes!], but it returns without blocking after
reading immediately-available bytes, and it may return a procedure for
@ -156,9 +156,9 @@ as are available before a special value in the port's stream.}
@defproc[(read-bytes-avail!* [bstr bytes?]
[in input-port? (current-input-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
(or/c nonnegative-exact-integer? eof-object? procedure?)]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
(or/c exact-nonnegative-integer? eof-object? procedure?)]{
Like @scheme[read-bytes-avail!], but returns @scheme[0] immediately if
no bytes (or specials) are available for reading and the end-of-file
@ -166,9 +166,9 @@ is not reached.}
@defproc[(read-bytes-avail!/enable-break [bstr bytes?]
[in input-port? (current-input-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
(or/c positive-exact-integer? eof-object? procedure?)]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
(or/c exact-positive-integer? eof-object? procedure?)]{
Like @scheme[read-bytes-avail!], but breaks are enabled during the
read (see also @secref["breakhandler"]). If breaking is disabled
@ -177,8 +177,8 @@ when @scheme[read-bytes-avail!/enable-break] is called, and if the
no bytes will have been read from @scheme[in].}
@defproc[(peek-string [amt nonnegative-exact-integer?]
[skip-bytes-amt nonnegative-exact-integer?]
@defproc[(peek-string [amt exact-nonnegative-integer?]
[skip-bytes-amt exact-nonnegative-integer?]
[in input-port? (current-input-port)])
(or/c string? eof-object)]{
@ -204,37 +204,37 @@ If a port produces @scheme[eof] mid-stream, peek skips beyond the
@scheme[eof] always produce @scheme[eof] until the @scheme[eof] is
read.}
@defproc[(peek-bytes [amt nonnegative-exact-integer?]
[skip-bytes-amt nonnegative-exact-integer?]
@defproc[(peek-bytes [amt exact-nonnegative-integer?]
[skip-bytes-amt exact-nonnegative-integer?]
[in input-port? (current-input-port)])
(or/c bytes? eof-object)]{
Like @scheme[peek-string], but peeks bytes and produces a byte string.}
@defproc[(peek-string! [str (and/c string? (not/c immutable?))]
[skip-bytes-amt nonnegative-exact-integer?]
[skip-bytes-amt exact-nonnegative-integer?]
[in input-port? (current-input-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (string-length str)])
(or/c positive-exact-integer? eof-object?)]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (string-length str)])
(or/c exact-positive-integer? eof-object?)]{
Like @scheme[read-string!], but for peeking, and with a
@scheme[skip-bytes-amt] argument like @scheme[peek-string].}
@defproc[(peek-bytes! [bstr (and/c bytes? (not/c immutable?))]
[skip-bytes-amt nonnegative-exact-integer?]
[skip-bytes-amt exact-nonnegative-integer?]
[in input-port? (current-input-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
(or/c positive-exact-integer? eof-object?)]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
(or/c exact-positive-integer? eof-object?)]{
Like @scheme[peek-string!], but peeks bytes, puts them into a byte
string, and returns the number of bytes read.}
@defproc[(peek-bytes-avail! [bstr (and/c bytes? (not/c immutable?))]
[skip-bytes-amt nonnegative-exact-integer?]
[skip-bytes-amt exact-nonnegative-integer?]
[progress (or/c evt? false/c) #f]
[in input-port? (current-input-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
(or/c nonnegative-exact-integer? eof-object? procedure?)]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
(or/c exact-nonnegative-integer? eof-object? procedure?)]{
Like @scheme[read-bytes-avail!], but for peeking, and with two extra
arguments. The @scheme[skip-bytes-amt] argument is as in
@ -253,12 +253,12 @@ The result of @scheme[peek-bytes-avail!] is @scheme[0] only in the
case that @scheme[progress] becomes ready before bytes are peeked.}
@defproc[(peek-bytes-avail!* [bstr (and/c bytes? (not/c immutable?))]
[skip-bytes-amt nonnegative-exact-integer?]
[skip-bytes-amt exact-nonnegative-integer?]
[progress (or/c evt? false/c) #f]
[in input-port? (current-input-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
(or/c nonnegative-exact-integer? eof-object? procedure?)]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
(or/c exact-nonnegative-integer? eof-object? procedure?)]{
Like @scheme[read-bytes-avail!*], but for peeking, and with
@scheme[skip-bytes-amt] and @scheme[progress] arguments like
@ -267,12 +267,12 @@ return before even @scheme[skip-amt] bytes are available from the
port.}
@defproc[(peek-bytes-avail!/enable-break [bstr (and/c bytes? (not/c immutable?))]
[skip-bytes-amt nonnegative-exact-integer?]
[skip-bytes-amt exact-nonnegative-integer?]
[progress (or/c evt? false/c) #f]
[in input-port? (current-input-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
(or/c nonnegative-exact-integer? eof-object? procedure?)]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
(or/c exact-nonnegative-integer? eof-object? procedure?)]{
Like @scheme[read-bytes-avail!/enable-break], but for peeking, and
with @scheme[skip-bytes-amt] and @scheme[progress] arguments like
@scheme[peek-bytes-avail!].}
@ -293,7 +293,7 @@ Like @scheme[read-char-or-special], but reads and returns a byte
instead of a character.}
@defproc[(peek-char [in input-port? (current-input-port)]
[skip-bytes-amt nonnegative-exact-integer? 0])
[skip-bytes-amt exact-nonnegative-integer? 0])
(or/c character? eof-object?)]{
Like @scheme[read-char], but peeks instead of reading, and skipping
@ -301,21 +301,21 @@ Like @scheme[read-char], but peeks instead of reading, and skipping
port.}
@defproc[(peek-byte [in input-port? (current-input-port)]
[skip-bytes-amt nonnegative-exact-integer? 0])
[skip-bytes-amt exact-nonnegative-integer? 0])
(or/c byte? eof-object?)]{
Like @scheme[peek-char], but reads and returns a byte instead of a
character.}
@defproc[(peek-char-or-special [in input-port? (current-input-port)]
[skip-bytes-amt nonnegative-exact-integer? 0])
[skip-bytes-amt exact-nonnegative-integer? 0])
(or/c character? eof-object? any/c)]{
Like @scheme[peek-char], but if the input port returns a non-byte
value after @scheme[skip-bytes-amt] byte positions, it is returned.}
@defproc[(peek-byte-or-special [in input-port? (current-input-port)]
[skip-bytes-amt nonnegative-exact-integer? 0]
[skip-bytes-amt exact-nonnegative-integer? 0]
[progress (or/c evt? false/c) #f])
(or/c character? eof-object? any/c)]{
@ -339,7 +339,7 @@ for @scheme[in]. All built-in kinds of ports support progress events,
but ports created with @scheme[make-input-port] (see
@secref["customport"]) may not.}
@defproc[(port-commit-peeked [amt nonnegative-exact-integer?]
@defproc[(port-commit-peeked [amt exact-nonnegative-integer?]
[progress evt?]
[evt evt?]
[in input-port? (current-input-port)])

View File

@ -22,8 +22,8 @@ The same as @scheme[(write-char #\newline out)].}
@defproc[(write-string [str string?]
[out output-port? (current-output-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (string-length str)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (string-length str)])
void?]{
Writes characters to @scheme[out] from @scheme[str] starting from
@ -37,17 +37,17 @@ is always @scheme[(- end-pos start-pos)].}
@defproc[(write-bytes [bstr bytes?]
[out output-port? (current-output-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
void?]{
Like @scheme[write-string], but writes bytes instead of characters.}
@defproc[(write-bytes-avail [bstr bytes?]
[out output-port? (current-output-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
nonnegative-exact-integer?]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
exact-nonnegative-integer?]{
Like @scheme[write-bytes], but returns without blocking after writing
as many bytes as it can immediately flush. It blocks only if no bytes
@ -67,9 +67,9 @@ is raised.}
@defproc[(write-bytes-avail* [bstr bytes?]
[out output-port? (current-output-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
(or/c nonnegative-exact-integer? false/c)]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
(or/c exact-nonnegative-integer? false/c)]{
Like @scheme[write-bytes-avail], but never blocks, returns @scheme[#f]
if the port contains buffered data that cannot be written immediately,
@ -78,9 +78,9 @@ flushed but no additional bytes can be written immediately.}
@defproc[(write-bytes-avail/enable-break [bstr bytes?]
[out output-port? (current-output-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
nonnegative-exact-integer?]{
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
exact-nonnegative-integer?]{
Like @scheme[write-bytes-avail], except that breaks are enabled during
the write. The procedure provides a guarantee about the interaction of
@ -106,8 +106,8 @@ is written.}
@defproc[(write-bytes-avail-evt [bstr bytes?]
[out output-port? (current-output-port)]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (bytes-length bstr)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (bytes-length bstr)])
evt?]{
Similar to @scheme[write-bytes-avail], but instead of writing bytes

View File

@ -31,8 +31,8 @@ same as @scheme[open-output-bytes].}
@defproc[(get-output-bytes [out output-port?]
[reset? any/c #f]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? #f])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? #f])
bytes?]{
Returns the bytes accumulated in @scheme[out] so far in a

View File

@ -72,11 +72,11 @@ Returns two values:
@defproc[(struct-type-info [struct-type struct-type?])
(values symbol?
nonnegative-exact-integer?
nonnegative-exact-integer?
exact-nonnegative-integer?
exact-nonnegative-integer?
struct-accessor-procedure?
struct-mutator-procedure?
(listof nonnegative-exact-integer?)
(listof exact-nonnegative-integer?)
(or/c struct-type? false/c)
boolean?)]{

View File

@ -19,7 +19,7 @@ object that is marshaled as part of compiled code; see also
@defproc[(syntax-line [stx syntax?])
(or/c positive-exact-integer?
(or/c exact-positive-integer?
false/c)]{
Returns the line number (positive exact integer) for the start of the
@ -43,7 +43,7 @@ about marshaling compiled @tech{syntax object}s.}
@defproc[(syntax-position [stx syntax?])
(or/c positive-exact-integer?
(or/c exact-positive-integer?
false/c)]{
Returns the character position (positive exact integer) for the start

View File

@ -90,7 +90,7 @@ Blocks until the process represented by @scheme[subproc] terminates.}
@defproc[(subprocess-status [subproc subprocess?])
(or/c (one-of/c 'running)
nonnegative-exact-integer?)]{
exact-nonnegative-integer?)]{
Returns @indexed-scheme['running] if the process represented by
@scheme[subproc] is still running, or its exit code otherwise. The
@ -111,7 +111,7 @@ might handle the signal without terminating). Under Windows, no action
is taken when @scheme[force?] is @scheme[#f].}
@defproc[(subprocess-pid [subproce subprocess?]) nonnegative-exact-integer?]{
@defproc[(subprocess-pid [subproce subprocess?]) exact-nonnegative-integer?]{
Returns the operating system's numerical ID (if any) for the process
represented by @scheme[subproc], valid only as long as the process is
@ -265,7 +265,7 @@ Like @scheme[system*], but returns the exit code like
@defproc[(process [command string?])
(list input-port?
output-port?
nonnegative-exact-integer?
exact-nonnegative-integer?
input-port?
((one-of/c 'status 'wait 'interrupt 'kill) . -> . any))]{

View File

@ -27,7 +27,7 @@ of the sequence. See also @scheme[in-vector].
Returns @scheme[#t] if @scheme[v] is a vector, @scheme[#f] otherwise.}
@defproc[(make-vector [size nonnegative-exact-integer?]
@defproc[(make-vector [size exact-nonnegative-integer?]
[v any/c 0]) vector?]{
Returns a mutable vector with @scheme[size] slots, where all slots are
@ -50,19 +50,19 @@ order.}
@defproc[(vector-length [vec vector?]) nonnegative-exact-integer?]{
@defproc[(vector-length [vec vector?]) exact-nonnegative-integer?]{
Returns the length of @scheme[vec] (i.e., the number of slots in the
vector).}
@defproc[(vector-ref [vec vector?][pos nonnegative-exact-integer?]) any/c]{
@defproc[(vector-ref [vec vector?][pos exact-nonnegative-integer?]) any/c]{
Returns the element in slot @scheme[pos] of @scheme[vec]. The first
slot is position @scheme[0], and the last slot is one less than
@scheme[(vector-length vec)].}
@defproc[(vector-set! [vec (and/c vector? (not/c immutable?))]
[pos nonnegative-exact-integer?]
[pos exact-nonnegative-integer?]
[v any/c])
void?]{
@ -121,8 +121,8 @@ Changes all slots of @scheme[vec] to contain @scheme[v].}
@defproc[(vector->values [vec vector?]
[start-pos nonnegative-exact-integer? 0]
[end-pos nonnegative-exact-integer? (vector-length vec)])
[start-pos exact-nonnegative-integer? 0]
[end-pos exact-nonnegative-integer? (vector-length vec)])
any]{
Returns @math{@scheme[end-pos] - @scheme[start-pos]} values, which are

View File

@ -150,7 +150,7 @@ an element with style @scheme[#f].}
@def-style-proc[subscript]
@def-style-proc[superscript]
@defproc[(hspace [n nonnegative-exact-integer?]) element?]{
@defproc[(hspace [n exact-nonnegative-integer?]) element?]{
Produces an element containing @scheme[n] spaces and style
@scheme['hspace].}

View File

@ -689,14 +689,14 @@ Like @scheme[content->string], but for a single @tech{element}.
}
@defproc[(element-width (element any/c)) nonnegative-exact-integer?]{
@defproc[(element-width (element any/c)) exact-nonnegative-integer?]{
Returns the width in characters of the given @tech{element}.
}
@defproc[(block-width (e block?)) nonnegative-exact-integer?]{
@defproc[(block-width (e block?)) exact-nonnegative-integer?]{
Returns the width in characters of the given @tech{block}.}

View File

@ -924,7 +924,7 @@ factor. If the factor is greater tham 1, the color is lightened by
dividing the gap between the RGB components and 255 by the factor.}
@defproc[(color-series [dc (is-a?/c dc<%>)]
[max-step nonnegative-exact-integer?]
[max-step exact-nonnegative-integer?]
[step-delta (and/c exact? positive?)]
[start (or/c string? (is-a?/c color%))]
[end (or/c string? (is-a?/c color%))]
@ -978,8 +978,8 @@ repeated calls to @scheme[draw-pict].}
@defproc[(show-pict [pict pict?]
[w (or/c false/c nonnegative-exact-integer?) #f]
[h (or/c false/c nonnegative-exact-integer?) #f])
[w (or/c false/c exact-nonnegative-integer?) #f]
[h (or/c false/c exact-nonnegative-integer?) #f])
void?]{
Opens a frame that displays @scheme[pict]. The frame adds one method,

View File

@ -386,7 +386,7 @@ triggered via the @DFlag{condense} command-line flag.}
@section{Configuration}
@defparam[current-font-size n nonnegative-exact-integer?]{
@defparam[current-font-size n exact-nonnegative-integer?]{
Parameter that determines he font size used by @scheme[t],
@scheme[para], etc. The default size is @scheme[32].}
@ -400,13 +400,13 @@ initial values include @scheme['swiss], @scheme["Verdana"], and
@scheme["Gill Sans"].}
@defparam[current-line-sep n nonnegative-exact-integer?]{
@defparam[current-line-sep n exact-nonnegative-integer?]{
Parameter that controls the amount of space used between lines by
@scheme[para], @scheme[item], and @scheme[subitem].}
@defparam[current-para-width n nonnegative-exact-integer?]{
@defparam[current-para-width n exact-nonnegative-integer?]{
Parameter that controls the width of a pict created by
@scheme[para], @scheme[item], and @scheme[subitem].}
@ -419,7 +419,7 @@ title. The default is @scheme["black"].}
@defparam[current-slide-assembler proc ((or/c string? false/c)
nonnegative-exact-integer?
exact-nonnegative-integer?
pict?
. -> .
pict?)]{