diff options
author | Arne Schwabe <arne@rfc2549.org> | 2015-08-10 13:51:40 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2015-08-10 13:51:40 +0200 |
commit | 98399ed51045871f8d73599322b6947d6b2b80d0 (patch) | |
tree | 28eb352fc1fd89f9c0969cfe0e7c384dee8b17df /main/lzo/examples/lzopack.c | |
parent | e6af88b346e9eb5be462429bf9786e7e89ce0e0d (diff) |
Update lzo to 2.09
Diffstat (limited to 'main/lzo/examples/lzopack.c')
-rw-r--r-- | main/lzo/examples/lzopack.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/main/lzo/examples/lzopack.c b/main/lzo/examples/lzopack.c index 10e2c1dc..c01b47dc 100644 --- a/main/lzo/examples/lzopack.c +++ b/main/lzo/examples/lzopack.c @@ -2,7 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -36,8 +36,8 @@ // Please study LZO.FAQ and simple.c first. **************************************************************************/ -#include "lzo/lzoconf.h" -#include "lzo/lzo1x.h" +#include <lzo/lzoconf.h> +#include <lzo/lzo1x.h> /* portability layer */ static const char *progname = NULL; @@ -68,12 +68,12 @@ static lzo_uint xread(FILE *fp, lzo_voidp buf, lzo_uint len, lzo_bool allow_eof) l = (lzo_uint) lzo_fread(fp, buf, len); if (l > len) { - fprintf(stderr, "\nsomething's wrong with your C library !!!\n"); + fprintf(stderr, "\n%s: internal error - something is wrong with your C library !!!\n", progname); exit(1); } if (l != len && !allow_eof) { - fprintf(stderr, "\nread error - premature end of file\n"); + fprintf(stderr, "\n%s: read error - premature end of file\n", progname); exit(1); } total_in += (unsigned long) l; @@ -84,7 +84,7 @@ static lzo_uint xwrite(FILE *fp, const lzo_voidp buf, lzo_uint len) { if (fp != NULL && lzo_fwrite(fp, buf, len) != len) { - fprintf(stderr, "\nwrite error (disk full ?)\n"); + fprintf(stderr, "\n%s: write error (disk full ?)\n", progname); exit(1); } total_out += (unsigned long) len; @@ -120,7 +120,7 @@ static lzo_uint32_t xread32(FILE *fp) return v; } -static void xwrite32(FILE *fp, lzo_xint v) +static void xwrite32(FILE *fp, lzo_uint v) { unsigned char b[4]; @@ -274,7 +274,7 @@ static int do_decompress(FILE *fi, FILE *fo) /* * Step 1: check magic header, read flags & block size, init checksum */ - if (xread(fi, m, sizeof(magic),1) != sizeof(magic) || + if (xread(fi, m, sizeof(magic), 1) != sizeof(magic) || memcmp(m, magic, sizeof(magic)) != 0) { printf("%s: header error - this file is not compressed by lzopack\n", progname); @@ -299,7 +299,7 @@ static int do_decompress(FILE *fi, FILE *fo) r = 3; goto err; } - checksum = lzo_adler32(0,NULL,0); + checksum = lzo_adler32(0, NULL, 0); /* * Step 2: allocate buffer for in-place decompression @@ -509,7 +509,7 @@ int __lzo_cdecl_main main(int argc, char *argv[]) printf("\nLZO real-time data compression library (v%s, %s).\n", lzo_version_string(), lzo_version_date()); - printf("Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); + printf("Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n"); #if 0 printf( |