Skip to content

Commit ff1764b

Browse files
committed
Consilidate physspec and propspec framework
1 parent 6986af0 commit ff1764b

File tree

92 files changed

+1032
-40
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1032
-40
lines changed

src/code32.ps.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ begin
5858
/text1size 10.0 def
5959
/text1yoffset -7.0 def
6060
/text1xoffset 0.0 def
61-
/height 1.0 def
61+
/height -1.0 def
6262

6363
/apply //processoptions exec /options exch def
6464
/barcode exch def

src/databarexpandedcomposite.ps.src

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@ begin
6060
/dontlint false def
6161
/lintreqs true def
6262
/physspec false def
63+
/propspec false def
6364
/mag 1.0 def
6465
/xdim -1.0 def
6566
/ast (default) def
6667
/xnom -1.0 def
6768
/xmin -1.0 def
6869
/xmax -1.0 def
70+
/hnom -1.0 def
6971
/modunit 1 def
7072

7173
/apply //processoptions exec /options exch def
@@ -92,6 +94,15 @@ begin
9294
%
9395
/databarexpandedcomposite ast /apply_ast //render exec not { //raiseerror exec } if
9496
/resolve_physspec //render exec
97+
options (ast) undef
98+
options (propspec) propspec put
99+
options (physspec) physspec put
100+
options (xdim) xdim put
101+
options (xnom) xnom put
102+
options (xmin) xmin put
103+
options (xmax) xmax put
104+
options (hnom) hnom put
105+
options (modunit) modunit put
95106

96107
options (lintype) (databarexpanded) put
97108
options (linkage) true put
@@ -145,6 +156,7 @@ begin
145156
69 98 bot length 13 sub {} for
146157
] {sepfinder} forall
147158

159+
options (physspec) undef options (propspec) undef
148160
comp options //gs1-cc exec /compsym exch def
149161
/ccpixs compsym /pixs get def
150162
/ccrowmult compsym /rowmult get def

src/databarexpandedstacked.ps.src

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
currentglobal
4242
true setglobal
4343
/setpacking where {pop currentpacking true setpacking} if
44-
4 dict
44+
5 dict
4545
dup /raiseerror dup /uk.co.terryburton.bwipp findresource put
4646
dup /processoptions dup /uk.co.terryburton.bwipp findresource put
47+
dup /render dup /uk.co.terryburton.bwipp findresource put
4748
dup /renmatrix dup /uk.co.terryburton.bwipp findresource put
4849
dup /databarexpanded dup /uk.co.terryburton.bwipp findresource put
4950
begin
@@ -53,6 +54,16 @@ begin
5354
{
5455

5556
/dontdraw false def
57+
/propspec false def
58+
/physspec false def
59+
/mag 1.0 def
60+
/xdim -1.0 def
61+
/ast (default) def
62+
/xnom -1.0 def
63+
/xmin -1.0 def
64+
/xmax -1.0 def
65+
/hnom -1.0 def
66+
/modunit 1 def
5667

5768
/apply //processoptions exec /options exch def
5869
/barcode exch def
@@ -62,10 +73,25 @@ begin
6273
/uk.co.terryburton.bwipp._dontdraw dup where {exch get} {pop false} ifelse or not
6374
def
6475

76+
%
77+
% Apply AST spec overrides and resolve physical specification
78+
%
79+
/databarexpandedstacked ast /apply_ast //render exec not { //raiseerror exec } if
80+
/resolve_physspec //render exec
81+
6582
%
6683
% Get the result of encoding with databarexpanded with format=expandedstacked
6784
%
6885
options (format) (expandedstacked) put
86+
options (ast) undef
87+
options (propspec) propspec put
88+
options (physspec) physspec put
89+
options (xdim) xdim put
90+
options (xnom) xnom put
91+
options (xmin) xmin put
92+
options (xmax) xmax put
93+
options (hnom) hnom put
94+
options (modunit) modunit put
6995

7096
/uk.co.terryburton.bwipp._dontdraw true def
7197
barcode options //databarexpanded exec /args exch def

src/databarexpandedstackedcomposite.ps.src

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,14 @@ begin
6363
/dontlint false def
6464
/lintreqs true def
6565
/physspec false def
66+
/propspec false def
6667
/mag 1.0 def
6768
/xdim -1.0 def
6869
/ast (default) def
6970
/xnom -1.0 def
7071
/xmin -1.0 def
7172
/xmax -1.0 def
73+
/hnom -1.0 def
7274
/modunit 1 def
7375

7476
/apply //processoptions exec /options exch def
@@ -95,6 +97,15 @@ begin
9597
%
9698
/databarexpandedstackedcomposite ast /apply_ast //render exec not { //raiseerror exec } if
9799
/resolve_physspec //render exec
100+
options (ast) undef
101+
options (propspec) propspec put
102+
options (physspec) physspec put
103+
options (xdim) xdim put
104+
options (xnom) xnom put
105+
options (xmin) xmin put
106+
options (xmax) xmax put
107+
options (hnom) hnom put
108+
options (modunit) modunit put
98109

99110
options (lintype) (databarexpandedstacked) put
100111
options (linkage) true put
@@ -147,6 +158,7 @@ begin
147158
70 98 bot length 13 sub {} for
148159
] {sepfinder} forall
149160

