0.pre7.88:
[sbcl.git] / src / code / late-format.lisp
index 65ffe67..27d2b3a 100644 (file)
          (format-error-offset condition)))
 \f
 (def!struct format-directive
-  (string (required-argument) :type simple-string)
-  (start (required-argument) :type (and unsigned-byte fixnum))
-  (end (required-argument) :type (and unsigned-byte fixnum))
-  (character (required-argument) :type base-char)
+  (string (missing-arg) :type simple-string)
+  (start (missing-arg) :type (and unsigned-byte fixnum))
+  (end (missing-arg) :type (and unsigned-byte fixnum))
+  (character (missing-arg) :type base-char)
   (colonp nil :type (member t nil))
   (atsignp nil :type (member t nil))
   (params nil :type list))
                             (error
                              'format-error
                              :complaint
-                             "too many parameters, expected no more than ~D"
+                             "too many parameters, expected no more than ~W"
                              :arguments (list ,(length specs))
                              :offset (caar ,params)))
                       ,,@body)))
                          :complaint "no previous argument"))
                 (caar *simple-args*))
                (t
+                (/show0 "THROWing NEED-ORIG-ARGS from tilde-P")
                 (throw 'need-orig-args nil)))))
       (if atsignp
          `(write-string (if (eql ,arg 1) "y" "ies") stream)
                 "both colon and atsign modifiers used simultaneously")
          (expand-bind-defaults ((posn 0)) params
            (unless *orig-args-available*
+             (/show0 "THROWing NEED-ORIG-ARGS from tilde-@*")
              (throw 'need-orig-args nil))
            `(if (<= 0 ,posn (length orig-args))
                 (setf args (nthcdr ,posn orig-args))
                 (error 'format-error
-                       :complaint "Index ~D out of bounds. Should have been ~
-                                   between 0 and ~D."
+                       :complaint "Index ~W out of bounds. Should have been ~
+                                   between 0 and ~W."
                        :arguments (list ,posn (length orig-args))
                        :offset ,(1- end)))))
       (if colonp
          (expand-bind-defaults ((n 1)) params
            (unless *orig-args-available*
+             (/show0 "THROWing NEED-ORIG-ARGS from tilde-:*")
              (throw 'need-orig-args nil))
            `(do ((cur-posn 0 (1+ cur-posn))
                  (arg-ptr orig-args (cdr arg-ptr)))
                        (setf args (nthcdr new-posn orig-args))
                        (error 'format-error
                               :complaint
-                              "Index ~D is out of bounds; should have been ~
-                               between 0 and ~D."
+                              "Index ~W is out of bounds; should have been ~
+                               between 0 and ~W."
                               :arguments
                               (list new-posn (length orig-args))
                               :offset ,(1- end)))))))