summaryrefslogtreecommitdiff
path: root/main/lzo/tests
diff options
context:
space:
mode:
Diffstat (limited to 'main/lzo/tests')
-rw-r--r--main/lzo/tests/align.c24
-rw-r--r--main/lzo/tests/chksum.c16
-rw-r--r--main/lzo/tests/promote.c2
-rw-r--r--main/lzo/tests/sizes.c4
4 files changed, 23 insertions, 23 deletions
diff --git a/main/lzo/tests/align.c b/main/lzo/tests/align.c
index a4c5f7db..59bf8333 100644
--- a/main/lzo/tests/align.c
+++ b/main/lzo/tests/align.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
@@ -30,7 +30,7 @@
#include "src/lzo_conf.h"
#include "src/lzo_ptr.h"
#endif
-#include "lzo/lzoconf.h"
+#include <lzo/lzoconf.h>
/* utility layer */
#define WANT_LZO_MALLOC 1
@@ -56,12 +56,12 @@ static unsigned long align_test(lzo_bytep block, lzo_uint len, lzo_uint step)
unsigned long i = 0;
assert(step > 0);
- assert(step <= 65536L);
+ assert(step <= 65536ul);
assert((step & (step - 1)) == 0);
for (offset = step; offset < len; offset += step)
{
- k1 = LZO_PTR_ALIGN_UP(b1+1,step);
+ k1 = LZO_PTR_ALIGN_UP(b1 + 1, step);
k2 = b2 + offset;
if (k1 != k2)
{
@@ -109,7 +109,7 @@ static unsigned long align_test(lzo_bytep block, lzo_uint len, lzo_uint step)
for (k = b1 + 1; k <= k1; k++)
{
- x = LZO_PTR_ALIGN_UP(k,step);
+ x = LZO_PTR_ALIGN_UP(k, step);
if (x != k1)
{
printf("error 3: base: %p %p %p i %lu step %ld offset %ld: "
@@ -135,7 +135,7 @@ static unsigned long align_test(lzo_bytep block, lzo_uint len, lzo_uint step)
//
**************************************************************************/
-#define BLOCK_LEN (128*1024ul)
+#define BLOCK_SIZE (128*1024ul)
int main(int argc, char *argv[])
{
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
printf("lzo_init() failed !!!\n");
return 3;
}
- buf = (lzo_bytep) lzo_malloc(2*BLOCK_LEN + 256);
+ buf = (lzo_bytep) lzo_malloc(2*BLOCK_SIZE + 256);
if (buf == NULL)
{
printf("out of memory\n");
@@ -165,22 +165,22 @@ int main(int argc, char *argv[])
printf("Align init: %p ( 0x%lx )\n", buf, (unsigned long) (size_t) buf);
#endif
- for (step = 1; step <= 65536L; step *= 2)
+ for (step = 1; step <= 65536ul; step *= 2)
{
lzo_bytep block = buf;
unsigned long n;
unsigned gap;
- gap = __lzo_align_gap(block,step);
- block = LZO_PTR_ALIGN_UP(block,step);
+ gap = __lzo_align_gap(block, step);
+ block = LZO_PTR_ALIGN_UP(block, step);
if (opt_verbose >= 1)
printf("STEP %5lu: GAP: %5lu %p %p %5lu\n",
(unsigned long) step, (unsigned long) gap, buf, block,
(unsigned long) (block - buf));
- n = align_test(block,BLOCK_LEN,step);
+ n = align_test(block, BLOCK_SIZE, step);
if (n == 0)
return 1;
- if ((n + 1) * step != BLOCK_LEN)
+ if ((n + 1) * step != BLOCK_SIZE)
{
printf("error 4: %ld %lu\n", (long)step, n);
return 1;
diff --git a/main/lzo/tests/chksum.c b/main/lzo/tests/chksum.c
index bb5b502b..fb4fb0dd 100644
--- a/main/lzo/tests/chksum.c
+++ b/main/lzo/tests/chksum.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
@@ -26,7 +26,7 @@
*/
-#include "lzo/lzoconf.h"
+#include <lzo/lzoconf.h>
/* utility layer */
#define WANT_LZO_MALLOC 1
@@ -40,7 +40,7 @@
int main(int argc, char *argv[])
{
lzo_bytep block;
- lzo_uint block_len;
+ lzo_uint block_size;
lzo_uint32_t adler, crc;
if (argc < 0 && argv == NULL) /* avoid warning about unused args */
@@ -53,18 +53,18 @@ int main(int argc, char *argv[])
}
/* prepare the block */
- block_len = 128 * 1024L;
- block = (lzo_bytep) lzo_malloc(block_len);
+ block_size = 128 * 1024L;
+ block = (lzo_bytep) lzo_malloc(block_size);
if (block == NULL)
{
printf("out of memory\n");
return 3;
}
- lzo_memset(block, 0, block_len);
+ lzo_memset(block, 0, block_size);
/* adler32 checksum */
adler = lzo_adler32(0, NULL, 0);
- adler = lzo_adler32(adler, block, block_len);
+ adler = lzo_adler32(adler, block, block_size);
if (adler != 0x001e0001UL)
{
printf("adler32 checksum error !!! (0x%08lx)\n", (long) adler);
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
/* crc32 checksum */
crc = lzo_crc32(0, NULL, 0);
- crc = lzo_crc32(crc, block, block_len);
+ crc = lzo_crc32(crc, block, block_size);
if (crc != 0x7ee8cdcdUL)
{
printf("crc32 checksum error !!! (0x%08lx)\n", (long) crc);
diff --git a/main/lzo/tests/promote.c b/main/lzo/tests/promote.c
index 30c6da60..1bf8d63e 100644
--- a/main/lzo/tests/promote.c
+++ b/main/lzo/tests/promote.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
diff --git a/main/lzo/tests/sizes.c b/main/lzo/tests/sizes.c
index 3840fe2a..6be9c1da 100644
--- a/main/lzo/tests/sizes.c
+++ b/main/lzo/tests/sizes.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
@@ -41,7 +41,7 @@
#endif
#endif
-#include "lzo/lzoconf.h"
+#include <lzo/lzoconf.h>
#include <stdio.h>
#if (LZO_CC_MSC && (_MSC_VER >= 1300))