#include "helpmod_entries.h"
#include "helpmod_alias.h"
-#include "../core/error.c"
+#include "../core/error.h"
#include "helpmod.h"
struct helpmod_parsed_line_struct helpmod_parsed_line;
int helpmod_valid_selection(helpmod_entry state, int selection)
{
if (selection == -1)
- return ((int)state->parent);
+ return ((int)((long)state->parent));
return (selection >= 0 && selection < state->option_count);
}
return;
if (*buffer == '$')
{
- helpmod_base->options = (helpmod_entry*)realloc(helpmod_base->options, sizeof(helpmod_entry) * ++helpmod_base->option_count);
- helpmod_base->options[helpmod_base->option_count-1] = NULL;
/* remove the \n, it's not wanted */
for (i=0;i<strlen(buffer+1);i++)
if ((buffer+1)[i] == '\n')
Error("helpmod", ERR_ERROR, "File %s specified in %s not found",buffer+1, setting_file);
return;
}
+ helpmod_base->options = (helpmod_entry*)realloc(helpmod_base->options, sizeof(helpmod_entry) * ++helpmod_base->option_count);
+ helpmod_base->options[helpmod_base->option_count-1] = NULL;
+
helpmod_parse_line(tmp_input);
helpmod_load_entry(&helpmod_base->options[helpmod_base->option_count-1], tmp_input, 0, helpmod_base);
fclose(tmp_input);