[lcd4linux @ 2000-04-10 04:40:53 by reinelt]

minor changes and cleanups

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@42 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
This commit is contained in:
reinelt
2000-04-10 04:40:53 +00:00
parent a3e3fa4aaf
commit 66d30deaa9
5 changed files with 65 additions and 31 deletions
+8 -2
View File
@@ -1,4 +1,4 @@
/* $Id: MatrixOrbital.c,v 1.13 2000/04/07 05:42:20 reinelt Exp $
/* $Id: MatrixOrbital.c,v 1.14 2000/04/10 04:40:53 reinelt Exp $
*
* driver for Matrix Orbital serial display modules
*
@@ -20,6 +20,10 @@
*
*
* $Log: MatrixOrbital.c,v $
* Revision 1.14 2000/04/10 04:40:53 reinelt
*
* minor changes and cleanups
*
* Revision 1.13 2000/04/07 05:42:20 reinelt
*
* UUCP style lockfiles for the serial port
@@ -542,10 +546,12 @@ int MO_flush (void)
return 0;
}
int lcd_hello (void); // prototype from lcd4linux.c
static void MO_quit (int signal)
{
MO_clear();
MO_flush();
lcd_hello();
close (Device);
unlock_port(Port);
exit (0);
+13 -5
View File
@@ -1,5 +1,5 @@
#
# $Id: README,v 1.3 2000/04/03 04:46:38 reinelt Exp $
# $Id: README,v 1.4 2000/04/10 04:40:53 reinelt Exp $
#
This is the README file for lcd4linux
@@ -22,16 +22,16 @@ print version number and a small help text, then exit
lcd4linux -l
list available drivers
lcd4linux [-c key=val] [-f config-file] [-o output]
lcd4linux [-c key=val] [-f config-file] [-o output] [-q]
run lcd4linux
use configuration from 'config-file' instead of /etc/lcd4linux.conf
write picture to 'output' (raster driver only)
overwrite entries from the config-file with '-c'
supress startup splash screen with '-q_
SUPPORTED DISPLAYS
* Matrox Orbital <http://www.matrixorbital.com>
* Matrox Orbital: <http://www.matrixorbital.com>
"LCD0821": 2 lines by 8 characters
"LCD1621": 2 lines by 16 characters
@@ -39,7 +39,15 @@ SUPPORTED DISPLAYS
"LCD2041": 4 lines by 20 characters (tested)
"LCD4021": 2 lines by 40 characters
* X11: not available now, but on top of my ToDo-List!
* X11
thanks to Herbert Rosmanith <herp@wildsau.idv.uni-linz.ac.at> a driver for the
X Window System is available. It supports any size at any resolution. A very
small XLCD4Linux-Window can even swallow on the KDE Panel!
* Raster formats:
a generic raster driver (which is used by the X11-driver, too) is availiable,
PPM (portable pixmap) is the only output format at the moment. I'm working
on PNG!
* other displays: lcd4linux and especially the display driver code is very modular,
so it should be quite easy to write a driver for any display. See README.driver
Vendored
+1 -1
View File
@@ -693,7 +693,7 @@ fi
PACKAGE=lcd4linux
VERSION=0.96a
VERSION=0.97
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+1 -1
View File
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(lcd4linux.c)
AM_INIT_AUTOMAKE(lcd4linux, 0.96a)
AM_INIT_AUTOMAKE(lcd4linux, 0.97)
dnl Checks for programs.
AC_PROG_AWK
+42 -22
View File
@@ -1,4 +1,4 @@
/* $Id: lcd4linux.c,v 1.18 2000/04/07 05:42:20 reinelt Exp $
/* $Id: lcd4linux.c,v 1.19 2000/04/10 04:40:53 reinelt Exp $
*
* LCD4Linux
*
@@ -20,6 +20,10 @@
*
*
* $Log: lcd4linux.c,v $
* 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
@@ -121,31 +125,43 @@ int tick, tack;
static void usage(void)
{
printf ("%s\n", release);
printf ("usage: lcd4linux [-h] [-l] [-c key=value] [-f config-file] [-o output-file]\n");
printf ("usage: lcd4linux [-h] [-l] [-c key=value] [-f config-file] [-o output-file] [-q]\n");
}
static int hello (void)
int lcd_hello (void)
{
int x, y;
int i, x, y, flag;
char *line1[] = { "* LCD4Linux V" VERSION " *",
"LCD4Linux " VERSION,
"LCD4Linux",
"L4Linux",
NULL };
char *line2[] = { "(c) 2000 M.Reinelt",
"(c) M.Reinelt",
NULL };
lcd_query (&y, &x, NULL, NULL, NULL);
if (x>=20) {
lcd_put (1, 1, "* LCD4Linux V" VERSION " *");
lcd_put (2, 1, " (c) 2000 M.Reinelt");
} else if (x >=16) {
lcd_put (1, 1, "LCD4Linux " VERSION);
lcd_put (2, 1, "(c) M.Reinelt");
} else if (x >=9) {
lcd_put (1, 1, "LCD4Linux");
} else if (x>=7) {
lcd_put (1, 1, "L4Linux");
} else return 0;
flag=0;
for (i=0; line1[i]; i++) {
if (strlen(line1[i])<=x) {
lcd_put (1, (x-strlen(line1[i]))/2+1, line1[i]);
flag=1;
break;
}
}
lcd_put (1, 1, "* LCD4Linux V" VERSION " *");
lcd_put (2, 1, " (c) 2000 M.Reinelt");
lcd_flush();
return 1;
for (i=0; line2[i]; i++) {
if (strlen(line2[i])<=x) {
lcd_put (2, (x-strlen(line2[i]))/2+1, line2[i]);
flag=1;
break;
}
}
if (flag) lcd_flush();
return flag;
}
int main (int argc, char *argv[])
@@ -153,8 +169,9 @@ int main (int argc, char *argv[])
char *cfg="/etc/lcd4linux.conf";
char *driver;
int c, smooth;
while ((c=getopt (argc, argv, "c:f:hlo:"))!=EOF) {
int quiet=0;
while ((c=getopt (argc, argv, "c:f:hlo:q"))!=EOF) {
switch (c) {
case 'c':
if (cfg_cmd (optarg)<0) {
@@ -175,6 +192,9 @@ int main (int argc, char *argv[])
case 'o':
output=optarg;
break;
case 'q':
quiet++;
break;
default:
exit(2);
}
@@ -210,7 +230,7 @@ int main (int argc, char *argv[])
process_init();
lcd_clear();
if (hello()) {
if (!quiet && lcd_hello()) {
sleep (3);
lcd_clear();
}