diff options
Diffstat (limited to '')
-rw-r--r-- | .cvsignore | 8 | ||||
-rw-r--r-- | AUTHORS | 22 | ||||
-rw-r--r-- | CREDITS | 3 | ||||
-rw-r--r-- | CodingStyle | 22 | ||||
-rw-r--r-- | FAQ | 10 | ||||
-rw-r--r-- | INSTALL | 172 | ||||
-rw-r--r-- | Makefile.am | 26 | ||||
-rw-r--r-- | Makefile.in | 41 | ||||
-rw-r--r-- | NEWS | 56 | ||||
-rw-r--r-- | README | 5 | ||||
-rw-r--r-- | README.KDE | 42 | ||||
-rw-r--r-- | Status | 72 | ||||
-rw-r--r-- | TODO | 180 | ||||
-rw-r--r-- | ac_python_devel.m4 | 4 | ||||
-rw-r--r-- | aclocal.m4 | 1044 | ||||
-rwxr-xr-x | bootstrap | 15 | ||||
-rw-r--r-- | cfg.c | 224 | ||||
-rw-r--r-- | cfg.h | 57 | ||||
-rwxr-xr-x | config.guess | 633 | ||||
-rw-r--r-- | config.h.in | 42 | ||||
-rwxr-xr-x | config.sub | 167 | ||||
-rwxr-xr-x | configure | 3506 | ||||
-rw-r--r-- | configure.in | 20 | ||||
-rw-r--r-- | curses.m4 | 4 | ||||
-rw-r--r-- | debug.c | 53 | ||||
-rw-r--r-- | debug.h | 48 | ||||
-rw-r--r--[-rwxr-xr-x] | depcomp | 0 | ||||
-rw-r--r-- | drivers.m4 | 66 | ||||
-rw-r--r-- | drv.c | 180 | ||||
-rw-r--r-- | drv.h | 50 | ||||
-rw-r--r-- | drv_BWCT.c | 25 | ||||
-rw-r--r-- | drv_BeckmannEgle.c | 79 | ||||
-rw-r--r-- | drv_Crystalfontz.c | 186 | ||||
-rw-r--r-- | drv_Curses.c | 59 | ||||
-rw-r--r-- | drv_Cwlinux.c | 115 | ||||
-rw-r--r-- | drv_EA232graphic.c | 554 | ||||
-rw-r--r-- | drv_G15.c | 37 | ||||
-rw-r--r-- | drv_HD44780.c | 309 | ||||
-rw-r--r-- | drv_Image.c | 76 | ||||
-rw-r--r-- | drv_LCD2USB.c | 41 | ||||
-rw-r--r-- | drv_LCDLinux.c | 98 | ||||
-rw-r--r-- | drv_LCDTerm.c | 22 | ||||
-rw-r--r-- | drv_LEDMatrix.c | 35 | ||||
-rw-r--r-- | drv_LPH7508.c | 37 | ||||
-rw-r--r-- | drv_LUIse.c | 25 | ||||
-rw-r--r-- | drv_M50530.c | 106 | ||||
-rw-r--r-- | drv_MatrixOrbital.c | 180 | ||||
-rw-r--r-- | drv_MilfordInstruments.c | 62 | ||||
-rw-r--r-- | drv_NULL.c | 46 | ||||
-rw-r--r-- | drv_Noritake.c | 36 | ||||
-rw-r--r-- | drv_RouterBoard.c | 26 | ||||
-rw-r--r-- | drv_Sample.c | 33 | ||||
-rw-r--r-- | drv_SimpleLCD.c | 30 | ||||
-rw-r--r-- | drv_T6963.c | 92 | ||||
-rw-r--r-- | drv_Trefon.c | 31 | ||||
-rw-r--r-- | drv_USBHUB.c | 30 | ||||
-rw-r--r-- | drv_USBLCD.c | 108 | ||||
-rw-r--r-- | drv_WincorNixdorf.c | 13 | ||||
-rw-r--r-- | drv_X11.c | 69 | ||||
-rw-r--r-- | drv_generic.c | 17 | ||||
-rw-r--r-- | drv_generic.h | 17 | ||||
-rw-r--r-- | drv_generic_gpio.c | 23 | ||||
-rw-r--r-- | drv_generic_gpio.h | 11 | ||||
-rw-r--r-- | drv_generic_graphic.c | 138 | ||||
-rw-r--r-- | drv_generic_graphic.h | 55 | ||||
-rw-r--r-- | drv_generic_i2c.c | 37 | ||||
-rw-r--r-- | drv_generic_i2c.h | 150 | ||||
-rw-r--r-- | drv_generic_keypad.c | 15 | ||||
-rw-r--r-- | drv_generic_keypad.h | 14 | ||||
-rw-r--r-- | drv_generic_parport.c | 88 | ||||
-rw-r--r-- | drv_generic_parport.h | 47 | ||||
-rw-r--r-- | drv_generic_serial.c | 118 | ||||
-rw-r--r-- | drv_generic_serial.h | 55 | ||||
-rw-r--r-- | drv_generic_text.c | 153 | ||||
-rw-r--r-- | drv_generic_text.h | 86 | ||||
-rw-r--r-- | drv_picoLCD.c | 471 | ||||
-rw-r--r-- | drv_serdisplib.c | 37 | ||||
-rw-r--r-- | evaluator.c | 185 | ||||
-rw-r--r-- | evaluator.h | 66 | ||||
-rw-r--r-- | font_6x8.h | 20 | ||||
-rw-r--r-- | font_6x8_bold.h | 14 | ||||
-rw-r--r-- | hash.c | 115 | ||||
-rw-r--r-- | hash.h | 88 | ||||
-rwxr-xr-x | indent.sh | 15 | ||||
-rwxr-xr-x | install-sh | 496 | ||||
-rw-r--r-- | layout.c | 89 | ||||
-rw-r--r-- | layout.h | 24 | ||||
-rw-r--r-- | lcd4linux.c | 387 | ||||
-rw-r--r-- | lcd4linux.conf.sample | 49 | ||||
-rw-r--r-- | lcd4linux_i2c.h | 22 | ||||
-rwxr-xr-x | mkinstalldirs | 165 | ||||
-rwxr-xr-x | nph-png | 41 | ||||
-rw-r--r-- | pid.c | 44 | ||||
-rw-r--r-- | pid.h | 17 | ||||
-rw-r--r-- | plugin.c | 191 | ||||
-rw-r--r-- | plugin.h | 31 | ||||
-rw-r--r-- | plugin_apm.c | 29 | ||||
-rw-r--r-- | plugin_cfg.c | 68 | ||||
-rw-r--r-- | plugin_cpuinfo.c | 69 | ||||
-rw-r--r-- | plugin_diskstats.c | 36 | ||||
-rw-r--r-- | plugin_dvb.c | 42 | ||||
-rw-r--r-- | plugin_exec.c | 49 | ||||
-rw-r--r-- | plugin_file.c | 12 | ||||
-rw-r--r-- | plugin_i2c_sensors.c | 111 | ||||
-rw-r--r-- | plugin_iconv.c | 142 | ||||
-rw-r--r--[-rwxr-xr-x] | plugin_imon.c | 66 | ||||
-rw-r--r-- | plugin_isdn.c | 33 | ||||
-rw-r--r-- | plugin_kvv.c | 27 | ||||
-rw-r--r-- | plugin_loadavg.c | 55 | ||||
-rw-r--r-- | plugin_math.c | 66 | ||||
-rw-r--r-- | plugin_meminfo.c | 59 | ||||
-rw-r--r-- | plugin_mpd.c | 8 | ||||
-rw-r--r-- | plugin_mysql.c | 38 | ||||
-rw-r--r-- | plugin_netdev.c | 64 | ||||
-rw-r--r-- | plugin_pop3.c | 43 | ||||
-rw-r--r-- | plugin_ppp.c | 48 | ||||
-rw-r--r-- | plugin_proc_stat.c | 107 | ||||
-rw-r--r-- | plugin_python.c | 24 | ||||
-rw-r--r-- | plugin_sample.c | 53 | ||||
-rw-r--r-- | plugin_seti.c | 31 | ||||
-rw-r--r-- | plugin_statfs.c | 11 | ||||
-rw-r--r-- | plugin_string.c | 46 | ||||
-rw-r--r-- | plugin_test.c | 25 | ||||
-rw-r--r-- | plugin_time.c | 24 | ||||
-rw-r--r-- | plugin_uname.c | 30 | ||||
-rw-r--r-- | plugin_uptime.c | 29 | ||||
-rw-r--r--[-rwxr-xr-x] | plugin_wireless.c | 40 | ||||
-rw-r--r-- | plugin_xmms.c | 57 | ||||
-rw-r--r-- | plugins.m4 | 20 | ||||
-rw-r--r-- | png.html | 8 | ||||
-rw-r--r-- | property.c | 40 | ||||
-rw-r--r-- | property.h | 16 | ||||
-rw-r--r-- | qprintf.c | 37 | ||||
-rw-r--r-- | qprintf.h | 24 | ||||
-rw-r--r-- | rgb.c | 8 | ||||
-rw-r--r-- | rgb.h | 8 | ||||
-rwxr-xr-x | smoketest.sh | 23 | ||||
-rw-r--r-- | svn_version.h | 1 | ||||
-rwxr-xr-x | svn_version.sh | 15 | ||||
-rw-r--r-- | thread.c | 42 | ||||
-rw-r--r-- | thread.h | 34 | ||||
-rw-r--r-- | timer.c | 58 | ||||
-rw-r--r-- | timer.h | 31 | ||||
-rw-r--r-- | udelay.c | 97 | ||||
-rw-r--r-- | udelay.h | 63 | ||||
-rw-r--r-- | usbhub.conf | 51 | ||||
-rw-r--r-- | widget.c | 101 | ||||
-rw-r--r-- | widget.h | 87 | ||||
-rw-r--r-- | widget_bar.c | 152 | ||||
-rw-r--r-- | widget_bar.h | 57 | ||||
-rw-r--r-- | widget_gpo.c | 64 | ||||
-rw-r--r-- | widget_gpo.h | 19 | ||||
-rw-r--r-- | widget_icon.c | 146 | ||||
-rw-r--r-- | widget_icon.h | 53 | ||||
-rw-r--r-- | widget_image.c | 203 | ||||
-rw-r--r-- | widget_image.h | 36 | ||||
-rw-r--r-- | widget_keypad.c | 70 | ||||
-rw-r--r-- | widget_keypad.h | 22 | ||||
-rw-r--r-- | widget_text.c | 142 | ||||
-rw-r--r-- | widget_text.h | 49 | ||||
-rw-r--r-- | widget_timer.c | 78 | ||||
-rw-r--r-- | widget_timer.h | 24 |
162 files changed, 5766 insertions, 10578 deletions
diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index fc3af76..0000000 --- a/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -Makefile -.deps -autom4te.cache -config.h -config.log -config.status -lcd4linux -stamp-h1 @@ -1,19 +1,5 @@ -LCD4Linux development team: +# $Id: AUTHORS 730 2007-01-14 13:50:28Z michael $ +# $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/AUTHORS $ -Michael Reinelt <reinelt@eunet.at> -Herbert Rosmanith <herp@wildsau.idv.uni-linz.ac.at> -Leopold Tötsch <lt@toetsch.at> -Axel Ehnert <axel@ehnert.net> -Andrew Ip <aip@cwlinux.com> -Robin Adams, Adams IT Services <info@usblcd.de> -Xavier Vello <xavier66@free.fr> -Martin Hejl (martin@hejl.de) -Jesse Brook Kovach <jkovach@wam.umd.edu> -Nico Wallmeier <nico.wallmeier@post.rwth-aachen.de> -Luis Correia <lfcorreia@users.sf.net> -Patrick Schemitz <schemitz@ekp.physik.uni-karlsruhe.de> -Andy Baxter <andy@earthsong.free-online.co.uk> -Thomas Siedentopf <thom-s@gmx.net> -Markus Keil <markus_keil@t-online.de> -Samuel Mimram <samuel.mimram@ens-lyon.fr> -Luk Claes <infblue@users.sourceforge.net> +Sorry, there is no AUTHORS anymore. +Go to http://lcd4linux.bulix.org for a list of developers an contributors. @@ -1 +1,4 @@ +$Id: CREDITS 730 2007-01-14 13:50:28Z michael $ +$URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/CREDITS $ + see http://lcd4linux.bulix.org for an up-to-date list of contributors! diff --git a/CodingStyle b/CodingStyle deleted file mode 100644 index c47c015..0000000 --- a/CodingStyle +++ /dev/null @@ -1,22 +0,0 @@ -LCD4Linux Coding Style - -We decided to use a common coding style to make patches and diffs -easier to read and apply. - -The style we use is based on Kernighan & Ritchie and the coding style -of the linux kernel (see /usr/src/linux/Documentation/CodingStyle), -with some differences: - -- we use a indentation level of 4 spaces (Linus prefers 8) -- we allow lines up to 150 chars (Linus uses 80) - -The resulting indent command is: -indent -kr -l150 - -There's a script called 'indent.sh' that comes with the LCD4Linux -source package; all it does is call indent with all .c and .h files. - -It is always a good idea to call 'indent.sh' before any CVS operation, -this ensures that diffs and updates won't get mixed up because of -cosmetic changes. - @@ -1,10 +0,0 @@ -# -# $Id: FAQ,v 1.1 2000/03/22 07:33:50 reinelt Exp $ -# - -lcd4linux Frequently Asked Questions - -Q: Where can I buy LCD's from Matrox Orbital in Germany or Austria? - -A: Germany: Elektronikladen (http://www.elektronikladen.de/seriallcd.html) - Austria: MEGATON (http://www.elektronikladen.de/ela-oesterreich.html)
\ No newline at end of file @@ -1,43 +1,31 @@ -Installation Instructions -************************* +$Id: INSTALL 730 2007-01-14 13:50:28Z michael $ +$URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/INSTALL $ -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. Basic Installation ================== -These are generic installation instructions. + These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: @@ -70,22 +58,20 @@ The simplest way to compile this package is: Compilers and Options ===================== -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== -You can compile the package for more than one kind of computer at the + You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the @@ -93,28 +79,28 @@ directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. Installation Names ================== -By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular +options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. @@ -125,7 +111,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= -Some packages pay attention to `--enable-FEATURE' options to + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -140,86 +126,48 @@ you can use the `configure' options `--x-includes=DIR' and Specifying the System Type ========================== -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If +See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. +need to know the host type. - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. Sharing Defaults ================ -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. -Defining Variables +Operation Controls ================== -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: - - /bin/bash ./configure CONFIG_SHELL=/bin/bash - -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. + `configure' recognizes the following options to control how it +operates. -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. `--help' -`-h' Print a summary of the options to `configure', and exit. -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - `--quiet' `--silent' `-q' @@ -231,6 +179,8 @@ configuration-related scripts to be executed by `/bin/bash'. Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. +`configure' also accepts some other, not widely useful, options. diff --git a/Makefile.am b/Makefile.am index f835144..dd40acd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,6 @@ +# $Id: Makefile.am 760 2007-02-04 06:29:55Z michael $ +# $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/Makefile.am $ + # Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = gnu @@ -15,7 +18,7 @@ lcd4linux_LDADD = @DRIVERS@ @PLUGINS@ @DRVLIBS@ @PLUGINLIBS@ lcd4linux_DEPENDENCIES = @DRIVERS@ @PLUGINS@ lcd4linux_SOURCES = \ -lcd4linux.c \ +lcd4linux.c svn_version.h \ cfg.c cfg.h \ debug.c debug.h \ drv.c drv.h \ @@ -66,6 +69,7 @@ drv_BWCT.c \ drv_Crystalfontz.c \ drv_Curses.c \ drv_Cwlinux.c \ +drv_EA232graphic.c \ drv_G15.c \ drv_HD44780.c \ drv_Image.c \ @@ -80,6 +84,7 @@ drv_MatrixOrbital.c \ drv_MilfordInstruments.c \ drv_Noritake.c \ drv_NULL.c \ +drv_picoLCD.c \ drv_RouterBoard.c \ drv_Sample.c \ drv_serdisplib.c \ @@ -92,6 +97,7 @@ drv_WincorNixdorf.c \ drv_X11.c \ \ font_6x8.h \ +font_6x8_bold.h \ widget_image.c widget_image.h \ \ lcd4linux_i2c.h \ @@ -103,6 +109,7 @@ plugin_dvb.c \ plugin_exec.c \ plugin_file.c \ plugin_i2c_sensors.c \ +plugin_iconv.c \ plugin_imon.c \ plugin_isdn.c \ plugin_kvv.c \ @@ -125,20 +132,29 @@ plugin_xmms.c EXTRA_DIST = \ +svn_version.sh \ lcd4linux.conf.sample \ lcd4kde.conf \ lcd4linux.kdelnk \ lcd4linux.xpm \ lcd4linux.lsm \ +ac_python_devel.m4 \ curses.m4 \ +drivers.m4 \ +plugins.m4 \ AUTHORS \ CREDITS \ -FAQ \ NEWS \ TODO \ README \ -README.Drivers \ -README.Plugins \ -README.KDE \ plugin_sample.c + + +# create subversion version + +.PHONY: svn_version + +svn_version: + svn_version.sh + diff --git a/Makefile.in b/Makefile.in index e08c3c1..b779a94 100644 --- a/Makefile.in +++ b/Makefile.in @@ -14,6 +14,9 @@ @SET_MAKE@ +# $Id: Makefile.am 760 2007-02-04 06:29:55Z michael $ +# $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/Makefile.am $ + # Process this file with automake to produce Makefile.in srcdir = @srcdir@ @@ -36,13 +39,15 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = lcd4linux$(EXEEXT) -subdir = . 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.guess config.sub depcomp install-sh missing \ mkinstalldirs +subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/curses.m4 \ $(top_srcdir)/ac_python_devel.m4 $(top_srcdir)/drivers.m4 \ @@ -122,9 +127,11 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ @@ -163,13 +170,21 @@ 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 = @docdir@ 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@ @@ -198,7 +213,7 @@ lcd4linux_LDFLAGS = lcd4linux_LDADD = @DRIVERS@ @PLUGINS@ @DRVLIBS@ @PLUGINLIBS@ lcd4linux_DEPENDENCIES = @DRIVERS@ @PLUGINS@ lcd4linux_SOURCES = \ -lcd4linux.c \ +lcd4linux.c svn_version.h \ cfg.c cfg.h \ debug.c debug.h \ drv.c drv.h \ @@ -249,6 +264,7 @@ drv_BWCT.c \ drv_Crystalfontz.c \ drv_Curses.c \ drv_Cwlinux.c \ +drv_EA232graphic.c \ drv_G15.c \ drv_HD44780.c \ drv_Image.c \ @@ -263,6 +279,7 @@ drv_MatrixOrbital.c \ drv_MilfordInstruments.c \ drv_Noritake.c \ drv_NULL.c \ +drv_picoLCD.c \ drv_RouterBoard.c \ drv_Sample.c \ drv_serdisplib.c \ @@ -275,6 +292,7 @@ drv_WincorNixdorf.c \ drv_X11.c \ \ font_6x8.h \ +font_6x8_bold.h \ widget_image.c widget_image.h \ \ lcd4linux_i2c.h \ @@ -286,6 +304,7 @@ plugin_dvb.c \ plugin_exec.c \ plugin_file.c \ plugin_i2c_sensors.c \ +plugin_iconv.c \ plugin_imon.c \ plugin_isdn.c \ plugin_kvv.c \ @@ -307,21 +326,21 @@ plugin_wireless.c \ plugin_xmms.c EXTRA_DIST = \ +svn_version.sh \ lcd4linux.conf.sample \ lcd4kde.conf \ lcd4linux.kdelnk \ lcd4linux.xpm \ lcd4linux.lsm \ +ac_python_devel.m4 \ curses.m4 \ +drivers.m4 \ +plugins.m4 \ AUTHORS \ CREDITS \ -FAQ \ NEWS \ TODO \ README \ -README.Drivers \ -README.Plugins \ -README.KDE \ plugin_sample.c all: config.h @@ -420,6 +439,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_Crystalfontz.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_Curses.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_Cwlinux.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_EA232graphic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_G15.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_HD44780.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_Image.Po@am__quote@ @@ -451,6 +471,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_generic_parport.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_generic_serial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_generic_text.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_picoLCD.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drv_serdisplib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evaluator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ @@ -466,6 +487,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_exec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_i2c_sensors.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_iconv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_imon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_isdn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_kvv.Po@am__quote@ @@ -791,6 +813,13 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-info-am + +# create subversion version + +.PHONY: svn_version + +svn_version: + svn_version.sh # 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: @@ -1,53 +1,5 @@ - --- LCD4Linux News --- +# $Id: NEWS 730 2007-01-14 13:50:28Z michael $ +# $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/NEWS $ - - -lcd4linux-0.98 - -- improved signal-handling: lcd4linux can be restarted by sending a SIGHUP - -- lcd4linux uses syslog for messages/warnings etc. - -- support for GPO's (general purpose outputs, e.g. to connect a LED) - The MatroxOrbital Displays have one GPO, and you can connect up to eight - LED's to the parallel port using two IC's (see README.HD44780.GPO) - -- new delay loop for parallel port displays: uses either gettimeofday() or - rdtsc (time stamp counter on newer processors). This delay needs no longer - a calibration! The 'Delay'-entry in lcd4linux.conf has gone. - -- new raster driver for PNG creation - -- new curses-based text driver - -- security: lcd4linux.conf must have the same user/group than the executable, - and must not me accesible by group and other (i.e. mode 0600). This is - necessary because lcd4linux.conf can contain usernames and passwords for - POP and IMAP queries. - -- support for plugins: new token 'x1'..'x9' for externel programs - -- new token 'ic' (ISDN connected/offline, mainly for a LED connected to a GPO) - -- APM client: new tokens 'bp', 'bs', 'bd' (battery percentage, status and - duration) - -- mail client: new tokens 'e1'..'e9' for counting emails in local mailboxes - -- new configure-options '--with-drivers=<list>', so you can compile a minimal - executable which contains only the drivers you need. - -- seti@home client: new tokens 'hc' (% completed) and 'ht' (cpu time needed) - -- simple web-server driver (see README.Webinterface) - -- uses new (kernel 2.4) ppdev system to access parallel port via ioctl() - -- mail suport for pop3 and imap4, token 'u1' ..'u9' show unseen mail - (which is propably incorrect for normal mbox) - -- added another verbose level (-vvv) for debugging socket traffic - -- added nntp support for count of news/unread messages in subscribed NGs - -- implemented time series bar '$t' +Sorry, there is no NEWS anymore. +Go to http://lcd4linux.bulix.org for all the documentation. @@ -1,6 +1,5 @@ -# -# $Id: README,v 1.25 2005/01/09 10:53:22 reinelt Exp $ -# +# $Id: README 730 2007-01-14 13:50:28Z michael $ +# $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/README $ Sorry, there is no README anymore. Go to http://lcd4linux.bulix.org for all the documentation. diff --git a/README.KDE b/README.KDE deleted file mode 100644 index a4cff7f..0000000 --- a/README.KDE +++ /dev/null @@ -1,42 +0,0 @@ -# -# $Id: README.KDE,v 1.1 2000/04/03 06:53:09 reinelt Exp $ -# - -This is the README file for the KDE integration of lcd4linux - - -First: lcd4linux is NO KDE program! - -But: lcd4linux with the X11-driver can be integrated in KDE, so that it -drives a little window in the KDE panel. - -This so called 'swallowing on panel' can be accomplished by using a .kdelnk -file and a special configuration. Both files come with this package, but should -be adopted to your needs. - -The KDE panel windows must have a size of 45x45 pixels. We get this size by -using a size of 6x5 characters, each character has 6x8 pixels. By using -a horizontal gap of 1 pixel between characters, we get a size of - -horizontal: 6 chars * 6 pixels + 5 gaps = 41 pixels -vertical: 5 chars * 8 pixels = 40 pixels - -With a border size of 2 pixels this gives a size of 45 x 44 pixels. Great! - -I prefer using 5 vertical bars (load avg, CPU busy, CPU system, disk read+write, -network receive+transmit, ISDN in+out), but you use any other combination you -like. - - -INSTALLATION: - -* download and compile lcd4linux -* edit lcd4linux.kdelnk and copy to $KDEDIR/share/applnk/apps/System -* copy lcd4linux.xpm to $KDEDIR/share/icons -* copy lcd4kde.conf to /etc -* create a /etc/lcd4X11.conf (this will be used if you start lcd4linux from the menu - or by clicking on the panel window -* use "Panel/Add Application" from the K menu to create a panel entry -* restart KPanel - -Enjoy! @@ -1,72 +0,0 @@ -Lcd4Linux NextGeneration porting status - - DRIVERS : format : status (widgets) + extras [todo] -------------------------------------------------------- - BeckmannEgle -> Ported (Text,Bar,Icon) - Crystalfontz -> Ported (Text,Bar,Icon) + blacklight,contrast,pwm [gpo,rpm] - Curses -> Ported (Text,Bar) - Cwlinux -> Ported (Text,Bar,Icon) + blacklight [gpo,gpi,inverted text,relay] - HD44780 -> Ported (Text,Bar,Icon) + soft brightness,'busy flag',gpo [soft contrast] - M50530 -> Ported (Text,Bar,Icon) + gpo - MatrixOrbital -> Ported (Text,Bar,Icon) + blacklight,contrast,gpo,pwm,rpm - MilfordInstruments -> Ported (Text,Bar,Icon) - T6963* -> Ported (Text,Bar,Icon) - USBLCD -> Ported (Text,Bar,Icon) - XWindow* -> Ported (Text,Bar,Icon) [gnome applet ?] - Raster* -> Ported (Text,Bar,Icon) - - - PalmPilot -> Obsolete - SIN -> Obsolete - - -* graphic displays - - - - PLUGINS : format : status (functions) {old tokens} [todo] ------------------------------------------------------------- - plugin_apm -> Finished (apm) {battery: bd bp bs} - plugin_cpuinfo -> Finished (cpuinfo) {P} - plugin_dvb -> Finished (dvb) NEW - plugin_exec -> Finished (exec) {x*} - plugin_i2c_sensors -> Finished (i2c_sensors) {s*} [needs testing for procfs] - plugin_imon -> Finished (imon, version, rates) [hazardous function names] - plugin_loadavg -> Finished (loadavg) {L l1 l2 l3} - plugin_meminfo -> Finished (meminfo) {ma mb mc mf ms mt mu r} - plugin_mysql -> Finished (mySQLquery, mySQLstatus) NEW - plugin_netdev -> Finished (netdev) {nm nr nt nw} - plugin_ppp -> Finished (ppp) {ti tm to tt} - plugin_proc_stat -> Finished (proc_stat, cpu, disk) {cb ci cn cs cu dm dr dt dw} - plugin_seti -> Finished (seti) {hc ht} - plugin_uname -> Finished (uname) {o v} - plugin_wireless -> Finished (level, noise, quality, ...) {ws wl wn} - plugin_xmms -> Finished (xmms) NEW - plugin_isdn -> Finished (info, cps) {ic ii im io it} - plugin_uptime -> Finished (uptime) NEW - plugin_time -> Finished (time strftime) NEW - plugin_pop3 -> Finished (POP3check) {e* u*} - -(special plugins : plugin_cfg, plugin_math, plugin_string) - - - TODO : task {assigned to} --------- - -For 0.10.0 : -+ namespace support for plugins (with ::) {Michael} -* finish debian package {Xavier, Luk, Samuel} -* new website ? {Xavier} -- write decent documentation - -For 0.10.1 : -- add events/input layer -- support "virtual rows" (will be done with events) -- add support for input (display keypads, gamepads, socket, ...) - -Not time-critical -- support visible attribute for widgets other than icons -- time-based bars for graphic displays -- dynamic loading of plugins/displays/input (after 0.10.0) - -( - todo; * in progress; + done) @@ -1,177 +1,5 @@ -ToDo-List / Wishlist for lcd4linux - -// 2000-04-04 Michael Reinelt <reinelt@eunet.at> -// implement some sort of 'graphs', similar to bars, but with a time axis -// can be filled (made up of bars) or not (needs raster graphics) -// done 2001-03-16 -lt. - -// 2000-04-04 Michael Reinelt <reinelt@eunet.at> -// write a driver for PNG. This should be the first step towards a WWW-driver. -// Done 2001-03-01 -lt. - -2000-04-15 Thomas Skyt Jessen <thskyt@foni.net> -show partition information (used, free, ...) - -2000-04-25 Michael Mueller <m.mueller@netsystec.de> -show process information - -// 2000-12-03 Ghassan Matar <gmatar@hexapods.com> -// show other sensors than temperature -// we have to use libsensors instead of parsing the proc files directly -// Refused 2003-08-01 -mr - -// 2000-12-03 Ghassan Matar <gmatar@hexapods.com> -// show contents of any text file -// the file should only contain one line, with a fixed format -// there are two possibilities: text and numbers -// numbers can be used for bars, too -// Done 2000-03-08, look at %x -lt - -// 2000-12-03 Ghassan Matar <gmatar@hexapods.com> -// accept data from external sources (fifo?) -// Done 2000-03-08, look at %x -lt - -// 2001-02-11 Carsten Nau <info@cnau.de> -// connect a LED to a spare pin of the parallel port and show if ISDN -// is online -// Done with GPO's -mr - -// 2001-01-27 Axel Ehnert <axel@ehnert.net> -// - display numer of emails in a mailbox -// - display seti@home values -// done. - -// 2001-03-05 Leo Tötsch <lt@toetsch.at> -// rename some tokens: %o->%os, %v->%ov, %r->%or, %p->%op, -// will be done with the big config-rework -// done with the "Next Generation Layout" - -// 2001-03-05 Leo Tötsch <lt@toetsch.at> -// replace T_EXTENDED with a Flag similar to 'bar' -// rejected, T_EXTENDED does a good job -mr - -// 2001-03-07 Michael Reinelt <reinelt@eunet.at> -// use ppdev instead of ugly outb() -// done 2001-03-14 -mr - -// 2001-03-09 Michael Reinelt <reinelt@eunet.at> -// replace udelay() assembly loop with rdtsc (read time stamp counter) -// at least try to.... -// done 2001-03-14 -mr - -// 2001-03-09 Leo Tötsch <lt@toetsch.at> -// read configuration file earlier (before forking) so that specific drivers -// (especially 'Text') would not fork. -// There's a reason for forking that early, but I forgot... -// done somewhere in mid 2003 MR - -// 2001-03-12 Michael Reinelt <reinelt@eunet.at> -// remove USE_OLD_UDELAY after wide testing of new udelay code -// done with the "Next Generation Layout" - -// 2001-03-12 Michael Reinelt <reinelt@eunet.at> -// create a NEWS file with changes/enhancements of every release -// done 2001-03-13 -mr - -2001-03-14 Leopold Toetsch <lt@toetsch.at> -improve unseen for mbox (check Status:) - -// 2001-03-14 Michael Reinelt <reinelt@eunet.at> -// add a new Token 'nc' for 'network collisions' -// done with the "Next Generation Layout" - -2001-03-14 Michael Reinelt <reinelt@eunet.at> -add translation tables ('german umlauts' don't -follow any scheme on most displays) - -// 2001-03-15 Leopold Toetsch <lt@toetsch.at> -// Text display has troubles with '\r' -// done 2001-03-16, replace \r,\n with '_' -lt - -// 2001-03-24 Carsten Nau <info@cnau.de> -// change network clients to support different devices -// at the moment the sum of all eth* devices is calculated -// %n* should be extended tokens -// done with the "Next Generation Layout" - -// 2001-03-24 Brian Cleven <lcleven@home.com> -// support 40x4 displays with two HD44780 chips on it -// we need another 'Enable' line for this -// this way one could connect two displays to one parallel port, too -// done with 0.9.11 MR - -// 2001-05-25 Jens Garthe <outline@xslan.de> -// detect wether curses.h and libncurses is installed, and -// don't include the 'Text'-driver if not. -// _should_ work now 2001-05-31 -lt - -// 2001-09-11 Michael Reinelt <reinelt@eunet.at> -// use new extended tokens to split up several data sources -// (CPU, Net, Disk, ISDN, ...) -// e.g. '%nw' is 'network transmit' for _all_ devices -// '%n0w' is 'network transmit' for eth0 -// '%n1w' for eth1 -// done with the "Next Generation Layout" - -// 2001-09-11 Michael Reinelt <reinelt@eunet.at> -// remove bar code from drivers and create a common bar library -// done somewhere in 2003 -mr - -// 2001-09-12 Carsten Nau <info@cnau.de> -// make the output for emails shorter (at the moment up to 9999 emails) -// done with the "Next Generation Layout" - -2001-09-13 Michael Reinelt <reinelt@eunet.at> -combine mail.c and mail2.c -if there's an error getting mail info, display "?" instead of "0" - -2001-09-14 Michael Reinelt <reinelt@eunet.at> -do not disable mail check in first error -instead use a number of retries -errors can occur in case of short disconnects, but normal operation -should resume - -2002-02-15 Udo Altmann (udo.altmann@web.de) -support for inversed/blinking text -don't know if displays support this feature... - -// 2003-09-08 Michael Reinelt (reinelt@eunet.at> -// at least one of my HD44780 displays use an inverted "P" instead of -// a full block. Therefore a bar my look strange. Make the ASCII code -// of the full block configurable... -// done with the "Next Generation Layout" -// see the "asc255bug" attribute - -// 2003-09-14 Markus <markus@norad.de> -// change %t tokens from Byte/sec to kB/sec, ith one decimal places. -// Either make it configurabel, or add new tokens. -// done with the "Next Generation Layout" - -// 2003-10-29 Matt Thrailkill <xwred1@modestolan.com> -// > To go off on another tangent... have you at all considered some sort of -// > marquee support? I toyed with the row scrolling support which was -// > recently added, and it is nifty. But marquees would be handy for doing -// > something like horizontally scrolling, say, the title of the currently -// > playing mp3. I've toyed with trying to dive in and add it, but I'm a -// > pretty lazy guy and haven't done it. What do you think? -// done with the "Next Generation Layout" - -2003-12-31 Stefan ??? <nef17@gmx.net> -add support for software-controlled backlight for HD44780 -http://www.jalcds.de/images/4x20backlight.gif - -2004-01-25 Michael Reinelt <reinelt@eunet.at> -add attribute "blinking" to text widgets - -2004-01-25 Xavier VELLO <xavier66@free.fr> -add "inverse" attribute to text widget -possible with Cwlinux and all graphics displays - -2004-01-25 Xavier VELLO <xavier66@free.fr> -add an "image" widget - -2004-01-25 Xavier VELLO <xavier66@free.fr> -icons should not only be updated regularly, but shown only when -a certain expression returns 1 - +# $Id: TODO 730 2007-01-14 13:50:28Z michael $ +# $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/TODO $ +Sorry, there is no TODO anymore. +Go to http://lcd4linux.bulix.org for all the documentation. diff --git a/ac_python_devel.m4 b/ac_python_devel.m4 index 6d67d4e..f68af7d 100644 --- a/ac_python_devel.m4 +++ b/ac_python_devel.m4 @@ -1,3 +1,7 @@ +dnl $Id: ac_python_devel.m4 729 2007-01-14 13:44:38Z michael $ +dnl $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/ac_python_devel.m4 $ + + dnl @synopsis AC_PYTHON_DEVEL([version]) dnl dnl Checks for Python and tries to get the include path to 'Python.h'. @@ -11,6 +11,1050 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +# iconv.m4 serial AM4 (gettext-0.11.3) +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include <stdlib.h> +#include <iconv.h>], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_func_iconv=yes) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include <stdlib.h> +#include <iconv.h>], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_lib_iconv=yes + am_cv_func_iconv=yes) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST(LIBICONV) + AC_SUBST(LTLIBICONV) +]) + +AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_TRY_COMPILE([ +#include <stdlib.h> +#include <iconv.h> +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([$]{ac_t:- + }[$]am_cv_proto_iconv) + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + [Define as const if the declaration of iconv() needs const.]) + fi +]) + +# lib-ld.m4 serial 3 (gettext-0.13) +dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Subroutines of libtool.m4, +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision +dnl with libtool.m4. + +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + acl_cv_prog_gnu_ld=yes ;; +*) + acl_cv_prog_gnu_ld=no ;; +esac]) +with_gnu_ld=$acl_cv_prog_gnu_ld +]) + +dnl From libtool-1.4. Sets the variable LD. +AC_DEFUN([AC_LIB_PROG_LD], +[AC_ARG_WITH(gnu-ld, +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(acl_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_LIB_PROG_LD_GNU +]) + +# lib-link.m4 serial 9 (gettext-0.16) +dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ(2.50) + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + undefine([Name]) + undefine([NAME]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. If found, it +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIB[]NAME" + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + undefine([Name]) + undefine([NAME]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, +dnl hardcode_direct, hardcode_minus_L. +AC_DEFUN([AC_LIB_RPATH], +[ + dnl Tell automake >= 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib$1-prefix], +[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib$1-prefix don't search for lib$1 in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" \ + && { test -f "$additional_libdir/lib$name.$shlibext" \ + || { test "$shlibext" = dll \ + && test -f "$additional_libdir/lib$name.dll.a"; }; }; then + found_dir="$additional_libdir" + if test -f "$additional_libdir/lib$name.$shlibext"; then + found_so="$additional_libdir/lib$name.$shlibext" + else + found_so="$additional_libdir/lib$name.dll.a" + fi + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" \ + && { test -f "$dir/lib$name.$shlibext" \ + || { test "$shlibext" = dll \ + && test -f "$dir/lib$name.dll.a"; }; }; then + found_dir="$dir" + if test -f "$dir/lib$name.$shlibext"; then + found_so="$dir/lib$name.$shlibext" + else + found_so="$dir/lib$name.dll.a" + fi + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) + +# lib-prefix.m4 serial 5 (gettext-0.15) +dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't +dnl require excessive bracketing. +ifdef([AC_HELP_STRING], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing +dnl the basename of the libdir, either "lib" or "lib64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + acl_libdirstem=lib + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi +]) + # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation diff --git a/bootstrap b/bootstrap deleted file mode 100755 index 58020f9..0000000 --- a/bootstrap +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# exit on errors -set -e - -# set nicer prompt for tracing -PS4="$0:\$LINENO> " -set -x - -aclocal -# libtoolize --copy --force -autoheader -automake --add-missing --copy --foreign -autoconf - @@ -1,4 +1,6 @@ -/* $Id: cfg.c,v 1.49 2006/02/07 05:36:13 reinelt Exp $^ +/* $Id: cfg.c 750 2007-01-20 06:58:56Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/cfg.c $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/cfg.c $ * * config file stuff * @@ -21,221 +23,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: cfg.c,v $ - * Revision 1.49 2006/02/07 05:36:13 reinelt - * Layers added to Layout - * - * Revision 1.48 2006/01/30 12:53:07 reinelt - * replaced strncpy with strcpy where possible - * - * Revision 1.47 2005/05/08 04:32:43 reinelt - * CodingStyle added and applied - * - * Revision 1.46 2005/05/02 05:15:46 reinelt - * make busy-flag checking configurable for LCD-Linux driver - * - * Revision 1.45 2005/01/18 06:30:21 reinelt - * added (C) to all copyright statements - * - * Revision 1.44 2005/01/17 06:29:24 reinelt - * added software-controlled backlight support to HD44780 - * - * Revision 1.43 2004/11/29 04:42:06 reinelt - * removed the 99999 msec limit on widget update time (thanks to Petri Damsten) - * - * Revision 1.42 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.41 2004/06/26 09:27:20 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.40 2004/06/20 10:09:52 reinelt - * - * 'const'ified the whole source - * - * Revision 1.39 2004/03/11 06:39:58 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.38 2004/03/08 16:26:26 reinelt - * re-introduced \nnn (octal) characters in strings - * text widgets can have a 'update' speed of 0 which means 'never' - * (may be used for static content) - * - * Revision 1.37 2004/03/06 20:31:16 reinelt - * Complete rewrite of the evaluator to get rid of the code - * from mark Morley (because of license issues). - * The new Evaluator does a pre-compile of expressions, and - * stores them in trees. Therefore it should be reasonable faster... - * - * Revision 1.36 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.35 2004/03/01 04:29:51 reinelt - * cfg_number() returns -1 on error, 0 if value not found (but default val used), - * and 1 if value was used from the configuration. - * HD44780 driver adopted to new cfg_number() - * Crystalfontz 631 driver nearly finished - * - * Revision 1.34 2004/02/18 06:39:20 reinelt - * T6963 driver for graphic displays finished - * - * Revision 1.33 2004/02/01 18:08:50 reinelt - * removed strtok() from layout processing (took me hours to find this bug) - * further strtok() removind should be done! - * - * 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 - * - * Revision 1.30 2004/01/22 07:57:45 reinelt - * several bugs fixed where segfaulting on layout>display - * Crystalfontz driver optimized, 632 display already works - * - * Revision 1.29 2004/01/18 06:54:08 reinelt - * bug in expr.c fixed (thanks to Xavier) - * some progress with /proc/stat parsing - * - * Revision 1.28 2004/01/16 05:04:53 reinelt - * started plugin proc_stat which should parse /proc/stat - * which again is a paint in the a** - * thinking over implementation methods of delta functions - * (CPU load, ...) - * - * Revision 1.27 2004/01/14 11:33:00 reinelt - * new plugin 'uname' which does what it's called - * text widget nearly finished - * first results displayed on MatrixOrbital - * - * Revision 1.26 2004/01/11 18:26:02 reinelt - * further widget and layout processing - * - * Revision 1.25 2004/01/11 09:26:15 reinelt - * layout starts to exist... - * - * Revision 1.24 2004/01/10 20:22:33 reinelt - * added new function 'cfg_list()' (not finished yet) - * added layout.c (will replace processor.c someday) - * added widget_text.c (will be the first and most important widget) - * modified lcd4linux.c so that old-style configs should work, too - * - * Revision 1.23 2004/01/09 04:16:06 reinelt - * added 'section' argument to cfg_get(), but NULLed it on all calls by now. - * - * Revision 1.22 2004/01/08 06:00:28 reinelt - * allowed '.' in key names - * allowed empty section keys (not only "section anything {", but "anything {") - * - * Revision 1.21 2004/01/08 05:28:12 reinelt - * Luk Claes added to AUTHORS - * cfg: section handling ('{}') added - * - * Revision 1.20 2004/01/07 10:15:41 reinelt - * small glitch in evaluator fixed - * made config table sorted and access with bsearch(), - * which should be much faster - * - * Revision 1.19 2003/12/19 05:35:14 reinelt - * renamed 'client' to 'plugin' - * - * Revision 1.18 2003/10/11 06:01:52 reinelt - * - * renamed expression.{c,h} to client.{c,h} - * added config file client - * new functions 'AddNumericVariable()' and 'AddStringVariable()' - * new parameter '-i' for interactive mode - * - * Revision 1.17 2003/10/05 17:58:50 reinelt - * libtool junk; copyright messages cleaned up - * - * Revision 1.16 2003/09/09 06:54:43 reinelt - * new function 'cfg_number()' - * - * Revision 1.15 2003/08/24 05:17:58 reinelt - * liblcd4linux patch from Patrick Schemitz - * - * Revision 1.14 2003/08/14 03:47:40 reinelt - * remove PID file if driver initialisation fails - * - * Revision 1.13 2003/02/22 07:53:10 reinelt - * cfg_get(key,defval) - * - * Revision 1.12 2001/03/09 12:14:24 reinelt - * - * minor cleanups - * - * Revision 1.11 2001/03/08 15:25:38 ltoetsch - * improved exec - * - * Revision 1.10 2001/03/07 18:10:21 ltoetsch - * added e(x)ec commands - * - * Revision 1.9 2000/08/10 09:44:09 reinelt - * - * new debugging scheme: error(), info(), debug() - * uses syslog if in daemon mode - * - * Revision 1.8 2000/07/31 06:46:35 reinelt - * - * eliminated some compiler warnings with glibc - * - * Revision 1.7 2000/04/15 11:13:54 reinelt - * - * added '-d' (debugging) switch - * added several debugging messages - * removed config entry 'Delay' for HD44780 driver - * delay loop for HD44780 will be calibrated automatically - * - * Revision 1.6 2000/04/03 04:46:38 reinelt - * - * added '-c key=val' option - * - * Revision 1.5 2000/03/28 07:22:15 reinelt - * - * version 0.95 released - * X11 driver up and running - * minor bugs fixed - * - * Revision 1.4 2000/03/26 20:00:44 reinelt - * - * README.Raster added - * - * Revision 1.3 2000/03/26 19:03:52 reinelt - * - * more Pixmap renaming - * quoting of '#' in config file - * - * Revision 1.2 2000/03/10 17:36:02 reinelt - * - * first unstable but running release - * - * Revision 1.1 2000/03/10 11:40:47 reinelt - * *** empty log message *** - * - * Revision 1.3 2000/03/07 11:01:34 reinelt - * - * system.c cleanup - * - * Revision 1.2 2000/03/06 06:04:06 reinelt - * - * minor cleanups - * */ /* @@ -564,6 +351,7 @@ char *cfg_get_raw(const char *section, const char *key, const char *defval) if (val != NULL) return val; + return (char *) defval; } @@ -625,13 +413,13 @@ int cfg_number(const char *section, const char *key, const int defval, const int DelResult(&result); if (*value < min) { - error("bad '%s' value '%d' in %s, minimum is %d", key, *value, cfg_source(), min); + error("bad '%s.%s' value '%d' in %s, minimum is %d", section, key, *value, cfg_source(), min); *value = min; return -1; } if (max > min && max != -1 && *value > max) { - error("bad '%s' value '%d' in %s, maximum is %d", key, *value, cfg_source(), max); + error("bad '%s.%s' value '%d' in %s, maximum is %d", section, key, *value, cfg_source(), max); *value = max; return -1; } @@ -1,4 +1,5 @@ -/* $Id: cfg.h,v 1.13 2005/05/08 04:32:43 reinelt Exp $ +/* $Id: cfg.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/cfg.h $ * * config file stuff * @@ -21,60 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: cfg.h,v $ - * Revision 1.13 2005/05/08 04:32:43 reinelt - * CodingStyle added and applied - * - * Revision 1.12 2005/01/18 06:30:21 reinelt - * added (C) to all copyright statements - * - * Revision 1.11 2004/06/20 10:09:53 reinelt - * - * 'const'ified the whole source - * - * 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 - * first results displayed on MatrixOrbital - * - * Revision 1.8 2004/01/10 20:22:33 reinelt - * added new function 'cfg_list()' (not finished yet) - * added layout.c (will replace processor.c someday) - * added widget_text.c (will be the first and most important widget) - * modified lcd4linux.c so that old-style configs should work, too - * - * Revision 1.7 2004/01/09 04:16:06 reinelt - * added 'section' argument to cfg_get(), but NULLed it on all calls by now. - * - * Revision 1.6 2003/10/05 17:58:50 reinelt - * libtool junk; copyright messages cleaned up - * - * Revision 1.5 2003/09/09 06:54:43 reinelt - * new function 'cfg_number()' - * - * Revision 1.4 2003/08/24 05:17:58 reinelt - * liblcd4linux patch from Patrick Schemitz - * - * Revision 1.3 2003/02/22 07:53:10 reinelt - * cfg_get(key,defval) - * - * Revision 1.2 2000/04/03 04:46:38 reinelt - * - * added '-c key=val' option - * - * Revision 1.1 2000/03/10 11:40:47 reinelt - * *** empty log message *** - * - * Revision 1.2 2000/03/06 06:04:06 reinelt - * - * minor cleanups - * - * */ #ifndef _CFG_H_ diff --git a/config.guess b/config.guess index 396482d..51fab47 100755 --- a/config.guess +++ b/config.guess @@ -1,10 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2006-07-02' +timestamp='2004-03-12' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -18,15 +17,13 @@ timestamp='2006-07-02' # # 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., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. - # Originally written by Per Bothner <per@bothner.com>. # Please send patches to <config-patches@gnu.org>. Submit a context # diff and a properly formatted ChangeLog entry. @@ -56,7 +53,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -69,11 +66,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; + echo "$timestamp" ; exit 0 ;; --version | -v ) - echo "$version" ; exit ;; + echo "$version" ; exit 0 ;; --help | --h* | -h ) - echo "$usage"; exit ;; + echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -107,7 +104,7 @@ set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -126,7 +123,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -199,23 +196,64 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit ;; + exit 0 ;; + amd64:OpenBSD:*:*) + echo x86_64-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + cats:OpenBSD:*:*) + echo arm-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pegasos:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; + exit 0 ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; + exit 0 ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -268,43 +306,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit ;; + exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit ;; + exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit ;; + exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; + exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit ;; + exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + exit 0 ;; *:OS400:*:*) echo powerpc-ibm-os400 - exit ;; + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit ;; + exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -312,32 +347,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in else echo pyramid-pyramid-bsd fi - exit ;; + exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit ;; + exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; + sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -346,10 +381,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; + exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; + exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -361,10 +396,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit ;; + exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; + exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -375,40 +410,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} - exit ;; + exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; + exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit ;; + exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; + exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; + exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; + exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -432,33 +467,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 echo mips-mips-riscos${UNAME_RELEASE} - exit ;; + exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit ;; + exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit ;; + exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit ;; + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit ;; + exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit ;; + exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit ;; + exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit ;; + exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -474,29 +508,29 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit ;; + exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit ;; + exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit ;; + exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit ;; + exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; + exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit ;; + exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -504,7 +538,7 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; + exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -519,18 +553,14 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit ;; + exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then @@ -544,28 +574,28 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; + exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix - exit ;; + exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit ;; + exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit ;; + exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit ;; + exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit ;; + exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit ;; + exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -627,19 +657,9 @@ EOF esac if [ ${HP_ARCH} = "hppa2.0w" ] then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -647,11 +667,11 @@ EOF fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; + exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit ;; + exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -679,179 +699,166 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 - exit ;; + exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit ;; + exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit ;; + exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit ;; + exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit ;; + exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit ;; + exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit ;; + exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit ;; + exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + exit 0 ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; + exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; + exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; + exit 0 ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <features.h> + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + # GNU/KFreeBSD systems have a "k" prefix to indicate we are using + # FreeBSD's kernel, but not the complete OS. + case ${LIBC} in gnu) kernel_only='k' ;; esac + echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit ;; + exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; + exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; + exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit ;; + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit ;; + exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; + exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit ;; + exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; + exit 0 ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; + exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit ;; + exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; + exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -868,12 +875,8 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -891,22 +894,15 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu - exit ;; + exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu - exit ;; + exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -920,7 +916,7 @@ EOF objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; + exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -928,28 +924,25 @@ EOF PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit ;; + exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu - exit ;; + exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit ;; + exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; + exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu - exit ;; + exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -967,15 +960,15 @@ EOF ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; + exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; + exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; + exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -992,7 +985,7 @@ EOF LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout @@ -1002,23 +995,16 @@ EOF LIBC=dietlibc #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit ;; + exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -1026,27 +1012,27 @@ EOF # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; + exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; + exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit ;; + exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) + exit 0 ;; + i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable - exit ;; + exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; + exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -1054,16 +1040,15 @@ EOF else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + exit 0 ;; + i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; + exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` @@ -1081,73 +1066,73 @@ EOF else echo ${UNAME_MACHINE}-pc-sysv32 fi - exit ;; + exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp - exit ;; + exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 - exit ;; + exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 - exit ;; + exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit ;; + exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit ;; + exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit ;; + exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit ;; + exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit ;; + exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit ;; + exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit ;; + exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1155,72 +1140,68 @@ EOF else echo ns32k-sni-sysv fi - exit ;; + exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says <Richard.M.Bartel@ccMail.Census.GOV> echo i586-unisys-sysv4 - exit ;; + exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit ;; + exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; + exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit ;; + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit ;; + exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit ;; + exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit ;; + exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit ;; + exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit ;; + exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit ;; + exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit ;; + exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit ;; + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; + exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; + exit 0 ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; + exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1228,25 +1209,22 @@ EOF UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; + exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; + exit 0 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; + exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit ;; + exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit ;; + exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; + exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1257,47 +1235,31 @@ EOF UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; + exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit ;; + exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit ;; + exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit ;; + exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit ;; + exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit ;; + exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its - exit ;; + exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} - exit ;; + exit 0 ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1329,7 +1291,7 @@ main () #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); + printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1418,12 +1380,11 @@ main () } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) @@ -1432,22 +1393,22 @@ then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit ;; + exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit 0 ;; c34*) echo c34-convex-bsd - exit ;; + exit 0 ;; c38*) echo c38-convex-bsd - exit ;; + exit 0 ;; c4*) echo c4-convex-bsd - exit ;; + exit 0 ;; esac fi @@ -1458,9 +1419,7 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess -and - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub + ftp://ftp.gnu.org/pub/gnu/config/ If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/config.h.in b/config.h.in index 625293b..ed264ef 100644 --- a/config.h.in +++ b/config.h.in @@ -43,6 +43,9 @@ /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY +/* Define if you have the iconv() function. */ +#undef HAVE_ICONV + /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H @@ -73,6 +76,9 @@ /* Define to 1 if you have the <luise.h> header file. */ #undef HAVE_LUISE_H +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -103,6 +109,9 @@ /* Define to 1 if you have the `regcomp' function. */ #undef HAVE_REGCOMP +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + /* Define to 1 if you have the <serdisplib/serdisp.h> header file. */ #undef HAVE_SERDISPLIB_SERDISP_H @@ -164,6 +173,9 @@ /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL +/* Define to 1 if you have the `strtoul' function. */ +#undef HAVE_STRTOUL + /* Define to 1 if you have the <syslog.h> header file. */ #undef HAVE_SYSLOG_H @@ -181,6 +193,9 @@ */ #undef HAVE_SYS_NDIR_H +/* Define to 1 if you have the <sys/select.h> header file. */ +#undef HAVE_SYS_SELECT_H + /* Define to 1 if you have the <sys/socket.h> header file. */ #undef HAVE_SYS_SOCKET_H @@ -226,6 +241,9 @@ /* Define to 1 if you have the <X11/Xutil.h> header file. */ #undef HAVE_X11_XUTIL_H +/* Define as const if the declaration of iconv() needs const. */ +#undef ICONV_CONST + /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK @@ -275,6 +293,9 @@ /* i2c sensors plugin */ #undef PLUGIN_I2C_SENSORS +/* iconv charset converter plugin */ +#undef PLUGIN_ICONV + /* imon plugin */ #undef PLUGIN_IMON @@ -338,6 +359,15 @@ /* Define if you want to turn on SCO-specific code */ #undef SCO_FLAVOR +/* Define to the type of arg 1 for `select'. */ +#undef SELECT_TYPE_ARG1 + +/* Define to the type of args 2, 3 and 4 for `select'. */ +#undef SELECT_TYPE_ARG234 + +/* Define to the type of arg 5 for `select'. */ +#undef SELECT_TYPE_ARG5 + /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -374,6 +404,9 @@ /* Define if using the dmalloc debugging malloc package */ #undef WITH_DMALLOC +/* Electronic Assembly RS232 graphic driver */ +#undef WITH_EA232graphic + /* G-15 driver */ #undef WITH_G15 @@ -419,6 +452,9 @@ /* NULL driver */ #undef WITH_NULL +/* parport bus driver */ +#undef WITH_PARPORT + /* PNG driver */ #undef WITH_PNG @@ -434,6 +470,9 @@ /* serdisplib driver */ #undef WITH_SERDISPLIB +/* serial bus driver */ +#undef WITH_SERIAL + /* SimpleLCD driver */ #undef WITH_SIMPLELCD @@ -455,6 +494,9 @@ /* X11 driver */ #undef WITH_X11 +/* picoLCD driver */ +#undef WITH_picoLCD + /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING @@ -1,10 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2006-07-02' +timestamp='2004-03-12' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -22,15 +21,14 @@ timestamp='2006-07-02' # # 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., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. - # Please send patches to <config-patches@gnu.org>. Submit a context # diff and a properly formatted ChangeLog entry. # @@ -72,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -85,11 +83,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; + echo "$timestamp" ; exit 0 ;; --version | -v ) - echo "$version" ; exit ;; + echo "$version" ; exit 0 ;; --help | --h* | -h ) - echo "$usage"; exit ;; + echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -101,7 +99,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. echo $1 - exit ;; + exit 0;; * ) break ;; @@ -120,9 +118,8 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -148,7 +145,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis) os= basic_machine=$1 ;; @@ -173,10 +170,6 @@ case $os in -hiux*) os=-hiuxwe2 ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -193,10 +186,6 @@ case $os in # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -241,16 +230,14 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ + | m32r | m32rle | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -259,7 +246,6 @@ case $basic_machine in | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ @@ -268,23 +254,20 @@ case $basic_machine in | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ - | mt \ | msp430 \ - | nios | nios2 \ | ns16k | ns32k \ - | or32 \ + | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; @@ -295,9 +278,6 @@ case $basic_machine in ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; - ms1) - basic_machine=mt-unknown - ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -317,10 +297,10 @@ case $basic_machine in | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ + | avr-* \ + | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ + | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ @@ -328,9 +308,9 @@ case $basic_machine in | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ + | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ + | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -339,7 +319,6 @@ case $basic_machine in | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ @@ -347,28 +326,24 @@ case $basic_machine in | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ | ymp-* \ | z8k-*) ;; @@ -470,10 +445,6 @@ case $basic_machine in basic_machine=j90-cray os=-unicos ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; cr16c) basic_machine=cr16c-unknown os=-elf @@ -481,9 +452,6 @@ case $basic_machine in crds | unos) basic_machine=m68k-crds ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; @@ -513,10 +481,6 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx @@ -695,6 +659,10 @@ case $basic_machine in mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -707,9 +675,6 @@ case $basic_machine in basic_machine=i386-pc os=-msdos ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; mvs) basic_machine=i370-ibm os=-mvs @@ -778,6 +743,10 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -785,8 +754,9 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; - openrisc | openrisc-*) + or32 | or32-*) basic_machine=or32-unknown + os=-coff ;; os400) basic_machine=powerpc-ibm @@ -817,12 +787,6 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -879,10 +843,6 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -1069,10 +1029,6 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; xps | xps100) basic_machine=xps100-honeywell ;; @@ -1103,9 +1059,6 @@ case $basic_machine in romp) basic_machine=romp-ibm ;; - mmix) - basic_machine=mmix-knuth - ;; rs6000) basic_machine=rs6000-ibm ;; @@ -1122,10 +1075,13 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -1198,23 +1154,20 @@ case $os in | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1232,7 +1185,7 @@ case $os in os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) @@ -1341,9 +1294,6 @@ case $os in -kaos*) os=-kaos ;; - -zvmoe) - os=-zvmoe - ;; -none) ;; *) @@ -1366,9 +1316,6 @@ else # system, and we'll never get to this point. case $basic_machine in - spu-*) - os=-elf - ;; *-acorn) os=-riscix1.2 ;; @@ -1378,9 +1325,9 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1424,15 +1371,9 @@ case $basic_machine in *-be) os=-beos ;; - *-haiku) - os=-haiku - ;; *-ibm) os=-aix ;; - *-knuth) - os=-mmixware - ;; *-wec) os=-proelf ;; @@ -1598,7 +1539,7 @@ case $basic_machine in esac echo $basic_machine$os -exit +exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for LCD4Linux 0.10.1-CVS. +# Generated by GNU Autoconf 2.61 for LCD4Linux 0.10.1-RC1. # # Report bugs to <lcd4linux-users@lists.sourceforge.net>. # @@ -12,7 +12,8 @@ ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -21,10 +22,13 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + + # PATH needs CR @@ -217,7 +221,7 @@ test \$exitcode = 0) || { (exit 1); exit 1; } else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -235,7 +239,6 @@ IFS=$as_save_IFS # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF -# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -244,10 +247,12 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + : _ASEOF @@ -255,7 +260,6 @@ _ASEOF CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF -# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -264,10 +268,12 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + : (as_func_return () { @@ -514,19 +520,28 @@ else as_mkdir_p=false fi -# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - as_executable_p=: + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi -rm -f conf$$.file +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -559,44 +574,44 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='LCD4Linux' PACKAGE_TARNAME='lcd4linux' -PACKAGE_VERSION='0.10.1-CVS' -PACKAGE_STRING='LCD4Linux 0.10.1-CVS' +PACKAGE_VERSION='0.10.1-RC1' +PACKAGE_STRING='LCD4Linux 0.10.1-RC1' PACKAGE_BUGREPORT='lcd4linux-users@lists.sourceforge.net' ac_unique_file="lcd4linux.c" # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include <stdlib.h> # include <stddef.h> #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include <stdlib.h> # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include <memory.h> # endif # include <string.h> #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include <strings.h> #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include <inttypes.h> #endif -#if HAVE_STDINT_H +#ifdef HAVE_STDINT_H # include <stdint.h> #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include <unistd.h> #endif" @@ -694,6 +709,16 @@ PYTHON_EXTRA_LIBS PYTHON_EXTRA_LDFLAGS DRIVERS DRVLIBS +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +LIBICONV +LTLIBICONV PLUGINS PLUGINLIBS LIBOBJS @@ -706,6 +731,7 @@ target_alias CC CFLAGS LDFLAGS +LIBS CPPFLAGS CPP XMKMF @@ -815,10 +841,10 @@ do -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) @@ -834,10 +860,10 @@ do -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ @@ -1031,19 +1057,19 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) @@ -1212,7 +1238,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures LCD4Linux 0.10.1-CVS to adapt to many kinds of systems. +\`configure' configures LCD4Linux 0.10.1-RC1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1277,12 +1303,16 @@ 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] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of LCD4Linux 0.10.1-CVS:";; + short | recursive ) echo "Configuration of LCD4Linux 0.10.1-RC1:";; esac cat <<\_ACEOF @@ -1291,6 +1321,7 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --disable-rpath do not hardcode runtime library paths Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1313,18 +1344,22 @@ Optional Packages: BeckmannEgle, BWCT, CrystalFontz, Curses, Cwlinux, G15, HD44780, LCD2USB LCDLinux, LCDTerm, LPH7508, LUIse, M50530, MatrixOrbital, MilfordInstruments, - Noritake, NULL, PNG, PPM, RouterBoard, Sample, + Noritake, NULL, PNG, PPM, picoLCD, RouterBoard, Sample, serdisplib, SimpleLCD, T6963, Trefon, USBLCD, USBHUB, WincorNixdorf, X11 --with-plugins=<list> choose which plugins to compile. type --with-plugins=list for a list of avaible plugins + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir Some influential environment variables: CC C compiler command CFLAGS C compiler flags 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 C/C++/Objective C preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor @@ -1398,8 +1433,8 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -LCD4Linux configure 0.10.1-CVS -generated by GNU Autoconf 2.60 +LCD4Linux configure 0.10.1-RC1 +generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -1412,8 +1447,8 @@ cat >config.log <<_ACEOF 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.10.1-CVS, which was -generated by GNU Autoconf 2.60. Invocation command line was +It was created by LCD4Linux $as_me 0.10.1-RC1, which was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1834,7 +1869,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2000,7 +2035,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2083,7 +2118,7 @@ fi # Define the identity of the package. PACKAGE=lcd4linux - VERSION=0.10.1-CVS + VERSION=0.10.1-RC1 cat >>confdefs.h <<_ACEOF @@ -2135,7 +2170,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2175,7 +2210,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2255,7 +2290,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2295,7 +2330,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2352,7 +2387,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2393,7 +2428,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2451,7 +2486,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2495,7 +2530,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2636,7 +2671,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. -for ac_file in $ac_files +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in @@ -2664,6 +2699,12 @@ done test "$ac_cv_exeext" = no && ac_cv_exeext= else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2675,8 +2716,6 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. @@ -2854,27 +2893,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -2929,27 +2951,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -2984,27 +2989,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -3040,27 +3028,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -3176,27 +3147,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 @@ -3459,17 +3413,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3503,17 +3450,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -3578,17 +3518,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3622,17 +3555,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -3701,7 +3627,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -3859,27 +3785,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_m_log=yes else echo "$as_me: failed program was:" >&5 @@ -3888,7 +3798,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_log=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -3928,6 +3838,8 @@ fi + + { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then @@ -3949,7 +3861,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4031,7 +3943,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4516,7 +4428,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 4519 "configure" +#line 4431 "configure" #include "confdefs.h" #ifdef RENAMED_NCURSES #include <curses.h> @@ -4686,17 +4598,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # We can compile using X headers with no special include directory. ac_x_includes= else @@ -4719,7 +4624,7 @@ if test "$ac_x_libraries" = no; then # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lXt $LIBS" + LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4748,27 +4653,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= @@ -4781,7 +4670,7 @@ for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do - if test -r "$ac_dir/libXt.$ac_extension"; then + if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi @@ -4789,7 +4678,7 @@ do done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no @@ -4844,12 +4733,12 @@ else X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 + { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; } - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - cat >conftest.$ac_ext <<_ACEOF + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + ac_xsave_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4877,44 +4766,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_R_nospace=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + X_LIBS="$X_LIBS -R$x_libraries" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_R_nospace=no -fi - -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test $ac_R_nospace = yes; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - X_LIBS="$X_LIBS -R$x_libraries" - else LIBS="$ac_xsave_LIBS -R $x_libraries" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4942,48 +4807,30 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_R_space=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + X_LIBS="$X_LIBS -R $x_libraries" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_R_space=no + { echo "$as_me:$LINENO: result: neither works" >&5 +echo "${ECHO_T}neither works" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - if test $ac_R_space = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - X_LIBS="$X_LIBS -R $x_libraries" - else - { echo "$as_me:$LINENO: result: neither works" >&5 -echo "${ECHO_T}neither works" >&6; } - fi - fi - LIBS=$ac_xsave_LIBS - esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_c_werror_flag=$ac_xsave_c_werror_flag + LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. @@ -5032,27 +4879,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then : else echo "$as_me: failed program was:" >&5 @@ -5100,27 +4931,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dnet_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 @@ -5129,7 +4944,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_dnet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5182,27 +4997,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 @@ -5211,7 +5010,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_stub_dnet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5224,7 +5023,7 @@ fi fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" @@ -5299,27 +5098,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 @@ -5328,7 +5111,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 @@ -5377,27 +5160,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 @@ -5406,7 +5173,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5459,27 +5226,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gethostbyname=yes else echo "$as_me: failed program was:" >&5 @@ -5488,7 +5239,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_gethostbyname=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5571,27 +5322,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 @@ -5600,7 +5335,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_connect=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 @@ -5649,27 +5384,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 @@ -5678,7 +5397,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5754,27 +5473,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_remove=yes else echo "$as_me: failed program was:" >&5 @@ -5783,7 +5486,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_remove=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 @@ -5832,27 +5535,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_posix_remove=yes else echo "$as_me: failed program was:" >&5 @@ -5861,7 +5548,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_posix_remove=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5937,27 +5624,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_shmat=yes else echo "$as_me: failed program was:" >&5 @@ -5966,7 +5637,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shmat=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 @@ -6015,27 +5686,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ipc_shmat=yes else echo "$as_me: failed program was:" >&5 @@ -6044,7 +5699,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ipc_shmat=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -6108,27 +5763,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ICE_IceConnectionNumber=yes else echo "$as_me: failed program was:" >&5 @@ -6137,7 +5776,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_IceConnectionNumber=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -6190,27 +5829,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 @@ -6386,27 +6008,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 @@ -6470,27 +6075,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -6526,17 +6114,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6651,27 +6232,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -6707,17 +6271,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6824,27 +6381,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -6880,17 +6420,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6997,27 +6530,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -7053,17 +6569,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -7170,27 +6679,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -7226,17 +6718,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -7344,27 +6829,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -7400,17 +6868,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -7495,6 +6956,8 @@ if test "$with_python" = "yes"; then + + # # Allow the use of a (user set) custom python version # @@ -7518,7 +6981,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7727,6 +7190,8 @@ fi # drivers + + { echo "$as_me:$LINENO: checking which drivers to compile" >&5 echo $ECHO_N "checking which drivers to compile... $ECHO_C" >&6; } @@ -7760,6 +7225,7 @@ for driver in $drivers; do CRYSTALFONTZ="yes" CURSES="yes" CWLINUX="yes" + EA232graphic="yes" G15="yes" HD44780="yes" LCD2USB="yes" @@ -7773,9 +7239,10 @@ for driver in $drivers; do MILINST="yes" NORITAKE="yes" NULL="yes" + picoLCD="yes" PNG="yes" PPM="yes" - ROUTERBOARD="yes" + ROUTERBOARD="yes" SAMPLE="yes" SERDISPLIB="yes" SIMPLELCD="yes" @@ -7801,12 +7268,18 @@ for driver in $drivers; do Cwlinux) CWLINUX=$val ;; + EA232graphic) + EA232graphic=$val + ;; G15) G15=$val ;; HD44780) HD44780=$val ;; + HD44780-I2C) + HD44780_I2C=$val + ;; LCD2USB) LCD2USB=$val ;; @@ -7840,6 +7313,9 @@ for driver in $drivers; do NULL) NULL=$val; ;; + picoLCD) + picoLCD=$val + ;; PNG) PNG=$val ;; @@ -7974,6 +7450,18 @@ _ACEOF fi +if test "$EA232graphic" = "yes"; then + GRAPHIC="yes" + SERIAL="yes" + GPIO="yes" + DRIVERS="$DRIVERS drv_EA232graphic.o" + +cat >>confdefs.h <<\_ACEOF +#define WITH_EA232graphic 1 +_ACEOF + +fi + if test "$G15" = "yes"; then if test "$has_usb" = "true"; then GRAPHIC="yes" @@ -8003,6 +7491,18 @@ _ACEOF fi +if test "$HD44780_I2C" = "yes"; then + TEXT="yes" + I2C="yes" + GPIO="yes" + DRIVERS="$DRIVERS drv_HD44780.o" + +cat >>confdefs.h <<\_ACEOF +#define WITH_HD44780 1 +_ACEOF + +fi + if test "$LCD2USB" = "yes"; then if test "$has_usb" = "true"; then TEXT="yes" @@ -8048,7 +7548,7 @@ _ACEOF fi if test "$LEDMATRIX" = "yes"; then - GRAPHICS="yes" + GRAPHIC="yes" DRIVERS="$DRIVERS drv_LEDMatrix.o" cat >>confdefs.h <<\_ACEOF @@ -8058,7 +7558,7 @@ _ACEOF fi if test "$LPH7508" = "yes"; then - GRAPHICS="yes" + GRAPHIC="yes" GPIO="yes" PARPORT="yes" DRIVERS="$DRIVERS drv_LPH7508.o" @@ -8133,6 +7633,7 @@ _ACEOF fi if test "$NULL" = "yes"; then + TEXT="yes" DRIVERS="$DRIVERS drv_NULL.o" cat >>confdefs.h <<\_ACEOF @@ -8141,6 +7642,23 @@ _ACEOF fi +if test "$picoLCD" = "yes"; then + if test "$has_usb" = "true"; then + TEXT="yes" + GPIO="yes" + SERIAL="yes" + DRIVERS="$DRIVERS drv_picoLCD.o" + +cat >>confdefs.h <<\_ACEOF +#define WITH_picoLCD 1 +_ACEOF + + else + { echo "$as_me:$LINENO: WARNING: usb.h not found: picoLCD driver disabled" >&5 +echo "$as_me: WARNING: usb.h not found: picoLCD driver disabled" >&2;} + fi +fi + if test "$PNG" = "yes"; then if test "$has_gd" = "true"; then IMAGE="yes" @@ -8313,6 +7831,12 @@ _ACEOF fi +# Image driver +if test "$IMAGE" = "yes"; then + GRAPHIC="yes" + DRIVERS="$DRIVERS drv_Image.o" +fi + if test "$DRIVERS" = ""; then { { echo "$as_me:$LINENO: error: You should activate at least one driver..." >&5 echo "$as_me: error: You should activate at least one driver..." >&2;} @@ -8324,12 +7848,6 @@ if test "$TEXT" = "yes"; then DRIVERS="$DRIVERS drv_generic_text.o" fi -# Image driver -if test "$IMAGE" = "yes"; then - GRAPHIC="yes" - DRIVERS="$DRIVERS drv_Image.o" -fi - # generic graphic driver if test "$GRAPHIC" = "yes"; then DRIVERS="$DRIVERS drv_generic_graphic.o" @@ -8352,11 +7870,21 @@ fi # generic parport driver if test "$PARPORT" = "yes"; then DRIVERS="$DRIVERS drv_generic_parport.o" + +cat >>confdefs.h <<\_ACEOF +#define WITH_PARPORT 1 +_ACEOF + fi # generic serial driver if test "$SERIAL" = "yes"; then DRIVERS="$DRIVERS drv_generic_serial.o" + +cat >>confdefs.h <<\_ACEOF +#define WITH_SERIAL 1 +_ACEOF + fi # generic i2c driver @@ -8385,6 +7913,8 @@ fi # plugins + + { echo "$as_me:$LINENO: checking which plugins to compile" >&5 echo $ECHO_N "checking which plugins to compile... $ECHO_C" >&6; } @@ -8427,6 +7957,7 @@ echo "$as_me: error: run ./configure --with-plugins=..." >&2;} PLUGIN_EXEC="yes" PLUGIN_FILE="yes" PLUGIN_I2C_SENSORS="yes" + PLUGIN_ICONV="yes" PLUGIN_IMON="yes" PLUGIN_ISDN="yes" PLUGIN_KVV="yes" @@ -8468,6 +7999,9 @@ echo "$as_me: error: run ./configure --with-plugins=..." >&2;} i2c_sensors) PLUGIN_I2C_SENSORS=$val ;; + iconv) + PLUGIN_ICONV=$val + ;; imon) PLUGIN_IMON=$val ;; @@ -8599,27 +8133,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -8655,17 +8172,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8768,6 +8278,918 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi +if test "$PLUGIN_ICONV" = "yes"; then + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${acl_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + { echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${acl_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + acl_cv_prog_gnu_ld=yes ;; +*) + acl_cv_prog_gnu_ld=no ;; +esac +fi +{ echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + + { echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; } +if test "${acl_cv_rpath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +{ echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +echo "${ECHO_T}$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval=$enable_rpath; : +else + enable_rpath=yes +fi + + + + acl_libdirstem=lib + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi + +fi + + LIBICONV= + LTLIBICONV= + INCICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" \ + && { test -f "$additional_libdir/lib$name.$shlibext" \ + || { test "$shlibext" = dll \ + && test -f "$additional_libdir/lib$name.dll.a"; }; }; then + found_dir="$additional_libdir" + if test -f "$additional_libdir/lib$name.$shlibext"; then + found_so="$additional_libdir/lib$name.$shlibext" + else + found_so="$additional_libdir/lib$name.dll.a" + fi + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" \ + && { test -f "$dir/lib$name.$shlibext" \ + || { test "$shlibext" = dll \ + && test -f "$dir/lib$name.dll.a"; }; }; then + found_dir="$dir" + if test -f "$dir/lib$name.$shlibext"; then + found_so="$dir/lib$name.$shlibext" + else + found_so="$dir/lib$name.dll.a" + fi + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { echo "$as_me:$LINENO: checking for iconv" >&5 +echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } +if test "${am_cv_func_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +#include <iconv.h> +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + am_cv_func_iconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +#include <iconv.h> +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +echo "${ECHO_T}$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ICONV 1 +_ACEOF + + fi + if test "$am_cv_lib_iconv" = yes; then + { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $LIBICONV" >&5 +echo "${ECHO_T}$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + if test "$am_cv_func_iconv" = yes; then + { echo "$as_me:$LINENO: checking for iconv declaration" >&5 +echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; } + if test "${am_cv_proto_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include <stdlib.h> +#include <iconv.h> +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + am_cv_proto_iconv_arg1="" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + am_cv_proto_iconv_arg1="const" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" +fi + + am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + { echo "$as_me:$LINENO: result: ${ac_t:- + }$am_cv_proto_iconv" >&5 +echo "${ECHO_T}${ac_t:- + }$am_cv_proto_iconv" >&6; } + +cat >>confdefs.h <<_ACEOF +#define ICONV_CONST $am_cv_proto_iconv_arg1 +_ACEOF + + fi + + if test "$am_cv_func_iconv" = "yes"; then + PLUGINS="$PLUGINS plugin_iconv.o" + PLUGINLIBS="$PLUGINLIBS $LIBICONV" + +cat >>confdefs.h <<\_ACEOF +#define PLUGIN_ICONV 1 +_ACEOF + + else + { echo "$as_me:$LINENO: WARNING: iconv not found: iconv plugin disabled" >&5 +echo "$as_me: WARNING: iconv not found: iconv plugin disabled" >&2;} + fi +fi if test "$PLUGIN_IMON" = "yes"; then PLUGINS="$PLUGINS plugin_imon.o" @@ -8816,27 +9238,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -8872,17 +9277,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -9023,27 +9421,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -9079,17 +9460,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -9198,27 +9572,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_mpd_mpd_connect=yes else echo "$as_me: failed program was:" >&5 @@ -9227,7 +9585,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpd_mpd_connect=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -9296,27 +9654,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -9352,17 +9693,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -9471,27 +9805,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_mysqlclient_mysql_init=yes else echo "$as_me: failed program was:" >&5 @@ -9500,7 +9818,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mysqlclient_mysql_init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -9585,27 +9903,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -9641,17 +9942,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -9876,27 +10170,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 @@ -9969,27 +10246,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 @@ -9998,7 +10259,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break @@ -10069,27 +10330,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 @@ -10098,7 +10343,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break @@ -10159,27 +10404,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 @@ -10364,27 +10592,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -10420,17 +10631,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -10534,27 +10738,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -10590,17 +10777,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -10704,27 +10884,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -10760,17 +10923,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -10873,27 +11029,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -10929,17 +11068,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -11024,10 +11156,10 @@ main () #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; - const charset x; + const charset cs; /* SunOS 4.1.1 cc rejects this. */ - char const *const *ccp; - char **p; + char const *const *pcpcc; + char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; @@ -11036,11 +11168,11 @@ main () an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; - ccp = &g + (g ? g-g : 0); + pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ - ++ccp; - p = (char**) ccp; - ccp = (char const *const *) p; + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; @@ -11067,7 +11199,7 @@ main () const int foo = 10; if (!foo) return 0; } - return !x[0] && !zero.x; + return !cs[0] && !zero.x; #endif ; @@ -11087,27 +11219,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 @@ -11161,27 +11276,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 @@ -11251,27 +11349,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 @@ -11331,27 +11412,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 @@ -11411,27 +11475,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 @@ -11491,27 +11538,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 @@ -11571,27 +11601,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 @@ -11651,6 +11664,7 @@ _ACEOF fi + # Checks for library functions. { echo "$as_me:$LINENO: checking whether closedir returns void" >&5 echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6; } @@ -11735,11 +11749,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include <error.h> int main () { -error_at_line (0, 0, "", 0, ""); +error_at_line (0, 0, "", 0, "an error occurred"); ; return 0; } @@ -11757,27 +11771,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_error_at_line=yes else echo "$as_me: failed program was:" >&5 @@ -11786,7 +11784,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_error_at_line=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5 @@ -11839,27 +11837,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -11895,17 +11876,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12037,27 +12011,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -12066,7 +12024,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -12179,7 +12137,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include <sys/wait.h> -#if HAVE_VFORK_H +#ifdef HAVE_VFORK_H # include <vfork.h> #endif /* On some sparc systems, changes by the child to local and incoming @@ -12331,6 +12289,11 @@ _ACEOF fi + +# uClibc has no getloadavg() +# AC_FUNC_GETLOADAVG sounds promising, but does not really work +#AC_FUNC_GETLOADAVG + if test $ac_cv_c_compiler_gnu = yes; then { echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6; } @@ -12382,14 +12345,244 @@ echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6; } fi -# uClibc has no getloadavg() -# AC_FUNC_GETLOADAVG sounds promising, but does not really work -#AC_FUNC_GETLOADAVG - -#removed for uClibc compatibility +# removed for uClibc compatibility #AC_FUNC_MALLOC #AC_FUNC_REALLOC + + +for ac_header in sys/select.h sys/socket.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------- ## +## Report this to lcd4linux-users@lists.sourceforge.net ## +## ---------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +{ echo "$as_me:$LINENO: checking types of arguments for select" >&5 +echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6; } +if test "${ac_cv_func_select_args+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + for ac_arg234 in 'fd_set *' 'int *' 'void *'; do + for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do + for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#ifdef HAVE_SYS_SELECT_H +# include <sys/select.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +# include <sys/socket.h> +#endif + +int +main () +{ +extern int select ($ac_arg1, + $ac_arg234, $ac_arg234, $ac_arg234, + $ac_arg5); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + done +done +# Provide a safe default value. +: ${ac_cv_func_select_args='int,int *,struct timeval *'} + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5 +echo "${ECHO_T}$ac_cv_func_select_args" >&6; } +ac_save_IFS=$IFS; IFS=',' +set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` +IFS=$ac_save_IFS +shift + +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_ARG1 $1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_ARG234 ($2) +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_ARG5 ($3) +_ACEOF + +rm -f conftest* + { echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } if test "${ac_cv_type_signal+set}" = set; then @@ -12425,27 +12618,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_signal=int else echo "$as_me: failed program was:" >&5 @@ -12695,27 +12871,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -12724,7 +12884,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -12779,27 +12939,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_strftime=yes else echo "$as_me: failed program was:" >&5 @@ -12808,7 +12952,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_strftime=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -12976,27 +13120,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_pow=yes else echo "$as_me: failed program was:" >&5 @@ -13005,7 +13133,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_pow=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5 @@ -13054,27 +13182,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_m_pow=yes else echo "$as_me: failed program was:" >&5 @@ -13083,7 +13195,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_pow=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -13122,7 +13234,10 @@ fi -for ac_func in dup2 floor gethostbyname gettimeofday memset pow putenv regcomp socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strndup strpbrk strrchr strstr strtol uname + + + +for ac_func in dup2 floor gethostbyname gettimeofday memmove memset pow putenv regcomp select socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strndup strpbrk strrchr strstr strtol strtoul uname do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -13188,27 +13303,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -13217,7 +13316,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -13368,7 +13467,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -13377,10 +13477,13 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + + # PATH needs CR @@ -13604,19 +13707,28 @@ else as_mkdir_p=false fi -# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - as_executable_p=: + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi -rm -f conf$$.file +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -13631,8 +13743,8 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by LCD4Linux $as_me 0.10.1-CVS, which was -generated by GNU Autoconf 2.60. Invocation command line was +This file was extended by LCD4Linux $as_me 0.10.1-RC1, which was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -13661,7 +13773,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -13684,8 +13796,8 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -LCD4Linux config.status 0.10.1-CVS -configured by $0, generated by GNU Autoconf 2.60, +LCD4Linux config.status 0.10.1-RC1 +configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. @@ -13956,9 +14068,9 @@ PYTHON_EXTRA_LIBS!$PYTHON_EXTRA_LIBS$ac_delim PYTHON_EXTRA_LDFLAGS!$PYTHON_EXTRA_LDFLAGS$ac_delim DRIVERS!$DRIVERS$ac_delim DRVLIBS!$DRVLIBS$ac_delim -PLUGINS!$PLUGINS$ac_delim -PLUGINLIBS!$PLUGINLIBS$ac_delim -LIBOBJS!$LIBOBJS$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -14000,11 +14112,21 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +LIBICONV!$LIBICONV$ac_delim +LTLIBICONV!$LTLIBICONV$ac_delim +PLUGINS!$PLUGINS$ac_delim +PLUGINLIBS!$PLUGINLIBS$ac_delim +LIBOBJS!$LIBOBJS$ac_delim POW_LIB!$POW_LIB$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 2; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.in b/configure.in index 6cdb068..15ce83e 100644 --- a/configure.in +++ b/configure.in @@ -1,10 +1,15 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. + +# $Id: configure.in 764 2007-02-24 09:56:27Z michael $ +# $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/configure.in $ + + # LCD4Linux autoconf script # # Copyright (C) 1999, 2000, 2001, 2002, 2003 Michael Reinelt <reinelt@eunet.at> -# Copyright (C) 2004 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> +# Copyright (C) 2004, 2005, 2006, 2007 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> # # This file is part of LCD4Linux. # @@ -23,9 +28,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. AC_PREREQ(2.59) -AC_INIT([LCD4Linux],[0.10.1-CVS],[lcd4linux-users@lists.sourceforge.net]) +AC_INIT([LCD4Linux],[0.10.1-RC1],[lcd4linux-users@lists.sourceforge.net]) AC_CONFIG_SRCDIR([lcd4linux.c]) -AM_INIT_AUTOMAKE([lcd4linux],0.10.1-CVS) +AM_INIT_AUTOMAKE([lcd4linux],0.10.1-RC1) AM_CONFIG_HEADER(config.h) # Checks for programs. @@ -106,25 +111,28 @@ AC_TYPE_SSIZE_T AC_HEADER_TIME AC_TYPE_UID_T + # Checks for library functions. AC_FUNC_CLOSEDIR_VOID AC_FUNC_ERROR_AT_LINE AC_FUNC_FORK -AC_PROG_GCC_TRADITIONAL # uClibc has no getloadavg() # AC_FUNC_GETLOADAVG sounds promising, but does not really work #AC_FUNC_GETLOADAVG -#removed for uClibc compatibility +AC_PROG_GCC_TRADITIONAL + +# removed for uClibc compatibility #AC_FUNC_MALLOC #AC_FUNC_REALLOC +AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_FUNC_STAT AC_FUNC_STRFTIME AC_FUNC_STRTOD -AC_CHECK_FUNCS([dup2 floor gethostbyname gettimeofday memset pow putenv regcomp socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strndup strpbrk strrchr strstr strtol uname]) +AC_CHECK_FUNCS([dup2 floor gethostbyname gettimeofday memmove memset pow putenv regcomp select socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strndup strpbrk strrchr strstr strtol strtoul uname]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT @@ -1,3 +1,7 @@ +dnl $Id: curses.m4 729 2007-01-14 13:44:38Z michael $ +dnl $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/curses.m4 $ + + dnl Curses detection: Munged from Midnight Commander's configure.in dnl dnl What it does: @@ -1,4 +1,5 @@ -/* $Id: debug.c,v 1.13 2005/05/08 04:32:43 reinelt Exp $ +/* $Id: debug.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/debug.c $ * * debug() and error() functions * @@ -21,56 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: debug.c,v $ - * Revision 1.13 2005/05/08 04:32:43 reinelt - * CodingStyle added and applied - * - * Revision 1.12 2005/01/18 06:30:22 reinelt - * added (C) to all copyright statements - * - * Revision 1.11 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.10 2004/06/26 09:27:20 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.9 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.8 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * - * Revision 1.7 2004/02/10 07:42:35 reinelt - * cut off all old-style files which are no longer used with NextGeneration - * - * Revision 1.6 2003/10/05 17:58:50 reinelt - * libtool junk; copyright messages cleaned up - * - * Revision 1.5 2003/08/24 05:17:58 reinelt - * liblcd4linux patch from Patrick Schemitz - * - * Revision 1.4 2003/08/08 06:58:06 reinelt - * improved forking - * - * Revision 1.3 2001/03/12 12:39:36 reinelt - * - * reworked autoconf a lot: drivers may be excluded, #define's went to config.h - * - * Revision 1.2 2001/03/09 13:08:11 ltoetsch - * Added Text driver - * - * Revision 1.1 2000/11/28 20:20:38 reinelt - * - * added debug.c - * things like that should not hapen. debug.c exists for a few months now, but was never added to CVS. Shit happens.... - * */ /* @@ -1,4 +1,5 @@ -/* $Id: debug.h,v 1.10 2005/05/08 04:32:43 reinelt Exp $ +/* $Id: debug.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/debug.h $ * * debug messages * @@ -21,49 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: debug.h,v $ - * Revision 1.10 2005/05/08 04:32:43 reinelt - * CodingStyle added and applied - * - * Revision 1.9 2005/01/18 06:30:22 reinelt - * added (C) to all copyright statements - * - * Revision 1.8 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.7 2004/04/12 04:55:59 reinelt - * emitted a BIG FAT WARNING if msr.h could not be found (and therefore - * the gettimeofday() delay loop would be used) - * - * Revision 1.6 2003/10/05 17:58:50 reinelt - * libtool junk; copyright messages cleaned up - * - * Revision 1.5 2003/08/24 05:17:58 reinelt - * liblcd4linux patch from Patrick Schemitz - * - * Revision 1.4 2001/09/12 05:37:22 reinelt - * - * fixed a bug in seti.c (file was never closed, lcd4linux run out of fd's - * - * improved socket debugging - * - * Revision 1.3 2001/03/14 13:19:29 ltoetsch - * Added pop3/imap4 mail support - * - * Revision 1.2 2000/08/10 09:44:09 reinelt - * - * new debugging scheme: error(), info(), debug() - * uses syslog if in daemon mode - * - * Revision 1.1 2000/04/15 11:13:54 reinelt - * - * added '-d' (debugging) switch - * added several debugging messages - * removed config entry 'Delay' for HD44780 driver - * delay loop for HD44780 will be calibrated automatically - * */ #ifndef _DEBUG_H_ @@ -73,7 +31,7 @@ extern int running_foreground; extern int running_background; extern int verbose_level; -void message(const int level, const char *format, ...); +void message(const int level, const char *format, ...) __attribute__ ((format(__printf__, 2, 3)));; #define debug(args...) message (2, __FILE__ ": " args) #define info(args...) message (1, args) @@ -1,3 +1,7 @@ +dnl $Id: drivers.m4 763 2007-02-05 06:26:10Z michael $ +dnl $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drivers.m4 $ + + dnl LCD4Linux Drivers conf part dnl dnl Copyright (C) 1999, 2000, 2001, 2002, 2003 Michael Reinelt <reinelt@eunet.at> @@ -31,7 +35,7 @@ AC_ARG_WITH( [ BeckmannEgle, BWCT, CrystalFontz, Curses, Cwlinux,] [ G15, HD44780, LCD2USB LCDLinux, LCDTerm, LPH7508,] [ LUIse, M50530, MatrixOrbital, MilfordInstruments,] - [ Noritake, NULL, PNG, PPM, RouterBoard, Sample,] + [ Noritake, NULL, PNG, PPM, picoLCD, RouterBoard, Sample,] [ serdisplib, SimpleLCD, T6963, Trefon, USBLCD,] [ USBHUB, WincorNixdorf, X11], drivers=$withval, @@ -59,6 +63,7 @@ for driver in $drivers; do CRYSTALFONTZ="yes" CURSES="yes" CWLINUX="yes" + EA232graphic="yes" G15="yes" HD44780="yes" LCD2USB="yes" @@ -72,9 +77,10 @@ for driver in $drivers; do MILINST="yes" NORITAKE="yes" NULL="yes" + picoLCD="yes" PNG="yes" PPM="yes" - ROUTERBOARD="yes" + ROUTERBOARD="yes" SAMPLE="yes" SERDISPLIB="yes" SIMPLELCD="yes" @@ -100,12 +106,18 @@ for driver in $drivers; do Cwlinux) CWLINUX=$val ;; + EA232graphic) + EA232graphic=$val + ;; G15) G15=$val ;; HD44780) HD44780=$val ;; + HD44780-I2C) + HD44780_I2C=$val + ;; LCD2USB) LCD2USB=$val ;; @@ -139,6 +151,9 @@ for driver in $drivers; do NULL) NULL=$val; ;; + picoLCD) + picoLCD=$val + ;; PNG) PNG=$val ;; @@ -248,6 +263,14 @@ if test "$CWLINUX" = "yes"; then AC_DEFINE(WITH_CWLINUX,1,[CwLinux driver]) fi +if test "$EA232graphic" = "yes"; then + GRAPHIC="yes" + SERIAL="yes" + GPIO="yes" + DRIVERS="$DRIVERS drv_EA232graphic.o" + AC_DEFINE(WITH_EA232graphic,1,[Electronic Assembly RS232 graphic driver]) +fi + if test "$G15" = "yes"; then if test "$has_usb" = "true"; then GRAPHIC="yes" @@ -268,6 +291,14 @@ if test "$HD44780" = "yes"; then AC_DEFINE(WITH_HD44780,1,[HD44780 driver]) fi +if test "$HD44780_I2C" = "yes"; then + TEXT="yes" + I2C="yes" + GPIO="yes" + DRIVERS="$DRIVERS drv_HD44780.o" + AC_DEFINE(WITH_HD44780,1,[HD44780 driver]) +fi + if test "$LCD2USB" = "yes"; then if test "$has_usb" = "true"; then TEXT="yes" @@ -299,13 +330,13 @@ if test "$LCDTERM" = "yes"; then fi if test "$LEDMATRIX" = "yes"; then - GRAPHICS="yes" + GRAPHIC="yes" DRIVERS="$DRIVERS drv_LEDMatrix.o" AC_DEFINE(WITH_LEDMATRIX,1,[LEDMatrix driver]) fi if test "$LPH7508" = "yes"; then - GRAPHICS="yes" + GRAPHIC="yes" GPIO="yes" PARPORT="yes" DRIVERS="$DRIVERS drv_LPH7508.o" @@ -355,10 +386,23 @@ if test "$NORITAKE" = "yes"; then fi if test "$NULL" = "yes"; then + TEXT="yes" DRIVERS="$DRIVERS drv_NULL.o" AC_DEFINE(WITH_NULL,1,[NULL driver]) fi +if test "$picoLCD" = "yes"; then + if test "$has_usb" = "true"; then + TEXT="yes" + GPIO="yes" + SERIAL="yes" + DRIVERS="$DRIVERS drv_picoLCD.o" + AC_DEFINE(WITH_picoLCD,1,[picoLCD driver]) + else + AC_MSG_WARN(usb.h not found: picoLCD driver disabled) + fi +fi + if test "$PNG" = "yes"; then if test "$has_gd" = "true"; then IMAGE="yes" @@ -478,6 +522,12 @@ if test "$X11" = "yes"; then fi +# Image driver +if test "$IMAGE" = "yes"; then + GRAPHIC="yes" + DRIVERS="$DRIVERS drv_Image.o" +fi + if test "$DRIVERS" = ""; then AC_MSG_ERROR([You should activate at least one driver...]) fi @@ -487,12 +537,6 @@ if test "$TEXT" = "yes"; then DRIVERS="$DRIVERS drv_generic_text.o" fi -# Image driver -if test "$IMAGE" = "yes"; then - GRAPHIC="yes" - DRIVERS="$DRIVERS drv_Image.o" -fi - # generic graphic driver if test "$GRAPHIC" = "yes"; then DRIVERS="$DRIVERS drv_generic_graphic.o" @@ -511,11 +555,13 @@ fi # generic parport driver if test "$PARPORT" = "yes"; then DRIVERS="$DRIVERS drv_generic_parport.o" + AC_DEFINE(WITH_PARPORT, 1, [parport bus driver]) fi # generic serial driver if test "$SERIAL" = "yes"; then DRIVERS="$DRIVERS drv_generic_serial.o" + AC_DEFINE(WITH_SERIAL, 1, [serial bus driver]) fi # generic i2c driver @@ -1,4 +1,5 @@ -/* $Id: drv.c,v 1.43 2006/08/08 19:35:21 reinelt Exp $ +/* $Id: drv.c 760 2007-02-04 06:29:55Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv.c $ * * new framework for display drivers * @@ -21,170 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv.c,v $ - * Revision 1.43 2006/08/08 19:35:21 reinelt - * USBHUB driver from Ernst Bachmann - * - * Revision 1.42 2006/08/05 21:08:01 harbaum - * New LEDMATRIX driver (see http://www.harbaum.org/till/ledmatrix) - * - * Revision 1.41 2006/07/31 03:48:09 reinelt - * preparations for scrolling - * - * Revision 1.40 2006/04/14 20:59:38 harbaum - * Disable inclusion of Image driver in drv.c if no gd was found. - * - * Revision 1.39 2006/01/26 19:26:27 harbaum - * Added LCD2USB support - * - * Revision 1.38 2006/01/21 13:26:44 reinelt - * Logitech G-15 keyboard LCD driver from Dave Ingram - * - * Revision 1.37 2006/01/03 13:20:06 reinelt - * LUIse driver added - * - * Revision 1.36 2005/11/05 06:26:51 reinelt - * littly typo corrected - * - * Revision 1.35 2005/11/04 14:10:38 reinelt - * drv_Sample and drv_LPH7508 - * - * Revision 1.34 2005/11/04 04:44:52 reinelt - * LPH7508 driver (not yet finished) - * - * Revision 1.33 2005/08/22 05:44:43 reinelt - * new driver 'WincorNixdorf' - * some fixes to the bar code - * - * Revision 1.32 2005/05/10 13:20:14 reinelt - * added serdisplib driver - * - * Revision 1.31 2005/05/08 04:32:43 reinelt - * CodingStyle added and applied - * - * Revision 1.30 2005/05/04 05:42:38 reinelt - * Noritake driver added - * - * Revision 1.29 2005/04/24 04:33:46 reinelt - * driver for TREFON USB LCD's added - * - * Revision 1.28 2005/02/24 07:06:48 reinelt - * SimpleLCD driver added - * - * Revision 1.27 2005/01/30 06:43:22 reinelt - * driver for LCD-Linux finished - * - * Revision 1.26 2005/01/22 22:57:57 reinelt - * LCD-Linux driver added - * - * Revision 1.25 2005/01/18 06:30:22 reinelt - * added (C) to all copyright statements - * - * Revision 1.24 2005/01/15 13:10:15 reinelt - * LCDTerm driver added - * - * Revision 1.23 2004/09/24 21:41:00 reinelt - * new driver for the BWCT USB LCD interface board. - * - * Revision 1.22 2004/08/29 13:03:41 reinelt - * - * added RouterBoard driver - * - * Revision 1.21 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.20 2004/06/26 09:27:20 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.19 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.18 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.17 2004/06/02 10:09:22 reinelt - * - * splash screen for HD44780 - * - * Revision 1.16 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.15 2004/05/31 16:39:06 reinelt - * - * added NULL display driver (for debugging/profiling purposes) - * added backlight/contrast initialisation for matrixOrbital - * added Backlight initialisation for Cwlinux - * - * Revision 1.14 2004/05/28 13:51:42 reinelt - * - * ported driver for Beckmann+Egle Mini-Terminals - * added 'flags' parameter to serial_init() - * - * Revision 1.13 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * - * Revision 1.12 2004/05/26 05:03:27 reinelt - * - * MilfordInstruments driver ported - * - * Revision 1.11 2004/05/25 19:54:15 reinelt - * - * 'make distcheck' bugs fixed - * release number changed to 0.10.0-RC1 - * - * Revision 1.10 2004/05/25 14:26:29 reinelt - * - * added "Image" driver (was: Raster.c) for PPM and PNG creation - * fixed some glitches in the X11 driver - * - * Revision 1.9 2004/02/24 05:55:04 reinelt - * - * X11 driver ported - * - * Revision 1.8 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * - * Revision 1.7 2004/02/15 08:22:47 reinelt - * ported USBLCD driver to NextGeneration - * added drv_M50530.c (I forgot yesterday, sorry) - * removed old drivers M50530.c and USBLCD.c - * - * Revision 1.6 2004/02/14 11:56:17 reinelt - * M50530 driver ported - * changed lots of 'char' to 'unsigned char' - * - * Revision 1.5 2004/01/27 06:34:14 reinelt - * Cwlinux driver portet to NextGeneration (compiles, but not tested!) - * - * Revision 1.4 2004/01/21 12:36:19 reinelt - * Crystalfontz NextGeneration driver added - * - * Revision 1.3 2004/01/20 15:32:49 reinelt - * first version of Next Generation HD44780 (untested! but it compiles...) - * some cleanup in the other drivers - * - * Revision 1.2 2004/01/10 10:20:22 reinelt - * new MatrixOrbital changes - * - * Revision 1.1 2004/01/09 17:03:07 reinelt - * initiated transfer to new driver architecture - * new file 'drv.c' will someday replace 'display.c' - * new file 'drv_MatrixOrbital.c' will replace 'MatrixOrbital.c' - * due to this 'soft' transfer lcd4linux should stay usable during the switch - * (at least I hope so) - * */ /* @@ -215,6 +52,7 @@ extern DRIVER drv_BWCT; extern DRIVER drv_Crystalfontz; extern DRIVER drv_Curses; extern DRIVER drv_Cwlinux; +extern DRIVER drv_EA232graphic; extern DRIVER drv_G15; extern DRIVER drv_HD44780; extern DRIVER drv_Image; @@ -229,6 +67,7 @@ extern DRIVER drv_MatrixOrbital; extern DRIVER drv_MilfordInstruments; extern DRIVER drv_Noritake; extern DRIVER drv_NULL; +extern DRIVER drv_picoLCD; extern DRIVER drv_RouterBoard; extern DRIVER drv_Sample; extern DRIVER drv_serdisplib; @@ -256,11 +95,14 @@ DRIVER *Driver[] = { #ifdef WITH_CRYSTALFONTZ &drv_Crystalfontz, #endif +#ifdef WITH_CURSES + &drv_Curses, +#endif #ifdef WITH_CWLINUX &drv_Cwlinux, #endif -#ifdef WITH_CURSES - &drv_Curses, +#ifdef WITH_EA232graphic + &drv_EA232graphic, #endif #ifdef WITH_G15 &drv_G15, @@ -304,6 +146,10 @@ DRIVER *Driver[] = { #ifdef WITH_NULL &drv_NULL, #endif +#ifdef WITH_picoLCD + &drv_picoLCD, +#endif + #ifdef WITH_ROUTERBOARD &drv_RouterBoard, #endif @@ -1,4 +1,5 @@ -/* $Id: drv.h,v 1.10 2005/05/08 04:32:43 reinelt Exp $ +/* $Id: drv.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv.h $ * * new framework for display drivers * @@ -21,53 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv.h,v $ - * Revision 1.10 2005/05/08 04:32:43 reinelt - * CodingStyle added and applied - * - * Revision 1.9 2005/01/18 06:30:22 reinelt - * added (C) to all copyright statements - * - * Revision 1.8 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.7 2004/06/26 09:27:20 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.6 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.5 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.4 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.3 2004/01/20 15:32:49 reinelt - * first version of Next Generation HD44780 (untested! but it compiles...) - * some cleanup in the other drivers - * - * Revision 1.2 2004/01/10 20:22:33 reinelt - * added new function 'cfg_list()' (not finished yet) - * added layout.c (will replace processor.c someday) - * added widget_text.c (will be the first and most important widget) - * modified lcd4linux.c so that old-style configs should work, too - * - * Revision 1.1 2004/01/09 17:03:07 reinelt - * initiated transfer to new driver architecture - * new file 'drv.c' will someday replace 'display.c' - * new file 'drv_MatrixOrbital.c' will replace 'MatrixOrbital.c' - * due to this 'soft' transfer lcd4linux should stay usable during the switch - * (at least I hope so) - * */ #ifndef _DRV_H_ @@ -1,4 +1,5 @@ -/* $Id: drv_BWCT.c,v 1.6 2006/01/30 06:25:48 reinelt Exp $ +/* $Id: drv_BWCT.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_BWCT.c $ * * new style driver for BWCT USB LCD displays * @@ -21,26 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_BWCT.c,v $ - * Revision 1.6 2006/01/30 06:25:48 reinelt - * added CVS Revision - * - * Revision 1.5 2006/01/05 15:53:45 nicowallmeier - * fixed compatility with gcc 2.95 - * - * Revision 1.4 2005/12/11 14:55:28 reinelt - * contrast range for BWCT is 0..255, not 0..100 - * - * Revision 1.3 2005/05/08 04:32:43 reinelt - * CodingStyle added and applied - * - * Revision 1.2 2005/01/18 06:30:22 reinelt - * added (C) to all copyright statements - * - * Revision 1.1 2004/09/24 21:41:00 reinelt - * new driver for the BWCT USB LCD interface board. - * */ /* @@ -329,7 +310,7 @@ int drv_BW_init(const char *section, const int quiet) int asc255bug; int ret; - info("%s: %s", Name, "$Revision: 1.6 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ diff --git a/drv_BeckmannEgle.c b/drv_BeckmannEgle.c index 5ce094e..22d5307 100644 --- a/drv_BeckmannEgle.c +++ b/drv_BeckmannEgle.c @@ -1,4 +1,5 @@ -/* $Id: drv_BeckmannEgle.c,v 1.16 2006/01/30 06:25:49 reinelt Exp $ +/* $Id: drv_BeckmannEgle.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_BeckmannEgle.c $ * * driver for Beckmann+Egle "Mini Terminals" and "Compact Terminals" * Copyright (C) 2000 Michael Reinelt <reinelt@eunet.at> @@ -20,78 +21,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_BeckmannEgle.c,v $ - * Revision 1.16 2006/01/30 06:25:49 reinelt - * added CVS Revision - * - * Revision 1.15 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.14 2005/01/18 06:30:22 reinelt - * added (C) to all copyright statements - * - * Revision 1.13 2004/07/14 04:44:44 reinelt - * - * Beckmann+Egle fix - * added smaple widget for the PPP plugin - * - * Revision 1.12 2004/06/29 04:49:30 reinelt - * - * B+E enhanced port detection - * - * Revision 1.11 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.10 2004/06/26 09:27:20 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.9 2004/06/26 06:12:15 reinelt - * - * support for Beckmann+Egle Compact Terminals - * some mostly cosmetic changes in the MatrixOrbital and USBLCD driver - * added debugging to the generic serial driver - * fixed a bug in the generic text driver where icons could be drawn outside - * the display bounds - * - * Revision 1.8 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.7 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.6 2004/06/05 06:41:39 reinelt - * - * chancged splash screen again - * - * Revision 1.5 2004/06/05 06:13:11 reinelt - * - * splash screen for all text-based display drivers - * - * Revision 1.4 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.3 2004/06/02 05:14:16 reinelt - * - * fixed models listing for Beckmann+Egle driver - * some cosmetic changes - * - * Revision 1.2 2004/05/31 05:38:02 reinelt - * - * fixed possible bugs with user-defined chars (clear high bits) - * thanks to Andy Baxter for debugging the MilfordInstruments driver! - * - * Revision 1.1 2004/05/28 14:36:10 reinelt - * - * added drv_BeckmannEgle.c (forgotten at first check in :-) - * */ /* @@ -502,7 +431,7 @@ static int drv_BuE_CT_start(const char *section) if (type != NULL) { info("%s: Port %d: %s", Name, i, type); } else { - error("%s: internal error: port % unknown type %d", Name, i, cmd[3]); + error("%s: internal error: port %d unknown type %d", Name, i, cmd[3]); } } else { error("%s: error fetching type of port %d", Name, i); @@ -696,7 +625,7 @@ int drv_BuE_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.16 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* start display */ if ((ret = drv_BuE_start(section)) != 0) { diff --git a/drv_Crystalfontz.c b/drv_Crystalfontz.c index bade58b..aef6fc1 100644 --- a/drv_Crystalfontz.c +++ b/drv_Crystalfontz.c @@ -1,4 +1,5 @@ -/* $Id: drv_Crystalfontz.c,v 1.45 2006/07/19 01:48:11 cmay Exp $ +/* $Id: drv_Crystalfontz.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_Crystalfontz.c $ * * new style driver for Crystalfontz display modules * @@ -21,176 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_Crystalfontz.c,v $ - * Revision 1.45 2006/07/19 01:48:11 cmay - * Ran indent.sh to make pretty code. - * - * Revision 1.44 2006/07/19 01:35:31 cmay - * Renamed keypad direction names to avoid conflict with Curses library defs. - * Added keypad support to Curses display driver. - * - * Revision 1.43 2006/07/14 20:15:11 reinelt - * buffer too small (thanks to anonymous) - * - * Revision 1.42 2006/02/22 15:59:39 cmay - * removed KEYPADSIZE cruft per harbaum's suggestion - * - * Revision 1.41 2006/02/21 15:52:30 cmay - * added back CF635 GPO counts in model struct lost after last merge - * - * Revision 1.40 2006/02/21 05:50:34 reinelt - * keypad support from Cris Maj - * - * Revision 1.39 2006/02/19 15:37:38 reinelt - * CF635 GPO patch from cmaj - * - * Revision 1.38 2006/01/30 06:25:49 reinelt - * added CVS Revision - * - * Revision 1.37 2006/01/06 08:12:19 reinelt - * GPO's for Crystalfontz - * - * Revision 1.36 2005/09/07 06:51:44 reinelt - * Support for CF635 added - * - * Revision 1.35 2005/08/21 08:18:56 reinelt - * CrystalFontz ACK processing - * - * Revision 1.34 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.33 2005/04/02 05:28:58 reinelt - * fixed gcc4 warnings about signed/unsigned mismatches - * - * Revision 1.32 2005/03/23 12:23:35 reinelt - * fixed some signed/unsigned char mismatches in the Crystalfontz driver (ticket #12) - * - * Revision 1.31 2005/02/24 07:06:48 reinelt - * SimpleLCD driver added - * - * Revision 1.30 2005/01/18 06:30:22 reinelt - * added (C) to all copyright statements - * - * Revision 1.29 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.28 2004/06/26 09:27:20 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.27 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.26 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.25 2004/06/05 06:41:39 reinelt - * - * chancged splash screen again - * - * Revision 1.24 2004/06/05 06:13:11 reinelt - * - * splash screen for all text-based display drivers - * - * Revision 1.23 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.22 2004/06/02 05:56:25 reinelt - * - * extended contrast range for Crystalfontz - * - * Revision 1.21 2004/06/01 06:45:28 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.20 2004/05/31 05:38:02 reinelt - * - * fixed possible bugs with user-defined chars (clear high bits) - * thanks to Andy Baxter for debugging the MilfordInstruments driver! - * - * Revision 1.19 2004/05/30 08:25:50 reinelt - * - * Crystalfontz 631 driver finished - * - * Revision 1.18 2004/05/28 13:51:42 reinelt - * - * ported driver for Beckmann+Egle Mini-Terminals - * added 'flags' parameter to serial_init() - * - * Revision 1.17 2004/05/27 03:39:47 reinelt - * - * changed function naming scheme to plugin::function - * - * Revision 1.16 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * - * Revision 1.15 2004/05/25 14:26:29 reinelt - * - * added "Image" driver (was: Raster.c) for PPM and PNG creation - * fixed some glitches in the X11 driver - * - * Revision 1.14 2004/03/19 09:17:46 reinelt - * - * removed the extra 'goto' function, row and col are additional parameters - * of the write() function now. - * - * Revision 1.13 2004/03/03 03:41:02 reinelt - * Crystalfontz Contrast issue fixed - * - * Revision 1.12 2004/03/01 04:29:51 reinelt - * cfg_number() returns -1 on error, 0 if value not found (but default val used), - * and 1 if value was used from the configuration. - * HD44780 driver adopted to new cfg_number() - * Crystalfontz 631 driver nearly finished - * - * Revision 1.11 2004/02/14 11:56:17 reinelt - * M50530 driver ported - * changed lots of 'char' to 'unsigned char' - * - * Revision 1.10 2004/02/05 07:10:23 reinelt - * evaluator function names are no longer case-sensitive - * Crystalfontz Fan PWM control, Fan RPM monitoring, temperature monitoring - * - * Revision 1.9 2004/02/04 19:10:51 reinelt - * Crystalfontz driver nearly finished - * - * Revision 1.8 2004/02/01 08:05:12 reinelt - * Crystalfontz 633 extensions (CRC checking and stuff) - * Models table for HD44780 - * Noritake VFD BVrightness patch from Bill Paxton - * - * 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 - * - * Revision 1.5 2004/01/25 05:30:09 reinelt - * plugin_netdev for parsing /proc/net/dev added - * - * Revision 1.4 2004/01/23 07:04:03 reinelt - * icons finished! - * - * Revision 1.3 2004/01/23 04:53:34 reinelt - * icon widget added (not finished yet!) - * - * Revision 1.2 2004/01/22 07:57:45 reinelt - * several bugs fixed where segfaulting on layout>display - * Crystalfontz driver optimized, 632 display already works - * - * Revision 1.1 2004/01/21 12:36:19 reinelt - * Crystalfontz NextGeneration driver added - * */ /* @@ -367,7 +198,8 @@ static void drv_CF_process_packet(void) default: /* this should not happen */ - error("%s: unexpected response type=0x%02x code=0x%02x size=%d", Packet.type, Packet.code, Packet.size); + error("%s: unexpected response type=0x%02x code=0x%02x size=%d", Name, Packet.type, Packet.code, + Packet.size); break; } @@ -375,14 +207,14 @@ static void drv_CF_process_packet(void) case 0x03: /* error response from display to host */ - error("%s: error response type=0x%02x code=0x%02x size=%d", Packet.type, Packet.code, Packet.size); + error("%s: error response type=0x%02x code=0x%02x size=%d", Name, Packet.type, Packet.code, Packet.size); break; default: /* these should not happen: */ /* type 0x00: command from host to display: should never come back */ /* type 0x01: command response from display to host: are processed within send() */ - error("%s: unexpected packet type=0x%02x code=0x%02x size=%d", Packet.type, Packet.code, Packet.size); + error("%s: unexpected packet type=0x%02x code=0x%02x size=%d", Name, Packet.type, Packet.code, Packet.size); break; } @@ -502,7 +334,7 @@ static void drv_CF_send(const unsigned char cmd, const unsigned char len, const /* this is the ack we're waiting for */ if (0) { gettimeofday(&end, NULL); - debug("%s: ACK after %d usec", Name, + debug("%s: ACK after %ld usec", Name, 1000000 * (end.tv_sec - now.tv_sec) + end.tv_usec - now.tv_usec); } break; @@ -1079,7 +911,7 @@ static void plugin_backlight(RESULT * result, const int argc, RESULT * argv[]) SetResult(&result, R_NUMBER, &backlight); break; default: - error("%s.backlight(): wrong number of parameters"); + error("%s.backlight(): wrong number of parameters", Name); SetResult(&result, R_STRING, ""); } } @@ -1123,7 +955,7 @@ int drv_CF_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.45 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* start display */ if ((ret = drv_CF_start(section)) != 0) { diff --git a/drv_Curses.c b/drv_Curses.c index 12590ae..d7835f7 100644 --- a/drv_Curses.c +++ b/drv_Curses.c @@ -1,4 +1,5 @@ -/* $Id: drv_Curses.c,v 1.13 2006/07/19 01:48:11 cmay Exp $ +/* $Id: drv_Curses.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_Curses.c $ * * pure ncurses based text driver * @@ -24,58 +25,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_Curses.c,v $ - * Revision 1.13 2006/07/19 01:48:11 cmay - * Ran indent.sh to make pretty code. - * - * Revision 1.12 2006/07/19 01:35:31 cmay - * Renamed keypad direction names to avoid conflict with Curses library defs. - * Added keypad support to Curses display driver. - * - * Revision 1.11 2006/01/30 06:25:49 reinelt - * added CVS Revision - * - * Revision 1.10 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.9 2005/01/18 06:30:22 reinelt - * added (C) to all copyright statements - * - * Revision 1.8 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.7 2004/06/26 09:27:20 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.6 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.5 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.4 2004/06/05 06:41:39 reinelt - * - * chancged splash screen again - * - * Revision 1.3 2004/06/05 06:13:11 reinelt - * - * splash screen for all text-based display drivers - * - * Revision 1.2 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.1 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * */ /* @@ -217,7 +166,7 @@ static int drv_Curs_start(const char *section, const int quiet) return -1; } if (sscanf(s, "%dx%d", &DCOLS, &DROWS) != 2 || DROWS < 1 || DCOLS < 1) { - error("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source); + error("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source()); free(s); return -1; } @@ -338,7 +287,7 @@ int drv_Curs_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.13 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 1; /* pixel width of one char */ diff --git a/drv_Cwlinux.c b/drv_Cwlinux.c index c476fc6..555f2a9 100644 --- a/drv_Cwlinux.c +++ b/drv_Cwlinux.c @@ -1,4 +1,5 @@ -/* $Id: drv_Cwlinux.c,v 1.26 2006/02/25 13:36:33 geronet Exp $ +/* $Id: drv_Cwlinux.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_Cwlinux.c $ * * new style driver for Cwlinux display modules * @@ -21,116 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_Cwlinux.c,v $ - * Revision 1.26 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.25 2006/02/06 06:29:30 reinelt - * Image driver uses RGBA - * - * Revision 1.24 2006/01/30 06:25:49 reinelt - * added CVS Revision - * - * Revision 1.23 2006/01/05 18:56:57 reinelt - * more GPO stuff - * - * Revision 1.22 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.21 2005/01/18 06:30:22 reinelt - * added (C) to all copyright statements - * - * Revision 1.20 2004/11/28 15:50:24 reinelt - * Cwlinux fixes (invalidation of user-defined chars) - * - * Revision 1.19 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.18 2004/06/26 09:27:20 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.17 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.16 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.15 2004/06/05 14:56:48 reinelt - * - * Cwlinux splash screen fixed - * USBLCD splash screen fixed - * plugin_i2c qprintf("%f") replaced with snprintf() - * - * Revision 1.14 2004/06/05 06:41:39 reinelt - * - * chancged splash screen again - * - * Revision 1.13 2004/06/05 06:13:11 reinelt - * - * splash screen for all text-based display drivers - * - * Revision 1.12 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.11 2004/06/01 06:45:29 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.10 2004/05/31 21:05:13 reinelt - * - * fixed lots of bugs in the Cwlinux driver - * do not emit EAGAIN error on the first retry - * made plugin_i2c_sensors a bit less 'chatty' - * moved init and exit functions to the bottom of plugin_pop3 - * - * Revision 1.9 2004/05/31 16:39:06 reinelt - * - * added NULL display driver (for debugging/profiling purposes) - * added backlight/contrast initialisation for matrixOrbital - * added Backlight initialisation for Cwlinux - * - * Revision 1.8 2004/05/31 05:38:02 reinelt - * - * fixed possible bugs with user-defined chars (clear high bits) - * thanks to Andy Baxter for debugging the MilfordInstruments driver! - * - * Revision 1.7 2004/05/28 13:51:42 reinelt - * - * ported driver for Beckmann+Egle Mini-Terminals - * added 'flags' parameter to serial_init() - * - * Revision 1.6 2004/05/27 03:39:47 reinelt - * - * changed function naming scheme to plugin::function - * - * Revision 1.5 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * - * Revision 1.4 2004/03/19 09:17:46 reinelt - * - * removed the extra 'goto' function, row and col are additional parameters - * of the write() function now. - * - * Revision 1.3 2004/02/14 11:56:17 reinelt - * M50530 driver ported - * changed lots of 'char' to 'unsigned char' - * - * Revision 1.2 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.1 2004/01/27 06:34:14 reinelt - * Cwlinux driver portet to NextGeneration (compiles, but not tested!) - * */ /* @@ -425,7 +316,7 @@ int drv_CW_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.26 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 6; /* pixel width of one char */ diff --git a/drv_EA232graphic.c b/drv_EA232graphic.c new file mode 100644 index 0000000..f5c0bdd --- /dev/null +++ b/drv_EA232graphic.c @@ -0,0 +1,554 @@ +/* $Id: drv_EA232graphic.c 760 2007-02-04 06:29:55Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_EA232graphic.c $ + * + * Driver for Electronic Assembly serial graphic display + * + * Copyright (C) 2007 Stefan Gmeiner <stefangmeiner@solnet.ch> + * Copyright (C) 2005 Michael Reinelt <reinelt@eunet.at> + * Copyright (C) 2005, 2006, 2007 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. + * + */ + +/* + * Electronic Assembly RS232 Graphic Displays + * + * This driver supports some of the Electronic Assembly serial graphic displays. Although + * most of this display support higher level operation like text and graphic command, non of + * these are used. Instead the lcd4linux graphic routines creates the graphic which is then + * transferd to the display. + * + * FIXME: Some display have addition features such as GPI which are not yet implemented. + * + * Display Protocol Output Contrast + * ============================================ + * GE120-5NV24 1 8 yes + * GE128-6N3V24 1 8 no + * GE128-6N9V24 2 0 yes + * GE128-7KV24 3 8 no + * GE240-6KV24 3 8 no + * GE240-6KCV24 3 8 no + * GE240-7KV24 3 8 no + * GE240-7KLWV24 3 8 no + * GE240-6KLWV24 3 8 no + * + * Supported protocol commands: + * + * Clear + * Protocol Display Set Output Set Contrast Bitmap Orientation + * ======================================================================================= + * 1 DL Y(0..7)(0..1) K(0..20) U(x)(y)(w)(h)(...) Vertical + * 2 <ESC>DL -- <ESC>DK(0..63) <ESC>UL(x)(y)(w)(h)(...) Vertical + * 3 DL Y(0..7)(0..1) -- U(x)(y)(w)(h)(...) Horizontal + * + * Bitmap orientation: + * + * Vertical: Byte-No. + * 123456789.... + * Bit 0 ********* + * Bit 1 ********* + * Bit 2 ********* + * Bit 3 ********* + * Bit 4 ********* + * Bit 5 ********* + * Bit 6 ********* + * Bit 7 ********* + * + * Horizontal: Bit-No. + * 76543210 + * Byte 0 ******** + * Byte 1 ******** + * Byte 3 ******** + * ... + * + * + */ + +/* + * + * exported fuctions: + * + * struct DRIVER drv_EA232graphic + * + */ + +#include "config.h" + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include <sys/time.h> +#include <unistd.h> + +#include "debug.h" +#include "cfg.h" +#include "qprintf.h" +#include "udelay.h" +#include "plugin.h" +#include "widget.h" +#include "widget_text.h" +#include "widget_icon.h" +#include "widget_bar.h" +#include "drv.h" + +/* graphic display */ +#include "drv_generic_graphic.h" + +/* serial port */ +#include "drv_generic_serial.h" + +/* GPO */ +#include "drv_generic_gpio.h" + + + +#define ESC ((char)27) +#define MSB_BYTE 0x80 +#define LSB_BYTE 0x01 + +static char Name[] = "EA232graphic"; + +typedef struct { + char *name; + int columns; + int rows; + int max_contrast; + int default_contrast; + int gpo; + int protocol; +} MODEL; + +static MODEL Models[] = { + /* Protocol 1 models */ + {"GE120-5NV24", 120, 32, 20, 8, 8, 1}, + {"GE128-6N3V24", 128, 64, 0, 0, 8, 1}, + + /* Protocol 2 models */ + {"GE128-6N9V24", 128, 64, 63, 40, 0, 2}, + + /* Protocol 3 models */ + {"GE128-7KV24", 128, 128, 0, 0, 8, 3}, + {"GE240-6KV24", 240, 64, 0, 0, 8, 3}, + {"GE240-6KCV24", 240, 64, 0, 0, 8, 3}, + {"GE240-7KV24", 240, 128, 0, 0, 8, 3}, + {"GE240-7KLWV24", 240, 128, 0, 0, 8, 3}, + {"GE240-6KLWV24", 240, 64, 0, 0, 8, 3}, + + {NULL, 0, 0, 0, 0, 0, 0} +}; + +static MODEL *Model; + + +/****************************************/ +/*** hardware dependant functions ***/ +/****************************************/ + + +static int drv_EA232graphic_open(const char *section) +{ + /* open serial port */ + /* don't mind about device, speed and stuff, this function will take care of */ + if (drv_generic_serial_open(section, Name, 0) < 0) + return -1; + + return 0; +} + + +static int drv_EA232graphic_close(void) +{ + drv_generic_serial_close(); + + return 0; +} + + +/* write data to the display */ +static void drv_EA232graphic_send(const char *data, const int len) +{ + drv_generic_serial_write(data, len); +} + + +/* delete Display */ +static void drv_EA232graphic_clear_display() +{ + char cmd[3]; + + switch (Model->protocol) { + case 1: + case 3: + cmd[0] = 'D'; + cmd[1] = 'L'; + drv_EA232graphic_send(cmd, 2); + break; + + case 2: + cmd[0] = ESC; + cmd[1] = 'D'; + cmd[2] = 'L'; + drv_EA232graphic_send(cmd, 3); + break; + default: + error("%s: undefined protocol type", Name); + return; + } +} + + + +/* copy framebuffer to display */ +static void drv_EA232graphic_blit(const int row, const int col, const int height, const int width) +{ + + int r, c, l, p; + char *cmd; + + /* calculate length of command */ + l = 0; + switch (Model->protocol) { + case 1: + case 2: + l = ((height + 7) / 8) * width; + break; + case 3: + l = ((width + 7) / 8) * height; + break; + default: + error("%s: undefined protocol type", Name); + return; + } + + /* add maximum length of command header */ + cmd = (char *) malloc(l + 10); + if (cmd == NULL) { + error("%s: allocation of buffer failed: %s", Name, strerror(errno)); + return; + } + p = 0; + + /* write command header */ + switch (Model->protocol) { + case 1: + case 3: + cmd[p++] = 'U'; + cmd[p++] = col; + cmd[p++] = row; + cmd[p++] = width; + cmd[p++] = height; + break; + case 2: + cmd[p++] = ESC; + cmd[p++] = 'U'; + cmd[p++] = 'L'; + cmd[p++] = col; + cmd[p++] = row; + cmd[p++] = width; + cmd[p++] = height; + break; + default: + error("%s: undefined protocol type", Name); + free(cmd); + return; + } + + /* clear all pixels */ + memset(cmd + p, 0, l); + + /* set pixels */ + switch (Model->protocol) { + case 1: + case 2: + for (r = 0; r < height; r++) { + for (c = 0; c < width; c++) { + if (drv_generic_graphic_black(r + row, c + col)) { + cmd[(r / 8) * width + c + p] |= (LSB_BYTE << (r % 8)); + } + } + } + break; + case 3: + for (c = 0; c < width; c++) { + for (r = 0; r < height; r++) { + if (drv_generic_graphic_black(r + row, c + col)) { + cmd[(c / 8) * height + r + p] |= (MSB_BYTE >> (c % 8)); + } + } + } + break; + default: + error("%s: undefined protocol type", Name); + free(cmd); + return; + } + + drv_EA232graphic_send(cmd, p + l); + + free(cmd); +} + + +static int drv_EA232graphic_GPO(const int num, const int val) +{ + char cmd[4]; + + if (Model->gpo == 0) { + error("%s: GPO not supported on this model.", Name); + return -1; + } + + + if (Model->gpo < num) { + error("%s: GPO %d is not available.", Name, num); + return -1; + } + + cmd[0] = 'Y'; + cmd[1] = num; + cmd[2] = (val > 0) ? 1 : 0; + + drv_EA232graphic_send(cmd, 3); + + return 0; +} + + +/* adjust contast */ +static int drv_EA232graphic_contrast(int contrast) +{ + char cmd[4]; + + if (Model->max_contrast == 0) { + error("%s: contrast setting not support by model", Name); + return -1; + } + + /* adjust limits according to the display */ + if (contrast < 0) + contrast = 0; + if (contrast > Model->max_contrast) + contrast = Model->max_contrast; + + + switch (Model->protocol) { + case 1: + cmd[0] = 'K'; + cmd[1] = contrast; + drv_EA232graphic_send(cmd, 2); + break; + case 2: + cmd[0] = ESC; + cmd[1] = 'D'; + cmd[2] = 'K'; + cmd[3] = contrast; + drv_EA232graphic_send(cmd, 4); + break; + default: + error("%s: undefined protocol type", Name); + return -1; + } + + return contrast; +} + + +/* start graphic display */ +static int drv_EA232graphic_start(const char *section) +{ + char *s; + int contrast; + int i; + + /* read model from configuration */ + s = cfg_get(section, "Model", NULL); + if (s == NULL || *s == '\0') { + error("%s: no '%s.Model' entry from %s", Name, section, cfg_source()); + return -1; + } + + for (i = 0; Models[i].name != NULL; i++) { + if (strcasecmp(Models[i].name, s) == 0) + break; + } + if (!Models[i].name) { + error("%s: %s.Model '%s' is unknown from %s", Name, section, s, cfg_source()); + free(s); + return -1; + } + Model = &Models[i]; + info("%s: using model '%s'", Name, Model->name); + free(s); + + /* read display size from model configuration */ + DROWS = Model->rows; + DCOLS = Model->columns; + + /* set number of GPO's from model */ + GPOS = Model->gpo; + + /* read font size from configuration */ + s = cfg_get(section, "Font", "6x8"); + if (s == NULL || *s == '\0') { + error("%s: no '%s.Font' entry from %s", Name, section, cfg_source()); + return -1; + } + + XRES = -1; + YRES = -1; + if (sscanf(s, "%dx%d", &XRES, &YRES) != 2 || XRES < 1 || YRES < 1) { + error("%s: bad Font '%s' from %s", Name, s, cfg_source()); + free(s); + return -1; + } + + /* Fixme: provider other fonts someday... */ + if (XRES != 6 && YRES != 8) { + error("%s: bad Font '%s' from %s (only 6x8 at the moment)", Name, s, cfg_source()); + free(s); + return -1; + } + free(s); + + /* open communication with the display */ + if (drv_EA232graphic_open(section) < 0) { + return -1; + } + + /* reset & initialize display */ + drv_EA232graphic_clear_display(); + + if (cfg_number(section, "Contrast", Model->default_contrast, 0, Model->max_contrast, &contrast) > 0) { + drv_EA232graphic_contrast(contrast); + } + + return 0; +} + + +/****************************************/ +/*** plugins ***/ +/****************************************/ + +static void plugin_contrast(RESULT * result, RESULT * arg1) +{ + double contrast; + + contrast = drv_EA232graphic_contrast(R2N(arg1)); + SetResult(&result, R_NUMBER, &contrast); +} + + +/****************************************/ +/*** widget callbacks ***/ +/****************************************/ + + +/* using drv_generic_text_draw(W) */ +/* using drv_generic_text_icon_draw(W) */ +/* using drv_generic_text_bar_draw(W) */ +/* using drv_generic_gpio_draw(W) */ + + +/****************************************/ +/*** exported functions ***/ +/****************************************/ + + +/* list models */ +int drv_EA232graphic_list(void) +{ + int i; + + for (i = 0; Models[i].name; i++) { + printf("%s ", Models[i].name); + } + + return 0; +} + + +/* initialize driver & display */ +int drv_EA232graphic_init(const char *section, const int quiet) +{ + int ret; + + /* real worker functions */ + drv_generic_graphic_real_blit = drv_EA232graphic_blit; + drv_generic_gpio_real_set = drv_EA232graphic_GPO; + + /* start display */ + if ((ret = drv_EA232graphic_start(section)) != 0) + return ret; + + /* initialize generic graphic driver */ + if ((ret = drv_generic_graphic_init(section, Name)) != 0) + return ret; + + /* initialize GPO */ + if (Model->gpo > 0 && (ret = drv_generic_gpio_init(section, Name)) != 0) + return ret; + + if (!quiet) { + char buffer[40]; + qprintf(buffer, sizeof(buffer), "%s %dx%d", Name, DCOLS, DROWS); + if (drv_generic_graphic_greet(buffer, NULL)) { + sleep(3); + drv_generic_graphic_clear(); + } + } + + /* register plugins */ + AddFunction("LCD::contrast", 1, plugin_contrast); + + return 0; +} + +/* close driver & display */ +int drv_EA232graphic_quit(const int quiet) +{ + + info("%s: shutting down.", Name); + + /* clear display */ + drv_generic_graphic_clear(); + + /* say goodbye... */ + if (!quiet) { + drv_generic_graphic_greet("goodbye!", NULL); + } + + drv_generic_graphic_quit(); + + if (Model->gpo > 0) + drv_generic_gpio_quit(); + + debug("%s: closing connection", Name); + drv_EA232graphic_close(); + + return (0); +} + +/* use this one for a graphic display */ +DRIVER drv_EA232graphic = { + name:Name, + list:drv_EA232graphic_list, + init:drv_EA232graphic_init, + quit:drv_EA232graphic_quit, +}; @@ -1,4 +1,5 @@ -/* $Id: drv_G15.c,v 1.10 2006/08/13 06:46:51 reinelt Exp $ +/* $Id: drv_G15.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_G15.c $ * * Driver for Logitech G-15 keyboard LCD screen * @@ -22,38 +23,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_G15.c,v $ - * Revision 1.10 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.9 2006/07/12 21:01:41 reinelt - * thread_destroy, minor cleanups - * - * Revision 1.8 2006/07/12 20:47:51 reinelt - * indent - * - * Revision 1.7 2006/07/12 20:45:30 reinelt - * G15 and thread patch by Anton - * - * Revision 1.6 2006/02/27 06:14:46 reinelt - * graphic bug resulting in all black pixels solved - * - * Revision 1.5 2006/02/08 04:55:03 reinelt - * moved widget registration to drv_generic_graphic - * - * Revision 1.4 2006/01/30 06:25:49 reinelt - * added CVS Revision - * - * Revision 1.3 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.2 2006/01/21 17:43:25 reinelt - * minor cosmetic fixes - * - * Revision 1.1 2006/01/21 13:26:44 reinelt - * Logitech G-15 keyboard LCD driver from Dave Ingram - * */ /* @@ -542,7 +511,7 @@ int drv_G15_init(const char *section, const int quiet) { int ret; - info("%s: %s", Name, "$Revision: 1.10 $"); + info("%s: %s", Name, "$Rev: 728 $"); DEBUG("entered"); diff --git a/drv_HD44780.c b/drv_HD44780.c index a838044..a8c5424 100644 --- a/drv_HD44780.c +++ b/drv_HD44780.c @@ -1,4 +1,5 @@ -/* $Id: drv_HD44780.c,v 1.64 2006/08/10 20:40:46 reinelt Exp $ +/* $Id: drv_HD44780.c 741 2007-01-17 05:56:27Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_HD44780.c $ * * new style driver for HD44780-based displays * @@ -30,251 +31,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_HD44780.c,v $ - * Revision 1.64 2006/08/10 20:40:46 reinelt - * M50530 enhancements: Timings, busy-flag checking - * - * Revision 1.63 2006/07/29 20:59:12 lfcorreia - * Fix wrong timing at I2C initialization - * - * Revision 1.62 2006/01/30 06:25:49 reinelt - * added CVS Revision - * - * Revision 1.61 2006/01/05 19:27:26 reinelt - * HD44780 power supply from parport - * - * Revision 1.60 2006/01/05 18:56:57 reinelt - * more GPO stuff - * - * Revision 1.59 2006/01/03 06:13:44 reinelt - * GPIO's for MatrixOrbital - * - * Revision 1.58 2005/12/20 07:07:44 reinelt - * further work on GPO's, HD44780 GPO support - * - * Revision 1.57 2005/12/12 09:08:08 reinelt - * finally removed old udelay code path; read timing values from config - * - * Revision 1.56 2005/12/12 05:52:03 reinelt - * type of delays is 'unsigned long' - * - * Revision 1.55 2005/10/02 07:58:48 reinelt - * HD44780 address setup time increased - * - * Revision 1.54 2005/06/09 17:41:47 reinelt - * M50530 fixes (many thanks to Szymon Bieganski) - * - * Revision 1.53 2005/06/01 11:17:54 pk_richman - * marked unused parameters - * - * Revision 1.52 2005/05/31 21:28:42 lfcorreia - * fix typo - * - * Revision 1.50 2005/05/31 20:42:55 lfcorreia - * new file: lcd4linux_i2c.h - * avoid the problems detecting the proper I2C kernel include files - * - * rearrange all the other autoconf stuff to remove I2C detection - * - * new method by Paul Kamphuis to write to the I2C device - * - * Revision 1.49 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.48 2005/05/05 08:36:12 reinelt - * changed SELECT to SLCTIN - * - * Revision 1.47 2005/03/28 22:29:23 reinelt - * HD44780 multiple displays patch from geronet - * - * Revision 1.46 2005/03/28 19:39:23 reinelt - * HD44780/I2C patch from Luis merged (still does not work for me) - * - * Revision 1.45 2005/03/25 15:44:43 reinelt - * HD44780 Backlight fixed (thanks to geronet) - * - * Revision 1.44 2005/01/29 09:30:56 reinelt - * minor HD44780 cleanups - * - * Revision 1.43 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.42 2005/01/17 06:38:48 reinelt - * info about backlight and brightness - * - * Revision 1.41 2005/01/17 06:29:24 reinelt - * added software-controlled backlight support to HD44780 - * - * Revision 1.40 2004/11/30 05:01:25 reinelt - * removed compiler warnings for deactivated i2c bus - * - * Revision 1.39 2004/10/17 09:24:31 reinelt - * I2C support for HD44780 displays by Luis (does not work by now) - * - * Revision 1.38 2004/09/19 09:31:19 reinelt - * HD44780 busy flag checking improved: fall back to busy-waiting if too many errors occur - * - * Revision 1.37 2004/09/18 15:58:57 reinelt - * even more HD44780 cleanups, hardwiring for LCM-162 - * - * Revision 1.36 2004/09/18 10:57:29 reinelt - * more parport/i2c cleanups - * - * Revision 1.35 2004/09/18 09:48:29 reinelt - * HD44780 cleanup and prepararation for I2C backend - * LCM-162 submodel framework - * - * Revision 1.34 2004/09/18 08:22:59 reinelt - * drv_generic_parport_status() to read status lines - * - * Revision 1.33 2004/08/29 13:03:41 reinelt - * - * added RouterBoard driver - * - * Revision 1.32 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.31 2004/06/26 09:27:20 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.30 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.29 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.28 2004/06/05 06:41:39 reinelt - * - * chancged splash screen again - * - * Revision 1.27 2004/06/05 06:13:11 reinelt - * - * splash screen for all text-based display drivers - * - * Revision 1.26 2004/06/02 10:09:22 reinelt - * - * splash screen for HD44780 - * - * Revision 1.25 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.24 2004/06/01 06:45:29 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.23 2004/05/31 05:38:02 reinelt - * - * fixed possible bugs with user-defined chars (clear high bits) - * thanks to Andy Baxter for debugging the MilfordInstruments driver! - * - * Revision 1.22 2004/05/27 03:39:47 reinelt - * - * changed function naming scheme to plugin::function - * - * Revision 1.21 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * - * Revision 1.20 2004/05/22 04:23:49 reinelt - * - * removed 16*x fix again (next time think before commit :-) - * - * Revision 1.19 2004/05/22 04:21:02 reinelt - * - * fix for display RAM layout on 16x4 displays (thanks to toxicated101) - * - * Revision 1.18 2004/03/20 07:31:32 reinelt - * support for HD66712 (which has a different RAM layout) - * further threading development - * - * Revision 1.17 2004/03/19 09:17:46 reinelt - * - * removed the extra 'goto' function, row and col are additional parameters - * of the write() function now. - * - * Revision 1.16 2004/03/11 06:39:58 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.15 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.14 2004/03/01 04:29:51 reinelt - * cfg_number() returns -1 on error, 0 if value not found (but default val used), - * and 1 if value was used from the configuration. - * HD44780 driver adopted to new cfg_number() - * Crystalfontz 631 driver nearly finished - * - * Revision 1.13 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * - * Revision 1.12 2004/02/14 11:56:17 reinelt - * M50530 driver ported - * changed lots of 'char' to 'unsigned char' - * - * Revision 1.11 2004/02/04 19:10:51 reinelt - * Crystalfontz driver nearly finished - * - * Revision 1.10 2004/02/02 05:22:16 reinelt - * Brightness fpr Noritake Displays avaliable as a plugin - * - * Revision 1.9 2004/02/01 11:51:22 hejl - * Fixes for busy flag - * - * Revision 1.8 2004/02/01 08:05:12 reinelt - * Crystalfontz 633 extensions (CRC checking and stuff) - * Models table for HD44780 - * Noritake VFD BVrightness patch from Bill Paxton - * - * Revision 1.7 2004/01/30 07:12:35 reinelt - * HD44780 busy-flag support from Martin Hejl - * loadavg() uClibc replacement from Martin Heyl - * round() uClibc replacement from Martin Hejl - * warning in i2c_sensors fixed - * [ - * - * Revision 1.6 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.5 2004/01/23 07:04:17 reinelt - * icons finished! - * - * Revision 1.4 2004/01/23 04:53:48 reinelt - * icon widget added (not finished yet!) - * - * Revision 1.3 2004/01/22 07:57:45 reinelt - * several bugs fixed where segfaulting on layout>display - * Crystalfontz driver optimized, 632 display already works - * - * Revision 1.2 2004/01/21 06:39:27 reinelt - * HD44780 missed the "clear display' sequence - * asc255bug handling added - * HD44780 tested, works here! - * - * Revision 1.1 2004/01/20 15:32:49 reinelt - * first version of Next Generation HD44780 (untested! but it compiles...) - * some cleanup in the other drivers - * */ /* @@ -310,7 +66,10 @@ #include "drv.h" #include "drv_generic_text.h" #include "drv_generic_gpio.h" + +#ifdef WITH_PARPORT #include "drv_generic_parport.h" +#endif #ifdef WITH_I2C #include "drv_generic_i2c.h" @@ -324,10 +83,13 @@ static int Capabilities; /* Timings */ +#ifdef WITH_PARPORT static int T_CY, T_PW, T_AS, T_AH; -static int T_POWER, T_INIT1, T_INIT2, T_EXEC, T_WRCG, T_CLEAR, T_HOME, T_ONOFF; -static int T_GPO_ST, T_GPO_PW; -static int T_POWER; +#endif +static int T_INIT1, T_INIT2, T_EXEC, T_WRCG, T_CLEAR, T_HOME, T_ONOFF; +#ifdef WITH_PARPORT +static int T_POWER, T_GPO_ST, T_GPO_PW; +#endif static int Bits = 0; static int numControllers = 0; @@ -344,9 +106,12 @@ static unsigned char SIGNAL_ENABLE; static unsigned char SIGNAL_ENABLE2; static unsigned char SIGNAL_ENABLE3; static unsigned char SIGNAL_ENABLE4; -static unsigned char SIGNAL_BACKLIGHT; + static unsigned char SIGNAL_GPO; +#ifdef WITH_PARPORT +static unsigned char SIGNAL_BACKLIGHT; static unsigned char SIGNAL_POWER; +#endif /* maximum time to wait for the busy-flag (in usec) */ #define MAX_BUSYFLAG_WAIT 10000 @@ -355,11 +120,14 @@ static unsigned char SIGNAL_POWER; #define MAX_BUSYFLAG_ERRORS 20 /* flag for busy-waiting vs. busy flag checking */ +#ifdef WITH_PARPORT static int UseBusy = 0; +#endif /* buffer holding the GPO state */ +#ifdef WITH_PARPORT static unsigned char GPO = 0; - +#endif typedef struct { int type; @@ -406,6 +174,8 @@ static void (*drv_HD_stop) (void); /*** parport dependant functions ***/ /****************************************/ +#ifdef WITH_PARPORT + static void drv_HD_PP_busy(const int controller) { static unsigned int errors = 0; @@ -902,6 +672,8 @@ static void drv_HD_PP_stop(void) } +#endif + #ifdef WITH_I2C @@ -1132,6 +904,8 @@ static void drv_HD_defchar(const int ascii, const unsigned char *matrix) } +#ifdef WITH_PARPORT + static int drv_HD_backlight(int backlight) { if (!(Capabilities & CAP_BACKLIGHT)) @@ -1147,6 +921,8 @@ static int drv_HD_backlight(int backlight) return backlight; } +#endif + static int drv_HD_brightness(int brightness) { @@ -1169,6 +945,8 @@ static int drv_HD_brightness(int brightness) } +#ifdef WITH_PARPORT + static int drv_HD_GPO(const int num, const int val) { int v; @@ -1196,6 +974,10 @@ static int drv_HD_GPO(const int num, const int val) return v; } +#endif + + +#ifdef WITH_PARPORT static void drv_HD_LCM162_timer(void __attribute__ ((unused)) * notused) { @@ -1225,6 +1007,8 @@ static void drv_HD_LCM162_timer(void __attribute__ ((unused)) * notused) } } +#endif + static int drv_HD_start(const char *section, const int quiet) { @@ -1262,14 +1046,23 @@ static int drv_HD_start(const char *section, const int quiet) } if (strcasecmp(bus, "parport") == 0) { + +#ifdef WITH_PARPORT info("%s: using parallel port", Name); Bus = BUS_PP; drv_HD_load = drv_HD_PP_load; drv_HD_command = drv_HD_PP_command; drv_HD_data = drv_HD_PP_data; drv_HD_stop = drv_HD_PP_stop; +#else + error("%s: %s.Bus '%s' from %s not available:", Name, section, bus, cfg_source()); + error("%s: lcd4linux was compiled without parport support!", Name); + free(bus); + return -1; +#endif } else if (strcasecmp(bus, "i2c") == 0) { + #ifdef WITH_I2C info("%s: using I2C bus", Name); Bus = BUS_I2C; @@ -1396,6 +1189,7 @@ static int drv_HD_start(const char *section, const int quiet) drv_HD_command(allControllers, 0x03, T_HOME); /* return home */ /* maybe set backlight */ +#ifdef WITH_PARPORT if (Capabilities & CAP_BACKLIGHT) { int backlight; if (cfg_number(section, "Backlight", 0, 0, 1, &backlight) > 0) { @@ -1403,6 +1197,7 @@ static int drv_HD_start(const char *section, const int quiet) drv_HD_backlight(backlight); } } +#endif /* maybe set brightness */ if (Capabilities & CAP_BRIGHTNESS) { @@ -1414,9 +1209,11 @@ static int drv_HD_start(const char *section, const int quiet) } /* install keypad polling timer for LCM-162 */ +#ifdef WITH_PARPORT if (Capabilities & CAP_LCM162) { timer_add(drv_HD_LCM162_timer, NULL, 10, 0); } +#endif if (!quiet) { char buffer[40]; @@ -1436,6 +1233,7 @@ static int drv_HD_start(const char *section, const int quiet) /****************************************/ +#ifdef WITH_PARPORT static void plugin_backlight(RESULT * result, RESULT * arg1) { double backlight; @@ -1443,7 +1241,7 @@ static void plugin_backlight(RESULT * result, RESULT * arg1) backlight = drv_HD_backlight(R2N(arg1)); SetResult(&result, R_NUMBER, &backlight); } - +#endif static void plugin_brightness(RESULT * result, RESULT * arg1) { @@ -1489,7 +1287,7 @@ int drv_HD_init(const char *section, const int quiet) int asc255bug; int ret; - info("%s: %s", Name, "$Revision: 1.64 $"); + info("%s: %s", Name, "$Rev: 741 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ @@ -1501,8 +1299,9 @@ int drv_HD_init(const char *section, const int quiet) /* real worker functions */ drv_generic_text_real_write = drv_HD_write; drv_generic_text_real_defchar = drv_HD_defchar; +#ifdef WITH_PARPORT drv_generic_gpio_real_set = drv_HD_GPO; - +#endif /* start display */ if ((ret = drv_HD_start(section, quiet)) != 0) @@ -1549,9 +1348,11 @@ int drv_HD_init(const char *section, const int quiet) widget_register(&wc); /* register plugins */ +#ifdef WITH_PARPORT if (Capabilities & CAP_BACKLIGHT) { AddFunction("LCD::backlight", 1, plugin_backlight); } +#endif if (Capabilities & CAP_BRIGHTNESS) { AddFunction("LCD::brightness", 1, plugin_brightness); } diff --git a/drv_Image.c b/drv_Image.c index 8518de8..eed1923 100644 --- a/drv_Image.c +++ b/drv_Image.c @@ -1,4 +1,5 @@ -/* $Id: drv_Image.c,v 1.19 2006/08/13 06:46:51 reinelt Exp $ +/* $Id: drv_Image.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_Image.c $ * * new style Image (PPM/PNG) Driver for LCD4Linux * @@ -21,77 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_Image.c,v $ - * Revision 1.19 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.18 2006/06/21 05:12:43 reinelt - * added checks for libgd version 2 (thanks to Sam) - * - * Revision 1.17 2006/02/08 04:55:04 reinelt - * moved widget registration to drv_generic_graphic - * - * Revision 1.16 2006/02/06 06:29:30 reinelt - * Image driver uses RGBA - * - * Revision 1.15 2006/01/30 06:25:52 reinelt - * added CVS Revision - * - * Revision 1.14 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.13 2005/11/04 04:44:52 reinelt - * LPH7508 driver (not yet finished) - * - * Revision 1.12 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.11 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.10 2004/11/29 04:42:07 reinelt - * removed the 99999 msec limit on widget update time (thanks to Petri Damsten) - * - * Revision 1.9 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.8 2004/06/26 09:27:20 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.7 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.6 2004/06/19 08:20:19 reinelt - * - * compiler warning in image driver fixed - * bar bug in USBLCD driver fixed - * - * Revision 1.5 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.4 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.3 2004/05/31 06:24:42 reinelt - * - * fixed symlink security issue with the image driver - * - * Revision 1.2 2004/05/29 23:30:20 reinelt - * - * fixed a compiler issue with drv_Image.c (thanks to Frank Stratmann) - * - * Revision 1.1 2004/05/25 14:27:21 reinelt - * - * added drv_Image.c (this time really!) - * */ /* @@ -492,7 +422,7 @@ int drv_IMG_init(const char *section, const __attribute__ ((unused)) { int ret; - info("%s: %s", Name, "$Revision: 1.19 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* real worker functions */ drv_generic_graphic_real_blit = drv_IMG_blit; diff --git a/drv_LCD2USB.c b/drv_LCD2USB.c index 0c4b6bc..ecf8fcc 100644 --- a/drv_LCD2USB.c +++ b/drv_LCD2USB.c @@ -1,4 +1,5 @@ -/* $Id: drv_LCD2USB.c,v 1.11 2006/07/19 01:35:31 cmay Exp $ +/* $Id: drv_LCD2USB.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_LCD2USB.c $ * * driver for USB2LCD display interface * see http://www.harbaum.org/till/lcd2usb for schematics @@ -22,42 +23,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_LCD2USB.c,v $ - * Revision 1.11 2006/07/19 01:35:31 cmay - * Renamed keypad direction names to avoid conflict with Curses library defs. - * Added keypad support to Curses display driver. - * - * Revision 1.10 2006/04/09 14:17:50 reinelt - * autoconf/library fixes, image and graphic display inversion - * - * Revision 1.9 2006/03/18 14:54:36 harbaum - * Improved USB error recovery - * - * Revision 1.8 2006/02/22 15:59:39 cmay - * removed KEYPADSIZE cruft per harbaum's suggestion - * - * Revision 1.7 2006/02/21 21:43:03 harbaum - * Keypad support for LCD2USB - * - * Revision 1.6 2006/02/12 14:32:24 harbaum - * Configurable bus/device id - * - * Revision 1.5 2006/02/09 20:32:49 harbaum - * LCD2USB bus testing, version verification ... - * - * Revision 1.4 2006/01/30 20:21:51 harbaum - * LCD2USB: Added support for displays with two controllers - * - * Revision 1.3 2006/01/30 06:25:52 reinelt - * added CVS Revision - * - * Revision 1.2 2006/01/28 15:36:17 harbaum - * Fix: string termination bug in eval() - * - * Revision 1.1 2006/01/26 19:26:27 harbaum - * Added LCD2USB support - * */ /* @@ -617,7 +582,7 @@ int drv_L2U_init(const char *section, const int quiet) int asc255bug; int ret; - info("%s: %s", Name, "$Revision: 1.11 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ diff --git a/drv_LCDLinux.c b/drv_LCDLinux.c index 63199c2..26d12f5 100644 --- a/drv_LCDLinux.c +++ b/drv_LCDLinux.c @@ -1,4 +1,5 @@ -/* $Id: drv_LCDLinux.c,v 1.14 2006/07/12 20:47:51 reinelt Exp $ +/* $Id: drv_LCDLinux.c 736 2007-01-16 06:15:15Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_LCDLinux.c $ * * driver for the LCD-Linux HD44780 kernel driver * http://lcd-linux.sourceforge.net @@ -22,50 +23,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_LCDLinux.c,v $ - * Revision 1.14 2006/07/12 20:47:51 reinelt - * indent - * - * Revision 1.13 2006/04/17 08:10:42 reinelt - * LCDLinux patch from Mattia; widget_image moved to EXTRA_SOURCE - * - * Revision 1.12 2006/01/30 06:25:52 reinelt - * added CVS Revision - * - * Revision 1.11 2006/01/18 11:49:48 reinelt - * adopted to lcd-linux-0.9.2 - * - * Revision 1.10 2005/08/27 07:02:25 reinelt - * LCD-Linux updated to 0.9.0 - * - * Revision 1.9 2005/06/15 05:24:35 reinelt - * updated LCD-Linux driver to version 0.8.9 - * - * Revision 1.8 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.7 2005/05/02 05:15:46 reinelt - * make busy-flag checking configurable for LCD-Linux driver - * - * Revision 1.6 2005/04/30 06:02:09 reinelt - * LCD-Linux display size set up from lcd4linux.conf - * - * Revision 1.5 2005/04/09 07:36:42 reinelt - * updated LCD-Linux driver to version 0.8.8 - * - * Revision 1.4 2005/02/24 07:06:48 reinelt - * SimpleLCD driver added - * - * Revision 1.3 2005/02/24 06:51:40 reinelt - * LCD-Linux driver GOTO_COST corrected - * - * Revision 1.2 2005/01/30 06:43:22 reinelt - * driver for LCD-Linux finished - * - * Revision 1.1 2005/01/22 22:57:57 reinelt - * LCD-Linux driver added - * */ /* @@ -106,7 +63,6 @@ static char Name[] = "LCD-Linux"; static char Device[] = "/dev/lcd"; static int lcdlinux_fd = -1; -static int raw_mode = 0; /****************************************/ @@ -139,7 +95,7 @@ static void drv_LL_send(const char *string, const int len) static void drv_LL_clear(void) { /* No return value check since this ioctl cannot fail */ - ioctl(lcdlinux_fd, IOCTL_CLEAR_DISP); + ioctl(lcdlinux_fd, LCDL_CLEAR_DISP); } @@ -156,20 +112,17 @@ static void drv_LL_write(const int row, const int col, const char *data, int len static void drv_LL_defchar(const int ascii, const unsigned char *matrix) { - char buffer[8]; - int pos = 1024 + ascii; + char buf[9]; int i; - for (i = 0; i < 8; i++) { - buffer[i] = *matrix++ & 0x1f; + buf[0] = ascii; + for (i = 1; i < 9; i++) { + buf[i] = *matrix++ & 0x1f; } - if (lseek(lcdlinux_fd, pos, SEEK_SET) == (off_t) - 1) { - error("%s: lseek(%s) failed: %s", Name, Device, strerror(errno)); + if (ioctl(lcdlinux_fd, LCDL_SET_CGRAM_CHAR, &buf) != 0) { + error("%s: ioctl(LCDL_SET_CGRAM_CHAR) failed: %s", Name, strerror(errno)); } - - drv_LL_send(buffer, 8); - } @@ -203,20 +156,25 @@ static int drv_LL_start(const char *section, const int quiet) /* get display size */ memset(&buf, 0, sizeof(buf)); - if (ioctl(lcdlinux_fd, IOCTL_GET_PARAM, &buf) != 0) { - error("%s: ioctl(IOCTL_GET_PARAM) failed: %s", Name, strerror(errno)); + if (ioctl(lcdlinux_fd, LCDL_GET_PARAM, &buf) != 0) { + error("%s: ioctl(LCDL_GET_PARAM) failed: %s", Name, strerror(errno)); error("%s: Could not query display information!", Name); return -1; } - info("%s: %dx%d display with %d controllers, flags=0x%02x:", + info("%s: %dx%d display with %d controllers, flags=0x%02lx:", Name, buf.cntr_cols, buf.cntr_rows, buf.num_cntr, buf.flags); - info("%s: busy-flag checking %sabled", Name, buf.flags & HD44780_CHECK_BF ? "en" : "dis"); - info("%s: bus width %d bits", Name, buf.flags & HD44780_4BITS_BUS ? 4 : 8); - info("%s: font size %s", Name, buf.flags & HD44780_5X10_FONT ? "5x10" : "5x8"); - - + info("%s: busy-flag checking %sabled", Name, (buf.flags & HD44780_CHECK_BF) ? "en" : "dis"); + info("%s: bus width %d bits", Name, (buf.flags & HD44780_4BITS_BUS) ? 4 : 8); + info("%s: font size %s", Name, (buf.flags & HD44780_5X10_FONT) ? "5x10" : "5x8"); /* overwrite width size from lcd4linux.conf */ + if (buf.vs_rows || buf.vs_cols) { + info("%s: disabling virtual screen", Name); + buf.vs_rows = 0; + buf.vs_cols = 0; + commit = 1; + } + if ((rows > 0 && rows != buf.cntr_rows) || (cols > 0 && cols != buf.cntr_cols)) { info("%s: changing size to %dx%d", Name, cols, rows); buf.cntr_rows = rows; @@ -251,8 +209,8 @@ static int drv_LL_start(const char *section, const int quiet) commit = 1; } - if (commit && ioctl(lcdlinux_fd, IOCTL_SET_PARAM, &buf) != 0) { - error("%s: ioctl(IOCTL_SET_PARAM) failed: %s", Name, strerror(errno)); + if (commit && ioctl(lcdlinux_fd, LCDL_SET_PARAM, &buf) != 0) { + error("%s: ioctl(LCDL_SET_PARAM) failed: %s", Name, strerror(errno)); return -1; } @@ -261,8 +219,7 @@ static int drv_LL_start(const char *section, const int quiet) /* Disable control characters interpretation. */ /* No return value check since this ioctl cannot fail */ - raw_mode = 1; - ioctl(lcdlinux_fd, IOCTL_RAW_MODE, &raw_mode); + ioctl(lcdlinux_fd, LCDL_RAW_MODE, 1); if (!quiet) { char buffer[40]; @@ -314,7 +271,7 @@ int drv_LL_init(const char *section, const int quiet) int asc255bug; int ret; - info("%s: %s", Name, "$Revision: 1.14 $"); + info("%s: %s", Name, "$Rev: 736 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ @@ -393,8 +350,7 @@ int drv_LL_quit(const int quiet) /* Enable control characters interpretation. */ /* No return value check since this ioctl cannot fail */ - raw_mode = 0; - ioctl(lcdlinux_fd, IOCTL_RAW_MODE, &raw_mode); + ioctl(lcdlinux_fd, LCDL_RAW_MODE, 0); /* close device */ close(lcdlinux_fd); diff --git a/drv_LCDTerm.c b/drv_LCDTerm.c index 851b9d5..9a5a91c 100644 --- a/drv_LCDTerm.c +++ b/drv_LCDTerm.c @@ -1,4 +1,5 @@ -/* $Id: drv_LCDTerm.c,v 1.5 2006/01/30 06:25:52 reinelt Exp $ +/* $Id: drv_LCDTerm.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_LCDTerm.c $ * * driver for the LCDTerm serial-to-HD44780 adapter boards * http://www.bobblick.com/techref/projects/lcdterm/lcdterm.html @@ -22,23 +23,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_LCDTerm.c,v $ - * Revision 1.5 2006/01/30 06:25:52 reinelt - * added CVS Revision - * - * Revision 1.4 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.3 2005/01/22 22:57:57 reinelt - * LCD-Linux driver added - * - * Revision 1.2 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.1 2005/01/15 13:13:57 reinelt - * LCDTerm driver added, take 2 - * */ /* @@ -214,7 +198,7 @@ int drv_LT_init(const char *section, const int quiet) int asc255bug; int ret; - info("%s: %s", Name, "$Revision: 1.5 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ diff --git a/drv_LEDMatrix.c b/drv_LEDMatrix.c index 55234be..afb58bc 100644 --- a/drv_LEDMatrix.c +++ b/drv_LEDMatrix.c @@ -1,4 +1,5 @@ -/* $Id: drv_LEDMatrix.c,v 1.9 2006/08/14 19:24:22 harbaum Exp $ +/* $Id: drv_LEDMatrix.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_LEDMatrix.c $ * * LED matrix driver for LCD4Linux * (see http://www.harbaum.org/till/ledmatrix for hardware) @@ -21,36 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_LEDMatrix.c,v $ - * Revision 1.9 2006/08/14 19:24:22 harbaum - * Umlaut support, added KVV HTTP-User-Agent - * - * Revision 1.8 2006/08/14 05:54:04 reinelt - * minor warnings fixed, CFLAGS changed (no-strict-aliasing) - * - * Revision 1.7 2006/08/13 18:45:25 harbaum - * Little cleanup ... - * - * Revision 1.6 2006/08/13 18:14:03 harbaum - * Added KVV plugin - * - * Revision 1.5 2006/08/13 09:53:10 reinelt - * dynamic properties added (used by 'style' of text widget) - * - * Revision 1.4 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.3 2006/08/09 17:25:34 harbaum - * Better bar color support and new bold font - * - * Revision 1.2 2006/08/08 20:16:28 harbaum - * Added "extracolor" (used for e.g. bar border) and RGB support for LEDMATRIX - * - * Revision 1.1 2006/08/05 21:08:01 harbaum - * New LEDMATRIX driver (see http://www.harbaum.org/till/ledmatrix) - * - * */ /* @@ -206,7 +177,7 @@ static int drv_LEDMatrix_start(const char *section) info("%s: port set to %d", Name, val); port = val; } else { - info("%s: using default port", Name, port); + info("%s: using default port %d", Name, port); } /* display size is hard coded */ diff --git a/drv_LPH7508.c b/drv_LPH7508.c index c5a1e30..814f936 100644 --- a/drv_LPH7508.c +++ b/drv_LPH7508.c @@ -1,4 +1,5 @@ -/* $Id: drv_LPH7508.c,v 1.10 2006/02/27 06:14:46 reinelt Exp $ +/* $Id: drv_LPH7508.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_LPH7508.c $ * * driver for Pollin LPH7508 * @@ -21,38 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_LPH7508.c,v $ - * Revision 1.10 2006/02/27 06:14:46 reinelt - * graphic bug resulting in all black pixels solved - * - * Revision 1.9 2006/02/08 04:55:04 reinelt - * moved widget registration to drv_generic_graphic - * - * Revision 1.8 2006/01/30 06:25:53 reinelt - * added CVS Revision - * - * Revision 1.7 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.6 2006/01/05 18:56:57 reinelt - * more GPO stuff - * - * Revision 1.5 2006/01/03 06:13:45 reinelt - * GPIO's for MatrixOrbital - * - * Revision 1.4 2005/12/20 07:07:44 reinelt - * further work on GPO's, HD44780 GPO support - * - * Revision 1.3 2005/12/18 16:18:36 reinelt - * GPO's added again - * - * Revision 1.2 2005/12/13 14:07:28 reinelt - * LPH7508 driver finished - * - * Revision 1.1 2005/11/04 14:10:38 reinelt - * drv_Sample and drv_LPH7508 - * */ /* @@ -485,7 +454,7 @@ int drv_L7_init(const char *section, const int quiet) { int ret; - info("%s: %s", Name, "$Revision: 1.10 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* real worker functions */ drv_generic_graphic_real_blit = drv_L7_blit; diff --git a/drv_LUIse.c b/drv_LUIse.c index e25e933..578f218 100644 --- a/drv_LUIse.c +++ b/drv_LUIse.c @@ -1,4 +1,5 @@ -/* $Id: drv_LUIse.c,v 1.6 2006/04/09 14:17:50 reinelt Exp $ +/* $Id: drv_LUIse.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_LUIse.c $ * * LUIse lcd4linux driver * @@ -21,26 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_LUIse.c,v $ - * Revision 1.6 2006/04/09 14:17:50 reinelt - * autoconf/library fixes, image and graphic display inversion - * - * Revision 1.5 2006/03/10 18:06:52 tooly-bln - * replace drv_generic_graphic_FB with drv_generic_graphic_black - * - * Revision 1.4 2006/02/08 04:55:05 reinelt - * moved widget registration to drv_generic_graphic - * - * Revision 1.3 2006/01/30 06:25:53 reinelt - * added CVS Revision - * - * Revision 1.2 2006/01/06 16:56:49 tooly-bln - * *** empty log message *** - * - * Revision 1.1 2006/01/03 13:20:06 reinelt - * LUIse driver added - * */ /* @@ -289,7 +270,7 @@ int drv_LUIse_init(const char *section, const int quiet) { int ret; - info("%s: %s", Name, "$Revision: 1.6 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* real worker functions */ drv_generic_graphic_real_blit = drv_LUIse_blit; diff --git a/drv_M50530.c b/drv_M50530.c index 8387b6b..fe2c3c4 100644 --- a/drv_M50530.c +++ b/drv_M50530.c @@ -1,4 +1,5 @@ -/* $Id: drv_M50530.c,v 1.24 2006/08/13 06:46:51 reinelt Exp $ +/* $Id: drv_M50530.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_M50530.c $ * * new style driver for M50530-based displays * @@ -21,104 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_M50530.c,v $ - * Revision 1.24 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.23 2006/08/11 11:59:29 reinelt - * M50530 minor fixes - * - * Revision 1.22 2006/08/10 20:40:46 reinelt - * M50530 enhancements: Timings, busy-flag checking - * - * Revision 1.21 2006/01/30 06:25:53 reinelt - * added CVS Revision - * - * Revision 1.20 2006/01/05 18:56:57 reinelt - * more GPO stuff - * - * Revision 1.19 2005/06/09 17:41:47 reinelt - * M50530 fixes (many thanks to Szymon Bieganski) - * - * Revision 1.18 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.17 2005/05/05 08:36:12 reinelt - * changed SELECT to SLCTIN - * - * Revision 1.16 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.15 2005/01/06 16:54:53 reinelt - * M50530 fixes - * - * Revision 1.14 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.13 2004/06/26 09:27:20 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.12 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.11 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.10 2004/06/05 06:41:39 reinelt - * - * chancged splash screen again - * - * Revision 1.9 2004/06/05 06:13:12 reinelt - * - * splash screen for all text-based display drivers - * - * Revision 1.8 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.7 2004/06/01 06:45:29 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.6 2004/05/31 05:38:02 reinelt - * - * fixed possible bugs with user-defined chars (clear high bits) - * thanks to Andy Baxter for debugging the MilfordInstruments driver! - * - * Revision 1.5 2004/05/29 15:53:28 reinelt - * - * M50530: reset parport signals on exit - * plugin_ppp: ppp() has two parameters, not three - * lcd4linux.conf.sample: diskstats() corrected - * - * Revision 1.4 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * - * Revision 1.3 2004/03/19 09:17:46 reinelt - * - * removed the extra 'goto' function, row and col are additional parameters - * of the write() function now. - * - * Revision 1.2 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * - * Revision 1.1 2004/02/15 08:22:47 reinelt - * ported USBLCD driver to NextGeneration - * added drv_M50530.c (I forgot yesterday, sorry) - * removed old drivers M50530.c and USBLCD.c - * */ /* @@ -448,8 +351,7 @@ static int drv_M5_start(const char *section, const int quiet) if (DCOLS * DROWS > 256) { - error("%s: %s.Size '%dx%d' is too big, would require %d bytes", Name, section, DCOLS, DROWS, DCOLS * DROWS, - cfg_source()); + error("%s: %s.Size '%dx%d' is too big, would require %d bytes", Name, section, DCOLS, DROWS, DCOLS * DROWS); return -1; } else if (DCOLS * DROWS > 224) { DDRAM = 256; @@ -691,7 +593,7 @@ int drv_M5_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.24 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = -1; /* pixel width of one char */ diff --git a/drv_MatrixOrbital.c b/drv_MatrixOrbital.c index 93e813d..93346f2 100644 --- a/drv_MatrixOrbital.c +++ b/drv_MatrixOrbital.c @@ -1,4 +1,5 @@ -/* $Id: drv_MatrixOrbital.c,v 1.42 2006/01/30 06:25:53 reinelt Exp $ +/* $Id: drv_MatrixOrbital.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_MatrixOrbital.c $ * * new style driver for Matrix Orbital serial display modules * @@ -21,181 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_MatrixOrbital.c,v $ - * Revision 1.42 2006/01/30 06:25:53 reinelt - * added CVS Revision - * - * Revision 1.41 2006/01/05 18:56:57 reinelt - * more GPO stuff - * - * Revision 1.40 2006/01/03 06:13:45 reinelt - * GPIO's for MatrixOrbital - * - * Revision 1.39 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.38 2005/01/22 12:44:41 reinelt - * MatrixOrbital backlight micro-fix - * - * Revision 1.37 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.36 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.35 2004/06/26 09:27:20 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.34 2004/06/26 06:12:15 reinelt - * - * support for Beckmann+Egle Compact Terminals - * some mostly cosmetic changes in the MatrixOrbital and USBLCD driver - * added debugging to the generic serial driver - * fixed a bug in the generic text driver where icons could be drawn outside - * the display bounds - * - * Revision 1.33 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.32 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.31 2004/06/05 06:41:39 reinelt - * - * chancged splash screen again - * - * Revision 1.30 2004/06/05 06:13:12 reinelt - * - * splash screen for all text-based display drivers - * - * Revision 1.29 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.28 2004/06/01 06:45:29 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.27 2004/05/31 21:23:16 reinelt - * - * some cleanups in the MatrixOrbital driver - * - * Revision 1.26 2004/05/31 16:39:06 reinelt - * - * added NULL display driver (for debugging/profiling purposes) - * added backlight/contrast initialisation for matrixOrbital - * added Backlight initialisation for Cwlinux - * - * Revision 1.25 2004/05/31 05:38:02 reinelt - * - * fixed possible bugs with user-defined chars (clear high bits) - * thanks to Andy Baxter for debugging the MilfordInstruments driver! - * - * Revision 1.24 2004/05/28 13:51:42 reinelt - * - * ported driver for Beckmann+Egle Mini-Terminals - * added 'flags' parameter to serial_init() - * - * Revision 1.23 2004/05/27 03:39:47 reinelt - * - * changed function naming scheme to plugin::function - * - * Revision 1.22 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * - * Revision 1.21 2004/03/19 09:17:46 reinelt - * - * removed the extra 'goto' function, row and col are additional parameters - * of the write() function now. - * - * Revision 1.20 2004/02/14 11:56:17 reinelt - * M50530 driver ported - * changed lots of 'char' to 'unsigned char' - * - * Revision 1.19 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.18 2004/01/23 07:04:22 reinelt - * icons finished! - * - * Revision 1.17 2004/01/23 04:53:50 reinelt - * icon widget added (not finished yet!) - * - * Revision 1.16 2004/01/22 07:57:45 reinelt - * several bugs fixed where segfaulting on layout>display - * Crystalfontz driver optimized, 632 display already works - * - * Revision 1.15 2004/01/21 12:36:19 reinelt - * Crystalfontz NextGeneration driver added - * - * Revision 1.14 2004/01/20 15:32:49 reinelt - * first version of Next Generation HD44780 (untested! but it compiles...) - * some cleanup in the other drivers - * - * Revision 1.13 2004/01/20 14:25:12 reinelt - * some reorganization - * moved drv_generic to drv_generic_serial - * moved port locking stuff to drv_generic_serial - * - * Revision 1.12 2004/01/20 12:45:47 reinelt - * "Default screen" working with MatrixOrbital - * - * Revision 1.11 2004/01/20 05:36:59 reinelt - * moved text-display-specific stuff to drv_generic_text - * moved all the bar stuff from drv_generic_bar to generic_text - * - * Revision 1.10 2004/01/20 04:51:39 reinelt - * moved generic stuff from drv_MatrixOrbital to drv_generic - * implemented new-stylish bars which are nearly finished - * - * Revision 1.9 2004/01/18 21:25:16 reinelt - * Framework for bar widget opened - * - * Revision 1.8 2004/01/15 07:47:02 reinelt - * debian/ postinst and watch added (did CVS forget about them?) - * evaluator: conditional expressions (a?b:c) added - * text widget nearly finished - * - * Revision 1.7 2004/01/14 11:33:00 reinelt - * new plugin 'uname' which does what it's called - * text widget nearly finished - * first results displayed on MatrixOrbital - * - * Revision 1.6 2004/01/11 18:26:02 reinelt - * further widget and layout processing - * - * Revision 1.5 2004/01/11 09:26:15 reinelt - * layout starts to exist... - * - * Revision 1.4 2004/01/10 20:22:33 reinelt - * added new function 'cfg_list()' (not finished yet) - * added layout.c (will replace processor.c someday) - * added widget_text.c (will be the first and most important widget) - * modified lcd4linux.c so that old-style configs should work, too - * - * Revision 1.3 2004/01/10 17:34:40 reinelt - * further matrixOrbital changes - * widgets initialized - * - * Revision 1.2 2004/01/10 10:20:22 reinelt - * new MatrixOrbital changes - * - * Revision 1.1 2004/01/09 17:03:07 reinelt - * initiated transfer to new driver architecture - * new file 'drv.c' will someday replace 'display.c' - * new file 'drv_MatrixOrbital.c' will replace 'MatrixOrbital.c' - * due to this 'soft' transfer lcd4linux should stay usable during the switch - * (at least I hope so) - * */ /* @@ -637,7 +463,7 @@ int drv_MO_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.42 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ diff --git a/drv_MilfordInstruments.c b/drv_MilfordInstruments.c index ca056ec..e9afd35 100644 --- a/drv_MilfordInstruments.c +++ b/drv_MilfordInstruments.c @@ -1,4 +1,5 @@ -/* $Id: drv_MilfordInstruments.c,v 1.15 2006/01/30 06:25:53 reinelt Exp $ +/* $Id: drv_MilfordInstruments.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_MilfordInstruments.c $ * * driver for Milford Instruments 'BPK' piggy-back serial interface board * for standard Hitachi 44780 compatible lcd modules. @@ -25,63 +26,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_MilfordInstruments.c,v $ - * Revision 1.15 2006/01/30 06:25:53 reinelt - * added CVS Revision - * - * Revision 1.14 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.13 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.12 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.11 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.10 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.9 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.8 2004/06/05 06:41:40 reinelt - * - * chancged splash screen again - * - * Revision 1.7 2004/06/05 06:13:12 reinelt - * - * splash screen for all text-based display drivers - * - * Revision 1.6 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.5 2004/05/31 05:38:02 reinelt - * - * fixed possible bugs with user-defined chars (clear high bits) - * thanks to Andy Baxter for debugging the MilfordInstruments driver! - * - * Revision 1.4 2004/05/31 01:31:01 andy-b - * - * - * fixed bug in Milford Instruments driver which drew extra graphics chars in - * odd places when drawing double bars. (the display doesn't like it if you put - * the escape character 0xfe inside a define char sequence). - * - * Revision 1.1 2004/05/26 05:03:27 reinelt - * - * MilfordInstruments driver ported - * */ /* @@ -255,7 +199,7 @@ int drv_MI_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.15 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ @@ -1,4 +1,5 @@ -/* $Id: drv_NULL.c,v 1.9 2006/01/30 06:25:53 reinelt Exp $ +/* $Id: drv_NULL.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_NULL.c $ * * NULL driver (for testing) * @@ -21,45 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_NULL.c,v $ - * Revision 1.9 2006/01/30 06:25:53 reinelt - * added CVS Revision - * - * Revision 1.8 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.7 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.6 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.5 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.4 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.3 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.2 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.1 2004/05/31 16:39:06 reinelt - * - * added NULL display driver (for debugging/profiling purposes) - * added backlight/contrast initialisation for matrixOrbital - * added Backlight initialisation for Cwlinux - * */ /* @@ -122,7 +84,7 @@ static int drv_NULL_start(const char *section) return -1; } if (sscanf(s, "%dx%d", &DCOLS, &DROWS) != 2 || DROWS < 1 || DCOLS < 1) { - error("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source); + error("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source()); free(s); return -1; } @@ -167,7 +129,7 @@ int drv_NULL_init(const char *section, const __attribute__ ((unused)) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.9 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 6; /* pixel width of one char */ diff --git a/drv_Noritake.c b/drv_Noritake.c index 5413e11..b9489c3 100644 --- a/drv_Noritake.c +++ b/drv_Noritake.c @@ -1,4 +1,5 @@ -/* $Id: drv_Noritake.c,v 1.8 2006/02/27 08:12:34 reinelt Exp $ +/* $Id: drv_Noritake.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_Noritake.c $ * * Driver for a Noritake GU128x32-311 graphical display. * @@ -21,37 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Log: drv_Noritake.c,v $ - * Revision 1.8 2006/02/27 08:12:34 reinelt - * use serdisplib's full color support - * - * Revision 1.7 2006/02/27 06:15:55 reinelt - * indent... - * - * Revision 1.6 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.5 2006/01/30 06:25:53 reinelt - * added CVS Revision - * - * Revision 1.4 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.3 2005/05/05 08:36:12 reinelt - * changed SELECT to SLCTIN - * - * Revision 1.2 2005/05/04 07:18:44 obconseil - * Driver modified according to Michels's recommendations : - * - * - Suppressed linux/parport.h depandancy. It was not needed anyway. - * - Compile-time disable the wait_busy polling function, replaced with a time wait. - * - Replaced the hardwire_* calls by their wire_* equivalent, to adapt other wirings. - * - Created a "Models" structure, containing parameters for the display. - * - Other cleanups, to remove compile-time warnings. - * - * Revision 1.1 2005/05/04 05:42:38 reinelt - * Noritake driver added - * */ /* @@ -358,7 +328,7 @@ int drv_Noritake_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.8 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* start display */ if ((ret = drv_Noritake_start(section)) != 0) diff --git a/drv_RouterBoard.c b/drv_RouterBoard.c index 75f5c73..5473f92 100644 --- a/drv_RouterBoard.c +++ b/drv_RouterBoard.c @@ -1,4 +1,5 @@ -/* $Id: drv_RouterBoard.c,v 1.7 2006/01/30 06:25:53 reinelt Exp $ +/* $Id: drv_RouterBoard.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_RouterBoard.c $ * * driver for the "Router Board LCD port" * see port details at http://www.routerboard.com @@ -24,27 +25,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_RouterBoard.c,v $ - * Revision 1.7 2006/01/30 06:25:53 reinelt - * added CVS Revision - * - * Revision 1.6 2006/01/06 07:06:57 reinelt - * GPO's for RouterBoard - * - * Revision 1.5 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.4 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.3 2004/08/30 12:48:52 rjoco77 - * * Added backlight update immediatelly - * - * Revision 1.2 2004/08/29 20:07:55 reinelt - * - * Patch from Joco: Make RouterBoard Backlight configurable - * */ @@ -570,7 +550,7 @@ int drv_RB_init(const char *section, const int quiet) int asc255bug; int ret; - info("%s: %s", Name, "$Revision: 1.7 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ diff --git a/drv_Sample.c b/drv_Sample.c index 974bb31..de42e9d 100644 --- a/drv_Sample.c +++ b/drv_Sample.c @@ -1,9 +1,10 @@ -/* $Id: drv_Sample.c,v 1.8 2006/06/19 11:54:08 reinelt Exp $ +/* $Id: drv_Sample.c 733 2007-01-15 05:47:13Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_Sample.c $ * * sample lcd4linux driver * * Copyright (C) 2005 Michael Reinelt <reinelt@eunet.at> - * Copyright (C) 2005 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> + * Copyright (C) 2005, 2006, 2007 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> * * This file is part of LCD4Linux. * @@ -21,32 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_Sample.c,v $ - * Revision 1.8 2006/06/19 11:54:08 reinelt - * removed dependency to usb.h from sample driver - * - * Revision 1.7 2006/02/27 06:14:46 reinelt - * graphic bug resulting in all black pixels solved - * - * Revision 1.6 2006/02/08 04:55:05 reinelt - * moved widget registration to drv_generic_graphic - * - * Revision 1.5 2006/01/30 06:25:53 reinelt - * added CVS Revision - * - * Revision 1.4 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.3 2006/01/05 18:56:57 reinelt - * more GPO stuff - * - * Revision 1.2 2005/12/19 05:08:31 reinelt - * GPO's added to the Sample driver - * - * Revision 1.1 2005/11/04 14:10:38 reinelt - * drv_Sample and drv_LPH7508 - * */ /* @@ -445,7 +420,7 @@ int drv_Sample_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.8 $"); + info("%s: %s", Name, "$Rev: 733 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ diff --git a/drv_SimpleLCD.c b/drv_SimpleLCD.c index 1e7b807..604a963 100644 --- a/drv_SimpleLCD.c +++ b/drv_SimpleLCD.c @@ -1,4 +1,5 @@ -/* $Id: drv_SimpleLCD.c,v 1.7 2006/01/30 06:25:53 reinelt Exp $ +/* $Id: drv_SimpleLCD.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_SimpleLCD.c $ * * driver for a simple serial terminal. * @@ -21,31 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Log: drv_SimpleLCD.c,v $ - * Revision 1.7 2006/01/30 06:25:53 reinelt - * added CVS Revision - * - * Revision 1.6 2005/08/22 05:44:43 reinelt - * new driver 'WincorNixdorf' - * some fixes to the bar code - * - * Revision 1.5 2005/07/06 04:40:18 reinelt - * GCC-4 fixes - * - * Revision 1.4 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.3 2005/04/20 05:49:21 reinelt - * 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. - * - * Revision 1.2 2005/04/02 05:28:58 reinelt - * fixed gcc4 warnings about signed/unsigned mismatches - * - * Revision 1.1 2005/02/24 07:06:48 reinelt - * SimpleLCD driver added - * */ /* @@ -308,7 +284,7 @@ int drv_SL_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.7 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ diff --git a/drv_T6963.c b/drv_T6963.c index 272e8ee..abb9022 100644 --- a/drv_T6963.c +++ b/drv_T6963.c @@ -1,4 +1,5 @@ -/* $Id: drv_T6963.c,v 1.23 2006/08/16 14:18:14 reinelt Exp $ +/* $Id: drv_T6963.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_T6963.c $ * * new style driver for T6963-based displays * @@ -21,93 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_T6963.c,v $ - * Revision 1.23 2006/08/16 14:18:14 reinelt - * T6963 enhancements: soft timing, DualScan, Cell size - * - * Revision 1.22 2006/08/13 09:53:10 reinelt - * dynamic properties added (used by 'style' of text widget) - * - * Revision 1.21 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.20 2006/02/27 06:14:46 reinelt - * graphic bug resulting in all black pixels solved - * - * Revision 1.19 2006/02/08 04:55:05 reinelt - * moved widget registration to drv_generic_graphic - * - * Revision 1.18 2006/01/30 06:25:54 reinelt - * added CVS Revision - * - * Revision 1.17 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.16 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.15 2005/05/05 08:36:12 reinelt - * changed SELECT to SLCTIN - * - * Revision 1.14 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.13 2004/12/22 20:24:02 reinelt - * T6963 fix for displays > 8 rows - * - * Revision 1.12 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.11 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.10 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.9 2004/06/17 06:23:39 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.8 2004/06/09 06:40:29 reinelt - * - * splash screen for T6963 driver - * - * Revision 1.7 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.6 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.5 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.4 2004/02/24 05:55:04 reinelt - * - * X11 driver ported - * - * Revision 1.3 2004/02/22 17:35:41 reinelt - * some fixes for generic graphic driver and T6963 - * removed ^M from plugin_imon (Nico, are you editing under Windows?) - * - * Revision 1.2 2004/02/18 06:39:20 reinelt - * T6963 driver for graphic displays finished - * - * Revision 1.1 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * */ /* @@ -595,7 +509,7 @@ int drv_T6_init(const char *section, const int quiet) { int ret; - info("%s: %s", Name, "$Revision: 1.23 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* real worker functions */ drv_generic_graphic_real_blit = drv_T6_blit; diff --git a/drv_Trefon.c b/drv_Trefon.c index 1dfb243..4baf94e 100644 --- a/drv_Trefon.c +++ b/drv_Trefon.c @@ -1,4 +1,5 @@ -/* $Id: drv_Trefon.c,v 1.6 2006/01/30 06:25:54 reinelt Exp $ +/* $Id: drv_Trefon.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_Trefon.c $ * * driver for TREFON USB LCD displays - http://www.trefon.de * @@ -21,31 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_Trefon.c,v $ - * Revision 1.6 2006/01/30 06:25:54 reinelt - * added CVS Revision - * - * Revision 1.5 2005/08/21 08:18:56 reinelt - * CrystalFontz ACK processing - * - * Revision 1.4 2005/08/20 10:10:13 reinelt - * TREFON patch from Stephan Trautvetter: - * drv_TF_init: CHAR0 set to 0 instead of 1 - * drv_TF_write: combine the GOTO and the data into one packet - * drv_TF_write: add GOTO-Case for resolutions 8x1/20x4 characters - * drv_TF_start: test for existing resolutions from TREFON USB-LCDs implemented - * the use of 'asc255bug 1' is recommendable - * - * Revision 1.3 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.2 2005/04/24 05:27:09 reinelt - * Trefon Backlight added - * - * Revision 1.1 2005/04/24 04:33:46 reinelt - * driver for TREFON USB LCD's added - * */ /* @@ -97,7 +73,6 @@ static usb_dev_handle *lcd; static int interface; extern int usb_debug; -extern int got_signal; /****************************************/ @@ -351,7 +326,7 @@ int drv_TF_init(const char *section, const int quiet) int asc255bug; int ret; - info("%s: %s", Name, "$Revision: 1.6 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ diff --git a/drv_USBHUB.c b/drv_USBHUB.c index a98d50f..4e3eb70 100644 --- a/drv_USBHUB.c +++ b/drv_USBHUB.c @@ -1,4 +1,5 @@ -/* $Id: drv_USBHUB.c,v 1.4 2006/08/14 19:24:22 harbaum Exp $ +/* $Id: drv_USBHUB.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_USBHUB.c $ * * new style driver for USBLCD displays * @@ -23,21 +24,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_USBHUB.c,v $ - * Revision 1.4 2006/08/14 19:24:22 harbaum - * Umlaut support, added KVV HTTP-User-Agent - * - * Revision 1.3 2006/08/14 05:54:04 reinelt - * minor warnings fixed, CFLAGS changed (no-strict-aliasing) - * - * Revision 1.2 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.1 2006/08/08 19:35:22 reinelt - * USBHUB driver from Ernst Bachmann - * - * */ /* @@ -122,7 +108,7 @@ static int drv_UH_open(void) (v & 0xF000) >> 12, (v & 0xF00) >> 8, (v & 0xF0) >> 4, (v & 0xF), bus->dirname, dev->filename); if (dev->descriptor.bDeviceClass != USB_CLASS_HUB) { - error("%s: the specified device claims to be no HUB"); + error("%s: the specified device claims to be no HUB", Name); return -1; } @@ -197,11 +183,11 @@ static int drv_UH_start(const char *section, const __attribute__ ((unused)) buf = cfg_get(section, "Vendor", NULL); if (buf) { if (!*buf) { - error("%s: Strange Vendor Specification"); + error("%s: Strange Vendor Specification", Name); return -1; } if (sscanf(buf, "0x%x", &hubVendor) != 1) { - error("%s: Strange Vendor Specification: [%s]", buf); + error("%s: Strange Vendor Specification: [%s]", Name, buf); return -1; } } @@ -209,11 +195,11 @@ static int drv_UH_start(const char *section, const __attribute__ ((unused)) buf = cfg_get(section, "Product", NULL); if (buf) { if (!*buf) { - error("%s: Strange Product Specification"); + error("%s: Strange Product Specification", Name); return -1; } if (sscanf(buf, "0x%x", &hubProduct) != 1) { - error("%s: Strange Product Specification: [%s]", buf); + error("%s: Strange Product Specification: [%s]", Name, buf); return -1; } } @@ -282,7 +268,7 @@ int drv_UH_init(const char *section, const int quiet) int ret; int i; - info("%s: %s", Name, "$Revision: 1.4 $"); + info("%s: %s", Name, "$Rev: 728 $"); diff --git a/drv_USBLCD.c b/drv_USBLCD.c index f59ca8d..b52ebb1 100644 --- a/drv_USBLCD.c +++ b/drv_USBLCD.c @@ -1,4 +1,5 @@ -/* $Id: drv_USBLCD.c,v 1.24 2006/01/30 06:25:54 reinelt Exp $ +/* $Id: drv_USBLCD.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_USBLCD.c $ * * new style driver for USBLCD displays * @@ -24,107 +25,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_USBLCD.c,v $ - * Revision 1.24 2006/01/30 06:25:54 reinelt - * added CVS Revision - * - * Revision 1.23 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.22 2005/04/24 04:33:46 reinelt - * driver for TREFON USB LCD's added - * - * Revision 1.21 2005/04/02 05:28:58 reinelt - * fixed gcc4 warnings about signed/unsigned mismatches - * - * Revision 1.20 2005/01/30 06:43:22 reinelt - * driver for LCD-Linux finished - * - * Revision 1.19 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.18 2004/12/22 20:24:02 reinelt - * T6963 fix for displays > 8 rows - * - * Revision 1.17 2004/10/02 09:31:58 reinelt - * USBLCD driver modified to use libusb - * - * Revision 1.16 2004/09/24 21:41:00 reinelt - * new driver for the BWCT USB LCD interface board. - * - * Revision 1.15 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.14 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.13 2004/06/26 06:12:15 reinelt - * - * support for Beckmann+Egle Compact Terminals - * some mostly cosmetic changes in the MatrixOrbital and USBLCD driver - * added debugging to the generic serial driver - * fixed a bug in the generic text driver where icons could be drawn outside - * the display bounds - * - * Revision 1.12 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.11 2004/06/19 08:20:19 reinelt - * - * compiler warning in image driver fixed - * bar bug in USBLCD driver fixed - * - * Revision 1.10 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.9 2004/06/05 14:56:48 reinelt - * - * Cwlinux splash screen fixed - * USBLCD splash screen fixed - * plugin_i2c qprintf("%f") replaced with snprintf() - * - * Revision 1.8 2004/06/05 06:41:40 reinelt - * - * chancged splash screen again - * - * Revision 1.7 2004/06/05 06:13:12 reinelt - * - * splash screen for all text-based display drivers - * - * Revision 1.6 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.5 2004/05/31 05:38:02 reinelt - * - * fixed possible bugs with user-defined chars (clear high bits) - * thanks to Andy Baxter for debugging the MilfordInstruments driver! - * - * Revision 1.4 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * - * Revision 1.3 2004/05/23 08:58:30 reinelt - * - * icon bug with USBLCD fixed - * - * Revision 1.2 2004/03/19 09:17:46 reinelt - * - * removed the extra 'goto' function, row and col are additional parameters - * of the write() function now. - * - * Revision 1.1 2004/02/15 08:22:47 reinelt - * ported USBLCD driver to NextGeneration - * added drv_M50530.c (I forgot yesterday, sorry) - * removed old drivers M50530.c and USBLCD.c - * */ /* @@ -190,8 +90,6 @@ extern int usb_debug; #endif -extern int got_signal; - /****************************************/ @@ -504,7 +402,7 @@ int drv_UL_init(const char *section, const int quiet) int asc255bug; int ret; - info("%s: %s", Name, "$Revision: 1.24 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ diff --git a/drv_WincorNixdorf.c b/drv_WincorNixdorf.c index 55126ac..d583f32 100644 --- a/drv_WincorNixdorf.c +++ b/drv_WincorNixdorf.c @@ -1,4 +1,5 @@ -/* $Id: drv_WincorNixdorf.c,v 1.2 2006/01/30 06:25:54 reinelt Exp $ +/* $Id: drv_WincorNixdorf.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_WincorNixdorf.c $ * * driver for WincorNixdorf serial cashier displays BA63 and BA66 * @@ -24,14 +25,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Log: drv_WincorNixdorf.c,v $ - * Revision 1.2 2006/01/30 06:25:54 reinelt - * added CVS Revision - * - * Revision 1.1 2005/08/22 05:44:43 reinelt - * new driver 'WincorNixdorf' - * some fixes to the bar code - * */ /* @@ -208,7 +201,7 @@ int drv_WN_init(const char *section, const int quiet) int ascii; int ret; - info("%s: %s", Name, "$Revision: 1.2 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* display preferences */ XRES = 5; /* pixel width of one char */ @@ -1,4 +1,5 @@ -/* $Id: drv_X11.c,v 1.17 2006/08/13 06:46:51 reinelt Exp $ +/* $Id: drv_X11.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_X11.c $ * * new style X11 Driver for LCD4Linux * @@ -24,70 +25,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_X11.c,v $ - * Revision 1.17 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.16 2006/02/08 04:55:05 reinelt - * moved widget registration to drv_generic_graphic - * - * Revision 1.15 2006/01/30 06:25:54 reinelt - * added CVS Revision - * - * Revision 1.14 2006/01/30 06:17:17 reinelt - * added CVS Revision - * - * Revision 1.13 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.12 2006/01/22 09:16:11 reinelt - * Image Widget framework added - * - * Revision 1.11 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.10 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.9 2004/11/29 04:42:07 reinelt - * removed the 99999 msec limit on widget update time (thanks to Petri Damsten) - * - * Revision 1.8 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.7 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.6 2004/06/20 10:09:54 reinelt - * - * 'const'ified the whole source - * - * Revision 1.5 2004/06/08 21:46:38 reinelt - * - * splash screen for X11 driver (and generic graphic driver) - * - * Revision 1.4 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.3 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.2 2004/05/25 14:26:29 reinelt - * - * added "Image" driver (was: Raster.c) for PPM and PNG creation - * fixed some glitches in the X11 driver - * - * Revision 1.1 2004/02/24 05:55:04 reinelt - * - * X11 driver ported - * */ /* @@ -378,7 +315,7 @@ int drv_X11_init(const char *section, const int quiet) { int ret; - info("%s: %s", Name, "$Revision: 1.17 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* start display */ if ((ret = drv_X11_start(section)) != 0) diff --git a/drv_generic.c b/drv_generic.c index 12aacf5..3ca2f63 100644 --- a/drv_generic.c +++ b/drv_generic.c @@ -1,4 +1,5 @@ -/* $Id: drv_generic.c,v 1.7 2006/08/13 09:53:10 reinelt Exp $ +/* $Id: drv_generic.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic.c $ * * generic driver helper * @@ -21,20 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic.c,v $ - * Revision 1.7 2006/08/13 09:53:10 reinelt - * dynamic properties added (used by 'style' of text widget) - * - * Revision 1.6 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.5 2006/08/09 17:25:34 harbaum - * Better bar color support and new bold font - * - * Revision 1.4 2006/07/31 03:48:09 reinelt - * preparations for scrolling - * */ /* diff --git a/drv_generic.h b/drv_generic.h index 12304d0..56122a0 100644 --- a/drv_generic.h +++ b/drv_generic.h @@ -1,4 +1,5 @@ -/* $Id: drv_generic.h,v 1.7 2006/08/13 09:53:10 reinelt Exp $ +/* $Id: drv_generic.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic.h $ * * generic driver helper * @@ -21,20 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic.h,v $ - * Revision 1.7 2006/08/13 09:53:10 reinelt - * dynamic properties added (used by 'style' of text widget) - * - * Revision 1.6 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.5 2006/08/09 17:25:34 harbaum - * Better bar color support and new bold font - * - * Revision 1.4 2006/07/31 03:48:09 reinelt - * preparations for scrolling - * */ diff --git a/drv_generic_gpio.c b/drv_generic_gpio.c index 0bed2d4..b613b4e 100644 --- a/drv_generic_gpio.c +++ b/drv_generic_gpio.c @@ -1,4 +1,5 @@ -/* $Id: drv_generic_gpio.c,v 1.4 2006/01/05 18:56:57 reinelt Exp $ +/* $Id: drv_generic_gpio.c 751 2007-01-20 13:52:43Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_gpio.c $ * * generic driver helper for GPO's * @@ -21,20 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_gpio.c,v $ - * Revision 1.4 2006/01/05 18:56:57 reinelt - * more GPO stuff - * - * Revision 1.3 2006/01/03 06:13:45 reinelt - * GPIO's for MatrixOrbital - * - * Revision 1.2 2005/12/20 07:07:44 reinelt - * further work on GPO's, HD44780 GPO support - * - * Revision 1.1 2005/12/18 16:18:36 reinelt - * GPO's added again - * */ /* @@ -232,8 +219,10 @@ int drv_generic_gpio_get(const int num) int drv_generic_gpio_draw(WIDGET * W) { WIDGET_GPO *gpo = W->data; - int num = gpo->num; - int val = gpo->val; + int num, val; + + num = W->row; + val = P2N(&gpo->expression); if (num < 0 || num >= GPOS) { error("%s: gpio_draw(%d): GPO out of range (0..%d)", Driver, num + 1, GPOS); diff --git a/drv_generic_gpio.h b/drv_generic_gpio.h index 35457db..cb4fedf 100644 --- a/drv_generic_gpio.h +++ b/drv_generic_gpio.h @@ -1,4 +1,5 @@ -/* $Id: drv_generic_gpio.h,v 1.2 2006/01/03 06:13:45 reinelt Exp $ +/* $Id: drv_generic_gpio.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_gpio.h $ * * generic driver helper for GPIO's * @@ -21,14 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_gpio.h,v $ - * Revision 1.2 2006/01/03 06:13:45 reinelt - * GPIO's for MatrixOrbital - * - * Revision 1.1 2005/12/18 16:18:36 reinelt - * GPO's added again - * */ diff --git a/drv_generic_graphic.c b/drv_generic_graphic.c index 746c7c8..ba569fe 100644 --- a/drv_generic_graphic.c +++ b/drv_generic_graphic.c @@ -1,4 +1,5 @@ -/* $Id: drv_generic_graphic.c,v 1.34 2006/08/14 19:24:22 harbaum Exp $ +/* $Id: drv_generic_graphic.c 745 2007-01-19 05:25:07Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_graphic.c $ * * generic driver helper for graphic displays * @@ -21,129 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_graphic.c,v $ - * Revision 1.34 2006/08/14 19:24:22 harbaum - * Umlaut support, added KVV HTTP-User-Agent - * - * Revision 1.33 2006/08/13 09:53:10 reinelt - * dynamic properties added (used by 'style' of text widget) - * - * Revision 1.32 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.31 2006/08/09 17:25:34 harbaum - * Better bar color support and new bold font - * - * Revision 1.30 2006/08/08 20:16:29 harbaum - * Added "extracolor" (used for e.g. bar border) and RGB support for LEDMATRIX - * - * Revision 1.29 2006/07/31 03:48:09 reinelt - * preparations for scrolling - * - * Revision 1.28 2006/06/20 08:50:58 reinelt - * widget_image linker error hopefully finally fixed - * - * Revision 1.27 2006/04/09 17:46:14 reinelt - * vertical bar patch fro graphic displays by Ronald Hopfer - * - * Revision 1.26 2006/04/09 14:17:50 reinelt - * autoconf/library fixes, image and graphic display inversion - * - * Revision 1.25 2006/02/27 07:53:52 reinelt - * some more graphic issues fixed - * - * Revision 1.24 2006/02/27 06:15:55 reinelt - * indent... - * - * Revision 1.23 2006/02/27 06:14:46 reinelt - * graphic bug resulting in all black pixels solved - * - * Revision 1.22 2006/02/24 13:07:10 geronet - * hollow bars for graphic lcd's - * - * Revision 1.21 2006/02/19 07:20:53 reinelt - * image support nearly finished - * - * Revision 1.20 2006/02/08 04:55:05 reinelt - * moved widget registration to drv_generic_graphic - * - * Revision 1.19 2006/02/07 05:36:13 reinelt - * Layers added to Layout - * - * Revision 1.18 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.17 2006/01/03 06:13:46 reinelt - * GPIO's for MatrixOrbital - * - * Revision 1.16 2005/12/13 14:07:28 reinelt - * LPH7508 driver finished - * - * Revision 1.15 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.14 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.13 2005/01/09 10:53:24 reinelt - * small type in plugin_uname fixed - * new homepage lcd4linux.bulix.org - * - * Revision 1.12 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.11 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.10 2004/06/20 10:09:55 reinelt - * - * 'const'ified the whole source - * - * Revision 1.9 2004/06/09 06:40:29 reinelt - * - * splash screen for T6963 driver - * - * Revision 1.8 2004/06/08 21:46:38 reinelt - * - * splash screen for X11 driver (and generic graphic driver) - * - * Revision 1.7 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.6 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.5 2004/02/29 14:30:59 reinelt - * icon visibility fix for generic graphics from Xavier - * - * Revision 1.4 2004/02/24 05:55:04 reinelt - * - * X11 driver ported - * - * Revision 1.3 2004/02/22 17:35:41 reinelt - * some fixes for generic graphic driver and T6963 - * removed ^M from plugin_imon (Nico, are you editing under Windows?) - * - * Revision 1.2 2004/02/18 06:39:20 reinelt - * T6963 driver for graphic displays finished - * - * Revision 1.1 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * */ /* @@ -186,6 +64,7 @@ #include "plugin.h" #include "layout.h" #include "widget.h" +#include "property.h" #include "widget_text.h" #include "widget_icon.h" #include "widget_bar.h" @@ -194,7 +73,6 @@ #include "drv.h" #include "drv_generic.h" #include "drv_generic_graphic.h" -#include "property.h" #include "font_6x8.h" #include "font_6x8_bold.h" @@ -465,6 +343,7 @@ int drv_generic_graphic_icon_draw(WIDGET * W) unsigned char *bitmap = Icon->bitmap + YRES * Icon->curmap; int layer, row, col; int x, y; + int visible; layer = W->layer; row = YRES * W->row; @@ -482,13 +361,16 @@ int drv_generic_graphic_icon_draw(WIDGET * W) /* maybe grow layout framebuffer */ drv_generic_graphic_resizeFB(row + YRES, col + XRES); + /* Icon visible? */ + visible = P2N(&Icon->visible) > 0; + /* render icon */ for (y = 0; y < YRES; y++) { int mask = 1 << XRES; for (x = 0; x < XRES; x++) { int i = (row + y) * LCOLS + col + x; mask >>= 1; - if (Icon->visible) { + if (visible) { if (bitmap[y] & mask) drv_generic_graphic_FB[layer][i] = fg; else @@ -630,6 +512,7 @@ int drv_generic_graphic_image_draw(WIDGET * W) WIDGET_IMAGE *Image = W->data; int layer, row, col, width, height; int x, y; + int visible; layer = W->layer; row = W->row; @@ -652,10 +535,11 @@ int drv_generic_graphic_image_draw(WIDGET * W) drv_generic_graphic_resizeFB(row + height, col + width); /* render image */ + visible = P2N(&Image->visible); for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { int i = (row + y) * LCOLS + col + x; - if (Image->visible) { + if (visible) { drv_generic_graphic_FB[layer][i] = Image->bitmap[y * width + x]; } else { drv_generic_graphic_FB[layer][i] = BG_COL; diff --git a/drv_generic_graphic.h b/drv_generic_graphic.h index 106ac2a..2c2cdcc 100644 --- a/drv_generic_graphic.h +++ b/drv_generic_graphic.h @@ -1,4 +1,5 @@ -/* $Id: drv_generic_graphic.h,v 1.13 2006/07/31 03:48:09 reinelt Exp $ +/* $Id: drv_generic_graphic.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_graphic.h $ * * generic driver helper for graphic displays * @@ -21,58 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_graphic.h,v $ - * Revision 1.13 2006/07/31 03:48:09 reinelt - * preparations for scrolling - * - * Revision 1.12 2006/02/27 06:14:46 reinelt - * graphic bug resulting in all black pixels solved - * - * Revision 1.11 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.10 2006/01/03 06:13:46 reinelt - * GPIO's for MatrixOrbital - * - * Revision 1.9 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.8 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.7 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.6 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.5 2004/06/20 10:09:55 reinelt - * - * 'const'ified the whole source - * - * Revision 1.4 2004/06/08 21:46:38 reinelt - * - * splash screen for X11 driver (and generic graphic driver) - * - * Revision 1.3 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.2 2004/02/18 06:39:20 reinelt - * T6963 driver for graphic displays finished - * - * Revision 1.1 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * */ diff --git a/drv_generic_i2c.c b/drv_generic_i2c.c index b9ef1b6..1e9f7af 100644 --- a/drv_generic_i2c.c +++ b/drv_generic_i2c.c @@ -1,4 +1,5 @@ -/* $Id: drv_generic_i2c.c,v 1.8 2006/07/31 03:48:09 reinelt Exp $ +/* $Id: drv_generic_i2c.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_i2c.c $ * * generic driver helper for i2c displays * @@ -21,38 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_i2c.c,v $ - * Revision 1.8 2006/07/31 03:48:09 reinelt - * preparations for scrolling - * - * Revision 1.7 2006/07/30 11:16:27 lfcorreia - * Add back drv_generic_i2c_close function - * - * Revision 1.6 2006/07/29 21:04:43 lfcorreia - * Better error handling, add proper I2C SLAVE device detection (not 100% finished) - * - * Revision 1.5 2005/06/01 12:50:25 reinelt - * ifdef'ed unused function to avoid compiler warning - * - * Revision 1.4 2005/05/31 20:42:55 lfcorreia - * new file: lcd4linux_i2c.h - * avoid the problems detecting the proper I2C kernel include files - * - * rearrange all the other autoconf stuff to remove I2C detection - * - * new method by Paul Kamphuis to write to the I2C device - * - * Revision 1.3 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.2 2005/04/05 05:12:57 reinelt - * i2c patch from Paul (still does not work here :-( - * - * Revision 1.1 2005/03/28 19:39:23 reinelt - * HD44780/I2C patch from Luis merged (still does not work for me) - * - * */ /* @@ -105,7 +74,7 @@ static void my_i2c_smbus_write_byte_data(const int device, const unsigned char v data.byte = val; args.data = &data; if (ioctl(device, I2C_SMBUS, &args) < 0) { - info("I2C: device %s IOCTL failed !\n", device); + info("I2C: device %d IOCTL failed !\n", device); } } diff --git a/drv_generic_i2c.h b/drv_generic_i2c.h index 543da04..4c627f9 100644 --- a/drv_generic_i2c.h +++ b/drv_generic_i2c.h @@ -1,91 +1,61 @@ -/* $Id: drv_generic_i2c.h,v 1.8 2006/08/13 06:46:51 reinelt Exp $
- *
- * generic driver helper for i2c displays
- *
- * Copyright (C) 2005 Luis Correia <lfcorreia@users.sf.net>
- * Copyright (C) 2005 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.
- *
- *
- * $Log: drv_generic_i2c.h,v $ - * Revision 1.8 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent +/* $Id: drv_generic_i2c.h 742 2007-01-17 06:16:43Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_i2c.h $ * - * Revision 1.7 2006/07/31 03:48:09 reinelt - * preparations for scrolling - *
- * Revision 1.6 2006/02/27 06:15:55 reinelt
- * indent...
- *
- * Revision 1.5 2006/02/25 13:36:33 geronet
- * updated indent.sh, applied coding style
- *
- * Revision 1.4 2005/05/31 21:32:00 lfcorreia
- * fix my email address
- *
- * Revision 1.3 2005/05/31 20:42:55 lfcorreia
- * new file: lcd4linux_i2c.h
- * avoid the problems detecting the proper I2C kernel include files
- *
- * rearrange all the other autoconf stuff to remove I2C detection
- *
- * new method by Paul Kamphuis to write to the I2C device
- *
- * Revision 1.2 2005/05/08 04:32:44 reinelt
- * CodingStyle added and applied
- *
- * Revision 1.1 2005/03/28 19:39:23 reinelt
- * HD44780/I2C patch from Luis merged (still does not work for me)
- *
- *
- */
-
-/*
- *
- * exported fuctions:
- *
- * int drv_generic_i2c_open (void)
- * reads 'Port' entry from config and opens
- * the i2c port
- * returns 0 if ok, -1 on failure
- *
- * int drv_generic_i2c_close (void)
- * closes i2c port
- * returns 0 if ok, -1 on failure
- *
- * unsigned char drv_generic_i2c_wire (char *name, char *deflt)
- * reads wiring for one data signal from config
- * returns 1<<bitpos or 255 on error
- *
- * void drv_generic_i2c_data (unsigned char value)
- * put data bits on DB1..DB8
- *
- * void drv_generic_i2c_command(unsigned char command, unsigned char *data,unsigned char length)
- * send command and the data to the i2c device
- *
- */
-
-#ifndef _DRV_GENERIC_I2C_H_
-#define _DRV_GENERIC_I2C_H_
-
int drv_generic_i2c_open(const char *section, const char *driver); -
int drv_generic_i2c_close(void); -
unsigned char drv_generic_i2c_wire(const char *name, const char *deflt); -
void drv_generic_i2c_data(const unsigned char data); -
void drv_generic_i2c_command(const unsigned char command, const unsigned char *data, const unsigned char length); -
-#endif /*
*/ + * generic driver helper for i2c displays + * + * Copyright (C) 2005 Luis Correia <lfcorreia@users.sf.net> + * Copyright (C) 2005 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. + * + */ + +/* + * + * exported fuctions: + * + * int drv_generic_i2c_open (void) + * reads 'Port' entry from config and opens + * the i2c port + * returns 0 if ok, -1 on failure + * + * int drv_generic_i2c_close (void) + * closes i2c port + * returns 0 if ok, -1 on failure + * + * unsigned char drv_generic_i2c_wire (char *name, char *deflt) + * reads wiring for one data signal from config + * returns 1<<bitpos or 255 on error + * + * void drv_generic_i2c_data (unsigned char value) + * put data bits on DB1..DB8 + * + * void drv_generic_i2c_command(unsigned char command, unsigned char *data,unsigned char length) + * send command and the data to the i2c device + * + */ + +#ifndef _DRV_GENERIC_I2C_H_ +#define _DRV_GENERIC_I2C_H_ + +int drv_generic_i2c_open(const char *section, const char *driver); +int drv_generic_i2c_close(void); +unsigned char drv_generic_i2c_wire(const char *name, const char *deflt); +void drv_generic_i2c_data(const unsigned char data); +void drv_generic_i2c_command(const unsigned char command, const unsigned char *data, const unsigned char length); + +#endif diff --git a/drv_generic_keypad.c b/drv_generic_keypad.c index 5b4f2b1..e7276f9 100644 --- a/drv_generic_keypad.c +++ b/drv_generic_keypad.c @@ -1,4 +1,5 @@ -/* $Id: drv_generic_keypad.c,v 1.3 2006/02/22 15:59:39 cmay Exp $ +/* $Id: drv_generic_keypad.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_keypad.c $ * * generic driver helper for keypads * @@ -21,18 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_keypad.c,v $ - * Revision 1.3 2006/02/22 15:59:39 cmay - * removed KEYPADSIZE cruft per harbaum's suggestion - * - * Revision 1.2 2006/02/21 15:55:59 cmay - * removed new update function for keypad, consolidated it with draw - * - * Revision 1.1 2006/02/21 05:50:34 reinelt - * keypad support from Cris Maj - * - * */ #include <stdio.h> diff --git a/drv_generic_keypad.h b/drv_generic_keypad.h index 6145d5e..d37bc93 100644 --- a/drv_generic_keypad.h +++ b/drv_generic_keypad.h @@ -1,4 +1,5 @@ -/* $Id: drv_generic_keypad.h,v 1.3 2006/02/22 15:59:39 cmay Exp $ +/* $Id: drv_generic_keypad.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_keypad.h $ * * generic driver helper for keypads * @@ -19,17 +20,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Log: drv_generic_keypad.h,v $ - * Revision 1.3 2006/02/22 15:59:39 cmay - * removed KEYPADSIZE cruft per harbaum's suggestion - * - * Revision 1.2 2006/02/21 15:55:59 cmay - * removed new update function for keypad, consolidated it with draw - * - * Revision 1.1 2006/02/21 05:50:34 reinelt - * keypad support from Cris Maj - * - * */ #ifndef _DRV_GENERIC_KEYPAD_H_ diff --git a/drv_generic_parport.c b/drv_generic_parport.c index c97fb10..413d3db 100644 --- a/drv_generic_parport.c +++ b/drv_generic_parport.c @@ -1,4 +1,5 @@ -/* $Id: drv_generic_parport.c,v 1.21 2006/02/25 13:36:33 geronet Exp $ +/* $Id: drv_generic_parport.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_parport.c $ * * generic driver helper for serial and parport access * @@ -21,91 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_parport.c,v $ - * Revision 1.21 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.20 2005/12/12 05:52:03 reinelt - * type of delays is 'unsigned long' - * - * Revision 1.19 2005/06/19 17:57:06 reinelt - * cosmetics... - * - * Revision 1.18 2005/06/13 03:43:46 reinelt - * undo PPEXCL activation... - * - * Revision 1.17 2005/06/13 03:38:25 reinelt - * try PPEXCL again, but ignore result - * - * Revision 1.16 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.15 2005/05/05 08:36:12 reinelt - * changed SELECT to SLCTIN - * - * Revision 1.14 2005/05/04 06:13:05 reinelt - * parport_wire_status() added - * - * Revision 1.13 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.12 2005/01/06 16:54:54 reinelt - * M50530 fixes - * - * Revision 1.11 2004/09/18 15:58:57 reinelt - * even more HD44780 cleanups, hardwiring for LCM-162 - * - * Revision 1.10 2004/09/18 09:48:29 reinelt - * HD44780 cleanup and prepararation for I2C backend - * LCM-162 submodel framework - * - * Revision 1.9 2004/09/18 08:22:59 reinelt - * drv_generic_parport_status() to read status lines - * - * Revision 1.8 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.7 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.6 2004/06/20 10:09:55 reinelt - * - * 'const'ified the whole source - * - * Revision 1.5 2004/04/12 05:14:42 reinelt - * another BIG FAT WARNING on the use of raw ports instead of ppdev - * - * Revision 1.4 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.3 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.2 2004/01/20 15:32:49 reinelt - * first version of Next Generation HD44780 (untested! but it compiles...) - * some cleanup in the other drivers - * - * Revision 1.1 2004/01/20 14:35:38 reinelt - * drv_generic_parport added, code from parport.c - * - * Revision 1.2 2004/01/20 05:36:59 reinelt - * moved text-display-specific stuff to drv_generic_text - * moved all the bar stuff from drv_generic_bar to generic_text - * - * Revision 1.1 2004/01/20 04:51:39 reinelt - * moved generic stuff from drv_MatrixOrbital to drv_generic - * implemented new-stylish bars which are nearly finished - * */ #include "config.h" diff --git a/drv_generic_parport.h b/drv_generic_parport.h index 73e5215..ac14536 100644 --- a/drv_generic_parport.h +++ b/drv_generic_parport.h @@ -1,4 +1,5 @@ -/* $Id: drv_generic_parport.h,v 1.12 2005/12/12 05:52:03 reinelt Exp $ +/* $Id: drv_generic_parport.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_parport.h $ * * generic driver helper for parallel port displays * @@ -21,50 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_parport.h,v $ - * Revision 1.12 2005/12/12 05:52:03 reinelt - * type of delays is 'unsigned long' - * - * Revision 1.11 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.10 2005/05/04 06:13:05 reinelt - * parport_wire_status() added - * - * Revision 1.9 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.8 2004/10/17 09:24:31 reinelt - * I2C support for HD44780 displays by Luis (does not work by now) - * - * Revision 1.7 2004/09/18 15:58:57 reinelt - * even more HD44780 cleanups, hardwiring for LCM-162 - * - * Revision 1.6 2004/09/18 08:22:59 reinelt - * drv_generic_parport_status() to read status lines - * - * Revision 1.5 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.4 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.3 2004/06/20 10:09:55 reinelt - * - * 'const'ified the whole source - * - * Revision 1.2 2004/01/20 15:32:49 reinelt - * first version of Next Generation HD44780 (untested! but it compiles...) - * some cleanup in the other drivers - * - * Revision 1.1 2004/01/20 14:35:38 reinelt - * drv_generic_parport added, code from parport.c - * */ /* diff --git a/drv_generic_serial.c b/drv_generic_serial.c index 4644903..a2b5506 100644 --- a/drv_generic_serial.c +++ b/drv_generic_serial.c @@ -1,4 +1,5 @@ -/* $Id: drv_generic_serial.c,v 1.17 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: drv_generic_serial.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_serial.c $ * * generic driver helper for serial and usbserial displays * @@ -21,93 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_serial.c,v $ - * Revision 1.17 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.16 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.15 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.14 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.13 2004/06/26 06:12:15 reinelt - * - * support for Beckmann+Egle Compact Terminals - * some mostly cosmetic changes in the MatrixOrbital and USBLCD driver - * added debugging to the generic serial driver - * fixed a bug in the generic text driver where icons could be drawn outside - * the display bounds - * - * Revision 1.12 2004/06/20 10:09:55 reinelt - * - * 'const'ified the whole source - * - * Revision 1.11 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.10 2004/05/31 21:05:13 reinelt - * - * fixed lots of bugs in the Cwlinux driver - * do not emit EAGAIN error on the first retry - * made plugin_i2c_sensors a bit less 'chatty' - * moved init and exit functions to the bottom of plugin_pop3 - * - * Revision 1.9 2004/05/28 13:51:42 reinelt - * - * ported driver for Beckmann+Egle Mini-Terminals - * added 'flags' parameter to serial_init() - * - * Revision 1.8 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.7 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.6 2004/02/14 11:56:17 reinelt - * M50530 driver ported - * changed lots of 'char' to 'unsigned char' - * - * Revision 1.5 2004/02/04 19:10:51 reinelt - * Crystalfontz driver nearly finished - * - * Revision 1.4 2004/02/01 08:05:12 reinelt - * Crystalfontz 633 extensions (CRC checking and stuff) - * Models table for HD44780 - * Noritake VFD BVrightness patch from Bill Paxton - * - * Revision 1.3 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.2 2004/01/25 05:30:09 reinelt - * plugin_netdev for parsing /proc/net/dev added - * - * Revision 1.1 2004/01/20 14:26:09 reinelt - * moved drv_generic to drv_generic_serial - * - * Revision 1.2 2004/01/20 05:36:59 reinelt - * moved text-display-specific stuff to drv_generic_text - * moved all the bar stuff from drv_generic_bar to generic_text - * - * Revision 1.1 2004/01/20 04:51:39 reinelt - * moved generic stuff from drv_MatrixOrbital to drv_generic - * implemented new-stylish bars which are nearly finished - * */ /* @@ -153,6 +67,8 @@ #include "drv_generic_serial.h" +extern int got_signal; + static char *Section; static char *Driver; static char *Port; @@ -412,33 +328,37 @@ int drv_generic_serial_read(char *string, const int len) void drv_generic_serial_write(const char *string, const int len) { + static int error = 0; int run, ret; -#if 0 - int i; - for (i = 0; i < len; i++) { - int c = string[i]; - debug("serial_write: %03d %03o 0x%02x %c", c, c, c, iscntrl(c) ? '*' : c); + if (Device == -1) { + error("%s: write to closed port %s failed!", Driver, Port); + return; } -#endif - if (Device == -1) - return; for (run = 0; run < 10; run++) { ret = write(Device, string, len); - if (ret >= 0 || errno != EAGAIN) + if (ret >= 0 || errno != EAGAIN) { break; - if (run > 0) + } + /* EAGAIN: retry 10 times, emit message after 2nd retry */ + if (run > 0) { info("%s: write(%s): EAGAIN #%d", Driver, Port, run); + } usleep(1000); } if (ret < 0) { error("%s: write(%s) failed: %s", Driver, Port, strerror(errno)); + if (++error > 10) { + error("%s: too much errors, giving up", Driver); + got_signal = -1; + } } else if (ret != len) { error("%s: partial write(%s): len=%d ret=%d", Driver, Port, len, ret); + } else { + error = 0; } - return; } diff --git a/drv_generic_serial.h b/drv_generic_serial.h index 102a778..3315746 100644 --- a/drv_generic_serial.h +++ b/drv_generic_serial.h @@ -1,4 +1,5 @@ -/* $Id: drv_generic_serial.h,v 1.10 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: drv_generic_serial.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_serial.h $ * * generic driver helper for serial and usbserial displays * @@ -21,58 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_serial.h,v $ - * Revision 1.10 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.9 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.8 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.7 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.6 2004/06/20 10:09:55 reinelt - * - * 'const'ified the whole source - * - * Revision 1.5 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.4 2004/05/28 13:51:42 reinelt - * - * ported driver for Beckmann+Egle Mini-Terminals - * added 'flags' parameter to serial_init() - * - * Revision 1.3 2004/02/14 11:56:17 reinelt - * M50530 driver ported - * changed lots of 'char' to 'unsigned char' - * - * Revision 1.2 2004/02/01 08:05:12 reinelt - * Crystalfontz 633 extensions (CRC checking and stuff) - * Models table for HD44780 - * Noritake VFD BVrightness patch from Bill Paxton - * - * Revision 1.1 2004/01/20 14:26:09 reinelt - * moved drv_generic to drv_generic_serial - * - * Revision 1.2 2004/01/20 05:36:59 reinelt - * moved text-display-specific stuff to drv_generic_text - * moved all the bar stuff from drv_generic_bar to generic_text - * - * Revision 1.1 2004/01/20 04:51:39 reinelt - * moved generic stuff from drv_MatrixOrbital to drv_generic - * implemented new-stylish bars which are nearly finished - * */ diff --git a/drv_generic_text.c b/drv_generic_text.c index 4bcbb51..24837d8 100644 --- a/drv_generic_text.c +++ b/drv_generic_text.c @@ -1,4 +1,5 @@ -/* $Id: drv_generic_text.c,v 1.36 2006/07/31 03:48:09 reinelt Exp $ +/* $Id: drv_generic_text.c 745 2007-01-19 05:25:07Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_text.c $ * * generic driver helper for text-based displays * @@ -21,148 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_text.c,v $ - * Revision 1.36 2006/07/31 03:48:09 reinelt - * preparations for scrolling - * - * Revision 1.35 2006/03/29 08:57:58 reinelt - * vertical bar patch from Manuel Lausch - * - * Revision 1.34 2006/02/27 08:12:34 reinelt - * use serdisplib's full color support - * - * Revision 1.33 2006/02/27 06:15:55 reinelt - * indent... - * - * Revision 1.32 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.31 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.30 2006/01/03 06:13:46 reinelt - * GPIO's for MatrixOrbital - * - * Revision 1.29 2005/11/06 09:54:43 reinelt - * fixed icon size removed, uses XRES & YRES (I hope this doesn't lead to problemes...) - * - * Revision 1.28 2005/08/22 05:44:43 reinelt - * new driver 'WincorNixdorf' - * some fixes to the bar code - * - * Revision 1.27 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.26 2005/05/06 06:37:34 reinelt - * hollow bar patch from geronet - * - * Revision 1.25 2005/02/24 07:06:48 reinelt - * SimpleLCD driver added - * - * Revision 1.24 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.23 2005/01/09 10:53:24 reinelt - * small type in plugin_uname fixed - * new homepage lcd4linux.bulix.org - * - * Revision 1.22 2004/11/28 15:50:24 reinelt - * Cwlinux fixes (invalidation of user-defined chars) - * - * Revision 1.21 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.20 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.19 2004/06/26 06:12:15 reinelt - * - * support for Beckmann+Egle Compact Terminals - * some mostly cosmetic changes in the MatrixOrbital and USBLCD driver - * added debugging to the generic serial driver - * fixed a bug in the generic text driver where icons could be drawn outside - * the display bounds - * - * Revision 1.18 2004/06/20 10:09:55 reinelt - * - * 'const'ified the whole source - * - * Revision 1.17 2004/06/05 06:41:40 reinelt - * - * chancged splash screen again - * - * Revision 1.16 2004/06/02 10:09:22 reinelt - * - * splash screen for HD44780 - * - * Revision 1.15 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.14 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * - * Revision 1.13 2004/03/19 09:17:46 reinelt - * - * removed the extra 'goto' function, row and col are additional parameters - * of the write() function now. - * - * Revision 1.12 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.11 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * - * Revision 1.10 2004/02/14 11:56:17 reinelt - * M50530 driver ported - * changed lots of 'char' to 'unsigned char' - * - * Revision 1.9 2004/02/07 13:45:23 reinelt - * icon visibility patch #2 from Xavier - * - * 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 - * - * Revision 1.6 2004/01/23 07:04:23 reinelt - * icons finished! - * - * Revision 1.5 2004/01/23 04:53:54 reinelt - * icon widget added (not finished yet!) - * - * Revision 1.4 2004/01/22 07:57:45 reinelt - * several bugs fixed where segfaulting on layout>display - * Crystalfontz driver optimized, 632 display already works - * - * Revision 1.3 2004/01/20 14:25:12 reinelt - * some reorganization - * moved drv_generic to drv_generic_serial - * moved port locking stuff to drv_generic_serial - * - * Revision 1.2 2004/01/20 12:45:47 reinelt - * "Default screen" working with MatrixOrbital - * - * Revision 1.1 2004/01/20 05:36:59 reinelt - * moved text-display-specific stuff to drv_generic_text - * moved all the bar stuff from drv_generic_bar to generic_text - * */ /* @@ -590,6 +449,7 @@ int drv_generic_text_icon_draw(WIDGET * W) static int icon_counter = 0; WIDGET_ICON *Icon = W->data; int row, col; + int visible; int invalidate = 0; unsigned char ascii; @@ -614,8 +474,11 @@ int drv_generic_text_icon_draw(WIDGET * W) Icon->ascii = CHAR0 + CHARS - icon_counter; } + /* Icon visible? */ + visible = P2N(&Icon->visible) > 0; + /* maybe redefine icon */ - if (Icon->curmap != Icon->prvmap && Icon->visible) { + if (Icon->curmap != Icon->prvmap && visible) { Icon->prvmap = Icon->curmap; if (drv_generic_text_real_defchar) drv_generic_text_real_defchar(Icon->ascii, Icon->bitmap + YRES * Icon->curmap); @@ -623,7 +486,7 @@ int drv_generic_text_icon_draw(WIDGET * W) } /* use blank if invisible */ - ascii = Icon->visible ? Icon->ascii : ' '; + ascii = visible ? Icon->ascii : ' '; /* transfer icon into layout buffer */ LayoutFB[row * LCOLS + col] = ascii; diff --git a/drv_generic_text.h b/drv_generic_text.h index 1ba9b1b..2a476fd 100644 --- a/drv_generic_text.h +++ b/drv_generic_text.h @@ -1,4 +1,5 @@ -/* $Id: drv_generic_text.h,v 1.21 2006/07/31 03:48:09 reinelt Exp $ +/* $Id: drv_generic_text.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_text.h $ * * generic driver helper for text-based displays * @@ -21,89 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_text.h,v $ - * Revision 1.21 2006/07/31 03:48:09 reinelt - * preparations for scrolling - * - * Revision 1.20 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.19 2006/01/03 06:13:46 reinelt - * GPIO's for MatrixOrbital - * - * Revision 1.18 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.17 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.16 2004/11/28 15:50:24 reinelt - * Cwlinux fixes (invalidation of user-defined chars) - * - * Revision 1.15 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.14 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.13 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.12 2004/06/05 06:41:40 reinelt - * - * chancged splash screen again - * - * Revision 1.11 2004/06/02 10:09:22 reinelt - * - * splash screen for HD44780 - * - * Revision 1.10 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.9 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * - * Revision 1.8 2004/03/19 09:17:46 reinelt - * - * removed the extra 'goto' function, row and col are additional parameters - * of the write() function now. - * - * Revision 1.7 2004/02/18 06:39:20 reinelt - * T6963 driver for graphic displays finished - * - * Revision 1.6 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * - * Revision 1.5 2004/02/14 11:56:17 reinelt - * M50530 driver ported - * changed lots of 'char' to 'unsigned char' - * - * Revision 1.4 2004/01/23 07:04:24 reinelt - * icons finished! - * - * Revision 1.3 2004/01/23 04:53:55 reinelt - * icon widget added (not finished yet!) - * - * Revision 1.2 2004/01/22 07:57:45 reinelt - * several bugs fixed where segfaulting on layout>display - * Crystalfontz driver optimized, 632 display already works - * - * Revision 1.1 2004/01/20 05:36:59 reinelt - * moved text-display-specific stuff to drv_generic_text - * moved all the bar stuff from drv_generic_bar to generic_text - * */ diff --git a/drv_picoLCD.c b/drv_picoLCD.c new file mode 100644 index 0000000..36ba7c0 --- /dev/null +++ b/drv_picoLCD.c @@ -0,0 +1,471 @@ +/* $Id: drv_picoLCD.c 759 2007-02-04 05:55:58Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_picoLCD.c $ + * + * driver for picoLCD displays from mini-box.com + * + * Copyright (C) 2005 Michael Reinelt <reinelt@eunet.at> + * Copyright (C) 2005, 2006, 2007 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> + * + * Copyright (C) 2007 Nicu Pavel, Mini-Box.com <npavel@mini-box.com> + * + * 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. + * + */ + +/* + * + * exported fuctions: + * + * struct DRIVER drv_picoLCD + * + */ + +#include "config.h" + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include <unistd.h> +#include <termios.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <sys/time.h> + +#include <usb.h> + +#include "debug.h" +#include "cfg.h" +#include "qprintf.h" +#include "udelay.h" +#include "plugin.h" +#include "widget.h" +#include "widget_text.h" +#include "widget_icon.h" +#include "widget_bar.h" +#include "drv.h" +#include "drv_generic_text.h" +#include "drv_generic_gpio.h" +#include "drv_generic_keypad.h" + + + +#define picoLCD_VENDOR 0x04d8 +#define picoLCD_DEVICE 0x0002 + +static char Name[] = "picoLCD"; + +static unsigned int gpo = 0; + +static char *Buffer; +static char *BufPtr; + +static usb_dev_handle *lcd; +extern int usb_debug; + + + +/****************************************/ +/*** hardware dependant functions ***/ +/****************************************/ + +static int drv_pL_open(void) +{ + struct usb_bus *busses, *bus; + struct usb_device *dev; + char driver[1024]; + char product[1024]; + char manufacturer[1024]; + char serialnumber[1024]; + int ret; + + lcd = NULL; + + info("%s: scanning for picoLCD...", Name); + + usb_debug = 0; + + usb_init(); + usb_find_busses(); + usb_find_devices(); + busses = usb_get_busses(); + + for (bus = busses; bus; bus = bus->next) { + for (dev = bus->devices; dev; dev = dev->next) { + if ((dev->descriptor.idVendor == picoLCD_VENDOR) && (dev->descriptor.idProduct == picoLCD_DEVICE)) { + + info("%s: found picoLCD on bus %s device %s", Name, bus->dirname, dev->filename); + + lcd = usb_open(dev); + + ret = usb_get_driver_np(lcd, 0, driver, sizeof(driver)); + + if (ret == 0) { + info("%s: interface 0 already claimed by '%s'", Name, driver); + info("%s: attempting to detach driver...", Name); + if (usb_detach_kernel_driver_np(lcd, 0) < 0) { + error("%s: usb_detach_kernel_driver_np() failed!", Name); + return -1; + } + } + + usb_set_configuration(lcd, 1); + usleep(100); + + if (usb_claim_interface(lcd, 0) < 0) { + error("%s: usb_claim_interface() failed!", Name); + return -1; + } + + usb_set_altinterface(lcd, 0); + + usb_get_string_simple(lcd, dev->descriptor.iProduct, product, sizeof(product)); + usb_get_string_simple(lcd, dev->descriptor.iManufacturer, manufacturer, sizeof(manufacturer)); + usb_get_string_simple(lcd, dev->descriptor.iSerialNumber, serialnumber, sizeof(serialnumber)); + + info("%s: Manufacturer='%s' Product='%s' SerialNumber='%s'", Name, manufacturer, product, serialnumber); + + return 0; + } + } + } + error("%s: could not find a picoLCD", Name); + return -1; +} + + +static int drv_pL_close(void) +{ + usb_release_interface(lcd, 0); + usb_close(lcd); + + return 0; +} + + +static void drv_pL_send(unsigned char *data, int size) +{ + usb_interrupt_write(lcd, USB_ENDPOINT_OUT + 1, (char *) data, size, 1000); +} + + +static void drv_pL_clear(void) +{ + unsigned char cmd[1] = { 0x94 }; /* clear display */ + drv_pL_send(cmd, 1); +} + +static int drv_pL_contrast(int contrast) +{ + unsigned char cmd[2] = { 0x92 }; /* set contrast */ + + if (contrast < 0) + contrast = 0; + if (contrast > 255) + contrast = 255; + + cmd[1] = contrast; + drv_pL_send(cmd, 2); + + return contrast; +} + + +static int drv_pL_backlight(int backlight) +{ + unsigned char cmd[2] = { 0x91 }; /* set backlight */ + + if (backlight < 0) + backlight = 0; + if (backlight > 1) + backlight = 1; + + cmd[1] = backlight; + drv_pL_send(cmd, 2); + + return backlight; +} + +static int drv_pL_gpo(int num, int val) +{ + unsigned char cmd[2] = { 0x81 }; /* set GPO */ + + if (num < 0) + num = 0; + if (num > 7) + num = 7; + + if (val < 0) + val = 0; + if (val > 1) + val = 1; + + /* set led bit to 1 or 0 */ + if (val) + gpo |= 1 << num; + else + gpo &= ~(1 << num); + + cmd[1] = gpo; + drv_pL_send(cmd, 2); + + return val; +} + + +static void drv_pL_write(const int row, const int col, const char *data, int len) +{ + unsigned char cmd[64]; + int i; + + cmd[0] = 0x98; /* goto/write */ + cmd[1] = row; + cmd[2] = col; + cmd[3] = len; + + i = 4; + while (len--) { + cmd[i++] = *data++; + } + + drv_pL_send(cmd, i); +} + +static void drv_pL_defchar(const int ascii, const unsigned char *matrix) +{ + unsigned char cmd[10] = { 0x9c }; /* define character */ + int i; + + cmd[1] = ascii; + for (i = 0; i < 8; i++) { + cmd[i + 2] = *matrix++ & 0x1f; + } + + drv_pL_send(cmd, 10); +} + + +static int drv_pL_start(const char *section, const int quiet) +{ + int rows = -1, cols = -1; + int value; + char *s; + + s = cfg_get(section, "Size", NULL); + if (s == NULL || *s == '\0') { + error("%s: no '%s.Size' entry from %s", Name, section, cfg_source()); + return -1; + } + if (sscanf(s, "%dx%d", &cols, &rows) != 2 || rows < 1 || cols < 1) { + error("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source()); + free(s); + return -1; + } + + DROWS = rows; + DCOLS = cols; + + if (drv_pL_open() < 0) { + return -1; + } + + /* Init the command buffer */ + Buffer = (char *) malloc(1024); + if (Buffer == NULL) { + error("%s: coommand buffer could not be allocated: malloc() failed", Name); + return -1; + } + BufPtr = Buffer; + + if (cfg_number(section, "Contrast", 0, 0, 255, &value) > 0) { + info("Setting contrast to %d", value); + drv_pL_contrast(value); + } + + if (cfg_number(section, "Backlight", 0, 0, 1, &value) > 0) { + info("Setting backlight to %d", value); + drv_pL_backlight(value); + } + + drv_pL_clear(); /* clear display */ + + if (!quiet) { + char buffer[40]; + qprintf(buffer, sizeof(buffer), "%s %dx%d", Name, DCOLS, DROWS); + if (drv_generic_text_greet(buffer, "http://www.picolcd.com")) { + sleep(3); + drv_pL_clear(); + } + } + + return 0; +} + + +/****************************************/ +/*** plugins ***/ +/****************************************/ + +static void plugin_contrast(RESULT * result, RESULT * arg1) +{ + double contrast; + + contrast = drv_pL_contrast(R2N(arg1)); + SetResult(&result, R_NUMBER, &contrast); +} + +static void plugin_backlight(RESULT * result, RESULT * arg1) +{ + double backlight; + + backlight = drv_pL_backlight(R2N(arg1)); + SetResult(&result, R_NUMBER, &backlight); +} + +static void plugin_gpo(RESULT * result, RESULT * argv[]) +{ + double gpo; + gpo = drv_pL_gpo(R2N(argv[0]), R2N(argv[1])); + SetResult(&result, R_NUMBER, &gpo); +} + + +/****************************************/ +/*** widget callbacks ***/ +/****************************************/ + + +/* using drv_generic_text_draw(W) */ +/* using drv_generic_text_icon_draw(W) */ +/* using drv_generic_text_bar_draw(W) */ + + +/****************************************/ +/*** exported functions ***/ +/****************************************/ + + +/* list models */ +int drv_pL_list(void) +{ + printf("generic"); + return 0; +} + + +/* initialize driver & display */ +int drv_pL_init(const char *section, const int quiet) +{ + WIDGET_CLASS wc; + int ret; + + info("%s: %s", Name, "$Rev: 759 $"); + + /* display preferences */ + XRES = 5; /* pixel width of one char */ + YRES = 8; /* pixel height of one char */ + CHARS = 8; /* number of user-defineable characters */ + CHAR0 = 0; /* ASCII of first user-defineable char */ + GPOS = 8; + INVALIDATE = 1; + GOTO_COST = 2; /* number of bytes a goto command requires */ + + /* real worker functions */ + drv_generic_text_real_write = drv_pL_write; + drv_generic_text_real_defchar = drv_pL_defchar; + drv_generic_gpio_real_set = drv_pL_gpo; + + /* start display */ + if ((ret = drv_pL_start(section, quiet)) != 0) + return ret; + + /* initialize generic text driver */ + if ((ret = drv_generic_text_init(section, Name)) != 0) + return ret; + + /* initialize generic icon driver */ + if ((ret = drv_generic_text_icon_init()) != 0) + return ret; + + /* initialize generic bar driver */ + if ((ret = drv_generic_text_bar_init(0)) != 0) + return ret; + + drv_generic_text_bar_add_segment(0, 0, 255, 32); + + /* GPO's init */ + if ((ret = drv_generic_gpio_init(section, Name)) != 0) + return ret; + + /* register text widget */ + wc = Widget_Text; + wc.draw = drv_generic_text_draw; + widget_register(&wc); + + /* register icon widget */ + wc = Widget_Icon; + wc.draw = drv_generic_text_icon_draw; + widget_register(&wc); + + /* register bar widget */ + wc = Widget_Bar; + wc.draw = drv_generic_text_bar_draw; + widget_register(&wc); + + /* register plugins */ + AddFunction("LCD::contrast", -1, plugin_contrast); + AddFunction("LCD::backlight", -1, plugin_backlight); + AddFunction("LCD::gpo", -1, plugin_gpo); + + return 0; +} + + +/* close driver & display */ +int drv_pL_quit(const int quiet) +{ + + info("%s: shutting down.", Name); + + drv_generic_text_quit(); + + /* clear display */ + drv_pL_clear(); + + /* say goodbye... */ + if (!quiet) { + drv_generic_text_greet("goodbye!", NULL); + } + + drv_pL_close(); + + if (Buffer) { + free(Buffer); + Buffer = NULL; + BufPtr = Buffer; + } + + return (0); +} + + +DRIVER drv_picoLCD = { + name:Name, + list:drv_pL_list, + init:drv_pL_init, + quit:drv_pL_quit, +}; diff --git a/drv_serdisplib.c b/drv_serdisplib.c index 30e7c50..d32cffb 100644 --- a/drv_serdisplib.c +++ b/drv_serdisplib.c @@ -1,4 +1,5 @@ -/* $Id: drv_serdisplib.c,v 1.10 2006/02/27 08:12:34 reinelt Exp $ +/* $Id: drv_serdisplib.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_serdisplib.c $ * * driver for serdisplib displays * @@ -21,38 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_serdisplib.c,v $ - * Revision 1.10 2006/02/27 08:12:34 reinelt - * use serdisplib's full color support - * - * Revision 1.9 2006/02/27 06:14:46 reinelt - * graphic bug resulting in all black pixels solved - * - * Revision 1.8 2006/02/08 04:55:05 reinelt - * moved widget registration to drv_generic_graphic - * - * Revision 1.7 2006/01/30 06:25:54 reinelt - * added CVS Revision - * - * Revision 1.6 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.5 2005/05/28 09:06:14 reinelt - * serdisplib cosmetics - * - * Revision 1.4 2005/05/12 14:55:47 reinelt - * plugins for serdisplib driver - * - * Revision 1.3 2005/05/12 05:52:43 reinelt - * serdisplib GET_VERSION_MAJOR macro - * - * Revision 1.2 2005/05/11 04:27:49 reinelt - * small serdisplib bugs fixed - * - * Revision 1.1 2005/05/10 13:20:14 reinelt - * added serdisplib driver - * */ /* @@ -315,7 +284,7 @@ int drv_SD_init(const char *section, const int quiet) { int ret; - info("%s: %s", Name, "$Revision: 1.10 $"); + info("%s: %s", Name, "$Rev: 728 $"); /* real worker functions */ drv_generic_graphic_real_blit = drv_SD_blit; diff --git a/evaluator.c b/evaluator.c index 8b4dbc9..f297491 100644 --- a/evaluator.c +++ b/evaluator.c @@ -1,4 +1,5 @@ -/* $Id: evaluator.c,v 1.31 2006/02/25 13:36:33 geronet Exp $ +/* $Id: evaluator.c 754 2007-01-21 06:19:40Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/evaluator.c $ * * expression evaluation * @@ -21,129 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: evaluator.c,v $ - * Revision 1.31 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.30 2006/01/30 12:53:08 reinelt - * replaced strncpy with strcpy where possible - * - * Revision 1.29 2006/01/30 06:11:36 reinelt - * changed Result->length to Result->size - * - * Revision 1.28 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.27 2006/01/28 15:36:18 harbaum - * Fix: string termination bug in eval() - * - * Revision 1.26 2006/01/21 09:40:20 reinelt - * Big Memory Leak in Evaluator fixed (thanks to Oliver Gehrke) - * - * Revision 1.25 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.24 2005/03/30 04:57:50 reinelt - * Evaluator speedup: use bsearch for finding functions and variables - * - * Revision 1.23 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.22 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.21 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.20 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.19 2004/04/12 11:12:25 reinelt - * added plugin_isdn, removed old ISDN client - * fixed some real bad bugs in the evaluator - * - * Revision 1.18 2004/03/11 06:39:58 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.17 2004/03/08 18:45:52 hejl - * fixed segfault when using string concatenation - * - * Revision 1.16 2004/03/08 04:33:08 reinelt - * string concatenation fixed - * - * Revision 1.15 2004/03/06 20:31:16 reinelt - * Complete rewrite of the evaluator to get rid of the code - * from mark Morley (because of license issues). - * The new Evaluator does a pre-compile of expressions, and - * stores them in trees. Therefore it should be reasonable faster... - * - * Revision 1.14 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.13 2004/02/26 21:42:45 reinelt - * memory leak fixes from Martin - * - * Revision 1.12 2004/02/05 07:10:23 reinelt - * evaluator function names are no longer case-sensitive - * Crystalfontz Fan PWM control, Fan RPM monitoring, temperature monitoring - * - * 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 - * - * Revision 1.9 2004/01/15 07:47:02 reinelt - * debian/ postinst and watch added (did CVS forget about them?) - * evaluator: conditional expressions (a?b:c) added - * text widget nearly finished - * - * Revision 1.8 2004/01/12 03:51:01 reinelt - * evaluating the 'Variables' section in the config file - * - * Revision 1.7 2004/01/07 10:15:41 reinelt - * small glitch in evaluator fixed - * made config table sorted and access with bsearch(), - * which should be much faster - * - * Revision 1.6 2004/01/06 23:01:37 reinelt - * more copyright issues - * - * Revision 1.5 2004/01/06 17:33:45 reinelt - * Evaluator: functions with variable argument lists - * Evaluator: plugin_sample.c and README.Plugins added - * - * Revision 1.4 2004/01/06 15:19:12 reinelt - * Evaluator rearrangements... - * - * Revision 1.3 2003/10/11 06:01:52 reinelt - * renamed expression.{c,h} to client.{c,h} - * added config file client - * new functions 'AddNumericVariable()' and 'AddStringVariable()' - * new parameter '-i' for interactive mode - * - * Revision 1.2 2003/10/06 05:47:27 reinelt - * operators: ==, \!=, <=, >= - * - * Revision 1.1 2003/10/06 04:34:06 reinelt - * expression evaluator added - * */ @@ -314,11 +192,11 @@ static char *Word = NULL; static TOKEN Token = T_UNDEF; static OPERATOR Operator = O_UNDEF; -static VARIABLE *Variable = NULL; -static int nVariable = 0; +static VARIABLE Variable[255]; +static unsigned int nVariable = 0; static FUNCTION *Function = NULL; -static int nFunction = 0; +static unsigned int nFunction = 0; void DelResult(RESULT * result) @@ -396,7 +274,7 @@ RESULT *SetResult(RESULT ** result, const int type, const void *value) } -static RESULT *CopyResult(RESULT ** result, RESULT * value) +RESULT *CopyResult(RESULT ** result, RESULT * value) { if (*result == NULL) { if ((*result = NewResult()) == NULL) @@ -432,6 +310,10 @@ double R2N(RESULT * result) return 0.0; } + if (result->type == 0) { + return 0.0; + } + if (result->type & R_NUMBER) { return result->number; } @@ -454,6 +336,10 @@ char *R2S(RESULT * result) return NULL; } + if (result->type == 0) { + return NULL; + } + if (result->type & R_STRING) { return result->string; } @@ -474,29 +360,16 @@ char *R2S(RESULT * result) } -/* bsearch compare function for variables */ -static int LookupVariable(const void *a, const void *b) -{ - char *key = (char *) a; - VARIABLE *var = (VARIABLE *) b; - - return strcmp(key, var->name); -} - - -/* qsort compare function for variables */ -static int SortVariable(const void *a, const void *b) -{ - VARIABLE *va = (VARIABLE *) a; - VARIABLE *vb = (VARIABLE *) b; - - return strcmp(va->name, vb->name); -} - - static VARIABLE *FindVariable(const char *name) { - return bsearch(name, Variable, nVariable, sizeof(VARIABLE), LookupVariable); + unsigned int i; + + for (i = 0; i < nVariable; i++) { + if (strcmp(name, Variable[i].name) == 0) { + return &Variable[i]; + } + } + return NULL; } @@ -510,14 +383,16 @@ int SetVariable(const char *name, RESULT * value) return 1; } + if (nVariable >= sizeof(Variable) / sizeof(Variable[0])) { + error("Evaluator: cannot set variable <%s>: out of slots", name); + return -1; + } + nVariable++; - Variable = realloc(Variable, nVariable * sizeof(VARIABLE)); Variable[nVariable - 1].name = strdup(name); Variable[nVariable - 1].value = NULL; CopyResult(&Variable[nVariable - 1].value, value); - qsort(Variable, nVariable, sizeof(VARIABLE), SortVariable); - return 0; } @@ -546,14 +421,12 @@ int SetVariableString(const char *name, const char *value) void DeleteVariables(void) { - int i; + unsigned int i; for (i = 0; i < nVariable; i++) { free(Variable[i].name); FreeResult(Variable[i].value); } - free(Variable); - Variable = NULL; nVariable = 0; } @@ -600,7 +473,7 @@ int AddFunction(const char *name, const int argc, void (*func) ()) void DeleteFunctions(void) { - int i; + unsigned int i; for (i = 0; i < nFunction; i++) { free(Function[i].name); diff --git a/evaluator.h b/evaluator.h index 51f94a7..009b04b 100644 --- a/evaluator.h +++ b/evaluator.h @@ -1,4 +1,5 @@ -/* $Id: evaluator.h,v 1.13 2006/08/13 09:53:10 reinelt Exp $ +/* $Id: evaluator.h 754 2007-01-21 06:19:40Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/evaluator.h $ * * expression evaluation * @@ -21,68 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: evaluator.h,v $ - * Revision 1.13 2006/08/13 09:53:10 reinelt - * dynamic properties added (used by 'style' of text widget) - * - * Revision 1.12 2006/01/30 06:11:36 reinelt - * changed Result->length to Result->size - * - * Revision 1.11 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.10 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.9 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.8 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.7 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.6 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.5 2004/03/06 20:31:16 reinelt - * Complete rewrite of the evaluator to get rid of the code - * from mark Morley (because of license issues). - * The new Evaluator does a pre-compile of expressions, and - * stores them in trees. Therefore it should be reasonable faster... - * - * Revision 1.4 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.3 2004/01/12 03:51:01 reinelt - * evaluating the 'Variables' section in the config file - * - * Revision 1.2 2003/10/11 06:01:53 reinelt - * - * renamed expression.{c,h} to client.{c,h} - * added config file client - * new functions 'AddNumericVariable()' and 'AddStringVariable()' - * new parameter '-i' for interactive mode - * - * Revision 1.1 2003/10/06 04:34:06 reinelt - * expression evaluator added - * */ @@ -112,6 +51,7 @@ void DeleteFunctions(void); void DelResult(RESULT * result); RESULT *SetResult(RESULT ** result, const int type, const void *value); +RESULT *CopyResult(RESULT ** result, RESULT * value); double R2N(RESULT * result); char *R2S(RESULT * result); @@ -1,4 +1,5 @@ -/* $Id: font_6x8.h,v 1.4 2006/08/14 19:24:22 harbaum Exp $ +/* $Id: font_6x8.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/font_6x8.h $ * * 6x8 font * @@ -21,23 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: font_6x8.h,v $ - * Revision 1.4 2006/08/14 19:24:22 harbaum - * Umlaut support, added KVV HTTP-User-Agent - * - * Revision 1.3 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.2 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.1 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * */ #define ______ 0x00 diff --git a/font_6x8_bold.h b/font_6x8_bold.h index e0175fb..5395744 100644 --- a/font_6x8_bold.h +++ b/font_6x8_bold.h @@ -1,4 +1,5 @@ -/* $Id: font_6x8_bold.h,v 1.3 2006/08/14 19:24:22 harbaum Exp $ +/* $Id: font_6x8_bold.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/font_6x8_bold.h $ * * 6x8 bold font * @@ -21,17 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: font_6x8_bold.h,v $ - * Revision 1.3 2006/08/14 19:24:22 harbaum - * Umlaut support, added KVV HTTP-User-Agent - * - * Revision 1.2 2006/08/13 18:14:03 harbaum - * Added KVV plugin - * - * Revision 1.1 2006/08/09 17:25:34 harbaum - * Better bar color support and new bold font - * */ #define ______ 0x00 @@ -1,4 +1,5 @@ -/* $Id: hash.c,v 1.26 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: hash.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/hash.c $ * * hashes (associative arrays) * @@ -21,118 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: hash.c,v $ - * Revision 1.26 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.25 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.24 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.23 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.22 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.21 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.20 2004/06/13 01:12:52 reinelt - * - * debug widgets changed (thanks to Andy Baxter) - * - * Revision 1.19 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.18 2004/05/31 16:39:06 reinelt - * - * added NULL display driver (for debugging/profiling purposes) - * added backlight/contrast initialisation for matrixOrbital - * added Backlight initialisation for Cwlinux - * - * Revision 1.17 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.16 2004/03/03 08:40:07 hejl - * Fixed memory leak in hash_get_regex - * - * Revision 1.15 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.14 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.13 2004/02/27 06:07:55 reinelt - * hash improvements from Martin - * - * 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 - * - * Revision 1.10 2004/01/27 04:48:57 reinelt - * bug with hash_age() fixed (thanks to Markus Keil for pointing this out) - * - * Revision 1.9 2004/01/22 07:57:45 reinelt - * several bugs fixed where segfaulting on layout>display - * Crystalfontz driver optimized, 632 display already works - * - * Revision 1.8 2004/01/21 14:29:03 reinelt - * new helper 'hash_get_regex' which delivers the sum over regex matched items - * new function 'disk()' which uses this regex matching - * - * Revision 1.7 2004/01/21 10:48:17 reinelt - * hash_age function added - * - * Revision 1.6 2004/01/20 05:36:59 reinelt - * moved text-display-specific stuff to drv_generic_text - * moved all the bar stuff from drv_generic_bar to generic_text - * - * Revision 1.5 2004/01/18 09:01:45 reinelt - * /proc/stat parsing finished - * - * Revision 1.4 2004/01/18 06:54:08 reinelt - * bug in expr.c fixed (thanks to Xavier) - * some progress with /proc/stat parsing - * - * Revision 1.3 2004/01/16 07:26:25 reinelt - * moved various /proc parsing to own functions - * made some progress with /proc/stat parsing - * - * Revision 1.2 2004/01/16 05:04:53 reinelt - * started plugin proc_stat which should parse /proc/stat - * which again is a paint in the a** - * thinking over implementation methods of delta functions - * (CPU load, ...) - * - * Revision 1.1 2004/01/13 10:03:01 reinelt - * new util 'hash' for associative arrays - * new plugin 'cpuinfo' - * */ /* @@ -1,4 +1,5 @@ -/* $Id: hash.h,v 1.19 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: hash.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/hash.h $ * * hashes (associative arrays) * @@ -21,91 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: hash.h,v $ - * Revision 1.19 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.18 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.17 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.16 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.15 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.14 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.13 2004/06/13 01:12:52 reinelt - * - * debug widgets changed (thanks to Andy Baxter) - * - * Revision 1.12 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.11 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.10 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.9 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.8 2004/02/27 06:07:55 reinelt - * hash improvements from Martin - * - * Revision 1.7 2004/01/21 14:29:03 reinelt - * new helper 'hash_get_regex' which delivers the sum over regex matched items - * new function 'disk()' which uses this regex matching - * - * Revision 1.6 2004/01/21 10:48:17 reinelt - * hash_age function added - * - * Revision 1.5 2004/01/18 09:01:45 reinelt - * /proc/stat parsing finished - * - * Revision 1.4 2004/01/16 11:12:26 reinelt - * some bugs in plugin_xmms fixed, parsing moved to own function - * plugin_proc_stat nearly finished - * - * Revision 1.3 2004/01/16 07:26:25 reinelt - * moved various /proc parsing to own functions - * made some progress with /proc/stat parsing - * - * Revision 1.2 2004/01/16 05:04:53 reinelt - * started plugin proc_stat which should parse /proc/stat - * which again is a paint in the a** - * thinking over implementation methods of delta functions - * (CPU load, ...) - * - * Revision 1.1 2004/01/13 10:03:01 reinelt - * new util 'hash' for associative arrays - * new plugin 'cpuinfo' - * */ #ifndef _HASH_H_ diff --git a/indent.sh b/indent.sh deleted file mode 100755 index 11a02b2..0000000 --- a/indent.sh +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/bash - -# -kr Use Kernighan & Ritchie coding style. -# -l120 Set maximum line length for non-comment lines to 150. - -rm *.c~ *.h~ -indent -kr -l120 *.c *.h - -for i in *.c *.h; do - if !(diff -q $i $i~); then - rm $i~ - else - mv $i~ $i - fi -done @@ -1,38 +1,19 @@ #!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2005-05-14.22 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. # -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). # +# Copyright 1991 by the Massachusetts Institute of Technology # -# FSF changes to this file are in the public domain. +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it @@ -42,11 +23,13 @@ scriptversion=2005-05-14.22 # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. + # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" + # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" @@ -58,266 +41,211 @@ stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" +transformbasename="" +transform_arg="" +instcmd="$mvprog" chmodcmd="$chmodprog 0755" -chowncmd= -chgrpcmd= -stripcmd= +chowncmd="" +chgrpcmd="" +stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" -src= -dst= -dir_arg= -dstarg= -no_target_directory= - -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test -n "$1"; do - case $1 in - -c) shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit $?;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; - - --version) echo "$0 $scriptversion"; exit $?;; - - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done - break;; - esac +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac done -if test -z "$1"; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true fi -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src ;; - esac - - if test -n "$dir_arg"; then - dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi - else - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dstarg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dstarg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst ;; - esac +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + chmodcmd="" + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 - exit 1 - fi - dst=$dst/`basename "$src"` - fi - fi - - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` - - # Make sure that the destination directory exists. - - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" - - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS - - pathcomp= - - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 - shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit - fi - pathcomp=$pathcomp/ - done - fi - - if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - - else - dstfile=`basename "$dst"` - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 - - # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - } - } - fi || { (exit 1); exit 1; } +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit 0 -} - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: +exit 0 @@ -1,4 +1,5 @@ -/* $Id: layout.c,v 1.22 2006/02/21 05:50:34 reinelt Exp $ +/* $Id: layout.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/layout.c $ * * new layouter framework * @@ -21,92 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: layout.c,v $ - * Revision 1.22 2006/02/21 05:50:34 reinelt - * keypad support from Cris Maj - * - * Revision 1.21 2006/02/08 04:55:05 reinelt - * moved widget registration to drv_generic_graphic - * - * Revision 1.20 2006/02/07 05:36:13 reinelt - * Layers added to Layout - * - * Revision 1.19 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.18 2006/01/23 06:17:18 reinelt - * timer widget added - * - * Revision 1.17 2005/12/18 16:18:36 reinelt - * GPO's added again - * - * Revision 1.16 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.15 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.14 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.13 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.12 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.11 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.10 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.9 2004/02/01 19:37:40 reinelt - * got rid of every strtok() incarnation. - * - * Revision 1.8 2004/02/01 18:08:50 reinelt - * removed strtok() from layout processing (took me hours to find this bug) - * further strtok() removind should be done! - * - * 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 - * first results displayed on MatrixOrbital - * - * Revision 1.5 2004/01/13 08:18:19 reinelt - * timer queues added - * liblcd4linux deactivated turing transformation to new layout - * - * Revision 1.4 2004/01/12 03:51:01 reinelt - * evaluating the 'Variables' section in the config file - * - * Revision 1.3 2004/01/11 18:26:02 reinelt - * further widget and layout processing - * - * Revision 1.2 2004/01/11 09:26:15 reinelt - * layout starts to exist... - * - * Revision 1.1 2004/01/10 20:22:33 reinelt - * added new function 'cfg_list()' (not finished yet) - * added layout.c (will replace processor.c someday) - * added widget_text.c (will be the first and most important widget) - * modified lcd4linux.c so that old-style configs should work, too - * */ /* @@ -1,4 +1,5 @@ -/* $Id: layout.h,v 1.5 2006/02/27 07:53:52 reinelt Exp $ +/* $Id: layout.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/layout.h $ * * new layouter framework * @@ -21,27 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: layout.h,v $ - * Revision 1.5 2006/02/27 07:53:52 reinelt - * some more graphic issues fixed - * - * Revision 1.4 2006/02/07 05:36:13 reinelt - * Layers added to Layout - * - * Revision 1.3 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.2 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.1 2004/01/10 20:22:33 reinelt - * added new function 'cfg_list()' (not finished yet) - * added layout.c (will replace processor.c someday) - * added widget_text.c (will be the first and most important widget) - * modified lcd4linux.c so that old-style configs should work, too - * */ #ifndef _LAYOUT_H_ diff --git a/lcd4linux.c b/lcd4linux.c index 1e33e7c..8691ab3 100644 --- a/lcd4linux.c +++ b/lcd4linux.c @@ -1,9 +1,11 @@ -/* $Id: lcd4linux.c,v 1.81 2006/08/13 06:46:51 reinelt Exp $ +/* $Id: lcd4linux.c 756 2007-01-23 04:38:43Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/lcd4linux.c $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/lcd4linux.c $ * * LCD4Linux * * Copyright (C) 1999, 2000, 2001, 2002, 2003 Michael Reinelt <reinelt@eunet.at> - * Copyright (C) 2004 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> + * Copyright (C) 2004, 2005, 2006, 2007 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> * * This file is part of LCD4Linux. * @@ -21,357 +23,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: lcd4linux.c,v $ - * Revision 1.81 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.80 2006/01/23 06:17:18 reinelt - * timer widget added - * - * Revision 1.79 2005/09/02 05:27:08 reinelt - * double-fork daemonize patch from Petri Damsten - * - * Revision 1.78 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.77 2005/03/30 04:57:50 reinelt - * Evaluator speedup: use bsearch for finding functions and variables - * - * Revision 1.76 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.75 2004/09/24 21:41:00 reinelt - * new driver for the BWCT USB LCD interface board. - * - * Revision 1.74 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.73 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.72 2004/06/06 06:51:59 reinelt - * - * do not display end splash screen if quiet=1 - * - * Revision 1.71 2004/06/02 09:41:19 reinelt - * - * prepared support for startup splash screen - * - * Revision 1.70 2004/06/02 05:14:16 reinelt - * - * fixed models listing for Beckmann+Egle driver - * some cosmetic changes - * - * Revision 1.69 2004/03/14 07:11:42 reinelt - * parameter count fixed for plugin_dvb() - * plugin_APM (battery status) ported - * - * Revision 1.68 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.67 2004/03/06 20:31:16 reinelt - * Complete rewrite of the evaluator to get rid of the code - * from mark Morley (because of license issues). - * The new Evaluator does a pre-compile of expressions, and - * stores them in trees. Therefore it should be reasonable faster... - * - * Revision 1.66 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.65 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.64 2004/02/27 07:06:25 reinelt - * new function 'qprintf()' (simple but quick snprintf() replacement) - * - * Revision 1.63 2004/02/10 07:42:35 reinelt - * cut off all old-style files which are no longer used with NextGeneration - * - * 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 - * first results displayed on MatrixOrbital - * - * Revision 1.60 2004/01/13 08:18:19 reinelt - * timer queues added - * liblcd4linux deactivated turing transformation to new layout - * - * Revision 1.59 2004/01/12 03:51:01 reinelt - * evaluating the 'Variables' section in the config file - * - * Revision 1.58 2004/01/10 20:22:33 reinelt - * added new function 'cfg_list()' (not finished yet) - * added layout.c (will replace processor.c someday) - * added widget_text.c (will be the first and most important widget) - * modified lcd4linux.c so that old-style configs should work, too - * - * Revision 1.57 2004/01/10 17:45:26 reinelt - * changed initialization order so cfg() gets initialized before plugins. - * This way a plugin's init() can use cfg_get(). - * Thanks to Xavier for reporting this one! - * - * Revision 1.56 2004/01/09 17:03:07 reinelt - * initiated transfer to new driver architecture - * new file 'drv.c' will someday replace 'display.c' - * new file 'drv_MatrixOrbital.c' will replace 'MatrixOrbital.c' - * due to this 'soft' transfer lcd4linux should stay usable during the switch - * (at least I hope so) - * - * Revision 1.55 2004/01/09 04:16:06 reinelt - * added 'section' argument to cfg_get(), but NULLed it on all calls by now. - * - * Revision 1.54 2004/01/08 05:28:12 reinelt - * Luk Claes added to AUTHORS - * cfg: group handling ('{}') added - * - * Revision 1.53 2003/12/19 05:35:14 reinelt - * renamed 'client' to 'plugin' - * - * Revision 1.52 2003/12/01 07:08:50 reinelt - * - * Patches from Xavier: - * - WiFi: make interface configurable - * - "quiet" as an option from the config file - * - ignore missing "MemShared" on Linux 2.6 - * - * Revision 1.51 2003/11/16 09:45:49 reinelt - * Crystalfontz changes, small glitch in getopt() fixed - * - * Revision 1.50 2003/10/22 04:19:16 reinelt - * Makefile.in for imon.c/.h, some MatrixOrbital clients - * - * Revision 1.49 2003/10/11 06:01:53 reinelt - * - * renamed expression.{c,h} to client.{c,h} - * added config file client - * new functions 'AddNumericVariable()' and 'AddStringVariable()' - * new parameter '-i' for interactive mode - * - * Revision 1.48 2003/10/05 17:58:50 reinelt - * libtool junk; copyright messages cleaned up - * - * Revision 1.47 2003/09/10 08:37:09 reinelt - * icons: reorganized tick_* again... - * - * Revision 1.46 2003/09/09 06:54:43 reinelt - * new function 'cfg_number()' - * - * Revision 1.45 2003/09/09 05:30:34 reinelt - * even more icons stuff - * - * Revision 1.44 2003/08/24 05:17:58 reinelt - * liblcd4linux patch from Patrick Schemitz - * - * Revision 1.43 2003/08/17 16:37:39 reinelt - * more icon framework - * - * Revision 1.42 2003/08/14 03:47:40 reinelt - * remove PID file if driver initialisation fails - * - * Revision 1.41 2003/08/08 08:05:23 reinelt - * added PID file handling - * - * Revision 1.40 2003/08/08 06:58:06 reinelt - * improved forking - * - * Revision 1.39 2003/07/24 04:48:09 reinelt - * 'soft clear' needed for virtual rows - * - * Revision 1.38 2003/06/13 05:11:11 reinelt - * error message cosmetics - * - * Revision 1.37 2003/04/07 06:03:01 reinelt - * further parallel port abstraction - * - * Revision 1.36 2003/02/22 07:53:10 reinelt - * cfg_get(key,defval) - * - * Revision 1.35 2003/02/13 10:40:17 reinelt - * - * changed "copyright" to "2003" - * added slightly different protocol for MatrixOrbital "LK202" displays - * - * Revision 1.34 2002/04/29 11:00:28 reinelt - * - * added Toshiba T6963 driver - * added ndelay() with nanosecond resolution - * - * Revision 1.33 2001/04/27 05:04:57 reinelt - * - * replaced OPEN_MAX with sysconf() - * replaced mktemp() with mkstemp() - * unlock serial port if open() fails - * - * Revision 1.32 2001/03/13 07:41:22 reinelt - * - * added NEWS file - * - * Revision 1.31 2001/03/12 12:39:36 reinelt - * - * reworked autoconf a lot: drivers may be excluded, #define's went to config.h - * - * Revision 1.30 2001/03/08 15:25:38 ltoetsch - * improved exec - * - * Revision 1.29 2001/02/14 07:40:16 reinelt - * - * first (incomplete) GPO implementation - * - * Revision 1.28 2000/10/25 08:10:48 reinelt - * - * added restart funnctionality - * (lots of this code was stolen from sendmail.c) - * - * Revision 1.27 2000/08/10 18:42:20 reinelt - * - * fixed some bugs with the new syslog code - * - * Revision 1.26 2000/08/10 09:44:09 reinelt - * - * new debugging scheme: error(), info(), debug() - * uses syslog if in daemon mode - * - * Revision 1.25 2000/08/09 14:14:11 reinelt - * - * new switch -F (do not fork) - * added automatic forking if -F not specified - * - * Revision 1.24 2000/08/09 09:50:29 reinelt - * - * opened 0.98 development - * removed driver-specific signal-handlers - * added 'quit'-function to driver structure - * added global signal-handler - * - * Revision 1.23 2000/04/17 05:14:27 reinelt - * - * added README.44780 - * - * Revision 1.22 2000/04/15 16:56:52 reinelt - * - * moved delay loops to udelay.c - * renamed -d (debugging) switch to -v (verbose) - * new switch -d to calibrate delay loop - * 'Delay' entry for HD44780 back again - * delay loops will not calibrate automatically, because this will fail with hich CPU load - * - * Revision 1.21 2000/04/15 11:56:35 reinelt - * - * more debug messages - * - * Revision 1.20 2000/04/15 11:13:54 reinelt - * - * added '-d' (debugging) switch - * added several debugging messages - * removed config entry 'Delay' for HD44780 driver - * delay loop for HD44780 will be calibrated automatically - * - * Revision 1.19 2000/04/10 04:40:53 reinelt - * - * minor changes and cleanups - * - * Revision 1.18 2000/04/07 05:42:20 reinelt - * - * UUCP style lockfiles for the serial port - * - * Revision 1.17 2000/04/03 17:31:52 reinelt - * - * suppress welcome message if display is smaller than 20x2 - * change lcd4linux.ppm to 32 pixel high so KDE won't stretch the icon - * - * Revision 1.16 2000/04/03 04:46:38 reinelt - * - * added '-c key=val' option - * - * Revision 1.15 2000/04/01 22:40:42 herp - * geometric correction (too many pixelgaps) - * lcd4linux main should return int, not void - * - * Revision 1.14 2000/03/26 18:46:28 reinelt - * - * bug in pixmap.c that leaded to empty bars fixed - * name conflicts with X11 resolved - * - * Revision 1.13 2000/03/26 12:55:03 reinelt - * - * enhancements to the PPM driver - * - * Revision 1.12 2000/03/25 05:50:43 reinelt - * - * memory leak in Raster_flush closed - * driver family logic changed - * - * Revision 1.11 2000/03/24 11:36:56 reinelt - * - * new syntax for raster configuration - * changed XRES and YRES to be configurable - * PPM driver works nice - * - * Revision 1.10 2000/03/23 07:24:48 reinelt - * - * PPM driver up and running (but slow!) - * - * Revision 1.9 2000/03/22 15:36:21 reinelt - * - * added '-l' switch (list drivers) - * generic pixmap driver added - * X11 Framework done - * - * Revision 1.8 2000/03/22 07:33:50 reinelt - * - * FAQ added - * new modules 'processor.c' contains all data processing - * - * Revision 1.7 2000/03/19 08:41:28 reinelt - * - * documentation available! README, README.MatrixOrbital, README.Drivers - * added Skeleton.c as a starting point for new drivers - * - * Revision 1.6 2000/03/18 10:31:06 reinelt - * - * added sensor handling (for temperature etc.) - * made data collecting happen only if data is used - * (reading /proc/meminfo takes a lot of CPU!) - * released lcd4linux-0.92 - * - * Revision 1.5 2000/03/18 08:07:04 reinelt - * - * vertical bars implemented - * bar compaction improved - * memory information implemented - * - * Revision 1.4 2000/03/17 09:21:42 reinelt - * - * various memory statistics added - * - * Revision 1.3 2000/03/13 15:58:24 reinelt - * - * release 0.9 - * moved row parsing to parser.c - * all basic work finished - * - * Revision 1.2 2000/03/10 17:36:02 reinelt - * - * first unstable but running release - * */ #include "config.h" @@ -385,6 +36,7 @@ #include <signal.h> #include <time.h> +#include "svn_version.h" #include "cfg.h" #include "debug.h" #include "qprintf.h" @@ -394,6 +46,7 @@ #include "timer.h" #include "layout.h" #include "plugin.h" +#include "thread.h" #include "widget.h" #include "widget_timer.h" @@ -404,8 +57,8 @@ #define PIDFILE "/var/run/lcd4linux.pid" -static char *release = "LCD4Linux " VERSION; -static char *copyright = "Copyright (C) 2005 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>"; +static char *release = "LCD4Linux " VERSION "-" SVN_VERSION; +static char *copyright = "Copyright (C) 2005, 2006, 2007 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>"; static char **my_argv; extern char *output; @@ -418,7 +71,7 @@ static void usage(void) printf("%s\n", copyright); printf("usage: lcd4linux [-h]\n"); printf(" lcd4linux [-l]\n"); - printf(" lcd4linux [-c key=value] [-i] [-f config-file] [-v]\n"); + printf(" lcd4linux [-c key=value] [-i] [-f config-file] [-v] [-p pid-file]\n"); printf(" lcd4linux [-c key=value] [-F] [-f config-file] [-o output-file] [-q] [-v]\n"); } @@ -528,6 +181,7 @@ static void daemonize(void) int main(int argc, char *argv[]) { char *cfg = "/etc/lcd4linux.conf"; + char *pidfile = PIDFILE; char *display, *driver, *layout; char section[32]; int c; @@ -542,10 +196,14 @@ int main(int argc, char *argv[]) } my_argv[c] = NULL; + /* save original arguments pointer for threads */ + thread_argv = argv; + thread_argc = argc; + running_foreground = 0; running_background = 0; - while ((c = getopt(argc, argv, "c:Ff:hilo:qv")) != EOF) { + while ((c = getopt(argc, argv, "c:Ff:hilo:qvp:")) != EOF) { switch (c) { case 'c': @@ -580,6 +238,9 @@ int main(int argc, char *argv[]) case 'v': verbose_level++; break; + case 'p': + pidfile = optarg; + break; default: exit(2); } @@ -595,7 +256,7 @@ int main(int argc, char *argv[]) running_foreground = 1; } - info("Version " VERSION " starting"); + info("Version " VERSION "-" SVN_VERSION " starting"); if (!running_foreground && (my_argv[0] == NULL || my_argv[0][0] != '/')) { info("invoked without full path; restart may not work!"); } @@ -631,7 +292,7 @@ int main(int argc, char *argv[]) signal(SIGQUIT, SIG_IGN); /* create PID file */ - if ((pid = pid_init(PIDFILE)) != 0) { + if ((pid = pid_init(pidfile)) != 0) { error("lcd4linux already running as process %d", pid); exit(1); } @@ -643,7 +304,7 @@ int main(int argc, char *argv[]) /* go into interactive mode before display initialization */ if (interactive >= 2) { interactive_mode(); - pid_exit(PIDFILE); + pid_exit(pidfile); cfg_exit(); exit(0); } @@ -655,7 +316,7 @@ int main(int argc, char *argv[]) debug("initializing driver %s", driver); if (drv_init(section, driver, quiet) == -1) { - pid_exit(PIDFILE); + pid_exit(pidfile); exit(1); } free(driver); @@ -667,7 +328,7 @@ int main(int argc, char *argv[]) if (interactive >= 1) { interactive_mode(); drv_quit(quiet); - pid_exit(PIDFILE); + pid_exit(pidfile); cfg_exit(); exit(0); } @@ -701,7 +362,7 @@ int main(int argc, char *argv[]) debug("leaving main loop"); drv_quit(quiet); - pid_exit(PIDFILE); + pid_exit(pidfile); cfg_exit(); plugin_exit(); timer_exit(); diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample index 16c3faf..c485b39 100644 --- a/lcd4linux.conf.sample +++ b/lcd4linux.conf.sample @@ -1,3 +1,7 @@ +# $Id: lcd4linux.conf.sample 759 2007-02-04 05:55:58Z michael $ +# $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/lcd4linux.conf.sample $ + + Variables { tick 500 tack 100 @@ -242,6 +246,14 @@ Display HD44780-kernelconcepts { } } +Display picoLCD { + Driver 'picoLCD' + Size '20x2' + Contrast 0 + Backlight 1 + Icons 1 +} + Display SC1602D { Driver 'HD44780' Port '/dev/parports/0' @@ -851,6 +863,23 @@ Widget Rain { } } +Widget Timer { + class 'Icon' + speed 50 + Bitmap { + Row1 '.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|' + Row2 '.***.|.*+*.|.*++.|.*++.|.*++.|.*++.|.*++.|.*++.|.*++.|.*++.|.*++.|.*++.|.+++.|.+*+.|.+**.|.+**.|.+**.|.+**.|.+**.|.+**.|.+**.|.+**.|.+**.|.+**.|' + Row3 '*****|**+**|**++*|**+++|**++.|**++.|**+++|**+++|**+++|**+++|**+++|+++++|+++++|++*++|++**+|++***|++**.|++**.|++***|++***|++***|++***|++***|*****|' + Row4 '*****|**+**|**+**|**+**|**+++|**+++|**+++|**+++|**+++|**+++|+++++|+++++|+++++|++*++|++*++|++*++|++***|++***|++***|++***|++***|++***|*****|*****|' + Row5 '*****|*****|*****|*****|*****|***++|***++|**+++|*++++|+++++|+++++|+++++|+++++|+++++|+++++|+++++|+++++|+++**|+++**|++***|+****|*****|*****|*****|' + Row6 '.***.|.***.|.***.|.***.|.***.|.***.|.**+.|.*++.|.+++.|.+++.|.+++.|.+++.|.+++.|.+++.|.+++.|.+++.|.+++.|.+++.|.++*.|.+**.|.***.|.***.|.***.|.***.|' + Row7 '.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|' + Row8 '.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|' + + + } +} + Widget Test { class 'Text' expression '1234567890123456789012345678901234567890' @@ -1117,6 +1146,17 @@ Layout TestGPO { GPO4 'GPO_Test1' } +Layout TestIcons { + Row1.Col1 'Timer' + Row1.Col2 'Rain' + Row1.Col3 'Squirrel' + Row1.Col4 'Wave' + Row1.Col5 'Blob' + Row1.Col6 'Heart' + Row1.Col7 'Karo' + Row1.Col8 'EKG' +} + Layout testMySQL { Row1 { Col1 'MySQLtest1' @@ -1163,10 +1203,11 @@ Layout Debug { #Display 'BWCT' #Display 'Image' #Display 'Trefon' -Display 'LCD2USB' +#Display 'LCD2USB' #Display 'LPH7508-serdisplib' #Display 'LPH7508' #Display 'ctinclud' +Display 'picoLCD' #Layout 'Default' #Layout 'TestLayer' @@ -1174,10 +1215,10 @@ Display 'LCD2USB' #Layout 'L8x2' #Layout 'L16x1' #Layout 'L16x2' -#Layout 'L20x2' +Layout 'L20x2' #Layout 'L40x2' -Layout 'Test' +#Layout 'Test' #Layout 'Test2' #Layout 'TestGPO' #Layout 'Debug' - +#Layout 'TestIcons' diff --git a/lcd4linux_i2c.h b/lcd4linux_i2c.h index 33505e0..d4f6a83 100644 --- a/lcd4linux_i2c.h +++ b/lcd4linux_i2c.h @@ -1,4 +1,5 @@ -/* $Id: lcd4linux_i2c.h,v 1.4 2006/02/25 13:36:33 geronet Exp $ +/* $Id: lcd4linux_i2c.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/lcd4linux_i2c.h $ * * user space i2c sturctures and defines, taken from the official kernel i2c * includes to solve the problem when compiling user space application @@ -30,25 +31,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: lcd4linux_i2c.h,v $ - * Revision 1.4 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.3 2005/07/06 04:40:18 reinelt - * GCC-4 fixes - * - * Revision 1.2 2005/06/01 12:09:13 reinelt - * removed ^M from lcd4linux_i2c.h; indent.sh run - * - * Revision 1.1 2005/05/31 20:42:55 lfcorreia - * new file: lcd4linux_i2c.h - * avoid the problems detecting the proper I2C kernel include files - * - * rearrange all the other autoconf stuff to remove I2C detection - * - * new method by Paul Kamphuis to write to the I2C device - * */ #ifndef _LCD4LINUX_I2C_H diff --git a/mkinstalldirs b/mkinstalldirs index 259dbfc..c7dde14 100755 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -1,158 +1,41 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy - -scriptversion=2005-06-29.22 - -# Original author: Noah Friedman <friedman@prep.ai.mit.edu> +# Author: Noah Friedman <friedman@prep.ai.mit.edu> # Created: 1993-05-16 -# Public domain. -# -# This file is maintained in Automake, please report -# bugs to <bug-automake@gnu.org> or send patches to -# <automake-patches@gnu.org>. - -errstatus=0 -dirmode= - -usage="\ -Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... - -Create each directory DIR (with mode MODE, if specified), including all -leading file name components. - -Report bugs to <bug-automake@gnu.org>." - -# process command line arguments -while test $# -gt 0 ; do - case $1 in - -h | --help | --h*) # -h for help - echo "$usage" - exit $? - ;; - -m) # -m PERM arg - shift - test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } - dirmode=$1 - shift - ;; - --version) - echo "$0 $scriptversion" - exit $? - ;; - --) # stop option processing - shift - break - ;; - -*) # unknown option - echo "$usage" 1>&2 - exit 1 - ;; - *) # first non-opt arg - break - ;; - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done +# Public domain -case $# in - 0) exit 0 ;; -esac +# $Id: mkinstalldirs 731 2007-01-14 13:51:41Z michael $ +# $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/mkinstalldirs $ -# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and -# mkdir -p a/c at the same time, both will detect that a is missing, -# one will create a, then the other will try to create a and die with -# a "File exists" error. This is a problem when calling mkinstalldirs -# from a parallel make. We use --version in the probe to restrict -# ourselves to GNU mkdir, which is thread-safe. -case $dirmode in - '') - if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - echo "mkdir -p -- $*" - exec mkdir -p -- "$@" - else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - test -d ./-p && rmdir ./-p - test -d ./--version && rmdir ./--version - fi - ;; - *) - if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && - test ! -d ./--version; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - else - # Clean up after NextStep and OpenStep mkdir. - for d in ./-m ./-p ./--version "./$dirmode"; - do - test -d $d && rmdir $d - done - fi - ;; -esac +errstatus=0 for file do - case $file in - /*) pathcomp=/ ;; - *) pathcomp= ;; - esac - oIFS=$IFS - IFS=/ - set fnord $file - shift - IFS=$oIFS - - for d - do - test "x$d" = x && continue - - pathcomp=$pathcomp$d - case $pathcomp in - -*) pathcomp=./$pathcomp ;; - esac + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac - mkdir "$pathcomp" || lasterr=$? + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - lasterr= - chmod "$dirmode" "$pathcomp" || lasterr=$? + mkdir "$pathcomp" || lasterr=$? - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi - pathcomp=$pathcomp/ - done + pathcomp="$pathcomp/" + done done exit $errstatus -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: +# mkinstalldirs ends here diff --git a/nph-png b/nph-png deleted file mode 100755 index 0240b64..0000000 --- a/nph-png +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/perl - -use strict; -use vars qw ($file $DELAY); -########## CONFIG - $file = "lcd4linux"; # .png is appended - $DELAY = 0; # delay in seconds - # if delay is zero, file is sent when modified. -################# - -use CGI qw/:push -nph/; -$| = 1; -my ($mtime, $nmtime, $size, $nsize); -(undef, undef, undef, undef, undef, undef, undef, $size, undef, - $mtime) = stat "$file.png"; -print multipart_init(-boundary=>'----------------here we go!'); -while (1) { - print multipart_start(-type=>'image/png'); - undef $/; - open(IN, "$file.png") or die("Can't read '$file.png'"); - $_ = <IN>; - print $_; - close(IN); - print multipart_end; - if ($DELAY) { - sleep $DELAY; - } - else { - W: while (1) { - # sleep(1); - (undef, undef, undef, undef, undef, undef, undef, $nsize, undef, - $nmtime) = stat "$file.png"; - if($mtime != $nmtime || $size != $nsize) { - $mtime = $nmtime; - $size = $nsize; - last W; - } - } - } -} - @@ -1,4 +1,5 @@ -/* $Id: pid.c,v 1.10 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: pid.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/pid.c $ * * PID file handling * @@ -20,47 +21,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: pid.c,v $ - * Revision 1.10 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.9 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.8 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.7 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.6 2004/03/19 06:37:47 reinelt - * asynchronous thread handling started - * - * Revision 1.5 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.4 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.3 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.2 2003/10/05 17:58:50 reinelt - * libtool junk; copyright messages cleaned up - * - * Revision 1.1 2003/08/08 08:05:23 reinelt - * added PID file handling - * */ /* @@ -1,4 +1,5 @@ -/* $Id: pid.h,v 1.4 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: pid.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/pid.h $ * * PID file handling * @@ -21,20 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: pid.h,v $ - * Revision 1.4 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.3 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.2 2003/10/05 17:58:50 reinelt - * libtool junk; copyright messages cleaned up - * - * Revision 1.1 2003/08/08 08:05:23 reinelt - * added PID file handling - * */ #ifndef _PID_H_ @@ -1,4 +1,5 @@ -/* $Id: plugin.c,v 1.45 2006/08/13 18:14:03 harbaum Exp $ +/* $Id: plugin.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin.c $ * * plugin handler for the Evaluator * @@ -21,186 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin.c,v $ - * Revision 1.45 2006/08/13 18:14:03 harbaum - * Added KVV plugin - * - * Revision 1.44 2006/07/31 03:48:09 reinelt - * preparations for scrolling - * - * Revision 1.43 2006/07/30 11:29:02 lfcorreia - * Make changes suggested by Michael, only one init function is needed - * - * Revision 1.42 2006/07/29 21:12:31 lfcorreia - * Add UPPERCASE string plugin function - * - * Revision 1.41 2006/04/15 05:22:52 reinelt - * mpd plugin from Stefan Kuhne - * - * Revision 1.40 2006/02/19 15:42:19 reinelt - * file plugin from Chris Maj - * - * Revision 1.39 2005/11/04 04:53:10 reinelt - * sample plugin activated - * - * Revision 1.38 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.37 2005/05/02 10:29:20 reinelt - * preparations for python bindings and python plugin - * - * Revision 1.36 2005/04/03 07:07:51 reinelt - * added statfs plugin - * - * Revision 1.35 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.34 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.33 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.32 2004/06/07 06:56:55 reinelt - * - * added test plugin from Andy Baxter - * - * Revision 1.31 2004/05/29 00:27:23 reinelt - * - * added plugin_diskstats.c - * - * Revision 1.30 2004/05/22 18:30:02 reinelt - * - * added plugin 'uptime' - * - * Revision 1.29 2004/05/20 07:47:51 reinelt - * added plugin_time - * - * Revision 1.28 2004/04/12 11:12:26 reinelt - * added plugin_isdn, removed old ISDN client - * fixed some real bad bugs in the evaluator - * - * Revision 1.27 2004/04/09 06:09:55 reinelt - * big configure rework from Xavier - * - * Revision 1.25 2004/04/07 08:29:05 hejl - * New plugin for wireless info - * - * Revision 1.24 2004/03/19 06:37:47 reinelt - * asynchronous thread handling started - * - * Revision 1.23 2004/03/14 07:11:42 reinelt - * parameter count fixed for plugin_dvb() - * plugin_APM (battery status) ported - * - * Revision 1.22 2004/03/13 06:49:20 reinelt - * seti@home plugin ported to NextGeneration - * - * Revision 1.21 2004/03/10 07:16:15 reinelt - * MySQL plugin from Javier added - * - * Revision 1.20 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.19 2004/02/18 14:45:42 nicowallmeier - * Imon/Telmon plugin ported - * - * Revision 1.18 2004/02/10 07:42:35 reinelt - * cut off all old-style files which are no longer used with NextGeneration - * - * Revision 1.17 2004/02/10 06:54:39 reinelt - * DVB plugin ported - * - * Revision 1.16 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.15 2004/01/27 08:13:39 reinelt - * ported PPP token to plugin_ppp - * - * Revision 1.14 2004/01/25 05:30:09 reinelt - * plugin_netdev for parsing /proc/net/dev added - * - * Revision 1.13 2004/01/16 05:04:53 reinelt - * started plugin proc_stat which should parse /proc/stat - * which again is a paint in the a** - * thinking over implementation methods of delta functions - * (CPU load, ...) - * - * Revision 1.12 2004/01/15 04:29:45 reinelt - * moved lcd4linux.conf.sample to *.old - * lcd4linux.conf.sample with new layout - * new plugins 'loadavg' and 'meminfo' - * text widget have pre- and postfix - * - * Revision 1.11 2004/01/14 11:33:00 reinelt - * new plugin 'uname' which does what it's called - * text widget nearly finished - * first results displayed on MatrixOrbital - * - * Revision 1.10 2004/01/13 10:03:01 reinelt - * new util 'hash' for associative arrays - * new plugin 'cpuinfo' - * - * Revision 1.9 2004/01/11 18:26:02 reinelt - * further widget and layout processing - * - * Revision 1.8 2004/01/10 20:22:33 reinelt - * added new function 'cfg_list()' (not finished yet) - * added layout.c (will replace processor.c someday) - * added widget_text.c (will be the first and most important widget) - * modified lcd4linux.c so that old-style configs should work, too - * - * Revision 1.7 2004/01/10 17:45:26 reinelt - * changed initialization order so cfg() gets initialized before plugins. - * This way a plugin's init() can use cfg_get(). - * Thanks to Xavier for reporting this one! - * - * Revision 1.6 2004/01/10 17:36:56 reinelt - * - * I2C Sensors plugin from Xavier added - * - * Revision 1.5 2004/01/06 17:33:45 reinelt - * - * Evaluator: functions with variable argument lists - * Evaluator: plugin_sample.c and README.Plugins added - * - * Revision 1.4 2004/01/06 15:19:16 reinelt - * Evaluator rearrangements... - * - * Revision 1.3 2003/12/19 06:27:33 reinelt - * added XMMS plugin from Markus Keil - * - * Revision 1.2 2003/12/19 05:49:23 reinelt - * extracted plugin_math and plugin_string into extra files - * - * Revision 1.1 2003/12/19 05:35:14 reinelt - * renamed 'client' to 'plugin' - * - * Revision 1.1 2003/10/11 06:01:52 reinelt - * - * renamed expression.{c,h} to client.{c,h} - * added config file client - * new functions 'AddNumericVariable()' and 'AddStringVariable()' - * new parameter '-i' for interactive mode - * - * Revision 1.3 2003/10/06 05:51:15 reinelt - * functions: min(), max() - * - * Revision 1.2 2003/10/06 05:47:27 reinelt - * operators: ==, \!=, <=, >= - * - * Revision 1.1 2003/10/06 04:34:06 reinelt - * expression evaluator added - * */ /* @@ -251,6 +72,8 @@ int plugin_init_i2c_sensors(void); void plugin_exit_i2c_sensors(void); int plugin_init_imon(void); void plugin_exit_imon(void); +int plugin_init_iconv(void); +void plugin_exit_iconv(void); int plugin_init_isdn(void); void plugin_exit_isdn(void); int plugin_init_kvv(void); @@ -318,6 +141,9 @@ int plugin_init(void) #ifdef PLUGIN_I2C_SENSORS plugin_init_i2c_sensors(); #endif +#ifdef PLUGIN_ICONV + plugin_init_iconv(); +#endif #ifdef PLUGIN_IMON plugin_init_imon(); #endif @@ -404,6 +230,9 @@ void plugin_exit(void) #ifdef PLUGIN_I2C_SENSORS plugin_exit_i2c_sensors(); #endif +#ifdef PLUGIN_ICONV + plugin_exit_iconv(); +#endif #ifdef PLUGIN_IMON plugin_exit_imon(); #endif @@ -1,4 +1,5 @@ -/* $Id: plugin.h,v 1.4 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin.h $ * * plugin handler for the Evaluator * @@ -21,34 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin.h,v $ - * Revision 1.4 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.3 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.2 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.1 2003/12/19 05:35:14 reinelt - * renamed 'client' to 'plugin' - * - * Revision 1.1 2003/10/11 06:01:52 reinelt - * - * renamed expression.{c,h} to client.{c,h} - * added config file client - * new functions 'AddNumericVariable()' and 'AddStringVariable()' - * new parameter '-i' for interactive mode - * - * Revision 1.1 2003/10/06 04:34:06 reinelt - * expression evaluator added - * */ diff --git a/plugin_apm.c b/plugin_apm.c index 5dffa06..e7fcd83 100644 --- a/plugin_apm.c +++ b/plugin_apm.c @@ -1,4 +1,5 @@ -/* $Id: plugin_apm.c,v 1.6 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin_apm.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_apm.c $ * * plugin for APM (battery status) * @@ -24,32 +25,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_apm.c,v $ - * Revision 1.6 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.5 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.4 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.3 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.2 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.1 2004/03/14 07:11:42 reinelt - * parameter count fixed for plugin_dvb() - * plugin_APM (battery status) ported - * */ /* diff --git a/plugin_cfg.c b/plugin_cfg.c index 323c04d..a5b7665 100644 --- a/plugin_cfg.c +++ b/plugin_cfg.c @@ -1,4 +1,5 @@ -/* $Id: plugin_cfg.c,v 1.14 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin_cfg.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_cfg.c $ * * plugin for config file access * @@ -21,71 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_cfg.c,v $ - * Revision 1.14 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.13 2005/03/30 04:57:50 reinelt - * Evaluator speedup: use bsearch for finding functions and variables - * - * Revision 1.12 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.11 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.10 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.9 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.8 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.7 2004/03/06 20:31:16 reinelt - * Complete rewrite of the evaluator to get rid of the code - * from mark Morley (because of license issues). - * The new Evaluator does a pre-compile of expressions, and - * stores them in trees. Therefore it should be reasonable faster... - * - * Revision 1.6 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.5 2004/02/01 19:37:40 reinelt - * got rid of every strtok() incarnation. - * - * 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 - * - * Revision 1.2 2004/01/14 11:33:00 reinelt - * new plugin 'uname' which does what it's called - * text widget nearly finished - * first results displayed on MatrixOrbital - * - * Revision 1.1 2004/01/13 10:03:01 reinelt - * new util 'hash' for associative arrays - * new plugin 'cpuinfo' - * */ /* diff --git a/plugin_cpuinfo.c b/plugin_cpuinfo.c index e091383..b3c7cda 100644 --- a/plugin_cpuinfo.c +++ b/plugin_cpuinfo.c @@ -1,4 +1,5 @@ -/* $Id: plugin_cpuinfo.c,v 1.14 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin_cpuinfo.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_cpuinfo.c $ * * plugin for /proc/cpuinfo parsing * @@ -21,72 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_cpuinfo.c,v $ - * Revision 1.14 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.13 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.12 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.11 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.10 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.9 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.8 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.7 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.6 2004/01/21 10:48:17 reinelt - * hash_age function added - * - * Revision 1.5 2004/01/16 11:12:26 reinelt - * some bugs in plugin_xmms fixed, parsing moved to own function - * plugin_proc_stat nearly finished - * - * Revision 1.4 2004/01/16 07:26:25 reinelt - * moved various /proc parsing to own functions - * made some progress with /proc/stat parsing - * - * Revision 1.3 2004/01/15 04:29:45 reinelt - * moved lcd4linux.conf.sample to *.old - * lcd4linux.conf.sample with new layout - * new plugins 'loadavg' and 'meminfo' - * text widget have pre- and postfix - * - * Revision 1.2 2004/01/14 11:33:00 reinelt - * new plugin 'uname' which does what it's called - * text widget nearly finished - * first results displayed on MatrixOrbital - * - * Revision 1.1 2004/01/13 10:03:01 reinelt - * new util 'hash' for associative arrays - * new plugin 'cpuinfo' - * */ /* diff --git a/plugin_diskstats.c b/plugin_diskstats.c index fae74f1..e8d04aa 100644 --- a/plugin_diskstats.c +++ b/plugin_diskstats.c @@ -1,4 +1,5 @@ -/* $Id: plugin_diskstats.c,v 1.8 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin_diskstats.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_diskstats.c $ * * plugin for /proc/diskstats parsing * @@ -21,39 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_diskstats.c,v $ - * Revision 1.8 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.7 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.6 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.5 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.4 2004/06/17 10:58:58 reinelt - * - * changed plugin_netdev to use the new fast hash model - * - * Revision 1.3 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.2 2004/05/29 01:07:56 reinelt - * bug in plugin_diskstats fixed - * - * Revision 1.1 2004/05/29 00:27:23 reinelt - * - * added plugin_diskstats.c - * */ /* diff --git a/plugin_dvb.c b/plugin_dvb.c index 5042df3..3482397 100644 --- a/plugin_dvb.c +++ b/plugin_dvb.c @@ -1,4 +1,5 @@ -/* $Id: plugin_dvb.c,v 1.9 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin_dvb.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_dvb.c $ * * plugin for DVB status * @@ -21,45 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_dvb.c,v $ - * Revision 1.9 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.8 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.7 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.6 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.5 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.4 2004/03/14 07:11:42 reinelt - * parameter count fixed for plugin_dvb() - * plugin_APM (battery status) ported - * - * Revision 1.3 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.2 2004/02/16 13:03:37 reinelt - * compile problem with missing frontend.h fixed - * - * Revision 1.1 2004/02/10 06:54:39 reinelt - * DVB plugin ported - * */ /* diff --git a/plugin_exec.c b/plugin_exec.c index cf25d93..70700ed 100644 --- a/plugin_exec.c +++ b/plugin_exec.c @@ -1,4 +1,5 @@ -/* $Id: plugin_exec.c,v 1.12 2006/07/12 21:01:41 reinelt Exp $ +/* $Id: plugin_exec.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_exec.c $ * * plugin for external processes * @@ -25,52 +26,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_exec.c,v $ - * Revision 1.12 2006/07/12 21:01:41 reinelt - * thread_destroy, minor cleanups - * - * Revision 1.11 2006/07/12 20:47:51 reinelt - * indent - * - * Revision 1.10 2006/07/12 20:45:30 reinelt - * G15 and thread patch by Anton - * - * Revision 1.9 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.8 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.7 2004/09/24 21:41:00 reinelt - * new driver for the BWCT USB LCD interface board. - * - * Revision 1.6 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.5 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.4 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.3 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.2 2004/04/08 10:48:25 reinelt - * finished plugin_exec - * modified thread handling - * added '%x' format to qprintf (hexadecimal) - * - * Revision 1.1 2004/03/20 11:49:40 reinelt - * forgot to add plugin_exec.c ... - * */ /* diff --git a/plugin_file.c b/plugin_file.c index 368eec9..ed9faa8 100644 --- a/plugin_file.c +++ b/plugin_file.c @@ -1,4 +1,5 @@ -/* $Id: plugin_file.c,v 1.2 2006/07/19 01:57:01 cmay Exp $ +/* $Id: plugin_file.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_file.c $ * * plugin to perform simple file operations * @@ -21,14 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_file.c,v $ - * Revision 1.2 2006/07/19 01:57:01 cmay - * fixed double read of last line in file - * - * Revision 1.1 2006/02/19 15:42:19 reinelt - * file plugin from Chris Maj - * */ /* @@ -70,6 +63,7 @@ static void my_readline(RESULT * result, RESULT * arg1, RESULT * arg2) fp = fopen(R2S(arg1), "r"); if (!fp) { error("readline couldn't open file '%s'", R2S(arg1)); + value[0] = '\0'; } else { i = 0; while (!feof(fp) && i++ < reqline) { diff --git a/plugin_i2c_sensors.c b/plugin_i2c_sensors.c index b3bbc2f..cba3827 100644 --- a/plugin_i2c_sensors.c +++ b/plugin_i2c_sensors.c @@ -1,4 +1,5 @@ -/* $Id: plugin_i2c_sensors.c,v 1.25 2006/02/25 13:36:33 geronet Exp $ +/* $Id: plugin_i2c_sensors.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_i2c_sensors.c $ * * I2C sensors plugin * @@ -21,112 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_i2c_sensors.c,v $ - * Revision 1.25 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.24 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.23 2005/04/01 05:16:04 reinelt - * moved plugin init stuff to a seperate function called on first use - * - * Revision 1.22 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.21 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.20 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.19 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.18 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.17 2004/06/05 14:56:48 reinelt - * - * Cwlinux splash screen fixed - * USBLCD splash screen fixed - * plugin_i2c qprintf("%f") replaced with snprintf() - * - * Revision 1.16 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.15 2004/05/31 21:05:13 reinelt - * - * fixed lots of bugs in the Cwlinux driver - * do not emit EAGAIN error on the first retry - * made plugin_i2c_sensors a bit less 'chatty' - * moved init and exit functions to the bottom of plugin_pop3 - * - * Revision 1.14 2004/05/09 05:41:42 reinelt - * - * i2c fix for kernel 2.6.5 (temp_input1 vs. temp1_input) from Xavier - * - * Revision 1.13 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.12 2004/02/16 08:19:44 reinelt - * i2c_sensors patch from Xavier - * - * Revision 1.11 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * - * Revision 1.10 2004/02/14 12:07:27 nicowallmeier - * minor bugfix - * - * Revision 1.9 2004/02/14 11:56:17 reinelt - * M50530 driver ported - * changed lots of 'char' to 'unsigned char' - * - * Revision 1.8 2004/02/14 10:09:50 reinelt - * I2C Sensors for 2.4 kernels (/proc instead of /sysfs) - * - * 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 - * round() uClibc replacement from Martin Hejl - * warning in i2c_sensors fixed - * - * Revision 1.5 2004/01/29 05:55:30 reinelt - * check for /sys mounted - * - * Revision 1.4 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.3 2004/01/27 08:13:39 reinelt - * ported PPP token to plugin_ppp - * - * Revision 1.2 2004/01/27 05:06:10 reinelt - * i2c update from Xavier - * - * Revision 1.1 2004/01/10 17:36:56 reinelt - * - * I2C Sensors plugin from Xavier added - * */ /* @@ -414,7 +309,7 @@ static int configure_i2c_sensors(void) } else if (strncmp(path, "/proc", 5) == 0) { parse_i2c_sensors = parse_i2c_sensors_procfs; } else { - error("i2c_sensors: unknown path %s, should start with /sys or /proc"); + error("i2c_sensors: unknown path %s, should start with /sys or /proc", path); configured = -1; return configured; } diff --git a/plugin_iconv.c b/plugin_iconv.c new file mode 100644 index 0000000..3b0e134 --- /dev/null +++ b/plugin_iconv.c @@ -0,0 +1,142 @@ +/* $Id: plugin_iconv.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_iconv.c $ + * + * iconv charset conversion plugin + * + * Copyright (C) 2006 Ernst Bachmann <e.bachmann@xebec.de> + * Copyright (C) 2006 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. + * + */ + +/* + * exported functions: + * + * int plugin_init_iconv (void) + * int plugin_exit_iconv (void) + * + */ + + +#include "config.h" + +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <iconv.h> +#include <errno.h> + +/* these should always be included */ +#include "debug.h" +#include "plugin.h" + +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif + + + +/* iconv function, convert charsets */ +/* valid "to" and "from" charsets can be listed by running "iconv --list" from a shell */ +/* utf16 & utf32 encodings won't work, as they contain null bytes, confusing strlen */ +static void my_iconv(RESULT * result, RESULT * charset_from, RESULT * charset_to, RESULT * arg) +{ + char *source; + size_t source_left; + char *dest; + char *dest_pos; + size_t dest_left; + iconv_t cd; + + source = R2S(arg); + source_left = strlen(source); + + /* use twice the memory needed in best case, but save lots of reallocs in worst case */ + /* increase to 4 if most conversions are to utf32 (quite unlikely) */ + /* also alloc a "safety byte" so we can always zero-terminate the string. */ + + dest_left = 2 * source_left; + dest = malloc(dest_left + 1); + dest_pos = dest; + + cd = iconv_open(R2S(charset_to), R2S(charset_from)); + if (cd != (iconv_t) (-1)) { + + do { + + /* quite spammy: debug("plugin_iconv: calling iconv with %ld,[%s]/%ld,%ld", cd, source, source_left, dest_left); */ + if (iconv(cd, &source, &source_left, &dest_pos, &dest_left) == (size_t) (-1)) { + switch (errno) { + case EILSEQ: + /* illegal bytes in input sequence */ + /* try to fix by skipping a byte */ + info("plugin_iconv: illegal character in input string: %c", *source); + source_left--; + source++; + break; + case EINVAL: + /* input string ends during a multibyte sequence */ + /* try to fix by simply ignoring */ + info("plugin_iconv: illegal character at end of input"); + source_left = 0; + break; + case E2BIG: + /* not enough bytes in outbuf. */ + /* TODO: Realloc output buffer, probably doubling its size? */ + /* for now, just bail out. For lcd4linux 99% of all conversions will go to ascii or latin1 anyways */ + error + ("plugin_iconv: out of memory in destination buffer. Seems like Ernst was too lazy, complain to him!"); + source_left = 0; + break; + default: + error("plugin_iconv: strange errno state (%d) occured", errno); + source_left = 0; + } + } + } while (source_left > 0); /* don't check for == 0, could be negative in EILSEQ case */ + + /* terminate the string, we're sure to have that byte left, see above */ + *dest_pos = 0; + dest_pos++; + + iconv_close(cd); + } else { + error("plugin_iconv: could not open conversion descriptor. Check if your charsets are supported!"); + /* guaranteed to fit. */ + strcpy(dest, source); + } + + SetResult(&result, R_STRING, dest); + + free(dest); +} + + +/* plugin initialization */ +int plugin_init_iconv(void) +{ + + AddFunction("iconv", 3, my_iconv); + + return 0; +} + +void plugin_exit_iconv(void) +{ + /* nothing to clean */ +} diff --git a/plugin_imon.c b/plugin_imon.c index 6ed4068..3be7526 100755..100644 --- a/plugin_imon.c +++ b/plugin_imon.c @@ -1,4 +1,5 @@ -/* $Id: plugin_imon.c,v 1.17 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin_imon.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_imon.c $ * * imond/telmond data processing * @@ -20,69 +21,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_imon.c,v $ - * Revision 1.17 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.16 2005/04/04 20:11:14 nicowallmeier - * to be compatible with gcc 2.95 - * - * Revision 1.15 2005/04/01 05:16:04 reinelt - * moved plugin init stuff to a seperate function called on first use - * - * Revision 1.14 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.13 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.12 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.11 2004/06/24 20:18:08 nicowallmeier - * minor bugfix - * - * Revision 1.10 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.9 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.8 2004/05/27 06:29:29 nicowallmeier - * Moved variables to Plugin:imon / Plugin:telmon - * - * Revision 1.7 2004/05/27 03:39:47 reinelt - * - * changed function naming scheme to plugin::function - * - * Revision 1.6 2004/03/13 14:58:15 nicowallmeier - * Added clean termination of imond-connection (now correctly) - * - * Revision 1.4 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.3 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.2 2004/02/22 17:35:41 reinelt - * some fixes for generic graphic driver and T6963 - * removed ^M from plugin_imon (Nico, are you editing under Windows?) - * - * Revision 1.1 2004/02/18 14:45:43 nicowallmeier - * Imon/Telmon plugin ported - * */ #include "config.h" diff --git a/plugin_isdn.c b/plugin_isdn.c index 7f28a5b..4acb6a7 100644 --- a/plugin_isdn.c +++ b/plugin_isdn.c @@ -1,4 +1,5 @@ -/* $Id: plugin_isdn.c,v 1.7 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin_isdn.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_isdn.c $ * * plugin for ISDN subsystem * @@ -24,36 +25,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_isdn.c,v $ - * Revision 1.7 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.6 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.5 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.4 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.3 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.2 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.1 2004/05/19 05:23:25 reinelt - * - * plugin_isdn.c added (sorry, I forgot...) - * */ /* diff --git a/plugin_kvv.c b/plugin_kvv.c index bb3b840..a5f0560 100644 --- a/plugin_kvv.c +++ b/plugin_kvv.c @@ -1,4 +1,5 @@ -/* $Id: plugin_kvv.c,v 1.7 2006/08/23 17:45:37 harbaum Exp $ +/* $Id: plugin_kvv.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_kvv.c $ * * plugin kvv (karlsruher verkehrsverbund) * @@ -21,30 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_kvv.c,v $ - * Revision 1.7 2006/08/23 17:45:37 harbaum - * Umlaut translation bugfix - * - * Revision 1.6 2006/08/17 19:11:41 harbaum - * Small plugin_kvv bugfixes and new abbreviate option - * - * Revision 1.5 2006/08/16 14:18:14 reinelt - * T6963 enhancements: soft timing, DualScan, Cell size - * - * Revision 1.4 2006/08/15 17:28:27 harbaum - * Cleaned up thread and error handling - * - * Revision 1.3 2006/08/14 19:24:22 harbaum - * Umlaut support, added KVV HTTP-User-Agent - * - * Revision 1.2 2006/08/13 18:45:25 harbaum - * Little cleanup ... - * - * Revision 1.1 2006/08/13 18:14:03 harbaum - * Added KVV plugin - * - * */ /* diff --git a/plugin_loadavg.c b/plugin_loadavg.c index bdb3091..cfb5a66 100644 --- a/plugin_loadavg.c +++ b/plugin_loadavg.c @@ -1,4 +1,5 @@ -/* $Id: plugin_loadavg.c,v 1.10 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin_loadavg.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_loadavg.c $ * * plugin for load average * @@ -21,58 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_loadavg.c,v $ - * Revision 1.10 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.9 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.8 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.7 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.6 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.5 2004/03/08 18:46:21 hejl - * Fixed bug introduced with "caching" the loadavg values - * - * Revision 1.4 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.3 2004/01/30 07:12:35 reinelt - * HD44780 busy-flag support from Martin Hejl - * loadavg() uClibc replacement from Martin Heyl - * round() uClibc replacement from Martin Hejl - * warning in i2c_sensors fixed - * [ - * - * Revision 1.2 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.1 2004/01/15 04:29:45 reinelt - * moved lcd4linux.conf.sample to *.old - * lcd4linux.conf.sample with new layout - * new plugins 'loadavg' and 'meminfo' - * text widget have pre- and postfix - * */ /* diff --git a/plugin_math.c b/plugin_math.c index a2b53f9..413ee4e 100644 --- a/plugin_math.c +++ b/plugin_math.c @@ -1,4 +1,5 @@ -/* $Id: plugin_math.c,v 1.9 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin_math.c 755 2007-01-21 06:40:23Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_math.c $ * * math plugin * @@ -21,46 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_math.c,v $ - * Revision 1.9 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.8 2005/04/05 04:46:06 reinelt - * ceil/floor patch from Maxime - * - * Revision 1.7 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.6 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.5 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.4 2004/03/06 20:31:16 reinelt - * Complete rewrite of the evaluator to get rid of the code - * from mark Morley (because of license issues). - * The new Evaluator does a pre-compile of expressions, and - * stores them in trees. Therefore it should be reasonable faster... - * - * Revision 1.3 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.2 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.1 2003/12/19 05:50:34 reinelt - * added plugin_math.c and plugin_string.c - * */ /* @@ -153,6 +114,26 @@ static void my_ceil(RESULT * result, RESULT * arg) SetResult(&result, R_NUMBER, &value); } +static void my_decode(RESULT * result, int argc, RESULT * argv[]) +{ + int index; + + if (argc < 2) { + error("decode(): wrong number of parameters"); + SetResult(&result, R_STRING, ""); + return; + } + + index = R2N(argv[0]); + + if (index < 0 || index >= argc - 1) { + SetResult(&result, R_STRING, ""); + return; + } + + CopyResult(&result, argv[index + 1]); +} + int plugin_init_math(void) { @@ -177,6 +158,9 @@ int plugin_init_math(void) AddFunction("floor", 1, my_floor); AddFunction("ceil", 1, my_ceil); + /* decode */ + AddFunction("decode", -1, my_decode); + return 0; } diff --git a/plugin_meminfo.c b/plugin_meminfo.c index 83c6383..e006918 100644 --- a/plugin_meminfo.c +++ b/plugin_meminfo.c @@ -1,4 +1,5 @@ -/* $Id: plugin_meminfo.c,v 1.12 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin_meminfo.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_meminfo.c $ * * plugin for /proc/meminfo parsing * @@ -21,62 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_meminfo.c,v $ - * Revision 1.12 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.11 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.10 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.9 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.8 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.7 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.6 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.5 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.4 2004/01/25 05:30:09 reinelt - * plugin_netdev for parsing /proc/net/dev added - * - * Revision 1.3 2004/01/21 10:48:17 reinelt - * hash_age function added - * - * Revision 1.2 2004/01/16 07:26:25 reinelt - * moved various /proc parsing to own functions - * made some progress with /proc/stat parsing - * - * Revision 1.1 2004/01/15 04:29:45 reinelt - * moved lcd4linux.conf.sample to *.old - * lcd4linux.conf.sample with new layout - * new plugins 'loadavg' and 'meminfo' - * text widget have pre- and postfix - * */ /* diff --git a/plugin_mpd.c b/plugin_mpd.c index 1316687..b4d96ed 100644 --- a/plugin_mpd.c +++ b/plugin_mpd.c @@ -1,4 +1,5 @@ -/* $Id: plugin_mpd.c,v 1.1 2006/04/15 05:22:52 reinelt Exp $ +/* $Id: plugin_mpd.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_mpd.c $ * * mpd informations * @@ -21,11 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_mpd.c,v $ - * Revision 1.1 2006/04/15 05:22:52 reinelt - * mpd plugin from Stefan Kuhne - * */ /* diff --git a/plugin_mysql.c b/plugin_mysql.c index f616a39..7e78418 100644 --- a/plugin_mysql.c +++ b/plugin_mysql.c @@ -1,4 +1,5 @@ -/* $Id: plugin_mysql.c,v 1.11 2006/02/25 13:36:33 geronet Exp $ +/* $Id: plugin_mysql.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_mysql.c $ * * plugin for execute SQL queries into a MySQL DBSM. * @@ -21,41 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_mysql.c,v $ - * Revision 1.11 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.10 2006/01/20 15:58:05 reinelt - * MySQL::count() added again - * - * Revision 1.9 2006/01/20 15:43:25 reinelt - * MySQL::query() returns a value, not the number of rows - * - * Revision 1.8 2006/01/16 15:39:58 reinelt - * MySQL::queryvalue() extension from Harald Klemm - * - * Revision 1.7 2005/06/06 09:24:07 reinelt - * two bugs in plugin_mysql.c fixed - * - * Revision 1.6 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.5 2005/04/01 05:16:04 reinelt - * moved plugin init stuff to a seperate function called on first use - * - * Revision 1.4 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.3 2004/03/21 22:05:53 reinelt - * MySQL plugin fixes from Javi - * - * Revision 1.2 2004/03/20 23:09:01 reinelt - * MySQL plugin fixes from Javi - * - * Revision 1.1 2004/03/10 07:16:15 reinelt - * MySQL plugin from Javier added - * */ /* DOC: diff --git a/plugin_netdev.c b/plugin_netdev.c index 6d5d430..7773818 100644 --- a/plugin_netdev.c +++ b/plugin_netdev.c @@ -1,4 +1,5 @@ -/* $Id: plugin_netdev.c,v 1.14 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin_netdev.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_netdev.c $ * * plugin for /proc/net/dev parsing * @@ -21,67 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_netdev.c,v $ - * Revision 1.14 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.13 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.12 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.11 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.10 2004/06/17 10:58:58 reinelt - * - * changed plugin_netdev to use the new fast hash model - * - * Revision 1.9 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.8 2004/05/27 03:39:47 reinelt - * - * changed function naming scheme to plugin::function - * - * Revision 1.7 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.6 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.5 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.4 2004/02/15 07:23:04 reinelt - * bug in netdev parsing fixed - * - * Revision 1.3 2004/02/01 19:37:40 reinelt - * got rid of every strtok() incarnation. - * - * Revision 1.2 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.1 2004/01/25 05:30:09 reinelt - * plugin_netdev for parsing /proc/net/dev added - * */ /* diff --git a/plugin_pop3.c b/plugin_pop3.c index 9461a5a..973016c 100644 --- a/plugin_pop3.c +++ b/plugin_pop3.c @@ -1,4 +1,5 @@ -/* $Id: plugin_pop3.c,v 1.10 2006/02/25 13:36:33 geronet Exp $ +/* $Id: plugin_pop3.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_pop3.c $ * * Plugin to check POP3 mail accounts * @@ -25,46 +26,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_pop3.c,v $ - * Revision 1.10 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.9 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.8 2005/04/01 05:16:04 reinelt - * moved plugin init stuff to a seperate function called on first use - * - * Revision 1.7 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.6 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.5 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.4 2004/05/31 21:05:13 reinelt - * - * fixed lots of bugs in the Cwlinux driver - * do not emit EAGAIN error on the first retry - * made plugin_i2c_sensors a bit less 'chatty' - * moved init and exit functions to the bottom of plugin_pop3 - * - * Revision 1.3 2004/05/20 07:14:46 reinelt - * made all local functions static - * - * Revision 1.2 2004/04/17 13:03:34 nicowallmeier - * minor bugfix - * - * Revision 1.1 2004/04/08 11:59:26 reinelt - * added plugin_pop3 from Javi - * */ diff --git a/plugin_ppp.c b/plugin_ppp.c index 70f9963..46ff5c1 100644 --- a/plugin_ppp.c +++ b/plugin_ppp.c @@ -1,4 +1,5 @@ -/* $Id: plugin_ppp.c,v 1.10 2005/05/08 04:32:44 reinelt Exp $ +/* $Id: plugin_ppp.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_ppp.c $ * * plugin for ppp throughput * @@ -21,51 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_ppp.c,v $ - * Revision 1.10 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.9 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.8 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.7 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.6 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.5 2004/05/29 15:53:28 reinelt - * - * M50530: reset parport signals on exit - * plugin_ppp: ppp() has two parameters, not three - * lcd4linux.conf.sample: diskstats() corrected - * - * Revision 1.4 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.3 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.2 2004/01/28 06:43:31 reinelt - * plugin_ppp finished. - * - * Revision 1.1 2004/01/27 08:13:39 reinelt - * ported PPP token to plugin_ppp - * */ /* diff --git a/plugin_proc_stat.c b/plugin_proc_stat.c index 55d7d81..0f6fa2a 100644 --- a/plugin_proc_stat.c +++ b/plugin_proc_stat.c @@ -1,4 +1,5 @@ -/* $Id: plugin_proc_stat.c,v 1.26 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: plugin_proc_stat.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_proc_stat.c $ * * plugin for /proc/stat parsing * @@ -21,110 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_proc_stat.c,v $ - * Revision 1.26 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.25 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.24 2005/01/11 10:19:33 reinelt - * changes to lcd4linux.conf.sample - * - * Revision 1.23 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.22 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.21 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.20 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.19 2004/05/27 03:39:47 reinelt - * - * changed function naming scheme to plugin::function - * - * Revision 1.18 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.17 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.16 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.15 2004/02/04 19:10:51 reinelt - * Crystalfontz driver nearly finished - * - * Revision 1.14 2004/02/01 19:37:40 reinelt - * got rid of every strtok() incarnation. - * - * Revision 1.13 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.12 2004/01/27 08:13:39 reinelt - * ported PPP token to plugin_ppp - * - * Revision 1.11 2004/01/25 05:30:09 reinelt - * plugin_netdev for parsing /proc/net/dev added - * - * Revision 1.10 2004/01/22 08:55:30 reinelt - * fixed unhandled kernel-2.6 entries in /prco/stat - * - * Revision 1.9 2004/01/21 14:29:03 reinelt - * new helper 'hash_get_regex' which delivers the sum over regex matched items - * new function 'disk()' which uses this regex matching - * - * Revision 1.8 2004/01/21 11:31:23 reinelt - * two bugs with hash_age() ixed - * - * Revision 1.7 2004/01/21 10:48:17 reinelt - * hash_age function added - * - * Revision 1.6 2004/01/20 12:45:47 reinelt - * "Default screen" working with MatrixOrbital - * - * Revision 1.5 2004/01/18 09:01:45 reinelt - * /proc/stat parsing finished - * - * Revision 1.4 2004/01/18 06:54:08 reinelt - * bug in expr.c fixed (thanks to Xavier) - * some progress with /proc/stat parsing - * - * Revision 1.3 2004/01/16 11:12:26 reinelt - * some bugs in plugin_xmms fixed, parsing moved to own function - * plugin_proc_stat nearly finished - * - * Revision 1.2 2004/01/16 07:26:25 reinelt - * moved various /proc parsing to own functions - * made some progress with /proc/stat parsing - * - * Revision 1.1 2004/01/16 05:04:53 reinelt - * started plugin proc_stat which should parse /proc/stat - * which again is a paint in the a** - * thinking over implementation methods of delta functions - * (CPU load, ...) - * */ /* diff --git a/plugin_python.c b/plugin_python.c index dcd5dab..0a4a1fd 100644 --- a/plugin_python.c +++ b/plugin_python.c @@ -1,4 +1,5 @@ -/* $Id: plugin_python.c,v 1.4 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: plugin_python.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_python.c $ * * Python plugin * @@ -21,27 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_python.c,v $ - * Revision 1.4 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.3 2005/05/04 05:22:12 reinelt - * * replaced fprintf(stderr,... with error() - * * corrected a "dangling reference" memory problem - * * removed some PyErr_Print() spam - * * fixed a segmentation fault that occured when python module was not - * found - * * improved error messages - * - * Revision 1.2 2005/05/03 11:13:24 reinelt - * rearranged autoconf a bit, - * libX11 will be linked only if really needed (i.e. when the X11 driver has been selected) - * plugin_python filled with life - * - * Revision 1.1 2005/05/02 10:29:20 reinelt - * preparations for python bindings and python plugin - * */ /* diff --git a/plugin_sample.c b/plugin_sample.c index c1f9077..7377c9e0 100644 --- a/plugin_sample.c +++ b/plugin_sample.c @@ -1,9 +1,10 @@ -/* $Id: plugin_sample.c,v 1.11 2005/11/04 04:53:10 reinelt Exp $ +/* $Id: plugin_sample.c 733 2007-01-15 05:47:13Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_sample.c $ * * plugin template * * Copyright (C) 2003 Michael Reinelt <reinelt@eunet.at> - * Copyright (C) 2004 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> + * Copyright (C) 2004, 2005, 2006, 2007 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> * * This file is part of LCD4Linux. * @@ -21,54 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_sample.c,v $ - * Revision 1.11 2005/11/04 04:53:10 reinelt - * sample plugin activated - * - * Revision 1.10 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.9 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.8 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.7 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.6 2004/06/01 06:04:25 reinelt - * - * made README.Plugins and plugin_sample up to date. - * - * Revision 1.5 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * 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 - * - * Revision 1.2 2004/01/13 10:03:01 reinelt - * new util 'hash' for associative arrays - * new plugin 'cpuinfo' - * - * Revision 1.1 2004/01/06 17:33:45 reinelt - * - * Evaluator: functions with variable argument lists - * Evaluator: plugin_sample.c and README.Plugins added - * */ /* diff --git a/plugin_seti.c b/plugin_seti.c index c28746b..afb80ee 100644 --- a/plugin_seti.c +++ b/plugin_seti.c @@ -1,4 +1,5 @@ -/* $Id: plugin_seti.c,v 1.7 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: plugin_seti.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_seti.c $ * * plugin for seti@home status reporting * @@ -25,34 +26,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_seti.c,v $ - * Revision 1.7 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.6 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.5 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.4 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.3 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.2 2004/03/13 19:06:01 reinelt - * ChangeLog and Status update; small glitch in plugin_seti fixed. - * - * Revision 1.1 2004/03/13 06:49:20 reinelt - * seti@home plugin ported to NextGeneration - * */ /* diff --git a/plugin_statfs.c b/plugin_statfs.c index d043e71..7c6fa6b 100644 --- a/plugin_statfs.c +++ b/plugin_statfs.c @@ -1,4 +1,5 @@ -/* $Id: plugin_statfs.c,v 1.2 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: plugin_statfs.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_statfs.c $ * * plugin for statfs() syscall * @@ -21,14 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_statfs.c,v $ - * Revision 1.2 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.1 2005/04/03 07:07:51 reinelt - * added statfs plugin - * */ /* diff --git a/plugin_string.c b/plugin_string.c index 1aeb478..0ec0e7e 100644 --- a/plugin_string.c +++ b/plugin_string.c @@ -1,4 +1,5 @@ -/* $Id: plugin_string.c,v 1.11 2006/07/31 03:48:09 reinelt Exp $ +/* $Id: plugin_string.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_string.c $ * * string plugin * @@ -21,49 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_string.c,v $ - * Revision 1.11 2006/07/31 03:48:09 reinelt - * preparations for scrolling - * - * Revision 1.10 2006/07/30 11:29:02 lfcorreia - * Make changes suggested by Michael, only one init function is needed - * - * Revision 1.9 2006/07/29 21:12:31 lfcorreia - * Add UPPERCASE string plugin function - * - * Revision 1.8 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.7 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.6 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.5 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.4 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.3 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.2 2004/01/11 18:26:02 reinelt - * further widget and layout processing - * - * Revision 1.1 2003/12/19 05:50:34 reinelt - * added plugin_math.c and plugin_string.c - * */ /* diff --git a/plugin_test.c b/plugin_test.c index 1c4fb14..f496399 100644 --- a/plugin_test.c +++ b/plugin_test.c @@ -1,4 +1,5 @@ -/* $Id: plugin_test.c,v 1.5 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: plugin_test.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_test.c $ * * Handy functions for testing displays and debugging code. * @@ -24,28 +25,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* -* $Log: plugin_test.c,v $ -* Revision 1.5 2005/05/08 04:32:45 reinelt -* CodingStyle added and applied -* -* Revision 1.4 2005/01/18 06:30:23 reinelt -* added (C) to all copyright statements -* -* Revision 1.3 2004/06/26 12:05:00 reinelt -* -* uh-oh... the last CVS log message messed up things a lot... -* -* Revision 1.2 2004/06/26 09:27:21 reinelt -* -* added '-W' to CFLAGS -* changed all C++ comments to C ones -* cleaned up a lot of signed/unsigned mistakes -* -* Revision 1.1 2004/06/07 06:56:55 reinelt -* -* added test plugin from Andy Baxter -* */ int plugin_init_test(void); diff --git a/plugin_time.c b/plugin_time.c index 0a01158..7a56b3b 100644 --- a/plugin_time.c +++ b/plugin_time.c @@ -1,4 +1,5 @@ -/* $Id: plugin_time.c,v 1.5 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: plugin_time.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_time.c $ * * time plugin * @@ -21,27 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_time.c,v $ - * Revision 1.5 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.4 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.3 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.2 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.1 2004/05/20 07:47:51 reinelt - * added plugin_time - * */ /* diff --git a/plugin_uname.c b/plugin_uname.c index ad7fa06..596cca6 100644 --- a/plugin_uname.c +++ b/plugin_uname.c @@ -1,4 +1,5 @@ -/* $Id: plugin_uname.c,v 1.6 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: plugin_uname.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_uname.c $ * * plugin for uname() syscall * @@ -21,33 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_uname.c,v $ - * Revision 1.6 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.5 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.4 2005/01/09 10:53:24 reinelt - * small type in plugin_uname fixed - * new homepage lcd4linux.bulix.org - * - * Revision 1.3 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.2 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.1 2004/01/14 11:33:00 reinelt - * new plugin 'uname' which does what it's called - * text widget nearly finished - * first results displayed on MatrixOrbital - * */ /* diff --git a/plugin_uptime.c b/plugin_uptime.c index f15d86b..913497f 100644 --- a/plugin_uptime.c +++ b/plugin_uptime.c @@ -1,4 +1,5 @@ -/* $Id: plugin_uptime.c,v 1.6 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: plugin_uptime.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_uptime.c $ * * plugin for uptime * @@ -21,32 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_uptime.c,v $ - * Revision 1.6 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.5 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.4 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.3 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.2 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.1 2004/05/22 18:30:02 reinelt - * - * added plugin 'uptime' - * */ /* diff --git a/plugin_wireless.c b/plugin_wireless.c index 1823776..7eec871 100755..100644 --- a/plugin_wireless.c +++ b/plugin_wireless.c @@ -1,4 +1,5 @@ -/* $Id: plugin_wireless.c,v 1.9 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: plugin_wireless.c 738 2007-01-16 08:30:24Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_wireless.c $ * * Wireless Extension plugin * @@ -26,42 +27,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_wireless.c,v $ - * Revision 1.9 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.8 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.7 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.6 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.5 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.4 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.3 2004/05/27 03:39:47 reinelt - * - * changed function naming scheme to plugin::function - * - * Revision 1.2 2004/04/17 13:05:58 nicowallmeier - * minor bugfix - * - * Revision 1.1 2004/04/07 08:29:05 hejl - * New plugin for wireless info - * */ /* @@ -92,6 +57,7 @@ #include <sys/ioctl.h> #include <net/if_arp.h> +#include <linux/if.h> #include <linux/wireless.h> #include <math.h> diff --git a/plugin_xmms.c b/plugin_xmms.c index b07919e..f8d1b90 100644 --- a/plugin_xmms.c +++ b/plugin_xmms.c @@ -1,4 +1,5 @@ -/* $Id: plugin_xmms.c,v 1.14 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: plugin_xmms.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_xmms.c $ * * XMMS-Plugin for LCD4Linux * Copyright (C) 2003 Markus Keil <markus_keil@t-online.de> @@ -19,60 +20,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: plugin_xmms.c,v $ - * Revision 1.14 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.13 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.12 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.11 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.10 2004/06/17 06:23:43 reinelt - * - * hash handling rewritten to solve performance issues - * - * Revision 1.9 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.8 2004/02/05 23:58:18 mkeil - * Fixed/Optimized Hashage-timings - * - * Revision 1.7 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.6 2004/01/21 11:31:23 reinelt - * two bugs with hash_age() ixed - * - * Revision 1.5 2004/01/21 10:48:17 reinelt - * hash_age function added - * - * Revision 1.4 2004/01/16 11:12:26 reinelt - * some bugs in plugin_xmms fixed, parsing moved to own function - * plugin_proc_stat nearly finished - * - * Revision 1.3 2004/01/16 10:09:49 mkeil - * -include caching for values - * - * Revision 1.2 2004/01/06 22:33:14 reinelt - * Copyright statements cleaned up - * - * Revision 1.1 2003/12/19 06:27:33 reinelt - * added XMMS plugin from Markus Keil - * */ /* @@ -1,7 +1,11 @@ +dnl $Id: plugins.m4 730 2007-01-14 13:50:28Z michael $ +dnl $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugins.m4 $ + + dnl LCD4Linux Plugins conf part dnl dnl Copyright (C) 1999, 2000, 2001, 2002, 2003 Michael Reinelt <reinelt@eunet.at> -dnl Copyright (C) 2004 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> +dnl Copyright (C) 2004, 2005, 2006, 2007 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> dnl dnl This file is part of LCD4Linux. dnl @@ -56,6 +60,7 @@ for plugin in $plugins; do PLUGIN_EXEC="yes" PLUGIN_FILE="yes" PLUGIN_I2C_SENSORS="yes" + PLUGIN_ICONV="yes" PLUGIN_IMON="yes" PLUGIN_ISDN="yes" PLUGIN_KVV="yes" @@ -97,6 +102,9 @@ for plugin in $plugins; do i2c_sensors) PLUGIN_I2C_SENSORS=$val ;; + iconv) + PLUGIN_ICONV=$val + ;; imon) PLUGIN_IMON=$val ;; @@ -195,6 +203,16 @@ if test "$PLUGIN_I2C_SENSORS" = "yes"; then PLUGINS="$PLUGINS plugin_i2c_sensors.o" AC_DEFINE(PLUGIN_I2C_SENSORS,1,[i2c sensors plugin]) fi +if test "$PLUGIN_ICONV" = "yes"; then + AM_ICONV + if test "$am_cv_func_iconv" = "yes"; then + PLUGINS="$PLUGINS plugin_iconv.o" + PLUGINLIBS="$PLUGINLIBS $LIBICONV" + AC_DEFINE(PLUGIN_ICONV,1,[iconv charset converter plugin]) + else + AC_MSG_WARN(iconv not found: iconv plugin disabled) + fi +fi if test "$PLUGIN_IMON" = "yes"; then PLUGINS="$PLUGINS plugin_imon.o" AC_DEFINE(PLUGIN_IMON,1,[imon plugin]) diff --git a/png.html b/png.html deleted file mode 100644 index 5cb914b..0000000 --- a/png.html +++ /dev/null @@ -1,8 +0,0 @@ -<html><head> -<title>PNG Test</title> -</head> -<body> -<h1>PNG test</h1> -<img src=/cgi-bin/nph-png> -</body> -</html> @@ -1,4 +1,5 @@ -/* $Id: property.c,v 1.3 2006/08/13 18:14:03 harbaum Exp $ +/* $Id: property.c 749 2007-01-20 06:37:35Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/property.c $ * * dynamic properties * @@ -21,17 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: property.c,v $ - * Revision 1.3 2006/08/13 18:14:03 harbaum - * Added KVV plugin - * - * Revision 1.2 2006/08/13 11:38:20 reinelt - * text widget uses dynamic properties - * - * Revision 1.1 2006/08/13 09:53:10 reinelt - * dynamic properties added (used by 'style' of text widget) - * */ @@ -74,7 +64,10 @@ void property_load(const char *section, const char *name, const char *defval, PROPERTY * prop) { + char *expression; + /* initialize structure */ + prop->valid = 0; prop->name = NULL; prop->expression = NULL; prop->compiled = NULL; @@ -84,7 +77,16 @@ void property_load(const char *section, const char *name, const char *defval, PR prop->name = strdup(name); /* load expression from config, but do not evaluate it */ - prop->expression = cfg_get_raw(section, name, defval); + expression = cfg_get_raw(section, name, NULL); + + if (expression == NULL) { + if (defval != NULL && *defval != '\0') + debug("Notice: using default value <%s> for property '%s.%s'", defval, section, name); + prop->expression = (char *) defval; + } else { + prop->valid = 1; + prop->expression = expression; + } /* pre-compile the expression */ Compile(prop->expression, &prop->compiled); @@ -92,13 +94,18 @@ void property_load(const char *section, const char *name, const char *defval, PR } +int property_valid(PROPERTY * prop) +{ + return prop->valid; +} + + int property_eval(PROPERTY * prop) { RESULT old; - int update = 1; + int update; /* this is a bit ugly: we need to remember the old value */ - old.type = prop->result.type; old.size = prop->result.size; old.number = prop->result.number; @@ -107,10 +114,11 @@ int property_eval(PROPERTY * prop) DelResult(&prop->result); Eval(prop->compiled, &prop->result); + /* check if property value has changed */ + update = 1; if (prop->result.type & R_NUMBER && old.type & R_NUMBER && prop->result.number == old.number) { update = 0; } - if (prop->result.type & R_STRING && old.type & R_STRING && prop->result.size == old.size) { if (prop->result.string == NULL && old.string == NULL) { update = 0; @@ -1,4 +1,5 @@ -/* $Id: property.h,v 1.3 2006/08/14 05:54:04 reinelt Exp $ +/* $Id: property.h 749 2007-01-20 06:37:35Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/property.h $ * * dynamic properties * @@ -21,17 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: property.h,v $ - * Revision 1.3 2006/08/14 05:54:04 reinelt - * minor warnings fixed, CFLAGS changed (no-strict-aliasing) - * - * Revision 1.2 2006/08/13 11:38:20 reinelt - * text widget uses dynamic properties - * - * Revision 1.1 2006/08/13 09:53:10 reinelt - * dynamic properties added (used by 'style' of text widget) - * */ @@ -42,6 +32,7 @@ typedef struct { + int valid; char *name; char *expression; void *compiled; @@ -50,6 +41,7 @@ typedef struct { void property_load(const char *section, const char *name, const char *defval, PROPERTY * prop); +int property_valid(PROPERTY * prop); int property_eval(PROPERTY * prop); double P2N(PROPERTY * prop); char *P2S(PROPERTY * prop); @@ -1,4 +1,5 @@ -/* $Id: qprintf.c,v 1.8 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: qprintf.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/qprintf.c $ * * simple but quick snprintf() replacement * @@ -24,40 +25,6 @@ * 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.8 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.7 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.6 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.5 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.4 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.3 2004/04/12 11:12:26 reinelt - * added plugin_isdn, removed old ISDN client - * fixed some real bad bugs in the evaluator - * - * Revision 1.2 2004/04/08 10:48:25 reinelt - * finished plugin_exec - * modified thread handling - * added '%x' format to qprintf (hexadecimal) - * - * Revision 1.1 2004/02/27 07:06:26 reinelt - * new function 'qprintf()' (simple but quick snprintf() replacement) - * */ /* @@ -1,4 +1,5 @@ -/* $Id: qprintf.h,v 1.5 2005/01/18 06:30:23 reinelt Exp $ +/* $Id: qprintf.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/qprintf.h $ * * simple but quick snprintf() replacement * @@ -24,27 +25,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: qprintf.h,v $ - * Revision 1.5 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.4 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.3 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.2 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.1 2004/02/27 07:06:26 reinelt - * new function 'qprintf()' (simple but quick snprintf() replacement) - * */ #ifndef _QPRINTF_H_ @@ -1,4 +1,5 @@ -/* $Id: rgb.c,v 1.1 2006/01/30 05:47:38 reinelt Exp $ +/* $Id: rgb.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/rgb.c $ * * generic color handling * @@ -21,11 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: rgb.c,v $ - * Revision 1.1 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * */ @@ -1,4 +1,5 @@ -/* $Id: rgb.h,v 1.1 2006/01/30 05:47:38 reinelt Exp $ +/* $Id: rgb.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/rgb.h $ * * generic color handling * @@ -21,11 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: rgb.h,v $ - * Revision 1.1 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * */ diff --git a/smoketest.sh b/smoketest.sh deleted file mode 100755 index 960d7e8..0000000 --- a/smoketest.sh +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/bash - -rm -f smoketest.log lcd4linux - -make distclean -./bootstrap - -for driver in BeckmannEgle BWCT CrystalFontz Curses Cwlinux G15 HD44780 LCD2USB LCDLinux LCDTerm LPH7508 LUIse M50530 MatrixOrbital MilfordInstruments Noritake NULL PNG PPM RouterBoard Sample serdisplib SimpleLCD T6963 Trefon USBLCD WincorNixdorf X11; do - - make distclean - ./configure --with-driver=$driver - make - - if [ -x lcd4linux ]; then - echo "Success: $driver" >>smoketest.log - else - echo "FAILED: $driver" >>smoketest.log - fi - -done - -make distclean -./configure diff --git a/svn_version.h b/svn_version.h new file mode 100644 index 0000000..1b3e10b --- /dev/null +++ b/svn_version.h @@ -0,0 +1 @@ +#define SVN_VERSION "768" diff --git a/svn_version.sh b/svn_version.sh new file mode 100755 index 0000000..6ddbd63 --- /dev/null +++ b/svn_version.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# $Id: svn_version.sh 756 2007-01-23 04:38:43Z michael $ +# $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/svn_version.sh $ + + +OLD_VERSION=`cat svn_version.h 2>/dev/null` + +if [ -d .svn ]; then + NEW_VERSION="#define SVN_VERSION \"`svnversion -n`\"" +fi + +if [ "$NEW_VERSION" != "$OLD_VERSION" ]; then + echo $NEW_VERSION >svn_version.h +fi @@ -1,4 +1,5 @@ -/* $Id: thread.c,v 1.8 2006/07/12 21:01:41 reinelt Exp $ +/* $Id: thread.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/thread.c $ * * thread handling (mutex, shmem, ...) * @@ -24,38 +25,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: thread.c,v $ - * Revision 1.8 2006/07/12 21:01:41 reinelt - * thread_destroy, minor cleanups - * - * Revision 1.7 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.6 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.5 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.4 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.3 2004/04/08 10:48:25 reinelt - * finished plugin_exec - * modified thread handling - * added '%x' format to qprintf (hexadecimal) - * - * Revision 1.2 2004/03/20 07:31:33 reinelt - * support for HD66712 (which has a different RAM layout) - * further threading development - * - * Revision 1.1 2004/03/19 06:37:47 reinelt - * asynchronous thread handling started - * */ /* @@ -108,6 +77,10 @@ #endif +int thread_argc; +char **thread_argv; + + /* glibc 2.1 requires defining semun ourselves */ #ifdef _SEM_SEMUN_UNDEFINED union semun { @@ -202,6 +175,9 @@ int thread_create(const char *name, void (*thread) (void *data), void *data) return -1; case 0: info("thread %s starting...", name); + if (thread_argc > 0) { + strncpy(thread_argv[0], name, strlen(thread_argv[0])); + } thread(data); info("thread %s ended.", name); exit(0); @@ -1,4 +1,5 @@ -/* $Id: thread.h,v 1.7 2006/07/12 21:01:41 reinelt Exp $ +/* $Id: thread.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/thread.h $ * * thread handling (mutex, shmem, ...) * @@ -24,38 +25,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: thread.h,v $ - * Revision 1.7 2006/07/12 21:01:41 reinelt - * thread_destroy, minor cleanups - * - * Revision 1.6 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.5 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.4 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.3 2004/04/08 10:48:25 reinelt - * finished plugin_exec - * modified thread handling - * added '%x' format to qprintf (hexadecimal) - * - * Revision 1.2 2004/03/20 07:31:33 reinelt - * support for HD66712 (which has a different RAM layout) - * further threading development - * - * Revision 1.1 2004/03/19 06:37:47 reinelt - * asynchronous thread handling started - * */ #ifndef _THREAD_H_ #define _THREAD_H_ + +extern int thread_argc; +extern char **thread_argv; + int mutex_create(void); void mutex_lock(const int semid); void mutex_unlock(const int semid); @@ -1,4 +1,5 @@ -/* $Id: timer.c,v 1.13 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: timer.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/timer.c $ * * generic timer handling * @@ -19,61 +20,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: timer.c,v $ - * Revision 1.13 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.12 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.11 2004/09/19 09:31:19 reinelt - * HD44780 busy flag checking improved: fall back to busy-waiting if too many errors occur - * - * Revision 1.10 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.9 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.8 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.7 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.6 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.5 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * 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 - * - * Revision 1.2 2004/01/18 09:01:45 reinelt - * /proc/stat parsing finished - * - * Revision 1.1 2004/01/13 08:18:20 reinelt - * timer queues added - * liblcd4linux deactivated turing transformation to new layout - * */ /* @@ -1,4 +1,5 @@ -/* $Id: timer.h,v 1.6 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: timer.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/timer.h $ * * generic timer handling * @@ -21,34 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: timer.h,v $ - * Revision 1.6 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.5 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.4 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.3 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.2 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.1 2004/01/13 08:18:20 reinelt - * timer queues added - * liblcd4linux deactivated turing transformation to new layout - * */ @@ -1,4 +1,5 @@ -/* $Id: udelay.c,v 1.23 2006/08/13 06:46:51 reinelt Exp $ +/* $Id: udelay.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/udelay.c $ * * short delays * @@ -21,100 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: udelay.c,v $ - * Revision 1.23 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.22 2006/08/10 19:06:52 reinelt - * new 'fuzz' parameter for timings - * - * Revision 1.21 2005/12/12 09:08:08 reinelt - * finally removed old udelay code path; read timing values from config - * - * Revision 1.20 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.19 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.18 2004/09/18 09:48:29 reinelt - * HD44780 cleanup and prepararation for I2C backend - * LCM-162 submodel framework - * - * Revision 1.17 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.16 2004/04/12 05:14:42 reinelt - * another BIG FAT WARNING on the use of raw ports instead of ppdev - * - * Revision 1.15 2004/04/12 04:56:00 reinelt - * emitted a BIG FAT WARNING if msr.h could not be found (and therefore - * the gettimeofday() delay loop would be used) - * - * Revision 1.14 2003/10/12 04:46:19 reinelt - * - * - * first try to integrate the Evaluator into a display driver (MatrixOrbital here) - * small warning in processor.c fixed (thanks to Zachary Giles) - * workaround for udelay() on alpha (no msr.h avaliable) (thanks to Zachary Giles) - * - * Revision 1.13 2003/10/05 17:58:50 reinelt - * libtool junk; copyright messages cleaned up - * - * Revision 1.12 2003/07/18 04:43:14 reinelt - * udelay: unnecessary sanity check removed - * - * Revision 1.11 2003/04/04 06:02:04 reinelt - * new parallel port abstraction scheme - * - * Revision 1.10 2003/02/27 07:43:11 reinelt - * - * asm/msr.h: included hard-coded definition of rdtscl() if msr.h cannot be found. - * - * autoconf/automake/autoanything: switched back to 1.4. Hope it works again. - * - * Revision 1.9 2002/08/21 06:09:53 reinelt - * some T6963 fixes, ndelay wrap - * - * Revision 1.8 2002/08/17 14:14:21 reinelt - * - * USBLCD fixes - * - * Revision 1.7 2002/04/29 11:00:28 reinelt - * - * added Toshiba T6963 driver - * added ndelay() with nanosecond resolution - * - * Revision 1.6 2001/08/08 05:40:24 reinelt - * - * renamed CLK_TCK to CLOCKS_PER_SEC - * - * Revision 1.5 2001/03/12 13:44:58 reinelt - * - * new udelay() using Time Stamp Counters - * - * Revision 1.4 2001/03/12 12:39:36 reinelt - * - * reworked autoconf a lot: drivers may be excluded, #define's went to config.h - * - * Revision 1.3 2001/03/01 22:33:50 reinelt - * - * renamed Raster_flush() to PPM_flush() - * - * Revision 1.2 2000/07/31 10:43:44 reinelt - * - * some changes to support kernel-2.4 (different layout of various files in /proc) - * - * Revision 1.1 2000/04/15 16:56:52 reinelt - * - * moved delay loops to udelay.c - * renamed -d (debugging) switch to -v (verbose) - * new switch -d to calibrate delay loop - * 'Delay' entry for HD44780 back again - * delay loops will not calibrate automatically, because this will fail with hich CPU load - * */ /* @@ -1,4 +1,5 @@ -/* $Id: udelay.h,v 1.11 2005/12/12 09:08:08 reinelt Exp $ +/* $Id: udelay.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/udelay.h $ * * short delays * @@ -21,55 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: udelay.h,v $ - * Revision 1.11 2005/12/12 09:08:08 reinelt - * finally removed old udelay code path; read timing values from config - * - * Revision 1.10 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.9 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.8 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.7 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.6 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.5 2003/10/05 17:58:50 reinelt - * libtool junk; copyright messages cleaned up - * - * Revision 1.4 2002/04/29 11:00:28 reinelt - * - * added Toshiba T6963 driver - * added ndelay() with nanosecond resolution - * - * Revision 1.3 2001/03/12 13:44:58 reinelt - * - * new udelay() using Time Stamp Counters - * - * Revision 1.2 2001/03/12 12:39:36 reinelt - * - * reworked autoconf a lot: drivers may be excluded, #define's went to config.h - * - * Revision 1.1 2000/04/15 16:56:52 reinelt - * - * moved delay loops to udelay.c - * renamed -d (debugging) switch to -v (verbose) - * new switch -d to calibrate delay loop - * 'Delay' entry for HD44780 back again - * delay loops will not calibrate automatically, because this will fail with high CPU load - * */ #ifndef _UDELAY_H_ @@ -79,11 +31,14 @@ /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ static inline void rep_nop(void) { -#if defined (__i386__) || defined (__amd64__) +# if defined(__i386) || defined(__i386__) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) + /* intel or amd64 arch, the "rep" and "nop" opcodes are available */ __asm__ __volatile__("rep; nop"); -#else -#warning "please insert appropriate nop asm statement here" -#endif +# else + /* other Arch, maybe add core cooldown code here, too. */ + do { + } while (0); +# endif } void udelay_init(void); diff --git a/usbhub.conf b/usbhub.conf deleted file mode 100644 index 0d9e8ad..0000000 --- a/usbhub.conf +++ /dev/null @@ -1,51 +0,0 @@ -Variables { - tick 500 - tack 100 - minute 60000 -} - -Display SitecomHUB { - Driver 'USBHUB' - Vendor '0x04b4' - Product '0x6560' -} - -Display TyphoonHUB { - Driver 'USBHUB' - Vendor '0x0409' - Product '0x0058' -} - - -Widget GPO_Test300 { - class 'GPO' - expression 2+(1+test::onoff(1))/2 - update 300 -} -Widget GPO_Test400 { - class 'GPO' - expression 2+(1+test::onoff(2))/2 - update 400 -} -Widget GPO_Test500 { - class 'GPO' - expression 2+(1+test::onoff(3))/2 - update 500 -} -Widget GPO_Test600 { - class 'GPO' - expression 2+(1+test::onoff(4))/2 - update 600 -} - -Layout TestHUB { - GPO1 'GPO_Test300' - GPO2 'GPO_Test400' - GPO3 'GPO_Test500' - GPO4 'GPO_Test600' -} - -#Display 'SitecomHUB' -Display 'TyphoonHUB' -Layout 'TestHUB' - @@ -1,4 +1,5 @@ -/* $Id: widget.c,v 1.26 2006/08/09 17:25:34 harbaum Exp $ +/* $Id: widget.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget.c $ * * generic widget handling * @@ -19,104 +20,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget.c,v $ - * Revision 1.26 2006/08/09 17:25:34 harbaum - * Better bar color support and new bold font - * - * Revision 1.25 2006/08/08 20:16:29 harbaum - * Added "extracolor" (used for e.g. bar border) and RGB support for LEDMATRIX - * - * Revision 1.24 2006/08/08 19:28:18 reinelt - * widget type checking corrected - * - * Revision 1.23 2006/02/21 05:50:34 reinelt - * keypad support from Cris Maj - * - * Revision 1.22 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.21 2005/12/18 16:18:36 reinelt - * GPO's added again - * - * Revision 1.20 2005/11/06 09:17:20 reinelt - * re-use icons (thanks to Jesus de Santos Garcia) - * - * Revision 1.19 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.18 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.17 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.16 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.15 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.14 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * - * Revision 1.13 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.12 2004/02/18 06:39:20 reinelt - * T6963 driver for graphic displays finished - * - * 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 - * - * Revision 1.9 2004/01/23 04:53:57 reinelt - * icon widget added (not finished yet!) - * - * Revision 1.8 2004/01/14 11:33:00 reinelt - * new plugin 'uname' which does what it's called - * text widget nearly finished - * first results displayed on MatrixOrbital - * - * Revision 1.7 2004/01/13 08:18:20 reinelt - * timer queues added - * liblcd4linux deactivated turing transformation to new layout - * - * Revision 1.6 2004/01/11 18:26:02 reinelt - * further widget and layout processing - * - * Revision 1.5 2004/01/11 09:26:15 reinelt - * layout starts to exist... - * - * Revision 1.4 2004/01/10 20:22:33 reinelt - * added new function 'cfg_list()' (not finished yet) - * added layout.c (will replace processor.c someday) - * added widget_text.c (will be the first and most important widget) - * modified lcd4linux.c so that old-style configs should work, too - * - * Revision 1.3 2004/01/10 17:34:40 reinelt - * further matrixOrbital changes - * widgets initialized - * - * Revision 1.2 2003/10/05 17:58:50 reinelt - * libtool junk; copyright messages cleaned up - * - * Revision 1.1 2003/09/19 03:51:29 reinelt - * minor fixes, widget.c added - * */ /* @@ -1,4 +1,5 @@ -/* $Id: widget.h,v 1.22 2006/08/14 05:54:04 reinelt Exp $ +/* $Id: widget.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget.h $ * * generic widget handling * @@ -21,90 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget.h,v $ - * Revision 1.22 2006/08/14 05:54:04 reinelt - * minor warnings fixed, CFLAGS changed (no-strict-aliasing) - * - * Revision 1.21 2006/08/09 17:25:34 harbaum - * Better bar color support and new bold font - * - * Revision 1.20 2006/08/08 20:16:29 harbaum - * Added "extracolor" (used for e.g. bar border) and RGB support for LEDMATRIX - * - * Revision 1.19 2006/02/21 15:55:59 cmay - * removed new update function for keypad, consolidated it with draw - * - * Revision 1.18 2006/02/21 05:50:34 reinelt - * keypad support from Cris Maj - * - * Revision 1.17 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.16 2006/01/23 06:17:18 reinelt - * timer widget added - * - * Revision 1.15 2005/12/18 16:18:36 reinelt - * GPO's added again - * - * Revision 1.14 2005/11/06 09:17:20 reinelt - * re-use icons (thanks to Jesus de Santos Garcia) - * - * Revision 1.13 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.12 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.11 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.10 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.9 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.8 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.7 2004/01/14 11:33:00 reinelt - * new plugin 'uname' which does what it's called - * text widget nearly finished - * first results displayed on MatrixOrbital - * - * Revision 1.6 2004/01/13 08:18:20 reinelt - * timer queues added - * liblcd4linux deactivated turing transformation to new layout - * - * Revision 1.5 2004/01/11 18:26:02 reinelt - * further widget and layout processing - * - * Revision 1.4 2004/01/10 20:22:33 reinelt - * added new function 'cfg_list()' (not finished yet) - * added layout.c (will replace processor.c someday) - * added widget_text.c (will be the first and most important widget) - * modified lcd4linux.c so that old-style configs should work, too - * - * Revision 1.3 2004/01/10 17:34:40 reinelt - * further matrixOrbital changes - * widgets initialized - * - * Revision 1.2 2003/10/05 17:58:50 reinelt - * libtool junk; copyright messages cleaned up - * - * Revision 1.1 2003/09/19 03:51:29 reinelt - * minor fixes, widget.c added - * */ diff --git a/widget_bar.c b/widget_bar.c index a03f74d..cd2fd1d 100644 --- a/widget_bar.c +++ b/widget_bar.c @@ -1,4 +1,5 @@ -/* $Id: widget_bar.c,v 1.19 2006/08/09 17:25:34 harbaum Exp $ +/* $Id: widget_bar.c 753 2007-01-21 06:19:17Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_bar.c $ * * bar widget handling * @@ -19,85 +20,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_bar.c,v $ - * Revision 1.19 2006/08/09 17:25:34 harbaum - * Better bar color support and new bold font - * - * Revision 1.18 2006/01/23 06:17:18 reinelt - * timer widget added - * - * Revision 1.17 2005/12/18 16:18:36 reinelt - * GPO's added again - * - * Revision 1.16 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.15 2005/05/06 06:37:34 reinelt - * hollow bar patch from geronet - * - * Revision 1.14 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.13 2004/11/29 04:42:07 reinelt - * removed the 99999 msec limit on widget update time (thanks to Petri Damsten) - * - * Revision 1.12 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.11 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.10 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.9 2004/03/06 20:31:16 reinelt - * Complete rewrite of the evaluator to get rid of the code - * from mark Morley (because of license issues). - * The new Evaluator does a pre-compile of expressions, and - * stores them in trees. Therefore it should be reasonable faster... - * - * Revision 1.8 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * 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 - * - * Revision 1.5 2004/01/23 04:54:00 reinelt - * icon widget added (not finished yet!) - * - * Revision 1.4 2004/01/20 14:25:12 reinelt - * some reorganization - * moved drv_generic to drv_generic_serial - * moved port locking stuff to drv_generic_serial - * - * Revision 1.3 2004/01/20 12:45:47 reinelt - * "Default screen" working with MatrixOrbital - * - * Revision 1.2 2004/01/20 04:51:39 reinelt - * moved generic stuff from drv_MatrixOrbital to drv_generic - * implemented new-stylish bars which are nearly finished - * - * Revision 1.1 2004/01/18 21:25:16 reinelt - * Framework for bar widget opened - * */ /* @@ -118,7 +40,7 @@ #include "debug.h" #include "cfg.h" -#include "evaluator.h" +#include "property.h" #include "timer.h" #include "widget.h" #include "widget_bar.h" @@ -132,31 +54,25 @@ void widget_bar_update(void *Self) { WIDGET *W = (WIDGET *) Self; WIDGET_BAR *Bar = W->data; - RESULT result = { 0, 0, 0, NULL }; double val1, val2; double min, max; - /* evaluate expressions */ - val1 = 0.0; - if (Bar->tree1 != NULL) { - Eval(Bar->tree1, &result); - val1 = R2N(&result); - DelResult(&result); - } + /* evaluate properties */ + property_eval(&Bar->expression1); + val1 = P2N(&Bar->expression1); - val2 = val1; - if (Bar->tree2 != NULL) { - Eval(Bar->tree2, &result); - val2 = R2N(&result); - DelResult(&result); + if (property_valid(&Bar->expression2)) { + property_eval(&Bar->expression2); + val2 = P2N(&Bar->expression2); + } else { + val2 = val1; } /* minimum: if expression is empty, do auto-scaling */ - if (Bar->tree_min != NULL) { - Eval(Bar->tree_min, &result); - min = R2N(&result); - DelResult(&result); + if (property_valid(&Bar->expr_min)) { + property_eval(&Bar->expr_min); + min = P2N(&Bar->expr_min); } else { min = Bar->min; if (val1 < min) @@ -166,10 +82,9 @@ void widget_bar_update(void *Self) } /* maximum: if expression is empty, do auto-scaling */ - if (Bar->tree_max != NULL) { - Eval(Bar->tree_max, &result); - max = R2N(&result); - DelResult(&result); + if (property_valid(&Bar->expr_max)) { + property_eval(&Bar->expr_max); + max = P2N(&Bar->expr_min); } else { max = Bar->max; if (val1 > max) @@ -211,26 +126,17 @@ int widget_bar_init(WIDGET * Self) Bar = malloc(sizeof(WIDGET_BAR)); memset(Bar, 0, sizeof(WIDGET_BAR)); - /* get raw expressions (we evaluate them ourselves) */ - Bar->expression1 = cfg_get_raw(section, "expression", NULL); - Bar->expression2 = cfg_get_raw(section, "expression2", NULL); + /* load properties */ + property_load(section, "expression", NULL, &Bar->expression1); + property_load(section, "expression2", NULL, &Bar->expression2); + property_load(section, "min", NULL, &Bar->expr_min); + property_load(section, "max", NULL, &Bar->expr_max); - /* sanity check */ - if (Bar->expression1 == NULL || *Bar->expression1 == '\0') { - error("widget %s has no expression, using '0.0'", Self->name); - Bar->expression1 = "0"; + /* sanity checks */ + if (!property_valid(&Bar->expression1)) { + error("Warning: widget %s has no expression", section); } - /* minimum and maximum value */ - Bar->expr_min = cfg_get_raw(section, "min", NULL); - Bar->expr_max = cfg_get_raw(section, "max", NULL); - - /* compile all expressions */ - Compile(Bar->expression1, &Bar->tree1); - Compile(Bar->expression2, &Bar->tree2); - Compile(Bar->expr_min, &Bar->tree_min); - Compile(Bar->expr_max, &Bar->tree_max); - /* bar length, default 1 */ cfg_number(section, "length", 1, 0, -1, &(Bar->length)); @@ -291,10 +197,10 @@ int widget_bar_quit(WIDGET * Self) if (Self) { if (Self->data) { WIDGET_BAR *Bar = Self->data; - DelTree(Bar->tree1); - DelTree(Bar->tree2); - DelTree(Bar->tree_min); - DelTree(Bar->tree_max); + property_free(&Bar->expression1); + property_free(&Bar->expression2); + property_free(&Bar->expr_min); + property_free(&Bar->expr_max); free(Self->data); } Self->data = NULL; diff --git a/widget_bar.h b/widget_bar.h index 11fa9f8..40e5d99 100644 --- a/widget_bar.h +++ b/widget_bar.h @@ -1,4 +1,5 @@ -/* $Id: widget_bar.h,v 1.10 2006/08/13 06:46:51 reinelt Exp $ +/* $Id: widget_bar.h 749 2007-01-20 06:37:35Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_bar.h $ * * bar widget handling * @@ -21,64 +22,22 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_bar.h,v $ - * Revision 1.10 2006/08/13 06:46:51 reinelt - * T6963 soft-timing & enhancements; indent - * - * Revision 1.9 2006/08/09 17:25:34 harbaum - * Better bar color support and new bold font - * - * Revision 1.8 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.7 2005/05/06 06:37:34 reinelt - * hollow bar patch from geronet - * - * Revision 1.6 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.5 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.4 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.3 2004/03/06 20:31:16 reinelt - * Complete rewrite of the evaluator to get rid of the code - * from mark Morley (because of license issues). - * The new Evaluator does a pre-compile of expressions, and - * stores them in trees. Therefore it should be reasonable faster... - * - * Revision 1.2 2004/01/20 04:51:39 reinelt - * moved generic stuff from drv_MatrixOrbital to drv_generic - * implemented new-stylish bars which are nearly finished - * - * Revision 1.1 2004/01/18 21:25:16 reinelt - * Framework for bar widget opened - * */ #ifndef _WIDGET_BAR_H_ #define _WIDGET_BAR_H_ +#include "property.h" + typedef enum { DIR_EAST = 1, DIR_WEST = 2, DIR_NORTH = 4, DIR_SOUTH = 8 } DIRECTION; typedef enum { STYLE_HOLLOW = 1, STYLE_FIRST = 2, STYLE_LAST = 4 } STYLE; typedef struct WIDGET_BAR { - char *expression1; /* expression that delivers the value */ - char *expression2; /* expression that delivers the value */ - char *expr_min; /* expression that delivers the minimum value */ - char *expr_max; /* expression that delivers the maximum value */ - void *tree1; /* pre-compiled expression that delivers the value */ - void *tree2; /* pre-compiled expression that delivers the value */ - void *tree_min; /* pre-compiled expression that delivers the minimum value */ - void *tree_max; /* pre-compiled expression that delivers the maximum value */ + PROPERTY expression1; /* value (length) of upper half */ + PROPERTY expression2; /* value (length) of lower half */ + PROPERTY expr_min; /* explicit minimum value */ + PROPERTY expr_max; /* explicit maximum value */ DIRECTION direction; /* bar direction */ STYLE style; /* bar style (hollow) */ int length; /* bar length */ diff --git a/widget_gpo.c b/widget_gpo.c index a53b012..d46f464 100644 --- a/widget_gpo.c +++ b/widget_gpo.c @@ -1,9 +1,10 @@ -/* $Id: widget_gpo.c,v 1.1 2005/12/18 16:18:36 reinelt Exp $ +/* $Id: widget_gpo.c 752 2007-01-20 14:05:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_gpo.c $ * * GPO widget handling * * Copyright (C) 2005 Michael Reinelt <reinelt@eunet.at> - * Copyright (C) 2005 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> + * Copyright (C) 2005, 2006, 2007 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 @@ -19,11 +20,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_gpo.c,v $ - * Revision 1.1 2005/12/18 16:18:36 reinelt - * GPO's added again - * */ /* @@ -44,7 +40,7 @@ #include "debug.h" #include "cfg.h" -#include "evaluator.h" +#include "property.h" #include "timer.h" #include "widget.h" #include "widget_gpo.h" @@ -58,24 +54,20 @@ void widget_gpo_update(void *Self) { WIDGET *W = (WIDGET *) Self; WIDGET_GPO *GPO = W->data; - RESULT result = { 0, 0, 0, NULL }; - int val; - - /* evaluate expression */ - val = 0; - if (GPO->tree != NULL) { - Eval(GPO->tree, &result); - val = R2N(&result); - DelResult(&result); - } - GPO->num = W->row; - GPO->val = val; + /* evaluate properties */ + property_eval(&GPO->expression); + property_eval(&GPO->update); /* finally, draw it! */ if (W->class->draw) W->class->draw(W); + /* add a new one-shot timer */ + if (P2N(&GPO->update) > 0) { + timer_add(widget_gpo_update, Self, P2N(&GPO->update), 1); + } + } @@ -93,25 +85,20 @@ int widget_gpo_init(WIDGET * Self) GPO = malloc(sizeof(WIDGET_GPO)); memset(GPO, 0, sizeof(WIDGET_GPO)); - /* get raw expression (we evaluate them ourselves) */ - GPO->expression = cfg_get_raw(section, "expression", NULL); + /* load properties */ + property_load(section, "expression", NULL, &GPO->expression); + property_load(section, "update", "1000", &GPO->update); - /* sanity check */ - if (GPO->expression == NULL || *GPO->expression == '\0') { - error("widget %s has no expression, using '0.0'", Self->name); - GPO->expression = "0"; + /* sanity checks */ + if (!property_valid(&GPO->expression)) { + error("Warning: widget %s has no expression", section); } - /* compile expression */ - Compile(GPO->expression, &GPO->tree); - - /* update interval (msec), default 1 sec */ - cfg_number(section, "update", 1000, 10, -1, &(GPO->update)); - free(section); Self->data = GPO; - timer_add(widget_gpo_update, Self, GPO->update, 0); + /* fire it the first time */ + widget_gpo_update(Self); return 0; } @@ -119,12 +106,11 @@ int widget_gpo_init(WIDGET * Self) int widget_gpo_quit(WIDGET * Self) { - if (Self) { - if (Self->data) { - WIDGET_GPO *GPO = Self->data; - DelTree(GPO->tree); - free(Self->data); - } + if (Self && Self->data) { + WIDGET_GPO *GPO = Self->data; + property_free(&GPO->expression); + property_free(&GPO->update); + free(Self->data); Self->data = NULL; } return 0; diff --git a/widget_gpo.h b/widget_gpo.h index cc93f84..ca4c068 100644 --- a/widget_gpo.h +++ b/widget_gpo.h @@ -1,9 +1,10 @@ -/* $Id: widget_gpo.h,v 1.1 2005/12/18 16:18:36 reinelt Exp $ +/* $Id: widget_gpo.h 751 2007-01-20 13:52:43Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_gpo.h $ * * GPO widget handling * * Copyright (C) 2005 Michael Reinelt <reinelt@eunet.at> - * Copyright (C) 2005 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> + * Copyright (C) 2005, 2006, 2007 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> * * This file is part of LCD4Linux. * @@ -21,23 +22,17 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_gpo.h,v $ - * Revision 1.1 2005/12/18 16:18:36 reinelt - * GPO's added again - * */ #ifndef _WIDGET_GPO_H_ #define _WIDGET_GPO_H_ +#include "property.h" + typedef struct WIDGET_GPO { - char *expression; /* expression that delivers the value */ - void *tree; /* pre-compiled expression that delivers the value */ - int update; /* update interval (msec) */ - int num; /* GPO number */ - int val; /* GPO value */ + PROPERTY expression; /* main GPO expression */ + PROPERTY update; /* update interval (msec) */ } WIDGET_GPO; diff --git a/widget_icon.c b/widget_icon.c index 38af359..bfeec22 100644 --- a/widget_icon.c +++ b/widget_icon.c @@ -1,4 +1,5 @@ -/* $Id: widget_icon.c,v 1.23 2006/02/25 13:36:33 geronet Exp $ +/* $Id: widget_icon.c 744 2007-01-18 05:20:07Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_icon.c $ * * icon widget handling * @@ -19,99 +20,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_icon.c,v $ - * Revision 1.23 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.22 2006/01/23 06:17:18 reinelt - * timer widget added - * - * Revision 1.21 2006/01/22 10:01:09 reinelt - * allow 'static' icons with speed=0 - * - * Revision 1.20 2005/12/18 16:18:36 reinelt - * GPO's added again - * - * Revision 1.19 2005/11/06 09:54:43 reinelt - * fixed icon size removed, uses XRES & YRES (I hope this doesn't lead to problemes...) - * - * Revision 1.18 2005/11/06 09:17:20 reinelt - * re-use icons (thanks to Jesus de Santos Garcia) - * - * Revision 1.17 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.16 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.15 2004/11/28 15:50:24 reinelt - * Cwlinux fixes (invalidation of user-defined chars) - * - * Revision 1.14 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.13 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.12 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.11 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.10 2004/03/06 20:31:16 reinelt - * Complete rewrite of the evaluator to get rid of the code - * from mark Morley (because of license issues). - * The new Evaluator does a pre-compile of expressions, and - * stores them in trees. Therefore it should be reasonable faster... - * - * Revision 1.9 2004/03/03 04:44:16 reinelt - * changes (cosmetics?) to the big patch from Martin - * hash patch un-applied - * - * Revision 1.8 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.7 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * - * Revision 1.6 2004/02/07 13:45:23 reinelt - * icon visibility patch #2 from Xavier - * - * Revision 1.5 2004/02/04 19:11:44 reinelt - * icon visibility patch from Xavier - * - * 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 - * - * Revision 1.2 2004/01/23 07:04:39 reinelt - * icons finished! - * - * Revision 1.1 2004/01/23 04:54:03 reinelt - * icon widget added (not finished yet!) - * */ /* @@ -133,7 +41,7 @@ #include "debug.h" #include "cfg.h" #include "qprintf.h" -#include "evaluator.h" +#include "property.h" #include "timer.h" #include "widget.h" #include "widget_icon.h" @@ -186,31 +94,13 @@ void widget_icon_update(void *Self) { WIDGET *W = (WIDGET *) Self; WIDGET_ICON *Icon = W->data; - RESULT result = { 0, 0, 0, NULL }; /* process the parent only */ if (W->parent == NULL) { - /* evaluate expressions */ - Icon->speed = 100; - if (Icon->speed_tree != NULL) { - Eval(Icon->speed_tree, &result); - Icon->speed = R2N(&result); - if (Icon->speed <= 0) - Icon->speed = 0; - else if (Icon->speed < 10) - Icon->speed = 10; - DelResult(&result); - } - - Icon->visible = 1; - if (Icon->visible_tree != NULL) { - Eval(Icon->visible_tree, &result); - Icon->visible = R2N(&result); - if (Icon->visible < 0) - Icon->visible = 0; - DelResult(&result); - } + /* evaluate properties */ + property_eval(&Icon->speed); + property_eval(&Icon->visible); /* rotate icon bitmap */ Icon->curmap++; @@ -223,8 +113,8 @@ void widget_icon_update(void *Self) W->class->draw(W); /* add a new one-shot timer */ - if (Icon->speed > 0) { - timer_add(widget_icon_update, Self, Icon->speed, 1); + if (P2N(&Icon->speed) > 0) { + timer_add(widget_icon_update, Self, P2N(&Icon->speed), 1); } } @@ -247,19 +137,9 @@ int widget_icon_init(WIDGET * Self) Icon = malloc(sizeof(WIDGET_ICON)); memset(Icon, 0, sizeof(WIDGET_ICON)); - /* get raw expressions (we evaluate them ourselves) */ - Icon->speed_expr = cfg_get_raw(section, "speed", NULL); - Icon->visible_expr = cfg_get_raw(section, "visible", NULL); - - /* sanity check */ - if (Icon->speed_expr == NULL || *Icon->speed_expr == '\0') { - error("Icon %s has no speed, using '100'", Self->name); - Icon->speed_expr = "100"; - } - - /* compile'em */ - Compile(Icon->speed_expr, &Icon->speed_tree); - Compile(Icon->visible_expr, &Icon->visible_tree); + /* load properties */ + property_load(section, "speed", "100", &Icon->speed); + property_load(section, "visible", "1", &Icon->visible); /* read bitmap */ widget_icon_read_bitmap(section, Icon); @@ -296,8 +176,8 @@ int widget_icon_quit(WIDGET * Self) if (Self->parent == NULL) { if (Self->data) { WIDGET_ICON *Icon = Self->data; - DelTree(Icon->speed_tree); - DelTree(Icon->visible_tree); + property_free(&Icon->speed); + property_free(&Icon->visible); if (Icon->bitmap) free(Icon->bitmap); free(Self->data); diff --git a/widget_icon.h b/widget_icon.h index de86798..9f993d1 100644 --- a/widget_icon.h +++ b/widget_icon.h @@ -1,4 +1,5 @@ -/* $Id: widget_icon.h,v 1.9 2005/05/08 04:32:45 reinelt Exp $ +/* $Id: widget_icon.h 748 2007-01-20 05:00:06Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_icon.h $ * * icon widget handling * @@ -21,58 +22,17 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_icon.h,v $ - * Revision 1.9 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.8 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.7 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.6 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.5 2004/03/06 20:31:16 reinelt - * Complete rewrite of the evaluator to get rid of the code - * from mark Morley (because of license issues). - * The new Evaluator does a pre-compile of expressions, and - * stores them in trees. Therefore it should be reasonable faster... - * - * Revision 1.4 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * - * Revision 1.3 2004/02/04 19:11:44 reinelt - * icon visibility patch from Xavier - * - * Revision 1.2 2004/01/23 07:04:39 reinelt - * icons finished! - * - * Revision 1.1 2004/01/23 04:54:04 reinelt - * icon widget added (not finished yet!) - * */ #ifndef _WIDGET_ICON_H_ #define _WIDGET_ICON_H_ +#include "property.h" + typedef struct WIDGET_ICON { - char *speed_expr; /* expression for update interval */ - void *speed_tree; /* pre-compiled expression for update interval */ - int speed; /* update interval (msec) */ - char *visible_expr; /* expression for visibility */ - void *visible_tree; /* pre-compiled expression for visibility */ - int visible; /* icon visible? */ + PROPERTY speed; /* update interval (msec) */ + PROPERTY visible; /* icon visible? */ int ascii; /* ascii code of icon (depends on the driver) */ int curmap; /* current bitmap sequence */ int prvmap; /* previous bitmap sequence */ @@ -80,6 +40,7 @@ typedef struct WIDGET_ICON { unsigned char *bitmap; /* bitmaps of (animated) icon */ } WIDGET_ICON; + extern WIDGET_CLASS Widget_Icon; #endif diff --git a/widget_image.c b/widget_image.c index b9d37e7..b2f40b0 100644 --- a/widget_image.c +++ b/widget_image.c @@ -1,4 +1,5 @@ -/* $Id: widget_image.c,v 1.9 2006/06/21 05:12:43 reinelt Exp $ +/* $Id: widget_image.c 749 2007-01-20 06:37:35Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_image.c $ * * image widget handling * @@ -19,35 +20,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_image.c,v $ - * Revision 1.9 2006/06/21 05:12:43 reinelt - * added checks for libgd version 2 (thanks to Sam) - * - * Revision 1.8 2006/06/20 08:50:59 reinelt - * widget_image linker error hopefully finally fixed - * - * Revision 1.7 2006/04/15 05:22:52 reinelt - * mpd plugin from Stefan Kuhne - * - * Revision 1.6 2006/04/09 14:17:50 reinelt - * autoconf/library fixes, image and graphic display inversion - * - * Revision 1.5 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.4 2006/02/19 07:20:54 reinelt - * image support nearly finished - * - * Revision 1.3 2006/02/08 04:55:05 reinelt - * moved widget registration to drv_generic_graphic - * - * Revision 1.2 2006/01/23 06:17:18 reinelt - * timer widget added - * - * Revision 1.1 2006/01/22 09:16:11 reinelt - * Image Widget framework added - * */ /* @@ -67,15 +39,6 @@ #include <ctype.h> #include <errno.h> -#include "debug.h" -#include "cfg.h" -#include "qprintf.h" -#include "evaluator.h" -#include "timer.h" -#include "widget.h" -#include "widget_image.h" -#include "rgb.h" - #ifdef HAVE_GD_GD_H #include <gd/gd.h> #else @@ -92,6 +55,15 @@ #error "cannot compile image widget" #endif +#include "debug.h" +#include "cfg.h" +#include "qprintf.h" +#include "property.h" +#include "timer.h" +#include "widget.h" +#include "widget_image.h" +#include "rgb.h" + #ifdef WITH_DMALLOC #include <dmalloc.h> #endif @@ -100,8 +72,8 @@ static void widget_image_render(const char *Name, WIDGET_IMAGE * Image) { int x, y; - FILE *fd; - gdImagePtr gdImage = NULL; + int inverted; + gdImagePtr gdImage; /* clear bitmap */ if (Image->bitmap) { @@ -112,43 +84,57 @@ static void widget_image_render(const char *Name, WIDGET_IMAGE * Image) } } - if (Image->file == NULL || Image->file[0] == '\0') { - error("Warning: Image %s has no file", Name); - return; - } + /* reload image only on first call or on explicit reload request */ + if (Image->gdImage == NULL || P2N(&Image->reload)) { - fd = fopen(Image->file, "rb"); - if (fd == NULL) { - error("Warning: Image %s: fopen(%s) failed: %s", Name, Image->file, strerror(errno)); - return; - } + char *file; + FILE *fd; - gdImage = gdImageCreateFromPng(fd); - fclose(fd); + /* free previous image */ + if (Image->gdImage) { + gdImageDestroy(Image->gdImage); + Image->gdImage = NULL; + } + + file = P2S(&Image->file); + if (file == NULL || file[0] == '\0') { + error("Warning: Image %s has no file", Name); + return; + } + + fd = fopen(file, "rb"); + if (fd == NULL) { + error("Warning: Image %s: fopen(%s) failed: %s", Name, file, strerror(errno)); + return; + } + + Image->gdImage = gdImageCreateFromPng(fd); + fclose(fd); + + if (Image->gdImage == NULL) { + error("Warning: Image %s: CreateFromPng(%s) failed!", Name, file); + return; + } - if (fd == NULL) { - error("Warning: Image %s: CreateFromPng(%s) failed!", Name, Image->file); - return; } /* maybe resize bitmap */ + gdImage = Image->gdImage; if (gdImage->sx > Image->width) { Image->width = gdImage->sx; - if (Image->bitmap) - free(Image->bitmap); + free(Image->bitmap); Image->bitmap = NULL; } if (gdImage->sy > Image->height) { Image->height = gdImage->sy; - if (Image->bitmap) - free(Image->bitmap); + free(Image->bitmap); Image->bitmap = NULL; } if (Image->bitmap == NULL && Image->width > 0 && Image->height > 0) { int i = Image->width * Image->height * sizeof(Image->bitmap[0]); Image->bitmap = malloc(i); if (Image->bitmap == NULL) { - error("Warning: Image %s: malloc(%d) failed!", Name, i, strerror(errno)); + error("Warning: Image %s: malloc(%d) failed: %s", Name, i, strerror(errno)); return; } for (i = 0; i < Image->height * Image->width; i++) { @@ -157,8 +143,10 @@ static void widget_image_render(const char *Name, WIDGET_IMAGE * Image) } } + /* finally really render it */ - if (Image->visible) { + inverted = P2N(&Image->inverted); + if (P2N(&Image->visible)) { for (x = 0; x < gdImage->sx; x++) { for (y = 0; y < gdImage->sy; y++) { int p = gdImageGetTrueColorPixel(gdImage, x, y); @@ -170,7 +158,7 @@ static void widget_image_render(const char *Name, WIDGET_IMAGE * Image) /* GD's alpha is 0 (opaque) to 127 (tranparanet) */ /* our alpha is 0 (transparent) to 255 (opaque) */ Image->bitmap[i].A = (a == 127) ? 0 : 255 - 2 * a; - if (Image->inverted) { + if (inverted) { Image->bitmap[i].R = 255 - Image->bitmap[i].R; Image->bitmap[i].G = 255 - Image->bitmap[i].G; Image->bitmap[i].B = 255 - Image->bitmap[i].B; @@ -185,46 +173,16 @@ static void widget_image_update(void *Self) { WIDGET *W = (WIDGET *) Self; WIDGET_IMAGE *Image = W->data; - RESULT result = { 0, 0, 0, NULL }; /* process the parent only */ if (W->parent == NULL) { - /* evaluate expressions */ - if (Image->file) { - free(Image->file); - Image->file = NULL; - } - if (Image->file_tree != NULL) { - Eval(Image->file_tree, &result); - Image->file = strdup(R2S(&result)); - DelResult(&result); - } - - Image->update = 0; - if (Image->update_tree != NULL) { - Eval(Image->update_tree, &result); - Image->update = R2N(&result); - if (Image->update < 0) - Image->update = 0; - DelResult(&result); - } - - Image->visible = 1; - if (Image->visible_tree != NULL) { - Eval(Image->visible_tree, &result); - Image->visible = R2N(&result); - Image->visible = Image->visible > 0; - DelResult(&result); - } - - Image->inverted = 0; - if (Image->inverted_tree != NULL) { - Eval(Image->inverted_tree, &result); - Image->inverted = R2N(&result); - Image->inverted = Image->inverted > 0; - DelResult(&result); - } + /* evaluate properties */ + property_eval(&Image->file); + property_eval(&Image->update); + property_eval(&Image->reload); + property_eval(&Image->visible); + property_eval(&Image->inverted); /* render image into bitmap */ widget_image_render(W->name, Image); @@ -236,8 +194,9 @@ static void widget_image_update(void *Self) W->class->draw(W); /* add a new one-shot timer */ - timer_add(widget_image_update, Self, Image->update, 1); - + if (P2N(&Image->update) > 0) { + timer_add(widget_image_update, Self, P2N(&Image->update), 1); + } } @@ -263,28 +222,18 @@ int widget_image_init(WIDGET * Self) Image->width = 0; Image->height = 0; Image->bitmap = NULL; - Image->file = NULL; - /* get raw expressions (we evaluate them ourselves) */ - Image->file_expr = cfg_get_raw(section, "file", NULL); - Image->update_expr = cfg_get_raw(section, "update", NULL); - Image->visible_expr = cfg_get_raw(section, "visible", NULL); - Image->inverted_expr = cfg_get_raw(section, "inverted", NULL); + /* load properties */ + property_load(section, "file", NULL, &Image->file); + property_load(section, "update", "100", &Image->update); + property_load(section, "reload", "0", &Image->reload); + property_load(section, "visible", "1", &Image->visible); + property_load(section, "inverted", "0", &Image->inverted); /* sanity checks */ - if (Image->file_expr == NULL || *Image->file_expr == '\0') { - error("Warning: Image %s has no file", Self->name); + if (!property_valid(&Image->file)) { + error("Warning: widget %s has no file", section); } - if (Image->update_expr == NULL || *Image->update_expr == '\0') { - error("Image %s has no update, using '100'", Self->name); - Image->update_expr = "100"; - } - - /* compile'em */ - Compile(Image->file_expr, &Image->file_tree); - Compile(Image->update_expr, &Image->update_tree); - Compile(Image->visible_expr, &Image->visible_tree); - Compile(Image->inverted_expr, &Image->inverted_tree); free(section); Self->data = Image; @@ -310,14 +259,16 @@ int widget_image_quit(WIDGET * Self) if (Self->parent == NULL) { if (Self->data) { WIDGET_IMAGE *Image = Self->data; - if (Image->bitmap) - free(Image->bitmap); - if (Image->file) - free(Image->file); - DelTree(Image->file_tree); - DelTree(Image->update_tree); - DelTree(Image->visible_tree); - DelTree(Image->inverted_tree); + if (Image->gdImage) { + gdImageDestroy(Image->gdImage); + Image->gdImage = NULL; + } + free(Image->bitmap); + property_free(&Image->file); + property_free(&Image->update); + property_free(&Image->reload); + property_free(&Image->visible); + property_free(&Image->inverted); free(Self->data); Self->data = NULL; } diff --git a/widget_image.h b/widget_image.h index 96c25eb..07121ee 100644 --- a/widget_image.h +++ b/widget_image.h @@ -1,4 +1,5 @@ -/* $Id: widget_image.h,v 1.4 2006/04/09 14:17:50 reinelt Exp $ +/* $Id: widget_image.h 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_image.h $ * * image widget handling * @@ -21,43 +22,24 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_image.h,v $ - * Revision 1.4 2006/04/09 14:17:50 reinelt - * autoconf/library fixes, image and graphic display inversion - * - * Revision 1.3 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.2 2006/02/08 04:55:05 reinelt - * moved widget registration to drv_generic_graphic - * - * Revision 1.1 2006/01/22 09:16:11 reinelt - * Image Widget framework added - * */ #ifndef _WIDGET_IMAGE_H_ #define _WIDGET_IMAGE_H_ +#include "property.h" #include "rgb.h" typedef struct WIDGET_IMAGE { + void *gdImage; /* raw gd image */ RGBA *bitmap; /* image bitmap */ int width, height; /* size of the image */ - char *file_expr; /* expression for image filename */ - void *file_tree; /* pre-compiled expression for image filename */ - char *file; /* evaluated filename */ - char *update_expr; /* expression for update interval */ - void *update_tree; /* pre-compiled expression for update interval */ - int update; /* update interval (msec) */ - char *visible_expr; /* expression for visibility */ - void *visible_tree; /* pre-compiled expression for visibility */ - int visible; /* image visible? */ - char *inverted_expr; /* expression for inversion */ - void *inverted_tree; /* pre-compiled expression for inversion */ - int inverted; /* image inverted? */ + PROPERTY file; /* image filename */ + PROPERTY update; /* update interval */ + PROPERTY reload; /* reload image on update? */ + PROPERTY visible; /* image visible? */ + PROPERTY inverted; /* image inverted? */ } WIDGET_IMAGE; extern WIDGET_CLASS Widget_Image; diff --git a/widget_keypad.c b/widget_keypad.c index fbda930..104dc04 100644 --- a/widget_keypad.c +++ b/widget_keypad.c @@ -1,4 +1,5 @@ -/* $Id: widget_keypad.c,v 1.3 2006/07/19 01:35:31 cmay Exp $ +/* $Id: widget_keypad.c 752 2007-01-20 14:05:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_keypad.c $ * * keypad widget handling * @@ -19,19 +20,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_keypad.c,v $ - * Revision 1.3 2006/07/19 01:35:31 cmay - * Renamed keypad direction names to avoid conflict with Curses library defs. - * Added keypad support to Curses display driver. - * - * Revision 1.2 2006/02/21 15:55:59 cmay - * removed new update function for keypad, consolidated it with draw - * - * Revision 1.1 2006/02/21 05:50:34 reinelt - * keypad support from Cris Maj - * - * */ /* @@ -52,7 +40,7 @@ #include "debug.h" #include "cfg.h" -#include "evaluator.h" +#include "property.h" #include "timer.h" #include "widget.h" #include "widget_keypad.h" @@ -65,20 +53,11 @@ int widget_keypad_draw(WIDGET * Self) { WIDGET_KEYPAD *keypad = Self->data; - RESULT result = { 0, 0, 0, NULL }; - int val; + /* evaluate properties */ + property_eval(&keypad->expression); - /* evaluate expression */ - val = 0; - if (keypad->tree != NULL) { - Eval(keypad->tree, &result); - val = R2N(&result); - DelResult(&result); - } - keypad->val = val; - - return val; + return P2N(&keypad->expression); } @@ -97,17 +76,8 @@ int widget_keypad_init(WIDGET * Self) keypad = malloc(sizeof(WIDGET_KEYPAD)); memset(keypad, 0, sizeof(WIDGET_KEYPAD)); - /* get raw expression (we evaluate them ourselves) */ - keypad->expression = cfg_get_raw(section, "expression", NULL); - - /* sanity check */ - if (keypad->expression == NULL || *keypad->expression == '\0') { - error("widget %s has no expression, using '0.0'", Self->name); - keypad->expression = "0"; - } - - /* compile expression */ - Compile(keypad->expression, &keypad->tree); + /* load properties */ + property_load(section, "expression", NULL, &keypad->expression); /* state: pressed (default), released */ c = cfg_get(section, "state", "pressed"); @@ -140,14 +110,12 @@ int widget_keypad_init(WIDGET * Self) int widget_keypad_find(WIDGET * Self, void *needle) { WIDGET_KEYPAD *keypad; - unsigned int *n = needle; - - if (Self) { - if (Self->data) { - keypad = Self->data; - if (keypad->key == *n) - return 0; - } + KEYPADKEY key = *(KEYPADKEY *) needle; + + if (Self && Self->data) { + keypad = Self->data; + if (keypad->key == key) + return 0; } return -1; @@ -155,12 +123,10 @@ int widget_keypad_find(WIDGET * Self, void *needle) int widget_keypad_quit(WIDGET * Self) { - if (Self) { - if (Self->data) { - WIDGET_KEYPAD *KEYPAD = Self->data; - DelTree(KEYPAD->tree); - free(Self->data); - } + if (Self && Self->data) { + WIDGET_KEYPAD *keypad = Self->data; + property_free(&keypad->expression); + free(Self->data); Self->data = NULL; } return 0; diff --git a/widget_keypad.h b/widget_keypad.h index 5918ede..839e594 100644 --- a/widget_keypad.h +++ b/widget_keypad.h @@ -1,4 +1,5 @@ -/* $Id: widget_keypad.h,v 1.3 2006/07/19 01:35:31 cmay Exp $ +/* $Id: widget_keypad.h 748 2007-01-20 05:00:06Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_keypad.h $ * * keypad widget handling * @@ -21,25 +22,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_keypad.h,v $ - * Revision 1.3 2006/07/19 01:35:31 cmay - * Renamed keypad direction names to avoid conflict with Curses library defs. - * Added keypad support to Curses display driver. - * - * Revision 1.2 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.1 2006/02/21 05:50:34 reinelt - * keypad support from Cris Maj - * - * */ #ifndef _WIDGET_KEYPAD_H_ #define _WIDGET_KEYPAD_H_ +#include "property.h" + typedef enum { WIDGET_KEY_UP = 1, WIDGET_KEY_DOWN = 2, @@ -52,9 +42,7 @@ typedef enum { } KEYPADKEY; typedef struct WIDGET_KEYPAD { - char *expression; /* expression that delivers the value */ - void *tree; /* pre-compiled expression that delivers the value */ - int val; /* current value of the expression */ + PROPERTY expression; /* expression that delivers the value */ KEYPADKEY key; /* which key */ } WIDGET_KEYPAD; diff --git a/widget_text.c b/widget_text.c index d543534..a09c118 100644 --- a/widget_text.c +++ b/widget_text.c @@ -1,4 +1,5 @@ -/* $Id: widget_text.c,v 1.27 2006/08/13 18:14:03 harbaum Exp $ +/* $Id: widget_text.c 749 2007-01-20 06:37:35Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_text.c $ * * simple text widget handling * @@ -19,121 +20,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_text.c,v $ - * Revision 1.27 2006/08/13 18:14:03 harbaum - * Added KVV plugin - * - * Revision 1.26 2006/08/13 11:38:20 reinelt - * text widget uses dynamic properties - * - * Revision 1.25 2006/08/13 09:53:10 reinelt - * dynamic properties added (used by 'style' of text widget) - * - * Revision 1.24 2006/01/23 06:17:18 reinelt - * timer widget added - * - * Revision 1.23 2005/12/18 16:18:36 reinelt - * GPO's added again - * - * Revision 1.22 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.21 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.20 2004/11/29 04:42:07 reinelt - * removed the 99999 msec limit on widget update time (thanks to Petri Damsten) - * - * Revision 1.19 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.18 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.17 2004/03/11 06:39:59 reinelt - * big patch from Martin: - * - reuse filehandles - * - memory leaks fixed - * - earlier busy-flag checking with HD44780 - * - reuse memory for strings in RESULT and hash - * - netdev_fast to wavid time-consuming regex - * - * Revision 1.16 2004/03/08 16:26:26 reinelt - * re-introduced \nnn (octal) characters in strings - * text widgets can have a 'update' speed of 0 which means 'never' - * (may be used for static content) - * - * Revision 1.15 2004/03/06 20:31:16 reinelt - * Complete rewrite of the evaluator to get rid of the code - * from mark Morley (because of license issues). - * The new Evaluator does a pre-compile of expressions, and - * stores them in trees. Therefore it should be reasonable faster... - * - * Revision 1.14 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.13 2004/02/18 06:39:20 reinelt - * T6963 driver for graphic displays finished - * - * Revision 1.12 2004/02/09 19:49:38 nicowallmeier - * Minor bugfix - * - * 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 - * - * Revision 1.9 2004/01/23 04:54:04 reinelt - * icon widget added (not finished yet!) - * - * Revision 1.8 2004/01/22 07:57:45 reinelt - * several bugs fixed where segfaulting on layout>display - * Crystalfontz driver optimized, 632 display already works - * - * Revision 1.7 2004/01/20 04:51:39 reinelt - * moved generic stuff from drv_MatrixOrbital to drv_generic - * implemented new-stylish bars which are nearly finished - * - * Revision 1.6 2004/01/15 07:47:02 reinelt - * debian/ postinst and watch added (did CVS forget about them?) - * evaluator: conditional expressions (a?b:c) added - * text widget nearly finished - * - * Revision 1.5 2004/01/15 04:29:45 reinelt - * moved lcd4linux.conf.sample to *.old - * lcd4linux.conf.sample with new layout - * new plugins 'loadavg' and 'meminfo' - * text widget have pre- and postfix - * - * Revision 1.4 2004/01/14 11:33:00 reinelt - * new plugin 'uname' which does what it's called - * text widget nearly finished - * first results displayed on MatrixOrbital - * - * Revision 1.3 2004/01/13 08:18:20 reinelt - * timer queues added - * liblcd4linux deactivated turing transformation to new layout - * - * Revision 1.2 2004/01/11 18:26:02 reinelt - * further widget and layout processing - * - * Revision 1.1 2004/01/10 20:22:33 reinelt - * added new function 'cfg_list()' (not finished yet) - * added layout.c (will replace processor.c someday) - * added widget_text.c (will be the first and most important widget) - * modified lcd4linux.c so that old-style configs should work, too - * */ /* @@ -275,9 +161,10 @@ void widget_text_update(void *Self) char *string; int update = 0; - /* evaluate prefix and postfix */ + /* evaluate properties */ update += property_eval(&T->prefix); update += property_eval(&T->postfix); + update += property_eval(&T->style); /* evaluate value */ property_eval(&T->value); @@ -319,16 +206,12 @@ void widget_text_update(void *Self) /* did the formatted string change? */ if (T->string == NULL || strcmp(T->string, string) != 0) { update++; - if (T->string) - free(T->string); + free(T->string); T->string = string; } else { free(string); } - /* text style */ - update += property_eval(&T->style); - /* something has changed and should be updated */ if (update) { /* reset marquee counter if content has changed */ @@ -361,9 +244,14 @@ int widget_text_init(WIDGET * Self) /* load properties */ property_load(section, "prefix", NULL, &Text->prefix); - property_load(section, "expression", NULL, &Text->value); + property_load(section, "expression", "", &Text->value); property_load(section, "postfix", NULL, &Text->postfix); - property_load(section, "style", "norm", &Text->style); + property_load(section, "style", NULL, &Text->style); + + /* sanity checks */ + if (!property_valid(&Text->value)) { + error("Warning: widget %s has no expression", section); + } /* field width, default 10 */ cfg_number(section, "width", 10, 0, -1, &(Text->width)); @@ -436,10 +324,8 @@ int widget_text_quit(WIDGET * Self) property_free(&Text->value); property_free(&Text->postfix); property_free(&Text->style); - if (Text->string) - free(Text->string); - if (Text->buffer) - free(Text->buffer); + free(Text->string); + free(Text->buffer); free(Self->data); Self->data = NULL; } diff --git a/widget_text.h b/widget_text.h index bd9a18d..1a09faf 100644 --- a/widget_text.h +++ b/widget_text.h @@ -1,4 +1,5 @@ -/* $Id: widget_text.h,v 1.10 2006/08/13 18:14:03 harbaum Exp $ +/* $Id: widget_text.h 748 2007-01-20 05:00:06Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_text.h $ * * simple text widget handling * @@ -21,60 +22,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_text.h,v $ - * Revision 1.10 2006/08/13 18:14:03 harbaum - * Added KVV plugin - * - * Revision 1.9 2006/08/13 11:38:20 reinelt - * text widget uses dynamic properties - * - * Revision 1.8 2006/08/13 09:53:10 reinelt - * dynamic properties added (used by 'style' of text widget) - * - * Revision 1.7 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.6 2005/01/18 06:30:24 reinelt - * added (C) to all copyright statements - * - * Revision 1.5 2004/06/26 12:05:00 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.4 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.3 2004/03/06 20:31:16 reinelt - * Complete rewrite of the evaluator to get rid of the code - * from mark Morley (because of license issues). - * The new Evaluator does a pre-compile of expressions, and - * stores them in trees. Therefore it should be reasonable faster... - * - * Revision 1.2 2004/01/15 07:47:03 reinelt - * debian/ postinst and watch added (did CVS forget about them?) - * evaluator: conditional expressions (a?b:c) added - * text widget nearly finished - * - * Revision 1.1 2004/01/15 04:29:45 reinelt - * moved lcd4linux.conf.sample to *.old - * lcd4linux.conf.sample with new layout - * new plugins 'loadavg' and 'meminfo' - * text widget have pre- and postfix - * */ #ifndef _WIDGET_TEXT_H_ #define _WIDGET_TEXT_H_ - #include "property.h" - typedef enum { ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT, ALIGN_MARQUEE } TEXT_ALIGN; typedef struct WIDGET_TEXT { diff --git a/widget_timer.c b/widget_timer.c index 4c6b055..688e7da 100644 --- a/widget_timer.c +++ b/widget_timer.c @@ -1,4 +1,5 @@ -/* $Id: widget_timer.c,v 1.3 2006/07/31 03:48:09 reinelt Exp $ +/* $Id: widget_timer.c 749 2007-01-20 06:37:35Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_timer.c $ * * timer widget handling * @@ -19,17 +20,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_timer.c,v $ - * Revision 1.3 2006/07/31 03:48:09 reinelt - * preparations for scrolling - * - * Revision 1.2 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.1 2006/01/23 06:17:18 reinelt - * timer widget added - * */ /* @@ -51,7 +41,7 @@ #include "debug.h" #include "cfg.h" #include "qprintf.h" -#include "evaluator.h" +#include "property.h" #include "timer.h" #include "widget.h" #include "widget_timer.h" @@ -64,35 +54,25 @@ void widget_timer_update(void *Self) { WIDGET *W = (WIDGET *) Self; WIDGET_TIMER *Timer = W->data; - RESULT result = { 0, 0, 0, NULL }; + int update, active; /* evaluate expressions */ - Timer->update = 10; - if (Timer->update_tree != NULL) { - Eval(Timer->update_tree, &result); - Timer->update = R2N(&result); - if (Timer->update < 10) - Timer->update = 10; - DelResult(&result); - } + property_eval(&Timer->update); + property_eval(&Timer->active); - Timer->active = 1; - if (Timer->active_tree != NULL) { - Eval(Timer->active_tree, &result); - Timer->active = R2N(&result); - if (Timer->active < 0) - Timer->active = 0; - DelResult(&result); - } + /* get new update interval */ + update = P2N(&Timer->update); + if (update < 10) + update = 10; /* finally, fire it! */ - if (Timer->active) { - Eval(Timer->expr_tree, &result); - DelResult(&result); + active = P2N(&Timer->active); + if (active > 0) { + property_eval(&Timer->expression); } /* add a new one-shot timer */ - timer_add(widget_timer_update, Self, Timer->update, 1); + timer_add(widget_timer_update, Self, update, 1); } @@ -111,26 +91,10 @@ int widget_timer_init(WIDGET * Self) Timer = malloc(sizeof(WIDGET_TIMER)); memset(Timer, 0, sizeof(WIDGET_TIMER)); - /* get raw expressions (we evaluate them ourselves) */ - Timer->expression = cfg_get_raw(section, "expression", NULL); - Timer->update_expr = cfg_get_raw(section, "update", "100"); - Timer->active_expr = cfg_get_raw(section, "active", "1"); - - /* sanity checks */ - if (Timer->expression == NULL || *Timer->expression == '\0') { - error("Timer '%s' has no expression, using '1'", Self->name); - Timer->expression = "1"; - } - if (Timer->update_expr == NULL || *Timer->update_expr == '\0') { - error("Timer '%s' has no update, using '100'", Self->name); - Timer->update_expr = "100"; - } - - /* compile'em */ - Compile(Timer->expression, &Timer->expr_tree); - Compile(Timer->update_expr, &Timer->update_tree); - Compile(Timer->active_expr, &Timer->active_tree); - + /* load properties */ + property_load(section, "expression", NULL, &Timer->expression); + property_load(section, "update", "100", &Timer->update); + property_load(section, "active", "1", &Timer->active); free(section); Self->data = Timer; @@ -149,9 +113,9 @@ int widget_timer_quit(WIDGET * Self) if (Self->parent == NULL) { if (Self->data) { WIDGET_TIMER *Timer = Self->data; - DelTree(Timer->expr_tree); - DelTree(Timer->update_tree); - DelTree(Timer->active_tree); + property_free(&Timer->expression); + property_free(&Timer->update); + property_free(&Timer->active); free(Self->data); Self->data = NULL; } diff --git a/widget_timer.h b/widget_timer.h index 2d789d7..4decab3 100644 --- a/widget_timer.h +++ b/widget_timer.h @@ -1,4 +1,5 @@ -/* $Id: widget_timer.h,v 1.2 2006/02/25 13:36:33 geronet Exp $ +/* $Id: widget_timer.h 748 2007-01-20 05:00:06Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/widget_timer.h $ * * timer widget handling * @@ -21,29 +22,18 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: widget_timer.h,v $ - * Revision 1.2 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.1 2006/01/23 06:17:18 reinelt - * timer widget added - * */ #ifndef _WIDGET_TIMER_H_ #define _WIDGET_TIMER_H_ +#include "property.h" + typedef struct WIDGET_TIMER { - char *expression; /* main timer expression */ - void *expr_tree; /* pre-compiled main expression */ - char *update_expr; /* expression for update interval */ - void *update_tree; /* pre-compiled expression for update interval */ - int update; /* update interval (msec) */ - char *active_expr; /* expression for active */ - void *active_tree; /* pre-compiled expression for active */ - int active; /* timer active? */ + PROPERTY expression; /* main timer expression */ + PROPERTY update; /* update interval (msec) */ + PROPERTY active; /* timer active? */ } WIDGET_TIMER; extern WIDGET_CLASS Widget_Timer; |