@echo off
echo.
echo Start DFSee using explicit window size
rem 23-11-2005 JvW Added usage and made CMD/BAT indentical

if "%OS2_SHELL%"=="" goto notos2
set dfsexe=dfsos2.exe
set cmdext=CMD
goto dfsee
:notos2
if "%OS%"==""        goto notnt
if "%OS%"=="DOS"     goto notnt
if "%OS%"=="MSDOS"   goto notnt
if "%OS%"=="DRDOS"   goto notnt
if "%OS%"=="IBMDOS"  goto notnt
if "%OS%"=="OPENDOS" goto notnt
if "%OS%"=="FREEDOS" goto notnt
set dfsexe=dfswin.exe
set cmdext=BAT
goto dfsee
:notnt
set dfsexe=dfsdos.exe
set cmdext=BAT
:dfsee

if "%1" == "?"  goto usage
if "%1" == "/?" goto usage
if "%1" == "-?" goto usage

if "%2"==""  goto standard
if "%2"=="." goto standard
mode %1,%2
goto work

:usage
echo.
echo Usage:  %0  #columns #rows [other %dfsexe% parameters]
echo.
echo   Check other DFSee parameters using: %dfsexe% -?
echo.
goto end

:standard
mode 84,30
:work
%dfsexe% %3 %4 %5 %6 %7 %8 %9

:end
