From Newsgroup: comp.windows.x
In article <osfr3m$j37$
1@dont-email.me>,
Lew Pitcher <
lew.pitcher@digitalfreehold.ca> wrote:
...
Any X application built using the X toolkit will support the X toolkit >commandline arguments, including the -fn and the -xrm arguments.
Thus, your xquit program, having been built using the X toolkit, >automatically has -fn, etc as commandline arguments that you can tweak
as you see fit. For a list of X toolkit commandline options, see the >"OPTIONS" section of X(7) ("man 7 X").
Aha! I didn't quite get that - until now.
Here's my final command line - which works well enough...
$ ./xquit -fn '-*-*-*-*-*-*-34-*-*-*-*-*-*-*' -g 800x200 -label "Click this window to continue..."
To get a warning-free compile, modify the end of the program as
follows:
Yes; that works. Thanks.
What's amazing is that this did work, back in 1999. How can passing
"exit(0)" as a function parameter do anything useful?
Maybe the original author didn't fully understand what he was doing.
Well, my point is that even if you can get it past the compiler, any
function that gets called with "exit(0)" as a passed argument, will never
be executed. I.e., the evaluation of the function args will cause the
program to exit - the function itself will never be called.
So, whatever functionality the XtAppAddTimeOut() function was supposed to
be doing, was not happening (in the original code as written).
Probably, the original author was taking advantage of the not-so-stringent >argument type binding that K&R C offered.
Well, this was 1999 - not 1979.
--
Many North Koreans believe Kim-il-Sung is an "almighty god" who "created
the world" in seven days as a divine spirit millions of years ago, and
came to Earth as a human in 1912 as a messianic figure.
--- Synchronet 3.21d-Linux NewsLink 1.2