ModuleListGet/Free -> MODULE_LIST_GET/FREE.
SVN revision: 42466
This commit is contained in:
parent
3a706d50c5
commit
e1ac3bc395
|
@ -218,7 +218,7 @@ ConfigurationLoad(void)
|
||||||
/* NB! We have to assign the defaults even if it doesn't exist */
|
/* NB! We have to assign the defaults even if it doesn't exist */
|
||||||
|
|
||||||
/* Load module configs */
|
/* Load module configs */
|
||||||
pml = ModuleListGet(&nml);
|
MODULE_LIST_GET(pml, nml);
|
||||||
for (i = 0; i < nml; i++)
|
for (i = 0; i < nml; i++)
|
||||||
{
|
{
|
||||||
pm = pml[i];
|
pm = pml[i];
|
||||||
|
@ -227,7 +227,7 @@ ConfigurationLoad(void)
|
||||||
for (j = 0; j < ncl; j++)
|
for (j = 0; j < ncl; j++)
|
||||||
CfgItemLoad(ecf, pm->name, pcl + j);
|
CfgItemLoad(ecf, pm->name, pcl + j);
|
||||||
}
|
}
|
||||||
ModuleListFree(pml);
|
MODULE_LIST_FREE(pml);
|
||||||
|
|
||||||
if (ecf)
|
if (ecf)
|
||||||
e16_db_close(ecf);
|
e16_db_close(ecf);
|
||||||
|
@ -250,7 +250,7 @@ ConfigurationSave(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Load module configs */
|
/* Load module configs */
|
||||||
pml = ModuleListGet(&nml);
|
MODULE_LIST_GET(pml, nml);
|
||||||
for (i = 0; i < nml; i++)
|
for (i = 0; i < nml; i++)
|
||||||
{
|
{
|
||||||
pm = pml[i];
|
pm = pml[i];
|
||||||
|
@ -259,7 +259,7 @@ ConfigurationSave(void)
|
||||||
for (j = 0; j < ncl; j++)
|
for (j = 0; j < ncl; j++)
|
||||||
CfgItemSave(ecf, pm->name, pcl + j);
|
CfgItemSave(ecf, pm->name, pcl + j);
|
||||||
}
|
}
|
||||||
ModuleListFree(pml);
|
MODULE_LIST_FREE(pml);
|
||||||
|
|
||||||
e16_db_close(ecf);
|
e16_db_close(ecf);
|
||||||
e16_db_flush();
|
e16_db_flush();
|
||||||
|
|
|
@ -32,18 +32,6 @@ EModuleRegister(EModule * em)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const EModule *const *
|
|
||||||
ModuleListGet(int *num)
|
|
||||||
{
|
|
||||||
*num = n_modules;
|
|
||||||
return p_modules;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ModuleListFree(const EModule * const *lst __UNUSED__)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static const EModule *
|
static const EModule *
|
||||||
EModuleFind(const char *name)
|
EModuleFind(const char *name)
|
||||||
{
|
{
|
||||||
|
@ -191,11 +179,11 @@ ModulesConfigShow(void)
|
||||||
const EModule *const *pml;
|
const EModule *const *pml;
|
||||||
|
|
||||||
/* Load module configs */
|
/* Load module configs */
|
||||||
pml = ModuleListGet(&nml);
|
MODULE_LIST_GET(pml, nml);
|
||||||
for (i = 0; i < nml; i++)
|
for (i = 0; i < nml; i++)
|
||||||
{
|
{
|
||||||
/* Somewhat inefficient but ... later */
|
/* Somewhat inefficient but ... later */
|
||||||
ModuleConfigShow(pml[i]->name, NULL);
|
ModuleConfigShow(pml[i]->name, NULL);
|
||||||
}
|
}
|
||||||
ModuleListFree(pml);
|
MODULE_LIST_FREE(pml);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,8 +69,9 @@ void EModuleRegister(EModule * em);
|
||||||
extern const EModule *const p_modules[];
|
extern const EModule *const p_modules[];
|
||||||
extern int n_modules;
|
extern int n_modules;
|
||||||
|
|
||||||
const EModule *const *ModuleListGet(int *num);
|
#define MODULE_LIST_GET(lst, num) \
|
||||||
void ModuleListFree(const EModule * const *lst);
|
do { lst = p_modules; num = n_modules; } while (0)
|
||||||
|
#define MODULE_LIST_FREE(lst)
|
||||||
|
|
||||||
int ModuleConfigSet(const char *name, const char *item,
|
int ModuleConfigSet(const char *name, const char *item,
|
||||||
const char *params);
|
const char *params);
|
||||||
|
|
Loading…
Reference in New Issue