[net.micro] Bad Tabifying

ABN.ISCAMS@USC-ISID.ARPA (09/12/85)

NetLandians,

Common and useful utility is one that "Tabify's" a document -- gets all
those long streams of spaces and converts them to appropriate tab
equivalents.

Two available are Irv Hoff's TAB7 and Leor Zolman's TABIFY4, both available
in SIMTEL20's MICRO:<CPM.TXTUTL> archive.  (TABIFY4 has C source.)

Howsomeever... a wee little problem here with BOTH these programs.
They grab all sorts of spaces and change them into tabs, making REAL
problems if this particular document is a WordStar (or other) justified
document with 2 or more spaces between words.

Irv's TAB7 isn't quite so bad - it does NOT tabify a single space, but
will gleefully gobble up two of them, replacing with a tab character
that LOOKS just fine in WordStar, but wait till you try to reformat that
sucker!  His doesn't mess with comment fields in a .ASM file, which is
a little help anyway.

I've found more than one .ASM file, however, that HAS been tabified,
and all those nice reserved spaces, like
	DB	'        .   ' are now tabified, and my assemblers won't
pick that up as a problem (tho the program sure do!).

So .. If you're using a TABIFY program (and ESPECIALLY if you're doing
it en bulk - found LOTS of these excessively tabified files in the
INFO-IBMPC archives), please ensure your TABIFY utility isn't messing
up the file.  Darned aggravating to do a search & replace for every
isolated tab in a document!

Incidentally, STRIPPER and STRIP20, the first and latest Tabify/stripping
programs I wrote (Turbo Pascal source distributed) do NOT tabify unless
there is a string of four or more spaces -- that takes care of the
WordStar justified documents!  You might want to look at that approach
if working on a Tabify program.

Regards,
David Kirschbaum
Toad Hall
ABN.ISCAMS@USC-ISID

hes@ecsvax.UUCP (Henry Schaffer) (09/15/85)

> Common and useful utility is one that "Tabify's" a document -- gets all
> those long streams of spaces and converts them to appropriate tab
> equivalents.
> 
> Howsomeever... a wee little problem here with BOTH these programs.
> They grab all sorts of spaces and change them into tabs, making REAL
> problems ...
> David Kirschbaum
> Toad Hall
> ABN.ISCAMS@USC-ISID
This also can happen with source of programs.  Many (most?) compilers
don't care about tabs vs. spaces in source *except* in literals.  I had
one devilishly hard to find bug (because the screen and listings showed
a space in the string), and only found it when I used debug to look
at the source file.  (Yes, I WAS desperate.)
--henry schaffer  n c state univ