anchor.diff:          ((nil)
            (sleep 0.1)
            (move scr (car pos) (cadr pos))
  -         (setf ch (cond ((equal dir dir-prev) (if (= (car dir) 0) :hline :vline))
  -                        ((and (equal dir-prev '(1  0)) (equal dir '(0 -1))) :lrcorner)
  -                        ((and (equal dir-prev '(1  0)) (equal dir '(0  1))) :llcorner)
  -                        ((and (equal dir-prev '(0  1)) (equal dir '(-1 0))) :lrcorner)
  -                        ((and (equal dir-prev '(0  1)) (equal dir '(1  0))) :urcorner)
  -                        ((and (equal dir-prev '(-1 0)) (equal dir '(0 -1))) :urcorner)
  -                        ((and (equal dir-prev '(-1 0)) (equal dir '(0  1))) :ulcorner)
  -                        ((and (equal dir-prev '(0 -1)) (equal dir '(-1 0))) :llcorner)
  -                        ((and (equal dir-prev '(0 -1)) (equal dir '(1  0))) :ulcorner)))
  +         (setf ch (cond ((equal dir dir-prev) (if (= (car dir) 0) :horizontal-line :vertical-line))
  +                        ((and (equal dir-prev '(1  0)) (equal dir '(0 -1))) :lower-right-corner)
  +                        ((and (equal dir-prev '(1  0)) (equal dir '(0  1))) :lower-left-corner)
  +                        ((and (equal dir-prev '(0  1)) (equal dir '(-1 0))) :lower-right-corner)
  +                        ((and (equal dir-prev '(0  1)) (equal dir '(1  0))) :upper-right-corner)
  +                        ((and (equal dir-prev '(-1 0)) (equal dir '(0 -1))) :upper-right-corner)
  +                        ((and (equal dir-prev '(-1 0)) (equal dir '(0  1))) :upper-left-corner)
  +                        ((and (equal dir-prev '(0 -1)) (equal dir '(-1 0))) :lower-left-corner)
  +                        ((and (equal dir-prev '(0 -1)) (equal dir '(1  0))) :upper-left-corner)))
            (add-char scr ch)
            (let ((pos-trial (list (+ (car pos) (car dir)) (+ (cadr pos) (cadr dir)))))
              (if (or (= (car pos-trial)  0)
  
positive.code:     ;; acs takes a keyword :ulcorner, translates it to a char #\l,
      ;; ncurses translates it at run-time to a terminal-dependent
      ;; integer value that doesnt correspond to a char code.
      (format scr "~A ~A ~A " #\l (char-code #\l) (acs :ulcorner))
      ;; We cant output it in a string, but have to use add-char.
      (add-char scr 4194412)
      (terpri scr)
  
negative.code:     (unwind-protect
           (progn
  
  (add-string scr "ACS_ULCORNER ") (add-char scr (acs :upper-left-corner    )) (add-string scr " upper left corner") (new-line scr) 
  (add-string scr "ACS_LLCORNER ") (add-char scr (acs :lower-left-corner    )) (add-string scr " lower left corner ") (new-line scr)
  (add-string scr "ACS_URCORNER ") (add-char scr (acs :upper-right-corner   )) (add-string scr " upper right corner ") (new-line scr)
  (add-string scr "ACS_LRCORNER ") (add-char scr (acs :lower-right-corner   )) (add-string scr " lower right corner ") (new-line scr)
  (add-string scr "ACS_LTEE     ") (add-char scr (acs :tee-pointing-right   )) (add-string scr " tee pointing right ") (new-line scr)
  (add-string scr "ACS_RTEE     ") (add-char scr (acs :tee-pointing-left    )) (add-string scr " tee pointing left ") (new-line scr)
  (add-string scr "ACS_BTEE     ") (add-char scr (acs :tee-pointing-up      )) (add-string scr " tee pointing up ") (new-line scr)
  (add-string scr "ACS_TTEE     ") (add-char scr (acs :tee-pointing-down    )) (add-string scr " tee pointing down ") (new-line scr)
  (add-string scr "ACS_HLINE    ") (add-char scr (acs :horizontal-line      )) (add-string scr " horizontal line ") (new-line scr)
  (add-string scr "ACS_VLINE    ") (add-char scr (acs :vertical-line        )) (add-string scr " vertical line ") (new-line scr)
  (add-string scr "ACS_PLUS     ") (add-char scr (acs :crossover-plus       )) (add-string scr " large plus or crossover ") (new-line scr)
  (add-string scr "ACS_S1       ") (add-char scr (acs :scan-line-1          )) (add-string scr " scan line 1 ") (new-line scr)
  (add-string scr "ACS_S3       ") (add-char scr (acs :scan-line-3          )) (add-string scr " scan line 3 ") (new-line scr)
  (add-string scr "ACS_S7       ") (add-char scr (acs :scan-line-7          )) (add-string scr " scan line 7 ") (new-line scr)
  (add-string scr "ACS_S9       ") (add-char scr (acs :scan-line-9          )) (add-string scr " scan line 9 ") (new-line scr)
  (add-string scr "ACS_DIAMOND  ") (add-char scr (acs :diamond-symbol       )) (add-string scr " diamond ") (new-line scr)
  (add-string scr "ACS_BOARD    ") (add-char scr (acs :board                )) (add-string scr " board of squares ") (new-line scr)
  (add-string scr "ACS_CKBOARD  ") (add-char scr (acs :checker-board        )) (add-string scr " checker board (stipple) ") (new-line scr)
  (add-string scr "ACS_DEGREE   ") (add-char scr (acs :degree-symbol        )) (add-string scr " degree symbol ") (new-line scr)
  (add-string scr "ACS_PLMINUS  ") (add-char scr (acs :plus-minus           )) (add-string scr " plus/minus ") (new-line scr)
  (add-string scr "ACS_BULLET   ") (add-char scr (acs :bullet-symbol        )) (add-string scr " bullet ") (new-line scr)
  (add-string scr "ACS_LARROW   ") (add-char scr (acs :arrow-pointing-left  )) (add-string scr " arrow pointing left ") (new-line scr)
  (add-string scr "ACS_RARROW   ") (add-char scr (acs :arrow-pointing-right )) (add-string scr " arrow pointing right ") (new-line scr)
  (add-string scr "ACS_DARROW   ") (add-char scr (acs :arrow-pointing-down  )) (add-string scr " arrow pointing down ") (new-line scr)
  (add-string scr "ACS_UARROW   ") (add-char scr (acs :arrow-pointing-up    )) (add-string scr " arrow pointing up ") (new-line scr)
  (add-string scr "ACS_LANTERN  ") (add-char scr (acs :lantern-symbol       )) (add-string scr " lantern symbol ") (new-line scr)
  (add-string scr "ACS_BLOCK    ") (add-char scr (acs :solid-square-block   )) (add-string scr " solid square block ") (new-line scr)
  (add-string scr "ACS_LEQUAL   ") (add-char scr (acs :less-than-or-equal   )) (add-string scr " less/equal ") (new-line scr)
  (add-string scr "ACS_GEQUAL   ") (add-char scr (acs :greater-than-or-equal)) (add-string scr " greater/equal ") (new-line scr)
  (add-string scr "ACS_PI       ") (add-char scr (acs :pi                   )) (add-string scr " Pi ") (new-line scr)
  (add-string scr "ACS_NEQUAL   ") (add-char scr (acs :not-equal            )) (add-string scr " not equal ") (new-line scr)
  (add-string scr "ACS_STERLING ") (add-char scr (acs :uk-pound-sterling    )) (add-string scr " UK pound sign") (new-line scr)
  
             (get-char scr))
        (close scr))))
  