home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19230 < prev    next >
Encoding:
Text File  |  1993-01-05  |  1.4 KB  |  30 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!rbg.informatik.th-darmstadt.de!misar
  3. From: misar@rbg.informatik.th-darmstadt.de (Walter Misar)
  4. Subject: Re: Fopening a text file
  5. Sender: news@news.th-darmstadt.de (The News System)
  6. Message-ID: <1993Jan5.092546@rbg.informatik.th-darmstadt.de>
  7. Date: Tue, 5 Jan 1993 08:25:46 GMT
  8. References:  <1993Jan5.015937.19270@vpnet.chi.il.us>
  9. Nntp-Posting-Host: rbhp69.rbg.informatik.th-darmstadt.de
  10. Organization: TH Darmstadt
  11. Lines: 17
  12.  
  13. In article <1993Jan5.015937.19270@vpnet.chi.il.us>, mox@vpnet.chi.il.us (William Moxley) writes:
  14. > I'm having some problems with a program that I wrote for this computer
  15. > which is running a sys V unix operating system.  My problem is with
  16. > fopen.  When I try do a fopen("filename", "rt"); it opens the file as a
  17. > binary.  If I drop the t, is still creates a binary file.  So how do I
  18. > make fopen create a straight text file?
  19. > As you can guess, I normally don't write programs for machines other
  20. > than dos.  Thanks in advance...
  21.  
  22. Oops, "rt" is new to me. In my understanding "r" specifies a text read,
  23. "rb" a binary read. Further under Unix there isn't any difference between
  24. this two modes - under both modes you will exactly read what was written.
  25.  
  26. -- 
  27. Walter Misar                        It is impossible to enjoy idling thoroughly
  28. misar@rbg.informatik.th-darmstadt.de       unless one has plenty of work to do.
  29.