diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2009-08-26 12:32:28 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2009-08-26 12:32:28 +0000 |
commit | add8033d8487430a9e39077eb86fb7f65400294c (patch) | |
tree | 8f0b8f3b897c734a54935e5b69e5f672678cdd3f /sys/dev/microcode | |
parent | 8ed31e1809b9b62df050f92b08501e96f485c677 (diff) |
Name fields in the udl_huffman struct same as on the driver side to
simplify reading.
Diffstat (limited to 'sys/dev/microcode')
-rw-r--r-- | sys/dev/microcode/udl/build.c | 14 | ||||
-rw-r--r-- | sys/dev/microcode/udl/udl_huffman.h | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/microcode/udl/build.c b/sys/dev/microcode/udl/build.c index d3d09146868..cf9e1f1e12c 100644 --- a/sys/dev/microcode/udl/build.c +++ b/sys/dev/microcode/udl/build.c @@ -1,4 +1,4 @@ -/* $OpenBSD: build.c,v 1.4 2009/08/26 12:23:39 mglocker Exp $ */ +/* $OpenBSD: build.c,v 1.5 2009/08/26 12:32:27 mglocker Exp $ */ /* * Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org> @@ -30,19 +30,19 @@ int main(void) { int fd, i; - uint32_t size; - uint32_t value; + uint32_t bit_count; + uint32_t bit_pattern; fd = open(FILENAME, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (fd == -1) err(1, "%s", FILENAME); for (i = 0; i < UDL_HUFFMAN_RECORDS; i++) { - size = udl_huffman[i].size; - value = htobe32(udl_huffman[i].value); - if (write(fd, &size, sizeof(size)) == -1) + bit_count = udl_huffman[i].bit_count; + bit_pattern = htobe32(udl_huffman[i].bit_pattern); + if (write(fd, &bit_count, sizeof(bit_count)) == -1) err(1, "write"); - if (write(fd, &value, sizeof(value)) == -1) + if (write(fd, &bit_pattern, sizeof(bit_pattern)) == -1) err(1, "write"); } diff --git a/sys/dev/microcode/udl/udl_huffman.h b/sys/dev/microcode/udl/udl_huffman.h index 0580d142304..241d18cd53f 100644 --- a/sys/dev/microcode/udl/udl_huffman.h +++ b/sys/dev/microcode/udl/udl_huffman.h @@ -1,4 +1,4 @@ -/* $OpenBSD: udl_huffman.h,v 1.3 2009/08/26 12:23:39 mglocker Exp $ */ +/* $OpenBSD: udl_huffman.h,v 1.4 2009/08/26 12:32:27 mglocker Exp $ */ /* * Huffman table for pixel difference compression. @@ -14,8 +14,8 @@ #define UDL_HUFFMAN_RECORDS 65536 + 1 struct record { - uint32_t size; - uint32_t value; + uint32_t bit_count; + uint32_t bit_pattern; } udl_huffman[] = { { 20, 966905 }, { 20, 954617 }, |