[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Now 100% Serious Newline conversion suggestion

From: <cmpilato_at_collab.net>
Date: 2001-12-14 14:55:08 CET

> My nice cross-platform perl script that used to do
>
> checkout("foo");
> process("foo");
>
> becomes
>
> checkout("foo");
> $foo_ending = get_line_ending_attribute("foo");
> $platform_ending = get_platform_line_ending();
> if ($foo_ending == CRLF && $platform_ending == LF) {
> dos_to_unix("foo");
> } else if ($foo_ending == LF && $platform_ending == CRLF) {
> unix_to_dos("foo");
> if ($foo_ending == CR && $platform_ending == LF) {
> mac_to_unix("foo");
> } else if ($foo_ending == LF && $platform_ending == CR) {
> unix_to_mac("foo");
> if ($foo_ending == CR && $platform_ending == CRLF) {
> mac_to_dos("foo");
> } else if ($foo_ending == CRLF && $platform_ending == CR) {
> unix_to_mac("foo");
> }
> process("foo");

<jest>
Well, shoot. Why not? You've already written the client-side plugin?
:-)
</jest>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:53 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.