[Mono-list] newline and cvs
Piers Haken
piersh@friskit.com
Sun, 3 Mar 2002 08:17:04 -0800
Why bother with a tool? What a PITA. Why not just use the format that's
available on all platforms?
Unix editors tend to have DOS compatility modes. I know it's simple to
have vim switch mode based on extension. Surely emacs can do something
similar?
DOS editors tend NOT to have Unix compatilibity modes. Specifically:
VS.NET which I'm sure more than a few people here are using.
Piers.
-----Original Message-----
From: Gaurav Vaish [mailto:gvaish@iitk.ac.in]
Sent: Sunday, March 03, 2002 6:06 AM
To: Daniel Stodden; Mono Developers
Subject: Re: [Mono-list] newline and cvs
You are right...
people like me, who are involved in building class libraries, apart
from corlib and/or System assemblies need to be on Windows for testing,
checking various behaviours etc.
And with IDEs like SharpDevelop, CRLF is the only thing that's
possible.
Initially I started off with TextPad, which supports LF and CRLF,
but it's not too feasible for C#, moresoover because it's not an IDE.
I made a small tool (that uses tclsh :( ) to convert crlf to lf,
though it's pretty easy in perl. Though it may be preached that the
server should do this job, but I am not in favour of this. It should be
the developer who should do this lest the server gets too slow - just
parse a whole file everytime something is added. Well, incremental data
can only be also put to parsing --- can't say much since not too fluent
in CVS technology.
---------------------------
#! /usr/bin/perl
while(<STDIN>)
{
convert $_;
}
sub convert
{
my $file = shift;
open(FILE, " <$file");
@newData = ();
while(<FILE>)
{
chomp;
push @newData, $_, "\n";
}
close(FILE);
open(FILE, ">$file");
foreach $line (@newData)
{
print FILE, $line;
}
close(FILE);
}
---------------------------
Ah, I just made it. I will now change my original program -- I don't
prefer to use tclsh now because of its absence on Cygwin. ;-)
Cheers,
Gaurav Vaish
http://home.iitk.ac.in/student/gvaish
http://calendar.yahoo.com/mastergaurav
---------------------------------
----- Original Message -----
From: "Daniel Stodden" <stodden@in.tum.de>
To: "Mono Developers" <mono-list@ximian.com>
Sent: Sunday, March 03, 2002 18:11
Subject: Re: [Mono-list] newline and cvs
_______________________________________________
Mono-list maillist - Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list