From: Frank Mori Hess Date: Sat, 1 Dec 2007 15:53:18 +0000 (+0000) Subject: Got rid of obsolete error codes. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=792e4b741f929dbee6c77d1d167bb7052deb3f25;p=comedilib.git Got rid of obsolete error codes. --- diff --git a/lib/error.c b/lib/error.c index 96a73fc..2f55e1f 100644 --- a/lib/error.c +++ b/lib/error.c @@ -98,7 +98,7 @@ void internal_error(int err) int valid_dev(comedi_t *it) { if(!it || it->magic!=COMEDILIB_MAGIC){ - internal_error(COMEDILIB_BADDEV); + internal_error(EBAD_CT); return 0; } @@ -109,7 +109,7 @@ int valid_subd(comedi_t *it,unsigned int subd) { if(!valid_dev(it))return 0; if(subd>=it->n_subdevices){ - internal_error(COMEDILIB_BADSUBD); + internal_error(EINVAL_SUBD); return 0; } @@ -120,7 +120,7 @@ int valid_chan(comedi_t *it,unsigned int subd,unsigned int chan) { if(!valid_subd(it,subd))return 0; if(chan>=it->subdevices[subd].n_chan){ - internal_error(COMEDILIB_BADCHAN); + internal_error(EINVAL_CHAN); return 0; } diff --git a/lib/libinternal.h b/lib/libinternal.h index 2722816..d260c00 100644 --- a/lib/libinternal.h +++ b/lib/libinternal.h @@ -141,14 +141,6 @@ int valid_dev(comedi_t *it); int valid_subd(comedi_t *it,unsigned int subdevice); int valid_chan(comedi_t *it,unsigned int subdevice,unsigned int chan); -enum{ - COMEDILIB_NOERROR = 0x1000, - COMEDILIB_UNKNOWN, - COMEDILIB_BADDEV, - COMEDILIB_BADSUBD, - COMEDILIB_BADCHAN, -}; - /* used by range.c, was in comedilib.h but apparently deprecated so I put it here - fmhess */ int comedi_get_rangetype(comedi_t *it,unsigned int subdevice,unsigned int chan);