home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / utils / bug / 1512 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.2 KB  |  35 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!airs.COM!ian
  3. From: ian@airs.COM (Ian Lance Taylor)
  4. Subject: Re: GNU `wc -c' optimization
  5. Message-ID: <9209080501.AA15291@comton.airs.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. References: <GUMBY.92Sep7064016@Cygnus.COM>
  9. Distribution: gnu
  10. Date: Mon, 7 Sep 1992 21:01:55 GMT
  11. Approved: bug-gnu-utils@prep.ai.mit.edu
  12. Lines: 21
  13.  
  14. gumby@cygnus.com (David V. Henkel-Wallace) writes:
  15.  
  16. >   From: pinard@icule.UUCP (Francois Pinard)
  17.  
  18. >   Using GNU textutils 1.3, I noticed that `wc -c FILE' or `wc -c *'
  19. >   physically reads the file(s).  Would not it be better to just stat the
  20. >   file(s) and produce the output quickly in those cases?
  21.  
  22. >Until wc handles wide characters...
  23.  
  24. POSIX.2 defines wc -c to output a number of bytes.  I doubt that will
  25. change without adding another option.
  26.  
  27. Whether the optimization is worth putting in depends on how often
  28. people use wc -c, I guess.
  29. -- 
  30. Ian Lance Taylor                ian@airs.com                 uunet!airs!ian
  31. First person to identify this quote wins a free e-mail message:
  32. ``He caught the lady in this way: so when the lady was running away for her
  33.   life, he hastily ran to her front and stopped her as a log of wood.''
  34.  
  35.