This is the deoxybyte-io Reference Manual, version 0.15.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:58:24 2024 GMT+0.
deoxybyte-io/deoxybyte-io.asd
deoxybyte-io/core/package.lisp
deoxybyte-io/core/conditions.lisp
deoxybyte-io/core/deoxybyte-io.lisp
deoxybyte-io/core/environment.lisp
deoxybyte-io/core/parse-float.lisp
deoxybyte-io/core/ieee-float.lisp
deoxybyte-io/core/binary-operations.lisp
deoxybyte-io/core/streams.lisp
deoxybyte-io/core/line-stream.lisp
deoxybyte-io/core/command-line-interface.lisp
deoxybyte-io/core/files-and-directories.lisp
deoxybyte-io/core/simple-table-parser.lisp
deoxybyte-io/core/external-merge-sort.lisp
deoxybyte-io/core/external-line-sort.lisp
deoxybyte-io/core/sbcl.lisp
The main system appears first, followed by any subsystem dependency.
deoxybyte-io
Keith James
GPL v3
0.15.0
deoxybyte-systems
(system)., at least version "1.0.0"
cl-fad
(system)., at least version "0.6.2"
deoxybyte-utilities
(system)., at least version "0.11.0"
getopt
(system)., at least version "1.0"
core
(module).
Modules are listed depth-first from the system components tree.
deoxybyte-io/core
deoxybyte-io
(system).
package.lisp
(file).
conditions.lisp
(file).
deoxybyte-io.lisp
(file).
environment.lisp
(file).
parse-float.lisp
(file).
ieee-float.lisp
(file).
binary-operations.lisp
(file).
streams.lisp
(file).
line-stream.lisp
(file).
command-line-interface.lisp
(file).
files-and-directories.lisp
(file).
simple-table-parser.lisp
(file).
external-merge-sort.lisp
(file).
external-line-sort.lisp
(file).
sbcl.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
deoxybyte-io/deoxybyte-io.asd
deoxybyte-io/core/package.lisp
deoxybyte-io/core/conditions.lisp
deoxybyte-io/core/deoxybyte-io.lisp
deoxybyte-io/core/environment.lisp
deoxybyte-io/core/parse-float.lisp
deoxybyte-io/core/ieee-float.lisp
deoxybyte-io/core/binary-operations.lisp
deoxybyte-io/core/streams.lisp
deoxybyte-io/core/line-stream.lisp
deoxybyte-io/core/command-line-interface.lisp
deoxybyte-io/core/files-and-directories.lisp
deoxybyte-io/core/simple-table-parser.lisp
deoxybyte-io/core/external-merge-sort.lisp
deoxybyte-io/core/external-line-sort.lisp
deoxybyte-io/core/sbcl.lisp
deoxybyte-io/core/conditions.lisp
package.lisp
(file).
core
(module).
cli-error
(condition).
cli-option-error
(condition).
cli-option-warning
(condition).
cli-warning
(condition).
field-of
(reader method).
field-validation-error
(condition).
general-parse-error
(condition).
incompatible-value
(condition).
io-error
(condition).
io-warning
(condition).
malformed-field-error
(condition).
malformed-file-error
(condition).
malformed-record-error
(condition).
missing-required-option
(condition).
missing-required-value
(condition).
name-of
(reader method).
name-of
(reader method).
record-of
(reader method).
record-validation-error
(condition).
unknown-command
(condition).
unknown-option
(condition).
unmatched-option
(condition).
deoxybyte-io/core/deoxybyte-io.lisp
conditions.lisp
(file).
core
(module).
check-field
(macro).
check-record
(macro).
deoxybyte-io/core/environment.lisp
deoxybyte-io.lisp
(file).
core
(module).
deoxybyte-io/core/parse-float.lisp
environment.lisp
(file).
core
(module).
parse-float
(function).
*whitespace-chars*
(special variable).
whitespacep
(function).
deoxybyte-io/core/ieee-float.lisp
parse-float.lisp
(file).
core
(module).
decode-ieee-float32
(function).
decode-ieee-float64
(function).
encode-ieee-float32
(function).
encode-ieee-float64
(function).
+exponent-bias-32+
(constant).
+exponent-bias-64+
(constant).
+frac-factor-32+
(constant).
+frac-factor-64+
(constant).
+min-norm-exponent-32+
(constant).
+min-norm-exponent-64+
(constant).
+negative-infinity-32+
(constant).
+negative-infinity-64+
(constant).
+not-a-number-32+
(constant).
+not-a-number-64+
(constant).
+positive-infinity-32+
(constant).
+positive-infinity-64+
(constant).
deoxybyte-io/core/binary-operations.lisp
ieee-float.lisp
(file).
core
(module).
decode-float32be
(function).
decode-float32le
(function).
decode-float64be
(function).
decode-float64le
(function).
decode-int16be
(function).
decode-int16le
(function).
decode-int32be
(function).
decode-int32le
(function).
decode-int64be
(function).
decode-int64le
(function).
decode-int8be
(function).
decode-int8le
(function).
decode-uint16be
(function).
decode-uint16le
(function).
decode-uint32be
(function).
decode-uint32le
(function).
decode-uint64be
(function).
decode-uint64le
(function).
decode-uint8be
(function).
decode-uint8le
(function).
define-integer-decoder
(macro).
define-integer-encoder
(macro).
encode-float32be
(function).
encode-float32le
(function).
encode-float64be
(function).
encode-float64le
(function).
encode-int16be
(function).
encode-int16le
(function).
encode-int32be
(function).
encode-int32le
(function).
encode-int64be
(function).
encode-int64le
(function).
encode-int8be
(function).
encode-int8le
(function).
encode-uint16be
(function).
encode-uint16le
(function).
encode-uint32be
(function).
encode-uint32le
(function).
encode-uint64be
(function).
encode-uint64le
(function).
encode-uint8be
(function).
encode-uint8le
(function).
define-float-decoder
(macro).
define-float-encoder
(macro).
deoxybyte-io/core/streams.lisp
binary-operations.lisp
(file).
core
(module).
initialize-instance
(method).
io-stream-mixin
(class).
open-stream-p
(method).
stream-clear-input
(method).
stream-clear-output
(method).
stream-close
(generic function).
stream-element-type
(method).
stream-file-position
(method).
stream-filter-mixin
(class).
stream-finish-output
(method).
stream-force-output
(method).
stream-of
(reader method).
stream-open
(generic function).
test-of
(reader method).
wrapped-stream-mixin
(class).
stream-delete-file
(generic function).
deoxybyte-io/core/line-stream.lisp
streams.lisp
(file).
core
(module).
character-line-input-stream
(class).
find-line
(generic function).
line-input-stream
(class).
line-output-stream
(class).
line-stack-of
(reader method).
(setf line-stack-of)
(writer method).
line-stream
(class).
make-line-stream
(generic function).
more-lines-p
(generic function).
octet-line-input-stream
(class).
pop-line
(generic function).
push-line
(generic function).
stream-clear-input
(method).
stream-clear-input
(method).
stream-element-type
(method).
stream-element-type
(method).
stream-element-type
(method).
stream-file-position
(method).
stream-file-position
(method).
stream-read-line
(method).
stream-read-line
(method).
%stream-read-sequence
(function).
%stream-write-sequence
(function).
+octet-buffer-size+
(constant).
character-line-output-stream
(class).
octet-buffer
(type).
octet-buffer-index
(type).
octet-line-output-stream
(class).
read-octet-line
(function).
stream-write-line
(generic function).
deoxybyte-io/core/command-line-interface.lisp
line-stream.lisp
(file).
core
(module).
boolean-option-p
(generic function).
cli
(class).
cli-help
(generic function).
cli-option
(class).
define-cli
(macro).
documentation-of
(generic function).
help-message
(generic function).
initialize-instance
(method).
name-of
(reader method).
option-help
(generic function).
option-of
(generic function).
option-slot-p
(generic function).
option-slots-of
(generic function).
option-value
(function).
options-of
(generic function).
parse-command-line
(generic function).
print-object
(method).
print-object
(method).
required-option-p
(reader method).
required-value-p
(generic function).
value-default-of
(reader method).
value-parser-of
(reader method).
value-type-of
(reader method).
with-argv
(macro).
*list-separator-char*
(special variable).
find-option-slot
(generic function).
key-string
(function).
normalise-whitespace
(function).
parse-character
(function).
parse-character-list
(function).
parse-float-list
(function).
parse-integer-list
(function).
parse-safely
(generic function).
parse-string-list
(function).
print-error-message
(function).
subst-chars
(function).
value-type-string
(function).
wrap-string
(function).
deoxybyte-io/core/files-and-directories.lisp
command-line-interface.lisp
(file).
core
(module).
*default-tmpdir*
(special variable).
*default-tmpfile-defaults*
(special variable).
absolute-pathname-p
(function).
delete-tmp-directory
(function).
delete-tmp-pathname
(function).
directory-pathname
(function).
ensure-file-exists
(function).
file-pathname
(function).
leaf-directory-pathname
(function).
leave-tmp-directory
(function).
leave-tmp-pathname
(function).
make-tmp-directory
(function).
pathname-extender
(function).
pathname-generator
(function).
pathstring
(function).
relative-pathname-p
(function).
tmp-pathname
(function).
with-tmp-directory
(macro).
with-tmp-pathname
(macro).
merge-pathstrings
(function).
deoxybyte-io/core/simple-table-parser.lisp
files-and-directories.lisp
(file).
core
(module).
*empty-field*
(special variable).
default-float-parser
(function).
default-integer-parser
(function).
define-line-parser
(macro).
collect-constraint-args
(function).
collect-parser-args
(function).
default-string-parser
(function).
default-validator
(function).
parse-field
(function).
signal-malformed-field
(function).
validate-record
(function).
deoxybyte-io/core/external-merge-sort.lisp
simple-table-parser.lisp
(file).
core
(module).
external-merge-sort
(generic function).
make-merge-stream
(generic function).
merge-stream
(class).
sort-input-stream
(class).
sort-output-stream
(class).
stream-head-of
(reader method).
(setf stream-head-of)
(writer method).
stream-merge
(generic function).
stream-read-element
(generic function).
stream-write-element
(generic function).
merge-element
(function).
stream-delete-file
(method).
deoxybyte-io/core/external-line-sort.lisp
external-merge-sort.lisp
(file).
core
(module).
initialize-instance
(method).
line-merge-stream
(class).
line-sort-input-stream
(class).
line-sort-output-stream
(class).
make-merge-stream
(method).
stream-merge
(method).
stream-read-element
(method).
stream-write-element
(method).
deoxybyte-io/core/sbcl.lisp
external-line-sort.lisp
(file).
core
(module).
environment-variable
(function).
(setf environment-variable)
(function).
print-backtrace
(function).
quit-lisp
(function).
stream-read-sequence
(method).
stream-read-sequence
(method).
stream-write-sequence
(method).
get-system-argv
(function).
Packages are listed by definition order.
uk.co.deoxybyte-io
The deoxybyte-io system is a selection of utility
code focused on transfer of data between Lisp and its environment. It
includes:
- IO and parser conditions
- File and directory utilities
- Command line interface definition utilities
- Stream classes and methods
- Tabular text parsing
- Binary encoding and decoding
deoxybyte-io
dxi
common-lisp
.
uk.co.deoxybyte-utilities
.
*default-tmpdir*
(special variable).
*default-tmpfile-defaults*
(special variable).
*empty-field*
(special variable).
absolute-pathname-p
(function).
boolean-option-p
(generic function).
character-line-input-stream
(class).
check-field
(macro).
check-record
(macro).
cli
(class).
cli-error
(condition).
cli-help
(generic function).
cli-option
(class).
cli-option-error
(condition).
cli-option-warning
(condition).
cli-warning
(condition).
decode-float32be
(function).
decode-float32le
(function).
decode-float64be
(function).
decode-float64le
(function).
decode-ieee-float32
(function).
decode-ieee-float64
(function).
decode-int16be
(function).
decode-int16le
(function).
decode-int32be
(function).
decode-int32le
(function).
decode-int64be
(function).
decode-int64le
(function).
decode-int8be
(function).
decode-int8le
(function).
decode-uint16be
(function).
decode-uint16le
(function).
decode-uint32be
(function).
decode-uint32le
(function).
decode-uint64be
(function).
decode-uint64le
(function).
decode-uint8be
(function).
decode-uint8le
(function).
default-float-parser
(function).
default-integer-parser
(function).
define-cli
(macro).
define-integer-decoder
(macro).
define-integer-encoder
(macro).
define-line-parser
(macro).
delete-tmp-directory
(function).
delete-tmp-pathname
(function).
directory-pathname
(function).
documentation-of
(generic function).
encode-float32be
(function).
encode-float32le
(function).
encode-float64be
(function).
encode-float64le
(function).
encode-ieee-float32
(function).
encode-ieee-float64
(function).
encode-int16be
(function).
encode-int16le
(function).
encode-int32be
(function).
encode-int32le
(function).
encode-int64be
(function).
encode-int64le
(function).
encode-int8be
(function).
encode-int8le
(function).
encode-uint16be
(function).
encode-uint16le
(function).
encode-uint32be
(function).
encode-uint32le
(function).
encode-uint64be
(function).
encode-uint64le
(function).
encode-uint8be
(function).
encode-uint8le
(function).
ensure-file-exists
(function).
environment-variable
(function).
(setf environment-variable)
(function).
external-merge-sort
(generic function).
field-of
(generic reader).
field-validation-error
(condition).
file-pathname
(function).
find-line
(generic function).
general-parse-error
(condition).
help-message
(generic function).
incompatible-value
(condition).
io-error
(condition).
io-stream-mixin
(class).
io-warning
(condition).
leaf-directory-pathname
(function).
leave-tmp-directory
(function).
leave-tmp-pathname
(function).
line-input-stream
(class).
line-merge-stream
(class).
line-output-stream
(class).
line-sort-input-stream
(class).
line-sort-output-stream
(class).
line-stack-of
(generic reader).
(setf line-stack-of)
(generic writer).
line-stream
(class).
make-line-stream
(generic function).
make-merge-stream
(generic function).
make-tmp-directory
(function).
malformed-field-error
(condition).
malformed-file-error
(condition).
malformed-record-error
(condition).
merge-stream
(class).
missing-required-option
(condition).
missing-required-value
(condition).
more-lines-p
(generic function).
name-of
(generic reader).
octet-line-input-stream
(class).
option-help
(generic function).
option-of
(generic function).
option-slot-p
(generic function).
option-slots-of
(generic function).
option-value
(function).
options-of
(generic function).
parse-command-line
(generic function).
parse-float
(function).
pathname-extender
(function).
pathname-generator
(function).
pathstring
(function).
pop-line
(generic function).
print-backtrace
(function).
push-line
(generic function).
quit-lisp
(function).
record-of
(generic reader).
record-validation-error
(condition).
relative-pathname-p
(function).
required-option-p
(generic reader).
required-value-p
(generic function).
sort-input-stream
(class).
sort-output-stream
(class).
stream-close
(generic function).
stream-filter-mixin
(class).
stream-head-of
(generic reader).
(setf stream-head-of)
(generic writer).
stream-merge
(generic function).
stream-of
(generic reader).
stream-open
(generic function).
stream-read-element
(generic function).
stream-write-element
(generic function).
test-of
(generic reader).
tmp-pathname
(function).
unknown-command
(condition).
unknown-option
(condition).
unmatched-option
(condition).
value-default-of
(generic reader).
value-parser-of
(generic reader).
value-type-of
(generic reader).
with-argv
(macro).
with-tmp-directory
(macro).
with-tmp-pathname
(macro).
wrapped-stream-mixin
(class).
%stream-read-sequence
(function).
%stream-write-sequence
(function).
*list-separator-char*
(special variable).
*whitespace-chars*
(special variable).
+exponent-bias-32+
(constant).
+exponent-bias-64+
(constant).
+frac-factor-32+
(constant).
+frac-factor-64+
(constant).
+min-norm-exponent-32+
(constant).
+min-norm-exponent-64+
(constant).
+negative-infinity-32+
(constant).
+negative-infinity-64+
(constant).
+not-a-number-32+
(constant).
+not-a-number-64+
(constant).
+octet-buffer-size+
(constant).
+positive-infinity-32+
(constant).
+positive-infinity-64+
(constant).
character-line-output-stream
(class).
cli-of
(generic reader).
collect-constraint-args
(function).
collect-parser-args
(function).
command-of
(generic reader).
default-string-parser
(function).
default-validator
(function).
define-float-decoder
(macro).
define-float-encoder
(macro).
file-of
(generic reader).
find-option-slot
(generic function).
get-system-argv
(function).
key-string
(function).
merge-element
(function).
merge-pathstrings
(function).
normalise-whitespace
(function).
octet-buffer
(type).
octet-buffer-index
(type).
octet-line-output-stream
(class).
parse-character
(function).
parse-character-list
(function).
parse-field
(function).
parse-float-list
(function).
parse-integer-list
(function).
parse-safely
(generic function).
parse-string-list
(function).
print-error-message
(function).
read-octet-line
(function).
signal-malformed-field
(function).
stream-delete-file
(generic function).
stream-write-line
(generic function).
subst-chars
(function).
type-of
(generic reader).
validate-record
(function).
value-of
(generic reader).
value-type-string
(function).
whitespacep
(function).
wrap-string
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The default temporary file directory pathname.
The defaults used to fill in temporary file pathnames.
The default empty field string.
Checks FIELD of RECORD. If TEST-FORM returns false a
{define-condition malformed-field-error} is raised. The default error
message may be refined with an additional ERROR-MESSAGE.
Arguments:
- test-form (form): A form to be evaluated. If the form returns NIL,
an error is raised.
- record (form): A form that evaluates to a record.
- field (form): A form that evaluates to a field in RECORD.
Optional:
- error-message (string): An error message string.
Rest:
- message-arguments (forms): Forms that evaluate to arguments for the error message.
Checks RECORD. If TEST-FORM returns false a
{define-condition malformed-record-error} is raised. The default error
message may be refined with an additional ERROR-MESSAGE.
Arguments:
- test-form (form): A form to be evaluated. If the form returns NIL,
an error is raised.
- record (form): A form that evaluates to a record.
Optional:
- error-message (string): An error message string.
Rest:
- message-arguments (forms): Forms that evaluate to arguments for the error message.
Defines a new CLI class NAME.
Arguments:
- name (symbol): The class name.
- direct-superclasses (list symbols): The direct superclasses.
- option-specs (list option-specs): The CLI option specifiers.
Each option-spec specifies a slot and its corresponding CLI option
instance.
Arguments:
- slot-name (symbol)
- option-name (string)
Rest:
- cl-option instance initargs
Key:
- documentation (string): Slot (and hence cli-option) documentation.
e.g.
;;; (a "a" :required-option t :value-type ’string
;;; :documentation "Required option A.")
Rest:
- class-options as in defclass.
e.g.
;;; (define-cli example-cli (cli)
;;; ((a "a" :required-option t :value-type ’string
;;; :documentation "Required option A.")
;;; (b "b" :required-option nil :value-type ’integer :value-default 99
;;; :documentation "Required option D."))
;;; (:documentation "An example CLI class definition."))
Defines a function NAME with one mandatory argument, a simple-array
of unsigned-byte 8, and one optional argument, a fixnum index in that
array that defaults to 0. The function returns the Lisp integer whose
value is given by the bytes at that index in the byte array.
Key:
- bytes (fixnum): the number of bytes that comprise the number.
- order (sumbol): the byte order of the array, may be one
of :little-endian or :big-endian ( :network-byte-order may be used
as a synonym for :big-endian ).
- signed (boolean): T if the bytes are a two’s complement
representation of a signed integer.
Defines a function NAME with two mandatory arguments, an integer
and a simple-array of unsigned-byte 8, and one optional argument, a
fixnum index in that array that defaults to 0. The function returns
the buffer containing the encoded integer.
Key:
- bytes (fixnum): the number of bytes that comprise the number.
- order (sumbol): the byte order of the array, may be one
of :little-endian or :big-endian ( :network-byte-order may be used
as a synonym for :big-endian ).
Defines a line parser function that splits lines and then parses and
validates fields according to the FIELDS contraints and validates
combinations of fields according to CONSTRAINTS.
Arguments:
- parser-name (symbol): a symbol naming the new function.
- delimiter (character): a character used to split the lines being
parsed.
- fields (list list): a list of field definition lists. The form of a
definition list is
;;; (symbolic-field-name &keys type ignore parser validator null-str)
which indicates the symbol to which the parsed field value will be
stored in the alist returned by the function
- parser-name (symbol): the expected type of the field value ( :string,
:integer or :float, defaulting to :string), an optional boolean flag
indicating that the field should be ignored, an optional parser
function (defaults to a pass-through string parser), an optional
validator function that returns T when the parsed field is valid and
an optional string to indicate an null field (defaults to
{defparameter *empty-field*} ).
Optional:
- constraints (list list): a list of field constraint definition
lists. The form of a constraint definition list is
;;; (symbolic-constraint-name (symbolic-field-name list) validator)
The symbolic-field-name list should contain names of one or more fields and the validator must then be a function which accepts the parsed values of those fields in the same order and returns T when those fields have acceptable values.
Executes BODY with ARGV bound to system argv list.
Executes BODY with DIRECTORY bound to a temporary directory that has been created with the MAKE-TMP-DIRECTORY function. If BODY executes without error, the temporary directory is deleted. If an error occurs, restarts DELETE-TMP-DIRECTORY and LEAVE-TMP-DIRECTORY are provided to control what happens.
Executes BODY with DIRECTORY bound to a pathname of a temporary file that has been created with the MAKE-TMP-PATHNAME function. If BODY executes without error, any file denoted by the temporary pathname is deleted. If an error occurs, restarts DELETE-TMP-PATHNAME and LEAVE-TMP-PATHNAME are provided to control what happens.
Returns T if PATHSPEC is a pathname designator for an absolute file or directory, or NIL otherwise.
Decodes 4 byte float stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Decodes 4 byte float stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Decodes 8 byte float stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Decodes 8 byte float stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Decodes an IEEE 754 encoded single-float from 32-bit integer
N. NaN, +Inf and -Inf are represented by the keywords :not-a-number
:positive-infinity or :negative-infinity respectively.
Decodes an IEEE 754 encoded double-float from 64-bit integer
N. NaN, +Inf and -Inf are represented by the keywords
:not-a-number :positive-infinity or :negative-infinity respectively.
Decodes a signed 2 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Decodes a signed 2 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Decodes a signed 4 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Decodes a signed 4 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Decodes a signed 8 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Decodes a signed 8 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Decodes a signed 1 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Decodes a signed 1 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Decodes an unsigned 2 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Decodes an unsigned 2 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Decodes an unsigned 4 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Decodes an unsigned 4 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Decodes an unsigned 8 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Decodes an unsigned 8 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Decodes an unsigned 1 byte integer stored as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Decodes an unsigned 1 byte integer stored as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Returns a float parsed from simple-base-string record STR between START and END, or NIL if STR is STRING= to NULL-STR between START and END.
Returns an integer parsed from simple-base-string record STR between START and END, or NIL if STR is STRING= to NULL-STR between START and END.
Invokes the DELETE-TMP-DIRECTORY restart, if established.
Invokes the DELETE-TMP-PATHNAME restart, if established.
Returns a new pathname that represents the directory component of PATHSPEC.
Encodes 4 byte float as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Encodes 4 byte float as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Encodes 8 byte float as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Encodes 8 byte float as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Encodes single-float F as a 32-bit integer using IEEE 754 encoding. NaN, +Inf and -Inf may be represented by using the keywords :not-a-number :positive-infinity or :negative-infinity respectively, as an argument.
Encodes double-float F as a 64-bit integer using IEEE 754 encoding. NaN, +Inf and -Inf may be represented by using the keywords :not-a-number :positive-infinity or :negative-infinity respectively, as an argument.
Encodes a 2 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Encodes a 2 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Encodes a 4 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Encodes a 4 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Encodes a 8 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Encodes a 8 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Encodes a 1 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Encodes a 1 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Encodes a 2 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Encodes a 2 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Encodes a 4 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Encodes a 4 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Encodes a 8 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Encodes a 8 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Encodes a 1 byte integer as consecutive bytes in BUFFER, in big-endian byte order, starting at INDEX.
Encodes a 1 byte integer as consecutive bytes in BUFFER, in little-endian byte order, starting at INDEX.
Creates the file designated by FILESPEC, if it does not exist. Returns the pathname of FILESPEC.
Returns the string value of VARIABLE-NAME, or NIL.
Sets the value of VARIABLE-NAME to VALUE, which maye be a string or a symbol.
Returns a new pathname that represents the file component of PATHSPEC.
Returns a new relative pathname that represents the leaf directory component of PATHSPEC.
Invokes the LEAVE-TMP-DIRECTORY restart, if established.
Invokes the LEAVE-TMP-PATHNAME restart, if established.
Creates a new temporary directory and returns its pathname. The new directory’s pathname is created using {defun tmp-pathname} . The IF-EXISTS keyword argument determines what happens if a directory by that name already exists; options are :error which causes a FILE-ERROR to be raised, :supersede which causes the existing directory to be deleted and a new, empty one created and NIL where no directory is created an NIL is returned to indicate failure.
Returns the value from alist PARSED-ARGS for the option named by the symbol KEY.
Converts a substring of STRING, as delimited by START and END, to a
floating point number, if possible. START and END default to the
beginning and end of the string. RADIX must be between 2 and 36.
A floating point number will be returned if the string consists of an
optional string of spaces and an optional sign, followed by a string
of digits optionally containing a decimal point, and an optional e or
E followed by an optionally signed integer. The use of e/E to indicate
an exponent only works for RADIX = 10. Returns the floating point
number, if any, and the index for the first character after the number.
Returns a function of zero arity that returns modified copies of a pathname argument. The pathname is modified by extending its namestring. The new namestring is composed of the original namestring SEPARATOR (defaults to NIL) and a value taken from calling the function GENERATOR (defaults to a numeric generator starting from 0, incrementing by 1). TYPE may be used to specify the type of the new pathname, otherwise the original type will be used.
Returns a function of zero arity that generates pathnames when called. The generated pathnames are relative to DIRECTORY and have a namestring composed of NAME, SEPARATOR (defaults to NIL) and a value taken from calling the function GENERATOR (defaults to a numeric generator starting from 0, incrementing by 1). TYPE may be used to specify the type of the new pathnames.
Returns a string representing PATHNAME. This function is similar to CL:NAMESTRING, but is designed to be portable whereas the return value of CL:NAMESTRING is implementation-dependent.
Returns T if PATHSPEC is a pathname designator for a relative file or directory, or NIL otherwise.
Returns a pathname suitable for use as a temporary file or directory. The directory component of the new pathname is TMPDIR, defaulting to *DEFAULT-TMPDIR*. The NAME component of the new pathname is a concatenation of BASENAME, defaulting to an empty string, and a pseudo-random number. The type component of the new pathname is TYPE, defaulting to NIL.
Returns T if OPTION does not require a value, or NIL otherwise.
cli-option
)) ¶Prints the help string for CLI to STREAM (which
defaults to *ERROR-OUTPUT*). This is usually the class documentation
string of CLI, plus all of the option help.
Returns documentation of CLI or a CLI option identified by NAME.
Performs an external merge sort on the elements
read from SORT-INPUT-STREAM and writes the sorted elements to
SORT-OUTPUT-STREAM.
Arguments:
- sort-input-stream (sort-input-stream): The stream whose elements are
to be sorted.
- sort-output-stream (sort-output-stream): A stream whose elements are
sorted.
- predicate (function designator): The sorting predicate, as in
CL:SORT, a function of two arguments that returns a generalized
boolean.
Key:
- key (function designator): A function of one argument, or nil.
- buffer-size (fixnum): The size of the in-memory sort buffer and
hence the number of elements written to disk in the external merge
file.
Returns:
- The total number of elements sorted (fixnum).
- The number of {defclass merge-stream} s used in sorting (fixnum).
sort-input-stream
) (out sort-output-stream
) predicate &key key buffer-size) ¶malformed-field-error
)) ¶Iterates through lines read from LINE-INPUT-STREAM
until a line matching predicate TEST is found or until a number of
lines equal to MAX-LINES have been examined.
line-input-stream
) test &optional max-lines) ¶Prints a help MESSAGE and help for each avaliable option in CLI to STREAM.
line-input-stream
)) ¶line-input-stream
)) ¶A list of lines that have been pushed back into the stream to be read again.
Returns a new {defclass line-stream} created from STREAM.
stream
)) ¶Returns a new {defclass merge-stream} appropriate
to SORT-INPUT-STREAM. The new stream must return sorted elements read
from SORT-INPUT-STREAM.
Arguments:
- sort-input-stream (sort-input-stream): The stream whose elements are
to be sorted.
- predicate (function designator): The sorting predicate, as in
CL:SORT, a function of two arguments that returns a generalized
boolean.
Key:
- key (function designator): A function of one argument, or nil.
- buffer-size (fixnum): The size of the in-memory sort buffer and
hence the number of elements written to disk in the external merge
file.
Returns:
- a {defclass merge-stream} from which sorted elements may be read.
line-sort-input-stream
) predicate &key key buffer-size) ¶Returns T if {defclass line-input-stream} contains unread data.
character-line-input-stream
)) ¶octet-line-input-stream
)) ¶cli-option
)) ¶The name string of the option.
name
.
cli-option-warning
)) ¶name
.
cli-option-error
)) ¶name
.
Prints the help string for option NAME to STREAM (which defaults to *ERROR-OUTPUT*).
Returns the CLI option identified by NAME.
Returns T if SLOT is an option slot in CLI, or NIL
otherwise. The default implementation returns T, meaning that all
slots are expected to contain option objects. Overriding this method
means that slots may be added for other purposes.
Returns a new, sorted list of CLI option slots.
Returns a new, sorted list of CLI options.
Parses a system command line to create a mapping of
option keywords to Lisp objects. Where multiple values are to be
accepted for an argument e.g. ’integer-list , they must be
comma-separated on the command line e.g. 1,2,3,4.
Arguments:
- cli (object): A CLI instance.
- arglist (list string): A list of CLI string arguments.
Returns:
- alist mapping slots to parsed values
- list of unmatched argument strings
- list of unknown argument strings
e.g
;;; (define-cli example-cli (cli)
;;; ((a "a" :required-option t :value-type ’string
;;; :documentation "Required option A.")
;;; (b "b" :required-option t :value-type ’integer
;;; :documentation "Required option D.")
;;; (c "c" :required-option nil :value-type ’string :default "foo"
;;; :documentation "Option C."))
;;; (:documentation "An example CLI class definition."))
;;; (parse-command-line (make-instance ’example-cli)
;;; (list "–a" "aaa" "–b" "1")))
Pops one line from {defclass line-input-stream} .
line-input-stream
) (line string
)) ¶Pushes LINE back onto {defclass line-input-stream} .
line-input-stream
) (line string
)) ¶malformed-record-error
)) ¶cli-option
)) ¶T if option is required on the command line, or NIL otherwise.
Returns T if OPTION requires a value, or NIL otherwise.
cli-option
)) ¶Closes STREAM, returning T if STREAM was open. If
ABORT is T, attempts to clean up any side effects of having created stream.
wrapped-stream-mixin
) &key abort) ¶merge-stream
)) ¶merge-stream
)) ¶Returns the next element from
MERGE-STREAM without removing it. Part of the external merge sort
protocol.
Returns the next element from MERGE-STREAM as part
of the a merging operation between several {defclass merge-stream }
s.
line-merge-stream
)) ¶wrapped-stream-mixin
)) ¶The underlying stream from which data are read.
Returns a Gray stream of CLASS
Returns the next element from SORT-INPUT-STREAM.
line-sort-input-stream
)) ¶Writes ELEMENT to SORT-OUTPUT-STREAM.
string
) (stream line-sort-output-stream
)) ¶stream-filter-mixin
)) ¶A function designator for a test that returns
T when the next datum read from the stream is to be ignored.
test
.
cli-option
)) ¶A default value of the required value-type.
cli-option
)) ¶A value parser function for option
that is capable of parsing a string to the correct type.
cli-option
)) ¶The type of the value of the option. A
type of T indicates a boolean option. Valid types are the symbols
string, integer, character, float, string-list, integer-list,
character-list, float-list and T (indicating boolean, i.e. no
value).
wrapped-stream-mixin
) &key) ¶line-merge-stream
) &key) ¶cli-option
) &key) ¶wrapped-stream-mixin
)) ¶cli-option
) stream) ¶io-stream-mixin
)) ¶sb-gray
.
character-line-input-stream
)) ¶sb-gray
.
octet-line-input-stream
)) ¶sb-gray
.
io-stream-mixin
)) ¶sb-gray
.
wrapped-stream-mixin
)) ¶line-stream
)) ¶character-line-input-stream
)) ¶octet-line-input-stream
)) ¶wrapped-stream-mixin
) &optional position) ¶sb-gray
.
character-line-input-stream
) &optional position) ¶sb-gray
.
octet-line-input-stream
) &optional position) ¶sb-gray
.
io-stream-mixin
)) ¶sb-gray
.
io-stream-mixin
)) ¶sb-gray
.
character-line-input-stream
)) ¶sb-gray
.
octet-line-input-stream
)) ¶sb-gray
.
character-line-input-stream
) sequence &optional start end) ¶sb-gray
.
octet-line-input-stream
) sequence &optional start end) ¶sb-gray
.
line-output-stream
) sequence &optional start end) ¶sb-gray
.
The parent type of all CLI error conditions.
error
.
The parent type of all CLI option error conditions.
The parent type of all CLI option warning conditions.
The parent type of all CLI warning conditions.
warning
.
An error that is raised when a record field fails validation.
The parent type of all parse error conditions.
formatted-condition
.
io-error
.
An error that is raised when an option is supplied with an invalid value.
The expected type of option value.
common-lisp
.
:type
This slot is read-only.
The parent type of all IO error conditions.
error
.
The parent type of all IO warning conditions.
warning
.
An error that is raised when a field-based record contains a malformed field within it.
An error that is raised when a file is malformed for any reason.
An error that is raised when a record is malformed for any reason.
An error that is raised when a required option is missing.
An error that is raised when a required value for an option is missing.
An error that is raised when a record fails validation of one or more of its parts.
An error that is raised when the main command is not recognised.
The unknown command.
:command
This slot is read-only.
The base class of all command line
interfaces. Command line options are added as slots, the slot
documentation acting as the coomand line option documentation.
The base class of all command line options.
The name string of the option.
(error "an option name is required")
:name
This slot is read-only.
T if option is required on the command line, or NIL otherwise.
:required-option
This slot is read-only.
The type of the value of the option. A
type of T indicates a boolean option. Valid types are the symbols
string, integer, character, float, string-list, integer-list,
character-list, float-list and T (indicating boolean, i.e. no
value).
(quote string)
:value-type
This slot is read-only.
A value parser function for option
that is capable of parsing a string to the correct type.
This slot is read-only.
A default value of the required value-type.
:value-default
This slot is read-only.
fundamental-input-stream
.
fundamental-output-stream
.
A line-based stream that allows lines to be pushed back into a stack to be re-read.
fundamental-input-stream
.
line-stream
.
A list of lines that have been pushed back into the stream to be read again.
fundamental-output-stream
.
line-stream
.
A line-based stream. Useful for building readers and writers for ad-hoc text data sources.
An IO stream for merging sorted data.
Returns the next element from
MERGE-STREAM without removing it. Part of the external merge sort
protocol.
:stream-head
A {defclass line-input-stream} whose lines are
arrays of bytes. Allows buffered reading of lines of (unsigned-byte 8)
from a stream.
The buffer from which lines are read.
(make-array uk.co.deoxybyte-io::+octet-buffer-size+ :element-type (quote uk.co.deoxybyte-utilities:octet) :initial-element 0)
:buffer
The end of line character code. If two characters are used, this is the first of the pair.
(char-code #\newline)
:eol-code
The number of bytes that were read into the buffer from the stream.
0
The offset in the byte buffer from which the next byte is to be read.
0
An input stream for reading and sorting the stream contents.
fundamental-input-stream
.
An output stream for sorting and writing the stream contents.
fundamental-output-stream
.
A mixin that provides a filtering function for
streams. Any data encountered while reading or writing for which the
test returns T are ignored and skipped.
A Gray-stream wrapping a standard Lisp stream.
Exponent bias for float32
Exponent bias for float64
Mantissa fraction float32 multiplication factor
Mantissa fraction float64 multiplication factor
Smallest normalized float32 exponent
Smallest normalized float64 exponent
Buffer size for {defclass octet-line-input-stream} internal buffer.
The separator character used in multi-value arguments.
Defines a function NAME with one mandatory argument, a simple-array
of unsigned-byte 8, and one optional argument, a fixnum index in that
array that defaults to 0. The function returns the Lisp float whose
value is given by the bytes at that index in the byte array.
Key:
- bytes (fixnum): the number of bytes that comprise the number.
- order (sumbol): the byte order of the array, may be one
of :little-endian or :big-endian ( :network-byte-order may be used
as a synonym for :big-endian ).
Defines a function NAME with two mandatory arguments, a float and a
simple-array of unsigned-byte 8, and one optional argument, a fixnum
index in that array that defaults to 0. The function returns the
buffer containing the encoded float.
Key:
- bytes (fixnum): the number of bytes that comprise the number.
- order (sumbol): the byte order of the array, may be one
of :little-endian or :big-endian ( :network-byte-order may be used
as a synonym for :big-endian ).
Returns an argument list form to be used by CROSS-VALIDATE by quoting the field-names in FORM and re-ordering the elements.
Returns an argument list form for FIELD to be used by PARSE-FIELD which has suitable parsers and validators set up for the standard field types: :string , :integer and :float .
Returns a string subsequence from simple-string record STR between START and END, or NIL if STR is STRING= to NULL-STR between START and END.
The default validator always returns T.
Returns the next element from one of MERGE-STREAMS. The returned element is the on that sorts first according to PREDICATE and KEY, as required by the merge-sort algorithm.
Merges PATHNAME with defaults, using CL:MERGE-PATHNAMES, and calls {defun pathstring} on the result.
Returns a character parsed from STRING of length 1 character.
Returns a list of integers parsed from STRING after splitting on the *list-separator-char* character.
Returns a value parsed from LINE between START and END using PARSER and VALIDATOR.
Returns a list of floats parsed from STRING after splitting on the *list-separator-char* character.
Returns a list of integers parsed from STRING after splitting on the *list-separator-char* character.
Returns a list of strings parsed from STRING by splitting on the *list-separator-char* character.
Reads chunks of bytes up to the next newline or end of stream, returning them in a list. The newline is not included. Returns two values - a list of chunks and either NIL or T to indicate whether a terminating newline was missing. When the stream underlying the buffer is exhausted the list of chunks will be empty.
Signals a MALFORMED-FIELD-ERROR for FIELD in STR between START and END for REASON.
Returns a copy of STR where any occurrence of CHARS are substituted by CHAR.
Returns a pair of constraint NAME and either T or NIL, indicating the result of applying VALIDATOR to values from the alist of parsed FIELDS named by FIELD-NAMES.
Format STR, wrapped at 70 characters, to STREAM.
unknown-command
)) ¶malformed-file-error
)) ¶file
.
Returns the slot named NAME from CLI.
Returns a parsed VALUE of the correct Lisp type for
OPTION or raises an {define-condition incompatible-argument} error.
cli
) (option cli-option
) value) ¶Equivalent to CL:DELETE-FILE.
merge-stream
)) ¶wrapped-stream-mixin
)) ¶string
) (stream character-line-output-stream
) &optional start end) ¶string
) (stream octet-line-output-stream
) &optional start end) ¶incompatible-value
)) ¶type
.
incompatible-value
)) ¶Jump to: | %
(
A B C D E F G H I K L M N O P Q R S T V W |
---|
Jump to: | %
(
A B C D E F G H I K L M N O P Q R S T V W |
---|
Jump to: | *
+
B C E F L N O R S T V |
---|
Jump to: | *
+
B C E F L N O R S T V |
---|
Jump to: | B C D E F G I L M O P R S T U W |
---|
Jump to: | B C D E F G I L M O P R S T U W |
---|