improve arity error messages when keywords are involved

svn: r7887
This commit is contained in:
Matthew Flatt 2007-12-02 15:45:51 +00:00
parent 85292c229d
commit 9b96716432
15 changed files with 440 additions and 276 deletions

View File

@ -21,6 +21,50 @@
(-define-struct keyword-procedure (proc required allowed))
(define (generate-arity-string proc)
(let-values ([(req allowed) (procedure-keywords proc)]
[(a) (procedure-arity proc)]
[(keywords-desc)
(lambda (opt req)
(format "~a with keyword~a~a"
(if (null? (cdr req))
(format "an ~aargument" opt)
(format "~aarguments" opt))
(if (null? (cdr req))
""
"s")
(case (length req)
[(1) (format " ~a" (car req))]
[(2) (format " ~a and ~a" (car req) (cadr req))]
[else
(let loop ([req req])
(if (null? (cdr req))
(format " and ~a" (car req))
(format " ~a,~a" (car req)
(loop (cdr req)))))])))])
(string-append
(cond
[(number? a) (format "expects ~a argument~a" a (if (= a 1) "" "s"))]
[(arity-at-least? a)
(let ([a (arity-at-least-value a)])
(format "expects at least ~a argument~a" a (if (= a 1) "" "s")))]
[else
"a different number of arguments"])
(if (null? req)
""
(format " plus ~a" (keywords-desc "" req)))
(let ([others (let loop ([req req][allowed allowed])
(cond
[(null? req) allowed]
[(eq? (car req) (car allowed))
(loop (cdr req) (cdr allowed))]
[else
(cons (car allowed) (loop req (cdr allowed)))]))])
(if (null? others)
""
(format " plus ~a"
(keywords-desc "optional " others)))))))
;; Constructor for a procedure with only optional keywords.
;; The `procedure' property dispatches to a procedure in the
;; struct (which has exactly the right arity).
@ -28,7 +72,8 @@
(make-struct-type 'procedure
struct:keyword-procedure
1 0 #f
null (current-inspector) 0))
(list (cons prop:arity-string generate-arity-string))
(current-inspector) 0))
;; Constructor generator for a procedure with a required keyword.
;; (This is used with lift-expression, so that the same constructor
@ -40,7 +85,8 @@
(make-struct-type (string->symbol (format "procedure:~a" name))
struct:keyword-procedure
0 0 #f
null (current-inspector) fail-proc)])
(list (cons prop:arity-string generate-arity-string))
(current-inspector) fail-proc)])
mk))
;; ----------------------------------------
@ -117,7 +163,11 @@
[(keyword-procedure? p)
(values (keyword-procedure-required p)
(keyword-procedure-allowed p))]
[(procedure? p) (values null null)]
[(procedure? p)
(let ([p (procedure-extract-target p)])
(if p
(procedure-keywords p)
(values null null)))]
[else (raise-type-error 'procedure-keywords
"procedure"
p)]))
@ -653,56 +703,63 @@
(and (not missing-kw) (not extra-kw))))
;; Ok:
(keyword-procedure-proc p)
;; Not ok:
(lambda (kws kw-args . args)
(let-values ([(missing-kw extra-kw)
(if (keyword-procedure? p)
(check-kw-args p kws)
(values #f (car kws)))])
(let ([args-str
(if (and (null? args)
(null? kws))
"no arguments supplied"
;; Hack to format arguments:
(with-handlers ([exn:fail?
(lambda (exn)
(format "arguments were: ~a"
(cadr (regexp-match
#rx"other arguments were: (.*)$"
(exn-message exn)))))])
(apply raise-type-error 'x "x" 0 'x
(append (apply append (map list kws kw-args))
args))))])
(raise
(make-exn:fail:contract
(if extra-kw
(if (keyword-procedure? p)
(format
(string-append
"procedure application: procedure: ~e;"
" does not expect an argument with keyword ~a; ~a")
p
extra-kw
args-str)
(format
(string-append
"procedure application: expected a procedure that"
" accepts keyword arguments, given ~e; ~a")
p
args-str))
(if missing-kw
(format
(string-append
"procedure application: procedure: ~e; requires"
" an argument with keyword ~a, not supplied; ~a")
p
missing-kw
args-str)
(format
(string-append
"procedure application: no case matching ~a non-keyword"
" arguments for: ~e; ~a")
(- n 2)
p
args-str)))
(current-continuation-marks)))))))))
;; Not ok, so far:
(let ([p2 (if (keyword-procedure? p)
#f
(procedure-extract-target p))])
(if p2
;; Maybe the target is ok:
(keyword-procedure-extract kws n p2)
;; Not ok, period:
(lambda (kws kw-args . args)
(let-values ([(missing-kw extra-kw)
(if (keyword-procedure? p)
(check-kw-args p kws)
(values #f (car kws)))])
(let ([args-str
(if (and (null? args)
(null? kws))
"no arguments supplied"
;; Hack to format arguments:
(with-handlers ([exn:fail?
(lambda (exn)
(format "arguments were: ~a"
(cadr (regexp-match
#rx"other arguments were: (.*)$"
(exn-message exn)))))])
(apply raise-type-error 'x "x" 0 'x
(append args
(apply append (map list kws kw-args))))))])
(raise
(make-exn:fail:contract
(if extra-kw
(if (keyword-procedure? p)
(format
(string-append
"procedure application: procedure: ~e;"
" does not expect an argument with keyword ~a; ~a")
p
extra-kw
args-str)
(format
(string-append
"procedure application: expected a procedure that"
" accepts keyword arguments, given ~e; ~a")
p
args-str))
(if missing-kw
(format
(string-append
"procedure application: procedure: ~e; requires"
" an argument with keyword ~a, not supplied; ~a")
p
missing-kw
args-str)
(format
(string-append
"procedure application: no case matching ~a non-keyword"
" arguments for: ~e; ~a")
(- n 2)
p
args-str)))
(current-continuation-marks)))))))))))

View File

@ -1,8 +1,10 @@
#lang scribble/doc
@require[scribble/manual]
@require[scribble/eval]
@require[scheme/class]
@require["guide-utils.ss"]
@(require scribble/manual
scribble/eval
scheme/class
"guide-utils.ss"
(for-label scheme/class))
@; FIXME: at some point, discuss classes vs. units vs. modules
@ -310,7 +312,7 @@ new method or an overriding implementation.
Between the extremes of allowing arbitrary overriding and disallowing
overriding entirely, the class system also supports Beta-style
@defterm{augmentable} methods~\cite{beta}. A method
@defterm{augmentable} methods. A method
declared with @scheme[pubment] is like @scheme[public], but the method
cannot be overridden in subclasses; it can be augmented only. A
@scheme[pubment] method must explicitly invoke an augmentation (if any)
@ -322,9 +324,7 @@ a class derivation. The @scheme[augride] method specification
indicates an augmentation to a method where the augmentation is itself
overrideable in subclasses (though the superclass's implementation
cannot be overridden). Similarly, @scheme[overment] overrides a method
and makes the overriding implementation augmentable. Our earlier
work~\cite{Super+Inner} motivates and explains these extensions and
their interleaving.
and makes the overriding implementation augmentable.
@section[#:tag "extnames"]{Controlling the Scope of External Names}

View File

@ -27,9 +27,10 @@ Returns @scheme[#f] if @scheme[v] is a @tech{resolved module path},
resolved-module-path?]{
Returns a @tech{resolved module path} that encapsulates @scheme[path].
If @scheme[path] is not a symbol, it normally should be expanded (see
@scheme[expand-path]), simplified (see @scheme[simplify-path]), and
case-normalized (see @scheme[normal-case-path]).
If @scheme[path] is not a symbol, it normally should be
@tech{cleanse}d (see @scheme[cleanse-path]), simplified (see
@scheme[simplify-path]), and case-normalized (see
@scheme[normal-case-path]).
A @tech{resolved module path} is interned. That is, if two
@tech{resolved module path} values encapsulate paths that are

View File

@ -197,7 +197,7 @@ from the application expression. The procedure's name (see
used for the name and arity of the structure. If the value in the
designated field is not a procedure, then the instance behaves like
@scheme[(case-lambda)] (i.e., a procedure which does not accept any
number of arguments).
number of arguments). See also @scheme[procedure-extract-target].
Providing an integer @scheme[proc-spec] argument to
@scheme[make-struct-type] is the same as both supplying the value with
@ -262,3 +262,42 @@ Returns @scheme[#t] if instances of the structure type represented by
@scheme[type] are procedures (according to @scheme[procedure?]),
@scheme[#f] otherwise.}
@defproc[(procedure-extract-target [proc procedure?]) (or/c false/c procedure?)]{
If @scheme[proc] is an instance of a structure type with property
@scheme[prop:procedure], and if the property value indicates a field
of the structure, and if the field value is a procedure, then
@scheme[procedure-extract-target] returns the field value. Otherwise,
the result if @scheme[#f].}
@defthing[prop:arity-string struct-type-property?]{
This property is used for reporting arity-mismatch errors when a
structure type with the @scheme[prop:procedure] property is applied to
the wrong number of arguments. The value of the
@scheme[prop:arity-string] property must be a procedure that takes a
single argument, which is the misapplied structure, and returns a
string. The result string is used after the word ``expects,'' and it
is followed in the error message by the number of actual arguments.
Arity-mismatch reporting automatically uses
@scheme[procedure-extract-target] when the @scheme[prop:arity-string]
property is not associated with a procedure structure type.
@examples[
(define-struct evens (proc)
#:property prop:procedure (struct-field-index proc)
#:property prop:arity-string
(lambda (p)
"an even number of arguments"))
(define pairs
(make-evens
(case-lambda
[() null]
[(a b . more)
(cons (cons a b)
(apply pairs more))])))
(pairs 1 2 3 4)
(pairs 5)]}

View File

@ -66,6 +66,8 @@
(syntax-test #'(let ([define-values 10]) (local ((define-values (x) 4)) 10)))
(syntax-test #'(let ([define-struct 10]) (local ((define-struct x ())) 10)))
(define else #f) ;; `evcase' needs unbound `else' !!!! <------------------ WARNING
(for-each syntax-test
(list #'(evcase)
#'(evcase 1 (a))

View File

@ -51,6 +51,7 @@
(load-relative "kw.ss")
; Last - so macros are not present by accident
; Also: currently re-defines `else'!
(load-relative "macrolib.ss")
(report-errs)

View File

@ -305,8 +305,6 @@ macxsrc/wx_rbut.cc: $(WXMACDIR)/mac/wx_rbut.cc $(XFORMDEP) $(MACXPRECOMPDEP)
$(XFORMWP) macxsrc/wx_rbut.cc $(WXMACDIR)/mac/wx_rbut.cc
macxsrc/wx_sbar.cc: $(WXMACDIR)/mac/wx_sbar.cc $(XFORMDEP) $(MACXPRECOMPDEP)
$(XFORMWP) macxsrc/wx_sbar.cc $(WXMACDIR)/mac/wx_sbar.cc
macxsrc/wxMargin.cc: $(WXMACDIR)/mac/wxMargin.cc $(XFORMDEP) $(MACXPRECOMPDEP)
$(XFORMXX) macxsrc/wxMargin.cc $(WXMACDIR)/mac/wxMargin.cc
macxsrc/wx_dialg.cc: $(WXMACDIR)/mac/wx_dialg.cc $(XFORMDEP) $(MACXPRECOMPDEP)
$(XFORMWP) macxsrc/wx_dialg.cc $(WXMACDIR)/mac/wx_dialg.cc
macxsrc/wx_screen.cc: $(WXMACDIR)/mac/wx_screen.cc $(XFORMDEP) $(MACXPRECOMPDEP)
@ -356,8 +354,6 @@ macxsrc/wx_mac_utils.cc: $(WXMACDIR)/mac/wx_mac_utils.cc $(XFORMDEP) $(MACXPRECO
macxsrc/wx_bmp.cc: $(WXMACDIR)/../utils/image/src/wx_bmp.cc $(XFORMDEP) $(MACXPRECOMPDEP)
$(XFORMWP) macxsrc/wx_bmp.cc $(WXMACDIR)/../utils/image/src/wx_bmp.cc
macxsrc/wx_24to8.cc: $(WXMACDIR)/../utils/image/src/wx_24to8.cc $(XFORMDEP) $(MACXPRECOMPDEP)
$(XFORMWP) macxsrc/wx_24to8.cc $(WXMACDIR)/../utils/image/src/wx_24to8.cc
macxsrc/wx_image.cc: $(WXMACDIR)/../utils/image/src/wx_image.cc $(XFORMDEP) $(MACXPRECOMPDEP)
$(XFORMWP) macxsrc/wx_image.cc $(WXMACDIR)/../utils/image/src/wx_image.cc
macxsrc/wx_xbm.cc: $(WXMACDIR)/../utils/image/src/wx_xbm.cc $(XFORMDEP) $(MACXPRECOMPDEP)
@ -709,8 +705,6 @@ mwx_rbut.@LTO@: macxsrc/wx_rbut.cc $(MACPRECOMPDEP)
$(CXX) $(MACXFLAG) $(MACUSEPRECOMP) -DGC2_JUST_MACROS $(GCPREINC) -c $(XXPOSTFLAGS) -o mwx_rbut.@LTO@ macxsrc/wx_rbut.cc
mwx_sbar.@LTO@: macxsrc/wx_sbar.cc $(MACPRECOMPDEP)
$(CXX) $(MACXFLAG) $(MACUSEPRECOMP) -DGC2_JUST_MACROS $(GCPREINC) -c $(XXPOSTFLAGS) -o mwx_sbar.@LTO@ macxsrc/wx_sbar.cc
mwxMargin.@LTO@: macxsrc/wxMargin.cc
$(CXX) $(MACXFLAG) -DGC2_JUST_MACROS $(GCPREINC) -c $(XXPOSTFLAGS) -o mwxMargin.@LTO@ macxsrc/wxMargin.cc
mwx_dialg.@LTO@: macxsrc/wx_dialg.cc $(MACPRECOMPDEP)
$(CXX) $(MACXFLAG) $(MACUSEPRECOMP) -DGC2_JUST_MACROS $(GCPREINC) -c $(XXPOSTFLAGS) -o mwx_dialg.@LTO@ macxsrc/wx_dialg.cc
mwx_screen.@LTO@: macxsrc/wx_screen.cc $(MACPRECOMPDEP)
@ -760,8 +754,6 @@ mwx_mac_utils.@LTO@: macxsrc/wx_mac_utils.cc $(MACPRECOMPDEP)
mwx_bmp.@LTO@: macxsrc/wx_bmp.cc $(MACPRECOMPDEP)
$(CXX) $(MACXFLAG) $(MACUSEPRECOMP) -DGC2_JUST_MACROS $(GCPREINC) -c $(XXPOSTFLAGS) -o mwx_bmp.@LTO@ macxsrc/wx_bmp.cc
mwx_24to8.@LTO@: macxsrc/wx_24to8.cc $(MACPRECOMPDEP)
$(CXX) $(MACXFLAG) $(MACUSEPRECOMP) -DGC2_JUST_MACROS $(GCPREINC) -c $(XXPOSTFLAGS) -o mwx_24to8.@LTO@ macxsrc/wx_24to8.cc
mwx_image.@LTO@: macxsrc/wx_image.cc $(MACPRECOMPDEP)
$(CXX) $(MACXFLAG) $(MACUSEPRECOMP) -DGC2_JUST_MACROS $(GCPREINC) -c $(XXPOSTFLAGS) -o mwx_image.@LTO@ macxsrc/wx_image.cc
mwx_xbm.@LTO@: macxsrc/wx_xbm.cc $(MACPRECOMPDEP)
@ -995,7 +987,6 @@ wx_mac_XSRCS = \
macxsrc/wx_rbox.cc \
macxsrc/wx_rbut.cc \
macxsrc/wx_sbar.cc \
macxsrc/wxMargin.cc \
macxsrc/wx_dialg.cc \
macxsrc/wx_screen.cc \
macxsrc/wxRectBorder.cc \
@ -1021,7 +1012,6 @@ wx_mac_XSRCS = \
macxsrc/wx_mac_utils.cc \
\
macxsrc/wx_bmp.cc \
macxsrc/wx_24to8.cc \
macxsrc/wx_image.cc \
macxsrc/wx_xbm.cc \
\
@ -1197,7 +1187,6 @@ wx_mac_XOBJS = \
mwx_rbox.@LTO@ \
mwx_rbut.@LTO@ \
mwx_sbar.@LTO@ \
mwxMargin.@LTO@ \
mwx_dialg.@LTO@ \
mwx_screen.@LTO@ \
mwxRectBorder.@LTO@ \
@ -1223,7 +1212,6 @@ wx_mac_XOBJS = \
mwx_mac_utils.@LTO@ \
\
mwx_bmp.@LTO@ \
mwx_24to8.@LTO@ \
mwx_image.@LTO@ \
mwx_xbm.@LTO@ \
\
@ -1463,7 +1451,6 @@ gen-deps:
@INCLUDEDEP@ wx_rbox.dd
@INCLUDEDEP@ wx_rbut.dd
@INCLUDEDEP@ wx_sbar.dd
@INCLUDEDEP@ wxMargin.dd
@INCLUDEDEP@ wx_dialg.dd
@INCLUDEDEP@ wx_screen.dd
@INCLUDEDEP@ wxRectBorder.dd

View File

@ -1,13 +1,13 @@
{
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,51,50,0,0,0,1,0,0,6,0,9,
0,14,0,18,0,23,0,36,0,41,0,45,0,52,0,55,0,62,0,69,0,
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,52,50,0,0,0,1,0,0,6,0,9,
0,14,0,18,0,23,0,28,0,32,0,39,0,52,0,55,0,62,0,69,0,
78,0,84,0,98,0,112,0,115,0,119,0,121,0,132,0,134,0,148,0,155,
0,177,0,179,0,193,0,203,0,209,0,227,0,26,1,36,1,53,1,86,1,
119,1,178,1,223,1,45,2,90,2,95,2,115,2,245,2,9,3,57,3,123,
3,6,4,148,4,191,4,202,4,25,5,0,0,29,7,0,0,65,98,101,103,
105,110,29,11,11,64,108,101,116,42,63,108,101,116,64,119,104,101,110,72,112,
97,114,97,109,101,116,101,114,105,122,101,64,99,111,110,100,63,97,110,100,66,
108,101,116,114,101,99,62,111,114,66,100,101,102,105,110,101,66,117,110,108,101,
105,110,29,11,11,64,108,101,116,42,63,108,101,116,64,119,104,101,110,64,99,
111,110,100,63,97,110,100,66,108,101,116,114,101,99,72,112,97,114,97,109,101,
116,101,114,105,122,101,62,111,114,66,100,101,102,105,110,101,66,117,110,108,101,
115,115,68,104,101,114,101,45,115,116,120,65,113,117,111,116,101,29,94,2,14,
68,35,37,112,97,114,97,109,122,11,29,94,2,14,68,35,37,107,101,114,110,
101,108,11,62,105,102,63,115,116,120,61,115,70,108,101,116,45,118,97,108,117,
@ -17,7 +17,7 @@
95,8,240,48,117,0,0,11,16,0,95,8,193,11,16,0,96,35,11,93,158,
2,16,34,16,2,2,13,159,2,2,35,2,13,97,10,34,11,94,158,2,15,
34,158,2,16,34,16,20,2,10,2,2,2,3,2,2,2,4,2,2,2,5,
2,2,2,6,2,2,2,7,2,2,2,8,2,2,2,9,2,2,2,11,2,
2,2,2,6,2,2,2,7,2,2,2,9,2,2,2,8,2,2,2,11,2,
2,2,12,2,2,13,16,4,34,29,11,11,2,2,11,18,98,64,104,101,114,
101,8,31,8,30,8,29,8,28,8,27,27,248,22,174,3,195,249,22,167,3,
80,158,37,34,251,22,73,2,17,248,22,88,199,12,249,22,63,2,1,248,22,
@ -25,15 +25,15 @@
248,22,88,199,249,22,63,2,1,248,22,90,201,12,27,248,22,65,248,22,174,
3,196,28,248,22,71,193,20,15,159,35,34,35,28,248,22,71,248,22,65,194,
248,22,64,193,249,22,167,3,80,158,37,34,251,22,73,2,17,248,22,64,199,
249,22,63,2,8,248,22,65,201,11,18,100,10,8,31,8,30,8,29,8,28,
8,27,16,4,11,11,2,18,3,1,7,101,110,118,55,51,56,50,16,4,11,
11,2,19,3,1,7,101,110,118,55,51,56,51,27,248,22,65,248,22,174,3,
249,22,63,2,7,248,22,65,201,11,18,100,10,8,31,8,30,8,29,8,28,
8,27,16,4,11,11,2,18,3,1,7,101,110,118,54,55,55,53,16,4,11,
11,2,19,3,1,7,101,110,118,54,55,55,54,27,248,22,65,248,22,174,3,
196,28,248,22,71,193,20,15,159,35,34,35,28,248,22,71,248,22,65,194,248,
22,64,193,249,22,167,3,80,158,37,34,250,22,73,2,20,248,22,73,249,22,
73,248,22,73,2,21,248,22,64,201,251,22,73,2,17,2,21,2,21,249,22,
63,2,10,248,22,65,204,18,100,11,8,31,8,30,8,29,8,28,8,27,16,
4,11,11,2,18,3,1,7,101,110,118,55,51,56,53,16,4,11,11,2,19,
3,1,7,101,110,118,55,51,56,54,248,22,174,3,193,27,248,22,174,3,194,
4,11,11,2,18,3,1,7,101,110,118,54,55,55,56,16,4,11,11,2,19,
3,1,7,101,110,118,54,55,55,57,248,22,174,3,193,27,248,22,174,3,194,
249,22,63,248,22,73,248,22,64,196,248,22,65,195,27,248,22,65,248,22,174,
3,196,249,22,167,3,80,158,37,34,28,248,22,51,248,22,168,3,248,22,64,
197,27,249,22,2,32,0,89,162,8,36,35,41,9,222,33,39,248,22,174,3,
@ -57,12 +57,12 @@
65,248,22,174,3,196,28,248,22,71,193,20,15,159,35,34,35,249,22,167,3,
80,158,37,34,27,248,22,174,3,248,22,64,197,28,249,22,137,8,62,61,62,
248,22,168,3,248,22,88,196,250,22,73,2,20,248,22,73,249,22,73,21,93,
2,25,248,22,64,199,250,22,74,2,7,249,22,73,2,25,249,22,73,248,22,
2,25,248,22,64,199,250,22,74,2,6,249,22,73,2,25,249,22,73,248,22,
97,203,2,25,248,22,65,202,251,22,73,2,17,28,249,22,137,8,248,22,168,
3,248,22,64,200,64,101,108,115,101,10,248,22,64,197,250,22,74,2,20,9,
248,22,65,200,249,22,63,2,7,248,22,65,202,99,8,31,8,30,8,29,8,
28,8,27,16,4,11,11,2,18,3,1,7,101,110,118,55,52,48,56,16,4,
11,11,2,19,3,1,7,101,110,118,55,52,48,57,18,158,94,10,64,118,111,
248,22,65,200,249,22,63,2,6,248,22,65,202,99,8,31,8,30,8,29,8,
28,8,27,16,4,11,11,2,18,3,1,7,101,110,118,54,56,48,49,16,4,
11,11,2,19,3,1,7,101,110,118,54,56,48,50,18,158,94,10,64,118,111,
105,100,8,47,27,248,22,65,248,22,174,3,196,249,22,167,3,80,158,37,34,
28,248,22,51,248,22,168,3,248,22,64,197,250,22,73,2,26,248,22,73,248,
22,64,199,248,22,88,198,27,248,22,168,3,248,22,64,197,250,22,73,2,26,
@ -77,17 +77,17 @@
20,102,159,34,16,0,16,1,33,32,10,16,5,93,2,12,89,162,8,36,35,
51,9,223,0,33,33,34,20,102,159,34,16,1,20,25,159,35,2,2,2,13,
16,0,11,16,5,93,2,5,89,162,8,36,35,51,9,223,0,33,34,34,20,
102,159,34,16,1,20,25,159,35,2,2,2,13,16,0,11,16,5,93,2,8,
102,159,34,16,1,20,25,159,35,2,2,2,13,16,0,11,16,5,93,2,7,
89,162,8,36,35,51,9,223,0,33,35,34,20,102,159,34,16,1,20,25,159,
35,2,2,2,13,16,1,33,36,11,16,5,93,2,10,89,162,8,36,35,54,
9,223,0,33,37,34,20,102,159,34,16,1,20,25,159,35,2,2,2,13,16,
1,33,38,11,16,5,93,2,4,89,162,8,36,35,56,9,223,0,33,41,34,
20,102,159,34,16,1,20,25,159,35,2,2,2,13,16,0,11,16,5,93,2,
9,89,162,8,36,35,51,9,223,0,33,43,34,20,102,159,34,16,1,20,25,
8,89,162,8,36,35,51,9,223,0,33,43,34,20,102,159,34,16,1,20,25,
159,35,2,2,2,13,16,0,11,16,5,93,2,3,89,162,8,36,35,52,9,
223,0,33,44,34,20,102,159,34,16,1,20,25,159,35,2,2,2,13,16,0,
11,16,5,93,2,6,89,162,8,36,35,53,9,223,0,33,45,34,20,102,159,
34,16,1,20,25,159,35,2,2,2,13,16,0,11,16,5,93,2,7,89,162,
11,16,5,93,2,9,89,162,8,36,35,53,9,223,0,33,45,34,20,102,159,
34,16,1,20,25,159,35,2,2,2,13,16,0,11,16,5,93,2,6,89,162,
8,36,35,56,9,223,0,33,46,34,20,102,159,34,16,1,20,25,159,35,2,
2,2,13,16,1,33,48,11,16,5,93,2,11,89,162,8,36,35,52,9,223,
0,33,49,34,20,102,159,34,16,1,20,25,159,35,2,2,2,13,16,0,11,
@ -95,7 +95,7 @@
EVAL_ONE_SIZED_STR((char *)expr, 1943);
}
{
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,51,61,0,0,0,1,0,0,3,0,16,
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,52,61,0,0,0,1,0,0,3,0,16,
0,21,0,38,0,53,0,71,0,87,0,97,0,115,0,135,0,151,0,169,0,
200,0,229,0,251,0,9,1,15,1,29,1,34,1,44,1,52,1,80,1,112,
1,157,1,202,1,226,1,9,2,11,2,20,2,71,2,87,3,96,3,126,3,
@ -128,131 +128,131 @@
97,110,110,111,116,32,97,100,100,32,97,32,115,117,102,102,105,120,32,116,111,
32,97,32,114,111,111,116,32,112,97,116,104,58,32,5,0,68,35,37,107,101,
114,110,101,108,27,20,14,159,80,158,35,49,250,80,158,38,50,249,22,27,11,
80,158,40,49,22,134,12,10,248,22,184,4,195,28,248,22,162,5,193,12,87,
80,158,40,49,22,136,12,10,248,22,184,4,195,28,248,22,162,5,193,12,87,
94,248,22,140,8,193,248,80,159,36,53,35,195,28,248,22,71,194,9,27,248,
22,64,195,27,28,248,22,179,12,194,193,28,248,22,178,12,194,249,22,180,12,
195,250,80,158,41,47,248,22,130,13,2,20,11,10,250,80,158,39,47,248,22,
130,13,2,20,196,10,28,192,249,22,63,248,22,182,12,249,22,180,12,197,247,
22,131,13,27,248,22,65,199,28,248,22,71,193,9,27,248,22,64,194,27,28,
248,22,179,12,194,193,28,248,22,178,12,194,249,22,180,12,195,250,80,158,46,
47,248,22,130,13,2,20,11,10,250,80,158,44,47,248,22,130,13,2,20,196,
10,28,192,249,22,63,248,22,182,12,249,22,180,12,197,247,22,131,13,248,80,
22,64,195,27,28,248,22,181,12,194,193,28,248,22,180,12,194,249,22,182,12,
195,250,80,158,41,47,248,22,132,13,2,20,11,10,250,80,158,39,47,248,22,
132,13,2,20,196,10,28,192,249,22,63,248,22,184,12,249,22,182,12,197,247,
22,133,13,27,248,22,65,199,28,248,22,71,193,9,27,248,22,64,194,27,28,
248,22,181,12,194,193,28,248,22,180,12,194,249,22,182,12,195,250,80,158,46,
47,248,22,132,13,2,20,11,10,250,80,158,44,47,248,22,132,13,2,20,196,
10,28,192,249,22,63,248,22,184,12,249,22,182,12,197,247,22,133,13,248,80,
159,44,52,35,248,22,65,198,248,80,159,42,52,35,248,22,65,196,27,248,22,
65,197,28,248,22,71,193,9,27,248,22,64,194,27,28,248,22,179,12,194,193,
28,248,22,178,12,194,249,22,180,12,195,250,80,158,44,47,248,22,130,13,2,
20,11,10,250,80,158,42,47,248,22,130,13,2,20,196,10,28,192,249,22,63,
248,22,182,12,249,22,180,12,197,247,22,131,13,248,80,159,42,52,35,248,22,
65,197,28,248,22,71,193,9,27,248,22,64,194,27,28,248,22,181,12,194,193,
28,248,22,180,12,194,249,22,182,12,195,250,80,158,44,47,248,22,132,13,2,
20,11,10,250,80,158,42,47,248,22,132,13,2,20,196,10,28,192,249,22,63,
248,22,184,12,249,22,182,12,197,247,22,133,13,248,80,159,42,52,35,248,22,
65,198,248,80,159,40,52,35,248,22,65,196,249,80,159,36,37,35,2,7,195,
27,248,22,155,12,194,28,192,192,28,248,22,133,6,194,27,248,22,177,12,195,
28,192,192,248,22,178,12,195,11,87,94,28,28,248,22,156,12,194,10,27,248,
22,155,12,195,28,192,192,28,248,22,133,6,195,27,248,22,177,12,196,28,192,
192,248,22,178,12,196,11,12,250,22,167,8,76,110,111,114,109,97,108,45,112,
27,248,22,157,12,194,28,192,192,28,248,22,133,6,194,27,248,22,179,12,195,
28,192,192,248,22,180,12,195,11,87,94,28,28,248,22,158,12,194,10,27,248,
22,157,12,195,28,192,192,28,248,22,133,6,195,27,248,22,179,12,196,28,192,
192,248,22,180,12,196,11,12,250,22,167,8,76,110,111,114,109,97,108,45,112,
97,116,104,45,99,97,115,101,6,42,42,112,97,116,104,32,40,102,111,114,32,
97,110,121,32,115,121,115,116,101,109,41,32,111,114,32,118,97,108,105,100,45,
112,97,116,104,32,115,116,114,105,110,103,196,28,28,248,22,156,12,194,249,22,
137,8,248,22,157,12,196,2,21,249,22,137,8,247,22,152,7,2,21,27,28,
248,22,133,6,195,194,248,22,142,7,248,22,160,12,196,28,249,22,143,13,0,
112,97,116,104,32,115,116,114,105,110,103,196,28,28,248,22,158,12,194,249,22,
137,8,248,22,159,12,196,2,21,249,22,137,8,247,22,152,7,2,21,27,28,
248,22,133,6,195,194,248,22,142,7,248,22,162,12,196,28,249,22,145,13,0,
21,35,114,120,34,94,91,92,92,93,91,92,92,93,91,63,93,91,92,92,93,
34,194,28,248,22,133,6,195,248,22,163,12,195,194,27,248,22,172,6,194,249,
22,164,12,248,22,145,7,250,22,149,13,0,6,35,114,120,34,47,34,28,249,
22,143,13,0,22,35,114,120,34,91,47,92,92,93,91,46,32,93,43,91,47,
92,92,93,42,36,34,200,198,250,22,149,13,0,19,35,114,120,34,91,32,46,
34,194,28,248,22,133,6,195,248,22,165,12,195,194,27,248,22,172,6,194,249,
22,166,12,248,22,145,7,250,22,151,13,0,6,35,114,120,34,47,34,28,249,
22,145,13,0,22,35,114,120,34,91,47,92,92,93,91,46,32,93,43,91,47,
92,92,93,42,36,34,200,198,250,22,151,13,0,19,35,114,120,34,91,32,46,
93,43,40,91,47,92,92,93,42,41,36,34,201,6,2,2,92,49,80,158,42,
35,2,21,28,248,22,133,6,194,248,22,163,12,194,193,87,94,28,27,248,22,
155,12,195,28,192,192,28,248,22,133,6,195,27,248,22,177,12,196,28,192,192,
248,22,178,12,196,11,12,250,22,167,8,195,2,22,196,28,248,22,177,12,194,
12,248,22,179,10,249,22,188,9,248,22,162,6,250,22,181,6,2,23,199,200,
247,22,23,87,94,28,27,248,22,155,12,195,28,192,192,28,248,22,133,6,195,
27,248,22,177,12,196,28,192,192,248,22,178,12,196,11,12,250,22,167,8,195,
2,22,196,28,248,22,177,12,194,12,248,22,179,10,249,22,188,9,248,22,162,
6,250,22,181,6,2,23,199,200,247,22,23,87,94,87,94,28,27,248,22,155,
12,195,28,192,192,28,248,22,133,6,195,27,248,22,177,12,196,28,192,192,248,
22,178,12,196,11,12,250,22,167,8,195,2,22,196,28,248,22,177,12,194,12,
248,22,179,10,249,22,188,9,248,22,162,6,250,22,181,6,2,23,199,200,247,
22,23,249,22,3,89,162,34,35,48,9,223,2,33,36,196,248,22,179,10,249,
22,154,10,195,247,22,23,87,94,87,94,249,80,159,36,37,35,2,7,195,249,
35,2,21,28,248,22,133,6,194,248,22,165,12,194,193,87,94,28,27,248,22,
157,12,195,28,192,192,28,248,22,133,6,195,27,248,22,179,12,196,28,192,192,
248,22,180,12,196,11,12,250,22,167,8,195,2,22,196,28,248,22,179,12,194,
12,248,22,181,10,249,22,190,9,248,22,162,6,250,22,181,6,2,23,199,200,
247,22,23,87,94,28,27,248,22,157,12,195,28,192,192,28,248,22,133,6,195,
27,248,22,179,12,196,28,192,192,248,22,180,12,196,11,12,250,22,167,8,195,
2,22,196,28,248,22,179,12,194,12,248,22,181,10,249,22,190,9,248,22,162,
6,250,22,181,6,2,23,199,200,247,22,23,87,94,87,94,28,27,248,22,157,
12,195,28,192,192,28,248,22,133,6,195,27,248,22,179,12,196,28,192,192,248,
22,180,12,196,11,12,250,22,167,8,195,2,22,196,28,248,22,179,12,194,12,
248,22,181,10,249,22,190,9,248,22,162,6,250,22,181,6,2,23,199,200,247,
22,23,249,22,3,89,162,34,35,48,9,223,2,33,36,196,248,22,181,10,249,
22,156,10,195,247,22,23,87,94,87,94,249,80,159,36,37,35,2,7,195,249,
22,3,80,159,36,51,35,196,251,80,159,38,40,35,2,7,32,0,89,162,34,
35,43,9,222,33,38,197,198,32,40,89,162,34,40,57,65,99,108,111,111,112,
222,33,41,28,248,22,71,198,248,195,251,22,181,6,2,24,198,28,248,22,71,
202,200,250,22,1,22,173,12,203,204,197,27,249,22,173,12,248,22,64,201,198,
28,248,22,168,12,193,27,250,22,1,22,173,12,196,201,28,248,22,168,12,193,
202,200,250,22,1,22,175,12,203,204,197,27,249,22,175,12,248,22,64,201,198,
28,248,22,170,12,193,27,250,22,1,22,175,12,196,201,28,248,22,170,12,193,
192,27,248,22,65,201,28,248,22,71,193,248,198,251,22,181,6,2,24,201,28,
248,22,71,205,203,250,22,1,22,173,12,206,23,15,200,27,249,22,173,12,248,
22,64,196,201,28,248,22,168,12,193,27,250,22,1,22,173,12,196,204,28,248,
22,168,12,193,192,253,2,40,203,204,205,206,23,15,248,22,65,201,253,2,40,
248,22,71,205,203,250,22,1,22,175,12,206,23,15,200,27,249,22,175,12,248,
22,64,196,201,28,248,22,170,12,193,27,250,22,1,22,175,12,196,204,28,248,
22,170,12,193,192,253,2,40,203,204,205,206,23,15,248,22,65,201,253,2,40,
202,203,204,205,206,248,22,65,200,27,248,22,65,200,28,248,22,71,193,248,197,
251,22,181,6,2,24,200,28,248,22,71,204,202,250,22,1,22,173,12,205,206,
199,27,249,22,173,12,248,22,64,196,200,28,248,22,168,12,193,27,250,22,1,
22,173,12,196,203,28,248,22,168,12,193,192,253,2,40,202,203,204,205,206,248,
22,65,201,253,2,40,201,202,203,204,205,248,22,65,200,27,247,22,132,13,253,
2,40,198,199,200,201,202,198,87,95,28,28,248,22,156,12,193,10,27,248,22,
155,12,194,28,192,192,28,248,22,133,6,194,27,248,22,177,12,195,28,192,192,
248,22,178,12,195,11,12,252,22,167,8,199,2,25,34,197,198,28,28,248,22,
251,22,181,6,2,24,200,28,248,22,71,204,202,250,22,1,22,175,12,205,206,
199,27,249,22,175,12,248,22,64,196,200,28,248,22,170,12,193,27,250,22,1,
22,175,12,196,203,28,248,22,170,12,193,192,253,2,40,202,203,204,205,206,248,
22,65,201,253,2,40,201,202,203,204,205,248,22,65,200,27,247,22,134,13,253,
2,40,198,199,200,201,202,198,87,95,28,28,248,22,158,12,193,10,27,248,22,
157,12,194,28,192,192,28,248,22,133,6,194,27,248,22,179,12,195,28,192,192,
248,22,180,12,195,11,12,252,22,167,8,199,2,25,34,197,198,28,28,248,22,
133,6,194,10,248,22,185,6,194,12,252,22,167,8,199,2,26,35,197,198,91,
159,37,11,90,161,37,34,11,248,22,176,12,196,87,94,28,192,12,250,22,168,
159,37,11,90,161,37,34,11,248,22,178,12,196,87,94,28,192,12,250,22,168,
8,200,2,27,198,249,22,7,194,195,91,159,36,11,90,161,36,34,11,87,95,
28,28,248,22,156,12,195,10,27,248,22,155,12,196,28,192,192,28,248,22,133,
6,196,27,248,22,177,12,197,28,192,192,248,22,178,12,197,11,12,252,22,167,
28,28,248,22,158,12,195,10,27,248,22,157,12,196,28,192,192,28,248,22,133,
6,196,27,248,22,179,12,197,28,192,192,248,22,180,12,197,11,12,252,22,167,
8,2,10,2,25,34,199,200,28,28,248,22,133,6,196,10,248,22,185,6,196,
12,252,22,167,8,2,10,2,26,35,199,200,91,159,37,11,90,161,37,34,11,
248,22,176,12,198,87,94,28,192,12,250,22,168,8,2,10,2,27,200,249,22,
7,194,195,27,249,22,165,12,250,22,148,13,0,18,35,114,120,35,34,40,91,
46,93,91,94,46,93,42,124,41,36,34,248,22,161,12,200,28,248,22,133,6,
202,249,22,145,7,203,8,63,201,28,248,22,156,12,198,248,22,157,12,198,247,
22,158,12,28,248,22,155,12,194,249,22,173,12,195,194,192,91,159,36,11,90,
161,36,34,11,87,95,28,28,248,22,156,12,195,10,27,248,22,155,12,196,28,
192,192,28,248,22,133,6,196,27,248,22,177,12,197,28,192,192,248,22,178,12,
248,22,178,12,198,87,94,28,192,12,250,22,168,8,2,10,2,27,200,249,22,
7,194,195,27,249,22,167,12,250,22,150,13,0,18,35,114,120,35,34,40,91,
46,93,91,94,46,93,42,124,41,36,34,248,22,163,12,200,28,248,22,133,6,
202,249,22,145,7,203,8,63,201,28,248,22,158,12,198,248,22,159,12,198,247,
22,160,12,28,248,22,157,12,194,249,22,175,12,195,194,192,91,159,36,11,90,
161,36,34,11,87,95,28,28,248,22,158,12,195,10,27,248,22,157,12,196,28,
192,192,28,248,22,133,6,196,27,248,22,179,12,197,28,192,192,248,22,180,12,
197,11,12,252,22,167,8,2,11,2,25,34,199,200,28,28,248,22,133,6,196,
10,248,22,185,6,196,12,252,22,167,8,2,11,2,26,35,199,200,91,159,37,
11,90,161,37,34,11,248,22,176,12,198,87,94,28,192,12,250,22,168,8,2,
11,2,27,200,249,22,7,194,195,27,249,22,165,12,249,22,131,7,250,22,149,
13,0,9,35,114,120,35,34,91,46,93,34,248,22,161,12,202,6,1,1,95,
28,248,22,133,6,201,249,22,145,7,202,8,63,200,28,248,22,156,12,198,248,
22,157,12,198,247,22,158,12,28,248,22,155,12,194,249,22,173,12,195,194,192,
249,247,22,182,5,194,11,248,80,158,35,45,9,27,247,22,134,13,249,80,158,
11,90,161,37,34,11,248,22,178,12,198,87,94,28,192,12,250,22,168,8,2,
11,2,27,200,249,22,7,194,195,27,249,22,167,12,249,22,131,7,250,22,151,
13,0,9,35,114,120,35,34,91,46,93,34,248,22,163,12,202,6,1,1,95,
28,248,22,133,6,201,249,22,145,7,202,8,63,200,28,248,22,158,12,198,248,
22,159,12,198,247,22,160,12,28,248,22,157,12,194,249,22,175,12,195,194,192,
249,247,22,182,5,194,11,248,80,158,35,45,9,27,247,22,136,13,249,80,158,
37,46,28,194,27,248,22,150,7,6,11,11,80,76,84,67,79,76,76,69,67,
84,83,28,192,192,6,0,0,6,0,0,27,28,195,250,22,173,12,248,22,130,
84,83,28,192,192,6,0,0,6,0,0,27,28,195,250,22,175,12,248,22,132,
13,69,97,100,100,111,110,45,100,105,114,247,22,148,7,6,8,8,99,111,108,
108,101,99,116,115,11,27,248,80,159,40,52,35,249,22,77,201,248,22,73,248,
22,130,13,72,99,111,108,108,101,99,116,115,45,100,105,114,28,193,249,22,63,
195,194,192,32,49,89,162,34,37,49,2,19,222,33,50,27,249,22,141,13,196,
22,132,13,72,99,111,108,108,101,99,116,115,45,100,105,114,28,193,249,22,63,
195,194,192,32,49,89,162,34,37,49,2,19,222,33,50,27,249,22,143,13,196,
197,28,192,27,248,22,88,194,27,250,2,49,198,199,248,22,97,198,28,249,22,
191,6,195,2,28,249,22,77,197,194,249,22,63,248,22,164,12,196,194,28,249,
22,191,6,197,2,28,249,22,77,195,9,249,22,63,248,22,164,12,198,9,87,
191,6,195,2,28,249,22,77,197,194,249,22,63,248,22,166,12,196,194,28,249,
22,191,6,197,2,28,249,22,77,195,9,249,22,63,248,22,166,12,198,9,87,
95,28,28,248,22,185,6,194,10,248,22,133,6,194,12,250,22,167,8,2,14,
6,21,21,98,121,116,101,32,115,116,114,105,110,103,32,111,114,32,115,116,114,
105,110,103,196,28,28,248,22,72,195,249,22,4,22,155,12,196,11,12,250,22,
105,110,103,196,28,28,248,22,72,195,249,22,4,22,157,12,196,11,12,250,22,
167,8,2,14,6,13,13,108,105,115,116,32,111,102,32,112,97,116,104,115,197,
250,2,49,197,195,28,248,22,133,6,197,248,22,144,7,197,196,32,52,89,162,
8,36,38,56,2,19,222,33,55,32,53,89,162,8,36,37,53,70,102,111,117,
110,100,45,101,120,101,99,222,33,54,28,192,91,159,37,11,90,161,37,34,11,
248,22,176,12,198,27,28,197,27,248,22,181,12,200,28,249,22,139,8,194,201,
11,28,248,22,177,12,193,250,2,53,200,201,249,22,173,12,199,197,250,2,53,
200,201,195,11,28,192,192,27,28,248,22,155,12,195,27,249,22,173,12,197,200,
28,28,248,22,168,12,193,10,248,22,167,12,193,192,11,11,28,192,192,28,198,
11,27,248,22,181,12,201,28,249,22,139,8,194,202,11,28,248,22,177,12,193,
250,2,53,201,202,249,22,173,12,200,197,250,2,53,201,202,195,194,28,248,22,
71,196,11,27,248,22,180,12,248,22,64,198,27,249,22,173,12,195,196,28,248,
22,167,12,193,250,2,53,198,199,195,27,248,22,65,199,28,248,22,71,193,11,
27,248,22,180,12,248,22,64,195,27,249,22,173,12,195,199,28,248,22,167,12,
248,22,178,12,198,27,28,197,27,248,22,183,12,200,28,249,22,139,8,194,201,
11,28,248,22,179,12,193,250,2,53,200,201,249,22,175,12,199,197,250,2,53,
200,201,195,11,28,192,192,27,28,248,22,157,12,195,27,249,22,175,12,197,200,
28,28,248,22,170,12,193,10,248,22,169,12,193,192,11,11,28,192,192,28,198,
11,27,248,22,183,12,201,28,249,22,139,8,194,202,11,28,248,22,179,12,193,
250,2,53,201,202,249,22,175,12,200,197,250,2,53,201,202,195,194,28,248,22,
71,196,11,27,248,22,182,12,248,22,64,198,27,249,22,175,12,195,196,28,248,
22,169,12,193,250,2,53,198,199,195,27,248,22,65,199,28,248,22,71,193,11,
27,248,22,182,12,248,22,64,195,27,249,22,175,12,195,199,28,248,22,169,12,
193,250,2,53,201,202,195,27,248,22,65,196,28,248,22,71,193,11,27,248,22,
180,12,248,22,64,195,27,249,22,173,12,195,202,28,248,22,167,12,193,250,2,
53,204,205,195,251,2,52,204,205,206,248,22,65,199,87,95,28,27,248,22,155,
12,195,28,192,192,28,248,22,133,6,195,27,248,22,177,12,196,28,192,192,248,
22,178,12,196,11,12,250,22,167,8,2,15,6,25,25,112,97,116,104,32,111,
182,12,248,22,64,195,27,249,22,175,12,195,202,28,248,22,169,12,193,250,2,
53,204,205,195,251,2,52,204,205,206,248,22,65,199,87,95,28,27,248,22,157,
12,195,28,192,192,28,248,22,133,6,195,27,248,22,179,12,196,28,192,192,248,
22,180,12,196,11,12,250,22,167,8,2,15,6,25,25,112,97,116,104,32,111,
114,32,115,116,114,105,110,103,32,40,115,97,110,115,32,110,117,108,41,196,28,
28,194,28,27,248,22,155,12,196,28,192,192,28,248,22,133,6,196,27,248,22,
177,12,197,28,192,192,248,22,178,12,197,11,248,22,177,12,195,11,10,12,250,
28,194,28,27,248,22,157,12,196,28,192,192,28,248,22,133,6,196,27,248,22,
179,12,197,28,192,192,248,22,180,12,197,11,248,22,179,12,195,11,10,12,250,
22,167,8,2,15,6,29,29,35,102,32,111,114,32,114,101,108,97,116,105,118,
101,32,112,97,116,104,32,111,114,32,115,116,114,105,110,103,197,28,28,248,22,
177,12,194,91,159,37,11,90,161,37,34,11,248,22,176,12,197,249,22,137,8,
179,12,194,91,159,37,11,90,161,37,34,11,248,22,178,12,197,249,22,137,8,
194,68,114,101,108,97,116,105,118,101,11,27,248,22,150,7,6,4,4,80,65,
84,72,251,2,52,198,199,200,28,196,27,249,80,158,42,46,199,9,28,249,22,
137,8,247,22,152,7,2,21,249,22,63,248,22,164,12,5,1,46,194,192,9,
27,248,22,180,12,195,28,248,22,167,12,193,250,2,53,198,199,195,11,250,80,
137,8,247,22,152,7,2,21,249,22,63,248,22,166,12,5,1,46,194,192,9,
27,248,22,182,12,195,28,248,22,169,12,193,250,2,53,198,199,195,11,250,80,
158,37,47,196,197,11,250,80,158,37,47,196,11,11,87,94,249,22,189,5,247,
22,164,4,195,248,22,138,5,249,22,148,3,34,249,22,132,3,197,198,27,248,
22,130,13,2,20,27,249,80,158,38,47,195,11,27,27,248,22,151,3,198,28,
22,132,13,2,20,27,249,80,158,38,47,195,11,27,27,248,22,151,3,198,28,
192,192,34,27,27,248,22,151,3,200,28,192,192,34,27,249,22,181,4,197,89,
162,8,36,34,46,9,224,4,3,33,59,27,248,22,168,4,194,87,94,248,22,
132,4,21,94,2,17,2,29,248,80,159,41,53,35,193,159,34,20,102,159,34,
@ -286,7 +286,7 @@
34,43,35,83,158,34,16,2,32,0,89,162,34,35,42,2,12,222,33,46,80,
159,34,44,35,83,158,34,16,2,83,158,37,20,96,95,2,13,89,162,34,34,
41,9,223,0,33,47,89,162,34,35,51,9,223,0,33,48,80,159,34,45,35,
83,158,34,16,2,27,248,22,137,13,248,22,144,7,27,28,249,22,137,8,247,
83,158,34,16,2,27,248,22,139,13,248,22,144,7,27,28,249,22,137,8,247,
22,152,7,2,21,6,1,1,59,6,1,1,58,250,22,181,6,6,14,14,40,
91,94,126,97,93,42,41,126,97,40,46,42,41,195,195,89,162,34,36,46,2,
14,223,0,33,51,80,159,34,46,35,83,158,34,16,2,83,158,37,20,96,96,
@ -298,7 +298,7 @@
EVAL_ONE_SIZED_STR((char *)expr, 4179);
}
{
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,51,7,0,0,0,1,0,0,6,0,19,
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,52,7,0,0,0,1,0,0,6,0,19,
0,34,0,48,0,62,0,76,0,0,0,245,0,0,0,65,113,117,111,116,101,
29,94,2,1,67,35,37,117,116,105,108,115,11,29,94,2,1,69,35,37,110,
101,116,119,111,114,107,11,29,94,2,1,68,35,37,112,97,114,97,109,122,11,
@ -315,7 +315,7 @@
EVAL_ONE_SIZED_STR((char *)expr, 281);
}
{
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,51,52,0,0,0,1,0,0,3,0,14,
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,52,52,0,0,0,1,0,0,3,0,14,
0,41,0,47,0,60,0,74,0,96,0,122,0,134,0,152,0,172,0,184,0,
200,0,223,0,3,1,8,1,13,1,18,1,23,1,54,1,58,1,66,1,74,
1,82,1,163,1,199,1,216,1,245,1,17,2,47,2,57,2,87,2,97,2,
@ -338,25 +338,25 @@
108,101,45,110,97,109,101,45,114,101,115,111,108,118,101,114,63,108,105,98,67,
105,103,110,111,114,101,100,249,22,14,195,80,158,36,44,249,80,159,36,47,35,
195,10,27,28,194,28,249,22,137,8,196,80,158,37,45,80,158,35,46,27,248,
22,147,4,196,28,248,22,155,12,193,91,159,37,11,90,161,37,34,11,248,22,
176,12,196,87,95,83,160,36,11,80,158,39,45,198,83,160,36,11,80,158,39,
46,192,192,11,11,28,192,192,27,247,22,183,5,28,192,192,247,22,131,13,20,
22,147,4,196,28,248,22,157,12,193,91,159,37,11,90,161,37,34,11,248,22,
178,12,196,87,95,83,160,36,11,80,158,39,45,198,83,160,36,11,80,158,39,
46,192,192,11,11,28,192,192,27,247,22,183,5,28,192,192,247,22,133,13,20,
14,159,80,158,34,38,250,80,158,37,39,249,22,27,11,80,158,39,38,22,183,
5,28,248,22,155,12,197,196,247,22,131,13,247,194,250,22,173,12,196,198,249,
80,158,41,37,197,5,3,46,122,111,252,22,173,12,198,200,6,6,6,110,97,
5,28,248,22,157,12,197,196,247,22,133,13,247,194,250,22,175,12,196,198,249,
80,158,41,37,197,5,3,46,122,111,252,22,175,12,198,200,6,6,6,110,97,
116,105,118,101,247,22,153,7,249,80,158,43,37,199,80,158,43,34,27,193,27,
250,22,190,12,196,11,32,0,89,162,8,44,34,39,9,222,11,28,192,249,22,
63,195,194,11,27,248,194,195,27,250,22,190,12,196,11,32,0,89,162,8,44,
34,39,9,222,11,28,192,249,22,63,195,194,11,249,247,22,136,13,248,22,64,
195,195,27,248,194,195,27,250,22,190,12,196,11,32,0,89,162,8,44,34,39,
250,22,128,13,196,11,32,0,89,162,8,44,34,39,9,222,11,28,192,249,22,
63,195,194,11,27,248,194,195,27,250,22,128,13,196,11,32,0,89,162,8,44,
34,39,9,222,11,28,192,249,22,63,195,194,11,249,247,22,138,13,248,22,64,
195,195,27,248,194,195,27,250,22,128,13,196,11,32,0,89,162,8,44,34,39,
9,222,11,28,192,249,22,63,195,194,11,249,247,22,181,5,248,22,64,195,195,
249,247,22,181,5,194,195,87,94,28,248,80,158,35,36,194,12,250,22,167,8,
77,108,111,97,100,47,117,115,101,45,99,111,109,112,105,108,101,100,6,25,25,
112,97,116,104,32,111,114,32,118,97,108,105,100,45,112,97,116,104,32,115,116,
114,105,110,103,196,91,159,40,11,90,161,35,34,11,28,248,22,179,12,200,199,
27,247,22,183,5,28,192,249,22,180,12,202,194,200,90,161,37,35,11,248,22,
176,12,193,90,161,35,38,11,28,249,22,137,8,195,68,114,101,108,97,116,105,
118,101,2,17,193,90,161,35,39,11,247,22,133,13,27,89,162,34,35,48,62,
114,105,110,103,196,91,159,40,11,90,161,35,34,11,28,248,22,181,12,200,199,
27,247,22,183,5,28,192,249,22,182,12,202,194,200,90,161,37,35,11,248,22,
178,12,193,90,161,35,38,11,28,249,22,137,8,195,68,114,101,108,97,116,105,
118,101,2,17,193,90,161,35,39,11,247,22,135,13,27,89,162,34,35,48,62,
122,111,225,7,5,3,33,27,27,89,162,34,35,50,9,225,8,6,4,33,28,
27,249,22,5,89,162,34,35,46,9,223,5,33,29,202,27,28,194,27,249,22,
5,89,162,34,35,46,9,223,5,33,30,204,27,28,195,11,193,28,192,192,28,
@ -367,9 +367,9 @@
193,11,11,11,11,28,192,249,80,159,47,53,35,203,89,162,34,34,44,9,224,
15,2,33,33,249,80,159,47,53,35,203,89,162,34,34,43,9,224,15,7,33,
34,32,36,89,162,34,35,53,2,19,222,33,38,0,17,35,114,120,34,94,40,
46,42,63,41,47,40,46,42,41,36,34,27,249,22,141,13,2,37,195,28,192,
249,22,63,248,22,88,195,27,248,22,97,196,27,249,22,141,13,2,37,195,28,
192,249,22,63,248,22,88,195,27,248,22,97,196,27,249,22,141,13,2,37,195,
46,42,63,41,47,40,46,42,41,36,34,27,249,22,143,13,2,37,195,28,192,
249,22,63,248,22,88,195,27,248,22,97,196,27,249,22,143,13,2,37,195,28,
192,249,22,63,248,22,88,195,27,248,22,97,196,27,249,22,143,13,2,37,195,
28,192,249,22,63,248,22,88,195,248,2,36,248,22,97,196,248,22,73,194,248,
22,73,194,248,22,73,194,32,39,89,162,34,35,53,2,19,222,33,40,28,248,
22,71,248,22,65,194,249,22,7,9,248,22,64,195,91,159,36,11,90,161,36,
@ -381,77 +381,77 @@
27,248,2,36,194,28,194,192,248,2,39,193,87,95,28,248,22,145,4,195,12,
250,22,167,8,2,20,6,20,20,114,101,115,111,108,118,101,100,45,109,111,100,
117,108,101,45,112,97,116,104,197,28,207,248,208,195,12,27,27,250,22,126,80,
158,40,41,248,22,159,13,247,22,143,11,11,28,192,192,27,247,22,120,87,94,
250,22,125,80,158,41,41,248,22,159,13,247,22,143,11,195,192,250,22,125,195,
158,40,41,248,22,161,13,247,22,145,11,11,28,192,192,27,247,22,120,87,94,
250,22,125,80,158,41,41,248,22,161,13,247,22,145,11,195,192,250,22,125,195,
198,66,97,116,116,97,99,104,251,211,197,198,199,10,28,192,250,22,166,8,11,
196,195,248,22,164,8,194,28,249,22,139,6,194,6,1,1,46,2,17,28,249,
22,139,6,194,6,2,2,46,46,62,117,112,192,28,249,22,139,8,248,22,65,
199,196,28,249,22,137,8,248,22,64,199,195,251,22,164,8,2,20,6,26,26,
99,121,99,108,101,32,105,110,32,108,111,97,100,105,110,103,32,97,116,32,126,
101,58,32,126,101,199,249,22,2,22,65,248,22,78,249,22,63,205,201,12,12,
247,192,20,14,159,80,158,38,43,249,22,63,247,22,143,11,196,20,14,159,80,
247,192,20,14,159,80,158,38,43,249,22,63,247,22,145,11,196,20,14,159,80,
158,38,38,250,80,158,41,39,249,22,27,11,80,158,43,38,22,129,4,195,249,
247,22,182,5,197,248,22,52,248,22,159,12,197,87,94,28,28,248,22,155,12,
247,22,182,5,197,248,22,52,248,22,161,12,197,87,94,28,28,248,22,157,12,
196,10,248,22,150,4,196,12,28,197,250,22,166,8,11,6,15,15,98,97,100,
32,109,111,100,117,108,101,32,112,97,116,104,200,250,22,167,8,2,20,6,19,
19,109,111,100,117,108,101,45,112,97,116,104,32,111,114,32,112,97,116,104,198,
28,28,248,22,61,196,249,22,137,8,248,22,64,198,2,4,11,248,22,146,4,
248,22,88,197,28,28,248,22,61,196,249,22,137,8,248,22,64,198,66,112,108,
97,110,101,116,11,87,94,28,207,12,20,14,159,80,158,36,38,250,80,158,39,
39,249,22,27,11,80,158,41,38,22,143,11,196,90,161,35,34,10,249,22,130,
39,249,22,27,11,80,158,41,38,22,145,11,196,90,161,35,34,10,249,22,130,
4,21,94,2,21,6,18,18,112,108,97,110,101,116,47,114,101,115,111,108,118,
101,114,46,115,115,1,27,112,108,97,110,101,116,45,109,111,100,117,108,101,45,
110,97,109,101,45,114,101,115,111,108,118,101,114,12,251,211,199,200,201,202,27,
89,162,34,35,44,79,115,104,111,119,45,99,111,108,108,101,99,116,105,111,110,
45,101,114,114,223,6,33,44,27,28,248,22,51,198,27,250,22,126,80,158,42,
42,249,22,63,203,247,22,132,13,11,28,192,192,91,159,36,11,90,161,36,34,
42,249,22,63,203,247,22,134,13,11,28,192,192,91,159,36,11,90,161,36,34,
11,249,80,159,43,47,35,248,22,54,203,11,27,251,80,158,46,49,2,20,201,
28,248,22,71,198,198,248,22,64,198,28,248,22,71,198,9,248,22,65,198,249,
22,173,12,194,28,248,22,71,196,6,7,7,109,97,105,110,46,115,115,249,22,
22,175,12,194,28,248,22,71,196,6,7,7,109,97,105,110,46,115,115,249,22,
156,6,198,6,3,3,46,115,115,28,248,22,133,6,198,27,248,80,159,40,54,
35,200,27,250,22,126,80,158,43,42,249,22,63,204,198,11,28,192,192,91,159,
36,11,90,161,36,34,11,249,80,159,44,47,35,203,11,250,22,1,22,173,12,
36,11,90,161,36,34,11,249,80,159,44,47,35,203,11,250,22,1,22,175,12,
198,249,22,77,249,22,2,32,0,89,162,8,36,35,42,9,222,33,45,199,248,
22,73,199,28,248,22,155,12,198,28,248,22,178,12,198,197,248,22,73,6,26,
22,73,199,28,248,22,157,12,198,28,248,22,180,12,198,197,248,22,73,6,26,
26,32,40,97,32,112,97,116,104,32,109,117,115,116,32,98,101,32,97,98,115,
111,108,117,116,101,41,28,249,22,137,8,248,22,64,200,2,21,27,250,22,126,
80,158,42,42,249,22,63,203,247,22,132,13,11,28,192,192,91,159,37,11,90,
80,158,42,42,249,22,63,203,247,22,134,13,11,28,192,192,91,159,37,11,90,
161,36,34,11,249,80,159,44,47,35,248,22,88,204,11,90,161,35,36,11,28,
248,22,71,248,22,90,203,28,248,22,71,193,249,22,143,13,0,8,35,114,120,
248,22,71,248,22,90,203,28,248,22,71,193,249,22,145,13,0,8,35,114,120,
34,91,46,93,34,195,11,10,27,27,28,196,249,22,77,28,248,22,71,248,22,
90,23,15,21,93,6,5,5,109,122,108,105,98,249,22,1,22,77,249,22,2,
80,159,50,55,35,248,22,90,23,18,196,28,248,22,71,195,248,22,73,196,194,
251,80,158,48,49,2,20,203,248,22,64,197,248,22,65,197,249,22,173,12,194,
251,80,158,48,49,2,20,203,248,22,64,197,248,22,65,197,249,22,175,12,194,
28,197,196,28,248,22,71,196,6,7,7,109,97,105,110,46,115,115,28,249,22,
143,13,0,8,35,114,120,34,91,46,93,34,198,196,249,22,156,6,198,6,3,
3,46,115,115,28,249,22,137,8,248,22,64,200,64,102,105,108,101,249,22,180,
12,248,22,88,200,248,80,159,41,54,35,201,12,87,94,28,28,248,22,155,12,
145,13,0,8,35,114,120,34,91,46,93,34,198,196,249,22,156,6,198,6,3,
3,46,115,115,28,249,22,137,8,248,22,64,200,64,102,105,108,101,249,22,182,
12,248,22,88,200,248,80,159,41,54,35,201,12,87,94,28,28,248,22,157,12,
193,10,248,22,155,7,193,12,28,199,250,22,166,8,67,114,101,113,117,105,114,
101,249,22,181,6,6,17,17,98,97,100,32,109,111,100,117,108,101,32,112,97,
116,104,126,97,28,197,248,22,64,198,6,0,0,202,250,22,167,8,2,20,249,
22,181,6,6,13,13,109,111,100,117,108,101,32,112,97,116,104,126,97,28,197,
248,22,64,198,6,0,0,200,27,28,248,22,155,7,194,249,22,160,7,195,34,
249,22,182,12,248,22,183,12,196,11,27,28,248,22,155,7,195,249,22,160,7,
249,22,184,12,248,22,185,12,196,11,27,28,248,22,155,7,195,249,22,160,7,
196,35,248,80,158,41,50,194,91,159,37,11,90,161,37,34,11,28,248,22,155,
7,198,250,22,7,2,22,249,22,160,7,202,36,2,22,248,22,176,12,197,27,
7,198,250,22,7,2,22,249,22,160,7,202,36,2,22,248,22,178,12,197,27,
28,248,22,155,7,199,249,22,160,7,200,37,249,80,158,46,51,196,5,0,27,
28,248,22,155,7,200,249,22,160,7,201,38,248,22,146,4,198,27,27,250,22,
126,80,158,50,41,248,22,159,13,247,22,143,11,11,28,192,192,27,247,22,120,
87,94,250,22,125,80,158,51,41,248,22,159,13,247,22,143,11,195,192,87,95,
126,80,158,50,41,248,22,161,13,247,22,145,11,11,28,192,192,27,247,22,120,
87,94,250,22,125,80,158,51,41,248,22,161,13,247,22,145,11,195,192,87,95,
28,23,16,27,250,22,126,196,197,11,28,192,12,87,95,27,27,28,248,22,17,
80,158,50,44,80,158,49,44,247,22,19,250,22,25,248,22,23,196,80,158,52,
43,195,27,247,22,143,11,249,22,3,89,162,34,35,53,9,226,12,11,2,3,
43,195,27,247,22,145,11,249,22,3,89,162,34,35,53,9,226,12,11,2,3,
33,46,195,248,28,248,22,17,80,158,49,44,32,0,89,162,34,35,40,9,222,
33,47,80,159,48,56,35,89,162,34,34,49,9,227,14,9,8,4,3,33,48,
250,22,125,196,197,10,12,28,28,248,22,155,7,201,11,27,248,22,133,6,23,
15,28,192,192,28,248,22,61,23,15,249,22,137,8,248,22,64,23,17,2,21,
11,250,22,125,80,158,49,42,28,248,22,133,6,23,17,249,22,63,23,18,248,
80,159,52,54,35,23,20,249,22,63,23,18,247,22,132,13,252,22,157,7,23,
80,159,52,54,35,23,20,249,22,63,23,18,247,22,134,13,252,22,157,7,23,
15,206,204,202,201,12,193,91,159,36,10,90,161,35,34,10,11,90,161,35,35,
10,83,158,37,20,96,96,2,20,89,162,8,36,35,49,9,224,2,0,33,42,
89,162,34,37,47,9,223,1,33,43,89,162,34,38,8,30,9,225,2,3,0,
33,49,208,87,95,248,22,128,4,248,80,158,36,48,247,22,143,11,248,22,182,
5,80,158,35,35,248,22,129,12,80,159,35,40,35,159,34,20,102,159,34,16,
33,49,208,87,95,248,22,128,4,248,80,158,36,48,247,22,145,11,248,22,182,
5,80,158,35,35,248,22,131,12,80,159,35,40,35,159,34,20,102,159,34,16,
1,20,24,65,98,101,103,105,110,16,0,83,158,40,20,99,131,66,35,37,98,
111,111,116,2,1,11,10,10,10,10,10,36,80,158,34,34,20,102,159,38,16,
19,30,2,1,2,2,193,30,2,1,2,3,193,30,2,5,72,112,97,116,104,

View File

@ -75,6 +75,9 @@ Scheme_Object *scheme_def_exit_proc;
Scheme_Object *scheme_raise_arity_error_proc;
static Scheme_Object *arity_property;
static Scheme_Object *check_arity_property_value_ok(int argc, Scheme_Object *argv[]);
static char *init_buf(long *len, long *blen);
static char *prepared_buf;
static long prepared_buf_len;
@ -574,6 +577,18 @@ void scheme_init_error(Scheme_Env *env)
prepared_buf = "";
prepared_buf = init_buf(NULL, &prepared_buf_len);
REGISTER_SO(arity_property);
{
Scheme_Object *guard;
guard = scheme_make_prim_w_arity(check_arity_property_value_ok,
"guard-for-prop:arity-string",
2, 2);
arity_property = scheme_make_struct_type_property_w_guard(scheme_intern_symbol("arity-string"),
guard);
}
scheme_add_global_constant("prop:arity-string", arity_property, env);
scheme_init_error_config();
}
@ -850,6 +865,15 @@ static char *error_write_to_string_w_max(Scheme_Object *v, int len, int *lenout)
}
}
static Scheme_Object *check_arity_property_value_ok(int argc, Scheme_Object *argv[])
{
if (!scheme_check_proc_arity(NULL, 1, 0, 1, argv))
scheme_arg_mismatch("guard-for-prop:arity-string",
"property value is not a procedure (arity 1): ",
argv[0]);
return argv[0];
}
static char *make_arity_expect_string(const char *name, int namelen,
int minc, int maxc,
int argc, Scheme_Object **argv,
@ -859,7 +883,8 @@ static char *make_arity_expect_string(const char *name, int namelen,
{
long len, pos, slen;
int xargc, xminc, xmaxc;
char *s;
char *s, *arity_str = NULL;
int arity_len = 0;
s = init_buf(&len, &slen);
@ -871,22 +896,60 @@ static char *make_arity_expect_string(const char *name, int namelen,
xmaxc = maxc - (is_method ? 1 : 0);
if ((minc == -1) && SCHEME_PROC_STRUCTP((Scheme_Object *)name)) {
/* If the arity is something simple, we'll make a good error
message. Otherwise, we'll just use the "no matching case"
version. */
Scheme_Object *arity;
arity = scheme_arity((Scheme_Object *)name);
if (SCHEME_INTP(arity)) {
xminc = xmaxc = minc = maxc = SCHEME_INT_VAL(arity);
name = scheme_get_proc_name((Scheme_Object *)name, &namelen, 1);
if (!name) {
name = "#<procedure>";
namelen = strlen(name);
Scheme_Object *arity_maker;
while (1) {
arity_maker = scheme_struct_type_property_ref(arity_property, (Scheme_Object *)name);
if (arity_maker) {
Scheme_Object *v, *a[1];
a[0] = (Scheme_Object *)name;
v = scheme_apply(arity_maker, 1, a);
if (SCHEME_CHAR_STRINGP(v)) {
v = scheme_char_string_to_byte_string(v);
arity_str = SCHEME_BYTE_STR_VAL(v);
arity_len = SCHEME_BYTE_STRLEN_VAL(v);
if (arity_len > len)
arity_len = len;
name = scheme_get_proc_name((Scheme_Object *)name, &namelen, 1);
if (!name) {
name = "#<procedure>";
namelen = strlen(name);
}
break;
} else
break;
} else {
Scheme_Object *v;
int is_method;
v = scheme_extract_struct_procedure((Scheme_Object *)name, -1, NULL, &is_method);
if (!v || is_method || !SCHEME_PROC_STRUCTP(v))
break;
name = (const char *)v;
}
SCHEME_USE_FUEL(1);
}
if (!arity_str) {
/* If the arity is something simple, we'll make a good error
message. Otherwise, we'll just use the "no matching case"
version. */
Scheme_Object *arity;
arity = scheme_arity((Scheme_Object *)name);
if (SCHEME_INTP(arity)) {
xminc = xmaxc = minc = maxc = SCHEME_INT_VAL(arity);
name = scheme_get_proc_name((Scheme_Object *)name, &namelen, 1);
if (!name) {
name = "#<procedure>";
namelen = strlen(name);
}
}
}
}
if (minc < 0) {
if (arity_str) {
pos = scheme_sprintf(s, slen, "%t: expects %t, given %d",
name, namelen, arity_str, arity_len, xargc);
} else if (minc < 0) {
const char *n;
int nlen;
@ -945,7 +1008,7 @@ static char *make_arity_expect_string(const char *name, int namelen,
void scheme_wrong_count_m(const char *name, int minc, int maxc,
int argc, Scheme_Object **argv, int is_method)
/* minc == -1 => name is really a case-lambda, native closure, or proc-struct.
/* minc == -1 => name is really a proc.
minc == -2 => use generic "no matching clause" message */
{
char *s;
@ -963,8 +1026,19 @@ void scheme_wrong_count_m(const char *name, int minc, int maxc,
/* minc = 1 -> name is really a case-lambda or native proc */
if (minc == -1) {
/* Check for is_method in case-lambda */
if (SCHEME_CLOSUREP((Scheme_Object *)name)) {
/* Extract arity, check for is_method in case-lambda, etc. */
if (SAME_TYPE(SCHEME_TYPE((Scheme_Object *)name), scheme_closure_type)) {
Scheme_Closure_Data *data;
data = SCHEME_COMPILED_CLOS_CODE((Scheme_Object *)name);
name = scheme_get_proc_name((Scheme_Object *)name, NULL, 1);
minc = data->num_params;
if (SCHEME_CLOSURE_DATA_FLAGS(data) & CLOS_HAS_REST) {
minc -= 1;
maxc = -1;
} else
maxc = minc;
} else if (SAME_TYPE(SCHEME_TYPE((Scheme_Object *)name), scheme_case_closure_type)) {
Scheme_Case_Lambda *cl = (Scheme_Case_Lambda *)name;
if (cl->count) {
Scheme_Closure_Data *data;

View File

@ -6428,8 +6428,8 @@ scheme_do_eval(Scheme_Object *obj, int num_rands, Scheme_Object **rands,
if (num_rands < (num_params - 1)) {
UPDATE_THREAD_RSPTR_FOR_ERROR();
/* note: scheme_wrong_count_m handles rands == p->tail_buffer */
scheme_wrong_count_m(scheme_get_proc_name(obj, NULL, 1),
num_params - 1, -1,
scheme_wrong_count_m((const char *)obj,
-1, -1,
num_rands, rands,
SCHEME_CLOSURE_DATA_FLAGS(data) & CLOS_IS_METHOD);
return NULL; /* Doesn't get here */
@ -6491,8 +6491,8 @@ scheme_do_eval(Scheme_Object *obj, int num_rands, Scheme_Object **rands,
if (num_rands != num_params) {
UPDATE_THREAD_RSPTR_FOR_ERROR();
/* note: scheme_wrong_count_m handles rands == p->tail_buffer */
scheme_wrong_count_m(scheme_get_proc_name(obj, NULL, 1),
num_params, num_params,
scheme_wrong_count_m((const char *)obj,
-1, -1,
num_rands, rands,
SCHEME_CLOSURE_DATA_FLAGS(data) & CLOS_IS_METHOD);
return NULL; /* Doesn't get here */
@ -6518,8 +6518,7 @@ scheme_do_eval(Scheme_Object *obj, int num_rands, Scheme_Object **rands,
} else {
UPDATE_THREAD_RSPTR_FOR_ERROR();
/* note: scheme_wrong_count handles rands == p->tail_buffer */
scheme_wrong_count(scheme_get_proc_name(obj, NULL, 1),
0, 0, num_rands, rands);
scheme_wrong_count((const char *)obj, -1, -1, num_rands, rands);
return NULL; /* Doesn't get here */
}
}

View File

@ -13,7 +13,7 @@
#define USE_COMPILED_STARTUP 1
#define EXPECTED_PRIM_COUNT 889
#define EXPECTED_PRIM_COUNT 891
#ifdef MZSCHEME_SOMETHING_OMITTED
# undef USE_COMPILED_STARTUP

View File

@ -10,12 +10,12 @@
The string and the separate X/Y/Z/W numbers must
be updated consistently. */
#define MZSCHEME_VERSION "3.99.0.3"
#define MZSCHEME_VERSION "3.99.0.4"
#define MZSCHEME_VERSION_X 3
#define MZSCHEME_VERSION_Y 99
#define MZSCHEME_VERSION_Z 0
#define MZSCHEME_VERSION_W 3
#define MZSCHEME_VERSION_W 4
#define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y)
#define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W)

View File

@ -126,6 +126,8 @@ static Scheme_Object *check_exn_source_property_value_ok(int argc, Scheme_Object
static Scheme_Object *exn_source_p(int argc, Scheme_Object **argv);
static Scheme_Object *exn_source_get(int argc, Scheme_Object **argv);
static Scheme_Object *procedure_extract_target(int argc, Scheme_Object **argv);
#ifdef MZ_PRECISE_GC
static void register_traversers(void);
#endif
@ -400,7 +402,11 @@ scheme_init_struct (Scheme_Env *env)
"procedure-struct-type?",
1, 1, 1),
env);
scheme_add_global_constant("procedure-extract-target",
scheme_make_prim_w_arity(procedure_extract_target,
"procedure-extract-target",
1, 1),
env);
/*** Debugging ****/
@ -2979,6 +2985,22 @@ Scheme_Object *scheme_extract_struct_procedure(Scheme_Object *obj, int num_rands
return proc;
}
static Scheme_Object *procedure_extract_target(int argc, Scheme_Object **argv)
{
Scheme_Object *v;
int is_method;
if (!SCHEME_PROCP(argv[0]))
scheme_wrong_type("procedure-extract-target", "procedure", 0, argc, argv);
if (SCHEME_PROC_STRUCTP(argv[0])) {
v = scheme_extract_struct_procedure(argv[0], -1, NULL, &is_method);
if (v && !is_method && SCHEME_PROCP(v))
return v;
}
return scheme_false;
}
/*========================================================================*/
/* location struct */

View File

@ -117,7 +117,6 @@ OBJS = \
wx_rbox.o \
wx_rbut.o \
wx_sbar.o \
wxMargin.o \
wx_dialg.o \
wx_screen.o \
wxRectBorder.o \
@ -143,7 +142,6 @@ OBJS = \
wx_mac_utils.o \
\
wx_bmp.o \
wx_24to8.o \
wx_image.o \
wx_xbm.o \
\
@ -250,8 +248,6 @@ wx_rbut.o : $(srcdir)/mac/wx_rbut.cc $(WXPRECOMP)
$(CXX) $(WXMAC_CXXFLAGS) -o wx_rbut.o -c $(srcdir)/mac/wx_rbut.cc
wx_sbar.o : $(srcdir)/mac/wx_sbar.cc $(WXPRECOMP)
$(CXX) $(WXMAC_CXXFLAGS) -o wx_sbar.o -c $(srcdir)/mac/wx_sbar.cc
wxMargin.o : $(srcdir)/mac/wxMargin.cc $(WXPRECOMP)
$(CXX) $(WXMAC_CXXFLAGS) -o wxMargin.o -c $(srcdir)/mac/wxMargin.cc
wx_dialg.o : $(srcdir)/mac/wx_dialg.cc $(WXPRECOMP)
$(CXX) $(WXMAC_CXXFLAGS) -o wx_dialg.o -c $(srcdir)/mac/wx_dialg.cc
wx_screen.o : $(srcdir)/mac/wx_screen.cc $(WXPRECOMP)
@ -306,8 +302,6 @@ wx_mac_utils.o : $(srcdir)/mac/wx_mac_utils.cc $(WXPRECOMP)
wx_bmp.o : $(srcdir)/../utils/image/src/wx_bmp.cc $(WXPRECOMP)
$(CXX) $(WXMAC_CXXFLAGS) -o wx_bmp.o -c $(srcdir)/../utils/image/src/wx_bmp.cc
wx_24to8.o : $(srcdir)/../utils/image/src/wx_24to8.cc $(WXPRECOMP)
$(CXX) $(WXMAC_CXXFLAGS) -o wx_24to8.o -c $(srcdir)/../utils/image/src/wx_24to8.cc
wx_image.o : $(srcdir)/../utils/image/src/wx_image.cc $(WXPRECOMP)
$(CXX) $(WXMAC_CXXFLAGS) -o wx_image.o -c $(srcdir)/../utils/image/src/wx_image.cc
wx_xbm.o : $(srcdir)/../utils/image/src/wx_xbm.cc $(WXPRECOMP)
@ -443,7 +437,6 @@ wx_font.o : $(srcdir)/mac/wx_font.m
@INCLUDEDEP@ wx_rbox.d
@INCLUDEDEP@ wx_rbut.d
@INCLUDEDEP@ wx_sbar.d
@INCLUDEDEP@ wxMargin.d
@INCLUDEDEP@ wx_dialg.d
@INCLUDEDEP@ wx_screen.d
@INCLUDEDEP@ wxRectBorder.d
@ -468,7 +461,6 @@ wx_font.o : $(srcdir)/mac/wx_font.m
@INCLUDEDEP@ wx_gbox.d
@INCLUDEDEP@ wx_mac_utils.d
@INCLUDEDEP@ wx_bmp.d
@INCLUDEDEP@ wx_24to8.d
@INCLUDEDEP@ wx_image.d
@INCLUDEDEP@ wx_xbm.d
@INCLUDEDEP@ crbuffri.d

View File

@ -543,16 +543,6 @@ static void do_text_path_dialog(wxCallbackInfo *cbi)
::DisposeControl(cancel);
::DisposeWindow(dialog);
{
FSSpec spec;
AEDesc desc;
scheme_mac_path_to_spec("/Users/mflatt/Desktop/ryan.scm", &spec);
AECreateDesc (typeFSS, &spec, sizeof(FSSpec), &desc);
NavCustomControl(cbi->dialog, kNavCtlSetSelection, &desc);
AEDisposeDesc(&desc);
}
FREE_SAFEREF(info_sr);
info_sr = NULL;
}