Ignore:
Timestamp:
Oct 2, 2008, 6:43:48 PM (11 years ago)
Author:
gz
Message:

Propagate r10938:r10941 (duplicate definition warnings) to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-format.lisp

    r10426 r10942  
    4848(defun pop-format-arg (&aux (args *format-arguments*))
    4949  (if (null args)
    50       (format-error "Missing argument"))
    51     (progn
    52      (setq *format-arguments* (cdr args))
    53      (%car args)))
     50    (format-error "Missing argument"))
     51  (progn
     52    (setq *format-arguments* (cdr args))
     53    (%car args)))
    5454 
    5555;SUB-FORMAT parses (a range of) the control string, finding the directives
     
    292292
    293293;;;This function is shadowed by CCL in order to use ~{ to print error messages.
    294 (defun format (stream control-string &rest format-arguments)
    295   (declare (dynamic-extent format-arguments))
    296   (when (null stream)
    297    (return-from format
    298     (with-output-to-string (x)
    299      (apply #'format x control-string format-arguments))))
    300   (if (eq stream t)
    301     (setq stream *standard-output*)
    302     (unless (streamp stream) (report-bad-arg stream 'stream)))
    303   (if (functionp control-string)
    304     (apply control-string stream format-arguments)
    305     (progn
    306       (setq control-string (ensure-simple-string control-string))
    307       (let* ((*format-original-arguments* format-arguments)
    308              (*format-arguments* format-arguments)
    309              (*format-control-string* control-string))
    310         (catch 'format-escape
    311          (sub-format stream 0 (length control-string)))
    312         nil))))
    313 
    314 (defun format-error (&rest args)
    315    (format t "~&FORMAT error at position ~A in control string ~S "
    316              *format-index* *format-control-string*)
    317    (apply #'error args))
     294(fset 'format
     295      (nlambda bootstrapping-format (stream control-string &rest format-arguments)
     296        (declare (dynamic-extent format-arguments))
     297        (block format
     298          (when (null stream)
     299            (return-from format
     300              (with-output-to-string (x)
     301                (apply #'format x control-string format-arguments))))
     302          (if (eq stream t)
     303            (setq stream *standard-output*)
     304            (unless (streamp stream) (report-bad-arg stream 'stream)))
     305          (if (functionp control-string)
     306            (apply control-string stream format-arguments)
     307            (progn
     308              (setq control-string (ensure-simple-string control-string))
     309              (let* ((*format-original-arguments* format-arguments)
     310                     (*format-arguments* format-arguments)
     311                     (*format-control-string* control-string))
     312                (catch 'format-escape
     313                  (sub-format stream 0 (length control-string)))
     314                nil))))))
     315
     316(fset 'format-error
     317      (nlambda bootstrapping-format-error (&rest args)
     318        (format t "~&FORMAT error at position ~A in control string ~S "
     319                *format-index* *format-control-string*)
     320        (apply #'error args)))
    318321
    319322(defun format-no-flags (colon atsign)
Note: See TracChangeset for help on using the changeset viewer.