home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / atari / st / tech / 4171 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.9 KB  |  48 lines

  1. Newsgroups: comp.sys.atari.st.tech
  2. Path: sparky!uunet!cs.utexas.edu!torn!watserv1!mks.com!ant
  3. From: ant@mks.com (Anthony Howe)
  4. Subject: Re: Problems with ARGV
  5. Message-ID: <1992Jul29.130755.27902@mks.com>
  6. Organization: Mortice Kern Systems Inc., Waterloo, Ontario, CANADA
  7. References: <9130026@hpbbrd.bbn.hp.com> <92211.111512RESCHKE@DMSWWU1A.UNI-MUENSTER.DE>
  8. Date: Wed, 29 Jul 1992 13:07:55 GMT
  9. Lines: 37
  10.  
  11. Julian F. Reschke writes:
  12. >In article <9130026@hpbbrd.bbn.hp.com>, jensk@hpbbrd.bbn.hp.com (Jens Kilian)
  13. >says:
  14. >>
  15. >>Yesterday I ran into a problem with the ARGV parameter passing scheme that
  16. >>I'm sure others must have seen before. The ARGV scheme can't pass empty
  17. >>strings
  18. >>as parameters !
  19. >
  20. >Well, that's a known problem :-) Fortunately, empty parameters mostly
  21. >occur as parameters to 'test', and this is normally (or can be) a
  22. >builtin command of the shell.
  23.  
  24. Not so.  I found this problem just recently, while working on 'grep'.
  25. If 'grep' is passed an empty string for the pattern, it is suppose to match 
  26. every line in the file, since the pattern is normally bracketed with
  27. ".*(pattern).*" when no anchoring is used.  It took me about three nights
  28. to figure this out.
  29.  
  30. >Your proposal for an ARGV extension seems to work. If 'we' all (MiNT-Libs,
  31. >and GNU-Libs, PureC startup code and so on) agree on this, that could be
  32. >a solution...
  33.  
  34. Well, I've been working on an ANSI/POSIX library for Sozobon C 1.2.  I've
  35. provided my own C startup that supports ARGV.  If you're going to do
  36. this, which seems reasonable, you'll have to pick a better name than
  37. ARRGH for the env.var. since it has no meaning.  Something like
  38.  
  39.     ARGV_EMPTY=index1, index2, ... indexN\0
  40.  
  41. would be more acceptable.
  42.  
  43. -ant
  44. -- 
  45. ant@mks.com                                                   Anthony C Howe 
  46. Mortice Kern Systems Inc. 35 King St. N., Waterloo, Ontario, Canada, N2J 6W9
  47. "Nice legs.  For a human that is." - Worf (Q-pid)
  48.