mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-28 05:54:19 -04:00
Merge /u/gitlost/zint/ branch gs1_nocheck_mode into master
https://sourceforge.net/p/zint/code/merge-requests/128/
This commit is contained in:
commit
059abdf6a1
21 changed files with 1157 additions and 707 deletions
|
@ -1,3 +1,5 @@
|
|||
mkdir isotest_out
|
||||
cd isotest_out
|
||||
echo Creating images for Code 49...
|
||||
zint -o aimbc6_fig1.gif -b 24 -d "MULTIPLE ROWS IN CODE 49"
|
||||
zint -o aimbc6_fig3.gif -b 24 -d "EXAMPLE 2"
|
||||
|
@ -75,7 +77,7 @@ zint -o aimdtsc15032_fig1.gif -b 144 --secure=2 -d "ULTRACODE_123456789!"
|
|||
zint -o aimdtsc15032_figg2.gif -b 144 --secure=2 -d "HEIMASÍÐA KENNARAHÁSKÓLA ÍSLANDS"
|
||||
zint -o aimdtsc15032_figg3.gif -b 144 --secure=2 -d "אולטרה-קוד1234"
|
||||
zint -o aimdtsc15032_figg4a.gif -b 144 --secure=2 -d "https://aimglobal.org/jcrv3tX"
|
||||
zint -o aimdtsc15032_figg6.gif -b 144 --gs1 -d "[01]03453120000011[17]20121125[10]ABCD1234"
|
||||
zint -o aimdtsc15032_figg6.gif -b 144 --gs1 -d "[01]03453120000011[17]121125[10]ABCD1234"
|
||||
echo Creating images of EAN/UPC...
|
||||
zint -o en797_fig1.gif -b 13 -d 501234567890
|
||||
zint -o en797_fig2.gif -b 13 -d 2012345
|
||||
|
@ -98,7 +100,7 @@ zint -o iso16022_figo2.gif -b 71 -d "123456"
|
|||
zint -o iso16022_figr1.gif -b 71 -d "30Q324343430794<OQQ"
|
||||
echo Creating images for Maxicode
|
||||
zint -o iso16023_fig2.gif -b 57 --mode=4 -d "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL..."
|
||||
zint -o iso16023_figb2.gif -b 57 --mode=2 --primary="152382802840001" -d "[)>\R01\G961Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G634 ALPHA DR\GPITTSBURGH\GPA\R\E"
|
||||
zint -o iso16023_figb2.gif -b 57 --mode=2 --primary="152382802840001" -d "[)>\R01\G961Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G634 ALPHA DR\GPITTSBURGH\GPA\R\E" --esc
|
||||
zint -o iso16023_figh1.gif -b 57 --mode=4 -d "Maxi Code (19 chars)"
|
||||
echo Creating images for QR Code...
|
||||
zint -o iso18004_fig1.gif -b 58 -d "QR Code Symbol"
|
||||
|
@ -113,7 +115,7 @@ zint -o iso24723_fig3.gif -b 136 --mode=1 --primary=121230 -d "[15]021231"
|
|||
zint -o iso24723_fig4.gif -b 130 --mode=1 --primary=1234567 -d "[21]A12345678"
|
||||
zint -o iso24723_fig5.gif -b 130 --mode=1 --primary=331234567890 -d "[99]1234-abcd"
|
||||
zint -o iso24723_fig6.gif -b 137 --mode=1 --primary=341234567890 -d "[17]010200"
|
||||
zint -o iso24723_fig7.gif -b 133 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv"
|
||||
zint -o iso24723_fig7.gif -b 133 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" --gs1nocheck
|
||||
zint -o iso24723_fig8.gif -b 132 --mode=1 --primary=361234567890 -d "[11]990102"
|
||||
zint -o iso24723_fig9.gif -b 134 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E"
|
||||
zint -o iso24723_fig10.gif -b 139 --mode=1 --primary="[01]00012345678905[10]ABCDEF" -d "[21]12345678"
|
||||
|
|
|
@ -140,6 +140,7 @@ static void usage(void) {
|
|||
" --filetype=TYPE Set output file type BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\n"
|
||||
" --fullmultibyte Use multibyte for binary/Latin (QR/Han Xin/Grid Matrix)\n"
|
||||
" --gs1 Treat input as GS1 compatible data\n"
|
||||
" --gs1nocheck Do not check validity of GS1 data\n"
|
||||
" --gs1parens Process parentheses \"()\" as GS1 AI delimiters, not \"[]\"\n"
|
||||
" --gssep Use separator GS for GS1 (Data Matrix)\n"
|
||||
" -h, --help Display help message\n"
|
||||
|
@ -167,7 +168,6 @@ static void usage(void) {
|
|||
" --vwhitesp=NUMBER Set height of vertical whitespace in multiples of X-dim\n"
|
||||
" -w, --whitesp=NUMBER Set width of horizontal whitespace in multiples of X-dim\n"
|
||||
" --werror Convert all warnings into errors\n"
|
||||
" --wzpl ZPL compatibility mode (allows non-standard symbols)\n"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -799,10 +799,11 @@ int main(int argc, char **argv) {
|
|||
OPT_ADDONGAP = 128, OPT_BATCH, OPT_BINARY, OPT_BG, OPT_BIND, OPT_BOLD, OPT_BORDER,
|
||||
OPT_BOX, OPT_CMYK, OPT_COLS, OPT_DIRECT, OPT_DMRE, OPT_DOTSIZE, OPT_DOTTY, OPT_DUMP,
|
||||
OPT_ECI, OPT_ESC, OPT_FG, OPT_FILETYPE, OPT_FONTSIZE, OPT_FULLMULTIBYTE,
|
||||
OPT_GS1, OPT_GS1PARENS, OPT_GSSEP, OPT_HEIGHT, OPT_INIT, OPT_MIRROR, OPT_MASK, OPT_MODE,
|
||||
OPT_GS1, OPT_GS1NOCHECK, OPT_GS1PARENS, OPT_GSSEP,
|
||||
OPT_HEIGHT, OPT_INIT, OPT_MIRROR, OPT_MASK, OPT_MODE,
|
||||
OPT_NOBACKGROUND, OPT_NOTEXT, OPT_PRIMARY, OPT_ROTATE, OPT_ROWS, OPT_SCALE,
|
||||
OPT_SCMVV, OPT_SECURE, OPT_SEPARATOR, OPT_SMALL, OPT_SQUARE, OPT_VERBOSE, OPT_VERS,
|
||||
OPT_VWHITESP, OPT_WERROR, OPT_WZPL,
|
||||
OPT_VWHITESP, OPT_WERROR,
|
||||
};
|
||||
int option_index = 0;
|
||||
static struct option long_options[] = {
|
||||
|
@ -831,6 +832,7 @@ int main(int argc, char **argv) {
|
|||
{"fontsize", 1, NULL, OPT_FONTSIZE},
|
||||
{"fullmultibyte", 0, NULL, OPT_FULLMULTIBYTE},
|
||||
{"gs1", 0, 0, OPT_GS1},
|
||||
{"gs1nocheck", 0, NULL, OPT_GS1NOCHECK},
|
||||
{"gs1parens", 0, NULL, OPT_GS1PARENS},
|
||||
{"gssep", 0, NULL, OPT_GSSEP},
|
||||
{"height", 1, NULL, OPT_HEIGHT},
|
||||
|
@ -859,7 +861,6 @@ int main(int argc, char **argv) {
|
|||
{"vwhitesp", 1, NULL, OPT_VWHITESP},
|
||||
{"werror", 0, NULL, OPT_WERROR},
|
||||
{"whitesp", 1, NULL, 'w'},
|
||||
{"wzpl", 0, NULL, OPT_WZPL},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
int c = getopt_long(argc, argv, "b:d:ehi:o:rtw:", long_options, &option_index);
|
||||
|
@ -1003,6 +1004,9 @@ int main(int argc, char **argv) {
|
|||
case OPT_GS1:
|
||||
my_symbol->input_mode = (my_symbol->input_mode & ~0x07) | GS1_MODE;
|
||||
break;
|
||||
case OPT_GS1NOCHECK:
|
||||
my_symbol->input_mode |= GS1NOCHECK_MODE;
|
||||
break;
|
||||
case OPT_GS1PARENS:
|
||||
my_symbol->input_mode |= GS1PARENS_MODE;
|
||||
break;
|
||||
|
@ -1182,9 +1186,6 @@ int main(int argc, char **argv) {
|
|||
case OPT_WERROR:
|
||||
my_symbol->warn_level = WARN_FAIL_ALL;
|
||||
break;
|
||||
case OPT_WZPL:
|
||||
my_symbol->warn_level = WARN_ZPL_COMPAT;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
usage();
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
mkdir test_out
|
||||
cd test_out
|
||||
echo testing Code 11
|
||||
zint -o bar01.txt -b 1 -d 87654321
|
||||
zint -o bar01.gif -b 1 --height=50 --border=10 -d 87654321
|
||||
|
@ -27,9 +29,9 @@ zint -o bar08.txt -b 8 -d CODE39
|
|||
zint -o bar08.gif -b 8 --height=50 --border=10 -d CODE39
|
||||
zint -o bar08.svg -b 8 --height=50 --border=10 -d CODE39
|
||||
echo testing Extended Code 39
|
||||
zint -o bar09.txt -b 9 -d 'Code 39e'
|
||||
zint -o bar09.gif -b 9 --height=50 --border=10 -d 'Code 39e'
|
||||
zint -o bar09.svg -b 9 --height=50 --border=10 -d 'Code 39e'
|
||||
zint -o bar09.txt -b 9 -d "Code 39e"
|
||||
zint -o bar09.gif -b 9 --height=50 --border=10 -d "Code 39e"
|
||||
zint -o bar09.svg -b 9 --height=50 --border=10 -d "Code 39e"
|
||||
echo testing EAN8
|
||||
zint -o bar10.txt -b 13 -d 7654321
|
||||
zint -o bar10.gif -b 13 --height=50 --border=10 -d 7654321
|
||||
|
@ -63,9 +65,9 @@ zint -o bar18.txt -b 18 -d D765432C
|
|||
zint -o bar18.gif -b 18 --height=50 --border=10 -d D765432C
|
||||
zint -o bar18.svg -b 18 --height=50 --border=10 -d D765432C
|
||||
echo testing Code 128
|
||||
zint -o bar20.txt -b 20 -d 'Code 128'
|
||||
zint -o bar20.gif -b 20 --height=50 --border=10 -d 'Code 128'
|
||||
zint -o bar20.svg -b 20 --height=50 --border=10 -d 'Code 128'
|
||||
zint -o bar20.txt -b 20 -d "Code 128"
|
||||
zint -o bar20.gif -b 20 --height=50 --border=10 -d "Code 128"
|
||||
zint -o bar20.svg -b 20 --height=50 --border=10 -d "Code 128"
|
||||
echo testing Deutsche Post Leitcode
|
||||
zint -o bar21.txt -b 21 -d 3210987654321
|
||||
zint -o bar21.gif -b 21 --height=50 --border=10 -d 3210987654321
|
||||
|
@ -86,9 +88,9 @@ zint -o bar24.txt -b 24 -d "Demonstration Code 49"
|
|||
zint -o bar24.gif -b 24 -d "Demonstration Code 49"
|
||||
zint -o bar24.svg -b 24 -d "Demonstration Code 49"
|
||||
echo testing Code 93
|
||||
zint -o bar25.txt -b 25 -d 'Code 93'
|
||||
zint -o bar25.gif -b 25 --height=50 --border=10 -d 'Code 93'
|
||||
zint -o bar25.svg -b 25 --height=50 --border=10 -d 'Code 93'
|
||||
zint -o bar25.txt -b 25 -d "Code 93"
|
||||
zint -o bar25.gif -b 25 --height=50 --border=10 -d "Code 93"
|
||||
zint -o bar25.svg -b 25 --height=50 --border=10 -d "Code 93"
|
||||
echo testing Flattermarken
|
||||
zint -o bar28.txt -b 28 -d 87654321
|
||||
zint -o bar28.gif -b 28 --height=50 --border=10 -d 87654321
|
||||
|
@ -106,9 +108,9 @@ zint -o bar31.txt -b 31 -d "[01]90012345678908[3103]001750"
|
|||
zint -o bar31.gif -b 31 --height=50 --border=10 -d "[01]90012345678908[3103]001750"
|
||||
zint -o bar31.svg -b 31 --height=50 --border=10 -d "[01]90012345678908[3103]001750"
|
||||
echo testing Telepen Alpha
|
||||
zint -o bar32.txt -b 32 -d 'Telepen'
|
||||
zint -o bar32.gif -b 32 --height=50 --border=10 -d 'Telepen'
|
||||
zint -o bar32.svg -b 32 --height=50 --border=10 -d 'Telepen'
|
||||
zint -o bar32.txt -b 32 -d "Telepen"
|
||||
zint -o bar32.gif -b 32 --height=50 --border=10 -d "Telepen"
|
||||
zint -o bar32.svg -b 32 --height=50 --border=10 -d "Telepen"
|
||||
echo testing UPC A
|
||||
zint -o bar34.txt -b 34 -d 10987654321
|
||||
zint -o bar34.gif -b 34 --height=50 --border=10 -d 10987654321
|
||||
|
@ -185,9 +187,9 @@ echo testing QR Code
|
|||
zint -o bar58.txt -b 58 -d "Demonstration QR Code symbol generated by libzint"
|
||||
zint -o bar58.gif -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint"
|
||||
zint -o bar58.svg -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint"
|
||||
zint -o bar58k.txt -b 58 --kanji -d "画像内の単語を非表示にする"
|
||||
zint -o bar58k.gif -b 58 --kanji --border=10 -d "画像内の単語を非表示にする"
|
||||
zint -o bar58k.svg -b 58 --kanji --border=10 -d "画像内の単語を非表示にする"
|
||||
zint -o bar58k.txt -b 58 -d "画像内の単語を非表示にする"
|
||||
zint -o bar58k.gif -b 58 --border=10 -d "画像内の単語を非表示にする"
|
||||
zint -o bar58k.svg -b 58 --border=10 -d "画像内の単語を非表示にする"
|
||||
echo testing Code 128 Subset B
|
||||
zint -o bar60.txt -b 60 -d 87654321
|
||||
zint -o bar60.gif -b 60 --height=50 --border=10 -d 87654321
|
||||
|
@ -201,9 +203,9 @@ zint -o bar64.txt -b 63 -d 87654321AUSPS
|
|||
zint -o bar64.gif -b 63 --border=10 -d 87654321AUSPS
|
||||
zint -o bar64.svg -b 63 --border=10 -d 87654321AUSPS
|
||||
echo testing Australian Post Customer 3
|
||||
zint -o bar65.txt -b 63 -d '87654321 AUSTRALIA'
|
||||
zint -o bar65.gif -b 63 --border=10 -d '87654321 AUSTRALIA'
|
||||
zint -o bar65.svg -b 63 --border=10 -d '87654321 AUSTRALIA'
|
||||
zint -o bar65.txt -b 63 -d "87654321 AUSTRALIA"
|
||||
zint -o bar65.gif -b 63 --border=10 -d "87654321 AUSTRALIA"
|
||||
zint -o bar65.svg -b 63 --border=10 -d "87654321 AUSTRALIA"
|
||||
echo testing Australian Post Reply Paid
|
||||
zint -o bar66.txt -b 66 -d 87654321
|
||||
zint -o bar66.gif -b 66 --border=10 -d 87654321
|
||||
|
@ -296,9 +298,9 @@ zint -o bar89.txt -b 89 -d 3210987654321
|
|||
zint -o bar89.gif -b 89 --height=50 --border=10 -d 3210987654321
|
||||
zint -o bar89.svg -b 89 --height=50 --border=10 -d 3210987654321
|
||||
echo testing KIX Code
|
||||
zint -o bar90.txt -b 90 -d '1231FZ13Xhs'
|
||||
zint -o bar90.gif -b 90 --border=10 -d '1231FZ13Xhs'
|
||||
zint -o bar90.svg -b 90 --border=10 -d '1231FZ13Xhs'
|
||||
zint -o bar90.txt -b 90 -d "1231FZ13Xhs"
|
||||
zint -o bar90.gif -b 90 --border=10 -d "1231FZ13Xhs"
|
||||
zint -o bar90.svg -b 90 --border=10 -d "1231FZ13Xhs"
|
||||
echo testing Aztec Code
|
||||
zint -o bar92.txt -b 92 -d "Demonstration Aztec Code symbol generated by libzint"
|
||||
zint -o bar92.gif -b 92 --border=10 -d "Demonstration Aztec Code symbol generated by libzint"
|
||||
|
@ -314,9 +316,9 @@ echo testing Micro QR Code
|
|||
zint -o bar97.txt -b 97 -d "MicroQR Code"
|
||||
zint -o bar97.gif -b 97 --border=10 -d "MicroQR Code"
|
||||
zint -o bar97.svg -b 97 --border=10 -d "MicroQR Code"
|
||||
zint -o bar97k.txt -b 97 --kanji -d "小さい"
|
||||
zint -o bar97k.gif -b 97 --kanji --border=10 -d "小さい"
|
||||
zint -o bar97k.svg -b 97 --kanji --border=10 -d "小さい"
|
||||
zint -o bar97k.txt -b 97 -d "小さい"
|
||||
zint -o bar97k.gif -b 97 --border=10 -d "小さい"
|
||||
zint -o bar97k.svg -b 97 --border=10 -d "小さい"
|
||||
echo testing HIBC LIC 128
|
||||
zint -o bar98.txt -b 98 -d "A99912345/9901510X3"
|
||||
zint -o bar98.gif -b 98 --border=10 -d "A99912345/9901510X3"
|
||||
|
@ -385,9 +387,9 @@ zint -o bar132.txt -b 132 --mode=1 --primary=361234567890 -d "[11]990102"
|
|||
zint -o bar132.gif -b 132 --height=100 --border=10 --mode=1 --primary=361234567890 -d "[11]990102"
|
||||
zint -o bar132.svg -b 132 --height=100 --border=10 --mode=1 --primary=361234567890 -d "[11]990102"
|
||||
echo testing DataBar Limited Composite with CC-B
|
||||
zint -o bar133.txt -b 133 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv"
|
||||
zint -o bar133.gif -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv"
|
||||
zint -o bar133.svg -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv"
|
||||
zint -o bar133.txt -b 133 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" --gs1nocheck
|
||||
zint -o bar133.gif -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" --gs1nocheck
|
||||
zint -o bar133.svg -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" --gs1nocheck
|
||||
echo testing DataBar Expanded Composite with CC-A
|
||||
zint -o bar134.txt -b 134 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E"
|
||||
zint -o bar134.gif -b 134 --height=100 --border=10 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E"
|
||||
|
|
|
@ -910,10 +910,10 @@ static void test_other_opts(int index, int debug) {
|
|||
/* 13*/ { 19, "1", -1, " --werror", NULL, "Error 207: Codabar 18 not supported" },
|
||||
/* 14*/ { BARCODE_GS1_128, "[01]12345678901231", -1, "", NULL, "" },
|
||||
/* 15*/ { BARCODE_GS1_128, "0112345678901231", -1, "", NULL, "Error 252: Data does not start with an AI" },
|
||||
/* 16*/ { BARCODE_GS1_128, "0112345678901231", -1, " --wzpl", NULL, "Warning 252: Data does not start with an AI" },
|
||||
/* 16*/ { BARCODE_GS1_128, "0112345678901231", -1, " --gs1nocheck", NULL, "Error 252: Data does not start with an AI" },
|
||||
/* 17*/ { BARCODE_GS1_128, "[00]376104250021234569", -1, "", NULL, "" },
|
||||
/* 18*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, "", NULL, "Warning 261: AI (00) position 18: Bad checksum '8', expected '9'" },
|
||||
/* 19*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, " --wzpl", NULL, "Warning 261: AI (00) position 18: Bad checksum '8', expected '9'" },
|
||||
/* 19*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, " --gs1nocheck", NULL, "" },
|
||||
/* 20*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, " --werror", NULL, "Error 261: AI (00) position 18: Bad checksum '8', expected '9'" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue