home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v1 / text0028.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  7.3 KB

  1. From: John Quarterman <std-unix-request@ut-sally.UUCP> (moderator)
  2. Topic: command line arguments (getopt)
  3.  
  4. > There's getting to be a bit of repetition and a certain amount of
  5. > flamage on this subject.  Several things seem clear to me, at least:
  6. > 1) Keith Bostic's getopt is the de facto standard public domain getopt
  7.  
  8. Well, it seems I may have been hasty to state that.  More follows.
  9.  
  10. ----------------------------------------------------------------------
  11.  
  12. Date: Tue, 16 Jul 85 19:10:43 edt
  13. From: ihnp4!cmcl2!edler (Jan Edler)
  14. To: ihnp4!ut-sally!std-unix
  15. Subject: another getopt
  16.  
  17. Another important public-domain implementation of getopt(3)
  18. is the one from AT&T available from the UNIX system toolchest.
  19.  
  20.     Jan Edler
  21.     New York University
  22.     ihnp4!cmcl2!edler
  23.     edler@nyu.arpa
  24.  
  25. [ The toolchest number is 201-522-6900, where you can log in as guest.
  26. Getopt is listed as for $0.00, though there is evidently a $100.00
  27. registration fee, a transfer fee ($10?) and tax.
  28.  
  29. If the source for this was actually published in the Dallas /usr/group
  30. meeting proceedings, could someone who has them please type it in and
  31. submit it to this newsgroup?  I could assume that the getopt in my
  32. System V sources is the same as that published at Dallas and post it,
  33. but it might not be.  -mod ]
  34.  
  35. ----------------------------------------------------------------------
  36.  
  37. From: seismo!cbosgd!pegasus!hansen (Tony Hansen)
  38. Date: Thu, 18 Jul 85 01:29:42 EDT
  39. To: ut-sally!std-unix, cbosgd!seismo!keith
  40. Subject: Re: getopt(3) (again...)
  41. In-Reply-To: <250@mcc-db.UUCP>
  42. Organization: AT&T-IS Labs, Lincroft, NJ
  43.  
  44. In article <250@mcc-db.UUCP> you write:
  45. >Date: Thu, 11 Jul 85 14:07:41 EDT
  46. >From: Keith Bostic <keith@seismo.CSS.GOV>
  47. >Subject: getopt(3) (again...)
  48. >
  49. >Just when I thought it was safe to read my mail...
  50. >
  51. >> From: harvard!talcott!wjh12!mirror!rs@ut-sally.ARPA (Rich Salz)
  52. >>
  53. >> i made a couple of changes.  esthetics, absolutely no stdio if
  54. >> desired, and the opterr variable.  here's my revision:
  55. >
  56. >I'm getting pretty tired of this whole issue -- in fact, I kept starting
  57. >to reply to your mail and then deciding not to, figuring that if I didn't
  58. >maybe the whole thing would die off.  *sigh*  Well, my friend, here's
  59. >a reply.  The content is simple.  You are wrong.  Pure-d, absolutely,
  60. >wrong.
  61.  
  62. Actually, the recently posted rewrite by Rich Salz is closer to AT&T's code
  63. than is yours and his is more accurate.
  64.  
  65. >Point by point:
  66. >
  67.     ... (no comment on aesthetics)
  68. >
  69. >absolutely no stdio if desired:
  70. >    Well, for an error condition that's going to happen once before the
  71. >program exits, it's gonna be faster.  You saved about 2 routine calls, near
  72. >as I can figure.  You didn't save any library space, which is why I changed
  73. >the original fprintf() calls to fputs() calls.
  74.  
  75. Actually this is important in some applications which do not already use
  76. stdio and do not wish to load in the 10k or so overhead that using stdio
  77. incurs. AT&T's code does not use stdio in getopt(3).
  78.  
  79. >the opterr variable:
  80. >    The other two items, I could live with.  Here, on the other hand,
  81. >you have single-handedly created a real pain in the ass in terms of
  82. >portability.
  83. >
  84. >Scenario #1:
  85. >    Bell Labs doesn't ever decide to use opterr.  Fine and dandy,
  86. >    except that people who use your new flag will find that their
  87. >    code will not run as expected on USG UNIX.
  88.  
  89. Sigh. Here's the real crux of the matter: USG UNIX already has and uses
  90. opterr exactly as used by Rich's code. It is poorly documented,
  91. unfortunately.
  92.  
  93. >I would have been much more amenable to changes two months ago; if you
  94. >can get Mike Karels to use your version rather than mine, I will again
  95. >be much more amenable to changes.  Well, with the exception of your use
  96. >of opterr.
  97.  
  98. I thought UCB had a System V license. Couldn't they have checked your
  99. public-domain version against the code that was in the System V source
  100. easily enough for incompatibilities?
  101.  
  102. In fact, why go with yours or Rich's version at all and not use the
  103. public-domain version that AT&T published at January's Uni-Forum in Dallas?
  104. That would have gotten rid of all thought of incompatiblity!
  105. [ They may not have been aware of it:  few other people seem to be.
  106. Perhaps you could type it in and submit it to the newsgroup? -mod ]
  107.  
  108. >  The world does not need another getopt.
  109.  
  110. You're right. Why'd you bother adding one? :-)
  111.  
  112. >    ..., or, of course, we could just diverge the two systems
  113. >    again.  Fun, fun!
  114.  
  115. I hope 4.3BSD picks up AT&T's public-domain version of getopt(3) for use
  116. rather than creating yet-another branching of ways by using yours, Keith, or
  117. Rich's.  [ You could submit the AT&T source to Berkeley as a bug fix.  -mod ]
  118.  
  119.                     Tony Hansen
  120.                     ihnp4!pegasus!hansen
  121.  
  122. ----------------------------------------------------------------------
  123.  
  124. From: Dave Berry <seismo!cstvax.ed.ac.uk!mcvax!db>
  125. Date: Tue, 16 Jul 85 15:43:56 bst
  126. To: ut-sally!std-unix
  127. Subject: Command lines
  128.  
  129. It's probably way too late for this to be suggested, but the longer it's
  130. left, the worse it will be.
  131. How about completely revamping the unix command line syntax to be
  132.     command {{-option ...} {file ...} ...}
  133. with command names & option names being full words (e.g. remove, not rm)
  134. and using command (and argument) completion a la VMS?  I used UNIX for three
  135. years before using VMS, and I far prefer this approach to command line syntax
  136. (though VMS filenames & DCL are appalling!).
  137.     A couple of MMI articles I've read (in CACM I think) report evidence
  138. that users far prefer command completion to cryptic abbreviations in the
  139. UNIX tradition.
  140.     The rest of UNIX is being dragged kicking & screaming into the
  141. "real world" - I'd like to see this change happen too.
  142.  
  143. [ Command and file name completion has been added to the C shell in
  144. several steps and posted to net.sources over the last couple of years.
  145. 4.3BSD will include both (made quite a bit more efficient) as an option
  146. in the distributed C shell (according to what the Berkeley CSRG people
  147. said at the 4BSD BOF at the Portland USENIX).  I don't know if such
  148. has been done in any version of the Bourne or Korn shells.  -mod ]
  149.  
  150. ----------------------------------------------------------------------
  151.  
  152. From: jsq@ut-sally.ARPA (John Quarterman)
  153. Date: Thu Jul 18 10:51:48 CDT 1985
  154. To: ut-sally!std-unix
  155. Subject: Re: Command lines
  156.  
  157. It seems to me that general command argument completion would have to
  158. be implemented in each command, and would require each command to be
  159. able to interact with terminals.  Doesn't seem worth it to me, but then
  160. I've always thought argument completion to be one of TENEX/TOPS-20/VMS's
  161. most annoying features.  Argument completion would also seem to rule
  162. out multiple options in the same word, which is a bit of a compatibility
  163. problem.
  164.  
  165. ----------------------------------------------------------------------
  166.  
  167. This moderated newsgroup, mod.std.unix, is for discussions of UNIX standards,
  168. in particular of the draft standard in progress by the IEEE P1003 Committee.
  169. The newsgroup is also gatewayed to an ARPA Internet mailing list.
  170.  
  171. Submissions to:    ut-sally!std-unix      or std-unix@ut-sally.ARPA
  172. Comments to:    ut-sally!std-unix-request or std-unix-request@ut-sally.ARPA
  173. Permission to post to the newsgroup is assumed for mail to std-unix,
  174. but not for mail to std-unix-request, nor for mail to my personal addresses.
  175. -- 
  176.  
  177. John Quarterman,   UUCP:  {ihnp4,seismo,harvard,gatech}!ut-sally!jsq
  178. ARPA Internet and CSNET:  jsq@ut-sally.ARPA, soon to be jsq@sally.UTEXAS.EDU
  179.  
  180. Volume-Number: Volume 1, Number 29
  181.  
  182.