anchor.diff:  if "!ARG!"=="-r" call :Debug.Setlog test.log & %EXEC% cmd /c %SCRIPT% -? ">"exec.log & goto :eof
   if "!ARG!"=="-R" call :Debug.Setlog test.log & %EXEC% cmd /c %SCRIPT% -? & goto :eof
   if "!ARG!"=="-tc" goto :TestConvertEntities &:# Test routine :ConvertEntities
  +if "!ARG!"=="-tca" call :test_CArg %ARGS% & exit /b
   if "!ARG!"=="-te" goto :TestEscapeCmdString &:# Test routine :EscapeCmdString
   if "!ARG!"=="-tg" %POPARG% & call :GetServerAddress !ARG! & %ECHOVARS% ADDRESS & goto :eof &:# Test routine GetServerAddress
   if "!ARG!"=="-v" call :Verbose.On & goto next_arg
  
positive.code: %RETURN%
  
  :#----------------------------------------------------------------------------#
  :#                                                                            #
  :#  Function        trim						      #
  :#                                                                            #
  
negative.code: 
  :# FOREACHLINE macro. (Change the delimiter to none to catch the whole lines.)
  set FOREACHLINE=for /f "delims="
  
  :#----------------------------------------------------------------------------#
  :#                                                                            #
  :#  Function        PopCArg                                                   #
  :#                                                                            #
  :#  Description     Get the first argument in %ARGS%, using C-style rules     #
  :#                                                                            #
  :#  Arguments       %1            Optional output variable name. Default: ARG #
  :#                  %ARGS%        Command line arguments                      #
  :#                                                                            #
  :#  Returns 	    %1 or ARG     The first argument, unquoted                #
  :#                  '%1' or 'ARG' The first argument, with its quotes, if any #
  :#                                                                            #
  :#  Notes 	    Despite its name, this routine does not work like MSVC's  #
  :#                  command-line parser, for which rules are:                 #
  :#                  Every " quote flips string mode                           #
  :#                  2N backslashes + " ==> N backslashes and begin/end quote  #
  :#                  2N+1 backslashes + " ==> N backslashes + literal "	      #
  :#                  N backslashes ==> N backslashes                           #
  :#                                                                            #
  :#                  Here, rules are:                                          #
  :#                  Quotes flip string mode; Backslashes are output literally.#
  :#                  Exception: \" generates a " , and this does not flip mode.#
  :#                                                                            #
  :#  History                                                                   #
  :#   2019-12-03 JFL Created this routine.                                     #
  :#                                                                            #
  :#----------------------------------------------------------------------------#
  
  :PopCArg [VARNAME]	:# Pop an arguments using the C escaping convention
  %ECHO.D% call %0 %*
  %+INDENT%
  %ECHOVARS.D% ARGS
  setlocal EnableDelayedExpansion
  set "VAR=%~1"
  if not defined VAR set "VAR=ARG"
  set "ARG="
  set "'ARG'="
  if not defined ARGS goto :PopCArg.Exit
  set "I=0"
  :# Skip initial spaces and tabs
  %ECHO.D% # 1 Skip initial spaces and tabs
  goto :PopCArg.Begin1
  :PopCArg.Loop1
  %ECHOVARS.D% ARG 'ARG'
  set /a "I+=1"
  :PopCArg.Begin1
  set "C=!ARGS:~%I%,1!"
  %ECHOVARS.D% I C
  if not defined C goto :PopCArg.Done
  if "%C%%C%"=="  " goto :PopCArg.Loop1
  if "%C%%C%"=="		" goto :PopCArg.Loop1
  :# Collect argument contents
  %ECHO.D% # 2 Collect argument contents
  set "STRING_MODE=0"
  goto :PopCArg.Begin2
  :PopCArg.Loop2
  %ECHOVARS.D% ARG 'ARG'
  set /a "I+=1"
  :PopCArg.Begin2
  set "C=!ARGS:~%I%,1!"
  %ECHOVARS.D% I C
  if not defined C goto :PopCArg.Done
  if %STRING_MODE%==0 (
    if "%C%%C%"=="  " goto :PopCArg.Step3
    if "%C%%C%"=="		" goto :PopCArg.Step3
  )
  if "%C%%C%"=="\\" (
    set /a "I1=I+1"
    for %%i in (!I1!) do set "C1=!ARGS:~%%i,1!"
    %ECHOVARS.D% I1 C1
    if "!C1!!C1!"=="""" set "ARG=!ARG!!C1!" & set "'ARG'=!'ARG'!!C!!C1!" & set /a "I+=1" & goto :PopCArg.Loop2
  )
  if "%C%%C%"=="""" (
    set /a "STRING_MODE=1-STRING_MODE"
  ) else (
    set "ARG=!ARG!!C!"
  )
  set "'ARG'=!'ARG'!!C!"
  goto :PopCArg.Loop2
  :# Skip final spaces and tabs
  :PopCArg.Step3
  %ECHO.D% # 3 Skip final spaces and tabs
  goto :PopCArg.Begin3
  :PopCArg.Loop3
  %ECHOVARS.D% ARG 'ARG'
  set /a "I+=1"
  :PopCArg.Begin3
  set "C=!ARGS:~%I%,1!"
  %ECHOVARS.D% I C
  if not defined C goto :PopCArg.Done
  if "%C%%C%"=="  " goto :PopCArg.Loop3
  if "%C%%C%"=="		" goto :PopCArg.Loop3
  :PopCArg.Done
  %ECHO.D% # 4 Done
  set ^"ARGS=!ARGS:~%I%!^"
  %ECHOVARS.D% ARG 'ARG' ARGS VAR
  if defined ARG   set "ARG=!ARG:%%=%%%%!"
  if defined 'ARG' set ^"'ARG'=!'ARG':%%=%%%%!^"
  if defined ARGS  set ^"ARGS=!ARGS:%%=%%%%!^"
  :PopCArg.Exit
  set ^"FOR=for /f "delims="^"
  %FOR% %%a in ("=!ARGS!") do %FOR% %%b in ("=!ARG!") do %FOR% %%c in ("=!'ARG'!") do for %%v in ("!VAR!") do (
    %ECHO.D% # This should loop once
    endlocal & set ^"ARGS%%a^" & set "%%~v%%b" & set ^"'%%~v'%%c^"
    %ECHOVARS.D% %%~v '%%~v' ARGS
  )
  %ECHO.D% return from :PopCArg
  %-INDENT%
  exit /b
  
  :#----------------------------------------------------------------------------#
  :#                                                                            #
  