-void InitCmdLine (char* aArgVec[], unsigned aArgCount)
+void InitCmdLine (unsigned aArgCount, char* aArgVec[])
/* Initialize command line parsing. aArgVec is the argument array terminated by
* a NULL pointer (as usual), ArgCount is the number of valid arguments in the
* array. Both arguments are remembered in static storage.
*/
{
- ArgVec = aArgVec;
ArgCount = aArgCount;
+ ArgVec = aArgVec;
}
} else {
OptTab->Func (Opt, 0);
}
+ /* Done */
+ return;
}
/* Next table entry */
/* Structure defining a long option */
typedef struct LongOpt LongOpt;
struct LongOpt {
- const char* Option;
+ const char* Option;
unsigned ArgCount;
void (*Func) (const char* Opt, const char* Arg);
};
-void InitCmdLine (char* aArgVec[], unsigned aArgCount);
+void InitCmdLine (unsigned aArgCount, char* aArgVec[]);
/* Initialize command line parsing. aArgVec is the argument array terminated by
* a NULL pointer (as usual), ArgCount is the number of valid arguments in the
* array. Both arguments are remembered in static storage.