From abb0837ce1a76a73d65d8318513af6a16098c538 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Thu, 18 Jun 2026 20:33:29 -0400 Subject: [PATCH] Upgrade some debug printing to debug statements. --- startup_hooks/tcshrc | 12 +++--------- tcshrc | 6 ++---- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/startup_hooks/tcshrc b/startup_hooks/tcshrc index 01b649c..0de7de5 100644 --- a/startup_hooks/tcshrc +++ b/startup_hooks/tcshrc @@ -23,9 +23,7 @@ setenv LC_TIME en_US.UTF-8 set CSHENV_TCSHRC_SOURCED -if( $?CSHENV_DEBUG ) then - echo "Starting tcshrc..." -endif +_debug "Starting tcshrc..." #if( -z ${_} ) then #echo $0 @@ -38,9 +36,7 @@ endif #echo tcshrc hook lives at: ${CSHENV_TCSHRC_PATH} if( -c `tty` ) then - if( $?CSHENV_DEBUG ) then - echo "Going to source core tcshrc..." - endif + _debug "Going to source core tcshrc..." # Capture the original path, so that we don't # keep infinitely expanding it. @@ -55,9 +51,7 @@ endif # Not using tcshrc bits for non-login shells. Will decide what to do later. -if( $?CSHENV_DEBUG ) then - echo "Ending tcshrc..." -endif +_debug "Ending tcshrc..." ########################### # vim: ft=tcsh diff --git a/tcshrc b/tcshrc index c5bc114..3de5a41 100644 --- a/tcshrc +++ b/tcshrc @@ -23,9 +23,7 @@ if( $?tcsh ) then echo "We are on a very ancient TCSH! There may be many problems..." else if( $tcsh_minor == 14 && $tcsh_patch < 2 ) then - if( $?CSHENV_DEBUG ) then - echo "We may not have ADAM's patches..." - endif + _debug "We may not have ADAM's patches..." endif endif @@ -54,7 +52,7 @@ if( $?CSHENV_HISTORY_SIZE ) then set history=${CSHENV_HISTORY_SIZE} endif -if( $?CSHENV_DEBUG ) echo "Setting up optional sourcing mechanism." +_debug "Setting up optional sourcing mechanism." # This safe_source alias is incredibly delicate. It drives the whole # optional sourcing mechanism -- DO NOT MESS WITH IT! alias safe_source 'eval "if ( -f \!:1 ) then \\