Check-in [8120cc6c3e]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:merge with trunk
Timelines: family | ancestors | descendants | both | wtf-8-experiment
Files: files | file ages | folders
SHA1: 8120cc6c3ea4f3e30a0c85a79db519ed096b2500
User & Date: chw 2020-03-26 02:36:58
Context
2020-03-28
06:47
merge with trunk check-in: 54239105ed user: chw tags: wtf-8-experiment
2020-03-26
02:36
merge with trunk check-in: 8120cc6c3e user: chw tags: wtf-8-experiment
02:32
update zint to version 2.7.1 check-in: e2fb5f1120 user: chw tags: trunk
2020-03-25
16:21
merge with trunk check-in: 2e372614d5 user: chw tags: wtf-8-experiment
Changes

Deleted assets/zint2.7.0/demo.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package require Tk
package require zint
wm title . "ZINT Demo"
wm minsize . 480 320
if {[info command sdltk] eq "sdltk"} {
    wm attributes . -fullscreen 1
    set padx 30
    set pady 20
} else {
    wm geometry . 480x320
    set padx 5
    set pady 5
}
image create photo ::zintimg
pack [::ttk::combobox .c -values [lsort [zint symbologies]] -state readonly] \
    -side top -fill x -padx $padx -pady $pady
.c set Datamatrix
pack [::ttk::entry .e] -side top -fill x -padx $padx -pady $pady
.e insert end 12345
bind .e <Return> Generate
pack [::ttk::button .b -text Generate -command Generate] -fill x -side top \
    -padx $padx -pady $pady
proc Generate {} {
    ::zintimg blank
    ::zintimg configure -width 1 -height 1
    ::zintimg blank
    ::zintimg configure -width 0 -height 0
    if {[catch {zint encode [.e get] ::zintimg -barcode [.c get]} e]} {
        tk_messageBox -message $e -title "Zint error"
    } else {
	set w [image width ::zintimg]
	set h [image height ::zintimg]
	set lw [winfo width .l]
	set lh [winfo height .l]
	set sx [expr {int(1.0 * $lw / $w)}]
	set sy [expr {int(1.0 * $lh / $h)}]
	if {$sy < $sx} {
	    set sx $sy
	}
	if {$sx <= 0} {
	    set sx [expr {1.1 * $lw / $w}]
	    set sy [expr {1.1 * $lh / $h}]
	    if {$sy < $sx} {
		set sx $sy
	    }
	}
	::zintimg blank
	::zintimg configure -width 1 -height 1
	::zintimg blank
	::zintimg configure -width 0 -height 0
	catch {
	    zint encode [.e get] ::zintimg -barcode [.c get] -scale $sx
	}
    }
}
pack [label .l -image ::zintimg -bg white] -side top -fill both -expand 1 \
    -padx $padx -pady $pady
bind .e <Configure> {
    after cancel Generate
    after idle Generate
}
bind .c <<ComboboxSelected>> {
    after cancel Generate
    after idle Generate
}
bind all <Break> exit
bind all <Control-q> exit
bind all <Alt-q> exit
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































Deleted assets/zint2.7.0/pkgIndex.tcl.

1
2
package ifneeded zint 2.7.0 \
    [list load libzint[info sharedlibextension] Zint]
<
<




Added assets/zint2.7/demo.tcl.









































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package require Tk
package require zint
wm title . "ZINT Demo"
wm minsize . 480 320
if {[info command sdltk] eq "sdltk"} {
    wm attributes . -fullscreen 1
    set padx 30
    set pady 20
} else {
    wm geometry . 480x320
    set padx 5
    set pady 5
}
image create photo ::zintimg
pack [::ttk::combobox .c -values [lsort [zint symbologies]] -state readonly] \
    -side top -fill x -padx $padx -pady $pady
.c set Datamatrix
pack [::ttk::entry .e] -side top -fill x -padx $padx -pady $pady
.e insert end 12345
bind .e <Return> Generate
pack [::ttk::button .b -text Generate -command Generate] -fill x -side top \
    -padx $padx -pady $pady
proc Generate {} {
    ::zintimg blank
    ::zintimg configure -width 1 -height 1
    ::zintimg blank
    ::zintimg configure -width 0 -height 0
    if {[catch {zint encode [.e get] ::zintimg -barcode [.c get]} e]} {
        tk_messageBox -message $e -title "Zint error"
    } else {
	set w [image width ::zintimg]
	set h [image height ::zintimg]
	set lw [winfo width .l]
	set lh [winfo height .l]
	set sx [expr {int(1.0 * $lw / $w)}]
	set sy [expr {int(1.0 * $lh / $h)}]
	if {$sy < $sx} {
	    set sx $sy
	}
	if {$sx <= 0} {
	    set sx [expr {1.1 * $lw / $w}]
	    set sy [expr {1.1 * $lh / $h}]
	    if {$sy < $sx} {
		set sx $sy
	    }
	}
	::zintimg blank
	::zintimg configure -width 1 -height 1
	::zintimg blank
	::zintimg configure -width 0 -height 0
	catch {
	    zint encode [.e get] ::zintimg -barcode [.c get] -scale $sx
	}
    }
}
pack [label .l -image ::zintimg -bg white] -side top -fill both -expand 1 \
    -padx $padx -pady $pady
bind .e <Configure> {
    after cancel Generate
    after idle Generate
}
bind .c <<ComboboxSelected>> {
    after cancel Generate
    after idle Generate
}
bind all <Break> exit
bind all <Control-q> exit
bind all <Alt-q> exit

Added assets/zint2.7/pkgIndex.tcl.





>
>
1
2
package ifneeded zint 2.7.1 \
    [list load libzint[info sharedlibextension] Zint]

Changes to jni/zint/Android.mk.

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

LOCAL_ADDITIONAL_DEPENDENCIES += $(tk_path)/tk-config.mk

LOCAL_C_INCLUDES := $(tcl_includes) $(tk_includes) \
	$(LOCAL_PATH)/../libpng $(LOCAL_PATH)/backend

LOCAL_CFLAGS := $(tcl_cflags) $(tk_cflags) \
	-DZINT_VERSION="\"2.7.0\"" \
	-Dmain=zint \
	-O2

LOCAL_SRC_FILES := \
	backend/2of5.c \
	backend/auspost.c \
	backend/aztec.c \







|







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

LOCAL_ADDITIONAL_DEPENDENCIES += $(tk_path)/tk-config.mk

LOCAL_C_INCLUDES := $(tcl_includes) $(tk_includes) \
	$(LOCAL_PATH)/../libpng $(LOCAL_PATH)/backend

LOCAL_CFLAGS := $(tcl_cflags) $(tk_cflags) \
	-DZINT_VERSION="\"2.7.1\"" \
	-Dmain=zint \
	-O2

LOCAL_SRC_FILES := \
	backend/2of5.c \
	backend/auspost.c \
	backend/aztec.c \

Changes to jni/zint/README.

105
106
107
108
109
110
111





















112
113
114
115
116
117
118

Fixed bugs:
- Many improvements in composite codes
- SVG output corrected for messages containing "<" and "&".
- GS1-128 and RSS may only be used with GS1 contents
- Han Xin chinese character handling






















CONTACT US
----------
The home of Zint is:

	<http://www.sourceforge.net/projects/zint>

The code is now also mirrored at:







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139

Fixed bugs:
- Many improvements in composite codes
- SVG output corrected for messages containing "<" and "&".
- GS1-128 and RSS may only be used with GS1 contents
- Han Xin chinese character handling

Version 2.7.1 2020-02-01:
Changes:
- QR encoding optimized to get smaller code matrix results
- PDF417: remove obsolete codeword number option in qzint.
  Option removed in qtzint.
- Removed annex B (3 digit country codes) and annex C (GS1 General Specification)
  from the manual. This material may be found elsewhere.
- MAC homebrew remark added to the documentation
- Correct cmake file to match BSD-3-clause licence
Bugs:
- Correct uninitialized warning in gridmatrix.call
- do not export internal functions
- raster painting of UPC-A bound check
- pdf417 documentation corrected: change flag -security to -secure
- Dot Code encoding ECI number corrected
- Corrected postscript plotting error
- Datamatrix: corrected possible buffer overrun in 3 characters to 2 byte
  encodings.
- In 2.7.0 removed interface "ZBarcode_Render" still declared
- vc6 make was missing (trivial) resource.h

CONTACT US
----------
The home of Zint is:

	<http://www.sourceforge.net/projects/zint>

The code is now also mirrored at:

Changes to jni/zint/SetPaths.cmake.

1
2
3
4
5
6
7
8
9
10
..
53
54
55
56
57
58
59
60
61

62







63










64
65
66
67
68
69
70
...
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
...
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# - Find include and library dirs, and define a some macros
#
# This module defines a bunch of variables used as locations for install directories. 
# They can be relative (to CMAKE_INSTALL_PREFIX) or absolute.
# Under Windows they are always relative.
#
#  BIN_INSTALL_DIR          - the directory where executables will be installed (default is prefix/bin)
#  BUNDLE_INSTALL_DIR       - Mac only: the directory where application bundles will be installed (default is /Applications/KDE4 )
#  SBIN_INSTALL_DIR         - the directory where system executables will be installed (default is prefix/sbin)
#  LIB_INSTALL_DIR          - the directory where libraries will be installed (default is prefix/lib)
................................................................................
#  unless the optimiser is active.
#

# Copyright (c) 2006-2008, Alexander Neundorf <neundorf@kde.org>
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
# Copyright (c) 2008, BogDan Vatra, <bogdan@licentia.eu>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.





















########## the following are directories where stuff will be installed to  ###########
#
# this has to be after find_xxx() block above

if (WIN32)
# use relative install prefix to avoid hardcoded install paths in cmake_install.cmake files
................................................................................
   _set_fancy(DBUS_SERVICES_INSTALL_DIR      "${SHARE_INSTALL_PREFIX}/dbus-1/services"     "The kde dbus services install dir (default  ${SHARE_INSTALL_PREFIX}/dbus-1/services)")

endif (WIN32)


# The INSTALL_TARGETS_DEFAULT_ARGS variable should be used when libraries are installed.
# The arguments are also ok for regular executables, i.e. executables which don't go
# into sbin/ or libexec/, but for installing executables the basic syntax 
# INSTALL(TARGETS kate DESTINATION "${BIN_INSTALL_DIR}")
# is enough, so using this variable there doesn't help a lot.
# The variable must not be used for installing plugins.
# Usage is like this:
#    install(TARGETS kdecore kdeui ${INSTALL_TARGETS_DEFAULT_ARGS} )
#
# This will install libraries correctly under UNIX, OSX and Windows (i.e. dll's go
# into bin/.
# Later on it will be possible to extend this for installing OSX frameworks
# The COMPONENT Devel argument has the effect that static libraries belong to the 
# "Devel" install component. If we use this also for all install() commands
# for header files, it will be possible to install
#   -everything: make install OR cmake -P cmake_install.cmake
#   -only the development files: cmake -DCOMPONENT=Devel -P cmake_install.cmake
#   -everything except the development files: cmake -DCOMPONENT=Unspecified -P cmake_install.cmake
# This can then also be used for packaging with cpack.

