| I recently noticed the libtest code! Good stuff, but I'm not good at C and am
trying to understand the code.
So hts_main(int argc, char **argv) takes two parameters. argc is a count of
the execution arguments, right? What is argv? An array of strings (I presume
"char*" means array of chars, ie string type) of those arguments?
So in the code below is argc=5 and argv is populated with the values but then
the last value is made NULL? Is that different to an empty string in C?
char _argv[][256] = {"httrack_test" , "<URL>" , "-r3" , "--testscan" , ""
};
char* argv[] = {NULL , NULL , NULL , NULL ,
NULL};
int argc = 0;
while(strlen(_argv[argc])) {
argv[argc]=_argv[argc];
argc++;
}
argv[argc]=NULL;
| |