home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / sgi / 13270 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.0 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!ames!olivea!sgigate!odin!fido!sam!pj
  2. From: pj@sam.wpd.sgi.com (Paul Jackson)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re: Ssanf gobbles source string ??
  5. Message-ID: <pdhad50@fido.asd.sgi.com>
  6. Date: 4 Sep 92 02:04:09 GMT
  7. References: <1992Sep3.153419.26116@magnus.acs.ohio-state.edu>
  8. Sender: news@fido.asd.sgi.com (Usenet News Admin)
  9. Organization: Silicon Graphics, Inc.  Mountain View, CA
  10. Lines: 19
  11.  
  12.  
  13. In article <1992Sep3.153419.26116@magnus.acs.ohio-state.edu>, hshamans@magnus.acs.ohio-state.edu writes:
  14. >   I'm wondering if the sscanf should *ever* modify the string from which
  15. >   it is scanning. 
  16. >
  17. >   sscanf(test1,"%s %i",test2,&i);
  18. > Before 2dfft 0
  19. > After 2dfft 
  20.  
  21. yep - a bug.  The %i format of sscanf looks for "0x" and "0"
  22. prefixes, for hex and octal.  In some cases, it uses ungetc
  23. to put back a character, if it sees "0" not followed by "x".
  24. The put back writes directly into the supposed input buffer.
  25.  
  26. I have posted your report as an internal bug on sscanf,
  27. to be fixed sometime, though probably not at high priority.
  28.  
  29. Thanks.
  30.