161+
options (physspec) undef options (propspec) undef
150162
comp options //gs1-cc exec /compsym exch def
151163
/ccpixs compsym /pixs get def
152164
/ccrowmult compsym /rowmult get def

src/databarlimitedcomposite.ps.src

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,14 @@ begin
6464
/dontlint false def
6565
/lintreqs true def
6666
/physspec false def
67+
/propspec false def
6768
/mag 1.0 def
6869
/xdim -1.0 def
6970
/ast (default) def
7071
/xnom -1.0 def
7172
/xmin -1.0 def
7273
/xmax -1.0 def
74+
/hnom -1.0 def
7375
/modunit 1 def
7476

7577
/apply //processoptions exec /options exch def
@@ -96,6 +98,15 @@ begin
9698
%
9799
/databarlimitedcomposite ast /apply_ast //render exec not { //raiseerror exec } if
98100
/resolve_physspec //render exec
101+
options (ast) undef
102+
options (propspec) propspec put
103+
options (physspec) physspec put
104+
options (xdim) xdim put
105+
options (xnom) xnom put
106+
options (xmin) xmin put
107+
options (xmax) xmax put
108+
options (hnom) hnom put
109+
options (modunit) modunit put
99110

100111
options (lintype) (databarlimited) put
101112
options (linkage) true put
@@ -128,6 +139,7 @@ begin
128139
sep 0 //databarlimitedcomposite.sepleft putinterval
129140
sep sep length 9 sub //databarlimitedcomposite.sepright putinterval % 4 + 5 right guard spaces
130141

142+
options (physspec) undef options (propspec) undef
131143
comp options //gs1-cc exec /compsym exch def
132144
/ccpixs compsym /pixs get def
133145
/ccrowmult compsym /rowmult get def

src/databaromnicomposite.ps.src

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,14 @@ begin
6565
/dontlint false def
6666
/lintreqs true def
6767
/physspec false def
68+
/propspec false def
6869
/mag 1.0 def
6970
/xdim -1.0 def
7071
/ast (default) def
7172
/xnom -1.0 def
7273
/xmin -1.0 def
7374
/xmax -1.0 def
75+
/hnom -1.0 def
7476
/modunit 1 def
7577

7678
/apply //processoptions exec /options exch def
@@ -97,6 +99,15 @@ begin
9799
%
98100
/databaromnicomposite ast /apply_ast //render exec not { //raiseerror exec } if
99101
/resolve_physspec //render exec
102+
options (ast) undef
103+
options (propspec) propspec put
104+
options (physspec) physspec put
105+
options (xdim) xdim put
106+
options (xnom) xnom put
107+
options (xmin) xmin put
108+
options (xmax) xmax put
109+
options (hnom) hnom put
110+
options (modunit) modunit put
100111

101112
options (lintype) (databaromni) put
102113
options (linkage) true put
@@ -151,6 +162,7 @@ begin
151162
sep sep length 4 sub //databaromnicomposite.seppad putinterval
152163
18 sepfinder 64 sepfinder
153164

165+
options (physspec) undef options (propspec) undef
154166
comp options //gs1-cc exec /compsym exch def
155167
/ccpixs compsym /pixs get def
156168
/ccrowmult compsym /rowmult get def

