1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

liblzma: Include the SPDX license identifier 0BSD to generated files.

Perhaps the generated files aren't even copyrightable but
using the same license for them as for the rest of the liblzma
keeps things more consistent for tools that look for license info.
This commit is contained in:
Lasse Collin 2024-02-12 17:09:10 +02:00
parent 8e4ec79483
commit b941549573
11 changed files with 50 additions and 26 deletions

View file

@ -1,4 +1,6 @@
/* This file has been automatically generated by crc32_tablegen.c. */ // SPDX-License-Identifier: 0BSD
// This file has been generated by crc32_tablegen.c.
const uint32_t lzma_crc32_table[8][256] = { const uint32_t lzma_crc32_table[8][256] = {
{ {

View file

@ -1,4 +1,6 @@
/* This file has been automatically generated by crc32_tablegen.c. */ // SPDX-License-Identifier: 0BSD
// This file has been generated by crc32_tablegen.c.
const uint32_t lzma_crc32_table[8][256] = { const uint32_t lzma_crc32_table[8][256] = {
{ {

View file

@ -53,9 +53,11 @@ init_crc32_table(void)
static void static void
print_crc32_table(void) print_crc32_table(void)
{ {
printf("/* This file has been automatically generated by " // Split the SPDX string so that it won't accidentally match
"crc32_tablegen.c. */\n\n" // when tools search for the string.
"const uint32_t lzma_crc32_table[8][256] = {\n\t{"); printf("// SPDX" "-License-Identifier" ": 0BSD\n\n"
"// This file has been generated by crc32_tablegen.c.\n\n"
"const uint32_t lzma_crc32_table[8][256] = {\n\t{");
for (size_t s = 0; s < 8; ++s) { for (size_t s = 0; s < 8; ++s) {
for (size_t b = 0; b < 256; ++b) { for (size_t b = 0; b < 256; ++b) {
@ -81,9 +83,11 @@ print_crc32_table(void)
static void static void
print_lz_table(void) print_lz_table(void)
{ {
printf("/* This file has been automatically generated by " // Split the SPDX string so that it won't accidentally match
"crc32_tablegen.c. */\n\n" // when tools search for the string.
"const uint32_t lzma_lz_hash_table[256] = {"); printf("// SPDX" "-License-Identifier" ": 0BSD\n\n"
"// This file has been generated by crc32_tablegen.c.\n\n"
"const uint32_t lzma_lz_hash_table[256] = {");
for (size_t b = 0; b < 256; ++b) { for (size_t b = 0; b < 256; ++b) {
if ((b % 4) == 0) if ((b % 4) == 0)

View file

@ -1,4 +1,6 @@
/* This file has been automatically generated by crc64_tablegen.c. */ // SPDX-License-Identifier: 0BSD
// This file has been generated by crc64_tablegen.c.
const uint64_t lzma_crc64_table[4][256] = { const uint64_t lzma_crc64_table[4][256] = {
{ {

View file

@ -1,4 +1,6 @@
/* This file has been automatically generated by crc64_tablegen.c. */ // SPDX-License-Identifier: 0BSD
// This file has been generated by crc64_tablegen.c.
const uint64_t lzma_crc64_table[4][256] = { const uint64_t lzma_crc64_table[4][256] = {
{ {

View file

@ -52,9 +52,11 @@ init_crc64_table(void)
static void static void
print_crc64_table(void) print_crc64_table(void)
{ {
printf("/* This file has been automatically generated by " // Split the SPDX string so that it won't accidentally match
"crc64_tablegen.c. */\n\n" // when tools search for the string.
"const uint64_t lzma_crc64_table[4][256] = {\n\t{"); printf("// SPDX" "-License-Identifier" ": 0BSD\n\n"
"// This file has been generated by crc64_tablegen.c.\n\n"
"const uint64_t lzma_crc64_table[4][256] = {\n\t{");
for (size_t s = 0; s < 4; ++s) { for (size_t s = 0; s < 4; ++s) {
for (size_t b = 0; b < 256; ++b) { for (size_t b = 0; b < 256; ++b) {

View file

@ -1,4 +1,6 @@
/* This file has been automatically generated by crc32_tablegen.c. */ // SPDX-License-Identifier: 0BSD
// This file has been generated by crc32_tablegen.c.
const uint32_t lzma_lz_hash_table[256] = { const uint32_t lzma_lz_hash_table[256] = {
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,

View file

@ -1,4 +1,6 @@
/* This file has been automatically generated by fastpos_tablegen.c. */ // SPDX-License-Identifier: 0BSD
// This file has been generated by fastpos_tablegen.c.
#include "common.h" #include "common.h"
#include "fastpos.h" #include "fastpos.h"

View file

@ -34,11 +34,13 @@ main(void)
fastpos[c] = slot_fast; fastpos[c] = slot_fast;
} }
printf("/* This file has been automatically generated " // Split the SPDX string so that it won't accidentally match
"by fastpos_tablegen.c. */\n\n" // when tools search for the string.
"#include \"common.h\"\n" printf("// SPDX" "-License-Identifier" ": 0BSD\n\n"
"#include \"fastpos.h\"\n\n" "// This file has been generated by fastpos_tablegen.c.\n\n"
"const uint8_t lzma_fastpos[1 << FASTPOS_BITS] = {"); "#include \"common.h\"\n"
"#include \"fastpos.h\"\n\n"
"const uint8_t lzma_fastpos[1 << FASTPOS_BITS] = {");
for (size_t i = 0; i < (1 << FASTPOS_BITS); ++i) { for (size_t i = 0; i < (1 << FASTPOS_BITS); ++i) {
if (i % 16 == 0) if (i % 16 == 0)

View file

@ -1,4 +1,6 @@
/* This file has been automatically generated by price_tablegen.c. */ // SPDX-License-Identifier: 0BSD
// This file has been generated by price_tablegen.c.
#include "range_encoder.h" #include "range_encoder.h"

View file

@ -58,11 +58,13 @@ init_price_table(void)
static void static void
print_price_table(void) print_price_table(void)
{ {
printf("/* This file has been automatically generated by " // Split the SPDX string so that it won't accidentally match
"price_tablegen.c. */\n\n" // when tools search for the string.
"#include \"range_encoder.h\"\n\n" printf("// SPDX" "-License-Identifier" ": 0BSD\n\n"
"const uint8_t lzma_rc_prices[" "// This file has been generated by price_tablegen.c.\n\n"
"RC_PRICE_TABLE_SIZE] = {"); "#include \"range_encoder.h\"\n\n"
"const uint8_t lzma_rc_prices["
"RC_PRICE_TABLE_SIZE] = {");
const size_t array_size = sizeof(lzma_rc_prices) const size_t array_size = sizeof(lzma_rc_prices)
/ sizeof(lzma_rc_prices[0]); / sizeof(lzma_rc_prices[0]);