diff options
author | reinelt <> | 2000-04-07 05:42:20 +0000 |
---|---|---|
committer | reinelt <> | 2000-04-07 05:42:20 +0000 |
commit | 65540b205445edffe8ca75e7d797ea2f3d9ab41d (patch) | |
tree | e289981edc6218ca381876155d0a81cfe527d25e /lcd4linux.c | |
parent | ccb26ef39584226382cf4b5f895f4e2472975694 (diff) | |
download | lcd4linux-65540b205445edffe8ca75e7d797ea2f3d9ab41d.tar.gz |
[lcd4linux @ 2000-04-07 05:42:20 by reinelt]
UUCP style lockfiles for the serial port
Diffstat (limited to 'lcd4linux.c')
-rw-r--r-- | lcd4linux.c | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/lcd4linux.c b/lcd4linux.c index 974f8eb..6963609 100644 --- a/lcd4linux.c +++ b/lcd4linux.c @@ -1,4 +1,4 @@ -/* $Id: lcd4linux.c,v 1.17 2000/04/03 17:31:52 reinelt Exp $ +/* $Id: lcd4linux.c,v 1.18 2000/04/07 05:42:20 reinelt Exp $ * * LCD4Linux * @@ -20,6 +20,10 @@ * * * $Log: lcd4linux.c,v $ + * 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 @@ -120,11 +124,35 @@ static void usage(void) printf ("usage: lcd4linux [-h] [-l] [-c key=value] [-f config-file] [-o output-file]\n"); } +static int hello (void) +{ + int x, y; + + 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; + + lcd_put (1, 1, "* LCD4Linux V" VERSION " *"); + lcd_put (2, 1, " (c) 2000 M.Reinelt"); + lcd_flush(); + return 1; +} + int main (int argc, char *argv[]) { char *cfg="/etc/lcd4linux.conf"; char *driver; - int c, x, y, smooth; + int c, smooth; while ((c=getopt (argc, argv, "c:f:hlo:"))!=EOF) { switch (c) { @@ -182,15 +210,11 @@ int main (int argc, char *argv[]) process_init(); lcd_clear(); - lcd_query (&y, &x, NULL, NULL, NULL); - if (x>=20 && y>=2) { - lcd_put (1, 1, "* LCD4Linux V" VERSION " *"); - lcd_put (2, 1, " (c) 2000 M.Reinelt"); - lcd_flush(); + if (hello()) { sleep (3); lcd_clear(); } - + smooth=0; while (1) { process (smooth); |