[ale] Arguments question

Chris Fowler ChrisF at computone.com
Wed May 2 14:36:53 EDT 2001





I would like to take simple programs and rename the main() function to the name of the simple program.  I would then like to be able

to call them from one main program.  Below is an example:




int
main(int argc, char argv[])
{
        if (strncmp(argv[0],"shell") == 0)
                shell(argv);


        return 0;
}


int
shell(int argc, char *argv[])
{
        /*


                Shell Code


        */


}


It seems simple, but my program that I am calling from main are not getting all the arguments.  Maybe I've overlooked something.

Chris







More information about the Ale mailing list