anchor.diff:      (otherwise
        (intern (format nil "ENCODE-~A" name) (symbol-package name)))))
   
  +(defmacro defxencoder (name (blk val) &body body)
  +  "Define a custom encoder for the type named by NAME.
  +BLK, VAL ::= symbols
  +BODY ::= body of the function."
  +  `(defun ,(generate-encoder-name name) (,blk ,val)
  +     ,@body))
  +
  +(defmacro defxdecoder (name (blk) &body body)
  +  "Define a custom decoder for the type named by NAME."
  +  `(defun ,(generate-decoder-name name) (,blk)
  +     ,@body))
  +
   (defmacro defxstruct (name options &rest slots)
     "Define a struct and associated XDR encoder and decoder.
   NAME ::= symbol naming the structure.
  -OPTIONS ::= list of options.
  -SLOTS :: list of forms (slot-name slot-type)* defining each slot."
  +OPTIONS ::= {OPTION-SPEC}*
  +OPTION-SPEC ::= (:MODE :STRUCT|:LIST|:PLIST)
  +SLOTS :: list of forms (slot-name slot-type)* defining each slot.
  +
  +If the :MODE is :STRUCT (the default) a DEFSTRUCT form will be define the 
  +type structure to be used as input/output values.
  +If the :MODE is :LIST, the values are expected to be an ordered list containing 
  +each of the structure slots.
  +If the :MODE is :PLIST, the values are expected to be property lists containing
  +values defined by the slot names."
     (let ((mode (or (cadr (assoc :mode options)) :struct)))
       `(progn
          ,@(when (eq mode :struct)
  
positive.code: 	(incf (xdr-block-offset blk) xlen)))))
            
  (defun decode-optional (blk decoder)
    (declare (type xdr-block blk))
    (let ((p (decode-boolean blk)))
      (when p
        (funcall decoder blk))))
  
  (defun encode-optional (blk encoder val)
    (declare (type xdr-block blk))
    (encode-boolean blk val)  
    (when val
      (funcall encoder blk val)))
  
  (defun decode-list (blk item-decoder)
    (declare (type xdr-block blk))
    (do ((ret nil)
         (done nil))
        (done ret)
  
negative.code:   (incf (xdr-block-offset blk) 4))
  
  (defun encode-int64 (blk int64)
    (declare (type xdr-block blk)
  	   (type integer int64))
    (space-or-lose blk 8)
    (setf (nibbles:sb64ref/be (xdr-block-buffer blk)
                              (xdr-block-offset blk))
  