1
0
mirror of https://github.com/woo-j/zint.git synced 2025-03-11 08:58:22 +03:00

zint.h: add version string, mention "manual.html" and website

README: mention "manual.html"
tools/update_version.php: update for "zint.h" version, README year
test suite: fix some clang-tidy-20 warnings
This commit is contained in:
gitlost 2024-11-18 18:50:26 +00:00
parent 86b6a0553b
commit 1ae7815d95
6 changed files with 24 additions and 10 deletions

4
README
View File

@ -50,7 +50,7 @@ Output can be saved as BMP, EMF, EPS, GIF, PCX, PNG, SVG or TIF.
DOCUMENTATION
-------------
For documentation see "docs/manual.txt" or online at
For documentation see "docs/manual.txt" or "docs/manual.html" or online at
<https://zint.org.uk/manual/>
@ -62,7 +62,7 @@ Please see "ChangeLog" in the project root directory.
LICENSE
-------
Zint, libzint and Zint Barcode Studio are Copyright © 2023 Robin Stuart. All
Zint, libzint and Zint Barcode Studio are Copyright © 2024 Robin Stuart. All
historical versions are distributed under the GNU General Public License
version 3 or later. Versions 2.5 and later are released under a dual license:
the encoding library is released under the BSD (3 clause) license whereas the

View File

@ -168,7 +168,7 @@ static int c128_cost(const unsigned char source[], const int length, const int i
const int cset = priority[p];
if (C128_C0C1(cset)) {
if (can_c && (!manuals[i] || manuals[i] == C128_C0)) {
const int incr = is_fnc1 ? 1 : 2;
const int incr = 2 - is_fnc1;
int mode = prior_cset;
int cost = 1;
if (prior_cset != cset) {

View File

@ -388,7 +388,7 @@ static void test_large(const testCtx *const p_ctx) {
testUtilEscape(data[i].pattern, (int) strlen(data[i].pattern), escaped, sizeof(escaped)), data[i].length,
testUtilErrorName(ret), symbol->rows, symbol->width, errtxt);
symbol->input_mode |= FAST_MODE;
ret = ZBarcode_Encode(symbol, (unsigned char *) data_buf, length);
(void) ZBarcode_Encode(symbol, (unsigned char *) data_buf, length);
printf(" \"%s\", \"%s\" },\n", strcmp(errtxt, symbol->errtxt) != 0 ? symbol->errtxt : "", data[i].comment);
} else {
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);

View File

@ -1896,6 +1896,10 @@ int testUtilCmpBins(const char *bin1, const char *bin2) {
do {
len1 = fread(buf1, 1, sizeof(buf1), fp1);
len2 = fread(buf2, 1, sizeof(buf2), fp2);
if (ferror(fp1) || ferror(fp2)) {
ret = 4;
break;
}
if (len1 != len2) {
ret = 6;
break;

View File

@ -31,8 +31,10 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* For version, see "zintconfig.h"
* For documentation, see "../docs/manual.txt"
* Version: 2.13.0.9 (dev) (see "zintconfig.h")
*
* For documentation, see "../docs/manual.txt" or "../docs/manual.html" or online at
* https://zint.org.uk/manual/
*/
#ifndef ZINT_H

View File

@ -2,7 +2,7 @@
/* Update Zint version number in various files */
/*
libzint - the open source barcode library
Copyright (C) 2020-2023 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2020-2024 Robin Stuart <rstuart114@gmail.com>
*/
/* SPDX-License-Identifier: BSD-3-Clause */
@ -49,6 +49,8 @@ $v_base_str = $v_str = "$major.$minor.$release";
if ($build) {
$v_str .= ".$build";
}
$v_str_dev = $build ? $v_str . ' (dev)' : $v_str;
$rc_str1 = "$major,$minor,$release,$build";
$rc_str2 = "$major.$minor.$release.$build";
@ -202,6 +204,10 @@ if (!file_put_contents($file, implode("\n", $lines))) {
exit("$basename: ERROR: Could not write file \"$file\"" . PHP_EOL);
}
// README
year_replace($data_dirname . 'README', $year);
// README.linux
version_replace(4, $data_dirname . 'README.linux', '/zint-[0-9]/', '/[0-9][0-9.]+/', $v_base_str);
@ -218,6 +224,10 @@ version_replace(1, $data_dirname . 'zint.nsi', '/^!define +PRODUCT_VERSION/', '/
rc_replace($data_dirname . 'backend/libzint.rc', $rc_str1, $rc_str2, $year);
// backend/zint.h
version_replace(1, $data_dirname . 'backend/zint.h', '/^ \* Version: /', '/[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?( \(dev\))?/', $v_str_dev);
// backend/zintconfig.h
$file = $data_dirname . 'backend/zintconfig.h';
@ -296,9 +306,7 @@ version_replace(1, $data_dirname . 'backend_qt/backend_qt.pro', '/^VERSION[ \t]*
// docs/manual.pmd
version_replace(1, $data_dirname . 'docs/manual.pmd', '/^% Version /', '/[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?( \(dev\))?/', $v_str);
if ($build !== 9) { // Don't update if marking version as dev
version_replace(1, $data_dirname . 'docs/manual.pmd', '/^The current stable version of Zint/', '/[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?/', $v_str);
}
version_replace(1, $data_dirname . 'docs/manual.pmd', '/^The current stable version of Zint/', '/[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?/', $v_base_str);
// docs/zint.1.pmd