diff options
| author | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:03 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:03 +0200 |
| commit | 059831534c7e884f0a607ed86b582fd00d821731 (patch) | |
| tree | 76bcb67a78f8aa2654fd34c2ad801a62136b0170 /map65/libm65/debug_log.f90 | |
| parent | d83a420f0517d7fc47aeb288a6a0cf4891784fcc (diff) | |
New upstream version 3.2.0~rc1+dfsgupstream/3.2.0_rc1+dfsg
Diffstat (limited to 'map65/libm65/debug_log.f90')
| -rw-r--r-- | map65/libm65/debug_log.f90 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/map65/libm65/debug_log.f90 b/map65/libm65/debug_log.f90 index 6b6a39e7..d91b969b 100644 --- a/map65/libm65/debug_log.f90 +++ b/map65/libm65/debug_log.f90 @@ -2,6 +2,7 @@ module debug_log implicit none integer, save :: dbg_unit = -1 logical, save :: dbg_opened = .false. + logical, save :: dbg_enabled = .false. ! master switch; set .true./.false. from run_m65 to enable/disable all dbg() output contains subroutine ensure_log_open() if (.not. dbg_opened) then @@ -10,9 +11,10 @@ contains dbg_opened = .true. end if end subroutine ensure_log_open - + subroutine dbg(msg) character(len=*), intent(in) :: msg + if (.not. dbg_enabled) return call ensure_log_open() write(dbg_unit,'(A)') trim(msg) flush(dbg_unit) |
