summaryrefslogtreecommitdiff
path: root/h
diff options
context:
space:
mode:
Diffstat (limited to 'h')
-rwxr-xr-x[-rw-r--r--]h/License.txt0
-rwxr-xr-x[-rw-r--r--]h/Readme.txt0
-rwxr-xr-x[-rw-r--r--]h/aconfig.h10
-rwxr-xr-x[-rw-r--r--]h/afiles0
-rwxr-xr-x[-rw-r--r--]h/copyright.h0
-rwxr-xr-x[-rw-r--r--]h/counters.h30
-rwxr-xr-x[-rw-r--r--]h/llist.h0
-rwxr-xr-x[-rw-r--r--]h/sort.h6
-rwxr-xr-x[-rw-r--r--]h/xlist.h0
9 files changed, 32 insertions, 14 deletions
diff --git a/h/License.txt b/h/License.txt
index a871fcf..a871fcf 100644..100755
--- a/h/License.txt
+++ b/h/License.txt
diff --git a/h/Readme.txt b/h/Readme.txt
index fecc33a..fecc33a 100644..100755
--- a/h/Readme.txt
+++ b/h/Readme.txt
diff --git a/h/aconfig.h b/h/aconfig.h
index c9d6fc9..dde4e69 100644..100755
--- a/h/aconfig.h
+++ b/h/aconfig.h
@@ -7,7 +7,7 @@
/*
* Author: Graeme W. Gill
*
- * Copyright 2006 - 2016, Graeme W. Gill
+ * Copyright 2006 - 2017, Graeme W. Gill
* All rights reserved.
*
* This material is licenced under the GNU GENERAL PUBLIC LICENSE Version 2 or later :-
@@ -24,8 +24,8 @@
/* major number = 8 bits */
#ifndef USE_NG_VERSION
-# define ARGYLL_VERSION 0x01092
-# define ARGYLL_VERSION_STR "1.9.2"
+# define ARGYLL_VERSION 0x02000
+# define ARGYLL_VERSION_STR "2.0.0"
#else
# define ARGYLL_VERSION NG_VERSION
# define ARGYLL_VERSION_STR "NG_VERSION_STR"
@@ -40,13 +40,13 @@
#endif
#if defined(UNIX)
# if defined(__APPLE__)
-# if defined(__P64__)
+# if defined(__LP64__) || defined(__ILP64__) || defined(__LLP64__)
# define ARGYLL_BUILD_STR "OS X 64 bit"
# else
# define ARGYLL_BUILD_STR "OS X 32 bit"
# endif
# else
-# if defined(__P64__)
+# if defined(__LP64__) || defined(__ILP64__) || defined(__LLP64__)
# define ARGYLL_BUILD_STR "Linux 64 bit"
# else
# define ARGYLL_BUILD_STR "Linux 32 bit"
diff --git a/h/afiles b/h/afiles
index 86572ca..86572ca 100644..100755
--- a/h/afiles
+++ b/h/afiles
diff --git a/h/copyright.h b/h/copyright.h
index 3d8c5f7..3d8c5f7 100644..100755
--- a/h/copyright.h
+++ b/h/copyright.h
diff --git a/h/counters.h b/h/counters.h
index 391dbe1..7e48e03 100644..100755
--- a/h/counters.h
+++ b/h/counters.h
@@ -71,6 +71,7 @@
*/
/* (Do we need a version of the above that tracks the actual input coords ?) */
+
/* ------------------------------------------------------- */
/* Similar to abovem but each dimension range can be clipped. */
@@ -81,12 +82,20 @@
int nn##_res[mxdi]; /* last count +1 */ \
int nn##_e /* dimension index */
+/* Set start and end+1 to uniform values */
#define FRECONF(nn, start, endp1) \
for (nn##_e = 0; nn##_e < nn##_di; nn##_e++) { \
nn##_stt[nn##_e] = (start); /* start count value */ \
nn##_res[nn##_e] = (endp1); /* last count +1 */ \
}
+/* Set start and end+1 to individual values */
+#define FRECONFA(nn, start, endp1) \
+ for (nn##_e = 0; nn##_e < nn##_di; nn##_e++) { \
+ nn##_stt[nn##_e] = (start)[nn##_e]; /* start count value */ \
+ nn##_res[nn##_e] = (endp1)[nn##_e]; /* last count +1 */ \
+ }
+
/* Set the counter value to 0 */
#define FC_INIT(nn) \
{ \
@@ -113,6 +122,7 @@
/* ------------------------------------------------------- */
/* Same as above, but allows for variable resolution on each axis. */
/* End offset is added to count[] */
+/* (Hmm. Could merge FCOUNT and ECOUNT ?) */
#define ECOUNT(nn, mxdi, di, start, endp1, end_offst) \
int nn[mxdi]; /* counter value */ \
@@ -155,20 +165,28 @@
/* 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) */
+/* Declare and initialize */
#define COMBO(nn, mxdi, comb, total) \
int nn[mxdi+2]; /* counter value */ \
int nn##_cmb = (comb); /* number of combinations */ \
int nn##_tot = (total); /* out of total possible */ \
int nn##_e /* dimension index */
-/* Set total to new setting */
-#define CB_SETT(nn, total) \
- nn##_tot = (total) /* total possible */
+/* Declare, but don't initialize */
+#define COMBO_DEC(nn, mxdi) \
+ int nn[mxdi+2]; /* counter value */ \
+ int nn##_cmb; /* number of combinations */ \
+ int nn##_tot; /* out of total possible */ \
+ int nn##_e /* dimension index */
/* Set combinations to new setting */
#define CB_SETC(nn, comb) \
nn##_cmb = (comb) /* number of combinations*/
+/* Set total to new setting */
+#define CB_SETT(nn, total) \
+ nn##_tot = (total) /* total possible */
+
/* Set the counter to its initial value */
#define CB_INIT(nn) \
{ \
@@ -183,9 +201,9 @@
for (nn##_e = 0; nn##_e < nn##_cmb; nn##_e++) { \
nn[nn##_e]++; \
if (nn[nn##_e] < (nn##_tot-nn##_e)) { \
- int nn##_ee; /* No carry */ \
- for (nn##_ee = nn##_e-1; nn##_ee >= 0; nn##_ee--) \
- nn[nn##_ee] = nn[nn##_ee+1] + 1; \
+ int _combo_ee; /* No carry */ \
+ for (_combo_ee = nn##_e-1; _combo_ee >= 0; _combo_ee--) \
+ nn[_combo_ee] = nn[_combo_ee+1] + 1; \
break; \
} \
} \
diff --git a/h/llist.h b/h/llist.h
index 0edd06f..0edd06f 100644..100755
--- a/h/llist.h
+++ b/h/llist.h
diff --git a/h/sort.h b/h/sort.h
index 8440425..9c1c286 100644..100755
--- a/h/sort.h
+++ b/h/sort.h
@@ -28,10 +28,10 @@
int hs_l,hs_j,hs_ir,hs_i; \
TYPE hs_rra; \
\
- if (NUMBER >= 2) \
+ if ((NUMBER) >= 2) \
{ \
- hs_l = NUMBER >> 1; \
- hs_ir = NUMBER-1; \
+ hs_l = (NUMBER) >> 1; \
+ hs_ir = (NUMBER)-1; \
for (;;) \
{ \
if (hs_l > 0) \
diff --git a/h/xlist.h b/h/xlist.h
index a9b3c6f..a9b3c6f 100644..100755
--- a/h/xlist.h
+++ b/h/xlist.h