diff --git a/ChangeLog b/ChangeLog index 7df39453..f2225f16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -Version 2.16.0.9 (dev) not released yet (2025-01-12) +Version 2.16.0.9 (dev) not released yet (2025-01-18) ==================================================== **Incompatible changes** @@ -19,6 +19,8 @@ Bugs or any FNC1 after manual C mode selected and no other non-C data - CLI: fix "--scalexdimdp" X-dim inch units being divided instead of multiplied on conversion to mm +- DOTCODE: fix not emitting FNC1 (signalling not GS1) if input is just 2 digits +- CMake: set `rpath` of CLI on macOS install (ticket #346, props Hagen Röwer) Version 2.16.0 (2025-12-19) diff --git a/backend/dotcode.c b/backend/dotcode.c index ccf9cc1e..4c77ce4a 100644 --- a/backend/dotcode.c +++ b/backend/dotcode.c @@ -1,7 +1,7 @@ /* dotcode.c - Handles DotCode */ /* libzint - the open source barcode library - Copyright (C) 2017-2025 Robin Stuart + Copyright (C) 2017-2026 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -532,7 +532,7 @@ static int dc_encode_message(struct zint_symbol *symbol, const unsigned char sou if (symbol->output_options & READER_INIT) { codeword_array[ap++] = 109; /* FNC3 */ - } else if (!gs1 && eci == 0 && length > 2 && z_is_twodigits(source, length, 0)) { + } else if (!gs1 && eci == 0 && length >= 2 && z_is_twodigits(source, length, 0)) { codeword_array[ap++] = 107; /* FNC1 */ } else if (z_posn(lead_specials, source[0]) != -1) { diff --git a/backend/library.c b/backend/library.c index 8e27aac3..90cbf6e4 100644 --- a/backend/library.c +++ b/backend/library.c @@ -1029,7 +1029,7 @@ int ZBarcode_Encode_Segs(struct zint_symbol *symbol, const struct zint_seg segs[ return error_tag(error_number, symbol, -1, NULL); } if (escaped_len > ZINT_MAX_DATA_LEN) { - return error_tag(ZINT_ERROR_TOO_LONG, symbol, 797, "Input too long"); + return error_tag(ZINT_ERROR_TOO_LONG, symbol, 796, "Input too long"); } total_len += escaped_len; } else { diff --git a/backend/tests/data/eps/dotcode_0.1.eps b/backend/tests/data/eps/dotcode_0.1.eps index d4a5e438..feb71d18 100644 --- a/backend/tests/data/eps/dotcode_0.1.eps +++ b/backend/tests/data/eps/dotcode_0.1.eps @@ -1,5 +1,5 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 3 2 @@ -8,33 +8,44 @@ /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -1.6 0 0 2.2 R +1.8 0 0 2.8 R 0 0 0 setrgbcolor -1.5 0.08 I 0.1 D +1.7 0.08 I 0.1 D I 0.9 D -I 1.3 D I 1.7 D -2.1 D -1.3 0.08 I 0.7 D -I 1.1 D -1.5 D -1.1 0.08 I 0.1 D -I 0.5 D -I 1.3 D -I 1.7 D -2.1 D -0.9 0.08 0.3 D -0.7 0.08 I 0.1 D -2.1 D -0.5 0.08 I 0.3 D -I 0.7 D -I 1.1 D -1.5 D -0.3 0.08 I 0.1 D -I 0.5 D -I 1.7 D -2.1 D -0.1 0.08 I 0.3 D +I 2.1 D +2.5 D +1.5 0.08 I 0.3 D I 0.7 D I 1.5 D -1.9 D +I 2.3 D +2.7 D +1.3 0.08 I 0.1 D +I 0.5 D +I 1.3 D +2.5 D +1.1 0.08 I 0.3 D +I 0.7 D +I 1.9 D +2.3 D +0.9 0.08 I 0.1 D +I 1.3 D +2.5 D +0.7 0.08 I 0.7 D +I 1.1 D +I 1.5 D +2.7 D +0.5 0.08 I 0.9 D +I 1.7 D +I 2.1 D +2.5 D +0.3 0.08 I 0.3 D +I 0.7 D +I 1.1 D +2.7 D +0.1 0.08 I 0.1 D +I 0.5 D +I 0.9 D +I 1.3 D +I 2.1 D +2.5 D diff --git a/backend/tests/data/eps/dotcode_1.0.eps b/backend/tests/data/eps/dotcode_1.0.eps index f32b5919..22ec710c 100644 --- a/backend/tests/data/eps/dotcode_1.0.eps +++ b/backend/tests/data/eps/dotcode_1.0.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 22 16 +%%BoundingBox: 0 0 28 18 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -16 0 0 22 R +18 0 0 28 R 0 0 0 setrgbcolor -15 0.8 I 1 D +17 0.8 I 1 D I 9 D -I 13 D I 17 D -21 D -13 0.8 I 7 D -I 11 D -15 D -11 0.8 I 1 D -I 5 D -I 13 D -I 17 D -21 D -9 0.8 3 D -7 0.8 I 1 D -21 D -5 0.8 I 3 D -I 7 D -I 11 D -15 D -3 0.8 I 1 D -I 5 D -I 17 D -21 D -1 0.8 I 3 D +I 21 D +25 D +15 0.8 I 3 D I 7 D I 15 D -19 D +I 23 D +27 D +13 0.8 I 1 D +I 5 D +I 13 D +25 D +11 0.8 I 3 D +I 7 D +I 19 D +23 D +9 0.8 I 1 D +I 13 D +25 D +7 0.8 I 7 D +I 11 D +I 15 D +27 D +5 0.8 I 9 D +I 17 D +I 21 D +25 D +3 0.8 I 3 D +I 7 D +I 11 D +27 D +1 0.8 I 1 D +I 5 D +I 9 D +I 13 D +I 21 D +25 D diff --git a/backend/tests/data/eps/dotcode_1.0_ds0.1.eps b/backend/tests/data/eps/dotcode_1.0_ds0.1.eps index c845dc26..cc8546f0 100644 --- a/backend/tests/data/eps/dotcode_1.0_ds0.1.eps +++ b/backend/tests/data/eps/dotcode_1.0_ds0.1.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 22 16 +%%BoundingBox: 0 0 28 18 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -16 0 0 22 R +18 0 0 28 R 0 0 0 setrgbcolor -15 0.1 I 1 D +17 0.1 I 1 D I 9 D -I 13 D I 17 D -21 D -13 0.1 I 7 D -I 11 D -15 D -11 0.1 I 1 D -I 5 D -I 13 D -I 17 D -21 D -9 0.1 3 D -7 0.1 I 1 D -21 D -5 0.1 I 3 D -I 7 D -I 11 D -15 D -3 0.1 I 1 D -I 5 D -I 17 D -21 D -1 0.1 I 3 D +I 21 D +25 D +15 0.1 I 3 D I 7 D I 15 D -19 D +I 23 D +27 D +13 0.1 I 1 D +I 5 D +I 13 D +25 D +11 0.1 I 3 D +I 7 D +I 19 D +23 D +9 0.1 I 1 D +I 13 D +25 D +7 0.1 I 7 D +I 11 D +I 15 D +27 D +5 0.1 I 9 D +I 17 D +I 21 D +25 D +3 0.1 I 3 D +I 7 D +I 11 D +27 D +1 0.1 I 1 D +I 5 D +I 9 D +I 13 D +I 21 D +25 D diff --git a/backend/tests/data/eps/dotcode_1.0_ds1.1.eps b/backend/tests/data/eps/dotcode_1.0_ds1.1.eps index 1e79a9e8..7f9af80b 100644 --- a/backend/tests/data/eps/dotcode_1.0_ds1.1.eps +++ b/backend/tests/data/eps/dotcode_1.0_ds1.1.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 23 17 +%%BoundingBox: 0 0 29 19 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -16.4 0 0 22.4 R +18.4 0 0 28.4 R 0 0 0 setrgbcolor -15.2 1.1 I 1.2 D +17.2 1.1 I 1.2 D I 9.2 D -I 13.2 D I 17.2 D -21.2 D -13.2 1.1 I 7.2 D -I 11.2 D -15.2 D -11.2 1.1 I 1.2 D -I 5.2 D -I 13.2 D -I 17.2 D -21.2 D -9.2 1.1 3.2 D -7.2 1.1 I 1.2 D -21.2 D -5.2 1.1 I 3.2 D -I 7.2 D -I 11.2 D -15.2 D -3.2 1.1 I 1.2 D -I 5.2 D -I 17.2 D -21.2 D -1.2 1.1 I 3.2 D +I 21.2 D +25.2 D +15.2 1.1 I 3.2 D I 7.2 D I 15.2 D -19.2 D +I 23.2 D +27.2 D +13.2 1.1 I 1.2 D +I 5.2 D +I 13.2 D +25.2 D +11.2 1.1 I 3.2 D +I 7.2 D +I 19.2 D +23.2 D +9.2 1.1 I 1.2 D +I 13.2 D +25.2 D +7.2 1.1 I 7.2 D +I 11.2 D +I 15.2 D +27.2 D +5.2 1.1 I 9.2 D +I 17.2 D +I 21.2 D +25.2 D +3.2 1.1 I 3.2 D +I 7.2 D +I 11.2 D +27.2 D +1.2 1.1 I 1.2 D +I 5.2 D +I 9.2 D +I 13.2 D +I 21.2 D +25.2 D diff --git a/backend/tests/data/eps/dotcode_1.5.eps b/backend/tests/data/eps/dotcode_1.5.eps index 776f6df4..3886e6d4 100644 --- a/backend/tests/data/eps/dotcode_1.5.eps +++ b/backend/tests/data/eps/dotcode_1.5.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 33 24 +%%BoundingBox: 0 0 42 27 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -24 0 0 33 R +27 0 0 42 R 0 0 0 setrgbcolor -22.5 1.2 I 1.5 D +25.5 1.2 I 1.5 D I 13.5 D -I 19.5 D I 25.5 D -31.5 D -19.5 1.2 I 10.5 D -I 16.5 D -22.5 D -16.5 1.2 I 1.5 D -I 7.5 D -I 19.5 D -I 25.5 D -31.5 D -13.5 1.2 4.5 D -10.5 1.2 I 1.5 D -31.5 D -7.5 1.2 I 4.5 D -I 10.5 D -I 16.5 D -22.5 D -4.5 1.2 I 1.5 D -I 7.5 D -I 25.5 D -31.5 D -1.5 1.2 I 4.5 D +I 31.5 D +37.5 D +22.5 1.2 I 4.5 D I 10.5 D I 22.5 D -28.5 D +I 34.5 D +40.5 D +19.5 1.2 I 1.5 D +I 7.5 D +I 19.5 D +37.5 D +16.5 1.2 I 4.5 D +I 10.5 D +I 28.5 D +34.5 D +13.5 1.2 I 1.5 D +I 19.5 D +37.5 D +10.5 1.2 I 10.5 D +I 16.5 D +I 22.5 D +40.5 D +7.5 1.2 I 13.5 D +I 25.5 D +I 31.5 D +37.5 D +4.5 1.2 I 4.5 D +I 10.5 D +I 16.5 D +40.5 D +1.5 1.2 I 1.5 D +I 7.5 D +I 13.5 D +I 19.5 D +I 31.5 D +37.5 D diff --git a/backend/tests/data/eps/dotcode_1.5_ds0.4.eps b/backend/tests/data/eps/dotcode_1.5_ds0.4.eps index 459f90e5..afd95b82 100644 --- a/backend/tests/data/eps/dotcode_1.5_ds0.4.eps +++ b/backend/tests/data/eps/dotcode_1.5_ds0.4.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 33 24 +%%BoundingBox: 0 0 42 27 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -24 0 0 33 R +27 0 0 42 R 0 0 0 setrgbcolor -22.5 0.6 I 1.5 D +25.5 0.6 I 1.5 D I 13.5 D -I 19.5 D I 25.5 D -31.5 D -19.5 0.6 I 10.5 D -I 16.5 D -22.5 D -16.5 0.6 I 1.5 D -I 7.5 D -I 19.5 D -I 25.5 D -31.5 D -13.5 0.6 4.5 D -10.5 0.6 I 1.5 D -31.5 D -7.5 0.6 I 4.5 D -I 10.5 D -I 16.5 D -22.5 D -4.5 0.6 I 1.5 D -I 7.5 D -I 25.5 D -31.5 D -1.5 0.6 I 4.5 D +I 31.5 D +37.5 D +22.5 0.6 I 4.5 D I 10.5 D I 22.5 D -28.5 D +I 34.5 D +40.5 D +19.5 0.6 I 1.5 D +I 7.5 D +I 19.5 D +37.5 D +16.5 0.6 I 4.5 D +I 10.5 D +I 28.5 D +34.5 D +13.5 0.6 I 1.5 D +I 19.5 D +37.5 D +10.5 0.6 I 10.5 D +I 16.5 D +I 22.5 D +40.5 D +7.5 0.6 I 13.5 D +I 25.5 D +I 31.5 D +37.5 D +4.5 0.6 I 4.5 D +I 10.5 D +I 16.5 D +40.5 D +1.5 0.6 I 1.5 D +I 7.5 D +I 13.5 D +I 19.5 D +I 31.5 D +37.5 D diff --git a/backend/tests/data/eps/dotcode_1.5_ds1.1.eps b/backend/tests/data/eps/dotcode_1.5_ds1.1.eps index 5bd18c48..195c1998 100644 --- a/backend/tests/data/eps/dotcode_1.5_ds1.1.eps +++ b/backend/tests/data/eps/dotcode_1.5_ds1.1.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 34 25 +%%BoundingBox: 0 0 43 28 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -24.6 0 0 33.6 R +27.6 0 0 42.6 R 0 0 0 setrgbcolor -22.8 1.65 I 1.8 D +25.8 1.65 I 1.8 D I 13.8 D -I 19.8 D I 25.8 D -31.8 D -19.8 1.65 I 10.8 D -I 16.8 D -22.8 D -16.8 1.65 I 1.8 D -I 7.8 D -I 19.8 D -I 25.8 D -31.8 D -13.8 1.65 4.8 D -10.8 1.65 I 1.8 D -31.8 D -7.8 1.65 I 4.8 D -I 10.8 D -I 16.8 D -22.8 D -4.8 1.65 I 1.8 D -I 7.8 D -I 25.8 D -31.8 D -1.8 1.65 I 4.8 D +I 31.8 D +37.8 D +22.8 1.65 I 4.8 D I 10.8 D I 22.8 D -28.8 D +I 34.8 D +40.8 D +19.8 1.65 I 1.8 D +I 7.8 D +I 19.8 D +37.8 D +16.8 1.65 I 4.8 D +I 10.8 D +I 28.8 D +34.8 D +13.8 1.65 I 1.8 D +I 19.8 D +37.8 D +10.8 1.65 I 10.8 D +I 16.8 D +I 22.8 D +40.8 D +7.8 1.65 I 13.8 D +I 25.8 D +I 31.8 D +37.8 D +4.8 1.65 I 4.8 D +I 10.8 D +I 16.8 D +40.8 D +1.8 1.65 I 1.8 D +I 7.8 D +I 13.8 D +I 19.8 D +I 31.8 D +37.8 D diff --git a/backend/tests/data/eps/dotcode_1.5_ds2.1.eps b/backend/tests/data/eps/dotcode_1.5_ds2.1.eps index 7e29a840..3619f5a3 100644 --- a/backend/tests/data/eps/dotcode_1.5_ds2.1.eps +++ b/backend/tests/data/eps/dotcode_1.5_ds2.1.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 37 28 +%%BoundingBox: 0 0 46 31 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -27.6 0 0 36.6 R +30.6 0 0 45.6 R 0 0 0 setrgbcolor -24.3 3.15 I 3.3 D +27.3 3.15 I 3.3 D I 15.3 D -I 21.3 D I 27.3 D -33.3 D -21.3 3.15 I 12.3 D -I 18.3 D -24.3 D -18.3 3.15 I 3.3 D -I 9.3 D -I 21.3 D -I 27.3 D -33.3 D -15.3 3.15 6.3 D -12.3 3.15 I 3.3 D -33.3 D -9.3 3.15 I 6.3 D -I 12.3 D -I 18.3 D -24.3 D -6.3 3.15 I 3.3 D -I 9.3 D -I 27.3 D -33.3 D -3.3 3.15 I 6.3 D +I 33.3 D +39.3 D +24.3 3.15 I 6.3 D I 12.3 D I 24.3 D -30.3 D +I 36.3 D +42.3 D +21.3 3.15 I 3.3 D +I 9.3 D +I 21.3 D +39.3 D +18.3 3.15 I 6.3 D +I 12.3 D +I 30.3 D +36.3 D +15.3 3.15 I 3.3 D +I 21.3 D +39.3 D +12.3 3.15 I 12.3 D +I 18.3 D +I 24.3 D +42.3 D +9.3 3.15 I 15.3 D +I 27.3 D +I 33.3 D +39.3 D +6.3 3.15 I 6.3 D +I 12.3 D +I 18.3 D +42.3 D +3.3 3.15 I 3.3 D +I 9.3 D +I 15.3 D +I 21.3 D +I 33.3 D +39.3 D diff --git a/backend/tests/data/eps/dotcode_2.0.eps b/backend/tests/data/eps/dotcode_2.0.eps index 98bf5d2c..087e5e28 100644 --- a/backend/tests/data/eps/dotcode_2.0.eps +++ b/backend/tests/data/eps/dotcode_2.0.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 44 32 +%%BoundingBox: 0 0 56 36 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -32 0 0 44 R +36 0 0 56 R 0 0 0 setrgbcolor -30 1.6 I 2 D +34 1.6 I 2 D I 18 D -I 26 D I 34 D -42 D -26 1.6 I 14 D -I 22 D -30 D -22 1.6 I 2 D -I 10 D -I 26 D -I 34 D -42 D -18 1.6 6 D -14 1.6 I 2 D -42 D -10 1.6 I 6 D -I 14 D -I 22 D -30 D -6 1.6 I 2 D -I 10 D -I 34 D -42 D -2 1.6 I 6 D +I 42 D +50 D +30 1.6 I 6 D I 14 D I 30 D -38 D +I 46 D +54 D +26 1.6 I 2 D +I 10 D +I 26 D +50 D +22 1.6 I 6 D +I 14 D +I 38 D +46 D +18 1.6 I 2 D +I 26 D +50 D +14 1.6 I 14 D +I 22 D +I 30 D +54 D +10 1.6 I 18 D +I 34 D +I 42 D +50 D +6 1.6 I 6 D +I 14 D +I 22 D +54 D +2 1.6 I 2 D +I 10 D +I 18 D +I 26 D +I 42 D +50 D diff --git a/backend/tests/data/eps/dotcode_2.0_ds0.9.eps b/backend/tests/data/eps/dotcode_2.0_ds0.9.eps index 38dda9d6..d4827507 100644 --- a/backend/tests/data/eps/dotcode_2.0_ds0.9.eps +++ b/backend/tests/data/eps/dotcode_2.0_ds0.9.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 44 32 +%%BoundingBox: 0 0 56 36 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -32 0 0 44 R +36 0 0 56 R 0 0 0 setrgbcolor -30 1.8 I 2 D +34 1.8 I 2 D I 18 D -I 26 D I 34 D -42 D -26 1.8 I 14 D -I 22 D -30 D -22 1.8 I 2 D -I 10 D -I 26 D -I 34 D -42 D -18 1.8 6 D -14 1.8 I 2 D -42 D -10 1.8 I 6 D -I 14 D -I 22 D -30 D -6 1.8 I 2 D -I 10 D -I 34 D -42 D -2 1.8 I 6 D +I 42 D +50 D +30 1.8 I 6 D I 14 D I 30 D -38 D +I 46 D +54 D +26 1.8 I 2 D +I 10 D +I 26 D +50 D +22 1.8 I 6 D +I 14 D +I 38 D +46 D +18 1.8 I 2 D +I 26 D +50 D +14 1.8 I 14 D +I 22 D +I 30 D +54 D +10 1.8 I 18 D +I 34 D +I 42 D +50 D +6 1.8 I 6 D +I 14 D +I 22 D +54 D +2 1.8 I 2 D +I 10 D +I 18 D +I 26 D +I 42 D +50 D diff --git a/backend/tests/data/eps/dotcode_2.0_ds1.1.eps b/backend/tests/data/eps/dotcode_2.0_ds1.1.eps index e643be8c..8401ef6b 100644 --- a/backend/tests/data/eps/dotcode_2.0_ds1.1.eps +++ b/backend/tests/data/eps/dotcode_2.0_ds1.1.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 45 33 +%%BoundingBox: 0 0 57 37 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -32.8 0 0 44.8 R +36.8 0 0 56.8 R 0 0 0 setrgbcolor -30.4 2.2 I 2.4 D +34.4 2.2 I 2.4 D I 18.4 D -I 26.4 D I 34.4 D -42.4 D -26.4 2.2 I 14.4 D -I 22.4 D -30.4 D -22.4 2.2 I 2.4 D -I 10.4 D -I 26.4 D -I 34.4 D -42.4 D -18.4 2.2 6.4 D -14.4 2.2 I 2.4 D -42.4 D -10.4 2.2 I 6.4 D -I 14.4 D -I 22.4 D -30.4 D -6.4 2.2 I 2.4 D -I 10.4 D -I 34.4 D -42.4 D -2.4 2.2 I 6.4 D +I 42.4 D +50.4 D +30.4 2.2 I 6.4 D I 14.4 D I 30.4 D -38.4 D +I 46.4 D +54.4 D +26.4 2.2 I 2.4 D +I 10.4 D +I 26.4 D +50.4 D +22.4 2.2 I 6.4 D +I 14.4 D +I 38.4 D +46.4 D +18.4 2.2 I 2.4 D +I 26.4 D +50.4 D +14.4 2.2 I 14.4 D +I 22.4 D +I 30.4 D +54.4 D +10.4 2.2 I 18.4 D +I 34.4 D +I 42.4 D +50.4 D +6.4 2.2 I 6.4 D +I 14.4 D +I 22.4 D +54.4 D +2.4 2.2 I 2.4 D +I 10.4 D +I 18.4 D +I 26.4 D +I 42.4 D +50.4 D diff --git a/backend/tests/data/eps/dotcode_3.0.eps b/backend/tests/data/eps/dotcode_3.0.eps index fbda1a97..1d8fe32c 100644 --- a/backend/tests/data/eps/dotcode_3.0.eps +++ b/backend/tests/data/eps/dotcode_3.0.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 66 48 +%%BoundingBox: 0 0 84 54 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -48 0 0 66 R +54 0 0 84 R 0 0 0 setrgbcolor -45 2.4 I 3 D +51 2.4 I 3 D I 27 D -I 39 D I 51 D -63 D -39 2.4 I 21 D -I 33 D -45 D -33 2.4 I 3 D -I 15 D -I 39 D -I 51 D -63 D -27 2.4 9 D -21 2.4 I 3 D -63 D -15 2.4 I 9 D -I 21 D -I 33 D -45 D -9 2.4 I 3 D -I 15 D -I 51 D -63 D -3 2.4 I 9 D +I 63 D +75 D +45 2.4 I 9 D I 21 D I 45 D -57 D +I 69 D +81 D +39 2.4 I 3 D +I 15 D +I 39 D +75 D +33 2.4 I 9 D +I 21 D +I 57 D +69 D +27 2.4 I 3 D +I 39 D +75 D +21 2.4 I 21 D +I 33 D +I 45 D +81 D +15 2.4 I 27 D +I 51 D +I 63 D +75 D +9 2.4 I 9 D +I 21 D +I 33 D +81 D +3 2.4 I 3 D +I 15 D +I 27 D +I 39 D +I 63 D +75 D diff --git a/backend/tests/data/eps/dotcode_3.0_ds0.4.eps b/backend/tests/data/eps/dotcode_3.0_ds0.4.eps index 3eb7aa6a..2772460c 100644 --- a/backend/tests/data/eps/dotcode_3.0_ds0.4.eps +++ b/backend/tests/data/eps/dotcode_3.0_ds0.4.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 66 48 +%%BoundingBox: 0 0 84 54 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -48 0 0 66 R +54 0 0 84 R 0 0 0 setrgbcolor -45 1.2 I 3 D +51 1.2 I 3 D I 27 D -I 39 D I 51 D -63 D -39 1.2 I 21 D -I 33 D -45 D -33 1.2 I 3 D -I 15 D -I 39 D -I 51 D -63 D -27 1.2 9 D -21 1.2 I 3 D -63 D -15 1.2 I 9 D -I 21 D -I 33 D -45 D -9 1.2 I 3 D -I 15 D -I 51 D -63 D -3 1.2 I 9 D +I 63 D +75 D +45 1.2 I 9 D I 21 D I 45 D -57 D +I 69 D +81 D +39 1.2 I 3 D +I 15 D +I 39 D +75 D +33 1.2 I 9 D +I 21 D +I 57 D +69 D +27 1.2 I 3 D +I 39 D +75 D +21 1.2 I 21 D +I 33 D +I 45 D +81 D +15 1.2 I 27 D +I 51 D +I 63 D +75 D +9 1.2 I 9 D +I 21 D +I 33 D +81 D +3 1.2 I 3 D +I 15 D +I 27 D +I 39 D +I 63 D +75 D diff --git a/backend/tests/data/eps/dotcode_3.0_ds1.1.eps b/backend/tests/data/eps/dotcode_3.0_ds1.1.eps index 13d732a9..f2e18463 100644 --- a/backend/tests/data/eps/dotcode_3.0_ds1.1.eps +++ b/backend/tests/data/eps/dotcode_3.0_ds1.1.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 68 50 +%%BoundingBox: 0 0 86 56 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -49.2 0 0 67.2 R +55.2 0 0 85.2 R 0 0 0 setrgbcolor -45.6 3.3 I 3.6 D +51.6 3.3 I 3.6 D I 27.6 D -I 39.6 D I 51.6 D -63.6 D -39.6 3.3 I 21.6 D -I 33.6 D -45.6 D -33.6 3.3 I 3.6 D -I 15.6 D -I 39.6 D -I 51.6 D -63.6 D -27.6 3.3 9.6 D -21.6 3.3 I 3.6 D -63.6 D -15.6 3.3 I 9.6 D -I 21.6 D -I 33.6 D -45.6 D -9.6 3.3 I 3.6 D -I 15.6 D -I 51.6 D -63.6 D -3.6 3.3 I 9.6 D +I 63.6 D +75.6 D +45.6 3.3 I 9.6 D I 21.6 D I 45.6 D -57.6 D +I 69.6 D +81.6 D +39.6 3.3 I 3.6 D +I 15.6 D +I 39.6 D +75.6 D +33.6 3.3 I 9.6 D +I 21.6 D +I 57.6 D +69.6 D +27.6 3.3 I 3.6 D +I 39.6 D +75.6 D +21.6 3.3 I 21.6 D +I 33.6 D +I 45.6 D +81.6 D +15.6 3.3 I 27.6 D +I 51.6 D +I 63.6 D +75.6 D +9.6 3.3 I 9.6 D +I 21.6 D +I 33.6 D +81.6 D +3.6 3.3 I 3.6 D +I 15.6 D +I 27.6 D +I 39.6 D +I 63.6 D +75.6 D diff --git a/backend/tests/data/eps/dotcode_3.5.eps b/backend/tests/data/eps/dotcode_3.5.eps index 78770ddf..dfdd6f46 100644 --- a/backend/tests/data/eps/dotcode_3.5.eps +++ b/backend/tests/data/eps/dotcode_3.5.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 77 56 +%%BoundingBox: 0 0 98 63 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -56 0 0 77 R +63 0 0 98 R 0 0 0 setrgbcolor -52.5 2.8 I 3.5 D +59.5 2.8 I 3.5 D I 31.5 D -I 45.5 D I 59.5 D -73.5 D -45.5 2.8 I 24.5 D -I 38.5 D -52.5 D -38.5 2.8 I 3.5 D -I 17.5 D -I 45.5 D -I 59.5 D -73.5 D -31.5 2.8 10.5 D -24.5 2.8 I 3.5 D -73.5 D -17.5 2.8 I 10.5 D -I 24.5 D -I 38.5 D -52.5 D -10.5 2.8 I 3.5 D -I 17.5 D -I 59.5 D -73.5 D -3.5 2.8 I 10.5 D +I 73.5 D +87.5 D +52.5 2.8 I 10.5 D I 24.5 D I 52.5 D -66.5 D +I 80.5 D +94.5 D +45.5 2.8 I 3.5 D +I 17.5 D +I 45.5 D +87.5 D +38.5 2.8 I 10.5 D +I 24.5 D +I 66.5 D +80.5 D +31.5 2.8 I 3.5 D +I 45.5 D +87.5 D +24.5 2.8 I 24.5 D +I 38.5 D +I 52.5 D +94.5 D +17.5 2.8 I 31.5 D +I 59.5 D +I 73.5 D +87.5 D +10.5 2.8 I 10.5 D +I 24.5 D +I 38.5 D +94.5 D +3.5 2.8 I 3.5 D +I 17.5 D +I 31.5 D +I 45.5 D +I 73.5 D +87.5 D diff --git a/backend/tests/data/eps/dotcode_3.5_ds0.4.eps b/backend/tests/data/eps/dotcode_3.5_ds0.4.eps index 04a4cfb7..afc6ac0a 100644 --- a/backend/tests/data/eps/dotcode_3.5_ds0.4.eps +++ b/backend/tests/data/eps/dotcode_3.5_ds0.4.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 77 56 +%%BoundingBox: 0 0 98 63 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -56 0 0 77 R +63 0 0 98 R 0 0 0 setrgbcolor -52.5 1.4 I 3.5 D +59.5 1.4 I 3.5 D I 31.5 D -I 45.5 D I 59.5 D -73.5 D -45.5 1.4 I 24.5 D -I 38.5 D -52.5 D -38.5 1.4 I 3.5 D -I 17.5 D -I 45.5 D -I 59.5 D -73.5 D -31.5 1.4 10.5 D -24.5 1.4 I 3.5 D -73.5 D -17.5 1.4 I 10.5 D -I 24.5 D -I 38.5 D -52.5 D -10.5 1.4 I 3.5 D -I 17.5 D -I 59.5 D -73.5 D -3.5 1.4 I 10.5 D +I 73.5 D +87.5 D +52.5 1.4 I 10.5 D I 24.5 D I 52.5 D -66.5 D +I 80.5 D +94.5 D +45.5 1.4 I 3.5 D +I 17.5 D +I 45.5 D +87.5 D +38.5 1.4 I 10.5 D +I 24.5 D +I 66.5 D +80.5 D +31.5 1.4 I 3.5 D +I 45.5 D +87.5 D +24.5 1.4 I 24.5 D +I 38.5 D +I 52.5 D +94.5 D +17.5 1.4 I 31.5 D +I 59.5 D +I 73.5 D +87.5 D +10.5 1.4 I 10.5 D +I 24.5 D +I 38.5 D +94.5 D +3.5 1.4 I 3.5 D +I 17.5 D +I 31.5 D +I 45.5 D +I 73.5 D +87.5 D diff --git a/backend/tests/data/eps/dotcode_3.5_ds1.1.eps b/backend/tests/data/eps/dotcode_3.5_ds1.1.eps index fbd8f827..13769cf3 100644 --- a/backend/tests/data/eps/dotcode_3.5_ds1.1.eps +++ b/backend/tests/data/eps/dotcode_3.5_ds1.1.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 79 58 +%%BoundingBox: 0 0 100 65 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -57.4 0 0 78.4 R +64.4 0 0 99.4 R 0 0 0 setrgbcolor -53.2 3.85 I 4.2 D +60.2 3.85 I 4.2 D I 32.2 D -I 46.2 D I 60.2 D -74.2 D -46.2 3.85 I 25.2 D -I 39.2 D -53.2 D -39.2 3.85 I 4.2 D -I 18.2 D -I 46.2 D -I 60.2 D -74.2 D -32.2 3.85 11.2 D -25.2 3.85 I 4.2 D -74.2 D -18.2 3.85 I 11.2 D -I 25.2 D -I 39.2 D -53.2 D -11.2 3.85 I 4.2 D -I 18.2 D -I 60.2 D -74.2 D -4.2 3.85 I 11.2 D +I 74.2 D +88.2 D +53.2 3.85 I 11.2 D I 25.2 D I 53.2 D -67.2 D +I 81.2 D +95.2 D +46.2 3.85 I 4.2 D +I 18.2 D +I 46.2 D +88.2 D +39.2 3.85 I 11.2 D +I 25.2 D +I 67.2 D +81.2 D +32.2 3.85 I 4.2 D +I 46.2 D +88.2 D +25.2 3.85 I 25.2 D +I 39.2 D +I 53.2 D +95.2 D +18.2 3.85 I 32.2 D +I 60.2 D +I 74.2 D +88.2 D +11.2 3.85 I 11.2 D +I 25.2 D +I 39.2 D +95.2 D +4.2 3.85 I 4.2 D +I 18.2 D +I 32.2 D +I 46.2 D +I 74.2 D +88.2 D diff --git a/backend/tests/data/eps/dotcode_5.0.eps b/backend/tests/data/eps/dotcode_5.0.eps index a2149474..f479a60f 100644 --- a/backend/tests/data/eps/dotcode_5.0.eps +++ b/backend/tests/data/eps/dotcode_5.0.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 110 80 +%%BoundingBox: 0 0 140 90 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -80 0 0 110 R +90 0 0 140 R 0 0 0 setrgbcolor -75 4 I 5 D +85 4 I 5 D I 45 D -I 65 D I 85 D -105 D -65 4 I 35 D -I 55 D -75 D -55 4 I 5 D -I 25 D -I 65 D -I 85 D -105 D -45 4 15 D -35 4 I 5 D -105 D -25 4 I 15 D -I 35 D -I 55 D -75 D -15 4 I 5 D -I 25 D -I 85 D -105 D -5 4 I 15 D +I 105 D +125 D +75 4 I 15 D I 35 D I 75 D -95 D +I 115 D +135 D +65 4 I 5 D +I 25 D +I 65 D +125 D +55 4 I 15 D +I 35 D +I 95 D +115 D +45 4 I 5 D +I 65 D +125 D +35 4 I 35 D +I 55 D +I 75 D +135 D +25 4 I 45 D +I 85 D +I 105 D +125 D +15 4 I 15 D +I 35 D +I 55 D +135 D +5 4 I 5 D +I 25 D +I 45 D +I 65 D +I 105 D +125 D diff --git a/backend/tests/data/eps/dotcode_5.0_ds0.2.eps b/backend/tests/data/eps/dotcode_5.0_ds0.2.eps index 0913d036..bedc75f6 100644 --- a/backend/tests/data/eps/dotcode_5.0_ds0.2.eps +++ b/backend/tests/data/eps/dotcode_5.0_ds0.2.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 110 80 +%%BoundingBox: 0 0 140 90 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -80 0 0 110 R +90 0 0 140 R 0 0 0 setrgbcolor -75 1 I 5 D +85 1 I 5 D I 45 D -I 65 D I 85 D -105 D -65 1 I 35 D -I 55 D -75 D -55 1 I 5 D -I 25 D -I 65 D -I 85 D -105 D -45 1 15 D -35 1 I 5 D -105 D -25 1 I 15 D -I 35 D -I 55 D -75 D -15 1 I 5 D -I 25 D -I 85 D -105 D -5 1 I 15 D +I 105 D +125 D +75 1 I 15 D I 35 D I 75 D -95 D +I 115 D +135 D +65 1 I 5 D +I 25 D +I 65 D +125 D +55 1 I 15 D +I 35 D +I 95 D +115 D +45 1 I 5 D +I 65 D +125 D +35 1 I 35 D +I 55 D +I 75 D +135 D +25 1 I 45 D +I 85 D +I 105 D +125 D +15 1 I 15 D +I 35 D +I 55 D +135 D +5 1 I 5 D +I 25 D +I 45 D +I 65 D +I 105 D +125 D diff --git a/backend/tests/data/eps/dotcode_5.0_ds1.1.eps b/backend/tests/data/eps/dotcode_5.0_ds1.1.eps index 5473c891..5246f8a8 100644 --- a/backend/tests/data/eps/dotcode_5.0_ds1.1.eps +++ b/backend/tests/data/eps/dotcode_5.0_ds1.1.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 112 82 +%%BoundingBox: 0 0 142 92 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -82 0 0 112 R +92 0 0 142 R 0 0 0 setrgbcolor -76 5.5 I 6 D +86 5.5 I 6 D I 46 D -I 66 D I 86 D -106 D -66 5.5 I 36 D -I 56 D -76 D -56 5.5 I 6 D -I 26 D -I 66 D -I 86 D -106 D -46 5.5 16 D -36 5.5 I 6 D -106 D -26 5.5 I 16 D -I 36 D -I 56 D -76 D -16 5.5 I 6 D -I 26 D -I 86 D -106 D -6 5.5 I 16 D +I 106 D +126 D +76 5.5 I 16 D I 36 D I 76 D -96 D +I 116 D +136 D +66 5.5 I 6 D +I 26 D +I 66 D +126 D +56 5.5 I 16 D +I 36 D +I 96 D +116 D +46 5.5 I 6 D +I 66 D +126 D +36 5.5 I 36 D +I 56 D +I 76 D +136 D +26 5.5 I 46 D +I 86 D +I 106 D +126 D +16 5.5 I 16 D +I 36 D +I 56 D +136 D +6 5.5 I 6 D +I 26 D +I 46 D +I 66 D +I 106 D +126 D diff --git a/backend/tests/data/eps/dotcode_5.0_ds1.7.eps b/backend/tests/data/eps/dotcode_5.0_ds1.7.eps index 3d3da862..70896412 100644 --- a/backend/tests/data/eps/dotcode_5.0_ds1.7.eps +++ b/backend/tests/data/eps/dotcode_5.0_ds1.7.eps @@ -1,40 +1,51 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 118 88 +%%BoundingBox: 0 0 148 98 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /I { 2 copy } bind def 1 1 1 setrgbcolor -88 0 0 118 R +98 0 0 148 R 0 0 0 setrgbcolor -79 8.5 I 9 D +89 8.5 I 9 D I 49 D -I 69 D I 89 D -109 D -69 8.5 I 39 D -I 59 D -79 D -59 8.5 I 9 D -I 29 D -I 69 D -I 89 D -109 D -49 8.5 19 D -39 8.5 I 9 D -109 D -29 8.5 I 19 D -I 39 D -I 59 D -79 D -19 8.5 I 9 D -I 29 D -I 89 D -109 D -9 8.5 I 19 D +I 109 D +129 D +79 8.5 I 19 D I 39 D I 79 D -99 D +I 119 D +139 D +69 8.5 I 9 D +I 29 D +I 69 D +129 D +59 8.5 I 19 D +I 39 D +I 99 D +119 D +49 8.5 I 9 D +I 69 D +129 D +39 8.5 I 39 D +I 59 D +I 79 D +139 D +29 8.5 I 49 D +I 89 D +I 109 D +129 D +19 8.5 I 19 D +I 39 D +I 59 D +139 D +9 8.5 I 9 D +I 29 D +I 49 D +I 69 D +I 109 D +129 D diff --git a/backend/tests/data/eps/dotcode_no_bg.eps b/backend/tests/data/eps/dotcode_no_bg.eps index d570ad59..eb70596b 100644 --- a/backend/tests/data/eps/dotcode_no_bg.eps +++ b/backend/tests/data/eps/dotcode_no_bg.eps @@ -1,37 +1,48 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 22 16 +%%BoundingBox: 0 0 28 18 %%EndComments /D { newpath 3 1 roll 0 360 arc fill } bind def /I { 2 copy } bind def 1 0 0 setrgbcolor -15 0.8 I 1 D +17 0.8 I 1 D I 9 D -I 13 D I 17 D -21 D -13 0.8 I 7 D -I 11 D -15 D -11 0.8 I 1 D -I 5 D -I 13 D -I 17 D -21 D -9 0.8 3 D -7 0.8 I 1 D -21 D -5 0.8 I 3 D -I 7 D -I 11 D -15 D -3 0.8 I 1 D -I 5 D -I 17 D -21 D -1 0.8 I 3 D +I 21 D +25 D +15 0.8 I 3 D I 7 D I 15 D -19 D +I 23 D +27 D +13 0.8 I 1 D +I 5 D +I 13 D +25 D +11 0.8 I 3 D +I 7 D +I 19 D +23 D +9 0.8 I 1 D +I 13 D +25 D +7 0.8 I 7 D +I 11 D +I 15 D +27 D +5 0.8 I 9 D +I 17 D +I 21 D +25 D +3 0.8 I 3 D +I 7 D +I 11 D +27 D +1 0.8 I 1 D +I 5 D +I 9 D +I 13 D +I 21 D +25 D diff --git a/backend/tests/data/gif/dotcode_1.0.gif b/backend/tests/data/gif/dotcode_1.0.gif index 263069fc..6703c689 100644 Binary files a/backend/tests/data/gif/dotcode_1.0.gif and b/backend/tests/data/gif/dotcode_1.0.gif differ diff --git a/backend/tests/data/gif/dotcode_1.0_ds0.1.gif b/backend/tests/data/gif/dotcode_1.0_ds0.1.gif index 263069fc..6703c689 100644 Binary files a/backend/tests/data/gif/dotcode_1.0_ds0.1.gif and b/backend/tests/data/gif/dotcode_1.0_ds0.1.gif differ diff --git a/backend/tests/data/gif/dotcode_1.0_ds1.1.gif b/backend/tests/data/gif/dotcode_1.0_ds1.1.gif index 56d79eb4..eb8816b1 100644 Binary files a/backend/tests/data/gif/dotcode_1.0_ds1.1.gif and b/backend/tests/data/gif/dotcode_1.0_ds1.1.gif differ diff --git a/backend/tests/data/gif/dotcode_1.5.gif b/backend/tests/data/gif/dotcode_1.5.gif index 5eaefbdb..67a3a6ec 100644 Binary files a/backend/tests/data/gif/dotcode_1.5.gif and b/backend/tests/data/gif/dotcode_1.5.gif differ diff --git a/backend/tests/data/gif/dotcode_1.5_ds0.4.gif b/backend/tests/data/gif/dotcode_1.5_ds0.4.gif index 82ff18b5..3312c60d 100644 Binary files a/backend/tests/data/gif/dotcode_1.5_ds0.4.gif and b/backend/tests/data/gif/dotcode_1.5_ds0.4.gif differ diff --git a/backend/tests/data/gif/dotcode_1.5_ds1.1.gif b/backend/tests/data/gif/dotcode_1.5_ds1.1.gif index 5eaefbdb..67a3a6ec 100644 Binary files a/backend/tests/data/gif/dotcode_1.5_ds1.1.gif and b/backend/tests/data/gif/dotcode_1.5_ds1.1.gif differ diff --git a/backend/tests/data/gif/dotcode_1.5_ds2.1.gif b/backend/tests/data/gif/dotcode_1.5_ds2.1.gif index 808e481d..a28c2892 100644 Binary files a/backend/tests/data/gif/dotcode_1.5_ds2.1.gif and b/backend/tests/data/gif/dotcode_1.5_ds2.1.gif differ diff --git a/backend/tests/data/gif/dotcode_2.0.gif b/backend/tests/data/gif/dotcode_2.0.gif index 22c451dd..d085c902 100644 Binary files a/backend/tests/data/gif/dotcode_2.0.gif and b/backend/tests/data/gif/dotcode_2.0.gif differ diff --git a/backend/tests/data/gif/dotcode_2.0_ds0.9.gif b/backend/tests/data/gif/dotcode_2.0_ds0.9.gif index 22c451dd..d085c902 100644 Binary files a/backend/tests/data/gif/dotcode_2.0_ds0.9.gif and b/backend/tests/data/gif/dotcode_2.0_ds0.9.gif differ diff --git a/backend/tests/data/gif/dotcode_2.0_ds1.1.gif b/backend/tests/data/gif/dotcode_2.0_ds1.1.gif index 1f57e90b..003c29e2 100644 Binary files a/backend/tests/data/gif/dotcode_2.0_ds1.1.gif and b/backend/tests/data/gif/dotcode_2.0_ds1.1.gif differ diff --git a/backend/tests/data/gif/dotcode_3.0.gif b/backend/tests/data/gif/dotcode_3.0.gif index 5b6acba4..44ea15ac 100644 Binary files a/backend/tests/data/gif/dotcode_3.0.gif and b/backend/tests/data/gif/dotcode_3.0.gif differ diff --git a/backend/tests/data/gif/dotcode_3.0_ds0.4.gif b/backend/tests/data/gif/dotcode_3.0_ds0.4.gif index 35a9790d..dfbb830e 100644 Binary files a/backend/tests/data/gif/dotcode_3.0_ds0.4.gif and b/backend/tests/data/gif/dotcode_3.0_ds0.4.gif differ diff --git a/backend/tests/data/gif/dotcode_3.0_ds1.1.gif b/backend/tests/data/gif/dotcode_3.0_ds1.1.gif index 8283c192..05ba74b3 100644 Binary files a/backend/tests/data/gif/dotcode_3.0_ds1.1.gif and b/backend/tests/data/gif/dotcode_3.0_ds1.1.gif differ diff --git a/backend/tests/data/gif/dotcode_3.5.gif b/backend/tests/data/gif/dotcode_3.5.gif index d03f23b5..cfe60e30 100644 Binary files a/backend/tests/data/gif/dotcode_3.5.gif and b/backend/tests/data/gif/dotcode_3.5.gif differ diff --git a/backend/tests/data/gif/dotcode_3.5_ds0.4.gif b/backend/tests/data/gif/dotcode_3.5_ds0.4.gif index 65cded9b..55df57a4 100644 Binary files a/backend/tests/data/gif/dotcode_3.5_ds0.4.gif and b/backend/tests/data/gif/dotcode_3.5_ds0.4.gif differ diff --git a/backend/tests/data/gif/dotcode_3.5_ds1.1.gif b/backend/tests/data/gif/dotcode_3.5_ds1.1.gif index 373c4128..2633c163 100644 Binary files a/backend/tests/data/gif/dotcode_3.5_ds1.1.gif and b/backend/tests/data/gif/dotcode_3.5_ds1.1.gif differ diff --git a/backend/tests/data/gif/dotcode_5.0.gif b/backend/tests/data/gif/dotcode_5.0.gif index 2fa8a803..2cbfdfe4 100644 Binary files a/backend/tests/data/gif/dotcode_5.0.gif and b/backend/tests/data/gif/dotcode_5.0.gif differ diff --git a/backend/tests/data/gif/dotcode_5.0_ds0.2.gif b/backend/tests/data/gif/dotcode_5.0_ds0.2.gif index ab9a8f23..82c7bfd0 100644 Binary files a/backend/tests/data/gif/dotcode_5.0_ds0.2.gif and b/backend/tests/data/gif/dotcode_5.0_ds0.2.gif differ diff --git a/backend/tests/data/gif/dotcode_5.0_ds1.1.gif b/backend/tests/data/gif/dotcode_5.0_ds1.1.gif index d4bd2d17..a69079b5 100644 Binary files a/backend/tests/data/gif/dotcode_5.0_ds1.1.gif and b/backend/tests/data/gif/dotcode_5.0_ds1.1.gif differ diff --git a/backend/tests/data/gif/dotcode_5.0_ds1.7.gif b/backend/tests/data/gif/dotcode_5.0_ds1.7.gif index faa69848..b8c6c526 100644 Binary files a/backend/tests/data/gif/dotcode_5.0_ds1.7.gif and b/backend/tests/data/gif/dotcode_5.0_ds1.7.gif differ diff --git a/backend/tests/data/gif/dotcode_bgfgalpha.gif b/backend/tests/data/gif/dotcode_bgfgalpha.gif index dedd7d88..361ce00a 100644 Binary files a/backend/tests/data/gif/dotcode_bgfgalpha.gif and b/backend/tests/data/gif/dotcode_bgfgalpha.gif differ diff --git a/backend/tests/data/gif/dotcode_bgfgtrans.gif b/backend/tests/data/gif/dotcode_bgfgtrans.gif index 4eb4f5c9..e638f74e 100644 Binary files a/backend/tests/data/gif/dotcode_bgfgtrans.gif and b/backend/tests/data/gif/dotcode_bgfgtrans.gif differ diff --git a/backend/tests/data/gif/dotcode_bgtrans.gif b/backend/tests/data/gif/dotcode_bgtrans.gif index 4eb4f5c9..e638f74e 100644 Binary files a/backend/tests/data/gif/dotcode_bgtrans.gif and b/backend/tests/data/gif/dotcode_bgtrans.gif differ diff --git a/backend/tests/data/gif/dotcode_cmyk_fg.gif b/backend/tests/data/gif/dotcode_cmyk_fg.gif index a251560c..cf944ca0 100644 Binary files a/backend/tests/data/gif/dotcode_cmyk_fg.gif and b/backend/tests/data/gif/dotcode_cmyk_fg.gif differ diff --git a/backend/tests/data/gif/dotcode_fgtrans.gif b/backend/tests/data/gif/dotcode_fgtrans.gif index e16ff1a1..b447fff0 100644 Binary files a/backend/tests/data/gif/dotcode_fgtrans.gif and b/backend/tests/data/gif/dotcode_fgtrans.gif differ diff --git a/backend/tests/fuzz/gen_corpora.c b/backend/tests/fuzz/gen_corpora.c index 246ab1f2..935c387a 100644 --- a/backend/tests/fuzz/gen_corpora.c +++ b/backend/tests/fuzz/gen_corpora.c @@ -874,7 +874,7 @@ static const struct item data_data[] = { "\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242\242" "\136\136", 162 - }, /* fuzz_data (1st) */ + }, /* fuzz_data (2nd) */ }; /* GS1_MODE data */ diff --git a/backend/tests/test_bwipp.c b/backend/tests/test_bwipp.c index bd824470..cce26ab3 100644 --- a/backend/tests/test_bwipp.c +++ b/backend/tests/test_bwipp.c @@ -1,7 +1,7 @@ /* Test BWIPP against ZXing-C++ (no zint involved) */ /* libzint - the open source barcode library - Copyright (C) 2025 Robin Stuart + Copyright (C) 2025-2026 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -120,7 +120,9 @@ static void test_bwipp_random(const testCtx *const p_ctx, const struct random_it ret = testUtilZXingCPP(i, symbol, data_buf, length, bwipp_buf, 899 /*zxingcpp_cmp*/, cmp_buf, sizeof(cmp_buf), &cmp_len); assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret); - /*fprintf(stderr, "cmp_len %d\n", cmp_len);*/ + #if 0 + fprintf(stderr, "cmp_len %d\n", cmp_len); + #endif ret = testUtilZXingCPPCmp(symbol, cmp_msg, cmp_buf, cmp_len, data_buf, length, NULL /*primary*/, ret_buf, &ret_len); @@ -187,15 +189,9 @@ static void test_datamatrix(const testCtx *const p_ctx) { test_bwipp_random(p_ctx, &rdata, sqrt_width_func); } -/* TODO: explore why "zxingcppdecoder" fails */ -#if 0 static int dotcode_width_func(const struct random_item *rdata, const int bwipp_len) { - const int row_bits = rdata->option_2 >= 1 ? bwipp_len / rdata->option_2 : 0; - const int mod = row_bits ? bwipp_len % row_bits : -1; - if (mod) { - fprintf(stderr, "dotcode_width_func: row_bits %d, bwipp_len %d, mod %d\n", row_bits, bwipp_len, mod); - } - return mod == 0 ? row_bits : 0; + (void)bwipp_len; + return rdata->option_2; } static void test_dotcode(const testCtx *const p_ctx) { @@ -205,7 +201,6 @@ static void test_dotcode(const testCtx *const p_ctx) { test_bwipp_random(p_ctx, &rdata, dotcode_width_func); } -#endif static int micropdf417_width_func(const struct random_item *rdata, const int bwipp_len) { static const short widths[4] = { 38, 55, 82, 99 }; @@ -532,9 +527,7 @@ int main(int argc, char *argv[]) { { "test_codablockf", test_codablockf }, { "test_code128", test_code128 }, { "test_datamatrix", test_datamatrix }, - #if 0 { "test_dotcode", test_dotcode }, - #endif { "test_micropdf417", test_micropdf417 }, { "test_pdf417", test_pdf417 }, { "test_qr", test_qr }, diff --git a/backend/tests/test_dotcode.c b/backend/tests/test_dotcode.c index baee9e1d..30874121 100644 --- a/backend/tests/test_dotcode.c +++ b/backend/tests/test_dotcode.c @@ -1,6 +1,6 @@ /* libzint - the open source barcode library - Copyright (C) 2019-2025 Robin Stuart + Copyright (C) 2019-2026 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -40,26 +40,29 @@ static void test_large(const testCtx *const p_ctx) { int length; int ret; const char *expected_errtxt; + int bwipp_cmp; + int zxingcpp_cmp; + const char *comment; }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ static const struct item data[] = { - /* 0*/ { 200, '0', 2940, 0, "" }, /* 2940 largest Code Set C data that fits in 200x199 HxW */ - /* 1*/ { 200, '0', 2941, ZINT_ERROR_INVALID_OPTION, "Error 735: Resulting symbol height '201' is too large (maximum 200)" }, - /* 2*/ { 200, '9', 200, 0, "" }, /* Changes a number of mask scores re pre-Rev. 4 version, but best score still the same (7) */ - /* 3*/ { 200, '0', 2974, ZINT_ERROR_INVALID_OPTION, "Error 735: Resulting symbol height '203' is too large (maximum 200)" }, /* Width > 200 also */ - /* 4*/ { 200, 'A', 1470, 0, "" }, - /* 5*/ { 200, 'A', 1471, ZINT_ERROR_INVALID_OPTION, "Error 735: Resulting symbol height '201' is too large (maximum 200)" }, - /* 6*/ { 200, '\240', 1225, 0, "" }, - /* 7*/ { 200, '\240', 1226, ZINT_ERROR_INVALID_OPTION, "Error 735: Resulting symbol height '201' is too large (maximum 200)" }, - /* 8*/ { 200, '0', 1, 0, "" }, /* Padding codewords 35 - probably max */ - /* 9*/ { 200, '0', 2, 0, "" }, /* Padding codewords 35 */ - /* 10*/ { 30, '\001', 71, 0, "" }, /* Codeword length 72, ECC length 39, for ND + 1 == 112 */ - /* 11*/ { -1, '0', 1968, 0, "" }, - /* 12*/ { -1, '0', 1969, ZINT_ERROR_INVALID_OPTION, "Error 528: Resulting symbol width '201' is too large (maximum 200)" }, - /* 13*/ { -1, 'A', 984, 0, "" }, - /* 14*/ { -1, 'A', 985, ZINT_ERROR_INVALID_OPTION, "Error 528: Resulting symbol width '201' is too large (maximum 200)" }, - /* 15*/ { -1, '\240', 820, 0, "" }, - /* 16*/ { -1, '\240', 821, ZINT_ERROR_INVALID_OPTION, "Error 528: Resulting symbol width '201' is too large (maximum 200)" }, + /* 0*/ { 200, '0', 2940, 0, "", 1, 1, "" }, /* 2940 largest Code Set C data that fits in 200x199 HxW */ + /* 1*/ { 200, '0', 2941, ZINT_ERROR_INVALID_OPTION, "Error 735: Resulting symbol height '201' is too large (maximum 200)", 1, 1, "" }, + /* 2*/ { 200, '9', 200, 0, "", 1, 1, "" }, /* Changes a number of mask scores re pre-Rev. 4 version, but best score still the same (7) */ + /* 3*/ { 200, '0', 2974, ZINT_ERROR_INVALID_OPTION, "Error 735: Resulting symbol height '203' is too large (maximum 200)", 1, 1, "" }, /* Width > 200 also */ + /* 4*/ { 200, 'A', 1470, 0, "", 1, 1, "" }, + /* 5*/ { 200, 'A', 1471, ZINT_ERROR_INVALID_OPTION, "Error 735: Resulting symbol height '201' is too large (maximum 200)", 1, 1, "" }, + /* 6*/ { 200, '\240', 1225, 0, "", 1, 899, "" }, + /* 7*/ { 200, '\240', 1226, ZINT_ERROR_INVALID_OPTION, "Error 735: Resulting symbol height '201' is too large (maximum 200)", 1, 899, "" }, + /* 8*/ { 200, '0', 1, 0, "", 1, 1, "" }, /* Padding codewords 35 - probably max */ + /* 9*/ { 200, '0', 2, 0, "", 1, 1, "" }, /* Padding codewords 35 */ + /* 10*/ { 30, '\001', 71, 0, "", 1, 1, "" }, /* Codeword length 72, ECC length 39, for ND + 1 == 112 */ + /* 11*/ { -1, '0', 1968, 0, "", 1, 1, "" }, + /* 12*/ { -1, '0', 1969, ZINT_ERROR_INVALID_OPTION, "Error 528: Resulting symbol width '201' is too large (maximum 200)", 1, 1, "" }, + /* 13*/ { -1, 'A', 984, 0, "", 1, 1, "" }, + /* 14*/ { -1, 'A', 985, ZINT_ERROR_INVALID_OPTION, "Error 528: Resulting symbol width '201' is too large (maximum 200)", 1, 1, "" }, + /* 15*/ { -1, '\240', 820, 0, "", 1, 899, "" }, + /* 16*/ { -1, '\240', 821, ZINT_ERROR_INVALID_OPTION, "Error 528: Resulting symbol width '201' is too large (maximum 200)", 1, 899, "" }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -67,6 +70,14 @@ static void test_large(const testCtx *const p_ctx) { char data_buf[4096]; + char escaped[8192]; + char cmp_buf[50000]; + char cmp_msg[1024]; + + /* Only do BWIPP/zxing-cpp tests if asked, too slow otherwise */ + int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); + int do_zxingcpp = (debug & ZINT_DEBUG_TEST_ZXINGCPP) && testUtilHaveZXingCPPDecoder(); + testStartSymbol(p_ctx->func_name, &symbol); for (i = 0; i < data_size; i++) { @@ -84,6 +95,43 @@ static void test_large(const testCtx *const p_ctx) { assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt); assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected_errtxt); + if (ret < ZINT_ERROR) { + if (do_bwipp && testUtilCanBwipp(i, symbol, -1, data[i].option_2, -1, debug)) { + if (!data[i].bwipp_cmp) { + if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not BWIPP compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment); + } else { + char modules_dump[200 * 200 + 1]; + assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i); + ret = testUtilBwipp(i, symbol, -1, data[i].option_2, -1, data_buf, length, NULL, cmp_buf, sizeof(cmp_buf), NULL); + assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret); + + ret = testUtilBwippCmp(symbol, cmp_msg, cmp_buf, modules_dump); + assert_zero(ret, "i:%d %s testUtilBwippCmp %d != 0 %s\n actual: %s\nexpected: %s\n", + i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_buf, modules_dump); + } + } + if (do_zxingcpp && testUtilCanZXingCPP(i, symbol, data_buf, length, debug)) { + if (!data[i].zxingcpp_cmp) { + if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not zxing-cpp compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment); + } else { + int cmp_len, ret_len; + char modules_dump[200 * 200 + 1]; + assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, + "i:%d testUtilModulesDump == -1\n", i); + ret = testUtilZXingCPP(i, symbol, data_buf, length, modules_dump, data[i].zxingcpp_cmp, + cmp_buf, sizeof(cmp_buf), &cmp_len); + assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n", + i, testUtilBarcodeName(symbol->symbology), ret); + + ret = testUtilZXingCPPCmp(symbol, cmp_msg, cmp_buf, cmp_len, data_buf, length, + NULL /*primary*/, escaped, &ret_len); + assert_zero(ret, "i:%d %s testUtilZXingCPPCmp %d != 0 %s\n actual: %.*s\nexpected: %.*s\n", + i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len, + escaped); + } + } + } + ZBarcode_Delete(symbol); } @@ -232,10 +280,14 @@ static void test_input(const testCtx *const p_ctx) { /* 37*/ { DATA_MODE, -1, -1, -1, { 0, 0, "" }, "\200\201\202\203\061\062\063\064", -1, 0, "70 13 56 0A 59 2C 67 0C 22", 1, 899, "BinaryLatch (0x70) 0x80 0x81 0x82 0x83 Intr2xShiftC (0x67) 12 3" }, /* 38*/ { DATA_MODE, -1, -1, -1, { 0, 0, "" }, "\001\200\201\202\203\204\200\201\202\203\204", -1, 0, "65 41 70 31 5A 35 21 5A 5F 31 5A 35 21 5A 5F", 1, 899, "LatchA (0x65) SOH BinaryLatch (0x70) 0x80 0x81 0x82 0x83 0x80 0x81 0x82 0x83" }, /* 39*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "\001abc\011\015\012\036", -1, 0, "65 41 65 41 42 43 61 60 64", 1, 1, "LatchA (0x65) SOH 6xShiftB (0x65) a b c HT CR/LF RS" }, - /* 40*/ { UNICODE_MODE, -1, -1, -1, { 35, 35, "" }, "ABCDE", -1, 0, "6A 21 22 23 24 25 3A 3A 6C", 1, 1, "LatchB (0x6A) A B C D E Z Z FNC2" }, - /* 41*/ { UNICODE_MODE, -1, -1, -1, { 9, 10, "" }, "1234567890", -1, 0, "6B 0C 22 38 4E 5A 65 19 21 6C", 1, 1, "FNC1 (0x6B) 12 34 56 78 90 LatchA (0x65) 9 A FNC2" }, - /* 42*/ { UNICODE_MODE, -1, -1, -1, { 2, 3, "" }, "\001\002\003\004", -1, 0, "65 41 42 43 44 6A 12 13 6C", 1, 1, "LatchA (0x65) PAD 2 3 FNC2" }, - /* 43*/ { DATA_MODE, -1, -1, -1, { 1, 34, "" }, "\200\201\202\203", -1, 0, "70 13 56 0A 59 2C 6D 11 39 6C", 1, 899, "BinaryLatch (0x70) (...) TermA (0x6D) 1 Y FNC2" }, + /* 40*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "00", -1, 0, "6B 00", 0, 1, "BWIPP: different dim (13x10 vs 9x14), see below" }, + /* 41*/ { UNICODE_MODE, -1, 13, -1, { 0, 0, "" }, "00", -1, 0, "6B 00 6A", 1, 1, "" }, + /* 42*/ { UNICODE_MODE, -1, 200, -1, { 0, 0, "" }, "00", -1, 0, "(35) 6B 00 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A", 1, 1, "" }, + /* 43*/ { DATA_MODE, -1, 50, -1, { 0, 0, "" }, "\354\202f", -1, 0, "70 05 4F 48 6E 46 6A", 1, 899, "" }, + /* 44*/ { UNICODE_MODE, -1, -1, -1, { 35, 35, "" }, "ABCDE", -1, 0, "6A 21 22 23 24 25 3A 3A 6C", 1, 1, "LatchB (0x6A) A B C D E Z Z FNC2" }, + /* 45*/ { UNICODE_MODE, -1, -1, -1, { 9, 10, "" }, "1234567890", -1, 0, "6B 0C 22 38 4E 5A 65 19 21 6C", 1, 1, "FNC1 (0x6B) 12 34 56 78 90 LatchA (0x65) 9 A FNC2" }, + /* 46*/ { UNICODE_MODE, -1, -1, -1, { 2, 3, "" }, "\001\002\003\004", -1, 0, "65 41 42 43 44 6A 12 13 6C", 1, 1, "LatchA (0x65) PAD 2 3 FNC2" }, + /* 47*/ { DATA_MODE, -1, -1, -1, { 1, 34, "" }, "\200\201\202\203", -1, 0, "70 13 56 0A 59 2C 6D 11 39 6C", 1, 899, "BinaryLatch (0x70) (...) TermA (0x6D) 1 Y FNC2" }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; diff --git a/backend/tests/test_library.c b/backend/tests/test_library.c index 6ea3bcfd..28262330 100644 --- a/backend/tests/test_library.c +++ b/backend/tests/test_library.c @@ -1,6 +1,6 @@ /* libzint - the open source barcode library - Copyright (C) 2019-2025 Robin Stuart + Copyright (C) 2019-2026 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -408,7 +408,7 @@ static void test_input_data(const testCtx *const p_ctx) { char data_buf[ZINT_MAX_DATA_LEN + 10]; int expected_ret = ZINT_ERROR_TOO_LONG; const char *expected_errtxt[] = { - "Error 797: Input too long", + "Error 796: Input too long", "Error 340: Input length 17399 too long (maximum 256)", "Error 799: Invalid primary, must be NUL-terminated", "Error 854: Invalid primary (linear component), must be NUL-terminated", diff --git a/backend/tests/tools/bwipp_dump.ps.tar.xz b/backend/tests/tools/bwipp_dump.ps.tar.xz index 48c5f18b..17e0e806 100644 Binary files a/backend/tests/tools/bwipp_dump.ps.tar.xz and b/backend/tests/tools/bwipp_dump.ps.tar.xz differ diff --git a/backend/tests/tools/run_bwipp_tests.sh b/backend/tests/tools/run_bwipp_tests.sh index 30321fd4..e501bf82 100755 --- a/backend/tests/tools/run_bwipp_tests.sh +++ b/backend/tests/tools/run_bwipp_tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2021-2025 Robin Stuart +# Copyright (C) 2021-2026 Robin Stuart # SPDX-License-Identifier: BSD-3-Clause # vim: set ts=4 sw=4 et : set -e @@ -40,6 +40,7 @@ run_bwipp_test "test_dmatrix" "reader_init" run_bwipp_test "test_dmatrix" "input" run_bwipp_test "test_dmatrix" "encode" run_bwipp_test "test_dmatrix" "encode_segs" +run_bwipp_test "test_dotcode" "large" run_bwipp_test "test_dotcode" "input" run_bwipp_test "test_dotcode" "encode" run_bwipp_test "test_dotcode" "encode_segs" diff --git a/backend/tests/tools/run_zxingcpp_tests.sh b/backend/tests/tools/run_zxingcpp_tests.sh index bcba718b..86bdaf99 100755 --- a/backend/tests/tools/run_zxingcpp_tests.sh +++ b/backend/tests/tools/run_zxingcpp_tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2021-2025 Robin Stuart +# Copyright (C) 2021-2026 Robin Stuart # SPDX-License-Identifier: BSD-3-Clause # vim: set ts=4 sw=4 et : set -e @@ -34,6 +34,7 @@ run_zxingcpp_test "test_dmatrix" "input" run_zxingcpp_test "test_dmatrix" "encode" run_zxingcpp_test "test_dmatrix" "encode_segs" run_zxingcpp_test "test_dxfilmedge" "encode" +run_zxingcpp_test "test_dotcode" "large" run_zxingcpp_test "test_dotcode" "input" run_zxingcpp_test "test_dotcode" "encode" run_zxingcpp_test "test_dotcode" "encode_segs" diff --git a/cmake_uninstall.cmake.in b/cmake_uninstall.cmake.in index 87e6b062..a96d7e02 100644 --- a/cmake_uninstall.cmake.in +++ b/cmake_uninstall.cmake.in @@ -1,21 +1,31 @@ -IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") -ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +# Copyright (C) 2009-2026 Robin Stuart +# vim: set ts=4 sw=4 et : -FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) -STRING(REGEX REPLACE "\n" ";" files "${files}") -FOREACH(file ${files}) - MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") -# IF(EXISTS "$ENV{DESTDIR}${file}") - EXEC_PROGRAM( - "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" - OUTPUT_VARIABLE rm_out - RETURN_VALUE rm_retval - ) - IF(NOT "${rm_retval}" STREQUAL 0) - MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") - ENDIF(NOT "${rm_retval}" STREQUAL 0) -# ELSE(EXISTS "$ENV{DESTDIR}${file}") -# MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") -# ENDIF(EXISTS "$ENV{DESTDIR}${file}") -ENDFOREACH(file) +if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") +endif() + +file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +string(REGEX REPLACE "\n" ";" files "${files}") +foreach(file ${files}) + if(file MATCHES "(^.*/zint/)[^/]+$") + list(FIND dirs ${CMAKE_MATCH_1} fnd_dir) + if (fnd_dir EQUAL -1) + list(APPEND dirs ${CMAKE_MATCH_1}) + endif() + endif() + message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") + if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.17") + execute_process(COMMAND "@CMAKE_COMMAND@" "-E" "rm" "--" "$ENV{DESTDIR}${file}" RESULT_VARIABLE rm_res) + else() + execute_process(COMMAND "@CMAKE_COMMAND@" "-E" "remove" "$ENV{DESTDIR}${file}" RESULT_VARIABLE rm_res) + endif() + if(rm_res) + message(WARNING "Failed to remove \"$ENV{DESTDIR}${file}\"") + endif() +endforeach(file) +foreach(dir ${dirs}) + if (EXISTS "$ENV{DESTDIR}${dir}" AND IS_DIRECTORY "$ENV{DESTDIR}${dir}") + message(STATUS "Note: did not remove directory \"$ENV{DESTDIR}${dir}\"") + endif() +endforeach(dir) diff --git a/frontend/CMakeLists.txt b/frontend/CMakeLists.txt index 9e2dda50..2a57bc30 100644 --- a/frontend/CMakeLists.txt +++ b/frontend/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2008 by BogDan Vatra < bogdan@licentia.eu > -# Copyright (C) 2009-2024 Robin Stuart +# Copyright (C) 2009-2026 Robin Stuart # vim: set ts=4 sw=4 et : cmake_minimum_required(VERSION 3.10) @@ -24,6 +24,10 @@ if(NOT HAVE_GETOPT_LONG_ONLY) target_link_libraries(${PROJECT_NAME} zint_bundled_getopt) endif() +if(APPLE AND NOT CMAKE_INSTALL_RPATH) + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") +endif() + install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}" RUNTIME) if(UNIX) install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../docs/zint.1" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1" COMPONENT doc)