1 /* musiprog.h -- include file for cmt application programs */ 2 3 #include "stdio.h" 4 #include "cext.h" 5 #include "midifns.h" 6 #include "userio.h" 7 #include "timebase.h" 8 #include "moxc.h" 9 10 /* 11 * override the definition of l_rest - l_rest is not recommended because 12 * it stops polling for input. If you really want to use it, use #undef 13 * to make it visible. 14 */ 15 #define l_rest(d) m_rest(d) 16 #define l_restuntil(t) m_restuntil(t) 17 18 /* 19 * The default implementation of rest() and restuntil() poll for 20 * input during the rest. You might call rest() or restuntil() from 21 * mainscore(), but it is generally a bad idea to rest at all. If 22 * you are in a rest(), you get an event, e.g. keydown(), and you 23 * make a nested call to rest(), the original rest will be locked out 24 * until the nested one returns. It's better to use cause(). 25 */ 26 #define rest(x) l_rest( (long) x ) 27 #define restuntil(x) l_restuntil( (long) x) 28 29 #define repeat(var, count) {int var; for (var=1; var <= count; var++) { 30 #define endrep ;}} 31 32