................................................................................

set(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH}
                              "${INCLUDE_INSTALL_DIR}")

set(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH}
                              "${BIN_INSTALL_DIR}" )

set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} 
                              "${LIB_INSTALL_DIR}" )

# under Windows dlls may be also installed in bin/
if(WIN32)
  set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} 
                                "${_CMAKE_INSTALL_DIR}/bin" 
                                "${CMAKE_INSTALL_PREFIX}/bin" )
endif(WIN32)


######################################################
#  and now the platform specific stuff
######################################################


|







 







|
|
>
|
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>







 







|









|







 







|




|
|







1
2
3
4
5
6
7
8
9
10
..
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
...
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
...
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# - Find include and library dirs, and define a some macros
#
# This module defines a bunch of variables used as locations for install directories.
# They can be relative (to CMAKE_INSTALL_PREFIX) or absolute.
# Under Windows they are always relative.
#
#  BIN_INSTALL_DIR          - the directory where executables will be installed (default is prefix/bin)
#  BUNDLE_INSTALL_DIR       - Mac only: the directory where application bundles will be installed (default is /Applications/KDE4 )
#  SBIN_INSTALL_DIR         - the directory where system executables will be installed (default is prefix/sbin)
#  LIB_INSTALL_DIR          - the directory where libraries will be installed (default is prefix/lib)
................................................................................
#  unless the optimiser is active.
#

# Copyright (c) 2006-2008, Alexander Neundorf <neundorf@kde.org>
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
# Copyright (c) 2008, BogDan Vatra, <bogdan@licentia.eu>
#
#  Redistribution and use in source and binary forms, with or without
#  modification, are permitted provided that the following conditions
#  are met:
# 
#  1. Redistributions of source code must retain the copyright
#     notice, this list of conditions and the following disclaimer.
#  2. Redistributions in binary form must reproduce the copyright
#     notice, this list of conditions and the following disclaimer in the
#     documentation and/or other materials provided with the distribution.
#  3. The name of the author may not be used to endorse or promote products 
#     derived from this software without specific prior written permission.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
#  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
#  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
#  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
#  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
#  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
#  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

########## the following are directories where stuff will be installed to  ###########
#
# this has to be after find_xxx() block above

if (WIN32)
# use relative install prefix to avoid hardcoded install paths in cmake_install.cmake files
................................................................................
   _set_fancy(DBUS_SERVICES_INSTALL_DIR      "${SHARE_INSTALL_PREFIX}/dbus-1/services"     "The kde dbus services install dir (default  ${SHARE_INSTALL_PREFIX}/dbus-1/services)")

endif (WIN32)


# The INSTALL_TARGETS_DEFAULT_ARGS variable should be used when libraries are installed.
# The arguments are also ok for regular executables, i.e. executables which don't go
# into sbin/ or libexec/, but for installing executables the basic syntax
# INSTALL(TARGETS kate DESTINATION "${BIN_INSTALL_DIR}")
# is enough, so using this variable there doesn't help a lot.
# The variable must not be used for installing plugins.
# Usage is like this:
#    install(TARGETS kdecore kdeui ${INSTALL_TARGETS_DEFAULT_ARGS} )
#
# This will install libraries correctly under UNIX, OSX and Windows (i.e. dll's go
# into bin/.
# Later on it will be possible to extend this for installing OSX frameworks
# The COMPONENT Devel argument has the effect that static libraries belong to the
# "Devel" install component. If we use this also for all install() commands
# for header files, it will be possible to install
#   -everything: make install OR cmake -P cmake_install.cmake
#   -only the development files: cmake -DCOMPONENT=Devel -P cmake_install.cmake
#   -everything except the development files: cmake -DCOMPONENT=Unspecified -P cmake_install.cmake
# This can then also be used for packaging with cpack.

................................................................................

set(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH}
                              "${INCLUDE_INSTALL_DIR}")

set(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH}
                              "${BIN_INSTALL_DIR}" )

set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
                              "${LIB_INSTALL_DIR}" )

# under Windows dlls may be also installed in bin/
if(WIN32)
  set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
                                "${_CMAKE_INSTALL_DIR}/bin"
                                "${CMAKE_INSTALL_PREFIX}/bin" )
endif(WIN32)


######################################################
#  and now the platform specific stuff
######################################################

Changes to jni/zint/backend/auspost.c.

106
107
108
109
110
111
112




113

