home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 12969 < prev    next >
Encoding:
Text File  |  1992-07-23  |  1.7 KB  |  35 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!darwin.sura.net!jvnc.net!princeton!phoenix.Princeton.EDU!rtbunker
  3. From: rtbunker@phoenix.Princeton.EDU (Ross T. Bunker)
  4. Subject: printf() problem in thinkC
  5. Message-ID: <1992Jul23.231137.27543@Princeton.EDU>
  6. Originator: news@ernie.Princeton.EDU
  7. Sender: news@Princeton.EDU (USENET News System)
  8. Nntp-Posting-Host: phoenix.princeton.edu
  9. Organization: Princeton University
  10. Date: Thu, 23 Jul 1992 23:11:37 GMT
  11. Lines: 22
  12.  
  13. Hello,
  14.     I'm having problems with printf() in ThinkC 5.02.  In attempting to
  15. print a string > 32K, printf("%s", str) prints a lot of blanks, then the
  16. string followed by garbage.  It does not end.  This is not a problem with
  17. lack of a NULL terminater.  Both puts, and fwrite work fine.  the printf
  18. family of functions however fails.  Has anyone else noticed this? (like many
  19. people print out > 32 K strings! :-)  Is there a fix?
  20.     I have tested this VERY thoroughly and I'm as sure as I can be that it
  21. is NOT something i'm doing incorrectly (Though everytime I say that it
  22. inevitably is.)  It is possible that there is some subtlety that i am not
  23. aware of in terms size of ints and things, but I have gone in to macsbug and
  24. watched it pass arguments and it seems fine.
  25.     If you haven't heard of this and want to see it for yourself I can mail
  26. you a short (10) line program that illustrates it.
  27.  
  28.     Thanks very much for any help.
  29.  
  30. -- 
  31. ------------------------------------------------------------------------------
  32. :)ross                            | I don't have to take this abuse from you -- 
  33. Internet - rtbunker@princeton.edu | I've got hundreds of people waiting to abuse
  34. Bitnet   - rtbunker@pucc.bitnet   | me.  --Bill Murray, "Ghostbusters"
  35.