Find the answer to your Linux question:
Results 1 to 2 of 2
hi I wants to open a file in binary form at . as you know b letter in fopen function is for opening the files , but it dosent open ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2004
    Location
    Iran
    Posts
    20

    C programming , fopen


    hi
    I wants to open a file in binary form at .
    as you know b letter in fopen function is for opening the files , but it dosent open it in binary format .(found in man page ''b'' don't work in ANCY C)
    is there any other function to do that or i can do it with fopen ?!!!!
    thanks for your attention

  2. #2
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    All files are opened in "binary" format on Linux. It's a kludge that had to be introduced to cope with Micro$oft text files that use stupid line terminations (\r\n). It's MS text files that have to opened "specially" to merge the \r\n into a single \n. Have you actually got a problem, or did the ANSI C reference in the manpage confuse you?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •