Skip to content

Commit 1bbae7a

Browse files
committed
GS1-variant datamatrix: Comments
1 parent ac4dbe7 commit 1bbae7a

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

src/gs1datamatrix.ps.src

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
% Barcode Writer in Pure PostScript
22
% https://bwipp.terryburton.co.uk
33
%
4-
% Copyright (c) 2004-2024 Terry Burton
4+
% Copyright (c) 2004-2025 Terry Burton
55
%
66
% $Id$
77
%
@@ -47,9 +47,10 @@ dup /datamatrix dup /uk.co.terryburton.bwipp findresource put
4747
begin
4848
/gs1datamatrix {
4949

50-
20 dict begin % Confine variables to local scope
50+
20 dict begin
5151

5252
/ctx null def
53+
5354
/dontdraw false def
5455
/parse false def
5556
/dontlint false def
@@ -64,7 +65,9 @@ begin
6465
/vals exch def
6566
/ais exch def
6667

68+
%
6769
% Create the datamatrix data
70+
%
6871
/fnc1 -1 def
6972
/dmtx [ fnc1 ] def
7073
0 1 ais length 1 sub {
@@ -84,7 +87,9 @@ begin
8487
} if
8588
} for
8689

90+
%
8791
% Compose input to datamatrix
92+
%
8893
/barcode dmtx length 1 add 5 mul string def
8994
/i 0 def /j 0 def {
9095
i dmtx length eq {exit} if
@@ -99,7 +104,9 @@ begin
99104
} loop
100105
/barcode barcode 0 j getinterval def
101106

107+
%
102108
% Get the result of encoding with datamatrix
109+
%
103110
options (parse) undef
104111
options (dontdraw) true put
105112
options (parsefnc) true put

src/gs1datamatrixrectangular.ps.src

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
% Barcode Writer in Pure PostScript
22
% https://bwipp.terryburton.co.uk
33
%
4-
% Copyright (c) 2004-2024 Terry Burton
4+
% Copyright (c) 2004-2025 Terry Burton
55
%
66
% $Id$
77
%
@@ -47,7 +47,7 @@ dup /datamatrix dup /uk.co.terryburton.bwipp findresource put
4747
begin
4848
/gs1datamatrixrectangular {
4949

50-
20 dict begin % Confine variables to local scope
50+
20 dict begin
5151

5252
/ctx null def
5353
/parse false def
@@ -64,7 +64,9 @@ begin
6464
/vals exch def
6565
/ais exch def
6666

67+
%
6768
% Create the datamatrix data
69+
%
6870
/fnc1 -1 def
6971
/dmtx [ fnc1 ] def
7072
0 1 ais length 1 sub {
@@ -84,7 +86,9 @@ begin
8486
} if
8587
} for
8688

89+
%
8790
% Compose input to datamatrix
91+
%
8892
/barcode dmtx length 1 add 5 mul string def
8993
/i 0 def /j 0 def {
9094
i dmtx length eq {exit} if
@@ -99,7 +103,9 @@ begin
99103
} loop
100104
/barcode barcode 0 j getinterval def
101105

106+
%
102107
% Get the result of encoding with datamatrix
108+
%
103109
options (parse) undef
104110
options (dontdraw) true put
105111
options (parsefnc) true put

src/gs1dldatamatrix.ps.src

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
% Barcode Writer in Pure PostScript
22
% https://bwipp.terryburton.co.uk
33
%
4-
% Copyright (c) 2004-2024 Terry Burton
4+
% Copyright (c) 2004-2025 Terry Burton
55
%
66
% $Id$
77
%
@@ -47,9 +47,10 @@ dup /datamatrix dup /uk.co.terryburton.bwipp findresource put
4747
begin
4848
/gs1dldatamatrix {
4949

50-
20 dict begin % Confine variables to local scope
50+
20 dict begin
5151

5252
/ctx null def
53+
5354
/parse false def
5455
/dontlint false def
5556
/lintreqs true def
@@ -58,7 +59,9 @@ begin
5859
//processoptions exec /options exch def
5960
/barcode exch def
6061

62+
%
6163
% Parse the input
64+
%
6265
/fncvals <<
6366
/parse parse
6467
/parseonly true
@@ -76,7 +79,9 @@ begin
7679
hri key length 1 add 41 put
7780
hri key length 2 add val putinterval
7881

82+
%
7983
% Get the result of encoding with datamatrix
84+
%
8085
options (parse) undef
8186
options (dontdraw) true put
8287
/args barcode options //datamatrix exec def

0 commit comments

Comments
 (0)