diff options
author | reinelt <> | 2000-08-09 09:50:29 +0000 |
---|---|---|
committer | reinelt <> | 2000-08-09 09:50:29 +0000 |
commit | 58deee6b03e396b6cba5e4e888940419c240866b (patch) | |
tree | ddf01503c9b524efbe08b2887ab9b9f0bed1dc55 /BeckmannEgle.c | |
parent | a7f2de2a1d1fb7b5c8b3ba277ea66f01e692dd18 (diff) | |
download | lcd4linux-58deee6b03e396b6cba5e4e888940419c240866b.tar.gz |
[lcd4linux @ 2000-08-09 09:50:29 by reinelt]
opened 0.98 development
removed driver-specific signal-handlers
added 'quit'-function to driver structure
added global signal-handler
Diffstat (limited to 'BeckmannEgle.c')
-rw-r--r-- | BeckmannEgle.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/BeckmannEgle.c b/BeckmannEgle.c index 790d3b7..c660bf9 100644 --- a/BeckmannEgle.c +++ b/BeckmannEgle.c @@ -1,4 +1,4 @@ -/* $Id: BeckmannEgle.c,v 1.2 2000/04/30 06:40:42 reinelt Exp $ +/* $Id: BeckmannEgle.c,v 1.3 2000/08/09 09:50:29 reinelt Exp $ * * driver for Beckmann+Egle mini terminals * @@ -20,6 +20,13 @@ * * * $Log: BeckmannEgle.c,v $ + * Revision 1.3 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.2 2000/04/30 06:40:42 reinelt * * bars for Beckmann+Egle driver @@ -43,7 +50,6 @@ #include <string.h> #include <errno.h> #include <unistd.h> -#include <signal.h> #include <termios.h> #include <fcntl.h> @@ -346,8 +352,6 @@ int BE_clear (void) return 0; } -static void BE_quit (int signal); //forward declaration - int BE_init (LCD *Self) { int i, rows=-1, cols=-1; @@ -403,10 +407,6 @@ int BE_init (LCD *Self) BE_clear(); - signal(SIGINT, BE_quit); - signal(SIGQUIT, BE_quit); - signal(SIGTERM, BE_quit); - return 0; } @@ -528,19 +528,15 @@ int BE_flush (void) return 0; } -int lcd_hello (void); // prototype from lcd4linux.c - -static void BE_quit (int signal) +int BE_quit (void) { - debug ("got signal %d\n", signal); - BE_clear(); - lcd_hello(); + debug ("closing port %s\n", Port); close (Device); unlock_port(Port); - exit (0); + return 0; } LCD BeckmannEgle[] = { - { "BLC100x", 0, 0, XRES, YRES, BARS, BE_init, BE_clear, BE_put, BE_bar, BE_flush }, + { "BLC100x", 0, 0, XRES, YRES, BARS, BE_init, BE_clear, BE_put, BE_bar, BE_flush, BE_quit }, { NULL } }; |