@echo off :: filename: tde.btm :: author: Eric Pement :: date: 2015-03-22 20:04:26 (GMT-0400) :: My copy of TDE is configured to delete trailing spaces by default, :: but if the file extension is "dat", then do NOT trim trailing spaces! :: :: set the directory where "tde.exe" is located: set TDEDIR="c:\enp\bin2" iff not exist "%TDEDIR\tde.exe" then beep 550 8 type <<- END_OF_TEXT --------------------------------------------------------- ERROR! This script requires that the variable TDEDIR be set to the directory which contains tde.exe, but tde.exe is not found. The current value of TDEDIR is: %TDEDIR% Quitting here ... --------------------------------------------------------- END_OF_TEXT quit 1 endiff iff %_columns gt 160 then beep 550 8 type <<- END_OF_TEXT -------------------------------------------------------- ERROR! The current setting of %_columns columns is too wide for TDE, and it will cause a seg fault if we continue. Maximum column setting should be 160 columns---no more. Quitting here ... --------------------------------------------------------- END_OF_TEXT quit 1 :: Note that the 160-column limit is the default distribution :: of TDE. Because TDE comes with source code, you can change :: the value of MAX_COLS in the file "tdestr.h", recompile, :: and have a new version. I reset mine to MAX_COLS = 350, :: recompiled with lcc-win32 and it works fine. This info block :: is for people who will use the default distro of TDE. :: :: Get lcc-win32 from http://www.cs.virginia.edu/~lcc-win32/ endiff iff "%@lower[%@ext[%1]]" eq "dat" then :: on .dat files, do NOT trim trailing spaces, do NOT expand TABs "%TDEDIR\tde.exe" -i "%TDEDIR\tde_dat.cfg" -t0 %* elseiff "%@lower[%@ext[%1]]" eq "txv" then :: on .txv files, do NOT trim trailing spaces, but DO expand TABs "%TDEDIR\tde.exe" -i "%TDEDIR\tde_txv.cfg" %* else :: on all other files, TRIM trailing spaces and expand TAB chars "%TDEDIR\tde.exe" %* endiff