Dirt in file

This is a discussion on Dirt in file within the C Programming forums, part of the General Programming Boards category; Hi all, I have a .c file that has been edited on a Windows machine, and when compiled under unix ...

  1. #1
    fw9189
    Guest

    Question Dirt in file

    Hi all,

    I have a .c file that has been edited on a Windows machine, and when compiled under unix i get lots of warnings like:
    "carriage return in preprocessing ".

    Is there a simple way to get around this? Like touch -something?

    / Fred

  2. #2
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    mcopy will convert text files back and forth from OS's. It is part of a packet that you can download for Linux.

  3. #3
    Registered User Engineer's Avatar
    Join Date
    Oct 2001
    Posts
    125
    Or you can replace the ^M character, which is added when you edit your files in Windows (MS Visual C++ for example) with a space using emacs or vi.
    1 rule of the Samurai Code: if you have nothing to say, don't say anything at all!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sequential file program
    By needhelpbad in forum C Programming
    Replies: 80
    Last Post: 06-08-2008, 01:04 PM
  2. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  3. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  4. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 09:57 AM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21