Re: [CODE][WIN95/LINUX] porting

From: Brian (brian@IMI-BOTTLING.COM)
Date: 05/01/98


----Original Message-----
From: Christoph Seifert <criscal@REALM.ZFN.UNI-BREMEN.DE>
To: CIRCLE@post.queensu.ca <CIRCLE@post.queensu.ca>
Date: Friday, May 01, 1998 9:37 AM
Subject: Re:  [CODE][WIN95/LINUX] porting


>> Might need [NEWBIE] up there.
>>
>> Right, I'm helping someone setup a MUD in Linux, and I'm doing much of
>> the work offline on my WIN95 machine. Problems arise when files have
>> been transfered from WIN95 to linux. As I understand it, files that
>> I've altered with DOS edit or WORDPAD, are going to be saved in text
>> format (obvisouly), but gcc prefers them to be binary. I don't have the
>> space or the inclination to set up a linux partition at home. So I
>> was wondering if anybody else has been in this situation and has any
>> suggestions or advice?(apart from removing WIN95 ;p).
>>
>Sounds like a problem with the different text format of Unix and DOS.
>DOS adds another \r (carriage return) for each \n (newline), Unix
>just needs \n and that might cause some problems with gcc (can't try
>out this here - just fine Solaris machines and some win 3.1 *shiver*)
>On Unix (Linux is a unix just in case you started to wonder), there is
>usually mtools available nowadways. This tool provides some msdos
>commands under unix with m prepended e.g. mcopy. You can copy a text file
>from disc with mcopy -t. This strips off the carriage returns. The other
>round, you just have to load the file into a text editor, change it a bit
>and save again for getting it saved with carriage returns. To strip the
>carriage returns on unix from files you get over the internet, you should
>look out for tools/commands like recode (forgot the name).


I had a similar experience when coding on a Win95 machine and uploading to
the server (a linux box).  My code had all the control-M's (carriage
returns) after every line, which seemed to screw up the compiler.

Now, I'm not 100% sure this works, but I loaded the file into "pico"
(usually installed if your server has pine), just added a space someplace
so pico saw the file as changed, and then saved it.  Pico stripped out all
the control-M's for me during the save.

- Brian


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST