aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2006-01-23 18:11:20 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2006-01-23 18:11:20 +0000
commit242592b5ed164d44c2c05d4c68c5d5c694ca0a9a (patch)
tree30aa42a4b8d18769e1f2f2f96f9bd18dd37274c0
parentb614183d637d97b51c82f700039152a1166c6077 (diff)
get the ifdef-bracketting right to have even less errors
svn path=/trunk/externals/zexy/; revision=4474
-rw-r--r--src/lpt.c9
1 files 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);
}