anchor.diff:           (rec-count 0))
   
       ;;; First, count the records in the file so we can cons
  -    (with-open-file (index path :direction :input :if-does-not-exist nil)
  +    (with-open-file (index path
  +                           :direction :input
  +                           :if-does-not-exist nil
  +                           
  +)
         (unless index
           (error "Error opening index file '~a'~%" path))
   
  
positive.code:         (error "Format error in ~a file near ~a #~d~%Offending line: '~a'~%"
                 mode mode nr line))))))
  
  (defun asciiflag-conv (flag)
    (apply #'logior
           (loop for c across flag
                 collect (if (alpha-char-p c)
                             (ash 1 (- (char-code (char-downcase c))
                                       (char-code #\a)))
                             0))))
  
  (defun parse-room (inf vnum-nr)
    (let ((zone (find-if (lambda (zone)
  
negative.code:       (unless line
          (error "Format error room #~d, direction D~d." (number-of room) dir))
  
        (multiple-value-bind (start end reg-starts reg-ends)
            (cl-ppcre:scan #/^(\S+)\s+([0-9-]+)\s+([-0-9]+)/ line)
          (declare (ignore start end))
          (setf (exit-info-of room-dir) (asciiflag-conv line
                                                        :start (aref reg-starts 0)
                                                        :end (aref reg-ends 0)))
          (setf (key-of room-dir) (parse-integer line
                                                 :start (aref reg-starts 1)
                                                 :end (aref reg-ends 1)))
          (setf (to-room-of room-dir) (parse-integer line
                                                     :start (aref reg-starts 2)
                                                     :end (aref reg-ends 2)))))))
  
  (defun pin (val min max)
    (min (max val max) min))
  