+/** Iterate through \a list of G-lines. Use this like a for loop,
+ * i.e., follow it with braces and use whatever you passed as \a gl
+ * as a single G-line to be acted upon.
+ *
+ * @param[in] list List of G-lines to iterate over.
+ * @param[in] gl Name of a struct Gline pointer variable that will be made to point to the G-lines in sequence.
+ * @param[in] next Name of a scratch struct Gline pointer variable.
+ */
+#define gliter(list, gl, next) \
+ /* Iterate through the G-lines in the list */ \
+ for ((gl) = (list); (gl); (gl) = (next)) \
+ /* Figure out the next pointer in list... */ \
+ if ((((next) = (gl)->gl_next) || 1) && \
+ /* Then see if it's expired */ \
+ (gl)->gl_rexpire <= CurrentTime) \
+ /* Record has expired, so free the G-line */ \
+ gline_free((gl)); \
+ /* See if we need to expire the G-line */ \
+ else if (((gl)->gl_expire > CurrentTime || \
+ ((gl)->gl_flags &= ~GLINE_ACTIVE)) && 0) \
+ ; /* empty statement */ \
+ else
+