- CommandLine CmdL(Args,_config);
- if (pkgInitConfig(*_config) == false ||
- CmdL.Parse(argc,argv) == false ||
- pkgInitSystem(*_config,_system) == false)
- {
- _error->DumpErrors();
- return 100;
- }
-
- // See if the help should be shown
- if (_config->FindB("help") == true ||
- CmdL.FileSize() == 0)
- return ShowHelp();
+ CommandLine::Dispatch Cmds[] = {{NULL, NULL}};
+ CommandLine CmdL;
+ ParseCommandLine(CmdL, Cmds, Args, &_config, &_system, argc, argv, ShowHelp);