Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

tools/rpmlead.c

Go to the documentation of this file.
00001 /* rpmlead: spit out the lead portion of a package */
00002 
00003 #include "system.h"
00004 
00005 #include "rpmio.h"
00006 #include "rpmlead.h"
00007 #include "debug.h"
00008 
00009 int main(int argc, char **argv)
00010 {
00011     FD_t fdi, fdo;
00012     struct rpmlead lead;
00013     
00014     setprogname(argv[0]);       /* Retrofit glibc __progname */
00015     if (argc == 1) {
00016         fdi = Fopen("-", "r.ufdio");
00017     } else {
00018         fdi = Fopen(argv[1], "r.ufdio");
00019     }
00020     if (fdi == NULL || Ferror(fdi)) {
00021         perror(argv[1]);
00022         exit(EXIT_FAILURE);
00023     }
00024 
00025     readLead(fdi, &lead);
00026     fdo = Fopen("-", "w.ufdio");
00027     writeLead(fdo, &lead);
00028     
00029     return 0;
00030 }

Generated at Mon May 21 08:53:40 2001 for rpm by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001