preliminary draft of manufacture(...) {} macro
authorxchaos <xchaos@4bb87942-c103-4e5a-b51c-0ebff58f8515>
Fri, 2 Dec 2011 17:11:30 +0000 (17:11 +0000)
committerxchaos <xchaos@4bb87942-c103-4e5a-b51c-0ebff58f8515>
Fri, 2 Dec 2011 17:11:30 +0000 (17:11 +0000)
git-svn-id: https://dev.arachne.cz/repos/cll1h/trunk@136 4bb87942-c103-4e5a-b51c-0ebff58f8515

crl1.h

diff --git a/crl1.h b/crl1.h
index 54bf05597e7f54d48886805a2b277ab21fa25cc6..9d12b47f8f32c915fd06724a15a84e0b3914dd10 100644 (file)
--- a/crl1.h
+++ b/crl1.h
@@ -154,6 +154,7 @@ unsigned RANDOM_SEED=0;
 #define repeat(N) for(int _i=0,_j=(N); _i++<_j;)
 #define for_each(ONE_T,ONE,ALL_T,...) for(_init_##ONE_T##_##ALL_T(_head_##ONE_T##_##ALL_T(ONE,__VA_ARGS__));_test_##ONE_T##_##ALL_T(ONE,__VA_ARGS__) || _free_##ONE_T##_##ALL_T(ONE,__VA_ARGS__);_next_##ONE_T##_##ALL_T(ONE,__VA_ARGS__))
 #define count(ONE_T,ALL_T,...) _count_##ONE_T##_##ALL_T(__VA_ARGS__)
+#define manufacture(OUT_T,OUT,ONE_T,ONE,ALL_T,...) if(_start_##ONE_T##OUT_T##_(OUT,count(ONE_T,ALL_T,__VA_ARGS__))) for_each(ONE_T,ONE,ALL_T,__VA_ARGS__) if(_append_##ONE_T##OUT_T##_(ONE))
 #define _init_char_str(...) str _s=(__VA_ARGS__)
 #define _head_char_str(ONE,ALL) ONE=(ALL?*ALL:0),ALL
 #define _test_char_str(ONE,...) ONE
This page took 0.178048 seconds and 4 git commands to generate.