~<newline> format operator

james anderson <[email protected]> Thu, 27 Mar 2003 09:35:06 +0100
Newsgroups gmane.lisp.openmcl.bugs
Message-ID <[email protected]>
this operator appears to insist on pc/unix eol conventions. that is, a 
file which ex edited with classic eol encoding causes errors, where 
something like (please don't mind the formulation - it's just as close 
to the actual code as possible; only the ~@<newline> operator matters) 
causes an error

(apply #'format t "~%~%~@R. ~@? :~%"
        1 (rest '(dummy
                  "a change of the prefix specified for a local 
namespace binding ~
                   has the expected effect on the serialized document, 
even though~@
                    ~s.name.prefix remains = ~s"
                  <child-elem> "prefix")))

i've come to expect this from allegro, but it would be nice if openmcl 
recognized all macintosh end-of-line encodings.


...


II. a change of the prefix specified for a local namespace binding
 > Error:
 >        Unknown directive
                            ~s.name.prefix remains = ~s"the serialized 
document, even though~@
 >                                                                       
   ^
 >        While processing indirect control string
 >        "~%~%~@R. ~@? :~%"
 >                    ^
 >
 > While executing: CCL::DO-SUB-FORMAT
 > Type :POP to abort.
Type :? for other options.
1 > :b
(BFFFF930) : 0 "CCL::DO-SUB-FORMAT" 152
(BFFFF940) : 1 "FORMAT" 728
(BFFFF950) : 2 "REPORT-MUTATION" 176
(BFFFF960) : 3 "MAP" 460
(BFFFF970) : 4 "CCL::LOAD-FROM-STREAM" 240
(BFFFF980) : 5 "CCL::%LOAD" 1320
(BFFFF9A0) : 6 NIL NIL
(BFFFF9B0) : 7 "LOAD" 620
(BFFFF9D0) : 8 NIL NIL
(BFFFF9E0) : 9 "CCL::CALL-CHECK-REGS" 80
(BFFFF9F0) : 10 NIL NIL
(BFFFFA00) : 11 "CCL::TOPLEVEL-EVAL" 176
(BFFFFA10) : 12 "CCL::READ-LOOP" 964
(BFFFFA60) : 13 "TOPLEVEL-LOOP" 52
1 > (:f 1)
(BFFFF940) : 1 "FORMAT" 728
   0 : #<SYNONYM-STREAM to *TERMINAL-IO* #x528012E> ("required")
   1 : "~%~%~@R. ~@? :~%" ("required")
                            ~s.name.prefix remains = ~s" #<ELEM-NODE 
|data:,ns-a|::\x 2 #x5A92CDE> "") ("rest")
                            ~s.name.prefix remains = ~s" #<ELEM-NODE 
|data:,ns-a|::\x 2 #x5A92CDE> "") ("saved SAVE0")
   4 : NIL ("saved SAVE1")
   5 : (#<Anonymous Function #x5A89B7E> #<Anonymous Function #x5A887D6> 
#<Anonymous Function #x5A869EE> #<Anonymous Function #x5A8531E> 
#<Anonymous Function #x5A837D6> #<Anonymous Function #x5A804AE>) 
("saved SAVE2")
   6 : NIL ("saved SAVE3")
   7 CCL::*FORMAT-TOP-LEVEL*: NIL (:SAVED-SPECIAL)
   8 CCL::*FORMAT-CONTROL-STRING*: "" (:SAVED-SPECIAL)
                            ~s.name.prefix remains = ~s" #<ELEM-NODE 
|data:,ns-a|::\x 2 #x5A92CDE> "")
                            ~s.name.prefix remains = ~s" #<ELEM-NODE 
|data:,ns-a|::\x 2 #x5A92CDE> "")
   11 : ERROR
   12 CCL::*FORMAT-ORIGINAL-ARGUMENTS*: NIL (:SAVED-SPECIAL)
   13 CCL::*FORMAT-ARGUMENTS*: NIL (:SAVED-SPECIAL)
   14 CCL::*FORMAT-COLON-REST*: #<Unbound> (:SAVED-SPECIAL)

1 >
(apply #'format t "~%~%~@R. ~@? :~%"
        1 (rest '(dummy
                  "a change of the prefix specified for a local 
namespace binding ~
                   has the expected effect on the serialized document, 
even though~@
                    ~s.name.prefix remains = ~s"
                  <child-elem> "prefix")))


I. a change of the prefix specified for a local namespace binding has 
the expected effect on the serialized document, even though
<CHILD-ELEM>.name.prefix remains = "prefix" :
NIL
1 > :pop