* VMS Programming question
@ 1998-11-03 5:00 David W. Fisher
1998-11-06 5:00 ` Hoff Hoffman
0 siblings, 1 reply; 2+ messages in thread
From: David W. Fisher @ 1998-11-03 5:00 UTC (permalink / raw)
I'm writing a c program and need to determine what the user typed-in on
the command line. The c routine currently uses argc and argv to pickup
the input to main, but the tricky part is: the c program is being call
as a verb from a ".CLD" file. Consequently, argv[0] is not what the
user typed, but the image set-up in the ".CLD". The question is: how
do I get the information the user typed (i.e., the verb)?
Thanks,
Dave
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: VMS Programming question
1998-11-03 5:00 VMS Programming question David W. Fisher
@ 1998-11-06 5:00 ` Hoff Hoffman
0 siblings, 0 replies; 2+ messages in thread
From: Hoff Hoffman @ 1998-11-06 5:00 UTC (permalink / raw)
In article <363F65C7.4050@nswc.navy.mil>, "David W. Fisher" <dwfishe@nswc.navy.mil> writes:
:I'm writing a c program and need to determine what the user typed-in on
:the command line. The c routine currently uses argc and argv to pickup
:the input to main, but the tricky part is: the c program is being call
:as a verb from a ".CLD" file. Consequently, argv[0] is not what the
:user typed, but the image set-up in the ".CLD". The question is: how
:do I get the information the user typed (i.e., the verb)?
There are two mechanisms of retrieving user input when an image
is activiated -- via the foreign command mechanism and such calls
as lib$get_foreign and its derivatives such as the C argc/argv
mechanism, and via the system command definition tables (or via
per-process SET COMMAND operations) and the OpenVMS CLI interface
callback routines.
In this case, you will likely want to avail yourself of the CLI
routines, as documented in the utility routines reference manual.
One wrinkle: the CLI routines use OpenVMS signals -- which are
different from C signals, though they are the underpinnings of
how C signals are implemented on OpenVMS -- which means you will
likely need to establish a signal handler when working with the
CLI calls, an example of establishing a signal hander would be a
call to the routine VAXC$ESTABLISH( lib$sig_to_ret ); -- this sets
up a routine that turns the signal into a return status value.
You'll also have to learn about using string descriptors in C,
if you have not already done so. Please see "PROG13. What is a
descriptor?" in the OpenVMS Frequently Asked Questions (FAQ)
for details on descriptors -- if you are not already familiar
with them, of course...
--
ps: comp.os.vms is a better spot for most OpenVMS questions.
-------------------------- pure personal opinion ---------------------------
Hoff (Stephen) Hoffman OpenVMS Engineering hoffman@xdelta.ZZenet.dec.com
note to those folks not contributing spam -- there is no ZZ in my address
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-11-06 5:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-11-03 5:00 VMS Programming question David W. Fisher
1998-11-06 5:00 ` Hoff Hoffman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox