1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-13 05:43:37 -04:00

Create a module for src/viewer, which subsumes some existing modules

as submodules
This commit is contained in:
Miciah Dashiel Butler Masters 2006-05-20 13:18:23 +00:00 committed by Miciah Dashiel Butler Masters
parent e91b46de5f
commit 7f312c546c
4 changed files with 42 additions and 9 deletions

View File

@ -29,9 +29,7 @@
#include "protocol/protocol.h"
#include "scripting/scripting.h"
#include "terminal/terminal.h"
#include "viewer/text/marks.h"
#include "viewer/text/search.h"
#include "viewer/timer.h"
#include "viewer/viewer.h"
struct module *main_modules[] = {
@ -44,10 +42,7 @@ struct module *main_modules[] = {
/* This is also used for version string composing so keep NULL terminated */
struct module *builtin_modules[] = {
&periodic_saving_module,
&timer_module,
#ifdef CONFIG_MARKS
&viewer_marks_module,
#endif
&viewer_module,
#ifdef CONFIG_CSS
&css_module,
#endif
@ -81,7 +76,6 @@ struct module *builtin_modules[] = {
&exmode_module,
#endif
&goto_url_history_module,
&search_history_module,
NULL
};

View File

@ -2,6 +2,6 @@ top_builddir=../..
include $(top_builddir)/Makefile.config
SUBDIRS = dump text
OBJS = action.o timer.o
OBJS = action.o timer.o viewer.o
include $(top_srcdir)/Makefile.lib

31
src/viewer/viewer.c Normal file
View File

@ -0,0 +1,31 @@
/* Viewer module */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "elinks.h"
#include "intl/gettext/libintl.h"
#include "main/module.h"
#include "viewer/text/marks.h"
#include "viewer/text/search.h"
#include "viewer/timer.h"
static struct module *viewer_submodules[] = {
&search_history_module,
&timer_module,
#ifdef CONFIG_MARKS
&viewer_marks_module,
#endif
};
struct module viewer_module = struct_module(
/* name: */ N_("Viewer"),
/* options: */ NULL,
/* hooks: */ NULL,
/* submodules: */ viewer_submodules,
/* data: */ NULL,
/* init: */ NULL,
/* done: */ NULL
);

8
src/viewer/viewer.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef EL__VIEWER_VIEWER_H
#define EL__VIEWER_VIEWER_H
struct module;
extern struct module viewer_module;
#endif