tolf and detab
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Aug 6 18:50:52 PDT 2010
On 08/06/2010 08:34 PM, Walter Bright wrote:
> I wrote these two trivial utilities for the purpose of canonicalizing
> source code before checkins and to deal with FreeBSD's inability to deal
> with CRLF line endings, and because I can never figure out the right
> settings for git to make it do the canonicalization.
>
> tolf - converts LF, CR, and CRLF line endings to LF.
>
> detab - converts all tabs to the correct number of spaces. Assumes tabs
> are 8 column tabs. Removes trailing whitespace from lines.
>
> Posted here just in case someone wonders what they are.
[snip]
Nice, though they don't account for multiline string literals.
A good exercise would be rewriting these tools in idiomatic D2 and
assess the differences.
Andrei
More information about the Digitalmars-d
mailing list