diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-03-31 20:52:16 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-03-31 20:52:16 -0700 |
commit | 40d1cc8671870ee13184d0fb5d96a6472886ad66 (patch) | |
tree | 5ebcf98074b2a4c8a06b93c7aea09322d26d6f59 | |
parent | 0a0f8f225ef9119adbac8e2ef313a72fb46a7f7d (diff) | |
download | cppawk-40d1cc8671870ee13184d0fb5d96a6472886ad66.tar.gz cppawk-40d1cc8671870ee13184d0fb5d96a6472886ad66.tar.bz2 cppawk-40d1cc8671870ee13184d0fb5d96a6472886ad66.zip |
iter: fix circular header inclusion issue.
- Add forgotten define __CPPAWK_ITER_H.
- This requires the include of "cons.h" to be moved a bit
down, since that uses the doarray and whatnot.
We move it above loop; "cons.h" doesn't use that.
-rw-r--r-- | cppawk-include/iter.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cppawk-include/iter.h b/cppawk-include/iter.h index 57ff81e..8b6a3ce 100644 --- a/cppawk-include/iter.h +++ b/cppawk-include/iter.h @@ -26,15 +26,12 @@ // POSSIBILITY OF SUCH DAMAGE. #ifndef __CPPAWK_ITER_H +#define __CPPAWK_ITER_H #ifndef __CPPAWK_BASE_H #include "base.h" #endif -#ifndef __CPPAWK_CONS_H -#include "cons.h" -#endif - #ifndef __CPPAWK_NARG_PRIV_H #include "narg-priv.h" #endif @@ -53,6 +50,10 @@ for (index = 1; index <= NF; index++) \ if ((val = $ index) || 1) +#ifndef __CPPAWK_CONS_H +#include "cons.h" +#endif + #define loop(...) for (__loop_init(__VA_ARGS__); \ (__loop_test(__VA_ARGS__) || \ __loop_fini(__VA_ARGS__)) && \ |