Subject: the (undocumented) -Q flag to the monitor

From: Stuart Pook <[email-masked]>
Date: Thu, 11 Jun 92 17:38:41 +0200

I think that there is a very minor bug in the handling of this flag.
If you type "monitor -Q yack" you do not end up in the database yack
but rather in your default database.  This is because the code says:

    while ((c = getopt(argc, argv, "h:p:t:o:d:qTNQ:c:")) != EOF) {

ie, -Q is to be followed by an argument.  I would suggest removing the
":" after the Q.

Stuart

PS.  Version 3.1 on a Sun4 running SunOS 4.1.2.
PPS. Why "EOF" and not "-1"?

---

From: <[email-masked]>
Date: Thu, 11 Jun 92 08:57:08 PDT

> PPS. Why "EOF" and not "-1"?

because getopt is documented to return EOF, not -1.  the fact that they
happen to be the same is convenient for people who use -1.

you're correct that -Q takes no argument.  i've installed your fix in
the code we ship.
					mike