src/databarstacked.ps.src

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
currentglobal
4242
true setglobal
4343
/setpacking where {pop currentpacking true setpacking} if
44-
4 dict
44+
5 dict
4545
dup /raiseerror dup /uk.co.terryburton.bwipp findresource put
4646
dup /processoptions dup /uk.co.terryburton.bwipp findresource put
47+
dup /render dup /uk.co.terryburton.bwipp findresource put
4748
dup /renmatrix dup /uk.co.terryburton.bwipp findresource put
4849
dup /databaromni dup /uk.co.terryburton.bwipp findresource put
4950
begin
@@ -53,6 +54,16 @@ begin
5354
{
5455

5556
/dontdraw false def
57+
/propspec false def
58+
/physspec false def
59+
/mag 1.0 def
60+
/xdim -1.0 def
61+
/ast (default) def
62+
/xnom -1.0 def
63+
/xmin -1.0 def
64+
/xmax -1.0 def
65+
/hnom -1.0 def
66+
/modunit 1 def
5667

5768
/apply //processoptions exec /options exch def
5869
/barcode exch def
@@ -96,10 +107,25 @@ begin
96107
dup 17 checksum 48 add put
97108
/barcode exch def
98109

110+
%
111+
% Apply AST spec overrides and resolve physical specification
112+
%
113+
/databarstacked ast /apply_ast //render exec not { //raiseerror exec } if
114+
/resolve_physspec //render exec
115+
99116
%
100117
% Get the result of encoding with databaromni with format=stacked
101118
%
102119
options (format) (stacked) put
120+
options (ast) undef
121+
options (propspec) propspec put
122+
options (physspec) physspec put
123+
options (xdim) xdim put
124+
options (xnom) xnom put
125+
options (xmin) xmin put
126+
options (xmax) xmax put
127+
options (hnom) hnom put
128+
options (modunit) modunit put
103129

104130
/uk.co.terryburton.bwipp._dontdraw true def
105131
barcode options //databaromni exec /args exch def

src/databarstackedcomposite.ps.src

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,14 @@ begin
6565
/dontlint false def
6666
/lintreqs true def
6767
/physspec false def
68+
/propspec false def
6869
/mag 1.0 def
6970
/xdim -1.0 def
7071
/ast (default) def
7172
/xnom -1.0 def
7273
/xmin -1.0 def
7374
/xmax -1.0 def
75+
/hnom -1.0 def
7476
/modunit 1 def
7577

7678
/apply //processoptions exec /options exch def
@@ -97,6 +99,15 @@ begin
9799
%
98100
/databarstackedcomposite ast /apply_ast //render exec not { //raiseerror exec } if
99101
/resolve_physspec //render exec
102+
options (ast) undef
103+
options (propspec) propspec put
104+
options (physspec) physspec put
105+
options (xdim) xdim put
106+
options (xnom) xnom put
107+
options (xmin) xmin put
108+
options (xmax) xmax put
109+
options (hnom) hnom put
110+
options (modunit) modunit put
100111

101112
options (lintype) (databarstacked) put
102113
options (linkage) true put
@@ -150,6 +161,7 @@ begin
150161
sep sep length 4 sub //databarstackedcomposite.seppad putinterval
151162
18 sepfinder
152163

164+
options (physspec) undef options (propspec) undef
153165
comp options //gs1-cc exec /compsym exch def
154166
/ccpixs compsym /pixs get def
155167
/ccrowmult compsym /rowmult get def

src/databarstackedomni.ps.src

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
currentglobal
4242
true setglobal
4343
/setpacking where {pop currentpacking true setpacking} if
44-
4 dict
44+
5 dict
4545
dup /raiseerror dup /uk.co.terryburton.bwipp findresource put
4646
dup /processoptions dup /uk.co.terryburton.bwipp findresource put
47+
dup /render dup /uk.co.terryburton.bwipp findresource put
4748
dup /renmatrix dup /uk.co.terryburton.bwipp findresource put
4849
dup /databaromni dup /uk.co.terryburton.bwipp findresource put
4950
begin
@@ -53,6 +54,16 @@ begin
5354
{
5455

5556
/dontdraw false def
57+
/propspec false def
58+
/physspec false def
59+
/mag 1.0 def
60+
/xdim -1.0 def
61+
/ast (default) def
62+
/xnom -1.0 def
63+
/xmin -1.0 def
64+
/xmax -1.0 def
65+
/hnom -1.0 def
66+
/modunit 1 def
5667

5768
/apply //processoptions exec /options exch def
5869
/barcode exch def
@@ -96,10 +107,25 @@ begin
96107
dup 17 checksum 48 add put
97108
/barcode exch def
98109

110+
%
111+
% Apply AST spec overrides and resolve physical specification
112+
%
113+
/databarstackedomni ast /apply_ast //render exec not { //raiseerror exec } if
114+
/resolve_physspec //render exec
115+
99116
%
100117
% Get the result of encoding with databaromni with format=stackedomni
101118
%
102119
options (format) (stackedomni) put
120+
options (ast) undef
121+
options (propspec) propspec put
122+
options (physspec) physspec put
123+
options (xdim) xdim put
124+
options (xnom) xnom put
125+
options (xmin) xmin put
126+
options (xmax) xmax put
127+
options (hnom) hnom put
128+
options (modunit) modunit put
103129

104130
/uk.co.terryburton.bwipp._dontdraw true def
105131
barcode options //databaromni exec /args exch def

0 commit comments

Comments
 (0)