mirror of
https://github.com/fralx/LimeReport.git
synced 2025-10-02 03:53:19 +03:00
Update Zint
This commit is contained in:
1244
3rdparty/zint-2.10.0/backend/tests/tools/bwipp_dump-barcode.ps.diff
vendored
Normal file
1244
3rdparty/zint-2.10.0/backend/tests/tools/bwipp_dump-barcode.ps.diff
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
3rdparty/zint-2.10.0/backend/tests/tools/bwipp_dump.ps.tar.xz
vendored
Normal file
BIN
3rdparty/zint-2.10.0/backend/tests/tools/bwipp_dump.ps.tar.xz
vendored
Normal file
Binary file not shown.
13800
3rdparty/zint-2.10.0/backend/tests/tools/data/BIG5.TXT
vendored
Normal file
13800
3rdparty/zint-2.10.0/backend/tests/tools/data/BIG5.TXT
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
3rdparty/zint-2.10.0/backend/tests/tools/data/GB18030.TXT.README
vendored
Normal file
3
3rdparty/zint-2.10.0/backend/tests/tools/data/GB18030.TXT.README
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# GB18030.TXT not included as 21MB in size. It can be downloaded from
|
||||
# https://haible.de/bruno/charsets/conversion-tables/GB18030.html
|
||||
# The version used is libiconv-1.11/GB18030.TXT
|
7510
3rdparty/zint-2.10.0/backend/tests/tools/data/GB2312.TXT
vendored
Normal file
7510
3rdparty/zint-2.10.0/backend/tests/tools/data/GB2312.TXT
vendored
Normal file
File diff suppressed because it is too large
Load Diff
8306
3rdparty/zint-2.10.0/backend/tests/tools/data/KSX1001.TXT
vendored
Normal file
8306
3rdparty/zint-2.10.0/backend/tests/tools/data/KSX1001.TXT
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7097
3rdparty/zint-2.10.0/backend/tests/tools/data/SHIFTJIS.TXT
vendored
Normal file
7097
3rdparty/zint-2.10.0/backend/tests/tools/data/SHIFTJIS.TXT
vendored
Normal file
File diff suppressed because it is too large
Load Diff
95
3rdparty/zint-2.10.0/backend/tests/tools/gen_test_tab.php
vendored
Normal file
95
3rdparty/zint-2.10.0/backend/tests/tools/gen_test_tab.php
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/* Generate lookup table from unicode.org mapping file (SHIFTJIS.TXT by default). */
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2019-2021 Robin Stuart <rstuart114@gmail.com>
|
||||
*/
|
||||
/* To create backend/tests/test_sjis_tab.h (from backend/tests/build directory):
|
||||
*
|
||||
* php ../tools/gen_test_tab.php
|
||||
*
|
||||
* To create backend/tests/test_gb2312_tab.h;
|
||||
*
|
||||
* php ../tools/gen_test_tab.php -f GB2312.TXT -s gb2312_tab
|
||||
*
|
||||
* To create backend/tests/test_gb18030_tab.h (note that backend/tests/tools/data/GB18030.TXT
|
||||
* will have to be downloaded first from https://haible.de/bruno/charsets/conversion-tables/GB18030.html
|
||||
* using the version libiconv-1.11/GB18030.TXT):
|
||||
*
|
||||
* php ../tools/gen_test_tab.php -f GB18030.TXT -s gb18030_tab
|
||||
*
|
||||
* To create backend/tests/test_big5_tab.h;
|
||||
*
|
||||
* php ../tools/gen_test_tab.php -f BIG5.TXT -s big5_tab
|
||||
*
|
||||
* To create backend/tests/test_ksx1001_tab.h;
|
||||
*
|
||||
* php ../tools/gen_test_tab.php -f KSX1001.TXT -s ksx1001_tab
|
||||
*
|
||||
*/
|
||||
/* vim: set ts=4 sw=4 et : */
|
||||
|
||||
$basename = basename(__FILE__);
|
||||
$dirname = dirname(__FILE__);
|
||||
|
||||
$opts = getopt('d:f:o:s:');
|
||||
$data_dirname = isset($opts['d']) ? $opts['d'] : ($dirname . '/data'); // Where to load file from.
|
||||
$file_name = isset($opts['f']) ? $opts['f'] : 'SHIFTJIS.TXT'; // Name of file.
|
||||
$out_dirname = isset($opts['o']) ? $opts['o'] : ($dirname . '/..'); // Where to put output.
|
||||
$suffix_name = isset($opts['s']) ? $opts['s'] : 'sjis_tab'; // Suffix of table and output file.
|
||||
|
||||
$file = $data_dirname . '/' . $file_name;
|
||||
|
||||
// Read the file.
|
||||
|
||||
if (($get = file_get_contents($file)) === false) {
|
||||
error_log($error = "$basename: ERROR: Could not read mapping file \"$file\"");
|
||||
exit($error . PHP_EOL);
|
||||
}
|
||||
|
||||
$lines = explode("\n", $get);
|
||||
|
||||
// Parse the file.
|
||||
|
||||
$tab_lines = array();
|
||||
$sort = array();
|
||||
foreach ($lines as $line) {
|
||||
$line = trim($line);
|
||||
if ($line === '' || strncmp($line, '0x', 2) !== 0 || strpos($line, "*** NO MAPPING ***") !== false) {
|
||||
continue;
|
||||
}
|
||||
if (preg_match('/^0x([0-9A-F]{2,8})[ \t]+0x([0-9A-F]{5})/', $line)) { // Exclude U+10000..10FFFF to save space
|
||||
continue;
|
||||
}
|
||||
$tab_lines[] = preg_replace_callback('/^0x([0-9A-F]{2,8})[ \t]+0x([0-9A-F]{4}).*$/', function ($matches) {
|
||||
global $sort;
|
||||
$mb = hexdec($matches[1]);
|
||||
$unicode = hexdec($matches[2]);
|
||||
$sort[] = $unicode;
|
||||
return sprintf(" 0x%04X, 0x%04X,", $mb, $unicode);
|
||||
}, $line);
|
||||
}
|
||||
|
||||
array_multisort($sort, $tab_lines);
|
||||
|
||||
// Output.
|
||||
|
||||
$out = array();
|
||||
$out[] = '/* Generated by ' . $basename . ' from ' . $file_name . ' */';
|
||||
$out[] = 'static const unsigned int test_' . $suffix_name . '[] = {';
|
||||
$out = array_merge($out, $tab_lines);
|
||||
$out[] = '};';
|
||||
|
||||
$out[] = '';
|
||||
$out[] = 'static const unsigned int test_' . $suffix_name . '_ind[] = {';
|
||||
$first = 0;
|
||||
foreach ($sort as $ind => $unicode) {
|
||||
$div = (int)($unicode / 0x400);
|
||||
while ($div >= $first) {
|
||||
$out[] = ' ' . ($ind * 2) . ',';
|
||||
$first++;
|
||||
}
|
||||
}
|
||||
$out[] = '};';
|
||||
|
||||
file_put_contents($out_dirname . '/test_' . $suffix_name . '.h', implode("\n", $out) . "\n");
|
41
3rdparty/zint-2.10.0/backend/tests/tools/run_bwipp_tests.sh
vendored
Normal file
41
3rdparty/zint-2.10.0/backend/tests/tools/run_bwipp_tests.sh
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2020 - 2021 Robin Stuart <rstuart114@gmail.com>
|
||||
# vim: set ts=4 sw=4 et :
|
||||
set -e
|
||||
|
||||
function run_bwipp_test() {
|
||||
if [ -z "$2" ]; then
|
||||
echo -e "\n$1"
|
||||
backend/tests/$1 -d $(expr 128 + 16 + 32) || exit 1
|
||||
else
|
||||
echo -e "\n$1 -f $2"
|
||||
backend/tests/$1 -f "$2" -d $(expr 128 + 16 + 32) || exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
run_bwipp_test "test_2of5" "encode"
|
||||
run_bwipp_test "test_auspost" "encode"
|
||||
run_bwipp_test "test_aztec" "encode"
|
||||
run_bwipp_test "test_channel" "encode"
|
||||
run_bwipp_test "test_codablock" "encode"
|
||||
run_bwipp_test "test_code" "encode"
|
||||
run_bwipp_test "test_code1" "encode"
|
||||
run_bwipp_test "test_code128" "encode"
|
||||
run_bwipp_test "test_code16k" "encode"
|
||||
run_bwipp_test "test_code49" "encode"
|
||||
run_bwipp_test "test_composite"
|
||||
run_bwipp_test "test_dmatrix"
|
||||
run_bwipp_test "test_dotcode" "encode"
|
||||
run_bwipp_test "test_gs1" "gs1_reduce"
|
||||
run_bwipp_test "test_imail" "encode"
|
||||
run_bwipp_test "test_maxicode" "encode"
|
||||
run_bwipp_test "test_medical" "encode"
|
||||
run_bwipp_test "test_pdf417" "encode"
|
||||
run_bwipp_test "test_plessey" "encode"
|
||||
run_bwipp_test "test_postal" "encode"
|
||||
run_bwipp_test "test_qr" "microqr_encode"
|
||||
run_bwipp_test "test_qr" "rmqr_encode"
|
||||
run_bwipp_test "test_rss"
|
||||
run_bwipp_test "test_telepen" "encode"
|
||||
run_bwipp_test "test_upcean" "encode"
|
||||
run_bwipp_test "test_ultra" "encode"
|
Reference in New Issue
Block a user