home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / msdos / programm / 9322 < prev    next >
Encoding:
Internet Message Format  |  1992-09-12  |  1.1 KB

  1. Xref: sparky comp.os.msdos.programmer:9322 comp.lang.c:13605
  2. Newsgroups: comp.os.msdos.programmer,comp.lang.c
  3. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!uakari.primate.wisc.edu!news.larc.nasa.gov!daffodil!wyvern!waggen!alpha
  4. From: alpha@waggen.twuug.com (Joe Wright)
  5. Subject: Re: BC++2.0 lseek problem(ALSO:lseek() question)
  6. Message-ID: <1992Sep13.043839.8659@waggen.twuug.com>
  7. Organization: ALPHA, Box 68621, Va. Beach, VA 23455
  8. X-Newsreader: Tin 1.1 PL5
  9. References: <1992Sep13.011428.25100@eng.ufl.edu>
  10. Distribution: usa
  11. Date: Sun, 13 Sep 1992 04:38:39 GMT
  12. Lines: 13
  13.  
  14. Using open() and read() and lseek() will usually guarantee
  15. non-portability.  These are OS functions, not C functions.
  16. More specifically, they are Unix functions and not MSDOS
  17. functions.  I strongly reccommend fopen(), fseek(), etc.
  18.  
  19. That aside, the main reason that seek doesn't work the same
  20. on Unix text files and DOS text files is that DOS uses two
  21. characters, \r\n, to terminate a line while Unix uses only \n.
  22. So the DOS text file has a few more characters in it than
  23. the Unix one.
  24.  
  25. -- 
  26. Joe Wright  alpha@waggen.twuug.com  alpha@wyvern.twuug.com
  27.