original commit: 08d0cb3c82a39524ed1949fcf24ca5ef666b9058
This commit is contained in:
Robby Findler 2000-05-30 00:46:33 +00:00
parent 8c7c450f29
commit 77ff01e352
52 changed files with 1703 additions and 7017 deletions

View File

@ -80,9 +80,7 @@
(preferences:set-default 'framework:show-periods-in-dirlist #f boolean?)
(preferences:set-default
'framework:file-dialogs
(if (eq? (system-type) 'unix)
'common
'std)
'std
(lambda (x)
(or (eq? x 'common)
(eq? x 'std))))

View File

@ -337,9 +337,11 @@
(make-check 'framework:paren-match "Flash paren match" id id)
(make-check 'framework:autosaving-on? "Auto-save files" id id)
(make-check 'framework:delete-forward? "Map delete to backspace" not not)
(make-check 'framework:file-dialogs "Use platform-specific file dialogs"
(lambda (x) (if x 'std 'common))
(lambda (x) (eq? x 'std)))
;; not exposed to the user anymore. Only left in for automated testing.
;(make-check 'framework:file-dialogs "Use platform-specific file dialogs"
;(lambda (x) (if x 'std 'common))
;(lambda (x) (eq? x 'std)))
(make-check 'framework:verify-exit "Verify exit" id id)
(make-check 'framework:verify-change-format "Ask before changing save format" id id)

146
collects/mzlib/sharedr.ss Normal file
View File

@ -0,0 +1,146 @@
(unit/sig->unit
(compound-unit/sig
(import)
(link [FUNCTION : mzlib:function^ ((require-library "functior.ss") )]
[SHARED : (shared) (
(unit/sig (shared)
(import mzlib:function^)
;; SHARED starts here
(define shared
(let ()
(define-struct twople (left right))
(define-struct cons-rhs (id car cdr))
(define-struct vector-rhs (id args))
(define-struct box-rhs (id arg))
(define-struct weak-box-rhs (id let arg))
(define-struct trans (rhs lets set!s))
(lambda (defns . body)
(letrec ([bad (lambda (s sexp)
(error 'shared (string-append s ": ~a") sexp))]
[build-args
(lambda (args howmany)
(cond
[(null? args) '()]
[(pair? args) (cons (car args)
(build-args (cdr args)
(if (number? howmany)
(sub1 howmany)
howmany)))]
[else (bad "args" args)]))]
[build-args1
(lambda (x)
(cond
[(and (pair? x) (null? (cdr x))) (list (car x))]
[else (bad "args" x)]))]
[build-args2
(lambda (x)
(if (pair? x)
(let ((xcdr (cdr x)))
(if (pair? xcdr)
(let ((xcdrcdr (cdr xcdr)))
(if (null? xcdrcdr)
(list (car x) (car xcdr))
(bad "args" x)))
(bad "args" x)))
(bad "args" x)))]
[build-defn
(lambda (x)
(unless (and (pair? x)
(symbol? (car x)))
(bad "bad binding" x))
(if (not (and (pair? (cdr x))
(pair? (cadr x))
(symbol? (caadr x))))
(make-trans x '() '())
(let ([id (car x)]
[constructor (caadr x)]
[args (cdadr x)])
(case constructor
[(list) (let ([args (build-args args 'whatever)])
(if (null? args)
(make-trans `(,id (list))
'()
'())
(make-cons-rhs id (car args) `(list ,@(cdr args)))))]
[(vector) (let ([args (build-args args 'whatever)])
(make-vector-rhs id args))]
[(box) (let ([args (build-args1 args)])
(make-box-rhs id (car args)))]
; [(make-weak-box) (let ([args (build-args1 args)])
; (make-weak-box-rhs id (car args)))]
[(cons) (let ([args (build-args2 args)])
(make-cons-rhs id (car args) (cadr args)))]
[else (make-trans x '() '())]))))]
[build-defns
(lambda (x)
(cond
[(null? x) '()]
[(pair? x) (cons (build-defn (car x))
(build-defns (cdr x)))]
[else (bad "defns list" x)]))]
[transform
(lambda (binding)
(cond
[(vector-rhs? binding)
(let ()
(define-struct b&s (bind set!))
(let* ([id (vector-rhs-id binding)])
(let ([elems
(twople-left
(foldl (lambda (x data)
(let ([list (twople-left data)]
[i (twople-right data)]
[eid (gensym)])
(make-twople (cons (make-b&s `(,eid ,x)
`(vector-set! ,id ,i ,eid))
list)
(+ i 1))))
(make-twople '() 0)
(vector-rhs-args binding)))])
(make-trans `(,id (vector ,@(map (lambda (x) '(void))
(vector-rhs-args binding))))
(map b&s-bind elems)
(map b&s-set! elems)))))]
[(box-rhs? binding)
(let ([id (box-rhs-id binding)]
[eid (gensym)])
(make-trans `(,id (box (void)))
(list `(,eid ,(box-rhs-arg binding)))
(list `(set-box! ,id ,eid))))]
[(weak-box-rhs? binding)
(let ([id (weak-box-rhs-id binding)]
[eid (gensym)])
(make-trans `(,id (make-weak-box (void)))
(list `(,eid ,(weak-box-rhs-arg binding)))
(list `(set-weak-box! ,id ,eid))))]
[(cons-rhs? binding)
(let ([id (cons-rhs-id binding)]
[car-id (gensym)]
[cdr-id (gensym)])
(make-trans `(,id (cons (void) (void)))
(list `(,car-id ,(cons-rhs-car binding))
`(,cdr-id ,(cons-rhs-cdr binding)))
(list `(set-car! ,id ,car-id)
`(set-cdr! ,id ,cdr-id))))]
[(trans? binding) binding]
[else (bad "internal error:" binding)]))]
[transformed-defns (map transform (build-defns defns))])
(list 'letrec
(map trans-rhs transformed-defns)
(list 'let (apply append (map trans-lets transformed-defns))
(cons 'begin
(append (apply append (map trans-set!s transformed-defns))
body)))))))))
;; SHARED ends here
FUNCTION)])
(export (var (SHARED shared)))))

15
collects/mzlib/spidey.ss Normal file
View File

@ -0,0 +1,15 @@
(define-macro define-constructor
(lambda args '(#%void)))
(define-macro define-type
(lambda args '(#%void)))
(define-macro :
(lambda (v . args) v))
(define-macro mrspidey:control
(lambda args '(#%void)))
(define-macro polymorphic
(lambda (arg) arg))

9
collects/mzlib/string.ss Normal file
View File

@ -0,0 +1,9 @@
(require-library "stringu.ss")
(begin-elaboration-time
(require-library "invoke.ss"))
(define-values/invoke-unit/sig mzlib:string^
mzlib:string@)

104
collects/mzlib/stringr.ss Normal file
View File

@ -0,0 +1,104 @@
(unit/sig
mzlib:string^
(import)
(define make-string-do!
(lambda (translate)
(lambda (s)
(let loop ([n (sub1 (string-length s))])
(unless (negative? n)
(string-set! s n
(translate (string-ref s n)))
(loop (sub1 n)))))))
(define string-lowercase! (make-string-do! char-downcase))
(define string-uppercase! (make-string-do! char-upcase))
(define eval-string
(let ([do-eval
(lambda (str)
(let ([p (open-input-string str)])
(apply
values
(let loop ()
(let ([e (read p)])
(if (eof-object? e)
'()
(call-with-values
(lambda () (eval e))
(case-lambda
[() (loop)]
[(only) (cons only (loop))]
[multi
(append multi (loop))]))))))))])
(case-lambda
[(str) (eval-string str #f #f)]
[(str error-display) (eval-string str error-display #f)]
[(str error-display error-result)
(if (or error-display error-result)
(with-handlers ([void
(lambda (exn)
((or error-display (error-display-handler))
(exn-message exn))
(if error-result
(error-result)
#f))])
(do-eval str))
(do-eval str))])))
(define read-from-string-one-or-all
(case-lambda
[(k all? str) (read-from-string-one-or-all k all? str #f #f)]
[(k all? str error-display) (read-from-string-one-or-all k all? str error-display #f)]
[(k all? str error-display error-result)
(let* ([p (open-input-string str)]
[go (lambda ()
(let loop ()
(let ([v (read p)])
(if (eof-object? v)
'()
(cons v
(if all?
(loop)
'()))))))])
(if error-display
(with-handlers ([void
(lambda (exn)
((or error-display (error-display-handler))
(exn-message exn))
(k (if error-result
(error-result)
#f)))])
(go))
(go)))]))
(define read-from-string
(lambda args
(let/ec k
(let ([l (apply read-from-string-one-or-all k #f args)])
(if (null? l)
eof
(car l))))))
(define read-from-string-all
(lambda args
(let/ec k
(apply read-from-string-one-or-all k #t args))))
(define expr->string
(lambda (v)
(let* ([s ""]
[write-to-s
(lambda (str)
(set! s (string-append s str)))]
[port (make-output-port write-to-s (lambda () #f))])
(write v port)
s)))
(define newline-string (string #\newline))
(define regexp-match-exact?
(lambda (p s)
(let ([m (regexp-match p s)])
(and m
(string=? (car m) s)))))
)

11
collects/mzlib/strings.ss Normal file
View File

@ -0,0 +1,11 @@
(define-signature mzlib:string^
(string-lowercase!
string-uppercase!
eval-string
read-from-string
read-from-string-all
expr->string
newline-string
regexp-match-exact?))

View File

@ -0,0 +1,7 @@
(require-library "strings.ss")
(begin-elaboration-time
(require-library "refer.ss"))
(define mzlib:string@ (require-library-unit/sig "stringr.ss"))

22
collects/mzlib/synrule.ss Normal file
View File

@ -0,0 +1,22 @@
(begin-elaboration-time
(require-library "invoke.ss"))
(begin-elaboration-time
(define-values/invoke-unit (define-syntax
-:sr:tag
-:sr:untag
-:sr:flatten
-:sr:matches-pattern?
-:sr:get-bindings
-:sr:expand-pattern)
(require-library "synruler.ss")))
(define-macro define-syntax define-syntax)
(keyword-name '-:sr:tag)
(keyword-name '-:sr:untag)
(keyword-name '-:sr:flatten)
(keyword-name '-:sr:matches-pattern?)
(keyword-name '-:sr:get-bindings)
(keyword-name '-:sr:expand-pattern)

429
collects/mzlib/synruler.ss Normal file
View File

@ -0,0 +1,429 @@
; By Dorai Sitaram
; then Shriram Krishnamurthi
; then Matthew Flatt
(unit
(import)
(export define-syntax
-:sr:tag
-:sr:untag
-:sr:flatten
-:sr:matches-pattern?
-:sr:get-bindings
-:sr:expand-pattern)
(define -:sr:tag 'undefined--:sr:tag)
(define -:sr:untag 'undefined--:sr:untag)
(define -:sr:flatten 'undefined--:sr:flatten)
(letrec ([hyg:rassq
(lambda (k al)
(let loop ([al al])
(if (null? al)
#f
(let ([c (car al)])
(if (eq? (cdr c) k)
c
(loop (cdr al)))))))]
[hyg:tag
(lambda (e kk al)
(cond
[(pair? e)
(let* ((a-te-al (hyg:tag (car e) kk al))
(d-te-al (hyg:tag (cdr e) kk (cdr a-te-al))))
(cons (cons (car a-te-al) (car d-te-al))
(cdr d-te-al)))]
[(vector? e)
(let ([v-te-al (hyg:tag (vector->list e) kk al)])
(cons (list->vector (car v-te-al))
(cdr v-te-al)))]
[(symbol? e)
(cond
[(eq? e '...) (cons '... al)]
[(memq e kk) (cons e al)]
[(hyg:rassq e al)
=> (lambda (c)
(cons (car c) al))]
[else
(let ((te (gensym)))
(cons te (cons (cons te e) al)))])]
[else (cons e al)]))]
[hyg:untag
(lambda (e al tmps)
(if (pair? e)
(let ([a (hyg:untag (car e) al tmps)])
(if (list? e)
(case a
[(quote)
(hyg:untag-no-tags e al)]
[(quasiquote)
(list a (hyg:untag-quasiquote (cadr e) al tmps))]
[(if begin)
`(,a ,@(map (lambda (e1)
(hyg:untag e1 al tmps)) (cdr e)))]
[(set! define)
`(,a ,(hyg:untag-vanilla (cadr e) al tmps)
,@(map (lambda (e1)
(hyg:untag e1 al tmps)) (cddr e)))]
[(lambda)
(hyg:untag-lambda a (cadr e) (cddr e) al tmps)]
[(letrec)
(hyg:untag-letrec a (cadr e) (cddr e) al tmps)]
[(let)
(let ((e2 (cadr e)))
(if (symbol? e2)
(hyg:untag-named-let a e2 (caddr e) (cdddr e) al tmps)
(hyg:untag-let a e2 (cddr e) al tmps)))]
[(let*)
(hyg:untag-let* (cadr e) (cddr e) al tmps)]
[(do) (hyg:untag-do (cadr e) (caddr e) (cdddr e) al tmps)]
[(case)
`(case ,(hyg:untag-vanilla (cadr e) al tmps)
,@(map
(lambda (c)
`(,(hyg:untag-vanilla (car c) al tmps)
,@(hyg:untag-list (cdr c) al tmps)))
(cddr e)))]
[(cond)
`(cond ,@(map
(lambda (c)
(hyg:untag-list c al tmps))
(cdr e)))]
[else
; Must be an application:
(cons a (hyg:untag-list (cdr e) al tmps))])
(cons a (hyg:untag-list* (cdr e) al tmps))))
(hyg:untag-vanilla e al tmps)))]
[hyg:untag-list
(lambda (ee al tmps)
(map (lambda (e)
(hyg:untag e al tmps)) ee))]
[hyg:untag-list*
(lambda (ee al tmps)
(let loop ((ee ee))
(if (pair? ee)
(cons (hyg:untag (car ee) al tmps)
(loop (cdr ee)))
(hyg:untag ee al tmps))))]
[hyg:untag-no-tags
(lambda (e al)
(cond
[(pair? e)
(cons (hyg:untag-no-tags (car e) al)
(hyg:untag-no-tags (cdr e) al))]
[(vector? e)
(list->vector
(hyg:untag-no-tags (vector->list e) al))]
[(not (symbol? e)) e]
[(assq e al) => cdr]
[else e]))]
[hyg:untag-quasiquote
(lambda (form al tmps)
(let qq ([x form][level 0])
(cond
[(pair? x)
(let ([first (qq (car x) level)])
(cond
[(and (eq? first 'unquote) (list? x))
(let ([rest (cdr x)])
(if (or (not (pair? rest))
(not (null? (cdr rest))))
(raise-syntax-error
'unquote
"takes exactly one expression"
(list 'quasiquote (hyg:untag-no-tags form al)))
(if (zero? level)
(list 'unquote (hyg:untag (car rest) al tmps))
(cons first (qq rest (sub1 level))))))]
[(and (eq? first 'quasiquote) (list? x))
(cons 'quasiquote (qq (cdr x) (add1 level)))]
[(and (eq? first 'unquote-splicing) (list? x))
(raise-syntax-error
'unquote-splicing
"invalid context within quasiquote"
(list 'quasiquote (hyg:untag-no-tags form al)))]
[(pair? first)
(let ([car-first (qq (car first) level)])
(if (and (eq? car-first 'unquote-splicing)
(list? first))
(let ([rest (cdr first)])
(if (or (not (pair? rest))
(not (null? (cdr rest))))
(raise-syntax-error
'unquote-splicing
"takes exactly one expression"
(list 'quasiquote (hyg:untag-no-tags form al)))
(list (list 'unquote-splicing
(if (zero? level)
(hyg:untag (cadr rest) al tmps)
(qq (cadr rest) (sub1 level)))
(qq (cdr x) level)))))
(cons (cons car-first
(qq (cdr first) level))
(qq (cdr x) level))))]
[else
(cons first (qq (cdr x) level))]))]
[(vector? x)
(list->vector
(qq (vector->list x) level))]
[(box? x)
(box (qq (unbox x) level))]
[else (hyg:untag-no-tags x al)])))]
[hyg:untag-lambda
(lambda (formname bvv body al tmps)
(let ((tmps2 (append! (hyg:flatten bvv) tmps)))
`(,formname ,bvv
,@(hyg:untag-list body al tmps2))))]
[hyg:untag-letrec
(lambda (formname varvals body al tmps)
(let ((tmps (append! (map car varvals) tmps)))
`(,formname
,(map
(lambda (varval)
`(,(car varval)
,(hyg:untag (cadr varval) al tmps)))
varvals)
,@(hyg:untag-list body al tmps))))]
[hyg:untag-let
(lambda (formname varvals body al tmps)
(let ((tmps2 (append! (map car varvals) tmps)))
`(,formname
,(map
(lambda (varval)
`(,(car varval)
,(hyg:untag (cadr varval) al tmps)))
varvals)
,@(hyg:untag-list body al tmps2))))]
[hyg:untag-named-let
(lambda (formname lname varvals body al tmps)
(let ((tmps2 (cons lname (append! (map car varvals) tmps))))
`(,formname ,lname
,(map
(lambda (varval)
`(,(car varval)
,(hyg:untag (cadr varval) al tmps)))
varvals)
,@(hyg:untag-list body al tmps2))))]
[hyg:untag-let*
(lambda (varvals body al tmps)
(let ((tmps2 (append! (reverse! (map car varvals)) tmps)))
`(let*
,(let loop ((varvals varvals)
(i (length varvals)))
(if (null? varvals) '()
(let ((varval (car varvals)))
(cons `(,(car varval)
,(hyg:untag (cadr varval)
al (list-tail tmps2 i)))
(loop (cdr varvals) (- i 1))))))
,@(hyg:untag-list body al tmps2))))]
[hyg:untag-do
(lambda (varinistps exit-test body al tmps)
(let ((tmps2 (append! (map car varinistps) tmps)))
`(do
,(map
(lambda (varinistp)
(let ((var (car varinistp)))
`(,var ,@(hyg:untag-list (cdr varinistp) al
(cons var tmps)))))
varinistps)
,(hyg:untag-list exit-test al tmps2)
,@(hyg:untag-list body al tmps2))))]
[hyg:untag-vanilla
(lambda (e al tmps)
(cond
[(pair? e)
(cons (hyg:untag-vanilla (car e) al tmps)
(hyg:untag-vanilla (cdr e) al tmps))]
[(vector? e)
(list->vector
(hyg:untag-vanilla (vector->list e) al tmps))]
[(not (symbol? e)) e]
[(memq e tmps) e]
[(assq e al) => cdr]
[else e]))]
[hyg:flatten
(lambda (e)
(let loop ((e e) (r '()))
(cond
[(pair? e) (loop (car e)
(loop (cdr e) r))]
[(null? e) r]
[else (cons e r)])))])
(set! -:sr:tag hyg:tag)
(set! -:sr:untag hyg:untag)
(set! -:sr:flatten hyg:flatten))
(define -:sr:matches-pattern? 'undefined--:sr:matches-pattern?)
(define -:sr:get-bindings 'undefined--:sr:get-bindings)
(define -:sr:expand-pattern 'undefined--:sr:expand-pattern)
(letrec ([mbe:position
(lambda (x l)
(let loop ((l l) (i 0))
(cond ((not (pair? l)) #f)
((equal? (car l) x) i)
(else (loop (cdr l) (+ i 1))))))]
[mbe:append-map
(lambda (f l)
(let loop ((l l))
(if (null? l) '()
(append (f (car l)) (loop (cdr l))))))]
[mbe:matches-pattern?
(lambda (p e k)
(cond
[(mbe:ellipsis? p)
(and (or (null? e) (pair? e))
(let* ((p-head (car p))
(p-tail (cddr p))
(e-head=e-tail (mbe:split-at-ellipsis e p-tail)))
(and e-head=e-tail
(let ((e-head (car e-head=e-tail))
(e-tail (cdr e-head=e-tail)))
(and (andmap
(lambda (x) (mbe:matches-pattern? p-head x k))
e-head)
(mbe:matches-pattern? p-tail e-tail k))))))]
[(pair? p)
(and (pair? e)
(mbe:matches-pattern? (car p) (car e) k)
(mbe:matches-pattern? (cdr p) (cdr e) k))]
[(symbol? p) (if (memq p k) (eq? p e) #t)]
[else (equal? p e)]))]
[mbe:get-bindings
(lambda (p e k)
(cond
[(mbe:ellipsis? p)
(let* ((p-head (car p))
(p-tail (cddr p))
(e-head=e-tail (mbe:split-at-ellipsis e p-tail))
(e-head (car e-head=e-tail))
(e-tail (cdr e-head=e-tail)))
(cons (cons (mbe:get-ellipsis-nestings p-head k)
(map (lambda (x) (mbe:get-bindings p-head x k))
e-head))
(mbe:get-bindings p-tail e-tail k)))]
[(pair? p)
(append (mbe:get-bindings (car p) (car e) k)
(mbe:get-bindings (cdr p) (cdr e) k))]
[(symbol? p)
(if (memq p k) '() (list (cons p e)))]
[else '()]))]
[mbe:expand-pattern
(lambda (p r k)
(cond
[(mbe:ellipsis? p)
(append (let* ((p-head (car p))
(nestings (mbe:get-ellipsis-nestings p-head k))
(rr (mbe:ellipsis-sub-envs nestings r)))
(map (lambda (r1)
(mbe:expand-pattern p-head (append r1 r) k))
rr))
(mbe:expand-pattern (cddr p) r k))]
[(pair? p)
(cons (mbe:expand-pattern (car p) r k)
(mbe:expand-pattern (cdr p) r k))]
[(symbol? p)
(if (memq p k) p
(let ((x (assq p r)))
(if x (cdr x) p)))]
[else p]))]
[mbe:get-ellipsis-nestings
(lambda (p k)
(let sub ((p p))
(cond
[(mbe:ellipsis? p) (cons (sub (car p)) (sub (cddr p)))]
[(pair? p) (append (sub (car p)) (sub (cdr p)))]
[(symbol? p) (if (memq p k) '() (list p))]
[else '()])))]
[mbe:ellipsis-sub-envs
(lambda (nestings r)
(let ((sub-envs-list
(let loop ((r r) (sub-envs-list '()))
(if (null? r) (reverse! sub-envs-list)
(let ((c (car r)))
(loop (cdr r)
(if (mbe:contained-in? nestings (car c))
(cons (cdr c) sub-envs-list)
sub-envs-list)))))))
(case (length sub-envs-list)
((0) #f)
((1) (car sub-envs-list))
(else
(let loop ((sub-envs-list sub-envs-list) (final-sub-envs '()))
(if (ormap null? sub-envs-list) (reverse! final-sub-envs)
(loop (map cdr sub-envs-list)
(cons (mbe:append-map car sub-envs-list)
final-sub-envs))))))))]
[mbe:contained-in?
(lambda (v y)
(if (or (symbol? v) (symbol? y)) (eq? v y)
(ormap (lambda (v_i)
(ormap (lambda (y_j)
(mbe:contained-in? v_i y_j))
y))
v)))]
[mbe:split-at-ellipsis
(lambda (e p-tail)
(if (null? p-tail) (cons e '())
(let ((i (mbe:position (car p-tail) e)))
(if i (cons (comlist:butlast e (- (length e) i))
(list-tail e i))
(error 'mbe:split-at-ellipsis "bad argument in syntax-rules")))))]
[mbe:ellipsis?
(lambda (x)
(and (pair? x) (pair? (cdr x)) (eq? (cadr x) '...)))]
[comlist:butlast
(lambda (lst n)
(letrec ((l (- (length lst) n))
(bl (lambda (lst n)
(cond ((null? lst) lst)
((positive? n)
(cons (car lst) (bl (cdr lst) (+ -1 n))))
(else '())))))
(bl lst (if (negative? n)
(error 'butlast "negative argument in syntax-rules: ~s"
n)
l))))])
(set! -:sr:matches-pattern? mbe:matches-pattern?)
(set! -:sr:get-bindings mbe:get-bindings)
(set! -:sr:expand-pattern mbe:expand-pattern))
(define make-expander
(lambda (who macro-name syn-rules)
(if (or (not (pair? syn-rules))
(not (eq? (car syn-rules) 'syntax-rules)))
(error who "~s not an R5RS macro: ~s"
macro-name syn-rules)
(let ((keywords (cons macro-name (cadr syn-rules)))
(clauses (cddr syn-rules)))
`(lambda macro-arg
(let ((macro-arg (cons ',macro-name macro-arg))
(keywords ',keywords))
(cond ,@(map
(lambda (clause)
(let ([in-pattern (car clause)]
[out-pattern (cadr clause)])
`((-:sr:matches-pattern? ',in-pattern macro-arg
keywords)
(let ([tagged-out-pattern+alist
(-:sr:tag
',out-pattern
(append! (-:sr:flatten ',in-pattern)
keywords) '())])
(-:sr:untag
(-:sr:expand-pattern
(car tagged-out-pattern+alist)
(-:sr:get-bindings ',in-pattern macro-arg
keywords)
keywords)
(cdr tagged-out-pattern+alist)
'())))))
clauses)
(else (error ',macro-name "no matching clause: ~s"
',clauses)))))))))
(define define-syntax
(lambda (macro-name syn-rules)
(let ([expander (make-expander 'define-syntax macro-name syn-rules)])
`(define-macro ,macro-name ,expander)))))

8
collects/mzlib/thread.ss Normal file
View File

@ -0,0 +1,8 @@
(require-library "threadu.ss")
(begin-elaboration-time
(require-library "invoke.ss"))
(define-values/invoke-unit/sig mzlib:thread^
mzlib:thread@)

192
collects/mzlib/threadr.ss Normal file
View File

@ -0,0 +1,192 @@
(unit/sig mzlib:thread^
(import)
#|
t accepts a function, f, and creates a thread. It returns the thread and a
function, g. When g is applied it passes it's argument to f, and evaluates
the call of f in the time of the thread that was created. Calls to g do not
block.
|#
(define consumer-thread
(case-lambda
[(f) (consumer-thread f void)]
[(f init)
(unless (procedure? f) (raise-type-error 'consumer-thread "procedure" f))
(let ([sema (make-semaphore 0)]
[protect (make-semaphore 1)]
[front-state null]
[back-state null])
(values
(thread
(letrec ([loop
(lambda ()
(semaphore-wait sema)
(let ([local-state
(begin
(semaphore-wait protect)
(if (null? back-state)
(let ([new-front (reverse front-state)])
(set! back-state (cdr new-front))
(set! front-state null)
(semaphore-post protect)
(car new-front))
(begin0
(car back-state)
(set! back-state (cdr back-state))
(semaphore-post protect))))])
(apply f local-state))
(loop))])
(lambda ()
(init)
(loop))))
(lambda new-state
(let ([num (length new-state)])
(unless (procedure-arity-includes? f num)
(raise
(make-exn:application:arity
(format "<procedure-from-consumer-thread>: consumer procedure arity is ~e; provided ~s argument~a"
(arity f) num (if (= 1 num) "" "s"))
(current-continuation-marks)
num
(arity f)))))
(semaphore-wait protect)
(set! front-state (cons new-state front-state))
(semaphore-post protect)
(semaphore-post sema))))]))
(define (merge-input a b)
(or (input-port? a)
(raise-type-error 'merge-input "input-port" a))
(or (input-port? b)
(raise-type-error 'merge-input "input-port" b))
(let-values ([(rd wt) (make-pipe)])
(let* ([copy1-sema (make-semaphore 500)]
[copy2-sema (make-semaphore 500)]
[ready1-sema (make-semaphore)]
[ready2-sema (make-semaphore)]
[check-first? #t]
[close-sema (make-semaphore)]
[mk-copy (lambda (from to copy-sema ready-sema)
(lambda ()
(let loop ()
(semaphore-wait copy-sema)
(let ([c (read-char from)])
(unless (eof-object? c)
(semaphore-post ready-sema)
(write-char c to)
(loop))))
(semaphore-post close-sema)))])
(thread (mk-copy a wt copy1-sema ready1-sema))
(thread (mk-copy b wt copy2-sema ready2-sema))
(thread (lambda ()
(semaphore-wait close-sema)
(semaphore-wait close-sema)
(close-output-port wt)))
(make-input-port
(lambda () (let ([c (read-char rd)])
(unless (eof-object? c)
(if (and check-first? (semaphore-try-wait? ready1-sema))
(semaphore-post copy1-sema)
(if (not (semaphore-try-wait? ready2-sema))
; check-first? must be #f
(if (semaphore-try-wait? ready1-sema)
(semaphore-post copy1-sema)
(error 'join "internal error: char from nowhere!"))
(semaphore-post copy2-sema)))
(set! check-first? (not check-first?)))
c))
(lambda () (char-ready? rd))
(lambda () (close-input-port rd))))))
(define with-semaphore
(lambda (s f)
(semaphore-wait s)
(begin0 (f)
(semaphore-post s))))
(define semaphore-wait-multiple
(case-lambda
[(semaphores) (semaphore-wait-multiple semaphores #f #f)]
[(semaphores timeout) (semaphore-wait-multiple semaphores timeout #f)]
[(semaphores timeout allow-break?)
(let ([break-enabled? (or allow-break? (break-enabled))])
(parameterize ([break-enabled #f])
(for-each
(lambda (s)
(or (semaphore? s)
(raise-type-error 'semaphore-wait-multiple "list of semaphores" semaphores)))
semaphores)
(or (not timeout) (real? timeout) (>= timeout 0)
(raise-type-error 'semaphore-wait-multiple "positive real number" timeout))
(let* ([result-l null]
[ok? #f]
[set-l (make-semaphore 1)]
[one-done (make-semaphore)]
[threads (let loop ([l semaphores])
(if (null? l)
null
(cons (let ([s (car l)])
(thread (lambda ()
(let/ec
k
(current-exception-handler k)
(semaphore-wait/enable-break s)
(with-semaphore
set-l
(lambda () (set! result-l
(cons s result-l))))
(semaphore-post one-done)))))
(loop (cdr l)))))]
[timer-thread (if timeout
(thread (lambda () (sleep timeout) (semaphore-post one-done)))
#f)])
(dynamic-wind
void
(lambda ()
; wait until someone is done
((if break-enabled? semaphore-wait/enable-break semaphore-wait) one-done)
(set! ok? #t))
(lambda ()
; tell everyone to stop
(for-each (lambda (th) (break-thread th)) threads)
(when timer-thread (break-thread timer-thread))
; wait until everyone's done
(for-each thread-wait threads)
; If more that too manay suceeded, repost to the extras
(let ([extras (if ok?
(if (null? result-l)
null
(cdr result-l))
result-l)])
(for-each (lambda (s) (semaphore-post s)) extras))))
(if (null? result-l)
#f
(car result-l)))))]))
(define dynamic-enable-break
(polymorphic
(lambda (thunk)
(parameterize ([break-enabled #t])
(thunk)))))
(define dynamic-disable-break
(polymorphic
(lambda (thunk)
(parameterize ([break-enabled #f])
(thunk)))))
(define make-single-threader
(polymorphic
(lambda ()
(let ([sema (make-semaphore 1)])
(lambda (thunk)
(dynamic-wind
(lambda () (semaphore-wait sema))
thunk
(lambda () (semaphore-post sema))))))))
)

13
collects/mzlib/threads.ss Normal file
View File

@ -0,0 +1,13 @@
(begin-elaboration-time
(require-relative-library "spidey.ss"))
(define-signature mzlib:thread^
(consumer-thread
merge-input
with-semaphore
semaphore-wait-multiple
dynamic-disable-break
dynamic-enable-break
make-single-threader))

View File

@ -0,0 +1,7 @@
(require-library "threads.ss")
(begin-elaboration-time
(require-library "refer.ss"))
(define mzlib:thread@ (require-library-unit/sig "threadr.ss"))

273
collects/mzlib/trace.ss Normal file
View File

@ -0,0 +1,273 @@
; Time-stamp: <97/08/19 15:07:32 shriram>
; Time-stamp: <97/07/12 12:44:01 shriram>
; Differences from the Chez implementation:
; - The code does not respect tail-calls.
; - If the library is loaded more than once, especially in the middle
; of a trace, the behavior is not well-defined.
(define-signature mzlib:trace^
(-:trace-level -:trace-print-args -:trace-print-results
-:trace-table
-:make-traced-entry -:traced-entry-original-proc -:traced-entry-trace-proc
trace untrace))
(begin-elaboration-time (require-library "prettyu.ss"))
(begin-elaboration-time
(define mzlib:trace@
(unit/sig mzlib:trace^
(import mzlib:pretty-print^)
(define max-dash-space-depth 10)
(define number-nesting-depth 6)
(define as-spaces
(lambda (s)
(let ((n (string-length s)))
(apply string-append
(let loop ((k n))
(if (zero? k) '("")
(cons " " (loop (sub1 k)))))))))
(define-struct prefix-entry (for-first for-rest))
(define prefixes (make-vector 20 #f))
(define prefix-vector-length 20)
(define lookup-prefix
(lambda (n)
(and (< n prefix-vector-length)
(vector-ref prefixes n))))
(define insert-prefix
(lambda (n first rest)
(if (>= n prefix-vector-length)
(let ((v (make-vector (* 2 prefix-vector-length) #f)))
(let loop ((k 0))
(when (< k prefix-vector-length)
(vector-set! v k (vector-ref prefixes k))
(loop (add1 k))))
(set! prefixes v)
(set! prefix-vector-length (* 2 prefix-vector-length))
(insert-prefix n first rest))
(vector-set! prefixes n (make-prefix-entry first rest)))))
(define construct-prefixes
(lambda (level)
(let loop ((n level)
(first '("|"))
(rest '(" ")))
(if (>= n max-dash-space-depth)
(let-values (((pre-first pre-rest)
(build-prefixes number-nesting-depth)))
(let ((s (number->string level)))
(values
(apply string-append
(cons pre-first (cons "[" (cons s (cons "]" '())))))
(apply string-append
(cons pre-rest (cons " " (cons (as-spaces s)
(cons " " '()))))))))
(cond
((= n 0) (values (apply string-append (reverse first))
(apply string-append (reverse rest))))
((= n 1) (loop (- n 1)
(cons '" " first)
(cons '" " rest)))
(else (loop (- n 2)
(cons " |" first)
(cons " " rest))))))))
(define build-prefixes
(lambda (level)
(let ((p (lookup-prefix level)))
(if p
(values (prefix-entry-for-first p)
(prefix-entry-for-rest p))
(let-values (((first rest)
(construct-prefixes level)))
(insert-prefix level first rest)
(values first rest))))))
(define -:trace-level (make-parameter -1))
(define -:trace-print-args
(lambda (name args)
(let-values (((first rest)
(build-prefixes (-:trace-level))))
(parameterize ((pretty-print-print-line
(lambda (n port offset width)
(display
(if n
(if (zero? n) first
(format "~n~a" rest))
(format "~n"))
port)
(if n
(if (zero? n)
(string-length first)
(string-length rest))
0))))
(pretty-print (cons name args))))))
(define -:trace-print-results
(lambda (name results)
(let-values (((first rest)
(build-prefixes (-:trace-level))))
(parameterize ((pretty-print-print-line
(lambda (n port offset width)
(display
(if n
(if (zero? n) first
(format "~n~a" rest))
(format "~n"))
port)
(if n
(if (zero? n)
(string-length first)
(string-length rest))
0))))
(cond
((null? results)
(pretty-display "*** no values ***"))
((null? (cdr results))
(pretty-print (car results)))
(else
(pretty-print (car results))
(parameterize ((pretty-print-print-line
(lambda (n port offset width)
(display
(if n
(if (zero? n) rest
(format "~n~a" rest))
(format "~n"))
port)
(if n
(string-length rest)
0))))
(for-each pretty-print (cdr results)))))))))
(define-struct traced-entry (original-proc trace-proc))
(define -:make-traced-entry make-traced-entry)
(define -:traced-entry-original-proc traced-entry-original-proc)
(define -:traced-entry-trace-proc traced-entry-trace-proc)
(define -:trace-table
(make-hash-table))
(define trace
(lambda ids
(let loop ((ids ids))
(unless (null? ids)
(unless (symbol? (car ids))
(error 'trace "~s not a name" (car ids)))
(loop (cdr ids))))
`(#%begin
,@(map
(lambda (id)
`(#%with-handlers ((#%exn:variable?
(#%lambda (exn)
(#%if (#%eq? (#%exn:variable-id exn) ',id)
(#%error 'trace
"~s is not bound" ',id)
(#%raise exn)))))
(#%let ((global (#%global-defined-value ',id)))
(#%unless (#%procedure? global)
(#%error 'trace
"the top-level value of ~s is not a procedure" ',id)))))
ids)
,@(map
(lambda (id)
(let ((traced-name (string->symbol
(string-append "traced-"
(symbol->string id))))
(table-entry (gensym 'table-entry))
(real-value (gensym 'real-value))
(global-value (gensym 'global-value)))
`(#%let ((,global-value (#%global-defined-value ',id)))
(#%let ((,table-entry (#%hash-table-get -:trace-table ',id
(#%lambda () #f))))
(#%unless (#%and ,table-entry
(#%eq? ,global-value
(-:traced-entry-trace-proc ,table-entry)))
(#%let* ((,real-value ,global-value)
(,traced-name
(#%lambda args
(#%dynamic-wind
(lambda ()
(-:trace-level
(#%add1 (-:trace-level))))
(lambda ()
(-:trace-print-args ',id args)
(#%call-with-values
(#%lambda ()
(#%apply ,real-value args))
(#%lambda results
(flush-output)
(-:trace-print-results ',id
results)
(#%apply #%values results))))
(lambda ()
(-:trace-level
(#%sub1 (-:trace-level))))))))
(#%hash-table-put! -:trace-table ',id
(-:make-traced-entry ,real-value ,traced-name))
(#%global-defined-value ',id ,traced-name)))))))
ids)
(#%quote ,ids))))
(define untrace
(lambda ids
(let loop ((ids ids))
(unless (null? ids)
(unless (symbol? (car ids))
(error 'untrace "~s not an identifier" (car ids)))
(loop (cdr ids)))
`(#%apply #%append
(#%list
,@(map (lambda (id)
`(let ((entry (#%hash-table-get -:trace-table
',id (#%lambda () #f))))
(#%if (#%and entry
(#%eq? (#%global-defined-value ',id)
(-:traced-entry-trace-proc entry)))
(#%begin
(#%hash-table-put! -:trace-table
',id #f)
(#%global-defined-value ',id
(-:traced-entry-original-proc entry))
(#%list ',id))
'())))
ids))))))
)))
(begin-elaboration-time
(require-library "invoke.ss"))
(begin-elaboration-time
(define-values/invoke-unit/sig mzlib:trace^
(compound-unit/sig
(import)
(link
(PRETTY : mzlib:pretty-print^
(mzlib:pretty-print@))
(TRACE : mzlib:trace^
(mzlib:trace@ PRETTY)))
(export
(open TRACE)))
#f))
(define-macro trace trace)
(define-macro untrace untrace)
(begin-elaboration-time
(keyword-name '-:trace-print-args)
(keyword-name '-:trace-print-results)
(keyword-name '-:trace-table)
(keyword-name '-:make-traced-entry)
(keyword-name '-:traced-entry-original-proc)
(keyword-name '-:traced-entry-trace-proc))

View File

@ -0,0 +1,2 @@
(invoke-unit/sig (require-relative-library "traceldr.ss"))

View File

@ -0,0 +1,49 @@
(unit/sig
()
(import)
(let ([load (current-load)]
[load-extension (current-load-extension)]
[ep (current-error-port)]
[tab ""])
(let ([mk-chain
(lambda (load)
(lambda (filename)
(fprintf ep
"~aloading ~a at ~a~n"
tab filename (current-process-milliseconds))
(begin0
(let ([s tab])
(dynamic-wind
(lambda () (set! tab (string-append " " tab)))
(lambda ()
(if (regexp-match "_loader" filename)
(let ([f (load filename)])
(lambda (sym)
(fprintf ep
"~atrying ~a's ~a~n" tab filename sym)
(let ([loader (f sym)])
(and loader
(lambda ()
(fprintf ep
"~astarting ~a's ~a at ~a~n"
tab filename sym
(current-process-milliseconds))
(let ([s tab])
(begin0
(dynamic-wind
(lambda () (set! tab (string-append " " tab)))
(lambda () (loader))
(lambda () (set! tab s)))
(fprintf ep
"~adone ~a's ~a at ~a~n"
tab filename sym
(current-process-milliseconds)))))))))
(load filename)))
(lambda () (set! tab s))))
(fprintf ep
"~adone ~a at ~a~n"
tab filename (current-process-milliseconds)))))])
(current-load (mk-chain load))
(current-load-extension (mk-chain load-extension)))))

View File

@ -0,0 +1,8 @@
(require-library "transcru.ss")
(begin-elaboration-time
(require-library "invoke.ss"))
(define-values/invoke-unit/sig mzlib:transcript^
mzlib:transcript@)

View File

@ -5,4 +5,4 @@
# define SPECIAL_TAG ""
#endif
#define VERSION "102" SPECIAL_TAG
#define VERSION "102/14" SPECIAL_TAG

View File

@ -188,12 +188,12 @@
(define (break-wrap expr)
(if break
`(#%begin (,(make-break 'normal)) ,expr)
`(#%begin (,(make-break 'normal-break)) ,expr)
expr))
(define (double-break-wrap expr)
(if break
`(#%begin (,(make-break 'double)) ,expr)))
`(#%begin (,(make-break 'double-break)) ,expr)))
(define (simple-wcm-break-wrap debug-info expr)
(simple-wcm-wrap debug-info (break-wrap expr)))
@ -483,7 +483,7 @@
;turns into
;
;(let-values ([(dummy1 dummy2 dummy3 dummy4 dummy5)
; (values *undefined* *undefined* *undefined* *undefined* *undefined*)])
; (values *unevaluated* *unevaluated* *unevaluated* *unevaluated* *unevaluated*)])
; (with-continuation-mark
; key huge-value
; (begin
@ -536,7 +536,7 @@
[val outer-dummy-initialization
`([,(map z:varref-var dummy-var-list)
(#%values ,@(build-list (length dummy-var-list)
(lambda (_) '(#%quote *undefined*))))])]
(lambda (_) `(#%quote ,*unevaluated*))))])]
[val set!-clauses
(map (lambda (dummy-var-set val)
`(#%set!-values ,(map z:varref-var dummy-var-set) ,val))

View File

@ -68,14 +68,19 @@
(caddr exposed))))
(define (lookup-var-binding mark-list var)
(printf "entering lookup-var-binding~n")
(if (null? mark-list)
; must be a primitive
(error 'lookup-var-binding "variable not found in environment: ~a" var)
(begin
(printf "going into error~n")
(error 'lookup-var-binding "variable not found in environment: ~a" var))
; (error var "no binding found for variable.")
(let* ([bindings (mark-bindings (car mark-list))]
[_ (printf "bindings: ~a~n" bindings)]
[matches (filter (lambda (mark-var)
(eq? var (z:varref-var (mark-binding-varref mark-var))))
bindings)])
(printf "matches length: ~a~n" (length matches))
(cond [(null? matches)
(lookup-var-binding (cdr mark-list) var)]
[(> (length matches) 1)

View File

@ -170,6 +170,7 @@
(z:scheme-expand new-expr 'previous user-vocabulary))))])
(let*-values ([(annotated-list envs) (a:annotate (list new-expr) (list new-parsed) packaged-envs break #f)]
[(annotated) (car annotated-list)])
(printf "annotated:~n~a~n" annotated)
(set! packaged-envs envs)
(set! current-expr new-parsed)
(check-for-repeated-names new-parsed exception-handler)
@ -210,14 +211,17 @@
[redex (cadr reconstruct-pair)])
(finish-thunk reconstructed redex)))))])
(case break-kind
[(normal)
[(normal-break)
(printf "entering normal-break~n")
(when (not (r:skip-redex-step? mark-list))
(printf "not skipping step~n")
(reconstruct-helper
(lambda (reconstructed redex)
(set! held-expr reconstructed)
(set! held-redex redex)
(continue-user-computation)))
(suspend-user-computation))]
(suspend-user-computation))
(printf "finished normal-break~n")]
[(result-break)
(when (not (or (r:skip-redex-step? mark-list)
(and (null? returned-value-list)
@ -243,25 +247,30 @@
(set! held-redex no-sexp)
(i:receive-result result))))
(suspend-user-computation))]
[(double)
[(double-break)
; a double-break occurs at the beginning of a let's body.
(send-to-drscheme-eventspace
(lambda ()
(let* ([reconstruct-quadruple
(r:reconstruct-current current-expr mark-list)])
(set! finished-exprs (append finished-exprs (caddr reconstruct-quadruple)))
(when (not (eq? held-expr no-expr))
(let* ([reconstruct-quintuple
(r:reconstruct-current current-expr mark-list break-kind returned-value-list)])
(set! finished-exprs (append finished-exprs (car reconstruct-quintuple)))
(when (not (eq? held-expr no-sexp))
(e:internal-error 'break-reconstruction
"held-expr not empty when a double-break occurred"))
(i:receive-result (apply make-before-after-result
finished-exprs
reconstruct-quadruple)))))
(suspend-user-computation)])))
(cdr reconstruct-quintuple))))))
(suspend-user-computation)]
[else (e:internal-error 'break "unknown label on break")])))
(define (handle-exception exn)
(if held-expr
(i:receive-result (make-before-error-result finished-exprs held-expr held-redex (exn-message exn)))
(i:receive-result (make-error-result finished-exprs (exn-message exn)))))
(if (not (eq? held-expr no-sexp))
(begin
(printf "held-expr: ~a~n" held-expr)
(i:receive-result (make-before-error-result finished-exprs held-expr held-redex (exn-message exn))))
(begin
(printf "no held sexp~n")
(i:receive-result (make-error-result finished-exprs (exn-message exn))))))
(define (make-exception-handler k)
(lambda (exn)

View File

@ -82,11 +82,11 @@
(loop (+ try-index 1))
try-index))])
(hash-table-put! lifted-names-table binding free-num)
(string->symbol (string-append "~" binding-name "~" (num->string free-num)))))
(string->symbol (string-append "~" (symbol->string binding-name) "~" (number->string free-num)))))
(define (lookup-lifted-name binding)
(string->symbol (string-append "~" (z:binding-orig-name binding) "~"
(num->string (hash-table-get lifted-names-table binding)))))
(string->symbol (string-append "~" (symbol->string (z:binding-orig-name binding)) "~"
(number->string (hash-table-get lifted-names-table binding)))))
(define (rectify-value val)
(let ([closure-record (closure-table-lookup val (lambda () #f))])
@ -132,13 +132,21 @@
(or (z:lambda-varref? expr)
(let ([var (z:varref-var expr)])
(with-handlers
([exn:variable? (lambda args #f)])
(or (and (s:check-pre-defined-var var)
();[exn:variable? (lambda args (printf "c~n") #f)])
(printf "a~n")
(or (and (printf "a.5~n")
(s:check-pre-defined-var var)
(printf "result: ~a~n" (s:check-pre-defined-var var))
(printf "b~n")
(or (procedure? (s:global-lookup var))
(eq? var 'empty)))
(let ([val (if (z:top-level-varref? expr)
(s:global-lookup var)
(find-var-binding mark-list var))])
(begin
(printf "fkjd~n")
(printf "~a~n" (lookup-var-binding mark-list var))
(lookup-var-binding mark-list var)))])
(printf "past lookup-var-binding~n")
(and (procedure? val)
(not (continuation? val))
(eq? var
@ -146,7 +154,7 @@
(closure-table-lookup val (lambda () #f)))))))))))
(and (z:app? expr)
(let ([fun-val (mark-binding-value
(find-var-binding mark-list
(lookup-var-binding mark-list
(z:varref-var (get-arg-varref 0))))])
(and (procedure? fun-val)
(procedure-arity-includes?
@ -168,7 +176,7 @@
(in-inserted-else-clause mark-list)))))
(define (second-arg-is-list? mark-list)
(let ([arg-val (mark-binding-value (find-var-binding mark-list (z:varref-var (get-arg-varref 2))))])
(let ([arg-val (mark-binding-value (lookup-var-binding mark-list (z:varref-var (get-arg-varref 2))))])
(list? arg-val)))
(define (in-inserted-else-clause mark-list)
@ -182,14 +190,15 @@
; rectify-source-expr (z:parsed (ListOf Mark) (ListOf z:binding) -> sexp)
(define (rectify-source-expr expr mark-list lexically-bound-bindings)
(let ([recur (lambda (expr) (rectify-source-expr expr mark-list lexically-bound-bindings))])
(let ([recur (lambda (expr) (rectify-source-expr expr mark-list lexically-bound-bindings))]
[let-recur (lambda (expr bindings) (rectify-source-expr expr mark-list (append bindings lexically-bound-bindings)))])
(cond [(z:varref? expr)
(cond [(z:bound-varref? expr)
(let ([binding (z:bound-varref-binding expr)])
(if (memq binding lexically-bound-bindings)
(z:binding-orig-name binding)
(if (z:lambda-binding? expr)
(rectify-value (mark-binding-value (lookup-var-binding (z:varref-var expr))))
(if (z:lambda-binding? binding)
(rectify-value (mark-binding-value (lookup-var-binding mark-list (z:varref-var expr))))
(lookup-lifted-name binding))))]
[(z:top-level-varref? expr)
(z:varref-var expr)])]
@ -236,14 +245,23 @@
[(z:let-values-form? expr)
(let* ([bindings (z:let-values-form-vars expr)]
[binding-names (map (lambda (b-list) (map z:binding-orig-name b-list)) bindings)]
[right-sides (map recur (z:let-values-vorm-vals expr))]
[right-sides (map recur (z:let-values-form-vals expr))]
[must-be-values? (ormap (lambda (n-list) (not (= (length n-list) 1))) binding-names)]
[rectified-body (rectify-source-expr (z:let-values-form-body expr)
mark-list
(apply append lexically-bound-bindings bindings))])
[rectified-body (let-recur (z:let-values-form-body expr) bindings)])
(if must-be-values?
`(let-values ,(map list binding-names right-sides) ,rectified-body)
`(let ,(map list (map car binding-names) right-sides) ,rectified-body)))]
[(z:letrec-values-form? expr)
(let* ([bindings (z:letrec-values-form-vars expr)]
[binding-names (map (lambda (b-list) (map z:binding-orig-name b-list)) bindings)]
[right-sides (map (lambda (expr) (let-recur expr bindings))
(z:letrec-values-form-vals expr))]
[must-be-values? (ormap (lambda (n-list) (not (= (length n-list) 1))) binding-names)]
[rectified-body (let-recur (z:letrec-values-form-body expr) bindings)])
(if must-be-values?
`(letrec-values ,(map list binding-names right-sides) ,rectified-body)
`(letrec ,(map list (map car binding-names) right-sides) ,rectified-body)))]
[(z:case-lambda-form? expr)
(let* ([arglists (z:case-lambda-form-args expr)]
@ -253,14 +271,11 @@
(utils:improper-map z:binding-orig-name
(utils:arglist->ilist arglist)))
arglists)]
[var-form-arglists (map z:arglist-vars arglists)]
[binding-form-arglists (map z:arglist-vars arglists)]
[o-form-bodies
(map (lambda (body var-form-arglist)
(rectify-source-expr body
mark-list
(append var-form-arglist lexically-bound-bindings)))
(map (lambda (body binding-form-arglist) (let-recur body binding-form-arglist))
bodies
var-form-arglists)])
binding-form-arglists)])
(cond [(or (comes-from-lambda? expr) (comes-from-define? expr))
`(lambda ,(car o-form-arglists) ,(car o-form-bodies))]
[(comes-from-case-lambda? expr)
@ -387,141 +402,156 @@
so-far))
(define (rectify-inner mark-list so-far)
(let ([rectify-source-current-marks
(lambda (expr)
(rectify-source-expr expr mark-list null))])
(let* ([top-mark (car mark-list)]
[expr (mark-source top-mark)])
(cond
; variable references
[(z:varref? expr)
(if (eq? so-far nothing-so-far)
(rectify-source-current-marks expr)
(e:internal-error expr
"variable reference given as context"))]
; applications
[(z:app? expr)
(let* ([sub-exprs (cons (z:app-fun expr) (z:app-args expr))]
[arg-temps (build-list (length sub-exprs) get-arg-varref)]
[arg-temp-syms (map z:varref-var arg-temps)]
[arg-vals (map (lambda (arg-sym)
(mark-binding-value (find-var-binding mark-list arg-sym)))
arg-temp-syms)])
(case (mark-label (car mark-list))
((not-yet-called)
; (printf "length of mark-list: ~s~n" (length mark-list))
; (printf "mark has binding for third arg: ~s~n"
; (find-var-binding (list (car mark-list)) (z:varref:var
(letrec
([split-lists
(lambda (exprs vals)
(if (or (null? vals)
(eq? (car vals) *unevaluated*))
(values null exprs)
(let-values ([(small-vals small-exprs)
(split-lists (cdr exprs) (cdr vals))])
(values (cons (car vals) small-vals) small-exprs))))])
(let-values ([(evaluated unevaluated) (split-lists sub-exprs arg-vals)])
(let* ([rectified-evaluated (map rectify-value evaluated)])
(if (null? unevaluated)
rectified-evaluated
(append rectified-evaluated
(cons so-far
(map rectify-source-current-marks (cdr unevaluated)))))))))
((called)
(if (eq? so-far nothing-so-far)
`(...) ; in unannotated code
`(... ,so-far ...)))
(else
(e:static-error "bad label in application mark: ~s" expr))))]
; define-struct
[(z:struct-form? expr)
(if (comes-from-define-struct? expr)
so-far
(let ([super-expr (z:struct-form-super expr)]
[raw-type (utils:read->raw (z:struct-form-type expr))]
[raw-fields (map utils:read->raw (z:struct-form-fields expr))])
(if super-expr
`(struct (,raw-type ,so-far)
,raw-fields)
`(struct ,raw-type ,raw-fields))))]
; if
[(z:if-form? expr)
(let ([test-exp (if (eq? so-far nothing-so-far)
(rectify-source-current-marks
(create-bogus-bound-varref if-temp #f))
so-far)])
(cond [(comes-from-cond? expr)
(let* ([clause (list test-exp (rectify-source-current-marks (z:if-form-then expr)))]
[cond-source (z:zodiac-start expr)]
[rest-clauses (rectify-cond-clauses cond-source (z:if-form-else expr) mark-list null)])
`(cond ,clause ,@rest-clauses))]
[(comes-from-and? expr)
`(and ,test-exp ,@(rectify-and-clauses (z:zodiac-start expr)
(z:if-form-then expr)
mark-list
null))]
[(comes-from-or? expr)
`(or ,test-exp ,@(rectify-or-clauses (z:zodiac-start expr)
(z:if-form-else expr)
(let* ([rectify-source-current-marks
(lambda (expr)
(rectify-source-expr expr mark-list null))]
[rectify-let
(lambda (binding-sets letrec? vals body)
(let+ ([val binding-list (apply append binding-sets)]
[val binding-names (map (lambda (set) (map z:binding-orig-name set)) binding-sets)]
[val must-be-values? (ormap (lambda (n-list) (not (= (length n-list) 1))) binding-sets)]
[val dummy-var-list (build-list (length binding-list)
(lambda (x) (z:varref-var (get-arg-varref x))))]
[val rhs-vals (map (lambda (arg-sym)
(mark-binding-value (lookup-var-binding mark-list arg-sym)))
dummy-var-list)]
[val rhs-list
(let loop ([binding-sets binding-sets] [rhs-vals rhs-vals] [rhs-sources vals])
(cond [(null? binding-sets) null]
[(eq? (car rhs-vals) *unevaluated*)
(cons so-far
(map (lambda (expr)
(rectify-source-expr expr mark-list (if letrec?
binding-sets
null)))
(cdr rhs-sources)))]
[else
(let*-values ([(first-set) (car binding-sets)]
[(set-vals remaining) (list-partition rhs-vals (length first-set))])
(cons
(case (length first-set)
((0) `(values))
((1) (car set-vals))
(else `(values ,@set-vals)))
(loop (cdr binding-sets) remaining (cdr rhs-sources))))]))]
[val rectified-body (rectify-source-expr body mark-list binding-list)])
(if must-be-values?
`(let-values ,(map list binding-names rhs-list) ,rectified-body)
`(let ,(map list (map car binding-names) rhs-list) ,rectified-body))))]
[top-mark (car mark-list)]
[expr (mark-source top-mark)])
(cond
; variable references
[(z:varref? expr)
(if (eq? so-far nothing-so-far)
(rectify-source-current-marks expr)
(e:internal-error expr
"variable reference given as context"))]
; applications
[(z:app? expr)
(let* ([sub-exprs (cons (z:app-fun expr) (z:app-args expr))]
[arg-temps (build-list (length sub-exprs) get-arg-varref)]
[arg-temp-syms (map z:varref-var arg-temps)]
[arg-vals (map (lambda (arg-sym)
(mark-binding-value (lookup-var-binding mark-list arg-sym)))
arg-temp-syms)])
(case (mark-label (car mark-list))
((not-yet-called)
; (printf "length of mark-list: ~s~n" (length mark-list))
; (printf "mark has binding for third arg: ~s~n"
; (lookup-var-binding (list (car mark-list)) (z:varref:var
(letrec
([split-lists
(lambda (exprs vals)
(if (or (null? vals)
(eq? (car vals) *unevaluated*))
(values null exprs)
(let-values ([(small-vals small-exprs)
(split-lists (cdr exprs) (cdr vals))])
(values (cons (car vals) small-vals) small-exprs))))])
(let-values ([(evaluated unevaluated) (split-lists sub-exprs arg-vals)])
(let* ([rectified-evaluated (map rectify-value evaluated)])
(if (null? unevaluated)
rectified-evaluated
(append rectified-evaluated
(cons so-far
(map rectify-source-current-marks (cdr unevaluated)))))))))
((called)
(if (eq? so-far nothing-so-far)
`(...) ; in unannotated code
`(... ,so-far ...)))
(else
(e:static-error "bad label in application mark: ~s" expr))))]
; define-struct
[(z:struct-form? expr)
(if (comes-from-define-struct? expr)
so-far
(let ([super-expr (z:struct-form-super expr)]
[raw-type (utils:read->raw (z:struct-form-type expr))]
[raw-fields (map utils:read->raw (z:struct-form-fields expr))])
(if super-expr
`(struct (,raw-type ,so-far)
,raw-fields)
`(struct ,raw-type ,raw-fields))))]
; if
[(z:if-form? expr)
(let ([test-exp (if (eq? so-far nothing-so-far)
(rectify-source-current-marks
(create-bogus-bound-varref if-temp #f))
so-far)])
(cond [(comes-from-cond? expr)
(let* ([clause (list test-exp (rectify-source-current-marks (z:if-form-then expr)))]
[cond-source (z:zodiac-start expr)]
[rest-clauses (rectify-cond-clauses cond-source (z:if-form-else expr) mark-list null)])
`(cond ,clause ,@rest-clauses))]
[(comes-from-and? expr)
`(and ,test-exp ,@(rectify-and-clauses (z:zodiac-start expr)
(z:if-form-then expr)
mark-list
null))]
[else
`(if ,test-exp
,(rectify-source-current-marks (z:if-form-then expr))
,(rectify-source-current-marks (z:if-form-else expr)))]))]
; quote : there is no mark or break on a quote.
; begin, begin0 : may not occur directly (or indirectly?) except in advanced
; let-values
[(z:let-values-form? expr)
(let+ ([val binding-sets (z:let-values-form-vars expr)]
[val binding-list (apply append binding-sets)]
[val binding-names (map (lambda (set) (map z:binding-orig-name set)) binding-sets)]
[val must-be-values? (ormap (lambda (n-list) (not (= (length n-list) 1))) binding-sets)]
[val vals (z:let-values-form-vals expr)]
[val dummy-var-list (build-list (length binding-list) (lambda (x) (get-arg-varref x)))]
[val rhs-vals (map (lambda (arg-sym)
(mark-binding-value (find-var-binding mark-list arg-sym)))
arg-temp-syms)]
[val rhs-list
(let loop ([binding-sets binding-sets] [rhs-vals rhs-vals] [rhs-sources vals])
(cond [(null? binding-sets) null]
[(eq? (car rhs-vals) *undefined*)
(cons so-far
(map rectify-source-current-marks (cdr rhs-sources)))]
[else
(let*-values ([first-set (car binding-sets)]
[(set-vals remaining) (list-partition rhs-vals (length first-set))])
(cons
(case (length first-set)
((0) `(values))
((1) (car set-vals))
(else `(values ,@set-vals)))
(loop (cdr binding-sets) remaining (cdr rhs-sources))))]))]
[val rectified-body (rectify-source-expr mark-list binding-list)])
(if must-be-values?
`(let-values ,(map list binding-names rhs-list) ,rectified-body)
`(let ,(map list (map car binding-names) rhs-list) ,rectified-body)))]
; define-values : define's don't get marks, so they can't occur here
; lambda : there is no mark or break on a quote
[else
(print-struct #t)
(e:internal-error
expr
(format "stepper:reconstruct: unknown object to reconstruct, ~a~n" expr))]))))
[(comes-from-or? expr)
`(or ,test-exp ,@(rectify-or-clauses (z:zodiac-start expr)
(z:if-form-else expr)
mark-list
null))]
[else
`(if ,test-exp
,(rectify-source-current-marks (z:if-form-then expr))
,(rectify-source-current-marks (z:if-form-else expr)))]))]
; quote : there is no mark or break on a quote.
; begin, begin0 : may not occur directly (or indirectly?) except in advanced
; let-values
[(z:let-values-form? expr)
(rectify-let #f
(z:let-values-form-vars expr)
(z:let-values-form-vals expr)
(z:let-values-form-body expr))]
[(z:letrec-values-form? expr)
(rectify-let #t
(z:letrec-values-form-vars expr)
(z:letrec-values-form-vals expr)
(z:letrec-values-form-body expr))]
; define-values : define's don't get marks, so they can't occur here
; lambda : there is no mark or break on a quote
[else
(print-struct #t)
(e:internal-error
expr
(format "stepper:reconstruct: unknown object to reconstruct, ~a~n" expr))])))
(define redex #f)
@ -539,24 +569,32 @@
(cdr mark-list)
#f))))
(define (let-style-abstraction binding-sets body)
(let* ([redex (rectify-inner mark-list #f)]
[binding-list (apply append binding-sets)]
[new-names (map insert-lifted-name binding-list)]
[dummy-var-list (build-list (length binding-list) (lambda (x)
(z:varref-var (get-arg-varref x))))]
[rhs-vals (map (lambda (arg-sym)
(mark-binding-value (lookup-var-binding mark-list arg-sym)))
dummy-var-list)]
[before-step (current-def-rectifier redex (cdr mark-list) #f)]
[reduct (rectify-source-expr body mark-list null)]
[after-step (current-def-rectifier reduct (cdr mark-list) #f)]
[new-defines (map (lambda (name val) `(define ,name ,val)) new-names rhs-vals)])
(list new-defines before-step redex after-step reduct)))
(define (rectify-let-values-step)
(let* ([source-expr (mark-source (car mark-list))])
(unless (z:let-values-form? source-expr)
(e:internal-error "double-step not inside let-values."))
(let* ([redex (rectify-inner expr mark-list #f)]
[binding-sets (z:let-values-form-vars expr)]
[binding-list (apply append binding-sets)]
[reduct (rectify-source-expr (z:let-values-form-body expr) mark-list binding-list)]
[binding-names (map z:binding-orig-name binding-names)]
[new-names (insert-lifted-names binding-names)]
[dummy-var-list (build-list (length binding-list) (lambda (x) (get-arg-varref x)))]
[rhs-vals (map (lambda (arg-sym)
(mark-binding-value (find-var-binding mark-list arg-sym)))
arg-temp-syms)]
[before-step (current-def-rectifier redex (cdr mark-list) #f)]
[after-step (current-def-rectifier reduct (cdr mark-list) #f)]
[new-defines (map (lambda (name val) `(define ,name ,val)) new-names rhs-vals)])
(list before-step redex new-defines after-step reduct))))
(apply let-style-abstraction
(map (lambda (accessor) (accessor source-expr))
(cond [(z:let-values-form? source-expr)
(list z:let-values-form-vars
z:let-values-form-body)]
[(z:letrec-values-form? source-expr)
(list z:letrec-values-form-vars
z:let-values-form-body)])))))
; (define (confusable-value? val)
@ -574,11 +612,12 @@
[current-def (current-def-rectifier highlight-placeholder (cdr mark-list) #f)])
(list current-def innermost)))
((normal-break)
(begin
(let ([current-def (current-def-rectifier nothing-so-far mark-list #t)])
(list current-def redex))))
(let ([current-def (current-def-rectifier nothing-so-far mark-list #t)])
(list current-def redex)))
((double-break)
(rectify-let))))
(rectify-let-values-step))
(else
(e:internal-error 'reconstruct-current-def "unknown break kind: " break-kind))))
)

View File

@ -382,7 +382,7 @@
(define beginner-level-name "Beginning Student")
(define (stepper-go frame)
(let ([settings (f:preferences:get 'drscheme:language:settings-preferences-symbol)])
(let ([settings (f:preferences:get d:language:settings-preferences-symbol)])
(if #f ; (not (string=? (d:basis:setting-name settings) beginner-level-name))
(message-box "Stepper"
(format (string-append "Language level is set to \"~a\".~n"

View File

@ -48,6 +48,9 @@
(set-language #t)
(do-execute drs))
(test-expression "(error 'a \"~a\" 1)" "a: 1")
(test-expression "(error \"a\" \"a\")" "a \"a\"")
(test-expression "(time 1)" (format "[cpu time: 0 real time: 0 gc time: 0]~n1"))
(test-expression "(list make-posn posn-x posn-y posn?)" "reference to undefined identifier: make-posn")
@ -87,6 +90,9 @@
(set-language #t)
(do-execute drs))
(test-expression "(error 'a \"~a\" 1)" "a: 1")
(test-expression "(error \"a\" \"a\")" "a \"a\"")
(test-expression "(time 1)" (format "[cpu time: 0 real time: 0 gc time: 0]~n1"))
(test-expression "(list make-posn posn-x posn-y posn?)" "reference to undefined identifier: make-posn")
@ -131,6 +137,9 @@
(set-language #t)
(do-execute drs))
(test-expression "(error 'a \"~a\" 1)" "a: 1")
(test-expression "(error \"a\" \"a\")" "a \"a\"")
(test-expression "(time 1)" (format "[cpu time: 0 real time: 0 gc time: 0]~n1"))
(test-expression "(list make-posn posn-x posn-y posn?)" "reference to undefined identifier: make-posn")
@ -138,7 +147,7 @@
(test-expression "set-posn-y!" "reference to undefined identifier: set-posn-y!")
(test-expression "true" "reference to undefined identifier: true")
(test-expression "mred^" "Invalid use of signature name mred^")
(test-expression "mred^" "signature: invalid use of signature name mred^")
(test-expression "(eq? 'a 'A)" "#t")
(test-expression "(set! x 1)" "set!: cannot set undefined identifier: x")
(test-expression "(cond [(= 1 2) 3])" "")
@ -146,7 +155,8 @@
(test-expression "'(1)" "(1)")
(test-expression "(define shrd (box 1)) (list shrd shrd)"
"(#&1 #&1)")
(test-expression "(local ((define x x)) 1)" "Invalid position for internal definition")
(test-expression "(local ((define x x)) 1)"
"definition: invalid position for internal definition")
(test-expression "(letrec ([x x]) 1)" "1")
(test-expression "(if 1 1 1)" "1")
(test-expression "(+ 1)" "1")
@ -176,6 +186,9 @@
(set-language #t)
(do-execute drs))
(test-expression "(error 'a \"~a\" 1)" "a: 1")
(test-expression "(error \"a\" \"a\")" "a \"a\"")
(test-expression "(time 1)" (format "[cpu time: 0 real time: 0 gc time: 0]~n1"))
(test-expression "(list make-posn posn-x posn-y posn?)" "reference to undefined identifier: make-posn")
@ -191,7 +204,8 @@
(test-expression "'(1)" "(1)")
(test-expression "(define shrd (box 1)) (list shrd shrd)"
"(#&1 #&1)")
(test-expression "(local ((define x x)) 1)" "Invalid position for internal definition")
(test-expression "(local ((define x x)) 1)"
"definition: invalid position for internal definition")
(test-expression "(letrec ([x x]) 1)" "1")
(test-expression "(if 1 1 1)" "1")
(test-expression "(+ 1)" "1")
@ -214,6 +228,11 @@
(set-language #t)
(do-execute drs))
(test-expression "(error 'a \"~a\" 1)"
"procedure error: expects 2 arguments, given 3: 'a \"~a\" 1")
(test-expression "(error \"a\" \"a\")"
"error: expected a symbol and a string, got \"a\" and \"a\"")
(test-expression "(time 1)" "reference to undefined identifier: time")
(test-expression "(list make-posn posn-x posn-y posn?)" "(cons make-posn (cons posn-x (cons posn-y (cons posn? empty))))")
@ -226,11 +245,13 @@
(test-expression "(set! x 1)" "reference to undefined identifier: set!")
(test-expression "(cond [(= 1 2) 3])" "no matching cond clause")
(test-expression "(cons 1 2)" "cons: second argument must be of type <list>, given 1 and 2")
(test-expression "'(1)" "Misuse of quote: '(1) is not a symbol")
(test-expression "'(1)" "quote: misused: '(1) is not a symbol")
(test-expression "(define shrd (box 1)) (list shrd shrd)"
"(cons (box 1) (cons (box 1) empty))")
(test-expression "(local ((define x x)) 1)" "Invalid definition: must be at the top level")
(test-expression "(letrec ([x x]) 1)" "First term after parenthesis is illegal in an application")
(test-expression "(local ((define x x)) 1)"
"definition: must be at the top level")
(test-expression "(letrec ([x x]) 1)"
"illegal application: first term in application must be a function name")
(test-expression "(if 1 1 1)" "Condition value is neither true nor false: 1")
(test-expression "(+ 1)" "+: expects at least 2 arguments, given 1: 1")
(test-expression "1.0" "1")
@ -257,6 +278,11 @@
(set-language #t)
(do-execute drs))
(test-expression "(error 'a \"~a\" 1)"
"procedure error: expects 2 arguments, given 3: 'a \"~a\" 1")
(test-expression "(error \"a\" \"a\")"
"error: expected a symbol and a string, got \"a\" and \"a\"")
(test-expression "(time 1)" (format "[cpu time: 0 real time: 0 gc time: 0]~n1"))
(test-expression "(list make-posn posn-x posn-y posn?)" "(list make-posn posn-x posn-y posn?)")
@ -300,6 +326,11 @@
(set-language #t)
(do-execute drs))
(test-expression "(error 'a \"~a\" 1)"
"procedure error: expects 2 arguments, given 3: 'a \"~a\" 1")
(test-expression "(error \"a\" \"a\")"
"error: expected a symbol and a string, got \"a\" and \"a\"")
(test-expression "(time 1)" (format "[cpu time: 0 real time: 0 gc time: 0]~n1"))
(test-expression "(list make-posn posn-x posn-y posn?)" "(list make-posn posn-x posn-y posn?)")

View File

@ -7,27 +7,27 @@
;; basic tests
(make-test "("
"1.1-1.2: missing close paren"
"1.1-1.2: syntax error: missing close paren"
#t
"missing close paren"
"syntax error: missing close paren"
(vector 0 1)
"read: expected a ')'; started at position 1 in "
"read: expected a ')'; started at position 1, line 1 in "
#t
#f)
(make-test "."
"1.1-1.2: can't use `.' outside list"
"1.1-1.2: syntax error: can't use `.' outside list"
#t
"can't use `.' outside list"
"syntax error: can't use `.' outside list"
(vector 0 1)
"read: illegal use of \".\" at position 1 in "
"read: illegal use of \".\" at position 1, line 1 in "
#t
#f)
(make-test "(lambda ())"
"1.1-1.12: Malformed lambda"
"1.1-1.12: lambda: malformed expression"
#t
"Malformed lambda"
"lambda: malformed expression"
(vector 0 11)
"lambda: bad syntax in: (lambda ())"
"lambda: bad syntax in: (lambda ())"
@ -99,9 +99,9 @@
#f
#f)
(make-test " (eval '(lambda ()))"
"1.5-1.24: Malformed lambda"
"1.5-1.24: lambda: malformed expression"
#t
"Malformed lambda"
"lambda: malformed expression"
(vector 4 23)
"lambda: bad syntax in: (lambda ())"
"lambda: bad syntax in: (lambda ())"
@ -131,18 +131,18 @@
;; error in the middle
(make-test "1 2 ( 3 4"
"1.5-1.6: missing close paren"
"1.5-1.6: syntax error: missing close paren"
#t
(format "1~n2~nmissing close paren")
(format "1~n2~nsyntax error: missing close paren")
(vector 4 5)
(format "1~n2~nread: expected a ')'; started at position 5 in ")
(format "read: expected a ')'; started at position 5, line 1 in ")
#t
#f)
(make-test "1 2 . 3 4"
"1.5-1.6: can't use `.' outside list"
"1.5-1.6: syntax error: can't use `.' outside list"
#t
(format "1~n2~ncan't use `.' outside list")
(format "1~n2~nsyntax error: can't use `.' outside list")
(vector 4 5)
(format "1~n2~nread: illegal use of \".\" at position 5 in ")
(format "read: illegal use of \".\" at position 5, line 1 in ")
@ -251,9 +251,9 @@
#f)
(make-test
"(define-macro m 1)"
"1.1-1.19: Expander is not a procedure"
"1.1-1.19: define-macro: expander is not a procedure"
#t
"Expander is not a procedure"
"define-macro: expander is not a procedure"
(vector 0 18)
"define-macro: not a procedure"
"define-macro: not a procedure"

View File

@ -43,6 +43,7 @@
signal-not-boolean
eq?-only-compares-symbols?
<=-at-least-two-args
error-sym/string-only
disallow-untagged-inexact-numbers
print-tagged-inexact-numbers
whole/fractional-exact-numbers
@ -71,6 +72,7 @@
(signal-not-boolean #t)
(eq?-only-compares-symbols? #t)
(<=-at-least-two-args #t)
(error-sym/string-only #t)
(disallow-untagged-inexact-numbers #f)
(print-tagged-inexact-numbers #t)
(whole/fractional-exact-numbers #f)
@ -96,6 +98,7 @@
(signal-not-boolean #t)
(eq?-only-compares-symbols? #t)
(<=-at-least-two-args #t)
(error-sym/string-only #t)
(disallow-untagged-inexact-numbers #f)
(print-tagged-inexact-numbers #t)
(whole/fractional-exact-numbers #f)
@ -121,6 +124,7 @@
(signal-not-boolean #f)
(eq?-only-compares-symbols? #f)
(<=-at-least-two-args #t)
(error-sym/string-only #t)
(disallow-untagged-inexact-numbers #f)
(print-tagged-inexact-numbers #t)
(whole/fractional-exact-numbers #f)
@ -146,6 +150,7 @@
(signal-not-boolean #f)
(eq?-only-compares-symbols? #f)
(<=-at-least-two-args #f)
(error-sym/string-only #f)
(disallow-untagged-inexact-numbers #f)
(print-tagged-inexact-numbers #f)
(whole/fractional-exact-numbers #f)
@ -171,6 +176,7 @@
(signal-not-boolean #f)
(eq?-only-compares-symbols? #f)
(<=-at-least-two-args #f)
(error-sym/string-only #f)
(disallow-untagged-inexact-numbers #f)
(print-tagged-inexact-numbers #f)
(whole/fractional-exact-numbers #f)
@ -664,6 +670,7 @@
(params:allow-improper-lists improper-lists?))
(params:eq?-only-compares-symbols (setting-eq?-only-compares-symbols? setting))
(params:<=-at-least-two-args (setting-<=-at-least-two-args setting))
(params:error-sym/string-only (setting-error-sym/string-only setting))
(when (teaching-level? setting)
(global-define-values/invoke-unit/sig ricedefs^ ricedefs@ #f (params : plt:userspace:params^)))
;; end ricedefs

View File

@ -9,47 +9,80 @@
(error 'set-zodiac-phase "unknown phase: ~a~n" sym))
(set! zodiac-phase sym))
(define-struct (exn:zodiac-syntax struct:exn:syntax) (link-tag))
(define-struct (exn:zodiac-read struct:exn:read) (link-tag))
;; init-substring? : string string -> boolean
;; calculates if sub is an initial substring of str
(define (init-substring? sub str)
(and (>= (string-length str)
(string-length sub))
(string=? (substring str 0 (string-length sub))
sub)))
;; dispatch-report : string zodiac:zodiac -> ALPHA
;; escapes
(define dispatch-report
(lambda (string object)
(raise
(with-continuation-mark
aries:w-c-m-key
(aries:make-zodiac-mark object)
(case zodiac-phase
[(expander) (make-exn:syntax string (current-continuation-marks) #f)]
[(reader) (make-exn:read string (current-continuation-marks) #f)]
[else (make-exn:user string (current-continuation-marks))])))))
(define (dispatch-report string object link-tag)
(raise
(with-continuation-mark
aries:w-c-m-key
(aries:make-zodiac-mark object)
(let ([kwd? (init-substring? "kwd:" (symbol->string link-tag))])
(case zodiac-phase
[(expander)
(if kwd?
(make-exn:zodiac-syntax string
(current-continuation-marks)
#f
link-tag)
(make-exn:syntax string
(current-continuation-marks)
#f))]
[(reader)
(if kwd?
(make-exn:zodiac-read
string (current-continuation-marks) #f link-tag)
(make-exn:read
string (current-continuation-marks) #f))]
[else (make-exn:user string (current-continuation-marks))])))))
;; report-error : symbol -> (+ zodiac:zodiac zodiac:eof zodiac:period) string (listof TST) ->* ALPHA
;; escapes
(define report-error
(lambda (type)
(lambda (z s . args)
(let ([string (apply format (if (eq? type 'internal)
(string-append "report error.Internal error: "
s)
s)
(lambda (link-text link-tag z s . args)
(let ([string (apply format
(if (eq? type 'internal)
(string-append "Internal error: "
link-text
": "
s)
(string-append link-text ": " s))
args)])
(cond
[(zodiac:zodiac? z) (dispatch-report string z)]
[(zodiac:eof? z) (dispatch-report string (zodiac:make-zodiac 'origin
(zodiac:eof-location z)
(zodiac:eof-location z)))]
[(zodiac:period? z) (dispatch-report string (zodiac:make-zodiac 'origin
(zodiac:period-location z)
(zodiac:period-location z)))]
[else ((error-display-handler) (format "internal-error.report-error: ~a: ~a" z string))])))))
[(zodiac:zodiac? z)
(dispatch-report string z link-tag)]
[(zodiac:eof? z)
(dispatch-report
string
(zodiac:make-zodiac 'origin
(zodiac:eof-location z)
(zodiac:eof-location z))
link-tag)]
[(zodiac:period? z)
(dispatch-report
string
(zodiac:make-zodiac 'origin
(zodiac:period-location z)
(zodiac:period-location z))
link-tag)]
[else ((error-display-handler)
(format "internal-error.report-error: ~a: ~a" z string))])))))
;; static-error : (+ zodiac:zodiac zodiac:eof zodiac:period) string (listof TST) ->* ALPHA
;; escapes
(define static-error (report-error 'static))
;; dynamic-error : (+ zodiac:zodiac zodiac:eof zodiac:period) string (listof TST) ->* ALPHA
;; escapes
(define dynamic-error (report-error 'dynamic))
;; internal-error : (+ zodiac:zodiac zodiac:eof zodiac:period) string (listof TST) ->* ALPHA
;; escapes
(define internal-error (report-error 'internal)))

View File

@ -1,5 +1,6 @@
(unit/sig plt:userspace:params^
(import)
(define error-sym/string-only (make-parameter #f))
(define <=-at-least-two-args (make-parameter #t))
(define allow-improper-lists (make-parameter #t))
(define eq?-only-compares-symbols (make-parameter #f)))

View File

@ -1,4 +1,5 @@
(define-signature plt:userspace:params^
(<=-at-least-two-args
(error-sym/string-only
<=-at-least-two-args
allow-improper-lists
eq?-only-compares-symbols))

View File

@ -4,7 +4,7 @@
(define check-second
(lambda (prim-name a b)
(unless (list? b)
(error prim-name
(#%error prim-name
"second argument must be of type <list>, given ~e and ~e"
a b))))
@ -16,7 +16,7 @@
[(null? (cdr l))
(let ([last (car l)])
(unless (list? last)
(error prim-name
(#%error prim-name
"last argument must be of type <list>, given ~e; all args: ~a"
last
(map (lambda (x) (format "~e" x)) args))))]
@ -25,7 +25,7 @@
(define (check-arity prim len lst)
(let ([lst-len (length lst)])
(unless (#%>= lst-len len)
(error prim
(#%error prim
"expects at least ~a arguments, given ~a"
len
(if (#%= 0 lst-len)
@ -126,4 +126,15 @@
#%append!
(lambda x
(check-last 'append! x)
(apply #%append! x)))))
(apply #%append! x))))
(define error (if (params:error-sym/string-only)
(lambda (sym str)
(unless (and (symbol? sym)
(string? str))
(#%error 'error
"expected a symbol and a string, got ~e and ~e"
sym str))
(#%error sym str))
#%error))
)

View File

@ -5,4 +5,5 @@
set-cdr!
list*
append
append!))
append!
error))

View File

@ -151,6 +151,8 @@
(define-signature drscheme:interface^
((open zodiac:interface^)
(struct exn:zodiac-syntax (link-tag))
(struct exn:zodiac-read (link-tag))
set-zodiac-phase))
(define-signature plt:basis-import^

View File

@ -1,8 +1,20 @@
Version 102:
102d10:
102
102d10.
PRS:
FUNCTIONALITY CHANGES
- the help desk language level specific documentation has been
integrated into drscheme.
MINOR CHANGES AND BUG FIXES
- Only the platform-specific dialogs are used in drscheme now, on
all platforms. The preference has been removed from the dialog.
102d10:
PRS:

View File

@ -2317,7 +2317,7 @@ void *wxOutOfMemory()
static void (*mr_save_oom)(void);
static jmp_buf oom_buf;
static mz_jmp_buf oom_buf;
static void not_so_much_memory(void)
{

View File

@ -5,4 +5,4 @@
# define SPECIAL_TAG ""
#endif
#define VERSION "102" SPECIAL_TAG
#define VERSION "102/14" SPECIAL_TAG

View File

@ -1 +0,0 @@
ÐÏࡱ

View File

@ -1,260 +0,0 @@
# Microsoft Developer Studio Project File - Name="wxutils" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=wxutils - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "wxutils.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "wxutils.mak" CFG="wxutils - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "wxutils - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "wxutils - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "wxutils - Win32 SGC" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "wxutils - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir ".\Release"
# PROP Intermediate_Dir ".\Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MT /W3 /Zi /O2 /I "..\..\mzscheme\gc" /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I ":..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\wxWindow\contrib\fafa" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "wxutils - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\Debug"
# PROP BASE Intermediate_Dir ".\Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ".\Debug"
# PROP Intermediate_Dir ".\Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MTd /W3 /Z7 /Od /I "..\..\mzscheme\gc" /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I ":..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\wxWindow\contrib\fafa" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "wxutils - Win32 SGC"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\SGC"
# PROP BASE Intermediate_Dir ".\SGC"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ".\SGC"
# PROP Intermediate_Dir ".\SGC"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Z7 /Od /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I "..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\mred\mzscheme\gc" /I "..\..\wxWindow\contrib\fafa" /I "..\..\mzscheme\gc" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "FOR_MSW" /D WX_NORMALIZED_PS_FONTS=1 /YX"wx.h" /c
# ADD CPP /nologo /MTd /W3 /ZI /Od /I "..\..\mzscheme\sgc" /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I ":..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\wxWindow\contrib\fafa" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "USE_SENORA_GC" /D "USE_WXOBJECT_TRACE_COUNT" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "wxutils - Win32 Release"
# Name "wxutils - Win32 Debug"
# Name "wxutils - Win32 SGC"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Fafa\Button.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Fafa\Check.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Fafa\Cont.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Crbuffri.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Crdatfri.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Create.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Crifrbuf.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Crifrdat.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Data.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Fafa\Dialog.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Utils\Dib\DIB.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Fafa\Draw.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Fafa\Dumfafa.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Fafa\Fafa.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Hashtab.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Misc.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Parse.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Rdftodat.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Rdftoi.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Rgb.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Scan.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Simx.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Fafa\Static.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Wrffrdat.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Wrffri.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Wrffrp.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\wximgxbm.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Gauge\Zyz3d.c
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Gauge\Zyzgauge.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=..\..\wxwindow\utils\dib\dib.h
# End Source File
# Begin Source File
SOURCE=..\..\wxWindow\contrib\fafa\fafa.h
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\simx.h
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Contrib\Gauge\zyz3d.h
# End Source File
# Begin Source File
SOURCE=..\..\wxwindow\contrib\gauge\zyzgauge.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@ -1,29 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "wxwin"=.\wxutils.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -1,589 +0,0 @@
# Microsoft Developer Studio Generated NMAKE File, Based on wxutils.dsp
!IF "$(CFG)" == ""
CFG=wxutils - Win32 Release
!MESSAGE No configuration specified. Defaulting to wxutils - Win32 Release.
!ENDIF
!IF "$(CFG)" != "wxutils - Win32 Release" && "$(CFG)" != "wxutils - Win32 Debug" && "$(CFG)" != "wxutils - Win32 SGC"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "wxutils.mak" CFG="wxutils - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "wxutils - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "wxutils - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "wxutils - Win32 SGC" (based on "Win32 (x86) Static Library")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
!IF "$(CFG)" == "wxutils - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
# Begin Custom Macros
OutDir=.\Release
# End Custom Macros
ALL : "$(OUTDIR)\wxutils.lib"
CLEAN :
-@erase "$(INTDIR)\Button.obj"
-@erase "$(INTDIR)\Check.obj"
-@erase "$(INTDIR)\Cont.obj"
-@erase "$(INTDIR)\Crbuffri.obj"
-@erase "$(INTDIR)\Crdatfri.obj"
-@erase "$(INTDIR)\Create.obj"
-@erase "$(INTDIR)\Crifrbuf.obj"
-@erase "$(INTDIR)\Crifrdat.obj"
-@erase "$(INTDIR)\Data.obj"
-@erase "$(INTDIR)\Dialog.obj"
-@erase "$(INTDIR)\DIB.obj"
-@erase "$(INTDIR)\Draw.obj"
-@erase "$(INTDIR)\Dumfafa.obj"
-@erase "$(INTDIR)\Fafa.obj"
-@erase "$(INTDIR)\Hashtab.obj"
-@erase "$(INTDIR)\Misc.obj"
-@erase "$(INTDIR)\Parse.obj"
-@erase "$(INTDIR)\Rdftodat.obj"
-@erase "$(INTDIR)\Rdftoi.obj"
-@erase "$(INTDIR)\Rgb.obj"
-@erase "$(INTDIR)\Scan.obj"
-@erase "$(INTDIR)\Simx.obj"
-@erase "$(INTDIR)\Static.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(INTDIR)\Wrffrdat.obj"
-@erase "$(INTDIR)\Wrffri.obj"
-@erase "$(INTDIR)\Wrffrp.obj"
-@erase "$(INTDIR)\wximgxbm.obj"
-@erase "$(INTDIR)\Zyz3d.obj"
-@erase "$(INTDIR)\Zyzgauge.obj"
-@erase "$(OUTDIR)\wxutils.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MT /W3 /Zi /O2 /I "..\..\mzscheme\gc" /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I ":..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\wxWindow\contrib\fafa" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\wxutils.bsc"
BSC32_SBRS= \
LIB32=link.exe -lib
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\wxutils.lib"
LIB32_OBJS= \
"$(INTDIR)\Button.obj" \
"$(INTDIR)\Check.obj" \
"$(INTDIR)\Cont.obj" \
"$(INTDIR)\Crbuffri.obj" \
"$(INTDIR)\Crdatfri.obj" \
"$(INTDIR)\Create.obj" \
"$(INTDIR)\Crifrbuf.obj" \
"$(INTDIR)\Crifrdat.obj" \
"$(INTDIR)\Data.obj" \
"$(INTDIR)\Dialog.obj" \
"$(INTDIR)\DIB.obj" \
"$(INTDIR)\Draw.obj" \
"$(INTDIR)\Dumfafa.obj" \
"$(INTDIR)\Fafa.obj" \
"$(INTDIR)\Hashtab.obj" \
"$(INTDIR)\Misc.obj" \
"$(INTDIR)\Parse.obj" \
"$(INTDIR)\Rdftodat.obj" \
"$(INTDIR)\Rdftoi.obj" \
"$(INTDIR)\Rgb.obj" \
"$(INTDIR)\Scan.obj" \
"$(INTDIR)\Simx.obj" \
"$(INTDIR)\Static.obj" \
"$(INTDIR)\Wrffrdat.obj" \
"$(INTDIR)\Wrffri.obj" \
"$(INTDIR)\Wrffrp.obj" \
"$(INTDIR)\wximgxbm.obj" \
"$(INTDIR)\Zyz3d.obj" \
"$(INTDIR)\Zyzgauge.obj"
"$(OUTDIR)\wxutils.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
!ELSEIF "$(CFG)" == "wxutils - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "$(OUTDIR)\wxutils.lib"
CLEAN :
-@erase "$(INTDIR)\Button.obj"
-@erase "$(INTDIR)\Check.obj"
-@erase "$(INTDIR)\Cont.obj"
-@erase "$(INTDIR)\Crbuffri.obj"
-@erase "$(INTDIR)\Crdatfri.obj"
-@erase "$(INTDIR)\Create.obj"
-@erase "$(INTDIR)\Crifrbuf.obj"
-@erase "$(INTDIR)\Crifrdat.obj"
-@erase "$(INTDIR)\Data.obj"
-@erase "$(INTDIR)\Dialog.obj"
-@erase "$(INTDIR)\DIB.obj"
-@erase "$(INTDIR)\Draw.obj"
-@erase "$(INTDIR)\Dumfafa.obj"
-@erase "$(INTDIR)\Fafa.obj"
-@erase "$(INTDIR)\Hashtab.obj"
-@erase "$(INTDIR)\Misc.obj"
-@erase "$(INTDIR)\Parse.obj"
-@erase "$(INTDIR)\Rdftodat.obj"
-@erase "$(INTDIR)\Rdftoi.obj"
-@erase "$(INTDIR)\Rgb.obj"
-@erase "$(INTDIR)\Scan.obj"
-@erase "$(INTDIR)\Simx.obj"
-@erase "$(INTDIR)\Static.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\Wrffrdat.obj"
-@erase "$(INTDIR)\Wrffri.obj"
-@erase "$(INTDIR)\Wrffrp.obj"
-@erase "$(INTDIR)\wximgxbm.obj"
-@erase "$(INTDIR)\Zyz3d.obj"
-@erase "$(INTDIR)\Zyzgauge.obj"
-@erase "$(OUTDIR)\wxutils.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MTd /W3 /Z7 /Od /I "..\..\mzscheme\gc" /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I ":..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\wxWindow\contrib\fafa" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\wxutils.bsc"
BSC32_SBRS= \
LIB32=link.exe -lib
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\wxutils.lib"
LIB32_OBJS= \
"$(INTDIR)\Button.obj" \
"$(INTDIR)\Check.obj" \
"$(INTDIR)\Cont.obj" \
"$(INTDIR)\Crbuffri.obj" \
"$(INTDIR)\Crdatfri.obj" \
"$(INTDIR)\Create.obj" \
"$(INTDIR)\Crifrbuf.obj" \
"$(INTDIR)\Crifrdat.obj" \
"$(INTDIR)\Data.obj" \
"$(INTDIR)\Dialog.obj" \
"$(INTDIR)\DIB.obj" \
"$(INTDIR)\Draw.obj" \
"$(INTDIR)\Dumfafa.obj" \
"$(INTDIR)\Fafa.obj" \
"$(INTDIR)\Hashtab.obj" \
"$(INTDIR)\Misc.obj" \
"$(INTDIR)\Parse.obj" \
"$(INTDIR)\Rdftodat.obj" \
"$(INTDIR)\Rdftoi.obj" \
"$(INTDIR)\Rgb.obj" \
"$(INTDIR)\Scan.obj" \
"$(INTDIR)\Simx.obj" \
"$(INTDIR)\Static.obj" \
"$(INTDIR)\Wrffrdat.obj" \
"$(INTDIR)\Wrffri.obj" \
"$(INTDIR)\Wrffrp.obj" \
"$(INTDIR)\wximgxbm.obj" \
"$(INTDIR)\Zyz3d.obj" \
"$(INTDIR)\Zyzgauge.obj"
"$(OUTDIR)\wxutils.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
!ELSEIF "$(CFG)" == "wxutils - Win32 SGC"
OUTDIR=.\SGC
INTDIR=.\SGC
# Begin Custom Macros
OutDir=.\SGC
# End Custom Macros
ALL : "$(OUTDIR)\wxutils.lib"
CLEAN :
-@erase "$(INTDIR)\Button.obj"
-@erase "$(INTDIR)\Check.obj"
-@erase "$(INTDIR)\Cont.obj"
-@erase "$(INTDIR)\Crbuffri.obj"
-@erase "$(INTDIR)\Crdatfri.obj"
-@erase "$(INTDIR)\Create.obj"
-@erase "$(INTDIR)\Crifrbuf.obj"
-@erase "$(INTDIR)\Crifrdat.obj"
-@erase "$(INTDIR)\Data.obj"
-@erase "$(INTDIR)\Dialog.obj"
-@erase "$(INTDIR)\DIB.obj"
-@erase "$(INTDIR)\Draw.obj"
-@erase "$(INTDIR)\Dumfafa.obj"
-@erase "$(INTDIR)\Fafa.obj"
-@erase "$(INTDIR)\Hashtab.obj"
-@erase "$(INTDIR)\Misc.obj"
-@erase "$(INTDIR)\Parse.obj"
-@erase "$(INTDIR)\Rdftodat.obj"
-@erase "$(INTDIR)\Rdftoi.obj"
-@erase "$(INTDIR)\Rgb.obj"
-@erase "$(INTDIR)\Scan.obj"
-@erase "$(INTDIR)\Simx.obj"
-@erase "$(INTDIR)\Static.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(INTDIR)\Wrffrdat.obj"
-@erase "$(INTDIR)\Wrffri.obj"
-@erase "$(INTDIR)\Wrffrp.obj"
-@erase "$(INTDIR)\wximgxbm.obj"
-@erase "$(INTDIR)\Zyz3d.obj"
-@erase "$(INTDIR)\Zyzgauge.obj"
-@erase "$(OUTDIR)\wxutils.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MTd /W3 /ZI /Od /I "..\..\mzscheme\sgc" /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I ":..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\wxWindow\contrib\fafa" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "USE_SENORA_GC" /D "USE_WXOBJECT_TRACE_COUNT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\wxutils.bsc"
BSC32_SBRS= \
LIB32=link.exe -lib
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\wxutils.lib"
LIB32_OBJS= \
"$(INTDIR)\Button.obj" \
"$(INTDIR)\Check.obj" \
"$(INTDIR)\Cont.obj" \
"$(INTDIR)\Crbuffri.obj" \
"$(INTDIR)\Crdatfri.obj" \
"$(INTDIR)\Create.obj" \
"$(INTDIR)\Crifrbuf.obj" \
"$(INTDIR)\Crifrdat.obj" \
"$(INTDIR)\Data.obj" \
"$(INTDIR)\Dialog.obj" \
"$(INTDIR)\DIB.obj" \
"$(INTDIR)\Draw.obj" \
"$(INTDIR)\Dumfafa.obj" \
"$(INTDIR)\Fafa.obj" \
"$(INTDIR)\Hashtab.obj" \
"$(INTDIR)\Misc.obj" \
"$(INTDIR)\Parse.obj" \
"$(INTDIR)\Rdftodat.obj" \
"$(INTDIR)\Rdftoi.obj" \
"$(INTDIR)\Rgb.obj" \
"$(INTDIR)\Scan.obj" \
"$(INTDIR)\Simx.obj" \
"$(INTDIR)\Static.obj" \
"$(INTDIR)\Wrffrdat.obj" \
"$(INTDIR)\Wrffri.obj" \
"$(INTDIR)\Wrffrp.obj" \
"$(INTDIR)\wximgxbm.obj" \
"$(INTDIR)\Zyz3d.obj" \
"$(INTDIR)\Zyzgauge.obj"
"$(OUTDIR)\wxutils.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("wxutils.dep")
!INCLUDE "wxutils.dep"
!ELSE
!MESSAGE Warning: cannot find "wxutils.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "wxutils - Win32 Release" || "$(CFG)" == "wxutils - Win32 Debug" || "$(CFG)" == "wxutils - Win32 SGC"
SOURCE=..\..\Wxwindow\Contrib\Fafa\Button.c
"$(INTDIR)\Button.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Fafa\Check.c
"$(INTDIR)\Check.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Fafa\Cont.c
"$(INTDIR)\Cont.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Crbuffri.c
"$(INTDIR)\Crbuffri.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Crdatfri.c
"$(INTDIR)\Crdatfri.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Create.c
"$(INTDIR)\Create.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Crifrbuf.c
"$(INTDIR)\Crifrbuf.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Crifrdat.c
"$(INTDIR)\Crifrdat.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Data.c
"$(INTDIR)\Data.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Fafa\Dialog.c
"$(INTDIR)\Dialog.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Utils\Dib\DIB.cxx
"$(INTDIR)\DIB.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Fafa\Draw.c
"$(INTDIR)\Draw.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Fafa\Dumfafa.c
"$(INTDIR)\Dumfafa.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Fafa\Fafa.c
"$(INTDIR)\Fafa.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Hashtab.c
"$(INTDIR)\Hashtab.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Misc.c
"$(INTDIR)\Misc.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Parse.c
"$(INTDIR)\Parse.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Rdftodat.c
"$(INTDIR)\Rdftodat.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Rdftoi.c
"$(INTDIR)\Rdftoi.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Rgb.c
"$(INTDIR)\Rgb.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Scan.c
"$(INTDIR)\Scan.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Simx.c
"$(INTDIR)\Simx.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Fafa\Static.c
"$(INTDIR)\Static.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Wrffrdat.c
"$(INTDIR)\Wrffrdat.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Wrffri.c
"$(INTDIR)\Wrffri.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Wxxpm\Libxpm.34b\Lib\Wrffrp.c
"$(INTDIR)\Wrffrp.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\wximgxbm.cxx
"$(INTDIR)\wximgxbm.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Gauge\Zyz3d.c
"$(INTDIR)\Zyz3d.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Contrib\Gauge\Zyzgauge.c
"$(INTDIR)\Zyzgauge.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF

View File

@ -1 +0,0 @@
ÐÏࡱ

View File

@ -1,317 +0,0 @@
# Microsoft Developer Studio Project File - Name="wxwin" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=wxwin - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "wxwin.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "wxwin.mak" CFG="wxwin - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "wxwin - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "wxwin - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "wxwin - Win32 SGC" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "wxwin - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir ".\Release"
# PROP Intermediate_Dir ".\Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MT /W3 /Zi /O2 /I "..\..\mzscheme\gc" /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I "..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\wxWindow\contrib\fafa" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /YX"wx.h" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "wxwin - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\Debug"
# PROP BASE Intermediate_Dir ".\Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ".\Debug"
# PROP Intermediate_Dir ".\Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MTd /W3 /Z7 /Od /I "..\..\mzscheme\gc" /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I "..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\wxWindow\contrib\fafa" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /YX"wx.h" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "wxwin - Win32 SGC"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\wxwin___"
# PROP BASE Intermediate_Dir ".\wxwin___"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ".\SGC"
# PROP Intermediate_Dir ".\SGC"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Z7 /Od /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I "..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\mzscheme\gc" /I "..\..\wxWindow\contrib\fafa" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "FOR_MSW" /D WX_NORMALIZED_PS_FONTS=1 /YX"wx.h" /c
# ADD CPP /nologo /MTd /W3 /ZI /Od /I "..\..\mzscheme\sgc" /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I "..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\wxWindow\contrib\fafa" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "USE_SENORA_GC" /D "USE_WXOBJECT_TRACE_COUNT" /YX"wx.h" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "wxwin - Win32 Release"
# Name "wxwin - Win32 Debug"
# Name "wxwin - Win32 SGC"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_CANVS.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_CMDLG.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_DATA.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_DC.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_DIALG.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_FRAME.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_GDI.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_HASH.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_ITEM.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_LIST.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_MAIN.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_MF.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_MGSTR.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_OBJ.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_PANEL.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_PRINT.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_PS.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_RES.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_STDEV.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_SYSEV.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_TIMER.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_TYPES.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_UTILS.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Base\WB_WIN.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_BUTTN.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_CANVS.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_CHECK.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_CHOIC.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_CLIPB.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_CMDLG.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_DC.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_DIALG.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_FRAME.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_GAUGE.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_GDI.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_ITEM.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_LBOX.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_MAIN.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_MENU.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_MESSG.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_MF.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_PANEL.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\wx_pdf.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_RBOX.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_SLIDR.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_TIMER.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_UTILS.cxx
# End Source File
# Begin Source File
SOURCE=..\..\Wxwindow\Src\Msw\WX_WIN.cxx
# End Source File
# Begin Source File
SOURCE=..\..\WXWINDOW\SRC\MSW\wximgfil.cxx
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@ -1,29 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "wxwin"=.\wxwin.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -1,829 +0,0 @@
# Microsoft Developer Studio Generated NMAKE File, Based on wxwin.dsp
!IF "$(CFG)" == ""
CFG=wxwin - Win32 Release
!MESSAGE No configuration specified. Defaulting to wxwin - Win32 Release.
!ENDIF
!IF "$(CFG)" != "wxwin - Win32 Release" && "$(CFG)" != "wxwin - Win32 Debug" && "$(CFG)" != "wxwin - Win32 SGC"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "wxwin.mak" CFG="wxwin - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "wxwin - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "wxwin - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "wxwin - Win32 SGC" (based on "Win32 (x86) Static Library")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
!IF "$(CFG)" == "wxwin - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
# Begin Custom Macros
OutDir=.\Release
# End Custom Macros
ALL : "$(OUTDIR)\wxwin.lib"
CLEAN :
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(INTDIR)\WB_CANVS.obj"
-@erase "$(INTDIR)\WB_CMDLG.obj"
-@erase "$(INTDIR)\WB_DATA.obj"
-@erase "$(INTDIR)\WB_DC.obj"
-@erase "$(INTDIR)\WB_DIALG.obj"
-@erase "$(INTDIR)\WB_FRAME.obj"
-@erase "$(INTDIR)\WB_GDI.obj"
-@erase "$(INTDIR)\WB_HASH.obj"
-@erase "$(INTDIR)\WB_ITEM.obj"
-@erase "$(INTDIR)\WB_LIST.obj"
-@erase "$(INTDIR)\WB_MAIN.obj"
-@erase "$(INTDIR)\WB_MF.obj"
-@erase "$(INTDIR)\WB_MGSTR.obj"
-@erase "$(INTDIR)\WB_OBJ.obj"
-@erase "$(INTDIR)\WB_PANEL.obj"
-@erase "$(INTDIR)\WB_PRINT.obj"
-@erase "$(INTDIR)\WB_PS.obj"
-@erase "$(INTDIR)\WB_RES.obj"
-@erase "$(INTDIR)\WB_STDEV.obj"
-@erase "$(INTDIR)\WB_SYSEV.obj"
-@erase "$(INTDIR)\WB_TIMER.obj"
-@erase "$(INTDIR)\WB_TYPES.obj"
-@erase "$(INTDIR)\WB_UTILS.obj"
-@erase "$(INTDIR)\WB_WIN.obj"
-@erase "$(INTDIR)\WX_BUTTN.obj"
-@erase "$(INTDIR)\WX_CANVS.obj"
-@erase "$(INTDIR)\WX_CHECK.obj"
-@erase "$(INTDIR)\WX_CHOIC.obj"
-@erase "$(INTDIR)\WX_CLIPB.obj"
-@erase "$(INTDIR)\WX_CMDLG.obj"
-@erase "$(INTDIR)\WX_DC.obj"
-@erase "$(INTDIR)\WX_DIALG.obj"
-@erase "$(INTDIR)\WX_FRAME.obj"
-@erase "$(INTDIR)\WX_GAUGE.obj"
-@erase "$(INTDIR)\WX_GDI.obj"
-@erase "$(INTDIR)\WX_ITEM.obj"
-@erase "$(INTDIR)\WX_LBOX.obj"
-@erase "$(INTDIR)\WX_MAIN.obj"
-@erase "$(INTDIR)\WX_MENU.obj"
-@erase "$(INTDIR)\WX_MESSG.obj"
-@erase "$(INTDIR)\WX_MF.obj"
-@erase "$(INTDIR)\WX_PANEL.obj"
-@erase "$(INTDIR)\wx_pdf.obj"
-@erase "$(INTDIR)\WX_RBOX.obj"
-@erase "$(INTDIR)\WX_SLIDR.obj"
-@erase "$(INTDIR)\WX_TIMER.obj"
-@erase "$(INTDIR)\WX_UTILS.obj"
-@erase "$(INTDIR)\WX_WIN.obj"
-@erase "$(INTDIR)\wximgfil.obj"
-@erase "$(OUTDIR)\wxwin.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MT /W3 /Zi /O2 /I "..\..\mzscheme\gc" /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I "..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\wxWindow\contrib\fafa" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /Fp"$(INTDIR)\wxwin.pch" /YX"wx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\wxwin.bsc"
BSC32_SBRS= \
LIB32=link.exe -lib
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\wxwin.lib"
LIB32_OBJS= \
"$(INTDIR)\WB_CANVS.obj" \
"$(INTDIR)\WB_CMDLG.obj" \
"$(INTDIR)\WB_DATA.obj" \
"$(INTDIR)\WB_DC.obj" \
"$(INTDIR)\WB_DIALG.obj" \
"$(INTDIR)\WB_FRAME.obj" \
"$(INTDIR)\WB_GDI.obj" \
"$(INTDIR)\WB_HASH.obj" \
"$(INTDIR)\WB_ITEM.obj" \
"$(INTDIR)\WB_LIST.obj" \
"$(INTDIR)\WB_MAIN.obj" \
"$(INTDIR)\WB_MF.obj" \
"$(INTDIR)\WB_MGSTR.obj" \
"$(INTDIR)\WB_OBJ.obj" \
"$(INTDIR)\WB_PANEL.obj" \
"$(INTDIR)\WB_PRINT.obj" \
"$(INTDIR)\WB_PS.obj" \
"$(INTDIR)\WB_RES.obj" \
"$(INTDIR)\WB_STDEV.obj" \
"$(INTDIR)\WB_SYSEV.obj" \
"$(INTDIR)\WB_TIMER.obj" \
"$(INTDIR)\WB_TYPES.obj" \
"$(INTDIR)\WB_UTILS.obj" \
"$(INTDIR)\WB_WIN.obj" \
"$(INTDIR)\WX_BUTTN.obj" \
"$(INTDIR)\WX_CANVS.obj" \
"$(INTDIR)\WX_CHECK.obj" \
"$(INTDIR)\WX_CHOIC.obj" \
"$(INTDIR)\WX_CLIPB.obj" \
"$(INTDIR)\WX_CMDLG.obj" \
"$(INTDIR)\WX_DC.obj" \
"$(INTDIR)\WX_DIALG.obj" \
"$(INTDIR)\WX_FRAME.obj" \
"$(INTDIR)\WX_GAUGE.obj" \
"$(INTDIR)\WX_GDI.obj" \
"$(INTDIR)\WX_ITEM.obj" \
"$(INTDIR)\WX_LBOX.obj" \
"$(INTDIR)\WX_MAIN.obj" \
"$(INTDIR)\WX_MENU.obj" \
"$(INTDIR)\WX_MESSG.obj" \
"$(INTDIR)\WX_MF.obj" \
"$(INTDIR)\WX_PANEL.obj" \
"$(INTDIR)\wx_pdf.obj" \
"$(INTDIR)\WX_RBOX.obj" \
"$(INTDIR)\WX_SLIDR.obj" \
"$(INTDIR)\WX_TIMER.obj" \
"$(INTDIR)\WX_UTILS.obj" \
"$(INTDIR)\WX_WIN.obj" \
"$(INTDIR)\wximgfil.obj"
"$(OUTDIR)\wxwin.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
!ELSEIF "$(CFG)" == "wxwin - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "$(OUTDIR)\wxwin.lib"
CLEAN :
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\WB_CANVS.obj"
-@erase "$(INTDIR)\WB_CMDLG.obj"
-@erase "$(INTDIR)\WB_DATA.obj"
-@erase "$(INTDIR)\WB_DC.obj"
-@erase "$(INTDIR)\WB_DIALG.obj"
-@erase "$(INTDIR)\WB_FRAME.obj"
-@erase "$(INTDIR)\WB_GDI.obj"
-@erase "$(INTDIR)\WB_HASH.obj"
-@erase "$(INTDIR)\WB_ITEM.obj"
-@erase "$(INTDIR)\WB_LIST.obj"
-@erase "$(INTDIR)\WB_MAIN.obj"
-@erase "$(INTDIR)\WB_MF.obj"
-@erase "$(INTDIR)\WB_MGSTR.obj"
-@erase "$(INTDIR)\WB_OBJ.obj"
-@erase "$(INTDIR)\WB_PANEL.obj"
-@erase "$(INTDIR)\WB_PRINT.obj"
-@erase "$(INTDIR)\WB_PS.obj"
-@erase "$(INTDIR)\WB_RES.obj"
-@erase "$(INTDIR)\WB_STDEV.obj"
-@erase "$(INTDIR)\WB_SYSEV.obj"
-@erase "$(INTDIR)\WB_TIMER.obj"
-@erase "$(INTDIR)\WB_TYPES.obj"
-@erase "$(INTDIR)\WB_UTILS.obj"
-@erase "$(INTDIR)\WB_WIN.obj"
-@erase "$(INTDIR)\WX_BUTTN.obj"
-@erase "$(INTDIR)\WX_CANVS.obj"
-@erase "$(INTDIR)\WX_CHECK.obj"
-@erase "$(INTDIR)\WX_CHOIC.obj"
-@erase "$(INTDIR)\WX_CLIPB.obj"
-@erase "$(INTDIR)\WX_CMDLG.obj"
-@erase "$(INTDIR)\WX_DC.obj"
-@erase "$(INTDIR)\WX_DIALG.obj"
-@erase "$(INTDIR)\WX_FRAME.obj"
-@erase "$(INTDIR)\WX_GAUGE.obj"
-@erase "$(INTDIR)\WX_GDI.obj"
-@erase "$(INTDIR)\WX_ITEM.obj"
-@erase "$(INTDIR)\WX_LBOX.obj"
-@erase "$(INTDIR)\WX_MAIN.obj"
-@erase "$(INTDIR)\WX_MENU.obj"
-@erase "$(INTDIR)\WX_MESSG.obj"
-@erase "$(INTDIR)\WX_MF.obj"
-@erase "$(INTDIR)\WX_PANEL.obj"
-@erase "$(INTDIR)\wx_pdf.obj"
-@erase "$(INTDIR)\WX_RBOX.obj"
-@erase "$(INTDIR)\WX_SLIDR.obj"
-@erase "$(INTDIR)\WX_TIMER.obj"
-@erase "$(INTDIR)\WX_UTILS.obj"
-@erase "$(INTDIR)\WX_WIN.obj"
-@erase "$(INTDIR)\wximgfil.obj"
-@erase "$(OUTDIR)\wxwin.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MTd /W3 /Z7 /Od /I "..\..\mzscheme\gc" /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I "..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\wxWindow\contrib\fafa" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /Fp"$(INTDIR)\wxwin.pch" /YX"wx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\wxwin.bsc"
BSC32_SBRS= \
LIB32=link.exe -lib
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\wxwin.lib"
LIB32_OBJS= \
"$(INTDIR)\WB_CANVS.obj" \
"$(INTDIR)\WB_CMDLG.obj" \
"$(INTDIR)\WB_DATA.obj" \
"$(INTDIR)\WB_DC.obj" \
"$(INTDIR)\WB_DIALG.obj" \
"$(INTDIR)\WB_FRAME.obj" \
"$(INTDIR)\WB_GDI.obj" \
"$(INTDIR)\WB_HASH.obj" \
"$(INTDIR)\WB_ITEM.obj" \
"$(INTDIR)\WB_LIST.obj" \
"$(INTDIR)\WB_MAIN.obj" \
"$(INTDIR)\WB_MF.obj" \
"$(INTDIR)\WB_MGSTR.obj" \
"$(INTDIR)\WB_OBJ.obj" \
"$(INTDIR)\WB_PANEL.obj" \
"$(INTDIR)\WB_PRINT.obj" \
"$(INTDIR)\WB_PS.obj" \
"$(INTDIR)\WB_RES.obj" \
"$(INTDIR)\WB_STDEV.obj" \
"$(INTDIR)\WB_SYSEV.obj" \
"$(INTDIR)\WB_TIMER.obj" \
"$(INTDIR)\WB_TYPES.obj" \
"$(INTDIR)\WB_UTILS.obj" \
"$(INTDIR)\WB_WIN.obj" \
"$(INTDIR)\WX_BUTTN.obj" \
"$(INTDIR)\WX_CANVS.obj" \
"$(INTDIR)\WX_CHECK.obj" \
"$(INTDIR)\WX_CHOIC.obj" \
"$(INTDIR)\WX_CLIPB.obj" \
"$(INTDIR)\WX_CMDLG.obj" \
"$(INTDIR)\WX_DC.obj" \
"$(INTDIR)\WX_DIALG.obj" \
"$(INTDIR)\WX_FRAME.obj" \
"$(INTDIR)\WX_GAUGE.obj" \
"$(INTDIR)\WX_GDI.obj" \
"$(INTDIR)\WX_ITEM.obj" \
"$(INTDIR)\WX_LBOX.obj" \
"$(INTDIR)\WX_MAIN.obj" \
"$(INTDIR)\WX_MENU.obj" \
"$(INTDIR)\WX_MESSG.obj" \
"$(INTDIR)\WX_MF.obj" \
"$(INTDIR)\WX_PANEL.obj" \
"$(INTDIR)\wx_pdf.obj" \
"$(INTDIR)\WX_RBOX.obj" \
"$(INTDIR)\WX_SLIDR.obj" \
"$(INTDIR)\WX_TIMER.obj" \
"$(INTDIR)\WX_UTILS.obj" \
"$(INTDIR)\WX_WIN.obj" \
"$(INTDIR)\wximgfil.obj"
"$(OUTDIR)\wxwin.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
!ELSEIF "$(CFG)" == "wxwin - Win32 SGC"
OUTDIR=.\SGC
INTDIR=.\SGC
# Begin Custom Macros
OutDir=.\SGC
# End Custom Macros
ALL : "$(OUTDIR)\wxwin.lib"
CLEAN :
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(INTDIR)\WB_CANVS.obj"
-@erase "$(INTDIR)\WB_CMDLG.obj"
-@erase "$(INTDIR)\WB_DATA.obj"
-@erase "$(INTDIR)\WB_DC.obj"
-@erase "$(INTDIR)\WB_DIALG.obj"
-@erase "$(INTDIR)\WB_FRAME.obj"
-@erase "$(INTDIR)\WB_GDI.obj"
-@erase "$(INTDIR)\WB_HASH.obj"
-@erase "$(INTDIR)\WB_ITEM.obj"
-@erase "$(INTDIR)\WB_LIST.obj"
-@erase "$(INTDIR)\WB_MAIN.obj"
-@erase "$(INTDIR)\WB_MF.obj"
-@erase "$(INTDIR)\WB_MGSTR.obj"
-@erase "$(INTDIR)\WB_OBJ.obj"
-@erase "$(INTDIR)\WB_PANEL.obj"
-@erase "$(INTDIR)\WB_PRINT.obj"
-@erase "$(INTDIR)\WB_PS.obj"
-@erase "$(INTDIR)\WB_RES.obj"
-@erase "$(INTDIR)\WB_STDEV.obj"
-@erase "$(INTDIR)\WB_SYSEV.obj"
-@erase "$(INTDIR)\WB_TIMER.obj"
-@erase "$(INTDIR)\WB_TYPES.obj"
-@erase "$(INTDIR)\WB_UTILS.obj"
-@erase "$(INTDIR)\WB_WIN.obj"
-@erase "$(INTDIR)\WX_BUTTN.obj"
-@erase "$(INTDIR)\WX_CANVS.obj"
-@erase "$(INTDIR)\WX_CHECK.obj"
-@erase "$(INTDIR)\WX_CHOIC.obj"
-@erase "$(INTDIR)\WX_CLIPB.obj"
-@erase "$(INTDIR)\WX_CMDLG.obj"
-@erase "$(INTDIR)\WX_DC.obj"
-@erase "$(INTDIR)\WX_DIALG.obj"
-@erase "$(INTDIR)\WX_FRAME.obj"
-@erase "$(INTDIR)\WX_GAUGE.obj"
-@erase "$(INTDIR)\WX_GDI.obj"
-@erase "$(INTDIR)\WX_ITEM.obj"
-@erase "$(INTDIR)\WX_LBOX.obj"
-@erase "$(INTDIR)\WX_MAIN.obj"
-@erase "$(INTDIR)\WX_MENU.obj"
-@erase "$(INTDIR)\WX_MESSG.obj"
-@erase "$(INTDIR)\WX_MF.obj"
-@erase "$(INTDIR)\WX_PANEL.obj"
-@erase "$(INTDIR)\wx_pdf.obj"
-@erase "$(INTDIR)\WX_RBOX.obj"
-@erase "$(INTDIR)\WX_SLIDR.obj"
-@erase "$(INTDIR)\WX_TIMER.obj"
-@erase "$(INTDIR)\WX_UTILS.obj"
-@erase "$(INTDIR)\WX_WIN.obj"
-@erase "$(INTDIR)\wximgfil.obj"
-@erase "$(OUTDIR)\wxwin.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MTd /W3 /ZI /Od /I "..\..\mzscheme\sgc" /I "..\..\wxwindow\include\base" /I "..\..\wxwindow\include\msw" /I "..\..\wxwindow\src\base" /I "..\..\wxwindow\src\msw" /I "..\..\wxwindow\contrib\wxxpm\libxpm.34b\lib" /I "..\..\wxWindow\contrib\fafa" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "USE_SENORA_GC" /D "USE_WXOBJECT_TRACE_COUNT" /Fp"$(INTDIR)\wxwin.pch" /YX"wx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\wxwin.bsc"
BSC32_SBRS= \
LIB32=link.exe -lib
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\wxwin.lib"
LIB32_OBJS= \
"$(INTDIR)\WB_CANVS.obj" \
"$(INTDIR)\WB_CMDLG.obj" \
"$(INTDIR)\WB_DATA.obj" \
"$(INTDIR)\WB_DC.obj" \
"$(INTDIR)\WB_DIALG.obj" \
"$(INTDIR)\WB_FRAME.obj" \
"$(INTDIR)\WB_GDI.obj" \
"$(INTDIR)\WB_HASH.obj" \
"$(INTDIR)\WB_ITEM.obj" \
"$(INTDIR)\WB_LIST.obj" \
"$(INTDIR)\WB_MAIN.obj" \
"$(INTDIR)\WB_MF.obj" \
"$(INTDIR)\WB_MGSTR.obj" \
"$(INTDIR)\WB_OBJ.obj" \
"$(INTDIR)\WB_PANEL.obj" \
"$(INTDIR)\WB_PRINT.obj" \
"$(INTDIR)\WB_PS.obj" \
"$(INTDIR)\WB_RES.obj" \
"$(INTDIR)\WB_STDEV.obj" \
"$(INTDIR)\WB_SYSEV.obj" \
"$(INTDIR)\WB_TIMER.obj" \
"$(INTDIR)\WB_TYPES.obj" \
"$(INTDIR)\WB_UTILS.obj" \
"$(INTDIR)\WB_WIN.obj" \
"$(INTDIR)\WX_BUTTN.obj" \
"$(INTDIR)\WX_CANVS.obj" \
"$(INTDIR)\WX_CHECK.obj" \
"$(INTDIR)\WX_CHOIC.obj" \
"$(INTDIR)\WX_CLIPB.obj" \
"$(INTDIR)\WX_CMDLG.obj" \
"$(INTDIR)\WX_DC.obj" \
"$(INTDIR)\WX_DIALG.obj" \
"$(INTDIR)\WX_FRAME.obj" \
"$(INTDIR)\WX_GAUGE.obj" \
"$(INTDIR)\WX_GDI.obj" \
"$(INTDIR)\WX_ITEM.obj" \
"$(INTDIR)\WX_LBOX.obj" \
"$(INTDIR)\WX_MAIN.obj" \
"$(INTDIR)\WX_MENU.obj" \
"$(INTDIR)\WX_MESSG.obj" \
"$(INTDIR)\WX_MF.obj" \
"$(INTDIR)\WX_PANEL.obj" \
"$(INTDIR)\wx_pdf.obj" \
"$(INTDIR)\WX_RBOX.obj" \
"$(INTDIR)\WX_SLIDR.obj" \
"$(INTDIR)\WX_TIMER.obj" \
"$(INTDIR)\WX_UTILS.obj" \
"$(INTDIR)\WX_WIN.obj" \
"$(INTDIR)\wximgfil.obj"
"$(OUTDIR)\wxwin.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("wxwin.dep")
!INCLUDE "wxwin.dep"
!ELSE
!MESSAGE Warning: cannot find "wxwin.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "wxwin - Win32 Release" || "$(CFG)" == "wxwin - Win32 Debug" || "$(CFG)" == "wxwin - Win32 SGC"
SOURCE=..\..\Wxwindow\Src\Base\WB_CANVS.cxx
"$(INTDIR)\WB_CANVS.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_CMDLG.cxx
"$(INTDIR)\WB_CMDLG.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_DATA.cxx
"$(INTDIR)\WB_DATA.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_DC.cxx
"$(INTDIR)\WB_DC.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_DIALG.cxx
"$(INTDIR)\WB_DIALG.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_FRAME.cxx
"$(INTDIR)\WB_FRAME.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_GDI.cxx
"$(INTDIR)\WB_GDI.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_HASH.cxx
"$(INTDIR)\WB_HASH.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_ITEM.cxx
"$(INTDIR)\WB_ITEM.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_LIST.cxx
"$(INTDIR)\WB_LIST.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_MAIN.cxx
"$(INTDIR)\WB_MAIN.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_MF.cxx
"$(INTDIR)\WB_MF.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_MGSTR.cxx
"$(INTDIR)\WB_MGSTR.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_OBJ.cxx
"$(INTDIR)\WB_OBJ.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_PANEL.cxx
"$(INTDIR)\WB_PANEL.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_PRINT.cxx
"$(INTDIR)\WB_PRINT.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_PS.cxx
"$(INTDIR)\WB_PS.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_RES.cxx
"$(INTDIR)\WB_RES.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_STDEV.cxx
"$(INTDIR)\WB_STDEV.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_SYSEV.cxx
"$(INTDIR)\WB_SYSEV.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_TIMER.cxx
"$(INTDIR)\WB_TIMER.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_TYPES.cxx
"$(INTDIR)\WB_TYPES.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_UTILS.cxx
"$(INTDIR)\WB_UTILS.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Base\WB_WIN.cxx
"$(INTDIR)\WB_WIN.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_BUTTN.cxx
"$(INTDIR)\WX_BUTTN.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_CANVS.cxx
"$(INTDIR)\WX_CANVS.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_CHECK.cxx
"$(INTDIR)\WX_CHECK.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_CHOIC.cxx
"$(INTDIR)\WX_CHOIC.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_CLIPB.cxx
"$(INTDIR)\WX_CLIPB.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_CMDLG.cxx
"$(INTDIR)\WX_CMDLG.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_DC.cxx
"$(INTDIR)\WX_DC.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_DIALG.cxx
"$(INTDIR)\WX_DIALG.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_FRAME.cxx
"$(INTDIR)\WX_FRAME.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_GAUGE.cxx
"$(INTDIR)\WX_GAUGE.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_GDI.cxx
"$(INTDIR)\WX_GDI.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_ITEM.cxx
"$(INTDIR)\WX_ITEM.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_LBOX.cxx
"$(INTDIR)\WX_LBOX.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_MAIN.cxx
"$(INTDIR)\WX_MAIN.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_MENU.cxx
"$(INTDIR)\WX_MENU.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_MESSG.cxx
"$(INTDIR)\WX_MESSG.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_MF.cxx
"$(INTDIR)\WX_MF.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_PANEL.cxx
"$(INTDIR)\WX_PANEL.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\wx_pdf.cxx
"$(INTDIR)\wx_pdf.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_RBOX.cxx
"$(INTDIR)\WX_RBOX.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_SLIDR.cxx
"$(INTDIR)\WX_SLIDR.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_TIMER.cxx
"$(INTDIR)\WX_TIMER.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_UTILS.cxx
"$(INTDIR)\WX_UTILS.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\Wxwindow\Src\Msw\WX_WIN.cxx
"$(INTDIR)\WX_WIN.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=..\..\WXWINDOW\SRC\MSW\wximgfil.cxx
"$(INTDIR)\wximgfil.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF

View File

@ -1 +0,0 @@
ÐÏࡱ

View File

@ -1,731 +0,0 @@
/* -*- C++ -*-
*
* Purpose: wxWindows font name handling
*
* Authors: Markus Holzem, Julian Smart, and Matthew Flatt
*
* Copyright: (C) 1995, AIAI, University of Edinburgh (Julian)
* Copyright: (C) 1995, GNU (Markus)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef wx_xt
# define Uses_wxApp
# define Uses_wxFontNameDirectory
# include "wx.h"
# include <string.h>
#endif
char *font_defaults[] = {
"PostScriptMediumStraight", "",
"PostScriptMediumItalic", "-Oblique",
"PostScriptMediumSlant", "-Oblique",
"PostScriptLightStraight", "",
"PostScriptLightItalic", "-Oblique",
"PostScriptLightSlant", "-Oblique",
"PostScriptBoldStraight", "-Bold",
"PostScriptBoldItalic", "-BoldOblique",
"PostScriptBoldSlant", "-BoldOblique",
"PostScript___", "${PostScript$[family],$[weight],$[style]}",
"PostScriptSystem__", "${PostScriptTimes,$[weight],$[style]}",
"PostScriptDefault__", "${PostScriptTimes,$[weight],$[style]}",
"PostScriptRoman__", "${PostScriptTimes,$[weight],$[style]}",
"PostScriptDecorative__", "${PostScriptTimes,$[weight],$[style]}",
"PostScriptScript__", "${PostScriptTimes,$[weight],$[style]}",
"PostScriptTimesMedium", "",
"PostScriptTimesLight", "",
"PostScriptTimesBold", "Bold",
"PostScriptTimes__", "Times${PostScript$[weight]$[style]}",
"PostScriptTimesMediumStraight", "Times-Roman",
"PostScriptTimesLightStraight", "Times-Roman",
"PostScriptTimes_Slant", "Times-${PostScriptTimes$[weight]}Italic",
"PostScriptTimes_Italic", "Times-${PostScriptTimes$[weight]}Italic",
"PostScriptSwiss__", "Helvetica${PostScript$[weight]$[style]}",
"PostScriptModern__", "Courier${PostScript$[weight]$[style]}",
"PostScriptSymbol__", "Symbol",
"PostScriptTeletype__", "${PostScriptModern,$[weight],$[style]}",
#ifdef wx_x
"ScreenMedium", "medium",
"ScreenBold", "bold",
"ScreenLight", "light",
"ScreenStraight", "r",
"ScreenItalic", "i",
"ScreenSlant", "o",
"ScreenSystemBase", "*-lucida",
"ScreenDefaultBase", "*-lucida",
"ScreenRomanBase", "*-times",
"ScreenDecorativeBase", "*-helvetica",
"ScreenModernBase", "*-courier",
"ScreenTeletypeBase", "*-lucidatypewriter",
"ScreenSwissBase", "*-lucida",
"ScreenScriptBase", "*-zapfchancery",
"ScreenSymbolBase", "*-symbol",
"ScreenStdSuffix", "-${Screen$[weight]}-${Screen$[style]}"
"-normal-*-*-%d-*-*-*-*-*-*",
"ScreenSystem__",
"+-${ScreenSystemBase}${ScreenStdSuffix}",
"ScreenDefault__",
"+-${ScreenDefaultBase}${ScreenStdSuffix}",
"ScreenRoman__",
"+-${ScreenRomanBase}${ScreenStdSuffix}",
"ScreenDecorative__",
"+-${ScreenDecorativeBase}${ScreenStdSuffix}",
"ScreenModern__",
"+-${ScreenModernBase}${ScreenStdSuffix}",
"ScreenTeletype__",
"+-${ScreenTeletypeBase}${ScreenStdSuffix}",
"ScreenSwiss__",
"+-${ScreenSwissBase}${ScreenStdSuffix}",
"ScreenScript__",
"+-${ScreenScriptBase}${ScreenStdSuffix}",
"ScreenSymbol__",
"+-${ScreenSymbolBase}-medium-r-normal-*-*-%d-*-*-*-*-*-*",
#endif
#ifdef wx_msw
"ScreenSystem__", "MS Sans Serif",
"ScreenDefault__", "MS Sans Serif",
"ScreenRoman__", "Times New Roman",
"ScreenDecorative__", "Arial",
"ScreenModern__", "Courier New",
"ScreenTeletype__", "${ScreenModern$[weight];$[style]}",
"ScreenSwiss__", "Arial",
"ScreenScript__", "Arial",
"ScreenSymbol__", "Symbol",
#endif
#ifdef wx_mac
"ScreenDefault__", "applicationfont",
"ScreenSystem__", "systemfont",
"ScreenRoman__", "times",
"ScreenDecorative__", "geneva",
"ScreenModern__", "monaco", /* "courier" is also good */
"ScreenTeletype__", "${ScreenModern,$[weight],$[style]}",
"ScreenSwiss__", "helvetica",
"ScreenScript__", "geneva",
"ScreenSymbol__", "symbol",
#endif
NULL
};
wxFontNameDirectory *wxTheFontNameDirectory;
enum {
wxWEIGHT_NORMAL,
wxWEIGHT_BOLD,
wxWEIGHT_LIGHT,
wxNUM_WEIGHTS
};
enum {
wxSTYLE_NORMAL,
wxSTYLE_ITALIC,
wxSTYLE_SLANT,
wxNUM_STYLES
};
class wxSuffixMap {
public:
char *map[wxNUM_WEIGHTS][wxNUM_STYLES];
void Initialize(const char *, const char *, int weight, int style, int fam);
wxSuffixMap();
#ifdef MZ_PRECISE_GC
void gcMark();
void gcFixup();
#endif
};
#ifdef MZ_PRECISE_GC
START_XFORM_SKIP;
void wxSuffixMap::gcMark() {
int i, j;
for (i = 0; i < wxNUM_WEIGHTS; i++)
for (j = 0; j < wxNUM_STYLES; j++) {
gcMARK_TYPED(char *, map[i][j]);
}
}
void wxSuffixMap::gcFixup() {
int i, j;
for (i = 0; i < wxNUM_WEIGHTS; i++)
for (j = 0; j < wxNUM_STYLES; j++) {
gcFIXUP_TYPED(char *, map[i][j]);
}
}
END_XFORM_SKIP;
#endif
wxSuffixMap::wxSuffixMap() {
int i, j;
for (i = 0; i < wxNUM_WEIGHTS; i++) {
for (j = 0; j < wxNUM_STYLES; j++) {
map[i][j] = NULL;
}
}
}
class wxFontNameItem : public wxObject
{
public:
int id;
int family;
char *name;
wxSuffixMap *screen, *printing;
Bool isfamily;
wxFontNameItem();
};
wxFontNameItem::wxFontNameItem()
{
screen = new wxSuffixMap;
printing = new wxSuffixMap;
}
static int WCoordinate(int w)
{
switch (w) {
case wxBOLD:
return wxWEIGHT_BOLD;
case wxLIGHT:
return wxWEIGHT_LIGHT;
case wxNORMAL:
default:
return wxWEIGHT_NORMAL;
}
}
static int SCoordinate(int s)
{
switch (s) {
case wxITALIC:
return wxSTYLE_ITALIC;
case wxSLANT:
return wxSTYLE_SLANT;
case wxNORMAL:
default:
return wxSTYLE_NORMAL;
}
}
wxFontNameDirectory::wxFontNameDirectory(void)
{
wxHashTable *ht;
ht = new wxHashTable(wxKEY_INTEGER, 20);
table = ht;
nextFontId = 100; /* Larger than all family ids */
}
wxFontNameDirectory::~wxFontNameDirectory()
{
delete table;
}
int wxFontNameDirectory::GetNewFontId(void)
{
return (nextFontId++);
}
#ifdef wx_x
# define GET_CLASS_NAME wxTheApp->GetClassName()
#else
# define GET_CLASS_NAME wxTheApp->wx_class
#endif
static void SearchResource(const char *prefix, const char **names, int count, char **v)
{
int k, i, j;
char resource[1024], **defaults, *internal, *cn;
k = 1 << count;
*v = NULL;
internal = NULL;
for (i = 0; i < k; i++) {
strcpy(resource, prefix);
for (j = 0; j < count; j++) {
if (!(i & (1 << j)))
strcat(resource, names[j]);
else
strcat(resource, "_");
}
cn = GET_CLASS_NAME;
if (wxGetResource(cn, (char *)resource, v) && **v)
return;
if (!internal) {
defaults = font_defaults;
while (*defaults) {
if (!strcmp(*defaults, resource)) {
internal = defaults[1];
break;
}
defaults += 2;
}
}
}
if (internal) {
char *s;
s = copystring(internal);
*v = s;
}
}
void wxInitializeFontNameDirectory(void)
{
wxREGGLOB(wxTheFontNameDirectory);
wxTheFontNameDirectory = new wxFontNameDirectory;
wxTheFontNameDirectory->Initialize(wxSYSTEM, wxSYSTEM, "System");
wxTheFontNameDirectory->Initialize(wxDEFAULT, wxDEFAULT, "Default");
wxTheFontNameDirectory->Initialize(wxDECORATIVE, wxDECORATIVE, "Decorative");
wxTheFontNameDirectory->Initialize(wxROMAN, wxROMAN, "Roman");
wxTheFontNameDirectory->Initialize(wxMODERN, wxMODERN, "Modern");
wxTheFontNameDirectory->Initialize(wxTELETYPE, wxTELETYPE, "Teletype");
wxTheFontNameDirectory->Initialize(wxSWISS, wxSWISS, "Swiss");
wxTheFontNameDirectory->Initialize(wxSCRIPT, wxSCRIPT, "Script");
wxTheFontNameDirectory->Initialize(wxSYMBOL, wxSYMBOL, "Symbol");
}
void wxSuffixMap::Initialize(const char *resname, const char *devresname,
int wt, int st, int fam)
{
const char *weight, *style;
char *v = NULL;
int i, drn;
{
switch (wt) {
case wxWEIGHT_NORMAL:
weight = "Medium";
break;
case wxWEIGHT_LIGHT:
weight = "Light";
break;
case wxWEIGHT_BOLD:
default:
weight = "Bold";
}
{
int len, closer = 0, startpos = 0;
const char *rnames[3];
switch (st) {
case wxSTYLE_NORMAL:
style = "Straight";
break;
case wxSTYLE_ITALIC:
style = "Italic";
break;
case wxSTYLE_SLANT:
default:
style = "Slant";
}
rnames[0] = resname;
rnames[1] = weight;
rnames[2] = style;
SearchResource(devresname, rnames, 3, &v);
/* Expand macros in the found string: */
found:
len = (v ? strlen(v) : 0);
for (i = 0; i < len; i++) {
if (v[i] == '$' && ((v[i+1] == '[') || (v[i+1] == '{'))) {
startpos = i;
if (v[i+1] == '[')
closer = ']';
else
closer = '}';
i++;
} else if (v[i] == closer) {
int newstrlen, noff;
const char *r = NULL;
char *naya, *name;
noff = startpos + 2;
name = v;
v[i] = 0;
if (closer == '}') {
int i, count, len;
char **names;
for (i = 0, count = 1; name[i + noff]; i++) {
if (name[i + noff] == ',') {
count++;
name[i + noff] = 0;
}
}
len = i;
names = new char*[count];
{
char *cs;
cs = COPYSTRING_TO_ALIGNED(name, noff);
names[0] = cs;
}
for (i = 0, count = 1; i < len; i++) {
if (!name[i + noff]) {
{
char *cs;
cs = COPYSTRING_TO_ALIGNED(name, i + 1 + noff);
names[count++] = cs;
}
}
}
SearchResource("", (const char **)names, count, (char **)&r);
delete[] names;
if (!r) {
for (i = 0; i < len; i++) {
if (!name[i + noff])
name[i + noff] = ',';
}
r = "";
printf("Bad resource name \"%s\" in font lookup\n", name + noff);
}
} else if (!strcmp(name + noff, "weight")) {
r = weight;
} else if (!strcmp(name + noff, "style")) {
r = style;
} else if (!strcmp(name + noff, "family")) {
switch (fam) {
case wxSYSTEM:
r = "System";
break;
case wxDECORATIVE:
r = "Decorative";
break;
case wxROMAN:
r = "Roman";
break;
case wxMODERN:
r = "Modern";
break;
case wxTELETYPE:
r = "Teletype";
break;
case wxSWISS:
r = "Swiss";
break;
case wxSCRIPT:
r = "Script";
break;
case wxSYMBOL:
r = "Symbol";
break;
default:
r = "Default";
}
} else {
r = "";
printf("Bad font macro name \"%s\"\n", name + noff);
}
newstrlen = strlen(r);
naya = new char[len + newstrlen + 1];
memcpy(naya, v, startpos);
memcpy(naya + startpos, r, newstrlen);
memcpy(naya + startpos + newstrlen, v + i + 1, len - i + 1);
delete[] v;
v = naya;
goto found;
}
}
drn = ((resname[0] == '@') ? 1 : 0);
#if defined(wx_msw) || defined(wx_mac)
if (!v)
v = copystring(resname + drn);
#endif
#ifdef wx_x
if (!strcmp(devresname, "Screen")) {
if (v && (v[0] == '+')) {
memmove(v, v + 1, strlen(v));
} else {
int len, ds;
char *src;
char *normalcy;
/* Build name using special heuristics:
-([^-]*) => -*-\1-<weight>-<style>-normal-*-*-%d-*-*-*-*-*-*
-([^-]*)-(.*) => -\1-\2-<weight>-<style>-normal-*-*-%d-*-*-*-*-*-*
([^-].*[^-]) => \1
*/
if (v) {
src = (char *)v;
ds = 0;
} else {
src = (char *)resname;
ds = drn;
}
len = strlen(src + ds);
if (src[ds] == '-') {
char *prefix;
int c = 0;
for (i = 0; i < len; i++) {
if (src[ds + i] == '-')
c++;
}
v = new char[len + 40];
if (c < 2)
prefix = "-*";
else
prefix = "";
if (c < 3) {
switch (wt) {
case wxWEIGHT_NORMAL:
weight = "-medium";
break;
case wxWEIGHT_LIGHT:
weight = "-light";
break;
case wxWEIGHT_BOLD:
default:
weight = "-bold";
}
} else
weight = "";
if (c < 4) {
switch (st) {
case wxSTYLE_NORMAL:
style = "-r";
break;
case wxSTYLE_ITALIC:
style = "-i";
break;
case wxSTYLE_SLANT:
default:
style = "-o";
}
} else
style = "";
if (c < 5)
normalcy = "-normal";
else
normalcy = "";
sprintf(v, "%s%s%s%s%s-*-*-%%d-*-*-*-*-*-*",
prefix, src + ds, weight, style, normalcy);
} else
v = copystring(src);
}
}
#endif
/* We have a final value: */
map[wt][st] = v;
}
}
}
void wxFontNameDirectory::Initialize(int fontid, int family, const char *resname)
{
wxFontNameItem *item;
item = new wxFontNameItem;
item->id = fontid;
item->family = family;
item->isfamily = (resname[0] != '@');
item->name = copystring(resname);
table->Put(fontid, item);
}
int wxFontNameDirectory::FindOrCreateFontId(const char *name, int family)
{
int id;
char *s;
if ((id = GetFontId(name, family)))
return id;
id = GetNewFontId();
s = new char[strlen(name) + 2];
strcpy(s + 1, name);
s[0] = '@';
Initialize(id, family, s);
return id;
}
char *wxFontNameDirectory::GetScreenName(int fontid, int weight, int style)
{
int wt, st;
wxFontNameItem *item;
item = (wxFontNameItem *)table->Get(fontid);
if (!item)
return NULL;
wt = WCoordinate(weight);
st = SCoordinate(style);
/* Check for init */
if (!item->screen->map[wt][st])
item->screen->Initialize(item->name, "Screen", wt, st, item->family);
return item->screen->map[wt][st];
}
void wxFontNameDirectory::SetScreenName(int fontid, int weight, int style, char *s)
{
int wt, st;
wxFontNameItem *item;
item = (wxFontNameItem *)table->Get(fontid);
if (!item)
return;
wt = WCoordinate(weight);
st = SCoordinate(style);
#ifdef wx_x
{
/* Safety: name must be less than 500 chars, and must not contain %
except maybe one instance of %d. */
int i, found_d = 0;
for (i = 0; s[i]; i++) {
if (i > 500) {
s = NULL;
break;
}
if (s[i] == '%') {
if (found_d || (s[i+1] != 'd')) {
s = NULL;
break;
} else
found_d = 1;
}
}
}
if (!s)
return;
#endif
item->screen->map[wt][st] = s;
}
char *wxFontNameDirectory::GetPostScriptName(int fontid, int weight, int style)
{
int wt, st;
wxFontNameItem *item;
item = (wxFontNameItem *)table->Get(fontid);
if (!item)
return NULL;
wt = WCoordinate(weight);
st = SCoordinate(style);
/* Check for init */
if (!item->printing->map[wt][st])
item->printing->Initialize(item->name, "PostScript", wt, st, item->family);
return item->printing->map[wt][st];
}
void wxFontNameDirectory::SetPostScriptName(int fontid, int weight, int style, char *s)
{
int wt, st;
wxFontNameItem *item;
item = (wxFontNameItem *)table->Get(fontid);
if (!item)
return;
wt = WCoordinate(weight);
st = SCoordinate(style);
item->printing->map[wt][st] = s;
}
char *wxFontNameDirectory::GetFontName(int fontid)
{
wxFontNameItem *item;
item = (wxFontNameItem *)table->Get(fontid);
if (!item)
return NULL;
if (item->isfamily)
return NULL;
return item->name + 1;
}
int wxFontNameDirectory::GetFontId(const char *name, int family)
{
wxNode *node;
table->BeginFind();
while ((node = table->Next())) {
wxFontNameItem *item;
item = (wxFontNameItem *)node->Data();
if (!item->isfamily
&& !strcmp(name, item->name+1)
&& item->family == family)
return item->id;
}
return 0;
}
int wxFontNameDirectory::GetFamily(int fontid)
{
wxFontNameItem *item;
item = (wxFontNameItem *)table->Get(fontid);
if (!item)
return wxDEFAULT;
return item->family;
}

View File

@ -1,61 +0,0 @@
/* -*- C++ -*-
* $Id: FontDirectory.h,v 1.3 1999/11/27 17:11:40 mflatt Exp $
*
* Purpose: wxWindows font name handling
*
* Authors: Markus Holzem, Julian Smart, and Matthew Flatt
*
* Copyright: (C) 1995, AIAI, University of Edinburgh (Julian)
* Copyright: (C) 1995, GNU (Markus)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef FontDirectory_h
#define FontDirectory_h
#ifdef __GNUG__
#pragma interface
#endif
class wxHashTable;
class wxFontNameDirectory : public wxObject
{
wxHashTable *table;
int nextFontId;
public:
wxFontNameDirectory(void);
~wxFontNameDirectory();
char *GetScreenName(int fontid, int weight, int style);
char *GetPostScriptName(int fontid, int weight, int style);
void SetScreenName(int fontid, int weight, int style, char *s);
void SetPostScriptName(int fontid, int weight, int style, char *s);
void Initialize(int fontid, int family, const char *name);
int GetNewFontId(void);
int FindOrCreateFontId(const char *name, int family);
int GetFontId(const char *name, int family);
char *GetFontName(int fontid);
int GetFamily(int fontid);
};
extern wxFontNameDirectory *wxTheFontNameDirectory;
void wxInitializeFontNameDirectory(void);
#endif /* FontDirectory_h */

File diff suppressed because it is too large Load Diff

View File

@ -1,305 +0,0 @@
/*
* File: wx_dcps.h
* Purpose: PostScript device context
* Author: Julian Smart
* Created: 1993
* Updated:
* Copyright: (c) 1993, AIAI, University of Edinburgh
*/
/* sccsid[] = "@(#)wx_dcps.h 1.2 5/9/94" */
#ifndef wx_dcpsh
#define wx_dcpsh
#ifdef __GNUG__
#pragma interface
#endif
#ifdef wx_xt
class wxBitmap;
class wxBrush;
class wxColour;
class wxColourMap;
class wxFont;
class wxList;
class wxPen;
class ofstream;
#else
#include "wx_dc.h"
#endif
class wxMemoryDC;
#if USE_POSTSCRIPT
#ifdef IN_CPROTO
typedef void *wxPostScriptDC ;
#else
#ifdef wx_xt
# define DRAW_TEXT_CONST /* empty */
#else
# define DRAW_TEXT_CONST const
#endif
class PSStream;
class wxPostScriptDC: public wxDC
{
public:
#ifdef wx_xt
char *title;
#endif
int page_number;
PSStream *pstream; // PostScript output stream
char *filename;
long boundingboxpos;
unsigned char currentRed;
unsigned char currentGreen;
unsigned char currentBlue;
/* MATTHEW: [8] */
float clipx, clipy, clipw, cliph;
float paper_x, paper_y, paper_w, paper_h, paper_x_scale, paper_y_scale;
float paper_margin_x, paper_margin_y;
Bool landscape, resetFont, level2ok;
char *afm_path;
int mode;
char *preview_cmd, *print_cmd, *print_opts;
// Create a printer DC
wxPostScriptDC(void);
wxPostScriptDC(Bool interactive);
~wxPostScriptDC(void);
Bool Create(Bool interactive = TRUE);
Bool PrinterDialog(Bool interactive);
inline virtual void BeginDrawing(void) {} ;
inline virtual void EndDrawing(void) {} ;
void FloodFill(float x1, float y1, wxColour *col, int style=wxFLOOD_SURFACE) ;
Bool GetPixel(float x1, float y1, wxColour *col) ;
void DrawLine(float x1, float y1, float x2, float y2);
void IntDrawLine(int x1, int y1, int x2, int y2);
void CrossHair(float x, float y) ;
void DrawArc(float x1,float y1,float w,float h,float start,float end);
void DrawPoint(float x, float y);
void DrawPoint(wxPoint* point) { DrawPoint(point->x, point->y); }
void DrawLines(int n, wxPoint points[], float xoffset = 0, float yoffset = 0);
void DrawLines(int n, wxIntPoint points[], int xoffset = 0, int yoffset = 0);
#ifdef wx_xt
void IntDrawLines(int n, wxIntPoint points[], int xoffset = 0, int yoffset = 0)
{ DrawLines(n, points, xoffset, yoffset); }
#endif
void DrawLines(wxList *lines, float xoffset = 0, float yoffset = 0)
#ifdef wx_xt
;
#else
{ wxbDC::DrawLines(lines, xoffset, yoffset); }
#endif
void DrawPolygon(int n, wxPoint points[], float xoffset = 0, float yoffset = 0, int fillStyle=wxODDEVEN_RULE);
void DrawPolygon(wxList *lines, float xoffset = 0, float yoffset = 0, int fillStyle=wxODDEVEN_RULE)
#ifdef wx_xt
;
#else
{ wxbDC::DrawPolygon(lines, xoffset, yoffset, fillStyle); }
#endif
void DrawSpline(float x1, float y1, float x2, float y2, float x3, float y3);
void DrawRectangle(float x, float y, float width, float height);
void DrawRoundedRectangle(float x, float y, float width, float height, float radius = 20);
void DrawEllipse(float x, float y, float width, float height);
void DrawText(DRAW_TEXT_CONST char *text, float x, float y, Bool use16 = FALSE, int dt = 0);
void Clear(void);
void SetFont(wxFont *font);
void SetPen(wxPen *pen);
void SetBrush(wxBrush *brush);
void SetBackground(wxColour *c);
void SetClippingRect(float x, float y, float width, float height);
wxRegion *GetClippingRegion();
void SetClippingRegion(wxRegion *r);
void DestroyClippingRegion(void);
Bool StartDoc(char *message);
void EndDoc(void);
void StartPage(void);
void EndPage(void);
float GetCharHeight(void);
float GetCharWidth(void);
void GetTextExtent(const char *string, float *x, float *y,
float *descent = NULL, float *externalLeading = NULL,
wxFont *theFont = NULL, Bool use16 = FALSE, int dt = 0);
void SetMapMode(int mode);
void SetUserScale(float x, float y);
float DeviceToLogicalX(int x);
float DeviceToLogicalY(int y);
float DeviceToLogicalXRel(int x);
float DeviceToLogicalYRel(int y);
int LogicalToDeviceX(float x);
int LogicalToDeviceY(float y);
int LogicalToDeviceXRel(float x);
int LogicalToDeviceYRel(float y);
float FLogicalToDeviceX(float x);
float FLogicalToDeviceY(float y);
float FLogicalToDeviceXRel(float x);
float FLogicalToDeviceYRel(float y);
Bool Blit(float xdest, float ydest, float width, float height,
wxBitmap *source, float xsrc, float ysrc, int rop = wxSOLID, wxColour *c = NULL);
Bool Blit(float xdest, float ydest, float width, float height,
wxMemoryDC *source, float xsrc, float ysrc, int rop = wxSOLID, wxColour *c = NULL);
inline Bool CanGetTextExtent(void) { return USE_AFM_FOR_POSTSCRIPT; }
inline Bool CanDrawBitmap(void) { return TRUE; }
void GetSize(float *width, float *height);
void GetSizeMM(float *width, float *height);
inline void SetColourMap(wxColourMap *WXUNUSED(cmap)) {}
void SetBackgroundMode(int mode);
void SetTextBackground(wxColour *col);
void SetTextForeground(wxColour *col);
void TryColour(wxColour *src, wxColour *dest);
virtual Bool Ok() { return ok; }
};
#ifndef wx_xt
// Print Orientation (Should also add Left, Right)
enum {
PS_PORTRAIT,
PS_LANDSCAPE
};// ps_orientation = PS_PORTRAIT;
// Print Actions
enum {
PS_PRINTER,
PS_FILE,
PS_PREVIEW
};// ps_action = PS_PREVIEW;
#endif
extern void wxInitializePrintSetupData(Bool init = TRUE);
class wxPrintSetupData : public wxObject {
public:
wxPrintSetupData(void);
~wxPrintSetupData(void);
void copy (wxPrintSetupData* data);
void SetPrinterCommand(char *cmd);
void SetPaperName(char *paper);
void SetPrintPreviewCommand(char *cmd);
void SetPrinterOptions(char *flags);
void SetPrinterFile(char *f);
void SetAFMPath(char *f);
void SetPrinterMode(int mode);
void SetPrinterOrientation(int orient)
{ printer_orient = orient; }
void SetPrinterScaling(float x, float y)
{ printer_scale_x = x; printer_scale_y = y; }
void SetPrinterTranslation(float x, float y)
{ printer_translate_x = x; printer_translate_y = y; }
void SetColour(Bool col)
{ print_colour = col; }
void SetLevel2(Bool l2)
{ print_level_2 = l2; }
void SetEditorMargin(long x, long y)
{ emargin_h = x; emargin_v = y; }
void SetMargin(float x, float y)
{ ps_margin_h = x; ps_margin_v = y; }
inline char *GetPrinterCommand(void)
{ return printer_command; }
inline char *GetPrintPreviewCommand(void)
{ return preview_command; }
inline char *GetPrinterOptions(void)
{ return printer_flags; }
inline char *GetPrinterFile(void)
{ return printer_file; }
inline char *GetPaperName(void)
{ return paper_name; }
inline int GetPrinterOrientation(void)
{ return printer_orient; }
inline void GetPrinterScaling(float *x, float *y)
{ *x=printer_scale_x; *y=printer_scale_y; }
inline void GetPrinterTranslation(float *x, float *y)
{ *x=printer_translate_x; *y=printer_translate_y; }
inline int GetPrinterMode(void)
{ return printer_mode; }
inline char *GetAFMPath(void)
{ return afm_path; }
inline Bool GetColour(void)
{ return print_colour; }
inline Bool GetLevel2()
{ return print_level_2; }
void GetEditorMargin(long *x, long *y)
{ *x = emargin_h; *y = emargin_v; }
void GetMargin(float *x, float *y)
{ *x = ps_margin_h; *y = ps_margin_v; }
private:
friend class wxPostScriptDC;
char *printer_command;
char *preview_command;
char *printer_flags;
char *printer_file;
int printer_orient;
float printer_scale_x;
float printer_scale_y;
float printer_translate_x;
float printer_translate_y;
int printer_mode;
char *afm_path;
char *paper_name;
Bool print_colour;
Bool print_level_2;
long emargin_h, emargin_v;
float ps_margin_h, ps_margin_v;
};
extern wxPrintSetupData *wxGetThePrintSetupData();
extern void wxSetThePrintSetupData(wxPrintSetupData *);
class wxPrintPaperType : public wxObject {
public:
wxPrintPaperType(char *name=NULL, int wmm=0, int hmm=0, int wp=0, int hp=0);
~wxPrintPaperType(void);
public:
int widthMM;
int heightMM;
int widthPixels;
int heightPixels;
char *pageName;
};
class wxPrintPaperDatabase : public wxList {
public:
wxPrintPaperDatabase(void);
~wxPrintPaperDatabase(void);
void CreateDatabase(void);
void ClearDatabase(void);
void AddPaperType(char *name, int wmm, int hmm, int wp, int hp);
wxPrintPaperType *FindPaperType(char *name);
};
extern wxPrintPaperDatabase *wxThePrintPaperDatabase;
#endif // IN_CPROTO
#endif // USE_POSTSCRIPT
#endif // wx_dcpsh

View File

@ -1,845 +0,0 @@
/********************************************************/
/* Regions */
/********************************************************/
wxRegion::wxRegion(wxDC *_dc, wxRegion *r)
{
dc = _dc;
is_ps = wxSubType(dc->__type, wxTYPE_DC_POSTSCRIPT);
#ifdef wx_msw
rgn = NULL;
#endif
#ifdef wx_x
rgn = NULL;
#endif
#ifdef wx_mac
rgn = NULL;
#endif
if (r) Union(r);
}
wxRegion::~wxRegion()
{
Cleanup();
}
void wxRegion::Cleanup()
{
#ifdef wx_msw
if (rgn) {
DeleteObject(rgn);
rgn = NULL;
}
#endif
#ifdef wx_x
if (rgn) {
XDestroyRegion(rgn);
rgn = NULL;
}
#endif
#ifdef wx_mac
if (rgn) {
DisposeRgn(rgn);
rgn = NULL;
}
#endif
}
void wxRegion::SetRectangle(float x, float y, float width, float height)
{
float xw, yh;
int ix, iy, iw, ih;
Cleanup();
xw = x + width;
yh = y + height;
x = dc->FLogicalToDeviceX(x);
y = dc->FLogicalToDeviceY(y);
width = dc->FLogicalToDeviceX(xw) - x;
height = dc->FLogicalToDeviceY(yh) - y;
if (is_ps) {
wxPSRgn *ra;
height = -height;
ra = new wxPSRgn_Atomic("", "rect");
ps = ra;
Put(x); Put(" "); Put(y); Put(" moveto\n");
Put(x + width); Put(" "); Put(y); Put(" lineto\n");
Put(x + width); Put(" "); Put(y - height); Put(" lineto\n");
Put(x); Put(" "); Put(y - height); Put(" lineto\n");
Put("closepath\n");
/* So bitmap-based region is right */
y = -y;
}
ix = (int)floor(x);
iy = (int)floor(y);
iw = ((int)floor(x + width)) - ix;
ih = ((int)floor(y + height)) - iy;
#ifdef wx_msw
rgn = CreateRectRgn(ix, iy, ix + iw, iy + ih);
#endif
#ifdef wx_x
{
XRectangle r;
rgn = XCreateRegion();
r.x = ix;
r.y = iy;
r.width = iw;
r.height = ih;
XUnionRectWithRegion(&r, rgn, rgn);
}
#endif
#ifdef wx_mac
rgn = NewRgn();
SetRectRgn(rgn, ix, iy, ix + iw, iy + ih);
#endif
}
void wxRegion::SetRoundedRectangle(float x, float y, float width, float height, float radius)
{
wxRegion *lt, *rt, *lb, *rb, *w, *h, *r;
int ix, iy, iw, ih;
float xw, yh;
Cleanup();
// A negative radius value is interpreted to mean
// 'the proportion of the smallest X or Y dimension'
if (radius < 0.0) {
float smallest = 0.0;
if (width < height)
smallest = width;
else
smallest = height;
radius = (float)(- radius * smallest);
} else
radius = dc->FLogicalToDeviceXRel(radius);
#ifndef wx_x
if (is_ps) {
#endif
lt = new wxRegion(dc);
rt = new wxRegion(dc);
lb = new wxRegion(dc);
rb = new wxRegion(dc);
w = new wxRegion(dc);
h = new wxRegion(dc);
lt->SetEllipse(x, y, 2 * radius, 2 * radius);
rt->SetEllipse(x + width - 2 * radius, y, 2 * radius, 2 * radius);
rb->SetEllipse(x + width - 2 * radius, y + height - 2 * radius, 2 * radius, 2 * radius);
lb->SetEllipse(x, y + height - 2 * radius, 2 * radius, 2 * radius);
w->SetRectangle(x, y + radius, width, height - 2 * radius);
h->SetRectangle(x + radius, y, width - 2 * radius, height);
r = lt;
r->Union(rt);
r->Union(lb);
r->Union(rb);
r->Union(w);
r->Union(h);
ps = r->ps;
#ifdef wx_x
/* A little hack: steal rgn from r: */
rgn = r->rgn;
r->rgn = NULL;
#else
}
#endif
xw = x + width;
yh = y + height;
x = dc->FLogicalToDeviceX(x);
y = dc->FLogicalToDeviceY(y);
width = dc->FLogicalToDeviceX(xw) - x;
height = dc->FLogicalToDeviceY(yh) - y;
#if defined(wx_msw) || defined(wx_mac)
int xradius = dc->FLogicalToDeviceXRel(radius);
int yradius = dc->FLogicalToDeviceYRel(radius);
#endif
ix = (int)floor(x);
iy = (int)floor(y);
iw = ((int)floor(x + width)) - ix;
ih = ((int)floor(y + height)) - iy;
if (is_ps) {
height = -height;
/* So bitmap-based region is right */
y = -y;
}
#ifdef wx_msw
rgn = CreateRoundRectRgn(ix, iy, ix + iw, iy + ih, xradius, yradius);
#endif
#ifdef wx_mac
rgn = NewRgn();
OpenRgn();
Rect r2;
SetRect(&r2, ix, iy, ix + iw, iy + ih);
FrameRoundRect(&r2, xradius, yradius);
CloseRgn(rgn);
#endif
}
void wxRegion::SetEllipse(float x, float y, float width, float height)
{
float xw, yh;
Cleanup();
xw = x + width;
yh = y + height;
x = dc->FLogicalToDeviceX(x);
y = dc->FLogicalToDeviceY(y);
width = dc->FLogicalToDeviceX(xw) - x;
height = dc->FLogicalToDeviceY(yh) - y;
if (is_ps) {
wxPSRgn *ra;
height = -height;
ra = new wxPSRgn_Atomic("", "ellipse");
ps = ra;
Put(x + width / 2); Put(" "); Put(y - height / 2); Put(" moveto\n");
Put(x + width / 2); Put(" "); Put(y - height / 2); Put(" ");
Put(width / 2); Put(" "); Put(height / 2); Put(" 0 360 ellipse\n");
Put("closepath\n");
/* So bitmap-based region is right */
y = -y;
}
#if defined(wx_msw) || defined(wx_mac)
int ix, iy, iw, ih;
ix = (int)floor(x);
iy = (int)floor(y);
iw = ((int)floor(x + width)) - ix;
ih = ((int)floor(y + height)) - iy;
#endif
#ifdef wx_msw
rgn = CreateEllipticRgn(ix, iy, ix + iw, iy + ih);
#endif
#ifdef wx_mac
rgn = NewRgn();
OpenRgn();
Rect r;
SetRect(&r, ix, iy, ix + iw, iy + ih);
FrameOval(&r);
CloseRgn(rgn);
#endif
#ifdef wx_x
{
int iwidth = (int)width + 2;
int is_odd = iwidth & 0x1;
int x_extent = (int)((iwidth + 1) / 2) + is_odd, i;
float w2 = (x_extent - 1) * (x_extent - 1), dx, dy;
XPoint *p;
#ifdef MZ_PRECISE_GC
p = (XPoint *)GC_malloc_atomic(sizeof(XPoint) * ((4 * x_extent) - (2 * is_odd)));
#else
p = new XPoint[(4 * x_extent) - (2 * is_odd)];
#endif
dx = x + width / 2;
dy = y + height / 2;
for (i = 0; i < x_extent; i++) {
float y = (height / width) * sqrt(w2 - (i * i));
p[i].x = (int)floor(i + dx);
p[i].y = (int)floor(y + dy);
p[2 * x_extent - i - 1].x = (int)floor(i + dx);
p[2 * x_extent - i - 1].y = (int)floor(-y + dy);
p[2 * x_extent + i - is_odd].x = (int)floor(-i + dx);
p[2 * x_extent + i - is_odd].y = (int)floor(-y + dy);
if (i || !is_odd) {
p[4 * x_extent - i - 1 - 2 * is_odd].x = (int)floor(-i + dx);
p[4 * x_extent - i - 1 - 2 * is_odd].y = (int)floor(y + dy);
}
}
rgn = XPolygonRegion(p, 4 * x_extent, WindingRule);
}
#endif
}
#ifdef wx_x
# define POINT XPoint
#endif
#ifdef wx_mac
# define POINT MyPoint
typedef struct { int x, y; } MyPoint;
#endif
typedef struct { float x, y; } FPoint;
void wxRegion::SetPolygon(int n, wxPoint points[], float xoffset, float yoffset, int fillStyle)
{
POINT *cpoints;
FPoint *fpoints;
int i, v;
float vf;
Cleanup();
if (n < 2)
return;
cpoints = new POINT[n];
fpoints = (is_ps ? new FPoint[n] : (FPoint *)NULL);
for (i = 0; i < n; i++) {
v = dc->LogicalToDeviceX(points[i].x + xoffset);
cpoints[i].x = v;
v = dc->LogicalToDeviceY(points[i].y + yoffset);
cpoints[i].y = v;
if (fpoints) {
vf = dc->FLogicalToDeviceX(points[i].x + xoffset);
fpoints[i].x = vf;
vf = dc->FLogicalToDeviceY(points[i].y + yoffset);
fpoints[i].y = vf;
}
}
if (is_ps) {
wxPSRgn *ra;
ra = new wxPSRgn_Atomic("", "poly");
ps = ra;
Put(fpoints[0].x); Put(" "); Put(fpoints[0].y); Put(" moveto\n");
for (i = 1; i < n; i++) {
Put(fpoints[i].x); Put(" "); Put(fpoints[i].y); Put(" lineto\n");
}
Put("closepath\n");
/* So bitmap-based region is right */
for (i = 0; i < n; i++) {
cpoints[i].y = -cpoints[i].y;
}
}
#ifdef wx_msw
rgn = CreatePolygonRgn(cpoints, n, (fillStyle == wxODDEVEN_RULE) ? ALTERNATE : WINDING);
#endif
#ifdef wx_x
rgn = XPolygonRegion(cpoints, n, (fillStyle == wxODDEVEN_RULE) ? EvenOddRule : WindingRule);
#endif
#ifdef wx_mac
rgn = NewRgn();
OpenRgn();
MoveTo(cpoints[0].x, cpoints[0].y);
for (i = 0; i < n; i++)
LineTo(cpoints[i].x, cpoints[i].y);
LineTo(cpoints[0].x, cpoints[0].y);
CloseRgn(rgn);
#endif
}
void wxRegion::SetArc(float x, float y, float w, float h, float start, float end)
{
wxRegion *r;
static double pi;
int saw_start = 0, saw_end = 0, closed = 0;
float cx, cy;
wxPoint *a;
int n;
#ifdef MZ_PRECISE_GC
a = (wxPoint *)GC_malloc_atomic(sizeof(wxPoint) * 20);
#else
a = new wxPoint[20];
#endif
SetEllipse(x, y, w, h);
if (start == end) return;
r = new wxRegion(dc);
if (!pi)
pi = 2 * asin((double)1.0);
start = fmod(start, 2*pi);
end = fmod(end, 2*pi);
if (start < 0)
start += 2*pi;
if (end < 0)
end += 2*pi;
cx = x + w/2;
cy = y + h/2;
a[0].x = (w / 2) * cos(end) + cx;
a[0].y = (h / 2) * (-sin(end)) + cy;
a[1].x = cx;
a[1].y = cy;
a[2].x = (w / 2) * cos(start) + cx;
a[2].y = (h / 2) * (-sin(start)) + cy;
n = 3;
if (!saw_start && (start < (pi / 2)))
saw_start = 1;
if (!saw_end && (end > start) && (end < (pi / 2)))
saw_end = 1;
if (saw_start && !closed) {
a[n].x = x + w;
a[n++].y = y;
}
if (saw_start && !saw_end) {
a[n].x = cx;
a[n++].y = y;
} else
closed = saw_start;
if (!saw_start && (start < pi))
saw_start = 1;
if (!saw_end && (end > start) && (end < pi))
saw_end = 1;
if (saw_start && !closed) {
a[n].x = x;
a[n++].y = y;
}
if (saw_start && !saw_end) {
a[n].x = x;
a[n++].y = cy;
} else
closed = saw_start;
if (!saw_start && (start < (1.5 * pi)))
saw_start = 1;
if (!saw_end && (end > start) && (end < (1.5 * pi)))
saw_end = 1;
if (saw_start && !closed) {
a[n].x = x;
a[n++].y = y + h;
}
if (saw_start && !saw_end) {
a[n].x = cx;
a[n++].y = y + h;
} else
closed = saw_start;
saw_start = 1;
saw_end = (end > start);
if (saw_start && !closed) {
a[n].x = x + w;
a[n++].y = y + h;
}
if (saw_start && !saw_end) {
a[n].x = x + w;
a[n++].y = cy;
} else
closed = saw_start;
if (!saw_end && (end < (pi / 2)))
saw_end = 1;
if (saw_start && !closed) {
a[n].x = x + w;
a[n++].y = y;
}
if (saw_start && !saw_end) {
a[n].x = cx;
a[n++].y = y;
} else
closed = saw_start;
if (!saw_end && (end < pi))
saw_end = 1;
if (saw_start && !closed) {
a[n].x = x;
a[n++].y = y;
}
if (saw_start && !saw_end) {
a[n].x = x;
a[n++].y = cy;
} else
closed = saw_start;
if (!saw_end && (end < (1.5 * pi)))
saw_end = 1;
if (saw_start && !closed) {
a[n].x = x;
a[n++].y = y + h;
}
if (saw_start && !saw_end) {
a[n].x = cx;
a[n++].y = y + h;
} else
closed = saw_start;
if (!closed) {
a[n].x = x + w;
a[n++].y = y + h;
}
r->SetPolygon(n, a);
Intersect(r);
}
void wxRegion::Union(wxRegion *r)
{
if (r->dc != dc) return;
if (r->Empty()) return;
if (is_ps) {
if (!ps)
ps = r->ps;
else {
wxPSRgn *ru;
ru = new wxPSRgn_Union(ps, r->ps);
ps = ru;
}
}
#ifdef wx_msw
if (!rgn) {
rgn = CreateRectRgn(0, 0, 1, 1);
CombineRgn(rgn, r->rgn, rgn, RGN_COPY);
} else
CombineRgn(rgn, r->rgn, rgn, RGN_OR);
#endif
#ifdef wx_x
if (!rgn) {
rgn = XCreateRegion();
}
XUnionRegion(rgn, r->rgn, rgn);
#endif
#ifdef wx_mac
if (!rgn)
rgn = NewRgn();
UnionRgn(rgn, r->rgn, rgn);
#endif
}
void wxRegion::Intersect(wxRegion *r)
{
if (r->dc != dc) return;
if (r->Empty()) {
Cleanup();
ps = NULL;
return;
}
#ifdef wx_msw
if (!rgn) return;
CombineRgn(rgn, r->rgn, rgn, RGN_AND);
#endif
#ifdef wx_x
if (!rgn) return;
XIntersectRegion(rgn, r->rgn, rgn);
#endif
#ifdef wx_mac
if (!rgn) return;
SectRgn(rgn, r->rgn, rgn);
#endif
if (Empty()) {
Cleanup();
ps = NULL;
} else if (is_ps) {
wxPSRgn *ri;
ri = new wxPSRgn_Intersect(ps, r->ps);
ps = ri;
}
}
void wxRegion::Subtract(wxRegion *r)
{
if (r->dc != dc) return;
if (r->Empty()) return;
#ifdef wx_msw
if (!rgn) return;
CombineRgn(rgn, rgn, r->rgn, RGN_DIFF);
#endif
#ifdef wx_x
if (!rgn) return;
XSubtractRegion(rgn, r->rgn, rgn);
#endif
#ifdef wx_mac
if (!rgn) return;
DiffRgn(rgn, r->rgn, rgn);
#endif
if (Empty()) {
Cleanup();
ps = NULL;
} else if (is_ps) {
/* wxPSRgn_Diff is only half a subtract; the result must be intersected with the first part */
wxPSRgn *rd, *ri;
rd = new wxPSRgn_Diff(ps, r->ps);
ri = new wxPSRgn_Intersect(ps, rd);
ps = ri;
}
}
void wxRegion::BoundingBox(float *x, float *y, float *w, float *h)
{
if (Empty()) {
*x = *y = *w = *h = 0;
return;
} else {
float v;
#ifdef wx_msw
RECT r;
GetRgnBox(rgn, &r);
*x = r.left;
*y = r.top;
*w = r.right - r.left;
*h = r.bottom - r.top;
#endif
#ifdef wx_x
XRectangle r;
XClipBox(rgn, &r);
*x = r.x;
*y = r.y;
*w = r.width;
*h = r.height;
#endif
#ifdef wx_mac
*x = (*rgn)->rgnBBox.left;
*y = (*rgn)->rgnBBox.top;
*w = (*rgn)->rgnBBox.right - *x;
*h = (*rgn)->rgnBBox.bottom - *y;
#endif
if (is_ps) {
/* Bitmap-based region is stored upside-down */
*y = -(*y);
}
v = dc->DeviceToLogicalX((int)*x);
*x = v;
v = dc->DeviceToLogicalY((int)*y);
*y = v;
v = dc->DeviceToLogicalXRel((int)*w);
*w = v;
v = dc->DeviceToLogicalYRel((int)*h);
*h = v;
}
}
Bool wxRegion::Empty()
{
#ifdef wx_msw
RECT r;
if (!rgn) return TRUE;
return (GetRgnBox(rgn, &r) == NULLREGION);
#endif
#ifdef wx_x
if (!rgn) return TRUE;
return XEmptyRegion(rgn);
#endif
#ifdef wx_mac
if (!rgn) return TRUE;
return EmptyRgn(rgn);
#endif
}
void wxRegion::Put(const char *s)
{
long l, psl;
char *naya;
l = strlen(s);
psl = strlen(((wxPSRgn_Atomic *)ps)->s);
naya = new WXGC_ATOMIC char[l + psl + 1];
memcpy(naya, ((wxPSRgn_Atomic *)ps)->s, psl);
memcpy(naya + psl, s, l);
naya[psl + l] = 0;
((wxPSRgn_Atomic *)ps)->s = naya;
}
void wxRegion::Put(double d)
{
char s[100];
sprintf(s, "%f", d);
Put(s);
}
/***************************************************************************************/
char *wxPSRgn_Union::GetString()
{
return MakeString("", "", "");
}
char *wxPSRgn_Composite::MakeString(const char *prefix, const char *infix, const char *suffix)
{
char *sa, *sb;
int plen, ilen, slen;
int alen, blen;
char *sr;
sa = a->GetString();
sb = b->GetString();
plen = strlen(prefix);
ilen = strlen(infix);
slen = strlen(suffix);
alen = strlen(sa);
blen = strlen(sb);
sr = new WXGC_ATOMIC char[alen + blen + plen + ilen + slen + 1];
memcpy(sr, prefix, plen);
memcpy(sr + plen, sa, alen);
memcpy(sr + plen + alen, infix, ilen);
memcpy(sr + plen + alen + ilen, sb, blen);
memcpy(sr + plen + alen + ilen + blen, suffix, slen);
sr[plen + alen + ilen + blen + slen] = 0;
return sr;
}
int wxPSRgn_Composite::FlattenIntersects(wxPSRgn **l, wxPSRgn *r, int i)
{
if (r->is_intersect)
return FlattenIntersects(l, ((wxPSRgn_Composite *)r)->b,
FlattenIntersects(l, ((wxPSRgn_Composite *)r)->a, i));
if (l)
l[i] = r;
return i + 1;
}
wxPSRgn *wxPSRgn_Union::Lift()
{
wxPSRgn *la, *lb;
wxPSRgn *r = NULL, **al, **bl;
int na, nb, i, j;
la = a->Lift();
lb = b->Lift();
if (!la->is_intersect
&& !lb->is_intersect
&& (a == la) && (b == lb))
return this;
/* (A n B) U (C n D) = (A U C) n (A U D) n (B U C) n (B U D) */
/* count: */
na = FlattenIntersects(NULL, la, 0);
nb = FlattenIntersects(NULL, lb, 0);
al = new wxPSRgn*[na];
bl = new wxPSRgn*[nb];
/* flatten: */
FlattenIntersects(al, la, 0);
FlattenIntersects(bl, lb, 0);
for (i = 0; i < na; i++) {
for (j = 0; j < nb; j++) {
wxPSRgn *c;
c = new wxPSRgn_Union(al[i], bl[j]);
if (r)
r = new wxPSRgn_Intersect(r, c);
else
r = c;
}
}
return r;
}
char *wxPSRgn_Intersect::GetString()
{
return MakeString("", "clip\nnewpath\n", "");
}
wxPSRgn *wxPSRgn_Intersect::Lift()
{
wxPSRgn *la, *lb;
la = a->Lift();
lb = b->Lift();
if ((la == a) && (lb == b))
return this;
else
return new wxPSRgn_Intersect(la, lb);
}
char *wxPSRgn_Diff::GetString()
{
return MakeString("", "reversepath\n", "reversepath\n");
}
wxPSRgn *wxPSRgn_Diff::Lift()
{
wxPSRgn *la, *lb;
wxPSRgn *r = NULL, **al, **bl;
int na, nb, i;
la = a->Lift();
lb = b->Lift();
if (!la->is_intersect
&& !lb->is_intersect
&& (a == la) && (b == lb))
return this;
if (lb->is_intersect) {
/* A \ (B n C) = (A \ B) u (A \ C) */
nb = FlattenIntersects(NULL, lb, 0);
bl = new wxPSRgn*[nb];
FlattenIntersects(bl, lb, 0);
for (i = 0; i < nb; i++) {
wxPSRgn *s;
s = new wxPSRgn_Diff(la, bl[i]);
if (r) {
r = new wxPSRgn_Union(r, s);
} else
r = s;
}
return r->Lift(); /* Handles intersections in la */
} else {
/* (A n B) - C = (A - C) n (B - C) [note: C has no intersections] */
na = FlattenIntersects(NULL, la, 0);
al = new wxPSRgn*[na];
FlattenIntersects(al, la, 0);
for (i = 0; i < na; i++) {
wxPSRgn *s;
s = new wxPSRgn_Diff(al[i], lb);
if (r) {
r = new wxPSRgn_Intersect(r, s);
} else
r = s;
}
return r;
}
}

View File

@ -1,124 +0,0 @@
#ifndef wb_rgnh
#define wb_rgnh
#include "wx_dc.h"
class wxPSRgn;
#ifdef UseXtRegions
typedef Region XtRegion;
#else
typedef void *XtRegion;
#endif
class wxRegion : public wxObject
{
public:
#ifdef wx_msw
HRGN rgn;
#endif
#ifdef wx_x
XtRegion rgn;
#endif
#ifdef wx_mac
RgnHandle rgn;
#endif
wxDC *dc;
wxPSRgn *ps;
int is_ps;
wxRegion(wxDC *dc, wxRegion *r = NULL);
~wxRegion();
inline wxDC *GetDC() { return dc; }
void SetRectangle(float x, float y, float width, float height);
void SetRoundedRectangle(float x, float y, float width, float height, float radius = 20.0);
void SetEllipse(float x, float y, float width, float height);
void SetPolygon(int n, wxPoint points[], float xoffset = 0, float yoffset = 0,
int fillStyle=wxODDEVEN_RULE);
void SetArc(float x, float y, float w, float h, float start, float end);
void Union(wxRegion *);
void Intersect(wxRegion *);
void Subtract(wxRegion *);
void BoundingBox(float *x, float *y, float *w, float *h);
Bool Empty();
void Cleanup();
/* PS Stuff */
void Put(const char *s);
void Put(double d);
};
class wxPSRgn : public wxObject
{
public:
int is_intersect;
wxPSRgn() { is_intersect = 0; }
virtual char *GetString() = 0;
virtual wxPSRgn *Lift() = 0;
#ifdef RGN_DEBUGGING_PRINTS
virtual void DebugPrint() = 0;
#endif
};
class wxPSRgn_Atomic : public wxPSRgn
{
public:
char *s, *debug_name;
wxPSRgn_Atomic(char *ps, char *dn) { s = ps; debug_name = dn; }
char *GetString() { return s; }
wxPSRgn *Lift() { return this; }
#ifdef RGN_DEBUGGING_PRINTS
void DebugPrint() { printf("%s%lx", debug_name, (long)this); }
#endif
};
class wxPSRgn_Composite : public wxPSRgn
{
public:
wxPSRgn *a, *b;
char *MakeString(const char *prefix, const char *infix, const char *suffix);
int FlattenIntersects(wxPSRgn **l, wxPSRgn *r, int i);
};
class wxPSRgn_Union : public wxPSRgn_Composite
{
public:
wxPSRgn_Union(wxPSRgn *ra, wxPSRgn *rb) { a = ra; b = rb; }
char *GetString();
wxPSRgn *Lift();
#ifdef RGN_DEBUGGING_PRINTS
void DebugPrint() { printf("("); a->DebugPrint(); printf(" U "); b->DebugPrint(); printf(")"); }
#endif
};
class wxPSRgn_Intersect : public wxPSRgn_Composite
{
public:
wxPSRgn_Intersect(wxPSRgn *ra, wxPSRgn *rb) { a = ra; b = rb; is_intersect = 1; }
char *GetString();
wxPSRgn *Lift();
#ifdef RGN_DEBUGGING_PRINTS
void DebugPrint() { printf("("); a->DebugPrint(); printf(" n "); b->DebugPrint(); printf(")"); }
#endif
};
class wxPSRgn_Diff : public wxPSRgn_Composite
{
public:
wxPSRgn_Diff(wxPSRgn *ra, wxPSRgn *rb) { a = ra; b = rb; }
char *GetString();
wxPSRgn *Lift();
#ifdef RGN_DEBUGGING_PRINTS
void DebugPrint() { printf("("); a->DebugPrint(); printf(" \\ "); b->DebugPrint(); printf(")"); }
#endif
};
#endif

View File

@ -1,343 +0,0 @@
/*
* File: wb_hash.cc
* Purpose: Hash table implementation
* Author: Julian Smart
* Created: 1993
* Updated: August 1994
* Copyright: (c) 1993, AIAI, University of Edinburgh
*/
#if defined(_MSC_VER)
# include "wx.h"
#else
# ifdef wx_xt
# define Uses_wxHashTable
# include "wx.h"
# else
# include "common.h"
# include "wx_list.h"
# include "wx_hash.h"
# include "wx_types.h"
# endif
#endif
#include <string.h>
#include <stdarg.h>
wxHashTable::wxHashTable (int, int size)
{
int i;
wxList **ll;
__type = wxTYPE_HASH_TABLE;
n = size;
current_position = -1;
current_node = NULL;
ll = new wxList *[size];
hash_table = ll;
for (i = 0; i < size; i++) {
hash_table[i] = NULL;
}
}
wxHashTable::~wxHashTable (void)
{
int i;
for (i = 0; i < n; i++) {
if (hash_table[i]) {
wxList *l;
l = hash_table[i];
DELETE_OBJ l;
}
}
}
wxList *wxHashTable::GetList(int position, KeyType ktype, Bool makeit)
{
wxList *l;
l = hash_table[position];
if (!l) {
if (makeit) {
l = new wxList(ktype, FALSE);
hash_table[position] = l;
}
}
return l;
}
void wxHashTable::Put(long key, wxObject * object)
{
wxList *l;
l = GetList(MakeKey(key));
l->Append(key, object);
}
void wxHashTable::Put(const char *key, wxObject * object)
{
wxList *l;
l = GetList(MakeKey(key), wxKEY_STRING);
l->Append(key, object);
}
wxObject *wxHashTable::Get(long key)
{
wxList *l;
l = GetList(MakeKey(key), wxKEY_INTEGER, FALSE);
if (l) {
wxNode *node;
node = l->Find(key);
if (node)
return node->Data();
}
return NULL;
}
wxObject *wxHashTable::Get(const char *key)
{
wxList *l;
l = GetList(MakeKey(key), wxKEY_STRING, FALSE);
if (l) {
wxNode *node;
node = l->Find (key);
if (node)
return node->Data();
}
return NULL;
}
wxObject *wxHashTable::Delete(long key)
{
wxList *l;
l = GetList(MakeKey(key), wxKEY_INTEGER, FALSE);
if (l) {
wxNode *node;
node = l->Find(key);
if (node) {
wxObject *data;
data = node->Data();
l->DeleteNode(node);
return data;
}
}
return NULL;
}
wxObject *wxHashTable::Delete(const char *key)
{
wxList *l;
l = GetList(MakeKey(key), wxKEY_STRING, FALSE);
if (l) {
wxNode *node;
node = l->Find(key);
if (node) {
wxObject *data;
data = node->Data();
l->DeleteNode(node);
return data;
}
}
return NULL;
}
int wxHashTable::MakeKey(const char *string)
{
long int_key = 0;
while (*string) {
int_key += (unsigned char) *string++;
}
if (int_key < 0)
int_key = -int_key;
return int_key % n;
}
int wxHashTable::MakeKey(long int_key)
{
if (int_key < 0)
int_key = -int_key;
return int_key % n;
}
void wxHashTable::BeginFind (void)
{
current_position = -1;
current_node = NULL;
}
wxNode *wxHashTable::Next (void)
{
wxNode *found = NULL;
Bool end = FALSE;
while (!end && !found) {
if (!current_node) {
current_position++;
if (current_position >= n) {
current_position = -1;
current_node = NULL;
end = TRUE;
} else {
wxList *l;
l = hash_table[current_position];
if (l) {
current_node = l->First();
found = current_node;
}
}
} else {
current_node = current_node->Next ();
found = current_node;
}
}
return found;
}
void wxHashTable::DeleteContents (Bool flag)
{
int i;
for (i = 0; i < n; i++) {
if (hash_table[i]) {
wxList *l;
l = hash_table[i];
l->DeleteContents(flag);
}
}
}
void wxHashTable::Clear (void)
{
int i;
for (i = 0; i < n; i++) {
if (hash_table[i]) {
wxList *l;
l = hash_table[i];
l->Clear();
}
}
}
/* This is a hash table implementation which does not lock the objects
from garbage collection. */
/* FIXME: doesn't work for precise GC */
typedef struct Bucket {
long widget;
wxObject *object;
} Bucket;
/* because widgets are likely to be word-aligned */
#define HASH(w) ((((unsigned long)w) >> 2) % numbuckets)
#define FILL_FACTOR 2 /* inverted max fraction of hash table implying reash */
wxNonlockingHashTable::wxNonlockingHashTable()
{
long i;
numbuckets = 1001;
buckets = (Bucket *)GC_malloc_atomic(sizeof(Bucket) * numbuckets);
for (i = 0; i < numbuckets; i++) {
buckets[i].widget = 0;
}
numwidgets = 0;
}
wxNonlockingHashTable::~wxNonlockingHashTable()
{
}
void wxNonlockingHashTable::Put(long widget, wxObject *object)
{
long i;
if (FILL_FACTOR * numwidgets >= numbuckets) {
/* Rehash */
Bucket *oldbuckets = buckets;
long oldnumbuckets = numbuckets;
numbuckets = (numbuckets * FILL_FACTOR) + 1;
buckets = (Bucket *)GC_malloc_atomic(sizeof(Bucket) * numbuckets);
numwidgets = 0;
for (i = 0; i < oldnumbuckets; i++) {
if (oldbuckets[i].widget && oldbuckets[i].object)
Put(oldbuckets[i].widget, oldbuckets[i].object);
}
}
i = HASH(widget);
/* MATTHEW: [10] Added equality check (shouldn't happen, though). */
while (buckets[i].widget && buckets[i].object
&& (buckets[i].widget != widget)) {
i = (i + 1) % numbuckets;
}
buckets[i].widget = widget;
buckets[i].object = object;
numwidgets++; /* Fix counter */
}
wxObject *wxNonlockingHashTable::Get(long widget)
{
long i;
i = HASH(widget);
while ((buckets[i].widget != widget) && buckets[i].widget) {
i = (i + 1) % numbuckets;
}
if (buckets[i].widget == widget)
return buckets[i].object;
return NULL;
}
void wxNonlockingHashTable::Delete(long widget)
{
long i;
i = HASH(widget);
while ((buckets[i].widget != widget) && buckets[i].widget) {
i = (i + 1) % numbuckets;
}
if (buckets[i].widget == widget)
{
buckets[i].object = NULL;
--numwidgets; /* Fix counter */
}
}
/* new method (not very fast) */
void wxNonlockingHashTable::DeleteObject(wxObject *o)
{
long i;
for (i = 0; i < numbuckets; i++) {
if (buckets[i].widget && buckets[i].object == o)
Delete(buckets[i].widget);
}
}