|
From: <mla...@us...> - 2006-11-11 14:00:32
|
Revision: 109
http://svn.sourceforge.net/g15daemon/?rev=109&view=rev
Author: mlampard
Date: 2006-11-11 06:00:14 -0800 (Sat, 11 Nov 2006)
Log Message:
-----------
remove built-in clock, add clock plugin.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/Makefile.am
trunk/g15daemon-wip/g15daemon/g15_plugins.c
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/linked_lists.c
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/g15daemon/utility_funcs.c
trunk/g15daemon-wip/plugins/Makefile.am
trunk/g15daemon-wip/plugins/Makefile.in
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2006-11-11 11:11:16 UTC (rev 108)
+++ trunk/g15daemon-wip/ChangeLog 2006-11-11 14:00:14 UTC (rev 109)
@@ -87,4 +87,10 @@
1.9.0SVN
- Add plugin API
- partially rewritten event core
+- updated g15daemon_xmms_spectrum plugin with new features, now enabled via configure --enable-xmmsplugin
+ xmms devel and glib devel packages will need to be installed prior to attempting ./configure --enable-xmmsplugin
+ Plugin is not compiled by default.
+- Clock is now a plugin
+
+
Modified: trunk/g15daemon-wip/Makefile.am
===================================================================
--- trunk/g15daemon-wip/Makefile.am 2006-11-11 11:11:16 UTC (rev 108)
+++ trunk/g15daemon-wip/Makefile.am 2006-11-11 14:00:14 UTC (rev 109)
@@ -2,7 +2,7 @@
SUBDIRS = libg15daemon_client g15daemon plugins g15daemon_xmms
INCLUDES = -I$(top_srcdir)/libg15daemon_client -I$(top_srcdir)/g15daemon
-EXTRA_DIST = debian contrib Documentation g15daemon_xmms lang-bindings patches rpm README.usage FAQ LICENSE
+EXTRA_DIST = debian contrib Documentation lang-bindings patches rpm README.usage FAQ LICENSE
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
doc_DATA = FAQ README.usage README ChangeLog TODO AUTHORS NEWS LICENSE
Modified: trunk/g15daemon-wip/g15daemon/g15_plugins.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15_plugins.c 2006-11-11 11:11:16 UTC (rev 108)
+++ trunk/g15daemon-wip/g15daemon/g15_plugins.c 2006-11-11 14:00:14 UTC (rev 109)
@@ -164,7 +164,7 @@
void * plugin_handle = NULL;
lcdlist_t *g15daemon_lcds = (lcdlist_t*)&displaylist;
-
+
pthread_t client_connection;
pthread_attr_t attr;
lcdnode_t *clientnode;
@@ -185,9 +185,17 @@
/* assign the generic eventhandler if the plugin doesnt provide one - the generic one does nothing atm. FIXME*/
if(plugin_args->info->event_handler==NULL)
plugin_args->info->event_handler = (void*)internal_generic_eventhandler;
-
+
+
if(plugin_args->type == G15_PLUGIN_LCD_CLIENT) {
- clientnode = lcdnode_add((void*)g15daemon_lcds);
+ lcdlist_t *foolist = (lcdlist_t*)displaylist;
+ /* FIXME we should just sort out the linked list stuff instead of overriding it */
+ if((lcdlist_t*)foolist->numclients>=1){
+ clientnode = lcdnode_add((void*)g15daemon_lcds);
+ }else {
+ clientnode = foolist->tail;
+ foolist->numclients++;
+ }
plugin_args->plugin_handle = plugin_handle;
memcpy(clientnode->lcd->g15plugin,plugin_args,sizeof(plugin_s));
plugin_args->args = clientnode;
@@ -197,7 +205,7 @@
{
plugin_args->args = displaylist;
plugin_args->plugin_handle = plugin_handle;
- }
+ }
memset(&attr,0,sizeof(pthread_attr_t));
pthread_attr_init(&attr);
@@ -205,8 +213,9 @@
pthread_attr_setstacksize(&attr,64*1024); /* set stack to 64k - dont need 8Mb */
if (pthread_create(&client_connection, &attr, (void*)plugin_thread, plugin_args) != 0) {
daemon_log(LOG_WARNING,"Unable to create client thread.");
+ } else {
+ pthread_detach(client_connection);
}
- pthread_detach(client_connection);
}
}
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-11 11:11:16 UTC (rev 108)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-11 14:00:14 UTC (rev 109)
@@ -183,7 +183,7 @@
lcdnode_t *current;
void *(*keyboard_handler)(void*);
struct passwd *nobody;
- int numclients;
+ unsigned long numclients;
}lcdlist_s;
pthread_mutex_t lcdlist_mutex;
Modified: trunk/g15daemon-wip/g15daemon/linked_lists.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-11 11:11:16 UTC (rev 108)
+++ trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-11 14:00:14 UTC (rev 109)
@@ -32,7 +32,6 @@
extern lcd_t *keyhandler;
extern unsigned int client_handles_keys;
extern plugin_info_t *generic_info;
-extern plugin_info_t *clock_info;
lcd_t * create_lcd () {
@@ -52,6 +51,7 @@
}
void quit_lcd (lcd_t * lcd) {
+ free (lcd->g15plugin);
free (lcd);
}
@@ -75,12 +75,13 @@
displaylist->head->lcd->mkey_state = 0;
displaylist->head->lcd->masterlist = displaylist;
/* first screen is the clock/menu */
- displaylist->head->lcd->g15plugin->info = (void*)&clock_info;
+ displaylist->head->lcd->g15plugin->info = NULL;
displaylist->head->prev = displaylist->head;
displaylist->head->next = displaylist->head;
displaylist->head->list = displaylist;
displaylist->keyboard_handler = NULL;
+ displaylist->numclients = 0;
pthread_mutex_unlock(&lcdlist_mutex);
return displaylist;
@@ -104,6 +105,7 @@
(*displaylist)->head = new;
(*displaylist)->head->list = *displaylist;
+ (*displaylist)->numclients++;
pthread_mutex_unlock(&lcdlist_mutex);
@@ -157,7 +159,7 @@
next = &oldnode->next;
quit_lcd(oldnode->lcd);
-
+ (unsigned int)(*display_list)->numclients--;
if((*display_list)->current == oldnode) {
if((*display_list)->current!=(*display_list)->head){
(*display_list)->current = oldnode->next;
@@ -187,7 +189,6 @@
}
void lcdlist_destroy(lcdlist_t **displaylist) {
-
int i = 0;
while ((*displaylist)->head != (*displaylist)->tail) {
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2006-11-11 11:11:16 UTC (rev 108)
+++ trunk/g15daemon-wip/g15daemon/main.c 2006-11-11 14:00:14 UTC (rev 109)
@@ -164,11 +164,6 @@
displaying = displaylist->current->lcd;
- if(displaylist->tail == displaylist->current){
- internal_lcdclock(displaying);
- displaying->mkey_state = 0;
- }
-
if(displaying->ident != lastlcd){
write_buf_to_g15(displaying);
lastlcd = displaying->ident;
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-11 11:11:16 UTC (rev 108)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-11 14:00:14 UTC (rev 109)
@@ -50,13 +50,6 @@
{G15_PLUGIN_NONE, "" , NULL, 0, NULL, NULL}
};
-/* if no exitfunc or eventhandler, member should be NULL */
-const plugin_info_t clock_info[] = {
- /* TYPE, name, initfunc, updatefreq, exitfunc, eventhandler */
- {G15_PLUGIN_LCD_CLIENT, "Clock", NULL, 0, NULL, (void*)internal_clock_eventhandler},
- {G15_PLUGIN_NONE, "" , NULL, 0, NULL, NULL}
-};
-
/* handy function from xine_utils.c */
void *g15_xmalloc(size_t size) {
void *ptr;
@@ -143,66 +136,3 @@
return G15_PLUGIN_OK;
}
-void internal_lcdclock(lcd_t *lcd)
-{
- unsigned int col = 0;
- unsigned int len=0;
- int narrows=0;
- int totalwidth=0;
- char buf[10];
-
- time_t currtime = time(NULL);
-
- if(lcd->ident < currtime - 60) {
- memset(lcd->buf,0,1024);
- memset(buf,0,10);
- strftime(buf,6,"%H:%M",localtime(&currtime));
-
- if(buf[0]==49)
- narrows=1;
-
- len = strlen(buf);
-
- if(narrows)
- totalwidth=(len*20)+(15);
- else
- totalwidth=len*20;
-
- for (col=0;col<len;col++) {
- draw_bignum (lcd, (80-(totalwidth)/2)+col*20, 1,(80-(totalwidth)/2)+(col+1)*20, LCD_HEIGHT, BLACK, buf[col]);
- }
- lcd->ident = currtime;
- }
-}
-
-/* TODO implement a menu for the clock screen */
-int internal_clock_eventhandler(plugin_event_t *myevent) {
-// lcd_t *lcd = (lcd_t*) myevent->lcd;
-
- switch (myevent->event)
- {
- case G15_EVENT_KEYPRESS:
-// printf("internal clock received keypress event : %i\n",myevent->value);
- break;
- case G15_EVENT_VISIBILITY_CHANGED:
- break;
- default:
- break;
- }
- return G15_PLUGIN_OK;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Modified: trunk/g15daemon-wip/plugins/Makefile.am
===================================================================
--- trunk/g15daemon-wip/plugins/Makefile.am 2006-11-11 11:11:16 UTC (rev 108)
+++ trunk/g15daemon-wip/plugins/Makefile.am 2006-11-11 14:00:14 UTC (rev 109)
@@ -2,7 +2,7 @@
METASOURCES = AUTO
libdir = /usr/share/g15daemon/plugins
-lib_LTLIBRARIES =g15plugin_uinput.la g15plugin_tcpserver.la
+lib_LTLIBRARIES =g15plugin_uinput.la g15plugin_tcpserver.la g15plugin_clock.la
INCLUDES = -I$(top_builddir)/libg15daemon_client/ -I$(top_builddir)/g15daemon
g15plugin_uinput_la_SOURCES = g15_plugin_uinput.c
@@ -10,3 +10,6 @@
g15plugin_tcpserver_la_SOURCES = g15_plugin_net.c
g15plugin_tcpserver_la_LDFLAGS = -avoid-version -module
+
+g15plugin_clock_la_SOURCES = g15_plugin_clock.c
+g15plugin_clock_la_LDFLAGS = -avoid-version -module
Modified: trunk/g15daemon-wip/plugins/Makefile.in
===================================================================
--- trunk/g15daemon-wip/plugins/Makefile.in 2006-11-11 11:11:16 UTC (rev 108)
+++ trunk/g15daemon-wip/plugins/Makefile.in 2006-11-11 14:00:14 UTC (rev 109)
@@ -54,6 +54,9 @@
am__installdirs = "$(DESTDIR)$(libdir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
+g15plugin_clock_la_LIBADD =
+am_g15plugin_clock_la_OBJECTS = g15_plugin_clock.lo
+g15plugin_clock_la_OBJECTS = $(am_g15plugin_clock_la_OBJECTS)
g15plugin_tcpserver_la_LIBADD =
am_g15plugin_tcpserver_la_OBJECTS = g15_plugin_net.lo
g15plugin_tcpserver_la_OBJECTS = $(am_g15plugin_tcpserver_la_OBJECTS)
@@ -71,9 +74,11 @@
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(g15plugin_tcpserver_la_SOURCES) \
+SOURCES = $(g15plugin_clock_la_SOURCES) \
+ $(g15plugin_tcpserver_la_SOURCES) \
$(g15plugin_uinput_la_SOURCES)
-DIST_SOURCES = $(g15plugin_tcpserver_la_SOURCES) \
+DIST_SOURCES = $(g15plugin_clock_la_SOURCES) \
+ $(g15plugin_tcpserver_la_SOURCES) \
$(g15plugin_uinput_la_SOURCES)
ETAGS = etags
CTAGS = ctags
@@ -200,12 +205,14 @@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
METASOURCES = AUTO
-lib_LTLIBRARIES = g15plugin_uinput.la g15plugin_tcpserver.la
+lib_LTLIBRARIES = g15plugin_uinput.la g15plugin_tcpserver.la g15plugin_clock.la
INCLUDES = -I$(top_builddir)/libg15daemon_client/ -I$(top_builddir)/g15daemon
g15plugin_uinput_la_SOURCES = g15_plugin_uinput.c
g15plugin_uinput_la_LDFLAGS = -avoid-version -module
g15plugin_tcpserver_la_SOURCES = g15_plugin_net.c
g15plugin_tcpserver_la_LDFLAGS = -avoid-version -module
+g15plugin_clock_la_SOURCES = g15_plugin_clock.c
+g15plugin_clock_la_LDFLAGS = -avoid-version -module
all: all-am
.SUFFIXES:
@@ -266,6 +273,8 @@
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
+g15plugin_clock.la: $(g15plugin_clock_la_OBJECTS) $(g15plugin_clock_la_DEPENDENCIES)
+ $(LINK) -rpath $(libdir) $(g15plugin_clock_la_LDFLAGS) $(g15plugin_clock_la_OBJECTS) $(g15plugin_clock_la_LIBADD) $(LIBS)
g15plugin_tcpserver.la: $(g15plugin_tcpserver_la_OBJECTS) $(g15plugin_tcpserver_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(g15plugin_tcpserver_la_LDFLAGS) $(g15plugin_tcpserver_la_OBJECTS) $(g15plugin_tcpserver_la_LIBADD) $(LIBS)
g15plugin_uinput.la: $(g15plugin_uinput_la_OBJECTS) $(g15plugin_uinput_la_DEPENDENCIES)
@@ -277,6 +286,7 @@
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g15_plugin_clock.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g15_plugin_net.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g15_plugin_uinput.Plo@am__quote@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2006-11-11 11:06:55
|
Revision: 106
http://svn.sourceforge.net/g15daemon/?rev=106&view=rev
Author: mlampard
Date: 2006-11-11 03:06:33 -0800 (Sat, 11 Nov 2006)
Log Message:
-----------
add new version of the xmms plugin, now reasonably useful. use --enable-xmmsplugin as option to configure to compile
Modified Paths:
--------------
trunk/g15daemon-wip/Makefile.am
trunk/g15daemon-wip/Makefile.in
trunk/g15daemon-wip/aclocal.m4
trunk/g15daemon-wip/configure
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/g15daemon/Makefile.in
trunk/g15daemon-wip/g15daemon_xmms/README
trunk/g15daemon-wip/g15daemon_xmms/g15daemon_xmms_spectrum.c
trunk/g15daemon-wip/libg15daemon_client/Makefile.in
trunk/g15daemon-wip/plugins/Makefile.in
Added Paths:
-----------
trunk/g15daemon-wip/g15daemon_xmms/Makefile.am
trunk/g15daemon-wip/g15daemon_xmms/font.h
Modified: trunk/g15daemon-wip/Makefile.am
===================================================================
--- trunk/g15daemon-wip/Makefile.am 2006-11-11 02:07:13 UTC (rev 105)
+++ trunk/g15daemon-wip/Makefile.am 2006-11-11 11:06:33 UTC (rev 106)
@@ -1,6 +1,6 @@
LLIBDIR=@LIBDIR@
-SUBDIRS = libg15daemon_client g15daemon plugins
+SUBDIRS = libg15daemon_client g15daemon plugins g15daemon_xmms
INCLUDES = -I$(top_srcdir)/libg15daemon_client -I$(top_srcdir)/g15daemon
EXTRA_DIST = debian contrib Documentation g15daemon_xmms lang-bindings patches rpm README.usage FAQ LICENSE
Modified: trunk/g15daemon-wip/Makefile.in
===================================================================
--- trunk/g15daemon-wip/Makefile.in 2006-11-11 02:07:13 UTC (rev 105)
+++ trunk/g15daemon-wip/Makefile.in 2006-11-11 11:06:33 UTC (rev 106)
@@ -116,7 +116,15 @@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_CONFIG = @GLIB_CONFIG@
+GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_CONFIG = @GTK_CONFIG@
+GTK_LIBS = @GTK_LIBS@
+HAVE_XMMSPLUGIN_FALSE = @HAVE_XMMSPLUGIN_FALSE@
+HAVE_XMMSPLUGIN_TRUE = @HAVE_XMMSPLUGIN_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -141,6 +149,18 @@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
+XMKMF = @XMKMF@
+XMMS_CFLAGS = @XMMS_CFLAGS@
+XMMS_CONFIG = @XMMS_CONFIG@
+XMMS_DATA_DIR = @XMMS_DATA_DIR@
+XMMS_EFFECT_PLUGIN_DIR = @XMMS_EFFECT_PLUGIN_DIR@
+XMMS_GENERAL_PLUGIN_DIR = @XMMS_GENERAL_PLUGIN_DIR@
+XMMS_INPUT_PLUGIN_DIR = @XMMS_INPUT_PLUGIN_DIR@
+XMMS_LIBS = @XMMS_LIBS@
+XMMS_OUTPUT_PLUGIN_DIR = @XMMS_OUTPUT_PLUGIN_DIR@
+XMMS_PLUGIN_DIR = @XMMS_PLUGIN_DIR@
+XMMS_VERSION = @XMMS_VERSION@
+XMMS_VISUALIZATION_PLUGIN_DIR = @XMMS_VISUALIZATION_PLUGIN_DIR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
@@ -189,7 +209,7 @@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
LLIBDIR = @LIBDIR@
-SUBDIRS = libg15daemon_client g15daemon plugins
+SUBDIRS = libg15daemon_client g15daemon plugins g15daemon_xmms
INCLUDES = -I$(top_srcdir)/libg15daemon_client -I$(top_srcdir)/g15daemon
EXTRA_DIST = debian contrib Documentation g15daemon_xmms lang-bindings patches rpm README.usage FAQ LICENSE
doc_DATA = FAQ README.usage README ChangeLog TODO AUTHORS NEWS LICENSE
Modified: trunk/g15daemon-wip/aclocal.m4
===================================================================
--- trunk/g15daemon-wip/aclocal.m4 2006-11-11 02:07:13 UTC (rev 105)
+++ trunk/g15daemon-wip/aclocal.m4 2006-11-11 11:06:33 UTC (rev 106)
@@ -11,6 +11,398 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+# Configure paths for GLIB
+# Owen Taylor 97-11-3
+
+dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
+dnl gthread is specified in MODULES, pass to glib-config
+dnl
+AC_DEFUN([AM_PATH_GLIB],
+[dnl
+dnl Get the cflags and libraries from the glib-config script
+dnl
+AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
+ glib_config_prefix="$withval", glib_config_prefix="")
+AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
+ glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
+AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
+ , enable_glibtest=yes)
+
+ if test x$glib_config_exec_prefix != x ; then
+ glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
+ if test x${GLIB_CONFIG+set} != xset ; then
+ GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
+ fi
+ fi
+ if test x$glib_config_prefix != x ; then
+ glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
+ if test x${GLIB_CONFIG+set} != xset ; then
+ GLIB_CONFIG=$glib_config_prefix/bin/glib-config
+ fi
+ fi
+
+ for module in . $4
+ do
+ case "$module" in
+ gmodule)
+ glib_config_args="$glib_config_args gmodule"
+ ;;
+ gthread)
+ glib_config_args="$glib_config_args gthread"
+ ;;
+ esac
+ done
+
+ AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
+ min_glib_version=ifelse([$1], ,0.99.7,$1)
+ AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
+ no_glib=""
+ if test "$GLIB_CONFIG" = "no" ; then
+ no_glib=yes
+ else
+ GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
+ GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
+ glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_glibtest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
+ LIBS="$GLIB_LIBS $LIBS"
+dnl
+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
+dnl checks the results of glib-config to some extent
+dnl
+ rm -f conf.glibtest
+ AC_TRY_RUN([
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ system ("touch conf.glibtest");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = g_strdup("$min_glib_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_glib_version");
+ exit(1);
+ }
+
+ if ((glib_major_version != $glib_config_major_version) ||
+ (glib_minor_version != $glib_config_minor_version) ||
+ (glib_micro_version != $glib_config_micro_version))
+ {
+ printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
+ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
+ glib_major_version, glib_minor_version, glib_micro_version);
+ printf ("*** was found! If glib-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
+ printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
+ printf("*** before re-running configure\n");
+ }
+ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
+ (glib_minor_version != GLIB_MINOR_VERSION) ||
+ (glib_micro_version != GLIB_MICRO_VERSION))
+ {
+ printf("*** GLIB header files (version %d.%d.%d) do not match\n",
+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+ printf("*** library (version %d.%d.%d)\n",
+ glib_major_version, glib_minor_version, glib_micro_version);
+ }
+ else
+ {
+ if ((glib_major_version > major) ||
+ ((glib_major_version == major) && (glib_minor_version > minor)) ||
+ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
+ glib_major_version, glib_minor_version, glib_micro_version);
+ printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
+ major, minor, micro);
+ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the glib-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
+ printf("*** correct copy of glib-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
+}
+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_glib" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$GLIB_CONFIG" = "no" ; then
+ echo "*** The glib-config script installed by GLIB could not be found"
+ echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the GLIB_CONFIG environment variable to the"
+ echo "*** full path to glib-config."
+ else
+ if test -f conf.glibtest ; then
+ :
+ else
+ echo "*** Could not run GLIB test program, checking why..."
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
+ LIBS="$LIBS $GLIB_LIBS"
+ AC_TRY_LINK([
+#include <glib.h>
+#include <stdio.h>
+], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GLIB or finding the wrong"
+ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+ echo "***"
+ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
+ echo "*** came with the system with the command"
+ echo "***"
+ echo "*** rpm --erase --nodeps gtk gtk-devel" ],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
+ echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
+ echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GLIB_CFLAGS=""
+ GLIB_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GLIB_CFLAGS)
+ AC_SUBST(GLIB_LIBS)
+ rm -f conf.glibtest
+])
+
+# Configure paths for GTK+
+# Owen Taylor 97-11-3
+
+dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
+dnl
+AC_DEFUN([AM_PATH_GTK],
+[dnl
+dnl Get the cflags and libraries from the gtk-config script
+dnl
+AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
+ gtk_config_prefix="$withval", gtk_config_prefix="")
+AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
+ gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
+AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
+ , enable_gtktest=yes)
+
+ for module in . $4
+ do
+ case "$module" in
+ gthread)
+ gtk_config_args="$gtk_config_args gthread"
+ ;;
+ esac
+ done
+
+ if test x$gtk_config_exec_prefix != x ; then
+ gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
+ if test x${GTK_CONFIG+set} != xset ; then
+ GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
+ fi
+ fi
+ if test x$gtk_config_prefix != x ; then
+ gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
+ if test x${GTK_CONFIG+set} != xset ; then
+ GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
+ fi
+ fi
+
+ AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
+ min_gtk_version=ifelse([$1], ,0.99.7,$1)
+ AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
+ no_gtk=""
+ if test "$GTK_CONFIG" = "no" ; then
+ no_gtk=yes
+ else
+ GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
+ GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
+ gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_gtktest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$GTK_LIBS $LIBS"
+dnl
+dnl Now check if the installed GTK is sufficiently new. (Also sanity
+dnl checks the results of gtk-config to some extent
+dnl
+ rm -f conf.gtktest
+ AC_TRY_RUN([
+#include <gtk/gtk.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ system ("touch conf.gtktest");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = g_strdup("$min_gtk_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_gtk_version");
+ exit(1);
+ }
+
+ if ((gtk_major_version != $gtk_config_major_version) ||
+ (gtk_minor_version != $gtk_config_minor_version) ||
+ (gtk_micro_version != $gtk_config_micro_version))
+ {
+ printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
+ $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ printf ("*** was found! If gtk-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
+ printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
+ printf("*** before re-running configure\n");
+ }
+#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
+ else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
+ (gtk_minor_version != GTK_MINOR_VERSION) ||
+ (gtk_micro_version != GTK_MICRO_VERSION))
+ {
+ printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
+ GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
+ printf("*** library (version %d.%d.%d)\n",
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ }
+#endif /* defined (GTK_MAJOR_VERSION) ... */
+ else
+ {
+ if ((gtk_major_version > major) ||
+ ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
+ ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
+ major, minor, micro);
+ printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
+ printf("*** correct copy of gtk-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
+}
+],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_gtk" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$GTK_CONFIG" = "no" ; then
+ echo "*** The gtk-config script installed by GTK could not be found"
+ echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the GTK_CONFIG environment variable to the"
+ echo "*** full path to gtk-config."
+ else
+ if test -f conf.gtktest ; then
+ :
+ else
+ echo "*** Could not run GTK test program, checking why..."
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$LIBS $GTK_LIBS"
+ AC_TRY_LINK([
+#include <gtk/gtk.h>
+#include <stdio.h>
+], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GTK or finding the wrong"
+ echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+ echo "***"
+ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
+ echo "*** came with the system with the command"
+ echo "***"
+ echo "*** rpm --erase --nodeps gtk gtk-devel" ],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GTK was incorrectly installed"
+ echo "*** or that you have moved GTK since it was installed. In the latter case, you"
+ echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GTK_CFLAGS=""
+ GTK_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GTK_CFLAGS)
+ AC_SUBST(GTK_LIBS)
+ rm -f conf.gtktest
+])
+
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
# serial 47 AC_PROG_LIBTOOL
@@ -6159,6 +6551,155 @@
AC_MSG_RESULT([$SED])
])
+# CFLAGS and library paths for XMMS
+# written 15 December 1999 by Ben Gertzfield <ch...@de...>
+
+dnl Usage:
+dnl AM_PATH_XMMS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl
+dnl Example:
+dnl AM_PATH_XMMS(0.9.5.1, , AC_MSG_ERROR([*** XMMS >= 0.9.5.1 not installed - please install first ***]))
+dnl
+dnl Defines XMMS_CFLAGS, XMMS_LIBS, XMMS_DATA_DIR, XMMS_PLUGIN_DIR,
+dnl XMMS_VISUALIZATION_PLUGIN_DIR, XMMS_INPUT_PLUGIN_DIR,
+dnl XMMS_OUTPUT_PLUGIN_DIR, XMMS_GENERAL_PLUGIN_DIR, XMMS_EFFECT_PLUGIN_DIR,
+dnl and XMMS_VERSION for your plugin pleasure.
+dnl
+
+dnl XMMS_TEST_VERSION(AVAILABLE-VERSION, NEEDED-VERSION [, ACTION-IF-OKAY [, ACTION-IF-NOT-OKAY]])
+AC_DEFUN([XMMS_TEST_VERSION], [
+
+# Determine which version number is greater. Prints 2 to stdout if
+# the second number is greater, 1 if the first number is greater,
+# 0 if the numbers are equal.
+
+# Written 15 December 1999 by Ben Gertzfield <ch...@de...>
+# Revised 15 December 1999 by Jim Monty <mo...@pr...>
+
+ AC_PROG_AWK
+ xmms_got_version=[` $AWK ' \
+BEGIN { \
+ print vercmp(ARGV[1], ARGV[2]); \
+} \
+ \
+function vercmp(ver1, ver2, ver1arr, ver2arr, \
+ ver1len, ver2len, \
+ ver1int, ver2int, len, i, p) { \
+ \
+ ver1len = split(ver1, ver1arr, /\./); \
+ ver2len = split(ver2, ver2arr, /\./); \
+ \
+ len = ver1len > ver2len ? ver1len : ver2len; \
+ \
+ for (i = 1; i <= len; i++) { \
+ p = 1000 ^ (len - i); \
+ ver1int += ver1arr[i] * p; \
+ ver2int += ver2arr[i] * p; \
+ } \
+ \
+ if (ver1int < ver2int) \
+ return 2; \
+ else if (ver1int > ver2int) \
+ return 1; \
+ else \
+ return 0; \
+}' $1 $2`]
+
+ if test $xmms_got_version -eq 2; then # failure
+ ifelse([$4], , :, $4)
+ else # success!
+ ifelse([$3], , :, $3)
+ fi
+])
+
+AC_DEFUN([AM_PATH_XMMS],
+[
+AC_ARG_WITH(xmms-prefix,[ --with-xmms-prefix=PFX Prefix where XMMS is installed (optional)],
+ xmms_config_prefix="$withval", xmms_config_prefix="")
+AC_ARG_WITH(xmms-exec-prefix,[ --with-xmms-exec-prefix=PFX Exec prefix where XMMS is installed (optional)],
+ xmms_config_exec_prefix="$withval", xmms_config_exec_prefix="")
+
+if test x$xmms_config_exec_prefix != x; then
+ xmms_config_args="$xmms_config_args --exec-prefix=$xmms_config_exec_prefix"
+ if test x${XMMS_CONFIG+set} != xset; then
+ XMMS_CONFIG=$xmms_config_exec_prefix/bin/xmms-config
+ fi
+fi
+
+if test x$xmms_config_prefix != x; then
+ xmms_config_args="$xmms_config_args --prefix=$xmms_config_prefix"
+ if test x${XMMS_CONFIG+set} != xset; then
+ XMMS_CONFIG=$xmms_config_prefix/bin/xmms-config
+ fi
+fi
+
+AC_PATH_PROG(XMMS_CONFIG, xmms-config, no)
+min_xmms_version=ifelse([$1], ,0.9.5.1, $1)
+
+if test "$XMMS_CONFIG" = "no"; then
+ no_xmms=yes
+else
+ XMMS_CFLAGS=`$XMMS_CONFIG $xmms_config_args --cflags`
+ XMMS_LIBS=`$XMMS_CONFIG $xmms_config_args --libs`
+ XMMS_VERSION=`$XMMS_CONFIG $xmms_config_args --version`
+ XMMS_DATA_DIR=`$XMMS_CONFIG $xmms_config_args --data-dir`
+ XMMS_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --plugin-dir`
+ XMMS_VISUALIZATION_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args \
+ --visualization-plugin-dir`
+ XMMS_INPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --input-plugin-dir`
+ XMMS_OUTPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --output-plugin-dir`
+ XMMS_EFFECT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --effect-plugin-dir`
+ XMMS_GENERAL_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --general-plugin-dir`
+
+ XMMS_TEST_VERSION($XMMS_VERSION, $min_xmms_version, ,no_xmms=version)
+fi
+
+AC_MSG_CHECKING(for XMMS - version >= $min_xmms_version)
+
+if test "x$no_xmms" = x; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no)
+
+ if test "$XMMS_CONFIG" = "no" ; then
+ echo "*** The xmms-config script installed by XMMS could not be found."
+ echo "*** If XMMS was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the XMMS_CONFIG environment variable to the"
+ echo "*** full path to xmms-config."
+ else
+ if test "$no_xmms" = "version"; then
+ echo "*** An old version of XMMS, $XMMS_VERSION, was found."
+ echo "*** You need a version of XMMS newer than $min_xmms_version."
+ echo "*** The latest version of XMMS is always available from"
+ echo "*** http://www.xmms.org/"
+ echo "***"
+
+ echo "*** If you have already installed a sufficiently new version, this error"
+ echo "*** probably means that the wrong copy of the xmms-config shell script is"
+ echo "*** being found. The easiest way to fix this is to remove the old version"
+ echo "*** of XMMS, but you can also set the XMMS_CONFIG environment to point to the"
+ echo "*** correct copy of xmms-config. (In this case, you will have to"
+ echo "*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf"
+ echo "*** so that the correct libraries are found at run-time)"
+ fi
+ fi
+ XMMS_CFLAGS=""
+ XMMS_LIBS=""
+ ifelse([$3], , :, [$3])
+fi
+AC_SUBST(XMMS_CFLAGS)
+AC_SUBST(XMMS_LIBS)
+AC_SUBST(XMMS_VERSION)
+AC_SUBST(XMMS_DATA_DIR)
+AC_SUBST(XMMS_PLUGIN_DIR)
+AC_SUBST(XMMS_VISUALIZATION_PLUGIN_DIR)
+AC_SUBST(XMMS_INPUT_PLUGIN_DIR)
+AC_SUBST(XMMS_OUTPUT_PLUGIN_DIR)
+AC_SUBST(XMMS_GENERAL_PLUGIN_DIR)
+AC_SUBST(XMMS_EFFECT_PLUGIN_DIR)
+])
+
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
Modified: trunk/g15daemon-wip/configure
===================================================================
--- trunk/g15daemon-wip/configure 2006-11-11 02:07:13 UTC (rev 105)
+++ trunk/g15daemon-wip/configure 2006-11-11 11:06:33 UTC (rev 106)
@@ -854,6 +854,26 @@
FFLAGS
ac_ct_F77
LIBTOOL
+XMKMF
+GLIB_CONFIG
+GLIB_CFLAGS
+GLIB_LIBS
+XMMS_CONFIG
+XMMS_CFLAGS
+XMMS_LIBS
+XMMS_VERSION
+XMMS_DATA_DIR
+XMMS_PLUGIN_DIR
+XMMS_VISUALIZATION_PLUGIN_DIR
+XMMS_INPUT_PLUGIN_DIR
+XMMS_OUTPUT_PLUGIN_DIR
+XMMS_GENERAL_PLUGIN_DIR
+XMMS_EFFECT_PLUGIN_DIR
+GTK_CONFIG
+GTK_CFLAGS
+GTK_LIBS
+HAVE_XMMSPLUGIN_TRUE
+HAVE_XMMSPLUGIN_FALSE
LIBOBJS
LTLIBOBJS'
ac_subst_files=''
@@ -870,7 +890,8 @@
CCC
CXXCPP
F77
-FFLAGS'
+FFLAGS
+XMKMF'
# Initialize some variables set by options.
@@ -1435,6 +1456,10 @@
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
+X features:
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
@@ -1457,6 +1482,9 @@
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
+ --disable-glibtest Do not try to compile and run a test GLIB program
+ --disable-gtktest Do not try to compile and run a test GTK program
+ --enable-xmmsplugin Make g15daemon_spectrum_xmms xmms plugin
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1465,6 +1493,13 @@
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-tags[=TAGS] include additional configurations [automatic]
+ --with-x use the X Window System
+ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)
+ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)
+ --with-xmms-prefix=PFX Prefix where XMMS is installed (optional)
+ --with-xmms-exec-prefix=PFX Exec prefix where XMMS is installed (optional)
+ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)
+ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)
Some influential environment variables:
CC C compiler command
@@ -1479,6 +1514,7 @@
CXXCPP C++ preprocessor
F77 Fortran 77 compiler command
FFLAGS Fortran 77 compiler flags
+ XMKMF Path to xmkmf, Makefile generator for X Window System
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -4335,7 +4371,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4338 "configure"' > conftest.$ac_ext
+ echo '#line 4374 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -7314,11 +7350,11 @@
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7317: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7353: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7321: \$? = $ac_status" >&5
+ echo "$as_me:7357: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# Th...
[truncated message content] |
|
From: <mla...@us...> - 2006-11-12 10:23:27
|
Revision: 125
http://svn.sourceforge.net/g15daemon/?rev=125&view=rev
Author: mlampard
Date: 2006-11-12 02:23:09 -0800 (Sun, 12 Nov 2006)
Log Message:
-----------
add wbmp image loader and images, remove hard-coding from directory names, DATADIR is now defined in configure script.
Modified Paths:
--------------
trunk/g15daemon-wip/Makefile.am
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/g15daemon/g15logo.h
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/g15daemon/utility_funcs.c
trunk/g15daemon-wip/plugins/Makefile.am
Added Paths:
-----------
trunk/g15daemon-wip/images/
trunk/g15daemon-wip/images/g15logo2.wbmp
trunk/g15daemon-wip/images/g15logo2.xcf
Modified: trunk/g15daemon-wip/Makefile.am
===================================================================
--- trunk/g15daemon-wip/Makefile.am 2006-11-12 08:39:40 UTC (rev 124)
+++ trunk/g15daemon-wip/Makefile.am 2006-11-12 10:23:09 UTC (rev 125)
@@ -2,7 +2,7 @@
SUBDIRS = libg15daemon_client g15daemon plugins g15daemon_xmms
INCLUDES = -I$(top_srcdir)/libg15daemon_client -I$(top_srcdir)/g15daemon
-EXTRA_DIST = debian contrib Documentation lang-bindings patches rpm README.usage FAQ LICENSE
+EXTRA_DIST = debian contrib Documentation lang-bindings patches rpm README.usage FAQ LICENSE images
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
doc_DATA = FAQ README.usage README ChangeLog TODO AUTHORS NEWS LICENSE
@@ -10,6 +10,9 @@
man1_MANS = $(top_srcdir)/Documentation/g15daemon.1
man3_MANS = $(top_srcdir)/Documentation/g15daemon_client_devel.3
+imagedir = $(prefix)/share/g15daemon/splash
+image_DATA = images/g15logo2.wbmp
+
dist-hook:
rm -rf `find $(distdir)/debian -name .svn`
rm -rf `find $(distdir)/contrib -name .svn`
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2006-11-12 08:39:40 UTC (rev 124)
+++ trunk/g15daemon-wip/configure.in 2006-11-12 10:23:09 UTC (rev 125)
@@ -50,11 +50,9 @@
AM_PATH_GLIB(1.2.2,,)
AM_PATH_XMMS(1.2.4,,[have_xmms=yes])
AM_PATH_GTK(1.2.2,,)
-LIBS_save=$LIBS
LIBS="$LIBS $GTK_LIBS"
CPPFLAGS=$CPPFLAGS_save
-LIBS=$LIBS_save
-
+
AC_ARG_ENABLE(xmmsplugin,
[ --enable-xmmsplugin Make g15daemon_spectrum_xmms xmms plugin],
[case "${enableval}" in
@@ -64,6 +62,7 @@
esac],[xmmsplugin=false])
AM_CONDITIONAL(HAVE_XMMSPLUGIN, test x$xmmsplugin = xtrue)
+CPPFLAGS="$CPPFLAGS "'-DDATADIR="\"$(datadir)\""'
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
Modified: trunk/g15daemon-wip/g15daemon/g15logo.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15logo.h 2006-11-12 08:39:40 UTC (rev 124)
+++ trunk/g15daemon-wip/g15daemon/g15logo.h 2006-11-12 10:23:09 UTC (rev 125)
@@ -1,6 +1,4 @@
-/* GIMP header image file format (INDEXED): /home/mjl/g15logo.h */
-
-static unsigned char logo_data[] = {
+static char logo_data[] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
@@ -24,18 +22,18 @@
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,
- 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
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,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,1,1,1,0,0,0,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,
+ 1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,
+ 0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
+ 0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,
+ 0,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,
+ 1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
@@ -423,12 +428,5 @@
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
};
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2006-11-12 08:39:40 UTC (rev 124)
+++ trunk/g15daemon-wip/g15daemon/main.c 2006-11-12 10:23:09 UTC (rev 125)
@@ -178,9 +178,8 @@
lcd_t *displaying = displaylist->tail->lcd;
memset(displaying->buf,0,1024);
- writePixmapToLCD(logo_data);
pthread_sleep(2);
-
+
while (!leaving) {
pthread_mutex_lock(&lcdlist_mutex);
@@ -219,7 +218,7 @@
daemon_pid_file_ident =
daemon_log_ident =
daemon_ident_from_argv0(argv[0]);
-
+printf("Datadir== %s \n",DATADIR);
for (i=0;i<argc;i++) {
char daemonargs[20];
memset(daemonargs,0,20);
@@ -296,6 +295,7 @@
lcdlist_t *lcdlist;
pthread_attr_t attr;
struct passwd *nobody;
+ unsigned char location[1024];
nobody = getpwnam("nobody");
@@ -354,11 +354,17 @@
daemon_retval_send(5);
goto exitnow;
}
+ daemon_retval_send(0);
+ daemon_log(LOG_INFO,"%s loaded\n",PACKAGE_STRING);
+
+ snprintf(location,1024,"%s/%s\0",DATADIR,"g15daemon/splash/g15logo2.wbmp");
+ load_wbmp(lcdlist->tail->lcd,location);
+ write_buf_to_g15(lcdlist->tail->lcd);
+
+ snprintf(location,1024,"%s/%s\0",DATADIR,"g15daemon/plugins");
- g15_open_all_plugins(lcdlist,"/usr/share/g15daemon/plugins");
+ g15_open_all_plugins(lcdlist,location);
- daemon_retval_send(0);
- daemon_log(LOG_INFO,"%s loaded\n",PACKAGE_STRING);
FD_ZERO(&fds);
FD_SET(fd=daemon_signal_fd(),&fds);
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-12 08:39:40 UTC (rev 124)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-12 10:23:09 UTC (rev 125)
@@ -82,7 +82,48 @@
return;
}
+/* basic wbmp loader - wbmps should be inverted for use here */
+int load_wbmp(lcd_t *lcd, char *filename)
+{
+ int wbmp_fd;
+ int retval;
+ unsigned int width, height, buflen,header=4;
+ unsigned char tmpbuf[1024];
+ int i;
+ wbmp_fd=open(filename,O_RDONLY);
+ if(!wbmp_fd){
+
+ return -1;
+ }
+ retval=read(wbmp_fd,tmpbuf,865);
+ close(wbmp_fd);
+ if(retval<865){
+ return -1;
+ }
+ if (tmpbuf[2] & 1) {
+ width = ((unsigned char)tmpbuf[2] ^ 1) | (unsigned char)tmpbuf[3];
+ height = tmpbuf[4];
+ header = 5;
+ } else {
+ width = tmpbuf[2];
+ height = tmpbuf[3];
+ header = 4;
+ }
+
+ buflen = (width/8)*height;
+
+ if(width!=160) {/* FIXME - we ought to scale images I suppose */
+ return -1;
+ }
+ pthread_mutex_lock(&lcdlist_mutex);
+ for(i=5;i<retval;i++){
+ lcd->buf[i-5]=tmpbuf[i]^0xff;
+ }
+ pthread_mutex_unlock(&lcdlist_mutex);
+}
+
+
/* Sleep routine (hackish). */
void pthread_sleep(int seconds) {
pthread_mutex_t dummy_mutex;
Added: trunk/g15daemon-wip/images/g15logo2.wbmp
===================================================================
(Binary files differ)
Property changes on: trunk/g15daemon-wip/images/g15logo2.wbmp
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/g15daemon-wip/images/g15logo2.xcf
===================================================================
(Binary files differ)
Property changes on: trunk/g15daemon-wip/images/g15logo2.xcf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/g15daemon-wip/plugins/Makefile.am
===================================================================
--- trunk/g15daemon-wip/plugins/Makefile.am 2006-11-12 08:39:40 UTC (rev 124)
+++ trunk/g15daemon-wip/plugins/Makefile.am 2006-11-12 10:23:09 UTC (rev 125)
@@ -13,3 +13,4 @@
g15plugin_clock_la_SOURCES = g15_plugin_clock.c
g15plugin_clock_la_LDFLAGS = -avoid-version -module
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2006-11-12 10:34:34
|
Revision: 127
http://svn.sourceforge.net/g15daemon/?rev=127&view=rev
Author: mlampard
Date: 2006-11-12 02:34:24 -0800 (Sun, 12 Nov 2006)
Log Message:
-----------
makefile fixes
Modified Paths:
--------------
trunk/g15daemon-wip/Makefile.am
trunk/g15daemon-wip/g15daemon/Makefile.am
Modified: trunk/g15daemon-wip/Makefile.am
===================================================================
--- trunk/g15daemon-wip/Makefile.am 2006-11-12 10:27:32 UTC (rev 126)
+++ trunk/g15daemon-wip/Makefile.am 2006-11-12 10:34:24 UTC (rev 127)
@@ -22,6 +22,7 @@
rm -rf `find $(distdir)/patches -name .svn`
rm -rf `find $(distdir)/rpm -name .svn`
rm -rf `find $(distdir)/plugins -name .svn`
+ rm -rf `find $(distdir)/images -name .svn`
dist-rpm: dist-bzip2
rpmbuild -ts $(distdir).tar.bz2
Modified: trunk/g15daemon-wip/g15daemon/Makefile.am
===================================================================
--- trunk/g15daemon-wip/g15daemon/Makefile.am 2006-11-12 10:27:32 UTC (rev 126)
+++ trunk/g15daemon-wip/g15daemon/Makefile.am 2006-11-12 10:34:24 UTC (rev 127)
@@ -3,7 +3,7 @@
sbin_PROGRAMS = g15daemon
noinst_PROGRAMS = g15daemontest
noinst_HEADERS = g15logo.h
-g15daemon_SOURCES = logo.h utility_funcs.c \
+g15daemon_SOURCES = utility_funcs.c \
g15daemon.h main.c linked_lists.c gfx_primitives.c g15_plugins.c
g15daemon_LDADD = -ldl
g15daemon_LDFLAGS = -rdynamic
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2006-11-13 02:03:06
|
Revision: 129
http://svn.sourceforge.net/g15daemon/?rev=129&view=rev
Author: mlampard
Date: 2006-11-12 18:02:49 -0800 (Sun, 12 Nov 2006)
Log Message:
-----------
remove dependancy on libdaemon
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/INSTALL
trunk/g15daemon-wip/README
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/g15daemon/g15_plugins.c
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/linked_lists.c
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/g15daemon/utility_funcs.c
trunk/g15daemon-wip/plugins/g15_plugin_clock.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
trunk/g15daemon-wip/plugins/g15_plugin_template.c
trunk/g15daemon-wip/plugins/g15_plugin_uinput.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/ChangeLog 2006-11-13 02:02:49 UTC (rev 129)
@@ -91,6 +91,8 @@
xmms devel and glib devel packages will need to be installed prior to attempting ./configure --enable-xmmsplugin
Plugin is not compiled by default.
- Clock is now a plugin
+- dependency on libdaemon is now removed
+
Modified: trunk/g15daemon-wip/INSTALL
===================================================================
--- trunk/g15daemon-wip/INSTALL 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/INSTALL 2006-11-13 02:02:49 UTC (rev 129)
@@ -42,10 +42,7 @@
A few things we need to check before installing the g15daemon.
For compiling you need:
-libdaemon development package. (libdaemon-dev)
-You can install the libdaemon from your distribution
-repositories or from the libdaemon homepage .
-(http://0pointer.de/lennart/projects/libdaemon/ last time I checked...)
+libg15, libg15render, and libusb development packages.
For running the daemon you need:
linux kernel uniput module
Modified: trunk/g15daemon-wip/README
===================================================================
--- trunk/g15daemon-wip/README 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/README 2006-11-13 02:02:49 UTC (rev 129)
@@ -18,14 +18,8 @@
xmms spectrum analyser plugin, based on the finespectrum plugin,
is also available in the package.
-G15daemon depends on libg15 from G15tools, and the libdaemon de-
-velopment packages
- from your distrobution, or from the libdaemon homepage.
+G15daemon depends on libg15 from G15tools.
-Whilst G15daemon is developed on and for linux, chances are that
-it will compile and run on any OS that supports pthreads, libusb,
-and libdaemon.
-
[INSTALLING]
To install, enter the directory you've extracted the archive in-
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/configure.in 2006-11-13 02:02:49 UTC (rev 129)
@@ -16,7 +16,6 @@
AC_PROG_RANLIB
# Checks for libraries.
-AC_CHECK_LIB([daemon], [daemon_log],,AC_MSG_ERROR(["libdaemon (or its devel package) not found. please install it"]))
AC_CHECK_LIB([g15], [initLibG15],,AC_MSG_ERROR(["libg15 (or its devel package) not found. please install it"]))
AC_CHECK_LIB([g15render], [g15r_initCanvas],,AC_MSG_ERROR(["libg15render (or its devel package) not found. please install it"]))
AC_CHECK_LIB([m], [sin])
Modified: trunk/g15daemon-wip/g15daemon/g15_plugins.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15_plugins.c 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/g15daemon/g15_plugins.c 2006-11-13 02:02:49 UTC (rev 129)
@@ -35,7 +35,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <libdaemon/daemon.h>
#include <config.h>
#include <fcntl.h>
#include <unistd.h>
@@ -59,7 +58,7 @@
handle = dlopen (name,RTLD_LAZY | mode);
if ((error = dlerror()) != NULL) {
- daemon_log (LOG_ERR, "%s\n", error);
+ g15daemon_log (LOG_ERR, "%s\n", error);
return(NULL);
}
@@ -144,7 +143,7 @@
void *handle = plugin_args->plugin_handle;
if(plugin_args->info->plugin_run!=NULL||plugin_args->info->event_handler!=NULL) {
- daemon_log(LOG_ERR,"registered plugin \"%s\"",info->name);
+ g15daemon_log(LOG_ERR,"registered plugin \"%s\"",info->name);
} else {
return NULL;
}
@@ -159,7 +158,7 @@
if(plugin_args)
free(plugin_args);
- daemon_log(LOG_INFO,"Removed plugin %s",info->name);
+ g15daemon_log(LOG_INFO,"Removed plugin %s",info->name);
g15_dlclose_plugin(handle);
}
@@ -180,7 +179,7 @@
dlerror();
if(!plugin_args->info) { /* if it doesnt have a valid struct, we should just load it as a library... but we dont at the moment FIXME */
- daemon_log(LOG_ERR,"%s is not a valid g15daemon plugin\n",name);
+ g15daemon_log(LOG_ERR,"%s is not a valid g15daemon plugin\n",name);
g15_dlclose_plugin(plugin_handle);
dlerror();
return;
@@ -217,7 +216,7 @@
pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED);
pthread_attr_setstacksize(&attr,64*1024); /* set stack to 64k - dont need 8Mb */
if (pthread_create(&client_connection, &attr, (void*)plugin_thread, plugin_args) != 0) {
- daemon_log(LOG_WARNING,"Unable to create client thread.");
+ g15daemon_log(LOG_WARNING,"Unable to create client thread.");
} else {
pthread_detach(client_connection);
}
@@ -238,7 +237,7 @@
strcpy(pluginname, plugin_directory);
strncat(pluginname,"/",1);
strncat(pluginname,ep->d_name,200);
- daemon_log(LOG_INFO, "Loading plugin %s",pluginname);
+ g15daemon_log(LOG_INFO, "Loading plugin %s",pluginname);
g15_plugin_load (displaylist, pluginname);
pthread_msleep(20);
}
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-13 02:02:49 UTC (rev 129)
@@ -53,6 +53,7 @@
#endif
#include <pwd.h>
+#include <syslog.h>
#define CLIENT_CMD_GET_KEYSTATE 'k'
#define CLIENT_CMD_SWITCH_PRIORITIES 'p'
@@ -239,4 +240,6 @@
int send_event(void *caller, unsigned int event, unsigned long value);
/* return time in milliseconds */
unsigned int gettimerms();
+/* syslog wrapper */
+int g15daemon_log (int priority, const char *fmt, ...);
#endif
Modified: trunk/g15daemon-wip/g15daemon/linked_lists.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-13 02:02:49 UTC (rev 129)
@@ -25,8 +25,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
-#include <libdaemon/daemon.h>
-#include "g15daemon.h"
+#include <g15daemon.h>
#include <libg15.h>
extern lcd_t *keyhandler;
@@ -172,7 +171,7 @@
if(&oldnode->lcd == (void*)keyhandler) {
client_handles_keys = 0;
keyhandler = NULL;
- daemon_log(LOG_WARNING,"Client key handler quit, going back to defaults");
+ g15daemon_log(LOG_WARNING,"Client key handler quit, going back to defaults");
}
if((*display_list)->head!=oldnode){
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/g15daemon/main.c 2006-11-13 02:02:49 UTC (rev 129)
@@ -35,7 +35,6 @@
#include <sys/time.h>
#include <fcntl.h>
#include <unistd.h>
-#include <libdaemon/daemon.h>
#include <pwd.h>
#include <config.h>
@@ -48,7 +47,7 @@
/* all threads will exit if leaving >0 */
int leaving = 0;
-
+unsigned int g15daemon_debug = 0;
unsigned int cycle_key;
unsigned int client_handles_keys = 0;
struct lcd_t *keyhandler = NULL;
@@ -203,43 +202,50 @@
return NULL;
}
+void g15daemon_sighandler(int sig) {
+ switch(sig){
+ case SIGINT:
+ case SIGQUIT:
+ leaving = 1;
+ break;
+ case SIGPIPE:
+ break;
+ }
+}
+
int main (int argc, char *argv[])
{
pid_t daemonpid;
int retval;
int i;
- int g15daemon_debug = 0;
+ struct sigaction new_action, old_action;
pthread_t keyboard_thread;
pthread_t lcd_thread;
- daemon_pid_file_ident =
- daemon_log_ident =
- daemon_ident_from_argv0(argv[0]);
for (i=0;i<argc;i++) {
char daemonargs[20];
memset(daemonargs,0,20);
strncpy(daemonargs,argv[i],19);
if (!strncmp(daemonargs, "-k",2) || !strncmp(daemonargs, "--kill",6)) {
-#ifdef DAEMON_PID_FILE_KILL_WAIT_AVAILABLE
- if ((retval = daemon_pid_file_kill_wait(SIGINT, 15)) != 0)
-#else
- if ((retval = daemon_pid_file_kill(SIGINT)) != 0)
-#endif
- daemon_log(LOG_WARNING, "Failed to kill daemon");
- return retval < 0 ? 1 : 0;
+ daemonpid = g15daemon_return_running();
+ if(daemonpid>0) {
+ kill(daemonpid,SIGINT);
+ } else
+ printf("G15Daemon not running\n");
+ exit(0);
}
if (!strncmp(daemonargs, "-v",2) || !strncmp(daemonargs, "--version",9)) {
float lg15ver = LIBG15_VERSION;
- printf("G15Daemon version %s - %s\n",VERSION,daemon_pid_file_is_running() >= 0 ?"Loaded & Running":"Not Running");
+ printf("G15Daemon version %s - %s\n",VERSION,g15daemon_return_running() >= 0 ?"Loaded & Running":"Not Running");
printf("compiled with libg15 version %.3f\n\n",lg15ver/1000);
exit(0);
}
if (!strncmp(daemonargs, "-h",2) || !strncmp(daemonargs, "--help",6)) {
- printf("G15Daemon version %s - %s\n",VERSION,daemon_pid_file_is_running() >= 0 ?"Loaded & Running":"Not Running");
+ printf("G15Daemon version %s - %s\n",VERSION,g15daemon_return_running() >= 0 ?"Loaded & Running":"Not Running");
printf("%s -h (--help) or -k (--kill) or -s (--switch) or -d (--debug) or -v (--version)\n\n -k will kill a previous incarnation,\n -h shows this help\n -s changes the screen-switch key from MR to L1\n -d debug mode - stay in foreground and output all debug messages to STDERR\n -v show version\n",argv[0]);
exit(0);
}
@@ -254,55 +260,24 @@
g15daemon_debug = 1;
}
}
-
- if ((daemonpid = daemon_pid_file_is_running()) >= 0) {
- printf("%s is already running. Use \'%s -k\' to kill the daemon before running again.\nExiting now\n",argv[0],argv[0]);
- return 1;
+ if(g15daemon_return_running()>=0) {
+ g15daemon_log(LOG_ERR,"G15Daemon already running.. Exiting");
+ exit(0);
}
+ if(!g15daemon_debug)
+ daemon(0,0);
- daemon_retval_init();
-
- if(!g15daemon_debug) {
- if((daemonpid = daemon_fork()) < 0){
- daemon_retval_done();
- return 1;
- }
- }
-
- if (daemonpid && !g15daemon_debug){
- retval=0;
- char * g15_errors[] = { "No Error",
- "Unable to write to PID file",
- "Unable to initialise keyboard",
- "Unable to configure the linux kernel UINPUT driver",
- "Unable to register signal handler",
- "Unable to create new thread", NULL };
- if((retval = daemon_retval_wait(20)) !=0) {
- if(retval)
- daemon_log(LOG_ERR,"An Error Occurred - %i : ( %s ) received",retval, g15_errors[retval]);
- else
- daemon_log(LOG_ERR,"A library error occurred. Please file a bug report stating the g15daemon version, your kernel version, libdaemon version and your distribution name.");
- return 255;
- }
-
- return retval;
-
- }else{ /* daemonised now */
-
+ if(g15daemon_create_pidfile() == 0) {
+
int fd;
fd_set fds;
lcdlist_t *lcdlist;
pthread_attr_t attr;
struct passwd *nobody;
unsigned char location[1024];
-
+
+ openlog("g15daemon", LOG_PID, LOG_DAEMON);
nobody = getpwnam("nobody");
-
- if(daemon_pid_file_create() !=0){
- daemon_log(LOG_ERR,"Unable to create PID File! Exiting");
- daemon_retval_send(1);
- goto exitnow;
- }
/* init stuff here.. */
retval = initLibG15();
@@ -310,17 +285,10 @@
setLEDs(0);
if(retval != G15_NO_ERROR){
- daemon_log(LOG_ERR,"Unable to find G15 keyboard or the keyboard is already handled. Exiting");
- daemon_retval_send(2);
+ g15daemon_log(LOG_ERR,"Unable to find G15 keyboard or the keyboard is already handled. Exiting");
goto exitnow;
}
-
- if(daemon_signal_init(SIGINT,SIGQUIT,SIGHUP,SIGPIPE,0) <0){
- daemon_log(LOG_ERR,"Unable to register signal handler. Exiting");
- daemon_retval_send(4);
- goto exitnow;
- }
-
+
/* all other processes/threads should be seteuid nobody */
if(nobody!=NULL) {
seteuid(nobody->pw_uid);
@@ -338,8 +306,7 @@
pthread_attr_setschedpolicy(&attr,thread_policy);
if (pthread_create(&keyboard_thread, &attr, keyboard_watch_thread, lcdlist) != 0) {
- daemon_log(LOG_ERR,"Unable to create keyboard listener thread. Exiting");
- daemon_retval_send(5);
+ g15daemon_log(LOG_ERR,"Unable to create keyboard listener thread. Exiting");
goto exitnow;
}
pthread_attr_setstacksize(&attr,128*1024);
@@ -349,47 +316,31 @@
pthread_attr_setschedpolicy(&attr,thread_policy);
if (pthread_create(&lcd_thread, &attr, lcd_draw_thread, lcdlist) != 0) {
- daemon_log(LOG_ERR,"Unable to create display thread. Exiting");
- daemon_retval_send(5);
+ g15daemon_log(LOG_ERR,"Unable to create display thread. Exiting");
goto exitnow;
}
- daemon_retval_send(0);
- daemon_log(LOG_INFO,"%s loaded\n",PACKAGE_STRING);
+ g15daemon_log(LOG_INFO,"%s loaded\n",PACKAGE_STRING);
- snprintf(location,1024,"%s/%s\0",DATADIR,"g15daemon/splash/g15logo2.wbmp");
+ snprintf(location,1024,"%s/%s\0",DATADIR,"g15daemon/splash/g15logo2.wbmp");
load_wbmp(lcdlist->tail->lcd,location);
- write_buf_to_g15(lcdlist->tail->lcd);
+ write_buf_to_g15(lcdlist->tail->lcd);
snprintf(location,1024,"%s/%s\0",DATADIR,"g15daemon/plugins");
g15_open_all_plugins(lcdlist,location);
+
+ new_action.sa_handler = g15daemon_sighandler;
+ new_action.sa_flags = 0;
+ sigaction(SIGINT, &new_action, NULL);
+ sigaction(SIGQUIT, &new_action, NULL);
- FD_ZERO(&fds);
- FD_SET(fd=daemon_signal_fd(),&fds);
-
do {
- fd_set myfds = fds;
- if(select(FD_SETSIZE,&myfds,0,0,0) <0){
- if(errno == EINTR) continue;
- break;
- }
-
- if(FD_ISSET(fd,&fds)){
- int sig;
- sig = daemon_signal_next();
- switch(sig){
- case SIGINT:
- case SIGQUIT:
- leaving = 1;
- daemon_log(LOG_INFO,"Leaving by request");
- break;
- case SIGPIPE:
- break;
- }
- }
- } while ( leaving == 0 );
-
- daemon_signal_done();
+ sleep(1);
+
+ } while( leaving == 0);
+
+ g15daemon_log(LOG_INFO,"Leaving by request");
+
pthread_join(lcd_thread,NULL);
pthread_join(keyboard_thread,NULL);
@@ -399,14 +350,13 @@
#endif
#endif
lcdlist_destroy(&lcdlist);
- }
exitnow:
- /* return to root privilages for the final countdown */
- seteuid(0);
+ /* return to root privilages for the final countdown */
+ seteuid(0);
setegid(0);
-
- daemon_retval_done();
- daemon_pid_file_remove();
+ closelog();
+ unlink("/var/run/g15daemon.pid");
+ }
return 0;
}
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-13 02:02:49 UTC (rev 129)
@@ -39,10 +39,14 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <libdaemon/daemon.h>
#include "g15daemon.h"
#include <libg15.h>
+#include <stdarg.h>
+extern unsigned int g15daemon_debug;
+#define G15DAEMON_PIDFILE "/var/run/g15daemon.pid"
+
+
/* if no exitfunc or eventhandler, member should be NULL */
const plugin_info_t generic_info[] = {
/* TYPE, name, initfunc, updatefreq, exitfunc, eventhandler */
@@ -59,12 +63,89 @@
size++;
if((ptr = calloc(1, size)) == NULL) {
- daemon_log(LOG_WARNING, "g15_xmalloc() failed: %s.\n", strerror(errno));
+ g15daemon_log(LOG_WARNING, "g15_xmalloc() failed: %s.\n", strerror(errno));
return NULL;
}
return ptr;
}
+int g15daemon_return_running(){
+ int fd;
+ char pidtxt[128];
+ int pid;
+ int l;
+
+ if ((fd = open(G15DAEMON_PIDFILE, O_RDWR, 0644)) < 0) {
+ return -1;
+ }
+ if((l = read(fd,pidtxt,sizeof(pidtxt)-1)) < 0) {
+ unlink (G15DAEMON_PIDFILE);
+ close(fd);
+ return -1;
+ }
+ if((pid = atoi(pidtxt)) <= 0) {
+ g15daemon_log(LOG_ERR,"pidfile corrupt");
+ unlink(G15DAEMON_PIDFILE);
+ close(fd);
+ return -1;
+ }
+ if((kill(pid,0) != 0) && errno != EPERM ) {
+ g15daemon_log(LOG_ERR,"Process died - removing pidfile");
+ unlink(G15DAEMON_PIDFILE);
+ close(fd);
+ return -1;
+ }
+
+ return pid;
+
+}
+
+
+int g15daemon_create_pidfile() {
+
+ char pidtxt[128];
+ size_t l;
+ int fd;
+
+ if(!g15daemon_return_running() && (fd = open(G15DAEMON_PIDFILE, O_CREAT|O_RDWR|O_EXCL, 0644)) < 0) {
+ g15daemon_log(LOG_ERR,"previous G15Daemon process died. removing pidfile");
+ unlink(G15DAEMON_PIDFILE);
+ }
+ if ((fd = open(G15DAEMON_PIDFILE, O_CREAT|O_RDWR|O_EXCL, 0644)) < 0) {
+ return 1;
+ }
+
+ snprintf(pidtxt, sizeof(pidtxt), "%lu\n", (unsigned long) getpid());
+
+ if (write(fd, pidtxt, l = strlen(pidtxt)) != l) {
+ g15daemon_log(LOG_WARNING, "write(): %s", strerror(errno));
+ unlink(G15DAEMON_PIDFILE);
+ }
+
+ if(fd>0) {
+ close(fd);
+ return 0;
+ }
+ return 1;
+}
+
+/* syslog wrapper */
+int g15daemon_log (int priority, const char *fmt, ...) {
+
+ unsigned char buf[1024];
+ va_list argp;
+ va_start (argp, fmt);
+ if(g15daemon_debug == 0)
+ vsyslog(priority, fmt, argp);
+ else {
+ vfprintf(stderr,fmt,argp);
+ fprintf(stderr,"\n");
+ }
+ va_end (argp);
+
+ return 0;
+}
+
void convert_buf(lcd_t *lcd, unsigned char * orig_buf)
{
unsigned int x,y;
Modified: trunk/g15daemon-wip/plugins/g15_plugin_clock.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2006-11-13 02:02:49 UTC (rev 129)
@@ -33,7 +33,6 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#include <libdaemon/daemon.h>
#include <config.h>
#include <g15daemon.h>
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2006-11-13 02:02:49 UTC (rev 129)
@@ -37,8 +37,8 @@
#include <errno.h>
#include <libg15.h>
-#include "g15daemon.h"
-#include <libdaemon/daemon.h>
+#include <g15daemon.h>
+
static int leaving;
int server_events(plugin_event_t *myevent);
@@ -57,7 +57,7 @@
if(lcdnode->list->current == lcdnode){
// send the keystate inband back to the client
if((msgret = send(sock,(void *)¤t_key_state,sizeof(current_key_state),0))<0)
- daemon_log(LOG_WARNING,"Error in send: %s\n",strerror(errno));
+ g15daemon_log(LOG_WARNING,"Error in send: %s\n",strerror(errno));
current_key_state = 0;
}
else{
@@ -105,13 +105,13 @@
lcdnode->lcd->state_changed = 1;
} /*else if (msgbuf[0] & CLIENT_CMD_KEY_HANDLER)
{
- daemon_log(LOG_WARNING, "Client is taking over keystate");
+ g15daemon_log(LOG_WARNING, "Client is taking over keystate");
client_handles_keys=1;
keyhandler = &lcdnode->lcd;
keyhandler->connection = sock;
- daemon_log(LOG_WARNING, "Client has taken over keystate");
+ g15daemon_log(LOG_WARNING, "Client has taken over keystate");
}*/
}
@@ -125,7 +125,7 @@
struct sockaddr_in servaddr;
if ((listening_socket = socket(AF_INET, SOCK_STREAM, 0)) < 0 ) {
- daemon_log(LOG_WARNING, "Unable to create socket.\n");
+ g15daemon_log(LOG_WARNING, "Unable to create socket.\n");
return -1;
}
@@ -138,12 +138,12 @@
servaddr.sin_port = htons(LISTEN_PORT);
if (bind(listening_socket, (struct sockaddr *) &servaddr, sizeof(servaddr)) < 0 ) {
- daemon_log(LOG_WARNING, "error calling bind()\n");
+ g15daemon_log(LOG_WARNING, "error calling bind()\n");
return -1;
}
if (listen(listening_socket, MAX_CLIENTS) < 0 ) {
- daemon_log(LOG_WARNING, "error calling listen()\n");
+ g15daemon_log(LOG_WARNING, "error calling listen()\n");
return -1;
}
@@ -327,7 +327,7 @@
if ( (conn_s = accept(listening_socket, NULL, NULL) ) < 0 ) {
if(errno==EWOULDBLOCK || errno==EAGAIN){
}else{
- daemon_log(LOG_WARNING, "error calling accept()\n");
+ g15daemon_log(LOG_WARNING, "error calling accept()\n");
return -1;
}
}
@@ -342,9 +342,9 @@
pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED);
pthread_attr_setstacksize(&attr,256*1024); /* set stack to 768k - dont need 8Mb - this is probably rather excessive also */
if (pthread_create(&client_connection, &attr, lcd_client_thread, clientnode) != 0) {
- daemon_log(LOG_WARNING,"Unable to create client thread.");
+ g15daemon_log(LOG_WARNING,"Unable to create client thread.");
if (close(conn_s) < 0 ) {
- daemon_log(LOG_WARNING, "error calling close()\n");
+ g15daemon_log(LOG_WARNING, "error calling close()\n");
return -1;
}
@@ -363,12 +363,12 @@
int g15_socket=-1;
if((g15_socket = init_sockserver())<0){
- daemon_log(LOG_ERR,"Unable to initialise the server at port %i",LISTEN_PORT);
+ g15daemon_log(LOG_ERR,"Unable to initialise the server at port %i",LISTEN_PORT);
return NULL;
}
if (fcntl(g15_socket, F_SETFL, O_NONBLOCK) <0 ) {
- daemon_log(LOG_ERR,"Unable to set socket to nonblocking");
+ g15daemon_log(LOG_ERR,"Unable to set socket to nonblocking");
}
while ( !leaving ) {
@@ -388,7 +388,7 @@
case G15_EVENT_KEYPRESS:{
if(lcd->connection) { /* server client */
if((send(lcd->connection,(void *)&event->value,sizeof(event->value),0))<0)
- daemon_log(LOG_WARNING,"Error in send: %s\n",strerror(errno));
+ g15daemon_log(LOG_WARNING,"Error in send: %s\n",strerror(errno));
}
break;
}
Modified: trunk/g15daemon-wip/plugins/g15_plugin_template.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_template.c 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/plugins/g15_plugin_template.c 2006-11-13 02:02:49 UTC (rev 129)
@@ -33,7 +33,6 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#include <libdaemon/daemon.h>
#include <config.h>
#include <g15daemon.h>
Modified: trunk/g15daemon-wip/plugins/g15_plugin_uinput.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2006-11-12 11:31:28 UTC (rev 128)
+++ trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2006-11-13 02:02:49 UTC (rev 129)
@@ -31,7 +31,6 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#include <libdaemon/daemon.h>
#include <config.h>
#include <g15daemon.h>
@@ -59,7 +58,7 @@
++i;
}
if(uinp_fd<0){
- daemon_log(LOG_ERR,"Unable to open UINPUT device. Please ensure the uinput driver is loaded into the kernel and that you have permission to open the device.");
+ g15daemon_log(LOG_ERR,"Unable to open UINPUT device. Please ensure the uinput driver is loaded into the kernel and that you have permission to open the device.");
return -1;
}
/* all other processes/threads should be seteuid nobody */
@@ -88,7 +87,7 @@
if (ioctl(uinp_fd, UI_DEV_CREATE))
{
- daemon_log(LOG_ERR,"Unable to create UINPUT device.");
+ g15daemon_log(LOG_ERR,"Unable to create UINPUT device.");
return -1;
}
return 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2006-11-13 03:14:36
|
Revision: 131
http://svn.sourceforge.net/g15daemon/?rev=131&view=rev
Author: mlampard
Date: 2006-11-12 19:14:20 -0800 (Sun, 12 Nov 2006)
Log Message:
-----------
fix problem with option ordering. add (hidden) cmdline option to change effective uid.
Modified Paths:
--------------
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/plugins/g15_plugin_uinput.c
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2006-11-13 02:28:53 UTC (rev 130)
+++ trunk/g15daemon-wip/g15daemon/main.c 2006-11-13 03:14:20 UTC (rev 131)
@@ -220,7 +220,9 @@
int retval;
int i;
struct sigaction new_action, old_action;
-
+ cycle_key = G15_KEY_MR;
+ unsigned char user[256];
+
pthread_t keyboard_thread;
pthread_t lcd_thread;
@@ -252,13 +254,19 @@
if (!strncmp(daemonargs, "-s",2) || !strncmp(daemonargs, "--switch",8)) {
cycle_key = G15_KEY_L1;
- }else{
- cycle_key = G15_KEY_MR;
}
if (!strncmp(daemonargs, "-d",2) || !strncmp(daemonargs, "--debug",7)) {
g15daemon_debug = 1;
}
+
+ if (!strncmp(daemonargs, "-u",2) || !strncmp(daemonargs, "--user",7)) {
+ if(argv[i+1]!=NULL){
+ strncpy(user,argv[i+1],128);
+ i++;
+ }
+ }
+
}
if(g15daemon_return_running()>=0) {
g15daemon_log(LOG_ERR,"G15Daemon already running.. Exiting");
@@ -276,8 +284,17 @@
struct passwd *nobody;
unsigned char location[1024];
- openlog("g15daemon", LOG_PID, LOG_DAEMON);
- nobody = getpwnam("nobody");
+ openlog("g15daemon", LOG_PID, LOG_DAEMON);
+ if(strlen(user)==0){
+ nobody = getpwnam("nobody");
+ }else {
+ nobody = getpwnam(user);
+ }
+ if (nobody==NULL)
+ {
+ nobody = getpwuid(geteuid());
+ g15daemon_log(LOG_WARNING,"BEWARE: running as effective uid %i\n",nobody->pw_uid);
+ }
/* init stuff here.. */
retval = initLibG15();
Modified: trunk/g15daemon-wip/plugins/g15_plugin_uinput.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2006-11-13 02:28:53 UTC (rev 130)
+++ trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2006-11-13 03:14:20 UTC (rev 131)
@@ -48,10 +48,10 @@
int g15_init_uinput(void *plugin_args) {
int i=0;
- struct passwd *nobody;
+ lcdlist_t *displaylist = (lcdlist_t*) plugin_args;
struct uinput_user_dev uinp;
static const char *uinput_device_fn[] = { "/dev/uinput", "/dev/input/uinput",0};
- nobody = getpwnam("nobody");
+
seteuid(0);
setegid(0);
while (uinput_device_fn[i] && (uinp_fd = open(uinput_device_fn[i],O_RDWR))<0){
@@ -62,11 +62,10 @@
return -1;
}
/* all other processes/threads should be seteuid nobody */
- if(nobody!=NULL) {
- seteuid(nobody->pw_uid);
- setegid(nobody->pw_gid);
- }
+ seteuid(displaylist->nobody->pw_uid);
+ setegid(displaylist->nobody->pw_gid);
+
memset(&uinp,0,sizeof(uinp));
strncpy(uinp.name, "G15 Extra Keys", UINPUT_MAX_NAME_SIZE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2006-11-13 05:26:43
|
Revision: 132
http://svn.sourceforge.net/g15daemon/?rev=132&view=rev
Author: mlampard
Date: 2006-11-12 21:25:42 -0800 (Sun, 12 Nov 2006)
Log Message:
-----------
define public vs internal-only funcs
Modified Paths:
--------------
trunk/g15daemon-wip/g15daemon/g15_plugins.c
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/gfx_primitives.c
trunk/g15daemon-wip/g15daemon/linked_lists.c
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/g15daemon/utility_funcs.c
trunk/g15daemon-wip/plugins/g15_plugin_clock.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
Modified: trunk/g15daemon-wip/g15daemon/g15_plugins.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15_plugins.c 2006-11-13 03:14:20 UTC (rev 131)
+++ trunk/g15daemon-wip/g15daemon/g15_plugins.c 2006-11-13 05:25:42 UTC (rev 132)
@@ -26,6 +26,7 @@
g15_plugin.c
simple plugin loader - loads each plugin and runs each one in it's own thread. a bit expensive probably
*/
+#define G15DAEMON_BUILD 1
#include <pthread.h>
#include <stdio.h>
@@ -40,7 +41,7 @@
#include <unistd.h>
#include <dirent.h>
#include <libg15.h>
-#include "g15daemon.h"
+#include <g15daemon.h>
#include <dlfcn.h>
#include <pwd.h>
@@ -48,7 +49,7 @@
extern int leaving;
-void * g15_dlopen_plugin(char *name,unsigned int library) {
+void * g15daemon_dlopen_plugin(char *name,unsigned int library) {
void * handle;
char * error;
@@ -65,7 +66,7 @@
return handle;
}
-int g15_dlclose_plugin(void *handle) {
+int g15daemon_dlclose_plugin(void *handle) {
dlclose(handle);
}
@@ -90,7 +91,7 @@
plugin_retval = (*plugin)((void*)client_lcd);
if(info->update_msecs<50)
info->update_msecs = 50;
- pthread_msleep(info->update_msecs);
+ g15daemon_msleep(info->update_msecs);
}
if(plugin_close!=NULL){
@@ -98,7 +99,7 @@
}
if(!leaving)
- lcdnode_remove(display);
+ g15daemon_lcdnode_remove(display);
}
void run_advanced_client(plugin_t *plugin_args)
{
@@ -125,11 +126,11 @@
while(((*plugin_run)(plugin_args->args))==G15_PLUGIN_OK && !leaving){
if(info->update_msecs<50)
info->update_msecs = 50;
- pthread_msleep(info->update_msecs);
+ g15daemon_msleep(info->update_msecs);
}
}else{
while(1){
- pthread_msleep(500);
+ g15daemon_msleep(500);
}
}
if(plugin_close) {
@@ -159,7 +160,7 @@
free(plugin_args);
g15daemon_log(LOG_INFO,"Removed plugin %s",info->name);
- g15_dlclose_plugin(handle);
+ g15daemon_dlclose_plugin(handle);
}
@@ -173,14 +174,14 @@
pthread_attr_t attr;
lcdnode_t *clientnode;
- if((plugin_handle = g15_dlopen_plugin(name,G15_PLUGIN_NONSHARED))!=NULL) {
+ if((plugin_handle = g15daemon_dlopen_plugin(name,G15_PLUGIN_NONSHARED))!=NULL) {
plugin_t *plugin_args=malloc(sizeof(plugin_t));
plugin_args->info = dlsym(plugin_handle, "g15plugin_info");
dlerror();
if(!plugin_args->info) { /* if it doesnt have a valid struct, we should just load it as a library... but we dont at the moment FIXME */
g15daemon_log(LOG_ERR,"%s is not a valid g15daemon plugin\n",name);
- g15_dlclose_plugin(plugin_handle);
+ g15daemon_dlclose_plugin(plugin_handle);
dlerror();
return;
}
@@ -195,7 +196,7 @@
lcdlist_t *foolist = (lcdlist_t*)displaylist;
/* FIXME we should just sort out the linked list stuff instead of overriding it */
if((int)foolist->numclients>=1){
- clientnode = lcdnode_add((void*)g15daemon_lcds);
+ clientnode = g15daemon_lcdnode_add((void*)g15daemon_lcds);
}else {
clientnode = foolist->tail;
foolist->numclients++;
@@ -239,7 +240,7 @@
strncat(pluginname,ep->d_name,200);
g15daemon_log(LOG_INFO, "Loading plugin %s",pluginname);
g15_plugin_load (displaylist, pluginname);
- pthread_msleep(20);
+ g15daemon_msleep(20);
}
}
(void) closedir (directory);
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-13 03:14:20 UTC (rev 131)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-13 05:25:42 UTC (rev 132)
@@ -193,53 +193,53 @@
/* server hello */
#define SERV_HELO "G15 daemon HELLO"
-/* uinput & keyboard control */
-#ifdef HAVE_LINUX_UINPUT_H
-int g15_init_uinput();
-void g15_uinput_keyup(unsigned char code);
-void g15_uinput_keydown(unsigned char code);
-void g15_exit_uinput();
-#endif
-
-void g15_process_keys(lcdlist_t *displaylist, unsigned int currentkeys, unsigned int lastkeys);
-
+#ifdef G15DAEMON_BUILD
/* call create_lcd for every new client, and quit it when done */
-lcd_t * create_lcd ();
-void quit_lcd (lcd_t * lcd);
-void write_buf_to_g15(lcd_t *lcd);
+lcd_t * ll_create_lcd ();
+void ll_quit_lcd (lcd_t * lcd);
+void uf_write_buf_to_g15(lcd_t *lcd);
-void setpixel (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int color);
-//void cls (lcd_t * lcd, int color);
-void line (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int color);
-void rectangle (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, int filled, unsigned int color);
-void draw_bignum (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int color, int num);
-
-/* utility functions in utility_func.c */
-void pthread_sleep(int seconds);
-int pthread_msleep(int milliseconds);
-
/* linked lists */
-lcdlist_t *lcdlist_init();
-void lcdlist_destroy(lcdlist_t **displaylist);
-lcdnode_t *lcdnode_add(lcdlist_t **display_list);
-void lcdnode_remove(lcdnode_t *badnode);
+lcdlist_t *ll_lcdlist_init();
+void ll_lcdlist_destroy(lcdlist_t **displaylist);
-/* create a listening socket */
-int init_sockserver();
-int g15_clientconnect(lcdlist_t **g15daemon,int listening_socket);
-int g15_send(int sock, char *buf, unsigned int len);
-int g15_recv(lcdnode_t *lcdnode, int sock, char *buf, unsigned int len);
-
-/* handy function from xine_utils.c */
-void *g15_xmalloc(size_t size);
/* internal lcd plugin - the clock/menu */
int internal_clock_eventhandler(plugin_event_t *myevent);
/* generic handler for net clients */
int internal_generic_eventhandler(plugin_event_t *myevent);
+#endif
+
+void g15daemon_setpixel (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int color);
+void g15daemon_draw_bignum (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int color, int num);
+void g15daemon_line (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int colour);
+void g15daemon_rectangle (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, int filled, unsigned int colour);
+
/* send event to foreground client's eventlistener */
-int send_event(void *caller, unsigned int event, unsigned long value);
-/* return time in milliseconds */
-unsigned int gettimerms();
+int g15daemon_send_event(void *caller, unsigned int event, unsigned long value);
+/* open named plugin */
+void * g15daemon_dlopen_plugin(char *name,unsigned int library);
+/* close plugin with handle <handle> */
+int g15daemon_dlclose_plugin(void *handle) ;
/* syslog wrapper */
int g15daemon_log (int priority, const char *fmt, ...);
+/* cycle from displayed screen to next on list */
+int g15daemon_lcdnode_cycle(lcdlist_t *displaylist);
+/* add new screen */
+lcdnode_t *g15daemon_lcdnode_add(lcdlist_t **displaylist) ;
+/* remove screen */
+void g15daemon_lcdnode_remove (lcdnode_t *oldnode);
+
+/* handy function from xine_utils.c */
+void *g15daemon_xmalloc(size_t size) ;
+/* convert 1byte/pixel buffer to internal g15 format */
+void g15daemon_convert_buf(lcd_t *lcd, unsigned char * orig_buf);
+/* load 160x43 wbmp format file into lcd struct */
+int g15daemon_load_wbmp(lcd_t *lcd, char *filename);
+/* threadsafe sleep */
+void g15daemon_sleep(int seconds);
+/* threadsafe millisecond sleep */
+int g15daemon_msleep(int milliseconds) ;
+/* return current time in milliseconds */
+unsigned int g15daemon_gettime_ms();
+
#endif
Modified: trunk/g15daemon-wip/g15daemon/gfx_primitives.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/gfx_primitives.c 2006-11-13 03:14:20 UTC (rev 131)
+++ trunk/g15daemon-wip/g15daemon/gfx_primitives.c 2006-11-13 05:25:42 UTC (rev 132)
@@ -23,6 +23,7 @@
and arbitrates LCD display. Allows for multiple simultaneous clients.
Client screens can be cycled through by pressing the 'L1' key.
*/
+#define G15DAEMON_BUILD 1
#include <stdio.h>
#include <stdlib.h>
@@ -30,7 +31,7 @@
#include <libg15.h>
/* set a pixel in a libg15 buffer */
-void setpixel(lcd_t *lcd, unsigned int x, unsigned int y, unsigned int val)
+void g15daemon_setpixel(lcd_t *lcd, unsigned int x, unsigned int y, unsigned int val)
{
unsigned int curr_row = y;
unsigned int curr_col = x;
@@ -46,7 +47,7 @@
}
-void line (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int colour) {
+void g15daemon_line (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int colour) {
int d, sx, sy, dx, dy;
unsigned int ax, ay;
@@ -71,7 +72,7 @@
sy = 1;
/* set the pixel */
- setpixel (lcd, x1, y1, colour);
+ g15daemon_setpixel (lcd, x1, y1, colour);
if (ax > ay)
{
@@ -85,7 +86,7 @@
}
x1 += sx;
d += ay;
- setpixel (lcd, x1, y1, colour);
+ g15daemon_setpixel (lcd, x1, y1, colour);
}
}
else
@@ -100,13 +101,13 @@
}
y1 += sy;
d += ax;
- setpixel (lcd, x1, y1, colour);
+ g15daemon_setpixel (lcd, x1, y1, colour);
}
}
}
-void rectangle (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, int filled, unsigned int colour) {
+void g15daemon_rectangle (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, int filled, unsigned int colour) {
int y;
@@ -114,83 +115,83 @@
{
if (!filled)
{
- line (lcd, x1, y1, x2, y1, colour);
- line (lcd, x1, y1, x1, y2, colour);
- line (lcd, x1, y2, x2, y2, colour);
- line (lcd, x2, y1, x2, y2, colour);
+ g15daemon_line (lcd, x1, y1, x2, y1, colour);
+ g15daemon_line (lcd, x1, y1, x1, y2, colour);
+ g15daemon_line (lcd, x1, y2, x2, y2, colour);
+ g15daemon_line (lcd, x2, y1, x2, y2, colour);
}
else
{
for (y = y1; y <= y2; y++)
{
- line(lcd,x1,y,x2,y,colour);
+ g15daemon_line(lcd,x1,y,x2,y,colour);
}
}
}
}
-void draw_bignum (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int colour, int num) {
+void g15daemon_draw_bignum (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int colour, int num) {
x1 += 2;
x2 -= 2;
switch(num){
case 45:
- rectangle (lcd, x1, y1+((y2/2)-2), x2, y1+((y2/2)+2), 1, BLACK);
+ g15daemon_rectangle (lcd, x1, y1+((y2/2)-2), x2, y1+((y2/2)+2), 1, BLACK);
break;
case 46:
- rectangle (lcd, x2-5, y2-5, x2, y2 , 1, BLACK);
+ g15daemon_rectangle (lcd, x2-5, y2-5, x2, y2 , 1, BLACK);
break;
case 48:
- rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- rectangle (lcd, x1 +5, y1 +5, x2 -5, y2 - 6, 1, WHITE);
+ g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
+ g15daemon_rectangle (lcd, x1 +5, y1 +5, x2 -5, y2 - 6, 1, WHITE);
break;
case 49:
- rectangle (lcd, x2-5, y1, x2, y2 , 1, BLACK);
- rectangle (lcd, x1, y1, x2 -5, y2, 1, WHITE);
+ g15daemon_rectangle (lcd, x2-5, y1, x2, y2 , 1, BLACK);
+ g15daemon_rectangle (lcd, x1, y1, x2 -5, y2, 1, WHITE);
break;
case 50:
- rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- rectangle (lcd, x1, y1+5, x2 -5, y1+((y2/2)-3), 1, WHITE);
- rectangle (lcd, x1+5, y1+((y2/2)+3), x2 , y2-6, 1, WHITE);
+ g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
+ g15daemon_rectangle (lcd, x1, y1+5, x2 -5, y1+((y2/2)-3), 1, WHITE);
+ g15daemon_rectangle (lcd, x1+5, y1+((y2/2)+3), x2 , y2-6, 1, WHITE);
break;
case 51:
- rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- rectangle (lcd, x1, y1+5, x2 -5, y1+((y2/2)-3), 1, WHITE);
- rectangle (lcd, x1, y1+((y2/2)+3), x2-5 , y2-6, 1, WHITE);
+ g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
+ g15daemon_rectangle (lcd, x1, y1+5, x2 -5, y1+((y2/2)-3), 1, WHITE);
+ g15daemon_rectangle (lcd, x1, y1+((y2/2)+3), x2-5 , y2-6, 1, WHITE);
break;
case 52:
- rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- rectangle (lcd, x1, y1+((y2/2)+3), x2 -5, y2, 1, WHITE);
- rectangle (lcd, x1+5, y1, x2-5 , y1+((y2/2)-3), 1, WHITE);
+ g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
+ g15daemon_rectangle (lcd, x1, y1+((y2/2)+3), x2 -5, y2, 1, WHITE);
+ g15daemon_rectangle (lcd, x1+5, y1, x2-5 , y1+((y2/2)-3), 1, WHITE);
break;
case 53:
- rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- rectangle (lcd, x1+5, y1+5, x2 , y1+((y2/2)-3), 1, WHITE);
- rectangle (lcd, x1, y1+((y2/2)+3), x2-5 , y2-6, 1, WHITE);
+ g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
+ g15daemon_rectangle (lcd, x1+5, y1+5, x2 , y1+((y2/2)-3), 1, WHITE);
+ g15daemon_rectangle (lcd, x1, y1+((y2/2)+3), x2-5 , y2-6, 1, WHITE);
break;
case 54:
- rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- rectangle (lcd, x1+5, y1+5, x2 , y1+((y2/2)-3), 1, WHITE);
- rectangle (lcd, x1+5, y1+((y2/2)+3), x2-5 , y2-6, 1, WHITE);
+ g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
+ g15daemon_rectangle (lcd, x1+5, y1+5, x2 , y1+((y2/2)-3), 1, WHITE);
+ g15daemon_rectangle (lcd, x1+5, y1+((y2/2)+3), x2-5 , y2-6, 1, WHITE);
break;
case 55:
- rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- rectangle (lcd, x1, y1+5, x2 -5, y2, 1, WHITE);
+ g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
+ g15daemon_rectangle (lcd, x1, y1+5, x2 -5, y2, 1, WHITE);
break;
case 56:
- rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- rectangle (lcd, x1+5, y1+5, x2-5 , y1+((y2/2)-3), 1, WHITE);
- rectangle (lcd, x1+5, y1+((y2/2)+3), x2-5 , y2-6, 1, WHITE);
+ g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
+ g15daemon_rectangle (lcd, x1+5, y1+5, x2-5 , y1+((y2/2)-3), 1, WHITE);
+ g15daemon_rectangle (lcd, x1+5, y1+((y2/2)+3), x2-5 , y2-6, 1, WHITE);
break;
case 57:
- rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- rectangle (lcd, x1+5, y1+5, x2-5 , y1+((y2/2)-3), 1, WHITE);
- rectangle (lcd, x1, y1+((y2/2)+3), x2-5 , y2, 1, WHITE);
+ g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
+ g15daemon_rectangle (lcd, x1+5, y1+5, x2-5 , y1+((y2/2)-3), 1, WHITE);
+ g15daemon_rectangle (lcd, x1, y1+((y2/2)+3), x2-5 , y2, 1, WHITE);
break;
case 58:
- rectangle (lcd, x2-5, y1+5, x2, y1+10 , 1, BLACK);
- rectangle (lcd, x2-5, y2-10, x2, y2-5 , 1, BLACK);
+ g15daemon_rectangle (lcd, x2-5, y1+5, x2, y1+10 , 1, BLACK);
+ g15daemon_rectangle (lcd, x2-5, y2-10, x2, y2-5 , 1, BLACK);
break;
}
Modified: trunk/g15daemon-wip/g15daemon/linked_lists.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-13 03:14:20 UTC (rev 131)
+++ trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-13 05:25:42 UTC (rev 132)
@@ -23,6 +23,8 @@
and arbitrates LCD display. Allows for multiple simultaneous clients.
Client screens can be cycled through by pressing the 'L1' key.
*/
+#define G15DAEMON_BUILD 1
+
#include <stdio.h>
#include <stdlib.h>
#include <g15daemon.h>
@@ -32,9 +34,9 @@
extern unsigned int client_handles_keys;
extern plugin_info_t *generic_info;
-lcd_t * create_lcd () {
+lcd_t * ll_create_lcd () {
- lcd_t *lcd = g15_xmalloc (sizeof (lcd_t));
+ lcd_t *lcd = g15daemon_xmalloc (sizeof (lcd_t));
lcd->max_x = LCD_WIDTH;
lcd->max_y = LCD_HEIGHT;
lcd->backlight_state = G15_BRIGHTNESS_MEDIUM;
@@ -42,35 +44,35 @@
lcd->contrast_state = G15_CONTRAST_MEDIUM;
lcd->state_changed = 1;
lcd->usr_foreground = 0;
- lcd->g15plugin = g15_xmalloc(sizeof (plugin_s));
+ lcd->g15plugin = g15daemon_xmalloc(sizeof (plugin_s));
lcd->g15plugin->plugin_handle = NULL;
lcd->g15plugin->info = (void*)&generic_info;
return (lcd);
}
-void quit_lcd (lcd_t * lcd) {
+void ll_quit_lcd (lcd_t * lcd) {
free (lcd->g15plugin);
free (lcd);
}
/* initialise a new displaylist, and add an initial node at the tail (used for the clock) */
-lcdlist_t *lcdlist_init () {
+lcdlist_t *ll_lcdlist_init () {
lcdlist_t *displaylist = NULL;
pthread_mutex_init(&lcdlist_mutex, NULL);
pthread_mutex_lock(&lcdlist_mutex);
- displaylist = g15_xmalloc(sizeof(lcdlist_t));
+ displaylist = g15daemon_xmalloc(sizeof(lcdlist_t));
- displaylist->head = g15_xmalloc(sizeof(lcdnode_t));
+ displaylist->head = g15daemon_xmalloc(sizeof(lcdnode_t));
displaylist->tail = displaylist->head;
displaylist->current = displaylist->head;
- displaylist->head->lcd = create_lcd();
+ displaylist->head->lcd = ll_create_lcd();
displaylist->head->lcd->mkey_state = 0;
displaylist->head->lcd->masterlist = displaylist;
/* first screen is the clock/menu */
@@ -86,15 +88,15 @@
return displaylist;
}
-lcdnode_t *lcdnode_add(lcdlist_t **displaylist) {
+lcdnode_t *g15daemon_lcdnode_add(lcdlist_t **displaylist) {
lcdnode_t *new = NULL;
pthread_mutex_lock(&lcdlist_mutex);
- new = g15_xmalloc(sizeof(lcdnode_t));
+ new = g15daemon_xmalloc(sizeof(lcdnode_t));
new->prev = (*displaylist)->head;
new->next = (*displaylist)->tail;
- new->lcd = create_lcd();
+ new->lcd = ll_create_lcd();
new->lcd->masterlist = (*displaylist);
new->last_priority = NULL;
new->list = *displaylist;
@@ -112,15 +114,15 @@
}
/* cycle through connected client displays */
-int lcdnode_cycle(lcdlist_t *displaylist)
+int g15daemon_lcdnode_cycle(lcdlist_t *displaylist)
{
lcdnode_t *current_screen = displaylist->current;
- send_event(current_screen->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_HIDDEN);
+ g15daemon_send_event(current_screen->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_HIDDEN);
do
{
pthread_mutex_lock(&lcdlist_mutex);
- send_event(current_screen->lcd, G15_EVENT_USER_FOREGROUND, 0);
+ g15daemon_send_event(current_screen->lcd, G15_EVENT_USER_FOREGROUND, 0);
if(displaylist->tail == displaylist->current){
displaylist->current = displaylist->head;
@@ -137,15 +139,15 @@
displaylist->current = displaylist->current->prev;
}
pthread_mutex_unlock(&lcdlist_mutex);
- send_event(displaylist->current->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_VISIBLE);
- send_event(current_screen->lcd, G15_EVENT_USER_FOREGROUND, 1);
+ g15daemon_send_event(displaylist->current->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_VISIBLE);
+ g15daemon_send_event(current_screen->lcd, G15_EVENT_USER_FOREGROUND, 1);
pthread_mutex_lock(&lcdlist_mutex);
displaylist->current->lcd->state_changed = 1;
displaylist->current->last_priority = displaylist->current;
pthread_mutex_unlock(&lcdlist_mutex);
}
-void lcdnode_remove (lcdnode_t *oldnode) {
+void g15daemon_lcdnode_remove (lcdnode_t *oldnode) {
lcdlist_t **display_list = NULL;
lcdnode_t **prev = NULL;
@@ -157,7 +159,7 @@
prev = &oldnode->prev;
next = &oldnode->next;
- quit_lcd(oldnode->lcd);
+ ll_quit_lcd(oldnode->lcd);
(unsigned int)(*display_list)->numclients--;
if((*display_list)->current == oldnode) {
if((*display_list)->current!=(*display_list)->head){
@@ -187,12 +189,12 @@
pthread_mutex_unlock(&lcdlist_mutex);
}
-void lcdlist_destroy(lcdlist_t **displaylist) {
+void ll_lcdlist_destroy(lcdlist_t **displaylist) {
int i = 0;
while ((*displaylist)->head != (*displaylist)->tail) {
i++;
- lcdnode_remove((*displaylist)->head);
+ g15daemon_lcdnode_remove((*displaylist)->head);
}
free((*displaylist)->tail->lcd);
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2006-11-13 03:14:20 UTC (rev 131)
+++ trunk/g15daemon-wip/g15daemon/main.c 2006-11-13 05:25:42 UTC (rev 132)
@@ -23,6 +23,7 @@
and arbitrates LCD display. Allows for multiple simultaneous clients.
Client screens can be cycled through by pressing the 'L1' key.
*/
+#define G15DAEMON_BUILD 1
#include <pthread.h>
#include <stdio.h>
@@ -53,7 +54,7 @@
struct lcd_t *keyhandler = NULL;
/* send event to foreground client's eventlistener */
-int send_event(void *caller, unsigned int event, unsigned long value)
+int g15daemon_send_event(void *caller, unsigned int event, unsigned long value)
{
switch(event) {
case G15_EVENT_KEYPRESS: {
@@ -79,11 +80,11 @@
lcdlist_t* displaylist = lcd->masterlist;
static unsigned int clicktime;
if(value & cycle_key) {
- clicktime=gettimerms();
+ clicktime=g15daemon_gettime_ms();
}else{
- unsigned int unclick=gettimerms();
+ unsigned int unclick=g15daemon_gettime_ms();
if ((unclick-clicktime)<500) {
- lcdnode_cycle(displaylist);
+ g15daemon_lcdnode_cycle(displaylist);
}
else
{
@@ -107,7 +108,7 @@
lcd_t *lcd = (lcd_t*)caller;
lcdlist_t* displaylist = lcd->masterlist;
if(value)
- lcdnode_cycle(displaylist);
+ g15daemon_lcdnode_cycle(displaylist);
break;
}
case G15_EVENT_REQ_PRIORITY: {
@@ -159,10 +160,10 @@
pthread_mutex_unlock(&g15lib_mutex);
if(retval == G15_NO_ERROR){
- send_event(displaylist->current->lcd,
+ g15daemon_send_event(displaylist->current->lcd,
G15_EVENT_KEYPRESS, keypresses);
}
- pthread_msleep(10);
+ g15daemon_msleep(10);
}
return NULL;
@@ -176,7 +177,7 @@
lcd_t *displaying = displaylist->tail->lcd;
memset(displaying->buf,0,1024);
- pthread_sleep(2);
+ g15daemon_sleep(2);
while (!leaving) {
pthread_mutex_lock(&lcdlist_mutex);
@@ -184,7 +185,7 @@
displaying = displaylist->current->lcd;
if(displaying->ident != lastlcd){
- write_buf_to_g15(displaying);
+ uf_write_buf_to_g15(displaying);
lastlcd = displaying->ident;
}
@@ -197,7 +198,7 @@
pthread_mutex_unlock(&lcdlist_mutex);
- pthread_msleep(5);
+ g15daemon_msleep(5);
}
return NULL;
}
@@ -232,7 +233,7 @@
memset(daemonargs,0,20);
strncpy(daemonargs,argv[i],19);
if (!strncmp(daemonargs, "-k",2) || !strncmp(daemonargs, "--kill",6)) {
- daemonpid = g15daemon_return_running();
+ daemonpid = uf_return_running();
if(daemonpid>0) {
kill(daemonpid,SIGINT);
} else
@@ -241,13 +242,13 @@
}
if (!strncmp(daemonargs, "-v",2) || !strncmp(daemonargs, "--version",9)) {
float lg15ver = LIBG15_VERSION;
- printf("G15Daemon version %s - %s\n",VERSION,g15daemon_return_running() >= 0 ?"Loaded & Running":"Not Running");
+ printf("G15Daemon version %s - %s\n",VERSION,uf_return_running() >= 0 ?"Loaded & Running":"Not Running");
printf("compiled with libg15 version %.3f\n\n",lg15ver/1000);
exit(0);
}
if (!strncmp(daemonargs, "-h",2) || !strncmp(daemonargs, "--help",6)) {
- printf("G15Daemon version %s - %s\n",VERSION,g15daemon_return_running() >= 0 ?"Loaded & Running":"Not Running");
+ printf("G15Daemon version %s - %s\n",VERSION,uf_return_running() >= 0 ?"Loaded & Running":"Not Running");
printf("%s -h (--help) or -k (--kill) or -s (--switch) or -d (--debug) or -v (--version)\n\n -k will kill a previous incarnation,\n -h shows this help\n -s changes the screen-switch key from MR to L1\n -d debug mode - stay in foreground and output all debug messages to STDERR\n -v show version\n",argv[0]);
exit(0);
}
@@ -268,14 +269,14 @@
}
}
- if(g15daemon_return_running()>=0) {
+ if(uf_return_running()>=0) {
g15daemon_log(LOG_ERR,"G15Daemon already running.. Exiting");
exit(0);
}
if(!g15daemon_debug)
daemon(0,0);
- if(g15daemon_create_pidfile() == 0) {
+ if(uf_create_pidfile() == 0) {
int fd;
fd_set fds;
@@ -313,7 +314,7 @@
}
/* initialise the linked list */
- lcdlist = lcdlist_init();
+ lcdlist = ll_lcdlist_init();
lcdlist->nobody = nobody;
pthread_mutex_init(&g15lib_mutex, NULL);
pthread_attr_init(&attr);
@@ -339,8 +340,8 @@
g15daemon_log(LOG_INFO,"%s loaded\n",PACKAGE_STRING);
snprintf(location,1024,"%s/%s\0",DATADIR,"g15daemon/splash/g15logo2.wbmp");
- load_wbmp(lcdlist->tail->lcd,location);
- write_buf_to_g15(lcdlist->tail->lcd);
+ g15daemon_load_wbmp(lcdlist->tail->lcd,location);
+ uf_write_buf_to_g15(lcdlist->tail->lcd);
snprintf(location,1024,"%s/%s\0",DATADIR,"g15daemon/plugins");
@@ -366,7 +367,7 @@
exitLibG15();
#endif
#endif
- lcdlist_destroy(&lcdlist);
+ ll_lcdlist_destroy(&lcdlist);
exitnow:
/* return to root privilages for the final countdown */
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-13 03:14:20 UTC (rev 131)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-13 05:25:42 UTC (rev 132)
@@ -23,6 +23,7 @@
and arbitrates LCD display. Allows for multiple simultaneous clients.
Client screens can be cycled through by pressing the 'L1' key.
*/
+#define G15DAEMON_BUILD 1
#include <pthread.h>
#include <stdio.h>
@@ -55,7 +56,7 @@
};
/* handy function from xine_utils.c */
-void *g15_xmalloc(size_t size) {
+void *g15daemon_xmalloc(size_t size) {
void *ptr;
/* prevent xmalloc(0) of possibly returning NULL */
@@ -69,7 +70,7 @@
return ptr;
}
-int g15daemon_return_running(){
+int uf_return_running(){
int fd;
char pidtxt[128];
int pid;
@@ -101,13 +102,13 @@
}
-int g15daemon_create_pidfile() {
+int uf_create_pidfile() {
char pidtxt[128];
size_t l;
int fd;
- if(!g15daemon_return_running() && (fd = open(G15DAEMON_PIDFILE, O_CREAT|O_RDWR|O_EXCL, 0644)) < 0) {
+ if(!uf_return_running() && (fd = open(G15DAEMON_PIDFILE, O_CREAT|O_RDWR|O_EXCL, 0644)) < 0) {
g15daemon_log(LOG_ERR,"previous G15Daemon process died. removing pidfile");
unlink(G15DAEMON_PIDFILE);
}
@@ -146,16 +147,16 @@
return 0;
}
-void convert_buf(lcd_t *lcd, unsigned char * orig_buf)
+void g15daemon_convert_buf(lcd_t *lcd, unsigned char * orig_buf)
{
unsigned int x,y;
for(x=0;x<160;x++)
for(y=0;y<43;y++)
- setpixel(lcd,x,y,orig_buf[x+(y*160)]);
+ g15daemon_setpixel(lcd,x,y,orig_buf[x+(y*160)]);
}
/* wrap the libg15 function */
-void write_buf_to_g15(lcd_t *lcd)
+void uf_write_buf_to_g15(lcd_t *lcd)
{
pthread_mutex_lock(&g15lib_mutex);
writePixmapToLCD(lcd->buf);
@@ -164,7 +165,7 @@
}
/* basic wbmp loader - wbmps should be inverted for use here */
-int load_wbmp(lcd_t *lcd, char *filename)
+int g15daemon_load_wbmp(lcd_t *lcd, char *filename)
{
int wbmp_fd;
int retval;
@@ -206,7 +207,7 @@
/* Sleep routine (hackish). */
-void pthread_sleep(int seconds) {
+void g15daemon_sleep(int seconds) {
pthread_mutex_t dummy_mutex;
static pthread_cond_t dummy_cond = PTHREAD_COND_INITIALIZER;
struct timespec timeout;
@@ -226,7 +227,7 @@
}
/* millisecond sleep routine. */
-int pthread_msleep(int milliseconds) {
+int g15daemon_msleep(int milliseconds) {
struct timespec timeout;
if(milliseconds>999)
@@ -237,7 +238,7 @@
return nanosleep (&timeout, NULL);
}
-unsigned int gettimerms(){
+unsigned int g15daemon_gettime_ms(){
struct timeval tv;
gettimeofday(&tv,NULL);
return (tv.tv_sec*1000+tv.tv_usec/1000);
Modified: trun...
[truncated message content] |
|
From: <mla...@us...> - 2006-11-13 05:52:17
|
Revision: 133
http://svn.sourceforge.net/g15daemon/?rev=133&view=rev
Author: mlampard
Date: 2006-11-12 21:52:10 -0800 (Sun, 12 Nov 2006)
Log Message:
-----------
further headerfile cleanups
Modified Paths:
--------------
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/linked_lists.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
trunk/g15daemon-wip/plugins/g15_plugin_uinput.c
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-13 05:25:42 UTC (rev 132)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-13 05:52:10 UTC (rev 133)
@@ -32,22 +32,9 @@
#define BLACKnWHITE
#endif
-#define GKEY_OFFSET 167
-#define MKEY_OFFSET 185
-#define LKEY_OFFSET 189
-
-#define G15KEY_DOWN 1
-#define G15KEY_UP 0
-
#define LCD_WIDTH 160
#define LCD_HEIGHT 43
-/* tcp server defines */
-#define LISTEN_PORT 15550
-#define LISTEN_ADDR "127.0.0.1"
-/* any more than this number of simultaneous clients will be rejected. */
-#define MAX_CLIENTS 10
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -194,6 +181,7 @@
#define SERV_HELO "G15 daemon HELLO"
#ifdef G15DAEMON_BUILD
+/* internal g15daemon-only functions */
/* call create_lcd for every new client, and quit it when done */
lcd_t * ll_create_lcd ();
void ll_quit_lcd (lcd_t * lcd);
@@ -209,9 +197,15 @@
int internal_generic_eventhandler(plugin_event_t *myevent);
#endif
+/* the following functions are available for use by plugins */
+
+/* set or unset a pixel in the provided lcd's buffer */
void g15daemon_setpixel (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int color);
+/* draw large number <num> with the dimensions provided */
void g15daemon_draw_bignum (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int color, int num);
+/* draw a line */
void g15daemon_line (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int colour);
+/* draw filled or unfilled rectangle */
void g15daemon_rectangle (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, int filled, unsigned int colour);
/* send event to foreground client's eventlistener */
Modified: trunk/g15daemon-wip/g15daemon/linked_lists.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-13 05:25:42 UTC (rev 132)
+++ trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-13 05:52:10 UTC (rev 133)
@@ -149,25 +149,25 @@
void g15daemon_lcdnode_remove (lcdnode_t *oldnode) {
- lcdlist_t **display_list = NULL;
+ lcdlist_t **displaylist = NULL;
lcdnode_t **prev = NULL;
lcdnode_t **next = NULL;
pthread_mutex_lock(&lcdlist_mutex);
- display_list = &oldnode->list;
+ displaylist = &oldnode->list;
prev = &oldnode->prev;
next = &oldnode->next;
ll_quit_lcd(oldnode->lcd);
- (unsigned int)(*display_list)->numclients--;
- if((*display_list)->current == oldnode) {
- if((*display_list)->current!=(*display_list)->head){
- (*display_list)->current = oldnode->next;
+ (unsigned int)(*displaylist)->numclients--;
+ if((*displaylist)->current == oldnode) {
+ if((*displaylist)->current!=(*displaylist)->head){
+ (*displaylist)->current = oldnode->next;
} else {
- (*display_list)->current = oldnode->prev;
+ (*displaylist)->current = oldnode->prev;
}
- (*display_list)->current->lcd->state_changed = 1;
+ (*displaylist)->current->lcd->state_changed = 1;
}
if(&oldnode->lcd == (void*)keyhandler) {
@@ -176,12 +176,12 @@
g15daemon_log(LOG_WARNING,"Client key handler quit, going back to defaults");
}
- if((*display_list)->head!=oldnode){
+ if((*displaylist)->head!=oldnode){
(*next)->prev = oldnode->prev;
(*prev)->next = oldnode->next;
}else{
- (*prev)->next = (*display_list)->tail;
- (*display_list)->head = oldnode->prev;
+ (*prev)->next = (*displaylist)->tail;
+ (*displaylist)->head = oldnode->prev;
}
free(oldnode);
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2006-11-13 05:25:42 UTC (rev 132)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2006-11-13 05:52:10 UTC (rev 133)
@@ -42,6 +42,13 @@
static int leaving;
int server_events(plugin_event_t *myevent);
+/* tcp server defines */
+#define LISTEN_PORT 15550
+#define LISTEN_ADDR "127.0.0.1"
+
+/* any more than this number of simultaneous clients will be rejected. */
+#define MAX_CLIENTS 10
+
/* custom plugininfo for clients... */
plugin_info_t lcdclient_info[] = {
/* TYPE, name, initfunc, updatefreq, exitfunc, eventhandler, initfunc */
Modified: trunk/g15daemon-wip/plugins/g15_plugin_uinput.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2006-11-13 05:25:42 UTC (rev 132)
+++ trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2006-11-13 05:52:10 UTC (rev 133)
@@ -45,6 +45,13 @@
static int uinp_fd = -1;
+#define GKEY_OFFSET 167
+#define MKEY_OFFSET 185
+#define LKEY_OFFSET 189
+
+#define G15KEY_DOWN 1
+#define G15KEY_UP 0
+
int g15_init_uinput(void *plugin_args) {
int i=0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2006-11-13 06:12:36
|
Revision: 135
http://svn.sourceforge.net/g15daemon/?rev=135&view=rev
Author: mlampard
Date: 2006-11-12 22:12:28 -0800 (Sun, 12 Nov 2006)
Log Message:
-----------
more cleanups
Modified Paths:
--------------
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/linked_lists.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-13 05:58:55 UTC (rev 134)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-13 06:12:28 UTC (rev 135)
@@ -182,9 +182,6 @@
#ifdef G15DAEMON_BUILD
/* internal g15daemon-only functions */
-/* call create_lcd for every new client, and quit it when done */
-lcd_t * ll_create_lcd ();
-void ll_quit_lcd (lcd_t * lcd);
void uf_write_buf_to_g15(lcd_t *lcd);
/* linked lists */
Modified: trunk/g15daemon-wip/g15daemon/linked_lists.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-13 05:58:55 UTC (rev 134)
+++ trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-13 06:12:28 UTC (rev 135)
@@ -34,7 +34,7 @@
extern unsigned int client_handles_keys;
extern plugin_info_t *generic_info;
-lcd_t * ll_create_lcd () {
+lcd_t static * ll_create_lcd () {
lcd_t *lcd = g15daemon_xmalloc (sizeof (lcd_t));
lcd->max_x = LCD_WIDTH;
@@ -51,7 +51,7 @@
return (lcd);
}
-void ll_quit_lcd (lcd_t * lcd) {
+static void ll_quit_lcd (lcd_t * lcd) {
free (lcd->g15plugin);
free (lcd);
}
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2006-11-13 05:58:55 UTC (rev 134)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2006-11-13 06:12:28 UTC (rev 135)
@@ -73,7 +73,7 @@
}
} else */
if(msgbuf[0] == CLIENT_CMD_SWITCH_PRIORITIES){
- send_event(lcdnode,G15_EVENT_REQ_PRIORITY,1);
+ g15daemon_send_event(lcdnode,G15_EVENT_REQ_PRIORITY,1);
}
else if(msgbuf[0] == CLIENT_CMD_IS_FOREGROUND)
{ /* client wants to know if it's currently viewable */
@@ -371,7 +371,7 @@
if((g15_socket = init_sockserver())<0){
g15daemon_log(LOG_ERR,"Unable to initialise the server at port %i",LISTEN_PORT);
- return NULL;
+ return;
}
if (fcntl(g15_socket, F_SETFL, O_NONBLOCK) <0 ) {
@@ -383,7 +383,7 @@
}
close(g15_socket);
- return NULL;
+ return;
}
/* incoming events */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ane...@us...> - 2006-11-14 08:41:51
|
Revision: 138
http://svn.sourceforge.net/g15daemon/?rev=138&view=rev
Author: aneurysm9
Date: 2006-11-14 00:41:46 -0800 (Tue, 14 Nov 2006)
Log Message:
-----------
Convert g15_plugin_clock to use libg15render
Remove gfx_primitives.c
Modified Paths:
--------------
trunk/g15daemon-wip/g15daemon/Makefile.am
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/utility_funcs.c
trunk/g15daemon-wip/plugins/g15_plugin_clock.c
Removed Paths:
-------------
trunk/g15daemon-wip/g15daemon/gfx_primitives.c
Modified: trunk/g15daemon-wip/g15daemon/Makefile.am
===================================================================
--- trunk/g15daemon-wip/g15daemon/Makefile.am 2006-11-14 07:34:50 UTC (rev 137)
+++ trunk/g15daemon-wip/g15daemon/Makefile.am 2006-11-14 08:41:46 UTC (rev 138)
@@ -3,8 +3,7 @@
sbin_PROGRAMS = g15daemon
noinst_PROGRAMS = g15daemontest
noinst_HEADERS = g15logo.h
-g15daemon_SOURCES = utility_funcs.c \
- g15daemon.h main.c linked_lists.c gfx_primitives.c g15_plugins.c
+g15daemon_SOURCES = utility_funcs.c g15daemon.h main.c linked_lists.c g15_plugins.c
g15daemon_LDADD = -ldl
g15daemon_LDFLAGS = -rdynamic
g15daemontest_SOURCES = lcdclient_test.c
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-14 07:34:50 UTC (rev 137)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-14 08:41:46 UTC (rev 138)
@@ -196,15 +196,6 @@
/* the following functions are available for use by plugins */
-/* set or unset a pixel in the provided lcd's buffer */
-void g15daemon_setpixel (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int color);
-/* draw large number <num> with the dimensions provided */
-void g15daemon_draw_bignum (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int color, int num);
-/* draw a line */
-void g15daemon_line (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int colour);
-/* draw filled or unfilled rectangle */
-void g15daemon_rectangle (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, int filled, unsigned int colour);
-
/* send event to foreground client's eventlistener */
int g15daemon_send_event(void *caller, unsigned int event, unsigned long value);
/* open named plugin */
Deleted: trunk/g15daemon-wip/g15daemon/gfx_primitives.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/gfx_primitives.c 2006-11-14 07:34:50 UTC (rev 137)
+++ trunk/g15daemon-wip/g15daemon/gfx_primitives.c 2006-11-14 08:41:46 UTC (rev 138)
@@ -1,199 +0,0 @@
-/*
- This file is part of g15daemon.
-
- g15daemon 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 of the License, or
- (at your option) any later version.
-
- g15daemon 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 g15daemon; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
-
- $Revision$ - $Date$ $Author$
-
- This daemon listens on localhost port 15550 for client connections,
- and arbitrates LCD display. Allows for multiple simultaneous clients.
- Client screens can be cycled through by pressing the 'L1' key.
-*/
-#define G15DAEMON_BUILD 1
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "g15daemon.h"
-#include <libg15.h>
-
-/* set a pixel in a libg15 buffer */
-void g15daemon_setpixel(lcd_t *lcd, unsigned int x, unsigned int y, unsigned int val)
-{
- unsigned int curr_row = y;
- unsigned int curr_col = x;
-
- unsigned int pixel_offset = curr_row * LCD_WIDTH + curr_col;
- unsigned int byte_offset = pixel_offset / 8;
- unsigned int bit_offset = 7-(pixel_offset % 8);
-
- if (val)
- lcd->buf[byte_offset] = lcd->buf[byte_offset] | 1 << bit_offset;
- else
- lcd->buf[byte_offset] = lcd->buf[byte_offset] & ~(1 << bit_offset);
-}
-
-
-void g15daemon_line (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int colour) {
-
- int d, sx, sy, dx, dy;
- unsigned int ax, ay;
-
- x1 = x1 - 1;
- y1 = y1 - 1;
- x2 = x2 - 1;
- y2 = y2 - 1;
-
- dx = x2 - x1;
- ax = abs (dx) << 1;
- if (dx < 0)
- sx = -1;
- else
- sx = 1;
-
- dy = y2 - y1;
- ay = abs (dy) << 1;
- if (dy < 0)
- sy = -1;
- else
- sy = 1;
-
- /* set the pixel */
- g15daemon_setpixel (lcd, x1, y1, colour);
-
- if (ax > ay)
- {
- d = ay - (ax >> 1);
- while (x1 != x2)
- {
- if (d >= 0)
- {
- y1 += sy;
- d -= ax;
- }
- x1 += sx;
- d += ay;
- g15daemon_setpixel (lcd, x1, y1, colour);
- }
- }
- else
- {
- d = ax - (ay >> 1);
- while (y1 != y2)
- {
- if (d >= 0)
- {
- x1 += sx;
- d -= ay;
- }
- y1 += sy;
- d += ax;
- g15daemon_setpixel (lcd, x1, y1, colour);
- }
- }
-}
-
-
-void g15daemon_rectangle (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, int filled, unsigned int colour) {
-
- int y;
-
- if (x1 != x2 && y1 != y2)
- {
- if (!filled)
- {
- g15daemon_line (lcd, x1, y1, x2, y1, colour);
- g15daemon_line (lcd, x1, y1, x1, y2, colour);
- g15daemon_line (lcd, x1, y2, x2, y2, colour);
- g15daemon_line (lcd, x2, y1, x2, y2, colour);
- }
- else
- {
- for (y = y1; y <= y2; y++)
- {
- g15daemon_line(lcd,x1,y,x2,y,colour);
- }
- }
- }
-}
-
-
-void g15daemon_draw_bignum (lcd_t * lcd, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int colour, int num) {
- x1 += 2;
- x2 -= 2;
-
- switch(num){
- case 45:
- g15daemon_rectangle (lcd, x1, y1+((y2/2)-2), x2, y1+((y2/2)+2), 1, BLACK);
- break;
- case 46:
- g15daemon_rectangle (lcd, x2-5, y2-5, x2, y2 , 1, BLACK);
- break;
- case 48:
- g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- g15daemon_rectangle (lcd, x1 +5, y1 +5, x2 -5, y2 - 6, 1, WHITE);
- break;
- case 49:
- g15daemon_rectangle (lcd, x2-5, y1, x2, y2 , 1, BLACK);
- g15daemon_rectangle (lcd, x1, y1, x2 -5, y2, 1, WHITE);
- break;
- case 50:
- g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- g15daemon_rectangle (lcd, x1, y1+5, x2 -5, y1+((y2/2)-3), 1, WHITE);
- g15daemon_rectangle (lcd, x1+5, y1+((y2/2)+3), x2 , y2-6, 1, WHITE);
- break;
- case 51:
- g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- g15daemon_rectangle (lcd, x1, y1+5, x2 -5, y1+((y2/2)-3), 1, WHITE);
- g15daemon_rectangle (lcd, x1, y1+((y2/2)+3), x2-5 , y2-6, 1, WHITE);
- break;
- case 52:
- g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- g15daemon_rectangle (lcd, x1, y1+((y2/2)+3), x2 -5, y2, 1, WHITE);
- g15daemon_rectangle (lcd, x1+5, y1, x2-5 , y1+((y2/2)-3), 1, WHITE);
- break;
- case 53:
- g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- g15daemon_rectangle (lcd, x1+5, y1+5, x2 , y1+((y2/2)-3), 1, WHITE);
- g15daemon_rectangle (lcd, x1, y1+((y2/2)+3), x2-5 , y2-6, 1, WHITE);
- break;
- case 54:
- g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- g15daemon_rectangle (lcd, x1+5, y1+5, x2 , y1+((y2/2)-3), 1, WHITE);
- g15daemon_rectangle (lcd, x1+5, y1+((y2/2)+3), x2-5 , y2-6, 1, WHITE);
- break;
- case 55:
- g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- g15daemon_rectangle (lcd, x1, y1+5, x2 -5, y2, 1, WHITE);
- break;
- case 56:
- g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- g15daemon_rectangle (lcd, x1+5, y1+5, x2-5 , y1+((y2/2)-3), 1, WHITE);
- g15daemon_rectangle (lcd, x1+5, y1+((y2/2)+3), x2-5 , y2-6, 1, WHITE);
- break;
- case 57:
- g15daemon_rectangle (lcd, x1, y1, x2, y2 , 1, BLACK);
- g15daemon_rectangle (lcd, x1+5, y1+5, x2-5 , y1+((y2/2)-3), 1, WHITE);
- g15daemon_rectangle (lcd, x1, y1+((y2/2)+3), x2-5 , y2, 1, WHITE);
- break;
- case 58:
- g15daemon_rectangle (lcd, x2-5, y1+5, x2, y1+10 , 1, BLACK);
- g15daemon_rectangle (lcd, x2-5, y2-10, x2, y2-5 , 1, BLACK);
- break;
-
- }
-}
-
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-14 07:34:50 UTC (rev 137)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-14 08:41:46 UTC (rev 138)
@@ -149,10 +149,21 @@
void g15daemon_convert_buf(lcd_t *lcd, unsigned char * orig_buf)
{
- unsigned int x,y;
+ unsigned int x,y,val;
for(x=0;x<160;x++)
for(y=0;y<43;y++)
- g15daemon_setpixel(lcd,x,y,orig_buf[x+(y*160)]);
+ {
+ unsigned int pixel_offset = y * LCD_WIDTH + x;
+ unsigned int byte_offset = pixel_offset / 8;
+ unsigned int bit_offset = 7-(pixel_offset % 8);
+
+ val = orig_buf[x+(y*160)];
+
+ if (val)
+ lcd->buf[byte_offset] = lcd->buf[byte_offset] | 1 << bit_offset;
+ else
+ lcd->buf[byte_offset] = lcd->buf[byte_offset] & ~(1 << bit_offset);
+ }
}
/* wrap the libg15 function */
Modified: trunk/g15daemon-wip/plugins/g15_plugin_clock.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2006-11-14 07:34:50 UTC (rev 137)
+++ trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2006-11-14 08:41:46 UTC (rev 138)
@@ -36,8 +36,74 @@
#include <config.h>
#include <g15daemon.h>
+#include <libg15render.h>
+void draw_bignum (g15canvas * canvas, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, int num) {
+ x1 += 2;
+ x2 -= 2;
+ switch(num){
+ case 45:
+ g15r_pixelBox (canvas, x1, y1+((y2/2)-2), x2, y1+((y2/2)+2), G15_COLOR_BLACK, 1, 1);
+ break;
+ case 46:
+ g15r_pixelBox (canvas, x2-5, y2-5, x2, y2 , G15_COLOR_BLACK, 1, 1);
+ break;
+ case 48:
+ g15r_pixelBox (canvas, x1, y1, x2, y2 , G15_COLOR_BLACK, 1, 1);
+ g15r_pixelBox (canvas, x1 +5, y1 +5, x2 -5, y2 - 6, G15_COLOR_WHITE, 1, 1);
+ break;
+ case 49:
+ g15r_pixelBox (canvas, x2-5, y1, x2, y2 , G15_COLOR_BLACK, 1, 1);
+ g15r_pixelBox (canvas, x1, y1, x2 -5, y2, G15_COLOR_WHITE, 1, 1);
+ break;
+ case 50:
+ g15r_pixelBox (canvas, x1, y1, x2, y2 , G15_COLOR_BLACK, 1, 1);
+ g15r_pixelBox (canvas, x1, y1+5, x2 -5, y1+((y2/2)-3), G15_COLOR_WHITE, 1, 1);
+ g15r_pixelBox (canvas, x1+5, y1+((y2/2)+3), x2 , y2-6, G15_COLOR_WHITE, 1, 1);
+ break;
+ case 51:
+ g15r_pixelBox (canvas, x1, y1, x2, y2 , G15_COLOR_BLACK, 1, 1);
+ g15r_pixelBox (canvas, x1, y1+5, x2 -5, y1+((y2/2)-3), G15_COLOR_WHITE, 1, 1);
+ g15r_pixelBox (canvas, x1, y1+((y2/2)+3), x2-5 , y2-6, G15_COLOR_WHITE, 1, 1);
+ break;
+ case 52:
+ g15r_pixelBox (canvas, x1, y1, x2, y2 , G15_COLOR_BLACK, 1, 1);
+ g15r_pixelBox (canvas, x1, y1+((y2/2)+3), x2 -5, y2, G15_COLOR_WHITE, 1, 1);
+ g15r_pixelBox (canvas, x1+5, y1, x2-5 , y1+((y2/2)-3), G15_COLOR_WHITE, 1, 1);
+ break;
+ case 53:
+ g15r_pixelBox (canvas, x1, y1, x2, y2 , G15_COLOR_BLACK, 1, 1);
+ g15r_pixelBox (canvas, x1+5, y1+5, x2 , y1+((y2/2)-3), G15_COLOR_WHITE, 1, 1);
+ g15r_pixelBox (canvas, x1, y1+((y2/2)+3), x2-5 , y2-6, G15_COLOR_WHITE, 1, 1);
+ break;
+ case 54:
+ g15r_pixelBox (canvas, x1, y1, x2, y2 , G15_COLOR_BLACK, 1, 1);
+ g15r_pixelBox (canvas, x1+5, y1+5, x2 , y1+((y2/2)-3), G15_COLOR_WHITE, 1, 1);
+ g15r_pixelBox (canvas, x1+5, y1+((y2/2)+3), x2-5 , y2-6, G15_COLOR_WHITE, 1, 1);
+ break;
+ case 55:
+ g15r_pixelBox (canvas, x1, y1, x2, y2 , G15_COLOR_BLACK, 1, 1);
+ g15r_pixelBox (canvas, x1, y1+5, x2 -5, y2, G15_COLOR_WHITE, 1, 1);
+ break;
+ case 56:
+ g15r_pixelBox (canvas, x1, y1, x2, y2 , G15_COLOR_BLACK, 1, 1);
+ g15r_pixelBox (canvas, x1+5, y1+5, x2-5 , y1+((y2/2)-3), G15_COLOR_WHITE, 1, 1);
+ g15r_pixelBox (canvas, x1+5, y1+((y2/2)+3), x2-5 , y2-6, G15_COLOR_WHITE, 1, 1);
+ break;
+ case 57:
+ g15r_pixelBox (canvas, x1, y1, x2, y2 , G15_COLOR_BLACK, 1, 1);
+ g15r_pixelBox (canvas, x1+5, y1+5, x2-5 , y1+((y2/2)-3), G15_COLOR_WHITE, 1, 1);
+ g15r_pixelBox (canvas, x1, y1+((y2/2)+3), x2-5 , y2, G15_COLOR_WHITE, 1, 1);
+ break;
+ case 58:
+ g15r_pixelBox (canvas, x2-5, y1+5, x2, y1+10 , G15_COLOR_BLACK, 1, 1);
+ g15r_pixelBox (canvas, x2-5, y2-10, x2, y2-5 , G15_COLOR_BLACK, 1, 1);
+ break;
+
+ }
+}
+
static int *lcdclock(lcd_t *lcd)
{
unsigned int col = 0;
@@ -45,29 +111,37 @@
int narrows=0;
int totalwidth=0;
char buf[10];
-
+ g15canvas *canvas = (g15canvas *) malloc (sizeof (g15canvas));
+
+ if (canvas != NULL)
+ {
+ memset(canvas->buffer, 0, G15_BUFFER_LEN);
+ canvas->mode_cache = 0;
+ canvas->mode_reverse = 0;
+ canvas->mode_xor = 0;
+ }
+
time_t currtime = time(NULL);
- memset(lcd->buf,0,1024);
- memset(buf,0,10);
- strftime(buf,6,"%H:%M",localtime(&currtime));
+ memset(lcd->buf,0,G15_BUFFER_LEN);
+ memset(buf,0,10);
+ strftime(buf,6,"%H:%M",localtime(&currtime));
- if(buf[0]==49)
- narrows=1;
+ if(buf[0]==49)
+ narrows=1;
- len = strlen(buf);
+ len = strlen(buf);
- if(narrows)
- totalwidth=(len*20)+(15);
- else
- totalwidth=len*20;
+ if(narrows)
+ totalwidth=(len*20)+(15);
+ else
+ totalwidth=len*20;
- for (col=0;col<len;col++)
- {
- g15daemon_draw_bignum (lcd, (80-(totalwidth)/2)+col*20, 1,(80-(totalwidth)/2)+(col+1)*20, LCD_HEIGHT, BLACK, buf[col]);
+ for (col=0;col<len;col++)
+ draw_bignum (canvas, (80-(totalwidth)/2)+col*20, 1,(80-(totalwidth)/2)+(col+1)*20, G15_LCD_HEIGHT, buf[col]);
- }
- lcd->ident = currtime+100;
+ memcpy (lcd->buf, canvas->buffer, G15_BUFFER_LEN);
+ lcd->ident = currtime+100;
return G15_PLUGIN_OK;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ane...@us...> - 2006-11-13 16:39:42
|
Revision: 121
http://svn.sourceforge.net/g15daemon/?rev=121&view=rev
Author: aneurysm9
Date: 2006-11-11 23:33:32 -0800 (Sat, 11 Nov 2006)
Log Message:
-----------
Convert g15daemon_xmms plugin to use libg15render
Modified Paths:
--------------
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/g15daemon_xmms/Makefile.am
trunk/g15daemon-wip/g15daemon_xmms/g15daemon_xmms_spectrum.c
Removed Paths:
-------------
trunk/g15daemon-wip/g15daemon_xmms/font.h
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2006-11-12 05:18:10 UTC (rev 120)
+++ trunk/g15daemon-wip/configure.in 2006-11-12 07:33:32 UTC (rev 121)
@@ -18,6 +18,7 @@
# Checks for libraries.
AC_CHECK_LIB([daemon], [daemon_log],,AC_MSG_ERROR(["libdaemon (or its devel package) not found. please install it"]))
AC_CHECK_LIB([g15], [initLibG15],,AC_MSG_ERROR(["libg15 (or its devel package) not found. please install it"]))
+AC_CHECK_LIB([g15render], [g15r_initCanvas],,AC_MSG_ERROR(["libg15render (or its devel package) not found. please install it"]))
AC_CHECK_LIB([m], [sin])
AC_CHECK_LIB([pthread], [pthread_mutex_init])
Modified: trunk/g15daemon-wip/g15daemon_xmms/Makefile.am
===================================================================
--- trunk/g15daemon-wip/g15daemon_xmms/Makefile.am 2006-11-12 05:18:10 UTC (rev 120)
+++ trunk/g15daemon-wip/g15daemon_xmms/Makefile.am 2006-11-12 07:33:32 UTC (rev 121)
@@ -12,7 +12,7 @@
IMCLUDES = -I$(top_builddir)/libg15daemon_client/
libg15daemon_xmms_spectrum_la_LDFLAGS = -module -avoid-version
libg15daemon_xmms_spectrum_la_SOURCES = g15daemon_xmms_spectrum.c
-libg15daemon_xmms_spectrum_la_LIBADD = $(top_builddir)/libg15daemon_client/libg15daemon_client.la
+libg15daemon_xmms_spectrum_la_LIBADD = $(top_builddir)/libg15daemon_client/libg15daemon_client.la -lg15render
Deleted: trunk/g15daemon-wip/g15daemon_xmms/font.h
===================================================================
--- trunk/g15daemon-wip/g15daemon_xmms/font.h 2006-11-12 05:18:10 UTC (rev 120)
+++ trunk/g15daemon-wip/g15daemon_xmms/font.h 2006-11-12 07:33:32 UTC (rev 121)
@@ -1,2066 +0,0 @@
-/*
- This file is part of g15lcd.
-
- g15lcd 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 of the License, or
- (at your option) any later version.
-
- g15lcd 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 g15lcd; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-/* This font was provided by Sebastian XXX (sorry bastl, i still cant spell your last name ) */
-unsigned char fontdata_7x5[] = {0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01,
-
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x01, 0x...
[truncated message content] |
|
From: <ane...@us...> - 2006-11-13 16:42:33
|
Revision: 119
http://svn.sourceforge.net/g15daemon/?rev=119&view=rev
Author: aneurysm9
Date: 2006-11-11 20:57:34 -0800 (Sat, 11 Nov 2006)
Log Message:
-----------
Cleanup autotools-generated files
Removed Paths:
-------------
trunk/g15daemon-wip/Makefile.in
trunk/g15daemon-wip/aclocal.m4
trunk/g15daemon-wip/config/config.guess
trunk/g15daemon-wip/config/config.sub
trunk/g15daemon-wip/config/depcomp
trunk/g15daemon-wip/config/install-sh
trunk/g15daemon-wip/config/ltmain.sh
trunk/g15daemon-wip/config/missing
trunk/g15daemon-wip/config.h
trunk/g15daemon-wip/config.h.in
trunk/g15daemon-wip/configure
trunk/g15daemon-wip/g15daemon/Makefile.in
trunk/g15daemon-wip/libg15daemon_client/Makefile.in
trunk/g15daemon-wip/libtool
trunk/g15daemon-wip/plugins/Makefile.in
trunk/g15daemon-wip/stamp-h1
Deleted: trunk/g15daemon-wip/Makefile.in
===================================================================
--- trunk/g15daemon-wip/Makefile.in 2006-11-12 03:11:36 UTC (rev 118)
+++ trunk/g15daemon-wip/Makefile.in 2006-11-12 04:57:34 UTC (rev 119)
@@ -1,789 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
- TODO config/config.guess config/config.sub config/depcomp \
- config/install-sh config/ltmain.sh config/missing
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-man1dir = $(mandir)/man1
-am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \
- "$(DESTDIR)$(docdir)"
-man3dir = $(mandir)/man3
-NROFF = nroff
-MANS = $(man1_MANS) $(man3_MANS)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-docDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(doc_DATA)
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
- { test ! -d $(distdir) \
- || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr $(distdir); }; }
-DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO = @ECHO@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_CONFIG = @GLIB_CONFIG@
-GLIB_LIBS = @GLIB_LIBS@
-GREP = @GREP@
-GTK_CFLAGS = @GTK_CFLAGS@
-GTK_CONFIG = @GTK_CONFIG@
-GTK_LIBS = @GTK_LIBS@
-HAVE_XMMSPLUGIN_FALSE = @HAVE_XMMSPLUGIN_FALSE@
-HAVE_XMMSPLUGIN_TRUE = @HAVE_XMMSPLUGIN_TRUE@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-XMKMF = @XMKMF@
-XMMS_CFLAGS = @XMMS_CFLAGS@
-XMMS_CONFIG = @XMMS_CONFIG@
-XMMS_DATA_DIR = @XMMS_DATA_DIR@
-XMMS_EFFECT_PLUGIN_DIR = @XMMS_EFFECT_PLUGIN_DIR@
-XMMS_GENERAL_PLUGIN_DIR = @XMMS_GENERAL_PLUGIN_DIR@
-XMMS_INPUT_PLUGIN_DIR = @XMMS_INPUT_PLUGIN_DIR@
-XMMS_LIBS = @XMMS_LIBS@
-XMMS_OUTPUT_PLUGIN_DIR = @XMMS_OUTPUT_PLUGIN_DIR@
-XMMS_PLUGIN_DIR = @XMMS_PLUGIN_DIR@
-XMMS_VERSION = @XMMS_VERSION@
-XMMS_VISUALIZATION_PLUGIN_DIR = @XMMS_VISUALIZATION_PLUGIN_DIR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-LLIBDIR = @LIBDIR@
-SUBDIRS = libg15daemon_client g15daemon plugins g15daemon_xmms
-INCLUDES = -I$(top_srcdir)/libg15daemon_client -I$(top_srcdir)/g15daemon
-EXTRA_DIST = debian contrib Documentation g15daemon_xmms lang-bindings patches rpm README.usage FAQ LICENSE
-doc_DATA = FAQ README.usage README ChangeLog TODO AUTHORS NEWS LICENSE
-man1_MANS = $(top_srcdir)/Documentation/g15daemon.1
-man3_MANS = $(top_srcdir)/Documentation/g15daemon_client_devel.3
-all: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-.SUFFIXES:
-am--refresh:
- @:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
- cd $(srcdir) && $(AUTOMAKE) --gnu \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- echo ' $(SHELL) ./config.status'; \
- $(SHELL) ./config.status;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) stamp-h1; \
- else :; fi
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in: $(am__configure_deps)
- cd $(top_srcdir) && $(AUTOHEADER)
- rm -f stamp-h1
- touch $@
-
-distclean-hdr:
- -rm -f config.h stamp-h1
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-man1: $(man1_MANS) $(man_MANS)
- @$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
- @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
- done
-uninstall-man1:
- @$(NORMAL_UNINSTALL)
- @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
- rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
- done
-install-man3: $(man3_MANS) $(man_MANS)
- @$(NORMAL_INSTALL)
- test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)"
- @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.3*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 3*) ;; \
- *) ext='3' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
- done
-uninstall-man3:
- @$(NORMAL_UNINSTALL)
- @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.3*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 3*) ;; \
- *) ext='3' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
- rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
- done
-install-docDATA: $(doc_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
- @list='$(doc_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
- $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
- done
-
-uninstall-docDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(doc_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
- rm -f "$(DESTDIR)$(docdir)/$$f"; \
- done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- $(am__remove_distdir)
- mkdir $(distdir)
- $(mkdir_p) $(distdir)/config
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- distdir) \
- || exit 1; \
- fi; \
- done
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$(top_distdir)" distdir="$(distdir)" \
- dist-hook
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r $(distdir)
-dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
-
-dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
-
-dist-tarZ: distdir
- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
-
-dist-shar: distdir
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
-
-dist-zip: distdir
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
-
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- case '$(DIST_ARCHIVES)' in \
- *.tar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
- *.tar.bz2*) \
- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.Z*) \
- uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
- *.shar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
- *.zip*) \
- unzip $(distdir).zip ;;\
- esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
- chmod a-w $(distdir)
- dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
- && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && cd $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
- $(DISTCHECK_CONFIGURE_FLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
- distuninstallcheck \
- && chmod -R a-w "$$dc_install_base" \
- && ({ \
- (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
- distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
- } || { rm -rf "$$dc_destdir"; exit 1; }) \
- && rm -rf "$$dc_destdir" \
- && $(MAKE) $(AM_MAKEFLAGS) dist \
- && rm -rf $(DIST_ARCHIVES) \
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
- $(am__remove_distdir)
- @(echo "$(distdir) archives ready for distribution: "; \
- list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
-distuninstallcheck:
- @cd $(distuninstallcheck_dir) \
- && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
- || { echo "ERROR: files left after uninstall:" ; \
- if test -n "$(DESTDIR)"; then \
- echo " (check DESTDIR support)"; \
- fi ; \
- $(distuninstallcheck_listfiles) ; \
- exit 1; } >&2
-distcleancheck: distclean
- @if test '$(srcdir)' = . ; then \
- echo "ERROR: distcleancheck can only run from a VPATH build" ; \
- exit 1 ; \
- fi
- @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
- || { echo "ERROR: files left in build directory after distclean:" ; \
- $(distcleancheck_listfiles) ; \
- exit 1; } >&2
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(MANS) $(DATA) config.h
-installdirs: installdirs-recursive
-installdirs-am:
- for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(docdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-hdr \
- distclean-libtool distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-docDATA install-man
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man: install-man1 install-man3
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(top_srcdir)/autom4te.cache
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-docDATA uninstall-info-am uninstall-man
-
-uninstall-info: uninstall-info-recursive
-
-uninstall-man: uninstall-man1 uninstall-man3
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
- check-am clean clean-generic clean-libtool clean-recursive \
- ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
- distclean-generic distclean-hdr distclean-libtool \
- distclean-recursive distclean-tags distcleancheck distdir \
- distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am \
- install-docDATA install-exec install-exec-am install-info \
- install-info-am install-man install-man1 install-man3 \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am uninstall-docDATA \
- uninstall-info-am uninstall-man uninstall-man1 uninstall-man3
-
-
-dist-hook:
- rm -rf `find $(distdir)/debian -name .svn`
- rm -rf `find $(distdir)/contrib -name .svn`
- rm -rf `find $(distdir)/Documentation -name .svn`
- rm -rf `find $(distdir)/g15daemon_xmms -name .svn`
- rm -rf `find $(distdir)/lang_bindings -name .svn`
- rm -rf `find $(distdir)/patches -name .svn`
- rm -rf `find $(distdir)/rpm -name .svn`
- rm -rf `find $(distdir)/plugins -name .svn`
-
-dist-rpm: dist-bzip2
- rpmbuild -ts $(distdir).tar.bz2
-
-dist-archives:
- $(MAKE) dist-bzip2
- $(MAKE) dist-rpm
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
Deleted: trunk/g15daemon-wip/aclocal.m4
===================================================================
--- trunk/g15daemon-wip/aclocal.m4 2006-11-12 03:11:36 UTC (rev 118)
+++ trunk/g15daemon-wip/aclocal.m4 2006-11-12 04:57:34 UTC (rev 119)
@@ -1,7539 +0,0 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# Configure paths for GLIB
-# Owen Taylor 97-11-3
-
-dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
-dnl gthread is specified in MODULES, pass to glib-config
-dnl
-AC_DEFUN([AM_PATH_GLIB],
-[dnl
-dnl Get the cflags and libraries from the glib-config script
-dnl
-AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
- glib_config_prefix="$withval", glib_config_prefix="")
-AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
- glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
-AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
- , enable_glibtest=yes)
-
- if test x$glib_config_exec_prefix != x ; then
- glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
- if test x${GLIB_CONFIG+set} != xset ; then
- GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
- fi
- fi
- if test x$glib_config_prefix != x ; then
- glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
- if test x${GLIB_CONFIG+set} != xset ; then
- GLIB_CONFIG=$glib_config_prefix/bin/glib-config
- fi
- fi
-
- for module in . $4
- do
- case "$module" in
- gmodule)
- glib_config_args="$glib_config_args gmodule"
- ;;
- gthread)
- glib_config_args="$glib_config_args gthread"
- ;;
- esac
- done
-
- AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
- min_glib_version=ifelse([$1], ,0.99.7,$1)
- AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
- no_glib=""
- if test "$GLIB_CONFIG" = "no" ; then
- no_glib=yes
- else
- GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
- GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
- glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if tes...
[truncated message content] |
|
From: <mla...@us...> - 2006-11-16 02:47:58
|
Revision: 152
http://svn.sourceforge.net/g15daemon/?rev=152&view=rev
Author: mlampard
Date: 2006-11-15 18:47:57 -0800 (Wed, 15 Nov 2006)
Log Message:
-----------
fix several silly bugs in g15_send() preventing it from returning if connection is lost for some reason. Add reconnect ability to xmms plugin.
Modified Paths:
--------------
trunk/g15daemon-wip/g15daemon_xmms/g15daemon_xmms_spectrum.c
trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
Modified: trunk/g15daemon-wip/g15daemon_xmms/g15daemon_xmms_spectrum.c
===================================================================
--- trunk/g15daemon-wip/g15daemon_xmms/g15daemon_xmms_spectrum.c 2006-11-16 01:31:32 UTC (rev 151)
+++ trunk/g15daemon-wip/g15daemon_xmms/g15daemon_xmms_spectrum.c 2006-11-16 02:47:57 UTC (rev 152)
@@ -141,7 +141,12 @@
else
g15r_renderString (canvas, (unsigned char *)"Playlist Empty", 0, G15_TEXT_LARGE, 24, 16);
- g15_send(g15screen_fd,(char *)canvas->buffer,G15_BUFFER_LEN);
+ if(g15_send(g15screen_fd,(char *)canvas->buffer,G15_BUFFER_LEN)<0) {
+ /* connection error occurred - try to reconnect to the daemon */
+ while((g15screen_fd=new_g15_screen(G15_G15RBUF))<0 && !leaving){
+ xmms_usleep(150000);
+ }
+ }
pthread_mutex_unlock(&g15buf_mutex);
xmms_usleep(25000);
}
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2006-11-16 01:31:32 UTC (rev 151)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2006-11-16 02:47:57 UTC (rev 152)
@@ -31,6 +31,9 @@
#include <poll.h>
#include <arpa/inet.h>
#include <unistd.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
#include <config.h>
#include <libg15.h>
@@ -66,7 +69,10 @@
return -1;
setsockopt(g15screen_fd, SOL_SOCKET, SO_PRIORITY, &tos, sizeof(tos));
-
+
+ if (fcntl(g15screen_fd, F_SETFL, O_NONBLOCK) <0 ) {
+ }
+
memset(buffer,0,256);
if(g15_recv(g15screen_fd, buffer, 16)<0)
return -1;
@@ -101,16 +107,20 @@
while(total < len && !leaving) {
memset(pfd,0,sizeof(pfd));
pfd[0].fd = sock;
- pfd[0].events = POLLOUT;
- if(poll(pfd,1,500)>0) {
- if(pfd[0].revents & POLLOUT) {
- retval = send(sock, buf+total, bytesleft, 0);
+ pfd[0].events = POLLOUT|POLLERR|POLLHUP|POLLNVAL;
+ if(poll(pfd,1,500)>=0) {
+ if(pfd[0].revents & POLLOUT && !(pfd[0].revents & POLLERR || pfd[0].revents & POLLHUP || pfd[0].revents & POLLNVAL) ) {
+ retval = send(sock, buf+total, bytesleft, MSG_DONTWAIT);
if (retval == -1) {
break;
}
bytesleft -= retval;
total += retval;
}
+ if((pfd[0].revents & POLLERR|| pfd[0].revents & POLLHUP || pfd[0].revents & POLLNVAL)){
+ retval=-1;
+ break;
+ }
}
}
return retval==-1?-1:0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2006-11-16 11:12:32
|
Revision: 160
http://svn.sourceforge.net/g15daemon/?rev=160&view=rev
Author: mlampard
Date: 2006-11-16 03:11:45 -0800 (Thu, 16 Nov 2006)
Log Message:
-----------
increase compiler verbosity, remove unused vars and other cruftiness
Modified Paths:
--------------
trunk/g15daemon-wip/g15daemon/Makefile.am
trunk/g15daemon-wip/g15daemon/g15_plugins.c
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/lcdclient_test.c
trunk/g15daemon-wip/g15daemon/linked_lists.c
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/g15daemon/utility_funcs.c
trunk/g15daemon-wip/g15daemon_xmms/Makefile.am
trunk/g15daemon-wip/g15daemon_xmms/g15daemon_xmms_spectrum.c
trunk/g15daemon-wip/plugins/Makefile.am
trunk/g15daemon-wip/plugins/g15_plugin_clock.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
Modified: trunk/g15daemon-wip/g15daemon/Makefile.am
===================================================================
--- trunk/g15daemon-wip/g15daemon/Makefile.am 2006-11-16 09:52:02 UTC (rev 159)
+++ trunk/g15daemon-wip/g15daemon/Makefile.am 2006-11-16 11:11:45 UTC (rev 160)
@@ -1,6 +1,6 @@
METASOURCES = AUTO
-AM_CFLAGS = -DG15DAEMON_BUILD
+AM_CFLAGS = -DG15DAEMON_BUILD -Wall
sbin_PROGRAMS = g15daemon
noinst_PROGRAMS = g15daemontest
noinst_HEADERS = g15logo.h
Modified: trunk/g15daemon-wip/g15daemon/g15_plugins.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15_plugins.c 2006-11-16 09:52:02 UTC (rev 159)
+++ trunk/g15daemon-wip/g15daemon/g15_plugins.c 2006-11-16 11:11:45 UTC (rev 160)
@@ -68,6 +68,7 @@
int g15daemon_dlclose_plugin(void *handle) {
dlclose(handle);
+ return 0;
}
void run_lcd_client(plugin_t *plugin_args) {
@@ -139,7 +140,7 @@
void *plugin_thread(plugin_t *plugin_args) {
plugin_info_t *info = plugin_args->info;
- int (*event)(plugin_event_t *event) = (void*)plugin_args->info->event_handler;
+ /* int (*event)(plugin_event_t *event) = (void*)plugin_args->info->event_handler; */
void *handle = plugin_args->plugin_handle;
if(plugin_args->info->plugin_run!=NULL||plugin_args->info->event_handler!=NULL) {
@@ -161,6 +162,7 @@
g15daemon_log(LOG_INFO,"Removed plugin %s",info->name);
g15daemon_dlclose_plugin(handle);
+ return NULL;
}
int g15_plugin_load (lcdlist_t **displaylist, char *name) {
@@ -182,7 +184,7 @@
g15daemon_log(LOG_ERR,"%s is not a valid g15daemon plugin\n",name);
g15daemon_dlclose_plugin(plugin_handle);
dlerror();
- return;
+ return -1;
}
plugin_args->type = plugin_args->info->type;
@@ -221,6 +223,7 @@
pthread_detach(client_connection);
}
}
+ return 0;
}
@@ -232,7 +235,7 @@
directory = opendir (plugin_directory);
if (directory != NULL)
{
- while (ep = readdir (directory)) {
+ while ((ep = readdir (directory))) {
if(strstr(ep->d_name,".so")){
strcpy(pluginname, plugin_directory);
strncat(pluginname,"/",1);
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-16 09:52:02 UTC (rev 159)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-16 11:11:45 UTC (rev 160)
@@ -172,7 +172,7 @@
lcdnode_t *current;
void *(*keyboard_handler)(void*);
struct passwd *nobody;
- unsigned long numclients;
+ volatile unsigned long numclients;
}lcdlist_s;
pthread_mutex_t lcdlist_mutex;
@@ -184,7 +184,12 @@
#ifdef G15DAEMON_BUILD
/* internal g15daemon-only functions */
void uf_write_buf_to_g15(lcd_t *lcd);
-
+/* return the pid of a running copy of g15daemon, else -1 */
+int uf_return_running();
+/* create a /var/run/g15daemon.pid file, returning 0 on success else -1 */
+int uf_create_pidfile();
+/* open & run all plugins in the given directory */
+void g15_open_all_plugins(lcdlist_t **displaylist, char *plugin_directory);
/* linked lists */
lcdlist_t *ll_lcdlist_init();
void ll_lcdlist_destroy(lcdlist_t **displaylist);
@@ -204,7 +209,7 @@
/* syslog wrapper */
int g15daemon_log (int priority, const char *fmt, ...);
/* cycle from displayed screen to next on list */
-int g15daemon_lcdnode_cycle(lcdlist_t *displaylist);
+void g15daemon_lcdnode_cycle(lcdlist_t *displaylist);
/* add new screen */
lcdnode_t *g15daemon_lcdnode_add(lcdlist_t **displaylist) ;
/* remove screen */
Modified: trunk/g15daemon-wip/g15daemon/lcdclient_test.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/lcdclient_test.c 2006-11-16 09:52:02 UTC (rev 159)
+++ trunk/g15daemon-wip/g15daemon/lcdclient_test.c 2006-11-16 11:11:45 UTC (rev 160)
@@ -64,7 +64,7 @@
retval = g15_send(g15screen_fd,(char*)lcdbuffer,6880);
}
- printf("checking key status - press G1 to exit\n",retval);
+ printf("checking key status - press G1 to exit\n");
while(1){
keystate = 0;
Modified: trunk/g15daemon-wip/g15daemon/linked_lists.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-16 09:52:02 UTC (rev 159)
+++ trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-16 11:11:45 UTC (rev 160)
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <pthread.h>
#include <g15daemon.h>
#include <libg15.h>
@@ -113,7 +114,7 @@
}
/* cycle through connected client displays */
-int g15daemon_lcdnode_cycle(lcdlist_t *displaylist)
+void g15daemon_lcdnode_cycle(lcdlist_t *displaylist)
{
lcdnode_t *current_screen = displaylist->current;
@@ -159,7 +160,7 @@
next = &oldnode->next;
ll_quit_lcd(oldnode->lcd);
- (unsigned int)(*displaylist)->numclients--;
+ (*displaylist)->numclients--;
if((*displaylist)->current == oldnode) {
if((*displaylist)->current!=(*displaylist)->head){
(*displaylist)->current = oldnode->next;
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2006-11-16 09:52:02 UTC (rev 159)
+++ trunk/g15daemon-wip/g15daemon/main.c 2006-11-16 11:11:45 UTC (rev 160)
@@ -144,6 +144,7 @@
(*plugin_listener)((void*)newevent);
}
}
+ return 0;
}
static void *keyboard_watch_thread(void *lcdlist){
@@ -274,7 +275,7 @@
if (!strncmp(daemonargs, "-u",2) || !strncmp(daemonargs, "--user",7)) {
if(argv[i+1]!=NULL){
- strncpy(user,argv[i+1],128);
+ strncpy((char*)user,argv[i+1],128);
i++;
}
}
@@ -289,18 +290,16 @@
if(uf_create_pidfile() == 0) {
- int fd;
- fd_set fds;
lcdlist_t *lcdlist;
pthread_attr_t attr;
struct passwd *nobody;
unsigned char location[1024];
openlog("g15daemon", LOG_PID, LOG_DAEMON);
- if(strlen(user)==0){
+ if(strlen((char*)user)==0){
nobody = getpwnam("nobody");
}else {
- nobody = getpwnam(user);
+ nobody = getpwnam((char*)user);
}
if (nobody==NULL)
{
@@ -350,20 +349,20 @@
}
g15daemon_log(LOG_INFO,"%s loaded\n",PACKAGE_STRING);
- snprintf(location,1024,"%s/%s\0",DATADIR,"g15daemon/splash/g15logo2.wbmp");
+ snprintf((char*)location,1024,"%s/%s",DATADIR,"g15daemon/splash/g15logo2.wbmp");
g15canvas *canvas = (g15canvas *)malloc (sizeof (g15canvas));
memset (canvas->buffer, 0, G15_BUFFER_LEN);
canvas->mode_cache = 0;
canvas->mode_reverse = 0;
canvas->mode_xor = 0;
- g15r_loadWbmpSplash(canvas,location);
+ g15r_loadWbmpSplash(canvas,(char*)location);
memcpy (lcdlist->tail->lcd->buf, canvas->buffer, G15_BUFFER_LEN);
free (canvas);
uf_write_buf_to_g15(lcdlist->tail->lcd);
- snprintf(location,1024,"%s/%s\0",DATADIR,"g15daemon/plugins");
+ snprintf((char*)location,1024,"%s/%s",DATADIR,"g15daemon/plugins");
- g15_open_all_plugins(lcdlist,location);
+ g15_open_all_plugins(lcdlist,(char*)location);
new_action.sa_handler = g15daemon_sighandler;
new_action.sa_flags = 0;
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-16 09:52:02 UTC (rev 159)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-16 11:11:45 UTC (rev 160)
@@ -31,11 +31,10 @@
#include <errno.h>
#include <string.h>
#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#include <poll.h>
-#include <sys/socket.h>
+#include <sys/time.h>
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -132,7 +131,6 @@
/* syslog wrapper */
int g15daemon_log (int priority, const char *fmt, ...) {
- unsigned char buf[1024];
va_list argp;
va_start (argp, fmt);
if(g15daemon_debug == 0)
Modified: trunk/g15daemon-wip/g15daemon_xmms/Makefile.am
===================================================================
--- trunk/g15daemon-wip/g15daemon_xmms/Makefile.am 2006-11-16 09:52:02 UTC (rev 159)
+++ trunk/g15daemon-wip/g15daemon_xmms/Makefile.am 2006-11-16 11:11:45 UTC (rev 160)
@@ -5,7 +5,7 @@
endif
libdir = @XMMS_VISUALIZATION_PLUGIN_DIR@
-AM_CFLAGS = -Wall @XMMS_CFLAGS@ @CFLAGS@ -I$(top_builddir) -I$(top_srcdir) \
+AM_CFLAGS = -O3 -Wall @XMMS_CFLAGS@ @CFLAGS@ -I$(top_builddir) -I$(top_srcdir) \
@GTK_CFLAGS@
LIBS = @XMMS_LIBS@ -L$(top_builddir)/libg15daemon_client/
Modified: trunk/g15daemon-wip/g15daemon_xmms/g15daemon_xmms_spectrum.c
===================================================================
--- trunk/g15daemon-wip/g15daemon_xmms/g15daemon_xmms_spectrum.c 2006-11-16 09:52:02 UTC (rev 159)
+++ trunk/g15daemon-wip/g15daemon_xmms/g15daemon_xmms_spectrum.c 2006-11-16 11:11:45 UTC (rev 160)
@@ -20,9 +20,10 @@
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
Client screens can be cycled through by pressing the 'L1' key.
+
+ simple analyser xmms plugin for g15daemon
*/
-/* xmms plugin for the daemon, based on finespectrum plugin available on sourceforge */
#include <stdlib.h>
#include <unistd.h>
#include <g15daemon_client.h>
@@ -35,26 +36,10 @@
#include <xmms/xmmsctrl.h>
#include <libg15render.h>
-#define WIDTH 256
-
-/* Linearity of the amplitude scale (0.5 for linear, keep in [0.1, 0.9]) */
-//#define linearity 0.33
-#define linearity 0.33
-
#define NUM_BANDS 16
-/* Time factor of the band dinamics. 3 means that the coefficient of the
-last value is half of the current one's. (see source) */
-#define tau 3
+static gint16 bar_heights[NUM_BANDS];
-/* Factor used for the diffusion. 4 means that half of the height is
-added to the neighbouring bars */
-#define dif 4
-
-static gint16 bar_heights[WIDTH];
-
-static gdouble scale, x00, y00;
-
static void g15analyser_init(void);
static void g15analyser_cleanup(void);
static void g15analyser_playback_start(void);
@@ -171,10 +156,6 @@
canvas->mode_xor = 0;
}
- scale = G15_HEIGHT / ( log((1 - linearity) / linearity) *2 );
- x00 = linearity*linearity*32768.0/(2 * linearity - 1);
- y00 = -log(-x00) * scale;
-
leaving = 0;
pthread_mutex_unlock(&g15buf_mutex);
Modified: trunk/g15daemon-wip/plugins/Makefile.am
===================================================================
--- trunk/g15daemon-wip/plugins/Makefile.am 2006-11-16 09:52:02 UTC (rev 159)
+++ trunk/g15daemon-wip/plugins/Makefile.am 2006-11-16 11:11:45 UTC (rev 160)
@@ -1,6 +1,7 @@
METASOURCES = AUTO
libdir = /usr/share/g15daemon/plugins
+AM_CFLAGS = -Wall
lib_LTLIBRARIES =g15plugin_uinput.la g15plugin_tcpserver.la g15plugin_clock.la
INCLUDES = -I$(top_builddir)/libg15daemon_client/ -I$(top_builddir)/g15daemon
Modified: trunk/g15daemon-wip/plugins/g15_plugin_clock.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2006-11-16 09:52:02 UTC (rev 159)
+++ trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2006-11-16 11:11:45 UTC (rev 160)
@@ -99,10 +99,12 @@
/* completely uncessary function called when plugin is exiting */
static void *callmewhenimdone(lcd_t *lcd){
+ return NULL;
}
/* completely unnecessary initialisation function which could just as easily have been set to NULL in the g15plugin_info struct */
static void *myinithandler(lcd_t *lcd){
+ return NULL;
}
/* if no exitfunc or eventhandler, member should be NULL */
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2006-11-16 09:52:02 UTC (rev 159)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2006-11-16 11:11:45 UTC (rev 160)
@@ -26,6 +26,7 @@
#include <pthread.h>
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
@@ -58,8 +59,8 @@
static void process_client_cmds(lcdnode_t *lcdnode, int sock, unsigned int *msgbuf, unsigned int len)
{
- int msgret;
-/* if(msgbuf[0] == CLIENT_CMD_GET_KEYSTATE)
+ /* int msgret;
+ if(msgbuf[0] == CLIENT_CMD_GET_KEYSTATE)
{ // client wants keypresses - FIXME this is redundant with the new event based architecture
if(lcdnode->list->current == lcdnode){
// send the keystate inband back to the client
@@ -232,7 +233,6 @@
lcdnode_t *g15node = display;
lcd_t *client_lcd = g15node->lcd;
int retval;
- int i,y,x;
unsigned int width, height, buflen,header=4;
int client_sock = client_lcd->connection;
@@ -389,7 +389,7 @@
/* incoming events */
int server_events(plugin_event_t *event) {
lcd_t *lcd = (lcd_t*) event->lcd;
- static int lastkeys;
+
switch (event->event)
{
case G15_EVENT_KEYPRESS:{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2006-11-17 22:22:35
|
Revision: 171
http://svn.sourceforge.net/g15daemon/?rev=171&view=rev
Author: mlampard
Date: 2006-11-17 14:22:35 -0800 (Fri, 17 Nov 2006)
Log Message:
-----------
add some simple ini-style configfile routines. not heavily tested but they appear to do the job.
Modified Paths:
--------------
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/g15daemon/utility_funcs.c
trunk/g15daemon-wip/plugins/g15_plugin_clock.c
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-17 03:56:08 UTC (rev 170)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-17 22:22:35 UTC (rev 171)
@@ -102,6 +102,31 @@
typedef struct plugin_info_s plugin_info_t;
typedef struct plugin_s plugin_t;
+typedef struct config_items_s config_items_t;
+typedef struct config_section_s config_section_t;
+typedef struct configfile_s configfile_t;
+
+typedef struct config_items_s
+{
+ config_items_t *next;
+ config_items_t *head;
+ char *key;
+ char *value;
+} config_items_s;
+
+typedef struct config_section_s
+{
+ config_section_t *head;
+ config_section_t *next;
+ char *sectionname;
+ config_items_t *items;
+}config_section_s;
+
+typedef struct configfile_s
+{
+ config_section_t *sections;
+}configfile_s;
+
typedef struct plugin_info_s
{
/* type - see above for valid defines*/
@@ -173,6 +198,7 @@
void *(*keyboard_handler)(void*);
struct passwd *nobody;
volatile unsigned long numclients;
+ configfile_t *config;
}lcdlist_s;
pthread_mutex_t lcdlist_mutex;
@@ -194,11 +220,29 @@
lcdlist_t *ll_lcdlist_init();
void ll_lcdlist_destroy(lcdlist_t **displaylist);
+/* open and parse config file */
+int uf_conf_open(lcdlist_t *list, char *filename);
+/* write the config file with all keys/sections */
+int uf_conf_write(lcdlist_t *list,char *filename);
+/* free all memory used by the config subsystem */
+void uf_conf_free(lcdlist_t *list);
/* generic handler for net clients */
int internal_generic_eventhandler(plugin_event_t *myevent);
#endif
/* the following functions are available for use by plugins */
+/* create a new section */
+config_section_t *g15daemon_cfg_load_section(lcdlist_t *displaylist,char *name);
+/* return string value from key in sectionname */
+char* g15daemon_cfg_read_string(config_section_t *section, char *key, char *defaultval);
+/* return float from key in sectionname */
+double g15daemon_cfg_read_float(config_section_t *section, char *key, double defaultval);
+/* return int from key in sectionname */
+int g15daemon_cfg_read_int(config_section_t *section, char *key, int defaultval);
+/* add a new key, or update the value of an already existing key, or return -1 if section doesnt exist */
+int g15daemon_cfg_write_string(config_section_t *section, char *key, char *val);
+int g15daemon_cfg_write_float(config_section_t *section, char *key, double val);
+int g15daemon_cfg_write_int(config_section_t *section, char *key, int val);
/* send event to foreground client's eventlistener */
int g15daemon_send_event(void *caller, unsigned int event, unsigned long value);
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2006-11-17 03:56:08 UTC (rev 170)
+++ trunk/g15daemon-wip/g15daemon/main.c 2006-11-17 22:22:35 UTC (rev 171)
@@ -62,7 +62,7 @@
if(!(value & cycle_key) && !(lastkeys & cycle_key)){
lcd_t *lcd = (lcd_t*)caller;
int *(*plugin_listener)(plugin_event_t *newevent) = (void*)lcd->g15plugin->info->event_handler;
- plugin_event_t *newevent=malloc(sizeof(plugin_event_t));
+ plugin_event_t *newevent=g15daemon_xmalloc(sizeof(plugin_event_t));
newevent->event = event;
newevent->value = value;
newevent->lcd = lcd;
@@ -88,7 +88,7 @@
}
else
{
- plugin_event_t *clickevent=malloc(sizeof(plugin_event_t));
+ plugin_event_t *clickevent=g15daemon_xmalloc(sizeof(plugin_event_t));
int *(*plugin_listener)(plugin_event_t *clickevent) = (void*)lcd->g15plugin->info->event_handler;
clickevent->event = event;
clickevent->value = value|cycle_key;
@@ -98,6 +98,7 @@
clickevent->value = value&~cycle_key;
clickevent->lcd = lcd;
(*plugin_listener)((void*)clickevent);
+ free(clickevent);
}
}
}
@@ -137,11 +138,12 @@
default: {
lcd_t *lcd = (lcd_t*)caller;
int *(*plugin_listener)(plugin_event_t *newevent) = (void*)lcd->g15plugin->info->event_handler;
- plugin_event_t *newevent=malloc(sizeof(plugin_event_t));
+ plugin_event_t *newevent=g15daemon_xmalloc(sizeof(plugin_event_t));
newevent->event = event;
newevent->value = value;
newevent->lcd = lcd;
(*plugin_listener)((void*)newevent);
+ free(newevent);
}
}
return 0;
@@ -317,15 +319,16 @@
goto exitnow;
}
- /* all other processes/threads should be seteuid nobody */
+ /* initialise the linked list */
+ lcdlist = ll_lcdlist_init();
+ lcdlist->nobody = nobody;
+
+ uf_conf_open(lcdlist, "/etc/g15daemon.conf");
+ /* all other processes/threads should be seteuid nobody */
if(nobody!=NULL) {
seteuid(nobody->pw_uid);
setegid(nobody->pw_gid);
}
-
- /* initialise the linked list */
- lcdlist = ll_lcdlist_init();
- lcdlist->nobody = nobody;
pthread_mutex_init(&g15lib_mutex, NULL);
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr,512*1024); /* set stack to 512k - dont need 8Mb !! */
@@ -350,7 +353,7 @@
g15daemon_log(LOG_INFO,"%s loaded\n",PACKAGE_STRING);
snprintf((char*)location,1024,"%s/%s",DATADIR,"g15daemon/splash/g15logo2.wbmp");
- g15canvas *canvas = (g15canvas *)malloc (sizeof (g15canvas));
+ g15canvas *canvas = (g15canvas *)g15daemon_xmalloc (sizeof (g15canvas));
memset (canvas->buffer, 0, G15_BUFFER_LEN);
canvas->mode_cache = 0;
canvas->mode_reverse = 0;
@@ -391,6 +394,8 @@
seteuid(0);
setegid(0);
closelog();
+ uf_conf_write(lcdlist,"/etc/g15daemon.conf");
+ uf_conf_free(lcdlist);
unlink("/var/run/g15daemon.pid");
}
return 0;
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-17 03:56:08 UTC (rev 170)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-17 22:22:35 UTC (rev 171)
@@ -33,6 +33,9 @@
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
+#include <sys/stat.h>
+#include <ctype.h>
+
#include <sys/time.h>
#ifdef HAVE_CONFIG_H
@@ -99,7 +102,6 @@
}
-
int uf_create_pidfile() {
char pidtxt[128];
@@ -128,6 +130,7 @@
return 1;
}
+
/* syslog wrapper */
int g15daemon_log (int priority, const char *fmt, ...) {
@@ -231,3 +234,264 @@
return G15_PLUGIN_OK;
}
+
+/* free all memory used by the config subsystem */
+void uf_conf_free(lcdlist_t *list)
+{
+ config_section_t *section=list->config->sections;
+ config_items_t *tmpitem=NULL;
+ config_section_t *tmpsection=section;
+
+ while(tmpsection!=NULL){
+ tmpitem=section->items;
+
+ if(section->sectionname){
+ free(section->sectionname);
+ while(section->items!=NULL){
+ if(tmpitem->key!=NULL)
+ free(tmpitem->key);
+ if(tmpitem->value!=NULL)
+ free(tmpitem->value);
+ tmpitem=section->items->next;
+ free(section->items);
+ section->items=tmpitem;
+ }
+ }
+ tmpsection=section->next;
+ free(section);
+ section=tmpsection;
+ }
+ free(section);
+ free(list->config);
+}
+
+/* write the config file with all keys/sections */
+int uf_conf_write(lcdlist_t *list,char *filename)
+{
+ int config_fd=-1;
+ config_section_t *foo=list->config->sections;
+ config_items_t * item=NULL;
+ char line[1024];
+ config_fd = open(filename,O_CREAT|O_RDWR|O_TRUNC);
+ if(config_fd){
+ snprintf(line,1024,"# G15Daemon Configuration File\n");
+ write(config_fd,line,strlen(line));
+ while(foo!=NULL){
+ item=foo->items;
+ memset(line,0,1024);
+ if(foo->sectionname){
+ snprintf(line,1024,"\n[%s]\n",foo->sectionname);
+ write(config_fd,line,strlen(line));
+ while(item!=NULL){
+ memset(line,0,1024);
+ snprintf(line,1024,"%s: %s\n",item->key, item->value);
+ write(config_fd,line,strlen(line));
+ item=item->next;
+ }
+ }
+ foo=foo->next;
+ }
+ close(config_fd);
+ return 0;
+ }
+ return -1;
+}
+
+/* search the list for valid section name return pointer to section, or NULL otherwise */
+config_section_t* uf_search_confsection(lcdlist_t *list,char *sectionname){
+ config_section_t *section=list->config->sections;
+
+ while(section!=NULL){
+ if(0==strcmp((char*)section->sectionname,(char*)sectionname))
+ break;
+ section=section->next;
+ }
+ return section;
+}
+
+/* search the list for valid key called "key" in section named "section" return pointer to item or NULL */
+config_items_t* uf_search_confitem(config_section_t *section, char *key){
+
+ config_items_t * item=NULL;
+
+ if(section!=NULL){
+ item=section->items;
+ while(item!=NULL){
+ if(0==strcmp((char*)item->key,(char*)key))
+ break;
+ item=item->next;
+ }
+ }
+ return item;
+}
+
+
+/* return pointer to section, or create a new section if it doesnt exist */
+config_section_t *g15daemon_cfg_load_section(lcdlist_t *displaylist,char *name) {
+
+ config_section_t *new = NULL;
+ if((new=uf_search_confsection(displaylist,name))!=NULL)
+ return new;
+ new = g15daemon_xmalloc(sizeof(config_section_t));
+ new->head = new;
+ new->next = NULL;;
+ new->sectionname=strdup(name);
+ if(!displaylist->config->sections){
+ displaylist->config->sections=new;
+ displaylist->config->sections->head = new;
+ } else {
+ displaylist->config->sections->head->next=new;
+ displaylist->config->sections->head = new;
+ }
+ return new;
+}
+
+/* cleanup whitespace */
+char * uf_remove_whitespace(char *str){
+ int z=0;
+ while(isspace(str[z])&&str[z])
+ z++;
+ str+=z;
+ return str;
+}
+
+/* add a new key, or update the value of an already existing key, or return -1 if section doesnt exist */
+int g15daemon_cfg_write_string(config_section_t *section, char *key, char *val){
+
+ config_items_t *new = NULL;
+
+ if(section==NULL)
+ return -1;
+
+
+ if((uf_search_confitem(section, key))){
+ free(new);
+ new=uf_search_confitem(section, key);
+ new->value=strdup(val);
+ }else{
+ new=g15daemon_xmalloc(sizeof(config_items_t));
+ new->head=new;
+ new->next=NULL;
+ new->key=strdup(key);
+ new->value=strdup(val);
+ if(!section->items){
+ section->items=new;
+ section->items->head=new;
+ }else{
+ section->items->head->next=new;
+ section->items->head=new;
+ }
+ }
+ return 0;
+}
+
+int g15daemon_cfg_write_int(config_section_t *section, char *key, int val) {
+ char tmp[1024];
+ snprintf(tmp,1024,"%i",val);
+ return g15daemon_cfg_write_string(section, key, tmp);
+}
+
+int g15daemon_cfg_write_float(config_section_t *section, char *key, double val) {
+ char tmp[1024];
+ snprintf(tmp,1024,"%f",val);
+ return g15daemon_cfg_write_string(section, key, tmp);
+}
+/* the config read functions will either return a value from the config file, or the default value, which will be written to the config file if the key doesnt exist */
+
+/* return int from key in sectionname */
+int g15daemon_cfg_read_int(config_section_t *section, char *key, int defaultval) {
+
+ config_items_t *item = uf_search_confitem(section, key);
+ if(item){
+ return atoi(item->value);
+ }
+ g15daemon_cfg_write_int(section, key, defaultval);
+ return defaultval;
+}
+
+/* return float from key in sectionname */
+double g15daemon_cfg_read_float(config_section_t *section, char *key, double defaultval) {
+
+ config_items_t *item = uf_search_confitem(section, key);
+ if(item){
+ return atof(item->value);
+ }
+ g15daemon_cfg_write_float(section, key, defaultval);
+ return defaultval;
+}
+
+/* return string value from key in sectionname */
+char* g15daemon_cfg_read_string(config_section_t *section, char *key, char *defaultval) {
+
+ config_items_t *item = uf_search_confitem(section, key);
+ if(item){
+ return item->value;
+ }
+ g15daemon_cfg_write_string(section, key, defaultval);
+ return defaultval;
+}
+
+
+int uf_conf_open(lcdlist_t *list, char *filename) {
+
+ char *buffer, *lines;
+ int config_fd=-1;
+ char *sect;
+ char *start;
+ char *bar;
+ int i;
+ struct stat stats;
+
+ list->config=g15daemon_xmalloc(sizeof(configfile_t));
+ list->config->sections=NULL;
+
+ config_fd = open(filename,O_RDWR);
+
+ if (lstat(filename, &stats) == -1)
+ return -1;
+ if (!(config_fd = open(filename, O_RDWR)))
+ return -1;
+
+ buffer = g15daemon_xmalloc(stats.st_size + 1);
+
+ if (read(config_fd, buffer, stats.st_size) != stats.st_size)
+ {
+ free(buffer);
+ close(config_fd);
+ return -1;
+ }
+ close(config_fd);
+ buffer[stats.st_size] = '\0';
+
+ lines=strtok_r(buffer,"\n",&bar);
+
+ while(lines!=NULL){
+ sect=strdup(lines);
+ config_section_t *section;
+ i=0;
+ while(isspace(sect[i])){
+ i++;
+ }
+ start=sect+i;
+ if(start[0]=='#'){
+ /* comment.. ignore */
+ }else if(strcmp(start,"]")<0) { /* section title */
+ char sectiontitle[1024];
+ memset(sectiontitle,0,1024);
+ strncpy(sectiontitle,start+1,strlen(start)-2);
+ section = g15daemon_cfg_load_section(list,sectiontitle);
+ }else{
+ /*section keys */
+ char *foo;
+ char *key = uf_remove_whitespace( strtok_r(start,":",&foo) );
+ char *val = uf_remove_whitespace( strtok_r(NULL,":", &foo) );
+
+ g15daemon_cfg_write_string(section,key,val);
+ }
+ free(sect);
+ lines=strtok_r(NULL,"\n",&bar);
+ }
+ free(buffer);
+ return 0;
+}
+
Modified: trunk/g15daemon-wip/plugins/g15_plugin_clock.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2006-11-17 03:56:08 UTC (rev 170)
+++ trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2006-11-17 22:22:35 UTC (rev 171)
@@ -33,11 +33,14 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-
+#include <libg15.h>
#include <config.h>
#include <g15daemon.h>
#include <libg15render.h>
+
+static int mode=24;
+
static int *lcdclock(lcd_t *lcd)
{
unsigned int col = 0;
@@ -59,8 +62,11 @@
memset(lcd->buf,0,G15_BUFFER_LEN);
memset(buf,0,10);
- strftime(buf,6,"%H:%M",localtime(&currtime));
-
+ if(mode==24){
+ strftime(buf,6,"%H:%M",localtime(&currtime));
+ }else{
+ strftime(buf,6,"%I:%M",localtime(&currtime));
+ }
if(buf[0]==49)
narrows=1;
@@ -81,11 +87,16 @@
}
static int myeventhandler(plugin_event_t *myevent) {
-// lcd_t *lcd = (lcd_t*) myevent->lcd;
+ lcd_t *lcd = (lcd_t*) myevent->lcd;
+ config_section_t *clockcfg =NULL;
switch (myevent->event)
{
case G15_EVENT_KEYPRESS:
+ clockcfg = g15daemon_cfg_load_section(lcd->masterlist,"Clock");
+ if(myevent->value&G15_KEY_L1)
+ mode=1^mode;
+ g15daemon_cfg_write_int(clockcfg, "mode", mode);
// printf("Clock plugin received keypress event : %i\n",myevent->value);
break;
case G15_EVENT_VISIBILITY_CHANGED:
@@ -104,6 +115,8 @@
/* completely unnecessary initialisation function which could just as easily have been set to NULL in the g15plugin_info struct */
static void *myinithandler(lcd_t *lcd){
+ config_section_t *clockcfg = g15daemon_cfg_load_section(lcd->masterlist,"Clock");
+ mode=g15daemon_cfg_read_int(clockcfg, "mode",0);
return NULL;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2006-11-18 13:46:05
|
Revision: 177
http://svn.sourceforge.net/g15daemon/?rev=177&view=rev
Author: mlampard
Date: 2006-11-18 05:46:03 -0800 (Sat, 18 Nov 2006)
Log Message:
-----------
rename lcdlist_t struct to g15daemon_t + one or two other minor cosmetic changes to aid new developers in understanding the code.
Modified Paths:
--------------
trunk/g15daemon-wip/g15daemon/g15_plugins.c
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/linked_lists.c
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/g15daemon/utility_funcs.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
trunk/g15daemon-wip/plugins/g15_plugin_uinput.c
Modified: trunk/g15daemon-wip/g15daemon/g15_plugins.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15_plugins.c 2006-11-18 10:45:54 UTC (rev 176)
+++ trunk/g15daemon-wip/g15daemon/g15_plugins.c 2006-11-18 13:46:03 UTC (rev 177)
@@ -116,7 +116,7 @@
}
if(plugin_args->info->event_handler && plugin_args->type==G15_PLUGIN_CORE_OS_KB){
- lcdlist_t *masterlist = (lcdlist_t*)plugin_args->args;
+ g15daemon_t *masterlist = (g15daemon_t*)plugin_args->args;
pthread_mutex_lock(&lcdlist_mutex);
(masterlist->keyboard_handler) = (void*)plugin_args->info->event_handler;
pthread_mutex_unlock(&lcdlist_mutex);
@@ -165,39 +165,44 @@
return NULL;
}
-int g15_plugin_load (lcdlist_t **displaylist, char *name) {
+int g15_plugin_load (g15daemon_t *masterlist, char *filename) {
void * plugin_handle = NULL;
-
- lcdlist_t *g15daemon_lcds = (lcdlist_t*)&displaylist;
+ config_section_t *plugin_cfg = g15daemon_cfg_load_section(masterlist,"PLUGINS");
pthread_t client_connection;
pthread_attr_t attr;
lcdnode_t *clientnode;
- if((plugin_handle = g15daemon_dlopen_plugin(name,G15_PLUGIN_NONSHARED))!=NULL) {
+ if((plugin_handle = g15daemon_dlopen_plugin(filename,G15_PLUGIN_NONSHARED))!=NULL) {
plugin_t *plugin_args=malloc(sizeof(plugin_t));
plugin_args->info = dlsym(plugin_handle, "g15plugin_info");
dlerror();
if(!plugin_args->info) { /* if it doesnt have a valid struct, we should just load it as a library... but we dont at the moment FIXME */
- g15daemon_log(LOG_ERR,"%s is not a valid g15daemon plugin\n",name);
+ g15daemon_log(LOG_ERR,"%s is not a valid g15daemon plugin\n",filename);
g15daemon_dlclose_plugin(plugin_handle);
dlerror();
return -1;
}
+
+ if(strncasecmp("Load",g15daemon_cfg_read_string(plugin_cfg, plugin_args->info->name,"Load"),5)!=0)
+ {
+ g15daemon_dlclose_plugin(plugin_handle);
+ return -1;
+ }
plugin_args->type = plugin_args->info->type;
/* assign the generic eventhandler if the plugin doesnt provide one - the generic one does nothing atm. FIXME*/
if(plugin_args->info->event_handler==NULL)
plugin_args->info->event_handler = (void*)internal_generic_eventhandler;
-
+
if(plugin_args->type == G15_PLUGIN_LCD_CLIENT) {
- lcdlist_t *foolist = (lcdlist_t*)displaylist;
- /* FIXME we should just sort out the linked list stuff instead of overriding it */
+ g15daemon_t *foolist = (g15daemon_t*)masterlist;
+ /* FIXME we should just sort out the linked list stuff instead of overriding it */
if((int)foolist->numclients>=1){
- clientnode = g15daemon_lcdnode_add((void*)g15daemon_lcds);
+ clientnode = g15daemon_lcdnode_add((void*)masterlist);
}else {
clientnode = foolist->tail;
foolist->numclients++;
@@ -209,25 +214,25 @@
plugin_args->type == G15_PLUGIN_CORE_KB_INPUT ||
plugin_args->type == G15_PLUGIN_LCD_SERVER)
{
- plugin_args->args = displaylist;
+ plugin_args->args = masterlist;
plugin_args->plugin_handle = plugin_handle;
}
- memset(&attr,0,sizeof(pthread_attr_t));
- pthread_attr_init(&attr);
- pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED);
- pthread_attr_setstacksize(&attr,64*1024); /* set stack to 64k - dont need 8Mb */
- if (pthread_create(&client_connection, &attr, (void*)plugin_thread, plugin_args) != 0) {
- g15daemon_log(LOG_WARNING,"Unable to create client thread.");
- } else {
- pthread_detach(client_connection);
- }
+ memset(&attr,0,sizeof(pthread_attr_t));
+ pthread_attr_init(&attr);
+ pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED);
+ pthread_attr_setstacksize(&attr,64*1024); /* set stack to 64k - dont need 8Mb */
+ if (pthread_create(&client_connection, &attr, (void*)plugin_thread, plugin_args) != 0) {
+ g15daemon_log(LOG_WARNING,"Unable to create client thread.");
+ } else {
+ pthread_detach(client_connection);
+ }
}
return 0;
}
-void g15_open_all_plugins(lcdlist_t **displaylist, char *plugin_directory) {
+void g15_open_all_plugins(g15daemon_t *masterlist, char *plugin_directory) {
DIR *directory;
struct dirent *ep;
@@ -241,7 +246,7 @@
strncat(pluginname,"/",1);
strncat(pluginname,ep->d_name,200);
g15daemon_log(LOG_INFO, "Loading plugin %s",pluginname);
- g15_plugin_load (displaylist, pluginname);
+ g15_plugin_load (masterlist, pluginname);
g15daemon_msleep(20);
}
}
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-18 10:45:54 UTC (rev 176)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2006-11-18 13:46:03 UTC (rev 177)
@@ -54,40 +54,46 @@
* all M&G keys must be handled by the client. If the client dies or exits, normal functions resume. */
#define CLIENT_CMD_KEY_HANDLER 0x10
-/* plugin types - LCD plugins are provided with a lcd_t and keystates via EVENT when visible */
+enum {
+ /* plugin types - LCD plugins are provided with a lcd_t and keystates via EVENT when visible */
/* CORE plugins source and sink events, have no screen associated, and are not able to quit.
- by design they implement core functionality..CORE_LIBRARY implements graphic and other
- functions for use by other plugins.
+ by design they implement core functionality..CORE_LIBRARY implements graphic and other
+ functions for use by other plugins.
*/
-#define G15_PLUGIN_NONE 0
-#define G15_PLUGIN_LCD_CLIENT 1
-#define G15_PLUGIN_CORE_KB_INPUT 2
-#define G15_PLUGIN_CORE_OS_KB 3
-#define G15_PLUGIN_LCD_SERVER 4
+ G15_PLUGIN_NONE = 0,
+ G15_PLUGIN_LCD_CLIENT =1,
+ G15_PLUGIN_CORE_KB_INPUT = 2,
+ G15_PLUGIN_CORE_OS_KB = 3,
+ G15_PLUGIN_LCD_SERVER = 4
+};
+enum {
+ /* plugin RETURN values */
+ G15_PLUGIN_QUIT = -1,
+ G15_PLUGIN_OK = 0
+};
-/* plugin RETURN values */
-#define G15_PLUGIN_QUIT -1
-#define G15_PLUGIN_OK 0
+enum {
+ /* plugin EVENT types */
+ G15_EVENT_KEYPRESS = 1,
+ G15_EVENT_VISIBILITY_CHANGED,
+ G15_EVENT_USER_FOREGROUND,
+ G15_EVENT_MLED,
+ G15_EVENT_BACKLIGHT,
+ G15_EVENT_CONTRAST,
+ G15_EVENT_REQ_PRIORITY,
+ G15_EVENT_CYCLE_PRIORITY,
+ G15_EVENT_EXITNOW,
+ /* core event types */
+ G15_COREVENT_KEYPRESS_IN,
+ G15_COREVENT_KEYPRESS_OUT
+};
-/* plugin EVENT types */
-#define G15_EVENT_KEYPRESS 1
-#define G15_EVENT_VISIBILITY_CHANGED 2
-#define G15_EVENT_USER_FOREGROUND 3
-#define G15_EVENT_MLED 4
-#define G15_EVENT_BACKLIGHT 5
-#define G15_EVENT_CONTRAST 6
-#define G15_EVENT_REQ_PRIORITY 7
-#define G15_EVENT_CYCLE_PRIORITY 8
-#define G15_EVENT_EXITNOW 9
-/* core event types */
-#define G15_COREVENT_KEYPRESS_IN 10
-#define G15_COREVENT_KEYPRESS_OUT 11
+enum {
+ SCR_HIDDEN = 0,
+ SCR_VISIBLE
+};
-
-#define SCR_HIDDEN 0
-#define SCR_VISIBLE 1
-
/* plugin global or local */
enum {
G15_PLUGIN_NONSHARED = 0,
@@ -95,7 +101,7 @@
};
typedef struct lcd_s lcd_t;
-typedef struct lcdlist_s lcdlist_t;
+typedef struct g15daemon_s g15daemon_t;
typedef struct lcdnode_s lcdnode_t;
typedef struct plugin_event_s plugin_event_t;
@@ -146,7 +152,7 @@
typedef struct plugin_s
{
- lcdlist_t *masterlist;
+ g15daemon_t *masterlist;
unsigned int type;
plugin_info_t *info;
void *plugin_handle;
@@ -155,7 +161,7 @@
typedef struct lcd_s
{
- lcdlist_t *masterlist;
+ g15daemon_t *masterlist;
int lcd_type;
unsigned char buf[LCD_BUFSIZE];
int max_x;
@@ -183,14 +189,14 @@
struct lcdnode_s {
- lcdlist_t *list;
+ g15daemon_t *list;
lcdnode_t *prev;
lcdnode_t *next;
lcdnode_t *last_priority;
lcd_t *lcd;
}lcdnode_s;
-struct lcdlist_s
+struct g15daemon_s
{
lcdnode_t *head;
lcdnode_t *tail;
@@ -199,7 +205,7 @@
struct passwd *nobody;
volatile unsigned long numclients;
configfile_t *config;
-}lcdlist_s;
+}g15daemon_s;
pthread_mutex_t lcdlist_mutex;
pthread_mutex_t g15lib_mutex;
@@ -215,24 +221,24 @@
/* create a /var/run/g15daemon.pid file, returning 0 on success else -1 */
int uf_create_pidfile();
/* open & run all plugins in the given directory */
-void g15_open_all_plugins(lcdlist_t **displaylist, char *plugin_directory);
+void g15_open_all_plugins(g15daemon_t *masterlist, char *plugin_directory);
/* linked lists */
-lcdlist_t *ll_lcdlist_init();
-void ll_lcdlist_destroy(lcdlist_t **displaylist);
+g15daemon_t *ll_lcdlist_init();
+void ll_lcdlist_destroy(g15daemon_t **masterlist);
/* open and parse config file */
-int uf_conf_open(lcdlist_t *list, char *filename);
+int uf_conf_open(g15daemon_t *list, char *filename);
/* write the config file with all keys/sections */
-int uf_conf_write(lcdlist_t *list,char *filename);
+int uf_conf_write(g15daemon_t *list,char *filename);
/* free all memory used by the config subsystem */
-void uf_conf_free(lcdlist_t *list);
+void uf_conf_free(g15daemon_t *list);
/* generic handler for net clients */
int internal_generic_eventhandler(plugin_event_t *myevent);
#endif
/* the following functions are available for use by plugins */
/* create a new section */
-config_section_t *g15daemon_cfg_load_section(lcdlist_t *displaylist,char *name);
+config_section_t *g15daemon_cfg_load_section(g15daemon_t *masterlist,char *name);
/* return string value from key in sectionname */
char* g15daemon_cfg_read_string(config_section_t *section, char *key, char *defaultval);
/* return float from key in sectionname */
@@ -257,9 +263,9 @@
/* syslog wrapper */
int g15daemon_log (int priority, const char *fmt, ...);
/* cycle from displayed screen to next on list */
-void g15daemon_lcdnode_cycle(lcdlist_t *displaylist);
+void g15daemon_lcdnode_cycle(g15daemon_t *masterlist);
/* add new screen */
-lcdnode_t *g15daemon_lcdnode_add(lcdlist_t **displaylist) ;
+lcdnode_t *g15daemon_lcdnode_add(g15daemon_t **masterlist) ;
/* remove screen */
void g15daemon_lcdnode_remove (lcdnode_t *oldnode);
Modified: trunk/g15daemon-wip/g15daemon/linked_lists.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-18 10:45:54 UTC (rev 176)
+++ trunk/g15daemon-wip/g15daemon/linked_lists.c 2006-11-18 13:46:03 UTC (rev 177)
@@ -57,56 +57,56 @@
}
-/* initialise a new displaylist, and add an initial node at the tail (used for the clock) */
-lcdlist_t *ll_lcdlist_init () {
+/* initialise a new masterlist, and add an initial node at the tail (used for the clock) */
+g15daemon_t *ll_lcdlist_init () {
- lcdlist_t *displaylist = NULL;
+ g15daemon_t *masterlist = NULL;
pthread_mutex_init(&lcdlist_mutex, NULL);
pthread_mutex_lock(&lcdlist_mutex);
- displaylist = g15daemon_xmalloc(sizeof(lcdlist_t));
+ masterlist = g15daemon_xmalloc(sizeof(g15daemon_t));
- displaylist->head = g15daemon_xmalloc(sizeof(lcdnode_t));
+ masterlist->head = g15daemon_xmalloc(sizeof(lcdnode_t));
- displaylist->tail = displaylist->head;
- displaylist->current = displaylist->head;
+ masterlist->tail = masterlist->head;
+ masterlist->current = masterlist->head;
- displaylist->head->lcd = ll_create_lcd();
- displaylist->head->lcd->mkey_state = 0;
- displaylist->head->lcd->masterlist = displaylist;
+ masterlist->head->lcd = ll_create_lcd();
+ masterlist->head->lcd->mkey_state = 0;
+ masterlist->head->lcd->masterlist = masterlist;
/* first screen is the clock/menu */
- displaylist->head->lcd->g15plugin->info = NULL;
+ masterlist->head->lcd->g15plugin->info = NULL;
- displaylist->head->prev = displaylist->head;
- displaylist->head->next = displaylist->head;
- displaylist->head->list = displaylist;
- displaylist->keyboard_handler = NULL;
- displaylist->numclients = 0;
+ masterlist->head->prev = masterlist->head;
+ masterlist->head->next = masterlist->head;
+ masterlist->head->list = masterlist;
+ masterlist->keyboard_handler = NULL;
+ masterlist->numclients = 0;
pthread_mutex_unlock(&lcdlist_mutex);
- return displaylist;
+ return masterlist;
}
-lcdnode_t *g15daemon_lcdnode_add(lcdlist_t **displaylist) {
+lcdnode_t *g15daemon_lcdnode_add(g15daemon_t **masterlist) {
lcdnode_t *new = NULL;
pthread_mutex_lock(&lcdlist_mutex);
new = g15daemon_xmalloc(sizeof(lcdnode_t));
- new->prev = (*displaylist)->head;
- new->next = (*displaylist)->tail;
+ new->prev = (*masterlist)->head;
+ new->next = (*masterlist)->tail;
new->lcd = ll_create_lcd();
- new->lcd->masterlist = (*displaylist);
+ new->lcd->masterlist = (*masterlist);
new->last_priority = NULL;
- new->list = *displaylist;
+ new->list = *masterlist;
- (*displaylist)->head->next=new;
- (*displaylist)->current = new;
+ (*masterlist)->head->next=new;
+ (*masterlist)->current = new;
- (*displaylist)->head = new;
- (*displaylist)->head->list = *displaylist;
- (*displaylist)->numclients++;
+ (*masterlist)->head = new;
+ (*masterlist)->head->list = *masterlist;
+ (*masterlist)->numclients++;
pthread_mutex_unlock(&lcdlist_mutex);
@@ -114,9 +114,9 @@
}
/* cycle through connected client displays */
-void g15daemon_lcdnode_cycle(lcdlist_t *displaylist)
+void g15daemon_lcdnode_cycle(g15daemon_t *masterlist)
{
- lcdnode_t *current_screen = displaylist->current;
+ lcdnode_t *current_screen = masterlist->current;
g15daemon_send_event(current_screen->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_HIDDEN);
do
@@ -124,50 +124,50 @@
pthread_mutex_lock(&lcdlist_mutex);
g15daemon_send_event(current_screen->lcd, G15_EVENT_USER_FOREGROUND, 0);
- if(displaylist->tail == displaylist->current){
- displaylist->current = displaylist->head;
+ if(masterlist->tail == masterlist->current){
+ masterlist->current = masterlist->head;
}else{
- displaylist->current = displaylist->current->prev;
+ masterlist->current = masterlist->current->prev;
}
pthread_mutex_unlock(&lcdlist_mutex);
}
- while (current_screen != displaylist->current);
+ while (current_screen != masterlist->current);
pthread_mutex_lock(&lcdlist_mutex);
- if(displaylist->tail == displaylist->current) {
- displaylist->current = displaylist->head;
+ if(masterlist->tail == masterlist->current) {
+ masterlist->current = masterlist->head;
} else {
- displaylist->current = displaylist->current->prev;
+ masterlist->current = masterlist->current->prev;
}
pthread_mutex_unlock(&lcdlist_mutex);
- g15daemon_send_event(displaylist->current->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_VISIBLE);
+ g15daemon_send_event(masterlist->current->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_VISIBLE);
g15daemon_send_event(current_screen->lcd, G15_EVENT_USER_FOREGROUND, 1);
pthread_mutex_lock(&lcdlist_mutex);
- displaylist->current->lcd->state_changed = 1;
- displaylist->current->last_priority = displaylist->current;
+ masterlist->current->lcd->state_changed = 1;
+ masterlist->current->last_priority = masterlist->current;
pthread_mutex_unlock(&lcdlist_mutex);
}
void g15daemon_lcdnode_remove (lcdnode_t *oldnode) {
- lcdlist_t **displaylist = NULL;
+ g15daemon_t **masterlist = NULL;
lcdnode_t **prev = NULL;
lcdnode_t **next = NULL;
pthread_mutex_lock(&lcdlist_mutex);
- displaylist = &oldnode->list;
+ masterlist = &oldnode->list;
prev = &oldnode->prev;
next = &oldnode->next;
ll_quit_lcd(oldnode->lcd);
- (*displaylist)->numclients--;
- if((*displaylist)->current == oldnode) {
- if((*displaylist)->current!=(*displaylist)->head){
- (*displaylist)->current = oldnode->next;
+ (*masterlist)->numclients--;
+ if((*masterlist)->current == oldnode) {
+ if((*masterlist)->current!=(*masterlist)->head){
+ (*masterlist)->current = oldnode->next;
} else {
- (*displaylist)->current = oldnode->prev;
+ (*masterlist)->current = oldnode->prev;
}
- (*displaylist)->current->lcd->state_changed = 1;
+ (*masterlist)->current->lcd->state_changed = 1;
}
if(&oldnode->lcd == (void*)keyhandler) {
@@ -176,12 +176,12 @@
g15daemon_log(LOG_WARNING,"Client key handler quit, going back to defaults");
}
- if((*displaylist)->head!=oldnode){
+ if((*masterlist)->head!=oldnode){
(*next)->prev = oldnode->prev;
(*prev)->next = oldnode->next;
}else{
- (*prev)->next = (*displaylist)->tail;
- (*displaylist)->head = oldnode->prev;
+ (*prev)->next = (*masterlist)->tail;
+ (*masterlist)->head = oldnode->prev;
}
free(oldnode);
@@ -189,17 +189,17 @@
pthread_mutex_unlock(&lcdlist_mutex);
}
-void ll_lcdlist_destroy(lcdlist_t **displaylist) {
+void ll_lcdlist_destroy(g15daemon_t **masterlist) {
int i = 0;
- while ((*displaylist)->head != (*displaylist)->tail) {
+ while ((*masterlist)->head != (*masterlist)->tail) {
i++;
- g15daemon_lcdnode_remove((*displaylist)->head);
+ g15daemon_lcdnode_remove((*masterlist)->head);
}
- free((*displaylist)->tail->lcd);
- free((*displaylist)->tail);
- free(*displaylist);
+ free((*masterlist)->tail->lcd);
+ free((*masterlist)->tail);
+ free(*masterlist);
pthread_mutex_destroy(&lcdlist_mutex);
}
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2006-11-18 10:45:54 UTC (rev 176)
+++ trunk/g15daemon-wip/g15daemon/main.c 2006-11-18 13:46:03 UTC (rev 177)
@@ -77,14 +77,14 @@
}else{
/* hacky attempt to double-time the use of L1, if the key is pressed less than half a second, it cycles the screens. If held for longer, the key is sent to the application for use instead */
lcd_t *lcd = (lcd_t*)caller;
- lcdlist_t* displaylist = lcd->masterlist;
+ g15daemon_t* masterlist = lcd->masterlist;
static unsigned int clicktime;
if(value & cycle_key) {
clicktime=g15daemon_gettime_ms();
}else{
unsigned int unclick=g15daemon_gettime_ms();
if ((unclick-clicktime)<500) {
- g15daemon_lcdnode_cycle(displaylist);
+ g15daemon_lcdnode_cycle(masterlist);
}
else
{
@@ -107,9 +107,9 @@
}
case G15_EVENT_CYCLE_PRIORITY:{
lcd_t *lcd = (lcd_t*)caller;
- lcdlist_t* displaylist = lcd->masterlist;
+ g15daemon_t* masterlist = lcd->masterlist;
if(value)
- g15daemon_lcdnode_cycle(displaylist);
+ g15daemon_lcdnode_cycle(masterlist);
break;
}
case G15_EVENT_REQ_PRIORITY: {
@@ -151,7 +151,7 @@
static void *keyboard_watch_thread(void *lcdlist){
- lcdlist_t *displaylist = (lcdlist_t*)(lcdlist);
+ g15daemon_t *masterlist = (g15daemon_t*)(lcdlist);
unsigned int keypresses = 0;
int retval = 0;
@@ -163,7 +163,7 @@
pthread_mutex_unlock(&g15lib_mutex);
if(retval == G15_NO_ERROR){
- g15daemon_send_event(displaylist->current->lcd,
+ g15daemon_send_event(masterlist->current->lcd,
G15_EVENT_KEYPRESS, keypresses);
}
g15daemon_msleep(10);
@@ -174,12 +174,12 @@
static void *lcd_draw_thread(void *lcdlist){
- lcdlist_t *displaylist = (lcdlist_t*)(lcdlist);
+ g15daemon_t *masterlist = (g15daemon_t*)(lcdlist);
static long int lastlcd = 1;
static unsigned int lastscreentime;
/* unsigned int fps = 0; */
- lcd_t *displaying = displaylist->tail->lcd;
- lcd_t *lastdisplayed=NULL;
+ lcd_t *displaying = masterlist->tail->lcd;
+ char *lastdisplayed=NULL;
memset(displaying->buf,0,1024);
g15daemon_sleep(2);
@@ -187,7 +187,7 @@
while (!leaving) {
pthread_mutex_lock(&lcdlist_mutex);
- displaying = displaylist->current->lcd;
+ displaying = masterlist->current->lcd;
if(displaying->ident != lastlcd){
/* monitor 'fps' - due to the TCP protocol, some frames will be bunched up.
@@ -195,10 +195,10 @@
/* fps = 1000 / (g15daemon_gettime_ms() - lastscreentime); */
/* if the current screen is less than 20ms from the previous (equivelant to 50fps) delay it */
/* this allows a real-world fps of 40fps with no almost frame loss and reduces peak usb bus-load */
- if((g15daemon_gettime_ms() - lastscreentime)>=20||displaying!=lastdisplayed){
+ if((g15daemon_gettime_ms() - lastscreentime)>=20||(char*)displaying!=lastdisplayed){
uf_write_buf_to_g15(displaying);
lastscreentime = g15daemon_gettime_ms();
- lastdisplayed = displaying;
+ lastdisplayed = (char*)displaying;
lastlcd = displaying->ident;
}
}
@@ -292,7 +292,7 @@
if(uf_create_pidfile() == 0) {
- lcdlist_t *lcdlist;
+ g15daemon_t *lcdlist;
pthread_attr_t attr;
struct passwd *nobody;
unsigned char location[1024];
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-18 10:45:54 UTC (rev 176)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2006-11-18 13:46:03 UTC (rev 177)
@@ -236,7 +236,7 @@
/* free all memory used by the config subsystem */
-void uf_conf_free(lcdlist_t *list)
+void uf_conf_free(g15daemon_t *list)
{
config_section_t *section=list->config->sections;
config_items_t *tmpitem=NULL;
@@ -266,7 +266,7 @@
}
/* write the config file with all keys/sections */
-int uf_conf_write(lcdlist_t *list,char *filename)
+int uf_conf_write(g15daemon_t *list,char *filename)
{
int config_fd=-1;
config_section_t *foo=list->config->sections;
@@ -298,7 +298,7 @@
}
/* search the list for valid section name return pointer to section, or NULL otherwise */
-config_section_t* uf_search_confsection(lcdlist_t *list,char *sectionname){
+config_section_t* uf_search_confsection(g15daemon_t *list,char *sectionname){
config_section_t *section=list->config->sections;
while(section!=NULL){
@@ -327,21 +327,21 @@
/* return pointer to section, or create a new section if it doesnt exist */
-config_section_t *g15daemon_cfg_load_section(lcdlist_t *displaylist,char *name) {
+config_section_t *g15daemon_cfg_load_section(g15daemon_t *masterlist,char *name) {
config_section_t *new = NULL;
- if((new=uf_search_confsection(displaylist,name))!=NULL)
+ if((new=uf_search_confsection(masterlist,name))!=NULL)
return new;
new = g15daemon_xmalloc(sizeof(config_section_t));
new->head = new;
new->next = NULL;;
new->sectionname=strdup(name);
- if(!displaylist->config->sections){
- displaylist->config->sections=new;
- displaylist->config->sections->head = new;
+ if(!masterlist->config->sections){
+ masterlist->config->sections=new;
+ masterlist->config->sections->head = new;
} else {
- displaylist->config->sections->head->next=new;
- displaylist->config->sections->head = new;
+ masterlist->config->sections->head->next=new;
+ masterlist->config->sections->head = new;
}
return new;
}
@@ -452,7 +452,7 @@
}
-int uf_conf_open(lcdlist_t *list, char *filename) {
+int uf_conf_open(g15daemon_t *list, char *filename) {
char *buffer, *lines;
int config_fd=-1;
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2006-11-18 10:45:54 UTC (rev 176)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2006-11-18 13:46:03 UTC (rev 177)
@@ -314,7 +314,7 @@
}
/* poll the listening socket for connections, spawning new threads as needed to handle clients */
-int g15_clientconnect (lcdlist_t **g15daemon, int listening_socket) {
+int g15_clientconnect (g15daemon_t **g15daemon, int listening_socket) {
int conn_s;
struct pollfd pfd[1];
@@ -366,7 +366,7 @@
*/
static void lcdserver_thread(void *lcdlist){
- lcdlist_t *displaylist = (lcdlist_t*) lcdlist ;
+ g15daemon_t *masterlist = (g15daemon_t*) lcdlist ;
int g15_socket=-1;
if((g15_socket = init_sockserver())<0){
@@ -379,7 +379,7 @@
}
while ( !leaving ) {
- g15_clientconnect(&displaylist,g15_socket);
+ g15_clientconnect(&masterlist,g15_socket);
}
close(g15_socket);
Modified: trunk/g15daemon-wip/plugins/g15_plugin_uinput.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2006-11-18 10:45:54 UTC (rev 176)
+++ trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2006-11-18 13:46:03 UTC (rev 177)
@@ -58,11 +58,11 @@
int i=0;
char *custom_filename;
- lcdlist_t *displaylist = (lcdlist_t*) plugin_args;
+ g15daemon_t *masterlist = (g15daemon_t*) plugin_args;
struct uinput_user_dev uinp;
static const char *uinput_device_fn[] = { "/dev/uinput", "/dev/input/uinput","/dev/misc/uinput",0};
- uinput_cfg = g15daemon_cfg_load_section(displaylist,"Keyboard OS Mapping (uinput)");
+ uinput_cfg = g15daemon_cfg_load_section(masterlist,"Keyboard OS Mapping (uinput)");
custom_filename = g15daemon_cfg_read_string(uinput_cfg, "device",(char*)uinput_device_fn[1]);
map_Lkeys=g15daemon_cfg_read_int(uinput_cfg, "Lkeys.mapped",0);
@@ -79,8 +79,8 @@
return -1;
}
/* all other processes/threads should be seteuid nobody */
- seteuid(displaylist->nobody->pw_uid);
- setegid(displaylist->nobody->pw_gid);
+ seteuid(masterlist->nobody->pw_uid);
+ setegid(masterlist->nobody->pw_gid);
memset(&uinp,0,sizeof(uinp));
@@ -147,7 +147,7 @@
#endif
#endif
-void g15_process_keys(lcdlist_t *displaylist, unsigned int currentkeys, unsigned int lastkeys)
+void g15_process_keys(g15daemon_t *masterlist, unsigned int currentkeys, unsigned int lastkeys)
{
/* 'G' keys */
if((currentkeys & G15_KEY_G1) && !(lastkeys & G15_KEY_G1))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ane...@us...> - 2006-11-24 11:31:28
|
Revision: 195
http://svn.sourceforge.net/g15daemon/?rev=195&view=rev
Author: aneurysm9
Date: 2006-11-24 03:31:26 -0800 (Fri, 24 Nov 2006)
Log Message:
-----------
Add analog clock thanks to Rasta Freak
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/plugins/g15_plugin_clock.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2006-11-23 07:01:10 UTC (rev 194)
+++ trunk/g15daemon-wip/ChangeLog 2006-11-24 11:31:26 UTC (rev 195)
@@ -93,3 +93,4 @@
- Clock is now a plugin
- dependency on libdaemon is now removed
- g15daemon is now dependant on libg15render.
+- Clock now includes analog clock thanks to Rasta Freak <igo...@zg...>
Modified: trunk/g15daemon-wip/plugins/g15_plugin_clock.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2006-11-23 07:01:10 UTC (rev 194)
+++ trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2006-11-24 11:31:26 UTC (rev 195)
@@ -33,17 +33,108 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
+#include <math.h>
+#include <time.h>
#include <libg15.h>
#include <config.h>
#include <g15daemon.h>
#include <libg15render.h>
+extern double round(double);
+// clock specs:
+#define CLOCK_CENTERX 25
+#define CLOCK_CENTERY 21
+#define CLOCK_RADIUS 20
+
+// useful shortcuts (g15r_drawCircle() is a bit egg-shaped, or my math is :)
+#define CLOCK_STARTX (CLOCK_CENTERX-CLOCK_RADIUS-1)
+#define CLOCK_STARTY (CLOCK_CENTERY-CLOCK_RADIUS)
+#define CLOCK_ENDX (CLOCK_CENTERX+CLOCK_RADIUS+1)
+#define CLOCK_ENDY (CLOCK_CENTERY+CLOCK_RADIUS)
+
static int mode=1;
static int showdate=0;
+static int digital=1;
+g15canvas *static_canvas = NULL;
-static int *lcdclock(lcd_t *lcd)
+//----------------------------------------------------------------------------
+// calc x,y for given minute/hour/sec (pos), cut_off is for radius variations
+// ( ie. shorter/longer clock-hands, line parts....)
+void get_clock_pos(int pos, int *x, int *y, int cut_off)
{
+ // pos = [0-60]
+
+ // make sure it's in range:
+ pos %= 60;
+
+ // angles go contra-clockwise, but clock goes clockwise :), so invert clock orientation
+ pos = 60 - pos;
+
+ // this math is patent-copy-trademark-protected by <Rasta Freak> :)
+ double ang = 270.0 - 6.0*(double)pos;
+ ang = (ang * 2.0 * M_PI) / 360.0;
+
+ // simple pre-school math for naturaly dumb:
+ double _x = (double)CLOCK_CENTERX + (cos(ang)*(double)(CLOCK_RADIUS+1-cut_off));
+ double _y = (double)CLOCK_CENTERY + (sin(ang)*(double)(CLOCK_RADIUS-cut_off));
+
+ *x = (int)(round(_x));
+ *y = (int)(round(_y));
+}
+
+//----------------------------------------------------------------------------
+// draw clock frame (only once, as it is stored in static_canvas)
+// NOTE - coords here are hardcoded !
+void draw_static_canvas(void)
+{
+ g15canvas *c = static_canvas;
+ int i;
+
+ g15r_clearScreen (c, G15_COLOR_WHITE);
+ g15r_drawCircle(c, CLOCK_CENTERX, CLOCK_CENTERY, CLOCK_RADIUS, 0, G15_COLOR_BLACK);
+ g15r_drawCircle(c, CLOCK_CENTERX, CLOCK_CENTERY, 2, 1, G15_COLOR_BLACK);
+
+ for (i=0; i<60; i+=5)
+ {
+ if ((i%15)==0)
+ {
+ // draw number (12/3/6/9):
+ switch (i)
+ {
+ case 0:
+ g15r_renderString(c, (unsigned char*)"12", 0, G15_TEXT_SMALL, 22, 3);
+ break;
+
+ case 15:
+ g15r_renderString(c, (unsigned char*)"3", 3, G15_TEXT_SMALL, 42, 1);
+ break;
+
+ case 30:
+ g15r_renderString(c, (unsigned char*)"6", 6, G15_TEXT_SMALL, 24, -1);
+ break;
+
+ case 45:
+ g15r_renderString(c, (unsigned char*)"9", 3, G15_TEXT_SMALL, 6, 1);
+ break;
+ }
+ }
+ else
+ {
+ // draw 4-pixel square dot for other hours:
+ int x1,y1,dir;
+ if (i>15 && i<45) dir=-1; else dir=1;
+ get_clock_pos(i, &x1, &y1, 3);
+ g15r_setPixel(c, x1, y1, G15_COLOR_BLACK);
+ g15r_setPixel(c, x1+dir, y1, G15_COLOR_BLACK);
+ g15r_setPixel(c, x1, y1+dir, G15_COLOR_BLACK);
+ g15r_setPixel(c, x1+dir, y1+dir, G15_COLOR_BLACK);
+ }
+ }
+}
+
+static int draw_digital(g15canvas *canvas)
+{
unsigned int col = 0;
unsigned int len=0;
int narrows=0;
@@ -51,25 +142,15 @@
char buf[10];
char ampm[3];
int height = G15_LCD_HEIGHT - 1;
- g15canvas *canvas = (g15canvas *) malloc (sizeof (g15canvas));
-
- if (canvas != NULL)
- {
- memset(canvas->buffer, 0, G15_BUFFER_LEN);
- canvas->mode_cache = 0;
- canvas->mode_reverse = 0;
- canvas->mode_xor = 0;
- }
-
+
time_t currtime = time(NULL);
- memset(lcd->buf,0,G15_BUFFER_LEN);
memset(buf,0,10);
memset(ampm,0,3);
if(showdate) {
char buf2[40];
strftime(buf2,40,"%A %e %B %Y",localtime(&currtime));
- g15r_renderString (canvas,buf2 , 0, G15_TEXT_MED, 80-((strlen(buf2)*5)/2), height-6);
+ g15r_renderString (canvas,(unsigned char *)buf2 , 0, G15_TEXT_MED, 80-((strlen(buf2)*5)/2), height-6);
height-=10;
}
@@ -106,10 +187,97 @@
}
if(ampm[0]!=0)
- g15r_renderString (canvas,ampm,0,G15_TEXT_LARGE,totalwidth+15,height-6);
+ g15r_renderString (canvas,(unsigned char *)ampm,0,G15_TEXT_LARGE,totalwidth+15,height-6);
+ return G15_PLUGIN_OK;
+}
+
+static int draw_analog(g15canvas *c)
+{
+ int xh, yh;
+ int xm, ym;
+ int xs, ys;
+
+ time_t now = time(NULL);
+ struct tm *t = localtime(&now);
+
+ int h;
+ h = t->tm_hour;
+ h %= 12;
+ h *= 5;
+ h += t->tm_min * 5 / 60;
+
+ get_clock_pos(h, &xh, &yh, 9);
+ get_clock_pos(t->tm_min, &xm, &ym, 6);
+ get_clock_pos(t->tm_sec, &xs, &ys, 3);
+
+ // put background:
+ memcpy(c, static_canvas, sizeof(g15canvas));
+
+ // hour
+ g15r_drawLine(c, CLOCK_CENTERX-2, CLOCK_CENTERY, xh, yh, G15_COLOR_BLACK);
+ g15r_drawLine(c, CLOCK_CENTERX-1, CLOCK_CENTERY, xh, yh, G15_COLOR_BLACK);
+ g15r_drawLine(c, CLOCK_CENTERX, CLOCK_CENTERY, xh, yh+1, G15_COLOR_BLACK);
+ g15r_drawLine(c, CLOCK_CENTERX+1, CLOCK_CENTERY, xh, yh, G15_COLOR_BLACK);
+ g15r_drawLine(c, CLOCK_CENTERX+2, CLOCK_CENTERY, xh, yh, G15_COLOR_BLACK);
+
+ // minute
+ g15r_drawLine(c, CLOCK_CENTERX-1, CLOCK_CENTERY, xm, ym, G15_COLOR_BLACK);
+ g15r_drawLine(c, CLOCK_CENTERX, CLOCK_CENTERY, xm, ym+1, G15_COLOR_BLACK);
+ g15r_drawLine(c, CLOCK_CENTERX+1, CLOCK_CENTERY, xm, ym, G15_COLOR_BLACK);
+
+ // second:
+ g15r_drawLine(c, CLOCK_CENTERX, CLOCK_CENTERY, xs, ys, G15_COLOR_BLACK);
+
+ //
+ // draw texts:
+ //
+ char day[32]; // Tuesday
+ char mon[32]; // March
+ char year[32]; // 1234 AD
+ char time[32]; // 22:33:44
+ char date[32]; // 21.April
+
+ strftime(day, sizeof(day), "%A", t);
+ strftime(mon, sizeof(mon), "%B", t);
+ sprintf(date, "%d.%s", t->tm_mday, mon);
+ sprintf(year, "%4d AD", t->tm_year+1900);
+ if(mode)
+ strftime(time,sizeof(time),"%H:%M:%S",t);
+ else
+ strftime(time,sizeof(time),"%r",t);
+
+ g15r_renderString(c, (unsigned char*)time, 0, G15_TEXT_LARGE, 60, 0);
+ g15r_renderString(c, (unsigned char*)day, 1, G15_TEXT_LARGE, 60, 0);
+ g15r_renderString(c, (unsigned char*)date, 2, G15_TEXT_LARGE, 60, 0);
+ g15r_renderString(c, (unsigned char*)year, 3, G15_TEXT_LARGE, 60, 0);
+
+ return G15_PLUGIN_OK;
+}
+
+
+static int *lcdclock(lcd_t *lcd)
+{
+ int ret = 0;
+ g15canvas *canvas = (g15canvas *) malloc (sizeof (g15canvas));
+
+ if (canvas != NULL)
+ {
+ memset(canvas->buffer, 0, G15_BUFFER_LEN);
+ canvas->mode_cache = 0;
+ canvas->mode_reverse = 0;
+ canvas->mode_xor = 0;
+ }
+
+ memset(lcd->buf,0,G15_BUFFER_LEN);
+
+ if(digital)
+ ret = draw_digital(canvas);
+ else
+ ret = draw_analog(canvas);
+
memcpy (lcd->buf, canvas->buffer, G15_BUFFER_LEN);
- lcd->ident = currtime+100;
+ lcd->ident = random();
free(canvas);
return G15_PLUGIN_OK;
}
@@ -130,6 +298,10 @@
showdate = 1^showdate;
g15daemon_cfg_write_bool(clockcfg, "ShowDate", showdate);
}
+ if(myevent->value & G15_KEY_L4) {
+ digital = 1^digital;
+ g15daemon_cfg_write_bool(clockcfg, "Digital", digital);
+ }
// printf("Clock plugin received keypress event : %i\n",myevent->value);
break;
case G15_EVENT_VISIBILITY_CHANGED:
@@ -151,6 +323,18 @@
config_section_t *clockcfg = g15daemon_cfg_load_section(lcd->masterlist,"Clock");
mode=g15daemon_cfg_read_bool(clockcfg, "24hrFormat",1);
showdate=g15daemon_cfg_read_bool(clockcfg, "ShowDate",0);
+ digital=g15daemon_cfg_read_bool(clockcfg, "Digital",1);
+
+ static_canvas = (g15canvas*)malloc(sizeof(g15canvas));
+ if (static_canvas != NULL)
+ {
+ memset(static_canvas->buffer, 0, G15_BUFFER_LEN);
+ static_canvas->mode_cache = 0;
+ static_canvas->mode_reverse = 0;
+ static_canvas->mode_xor = 0;
+ draw_static_canvas();
+ }
+
return NULL;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ane...@us...> - 2006-12-25 02:38:08
|
Revision: 214
http://svn.sourceforge.net/g15daemon/?rev=214&view=rev
Author: aneurysm9
Date: 2006-12-24 18:38:09 -0800 (Sun, 24 Dec 2006)
Log Message:
-----------
Move g15daemon_xmms plugin to it's own package
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/Makefile.am
trunk/g15daemon-wip/README
trunk/g15daemon-wip/configure.in
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2006-12-25 02:27:54 UTC (rev 213)
+++ trunk/g15daemon-wip/ChangeLog 2006-12-25 02:38:09 UTC (rev 214)
@@ -94,3 +94,4 @@
- dependency on libdaemon is now removed
- g15daemon is now dependant on libg15render.
- Clock now includes analog clock thanks to Rasta Freak <igo...@zg...>
+- Moved g15daemon_xmms_spectrum plugin to separate package
Modified: trunk/g15daemon-wip/Makefile.am
===================================================================
--- trunk/g15daemon-wip/Makefile.am 2006-12-25 02:27:54 UTC (rev 213)
+++ trunk/g15daemon-wip/Makefile.am 2006-12-25 02:38:09 UTC (rev 214)
@@ -1,6 +1,6 @@
LLIBDIR=@LIBDIR@
-SUBDIRS = libg15daemon_client g15daemon plugins g15daemon_xmms
+SUBDIRS = libg15daemon_client g15daemon plugins
INCLUDES = -I$(top_srcdir)/libg15daemon_client -I$(top_srcdir)/g15daemon
EXTRA_DIST = debian contrib Documentation lang-bindings patches rpm README.usage FAQ LICENSE images
@@ -17,7 +17,6 @@
rm -rf `find $(distdir)/debian -name .svn`
rm -rf `find $(distdir)/contrib -name .svn`
rm -rf `find $(distdir)/Documentation -name .svn`
- rm -rf `find $(distdir)/g15daemon_xmms -name .svn`
rm -rf `find $(distdir)/lang_bindings -name .svn`
rm -rf `find $(distdir)/patches -name .svn`
rm -rf `find $(distdir)/rpm -name .svn`
Modified: trunk/g15daemon-wip/README
===================================================================
--- trunk/g15daemon-wip/README 2006-12-25 02:27:54 UTC (rev 213)
+++ trunk/g15daemon-wip/README 2006-12-25 02:38:09 UTC (rev 214)
@@ -16,7 +16,7 @@
for libgraphlcd, which in turn enables support for lcdproc, vdr,
and any other applications able to use that library. A simple
xmms spectrum analyser plugin, based on the finespectrum plugin,
-is also available in the package.
+is available separately.
G15daemon depends on libg15 from G15tools.
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2006-12-25 02:27:54 UTC (rev 213)
+++ trunk/g15daemon-wip/configure.in 2006-12-25 02:38:09 UTC (rev 214)
@@ -43,24 +43,7 @@
dnl end of uinput version checks
#endif
-dnl check for xmms devel headers
-AC_PATH_X
-
-AM_PATH_GLIB(1.2.2,,)
-AM_PATH_XMMS(1.2.4,,[have_xmms=yes])
-AM_PATH_GTK(1.2.2,,)
-LIBS="$LIBS $GTK_LIBS"
CPPFLAGS=$CPPFLAGS_save
-
-AC_ARG_ENABLE(xmmsplugin,
-[ --enable-xmmsplugin Make g15daemon_spectrum_xmms xmms plugin],
-[case "${enableval}" in
- yes) xmmsplugin=true ;;
- no) xmmsplugin=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-xmmsplugin) ;;
-esac],[xmmsplugin=false])
-AM_CONDITIONAL(HAVE_XMMSPLUGIN, test x$xmmsplugin = xtrue)
-
CPPFLAGS="$CPPFLAGS "'-DDATADIR="\"$(datadir)\""'
# Checks for typedefs, structures, and compiler characteristics.
@@ -74,6 +57,6 @@
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([memset select socket strerror])
-AC_CONFIG_FILES([Makefile g15daemon/Makefile libg15daemon_client/Makefile plugins/Makefile g15daemon_xmms/Makefile ])
+AC_CONFIG_FILES([Makefile g15daemon/Makefile libg15daemon_client/Makefile plugins/Makefile])
AC_OUTPUT
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-01-03 16:05:40
|
Revision: 240
http://svn.sourceforge.net/g15daemon/?rev=240&view=rev
Author: mlampard
Date: 2007-01-03 08:05:38 -0800 (Wed, 03 Jan 2007)
Log Message:
-----------
if the user wants the backlight off, keep it that way. add network function to set keyboard backlight, and return previous state of lcd brightness and contrast when setting them via clientlib functions
Modified Paths:
--------------
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h
trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2007-01-01 20:51:40 UTC (rev 239)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2007-01-03 16:05:38 UTC (rev 240)
@@ -48,6 +48,7 @@
#define CLIENT_CMD_IS_FOREGROUND 'v'
#define CLIENT_CMD_IS_USER_SELECTED 'u'
#define CLIENT_CMD_BACKLIGHT 0x80
+#define CLIENT_CMD_KB_BACKLIGHT 0x8
#define CLIENT_CMD_CONTRAST 0x40
#define CLIENT_CMD_MKEY_LIGHTS 0x20
/* if the following CMD is sent from a client, G15Daemon will not send any MR or G? keypresses via uinput,
@@ -207,6 +208,7 @@
struct passwd *nobody;
volatile unsigned long numclients;
configfile_t *config;
+ unsigned int kb_backlight_state; // master state
}g15daemon_s;
pthread_mutex_t lcdlist_mutex;
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2007-01-01 20:51:40 UTC (rev 239)
+++ trunk/g15daemon-wip/g15daemon/main.c 2007-01-03 16:05:38 UTC (rev 240)
@@ -75,6 +75,11 @@
int *(*keyboard_handler)(plugin_event_t *newevent) = (void*)lcd->masterlist->keyboard_handler;
(*keyboard_handler)((void*)newevent);
}
+ if(value & G15_KEY_LIGHT){ // the backlight key was pressed - maintain user-selected state
+ lcd->masterlist->kb_backlight_state++;
+ if(lcd->masterlist->kb_backlight_state>2)
+ lcd->masterlist->kb_backlight_state=0;
+ }
free(newevent);
}else{
/* hacky attempt to double-time the use of L1, if the key is pressed less than half a second, it cycles the screens. If held for longer, the key is sent to the application for use instead */
@@ -221,11 +226,14 @@
}
}
- if(displaying->state_changed ){
+ if(displaying->state_changed){
pthread_mutex_lock(&g15lib_mutex);
setLCDContrast(displaying->contrast_state);
setLEDs(displaying->mkey_state);
- setLCDBrightness(displaying->backlight_state);
+ if(masterlist->kb_backlight_state)
+ setLCDBrightness(displaying->backlight_state);
+ else
+ setLCDBrightness(masterlist->kb_backlight_state);
pthread_mutex_unlock(&g15lib_mutex);
displaying->state_changed = 0;
}
@@ -364,18 +372,20 @@
g15daemon_log(LOG_WARNING,"BEWARE: running as effective uid %i\n",nobody->pw_uid);
}
+ /* initialise the linked list */
+ lcdlist = ll_lcdlist_init();
+ lcdlist->nobody = nobody;
+
setLCDContrast(1);
setLEDs(0);
- setLCDBrightness(1);
+ lcdlist->kb_backlight_state=1;
+ setLCDBrightness(lcdlist->kb_backlight_state);
#ifdef LIBG15_VERSION
#if LIBG15_VERSION >= 1200
- setKBBrightness(1);
+ setKBBrightness(lcdlist->kb_backlight_state);
#endif
#endif
- /* initialise the linked list */
- lcdlist = ll_lcdlist_init();
- lcdlist->nobody = nobody;
uf_conf_open(lcdlist, "/etc/g15daemon.conf");
global_cfg=g15daemon_cfg_load_section(lcdlist,"Global");
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h 2007-01-01 20:51:40 UTC (rev 239)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h 2007-01-03 16:05:38 UTC (rev 240)
@@ -44,6 +44,7 @@
#define G15DAEMON_MKEYLEDS 0x20
#define G15DAEMON_CONTRAST 0x40
#define G15DAEMON_BACKLIGHT 0x80
+ #define G15DAEMON_KB_BACKLIGHT 0x8
#define G15DAEMON_GET_KEYSTATE 'k'
#define G15DAEMON_SWITCH_PRIORITIES 'p'
#define G15DAEMON_IS_FOREGROUND 'v'
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2007-01-01 20:51:40 UTC (rev 239)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2007-01-03 16:05:38 UTC (rev 240)
@@ -189,12 +189,20 @@
if (value > G15_CONTRAST_HIGH)
value = G15_CONTRAST_HIGH;
packet[0] = command | value;
- retval = send( sock, packet, 1, MSG_OOB );
+ send( sock, packet, 1, MSG_OOB );
+ retval = g15_recv_oob_answer(sock);
break;
case G15DAEMON_BACKLIGHT:
if (value > G15_BRIGHTNESS_BRIGHT)
value = G15_BRIGHTNESS_BRIGHT;
packet[0] = command | value;
+ send( sock, packet, 1, MSG_OOB );
+ retval = g15_recv_oob_answer(sock);
+ break;
+ case G15DAEMON_KB_BACKLIGHT:
+ if (value > G15_BRIGHTNESS_BRIGHT)
+ value = G15_BRIGHTNESS_BRIGHT;
+ packet[0] = command | value;
retval = send( sock, packet, 1, MSG_OOB );
break;
case G15DAEMON_MKEYLEDS:
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2007-01-01 20:51:40 UTC (rev 239)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2007-01-03 16:05:38 UTC (rev 240)
@@ -87,12 +87,20 @@
send(sock,msgbuf,1,0);
break;
}
- case CLIENT_CMD_BACKLIGHT: { /* client wants to change the backlight */
+ case CLIENT_CMD_BACKLIGHT: { /* client wants to change the LCD backlight */
+ /* return current state to the client then implement the new state */
+ send(sock,&lcdnode->lcd->backlight_state,1,MSG_OOB);
lcdnode->lcd->backlight_state = msgbuf[0]-0x80;
lcdnode->lcd->state_changed = 1;
break;
}
+ case CLIENT_CMD_KB_BACKLIGHT: { /* client wants to change the KB backlight */
+ setKBBrightness((unsigned int)msgbuf[0]-0x80);
+ break;
+ }
case CLIENT_CMD_CONTRAST: { /* client wants to change the LCD contrast */
+ /* send current state to the client */
+ send(sock,&lcdnode->lcd->contrast_state,1,MSG_OOB);
lcdnode->lcd->contrast_state = msgbuf[0]-0x40;
lcdnode->lcd->state_changed = 1;
break;
@@ -307,7 +315,7 @@
}
}
exitthread:
- close(client_sock);
+ close(client_sock);
free(tmpbuf);
g15daemon_lcdnode_remove(display);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-01-04 21:34:07
|
Revision: 244
http://svn.sourceforge.net/g15daemon/?rev=244&view=rev
Author: mlampard
Date: 2007-01-04 13:34:05 -0800 (Thu, 04 Jan 2007)
Log Message:
-----------
add remote keyhandler functionality for the macro utility
Modified Paths:
--------------
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2007-01-04 21:33:00 UTC (rev 243)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2007-01-04 21:34:05 UTC (rev 244)
@@ -209,6 +209,7 @@
volatile unsigned long numclients;
configfile_t *config;
unsigned int kb_backlight_state; // master state
+ unsigned int remote_keyhandler_sock;
}g15daemon_s;
pthread_mutex_t lcdlist_mutex;
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2007-01-04 21:33:00 UTC (rev 243)
+++ trunk/g15daemon-wip/g15daemon/main.c 2007-01-04 21:34:05 UTC (rev 244)
@@ -71,10 +71,15 @@
(*plugin_listener)((void*)newevent);
/* hack - keyboard events are always sent from the foreground even when they aren't
send keypress event to the OS keyboard_handler plugin */
- if(lcd->masterlist->keyboard_handler != NULL) {
+ if(lcd->masterlist->keyboard_handler != NULL && lcd->masterlist->remote_keyhandler_sock==0) {
int *(*keyboard_handler)(plugin_event_t *newevent) = (void*)lcd->masterlist->keyboard_handler;
(*keyboard_handler)((void*)newevent);
}
+ // if we have a remote keyhandler, send the key. FIXME: we should do this from the net plugin
+ if(lcd->masterlist->remote_keyhandler_sock!=0) {
+ if((send(lcd->masterlist->remote_keyhandler_sock,(void *)&newevent->value,sizeof(newevent->value),0))<0)
+ g15daemon_log(LOG_WARNING,"Error in send: %s\n",strerror(errno));
+ }
if(value & G15_KEY_LIGHT){ // the backlight key was pressed - maintain user-selected state
lcd->masterlist->kb_backlight_state++;
if(lcd->masterlist->kb_backlight_state>2)
@@ -229,7 +234,8 @@
if(displaying->state_changed){
pthread_mutex_lock(&g15lib_mutex);
setLCDContrast(displaying->contrast_state);
- setLEDs(displaying->mkey_state);
+ if(displaying->masterlist->remote_keyhandler_sock==0) // only allow mled control if the macro recorder isnt running
+ setLEDs(displaying->mkey_state);
if(masterlist->kb_backlight_state)
setLCDBrightness(displaying->backlight_state);
else
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2007-01-04 21:33:00 UTC (rev 243)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2007-01-04 21:34:05 UTC (rev 244)
@@ -182,52 +182,52 @@
case G15DAEMON_KEY_HANDLER:
if (value > G15_LED_MR)
value = G15_LED_MR;
- packet[0] = command | value;
+ packet[0] = (unsigned char)command | (unsigned char)value;
retval = send( sock, packet, 1, MSG_OOB );
break;
case G15DAEMON_CONTRAST:
if (value > G15_CONTRAST_HIGH)
value = G15_CONTRAST_HIGH;
- packet[0] = command | value;
+ packet[0] = (unsigned char)command | (unsigned char)value;
send( sock, packet, 1, MSG_OOB );
retval = g15_recv_oob_answer(sock);
break;
case G15DAEMON_BACKLIGHT:
if (value > G15_BRIGHTNESS_BRIGHT)
value = G15_BRIGHTNESS_BRIGHT;
- packet[0] = command | value;
+ packet[0] = (unsigned char)command | (unsigned char)value;
send( sock, packet, 1, MSG_OOB );
retval = g15_recv_oob_answer(sock);
break;
case G15DAEMON_KB_BACKLIGHT:
if (value > G15_BRIGHTNESS_BRIGHT)
value = G15_BRIGHTNESS_BRIGHT;
- packet[0] = command | value;
+ packet[0] = (unsigned char)command | (unsigned char)value;
retval = send( sock, packet, 1, MSG_OOB );
break;
case G15DAEMON_MKEYLEDS:
- packet[0] = command | value;
+ packet[0] = (unsigned char)command|(unsigned char)value;
retval = send( sock, packet, 1, MSG_OOB );
break;
case G15DAEMON_SWITCH_PRIORITIES:
- packet[0] = command;
+ packet[0] = (unsigned char)command;
retval = send( sock, packet, 1, MSG_OOB );
break;
case G15DAEMON_GET_KEYSTATE:{
retval = 0;
- packet[0] = command;
+ packet[0] = (unsigned char)command;
send( sock, packet, 1, MSG_OOB );
recv(sock, &retval, sizeof(retval),0);
break;
}
case G15DAEMON_IS_FOREGROUND:{
- packet[0] = command;
+ packet[0] = (unsigned char)command;
send( sock, packet, 1, MSG_OOB );
retval = g15_recv_oob_answer(sock) - 48;
break;
}
case G15DAEMON_IS_USER_SELECTED:{
- packet[0] = command;
+ packet[0] = (unsigned char)command;
send( sock, packet, 1, MSG_OOB );
retval = g15_recv_oob_answer(sock) - 48;
break;
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2007-01-04 21:33:00 UTC (rev 243)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2007-01-04 21:34:05 UTC (rev 244)
@@ -110,16 +110,16 @@
{ /* client wants to change the M-key backlights */
lcdnode->lcd->mkey_state = msgbuf[0]-0x20;
lcdnode->lcd->state_changed = 1;
- } /*else if (msgbuf[0] & CLIENT_CMD_KEY_HANDLER)
+ //if the client is the keyhandler, allow full, direct control over the mled status
+ if(lcdnode->lcd->masterlist->remote_keyhandler_sock==lcdnode->lcd->connection)
+ setLEDs(msgbuf[0]-0x20);
+ } else if (msgbuf[0] & CLIENT_CMD_KEY_HANDLER)
{
g15daemon_log(LOG_WARNING, "Client is taking over keystate");
- client_handles_keys=1;
- keyhandler = &lcdnode->lcd;
- keyhandler->connection = sock;
-
+ lcdnode->list->remote_keyhandler_sock = sock;
g15daemon_log(LOG_WARNING, "Client has taken over keystate");
- }*/
+ }
}
}
@@ -315,6 +315,8 @@
}
}
exitthread:
+ if(client_lcd->masterlist->remote_keyhandler_sock==client_sock)
+ client_lcd->masterlist->remote_keyhandler_sock=0;
close(client_sock);
free(tmpbuf);
g15daemon_lcdnode_remove(display);
@@ -402,7 +404,7 @@
switch (event->event)
{
case G15_EVENT_KEYPRESS:{
- if(lcd->connection) { /* server client */
+ if(lcd->connection && lcd->masterlist->remote_keyhandler_sock!=lcd->connection) { /* server client */
if((send(lcd->connection,(void *)&event->value,sizeof(event->value),0))<0)
g15daemon_log(LOG_WARNING,"Error in send: %s\n",strerror(errno));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-09-08 05:36:05
|
Revision: 286
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=286&view=rev
Author: mlampard
Date: 2007-09-07 22:36:08 -0700 (Fri, 07 Sep 2007)
Log Message:
-----------
install plugins to libdir/g15daemon/version/plugins
Modified Paths:
--------------
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/plugins/Makefile.am
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2007-09-05 09:36:53 UTC (rev 285)
+++ trunk/g15daemon-wip/configure.in 2007-09-08 05:36:08 UTC (rev 286)
@@ -46,6 +46,9 @@
CPPFLAGS=$CPPFLAGS_save
CPPFLAGS="$CPPFLAGS "'-DDATADIR="\"$(datadir)\""'
+AC_SUBST(G15DAEMON_PLUGIN_DIR,["$libdir/g15daemon/$PACKAGE_VERSION/plugins"])
+CPPFLAGS="$CPPFLAGS "'-DPLUGINDIR=\"$(G15DAEMON_PLUGIN_DIR)\"'
+
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2007-09-05 09:36:53 UTC (rev 285)
+++ trunk/g15daemon-wip/g15daemon/main.c 2007-09-08 05:36:08 UTC (rev 286)
@@ -437,7 +437,7 @@
free (canvas);
uf_write_buf_to_g15(lcdlist->tail->lcd);
- snprintf((char*)location,1024,"%s/%s",DATADIR,"g15daemon/plugins");
+ snprintf((char*)location,1024,"%s",PLUGINDIR);
g15_open_all_plugins(lcdlist,(char*)location);
Modified: trunk/g15daemon-wip/plugins/Makefile.am
===================================================================
--- trunk/g15daemon-wip/plugins/Makefile.am 2007-09-05 09:36:53 UTC (rev 285)
+++ trunk/g15daemon-wip/plugins/Makefile.am 2007-09-08 05:36:08 UTC (rev 286)
@@ -1,6 +1,6 @@
METASOURCES = AUTO
-libdir = /usr/share/g15daemon/plugins
+libdir = @G15DAEMON_PLUGIN_DIR@
AM_CFLAGS = -Wall
lib_LTLIBRARIES =g15plugin_uinput.la g15plugin_tcpserver.la g15plugin_clock.la
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-09-09 04:37:51
|
Revision: 295
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=295&view=rev
Author: mlampard
Date: 2007-09-08 21:37:50 -0700 (Sat, 08 Sep 2007)
Log Message:
-----------
OS-X support from 1.2svn
Modified Paths:
--------------
trunk/g15daemon-wip/AUTHORS
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/Makefile.am
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
Added Paths:
-----------
trunk/g15daemon-wip/contrib/libusbshield.kext/
trunk/g15daemon-wip/contrib/libusbshield.kext/Info.plist
Modified: trunk/g15daemon-wip/AUTHORS
===================================================================
--- trunk/g15daemon-wip/AUTHORS 2007-09-08 14:56:48 UTC (rev 294)
+++ trunk/g15daemon-wip/AUTHORS 2007-09-09 04:37:50 UTC (rev 295)
@@ -1,9 +1,19 @@
Mike Lampard <mla...@us...>
- primary developer
+
Sven Ludwig
- Python bindings
+
James Green
- Documentaion updates
+
Anthony J. Mirabella
- numerous miscellaneous fixes and improvements to just about everything.
+
+Lars Sanders
+- Clock plugin fixes
+
+Fabrizio Sestito
+- changes required to compile on OS-X
+- OS-X kext file
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2007-09-08 14:56:48 UTC (rev 294)
+++ trunk/g15daemon-wip/ChangeLog 2007-09-09 04:37:50 UTC (rev 295)
@@ -87,11 +87,11 @@
1.9.0SVN
- Add plugin API
- partially rewritten event core
-- updated g15daemon_xmms_spectrum plugin with new features, now enabled via configure --enable-xmmsplugin
- xmms devel and glib devel packages will need to be installed prior to attempting ./configure --enable-xmmsplugin
- Plugin is not compiled by default.
+- updated g15daemon_xmms_spectrum plugin with new features, available in trunk/g15daemon_audio_plugins (SVN)
- Clock is now a plugin
- dependency on libdaemon is now removed
- g15daemon is now dependant on libg15render.
- Clock now includes analog clock thanks to Rasta Freak <igo...@zg...>
- Moved g15daemon_xmms_spectrum plugin to separate package
+- Plugins are now installed in ${PREFIX}/lib/g15daemon/${VERSION}/plugins
+- OS-X support thanks to Fabrizio Sestito.
Modified: trunk/g15daemon-wip/Makefile.am
===================================================================
--- trunk/g15daemon-wip/Makefile.am 2007-09-08 14:56:48 UTC (rev 294)
+++ trunk/g15daemon-wip/Makefile.am 2007-09-09 04:37:50 UTC (rev 295)
@@ -13,6 +13,12 @@
imagedir = $(prefix)/share/g15daemon/splash
image_DATA = images/g15logo2.wbmp
+install-data-hook:
+if KEXT_INSTALL
+ cp -Rf $(top_srcdir)/contrib/libusbshield.kext @KEXT_LOCATION@
+ chown -R root:wheel @KEXT_LOCATION@/libusbshield.kext
+endif
+
dist-hook:
rm -rf `find $(distdir)/debian -name .svn`
rm -rf `find $(distdir)/contrib -name .svn`
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2007-09-08 14:56:48 UTC (rev 294)
+++ trunk/g15daemon-wip/configure.in 2007-09-09 04:37:50 UTC (rev 295)
@@ -51,11 +51,14 @@
;;
*darwin*)
AC_DEFINE([OSTYPE_DARWIN], [1],[Target OS is Darwin])
+ AC_SUBST(KEXT_LOCATION,["/System/Library/Extensions/"])
+ install_kext=true
;;
*)
AC_DEFINE([OSTYPE_OTHER], [1],[Target OS is unknown])
;;
esac
+AM_CONDITIONAL([KEXT_INSTALL], [test x$install_kext = xtrue])
CPPFLAGS=$CPPFLAGS_save
CPPFLAGS="$CPPFLAGS "'-DDATADIR="\"$(datadir)\""'
Added: trunk/g15daemon-wip/contrib/libusbshield.kext/Info.plist
===================================================================
--- trunk/g15daemon-wip/contrib/libusbshield.kext/Info.plist (rev 0)
+++ trunk/g15daemon-wip/contrib/libusbshield.kext/Info.plist 2007-09-09 04:37:50 UTC (rev 295)
@@ -0,0 +1,43 @@
+<plist version="1.0">
+ <dict>
+
+ <key>CFBundleDevelopmentRegion</key> <string>English</string>
+ <key>CFBundleGetInfoString</key> <string>Libusb USB device Shield</string>
+ <key>CFBundleIdentifier</key> <string>com.libusb.USB_Shield</string>
+ <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string>
+ <key>CFBundleName</key> <string>Libusb USB device Shield</string>
+ <key>CFBundlePackageType</key> <string>KEXT</string>
+ <key>CFBundleSignature</key> <string>????</string>
+ <key>CFBundleVersion</key> <string>6.0</string>
+ <key>IOKitPersonalities</key>
+ <dict>
+ <key>Logitech G15</key>
+ <dict>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.kernel.iokit</string>
+ <key>IOClass</key>
+ <string>IOService</string>
+ <key>IOProbeScore</key>
+ <integer>106000</integer>
+ <key>IOProviderClass</key>
+ <string>IOUSBInterface</string>
+ <key>bConfigurationValue</key>
+ <integer>1</integer>
+ <key>bInterfaceNumber</key>
+ <integer>0</integer>
+ <key>bcdDevice</key>
+ <integer>259</integer>
+ <key>idProduct</key>
+ <integer>49698</integer>
+ <key>idVendor</key>
+ <integer>1133</integer>
+ </dict>
+ </dict>
+ <key>OSBundleCompatibleVersion</key> <string>1.8</string>
+ <key>OSBundleLibraries</key>
+ <dict>
+ <key>com.apple.kernel.iokit</key> <string>6.0</string>
+ </dict>
+ </dict>
+</plist>
+
Property changes on: trunk/g15daemon-wip/contrib/libusbshield.kext/Info.plist
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2007-09-08 14:56:48 UTC (rev 294)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2007-09-09 04:37:50 UTC (rev 295)
@@ -40,6 +40,7 @@
#include <config.h>
#endif
+#include <pthread.h>
#include <pwd.h>
#include <syslog.h>
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2007-09-08 14:56:48 UTC (rev 294)
+++ trunk/g15daemon-wip/g15daemon/main.c 2007-09-09 04:37:50 UTC (rev 295)
@@ -349,6 +349,21 @@
if(LIBG15_VERSION>=1200)
libg15Debug(g15daemon_debug);
+#ifdef OSTYPE_DARWIN
+ /* OS X: load codeless kext */
+ retval = system("/sbin/kextload " "/System/Library/Extensions/libusbshield.kext");
+
+ if (WIFEXITED(retval)){
+ if (WEXITSTATUS(retval) !=0){
+ g15daemon_log(LOG_ERR,"Unable to load USB shield kext...exiting");
+ exit(1);
+ }
+ } else {
+ daemon_log(LOG_ERR,"Unable to launch kextload...exiting");
+ exit(1);
+ }
+#endif
+
/* init stuff here.. */
if((retval=initLibG15())!=G15_NO_ERROR){
g15daemon_log(LOG_ERR,"Unable to attach to the G15 Keyboard... exiting");
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2007-09-08 14:56:48 UTC (rev 294)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2007-09-09 04:37:50 UTC (rev 295)
@@ -43,6 +43,10 @@
static int leaving;
int server_events(plugin_event_t *myevent);
+#ifndef SO_PRIORITY
+#define SO_PRIORITY 12
+#endif
+
/* tcp server defines */
#define LISTEN_PORT 15550
#define LISTEN_ADDR "127.0.0.1"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-11-29 00:04:26
|
Revision: 322
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=322&view=rev
Author: mlampard
Date: 2007-11-28 16:04:29 -0800 (Wed, 28 Nov 2007)
Log Message:
-----------
keystate needs sending as long, not int.. fixes keystate corruption on net clients.
Modified Paths:
--------------
trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h
trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h 2007-11-29 00:00:29 UTC (rev 321)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h 2007-11-29 00:04:29 UTC (rev 322)
@@ -67,7 +67,7 @@
int g15_recv(int sock, char *buf, unsigned int len);
/* send a command (defined above) to the daemon. any replies from the daemon are returned */
-int g15_send_cmd (int sock, unsigned char command, unsigned char value);
+unsigned long g15_send_cmd (int sock, unsigned char command, unsigned char value);
/* receive an oob byte from the daemon, used internally by g15_send_cmd, but useful elsewhere */
#define G15_FOREGROUND_SENT_OOB 1
int g15_recv_oob_answer(int sock);
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2007-11-29 00:00:29 UTC (rev 321)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2007-11-29 00:04:29 UTC (rev 322)
@@ -177,7 +177,7 @@
return packet[0];
}
-int g15_send_cmd (int sock, unsigned char command, unsigned char value)
+unsigned long g15_send_cmd (int sock, unsigned char command, unsigned char value)
{
int retval;
unsigned char packet[2];
@@ -219,9 +219,9 @@
break;
case G15DAEMON_GET_KEYSTATE:{
retval = 0;
- packet[0] = (unsigned char)command;
- send( sock, packet, 1, MSG_OOB );
- g15_recv(sock, (char*)&retval, sizeof(retval));
+ unsigned long keystate = 0;
+ g15_recv(sock, (char*)&keystate, sizeof(keystate));
+ return keystate;
break;
}
case G15DAEMON_IS_FOREGROUND:{
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2007-11-29 00:00:29 UTC (rev 321)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2007-11-29 00:04:29 UTC (rev 322)
@@ -108,7 +108,8 @@
}
else if (msgbuf[0] & CLIENT_CMD_BACKLIGHT)
{
- send(sock,&lcdnode->lcd->backlight_state,1,MSG_OOB);
+ unsigned char retval = lcdnode->lcd->backlight_state;
+ send(sock,&retval,1,MSG_OOB);
lcdnode->lcd->backlight_state = msgbuf[0]-0x80;
lcdnode->lcd->state_changed = 1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-11-30 03:30:41
|
Revision: 326
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=326&view=rev
Author: mlampard
Date: 2007-11-29 19:30:46 -0800 (Thu, 29 Nov 2007)
Log Message:
-----------
prepare for 1.9.1 bugfix release of g15daemon-wip.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/Makefile.am
trunk/g15daemon-wip/configure.in
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2007-11-30 03:30:05 UTC (rev 325)
+++ trunk/g15daemon-wip/ChangeLog 2007-11-30 03:30:46 UTC (rev 326)
@@ -84,7 +84,7 @@
1.2.5svn -> current
- Add compiletime check for uinput version, should resolve compilation problems on some distro's
- Security improved - the daemon now sets its effective uid to nobody as soon as possible.
-1.9.0SVN
+1.9.0
- Add plugin API
- partially rewritten event core
- updated g15daemon_xmms_spectrum plugin with new features, available in trunk/g15daemon_audio_plugins (SVN)
@@ -93,5 +93,12 @@
- g15daemon is now dependant on libg15render.
- Clock now includes analog clock thanks to Rasta Freak <igo...@zg...>
- Moved g15daemon_xmms_spectrum plugin to separate package
-- Plugins are now installed in ${PREFIX}/lib/g15daemon/${VERSION}/plugins
+1.9.1
+- Plugins are now installed in ${PREFIX}/{${LIBDIR}/g15daemon/${VERSION}/plugins
- OS-X support thanks to Fabrizio Sestito.
+- Bugfix: libg15daemon_client: keypresses were being corrupted.
+- Bugfix: libg15daemon_client: use g15_recv rather than recv.
+- Bugfix: use default scheduling for all threads.
+- Optimisation: minor optimisation of lcd_cycle() code.
+- Security: repair some potential security holes.
+- Bugfix: Backlight status was being mis-applied when cycling screens.
Modified: trunk/g15daemon-wip/Makefile.am
===================================================================
--- trunk/g15daemon-wip/Makefile.am 2007-11-30 03:30:05 UTC (rev 325)
+++ trunk/g15daemon-wip/Makefile.am 2007-11-30 03:30:46 UTC (rev 326)
@@ -23,7 +23,7 @@
rm -rf `find $(distdir)/debian -name .svn`
rm -rf `find $(distdir)/contrib -name .svn`
rm -rf `find $(distdir)/Documentation -name .svn`
- rm -rf `find $(distdir)/lang_bindings -name .svn`
+ rm -rf `find $(distdir)/lang-bindings -name .svn`
rm -rf `find $(distdir)/patches -name .svn`
rm -rf `find $(distdir)/rpm -name .svn`
rm -rf `find $(distdir)/plugins -name .svn`
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2007-11-30 03:30:05 UTC (rev 325)
+++ trunk/g15daemon-wip/configure.in 2007-11-30 03:30:46 UTC (rev 326)
@@ -4,7 +4,7 @@
AC_PREREQ(2.59)
-AC_INIT(g15daemon, [1.9pre], [mla...@us...])
+AC_INIT(g15daemon, [1.9.1], [mla...@us...])
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_TARGET()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-11-30 05:15:01
|
Revision: 329
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=329&view=rev
Author: mlampard
Date: 2007-11-29 21:15:06 -0800 (Thu, 29 Nov 2007)
Log Message:
-----------
fix g15daemon_client manpage. Update Changelog.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/Documentation/g15daemon_client_devel.3
trunk/g15daemon-wip/plugins/g15_plugin_net.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2007-11-30 05:13:55 UTC (rev 328)
+++ trunk/g15daemon-wip/ChangeLog 2007-11-30 05:15:06 UTC (rev 329)
@@ -102,4 +102,9 @@
- Optimisation: minor optimisation of lcd_cycle() code.
- Security: repair some potential security holes.
- Bugfix: Backlight status was being mis-applied when cycling screens.
-- Bugfix: Language bindings were not being distributed.
\ No newline at end of file
+- Bugfix: Language bindings were not being distributed.
+1.9.1->SVN
+- Add exitfunc to net plugin for exit notification.
+- Use pause() instead of sleeping
+- create leaving var as volatile.
+- Add NAME section to g15daemon_client manpages
Modified: trunk/g15daemon-wip/Documentation/g15daemon_client_devel.3
===================================================================
--- trunk/g15daemon-wip/Documentation/g15daemon_client_devel.3 2007-11-30 05:13:55 UTC (rev 328)
+++ trunk/g15daemon-wip/Documentation/g15daemon_client_devel.3 2007-11-30 05:15:06 UTC (rev 329)
@@ -1,4 +1,5 @@
.TH "G15daemon Client Development" "" "1.0" "G15Daemon" ""
+.SH "NAME" g15daemon_client \- G15Daemon Server / Client communication for g15daemon.
.SH "SYNOPSIS"
#include <libg15.h>
.br
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2007-11-30 05:13:55 UTC (rev 328)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2007-11-30 05:15:06 UTC (rev 329)
@@ -40,7 +40,7 @@
#include <libg15.h>
#include <g15daemon.h>
-static int leaving;
+static int leaving = 0;
int server_events(plugin_event_t *myevent);
#ifndef SO_PRIORITY
@@ -427,10 +427,14 @@
return G15_PLUGIN_OK;
}
+static void g15plugin_net_exit() {
+ leaving = 1;
+
+}
/* if no exitfunc or eventhandler, member should be NULL */
plugin_info_t g15plugin_info[] = {
/* TYPE, name, initfunc, updatefreq, exitfunc, eventhandler, initfunc */
- {G15_PLUGIN_LCD_SERVER, "LCDServer" , (void*)lcdserver_thread, 500, NULL, (void*)server_events, NULL},
+ {G15_PLUGIN_LCD_SERVER, "LCDServer" , (void*)lcdserver_thread, 500, g15plugin_net_exit, (void*)server_events, NULL},
{G15_PLUGIN_NONE, "" , NULL, 0, NULL, NULL, NULL}
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|