/* See LICENSE file for copyright and license details. */ #include "common.h" #ifndef TEST /** * Undo `libnormalform_set_indices_and_counts__` * * This is needed because `libnormalform_set_indices_and_counts__` * requires some otherwise unused memory to be properly initialised * * @param this The sentence that shall be recursively restored */ void (libnormalform_reset_indices_and_counts__)(LIBNORMALFORM_SENTENCE *this) { LIBNORMALFORM_SENTENCE *head = NULL; this->travel_count -= 1; do { this->travel_index = 0; if (IS_BRANCH(this)) { if (!--RIGHT(this)->travel_count) PUSH(&head, RIGHT(this)); if (!--LEFT(this)->travel_count) PUSH(&head, LEFT(this)); } } while (POP(&head, &this)); #undef UNMARK } #else CONST int main(void) { return 0; /* indirectly tested */ } #endif