!<arch> Islget 418431500 968 27 100644 67 ` 10th 1st 2nd 3rd 4th 5th 6th 7th 8th 9th AAA aaa Aaa BBB bbb Bbb Oslget 418431500 968 27 100644 67 ` Bbb bbb BBB Aaa aaa AAA 9th 8th 7th 6th 5th 4th 3rd 2nd 1st 10th Tslget.c 418431500 968 27 100644 638 ` /* * slget() * slrewind() */ #include <stdio.h> #include "null.h" #include "slist.h" #define KEYSIZE 10 char *PGN = "Tslget"; main() { char key[KEYSIZE]; /* key to be added */ char *gets(); /* get a line from stdin */ char *nextkey; /* pointer to next key */ char *slprepend(); /* prepend key */ char *slget(); /* get next key */ SLIST *slinit(); /* initialize list */ SLIST *slist; /* pointer to list head block */ void slrewind(); /* rewind list */ slist = slinit(); while (gets(key) != NULL) slprepend(key, slist); slrewind(slist); while ((nextkey = slget(slist)) != NULL) puts(nextkey); exit(0); }