M
Massimo Neri
I was analyzing some GNU code when I saw something like this:
int
getopt (argc, argv, optstring)
int argc;
char *const *argv;
const char *optstring;
{
return _getopt_internal (argc, argv, optstring,
(const struct option *) 0,
(int *) 0,
0);
}
There are 2 strange things.
First I don't understand the head of the function:
int getopt(argc,argv,optstring) [<---
Where are the types?]
int argc; char *const *argv; const char *optstring; [<--- Here they
are, or not?]
I never see something like this. It looks so strange.
The second thing that I don't understand is
char *const *argv;
What is this? I know that argv is meant to be const char **. Is this
the same thing?
Thank for your attention,
Massimo
int
getopt (argc, argv, optstring)
int argc;
char *const *argv;
const char *optstring;
{
return _getopt_internal (argc, argv, optstring,
(const struct option *) 0,
(int *) 0,
0);
}
There are 2 strange things.
First I don't understand the head of the function:
int getopt(argc,argv,optstring) [<---
Where are the types?]
int argc; char *const *argv; const char *optstring; [<--- Here they
are, or not?]
I never see something like this. It looks so strange.
The second thing that I don't understand is
char *const *argv;
What is this? I know that argv is meant to be const char **. Is this
the same thing?
Thank for your attention,
Massimo