Commit c5578399 authored by Erick's avatar Erick

Added the stklos-debug-level parameter

parent 7f8dded2
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@unice.fr]
;;;; Creation date: 01-Jan-2000 15:04 (eg)
;;;; Last file update: 9-Aug-2010 11:28 (eg)
;;;; Last file update: 16-Oct-2010 15:56 (eg)
;;;;
(include "runtime.stk") ; Definition necessary for the bootstrap
......@@ -205,10 +205,11 @@
;; Look at the debug flag
(when (> debug 0)
(stklos-debug-level debug)
(compiler:warn-use-undefined #t) ; Signal usage of still undefined symbols
(compiler:gen-line-number #t) ; Generate line numbers
(when (> debug 1) ; Load-verbose when debug >= 2
(load-verbose 1)))
(load-verbose debug)))
;; Eventually try to create the configuratioon directory
(let ((dir (%stklos-conf-dir)))
......
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@unice.fr]
;;;; Creation date: 17-May-2000 14:55 (eg)
;;;; Last file update: 30-Jun-2010 18:03 (eg)
;;;; Last file update: 16-Oct-2010 16:07 (eg)
;;;;
......@@ -142,7 +142,7 @@ doc>
* (load-verbose value)
*
* |load-verbose| is a parameter object. It permits to display the
* path name of the files whch are loaded by |load| or |try-load| on
* path name of the files which are loaded by |load| or |try-load| on
* the current error port, when set to a true value. If |load-verbose|
* is set to |f|, no message is printed.
doc>
......@@ -174,7 +174,8 @@ doc>
(define (%guess-pathname fn paths suffixes)
(define (try f)
; (eprintf "Try ~S\n" f)
(when (>= (stklos-debug-level) 2)
(eprintf "%guess-pathname: trying ~S\n" f))
(and (file-exists? f)
(file-is-readable? f)
(not (file-is-directory? f))
......
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@unice.fr]
;;;; Creation date: 15-Mar-2001 22:49 (eg)
;;;; Last file update: 4-Aug-2010 10:52 (eg)
;;;; Last file update: 16-Oct-2010 15:56 (eg)
;;;;
......@@ -63,6 +63,19 @@
(loop (cdr args)
(string-append res (format "~a" (car args)))))))
;; ----------------------------------------------------------------------
;; parameters
;; ----------------------------------------------------------------------
#|<doc EXT stklos-debug-level
* (stklos-debug-level)
*
* |stklos-debug-level| is a parameter objet. It permits to know the current
* debug level. The default value of this parameter is 0 (meaning "no debug").
doc>
|#
(define stklos-debug-level
(make-parameter 0))
;; ----------------------------------------------------------------------
;; *%system-state-plist* ...
;; ----------------------------------------------------------------------
......@@ -81,6 +94,7 @@
(compiler-known-globals (cons symbol lst)))))
;;; ----------------------------------------------------------------------
;;;
;;; E x p a n d e r s
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment