T.R | Title | User | Personal Name | Date | Lines |
---|
3211.1 | | QUARK::LIONEL | Free advice is worth every cent | Wed Aug 15 1990 11:16 | 8 |
| As far as I know, the purpose of these arguments is to pass the command line
arguments vector and count as passed to the C main program, and it looks
for certain configuration information there. From other languages, you pass
a variable zero for ARGC (not a constant) and an empty array for ARGV.
What did you read that made you think it was a program name?
Steve
|
3211.2 | resource manager | VINO::MCARLETON | Reality; what a concept! | Wed Aug 15 1990 15:18 | 13 |
|
In UN*X argv[0] points to the name of the program that was run. If
the command line was:
$foo -l -r -q
then *argv[0] = "foo".
This argument is used by the X windows resource manager to get the name
of the program's resource file. In this case the resource manager would
look for the file DECW$USER_DEFAULTS:FOO.DAT.
MJC
|
3211.3 | | ABYSS::dike | | Wed Aug 15 1990 16:56 | 7 |
| .2:
argv[0] = "foo", *argv[0] = 'f'
argv is a char **, so chasing the pointer once gets you the first argument
(a string) and chasing it twice gets you the first character of the first
argument.
Jeff
|
3211.4 | | QUARK::LIONEL | Free advice is worth every cent | Thu Aug 16 1990 11:19 | 4 |
| Of course, it's a major flaw in the X API that this C/Unix-ism is there at
all. But what else is new?
Steve
|