home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2159 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: vixen.cso.uiuc.edu!arh0268!not-for-mail
  2. From: Dannyman@uiuc.edu (Unknown)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Something goofy with fscanf(%s) ??
  5. Date: 27 Jan 1996 21:41:47 GMT
  6. Organization: University of Illinois at Urbana
  7. Message-ID: <4ee66r$ffk@vixen.cso.uiuc.edu>
  8. NNTP-Posting-Host: arh0268.urh.uiuc.edu
  9. X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
  10.  
  11.    It's me again.
  12.  
  13.    I'm working on a logfile anaylzer for AWS ... my special feature is that
  14. information is saved in datailes so that you can delete processed logfiles.
  15.  
  16.    It's still in early stages.
  17.  
  18.    I read in the old datafiles with fscanf(%d %s) as the format is;
  19. number text-string-no-spaces...
  20.  
  21.    I have a problem that always repeates itself during testing, take a look
  22. at and excerpt from a data file;
  23.  
  24. 4 http://altavista.digital.com/cgi-bin/query?pg=q&what=web&fmt=&q=%22babe004%22
  25. 3 http://altavista.digital.com/cgi-bin/query?pg=q&what=web&fmt=&q=
  26.           babe004
  27.  
  28.    Now what this says to me that when fscanf() hits the %22 in the string
  29. it's somehow interpreted funny and thus the second line is read back in as
  30. in the second line.
  31.  
  32.    Next time the log is processed, fscanf() dies because there are too many
  33. elements in the line.
  34.  
  35.    This is bad and very frustrating.
  36.  
  37.    Any ideas, please?
  38.  
  39. -- 
  40. =====///====================================================================
  41. ====///=======This message brought to you by dannyman@uiuc.edu==============
  42. \\\///=========HOME PAGE! http://www.uiuc.edu/ph/www/djhoward ==============
  43. =\XX/A1200==================================================================
  44.                   "Our ship is broken. Can you make it go?"
  45.