home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
misc
/
src
/
rpm
/
tools
/
rpmlead.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-09-17
|
370b
|
25 lines
/* rpmlead: spit out the lead portion of a package */
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include "rpmlead.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;
}