1: #include <stdio.h> 2: #include <sys/param.h> 3: #include <sys/ino.h> 4: #include <dumprestor.h> 5: struct idates dat; 6: 7: main() { 8: int f; 9: char *ctime(); 10: long tim; 11: 12: if ((f = open("/etc/ddate",0)) < 0) { 13: printf("Can't open /etc/ddate.\n"); 14: exit(1); 15: } 16: while (read(f,(char *)&dat,sizeof(dat)) > 0 ) { 17: tim = dat.id_ddate; 18: printf("%5s, Level %c, %s",dat.id_name ,dat.id_incno, 19: ctime(&tim) ); 20: } 21: }