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,8 +53,10 @@ 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.
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{"); "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) {
@ -81,8 +83,10 @@ 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.
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] = {"); "const uint32_t lzma_lz_hash_table[256] = {");
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 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,8 +52,10 @@ 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.
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{"); "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) {

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,8 +34,10 @@ 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.
printf("// SPDX" "-License-Identifier" ": 0BSD\n\n"
"// This file has been generated by fastpos_tablegen.c.\n\n"
"#include \"common.h\"\n" "#include \"common.h\"\n"
"#include \"fastpos.h\"\n\n" "#include \"fastpos.h\"\n\n"
"const uint8_t lzma_fastpos[1 << FASTPOS_BITS] = {"); "const uint8_t lzma_fastpos[1 << FASTPOS_BITS] = {");

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,8 +58,10 @@ 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.
printf("// SPDX" "-License-Identifier" ": 0BSD\n\n"
"// This file has been generated by price_tablegen.c.\n\n"
"#include \"range_encoder.h\"\n\n" "#include \"range_encoder.h\"\n\n"
"const uint8_t lzma_rc_prices[" "const uint8_t lzma_rc_prices["
"RC_PRICE_TABLE_SIZE] = {"); "RC_PRICE_TABLE_SIZE] = {");