CPR


; Print stuff out in C form
(defun cpr (item optional tabs)
 (let (newtabs)
  (if (stringp item)
      (princ item)
      (if (characterp item)
          (if (char= item #\Return)
              (progn (terpri)
                     (if tabs (spaces tabs)))
              (princ item))
          (if (symbolp item)
              (princ (string-downcase (symbol-name item)))
              (if (consp item)
                  (if (symbolp (first item))
                      (progn (cpr (first item))
                             (princ "(")
                             (mapl
                              #'(lambda (z)
                                 (if (not (eq z (rest item)))
                                     (princ ", "))
                                 (cpr (car z)))
                              (rest item))
                             (princ ")"))                             
                      (dolist (z item)
                        (if (and (characterp z) (char= z #\Tab))
                            (setq newtabs (+ (or tabs 0) 2))
                            (cpr z (or newtabs tabs)) )))
                  (princ item))))) ))

Contents    Page-10    Prev    Next    Page+10    Index