1;;;; This software is part of the SBCL system. See the README file for 2;;;; more information. 3;;;; 4;;;; This software is derived from the CMU CL system, which was 5;;;; written at Carnegie Mellon University and released into the 6;;;; public domain. The software is in the public domain and is 7;;;; provided with absolutely no warranty. See the COPYING and CREDITS 8;;;; files for more information. 9 10(in-package "SB!FORMAT") 11 12(defparameter *format-whitespace-chars* 13 (vector #\space 14 #\newline 15 ;; We leave out this non-STANDARD-CHARACTER entry from this table 16 ;; when we're running in the cross-compilation host, since ANSI 17 ;; doesn't require the cross-compilation host to know what a tab is. 18 #-sb-xc-host (code-char tab-char-code))) 19 20(defvar *format-directive-expanders* 21 (make-array base-char-code-limit :initial-element nil)) 22(defvar *format-directive-interpreters* 23 (make-array base-char-code-limit :initial-element nil)) 24 25(defvar *default-format-error-control-string* nil) 26(defvar *default-format-error-offset* nil) 27 28;;;; specials used to communicate information 29 30;;; Used both by the expansion stuff and the interpreter stuff. When it is 31;;; non-NIL, up-up-and-out (~:^) is allowed. Otherwise, ~:^ isn't allowed. 32(defvar *up-up-and-out-allowed* nil) 33 34;;; Used by the interpreter stuff. When it's non-NIL, it's a function 35;;; that will invoke PPRINT-POP in the right lexical environemnt. 36(declaim (type (or null function) *logical-block-popper*)) 37(defvar *logical-block-popper* nil) 38 39;;; Used by the expander stuff. This is bindable so that ~<...~:> 40;;; can change it. 41(defvar *expander-next-arg-macro* 'expander-next-arg) 42 43;;; Used by the expander stuff. Initially starts as T, and gets set to NIL 44;;; if someone needs to do something strange with the arg list (like use 45;;; the rest, or something). 46(defvar *only-simple-args*) 47 48;;; Used by the expander stuff. We do an initial pass with this as NIL. 49;;; If someone doesn't like this, they (THROW 'NEED-ORIG-ARGS NIL) and we try 50;;; again with it bound to T. If this is T, we don't try to do anything 51;;; fancy with args. 52(defvar *orig-args-available* nil) 53 54;;; Used by the expander stuff. List of (symbol . offset) for simple args. 55(defvar *simple-args*) 56