From fcaeda281a883be24c1abad6471f40ac6c2b5f08 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Wed, 12 Aug 2009 16:53:32 -0700 Subject: [PATCH] Documentation cleanup --- CHANGES | 2 +- README | 2 +- cl-pack.lisp | 17 ++++++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index ab87d33..0502a38 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -0.2 2009-07 +0.2 2009-08-12 - added support for signed numbers that mirrors perl's - fixed native endian selection bug - added w (BER: Binary Encoded Representation) diff --git a/README b/README index ba8b740..9e476b1 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ CL-PACK Dan Ballard -June 2009 +August 2009 CL-PACK supplier perl/php/ruby compatible pack() and unpack() functions to allow easy use of binary protocols with the above mentioned languages and C. diff --git a/cl-pack.lisp b/cl-pack.lisp index ffcc659..450d7b0 100644 --- a/cl-pack.lisp +++ b/cl-pack.lisp @@ -51,8 +51,9 @@ ;;;d double precision float ;;;x null byte -;;;X Backup a byte +;;;X Backup a byte (pack only) +;;; (pack only) ;;;@ Null fill or truncate to absolute position specified by repeater ;;;. Null fill or truncate to absolute position specified by value/argument @@ -85,6 +86,14 @@ ;;; () Example: (pack "(cc)3" 65 66 67 68 69 70) => "ABCDEF" ;;; Example: (unpack "(cc)3") "ABCDEF") => (65 66) (67 68) (69 70) +;;; ***** / Template ***** +;;; sequence length / sequence item +;;; in pack, writes out how ever many sequence items PRECEDED by the length +;;; in the form of sequence length +;;; example: (pack "a/c3" 65 66 67) => "3ABC" +;;; in unpack, reads the length and unpacks that many +;;; example: (unpack "a/c" "3ABC") => (65 66 67) + ;;; **** NOTE ***** ;;; A lot use users of pack() and unpack() in other languages @@ -94,12 +103,6 @@ ;;; specified ;;; in cl-pack you can also use q< , q> , Q< and Q> -;;; ************* TODO *************** - -;;;! MODIFIER, different uses in context -;;; / template - - ;;; ***************** CL-PACK **********************