;;AUTOLOAD: print-exit
;;AUTODOC: print-exit "prints a message on stderr and exits"
;;(print-exit errcode format-string format-arguments...)
;;
;;Does a (print-format *standard-error* format-string format-arguments...)
;;then (exit errcode)
;;Very useful in tests for fatal error conditions in scripts
;;Example:
;;  (if (not (file-stat file))
;;      (print-exit 1 "Error: file %0 does not exists!\n" file)
;;  )

(defmacro print-exit (errcode &rest args)
  `(progn 
    (print-format *standard-error* ,@args)
    (exit ,errcode)
))
