home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / aix / 12699 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.1 KB  |  30 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!europa.asd.contel.com!emory!athena.cs.uga.edu!shen
  3. From: shen@athena.cs.uga.edu (Mingzuo Shen)
  4. Subject: fprintf() over-writes line for line (rather than char for char)?
  5. Message-ID: <1992Dec18.213750.25274@athena.cs.uga.edu>
  6. Sender: shen@athena.cs.uga.edu (Mingzuo Shen)
  7. Organization: University of Georgia, Athens
  8. Distribution: usa
  9. Date: Fri, 18 Dec 1992 21:37:50 GMT
  10. Lines: 18
  11.  
  12. Hi all,
  13.  
  14.     If I fseek() into the middle of a text file and start fprintf(),
  15. then it seems that each new character over-writes a single old one.
  16. if I start from the beginning of a line of 60 characters, and
  17. fprintf() 80 characters, then the 60 characters are over-written
  18. (which is what I wanted), and in addition, 20 more characters
  19. in the next line are also over-written (which is NOT what I wanted).
  20. I would prefer fprintf() leaves the next line alone.
  21.  
  22.     Is there a method by which I have what I wanted (line-for-line
  23. over-writing, and do not have what I do not want? I tried this
  24. on AIX (cc).
  25.  
  26.     Any help and pointers are appreciated. Thanks in advance,
  27.  
  28. Mingzuo Shen
  29.  
  30.