@echo off & setlocal enableextensions & echo.

:: Add filenames for Web distribution. Called by webgens.bat.
:: If a file does not exist, an error message is displayed
:: and ERRORLEVEL is set to 1.
:: If a file exists, its name is appended to addfil_.tmp.

set addfil_=0

if "%1%" equ "" goto e-par
if "%1%" equ "intkey" goto intkey
if "%1%" equ "data" goto data
if "%1%" equ "general" goto general
goto e-par

:: Files to be included in the Intkey zipfile.
:intkey

call addfil_ ichars
call addfil_ iitems
call addfil_ *.bmp
call addfilo_ *.ind
call addfil_ intkey*.ink
call addfil_ *.inp

goto finish

:: Files to be include in the 'data' zipfile.
:data

call addfil_ %lan%\*.
call addfil_ %lan%\*.bmp
call addfil_ %lan%\*.css
call addfil_ %lan%\*.gif
call addfil_ %lan%\*.htm*
call addfil_ %lan%\*.ink
call addfil_ %lan%\*.inp
call addfil_ %lan%\%inf%\*.*
call addfil_ %lan%\%www%\*.*

goto finish

:: Files to be placed (unzipped) on the Web site.
:general

call addfil_ style.css
call addfil_ *.gif
call addfil_ *.htm*
call addfil_ webstart.ink
call addfil_ %zpi%

goto finish

:e-par
echo    Parameter error in call to 'webadds.bat'.
endlocal
exit /b 1

:finish
if %addfil_% neq 0 exit /b 1
exit /b 0
