anchor.diff:  
   :# Quote file pathnames that require it. %1=Input variable. %2=Opt. output variable.
   :condquote
  -%FUNCTION% condquote %1 %2
  -setlocal enableextensions enabledelayedexpansion
  +%FUNCTION% enableextensions enabledelayedexpansion
   set RETVAR=%~2
   if "%RETVAR%"=="" set RETVAR=%~1
  -:# call set "P=%%%~1%%"
   set "P=!%~1!"
   :# If the value is empty, don't go any further.
   if not defined P set "P=""" & goto :condquote_ret
  
positive.code:     >&2 echo Error: Delayed environment variable expansion must be enabled.
      >&2 echo Please restart your cmd.exe shell with the /V option,
      >&2 echo or set HKLM\Software\Microsoft\Command Processor\DelayedExpansion=1
      endlocal & set "RETVAL=1" & %RETURN%
    )
  )
  endlocal & set "RETVAL=0" & %RETURN%
  
  :#----------------------------------------------------------------------------#
  
  :# List subkeys. %1=Parent key pathname.
  :keys
  :dirs
  %FUNCTION% keys %*
  setlocal enableextensions enabledelayedexpansion
  set "PATTERN=*"
  set "OPTS=/k"
  :get_keys_args
  
negative.code:     set "TYPE=%%j"
      set "VALUE=%%k"
    )
    %ECHOVARS.D% NAME TYPE VALUE
    call :CondQuote NAME
    call :CondQuote VALUE
    if %VERBOSE%==1 SET "ATTRS=%ATTRS%type=!TYPE! "
    %ECHO% !NAME!!ATTRS!!VALUE!
  )
  %UPVAR% RETVAL
  set "RETVAL=0"
  %RETURN% 0
  
  :#----------------------------------------------------------------------------#
  
  :# Delete a key value. %1=Parent key pathname.
  :del
  :rm
  %FUNCTION% enableextensions enabledelayedexpansion
  set "KEY=%~1"
  :# Split the registry path and name. Uses a fake drive @ to prevent prepending the current disk drive path to the registry path.
  for %%K in (@:"%KEY%") do (
    set "KEY=%%~dpK"
    set "NAME=%%~nxK"
  )
  :# Remove the head "@:\ and tail \ to the KEY, and tail " to the NAME
  set "KEY=%KEY:~4,-1%"
  set "NAME=%NAME:~0,-1%"
  %ECHOVARS.D% KEY NAME
  if "%NAME%"=="" (
    set CMD=reg delete "%KEY%" /ve
  ) else (
    set CMD=reg delete "%KEY%" /v "%NAME%"
  )
  %EXEC% %CMD%
  %RETURN%
  
  :#----------------------------------------------------------------------------#
  
  :# Delete a key and all its contents. %1=Parent key pathname.
  :rd
  :rmdir
  %FUNCTION%
  set "KEY=%~1"
  %ECHOVARS.D% KEY
  set CMD=reg delete "%KEY%"
  %EXEC% %CMD%
  %RETURN%
  
  :#----------------------------------------------------------------------------#
  :#                                                                            #
  