diff options
Diffstat (limited to 'h')
-rw-r--r-- | h/aconfig.h | 4 | ||||
-rw-r--r-- | h/counters.h | 14 |
2 files changed, 16 insertions, 2 deletions
diff --git a/h/aconfig.h b/h/aconfig.h index 91e43b8..31211e9 100644 --- a/h/aconfig.h +++ b/h/aconfig.h @@ -9,8 +9,8 @@ /* minor number = 8 bits */ /* major number = 8 bits */ -#define ARGYLL_VERSION 0x01063 -#define ARGYLL_VERSION_STR "1.6.3" +#define ARGYLL_VERSION 0x01070 +#define ARGYLL_VERSION_STR "1.7.0" /* Maximum file path length */ #define MAXNAMEL 1024 diff --git a/h/counters.h b/h/counters.h index e3944d9..0fbb11a 100644 --- a/h/counters.h +++ b/h/counters.h @@ -54,6 +54,17 @@ /* After init or increment, expression is TRUE if counter is done */ #define DC_DONE(nn) \ (nn##_e >= nn##_di) + +/* Typical use: + + DCOUNT(cc, 15, 3, -1, -1, 2); + + DC_INIT(cc); + while(!DC_DONE(cc)) { + + DC_INC(cc); + } + */ /* (Do we need a version of the above that tracks the actual input coords ?) */ /* ------------------------------------------------------- */ @@ -137,6 +148,9 @@ /* Declare the counter name nn, combinations out of total */ /* mxdi should be set to maximum combinations */ +/* e.g. if there are 8 objects, and we want all combinations */ +/* of 4 out of the 8, we would use: COMBO(nn, 4, 4, 8) */ + #define COMBO(nn, mxdi, comb, total) \ int nn[mxdi+2]; /* counter value */ \ int nn##_cmb = (comb); /* number of combinations */ \ |