diff options
author | Ludovic Court`es | 2006-10-11 07:43:47 +0000 |
---|---|---|
committer | Ludovic Court`es | 2006-10-11 07:43:47 +0000 |
commit | d4360259d60722eaa175a483f792fce7b8c66d97 (patch) | |
tree | 622cc21b820e3dd4616890bc9ccba74de6637d8a /skribe/src/bigloo/debug.scm | |
parent | fc42fe56a57eace2dbdb31574c2e161f0eacf839 (diff) | |
download | skribilo-d4360259d60722eaa175a483f792fce7b8c66d97.tar.gz skribilo-d4360259d60722eaa175a483f792fce7b8c66d97.tar.lz skribilo-d4360259d60722eaa175a483f792fce7b8c66d97.zip |
slide: Propagate the `outline?' parameter in `slide-(sub)?topic'.
* src/guile/skribilo/package/slide.scm (slide-topic): Propagate the
`outline?' parameter as an option.
(slide-subtopic): Likewise.
git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-1
Diffstat (limited to 'skribe/src/bigloo/debug.scm')
-rw-r--r-- | skribe/src/bigloo/debug.scm | 188 |
1 files changed, 0 insertions, 188 deletions
diff --git a/skribe/src/bigloo/debug.scm b/skribe/src/bigloo/debug.scm deleted file mode 100644 index 8f1691c..0000000 --- a/skribe/src/bigloo/debug.scm +++ /dev/null @@ -1,188 +0,0 @@ -;*=====================================================================*/ -;* serrano/prgm/project/skribe/src/bigloo/debug.scm */ -;* ------------------------------------------------------------- */ -;* Author : Manuel Serrano */ -;* Creation : Wed Jun 11 10:01:47 2003 */ -;* Last change : Thu Oct 28 21:33:00 2004 (eg) */ -;* Copyright : 2003 Manuel Serrano */ -;* ------------------------------------------------------------- */ -;* Simple debug facilities */ -;*=====================================================================*/ - -;*---------------------------------------------------------------------*/ -;* The module */ -;*---------------------------------------------------------------------*/ -(module skribe_debug - - (export *skribe-debug* - *skribe-debug-symbols* - *skribe-debug-color* - - (skribe-debug::int) - (debug-port::output-port . ::obj) - (debug-margin::bstring) - (debug-color::bstring ::int . ::obj) - (debug-bold::bstring . ::obj) - (debug-string ::obj) - (debug-item . ::obj) - - (%with-debug ::obj ::obj ::procedure))) - -;*---------------------------------------------------------------------*/ -;* *skribe-debug* ... */ -;*---------------------------------------------------------------------*/ -(define *skribe-debug* 0) - -;*---------------------------------------------------------------------*/ -;* *skribe-debug-symbols* ... */ -;*---------------------------------------------------------------------*/ -(define *skribe-debug-symbols* '()) - -;*---------------------------------------------------------------------*/ -;* *skribe-debug-color* ... */ -;*---------------------------------------------------------------------*/ -(define *skribe-debug-color* #t) - -;*---------------------------------------------------------------------*/ -;* *skribe-debug-item* ... */ -;*---------------------------------------------------------------------*/ -(define *skribe-debug-item* #f) - -;*---------------------------------------------------------------------*/ -;* *debug-port* ... */ -;*---------------------------------------------------------------------*/ -(define *debug-port* (current-error-port)) - -;*---------------------------------------------------------------------*/ -;* *debug-depth* ... */ -;*---------------------------------------------------------------------*/ -(define *debug-depth* 0) - -;*---------------------------------------------------------------------*/ -;* *debug-margin* ... */ -;*---------------------------------------------------------------------*/ -(define *debug-margin* "") - -;*---------------------------------------------------------------------*/ -;* *skribe-margin-debug-level* ... */ -;*---------------------------------------------------------------------*/ -(define *skribe-margin-debug-level* 0) - -;*---------------------------------------------------------------------*/ -;* skribe-debug ... */ -;*---------------------------------------------------------------------*/ -(define (skribe-debug) - *skribe-debug*) - -;*---------------------------------------------------------------------*/ -;* debug-port ... */ -;*---------------------------------------------------------------------*/ -(define (debug-port . o) - (cond - ((null? o) - *debug-port*) - ((output-port? (car o)) - (set! *debug-port* o) - o) - (else - (error 'debug-port "Illegal debug port" (car o))))) - -;*---------------------------------------------------------------------*/ -;* debug-margin ... */ -;*---------------------------------------------------------------------*/ -(define (debug-margin) - *debug-margin*) - -;*---------------------------------------------------------------------*/ -;* debug-color ... */ -;*---------------------------------------------------------------------*/ -(define (debug-color col::int . o) - (with-output-to-string - (if *skribe-debug-color* - (lambda () - (display* "[0m[1;" (+ 31 col) "m") - (apply display* o) - (display "[0m")) - (lambda () - (apply display* o))))) - -;*---------------------------------------------------------------------*/ -;* debug-bold ... */ -;*---------------------------------------------------------------------*/ -(define (debug-bold . o) - (apply debug-color -30 o)) - -;*---------------------------------------------------------------------*/ -;* debug-item ... */ -;*---------------------------------------------------------------------*/ -(define (debug-item . args) - (if (or (>= *skribe-debug* *skribe-margin-debug-level*) - *skribe-debug-item*) - (begin - (display (debug-margin) *debug-port*) - (display (debug-color (-fx *debug-depth* 1) "- ")) - (for-each (lambda (a) (display a *debug-port*)) args) - (newline *debug-port*)))) - -;*---------------------------------------------------------------------*/ -;* %with-debug-margin ... */ -;*---------------------------------------------------------------------*/ -(define (%with-debug-margin margin thunk) - (let ((om *debug-margin*)) - (set! *debug-depth* (+fx *debug-depth* 1)) - (set! *debug-margin* (string-append om margin)) - (let ((res (thunk))) - (set! *debug-depth* (-fx *debug-depth* 1)) - (set! *debug-margin* om) - res))) - -;*---------------------------------------------------------------------*/ -;* %with-debug ... */ -;*---------------------------------------------------------------------*/ -(define (%with-debug lvl lbl thunk) - (let ((ol *skribe-margin-debug-level*) - (oi *skribe-debug-item*)) - (set! *skribe-margin-debug-level* lvl) - (let ((r (if (or (and (number? lvl) (>= *skribe-debug* lvl)) - (and (symbol? lbl) - (memq lbl *skribe-debug-symbols*) - (set! *skribe-debug-item* #t))) - (with-output-to-port *debug-port* - (lambda () - (display (debug-margin)) - (display (if (= *debug-depth* 0) - (debug-color *debug-depth* "+ " lbl) - (debug-color *debug-depth* "--+ " lbl))) - (newline) - (%with-debug-margin (debug-color *debug-depth* " |") - thunk))) - (thunk)))) - (set! *skribe-debug-item* oi) - (set! *skribe-margin-debug-level* ol) - r))) - -;*---------------------------------------------------------------------*/ -;* debug-string ... */ -;*---------------------------------------------------------------------*/ -(define (debug-string o) - (with-output-to-string - (lambda () - (write o)))) - -;*---------------------------------------------------------------------*/ -;* example */ -;*---------------------------------------------------------------------*/ -;; (%with-debug 0 'foo1.1 -;; (lambda () -;; (debug-item 'foo2.1) -;; (debug-item 'foo2.2) -;; (%with-debug 0 'foo2.3 -;; (lambda () -;; (debug-item 'foo3.1) -;; (%with-debug 0 'foo3.2 -;; (lambda () -;; (debug-item 'foo4.1) -;; (debug-item 'foo4.2))) -;; (debug-item 'foo3.3))) -;; (debug-item 'foo2.4))) - |