Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: A question about ANSI C file handling Message-ID: <7459@brl-smoke.ARPA> Date: 19 Mar 88 01:14:56 GMT References: <12385@brl-adm.ARPA> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 In article <12385@brl-adm.ARPA> ath@my.cvab.SE (Anders Thulin) writes: >Does anybody know if there is a way (in ANSI C) to determine whether >a file is binary or not? There can't be, because some systems do not maintain anything in the file system that says whether a file is to be considered binary or not. For example, UNIX. >Does fopen fail if a binary file isn't opened as binary? It is allowed to, but not required to (for the same reason as above). In other words, it is up to the application to use the right mode.