home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / windows / x / 15719 < prev    next >
Encoding:
Text File  |  1992-08-27  |  1.9 KB  |  38 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!ames!network.ucsd.edu!scubed!scubed.com!stevens
  3. From: stevens@scubed.com (Jeff Stevens)
  4. Subject: Re: Disappearing command line arguments
  5. Message-ID: <1992Aug27.162750.16114@scubed.com>
  6. Sender: usenet@scubed.com (USENET News System)
  7. Nntp-Posting-Host: s3mars
  8. Organization: S-CUBED, A Division of Maxwell Laboratories
  9. References:  <1992Aug27.035954.16698@scubed.com>
  10. Distribution: na
  11. Date: Thu, 27 Aug 1992 16:27:50 GMT
  12. Lines: 24
  13.  
  14. In article <1992Aug27.035954.16698@scubed.com>, stevens@scubed.com (Jeff Stevens) writes:
  15. |>   XtInitialize (and variants) removes all Xt command line arguments
  16. |> from the command line list argv and reduces argc accordingly.  However,
  17. |> it also removes a "-d" flag, and sometimes removes a "-t" flag.  "-d"
  18. |> appears to be equivalent to "-display".  These are not documented toolkit 
  19. |> options, and I can't find any reference to them in the X source code.
  20. |> 
  21. |>   Is this a bug or a feature?  Where and why are these arguments removed?
  22. |> Are there any other undocumented flags extracted by the X initialization
  23. |> routines?  Why is "-t" removed sometimes and sometimes not?  This is causing 
  24. |> problems, since we use "-t" for another purpose.
  25.  
  26. Thanks to the people who responded so quickly to the above question.  I had
  27. not realized that any unique abbreviation of an option flag would be interpreted
  28. as the option flag.  This seems like a dangerous feature, since it means that
  29. if the command line is parsed by the application other than by the resource
  30. manager, application flags must be distinct not only from the standard toolkit
  31. flags, but also from any unique abbreviation of these flags or any application
  32. supplied flags.  The only safe solution to this problem is to explicitly 
  33. reference each flag in the application defined options table.
  34.  
  35. -- 
  36. ----------------------------------------------------------
  37. Jeff Stevens    stevens@s3mars.scubed.com, stevens@seismo.css.gov
  38.