diff options
| author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-01-30 20:57:56 +0000 | 
|---|---|---|
| committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-01-30 20:57:56 +0000 | 
| commit | f040b602703f9aa2849384c9116413f9aecf04b4 (patch) | |
| tree | 6577cd2c6172763a0223ed7bb933657b1c5b5436 | |
| parent | 59a314fd82aefb99aea2e3956248a928f55fa5e4 (diff) | |
| download | lcd4linux-f040b602703f9aa2849384c9116413f9aecf04b4.tar.gz | |
[lcd4linux @ 2004-01-30 20:57:55 by reinelt]
HD44780 patch from Martin Hejl
dmalloc integrated
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@348 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
| -rw-r--r-- | BeckmannEgle.c | 10 | ||||
| -rw-r--r-- | Crystalfontz.c | 10 | ||||
| -rw-r--r-- | Cwlinux.c | 10 | ||||
| -rw-r--r-- | HD44780.c | 10 | ||||
| -rw-r--r-- | M50530.c | 10 | ||||
| -rw-r--r-- | MatrixOrbital.c | 10 | ||||
| -rw-r--r-- | MilfordInstruments.c | 10 | ||||
| -rw-r--r-- | PalmPilot.c | 10 | ||||
| -rw-r--r-- | Raster.c | 10 | ||||
| -rw-r--r-- | T6963.c | 10 | ||||
| -rw-r--r-- | USBLCD.c | 10 | ||||
| -rw-r--r-- | XWindow.c | 10 | ||||
| -rw-r--r-- | aclocal.m4 | 19 | ||||
| -rw-r--r-- | bar.c | 10 | ||||
| -rw-r--r-- | cfg.c | 36 | ||||
| -rw-r--r-- | cfg.h | 8 | ||||
| -rw-r--r-- | config.h.in | 3 | ||||
| -rwxr-xr-x | configure | 87 | ||||
| -rw-r--r-- | configure.in | 3 | ||||
| -rw-r--r-- | drv_Crystalfontz.c | 60 | ||||
| -rw-r--r-- | drv_generic_text.c | 10 | ||||
| -rw-r--r-- | evaluator.c | 17 | ||||
| -rw-r--r-- | filter.c | 10 | ||||
| -rw-r--r-- | hash.c | 10 | ||||
| -rw-r--r-- | icon.c | 10 | ||||
| -rw-r--r-- | layout.c | 10 | ||||
| -rw-r--r-- | lcd4linux.c | 15 | ||||
| -rw-r--r-- | lcd4linux.conf.sample | 13 | ||||
| -rw-r--r-- | mail2.c | 10 | ||||
| -rw-r--r-- | pixmap.c | 10 | ||||
| -rw-r--r-- | plugin_cfg.c | 10 | ||||
| -rw-r--r-- | plugin_i2c_sensors.c | 10 | ||||
| -rw-r--r-- | plugin_sample.c | 10 | ||||
| -rw-r--r-- | timer.c | 10 | ||||
| -rw-r--r-- | widget.c | 10 | ||||
| -rw-r--r-- | widget_bar.c | 10 | ||||
| -rw-r--r-- | widget_icon.c | 10 | ||||
| -rw-r--r-- | widget_text.c | 10 | 
38 files changed, 472 insertions, 69 deletions
| diff --git a/BeckmannEgle.c b/BeckmannEgle.c index 806364a..1969d78 100644 --- a/BeckmannEgle.c +++ b/BeckmannEgle.c @@ -1,4 +1,4 @@ -/* $Id: BeckmannEgle.c,v 1.19 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: BeckmannEgle.c,v 1.20 2004/01/30 20:57:55 reinelt Exp $   *   * driver for Beckmann+Egle mini terminals   * @@ -22,6 +22,10 @@   *   *   * $Log: BeckmannEgle.c,v $ + * Revision 1.20  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.19  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -113,6 +117,10 @@  #include "bar.h"  #include "icon.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  #define XRES 5  #define YRES 8  #define CHARS 8 diff --git a/Crystalfontz.c b/Crystalfontz.c index 4bc2d32..9b9dbc7 100644 --- a/Crystalfontz.c +++ b/Crystalfontz.c @@ -1,4 +1,4 @@ -/* $Id: Crystalfontz.c,v 1.19 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: Crystalfontz.c,v 1.20 2004/01/30 20:57:55 reinelt Exp $   *   * driver for display modules from Crystalfontz   * @@ -21,6 +21,10 @@   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   *   * $Log: Crystalfontz.c,v $ + * Revision 1.20  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.19  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -101,6 +105,10 @@  #include "bar.h"  #include "icon.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  #define XRES 6  #define YRES 8  #define CHARS 8 @@ -1,4 +1,4 @@ -/* $Id: Cwlinux.c,v 1.18 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: Cwlinux.c,v 1.19 2004/01/30 20:57:55 reinelt Exp $   *   * driver for Cwlinux serial display modules   * @@ -22,6 +22,10 @@   *   *   * $Log: Cwlinux.c,v $ + * Revision 1.19  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.18  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -103,6 +107,10 @@  #include "bar.h"  #include "icon.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  #define CHARS 8  static LCD Lcd; @@ -1,4 +1,4 @@ -/* $Id: HD44780.c,v 1.49 2004/01/09 04:16:06 reinelt Exp $ +/* $Id: HD44780.c,v 1.50 2004/01/30 20:57:55 reinelt Exp $   *   * driver for display modules based on the HD44780 chip   * @@ -28,6 +28,10 @@   *   *   * $Log: HD44780.c,v $ + * Revision 1.50  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.49  2004/01/09 04:16:06  reinelt   * added 'section' argument to cfg_get(), but NULLed it on all calls by now.   * @@ -239,6 +243,10 @@  #include "parport.h"  #include "udelay.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  #define XRES 5  #define YRES 8  #define CHARS 8 @@ -1,4 +1,4 @@ -/* $Id: M50530.c,v 1.17 2004/01/09 04:16:06 reinelt Exp $ +/* $Id: M50530.c,v 1.18 2004/01/30 20:57:55 reinelt Exp $   *   * driver for display modules based on the M50530 chip   * @@ -22,6 +22,10 @@   *   *   * $Log: M50530.c,v $ + * Revision 1.18  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.17  2004/01/09 04:16:06  reinelt   * added 'section' argument to cfg_get(), but NULLed it on all calls by now.   * @@ -100,6 +104,10 @@  #include "parport.h"  #include "udelay.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  #define XRES 5  #define YRES 8  #define CHARS 8 diff --git a/MatrixOrbital.c b/MatrixOrbital.c index b69cc3d..2035283 100644 --- a/MatrixOrbital.c +++ b/MatrixOrbital.c @@ -1,4 +1,4 @@ -/* $Id: MatrixOrbital.c,v 1.51 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: MatrixOrbital.c,v 1.52 2004/01/30 20:57:55 reinelt Exp $   *   * driver for Matrix Orbital serial display modules   * @@ -22,6 +22,10 @@   *   *   * $Log: MatrixOrbital.c,v $ + * Revision 1.52  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.51  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -244,6 +248,10 @@  #include "bar.h"  #include "icon.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  #define XRES 5  #define YRES 8  #define CHARS 8 diff --git a/MilfordInstruments.c b/MilfordInstruments.c index 577d15d..e2fa294 100644 --- a/MilfordInstruments.c +++ b/MilfordInstruments.c @@ -1,4 +1,4 @@ -/* $Id: MilfordInstruments.c,v 1.6 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: MilfordInstruments.c,v 1.7 2004/01/30 20:57:55 reinelt Exp $   *   * driver for Milford Instruments 'BPK' piggy-back serial interface board   * for standard Hitachi 44780 compatible lcd modules. @@ -24,6 +24,10 @@   *   *   * $Log: MilfordInstruments.c,v $ + * Revision 1.7  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.6  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -66,6 +70,10 @@  #include "bar.h"  #include "icon.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  #define XRES 5  #define YRES 8  #define CHARS 8 diff --git a/PalmPilot.c b/PalmPilot.c index 8fd9394..c0c6bcf 100644 --- a/PalmPilot.c +++ b/PalmPilot.c @@ -1,4 +1,4 @@ -/* $Id: PalmPilot.c,v 1.16 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: PalmPilot.c,v 1.17 2004/01/30 20:57:55 reinelt Exp $   *   * driver for 3Com Palm Pilot   * @@ -22,6 +22,10 @@   *   *   * $Log: PalmPilot.c,v $ + * Revision 1.17  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.16  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -111,6 +115,10 @@  #include "icon.h"  #include "pixmap.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  static LCD Lcd;  static char *Port=NULL; @@ -1,4 +1,4 @@ -/* $Id: Raster.c,v 1.29 2004/01/09 04:16:06 reinelt Exp $ +/* $Id: Raster.c,v 1.30 2004/01/30 20:57:55 reinelt Exp $   *   * driver for raster formats   * @@ -22,6 +22,10 @@   *   *   * $Log: Raster.c,v $ + * Revision 1.30  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.29  2004/01/09 04:16:06  reinelt   * added 'section' argument to cfg_get(), but NULLed it on all calls by now.   * @@ -172,6 +176,10 @@  #include "icon.h"  #include "pixmap.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  static LCD Lcd;  static int pixel=-1; @@ -1,4 +1,4 @@ -/* $Id: T6963.c,v 1.14 2004/01/09 04:16:06 reinelt Exp $ +/* $Id: T6963.c,v 1.15 2004/01/30 20:57:55 reinelt Exp $   *   * driver for display modules based on the Toshiba T6963 chip   * @@ -22,6 +22,10 @@   *   *   * $Log: T6963.c,v $ + * Revision 1.15  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.14  2004/01/09 04:16:06  reinelt   * added 'section' argument to cfg_get(), but NULLed it on all calls by now.   * @@ -93,6 +97,10 @@  #include "udelay.h"  #include "pixmap.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  #define XRES 6  #define YRES 8 @@ -1,4 +1,4 @@ -/* $Id: USBLCD.c,v 1.20 2004/01/09 04:16:06 reinelt Exp $ +/* $Id: USBLCD.c,v 1.21 2004/01/30 20:57:55 reinelt Exp $   *   * Driver for USBLCD (see http://www.usblcd.de)   * @@ -25,6 +25,10 @@   *   *   * $Log: USBLCD.c,v $ + * Revision 1.21  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.20  2004/01/09 04:16:06  reinelt   * added 'section' argument to cfg_get(), but NULLed it on all calls by now.   * @@ -120,6 +124,10 @@  #include "icon.h"  #include "bar.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  #define GET_HARD_VERSION	1  #define GET_DRV_VERSION		2 @@ -1,4 +1,4 @@ -/* $Id: XWindow.c,v 1.39 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: XWindow.c,v 1.40 2004/01/30 20:57:55 reinelt Exp $   *   * X11 Driver for LCD4Linux    * @@ -22,6 +22,10 @@   *   *   * $Log: XWindow.c,v $ + * Revision 1.40  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.39  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -190,6 +194,10 @@  #include        "icon.h"  #include	"pixmap.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  /* glibc 2.1 requires defining semun ourselves */  #ifdef _SEM_SEMUN_UNDEFINED @@ -6883,3 +6883,22 @@ SED=$lt_cv_path_SED  AC_MSG_RESULT([$SED])  ]) + +# serial 1 + +AC_DEFUN([AM_WITH_DMALLOC], +[AC_MSG_CHECKING(if malloc debugging is wanted) +AC_ARG_WITH(dmalloc, +[  --with-dmalloc          use dmalloc, as in +                          ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz], +[if test "$withval" = yes; then +  AC_MSG_RESULT(yes) +  AC_DEFINE(WITH_DMALLOC,1, +            [Define if using the dmalloc debugging malloc package]) +  LIBS="$LIBS -ldmalloc" +  LDFLAGS="$LDFLAGS -g" +else +  AC_MSG_RESULT(no) +fi], [AC_MSG_RESULT(no)]) +]) + @@ -1,4 +1,4 @@ -/* $Id: bar.c,v 1.10 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: bar.c,v 1.11 2004/01/30 20:57:55 reinelt Exp $   *   * generic bar handling   * @@ -22,6 +22,10 @@   *   *   * $Log: bar.c,v $ + * Revision 1.11  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.10  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -80,6 +84,10 @@  #include "bar.h"  #include "debug.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  static int ROWS=0;  static int COLS=0; @@ -1,4 +1,4 @@ -/* $Id: cfg.c,v 1.31 2004/01/29 04:40:02 reinelt Exp $^ +/* $Id: cfg.c,v 1.32 2004/01/30 20:57:55 reinelt Exp $^   *   * config file stuff   * @@ -23,6 +23,10 @@   *   *   * $Log: cfg.c,v $ + * Revision 1.32  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.31  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -219,6 +223,10 @@  #include "evaluator.h"  #include "cfg.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  typedef struct {    char *key;    char *val; @@ -335,7 +343,7 @@ static void cfg_add (char *section, char *key, char *val, int lock)    nConfig++;    Config=realloc(Config, nConfig*sizeof(ENTRY)); -  Config[nConfig-1].key=strdup(buffer); +  Config[nConfig-1].key=buffer;    Config[nConfig-1].val=dequote(strdup(val));    Config[nConfig-1].lock=lock; @@ -700,6 +708,29 @@ char *l4l_cfg_source (void)  } +int l4l_cfg_exit (void) +{ +  int i; +   +  for (i=0; i<nConfig; i++) { +    if (Config[i].key) free (Config[i].key); +    if (Config[i].val) free (Config[i].val); +  } +   +  if (Config) { +    free (Config); +    Config=NULL; +  } + +  if (Config_File) { +    free (Config_File); +    Config_File=NULL; +  } +   +  return 0; +} + +  int   (*cfg_init)    (char *source)                           = l4l_cfg_init;  char *(*cfg_source)  (void)                                   = l4l_cfg_source;  int   (*cfg_cmd)     (char *arg)                              = l4l_cfg_cmd; @@ -708,3 +739,4 @@ char *(*cfg_get_raw) (char *section, char *key, char *defval) = l4l_cfg_get_raw;  char *(*cfg_get)     (char *section, char *key, char *defval) = l4l_cfg_get;  int   (*cfg_number)  (char *section, char *key, int   defval,   		      int min, int max, int *value)           = l4l_cfg_number; +int   (*cfg_exit)    (void)                                   = l4l_cfg_exit; @@ -1,4 +1,4 @@ -/* $Id: cfg.h,v 1.9 2004/01/14 11:33:00 reinelt Exp $ +/* $Id: cfg.h,v 1.10 2004/01/30 20:57:55 reinelt Exp $   *   * config file stuff   * @@ -22,6 +22,10 @@   *   *   * $Log: cfg.h,v $ + * Revision 1.10  2004/01/30 20:57:55  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.9  2004/01/14 11:33:00  reinelt   * new plugin 'uname' which does what it's called   * text widget nearly finished @@ -73,6 +77,7 @@ extern char *(*cfg_get_raw) (char *section, char *key, char *defval);  extern char *(*cfg_get)     (char *section, char *key, char *defval);  extern int   (*cfg_number)  (char *section, char *key, int   defval,   			     int min, int max, int *value); +extern int   (*cfg_exit)    (void);  int   l4l_cfg_init    (char *file);  char *l4l_cfg_source  (void); @@ -82,5 +87,6 @@ char *l4l_cfg_get_raw (char *section, char *key, char *defval);  char *l4l_cfg_get     (char *section, char *key, char *defval);  int   l4l_cfg_number  (char *section, char *key, int   defval,   		       int min, int max, int *value); +int   l4l_cfg_exit    (void);  #endif diff --git a/config.h.in b/config.h.in index 32e14b2..bb8b87f 100644 --- a/config.h.in +++ b/config.h.in @@ -281,6 +281,9 @@  /* junk */  #undef WITH_CWLINUX +/* Define if using the dmalloc debugging malloc package */ +#undef WITH_DMALLOC +  /* junk */  #undef WITH_HD44780 @@ -1047,6 +1047,8 @@ Optional Packages:                            both]    --with-tags[=TAGS]                            include additional configurations [automatic] +  --with-dmalloc          use dmalloc, as in +                          ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz    --with-sco              Use this to turn on SCO-specific code    --with-sunos-curses     Used to force SunOS 4.x curses    --with-osf1-curses      Used to force OSF/1 curses @@ -4044,7 +4046,7 @@ ia64-*-hpux*)    ;;  *-*-irix6*)    # Find out which ABI we are using. -  echo '#line 4047 "configure"' > conftest.$ac_ext +  echo '#line 4049 "configure"' > conftest.$ac_ext    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5    (eval $ac_compile) 2>&5    ac_status=$? @@ -4914,7 +4916,7 @@ fi  # Provide some information about the compiler. -echo "$as_me:4917:" \ +echo "$as_me:4919:" \       "checking for Fortran 77 compiler version" >&5  ac_compiler=`set X $ac_compile; echo $2`  { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 @@ -5946,11 +5948,11 @@ else     -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:5949: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:5951: $lt_compile\"" >&5)     (eval "$lt_compile" 2>conftest.err)     ac_status=$?     cat conftest.err >&5 -   echo "$as_me:5953: \$? = $ac_status" >&5 +   echo "$as_me:5955: \$? = $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 @@ -6179,11 +6181,11 @@ else     -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:6182: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:6184: $lt_compile\"" >&5)     (eval "$lt_compile" 2>conftest.err)     ac_status=$?     cat conftest.err >&5 -   echo "$as_me:6186: \$? = $ac_status" >&5 +   echo "$as_me:6188: \$? = $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 @@ -6246,11 +6248,11 @@ else     -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:6249: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:6251: $lt_compile\"" >&5)     (eval "$lt_compile" 2>out/conftest.err)     ac_status=$?     cat out/conftest.err >&5 -   echo "$as_me:6253: \$? = $ac_status" >&5 +   echo "$as_me:6255: \$? = $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 @@ -8421,7 +8423,7 @@ else    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2    lt_status=$lt_dlunknown    cat > conftest.$ac_ext <<EOF -#line 8424 "configure" +#line 8426 "configure"  #include "confdefs.h"  #if HAVE_DLFCN_H @@ -8519,7 +8521,7 @@ else    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2    lt_status=$lt_dlunknown    cat > conftest.$ac_ext <<EOF -#line 8522 "configure" +#line 8524 "configure"  #include "confdefs.h"  #if HAVE_DLFCN_H @@ -10696,11 +10698,11 @@ else     -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:10699: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:10701: $lt_compile\"" >&5)     (eval "$lt_compile" 2>conftest.err)     ac_status=$?     cat conftest.err >&5 -   echo "$as_me:10703: \$? = $ac_status" >&5 +   echo "$as_me:10705: \$? = $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 @@ -10763,11 +10765,11 @@ else     -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:10766: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:10768: $lt_compile\"" >&5)     (eval "$lt_compile" 2>out/conftest.err)     ac_status=$?     cat out/conftest.err >&5 -   echo "$as_me:10770: \$? = $ac_status" >&5 +   echo "$as_me:10772: \$? = $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 @@ -12117,7 +12119,7 @@ else    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2    lt_status=$lt_dlunknown    cat > conftest.$ac_ext <<EOF -#line 12120 "configure" +#line 12122 "configure"  #include "confdefs.h"  #if HAVE_DLFCN_H @@ -12215,7 +12217,7 @@ else    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2    lt_status=$lt_dlunknown    cat > conftest.$ac_ext <<EOF -#line 12218 "configure" +#line 12220 "configure"  #include "confdefs.h"  #if HAVE_DLFCN_H @@ -13042,11 +13044,11 @@ else     -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:13045: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:13047: $lt_compile\"" >&5)     (eval "$lt_compile" 2>conftest.err)     ac_status=$?     cat conftest.err >&5 -   echo "$as_me:13049: \$? = $ac_status" >&5 +   echo "$as_me:13051: \$? = $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 @@ -13109,11 +13111,11 @@ else     -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:13112: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:13114: $lt_compile\"" >&5)     (eval "$lt_compile" 2>out/conftest.err)     ac_status=$?     cat out/conftest.err >&5 -   echo "$as_me:13116: \$? = $ac_status" >&5 +   echo "$as_me:13118: \$? = $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 @@ -15141,11 +15143,11 @@ else     -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:15144: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:15146: $lt_compile\"" >&5)     (eval "$lt_compile" 2>conftest.err)     ac_status=$?     cat conftest.err >&5 -   echo "$as_me:15148: \$? = $ac_status" >&5 +   echo "$as_me:15150: \$? = $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 @@ -15374,11 +15376,11 @@ else     -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:15377: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:15379: $lt_compile\"" >&5)     (eval "$lt_compile" 2>conftest.err)     ac_status=$?     cat conftest.err >&5 -   echo "$as_me:15381: \$? = $ac_status" >&5 +   echo "$as_me:15383: \$? = $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 @@ -15441,11 +15443,11 @@ else     -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \     -e 's:$: $lt_compiler_flag:'` -   (eval echo "\"\$as_me:15444: $lt_compile\"" >&5) +   (eval echo "\"\$as_me:15446: $lt_compile\"" >&5)     (eval "$lt_compile" 2>out/conftest.err)     ac_status=$?     cat out/conftest.err >&5 -   echo "$as_me:15448: \$? = $ac_status" >&5 +   echo "$as_me:15450: \$? = $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 @@ -17616,7 +17618,7 @@ else    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2    lt_status=$lt_dlunknown    cat > conftest.$ac_ext <<EOF -#line 17619 "configure" +#line 17621 "configure"  #include "confdefs.h"  #if HAVE_DLFCN_H @@ -17714,7 +17716,7 @@ else    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2    lt_status=$lt_dlunknown    cat > conftest.$ac_ext <<EOF -#line 17717 "configure" +#line 17719 "configure"  #include "confdefs.h"  #if HAVE_DLFCN_H @@ -18729,6 +18731,33 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' +# dmalloc +echo "$as_me:$LINENO: checking if malloc debugging is wanted" >&5 +echo $ECHO_N "checking if malloc debugging is wanted... $ECHO_C" >&6 + +# Check whether --with-dmalloc or --without-dmalloc was given. +if test "${with_dmalloc+set}" = set; then +  withval="$with_dmalloc" +  if test "$withval" = yes; then +  echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define WITH_DMALLOC 1 +_ACEOF + +  LIBS="$LIBS -ldmalloc" +  LDFLAGS="$LDFLAGS -g" +else +  echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +else +  echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi; + +  # Checks for libraries.  echo "$as_me:$LINENO: checking for log in -lm" >&5 @@ -19253,7 +19282,7 @@ echo "${ECHO_T}Please note that some screen refreshs may fail" >&6  echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6  	ncurses_version=unknown  cat > conftest.$ac_ext <<EOF -#line 19256 "configure" +#line 19285 "configure"  #include "confdefs.h"  #ifdef RENAMED_NCURSES  #include <curses.h> diff --git a/configure.in b/configure.in index 652386d..821f245 100644 --- a/configure.in +++ b/configure.in @@ -19,6 +19,9 @@ AC_PROG_MAKE_SET  #AC_PROG_RANLIB  AC_PROG_LIBTOOL +# dmalloc +AM_WITH_DMALLOC +  # Checks for libraries.  AC_CHECK_LIB(m, log) diff --git a/drv_Crystalfontz.c b/drv_Crystalfontz.c index 65b3293..232d1d4 100644 --- a/drv_Crystalfontz.c +++ b/drv_Crystalfontz.c @@ -1,4 +1,4 @@ -/* $Id: drv_Crystalfontz.c,v 1.6 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: drv_Crystalfontz.c,v 1.7 2004/01/30 20:57:56 reinelt Exp $   *   * new style driver for Crystalfontz display modules   * @@ -23,6 +23,10 @@   *   *   * $Log: drv_Crystalfontz.c,v $ + * Revision 1.7  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.6  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -109,6 +113,52 @@ static MODEL Models[] = {  // ***  hardware dependant functions    ***  // **************************************** +// x^0 + x^5 + x^12 +#define CRCPOLY 0x8408  + +static unsigned short CRC=0xffff; + +static unsigned short CRC16 (unsigned short crc, unsigned char *p, size_t len) +{ +  int i; +  while (len--) { +    crc ^= *p++; +    for (i = 0; i < 8; i++) +      crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY : 0); +  } +  return ~crc; +} + + +static void drv_CF_write_crc (char *string, int len) +{ +  unsigned char buffer[16+2]; +   +  if (len>sizeof(buffer)-2) { +    error ("%s: internal error: packet length %d exceeds buffer size %d", Name, len, sizeof(buffer)-2); +    len=sizeof(buffer)-1; +  } +   +  strcpy (buffer, string); +  CRC = CRC16(CRC, buffer, len); +  buffer[len]   = (CRC >> 8); +  buffer[len+1] =  CRC & 0xff; +} + + +static void drv_CF_write (char *string, int len) +{ +  switch (Protocol) { +  case 1: +    drv_generic_serial_write (string, len); +    break; +  case 2: +    drv_CF_write_crc (string, len); +    break; +  } +} + +  static void drv_CF_goto (int row, int col)  {    char cmd[3]="\021xy"; // set cursor position @@ -151,20 +201,22 @@ static int drv_CF_start (char *section)      }      Model=i;      info ("%s: using model '%s'", Name, Models[Model].name); +    Protocol = Models[Model].protocol;    } else {      info ("%s: no '%s.Model' entry from %s, auto-dedecting", Name, section, cfg_source());      Model=-1; +    Protocol=2; //auto-dedect only newer displays    }    // open serial port    if (drv_generic_serial_open(section, Name)<0) return -1; - +      // MR: why such a large delay?    usleep(350*1000); - +      // read display type    memset(buffer, 0, sizeof(buffer)); -  drv_generic_serial_write ("\1", 2); +  drv_CF_write ("\1", 2);    usleep(250*1000);  #if 1    { diff --git a/drv_generic_text.c b/drv_generic_text.c index ff7b5ae..8c9fe05 100644 --- a/drv_generic_text.c +++ b/drv_generic_text.c @@ -1,4 +1,4 @@ -/* $Id: drv_generic_text.c,v 1.7 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: drv_generic_text.c,v 1.8 2004/01/30 20:57:56 reinelt Exp $   *   * generic driver helper for text-based displays   * @@ -23,6 +23,10 @@   *   *   * $Log: drv_generic_text.c,v $ + * Revision 1.8  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.7  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -78,6 +82,10 @@  #include "drv.h"  #include "drv_generic_text.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  typedef struct {    int val1; diff --git a/evaluator.c b/evaluator.c index 8300943..61f696c 100644 --- a/evaluator.c +++ b/evaluator.c @@ -1,4 +1,4 @@ -/* $Id: evaluator.c,v 1.10 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: evaluator.c,v 1.11 2004/01/30 20:57:56 reinelt Exp $   *   * expression evaluation   * @@ -10,6 +10,10 @@   * FIXME: GPL or not GPL????   *   * $Log: evaluator.c,v $ + * Revision 1.11  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.10  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -132,6 +136,10 @@  #include "debug.h"  #include "evaluator.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  // Token types  #define T_DELIMITER 1 @@ -871,6 +879,10 @@ int Eval (char* expression, RESULT *result)    if ((err=setjmp(jb))) {      error ("Evaluator: %s in expression <%s>", ErrMsg[err], expression); +    if (Token) { +      free (Token); +      Token=NULL; +    }      return -1;    } @@ -892,5 +904,8 @@ int Eval (char* expression, RESULT *result)    if (*Token=='\0') ERROR (E_EMPTY);    Level01(result);    if (*Token!='\0') ERROR (E_SYNTAX); +  free (Token); +  Token=NULL; +      return 0;  } @@ -1,4 +1,4 @@ -/* $Id: filter.c,v 1.11 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: filter.c,v 1.12 2004/01/30 20:57:56 reinelt Exp $   *   *  smooth and damp functions   * @@ -22,6 +22,10 @@   *   *   * $Log: filter.c,v $ + * Revision 1.12  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.11  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -87,6 +91,10 @@  #include "cfg.h"  #include "filter.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  extern int tick;  #define SLOTS 64 @@ -1,4 +1,4 @@ -/* $Id: hash.c,v 1.11 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: hash.c,v 1.12 2004/01/30 20:57:56 reinelt Exp $   *   * hashes (associative arrays)   * @@ -23,6 +23,10 @@   *   *   * $Log: hash.c,v $ + * Revision 1.12  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.11  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -87,6 +91,10 @@  #include "debug.h"  #include "hash.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  #define DELTA_SLOTS 64 @@ -1,4 +1,4 @@ -/* $Id: icon.c,v 1.13 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: icon.c,v 1.14 2004/01/30 20:57:56 reinelt Exp $   *   * generic icon and heartbeat handling   * @@ -22,6 +22,10 @@   *   *   * $Log: icon.c,v $ + * Revision 1.14  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.13  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -93,6 +97,10 @@  #include "cfg.h"  #include "icon.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  typedef struct BITMAP {    int  nData; @@ -1,4 +1,4 @@ -/* $Id: layout.c,v 1.6 2004/01/14 11:33:00 reinelt Exp $ +/* $Id: layout.c,v 1.7 2004/01/30 20:57:56 reinelt Exp $   *   * new layouter framework   * @@ -23,6 +23,10 @@   *   *   * $Log: layout.c,v $ + * Revision 1.7  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.6  2004/01/14 11:33:00  reinelt   * new plugin 'uname' which does what it's called   * text widget nearly finished @@ -69,6 +73,10 @@  #include "widget.h"  #include "layout.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  int layout_addItem (char *name, int row, int col)  { diff --git a/lcd4linux.c b/lcd4linux.c index 76d1f55..409895e 100644 --- a/lcd4linux.c +++ b/lcd4linux.c @@ -1,4 +1,4 @@ -/* $Id: lcd4linux.c,v 1.61 2004/01/14 11:33:00 reinelt Exp $ +/* $Id: lcd4linux.c,v 1.62 2004/01/30 20:57:56 reinelt Exp $   *   * LCD4Linux   * @@ -22,6 +22,10 @@   *   *   * $Log: lcd4linux.c,v $ + * Revision 1.62  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.61  2004/01/14 11:33:00  reinelt   * new plugin 'uname' which does what it's called   * text widget nearly finished @@ -313,6 +317,10 @@  #include "layout.h"  #include "plugin.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  #define PIDFILE "/var/run/lcd4linux.pid"  static char *release="LCD4Linux " VERSION " (c) 2003 Michael Reinelt <reinelt@eunet.at>"; @@ -591,6 +599,7 @@ int main (int argc, char *argv[])        drv_quit();      }      pid_exit(PIDFILE); +    cfg_exit();      exit (0);    } @@ -641,8 +650,10 @@ int main (int argc, char *argv[])    } else {      drv_quit();    } +    pid_exit(PIDFILE); -   +  cfg_exit(); +        if (got_signal==SIGHUP) {      long fd;      debug ("restarting..."); diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample index e4117e7..197bf94 100644 --- a/lcd4linux.conf.sample +++ b/lcd4linux.conf.sample @@ -25,6 +25,14 @@ Display CF632 {      Speed 19200  } +Display CF633 { +    Icons 1 +    Driver 'Crystalfontz' +    Model '633' +    Port '/dev/tts/0' +    Speed 19200 +} +  Display HD44780-20x4 {      Driver 'HD44780'      Port '/dev/parports/0'	 @@ -247,9 +255,10 @@ Layout L16x2 {  }  #Display 'LK204' -Display 'HD44780-20x4' -#Display 'CF632' +#Display 'HD44780-20x4'  #Display 'CF631' +#Display 'CF632' +Display 'CF633'  #Layout  'Default'  Layout  'L16x2' @@ -1,4 +1,4 @@ -/* $Id: mail2.c,v 1.11 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: mail2.c,v 1.12 2004/01/30 20:57:56 reinelt Exp $   *   * mail: pop3, imap, news functions   * @@ -22,6 +22,10 @@   *   *   * $Log: mail2.c,v $ + * Revision 1.12  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.11  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -76,6 +80,10 @@  #include "cfg.h"  #include "socket.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  #define PROTO_UNKNOWN -1  #define PROTO_POP3 110  #define PROTO_NNTP 119 @@ -1,4 +1,4 @@ -/* $Id: pixmap.c,v 1.13 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: pixmap.c,v 1.14 2004/01/30 20:57:56 reinelt Exp $   *   * generic pixmap driver   * @@ -22,6 +22,10 @@   *   *   * $Log: pixmap.c,v $ + * Revision 1.14  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.13  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -114,6 +118,10 @@  #include "fontmap.h"  #include "debug.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  static int ROWS=0;  static int COLS=0;  static int XRES=0; diff --git a/plugin_cfg.c b/plugin_cfg.c index 664264e..14296c4 100644 --- a/plugin_cfg.c +++ b/plugin_cfg.c @@ -1,4 +1,4 @@ -/* $Id: plugin_cfg.c,v 1.3 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: plugin_cfg.c,v 1.4 2004/01/30 20:57:56 reinelt Exp $   *   * plugin for config file access   * @@ -23,6 +23,10 @@   *   *   * $Log: plugin_cfg.c,v $ + * Revision 1.4  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.3  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -58,6 +62,10 @@  #include "plugin.h"  #include "cfg.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  static void load_variables (void)  { diff --git a/plugin_i2c_sensors.c b/plugin_i2c_sensors.c index a8b6747..1307f67 100644 --- a/plugin_i2c_sensors.c +++ b/plugin_i2c_sensors.c @@ -1,4 +1,4 @@ -/* $Id: plugin_i2c_sensors.c,v 1.6 2004/01/30 07:12:35 reinelt Exp $ +/* $Id: plugin_i2c_sensors.c,v 1.7 2004/01/30 20:57:56 reinelt Exp $   *   * I2C sensors plugin   * @@ -22,6 +22,10 @@   *   *   * $Log: plugin_i2c_sensors.c,v $ + * Revision 1.7  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.6  2004/01/30 07:12:35  reinelt   * HD44780 busy-flag support from Martin Hejl   * loadavg() uClibc replacement from Martin Heyl @@ -85,6 +89,10 @@  #include "cfg.h"  #include "hash.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  static char *path=NULL;  static HASH I2Csensors = { 0, }; diff --git a/plugin_sample.c b/plugin_sample.c index b67cb22..30a7c84 100644 --- a/plugin_sample.c +++ b/plugin_sample.c @@ -1,4 +1,4 @@ -/* $Id: plugin_sample.c,v 1.3 2004/01/29 04:40:02 reinelt Exp $ +/* $Id: plugin_sample.c,v 1.4 2004/01/30 20:57:56 reinelt Exp $   *   * plugin template   * @@ -23,6 +23,10 @@   *   *   * $Log: plugin_sample.c,v $ + * Revision 1.4  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.3  2004/01/29 04:40:02  reinelt   * every .c file includes "config.h" now   * @@ -57,6 +61,10 @@  #include "debug.h"  #include "plugin.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  // sample function 'mul2' @@ -1,4 +1,4 @@ -/* $Id: timer.c,v 1.3 2004/01/29 04:40:03 reinelt Exp $ +/* $Id: timer.c,v 1.4 2004/01/30 20:57:56 reinelt Exp $   *   * generic timer handling   * @@ -21,6 +21,10 @@   *   *   * $Log: timer.c,v $ + * Revision 1.4  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.3  2004/01/29 04:40:03  reinelt   * every .c file includes "config.h" now   * @@ -54,6 +58,10 @@  #include "cfg.h"  #include "timer.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  typedef struct TIMER {    void (*callback)(void *data); @@ -1,4 +1,4 @@ -/* $Id: widget.c,v 1.10 2004/01/29 04:40:03 reinelt Exp $ +/* $Id: widget.c,v 1.11 2004/01/30 20:57:56 reinelt Exp $   *   * generic widget handling   * @@ -21,6 +21,10 @@   *   *   * $Log: widget.c,v $ + * Revision 1.11  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.10  2004/01/29 04:40:03  reinelt   * every .c file includes "config.h" now   * @@ -80,6 +84,10 @@  #include "cfg.h"  #include "widget.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  // we use a static array of widgets and not realloc()  #define MAX_WIDGETS 256 diff --git a/widget_bar.c b/widget_bar.c index f296231..5e80e5c 100644 --- a/widget_bar.c +++ b/widget_bar.c @@ -1,4 +1,4 @@ -/* $Id: widget_bar.c,v 1.6 2004/01/29 04:40:03 reinelt Exp $ +/* $Id: widget_bar.c,v 1.7 2004/01/30 20:57:56 reinelt Exp $   *   * bar widget handling   * @@ -21,6 +21,10 @@   *   *   * $Log: widget_bar.c,v $ + * Revision 1.7  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.6  2004/01/29 04:40:03  reinelt   * every .c file includes "config.h" now   * @@ -67,6 +71,10 @@  #include "widget.h"  #include "widget_bar.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  void widget_bar_update (void *Self)  { diff --git a/widget_icon.c b/widget_icon.c index 0220a5d..88bbc00 100644 --- a/widget_icon.c +++ b/widget_icon.c @@ -1,4 +1,4 @@ -/* $Id: widget_icon.c,v 1.3 2004/01/29 04:40:03 reinelt Exp $ +/* $Id: widget_icon.c,v 1.4 2004/01/30 20:57:56 reinelt Exp $   *   * icon widget handling   * @@ -21,6 +21,10 @@   *   *   * $Log: widget_icon.c,v $ + * Revision 1.4  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.3  2004/01/29 04:40:03  reinelt   * every .c file includes "config.h" now   * @@ -55,6 +59,10 @@  #include "widget.h"  #include "widget_icon.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  // icons always are 8 pixels high   #define YRES 8 diff --git a/widget_text.c b/widget_text.c index 33274ae..15e866c 100644 --- a/widget_text.c +++ b/widget_text.c @@ -1,4 +1,4 @@ -/* $Id: widget_text.c,v 1.10 2004/01/29 04:40:03 reinelt Exp $ +/* $Id: widget_text.c,v 1.11 2004/01/30 20:57:56 reinelt Exp $   *   * simple text widget handling   * @@ -21,6 +21,10 @@   *   *   * $Log: widget_text.c,v $ + * Revision 1.11  2004/01/30 20:57:56  reinelt + * HD44780 patch from Martin Hejl + * dmalloc integrated + *   * Revision 1.10  2004/01/29 04:40:03  reinelt   * every .c file includes "config.h" now   * @@ -90,6 +94,10 @@  #include "widget.h"  #include "widget_text.h" +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif +  void widget_text_scroll (void *Self)  { | 
