Mercurial > code > home > repos > light9
diff light8/parport.c @ 115:f0e27aa8f0f5
attempt to make a better exception with getparport(). didn't help, afaict
author | drewp |
---|---|
date | Fri, 13 Jun 2003 06:13:31 +0000 |
parents | f974a462133f |
children |
line wrap: on
line diff
--- a/light8/parport.c Fri Jun 13 06:13:10 2003 +0000 +++ b/light8/parport.c Fri Jun 13 06:13:31 2003 +0000 @@ -6,13 +6,15 @@ #include <fcntl.h> #include <Python.h> -void getparport() { +int getparport() { if( ioperm(888,3,1) ) { printf("Couldn't get parallel port at 888-890\n"); // the following doesn't have any effect! PyErr_SetString(PyExc_IOError,"Couldn't get parallel port at 888-890"); + return 0; } + return 1; } void outdata(unsigned char val) {