Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Compiler design in C? Date: Mon, 14 Nov 2016 09:42:35 -0800 Organization: None to speak of Lines: 18 Message-ID: References: <98529082-11cc-b9a6-148f-70249943b502@verizon.net> <87shqwkzks.fsf@bsb.me.uk> <87bmxikhzc.fsf@bsb.me.uk> <4b37ce62-b8b8-2503-c3b0-72e7d50b19fa@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="338d9c584b6183b18f341b7cfd63cc93"; logging-data="25510"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gZc0KgbHfAW2R8trR8IFC" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:8zcjrNI/HdgipgusJKGKmfj8DwQ= sha1:q8+dNfxlons5rqL8n7CDMEEnyFU= Xref: csiph.com comp.lang.c:96547 "James R. Kuyper" writes: [...] > My main point is that the code I'm looking at contains a number of cases > where Keith's objection to the use of "\r\n" in connection with out_file > don't apply because out_file was opened in binary mode, and that it > might be reasonable to open that file in binary mode because it has some > sections that were created by passing encrypted data to fwrite(). And I suggest that, while using fprintf on a binary stream is perfectly valid, it's unusual enough that it should be clearly commented -- along with the reason for writing "\r\n" to the file. (I haven't looked at the full code; perhaps it's already documented.) -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"