1753559 Members
6103 Online
108796 Solutions
New Discussion

Re: Process Header

 
SOLVED
Go to solution
Christopher Caldwell
Honored Contributor

Re: Process Header

 
Mark Greene_1
Honored Contributor

Re: Process Header

well, if we are posting code on this, try these code snippets out:

main (int argc, char **argv)
{
int i;
strcpy(argv[0], "ls"); /* pretend we are 'ls' instead */
if (argc>1)
for (i=1; i strcpy(argv[i],"");
dosomething();
exit(x);
}

/* this program shows its progress, using argv[1]
*/
main (int argc, char **argv)
{
while ((current_filename = getfilename()) != NULL)
{
strcpy(argv[1], current_filename);
process_file(current_filename);
} exit(x);
}
the future will be a lot like now, only later