anchor.diff:  REM  See the License for the specific language governing permissions and
   REM  limitations under the License.
   
  -if "%HOME%"=="" goto homeDrivePathPre
  -if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
  -
  -:homeDrivePathPre
  -if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePre
  -if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePre
  -if exist "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat"
  -
  -:userProfilePre
  -if "%USERPROFILE%"=="" goto alpha
  -if "%USERPROFILE%"=="%HOME%" goto alpha
  -if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto alpha
  -if exist "%USERPROFILE%\antrc_pre.bat" call "%USERPROFILE%\antrc_pre.bat"
  -
  -:alpha
  -
   if "%OS%"=="Windows_NT" @setlocal
   if "%OS%"=="WINNT" @setlocal
   
  -if "%DITA_HOME%"=="" goto setDefaultAntHome
  +if "%DITA_HOME%"=="" goto setDefaultDitaHome
   
  -:stripAntHome
  -if not _%DITA_HOME:~-1%==_\ goto checkClasspath
  -set DITA_HOME=%DITA_HOME:~0,-1%
  -goto stripAntHome
  -
  -:setDefaultAntHome
  +:setDefaultDitaHome
   rem %~dp0 is expanded pathname of the current script under NT
  -set DITA_HOME=%~dp0..
  -
  -:checkClasspath
  -set _USE_CLASSPATH=yes
  -rem CLASSPATH must not be used if it is equal to ""
  -if "%CLASSPATH%"=="""" set _USE_CLASSPATH=no
  -if "%CLASSPATH%"=="" set _USE_CLASSPATH=no
  +set DITA_HOME="%~dp0.."
   
   rem Slurp the command line arguments. This loop allows for an unlimited number
   rem of arguments (up to the command line limit, anyway).
   set DITA_CMD_LINE_ARGS=
   :setupArgs
   if ""%1""=="""" goto doneStart
  -if ""%1""==""-noclasspath"" goto clearclasspath
   set DITA_CMD_LINE_ARGS=%DITA_CMD_LINE_ARGS% %1
  -shift
  -goto setupArgs
  -
  -rem here is there is a -noclasspath in the options
  -:clearclasspath
  -set _USE_CLASSPATH=no
   shift
   goto setupArgs
   
  
positive.code: if "%OS%"=="Windows_NT" @endlocal
  if "%OS%"=="WINNT" @endlocal
  
  if "%HOME%"=="" goto homeDrivePathPost
  if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
  
  :homeDrivePathPost
  if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePost
  if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePost
  if exist "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat"
  
  :userProfilePost
  if "%USERPROFILE%"=="" goto omega
  if "%USERPROFILE%"=="%HOME%" goto omega
  if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto omega
  if exist "%USERPROFILE%\antrc_post.bat" call "%USERPROFILE%\antrc_post.bat"
  
  :omega
  
  exit /b %ANT_ERROR%
  
negative.code: if "%_JAVACMD%" == "" set _JAVACMD=java.exe
  
  :runAnt
  "%_JAVACMD%" %ANT_OPTS% -classpath "%DITA_HOME%\lib\ant-launcher.jar" "-Dant.home=%DITA_HOME%"  "-Ddita.dir=%DITA_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %DITA_CMD_LINE_ARGS% -buildfile "%DITA_HOME%\build.xml" -main "org.dita.dost.invoker.Main"
  rem Check the error code of the Ant build
  if not "%OS%"=="Windows_NT" goto onError
  set ANT_ERROR=%ERRORLEVEL%
  