From 2dfb23016c39a331bf5ed4111b630dffa330edbb Mon Sep 17 00:00:00 2001 From: "nicolas.zilio@hotmail.fr" <> Date: Mon, 14 Sep 2015 11:56:38 +0200 Subject: views working fine, units in progress --- pcilib/unit.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 pcilib/unit.h (limited to 'pcilib/unit.h') diff --git a/pcilib/unit.h b/pcilib/unit.h new file mode 100644 index 0000000..f9991f1 --- /dev/null +++ b/pcilib/unit.h @@ -0,0 +1,30 @@ +#ifndef _PCILIB_UNITS_H +#define _PCILIB_UNITS_H + +#include "pcilib.h" + +typedef struct pcilib_unit_s pcilib_unit_t; +typedef struct pcilib_transform_unit_s pcilib_transform_unit_t; + +/** + * type to save a transformation unit in the pcitool program + */ +struct pcilib_transform_unit_s{ + char *name; + char *transform_formula; +}; + +/** + * type to save a unit in the pcitool programm + */ +struct pcilib_unit_s{ + char* name; + pcilib_transform_unit_t* other_units; +}; + +/** + * function to populate the ctx with units + */ +int pcilib_add_units(pcilib_t* ctx, size_t n, const pcilib_unit_t* units); + +#endif -- cgit v1.2.3 From c71075ca84d896c650dd0b65c7664149ed51dcec Mon Sep 17 00:00:00 2001 From: "nicolas.zilio@hotmail.fr" <> Date: Tue, 15 Sep 2015 11:36:20 +0200 Subject: addition of other remarks, cleaning in progress --- pcilib/unit.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pcilib/unit.h') diff --git a/pcilib/unit.h b/pcilib/unit.h index f9991f1..4a99f5b 100644 --- a/pcilib/unit.h +++ b/pcilib/unit.h @@ -3,6 +3,8 @@ #include "pcilib.h" +#define PCILIB_MAX_TRANSFORMS_PER_UNIT 16 + typedef struct pcilib_unit_s pcilib_unit_t; typedef struct pcilib_transform_unit_s pcilib_transform_unit_t; @@ -19,7 +21,7 @@ struct pcilib_transform_unit_s{ */ struct pcilib_unit_s{ char* name; - pcilib_transform_unit_t* other_units; + pcilib_transform_unit_t other_units[PCILIB_MAX_TRANSFORMS_PER_UNIT]; }; /** -- cgit v1.2.3 From 33db9c07bd08fae74c145c547f1b0e9f55ab25ae Mon Sep 17 00:00:00 2001 From: "nicolas.zilio@hotmail.fr" <> Date: Tue, 15 Sep 2015 12:07:04 +0200 Subject: merge views and units, some name homogeneisation --- pcilib/unit.h | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 pcilib/unit.h (limited to 'pcilib/unit.h') diff --git a/pcilib/unit.h b/pcilib/unit.h deleted file mode 100644 index 4a99f5b..0000000 --- a/pcilib/unit.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _PCILIB_UNITS_H -#define _PCILIB_UNITS_H - -#include "pcilib.h" - -#define PCILIB_MAX_TRANSFORMS_PER_UNIT 16 - -typedef struct pcilib_unit_s pcilib_unit_t; -typedef struct pcilib_transform_unit_s pcilib_transform_unit_t; - -/** - * type to save a transformation unit in the pcitool program - */ -struct pcilib_transform_unit_s{ - char *name; - char *transform_formula; -}; - -/** - * type to save a unit in the pcitool programm - */ -struct pcilib_unit_s{ - char* name; - pcilib_transform_unit_t other_units[PCILIB_MAX_TRANSFORMS_PER_UNIT]; -}; - -/** - * function to populate the ctx with units - */ -int pcilib_add_units(pcilib_t* ctx, size_t n, const pcilib_unit_t* units); - -#endif -- cgit v1.2.3