urlhist.c
来自「一个很有名的浏览器」· C语言 代码 · 共 60 行
C
60 行
/* Manipulation with file containing URL history *//* $Id: urlhist.c,v 1.35 2004/11/19 16:42:35 zas Exp $ */#ifdef HAVE_CONFIG_H#include "config.h"#endif#include "elinks.h"#include "bfu/dialog.h"#include "config/urlhist.h"#include "sched/event.h"#include "util/lists.h"#include "util/memory.h"#define GOTO_HISTORY_FILENAME "gotohist"INIT_INPUT_HISTORY(goto_url_history);static voidload_url_history(void){ load_input_history(&goto_url_history, GOTO_HISTORY_FILENAME);}static voidsave_url_history(void){ save_input_history(&goto_url_history, GOTO_HISTORY_FILENAME);}static enum evhook_statusgoto_url_history_write_hook(va_list ap, void *data){ save_url_history(); return EVENT_HOOK_STATUS_NEXT;}struct event_hook_info goto_url_history_hooks[] = { { "periodic-saving", goto_url_history_write_hook, NULL }, NULL_EVENT_HOOK_INFO,};voidinit_url_history(void){ load_url_history(); register_event_hooks(goto_url_history_hooks);}voiddone_url_history(void){ unregister_event_hooks(goto_url_history_hooks); save_url_history(); free_list(goto_url_history.entries);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?