Common Lisp Package: BKNR.UTILS

README:

FUNCTION

Public

CLASS-SUBCLASSES (CLASS)

Return a list of the names of all subclasses of a given class.

DAY-INTERVAL (DAY MONTH YEAR)

Returns two values, the first and last second of the given day

FIND-ALL (ITEM SEQUENCE &REST KEYWORD-ARGS &KEY (TEST #'EQL) TEST-NOT &ALLOW-OTHER-KEYS)

Find all those elements of sequence that match item, according to the keywords. Doesn't alter sequence.

IMAGE-CONTENT-TYPE (TYPE-SYMBOL)

Return the MIME type of the image - If the type-symbol is a string, it is assumed that the string specifies the MIME type.

MAKE-CAPABILITY-STRING

return new unique capabilty as a string

MAKE-EXTENDABLE-STRING

Creates a resizable string.

MONTH-INTERVAL (MONTH YEAR)

Returns two values, the first and last second of the given month

PARSE-TIME (TIME-STRING &KEY (START 0) (END (LENGTH TIME-STRING)) (ERROR-ON-MISMATCH NIL) (PATTERNS *DEFAULT-DATE-TIME-PATTERNS*) (DEFAULT-SECONDS NIL) (DEFAULT-MINUTES NIL) (DEFAULT-HOURS NIL) (DEFAULT-DAY NIL) (DEFAULT-MONTH NIL) (DEFAULT-YEAR NIL) (DEFAULT-ZONE NIL) (DEFAULT-WEEKDAY NIL))

Tries very hard to make sense out of the argument time-string and returns a single integer representing the universal time if successful. If not, it returns nil. If the :error-on-mismatch keyword is true, parse-time will signal an error instead of returning nil. Default values for each part of the time/date can be specified by the appropriate :default- keyword. These keywords can be given a numeric value or the keyword :current to set them to the current value. The default-default values are 00:00:00 on the current date, current time-zone.

READ-DELIMITED (STREAM TOKEN)

Reads stream up to delimiter.

READ-FILE (STREAM)

Reads entire contents of stream into a string.

RUN-SHELL-COMMAND-TO-STRING (CONTROL-STRING &REST ARGS)

Interpolate ARGS into CONTROL-STRING as if by FORMAT, and synchronously execute the result using a Bourne-compatible shell. Returns the output and the shell's exit code.

SUBSEQ* (SEQUENCE START &OPTIONAL END)

Like SUBSEQ, but limit END to the length of SEQUENCE

Undocumented

ASSOC-TO-KEYWORDS (ARGS)

ASSOC-VALUES (ITEM ALIST &KEY (TEST #'EQUAL))

BKNR-READ (S &OPTIONAL (EOF-ERROR-P T) EOF-VALUE (COLLECT-WHITESPACE T))

BKNR-READ-DELIMITED-LIST (S ENDCHAR &OPTIONAL EOF-ERROR-P EOF-VALUE COLLECT-WHITESPACE)

CONVERT-UTF8-TO-LATIN1 (STRING &KEY (IGNORE-ERRORS T))

COUNT-MULTIPLE (OBJECTS &REST KEYS)

CRYPT-MD5 (PW SALT)

DAYTAG

DELETE-FIRST (OBJ LIST &KEY (TEST #'EQL))

DIRECTORY-EMPTY-P (PATHNAME)

EVAL-INITARGS (INITARGS)

FILE-CONTENTS (PATHNAME &KEY (ELEMENT-TYPE '(UNSIGNED-BYTE 8)) (EXTERNAL-FORMAT UTF-8))

FIND-MATCHING-STRINGS (REGEXP STRINGS &KEY CASE-SENSITIVE)

FIND-NEIGHBOURHOOD (ELT LIST DEPTH &KEY (TEST #'EQL))

FORMAT-DATE-TIME (&OPTIONAL UNIVERSAL-TIME &KEY STREAM (SHOW-YEAR T) (SHOW-MONTH T) (SHOW-DATE T) (SHOW-TIME T) (SHOW-WEEKDAY NIL) (SHOW-SECONDS T) VMS-STYLE US-STYLE MAIL-STYLE XML-STYLE JS-STYLE)

FORMAT-DURATION (DURATION)

FORMAT-TIME-INTERVAL (SECONDS)

GENLIST (FROM TO)

GET-DAYTIME (TIME)

GET-HOURTIME (TIME)

GET-MONTHTIME (TIME)

GROUP-BY (LIST NUM)

GROUP-ON (LIST &KEY (TEST #'EQL) (KEY #'IDENTITY) (INCLUDE-KEY T))

HASH-KEYS (HASH)

HASH-TO-HEX (VECTOR)

HASH-TO-LIST (HASH &KEY (KEY #'CDR) (COMPARE #'>) NUM)

HASH-VALUES (HASH)

HOSTNAME (&KEY (STRIP-DOMAIN T))

IMAGE-TYPE-SYMBOL (CONTENT-TYPE)

INCF-HASH (KEY HASH &OPTIONAL (DELTA 1))

INSERT-AT-INDEX (IDX L ELT)

MAKE-FDF-FILE (FILE-NAME &REST KEYS-AND-VALUES)

MAKE-KEYWORD-FROM-STRING (STRING)

MAKE-TEMPORARY-PATHNAME (&KEY (DEFAULTS NIL) (NAME tmp))

MD5-STRING (INPUT-STRING)

MONTH-NUM-DAYS (MONTH YEAR)

MOVE-FILE (FILE1 FILE2)

MP-MAKE-LOCK (&OPTIONAL (NAME Anonymous))

NEXT-DAY (COUNT &KEY (START (GET-UNIVERSAL-TIME)))

NROTATE (LIST)

PARENT-DIRECTORY (PATHNAME)

PATHNAME-CONTENT-TYPE (PATHNAME)

PATHNAME-TYPE-SYMBOL (PATHNAME)

PREVIOUS-DAY (COUNT &KEY (START (GET-UNIVERSAL-TIME)))

RANDOM-ELTS (CHOICES NUM)

RANDOMIZE-LIST (L)

REMOVE-KEYS (KEYS ARGS)

RUN-SHELL-COMMAND (COMMAND S)

SCALE-BYTES (BYTE-COUNT)

SET-SMB-PASSWORD (USERNAME PASSWORD &KEY (CREATE T))

SHIFT-UNTIL (LIST NUM &KEY (TEST #'>=))

STRING-BEGINNING-WITH-P (STRING BEGINNING)

STRING-DELIMITED-BY-P (STRING CHAR)

SUBDIR-P (SUBDIR DIR)

TIMETAG

VERIFY-MD5-PASSWORD (PASSWORD SALTPW)

WHITESPACE-CHAR-P (C)

WHITESPACE-P (C-OR-S)

YEAR-INTERVAL (YEAR)

Private

DECODED-TIME-DAY (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DECODED-TIME-DOTW (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DECODED-TIME-HOUR (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DECODED-TIME-MINUTE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DECODED-TIME-MONTH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DECODED-TIME-SECOND (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DECODED-TIME-YEAR (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DECODED-TIME-ZONE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

QUOTE-META-CHARS (STRING &KEY (START 0) (END (LENGTH STRING)))

Quote, i.e. prefix with #\\, all non-word characters in STRING.

Undocumented

AM-PM (STRING)

BKNR-READ-COMMENT (S)

BKNR-READ-SOMETHING (S)

BKNR-READ-STRING (S)

BKNR-READ-STRING-UNTIL (S ENDCHAR &KEY (START NIL) (TEST #'EQL) TEST-NOT (UNREAD-ENDCHAR NIL))

BKNR-READ-WHITESPACE (S)

COLLECT-WHITESPACE (LIST)

COMPUTE-BKNR-SLOT (CLASS SLOT)

CONVERT-TO-UNITIME (PARSED-VALUES)

COPY-DECODED-TIME (INSTANCE)

DATE-DIVIDER (CHARACTER)

DAY (NUMBER)

DEAL-WITH-AM-PM (FORM-VALUE PARSED-VALUES)

DEAL-WITH-IZONE (FORM-VALUE PARSED-VALUES)

DEAL-WITH-NOON-MIDN (FORM-VALUE PARSED-VALUES)

SETFDECODED-TIME-DAY (NEW-VALUE INSTANCE)

SETFDECODED-TIME-DOTW (NEW-VALUE INSTANCE)

SETFDECODED-TIME-HOUR (NEW-VALUE INSTANCE)

SETFDECODED-TIME-MINUTE (NEW-VALUE INSTANCE)

SETFDECODED-TIME-MONTH (NEW-VALUE INSTANCE)

DECODED-TIME-P (OBJECT)

SETFDECODED-TIME-SECOND (NEW-VALUE INSTANCE)

SETFDECODED-TIME-YEAR (NEW-VALUE INSTANCE)

SETFDECODED-TIME-ZONE (NEW-VALUE INSTANCE)

DECOMPOSE-STRING (STRING &KEY (START 0) (END (LENGTH STRING)) (RADIX 10))

DESTROY-PROCESS (PROCESS)

EXTRACT-SALT (SALTPW)

HOUR (NUMBER)

ITOA64 (INT NUM)

IZONE (THING)

MAKE-DECODED-TIME (&KEY ((SECOND DUM31) 0) ((MINUTE DUM32) 0) ((HOUR DUM33) 0) ((DAY DUM34) 1) ((MONTH DUM35) 1) ((YEAR DUM36) 1900) ((ZONE DUM37) 0) ((DOTW DUM38) 0))

MAKE-DEFAULT-TIME (DEF-SEC DEF-MIN DEF-HOUR DEF-DAY DEF-MON DEF-YEAR DEF-ZONE DEF-DOTW)

MAKE-PROCESS (FUNCTION &KEY NAME)

MATCH-PATTERN (PATTERN DATUM DATUM-LENGTH)

MATCH-PATTERN-ELEMENT (PATTERN-ELEMENT DATUM-ELEMENT)

MATCH-SUBSTRING (SUBSTRING)

MINUTE (NUMBER)

MONTH (THING)

MONTH-NAME (MONTH)

NOON-MIDN (STRING)

NOW (PARSED-VALUES)

PDF-QUOTE-STRING (STRING)

PROCESS-ACTIVE-P (PROCESS)

SECONDP (NUMBER)

SET-CURRENT-VALUE (VALUES-STRUCTURE &KEY (TIME NIL) (DATE NIL) (ZONE NIL))

SET-TIME-VALUES (STRING-FORM PARSED-VALUES)

SPECIAL-STRING-P (STRING)

TIME-DIVIDER (CHARACTER)

TO64 (MD5)

TODAY (PARSED-VALUES)

TOMORROW (PARSED-VALUES)

WEEKDAY (STRING)

YEAR (NUMBER)

YESTERDAY (PARSED-VALUES)

ZONE (THING)

MACRO

Public

Undocumented

DEFINE-BKNR-CLASS (CLASS (&REST SUPERCLASSES) SLOTS &REST CLASS-OPTIONS)

MP-WITH-LOCK-HELD ((LOCK) &BODY BODY)

MP-WITH-RECURSIVE-LOCK-HELD ((LOCK) &BODY BODY)

WITH-TEMPORARY-FILE ((VAR &REST ARGS) &BODY BODY)

Private

DEFINE-CONSTANT (NAME VALUE &OPTIONAL DOC)

Macro for use in place of defconstant in order to make SBCL compiler happy

Undocumented

HASHLIST (LIST TABLE)

GENERIC-FUNCTION

Public

Undocumented

ACTOR-RUNNING-P (ACTOR)

ACTOR-START (ACTOR)

ACTOR-STOP (ACTOR)

RUN-FUNCTION (ACTOR)

Private

Undocumented

SMB-PASSWORD-ERROR-MESSAGE (CONDITION)

SETFSMB-PASSWORD-ERROR-MESSAGE (NEW-VALUE CONDITION)

SLOT-ACCESSOR

Public

Undocumented

BKNR-ACTOR-NAME (OBJECT)

SETFBKNR-ACTOR-NAME (NEW-VALUE OBJECT)

Private

Undocumented

BKNR-ACTOR-PROCESS (OBJECT)

SETFBKNR-ACTOR-PROCESS (NEW-VALUE OBJECT)

VARIABLE

Private

*ERROR-ON-MISMATCH*

If t, an error will be signalled if parse-time is unable to determine the time/date format of the string.

Undocumented

*CAPABILITY-COUNT*

*DEFAULT-DATE-TIME-PATTERNS*

*HTTP-DATE-TIME-PATTERNS*

*IMAGE-TYPE<->CONTENT-TYPE*

*MAIL-TIMEZONE*

*MONTH-STRINGS*

*SPECIAL-STRINGS*

*WEEKDAY-STRINGS*

*ZONE-STRINGS*

+SMB-WRAPPER-PROGRAM+

DATE-DIVIDERS

MONTH-TABLE-SIZE

SPECIAL-TABLE-SIZE

TIME-DIVIDERS

WEEKDAY-TABLE-SIZE

WHITESPACE-CHARS

ZONE-TABLE-SIZE

CLASS

Public

Undocumented

BKNR-ACTOR

Private

Undocumented

DECODED-TIME

CONDITION

Public

Undocumented

SMB-PASSWORD-ERROR

CONSTANT

Private

Undocumented

+ITOA64+

+WHITESPACE-CHARS+