From 58deee6b03e396b6cba5e4e888940419c240866b Mon Sep 17 00:00:00 2001 From: reinelt <> Date: Wed, 9 Aug 2000 09:50:29 +0000 Subject: [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 --- BeckmannEgle.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'BeckmannEgle.c') 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 #include #include -#include #include #include @@ -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 } }; -- cgit v1.2.3