/* lista.toteutuksen.kayttoesimerkki.c SJ */ /* Käännös: gcc element.c lista.2linkitettytoteutus.c lista.toteutuksen.kayttoesimerkki.c */ #include "lista.2linkitettytoteutus.h" int main() { LIST L; LIST_POSITION p; ELEMENT x; /* integer */ int i; LIST_CREATE(L); for (i = 1 ; i <= 10; i++) LIST_INSERT(L, LIST_EOL(L), i); p = LIST_FIRST(L); while (p != LIST_EOL(L)) { printf("%d ", LIST_RETRIEVE(L, p)); p = LIST_NEXT(L, p); } printf("\n"); exit(0); }