You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Laurie <be...@algroup.co.uk> on 1999/09/18 14:01:16 UTC

Re: cvs commit: apache-1.3/src/main util.c

bjh@hyperreal.org wrote:
> 
> bjh         99/09/18 03:57:08
> 
>   Modified:    src/main util.c
>   Log:
>   Configuration files are text files so open them in text mode.
> 
>   Some OS/2 (and probably DOS & Windows) text editors like to put Ctrl-Z EOF
>   markers at the end of the files they edit. Opening the config files in text
>   mode prevents the Ctrl-Z from causing 'Invalid command' errors when starting.

Nice. I don't think DOS/Windows understand "rt" - they do the opposite
("rb" for binary). Don't think it hurts, though.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi

Re: cvs commit: apache-1.3/src/main util.c

Posted by Brian Havard <br...@kheldar.apana.org.au>.
On Sat, 18 Sep 1999 13:01:16 +0100, Ben Laurie wrote:

>bjh@hyperreal.org wrote:
>> 
>> bjh         99/09/18 03:57:08
>> 
>>   Modified:    src/main util.c
>>   Log:
>>   Configuration files are text files so open them in text mode.
>> 
>>   Some OS/2 (and probably DOS & Windows) text editors like to put Ctrl-Z EOF
>>   markers at the end of the files they edit. Opening the config files in text
>>   mode prevents the Ctrl-Z from causing 'Invalid command' errors when starting.
>
>Nice. I don't think DOS/Windows understand "rt" - they do the opposite
>("rb" for binary). Don't think it hurts, though.

Every C library I've seen for DOS, OS/2 or Windows (those that usually use
CR/LF line termination in text files) has a way of setting the default mode
(text or binary) and allows the b or t to override the default. I haven't
used any MS compilers though, I generally avoid all MS software, so I don't
know about Visual C++.

--
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------