mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[win32] Added cmdline option 'delete-timer-queue'
When --delete-timer-queue 1, the timer queue is deleted. I've got no better idea. Options are started after osdep init. I can init timer later, but it also ugly. It seems that this timer code is not done right, and cause slowdowns and crashes.
This commit is contained in:
parent
054129e0e9
commit
7613a0d0bc
@ -879,6 +879,12 @@ union option_info cmdline_options_info[] = {
|
|||||||
"be ignored. It forces use of default keybindings and will "
|
"be ignored. It forces use of default keybindings and will "
|
||||||
"reset user-defined ones on save.")),
|
"reset user-defined ones on save.")),
|
||||||
|
|
||||||
|
INIT_OPT_BOOL("", N_("Delete timer queue"),
|
||||||
|
"delete-timer-queue", OPT_ZERO, 0,
|
||||||
|
N_("Whether to delete timer queue under Windows. "
|
||||||
|
"When QuickJS is enabled on Win32, you can enable this option to disable "
|
||||||
|
"js execution timeouts.")),
|
||||||
|
|
||||||
INIT_OPT_BOOL("", N_("Print formatted versions of given URLs to stdout"),
|
INIT_OPT_BOOL("", N_("Print formatted versions of given URLs to stdout"),
|
||||||
"dump", OPT_ZERO, 0,
|
"dump", OPT_ZERO, 0,
|
||||||
N_("Print formatted plain-text versions of given URLs to "
|
N_("Print formatted plain-text versions of given URLs to "
|
||||||
|
@ -156,6 +156,12 @@ init(void)
|
|||||||
init_modules(main_modules);
|
init_modules(main_modules);
|
||||||
|
|
||||||
init_options();
|
init_options();
|
||||||
|
|
||||||
|
#if defined(CONFIG_OS_WIN32) && defined(CONFIG_QUICKJS)
|
||||||
|
if (get_cmd_opt_bool("delete-timer-queue")) {
|
||||||
|
delete_timer_queue();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
init_static_version();
|
init_static_version();
|
||||||
|
|
||||||
register_modules_options(main_modules);
|
register_modules_options(main_modules);
|
||||||
|
@ -91,14 +91,22 @@ init_osdep(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
terminate_osdep(void)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_QUICKJS
|
#ifdef CONFIG_QUICKJS
|
||||||
|
void
|
||||||
|
delete_timer_queue(void)
|
||||||
|
{
|
||||||
if (hTimerQueue) {
|
if (hTimerQueue) {
|
||||||
DeleteTimerQueue(hTimerQueue);
|
DeleteTimerQueue(hTimerQueue);
|
||||||
hTimerQueue = NULL;
|
hTimerQueue = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
terminate_osdep(void)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_QUICKJS
|
||||||
|
delete_timer_queue();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#ifndef EL__OSDEP_WIN32_WIN32_H
|
#ifndef EL__OSDEP_WIN32_WIN32_H
|
||||||
#define EL__OSDEP_WIN32_WIN32_H
|
#define EL__OSDEP_WIN32_WIN32_H
|
||||||
|
|
||||||
@ -20,6 +19,9 @@ void open_in_new_win32(struct terminal *term, char *exe_name,
|
|||||||
char *user_appdata_directory(void);
|
char *user_appdata_directory(void);
|
||||||
#define user_appdata_directory user_appdata_directory
|
#define user_appdata_directory user_appdata_directory
|
||||||
|
|
||||||
|
#ifdef CONFIG_QUICKJS
|
||||||
|
void delete_timer_queue();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Stub functions: */
|
/* Stub functions: */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user