From 242592b5ed164d44c2c05d4c68c5d5c694ca0a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Mon, 23 Jan 2006 18:11:20 +0000 Subject: get the ifdef-bracketting right to have even less errors svn path=/trunk/externals/zexy/; revision=4474 --- src/lpt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lpt.c b/src/lpt.c index 9539efd..dad9ae4 100644 --- a/src/lpt.c +++ b/src/lpt.c @@ -112,8 +112,8 @@ typedef struct _lpt static void lpt_float(t_lpt *x, t_floatarg f) { - unsigned char b = f; #ifdef Z_WANT_LPT + unsigned char b = f; # ifdef HAVE_LINUX_PPDEV_H if (x->device>0){ ioctl (x->device, PPWDATA, &b); @@ -127,13 +127,13 @@ static void lpt_float(t_lpt *x, t_floatarg f) static void lpt_control(t_lpt *x, t_floatarg f) { +#ifdef Z_WANT_LPT unsigned char b = f; # ifdef HAVE_LINUX_PPDEV_H if (x->device>0){ ioctl (x->device, PPWCONTROL, &b); } else # endif -#ifdef Z_WANT_LPT if (x->port) { sys_outb(b, x->port+2); } @@ -142,6 +142,7 @@ static void lpt_control(t_lpt *x, t_floatarg f) static void lpt_bang(t_lpt *x) { +#ifdef Z_WANT_LPT # ifdef HAVE_LINUX_PPDEV_H if (x->device>0){ unsigned char b=0; @@ -149,7 +150,6 @@ static void lpt_bang(t_lpt *x) outlet_float(x->x_obj.ob_outlet, (float)b); } else # endif -#ifdef Z_WANT_LPT if (x->port) { outlet_float(x->x_obj.ob_outlet, (float)sys_inb(x->port+1)); } @@ -253,8 +253,11 @@ static void *lpt_new(t_symbol *s, int argc, t_atom *argv) if (x->mode==MODE_IOPL)post("lpt-warning: this might seriously damage your pc..."); #else error("zexy has been compiled without [lpt]!"); + count_iopl=0; #endif /* Z_WANT_LPT */ + devname=0; + return (x); } -- cgit v1.2.1