0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-09-21 19:46:23 -04:00

[console.log] Global variable to store console_log_filename

This commit is contained in:
Witold Filipczyk
2021-02-22 15:55:12 +01:00
parent 4db2b42799
commit bc7a1ae6ad
3 changed files with 12 additions and 8 deletions

View File

@@ -71,6 +71,8 @@ static int interpreter_count;
static INIT_LIST_OF(struct string_list_item, allowed_urls);
char *console_log_filename;
static int
is_prefix(char *prefix, char *url, int dl)
{
@@ -449,12 +451,17 @@ static void
init_ecmascript_module(struct module *module)
{
read_url_list();
if (elinks_home) {
console_log_filename = straconcat(elinks_home, "/console.log", NULL);
}
}
static void
done_ecmascript_module(struct module *module)
{
free_string_list(&allowed_urls);
mem_free_if(console_log_filename);
}
static struct module *ecmascript_modules[] = {
@@ -464,8 +471,6 @@ static struct module *ecmascript_modules[] = {
NULL,
};
struct module ecmascript_module = struct_module(
/* name: */ N_("ECMAScript"),
/* options: */ ecmascript_options,