@echo off
if not "%1" == "/*" goto aa
if "%2" == "..1.12" goto us1
cls
goto us0
:usage
echo -
:us0
echo - For use with FWKCS(TM) Contents_Signature System, Version 1.12.
echo - (C)Copyright Frederick W. Kantor 1991. All rights reserved.
echo -
:us1
echo - TESTAV.BAT
echo -
echo -   To test AV_stamp of zipfile.
echo -
echo - Usage:
echo -
echo -       TESTAV AV.zip "<enter>"
echo -
echo - for explanation, see FWKCS112.REF, option /a7.3t,
echo -   and special Column 17 flags.
goto sp
:aa
if "%1" == "" goto nd
if not exist %1 goto nf
if exist #$%^&!-@.tmp attrib -r #$%^&!-@.tmp > nul
copy %1 #$%^&!-@.tmp > nul
pkzip #$%^&!-@.tmp -z < nul > nul
fwkcs /a7.3t #$%^&!-@.tmp
if errorlevel 30 goto end
if errorlevel 23 goto obd
if errorlevel 18 goto okav
if errorlevel 17 goto avnm
if errorlevel 16 goto nonav
if errorlevel 15 goto bav
if errorlevel 7 goto fzt
if errorlevel 5 goto nz
goto end
:nd
echo -
echo -  Nothing to do!
goto usage
:nf
echo -
echo -  Did not find  %1 .
goto usage
:nz
echo -
echo -  File  %1  is not a zipfile.
goto sp
:fzt
echo -
echo -  File  %1  failed ziptest.
goto sp
:bav
echo -
echo -  Zipfile  %1  has a Banned Authenticity Verification stamp.
goto sp
:nonav
echo -
echo -  Zipfile  %1  does not have an Authenticity Verification stamp.
goto sp
:avnm
echo -
echo -  Zipfile  %1  has an Authenticity Verification stamp, for
echo -               which a match was not found here.
goto sp
:okav
echo -
echo -  Zipfile  %1  has an Authenticity Verification stamp,
echo -               which is recognized as not banned here.
goto sp
:obd
echo -
echo -  Zipfile  %1  has an obsolete or deficient
echo -  Authenticity Verification stamp.
:sp
echo -
:end
if "%1" == "/*" goto z1
if exist #$%^&!-@.tmp del #$%^&!-@.tmp > nul
:z1
if not "%2" == "..1.12" goto zz
if exist QUERYFLA.GUP attrib -r QUERYFLA.GUP > nul
if exist QUERYFLA.GUP del QUERYFLA.GUP > nul
:zz
