• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Fixing line endings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fixing line endings


  • Subject: Re: Fixing line endings
  • From: Brad Oliver <email@hidden>
  • Date: Fri, 30 Mar 2007 09:53:10 -0700

On Mar 30, 2007, at 8:42 AM, email@hidden wrote:

On Mar 29, 2007, at 2:12 PM, Mark Wagner wrote:

I'm working on cleaning up the codebase that I'm working on. It's a
rather incredible mess of line endings: CR, LF, CR/LF, and even LF/CR
in a few places, sometimes mixed within a single file. Can anyone
suggest a program or script that would normalize things? It would
need to be selective in which files it modifies, since the source code
directories also contain binary files and data files that require a
specific type of line ending.

I used to use something called "LineBreak" for Mac OS X which I think will do what you want (recursive changes skipping files based on file extensions). I don't know if it is still out there but it may be worth a look. I'm not sure how well it will handle the LF/CR combination, you may end up with two lines there.

I'll second the recommendation for "LineBreak":

<http://www.trancesoftware.com/software/linebreak/>

I can't speak for the odd LF/CR case, but it works fantastic for me for DOS endings (CR/LF) and old Mac endings (CR). When I get a Win32 codebase, I typically use it to convert the entire thing to Unix endings (LF) as part of my preparation for checking into Perforce/ Subversion.

It'll also allow you to whitelist/blacklist files to convert based on extension, and can preserve the original file date on the converted files.

--
Brad Oliver
email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Fixing line endings
      • From: Aaron Montgomery <email@hidden>
  • Prev by Date: Re: Header Search Paths in .xcconfig doesn't work
  • Next by Date: Re: gdb crashing
  • Previous by thread: Re: Fixing line endings
  • Next by thread: Re: Fixing line endings
  • Index(es):
    • Date
    • Thread