This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Spaces Problem


There's usually, for Unices, a utility program named dos2unix which can
be used to convert dos text files to Unix format, and it works for
Linux, too.

I believe that's the name.  I just tried to verify, for I've rarely
needed to use this, but it's not on my system, probably due to not
having the dos utilities package installed.

Look for dos2unix and then run your dos files through it.  If dos2unix
is installed on your system, then there's probably a man page for it.
If you don't have this util, then you may either look for one and
download it, or use a simple, one shot per file, sed command.

mike corbeil

Kári Davíđsson wrote:

> Convert the files to unix fileformat.
> The line endings are different in windows and unix/linux where the
> windows convention (^M) confuses the cpp (C preprocessor).
> Also note that the windows convention confuses also make, so the
> Makefiles must also be in the unix fileformat.
>
> Hope this helps,
>
> K.D.
>
> -----Original Message-----
> From: Rahul Sharma [mailto:maxutilpvt@yahoo.com]
> Sent: 25. október 2000 09:38
> To: gcc-help@gcc.gnu.org
> Subject: Spaces Problem
>
> Hi,
>
> I"m porting my C++ Library from windows to Linux and I
> Don't know why gcc is creating the problems for the
> extra spaces before or after \ for the statment
> continuation I used especially in Macros.If I remove
> the spaces before and after \ then on these lines
> there is no more error but its difficult to find the
> exact place of space and then to remove it,I think its
> not possible this way to port the library.and after
> removing the spaces giving the error "type specifier
> omitted for parameter" where in the source code on the
> line
>
> enum TraverseTree
> {
>   RootToLeaf  = 0, LeafToRoot  = 1,
>   FirstToLast = 0, LastToFirst = 2
> }
>
> Please tell me what should I do to remove these errors
> for spaces and enums.I think may be there is some
> problem of the conversion of the source code in
> Windows format and I'm using the same for Linux (Just
> copied the files from network from Windows node).If
> this is then please tell me any converter to convert
> the files from Windows format to Linux format or any
> other idea to do it.
>
> Thanx.
>
> Rahul.
> e-mail : maxutilpvt@yahoo.com
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Messenger - Talk while you surf!  It's FREE.
> http://im.yahoo.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]