home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / c / 20056 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  1.0 KB

  1. Path: sparky!uunet!micro-c!eastwind!chorn
  2. From: chorn@eastwind.mcds.com (Christopher Horn)
  3. Newsgroups: comp.lang.c
  4. Subject: How do you read binary data piped into stdin?
  5. Summary: How to make stdin read past EOF marker (ascii 26)
  6. Keywords: stdin, redirection, binary data
  7. Message-ID: <N0gRXB1w165w@eastwind.mcds.com>
  8. Date: Thu, 21 Jan 93 23:35:22 EST
  9. Reply-To: chorn@eastwind.mcds.com
  10. Organization: The East Wind  +1 201 875 7063
  11. Lines: 14
  12.  
  13.  
  14. I'm relatively new to C, so still have a lot to learn, so I apologize
  15. if this is a silly question. I need to read raw binary data from
  16. stdin (it is being piped in) but it appears stdin operates in text
  17. mode. The first ascii 26 that comes along triggers end of file, and
  18. I can't read the rest of the data. Could someone please explain, or
  19. better yet show me a short peice of code, that could do this? The
  20. answer is probably obvious, but it eludes me at the moment. Thanks
  21. a lot!
  22.  
  23.  
  24.  ---
  25.  Christopher Horn           |  "We're all caught in a state of decay..."
  26.  chorn@eastwind.mcds.com    |  The East Wind  +1 201 875 7063
  27.