From: Matt Birkholz Date: Wed, 20 Jul 2011 22:13:44 +0000 (-0700) Subject: Reformat tracing; avoid hashing objects to be GC-cleaned. X-Git-Tag: mit-scheme-pucked-9.2.12~670 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d8733bc3555f8c892c51d6203cbc85038b56cb2d;p=mit-scheme.git Reformat tracing; avoid hashing objects to be GC-cleaned. --- diff --git a/src/gtk/fix-demo.scm b/src/gtk/fix-demo.scm index c4d86577d..25a9d4bf4 100644 --- a/src/gtk/fix-demo.scm +++ b/src/gtk/fix-demo.scm @@ -38,7 +38,7 @@ USA. (gtk-window-set-title window "fix-layout-demo") (gtk-window-set-default-size window 200 400) (set-gtk-window-delete-event-callback! - window (lambda (w) (%trace "; Closed "w".\n") 0)) + window (lambda (w) (%trace ";closed "w"\n") 0)) (gtk-container-set-border-width window 10) (gtk-container-add scroller1 layout1) (gtk-container-add vbox scroller1) @@ -57,16 +57,16 @@ USA. drawing (list (list cursor1 layout1) (list cursor2 layout2)))) (if blink? (let ((thread (start-blinking drawing))) - (%trace "; Cursor blinking courtesy of "thread".\n")) - (%trace "; Cursor blinking disabled.\n")) + (%trace ";cursor blinker: "thread"\n")) + (%trace ";cursor blinking disabled\n")) (if spin? (let ((thread (start-spinning drawing))) - (%trace "; Ring spinning courtesy of "thread".\n")) - (%trace "; Ring spinning disabled.\n")) + (%trace ";ring spinner: "thread"\n")) + (%trace ";ring spinning disabled\n")) (set-fix-layout-drawing! layout1 drawing 175 150) (set-fix-layout-drawing! layout2 drawing 175 150)) (gtk-widget-grab-focus layout1) - (%trace "; Created "layout1" and "layout2"\n")) + (%trace ";created "layout1" and "layout2"\n")) unspecific) (define-class ( (constructor () (width height))) @@ -131,14 +131,14 @@ USA. (view (fix-layout-view layout)) (x (+ window-x (fix-rect-x view))) (y (+ window-y (fix-rect-y view)))) - (%trace2 "; Pointer moved to ("x","y") in "layout".\n") + (%trace2 ";pointer moved to ("x","y") in "layout"\n") (for-each (lambda (ink) (if (not (text-ink? ink)) - (%trace "; Picked: "ink"\n") + (%trace2 ";picked: "ink"\n") (let ((index (text-ink-xy-to-index ink x y)) (text-extent (fix-ink-extent ink))) - (%trace "; Picked: "index" in "(simple-text-ink-text ink)"\n") + (%trace ";picked: "index" in "ink"\n") (with-text-ink-grapheme-rect ink index (lambda (xG yG widthG heightG) @@ -165,19 +165,18 @@ USA. (view (fix-layout-view layout)) (x (+ window-x (fix-rect-x view))) (y (+ window-y (fix-rect-y view)))) - (outf-console "; Pointer release at ("x","y").\n") + (%trace ";pointer released at ("x","y")\n") (for-each (lambda (ink) (if (not (text-ink? ink)) - (%trace "; Picked: "ink"\n") + (%trace ";picked: "ink"\n") (let ((index (text-ink-xy-to-index ink x y))) - (%trace "; Picked: "ink" (char "index")\n")))) + (%trace ";picked: "ink" (char "index")\n")))) (fix-drawing-pick-list drawing layout x y))) #t) (define (demo-key-press-handler layout keyval char-bits) - (%trace "; Key press on "layout"\n") - (outf-console "; Keyval: "keyval" "char-bits"\n") + (%trace ";demo-key-press-handler "layout" "keyval" "char-bits"\n") (if (and (char? keyval) (char=? keyval #\D)) (bkpt 'Test)) ;;NOT handled. @@ -192,7 +191,7 @@ USA. (create-thread #f (lambda () - (%trace ";spinning start\n") + (%trace ";spinning started\n") (let* ((frames 10) (x 270) (y 190) (height 30) (width 30) (pi (* (atan 1 1) 4)) @@ -225,7 +224,7 @@ USA. (create-thread #f (lambda () - (%trace ";blinking start\n") + (%trace ";blinking started\n") (let loop () ;; Off! (for-each (lambda (cursor.widgets)