From 23947e3030131facc78c00aaf20932cb9f599cec Mon Sep 17 00:00:00 2001 From: reinelt Date: Fri, 4 Nov 2005 04:53:10 +0000 Subject: [lcd4linux @ 2005-11-04 04:53:08 by reinelt] sample plugin activated git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@591 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- Makefile.am | 1 + Makefile.in | 14 +++++++------- config.h.in | 3 +++ configure | 12 ++++++++++++ plugin.c | 13 ++++++++++++- plugin_sample.c | 19 +++++++++++-------- plugins.m4 | 8 ++++++++ 7 files changed, 54 insertions(+), 16 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5ddf73e..32aea13 100644 --- a/Makefile.am +++ b/Makefile.am @@ -95,6 +95,7 @@ plugin_pop3.c \ plugin_ppp.c \ plugin_proc_stat.c \ plugin_python.c \ +plugin_sample.c \ plugin_seti.c \ plugin_statfs.c \ plugin_uname.c \ diff --git a/Makefile.in b/Makefile.in index 5cdaf4f..1a09f2c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -104,7 +104,7 @@ lcd4linux_DEPENDENCIES = @DRIVERS@ @PLUGINS@ lcd4linux_SOURCES = lcd4linux.c cfg.c cfg.h debug.c debug.h drv.c drv.h evaluator.c evaluator.h hash.c hash.h layout.c layout.h pid.c pid.h timer.c timer.h thread.c thread.h udelay.c udelay.h qprintf.c qprintf.h widget.c widget.h widget_text.c widget_text.h widget_bar.c widget_bar.h widget_icon.c widget_icon.h plugin.c plugin.h plugin_cfg.c plugin_math.c plugin_string.c plugin_test.c plugin_time.c -EXTRA_lcd4linux_SOURCES = drv_generic_text.c drv_generic_text.h drv_generic_graphic.c drv_generic_graphic.h drv_generic_serial.c drv_generic_serial.h drv_generic_parport.c drv_generic_parport.h drv_generic_i2c.c drv_generic_i2c.h drv_BeckmannEgle.c drv_BWCT.c drv_Crystalfontz.c drv_Curses.c drv_Cwlinux.c drv_HD44780.c drv_Image.c drv_LCDLinux.c drv_LCDLinux.h drv_LCDTerm.c drv_LPH7508.c drv_M50530.c drv_MatrixOrbital.c drv_MilfordInstruments.c drv_Noritake.c drv_NULL.c drv_RouterBoard.c drv_serdisplib.c drv_SimpleLCD.c drv_T6963.c drv_Trefon.c drv_USBLCD.c drv_WincorNixdorf.c drv_X11.c font_6x8.h lcd4linux_i2c.h plugin_apm.c plugin_cpuinfo.c plugin_diskstats.c plugin_dvb.c plugin_exec.c plugin_i2c_sensors.c plugin_imon.c plugin_isdn.c plugin_loadavg.c plugin_meminfo.c plugin_mysql.c plugin_netdev.c plugin_pop3.c plugin_ppp.c plugin_proc_stat.c plugin_python.c plugin_seti.c plugin_statfs.c plugin_uname.c plugin_uptime.c plugin_wireless.c plugin_xmms.c +EXTRA_lcd4linux_SOURCES = drv_generic_text.c drv_generic_text.h drv_generic_graphic.c drv_generic_graphic.h drv_generic_serial.c drv_generic_serial.h drv_generic_parport.c drv_generic_parport.h drv_generic_i2c.c drv_generic_i2c.h drv_BeckmannEgle.c drv_BWCT.c drv_Crystalfontz.c drv_Curses.c drv_Cwlinux.c drv_HD44780.c drv_Image.c drv_LCDLinux.c drv_LCDLinux.h drv_LCDTerm.c drv_LPH7508.c drv_M50530.c drv_MatrixOrbital.c drv_MilfordInstruments.c drv_Noritake.c drv_NULL.c drv_RouterBoard.c drv_serdisplib.c drv_SimpleLCD.c drv_T6963.c drv_Trefon.c drv_USBLCD.c drv_WincorNixdorf.c drv_X11.c font_6x8.h lcd4linux_i2c.h plugin_apm.c plugin_cpuinfo.c plugin_diskstats.c plugin_dvb.c plugin_exec.c plugin_i2c_sensors.c plugin_imon.c plugin_isdn.c plugin_loadavg.c plugin_meminfo.c plugin_mysql.c plugin_netdev.c plugin_pop3.c plugin_ppp.c plugin_proc_stat.c plugin_python.c plugin_sample.c plugin_seti.c plugin_statfs.c plugin_uname.c plugin_uptime.c plugin_wireless.c plugin_xmms.c EXTRA_DIST = lcd4linux.conf.sample lcd4kde.conf lcd4linux.kdelnk lcd4linux.xpm lcd4linux.lsm curses.m4 AUTHORS CREDITS FAQ NEWS TODO README README.Drivers README.Plugins README.KDE plugin_sample.c @@ -159,12 +159,12 @@ DEP_FILES = .deps/cfg.P .deps/debug.P .deps/drv.P .deps/drv_BWCT.P \ .deps/plugin_isdn.P .deps/plugin_loadavg.P .deps/plugin_math.P \ .deps/plugin_meminfo.P .deps/plugin_mysql.P .deps/plugin_netdev.P \ .deps/plugin_pop3.P .deps/plugin_ppp.P .deps/plugin_proc_stat.P \ -.deps/plugin_python.P .deps/plugin_seti.P .deps/plugin_statfs.P \ -.deps/plugin_string.P .deps/plugin_test.P .deps/plugin_time.P \ -.deps/plugin_uname.P .deps/plugin_uptime.P .deps/plugin_wireless.P \ -.deps/plugin_xmms.P .deps/qprintf.P .deps/thread.P .deps/timer.P \ -.deps/udelay.P .deps/widget.P .deps/widget_bar.P .deps/widget_icon.P \ -.deps/widget_text.P +.deps/plugin_python.P .deps/plugin_sample.P .deps/plugin_seti.P \ +.deps/plugin_statfs.P .deps/plugin_string.P .deps/plugin_test.P \ +.deps/plugin_time.P .deps/plugin_uname.P .deps/plugin_uptime.P \ +.deps/plugin_wireless.P .deps/plugin_xmms.P .deps/qprintf.P \ +.deps/thread.P .deps/timer.P .deps/udelay.P .deps/widget.P \ +.deps/widget_bar.P .deps/widget_icon.P .deps/widget_text.P SOURCES = $(lcd4linux_SOURCES) $(EXTRA_lcd4linux_SOURCES) OBJECTS = $(lcd4linux_OBJECTS) diff --git a/config.h.in b/config.h.in index 36fae5b..c268294 100644 --- a/config.h.in +++ b/config.h.in @@ -293,6 +293,9 @@ /* python plugin */ #undef PLUGIN_PYTHON +/* sample plugin */ +#undef PLUGIN_SAMPLE + /* seti plugin */ #undef PLUGIN_SETI diff --git a/configure b/configure index b3f4344..eca8f7a 100755 --- a/configure +++ b/configure @@ -6553,6 +6553,7 @@ echo "$as_me: error: run ./configure --with-plugins=..." >&2;} PLUGIN_PPP="yes" PLUGIN_PROC_STAT="yes" PLUGIN_PYTHON=$with_python + PLUGIN_SAMPLE="yes" PLUGIN_SETI="yes" PLUGIN_STATFS="yes" PLUGIN_UNAME="yes" @@ -6608,6 +6609,9 @@ echo "$as_me: error: run ./configure --with-plugins=..." >&2;} python) PLUGIN_PYTHON=$val ;; + sample) + PLUGIN_SAMPLE=$val + ;; seti) PLUGIN_SETI=$val ;; @@ -7473,6 +7477,14 @@ _ACEOF fi fi +fi +if test "$PLUGIN_SAMPLE" = "yes"; then + PLUGINS="$PLUGINS plugin_sample.o" + +cat >>confdefs.h <<\_ACEOF +#define PLUGIN_SAMPLE 1 +_ACEOF + fi if test "$PLUGIN_SETI" = "yes"; then PLUGINS="$PLUGINS plugin_seti.o" diff --git a/plugin.c b/plugin.c index 5f69b56..961b1fa 100644 --- a/plugin.c +++ b/plugin.c @@ -1,4 +1,4 @@ -/* $Id: plugin.c,v 1.38 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin.c,v 1.39 2005/11/04 04:53:10 reinelt Exp $ * * plugin handler for the Evaluator * @@ -23,6 +23,9 @@ * * * $Log: plugin.c,v $ + * Revision 1.39 2005/11/04 04:53:10 reinelt + * sample plugin activated + * * Revision 1.38 2005/05/08 04:32:44 reinelt * CodingStyle added and applied * @@ -246,6 +249,8 @@ int plugin_init_proc_stat(void); void plugin_exit_proc_stat(void); int plugin_init_python(void); void plugin_exit_python(void); +int plugin_init_sample(void); +void plugin_exit_sample(void); int plugin_init_seti(void); void plugin_exit_seti(void); int plugin_init_statfs(void); @@ -316,6 +321,9 @@ int plugin_init(void) #ifdef PLUGIN_PYTHON plugin_init_python(); #endif +#ifdef PLUGIN_SAMPLE + plugin_init_sample(); +#endif #ifdef PLUGIN_SETI plugin_init_seti(); #endif @@ -389,6 +397,9 @@ void plugin_exit(void) #ifdef PLUGIN_PYTHON plugin_exit_python(); #endif +#ifdef PLUGIN_SAMPLE + plugin_exit_sample(); +#endif #ifdef PLUGIN_SETI plugin_exit_seti(); #endif diff --git a/plugin_sample.c b/plugin_sample.c index 3c80e35..c1f9077 100644 --- a/plugin_sample.c +++ b/plugin_sample.c @@ -1,4 +1,4 @@ -/* $Id: plugin_sample.c,v 1.10 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: plugin_sample.c,v 1.11 2005/11/04 04:53:10 reinelt Exp $ * * plugin template * @@ -23,6 +23,9 @@ * * * $Log: plugin_sample.c,v $ + * Revision 1.11 2005/11/04 04:53:10 reinelt + * sample plugin activated + * * Revision 1.10 2005/05/08 04:32:45 reinelt * CodingStyle added and applied * @@ -246,13 +249,13 @@ int plugin_init_sample(void) /* register all our cool functions */ /* the second parameter is the number of arguments */ /* -1 stands for variable argument list */ - AddFunction("mul2", 1, my_mul2); - AddFunction("mul3", 1, my_mul3); - AddFunction("answer", 0, my_answer); - AddFunction("diff", 2, my_diff); - AddFunction("length", 1, my_length); - AddFunction("upcase", 1, my_upcase); - AddFunction("concat", -1, my_concat); + AddFunction("sample::mul2", 1, my_mul2); + AddFunction("sample::mul3", 1, my_mul3); + AddFunction("sample::answer", 0, my_answer); + AddFunction("sample::diff", 2, my_diff); + AddFunction("sample::length", 1, my_length); + AddFunction("sample::upcase", 1, my_upcase); + AddFunction("sample::concat", -1, my_concat); return 0; } diff --git a/plugins.m4 b/plugins.m4 index 03959e2..3d5dc7a 100644 --- a/plugins.m4 +++ b/plugins.m4 @@ -65,6 +65,7 @@ for plugin in $plugins; do PLUGIN_PPP="yes" PLUGIN_PROC_STAT="yes" PLUGIN_PYTHON=$with_python + PLUGIN_SAMPLE="yes" PLUGIN_SETI="yes" PLUGIN_STATFS="yes" PLUGIN_UNAME="yes" @@ -120,6 +121,9 @@ for plugin in $plugins; do python) PLUGIN_PYTHON=$val ;; + sample) + PLUGIN_SAMPLE=$val + ;; seti) PLUGIN_SETI=$val ;; @@ -244,6 +248,10 @@ if test "$PLUGIN_PYTHON" = "yes"; then fi fi fi +if test "$PLUGIN_SAMPLE" = "yes"; then + PLUGINS="$PLUGINS plugin_sample.o" + AC_DEFINE(PLUGIN_SAMPLE,1,[sample plugin]) +fi if test "$PLUGIN_SETI" = "yes"; then PLUGINS="$PLUGINS plugin_seti.o" AC_DEFINE(PLUGIN_SETI,1,[seti plugin]) -- cgit v1.2.3