diff options
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); } |