diff options
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | Makefile.in | 21 | ||||
-rw-r--r-- | aclocal.m4 | 33 | ||||
-rwxr-xr-x | configure | 228 | ||||
-rw-r--r-- | lcd4linux.c | 2 | ||||
-rw-r--r-- | timer_group.c | 261 | ||||
-rw-r--r-- | timer_group.h | 40 | ||||
-rw-r--r-- | widget_bar.c | 4 | ||||
-rw-r--r-- | widget_gpo.c | 4 | ||||
-rw-r--r-- | widget_icon.c | 4 | ||||
-rw-r--r-- | widget_image.c | 4 | ||||
-rw-r--r-- | widget_text.c | 3 | ||||
-rw-r--r-- | widget_timer.c | 4 |
13 files changed, 441 insertions, 168 deletions
diff --git a/Makefile.am b/Makefile.am index bd830e6..68040f1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,6 +34,7 @@ hash.c hash.h \ layout.c layout.h \ pid.c pid.h \ timer.c timer.h \ +timer_group.c timer_group.h \ thread.c thread.h \ udelay.c udelay.h \ qprintf.c qprintf.h \ diff --git a/Makefile.in b/Makefile.in index fbfcfce..e9e4aec 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -64,9 +64,9 @@ am_lcd4linux_OBJECTS = lcd4linux.$(OBJEXT) cfg.$(OBJEXT) \ debug.$(OBJEXT) drv.$(OBJEXT) drv_generic.$(OBJEXT) \ evaluator.$(OBJEXT) property.$(OBJEXT) hash.$(OBJEXT) \ layout.$(OBJEXT) pid.$(OBJEXT) timer.$(OBJEXT) \ - thread.$(OBJEXT) udelay.$(OBJEXT) qprintf.$(OBJEXT) \ - rgb.$(OBJEXT) event.$(OBJEXT) widget.$(OBJEXT) \ - widget_text.$(OBJEXT) widget_bar.$(OBJEXT) \ + timer_group.$(OBJEXT) thread.$(OBJEXT) udelay.$(OBJEXT) \ + qprintf.$(OBJEXT) rgb.$(OBJEXT) event.$(OBJEXT) \ + widget.$(OBJEXT) widget_text.$(OBJEXT) widget_bar.$(OBJEXT) \ widget_icon.$(OBJEXT) widget_keypad.$(OBJEXT) \ widget_timer.$(OBJEXT) widget_gpo.$(OBJEXT) plugin.$(OBJEXT) \ plugin_cfg.$(OBJEXT) plugin_math.$(OBJEXT) \ @@ -262,6 +262,7 @@ hash.c hash.h \ layout.c layout.h \ pid.c pid.h \ timer.c timer.h \ +timer_group.c timer_group.h \ thread.c thread.h \ udelay.c udelay.h \ qprintf.c qprintf.h \ @@ -625,6 +626,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_group.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udelay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widget.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widget_bar.Po@am__quote@ @@ -750,8 +752,7 @@ distdir: $(DISTFILES) fi; \ done -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ + || 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 $(install_sh) -c -m a+r {} {} \; \ @@ -795,17 +796,17 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, +[m4_warning([this file was generated for autoconf 2.64. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -3648,7 +3648,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -4287,7 +4287,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -4908,7 +4908,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler @@ -5192,7 +5192,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -5488,7 +5488,6 @@ dnl Note also adjust exclude_expsyms for C++ above. fi supports_anon_versioning=no case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -5580,7 +5579,7 @@ _LT_EOF _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -7060,7 +7059,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -9067,15 +9066,15 @@ m4_define([lt_dict_filter], # Generated from ltversion.in. -# serial 3017 ltversion.m4 +# serial 3012 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) +m4_define([LT_PACKAGE_VERSION], [2.2.6]) +m4_define([LT_PACKAGE_REVISION], [1.3012]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' +[macro_version='2.2.6' +macro_revision='1.3012' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) @@ -9346,7 +9345,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.11], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -9362,7 +9361,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.11])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -1,14 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for LCD4Linux 0.11.0-SVN. +# Generated by GNU Autoconf 2.64 for LCD4Linux 0.11.0-SVN. # # Report bugs to <lcd4linux-users@lists.sourceforge.net>. # -# # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -678,8 +676,7 @@ fi -test -n "$DJDIR" || exec 7<&0 </dev/null -exec 6>&1 +exec 7<&0 </dev/null 6>&1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -1589,7 +1586,7 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor PKG_CONFIG path to pkg-config utility @@ -1668,7 +1665,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF LCD4Linux configure 0.11.0-SVN -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1715,7 +1712,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval + return $ac_retval } # ac_fn_c_try_compile @@ -1752,7 +1749,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval + return $ac_retval } # ac_fn_c_try_cpp @@ -1798,7 +1795,7 @@ fi # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval + return $ac_retval } # ac_fn_c_try_link @@ -2000,7 +1997,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval + return $ac_retval } # ac_fn_c_try_run @@ -2093,7 +2090,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by LCD4Linux $as_me 0.11.0-SVN, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ @@ -2346,7 +2343,7 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + if test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 @@ -2355,9 +2352,9 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in @@ -2777,7 +2774,6 @@ IFS=$as_save_IFS fi - test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else @@ -2785,6 +2781,7 @@ fi # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi @@ -3267,30 +3264,32 @@ $as_echo "$ac_try_echo"; } >&5 ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 + rm -f conftest.er1 conftest.err fi - rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include <stdio.h> int main () { +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3352,10 +3351,10 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 @@ -3363,18 +3362,51 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" @@ -3407,72 +3439,13 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi -rm -f conftest conftest$ac_cv_exeext +rm -f conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdio.h> -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : @@ -4805,7 +4778,7 @@ $as_echo "Please note that some screen refreshs may fail" >&6; } $as_echo_n "checking for ncurses version... " >&6; } ncurses_version=unknown cat > conftest.$ac_ext <<EOF -#line 4808 "configure" +#line 4781 "configure" #include "confdefs.h" #ifdef RENAMED_NCURSES #include <curses.h> @@ -10274,8 +10247,8 @@ cat >>confdefs.h <<_ACEOF _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 +$as_echo_n "checking whether lstat dereferences a symlink specified with a trailing slash... " >&6; } if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -10292,7 +10265,7 @@ int main () { struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by POSIX. + /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; @@ -10327,7 +10300,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF -if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then +if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" @@ -11088,7 +11061,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by LCD4Linux $as_me 0.11.0-SVN, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11128,7 +11101,6 @@ Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -11151,11 +11123,10 @@ Report bugs to <lcd4linux-users@lists.sourceforge.net>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ LCD4Linux config.status 0.11.0-SVN -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" +configured by $0, generated by GNU Autoconf 2.64, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation @@ -11193,8 +11164,6 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) @@ -11382,7 +11351,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\)..*/\1/ +s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -11396,7 +11365,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\)..*/\1/ +s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -12023,8 +11992,8 @@ esac -macro_version='2.2.6b' -macro_revision='1.3017' +macro_version='2.2.6' +macro_revision='1.3012' @@ -12494,13 +12463,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:12497: $ac_compile\"" >&5) + (eval echo "\"\$as_me:12466: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:12500: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:12469: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:12503: output\"" >&5) + (eval echo "\"\$as_me:12472: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -12955,7 +12924,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -13694,7 +13663,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 13697 "configure"' > conftest.$ac_ext + echo '#line 13666 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -14952,11 +14921,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14955: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14924: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14959: \$? = $ac_status" >&5 + echo "$as_me:14928: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15121,7 +15090,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -15291,11 +15260,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15294: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15263: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15298: \$? = $ac_status" >&5 + echo "$as_me:15267: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15396,11 +15365,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15399: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15368: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15403: \$? = $ac_status" >&5 + echo "$as_me:15372: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15451,11 +15420,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15454: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15423: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15458: \$? = $ac_status" >&5 + echo "$as_me:15427: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15594,7 +15563,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie fi supports_anon_versioning=no case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -15686,7 +15654,7 @@ _LT_EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -17148,7 +17116,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -17835,7 +17803,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17838 "configure" +#line 17806 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -17931,7 +17899,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17934 "configure" +#line 17902 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/lcd4linux.c b/lcd4linux.c index 7a48c7c..45b02e9 100644 --- a/lcd4linux.c +++ b/lcd4linux.c @@ -45,6 +45,7 @@ #include "udelay.h" #include "drv.h" #include "timer.h" +#include "timer_group.h" #include "layout.h" #include "plugin.h" #include "thread.h" @@ -413,6 +414,7 @@ int main(int argc, char *argv[]) pid_exit(pidfile); cfg_exit(); plugin_exit(); + timer_exit_group(); timer_exit(); if (got_signal == SIGHUP) { diff --git a/timer_group.c b/timer_group.c new file mode 100644 index 0000000..0a72e84 --- /dev/null +++ b/timer_group.c @@ -0,0 +1,261 @@ +/* $Id$ + * $URL$ + * + * generic grouping of widget timers that have been set to the same + * update interval, thus allowing synchronized updates + * + * Copyright (C) 2010 Martin Zuther <code@mzuther.de> + * + * Based on "timer.c" which is + * Copyright (C) 2003, 2004 Michael Reinelt <michael@reinelt.co.at> + * Copyright (C) 2004 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +/* + * exported functions: + * + * int timer_add_group(void (*callback) (void *data), const int interval) + * make sure that generic timer exists for given update interval + * + * int timer_remove_group(void (*callback) (void *data), const int interval) + * remove generic timer for given update interval + * + * void timer_process_group(void *data) + * process all widgets of a given update interval (*data) + * + * void timer_exit_group(void) + * release all timers and free reserved memory + * + * int timer_add_widget(void (*callback) (void *data), void *data, const int interval, const int one_shot) + * add widget to group of the given update interval (creates a new group if + * necessary) + * + * int timer_remove_widget(void (*callback) (void *data), void *data) + * remove widget from group of the given update interval (als removes emtpy + * groups) + * + */ + + +#include "config.h" + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +#include "debug.h" +#include "cfg.h" +#include "timer.h" +#include "timer_group.h" + +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif + + +/* contains the actual timers, one for each update interval */ +typedef struct TIMER_GROUP { + void (*callback) (void *data); + int *interval; + int active; +} TIMER_GROUP; + +TIMER_GROUP *GroupTimers = NULL; +int nGroupTimers = 0; + +/* contains callback and data for each widget */ +typedef struct SINGLE_TIMER { + void (*callback) (void *data); + void *data; + int interval; + int one_shot; + int active; +} SINGLE_TIMER; + +SINGLE_TIMER *SingleTimers = NULL; +int nSingleTimers = 0; + +int timer_add_group(void (*callback) (void *data), const int interval) +{ + int group; + + /* check whether timer exists for given update interval */ + for (group = 0; group < nGroupTimers; group++) { + if (*GroupTimers[group].interval == interval) + return 0; + } + + /* otherwise look for a free group */ + for (group = 0; group < nGroupTimers; group++) { + if (GroupTimers[group].active == 0) + break; + } + + /* none found, allocate a new group */ + if (group >= nGroupTimers) { + nGroupTimers++; + GroupTimers = realloc(GroupTimers, nGroupTimers * sizeof(*GroupTimers)); + + /* also allocate memory for callback data */ + GroupTimers[group].interval = malloc(sizeof(int)); + } + + /* initialize group */ + info("Creating new timer group (%d ms)", interval); + + GroupTimers[group].callback = callback; + *GroupTimers[group].interval = interval; + GroupTimers[group].active = 1; + + /* finally, request a generic timer */ + return timer_add(GroupTimers[group].callback, GroupTimers[group].interval, interval, 0); +} + +int timer_remove_group(void (*callback) (void *data), const int interval) +{ + int group; + + /* look for group with given callback function and update interval */ + for (group = 0; group < nGroupTimers; group++) { + if (GroupTimers[group].callback == callback && *GroupTimers[group].interval == interval + && GroupTimers[group].active) { + /* inactivate group */ + GroupTimers[group].active = 0; + + /* remove generic timer */ + return timer_remove(GroupTimers[group].callback, GroupTimers[group].interval); + } + } + return -1; +} + +void timer_process_group(void *data) +{ + int slot; + int *interval = (int *) data; + + /* sanity check */ + if (nSingleTimers == 0) { + error("huh? not even a single widget timer to process? dazed and confused..."); + return; + } + + /* process every (active) widget associated with given update interval */ + for (slot = 0; slot < nSingleTimers; slot++) { + if (SingleTimers[slot].active == 0) + continue; + + if (SingleTimers[slot].interval == *interval) { + /* call one-shot timers only once */ + if (SingleTimers[slot].one_shot) + SingleTimers[slot].active = 0; + /* execute callback function */ + if (SingleTimers[slot].callback != NULL) + SingleTimers[slot].callback(SingleTimers[slot].data); + } + } +} + +int timer_add_widget(void (*callback) (void *data), void *data, const int interval, const int one_shot) +{ + int slot; + + /* make sure that group for update interval exists or can be created */ + if (timer_add_group(timer_process_group, interval) != 0) + return -1; + + /* find a free slot for callback data */ + for (slot = 0; slot < nSingleTimers; slot++) { + if (SingleTimers[slot].active == 0) + break; + } + + /* none found, allocate a new slot */ + if (slot >= nSingleTimers) { + nSingleTimers++; + SingleTimers = realloc(SingleTimers, nSingleTimers * sizeof(*SingleTimers)); + } + + /* fill slot with callback data */ + SingleTimers[slot].callback = callback; + SingleTimers[slot].data = data; + SingleTimers[slot].interval = interval; + SingleTimers[slot].one_shot = one_shot; + SingleTimers[slot].active = 1; + + return 0; +} + +int timer_remove_widget(void (*callback) (void *data), void *data) +{ + int slot, interval; + + interval = 0; + /* look for (active) widget with given callback function and data */ + for (slot = 0; slot < nSingleTimers; slot++) { + if (SingleTimers[slot].callback == callback && SingleTimers[slot].data == data && SingleTimers[slot].active) { + /* deactivate widget */ + SingleTimers[slot].active = 0; + interval = SingleTimers[slot].interval; + break; + } + } + + /* signal an error if no matching widget was found */ + if (interval == 0) + return -1; + + /* look for other widgets with given update interval */ + for (slot = 0; slot < nSingleTimers; slot++) { + if (SingleTimers[slot].active == 0) + continue; + /* at least one other widget with given update interval exists */ + if (SingleTimers[slot].interval == interval) + return 0; + } + + /* remove group with given update interval */ + return timer_remove_group(timer_process_group, interval); +} + +void timer_exit_group(void) +{ + int group; + + /* remove generic timer and free memory for callback data */ + for (group = 0; group < nGroupTimers; group++) { + timer_remove(GroupTimers[group].callback, GroupTimers[group].interval); + free(GroupTimers[group].interval); + } + + /* free memory for groups */ + nGroupTimers = 0; + + if (GroupTimers != NULL) { + free(GroupTimers);; + GroupTimers = NULL; + } + + /* free memory for widget callback data */ + nSingleTimers = 0; + + if (SingleTimers != NULL) { + free(SingleTimers);; + SingleTimers = NULL; + } +} diff --git a/timer_group.h b/timer_group.h new file mode 100644 index 0000000..36d9057 --- /dev/null +++ b/timer_group.h @@ -0,0 +1,40 @@ +/* $Id$ + * $URL$ + * + * generic grouping of widget timers that have been set to the same + * update interval, thus allowing synchronized updates + * + * Copyright (C) 2010 Martin Zuther <code@mzuther.de> + * Copyright (C) 2010 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> + * + * This file is part of LCD4Linux. + * + * LCD4Linux is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * LCD4Linux is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + + +#ifndef _TIMER_GROUP_H_ +#define _TIMER_GROUP_H_ + +int timer_add_group(void (*callback) (void *data), const int interval); +int timer_remove_group(void (*callback) (void *data), const int interval); +void timer_process_group(void *data); +void timer_exit_group(void); + +int timer_add_widget(void (*callback) (void *data), void *data, const int interval, const int one_shot); +int timer_remove_widget(void (*callback) (void *data), void *data); + +#endif diff --git a/widget_bar.c b/widget_bar.c index 7558550..bb03eab 100644 --- a/widget_bar.c +++ b/widget_bar.c @@ -41,7 +41,7 @@ #include "debug.h" #include "cfg.h" #include "property.h" -#include "timer.h" +#include "timer_group.h" #include "widget.h" #include "widget_bar.h" @@ -204,7 +204,7 @@ int widget_bar_init(WIDGET * Self) free(section); Self->data = Bar; - timer_add(widget_bar_update, Self, Bar->update, 0); + timer_add_widget(widget_bar_update, Self, Bar->update, 0); return 0; } diff --git a/widget_gpo.c b/widget_gpo.c index 1a0d52d..a47a8d5 100644 --- a/widget_gpo.c +++ b/widget_gpo.c @@ -41,7 +41,7 @@ #include "debug.h" #include "cfg.h" #include "property.h" -#include "timer.h" +#include "timer_group.h" #include "widget.h" #include "widget_gpo.h" @@ -65,7 +65,7 @@ void widget_gpo_update(void *Self) /* add a new one-shot timer */ if (P2N(&GPO->update) > 0) { - timer_add(widget_gpo_update, Self, P2N(&GPO->update), 1); + timer_add_widget(widget_gpo_update, Self, P2N(&GPO->update), 1); } } diff --git a/widget_icon.c b/widget_icon.c index fe77b47..527bc62 100644 --- a/widget_icon.c +++ b/widget_icon.c @@ -42,7 +42,7 @@ #include "cfg.h" #include "qprintf.h" #include "property.h" -#include "timer.h" +#include "timer_group.h" #include "widget.h" #include "widget_icon.h" @@ -121,7 +121,7 @@ void widget_icon_update(void *Self) /* add a new one-shot timer */ if (P2N(&Icon->speed) > 0) { - timer_add(widget_icon_update, Self, P2N(&Icon->speed), 1); + timer_add_widget(widget_icon_update, Self, P2N(&Icon->speed), 1); } } diff --git a/widget_image.c b/widget_image.c index 688f6c8..8d997a9 100644 --- a/widget_image.c +++ b/widget_image.c @@ -59,7 +59,7 @@ #include "cfg.h" #include "qprintf.h" #include "property.h" -#include "timer.h" +#include "timer_group.h" #include "widget.h" #include "widget_image.h" #include "rgb.h" @@ -195,7 +195,7 @@ static void widget_image_update(void *Self) /* add a new one-shot timer */ if (P2N(&Image->update) > 0) { - timer_add(widget_image_update, Self, P2N(&Image->update), 1); + timer_add_widget(widget_image_update, Self, P2N(&Image->update), 1); } } diff --git a/widget_text.c b/widget_text.c index c793f82..7c1ee7a 100644 --- a/widget_text.c +++ b/widget_text.c @@ -45,6 +45,7 @@ #include "evaluator.h" #include "property.h" #include "timer.h" +#include "timer_group.h" #include "event.h" #include "widget.h" #include "widget_text.h" @@ -398,7 +399,7 @@ int widget_text_init(WIDGET * Self) Self->y2 = Self->row; /* add update timer, use one-shot if 'update' is zero */ - timer_add(widget_text_update, Self, Text->update, Text->update == 0); + timer_add_widget(widget_text_update, Self, Text->update, Text->update == 0); /* a marquee scroller has its own timer and callback */ if (Text->align == ALIGN_MARQUEE || Text->align == ALIGN_AUTOMATIC || Text->align == ALIGN_PINGPONG_LEFT diff --git a/widget_timer.c b/widget_timer.c index 10ba86d..dec7562 100644 --- a/widget_timer.c +++ b/widget_timer.c @@ -42,7 +42,7 @@ #include "cfg.h" #include "qprintf.h" #include "property.h" -#include "timer.h" +#include "timer_group.h" #include "widget.h" #include "widget_timer.h" @@ -72,7 +72,7 @@ void widget_timer_update(void *Self) } /* add a new one-shot timer */ - timer_add(widget_timer_update, Self, update, 1); + timer_add_widget(widget_timer_update, Self, update, 1); } |