114
115
116
117
118
119
120
...
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
    unsigned int loopey, reader;
    size_t h;

    char data_pattern[200];
    char fcc[3] = {0, 0, 0}, dpid[10];
    char localstr[30];





    error_number = 0;

    strcpy(localstr, "");

    /* Do all of the length checking first to avoid stack smashing */
    if (symbol->symbology == BARCODE_AUSPOST) {
        /* Format control code (FCC) */
        switch (length) {
            case 8:
................................................................................
        zeroes = 8 - length;
        memset(localstr, '0', zeroes);
        localstr[zeroes] = '\0';
    }

    strcat(localstr, (char*) source);
    h = strlen(localstr);
    error_number = is_sane(GDSET, (unsigned char *) localstr, h);
    if (error_number == ZINT_ERROR_INVALID_DATA) {
        strcpy(symbol->errtxt, "404: Invalid characters in data");
        return error_number;
    }

    /* Verifiy that the first 8 characters are numbers */
    memcpy(dpid, localstr, 8);
    dpid[8] = '\0';
    error_number = is_sane(NEON, (unsigned char *) dpid, strlen(dpid));
    if (error_number == ZINT_ERROR_INVALID_DATA) {
        strcpy(symbol->errtxt, "405: Invalid characters in DPID");
        return error_number;







>
>
>
>
|
>







 







<
<
<
<
<
<







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
...
166
167
168
169
170
171
172






173
174
175
176
177
178
179
    unsigned int loopey, reader;
    size_t h;

    char data_pattern[200];
    char fcc[3] = {0, 0, 0}, dpid[10];
    char localstr[30];

    /* Check input immediately to catch nuls */
    error_number = is_sane(GDSET, source, length);
    if (error_number == ZINT_ERROR_INVALID_DATA) {
        strcpy(symbol->errtxt, "404: Invalid characters in data");
        return error_number;
    }
    strcpy(localstr, "");

    /* Do all of the length checking first to avoid stack smashing */
    if (symbol->symbology == BARCODE_AUSPOST) {
        /* Format control code (FCC) */
        switch (length) {
            case 8:
................................................................................
        zeroes = 8 - length;
        memset(localstr, '0', zeroes);
        localstr[zeroes] = '\0';
    }

    strcat(localstr, (char*) source);
    h = strlen(localstr);






    /* Verifiy that the first 8 characters are numbers */
    memcpy(dpid, localstr, 8);
    dpid[8] = '\0';
    error_number = is_sane(NEON, (unsigned char *) dpid, strlen(dpid));
    if (error_number == ZINT_ERROR_INVALID_DATA) {
        strcpy(symbol->errtxt, "405: Invalid characters in DPID");
        return error_number;

Changes to jni/zint/backend/codablock.c.

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
...
415
416
417
418
419
420
421
422
423
424

425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
...
447
448
449
450
451
452
453
454
455
456

457
458
459
460
461
462
463
...
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
...
703
704
705
706
707
708
709
710
711
712


713
714

715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
...
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
...
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
...
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
...
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994

/* Find the possible Code-128 Character sets for a character
 * The result is an or of CodeA,CodeB,CodeC,CodeFNC1 in dependency of the
 * possible Code 128 character sets.
 */
static int GetPossibleCharacterSet(unsigned char C)
{
    if (C<='\x19')      /* Dec:31 */
        return CodeA;
    if (C>='0' && C<='9')
        return ZTNum;   /* ZTNum=CodeA+CodeB+CodeC */
    if (C==aFNC1)
        return ZTFNC1;  /* ZTFNC1=CodeA+CodeB+CodeC+CodeFNC1 */
    if (C>='\x60' && C<='\x7f')      /* 60 to 127 */
        return CodeB;
................................................................................
 *          in the callers workspace.
 *  pFillings   Output of filling characters
 *  pSet        Output of the character sets used, allocated by me.
 *  Data        The Data string to encode, exceptionnally not an out
 *  Return value    Resulting row count
 */

static int Columns2Rows(CharacterSetTable *T, unsigned char *data, const size_t dataLength,
        int * pRows, int * pUseColumns, int * pSet, int * pFillings)
{
    int useColumns;     /* Usable Characters per line */
    int fillings;       /* Number of filling characters */
    int rowsCur;
    int runChar;
    int emptyColumns;   /* Number of codes still empty in line. */
................................................................................
        if (rowsCur>44) {
            ++useColumns;
            if (useColumns > 62) {
                return ZINT_ERROR_TOO_LONG;
            }
        }
    } while(rowsCur>44);
    #ifdef _DEBUG
        printf("  -> out: rowsCur <%i>, useColumns <%i>, fillings <%i>\n",rowsCur,useColumns,fillings);
    #endif

    *pUseColumns=useColumns;
    *pRows=rowsCur;
    *pFillings=fillings;
    return 0;
}
/* Find columns if row count is given.
 */
static int Rows2Columns(CharacterSetTable *T, unsigned char *data, const size_t dataLength,
        int * pRows, int * pUseColumns, int * pSet, int * pFillings)
{
    int rowsCur;
    int rowsRequested;  /* Number of requested rows */
    int backupRows = 0;
    int fillings;
    int backupFillings = 0;
................................................................................
    int *pBackupSet[dataLength];
#else
    int *pBackupSet = (int *)_alloca(dataLength*sizeof(int));
#endif

    rowsRequested=*pRows;

    #ifdef _DEBUG
        fprintf(stderr,"Optimizer : Searching <%i> rows\n",rowsRequested);
    #endif


    if (rowsRequested==1)
        /* OneLiners are self-calibrating */
        testColumns=32767;
    else {
        /* First guess */
        testColumns=dataLength/rowsRequested;
................................................................................
    }

    for (;;) {
        int errorCur;
        pTestList[testListSize] = testColumns;
        testListSize++;
        useColumns=testColumns; /* Make a copy because it may be modified */
        errorCur = Columns2Rows(T, data, dataLength, &rowsCur, &useColumns, pSet, &fillings);
        if (errorCur != 0)
            return errorCur;
        if (rowsCur<=rowsRequested) {
            /* Less or exactly line number found */
            /* check if column count below already tested or Count = 1*/
            int fInTestList = (rowsCur == 1 || testColumns == 1);
            int posCur;
................................................................................
    if ( rows <= 0 && columns <= 5 ) {
        /* Use Code128 until reasonable size */
        if (dataLength < 9) {
            rows = 1;
        } else {
            /* use 1/1 aspect/ratio Codablock */
            columns = ((int)floor(sqrt(1.0*dataLength))+5);
            if (columns > 64)
                columns = 64;
                #ifdef _DEBUG


                printf("Auto column count for %zu characters:%d\n",dataLength,columns);
                #endif

        }
    }
    /* There are 5 Codewords for Organisation Start(2),row(1),CheckSum,Stop */
    useColumns = columns - 5;
    if ( rows > 0 ) {
        /* row count given */
        Error=Rows2Columns(T,data,dataLength,&rows,&useColumns,pSet,&fillings);
    } else {
        /* column count given */
        Error=Columns2Rows(T,data,dataLength,&rows,&useColumns,pSet,&fillings);
    }
    if (Error != 0) {
        strcpy(symbol->errtxt, "413: Data string to long");
        return Error;
    }
    /* Checksum */
    Sum1=Sum2=0;
................................................................................
        size_t charCur;
        for (charCur=0 ; charCur<dataLength ; charCur++) {
            Sum1=(Sum1 + (charCur%86+1)*data[charCur])%86;
            Sum2=(Sum2 + (charCur%86)*data[charCur])%86;
        }
    }

    #ifdef _DEBUG
    {   /* start a new level of local variables */
        int DPos;
        printf("\nData:");
        for (DPos=0 ; DPos< dataLength ; DPos++)
            fputc(data[DPos],stdout);

        printf("\n Set:");
        for (DPos=0 ; DPos< dataLength ; DPos++) {
................................................................................
        for (DPos=0 ; DPos< dataLength ; DPos++)
            fputc((pSet[DPos]&CShift)==0?'.':'X',stdout);
        printf("\nFILL:");
        for (DPos=0 ; DPos< dataLength ; DPos++)
            fputc((pSet[DPos]&CFill)==0?'.':'X',stdout);
        fputc('\n',stdout);
    }
    #endif

    columns = useColumns + 5;

    /* >>> Build C128 code numbers */
    /* The C128 column count contains Start (2CW), Row ID, Checksum, Stop */
#ifndef _MSC_VER
    uchar pOutput[columns * rows];
................................................................................
            pOutPos++;
        }
        /* Add end character */
        *pOutPos=106;
        pOutPos++;
    } /* End Lineloop */

    #ifdef _DEBUG
        /* Dump the output to the screen
         */
        printf("\nCode 128 Code Numbers:\n");
        {   /* start a new level of local variables */
            int DPos, DPos2;
            for (DPos=0 ; DPos< rows ; DPos++)
            {
................................................................................
                {
                    printf("%3d ",(int)(pOutput[DPos*columns+DPos2]));
                }
                printf("\n");
            }
        }
        printf("rows=%i columns=%i fillings=%i\n", rows, columns, fillings);
    #endif

    /* Paint the C128 patterns */
    for (r = 0; r < rows; r++) {
        strcpy(dest, "");
        for(c = 0; c < columns; c++) {
            strcat(dest, C128Table[pOutput[r * columns + c]]);
        }







|







 







|







 







|

<
>







|







 







|

<
>







 







|







 







|

<
>
>

<
>






|


|







 







<
|







 







<







 







|







 







|







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
...
415
416
417
418
419
420
421
422
423

424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
...
447
448
449
450
451
452
453
454
455

456
457
458
459
460
461
462
463
...
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
...
703
704
705
706
707
708
709
710
711

712
713
714

715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
...
735
736
737
738
739
740
741

742
743
744
745
746
747
748
749
...
764
765
766
767
768
769
770

771
772
773
774
775
776
777
...
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
...
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993

/* Find the possible Code-128 Character sets for a character
 * The result is an or of CodeA,CodeB,CodeC,CodeFNC1 in dependency of the
 * possible Code 128 character sets.
 */
static int GetPossibleCharacterSet(unsigned char C)
{
    if (C<='\x1f')      /* Control chars */
        return CodeA;
    if (C>='0' && C<='9')
        return ZTNum;   /* ZTNum=CodeA+CodeB+CodeC */
    if (C==aFNC1)
        return ZTFNC1;  /* ZTFNC1=CodeA+CodeB+CodeC+CodeFNC1 */
    if (C>='\x60' && C<='\x7f')      /* 60 to 127 */
        return CodeB;
................................................................................
 *          in the callers workspace.
 *  pFillings   Output of filling characters
 *  pSet        Output of the character sets used, allocated by me.
 *  Data        The Data string to encode, exceptionnally not an out
 *  Return value    Resulting row count
 */

static int Columns2Rows(struct zint_symbol *symbol, CharacterSetTable *T, unsigned char *data, const size_t dataLength,
        int * pRows, int * pUseColumns, int * pSet, int * pFillings)
{
    int useColumns;     /* Usable Characters per line */
    int fillings;       /* Number of filling characters */
    int rowsCur;
    int runChar;
    int emptyColumns;   /* Number of codes still empty in line. */
................................................................................
        if (rowsCur>44) {
            ++useColumns;
            if (useColumns > 62) {
                return ZINT_ERROR_TOO_LONG;
            }
        }
    } while(rowsCur>44);
    if (symbol->debug & ZINT_DEBUG_PRINT) {
        printf("  -> out: rowsCur <%i>, useColumns <%i>, fillings <%i>\n",rowsCur,useColumns,fillings);

    }
    *pUseColumns=useColumns;
    *pRows=rowsCur;
    *pFillings=fillings;
    return 0;
}
/* Find columns if row count is given.
 */
static int Rows2Columns(struct zint_symbol *symbol, CharacterSetTable *T, unsigned char *data, const size_t dataLength,
        int * pRows, int * pUseColumns, int * pSet, int * pFillings)
{
    int rowsCur;
    int rowsRequested;  /* Number of requested rows */
    int backupRows = 0;
    int fillings;
    int backupFillings = 0;
................................................................................
    int *pBackupSet[dataLength];
#else
    int *pBackupSet = (int *)_alloca(dataLength*sizeof(int));
#endif

    rowsRequested=*pRows;

    if (symbol->debug & ZINT_DEBUG_PRINT) {
        fprintf(stderr,"Optimizer : Searching <%i> rows\n",rowsRequested);

    }

    if (rowsRequested==1)
        /* OneLiners are self-calibrating */
        testColumns=32767;
    else {
        /* First guess */
        testColumns=dataLength/rowsRequested;
................................................................................
    }

    for (;;) {
        int errorCur;
        pTestList[testListSize] = testColumns;
        testListSize++;
        useColumns=testColumns; /* Make a copy because it may be modified */
        errorCur = Columns2Rows(symbol, T, data, dataLength, &rowsCur, &useColumns, pSet, &fillings);
        if (errorCur != 0)
            return errorCur;
        if (rowsCur<=rowsRequested) {
            /* Less or exactly line number found */
            /* check if column count below already tested or Count = 1*/
            int fInTestList = (rowsCur == 1 || testColumns == 1);
            int posCur;
................................................................................
    if ( rows <= 0 && columns <= 5 ) {
        /* Use Code128 until reasonable size */
        if (dataLength < 9) {
            rows = 1;
        } else {
            /* use 1/1 aspect/ratio Codablock */
            columns = ((int)floor(sqrt(1.0*dataLength))+5);
            if (columns > 64) {
                columns = 64;

            }
            if (symbol->debug & ZINT_DEBUG_PRINT) {
                printf("Auto column count for %zu characters:%d\n",dataLength,columns);

            }
        }
    }
    /* There are 5 Codewords for Organisation Start(2),row(1),CheckSum,Stop */
    useColumns = columns - 5;
    if ( rows > 0 ) {
        /* row count given */
        Error = Rows2Columns(symbol, T, data, dataLength, &rows, &useColumns, pSet, &fillings);
    } else {
        /* column count given */
        Error = Columns2Rows(symbol, T, data, dataLength, &rows, &useColumns, pSet, &fillings);
    }
    if (Error != 0) {
        strcpy(symbol->errtxt, "413: Data string to long");
        return Error;
    }
    /* Checksum */
    Sum1=Sum2=0;
................................................................................
        size_t charCur;
        for (charCur=0 ; charCur<dataLength ; charCur++) {
            Sum1=(Sum1 + (charCur%86+1)*data[charCur])%86;
            Sum2=(Sum2 + (charCur%86)*data[charCur])%86;
        }
    }


    if (symbol->debug & ZINT_DEBUG_PRINT) { /* start a new level of local variables */
        int DPos;
        printf("\nData:");
        for (DPos=0 ; DPos< dataLength ; DPos++)
            fputc(data[DPos],stdout);

        printf("\n Set:");
        for (DPos=0 ; DPos< dataLength ; DPos++) {
................................................................................
        for (DPos=0 ; DPos< dataLength ; DPos++)
            fputc((pSet[DPos]&CShift)==0?'.':'X',stdout);
        printf("\nFILL:");
        for (DPos=0 ; DPos< dataLength ; DPos++)
            fputc((pSet[DPos]&CFill)==0?'.':'X',stdout);
        fputc('\n',stdout);
    }


    columns = useColumns + 5;

    /* >>> Build C128 code numbers */
    /* The C128 column count contains Start (2CW), Row ID, Checksum, Stop */
#ifndef _MSC_VER
    uchar pOutput[columns * rows];
................................................................................
            pOutPos++;
        }
        /* Add end character */
        *pOutPos=106;
        pOutPos++;
    } /* End Lineloop */

    if (symbol->debug & ZINT_DEBUG_PRINT) {
        /* Dump the output to the screen
         */
        printf("\nCode 128 Code Numbers:\n");
        {   /* start a new level of local variables */
            int DPos, DPos2;
            for (DPos=0 ; DPos< rows ; DPos++)
            {
................................................................................
                {
                    printf("%3d ",(int)(pOutput[DPos*columns+DPos2]));
                }
                printf("\n");
            }
        }
        printf("rows=%i columns=%i fillings=%i\n", rows, columns, fillings);
    }

    /* Paint the C128 patterns */
    for (r = 0; r < rows; r++) {
        strcpy(dest, "");
        for(c = 0; c < columns; c++) {
            strcat(dest, C128Table[pOutput[r * columns + c]]);
        }

Changes to jni/zint/backend/dmatrix.c.

752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
...
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
...
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
...
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
....
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
....
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
                if (shift_set != 0) {
                    process_buffer[*process_p] = shift_set - 1;
                    (*process_p)++;
                }
                process_buffer[*process_p] = value;
                (*process_p)++;

                if (*process_p >= 3) {
                    int iv;

                    iv = (1600 * process_buffer[0]) + (40 * process_buffer[1]) + (process_buffer[2]) + 1;
                    target[tp] = (unsigned char) (iv / 256);
                    tp++;
                    target[tp] = iv % 256;
                    tp++;
................................................................................
                if (shift_set != 0) {
                    process_buffer[*process_p] = shift_set - 1;
                    (*process_p)++;
                }
                process_buffer[*process_p] = value;
                (*process_p)++;

                if (*process_p >= 3) {
                    int iv;

                    iv = (1600 * process_buffer[0]) + (40 * process_buffer[1]) + (process_buffer[2]) + 1;
                    target[tp] = (unsigned char) (iv / 256);
                    tp++;
                    target[tp] = iv % 256;
                    tp++;
................................................................................
                if ((source[sp] >= 'A') && (source[sp] <= 'Z')) {
                    value = (source[sp] - 'A') + 14;
                }

                process_buffer[*process_p] = value;
                (*process_p)++;

                if (*process_p >= 3) {
                    int iv;

                    iv = (1600 * process_buffer[0]) + (40 * process_buffer[1]) + (process_buffer[2]) + 1;
                    target[tp] = (unsigned char) (iv / 256);
                    tp++;
                    target[tp] = iv % 256;
                    tp++;
................................................................................
                }

                process_buffer[*process_p] = value;
                (*process_p)++;
                sp++;
            }

            if (*process_p >= 4) {
                target[tp] = (unsigned char) ((process_buffer[0] << 2) + ((process_buffer[1] & 0x30) >> 4));
                tp++;
                target[tp] = ((process_buffer[1] & 0x0f) << 4) + ((process_buffer[2] & 0x3c) >> 2);
                tp++;
                target[tp] = (unsigned char) (((process_buffer[2] & 0x03) << 6) + process_buffer[3]);
                tp++;
                strcat(binary, "   ");
................................................................................
        skew = 1;
    }
    ecc200(binary, bytes, datablock, rsblock, skew);
    // Print Codewords
#ifdef DEBUG
    {
        int CWCount;
		int posCur;
        if (skew)
            CWCount = 1558 + 620;
        else
            CWCount = bytes + rsblock * (bytes / datablock);
        printf("Codewords (%i):", CWCount);
        for (posCur = 0; posCur < CWCount; posCur++)
            printf(" %3i", binary[posCur]);
................................................................................
            for (y = 0; y < H; y += 2)
                grid[y * W + x + FW - 1] = 1;
        }
#ifdef DEBUG
        // Print position matrix as in standard
        for (y = NR - 1; y >= 0; y--) {
            for (x = 0; x < NC; x++) {
				int v;
                if (x != 0)
                    fprintf(stderr, "|");
                v = places[(NR - y - 1) * NC + x];
                fprintf(stderr, "%3d.%2d", (v >> 3), 8 - (v & 7));
            }
            fprintf(stderr, "\n");
        }







|







 







|







 







|







 







|







 







|







 







|







752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
...
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
...
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
...
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
....
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
....
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
                if (shift_set != 0) {
                    process_buffer[*process_p] = shift_set - 1;
                    (*process_p)++;
                }
                process_buffer[*process_p] = value;
                (*process_p)++;

                while (*process_p >= 3) {
                    int iv;

                    iv = (1600 * process_buffer[0]) + (40 * process_buffer[1]) + (process_buffer[2]) + 1;
                    target[tp] = (unsigned char) (iv / 256);
                    tp++;
                    target[tp] = iv % 256;
                    tp++;
................................................................................
                if (shift_set != 0) {
                    process_buffer[*process_p] = shift_set - 1;
                    (*process_p)++;
                }
                process_buffer[*process_p] = value;
                (*process_p)++;

                while (*process_p >= 3) {
                    int iv;

                    iv = (1600 * process_buffer[0]) + (40 * process_buffer[1]) + (process_buffer[2]) + 1;
                    target[tp] = (unsigned char) (iv / 256);
                    tp++;
                    target[tp] = iv % 256;
                    tp++;
................................................................................
                if ((source[sp] >= 'A') && (source[sp] <= 'Z')) {
                    value = (source[sp] - 'A') + 14;
                }

                process_buffer[*process_p] = value;
                (*process_p)++;

                while (*process_p >= 3) {
                    int iv;

                    iv = (1600 * process_buffer[0]) + (40 * process_buffer[1]) + (process_buffer[2]) + 1;
                    target[tp] = (unsigned char) (iv / 256);
                    tp++;
                    target[tp] = iv % 256;
                    tp++;
................................................................................
                }

                process_buffer[*process_p] = value;
                (*process_p)++;
                sp++;
            }

            while (*process_p >= 4) {
                target[tp] = (unsigned char) ((process_buffer[0] << 2) + ((process_buffer[1] & 0x30) >> 4));
                tp++;
                target[tp] = ((process_buffer[1] & 0x0f) << 4) + ((process_buffer[2] & 0x3c) >> 2);
                tp++;
                target[tp] = (unsigned char) (((process_buffer[2] & 0x03) << 6) + process_buffer[3]);
                tp++;
                strcat(binary, "   ");
................................................................................
        skew = 1;
    }
    ecc200(binary, bytes, datablock, rsblock, skew);
    // Print Codewords
#ifdef DEBUG
    {
        int CWCount;
        int posCur;
        if (skew)
            CWCount = 1558 + 620;
        else
            CWCount = bytes + rsblock * (bytes / datablock);
        printf("Codewords (%i):", CWCount);
        for (posCur = 0; posCur < CWCount; posCur++)
            printf(" %3i", binary[posCur]);
................................................................................
            for (y = 0; y < H; y += 2)
                grid[y * W + x + FW - 1] = 1;
        }
#ifdef DEBUG
        // Print position matrix as in standard
        for (y = NR - 1; y >= 0; y--) {
            for (x = 0; x < NC; x++) {
                int v;
                if (x != 0)
                    fprintf(stderr, "|");
                v = places[(NR - y - 1) * NC + x];
                fprintf(stderr, "%3d.%2d", (v >> 3), 8 - (v & 7));
            }
            fprintf(stderr, "\n");
        }

Changes to jni/zint/backend/dotcode.c.

100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
...
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
...
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
...
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
...
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
....
1208
1209
1210
1211
1212
1213
1214


1215
1216
1217
1218
1219
1220
1221
        }
    }

    return 1;
}

/* Dot pattern scoring routine from Annex A */
static const int score_array(char Dots[], int Hgt, int Wid) {
    int x, y, worstedge, first, last, sum;
    int penalty_local = 0;
    int penalty = 0;

    // first, guard against "pathelogical" gaps in the array
    if (Hgt & 1) {
        if (Hgt < 12) {
................................................................................
        count++;
    }

    return count;
}

/* checks if the next character is in the range 128 to 255  (Annex F.II.I) */
static int binary(const unsigned char source[], int position) {
    int retval = 0;

    if (source[position] >= 128) {
        retval = 1;
    }

    return retval;
}

/* Analyse input data stream and encode using algorithm from Annex F */
................................................................................
                    printf("B2/2 ");
                }
            }
        }

        /* Step B3 */
        if ((!done) && (encoding_mode == 'C')) {
            if (binary(source, input_position)) {
                if (n_digits(source, input_position + 1, length) > 0) {
                    if ((source[input_position] - 128) < 32) {
                        codeword_array[array_length] = 110; // Bin Shift A
                        array_length++;
                        codeword_array[array_length] = source[input_position] - 128 + 64;
                        array_length++;
                    } else {
................................................................................
                    }
                }
            }
        }

        /* Step C3 */
        if ((!done) && (encoding_mode == 'B')) {
            if (binary(source, input_position)) {
                if (datum_b(source, input_position + 1, length)) {
                    if ((source[input_position] - 128) < 32) {
                        codeword_array[array_length] = 110; // Bin Shift A
                        array_length++;
                        codeword_array[array_length] = source[input_position] - 128 + 64;
                        array_length++;
                    } else {
................................................................................
                    }
                }
            }
        }

        /* Step D3 */
        if ((!done) && (encoding_mode == 'A')) {
            if (binary(source, input_position)) {
                if (datum_a(source, input_position + 1, length)) {
                    if ((source[input_position] - 128) < 32) {
                        codeword_array[array_length] = 110; // Bin Shift A
                        array_length++;
                        codeword_array[array_length] = source[input_position] - 128 + 64;
                        array_length++;
                    } else {
................................................................................

        /* Step E2 */
        /* Section 5.2.1.1 para D.2.i states:
         * "Groups of six codewords, each valued between 0 and 102, are radix converted from
         * base 103 into five base 259 values..."
         */
        if ((!done) && (encoding_mode == 'X')) {
            if (binary(source, input_position)
                    || binary(source, input_position + 1)
                    || binary(source, input_position + 2)
                    || binary(source, input_position + 3)) {
                binary_buffer *= 259;
                binary_buffer += source[input_position];
                binary_buffer_size++;

                if (binary_buffer_size == 5) {
                    for (i = 0; i < 6; i++) {
                        lawrencium[i] = binary_buffer % 103;
................................................................................
        dot_array[0] = dot_stream[input_position];
    }
}

static void apply_mask(int mask, int data_length, unsigned char *masked_codeword_array, unsigned char *codeword_array, int ecc_length, char *dot_stream) {
    int weight = 0;
    int j;



    switch (mask) {
        case 0:
            masked_codeword_array[0] = 0;
            for (j = 0; j < data_length; j++) {
                masked_codeword_array[j + 1] = codeword_array[j];
            }







|







 







|


|







 







|







 







|







 







|







 







|
|
|
|







 







>
>







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
...
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
...
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
...
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
...
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
....
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
        }
    }

    return 1;
}

/* Dot pattern scoring routine from Annex A */
static int score_array(char Dots[], int Hgt, int Wid) {
    int x, y, worstedge, first, last, sum;
    int penalty_local = 0;
    int penalty = 0;

    // first, guard against "pathelogical" gaps in the array
    if (Hgt & 1) {
        if (Hgt < 12) {
................................................................................
        count++;
    }

    return count;
}

/* checks if the next character is in the range 128 to 255  (Annex F.II.I) */
static int binary(const unsigned char source[], int length, int position) {
    int retval = 0;

    if (position < length && source[position] >= 128) {
        retval = 1;
    }

    return retval;
}

/* Analyse input data stream and encode using algorithm from Annex F */
................................................................................
                    printf("B2/2 ");
                }
            }
        }

        /* Step B3 */
        if ((!done) && (encoding_mode == 'C')) {
            if (binary(source, length, input_position)) {
                if (n_digits(source, input_position + 1, length) > 0) {
                    if ((source[input_position] - 128) < 32) {
                        codeword_array[array_length] = 110; // Bin Shift A
                        array_length++;
                        codeword_array[array_length] = source[input_position] - 128 + 64;
                        array_length++;
                    } else {
................................................................................
                    }
                }
            }
        }

        /* Step C3 */
        if ((!done) && (encoding_mode == 'B')) {
            if (binary(source, length, input_position)) {
                if (datum_b(source, input_position + 1, length)) {
                    if ((source[input_position] - 128) < 32) {
                        codeword_array[array_length] = 110; // Bin Shift A
                        array_length++;
                        codeword_array[array_length] = source[input_position] - 128 + 64;
                        array_length++;
                    } else {
................................................................................
                    }
                }
            }
        }

        /* Step D3 */
        if ((!done) && (encoding_mode == 'A')) {
            if (binary(source, length, input_position)) {
                if (datum_a(source, input_position + 1, length)) {
                    if ((source[input_position] - 128) < 32) {
                        codeword_array[array_length] = 110; // Bin Shift A
                        array_length++;
                        codeword_array[array_length] = source[input_position] - 128 + 64;
                        array_length++;
                    } else {
................................................................................

        /* Step E2 */
        /* Section 5.2.1.1 para D.2.i states:
         * "Groups of six codewords, each valued between 0 and 102, are radix converted from
         * base 103 into five base 259 values..."
         */
        if ((!done) && (encoding_mode == 'X')) {
            if (binary(source, length, input_position)
                    || binary(source, length, input_position + 1)
                    || binary(source, length, input_position + 2)
                    || binary(source, length, input_position + 3)) {
                binary_buffer *= 259;
                binary_buffer += source[input_position];
                binary_buffer_size++;

                if (binary_buffer_size == 5) {
                    for (i = 0; i < 6; i++) {
                        lawrencium[i] = binary_buffer % 103;
................................................................................
        dot_array[0] = dot_stream[input_position];
    }
}

static void apply_mask(int mask, int data_length, unsigned char *masked_codeword_array, unsigned char *codeword_array, int ecc_length, char *dot_stream) {
    int weight = 0;
    int j;

    (void)dot_stream; /* Not currently used */

    switch (mask) {
        case 0:
            masked_codeword_array[0] = 0;
            for (j = 0; j < data_length; j++) {
                masked_codeword_array[j + 1] = codeword_array[j];
            }

Changes to jni/zint/backend/libzint.rc.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
..
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <winver.h>

#ifdef GCC_WINDRES
VS_VERSION_INFO		VERSIONINFO
#else
VS_VERSION_INFO		VERSIONINFO
#endif
  FILEVERSION		2,6,0,0
  PRODUCTVERSION	2,6,0,0
  FILEFLAGSMASK		VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
  FILEFLAGS		VS_FF_DEBUG
#else
  FILEFLAGS		0
#endif
  FILEOS		VOS_NT_WINDOWS32
................................................................................
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "040904E4"
    //language ID = U.S. English, char set = Windows, Multilingual
    BEGIN
      VALUE "FileDescription",	"libzint barcode library\0"
      VALUE "FileVersion",	"2.7.0.0\0"
      VALUE "InternalName",	"zint.dll\0"
      VALUE "LegalCopyright",	"Copyright  2017 Robin Stuart & BogDan Vatra\0"
      VALUE "OriginalFilename",	"zint.dll\0"
      VALUE "ProductName",	"libzint\0"
      VALUE "ProductVersion",	"2.7.0.0\0"
      VALUE "License",  "BSD License version 3\0"
      VALUE "WWW", "http://www.sourceforge.net/projects/zint"      
    END
  END
  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x0409, 1250
  END
END







|
|







 







|




|









3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
..
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <winver.h>

#ifdef GCC_WINDRES
VS_VERSION_INFO		VERSIONINFO
#else
VS_VERSION_INFO		VERSIONINFO
#endif
  FILEVERSION		2,7,1,0
  PRODUCTVERSION	2,7,1,0
  FILEFLAGSMASK		VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
  FILEFLAGS		VS_FF_DEBUG
#else
  FILEFLAGS		0
#endif
  FILEOS		VOS_NT_WINDOWS32
................................................................................
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "040904E4"
    //language ID = U.S. English, char set = Windows, Multilingual
    BEGIN
      VALUE "FileDescription",	"libzint barcode library\0"
      VALUE "FileVersion",	"2.7.1.0\0"
      VALUE "InternalName",	"zint.dll\0"
      VALUE "LegalCopyright",	"Copyright  2017 Robin Stuart & BogDan Vatra\0"
      VALUE "OriginalFilename",	"zint.dll\0"
      VALUE "ProductName",	"libzint\0"
      VALUE "ProductVersion",	"2.7.1.0\0"
      VALUE "License",  "BSD License version 3\0"
      VALUE "WWW", "http://www.sourceforge.net/projects/zint"      
    END
  END
  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x0409, 1250
  END
END

Changes to jni/zint/backend/ps.c.

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
154
155
156
157
158
159
160
161
162
163
164
165

166
167
168
169
170
171
172
173
174
175
...
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
...
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
...
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
    int fgred, fggrn, fgblu, bgred, bggrn, bgblu;
    float red_ink, green_ink, blue_ink, red_paper, green_paper, blue_paper;
    float cyan_ink, magenta_ink, yellow_ink, black_ink;
    float cyan_paper, magenta_paper, yellow_paper, black_paper;
    int error_number = 0;
    float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy;
    float radius;
    
    struct zint_vector_rect *rect;
    struct zint_vector_hexagon *hex;
    struct zint_vector_circle *circle;
    struct zint_vector_string *string;
    const char *locale = NULL;

    if (symbol->output_options & BARCODE_STDOUT) {
................................................................................

    fprintf(feps, "TE\n");
    if ((symbol->output_options & CMYK_COLOUR) == 0) {
        fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
    } else {
        fprintf(feps, "%.2f %.2f %.2f %.2f setcmykcolor\n", cyan_ink, magenta_ink, yellow_ink, black_ink);
    }
    
    // Rectangles
    rect = symbol->vector->rectangles;
    while (rect) {
        fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", rect->height, (symbol->vector->height - rect->y) - rect->height, rect->x, rect->width);

        rect = rect->next;
    }
    
    // Hexagons
    hex = symbol->vector->hexagons;
    while (hex) {
        radius = hex->diameter / 2.0;
        ay = (symbol->vector->height - hex->y) + (1.0 * radius);
        by = (symbol->vector->height - hex->y) + (0.5 * radius);
        cy = (symbol->vector->height - hex->y) - (0.5 * radius);
................................................................................
        cx = hex->x + (0.86 * radius);
        dx = hex->x;
        ex = hex->x - (0.86 * radius);
        fx = hex->x - (0.86 * radius);
        fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TH\n", ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy);
        hex = hex->next;
    }
    
    // Circles
    circle = symbol->vector->circles;
    while (circle) {
        if (circle->colour) {
            // A 'white' circle
            if ((symbol->output_options & CMYK_COLOUR) == 0) {
                fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_paper, green_paper, blue_paper);
................................................................................
            }
        } else {
            // A 'black' circle
            fprintf(feps, "%.2f %.2f %.2f TD\n", circle->x, (symbol->vector->height - circle->y), circle->diameter / 2.0);
        }
        circle = circle->next;
    }
    
    // Text
    string = symbol->vector->strings;
    while (string) {
        fprintf(feps, "matrix currentmatrix\n");
        fprintf(feps, "/Helvetica findfont\n");
        fprintf(feps, "%.2f scalefont setfont\n", string->fsize);
        fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", string->x, (symbol->vector->height - string->y));
................................................................................
        fprintf(feps, " (%s) stringwidth\n", string->text);
        fprintf(feps, "pop\n");
        fprintf(feps, "-2 div 0 rmoveto\n");
        fprintf(feps, " (%s) show\n", string->text);
        fprintf(feps, "setmatrix\n");
        string = string->next;
    }
    
    fprintf(feps, "\nshowpage\n");

    if (symbol->output_options & BARCODE_STDOUT) {
        fflush(feps);
    } else {
        fclose(feps);
    }

    if (locale)
        setlocale(LC_ALL, locale);

    return error_number;
}







|







 







|




>


|







 







|







 







|







 







|
|












43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
...
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
...
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
...
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
    int fgred, fggrn, fgblu, bgred, bggrn, bgblu;
    float red_ink, green_ink, blue_ink, red_paper, green_paper, blue_paper;
    float cyan_ink, magenta_ink, yellow_ink, black_ink;
    float cyan_paper, magenta_paper, yellow_paper, black_paper;
    int error_number = 0;
    float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy;
    float radius;

    struct zint_vector_rect *rect;
    struct zint_vector_hexagon *hex;
    struct zint_vector_circle *circle;
    struct zint_vector_string *string;
    const char *locale = NULL;

    if (symbol->output_options & BARCODE_STDOUT) {
................................................................................

    fprintf(feps, "TE\n");
    if ((symbol->output_options & CMYK_COLOUR) == 0) {
        fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
    } else {
        fprintf(feps, "%.2f %.2f %.2f %.2f setcmykcolor\n", cyan_ink, magenta_ink, yellow_ink, black_ink);
    }

    // Rectangles
    rect = symbol->vector->rectangles;
    while (rect) {
        fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", rect->height, (symbol->vector->height - rect->y) - rect->height, rect->x, rect->width);
        fprintf(feps, "TE\n");
        rect = rect->next;
    }

    // Hexagons
    hex = symbol->vector->hexagons;
    while (hex) {
        radius = hex->diameter / 2.0;
        ay = (symbol->vector->height - hex->y) + (1.0 * radius);
        by = (symbol->vector->height - hex->y) + (0.5 * radius);
        cy = (symbol->vector->height - hex->y) - (0.5 * radius);
................................................................................
        cx = hex->x + (0.86 * radius);
        dx = hex->x;
        ex = hex->x - (0.86 * radius);
        fx = hex->x - (0.86 * radius);
        fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TH\n", ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy);
        hex = hex->next;
    }

    // Circles
    circle = symbol->vector->circles;
    while (circle) {
        if (circle->colour) {
            // A 'white' circle
            if ((symbol->output_options & CMYK_COLOUR) == 0) {
                fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_paper, green_paper, blue_paper);
................................................................................
            }
        } else {
            // A 'black' circle
            fprintf(feps, "%.2f %.2f %.2f TD\n", circle->x, (symbol->vector->height - circle->y), circle->diameter / 2.0);
        }
        circle = circle->next;
    }

    // Text
    string = symbol->vector->strings;
    while (string) {
        fprintf(feps, "matrix currentmatrix\n");
        fprintf(feps, "/Helvetica findfont\n");
        fprintf(feps, "%.2f scalefont setfont\n", string->fsize);
        fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", string->x, (symbol->vector->height - string->y));
................................................................................
        fprintf(feps, " (%s) stringwidth\n", string->text);
        fprintf(feps, "pop\n");
        fprintf(feps, "-2 div 0 rmoveto\n");
        fprintf(feps, " (%s) show\n", string->text);
        fprintf(feps, "setmatrix\n");
        string = string->next;
    }

    //fprintf(feps, "\nshowpage\n");

    if (symbol->output_options & BARCODE_STDOUT) {
        fflush(feps);
    } else {
        fclose(feps);
    }

    if (locale)
        setlocale(LC_ALL, locale);

    return error_number;
}

Changes to jni/zint/backend/tests/CMakeLists.txt.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
46
47
48
49
50
51
52

53

54
55
56

57
58
59
60
61
62
63

set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

set(ZINT_DEBUG FALSE CACHE BOOL "Set debug compile flag")
set(ZINT_SANITIZE FALSE CACHE BOOL "Set sanitize compile/link flags")
set(ZINT_TEST FALSE CACHE BOOL "Set test compile flag")

find_package (LibZint 2.7.0 REQUIRED)
find_package(PNG)

if (PNG_FOUND)
    include_directories(${PNG_INCLUDES})
else (PNG_FOUND)
    add_definitions(-DNO_PNG)
endif (PNG_FOUND)
................................................................................
macro(zint_add_test test_name test_command)
    set(ADDITIONAL_LIBS "${ARGN}" ${LIBRARY_FLAGS})
    add_executable(${test_command} ${test_command}.c)
    target_link_libraries(${test_command} testcommon ${ADDITIONAL_LIBS})
    add_test(${test_name} ${test_command})
endmacro(zint_add_test)


zint_add_test(channel, test_channel)

zint_add_test(common, test_common)
zint_add_test(composite, test_composite)
zint_add_test(dmatrix, test_dmatrix)

zint_add_test(eci, test_eci)
zint_add_test(gb18030, test_gb18030)
zint_add_test(gb2312, test_gb2312)
zint_add_test(gridmtx, test_gridmtx)
zint_add_test(gs1, test_gs1)
zint_add_test(hanxin, test_hanxin)
zint_add_test(imail, test_imail)







|







 







>

>



>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

set(ZINT_DEBUG FALSE CACHE BOOL "Set debug compile flag")
set(ZINT_SANITIZE FALSE CACHE BOOL "Set sanitize compile/link flags")
set(ZINT_TEST FALSE CACHE BOOL "Set test compile flag")

find_package (LibZint 2.7.1 REQUIRED)
find_package(PNG)

if (PNG_FOUND)
    include_directories(${PNG_INCLUDES})
else (PNG_FOUND)
    add_definitions(-DNO_PNG)
endif (PNG_FOUND)
................................................................................
macro(zint_add_test test_name test_command)
    set(ADDITIONAL_LIBS "${ARGN}" ${LIBRARY_FLAGS})
    add_executable(${test_command} ${test_command}.c)
    target_link_libraries(${test_command} testcommon ${ADDITIONAL_LIBS})
    add_test(${test_name} ${test_command})
endmacro(zint_add_test)

zint_add_test(auspost, test_auspost)
zint_add_test(channel, test_channel)
zint_add_test(codablock, test_codablock)
zint_add_test(common, test_common)
zint_add_test(composite, test_composite)
zint_add_test(dmatrix, test_dmatrix)
zint_add_test(dotcode, test_dotcode)
zint_add_test(eci, test_eci)
zint_add_test(gb18030, test_gb18030)
zint_add_test(gb2312, test_gb2312)
zint_add_test(gridmtx, test_gridmtx)
zint_add_test(gs1, test_gs1)
zint_add_test(hanxin, test_hanxin)
zint_add_test(imail, test_imail)

Added jni/zint/backend/tests/test_auspost.c.









































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
    libzint - the open source barcode library
    Copyright (C) 2008-2020 Robin Stuart <rstuart114@gmail.com>

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions
    are met:

    1. Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.
    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
    3. Neither the name of the project nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    SUCH DAMAGE.
 */
/* vim: set ts=4 sw=4 et : */

#include "testcommon.h"

// #181 Christian Hartlage OSS-Fuzz
static void test_australia_post_fuzz(void)
{
    testStart("");

    int ret;
    struct item {
        int symbology;
        unsigned char* data;
        int length;
        int ret;
    };
    // s/\/\*[ 0-9]*\*\//\=printf("\/*%2d*\/", line(".") - line("'<"))
    struct item data[] = {
        /* 0*/ { BARCODE_AUSROUTE, "A\000\000\000", 4, ZINT_ERROR_INVALID_DATA },
        /* 1*/ { BARCODE_AUSROUTE, "1\000\000\000", 4, ZINT_ERROR_INVALID_DATA },
        /* 2*/ { BARCODE_AUSREPLY, "A\000\000\000", 4, ZINT_ERROR_INVALID_DATA },
        /* 3*/ { BARCODE_AUSREPLY, "1\000\000\000", 4, ZINT_ERROR_INVALID_DATA },
        /* 4*/ { BARCODE_AUSREDIRECT, "A\000\000\000", 4, ZINT_ERROR_INVALID_DATA },
        /* 5*/ { BARCODE_AUSREDIRECT, "1\000\000\000", 4, ZINT_ERROR_INVALID_DATA },
    };
    int data_size = sizeof(data) / sizeof(struct item);

    for (int i = 0; i < data_size; i++) {

        struct zint_symbol* symbol = ZBarcode_Create();
        assert_nonnull(symbol, "Symbol not created\n");

        symbol->symbology = data[i].symbology;
        int length = data[i].length;
        if (length == -1) {
            length = strlen(data[i].data);
        }

        ret = ZBarcode_Encode(symbol, data[i].data, length);
        assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);

        ZBarcode_Delete(symbol);
    }

    testFinish();
}

int main()
{
    test_australia_post_fuzz();

    testReport();

    return 0;
}

Added jni/zint/backend/tests/test_codablock.c.











































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/*
    libzint - the open source barcode library
    Copyright (C) 2008-2019 Robin Stuart <rstuart114@gmail.com>

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions
    are met:

    1. Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.
    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
    3. Neither the name of the project nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    SUCH DAMAGE.
 */
/* vim: set ts=4 sw=4 et : */

#include "testcommon.h"

static void test_options(void)
{
    testStart("");

    int ret;
    struct item {
        unsigned char* data;
        int option_1;
        int option_2;
        int ret;
        char* comment;
    };
    // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
    struct item data[] = {
        /*  0*/ { "é", -1, -1, 0, "" },
    };
    int data_size = sizeof(data) / sizeof(struct item);

    for (int i = 0; i < data_size; i++) {

        struct zint_symbol* symbol = ZBarcode_Create();
        assert_nonnull(symbol, "Symbol not created\n");

        symbol->symbology = BARCODE_CODABLOCKF;
        symbol->option_1 = data[i].option_1;
        symbol->option_2 = data[i].option_2;

        int length = strlen(data[i].data);

        ret = ZBarcode_Encode(symbol, data[i].data, length);
        assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d\n", i, ret, data[i].ret);

        ZBarcode_Delete(symbol);
    }

    testFinish();
}

// #181 Christian Hartlage OSS-Fuzz
static void test_fuzz(void)
{
    testStart("");

    int ret;
    struct item {
        unsigned char* data;
        int length;
        int ret;
    };
    // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
    struct item data[] = {
        /*  0*/ { "\034\034I", 3, 0 },
    };
    int data_size = sizeof(data) / sizeof(struct item);

    for (int i = 0; i < data_size; i++) {

        struct zint_symbol* symbol = ZBarcode_Create();
        assert_nonnull(symbol, "Symbol not created\n");

        symbol->symbology = BARCODE_CODABLOCKF;
        int length = data[i].length;
        if (length == -1) {
            length = strlen(data[i].data);
        }

        ret = ZBarcode_Encode(symbol, data[i].data, length);
        assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);

        ZBarcode_Delete(symbol);
    }

    testFinish();
}

int main()
{
    test_options();
    test_fuzz();

    testReport();

    return 0;
}

Changes to jni/zint/backend/tests/test_dmatrix.c.

29
30
31
32
33
34
35

36
37
38
39
40
41
42
..
45
46
47
48
49
50
51

52
53
54
55
56
57
58
..
99
100
101
102
103
104
105






































106
107
108
109
110
111
112
 */
/* vim: set ts=4 sw=4 et : */

#include "testcommon.h"

//#define TEST_ENCODE_GENERATE_EXPECTED 1


static void test_buffer(void)
{
    testStart("");

    int ret;
    struct item {
        unsigned char* data;
................................................................................
        int output_options;
        int ret;
        char* comment;
    };
    // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
    struct item data[] = {
        /*  0*/ { "1", 16383, UNICODE_MODE, READER_INIT, 0, "" },

    };
    int data_size = sizeof(data) / sizeof(struct item);

    for (int i = 0; i < data_size; i++) {

        struct zint_symbol* symbol = ZBarcode_Create();
        assert_nonnull(symbol, "Symbol not created\n");
................................................................................
                    "10011101100101"
                    "10100001001000"
                    "10101000001111"
                    "11101100000010"
                    "11010010100101"
                    "10011111000100"
                    "11111111111111"






































               },
    };
    int data_size = sizeof(data) / sizeof(struct item);

    for (int i = 0; i < data_size; i++) {

        struct zint_symbol* symbol = ZBarcode_Create();







>







 







>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
..
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
...
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
 */
/* vim: set ts=4 sw=4 et : */

#include "testcommon.h"

//#define TEST_ENCODE_GENERATE_EXPECTED 1

// Note need ZINT_SANITIZE set for these
static void test_buffer(void)
{
    testStart("");

    int ret;
    struct item {
        unsigned char* data;
................................................................................
        int output_options;
        int ret;
        char* comment;
    };
    // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
    struct item data[] = {
        /*  0*/ { "1", 16383, UNICODE_MODE, READER_INIT, 0, "" },
        /*  1*/ { "000106j 05 Galeria A Nação0000000000", 3, UNICODE_MODE, 0, 0, "From Okapi, consecutive use of upper shift; ticket #176" },
    };
    int data_size = sizeof(data) / sizeof(struct item);

    for (int i = 0; i < data_size; i++) {

        struct zint_symbol* symbol = ZBarcode_Create();
        assert_nonnull(symbol, "Symbol not created\n");
................................................................................
                    "10011101100101"
                    "10100001001000"
                    "10101000001111"
                    "11101100000010"
                    "11010010100101"
                    "10011111000100"
                    "11111111111111"
               },
        /*  1*/ { "A1B2C3D4E5F6G7H8I9J0K1L2", 0, 18, 18, "ISO 16022:2006 Figure 1",
                    "101010101010101010"
                    "101000101010001111"
                    "101100000111000010"
                    "100000101110100111"
                    "100100000100011100"
                    "101011111010101111"
                    "100110011111110110"
                    "110011101111111101"
                    "111111111101111100"
                    "101110110100101101"
                    "100010110101001110"
                    "101101111001100001"
                    "110001101010011110"
                    "110110100000100011"
                    "101101001101011010"
                    "100010011001011011"
                    "100011000000100100"
                    "111111111111111111"
               },
        /*  2*/ { "30Q324343430794<OQQ", 0, 16, 16, "ISO 16022:2006 Figure R.1",
                    "1010101010101010"
                    "1010101010000001"
                    "1010101011101100"
                    "1010101010110011"
                    "1010101010001100"
                    "1010101010001101"
                    "1010101010000100"
                    "1010101001101001"
                    "1010101010000110"
                    "1000001001011001"
                    "1111111110000100"
                    "1101100110010101"
                    "1111111001100100"
                    "1110010111100101"
                    "1110010010100010"
                    "1111111111111111"
               },
    };
    int data_size = sizeof(data) / sizeof(struct item);

    for (int i = 0; i < data_size; i++) {

        struct zint_symbol* symbol = ZBarcode_Create();

Added jni/zint/backend/tests/test_dotcode.c.





















































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
    libzint - the open source barcode library
    Copyright (C) 2008-2020 Robin Stuart <rstuart114@gmail.com>

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions
    are met:

    1. Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.
    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
    3. Neither the name of the project nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    SUCH DAMAGE.
 */
/* vim: set ts=4 sw=4 et : */

#include "testcommon.h"

// #181 Christian Hartlage OSS-Fuzz
static void test_fuzz(void)
{
    testStart("");

    int ret;
    struct item {
        unsigned char* data;
        int ret;
    };
    // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
    struct item data[] = {
        /*  0*/ { "(\207'", 0 }, // 0x28,0x87,0x27 Note: should but doesn't trigger sanitize error if no length check, for some reason; TODO: determine why
    };
    int data_size = sizeof(data) / sizeof(struct item);

    for (int i = 0; i < data_size; i++) {

        struct zint_symbol* symbol = ZBarcode_Create();
        assert_nonnull(symbol, "Symbol not created\n");

        symbol->symbology = BARCODE_DOTCODE;
        int length = strlen(data[i].data);

        ret = ZBarcode_Encode(symbol, data[i].data, length);
        assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);

        ZBarcode_Delete(symbol);
    }

    testFinish();
}

int main()
{
    test_fuzz();

    testReport();

    return 0;
}

Changes to jni/zint/backend/tests/test_upcean.c.

247
248
249
250
251
252
253






































254
255
256
257
258
259
260

261
262
263
264
265
            symbol_vector.vector = vectors[j];
            vector_free(&symbol_vector);
        }
    }

    testFinish();
}







































int main()
{
    test_upce_length();
    test_upca_print();
    test_isbn();
    test_vector_same();


    testReport();

    return 0;
}







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







>





247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
            symbol_vector.vector = vectors[j];
            vector_free(&symbol_vector);
        }
    }

    testFinish();
}

// #181 Christian Hartlage OSS-Fuzz
static void test_eanx_fuzz(void)
{
    testStart("");

    int ret;
    struct item {
        int symbology;
        unsigned char* data;
        int length;
        int ret;
    };
    // s/\/\*[ 0-9]*\*\//\=printf("\/*%2d*\/", line(".") - line("'<"))
    struct item data[] = {
        /* 0*/ { BARCODE_EANX, "55++15", -1, ZINT_ERROR_INVALID_DATA },
    };
    int data_size = sizeof(data) / sizeof(struct item);

    for (int i = 0; i < data_size; i++) {

        struct zint_symbol* symbol = ZBarcode_Create();
        assert_nonnull(symbol, "Symbol not created\n");

        symbol->symbology = data[i].symbology;
        int length = data[i].length;
        if (length == -1) {
            length = strlen(data[i].data);
        }

        ret = ZBarcode_Encode(symbol, data[i].data, length);
        assert_equal(ret, data[i].ret, "i:%d ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);

        ZBarcode_Delete(symbol);
    }

    testFinish();
}

int main()
{
    test_upce_length();
    test_upca_print();
    test_isbn();
    test_vector_same();
    test_eanx_fuzz();

    testReport();

    return 0;
}

Changes to jni/zint/backend/upcean.c.

694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
...
719
720
721
722
723
724
725












726
727
728
729
730
731
732
}

/* splits string to parts before and after '+' parts */
INTERNAL int eanx(struct zint_symbol *symbol, unsigned char source[], int src_len) {
    unsigned char first_part[20] = {0}, second_part[20] = {0}, dest[1000] = {0};
    unsigned char local_source[20] = {0};
    unsigned int latch, reader, writer, with_addon;
    int error_number, i;


    with_addon = FALSE;
    latch = FALSE;
    writer = 0;

    if (src_len > 19) {
................................................................................
    } else {
        error_number = is_sane("0123456789Xx+", source, src_len);
        if (error_number == ZINT_ERROR_INVALID_DATA) {
            strcpy(symbol->errtxt, "285: Invalid characters in input");
            return error_number;
        }
    }













    /* Add leading zeroes */
    ustrcpy(local_source, (unsigned char *) "");
    if (symbol->symbology == BARCODE_ISBNX) {
        to_upper(local_source);
    }








|







 







>
>
>
>
>
>
>
>
>
>
>
>







694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
...
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
}

/* splits string to parts before and after '+' parts */
INTERNAL int eanx(struct zint_symbol *symbol, unsigned char source[], int src_len) {
    unsigned char first_part[20] = {0}, second_part[20] = {0}, dest[1000] = {0};
    unsigned char local_source[20] = {0};
    unsigned int latch, reader, writer, with_addon;
    int error_number, i, plus_count;


    with_addon = FALSE;
    latch = FALSE;
    writer = 0;

    if (src_len > 19) {
................................................................................
    } else {
        error_number = is_sane("0123456789Xx+", source, src_len);
        if (error_number == ZINT_ERROR_INVALID_DATA) {
            strcpy(symbol->errtxt, "285: Invalid characters in input");
            return error_number;
        }
    }
    
    /* Check for multiple '+' characters */
    plus_count = 0;
    for (i = 0; i < src_len; i++) {
        if (source[i] == '+') {
            plus_count++;
        }
    }
    if (plus_count > 1) {
        strcpy(symbol->errtxt, "293: Invalid add-on data");
        return ZINT_ERROR_INVALID_DATA;
    }

    /* Add leading zeroes */
    ustrcpy(local_source, (unsigned char *) "");
    if (symbol->symbology == BARCODE_ISBNX) {
        to_upper(local_source);
    }

Changes to jni/zint/backend/zint.h.

133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
...
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
        struct zint_vector *vector;
        struct zint_render *rendered;
        int debug;
    };

#define ZINT_VERSION_MAJOR      2
#define ZINT_VERSION_MINOR      7
#define ZINT_VERSION_RELEASE    0

    /* Tbarcode 7 codes */
#define BARCODE_CODE11          1
#define BARCODE_C25MATRIX       2
#define BARCODE_C25INTER        3
#define BARCODE_C25IATA         4
#define BARCODE_C25LOGIC        6
................................................................................

    ZINT_EXTERN int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source, int in_length);
    ZINT_EXTERN int ZBarcode_Encode_File(struct zint_symbol *symbol, char *filename);
    ZINT_EXTERN int ZBarcode_Print(struct zint_symbol *symbol, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Encode_and_Print(struct zint_symbol *symbol, unsigned char *input, int length, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Encode_File_and_Print(struct zint_symbol *symbol, char *filename, int rotate_angle);

    ZINT_EXTERN int ZBarcode_Render(struct zint_symbol *symbol, const float width, const float height);

    ZINT_EXTERN int ZBarcode_Buffer(struct zint_symbol *symbol, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Buffer_Vector(struct zint_symbol *symbol, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Encode_and_Buffer(struct zint_symbol *symbol, unsigned char *input, int length, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Encode_and_Buffer_Vector(struct zint_symbol *symbol, unsigned char *input, int length, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Encode_File_and_Buffer(struct zint_symbol *symbol, char *filename, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Encode_File_and_Buffer_Vector(struct zint_symbol *symbol, char *filename, int rotate_angle);








|







 







<
<







133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
...
312
313
314
315
316
317
318


319
320
321
322
323
324
325
        struct zint_vector *vector;
        struct zint_render *rendered;
        int debug;
    };

#define ZINT_VERSION_MAJOR      2
#define ZINT_VERSION_MINOR      7
#define ZINT_VERSION_RELEASE    1

    /* Tbarcode 7 codes */
#define BARCODE_CODE11          1
#define BARCODE_C25MATRIX       2
#define BARCODE_C25INTER        3
#define BARCODE_C25IATA         4
#define BARCODE_C25LOGIC        6
................................................................................

    ZINT_EXTERN int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source, int in_length);
    ZINT_EXTERN int ZBarcode_Encode_File(struct zint_symbol *symbol, char *filename);
    ZINT_EXTERN int ZBarcode_Print(struct zint_symbol *symbol, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Encode_and_Print(struct zint_symbol *symbol, unsigned char *input, int length, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Encode_File_and_Print(struct zint_symbol *symbol, char *filename, int rotate_angle);



    ZINT_EXTERN int ZBarcode_Buffer(struct zint_symbol *symbol, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Buffer_Vector(struct zint_symbol *symbol, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Encode_and_Buffer(struct zint_symbol *symbol, unsigned char *input, int length, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Encode_and_Buffer_Vector(struct zint_symbol *symbol, unsigned char *input, int length, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Encode_File_and_Buffer(struct zint_symbol *symbol, char *filename, int rotate_angle);
    ZINT_EXTERN int ZBarcode_Encode_File_and_Buffer_Vector(struct zint_symbol *symbol, char *filename, int rotate_angle);

Changes to jni/zint/backend_qt/backend_qt.pro.

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
...
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
}

TARGET = QtZint

INCLUDEPATH += ../backend

#EDIT THIS !!!!
DEFINES += ZINT_VERSION="\\\"2.7.0\\\""

!contains(DEFINES, NO_PNG) {
    INCLUDEPATH += ../../lpng
    INCLUDEPATH += ../../zlib
}

contains(DEFINES, QR_SYSTEM){
................................................................................
           ../backend/vector.c \
           ../backend/qr.c \
           ../backend/dllversion.c \
           ../backend/code1.c \
           ../backend/png.c \
           qzint.cpp

VERSION = 2.7.0

#DESTDIR = .

#include.path = $$[ZINT_INSTALL_HEADERS]
include.path = inst/include
include.files = ../backend/zint.h qzint.h

#target.path = $$[ZINT_INSTALL_LIBS]
target.path = inst/lib

INSTALLS += target include








|







 







|












15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
...
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
}

TARGET = QtZint

INCLUDEPATH += ../backend

#EDIT THIS !!!!
DEFINES += ZINT_VERSION="\\\"2.7.1\\\""

!contains(DEFINES, NO_PNG) {
    INCLUDEPATH += ../../lpng
    INCLUDEPATH += ../../zlib
}

contains(DEFINES, QR_SYSTEM){
................................................................................
           ../backend/vector.c \
           ../backend/qr.c \
           ../backend/dllversion.c \
           ../backend/code1.c \
           ../backend/png.c \
           qzint.cpp

VERSION = 2.7.1

#DESTDIR = .

#include.path = $$[ZINT_INSTALL_HEADERS]
include.path = inst/include
include.files = ../backend/zint.h qzint.h

#target.path = $$[ZINT_INSTALL_LIBS]
target.path = inst/lib

INSTALLS += target include

Changes to jni/zint/backend_tcl/configure.

1
2
3
4
5
6
7
8
9
10
...
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
....
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
....
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
....
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
.....
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
.....
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for zint 2.7.0.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization.  ##
................................................................................
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}

# Identity of this package.
PACKAGE_NAME='zint'
PACKAGE_TARNAME='zint'
PACKAGE_VERSION='2.7.0'
PACKAGE_STRING='zint 2.7.0'
PACKAGE_BUGREPORT=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
................................................................................
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures zint 2.7.0 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.
................................................................................

  cat <<\_ACEOF
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of zint 2.7.0:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
................................................................................
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
zint configure 2.7.0
generated by GNU Autoconf 2.63

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
fi
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by zint $as_me 2.7.0, which was
generated by GNU Autoconf 2.63.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
................................................................................

exec 6>&1

# Save the log message, to keep $[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by zint $as_me 2.7.0, which was
generated by GNU Autoconf 2.63.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@
................................................................................
$config_files

Report bugs to <bug-autoconf@gnu.org>."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
zint config.status 2.7.0
configured by $0, generated by GNU Autoconf 2.63,
  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2008 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."



|







 







|
|







 







|







 







|







 







|













|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
...
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
....
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
....
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
....
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
.....
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
.....
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for zint 2.7.1.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization.  ##
................................................................................
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}

# Identity of this package.
PACKAGE_NAME='zint'
PACKAGE_TARNAME='zint'
PACKAGE_VERSION='2.7.1'
PACKAGE_STRING='zint 2.7.1'
PACKAGE_BUGREPORT=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
................................................................................
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures zint 2.7.1 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.
................................................................................

  cat <<\_ACEOF
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of zint 2.7.1:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
................................................................................
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
zint configure 2.7.1
generated by GNU Autoconf 2.63

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
fi
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by zint $as_me 2.7.1, which was
generated by GNU Autoconf 2.63.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
................................................................................

exec 6>&1

# Save the log message, to keep $[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by zint $as_me 2.7.1, which was
generated by GNU Autoconf 2.63.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@
................................................................................
$config_files

Report bugs to <bug-autoconf@gnu.org>."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
zint config.status 2.7.1
configured by $0, generated by GNU Autoconf 2.63,
  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2008 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

Changes to jni/zint/backend_tcl/configure.in.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Set your package name and version numbers here.
#
# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
# set as provided.  These will also be added as -D defs in your Makefile
# so you can encode the package version directly into the source files.
#-----------------------------------------------------------------------

AC_INIT([zint], [2.7.0])

#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------








|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Set your package name and version numbers here.
#
# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
# set as provided.  These will also be added as -D defs in your Makefile
# so you can encode the package version directly into the source files.
#-----------------------------------------------------------------------

AC_INIT([zint], [2.7.1])

#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------

Changes to jni/zint/backend_tcl/lib/zint/pkgIndex.tcl.

1
2
package ifneeded zint 2.7.0\
    [list load [file join $dir zint[info sharedlibextension]]]
|

1
2
package ifneeded zint 2.7.1\
    [list load [file join $dir zint[info sharedlibextension]]]

Changes to jni/zint/backend_tcl/zint.c.

63
64
65
66
67
68
69


70
71
72
73
74
75
76
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
 2019-09-18 2.6.6 HaO
 -	Framework 2.6.6 update
 2019-10-07 2.6.7 HaO
 -	Framework 2.6.7 update
 2019-12-05 2.7.0 HaO
 -	Framework 2.7.0 update
 -  Add symbology rmqr


*/

#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32)
#pragma warning(disable : 4201 4214 4514)
#define STRICT
#define WIN32_LEAN_AND_MEAN
/* TCL Defines */
................................................................................
#define EXPORT
#endif


/*----------------------------------------------------------------------------*/
/* > File option defines */

#define VERSION "2.7.0"

/*----------------------------------------------------------------------------*/
/* >>>>> Hepler defines */

#define STRING( x ) #x

/*----------------------------------------------------------------------------*/







>
>







 







|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
 2019-09-18 2.6.6 HaO
 -	Framework 2.6.6 update
 2019-10-07 2.6.7 HaO
 -	Framework 2.6.7 update
 2019-12-05 2.7.0 HaO
 -	Framework 2.7.0 update
 -  Add symbology rmqr
 2020-02-01 2.7.1 HaO
 -	Framework 2.7.1 update
*/

#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32)
#pragma warning(disable : 4201 4214 4514)
#define STRICT
#define WIN32_LEAN_AND_MEAN
/* TCL Defines */
................................................................................
#define EXPORT
#endif


/*----------------------------------------------------------------------------*/
/* > File option defines */

#define VERSION "2.7.1"

/*----------------------------------------------------------------------------*/
/* >>>>> Hepler defines */

#define STRING( x ) #x

/*----------------------------------------------------------------------------*/

Changes to jni/zint/backend_tcl/zint_tcl.dsp.

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
..
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZINT_TCL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\backend" /I "C:\myprograms\tcl8.5\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZINT_TCL_EXPORTS" /D "NO_PNG" /FR /YX /FD /D ZINT_VERSION="\"2.7.0\"" /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG"
# ADD RSC /l 0x407 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
................................................................................
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZINT_TCL_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\backend" /I "C:\myprograms\tcl8.5\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZINT_TCL_EXPORTS" /D "NO_PNG" /FR /YX /FD /GZ /D ZINT_VERSION="\"2.7.0\"" /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG"
# ADD RSC /l 0x407 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo







|







 







|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
..
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZINT_TCL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\backend" /I "C:\myprograms\tcl8.5\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZINT_TCL_EXPORTS" /D "NO_PNG" /FR /YX /FD /D ZINT_VERSION="\"2.7.1\"" /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG"
# ADD RSC /l 0x407 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
................................................................................
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZINT_TCL_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\backend" /I "C:\myprograms\tcl8.5\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZINT_TCL_EXPORTS" /D "NO_PNG" /FR /YX /FD /GZ /D ZINT_VERSION="\"2.7.1\"" /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG"
# ADD RSC /l 0x407 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo

Changes to jni/zint/frontend_qt/Inno_Setup_qtzint.iss.

1
2
3
4
5
6
7
8
9
10
11
12
..
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "qtZint"
#define MyAppVersion "2.5.1"
#define MyAppPublisher "Robin Stuart"
#define MyAppURL "http://zint.org.uk/"
#define MyAppExeName "qtZint.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
................................................................................

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Files]
Source: "release\qtZint.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "release\Qt5Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "release\Qt5Gui.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "release\Qt5Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent




|







 







|
|
|









1
2
3
4
5
6
7
8
9
10
11
12
..
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "qtZint"
#define MyAppVersion "2.7.1"
#define MyAppPublisher "Robin Stuart"
#define MyAppURL "http://zint.org.uk/"
#define MyAppExeName "qtZint.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
................................................................................

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Files]
Source: "release\qtZint.exe"; DestDir: "{app}"; Flags: ignoreversion
;Source: "release\Qt5Core.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "release\Qt5Gui.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "release\Qt5Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

Changes to jni/zint/frontend_qt/mainwindow.cpp.

260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
        settings.setValue("studio/default_suffix", suffix);
    return true;
}

void MainWindow::about()
{
    QMessageBox::about(this, tr("About Zint"),
       tr("<h2>Zint Barcode Studio 2.7.0</h2>"
           "<p>A free barcode generator"
           "<p>Instruction manual is available at the project homepage:<br>"
           "<a href=\"http://www.zint.org.uk\">http://www.zint.org.uk</a>"
           "<p>Copyright &copy; 2006-2018 Robin Stuart and others.<br>"
           "Qt back end by BogDan Vatra<br>"
           "Windows port by Harald Oehlmann</p>"
           "<p>Qt version " QT_VERSION_STR







|







260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
        settings.setValue("studio/default_suffix", suffix);
    return true;
}

void MainWindow::about()
{
    QMessageBox::about(this, tr("About Zint"),
       tr("<h2>Zint Barcode Studio 2.7.1</h2>"
           "<p>A free barcode generator"
           "<p>Instruction manual is available at the project homepage:<br>"
           "<a href=\"http://www.zint.org.uk\">http://www.zint.org.uk</a>"
           "<p>Copyright &copy; 2006-2018 Robin Stuart and others.<br>"
           "Qt back end by BogDan Vatra<br>"
           "Windows port by Harald Oehlmann</p>"
           "<p>Qt version " QT_VERSION_STR

Added jni/zint/win32/zint_cmdline_vc6/resource.h.

































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by zint.rc
//

// Next default values for new objects
// 
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC                     1
#define _APS_NEXT_RESOURCE_VALUE        101
#define _APS_NEXT_COMMAND_VALUE         40001
#define _APS_NEXT_CONTROL_VALUE         1000
#define _APS_NEXT_SYMED_VALUE           101
#endif
#endif

Changes to jni/zint/zint.nsi.

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
; ver 1.0.0.1 20090914 tgotic removed WinSxS check
;******************************************************************************
!define PRODUCT_NAME "Zint"
!define PRODUCT_EXE "qtZint.exe"
!define PRODUCT_VERSION "2.6.7.0"
!define PRODUCT_WEB_SITE "http://www.zint.org.uk"
!define PRODUCT_PUBLISHER "Robin Stuart & BogDan Vatra"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_EXE}"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
;******************************************************************************
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"







|







6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
; ver 1.0.0.1 20090914 tgotic removed WinSxS check
;******************************************************************************
!define PRODUCT_NAME "Zint"
!define PRODUCT_EXE "qtZint.exe"
!define PRODUCT_VERSION "2.7.1.0"
!define PRODUCT_WEB_SITE "http://www.zint.org.uk"
!define PRODUCT_PUBLISHER "Robin Stuart & BogDan Vatra"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_EXE}"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
;******************************************************************************
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"

Changes to jni/zint/zint.spec.

1
2
3
4
5
6
7
8
9
...
133
134
135
136
137
138
139



140
141
142
143
144
145
146
Name:      zint
Version:   2.7.0
Release:   2%{?dist}
Summary:   A barcode generator and library
License:   GPLv3+
URL:       http://www.zint.org.uk
Source:    http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.src.tar.gz
Group:     Applications/Engineering
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
................................................................................
%files -n %{name}-qt-devel
%defattr(-,root,root,-)
%{_includedir}/qzint.h
%{_libdir}/libQZint.so


%changelog




* Thu Dec 5 2019 Harald Oehlmann <oehhar@sourceforge.net> - 2.7.0
- Version -> 2.7.0

* Wed Sep 18 2019 Harald Oehlmann <oehhar@sourceforge.net> - 2.6.6
- Version -> 2.6.6


|







 







>
>
>







1
2
3
4
5
6
7
8
9
...
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
Name:      zint
Version:   2.7.1
Release:   2%{?dist}
Summary:   A barcode generator and library
License:   GPLv3+
URL:       http://www.zint.org.uk
Source:    http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.src.tar.gz
Group:     Applications/Engineering
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
................................................................................
%files -n %{name}-qt-devel
%defattr(-,root,root,-)
%{_includedir}/qzint.h
%{_libdir}/libQZint.so


%changelog

* Sat Feb 1 2020 Harald Oehlmann <oehhar@sourceforge.net> - 2.7.1
- Version -> 2.7.1

* Thu Dec 5 2019 Harald Oehlmann <oehhar@sourceforge.net> - 2.7.0
- Version -> 2.7.0

* Wed Sep 18 2019 Harald Oehlmann <oehhar@sourceforge.net> - 2.6.6
- Version -> 2.6.6