aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog68
1 files changed, 68 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d66864..26ea1c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,73 @@
+2005-04-24 Michael Reinelt <reinelt@merlin.ethnet>
+
+ * Makefile.am, Makefile.in, config.h.in, configure, drivers.m4, drv.c, drv_Trefon.c, drv_USBLCD.c, lcd4linux.conf.sample:
+ driver for TREFON USB LCD's added
+
+2005-04-20 Michael Reinelt <reinelt@merlin.ethnet>
+
+ * drv_SimpleLCD.c:
+ Changed the code to add some VT100-compatible control sequences (see the comments above).
+ A configfile boolean option 'VT100_Support' (default to 1) indicate if the display in
+ used support these control-sequences or not.
+
+2005-04-09 Michael Reinelt <reinelt@merlin.ethnet>
+
+ * drv_LCDLinux.c, drv_LCDLinux.h:
+ updated LCD-Linux driver to version 0.8.8
+
+2005-04-05 Michael Reinelt <reinelt@merlin.ethnet>
+
+ * configure.in, plugins.m4, configure: AC_CHECK_HEADERS corrected
+
+ * configure.in, drv_generic_i2c.c, lcd4linux.conf.sample, configure:
+ i2c patch from Paul (still does not work here :-(
+
+ * plugin_math.c: ceil/floor patch from Maxime
+
+2005-04-04 nicowallmeier <nicowallmeier@merlin.ethnet>
+
+ * plugin_imon.c: to be compatible with gcc 2.95
+
+2005-04-03 Michael Reinelt <reinelt@merlin.ethnet>
+
+ * configure.in, plugin.c, plugin_statfs.c, plugins.m4, config.h.in, configure, Makefile.am, Makefile.in:
+ added statfs plugin
+
+2005-04-02 Michael Reinelt <reinelt@merlin.ethnet>
+
+ * drv_Crystalfontz.c, drv_SimpleLCD.c, drv_USBLCD.c:
+ fixed gcc4 warnings about signed/unsigned mismatches
+
+2005-04-01 Michael Reinelt <reinelt@merlin.ethnet>
+
+ * lcd4linux.conf.sample, plugin_i2c_sensors.c, plugin_imon.c, plugin_mysql.c, plugin_pop3.c:
+ moved plugin init stuff to a seperate function called on first use
+
+2005-03-30 Michael Reinelt <reinelt@merlin.ethnet>
+
+ * evaluator.c, lcd4linux.c, plugin_cfg.c:
+ Evaluator speedup: use bsearch for finding functions and variables
+
+2005-03-28 Michael Reinelt <reinelt@merlin.ethnet>
+
+ * drv_HD44780.c: HD44780 multiple displays patch from geronet
+
+ * configure.in, drivers.m4, drv_HD44780.c, drv_generic_i2c.c, drv_generic_i2c.h, config.h.in, configure, Makefile.in, Makefile.am:
+ HD44780/I2C patch from Luis merged (still does not work for me)
+
+2005-03-25 Michael Reinelt <reinelt@merlin.ethnet>
+
+ * drv_HD44780.c: HD44780 Backlight fixed (thanks to geronet)
+
+2005-03-23 Michael Reinelt <reinelt@merlin.ethnet>
+
+ * drv_Crystalfontz.c:
+ fixed some signed/unsigned char mismatches in the Crystalfontz driver (ticket #12)
+
2005-02-24 Michael Reinelt <reinelt@merlin.ethnet>
+ * ChangeLog: ChangeLog
+
* drivers.m4, drv.c, drv_Crystalfontz.c, drv_LCDLinux.c, drv_SimpleLCD.c, drv_generic_text.c, lcd4linux.conf.sample, config.h.in, configure, Makefile.am, Makefile.in:
SimpleLCD driver added
008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/* $Id: qprintf.c,v 1.1 2004/02/27 07:06:26 reinelt Exp $
 *
 * simple but quick snprintf() replacement
 *
 * Copyright 2004 Michael Reinelt <reinelt@eunet.at>
 * Copyright 2004 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>
 *
 * derived from a patch from Martin Hejl which is
 * Copyright 2003 Martin Hejl (martin@hejl.de)
 *
 * This file is part of LCD4Linux.
 *
 * LCD4Linux is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * LCD4Linux is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *
 * $Log: qprintf.c,v $
 * Revision 1.1  2004/02/27 07:06:26  reinelt
 * new function 'qprintf()' (simple but quick snprintf() replacement)
 *
 */

/* 
 * exported functions:
 * 
 * int qprintf(char *str, size_t size, const char *format, ...)
 *   works like snprintf(), but format only knows about %d and %s
 */


#include "config.h"

#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>

static char *itoa(char* buffer, size_t size, int value)
{
  char *p;
  int sign;
 
  // sanity checks
  if (buffer==NULL || size<2) return (NULL);
  
  // remember sign of value
  sign = 0;
  if (value < 0) {
    sign  = 1;
    value = -value;
  }
  
  // p points to last char
  p = buffer+size-1;
  
  // set terminating zero
  *p='\0';
  
  do {
    *--p = value%10 + '0';
    value = value/10;
  } while (value!=0 && p>buffer);
  
  if (sign && p>buffer)
    *--p = '-';
  
  return p;
} 


int qprintf(char *str, size_t size, const char *format, ...) {

  va_list ap;
  const char *src;
  char *dst;
  int len;
  
  src = format;
  dst = str;
  len = 0;
  
  // leave room for terminating zero 
  size--;
  
  va_start(ap, format);
  
  while (len < size) {
    
    if (*src=='%') {
      char buf[12], *s;
      int d;
      switch (*++src) {
      case 's':
	src++;
	s = va_arg(ap, char *);
	while (len < size && *s != '\0') {
	  len++;
	  *dst++ = *s++;
	}
	break;
      case 'd':
	src++;
	d = va_arg(ap, int);
	s = itoa (buf, sizeof(buf), d);
	while (len < size && *s != '\0') {
	  len++;
	  *dst++ = *s++;
	}
	break;
      default:
	len++;
	*dst++ = '%';
      }
    } else {
      len++;
      *dst++ = *src;
      if (*src++ == '\0') break;
    }
  }
  
  va_end(ap);
  
  // enforce terminating zero
  if (len>=size && *(dst-1)!='\0') {
    len++;
    *dst='\0';
  }
  
  // do not count terminating zero
  return len-1;
}