With the security updates for the OpenSSL project that come out, I started to face an issue as a developer who uses them in projects that I develop. I get an update, and I need to make sure that the new DLLs are put into the “distribution” directories for the projects, so that next time they are built the new DLL will be included “automatically”. But my projects are all over the place, and manually finding and remembering which ones to update is time consuming. Sure, I can use a search tool, but that leave the “go to the location and paste the files”.
So I wrote a tool to scan my disks and tell me which version is in situ. And then, if I want, to update them. The optional part is important because not all applications should be updated – there may be incompatibilities. An update is now much easier. You can put the new files, “ssleay32.dll” and “libeay32.dll” in the same directory as the updater if you want. It will create a “fileoptions.xml” file in the same directory too (so don’t put the updater in Program Files or other similar reduced access rights directory). The folders to scan can be separated with a semi-colon, so “C:\;D:\” will scan the C and D drives. Note that there must be a trailing ‘\’. Then scan (it is a background thread for speed). Click to select any you wish to update, and it will do so.
EnTabFile is a tool to convert the spaces at the start of each line in a file to tabs. This allows them to work better in editors that support proper tabs. It is primarily designed to be used as a command line tool, but supports manual operation too.
How EnTab works
This tool is quite simple – it just removes spaces at the start of each line of an ANSI text file and replaces them with tab characters. It does not replace any spaces anywhere else in the line – it stops once it find anything that isn’t a space.
The number of spaces used for each tab is settable in the user interfaace, but the tool is really designed to be used from the command line as part of a bigger process – perhaps source code reformatting using something like DelForExp. Set DelForExp to output 4 spaces for each tab, and then use EnTabFile to convert every 4 spaces into a tab.
Note that if an incomplete set of spaces is found, a tab will still be output. Thus if there are 6 spaces and the tab setting is 4, then 2 tabs will be output. No spaces are ever left at the start of a line.
For safety, it will save an original copy with the extension “.pretab” that you can use to compare. If it already exists, no copy is made so that the entab can be done multiple times and the original is still there.
Run the application, and type in the name of the file you wish to entab. You can click the ‘…’ button to use a browser.
Select the number of spaces per tab.
Click “Entab” and it will be loaded, converted, and saved. A progress bar shows the activity.
Command line use:
Run the application with the filepath for the file you want converted. The full path should be specified for proper operation of the backup.
Only a single file can be specified on the command line.
You can specify the tab size using the command line switch /1, /2 /3 /4 /5 /6 /7 or /8.
With a command line, the app will convert the file (if it exists!) and then close immediately.
For use within Delphi, you can add it to the Tools menu. The following are suggestions:
Title: EnTab this file
Program: [PATH TO FILE]\EnTabFile.exe
Working Directory: [PATH TO FILE]
Parameters: $SAVE $EDNAME
Note that if run after DelForExp, you will have to save before it can convert. After Entabbing, Delphi will say the file has changed and do you want to reload. The answer should always be yes or the tabs will not be loaded!
A zip file with these basic instructions and the self-contained application are available via the link: EnTab for Windows. No installer is needed – just put the file in a suitable location, unzip it, and start using it.