Mercurial > hg > Papers > 2018 > ryokka-thesis
view final_main/src/akashaMeta.c @ 5:eafc166804f3
fix Capter4.2,5,1
author | ryokka |
---|---|
date | Mon, 19 Feb 2018 18:44:59 +0900 |
parents | 93d26c4576d3 |
children |
line wrap: on
line source
__code meta(struct Context* context, enum Code next) { struct Iterator* iter = &context->data[Iter]->iterator; switch (context->prev) { case GoToPreviousDepth: if (iter->iteratedPointDataNum == 0) break; if (iter->iteratedPointHeap == NULL) break; unsigned int diff =(unsigned long)context->heap - (unsigned long)iter->iteratedPointHeap; memset(iter->iteratedPointHeap, 0, diff); context->dataNum = iter->iteratedPointDataNum; context->heap = iter->iteratedPointHeap; break; default: break; } switch (next) { case PutAndGoToNextDepth: // with assert check if (context->prev == GoToPreviousDepth) break; if (iter->previousDepth == NULL) break; iter->previousDepth->iteratedPointDataNum = context->dataNum; iter->previousDepth->iteratedPointHeap = context->heap; break; default: break; } context->prev = next; goto (context->code[next])(context); }