parser.c parser.h \
processor.c processor.h \
evaluator.c evaluator.h \
-client.c client.h \
+plugin.c plugin.h \
system.c system.h \
isdn.c isdn.h \
wifi.c wifi.h \
lcd4linux_LDFLAGS = $(X_LIBS)
lcd4linux_LDADD = liblcd4linux.la @DRVLIBS@
-lcd4linux_SOURCES = lcd4linux.c pid.c pid.h parser.c parser.h processor.c processor.h evaluator.c evaluator.h client.c client.h system.c system.h isdn.c isdn.h wifi.c wifi.h mail.c mail.h seti.c seti.h battery.c battery.h dvb.c dvb.h filter.c filter.h widget.c widget.h exec.c exec.h mail2.c socket.c socket.h imon.c imon.h
+lcd4linux_SOURCES = lcd4linux.c pid.c pid.h parser.c parser.h processor.c processor.h evaluator.c evaluator.h plugin.c plugin.h system.c system.h isdn.c isdn.h wifi.c wifi.h mail.c mail.h seti.c seti.h battery.c battery.h dvb.c dvb.h filter.c filter.h widget.c widget.h exec.c exec.h mail2.c socket.c socket.h imon.c imon.h
liblcd4linux_la_DEPENDENCIES = @DRIVERS@
PROGRAMS = $(bin_PROGRAMS)
lcd4linux_OBJECTS = lcd4linux.$(OBJEXT) pid.$(OBJEXT) parser.$(OBJEXT) \
-processor.$(OBJEXT) evaluator.$(OBJEXT) client.$(OBJEXT) \
+processor.$(OBJEXT) evaluator.$(OBJEXT) plugin.$(OBJEXT) \
system.$(OBJEXT) isdn.$(OBJEXT) wifi.$(OBJEXT) mail.$(OBJEXT) \
seti.$(OBJEXT) battery.$(OBJEXT) dvb.$(OBJEXT) filter.$(OBJEXT) \
widget.$(OBJEXT) exec.$(OBJEXT) mail2.$(OBJEXT) socket.$(OBJEXT) \
.deps/HD44780.P .deps/M50530.P .deps/MatrixOrbital.P \
.deps/MilfordInstruments.P .deps/PalmPilot.P .deps/Raster.P .deps/SIN.P \
.deps/Skeleton.P .deps/T6963.P .deps/Text.P .deps/USBLCD.P \
-.deps/XWindow.P .deps/bar.P .deps/battery.P .deps/cfg.P .deps/client.P \
-.deps/debug.P .deps/display.P .deps/dvb.P .deps/evaluator.P \
-.deps/exec.P .deps/filter.P .deps/fontmap.P .deps/icon.P .deps/imon.P \
-.deps/isdn.P .deps/lcd4linux.P .deps/lock.P .deps/mail.P .deps/mail2.P \
+.deps/XWindow.P .deps/bar.P .deps/battery.P .deps/cfg.P .deps/debug.P \
+.deps/display.P .deps/dvb.P .deps/evaluator.P .deps/exec.P \
+.deps/filter.P .deps/fontmap.P .deps/icon.P .deps/imon.P .deps/isdn.P \
+.deps/lcd4linux.P .deps/lock.P .deps/mail.P .deps/mail2.P \
.deps/parport.P .deps/parser.P .deps/pid.P .deps/pixmap.P \
-.deps/processor.P .deps/seti.P .deps/socket.P .deps/system.P \
-.deps/udelay.P .deps/widget.P .deps/wifi.P
+.deps/plugin.P .deps/processor.P .deps/seti.P .deps/socket.P \
+.deps/system.P .deps/udelay.P .deps/widget.P .deps/wifi.P
SOURCES = $(liblcd4linux_la_SOURCES) $(lcd4linux_SOURCES) $(EXTRA_lcd4linux_SOURCES)
OBJECTS = $(liblcd4linux_la_OBJECTS) $(lcd4linux_OBJECTS)
-/* $Id: MatrixOrbital.c,v 1.48 2003/11/16 09:45:49 reinelt Exp $
+/* $Id: MatrixOrbital.c,v 1.49 2003/12/19 05:35:14 reinelt Exp $
*
* driver for Matrix Orbital serial display modules
*
*
*
* $Log: MatrixOrbital.c,v $
+ * Revision 1.49 2003/12/19 05:35:14 reinelt
+ * renamed 'client' to 'plugin'
+ *
* Revision 1.48 2003/11/16 09:45:49 reinelt
* Crystalfontz changes, small glitch in getopt() fixed
*
#include "debug.h"
#include "cfg.h"
-#include "client.h"
+#include "plugin.h"
#include "lock.h"
#include "display.h"
#include "bar.h"
}
-static void client_contrast (RESULT *result, RESULT *arg1)
+static void plugin_contrast (RESULT *result, RESULT *arg1)
{
char buffer[4];
double contrast;
}
-static void client_backlight (RESULT *result, RESULT *arg1)
+static void plugin_backlight (RESULT *result, RESULT *arg1)
{
char buffer[4];
double backlight;
}
-static void client_gpo (RESULT *result, RESULT *arg1, RESULT *arg2)
+static void plugin_gpo (RESULT *result, RESULT *arg1, RESULT *arg2)
{
int num;
double val;
}
-static void client_pwm (RESULT *result, RESULT *arg1, RESULT *arg2)
+static void plugin_pwm (RESULT *result, RESULT *arg1, RESULT *arg2)
{
int num;
double val;
}
-static void client_rpm (RESULT *result, RESULT *arg1)
+static void plugin_rpm (RESULT *result, RESULT *arg1)
{
int num;
double val;
MO_write ("\376D", 2); // line wrapping off
MO_write ("\376R", 2); // auto scroll off
- // register as a client
- AddFunction ("contrast", 1, client_contrast);
- AddFunction ("backlight", 1, client_backlight);
- AddFunction ("gpo", 2, client_gpo);
- AddFunction ("pwm", 2, client_pwm);
- AddFunction ("rpm", 1, client_rpm);
+ // register as a plugin
+ AddFunction ("contrast", 1, plugin_contrast);
+ AddFunction ("backlight", 1, plugin_backlight);
+ AddFunction ("gpo", 2, plugin_gpo);
+ AddFunction ("pwm", 2, plugin_pwm);
+ AddFunction ("rpm", 1, plugin_rpm);
return 0;
}
-/* $Id: cfg.c,v 1.18 2003/10/11 06:01:52 reinelt Exp $^
+/* $Id: cfg.c,v 1.19 2003/12/19 05:35:14 reinelt Exp $^
*
* config file stuff
*
*
*
* $Log: cfg.c,v $
+ * Revision 1.19 2003/12/19 05:35:14 reinelt
+ * renamed 'client' to 'plugin'
+ *
* Revision 1.18 2003/10/11 06:01:52 reinelt
*
* renamed expression.{c,h} to client.{c,h}
#include "debug.h"
#include "cfg.h"
-#include "client.h"
+#include "plugin.h"
typedef struct {
char *key;
}
-static void cfg_client (RESULT *result, RESULT *arg1)
+static void cfg_plugin (RESULT *result, RESULT *arg1)
{
char *value=cfg_get(R2S(arg1), "");
SetResult(&result, R_STRING, value);
}
fclose (stream);
- // register as a client
- AddFunction ("cfg", 1, cfg_client);
+ // register as a plugin
+ AddFunction ("cfg", 1, cfg_plugin);
return 0;
}
+++ /dev/null
-/* $Id: client.c,v 1.1 2003/10/11 06:01:52 reinelt Exp $
- *
- * client function handling
- *
- * Copyright 2003 Michael Reinelt <reinelt@eunet.at>
- *
- * This file is part of LCD4Linux.
- *
- * LCD4Linux is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * LCD4Linux is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *
- * $Log: client.c,v $
- * Revision 1.1 2003/10/11 06:01:52 reinelt
- *
- * renamed expression.{c,h} to client.{c,h}
- * added config file client
- * new functions 'AddNumericVariable()' and 'AddStringVariable()'
- * new parameter '-i' for interactive mode
- *
- * Revision 1.3 2003/10/06 05:51:15 reinelt
- * functions: min(), max()
- *
- * Revision 1.2 2003/10/06 05:47:27 reinelt
- * operators: ==, \!=, <=, >=
- *
- * Revision 1.1 2003/10/06 04:34:06 reinelt
- * expression evaluator added
- *
- */
-
-/*
- * exported functions:
- *
- * int Client_init (void)
- * initializes the expression evaluator
- * adds some handy constants and functions
- *
- */
-
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <math.h>
-#include <string.h>
-
-#include "debug.h"
-#include "client.h"
-
-
-
-static void my_sqrt (RESULT *result, RESULT *arg1)
-{
- double value=sqrt(R2N(arg1));
- SetResult(&result, R_NUMBER, &value);
-}
-
-static void my_exp (RESULT *result, RESULT *arg1)
-{
- double value=exp(R2N(arg1));
- SetResult(&result, R_NUMBER, &value);
-}
-
-static void my_ln (RESULT *result, RESULT *arg1)
-{
- double value=log(R2N(arg1));
- SetResult(&result, R_NUMBER, &value);
-}
-
-static void my_log (RESULT *result, RESULT *arg1)
-{
- double value=log10(R2N(arg1));
- SetResult(&result, R_NUMBER, &value);
-}
-
-static void my_sin (RESULT *result, RESULT *arg1)
-{
- double value=sin(R2N(arg1));
- SetResult(&result, R_NUMBER, &value);
-}
-
-static void my_cos (RESULT *result, RESULT *arg1)
-{
- double value=cos(R2N(arg1));
- SetResult(&result, R_NUMBER, &value);
-}
-
-static void my_tan (RESULT *result, RESULT *arg1)
-{
- double value=tan(R2N(arg1));
- SetResult(&result, R_NUMBER, &value);
-}
-
-
-static void my_min (RESULT *result, RESULT *arg1, RESULT *arg2)
-{
- double a1=R2N(arg1);
- double a2=R2N(arg2);
- double value=a1<a2?a1:a2;
- SetResult(&result, R_NUMBER, &value);
-}
-
-static void my_max (RESULT *result, RESULT *arg1, RESULT *arg2)
-{
- double a1=R2N(arg1);
- double a2=R2N(arg2);
- double value=a1>a2?a1:a2;
- SetResult(&result, R_NUMBER, &value);
-}
-
-
-static void my_strlen (RESULT *result, RESULT *arg1)
-{
- double value=strlen(R2S(arg1));
- SetResult(&result, R_NUMBER, &value);
-}
-
-
-int client_init (void)
-{
- // set some handy constants
- AddNumericVariable ("Pi", M_PI);
- AddNumericVariable ("e", M_E);
-
- // register some basic math functions
- AddFunction ("sqrt", 1, my_sqrt);
- AddFunction ("exp", 1, my_exp);
- AddFunction ("ln", 1, my_ln);
- AddFunction ("log", 1, my_log);
- AddFunction ("sin", 1, my_sin);
- AddFunction ("cos", 1, my_cos);
- AddFunction ("tan", 1, my_tan);
-
- // min, max
- AddFunction ("min", 2, my_min);
- AddFunction ("max", 2, my_max);
-
- // register some basic string functions
- AddFunction ("strlen", 1, my_strlen);
-
-
- return 0;
-}
-
-
+++ /dev/null
-/* $Id: client.h,v 1.1 2003/10/11 06:01:52 reinelt Exp $
- *
- * client function handling
- *
- * Copyright 2003 Michael Reinelt <reinelt@eunet.at>
- *
- * This file is part of LCD4Linux.
- *
- * LCD4Linux is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * LCD4Linux is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *
- * $Log: client.h,v $
- * Revision 1.1 2003/10/11 06:01:52 reinelt
- *
- * renamed expression.{c,h} to client.{c,h}
- * added config file client
- * new functions 'AddNumericVariable()' and 'AddStringVariable()'
- * new parameter '-i' for interactive mode
- *
- * Revision 1.1 2003/10/06 04:34:06 reinelt
- * expression evaluator added
- *
- */
-
-
-#include "evaluator.h"
-
-#ifndef _CLIENT_H_
-#define _CLIENT_H_
-
-int client_init (void);
-
-#endif
-/* $Id: lcd4linux.c,v 1.52 2003/12/01 07:08:50 reinelt Exp $
+/* $Id: lcd4linux.c,v 1.53 2003/12/19 05:35:14 reinelt Exp $
*
* LCD4Linux
*
*
*
* $Log: lcd4linux.c,v $
+ * Revision 1.53 2003/12/19 05:35:14 reinelt
+ * renamed 'client' to 'plugin'
+ *
* Revision 1.52 2003/12/01 07:08:50 reinelt
*
* Patches from Xavier:
#include "udelay.h"
#include "display.h"
#include "processor.h"
-#include "client.h"
+#include "plugin.h"
#define PIDFILE "/var/run/lcd4linux.pid"
info ("invoked without full path; restart may not work!");
}
- if (client_init()==-1)
+ if (plugin_init()==-1)
exit (1);
if (cfg_init(cfg)==-1)
--- /dev/null
+/* $Id: plugin.c,v 1.1 2003/12/19 05:35:14 reinelt Exp $
+ *
+ * plugin handler for the Evaluator
+ *
+ * Copyright 2003 Michael Reinelt <reinelt@eunet.at>
+ *
+ * This file is part of LCD4Linux.
+ *
+ * LCD4Linux is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * LCD4Linux is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ * $Log: plugin.c,v $
+ * Revision 1.1 2003/12/19 05:35:14 reinelt
+ * renamed 'client' to 'plugin'
+ *
+ * Revision 1.1 2003/10/11 06:01:52 reinelt
+ *
+ * renamed expression.{c,h} to client.{c,h}
+ * added config file client
+ * new functions 'AddNumericVariable()' and 'AddStringVariable()'
+ * new parameter '-i' for interactive mode
+ *
+ * Revision 1.3 2003/10/06 05:51:15 reinelt
+ * functions: min(), max()
+ *
+ * Revision 1.2 2003/10/06 05:47:27 reinelt
+ * operators: ==, \!=, <=, >=
+ *
+ * Revision 1.1 2003/10/06 04:34:06 reinelt
+ * expression evaluator added
+ *
+ */
+
+/*
+ * exported functions:
+ *
+ * int plugin_init (void)
+ * initializes the expression evaluator
+ * adds some handy constants and functions
+ *
+ */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+
+#include "debug.h"
+#include "plugin.h"
+
+
+
+static void my_sqrt (RESULT *result, RESULT *arg1)
+{
+ double value=sqrt(R2N(arg1));
+ SetResult(&result, R_NUMBER, &value);
+}
+
+static void my_exp (RESULT *result, RESULT *arg1)
+{
+ double value=exp(R2N(arg1));
+ SetResult(&result, R_NUMBER, &value);
+}
+
+static void my_ln (RESULT *result, RESULT *arg1)
+{
+ double value=log(R2N(arg1));
+ SetResult(&result, R_NUMBER, &value);
+}
+
+static void my_log (RESULT *result, RESULT *arg1)
+{
+ double value=log10(R2N(arg1));
+ SetResult(&result, R_NUMBER, &value);
+}
+
+static void my_sin (RESULT *result, RESULT *arg1)
+{
+ double value=sin(R2N(arg1));
+ SetResult(&result, R_NUMBER, &value);
+}
+
+static void my_cos (RESULT *result, RESULT *arg1)
+{
+ double value=cos(R2N(arg1));
+ SetResult(&result, R_NUMBER, &value);
+}
+
+static void my_tan (RESULT *result, RESULT *arg1)
+{
+ double value=tan(R2N(arg1));
+ SetResult(&result, R_NUMBER, &value);
+}
+
+
+static void my_min (RESULT *result, RESULT *arg1, RESULT *arg2)
+{
+ double a1=R2N(arg1);
+ double a2=R2N(arg2);
+ double value=a1<a2?a1:a2;
+ SetResult(&result, R_NUMBER, &value);
+}
+
+static void my_max (RESULT *result, RESULT *arg1, RESULT *arg2)
+{
+ double a1=R2N(arg1);
+ double a2=R2N(arg2);
+ double value=a1>a2?a1:a2;
+ SetResult(&result, R_NUMBER, &value);
+}
+
+
+static void my_strlen (RESULT *result, RESULT *arg1)
+{
+ double value=strlen(R2S(arg1));
+ SetResult(&result, R_NUMBER, &value);
+}
+
+
+int plugin_init (void)
+{
+ // set some handy constants
+ AddNumericVariable ("Pi", M_PI);
+ AddNumericVariable ("e", M_E);
+
+ // register some basic math functions
+ AddFunction ("sqrt", 1, my_sqrt);
+ AddFunction ("exp", 1, my_exp);
+ AddFunction ("ln", 1, my_ln);
+ AddFunction ("log", 1, my_log);
+ AddFunction ("sin", 1, my_sin);
+ AddFunction ("cos", 1, my_cos);
+ AddFunction ("tan", 1, my_tan);
+
+ // min, max
+ AddFunction ("min", 2, my_min);
+ AddFunction ("max", 2, my_max);
+
+ // register some basic string functions
+ AddFunction ("strlen", 1, my_strlen);
+
+
+ return 0;
+}
+
+
--- /dev/null
+/* $Id: plugin.h,v 1.1 2003/12/19 05:35:14 reinelt Exp $
+ *
+ * plugin handler for the Evaluator
+ *
+ * Copyright 2003 Michael Reinelt <reinelt@eunet.at>
+ *
+ * This file is part of LCD4Linux.
+ *
+ * LCD4Linux is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * LCD4Linux is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ * $Log: plugin.h,v $
+ * Revision 1.1 2003/12/19 05:35:14 reinelt
+ * renamed 'client' to 'plugin'
+ *
+ * Revision 1.1 2003/10/11 06:01:52 reinelt
+ *
+ * renamed expression.{c,h} to client.{c,h}
+ * added config file client
+ * new functions 'AddNumericVariable()' and 'AddStringVariable()'
+ * new parameter '-i' for interactive mode
+ *
+ * Revision 1.1 2003/10/06 04:34:06 reinelt
+ * expression evaluator added
+ *
+ */
+
+
+#include "evaluator.h"
+
+#ifndef _PLUGIN_H_
+#define _PLUGIN_H_
+
+int plugin_init (void);
+
+#endif