diff options
author | 2008-05-31 16:31:03 -0400 | |
---|---|---|
committer | 2008-05-31 17:07:32 -0400 | |
commit | 5258cd939bd6c3e26ca295f700aee477a75288e7 (patch) | |
tree | 3e8b17307cac1acaa83e7b1d3d96dfa99507ea5b /rpmoffset.c | |
parent | add files to help with dist (diff) | |
download | rpm2targz-5258cd939bd6c3e26ca295f700aee477a75288e7.tar.gz rpm2targz-5258cd939bd6c3e26ca295f700aee477a75288e7.tar.bz2 rpm2targz-5258cd939bd6c3e26ca295f700aee477a75288e7.zip |
add support for rpms with bzip2 compression
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'rpmoffset.c')
-rw-r--r-- | rpmoffset.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/rpmoffset.c b/rpmoffset.c index ac5984c..524e310 100644 --- a/rpmoffset.c +++ b/rpmoffset.c @@ -16,8 +16,17 @@ main() { char *buff = malloc(RPMBUFSIZ),*eb,*p; for (p = buff, eb = buff + read(0,buff,RPMBUFSIZ); p < eb; p++) + { if (*p == '\037' && p[1] == '\213' && p[2] == '\010') - printf("%d\n",p - buff), + { + printf("%d\n",p - buff); exit(0); + } + else if (*p == 'B' && p[1] == 'Z' && p[2] == 'h') + { + printf("%d\n",p - buff); + exit(0); + } + } exit(1); } |