From b0c30489ec377290c4fd1d0811fbf76cda5c29f9 Mon Sep 17 00:00:00 2001 From: Harald Oehlmann Date: Mon, 27 Jul 2020 18:44:51 +0200 Subject: [PATCH] README updated with the changes of the last 3 weeks TCL backend changes: - Version now 2.9.0 - option -addongap added - renamed the following symbology names: - Matrix2of5 -> Standard2of5 - PDF417Trunc -> PDF417Compact - RSS14Stacked -> GS1DataBarStacked - RSS14Stacked -> GS1DataBarStacked - RSS14StackedOmni -> GS1DataBarSstackedOmni - RSS14ExpandedStacked -> GS1DataBarExpandedStacked - OneCode -> USPSIntelligentMail - EAN128-CC -> GS1-128-CC - RSS14-CC -> GS1DataBarOmni-CC - RSSLimited-CC -> GS1DataBarLimited-CC - RSSExpandedStacked-CC -> GS1DataBarExpanded-CC - RSSEXPanded-CC -> GS1DataBarExpanded-CC - RSS14Stacked-CC -> GS1DataBarStacked-CC - RSS14Omni-CC -> GS1DataBarStackedOmni-CC - RSSExpandedStacked-CC -> GS1DataBarExpandedStacked-CC *** Potential incompatibility *** --- README | 36 ++++++++-- backend_tcl/configure.in | 2 +- backend_tcl/lib/zint/pkgIndex.tcl | 2 +- backend_tcl/zint.c | 113 +++++++++++++++++++++++------- 4 files changed, 120 insertions(+), 33 deletions(-) diff --git a/README b/README index 4eebaf3e..60996db7 100644 --- a/README +++ b/README @@ -162,7 +162,7 @@ Bugs: - Ticket 189: FNC1 encodation fixed (FLG(0) missing after FLG(n)) - PCX format: added missing bytes_per_line if bitmap width is odd. -Version 2.8.1 Not released jet +Version 2.9.0 Not released jet Changes: - Dotcode: adopt to AIM DOC Revision 4 - New option "-separator=" for zint to specify the separator height of stacked @@ -182,6 +182,25 @@ Changes: - Separarator option for DATAMATRIX - parse escape sequences - gui element reassigments +- UPC/EAN/ITF-14 Composite: Ticket 72: new option --addongap (default:9) to set + the gap between code and composite. +- TCL Backend: The following symbology names were renamed: + - Matrix2of5 -> Standard2of5 + - PDF417Trunc -> PDF417Compact + - RSS14Stacked -> GS1DataBarStacked + - RSS14Stacked -> GS1DataBarStacked + - RSS14StackedOmni -> GS1DataBarSstackedOmni + - RSS14ExpandedStacked -> GS1DataBarExpandedStacked + - OneCode -> USPSIntelligentMail + - EAN128-CC -> GS1-128-CC + - RSS14-CC -> GS1DataBarOmni-CC + - RSSLimited-CC -> GS1DataBarLimited-CC + - RSSExpandedStacked-CC -> GS1DataBarExpanded-CC + - RSSEXPanded-CC -> GS1DataBarExpanded-CC + - RSS14Stacked-CC -> GS1DataBarStacked-CC + - RSS14Omni-CC -> GS1DataBarStackedOmni-CC + - RSSExpandedStacked-CC -> GS1DataBarExpandedStacked-CC + *** Potential incompatibility *** Bugs: - Ticket 185 EMF export corrections - fine scaling by the use of float arithmetic @@ -204,8 +223,8 @@ Bugs: - Improve coding of Extended ASCII (FNC4) - Checksum calculation overflow protection - EAN128 may reduce length -- Check for incomplete escape sequences on data specification: "\" without following - character. +- Check for incomplete escape sequences on data specification: "\" without + following character. - Code16K fixes: remove extended ASCII latch, pad character - Restructuring to have common code centralized: - Code128 routines for Codablock&Code16K @@ -213,7 +232,16 @@ Bugs: - HIBC_39: restrict max length to 68 otherwise to avoid overrun - Code One: protect agains overrun - Telepen: allow DEL - +- GS1 Databar/ GS1-128 Composite: + - Separator bar corrections + - Ticket 200: spurious additional row + - Correct names in GUI +- Compact PDF417: + - Add missing stop pattern. + - Rename in GUI: "PDF417 Truncated" to "Compact PDF417". +- PDF417: Optimize text compaction mode switch. +- Human readable representation: Code128, Code39, Code93 special characters + are shown by a blank. CONTACT US ---------- diff --git a/backend_tcl/configure.in b/backend_tcl/configure.in index a9a78663..38ef16c9 100644 --- a/backend_tcl/configure.in +++ b/backend_tcl/configure.in @@ -14,7 +14,7 @@ # so you can encode the package version directly into the source files. #----------------------------------------------------------------------- -AC_INIT([zint], [2.8.0]) +AC_INIT([zint], [2.9.0]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. diff --git a/backend_tcl/lib/zint/pkgIndex.tcl b/backend_tcl/lib/zint/pkgIndex.tcl index 62b606fe..11bce653 100644 --- a/backend_tcl/lib/zint/pkgIndex.tcl +++ b/backend_tcl/lib/zint/pkgIndex.tcl @@ -1,2 +1,2 @@ -package ifneeded zint 2.8.0\ +package ifneeded zint 2.9.0\ [list load [file join $dir zint[info sharedlibextension]]] diff --git a/backend_tcl/zint.c b/backend_tcl/zint.c index f88b27d7..70da5651 100644 --- a/backend_tcl/zint.c +++ b/backend_tcl/zint.c @@ -76,6 +76,25 @@ 2020-05-19 HaO - Added option -separator to specify stacked symbology separator width - -cols maximum changed from 66 to 67 + 2020-07-27 2.9.0 HaO + - added option "-addongap" + - Renamed symbology names: + - Matrix2of5 -> Standard2of5 + - PDF417Trunc -> PDF417Compact + - RSS14Stacked -> GS1DataBarStacked + - RSS14Stacked -> GS1DataBarStacked + - RSS14StackedOmni -> GS1DataBarSstackedOmni + - RSS14ExpandedStacked -> GS1DataBarExpandedStacked + - OneCode -> USPSIntelligentMail + - EAN128-CC -> GS1-128-CC + - RSS14-CC -> GS1DataBarOmni-CC + - RSSLimited-CC -> GS1DataBarLimited-CC + - RSSExpandedStacked-CC -> GS1DataBarExpanded-CC + - RSSEXPanded-CC -> GS1DataBarExpanded-CC + - RSS14Stacked-CC -> GS1DataBarStacked-CC + - RSS14Omni-CC -> GS1DataBarStackedOmni-CC + - RSSExpandedStacked-CC -> GS1DataBarExpandedStacked-CC + *** Potential incompatibility *** */ #if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) @@ -115,7 +134,7 @@ /*----------------------------------------------------------------------------*/ /* > File option defines */ -#define VERSION "2.8.0" +#define VERSION "2.9.0" /*----------------------------------------------------------------------------*/ /* >>>>> Hepler defines */ @@ -134,6 +153,7 @@ static int Encode(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); static int is_fullmultibyte(struct zint_symbol* symbol); static int is_stackable(const int symbology); +static int is_extendable(const int symbology); /*----------------------------------------------------------------------------*/ /* >>>> File Global Variables */ @@ -141,7 +161,7 @@ static int is_stackable(const int symbology); static char *s_code_list[] = { "Code11", - "Matrix2of5", + "Standard2of5", "Interleaved2of5", "IATAC2of5", "Logic2of5", @@ -149,7 +169,7 @@ static char *s_code_list[] = { "Code39", "Code39Extended", "EAN", - "EAN+Check", + "EAN+Check", "GS1-128", "Codabar", "Code128", @@ -164,7 +184,7 @@ static char *s_code_list[] = { "GS1DataBarExpanded", "Telepen", "UPC-A", - "UPC-A+Check", + "UPC-A+Check", "UPC-E", "UPC-E+Check", "Postnet", @@ -175,7 +195,7 @@ static char *s_code_list[] = { "PZN", "PharmaTwo", "PDF417", - "PDF417Truncated", + "PDF417Compact", "MaxiCode", "QR", "Code128B", @@ -187,17 +207,17 @@ static char *s_code_list[] = { "RM4SCC", "Datamatrix", "EAN14", - "VIN", + "VIN", "CodablockF", "NVE18", "JapanPost", "KoreaPost", - "RSS14Stacked", - "RSS14SstackedOmni", - "RSSExpandedStacked", + "GS1DataBarStacked", + "GS1DataBarSstackedOmni", + "GS1DataBarExpandedStacked", "Planet", "MicroPDF417", - "OneCode", + "USPSIntelligentMail", "Plessey", "TelepenNum", "ITF14", @@ -213,21 +233,21 @@ static char *s_code_list[] = { "HIBC-MicroPDF", "HIBC-CodablockF", "HIBCAztec", - "DotCode", - "HanXin", - "MailMark", + "DotCode", + "HanXin", + "MailMark", "AztecRunes", "Code32", "EAN-CC", - "EAN128-CC", - "RSS14-CC", - "RSSLimited-CC", - "RSSEXPanded-CC", + "GS1-128-CC", + "GS1DataBarOmni-CC", + "GS1DataBarLimited-CC", + "GS1DataBarExpanded-CC", "UPCA-CC", "UPCE-CC", - "RSS14Stacked-CC", - "RSS14Omni-CC", - "RSSExpandedStacked-CC", + "GS1DataBarStacked-CC", + "GS1DataBarStackedOmni-CC", + "GS1DataBarExpandedStacked-CC", "Channel", "CodeOne", "GridMatrix", @@ -392,6 +412,7 @@ static char help_message[] = "zint tcl(stub,obj) dll\n" " data: data to encode in the symbol\n" " photo: a tcl photo image handle ('p' after 'image create photo p')\n" " Available options:\n" + " -addongap number: (7..12, default: 9) set add-on gap in multiple of module size (UPC/EAN-CC)\n" " -barcode choice: symbology, use 'zint symbology' to get a list\n" " -bind bool: bars above/below the code, size set by -border\n" " -border integer: width of a border around the symbol. Use with -bind/-box 1\n" @@ -573,7 +594,8 @@ static int Encode(Tcl_Interp *interp, int objc, int destWidth = 0; int destHeight = 0; int ECIIndex = 0; - int fFullMultiByte = 0; + int fFullMultiByte = 0; + int addon_gap = 0; int Separator = 1; /*------------------------------------------------------------------------*/ /* >> Check if at least data and object is given and a pair number of */ @@ -600,13 +622,13 @@ static int Encode(Tcl_Interp *interp, int objc, /*--------------------------------------------------------------------*/ /* Option list and indexes */ char *optionList[] = { - "-barcode", "-bg", "-bind", "-bold", "-border", "-box", "-cols", - "-dmre", "-dotsize", "-dotty", "-eci", "-fg", "-format", "-gssep", - "-height", "-init", "-mode", "-notext", "-primary", "-rotate", - "-rows", "-scale", "-secure", "-smalltext", "-square", "-to", - "-vers", "-whitesp", "-fullmultibyte", "-separator", NULL}; + "-addongap", "-barcode", "-bg", "-bind", "-bold", "-border", "-box", + "-cols", "-dmre", "-dotsize", "-dotty", "-eci", "-fg", "-format", + "-gssep", "-height", "-init", "-mode", "-notext", "-primary", + "-rotate", "-rows", "-scale", "-secure", "-smalltext", "-square", + "-to", "-vers", "-whitesp", "-fullmultibyte", "-separator", NULL}; enum iOption { - iBarcode, iBG, iBind, iBold, iBorder, iBox, iCols, + iAddonGap, iBarcode, iBG, iBind, iBold, iBorder, iBox, iCols, iDMRE, iDotSize, iDotty, iECI, iFG, iFormat, iGSSep, iHeight, iInit, iMode, iNoText, iPrimary, iRotate, iRows, iScale, iSecure, iSmallText, iSquare, iTo, iVers, @@ -664,6 +686,7 @@ static int Encode(Tcl_Interp *interp, int objc, fError = 1; } break; + case iAddonGap: case iBorder: case iCols: case iHeight: @@ -699,6 +722,15 @@ static int Encode(Tcl_Interp *interp, int objc, } /*--------------------------------------------------------------------*/ switch (optionIndex) { + case iAddonGap: + if (intValue < 7 || intValue > 12) { + Tcl_SetObjResult(interp, + Tcl_NewStringObj("Invalid add-on gap value not within 7 to 12", -1)); + fError = 1; + } else { + addon_gap = intValue; + } + break; case iBind: if (intValue) { hSymbol->output_options |= BARCODE_BIND; @@ -963,6 +995,12 @@ static int Encode(Tcl_Interp *interp, int objc, hSymbol->option_3 = Separator; } /*------------------------------------------------------------------------*/ + /* >>> option_2 is set by two values depending on the symbology */ + /* On wrong symbology, the option is ignored(as does the zint program)*/ + if (addon_gap && is_extendable(hSymbol->symbology)) { + hSymbol->option_2 = addon_gap; + } + /*------------------------------------------------------------------------*/ /* >>> Prepare input dstring and encode it to ECI encoding*/ Tcl_DStringInit(& dsInput); /*------------------------------------------------------------------------*/ @@ -1093,3 +1131,24 @@ static int is_stackable(const int symbology) { return 0; } +/* Indicates which symbols can have addon (EAN-2 and EAN-5) + * Note: if change this must also change version in backend/common.c */ +static int is_extendable(const int symbology) { + + switch (symbology) { + case BARCODE_EANX: + case BARCODE_EANX_CHK: + case BARCODE_UPCA: + case BARCODE_UPCA_CHK: + case BARCODE_UPCE: + case BARCODE_UPCE_CHK: + case BARCODE_ISBNX: + case BARCODE_EANX_CC: + case BARCODE_UPCA_CC: + case BARCODE_UPCE_CC: + return 1; + } + + return 0; +} +