Contents of the TABEDIT.DOC file
Here's a quick summary of the function of entab and detab:
Detab takes files and turns their tabs into spaces. When a
tab is encountered, an appropriate number of spaces are
inserted to advance to the next tab stop. By default, tabs
are set every 8th column. The -tN option changes the tabs
to every Nth column.
Entab takes files and turns spaces into tabs where it would
reduce the number of characters. Remember that entab doesn't
know about things like quoted strings, so it may change spaces
to tabs inside a string; watch out for this. Like detab, the
default tabstops are every 8th column, and can be changed with
the -tN option.
Both entab and detab can have their default tabstops changed
from every 8th column by using an environment variable. For
example, the command
changes the default tabstops to every 4th column.
For more details on the operation of entab and detab, see the
header in the C source files. In particular, note the use of
the getenv() call to obtain a value set by DOS's SET command.
It's a mighty handy way to set up values needed by utilities.
Lattice C has the getenv() call, which is a standard Unix C
library call. Hopefully your compiler will have it too.
If not, you might try writing your own interface in assembler.