Re: [CODE][WIN95/LINUX] porting at "May 1, 98 05:14:27 am"

From: Christoph Seifert (criscal@REALM.ZFN.UNI-BREMEN.DE)
Date: 05/01/98


> 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).
Criscal - Realm of Magic
> Thanks.
>
> -> Ben
>
>
>      +------------------------------------------------------------+
>      | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>      | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>      +------------------------------------------------------------+
>


     +------------------------------------------------------------+
     | 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