anchor.diff:    for /f %%d in ("!SRCDIR[%%p]!") do if exist %%d\ag.exe ( :# Ex: %%d=WIN32 or %%d=WIN64
       %ECHOVARS.D% bindir_%%p FOUND_%%d
       if defined bindir_%%p if /i "!bindir_%%p!" neq "!FOUND_%%d!" (
  -      for %%a in ("!bindir_%%p!\ag.exe") do if exist %%a (
  -      	%COMMENT% Found %%~a
  -	call :UpgradeAg %%a
  -      ) else (
  -      	%COMMENT% No ag.exe found in [bindir_%%p] = !bindir_%%p!
  -	call :InstallAg %%d bindir_%%p
  +      for %%a in ("!bindir_%%p!\ag.exe") do (
  +      	if exist %%a (
  +	  %COMMENT% Found %%~a
  +	  call :UpgradeAg %%a
  +	) else (
  +	  %COMMENT% No ag.exe found in [bindir_%%p] = !bindir_%%p!
  +	  call :InstallAg %%d bindir_%%p
  +	  %ECHOVARS.D% FOUND_%%d
  +	)
  +	call :FileSet.append INSTALLED_FILES %%a
         )
       ) else (
         %LOG% Variable bindir_%%p is defined, but we already updated it as part of the PATH
  
positive.code: set ^"ARGS=%*^"			&:# Argument line
  setlocal EnableExtensions EnableDelayedExpansion &:# Use the ! expansion now on
  
  goto :Main
  
  :#----------------------------------------------------------------------------#
  :# Simple debug framework
  
  :# Do nothing
  :nop
  exit /b
  
  :# Trace the return from a subroutine, and do the actual return
  :Return
  setlocal
  set "ERR=%~1"
  if not defined ERR set "ERR=%ERRORLEVEL%"
  echo   exit /b %ERR%
  2>NUL (goto) & exit /b %ERR% &:# Pop one call stack, then return to the upper level
  
  :# Display and log the definition of a multiple variables
  :EchoVars.d
  for %%v in (%*) do echo set %%v=!%%v!
  :LogVars
  for %%v in (%*) do %LOG% set %%v=!%%v!
  exit /b
  
  :# Display and log a message
  :Echo
  echo %*
  %LOG% %*
  exit /b
  
  :# Display and log a batch comment
  :Comment
  %ECHO% :# %*
  exit /b
  
  :# Display a message, with a timestamp, into the log file
  :Log
  setlocal DisableDelayedExpansion
  call :Now
  set "NOW=%YEAR%-%MONTH%-%DAY% %HOUR%:%MINUTE%:%SECOND%.%MS%"
  >>"%LOGFILE%" echo %NOW% %*
  endlocal
  exit /b
  
  :# Display and log a batch command, and run it.
  :Exec
  %ECHO% %*
  %*
  exit /b
  
  :#----------------------------------------------------------------------------#
  
negative.code: 
  :# Upgrade an existing instance of ag.exe
  :UpgradeAg %1=target_path
  %ENTER%
  :# Do not use setlocal, as we want to update many global variables
  call :GetAgVersion %1
  set "VERSIONS=%AG_VER%"
  for %%p in (MSVCLIBX PCRE PTHREADS ZLIB) do if defined %%p_VER set "VERSIONS=!VERSIONS!, %%p !%%p_VER!"
  