Correction for setup-plt error
svn: r11791
This commit is contained in:
parent
064eb9a147
commit
a454479345
|
@ -4,40 +4,40 @@ import geometry.*;
|
||||||
import colors.*;
|
import colors.*;
|
||||||
|
|
||||||
public class SillyCanvas extends Canvas {
|
public class SillyCanvas extends Canvas {
|
||||||
private int x = 20;
|
private int x = 20;
|
||||||
private int y = 20;
|
private int y = 20;
|
||||||
|
|
||||||
private boolean warning() {
|
private boolean warning() {
|
||||||
return super.drawString(new Posn(x,y),"This is a Dummy Canvas.");
|
return super.drawString(new Posn(x,y),"This is a Dummy Canvas.");
|
||||||
}
|
}
|
||||||
|
|
||||||
SillyCanvas(int w, int h) {
|
SillyCanvas(int w, int h) {
|
||||||
super(w,h);
|
super(w,h);
|
||||||
if ((w < x) || (h < y))
|
if ((w < x) || (h < y))
|
||||||
throw new RuntimeException("SillyCanvas: bad size");
|
throw new RuntimeException("SillyCanvas: bad size");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean drawCircle(Posn p, int r, IColor c) {
|
public boolean drawCircle(Posn p, int r, IColor c) {
|
||||||
return super.drawCircle(p,r,c) && warning();
|
return super.drawCircle(p,r,c) && warning();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean drawDisk(Posn p, int r, IColor c) {
|
public boolean drawDisk(Posn p, int r, IColor c) {
|
||||||
return super.drawDisk(p,r,c) && warning();
|
return super.drawDisk(p,r,c) && warning();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean drawRect(Posn p, int width, int height, IColor c) {
|
public boolean drawRect(Posn p, int width, int height, IColor c) {
|
||||||
return super.drawRect(p,width,height,c) && warning();
|
return super.drawRect(p,width,height,c) && warning();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean drawLine(Posn p0, Posn p1, IColor c) {
|
public boolean drawLine(Posn p0, Posn p1, IColor c) {
|
||||||
return super.drawLine(p0,p1,c) && warning();
|
return super.drawLine(p0,p1,c) && warning();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean drawString(Posn p, String s) {
|
public boolean drawString(Posn p, String s) {
|
||||||
return super.drawString(p,s) && warning();
|
return super.drawString(p,s) && warning();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean show() {
|
public boolean show() {
|
||||||
return super.show() && warning();
|
return super.show() && warning();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,12 +93,12 @@
|
||||||
(let ((names (compilation-unit-contains dependents))
|
(let ((names (compilation-unit-contains dependents))
|
||||||
(syntaxes (compilation-unit-code dependents))
|
(syntaxes (compilation-unit-code dependents))
|
||||||
(locations (compilation-unit-locations dependents)))
|
(locations (compilation-unit-locations dependents)))
|
||||||
;(print-struct #t)
|
(print-struct #t)
|
||||||
;(printf "names ~a~n" names)
|
#;(printf "names ~a~n" names)
|
||||||
;(printf "depends ~a~n~n" (compilation-unit-depends dependents))
|
#;(printf "depends ~a~n~n" (compilation-unit-depends dependents))
|
||||||
(unless (= (length names) (length syntaxes))
|
(unless (= (length names) (length syntaxes))
|
||||||
;(printf "Writing a composite file out~n")
|
#;(printf "Writing a composite file out~n")
|
||||||
;(printf "~a~n~n" (syntax-object->datum (car syntaxes)))
|
#;(printf "~a~n~n" (syntax->datum (car syntaxes)))
|
||||||
(call-with-output-zo-file* location
|
(call-with-output-zo-file* location
|
||||||
(build-path (send type-recs get-compilation-location)
|
(build-path (send type-recs get-compilation-location)
|
||||||
(file-name-from-path
|
(file-name-from-path
|
||||||
|
@ -108,7 +108,8 @@
|
||||||
(unless (= (length names) (length syntaxes) (length locations))
|
(unless (= (length names) (length syntaxes) (length locations))
|
||||||
(error 'compile-to-file "Internal error: compilation unit not represented as expected"))
|
(error 'compile-to-file "Internal error: compilation unit not represented as expected"))
|
||||||
(for-each (lambda (name code location)
|
(for-each (lambda (name code location)
|
||||||
;(printf "~a~n~n" (syntax-object->datum code))
|
#;(printf "writing out ~a~n" name)
|
||||||
|
#;(printf "~a~n~n" (syntax->datum code))
|
||||||
(send type-recs set-location! location)
|
(send type-recs set-location! location)
|
||||||
(let ((directory (send type-recs get-compilation-location)))
|
(let ((directory (send type-recs get-compilation-location)))
|
||||||
(unless (directory-exists? directory) (make-directory directory))
|
(unless (directory-exists? directory) (make-directory directory))
|
||||||
|
|
|
@ -863,8 +863,10 @@
|
||||||
(lambda (input)
|
(lambda (input)
|
||||||
(and (= (length input) type-length)
|
(and (= (length input) type-length)
|
||||||
(equal? type-version (list-ref input 9))
|
(equal? type-version (list-ref input 9))
|
||||||
(or (equal? (version) (list-ref input 10))
|
(or (equal? "ignore" (list-ref input 10))
|
||||||
(equal? "ignore" (list-ref input 10)))
|
(and (equal? (version) (list-ref input 10))
|
||||||
|
(>= (file-or-directory-modify-seconds (build-path filename))
|
||||||
|
(file-or-directory-modify-seconds (build-path (collection-path "mzlib") "contract.ss")))))
|
||||||
(make-class-record (list-ref input 1)
|
(make-class-record (list-ref input 1)
|
||||||
(list-ref input 2)
|
(list-ref input 2)
|
||||||
(symbol=? 'class (car input))
|
(symbol=? 'class (car input))
|
||||||
|
@ -904,7 +906,10 @@
|
||||||
(make-array-type (parse-type (cadr input)) (car input)))
|
(make-array-type (parse-type (cadr input)) (car input)))
|
||||||
(else
|
(else
|
||||||
(make-ref-type (car input) (cdr input)))))))
|
(make-ref-type (car input) (cdr input)))))))
|
||||||
(parse-class/iface (call-with-input-file filename read))))
|
#;(printf "~a ~a ~n" filename
|
||||||
|
(>= (file-or-directory-modify-seconds (build-path filename))
|
||||||
|
(file-or-directory-modify-seconds (build-path (collection-path "mzlib") "contract.ss"))))
|
||||||
|
(parse-class/iface (call-with-input-file filename read))))
|
||||||
|
|
||||||
;; write-record: class-record port->
|
;; write-record: class-record port->
|
||||||
(define (write-record rec port)
|
(define (write-record rec port)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user