anchor.diff:      ;; no free entries remap 
       (close-ntlm-database)
       (open-ntlm-database (* count 2))
  -    (pounds:with-locked-mapping (*ntlm-stream*)
  -      (file-position *ntlm-stream* (* +ntlm-block-size+ count))
  -      (write-ntlm-entry *ntlm-stream*
  +    (with-locked-db 
  +      (file-position (db-stream *db*) (* +ntlm-block-size+ count))
  +      (write-ntlm-entry (db-stream *db*)
                           (make-ntlm-entry :active t 
                                            :user username
                                            :password password)))
  
positive.code:   "Lookup the named user's password."
    (open-ntlm-database)
    (let (count)
      (pounds:with-locked-mapping (*ntlm-stream*)
        (setf count (database-count))
        (do ((i 1 (1+ i)))
            ((= i count))
          (let ((entry (read-ntlm-entry *ntlm-stream*)))
            (when (and (ntlm-entry-active entry)
                       (string= (ntlm-entry-user entry) username))
              (return-from find-ntlm-user (ntlm-entry-password entry)))))))
  
negative.code:   (open-ntlm-database)
    ;; walk the list until we find an unused entry 
    (let (count)
      (with-locked-db 
        (setf count (database-count))
        (do ((i 1 (1+ i)))
            ((>= i count))
          (let ((offset (file-position (db-stream *db*)))
                (entry (read-ntlm-entry (db-stream *db*))))
            (cond 
              ((and (ntlm-entry-active entry) 
                    (string= (ntlm-entry-user entry) username))
               (file-position (db-stream *db*) offset)
               (write-ntlm-entry (db-stream *db*)
                                 (make-ntlm-entry :active t 
                                                  :user username 
                                                  :password password))
               (return-from add-ntlm-user nil))
              ((not (ntlm-entry-active entry))
               ;; free entry, write here
               (file-position (db-stream *db*) offset)
               (write-ntlm-entry (db-stream *db*)
                                 (make-ntlm-entry :active t 
                                                  :user username 
                                                  :password password))
  