1686
1686
long_options.add(module_options);
1692
for (opt= test_module->getManifest().system_vars; opt && *opt; opt++)
1697
if (count > EXTRA_OPTIONS || (*argc > 1))
1699
if (!(opts= (option*) module_root->alloc_root(sizeof(option) * count)))
1701
errmsg_printf(ERRMSG_LVL_ERROR,
1702
_("Out of memory for plugin '%s'."),
1703
test_module->getName().c_str());
1706
memset(opts, 0, sizeof(option) * count);
1708
if (construct_options(module_root, test_module, opts))
1710
errmsg_printf(ERRMSG_LVL_ERROR,
1711
_("Bad options for plugin '%s'."),
1712
test_module->getName().c_str());
1690
for (opt= test_module->getManifest().system_vars; opt && *opt; opt++)
1695
if (count > EXTRA_OPTIONS || (*argc > 1))
1697
if (!(opts= (option*) module_root->alloc_root(sizeof(option) * count)))
1699
errmsg_printf(ERRMSG_LVL_ERROR,
1700
_("Out of memory for plugin '%s'."),
1701
test_module->getName().c_str());
1704
memset(opts, 0, sizeof(option) * count);
1706
if (construct_options(module_root, test_module, opts))
1708
errmsg_printf(ERRMSG_LVL_ERROR,
1709
_("Bad options for plugin '%s'."),
1710
test_module->getName().c_str());
1714
if (test_module->getManifest().init_options == NULL)
1716
1716
error= handle_options(argc, &argv, opts, get_one_plugin_option);
1717
1717
(*argc)++; /* add back one for the program name */