#include <stdio.h>
typedef struct dlNode {
const struct dlNode* next, *prev;
void* datum;
} dlNode;
const static dlNode tail;
const static dlNode head={
.next=&tail,
.prev=NULL,
.datum=NULL
};
const static dlNode tail={
.next=NULL,
.prev=&head,
.datum=NULL
};
int main(void) {
printf("head = %p\n", (void*)&head
); printf("tail = %p\n", (void*)&tail
); printf("head.next = %p\n", (void*)head.
next); printf("tail.prev = %p\n", (void*)tail.
prev); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp0eXBlZGVmIHN0cnVjdCBkbE5vZGUgewogICAgY29uc3Qgc3RydWN0IGRsTm9kZSogbmV4dCwgKnByZXY7CiAgICB2b2lkKiBkYXR1bTsKfSBkbE5vZGU7Cgpjb25zdCBzdGF0aWMgZGxOb2RlIHRhaWw7Cgpjb25zdCBzdGF0aWMgZGxOb2RlIGhlYWQ9ewogICAgLm5leHQ9JnRhaWwsCiAgICAucHJldj1OVUxMLAogICAgLmRhdHVtPU5VTEwKfTsKCmNvbnN0IHN0YXRpYyBkbE5vZGUgdGFpbD17CiAgICAubmV4dD1OVUxMLAogICAgLnByZXY9JmhlYWQsCiAgICAuZGF0dW09TlVMTAp9OwoKaW50IG1haW4odm9pZCkgewogICAgcHJpbnRmKCJoZWFkID0gJXBcbiIsICh2b2lkKikmaGVhZCk7CiAgICBwcmludGYoInRhaWwgPSAlcFxuIiwgKHZvaWQqKSZ0YWlsKTsKICAgIHByaW50ZigiaGVhZC5uZXh0ID0gJXBcbiIsICh2b2lkKiloZWFkLm5leHQpOwogICAgcHJpbnRmKCJ0YWlsLnByZXYgPSAlcFxuIiwgKHZvaWQqKXRhaWwucHJldik7CiAgICByZXR1cm4gMDsKfQo=