1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/* rpmlead: spit out the lead portion of a package */ #include "system.h" #include "rpmlead.h" #include "intl.h" int main(int argc, char **argv) { int fd; struct rpmlead lead; if (argc == 1) { fd = 0; } else { fd = open(argv[1], O_RDONLY, 0644); } readLead(fd, &lead); writeLead(1, &lead); return 0; }