From 059831534c7e884f0a607ed86b582fd00d821731 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Sat, 26 Sep 2026 23:24:03 +0200 Subject: New upstream version 3.2.0~rc1+dfsg --- map65/libm65/debug_log.f90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'map65/libm65/debug_log.f90') 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) -- cgit v1.2.3