localstatedir should be /var, thus we need append a lib/ here
[comedilib.git] / lib / range.c
index a526d82e377153c299d6de999f93d6dace0aa3c8..cc6115d3d8304da8506f1818722a802761557ea9 100644 (file)
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <errno.h>
-#include <comedi.h>
 #include <string.h>
 
-#include <libinternal.h>
+#include "libinternal.h"
 
 
 /* sometimes we can't find a definition of NAN */
@@ -51,8 +50,8 @@
 
 static enum comedi_oor_behavior comedi_oor_is_nan = COMEDI_OOR_NAN;
 
-EXPORT_SYMBOL(comedi_set_global_oor_behavior,0.7.18);
-enum comedi_oor_behavior comedi_set_global_oor_behavior(
+EXPORT_ALIAS_DEFAULT(_comedi_set_global_oor_behavior,comedi_set_global_oor_behavior,0.7.18);
+enum comedi_oor_behavior _comedi_set_global_oor_behavior(
        enum comedi_oor_behavior behavior)
 {
        int old_behavior=comedi_oor_is_nan;
@@ -63,8 +62,8 @@ enum comedi_oor_behavior comedi_set_global_oor_behavior(
 }
 
 
-EXPORT_SYMBOL(comedi_to_phys,0.7.18);
-double comedi_to_phys(lsampl_t data,comedi_range *rng,lsampl_t maxdata)
+EXPORT_ALIAS_DEFAULT(_comedi_to_phys,comedi_to_phys,0.7.18);
+double _comedi_to_phys(lsampl_t data,comedi_range *rng,lsampl_t maxdata)
 {
        double x;
 
@@ -82,8 +81,8 @@ double comedi_to_phys(lsampl_t data,comedi_range *rng,lsampl_t maxdata)
        return x;
 }
 
-EXPORT_SYMBOL(comedi_from_phys,0.7.18);
-lsampl_t comedi_from_phys(double data,comedi_range *rng,lsampl_t maxdata)
+EXPORT_ALIAS_DEFAULT(_comedi_from_phys,comedi_from_phys,0.7.18);
+lsampl_t _comedi_from_phys(double data,comedi_range *rng,lsampl_t maxdata)
 {
        double s;
 
@@ -97,8 +96,8 @@ lsampl_t comedi_from_phys(double data,comedi_range *rng,lsampl_t maxdata)
        return (lsampl_t)(floor(s+0.5));
 }
 
-EXPORT_SYMBOL(comedi_find_range,0.7.18);
-int comedi_find_range(comedi_t *it,unsigned int subd,unsigned int chan,unsigned int unit,double min,double max)
+EXPORT_ALIAS_DEFAULT(_comedi_find_range,comedi_find_range,0.7.18);
+int _comedi_find_range(comedi_t *it,unsigned int subd,unsigned int chan,unsigned int unit,double min,double max)
 {
        unsigned int range_type;
        int best;
@@ -123,8 +122,8 @@ int comedi_find_range(comedi_t *it,unsigned int subd,unsigned int chan,unsigned
        return best;
 }
 
-EXPORT_SYMBOL(comedi_get_n_ranges,0.7.18);
-int comedi_get_n_ranges(comedi_t *it,unsigned int subd,unsigned int chan)
+EXPORT_ALIAS_DEFAULT(_comedi_get_n_ranges,comedi_get_n_ranges,0.7.18);
+int _comedi_get_n_ranges(comedi_t *it,unsigned int subd,unsigned int chan)
 {
        unsigned int range_type;
 
@@ -134,14 +133,14 @@ int comedi_get_n_ranges(comedi_t *it,unsigned int subd,unsigned int chan)
        return RANGE_LENGTH(range_type);
 }
 
-EXPORT_SYMBOL(comedi_range_is_chan_specific,0.7.18);
-int comedi_range_is_chan_specific(comedi_t *it,unsigned int subd)
+EXPORT_ALIAS_DEFAULT(_comedi_range_is_chan_specific,comedi_range_is_chan_specific,0.7.18);
+int _comedi_range_is_chan_specific(comedi_t *it,unsigned int subd)
 {
        return (it->subdevices[subd].subd_flags&SDF_RANGETYPE)?1:0;
 }
 
-EXPORT_SYMBOL(comedi_sampl_to_phys,0.7.19);
-int comedi_sampl_to_phys(double *dest, int dst_stride, sampl_t *src,
+EXPORT_ALIAS_DEFAULT(_comedi_sampl_to_phys,comedi_sampl_to_phys,0.7.18);
+int _comedi_sampl_to_phys(double *dest, int dst_stride, sampl_t *src,
        int src_stride, comedi_range *rng, lsampl_t maxdata, int n)
 {
        int oor = 0;
@@ -177,8 +176,8 @@ int comedi_sampl_to_phys(double *dest, int dst_stride, sampl_t *src,
        return oor;
 }
 
-EXPORT_SYMBOL(comedi_sampl_from_phys,0.7.19);
-int comedi_sampl_from_phys(sampl_t *dest,int dst_stride,double *src,
+EXPORT_ALIAS_DEFAULT(_comedi_sampl_from_phys,comedi_sampl_from_phys,0.7.18);
+int _comedi_sampl_from_phys(sampl_t *dest,int dst_stride,double *src,
        int src_stride, comedi_range *rng, lsampl_t maxdata, int n)
 {
        int oor = 0;