Line ending issues, portability, Project Builder, FileMerger and more...
Line ending issues, portability, Project Builder, FileMerger and more...
- Subject: Line ending issues, portability, Project Builder, FileMerger and more...
- From: Pierre-Olivier Latour <email@hidden>
- Date: Wed, 05 Feb 2003 03:47:17 -0800
Hi,
Sorry if this is a bit off-topic but this list is so full of knowledge, that
I'm just gonna ask anyway ;)
Anyway, I'm currently mixing legacy carbon code with new cocoa code and I
came across weird text problems:
I first discovered a serious bug in FileMerger where file comparison is
completely not working when comparing files with mac line endings
(basically, just change 1 thing, and the whole file is going to be
considered changed).
Then I wondered about how PB handles these issues... Is it really
fail-proof? For example when pasting text from a mac file into a unix file?
I've noticed several times than when I type return on my keyboard while
editing a source file in PB, nothing happens (the cursor doesn't move), and
I have to type return again to make it move to the next line. I assume this
happens now and then on mac-line endings files.
Contrary to CodeWarrior, PB does not warn the user when opening a source
file with mixed file endings, so what happens when you work on a file with
mac and unix line endings? What kind of line endings is PB going to insert
when you edit this file?
So I'd like to move all my source code to Unix line endings, so that at
least the dev tools work well, but I'd like to know 2 things before doing
the move (which obviously is going to take some time):
1) are the files going to get messed up again when I'll paste some windoze
or mac code inside them?
2) what's the most portable line ending anyway? Mac, Unix or Windows? I
would say Unix as the \n is the common denominator with the 2 others, but I
do not have real experience with that :)
How about that "Line endings / for existing files" setting in PB prefs? If I
set it to anything else than "Preserve", is it going to change all line
endings on every file I ever open, or only on the ones I've edited and
resaved?
I'll appreciate any pointers on that issue.
_____________________________________________________________
Pierre-Olivier Latour email@hidden
Palo Alto, USA
http://www.pol-online.net
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.