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 ***
This commit is contained in:
Harald Oehlmann 2020-07-27 18:44:51 +02:00
parent 7c4ddcfc52
commit b0c30489ec
4 changed files with 120 additions and 33 deletions

36
README
View File

@ -162,7 +162,7 @@ Bugs:
- Ticket 189: FNC1 encodation fixed (FLG(0) missing after FLG(n)) - Ticket 189: FNC1 encodation fixed (FLG(0) missing after FLG(n))
- PCX format: added missing bytes_per_line if bitmap width is odd. - 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: Changes:
- Dotcode: adopt to AIM DOC Revision 4 - Dotcode: adopt to AIM DOC Revision 4
- New option "-separator=" for zint to specify the separator height of stacked - New option "-separator=" for zint to specify the separator height of stacked
@ -182,6 +182,25 @@ Changes:
- Separarator option for DATAMATRIX - Separarator option for DATAMATRIX
- parse escape sequences - parse escape sequences
- gui element reassigments - 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: Bugs:
- Ticket 185 EMF export corrections - Ticket 185 EMF export corrections
- fine scaling by the use of float arithmetic - fine scaling by the use of float arithmetic
@ -204,8 +223,8 @@ Bugs:
- Improve coding of Extended ASCII (FNC4) - Improve coding of Extended ASCII (FNC4)
- Checksum calculation overflow protection - Checksum calculation overflow protection
- EAN128 may reduce length - EAN128 may reduce length
- Check for incomplete escape sequences on data specification: "\" without following - Check for incomplete escape sequences on data specification: "\" without
character. following character.
- Code16K fixes: remove extended ASCII latch, pad character - Code16K fixes: remove extended ASCII latch, pad character
- Restructuring to have common code centralized: - Restructuring to have common code centralized:
- Code128 routines for Codablock&Code16K - Code128 routines for Codablock&Code16K
@ -213,7 +232,16 @@ Bugs:
- HIBC_39: restrict max length to 68 otherwise to avoid overrun - HIBC_39: restrict max length to 68 otherwise to avoid overrun
- Code One: protect agains overrun - Code One: protect agains overrun
- Telepen: allow DEL - 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 CONTACT US
---------- ----------

View File

@ -14,7 +14,7 @@
# so you can encode the package version directly into the source files. # 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. # Call TEA_INIT as the first TEA_ macro to set up initial vars.

View File

@ -1,2 +1,2 @@
package ifneeded zint 2.8.0\ package ifneeded zint 2.9.0\
[list load [file join $dir zint[info sharedlibextension]]] [list load [file join $dir zint[info sharedlibextension]]]

View File

@ -76,6 +76,25 @@
2020-05-19 HaO 2020-05-19 HaO
- Added option -separator to specify stacked symbology separator width - Added option -separator to specify stacked symbology separator width
- -cols maximum changed from 66 to 67 - -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) #if defined(__WIN32__) || defined(_WIN32) || defined(WIN32)
@ -115,7 +134,7 @@
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* > File option defines */ /* > File option defines */
#define VERSION "2.8.0" #define VERSION "2.9.0"
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* >>>>> Hepler defines */ /* >>>>> Hepler defines */
@ -134,6 +153,7 @@ static int Encode(Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]); Tcl_Obj *CONST objv[]);
static int is_fullmultibyte(struct zint_symbol* symbol); static int is_fullmultibyte(struct zint_symbol* symbol);
static int is_stackable(const int symbology); static int is_stackable(const int symbology);
static int is_extendable(const int symbology);
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* >>>> File Global Variables */ /* >>>> File Global Variables */
@ -141,7 +161,7 @@ static int is_stackable(const int symbology);
static char *s_code_list[] = { static char *s_code_list[] = {
"Code11", "Code11",
"Matrix2of5", "Standard2of5",
"Interleaved2of5", "Interleaved2of5",
"IATAC2of5", "IATAC2of5",
"Logic2of5", "Logic2of5",
@ -149,7 +169,7 @@ static char *s_code_list[] = {
"Code39", "Code39",
"Code39Extended", "Code39Extended",
"EAN", "EAN",
"EAN+Check", "EAN+Check",
"GS1-128", "GS1-128",
"Codabar", "Codabar",
"Code128", "Code128",
@ -164,7 +184,7 @@ static char *s_code_list[] = {
"GS1DataBarExpanded", "GS1DataBarExpanded",
"Telepen", "Telepen",
"UPC-A", "UPC-A",
"UPC-A+Check", "UPC-A+Check",
"UPC-E", "UPC-E",
"UPC-E+Check", "UPC-E+Check",
"Postnet", "Postnet",
@ -175,7 +195,7 @@ static char *s_code_list[] = {
"PZN", "PZN",
"PharmaTwo", "PharmaTwo",
"PDF417", "PDF417",
"PDF417Truncated", "PDF417Compact",
"MaxiCode", "MaxiCode",
"QR", "QR",
"Code128B", "Code128B",
@ -187,17 +207,17 @@ static char *s_code_list[] = {
"RM4SCC", "RM4SCC",
"Datamatrix", "Datamatrix",
"EAN14", "EAN14",
"VIN", "VIN",
"CodablockF", "CodablockF",
"NVE18", "NVE18",
"JapanPost", "JapanPost",
"KoreaPost", "KoreaPost",
"RSS14Stacked", "GS1DataBarStacked",
"RSS14SstackedOmni", "GS1DataBarSstackedOmni",
"RSSExpandedStacked", "GS1DataBarExpandedStacked",
"Planet", "Planet",
"MicroPDF417", "MicroPDF417",
"OneCode", "USPSIntelligentMail",
"Plessey", "Plessey",
"TelepenNum", "TelepenNum",
"ITF14", "ITF14",
@ -213,21 +233,21 @@ static char *s_code_list[] = {
"HIBC-MicroPDF", "HIBC-MicroPDF",
"HIBC-CodablockF", "HIBC-CodablockF",
"HIBCAztec", "HIBCAztec",
"DotCode", "DotCode",
"HanXin", "HanXin",
"MailMark", "MailMark",
"AztecRunes", "AztecRunes",
"Code32", "Code32",
"EAN-CC", "EAN-CC",
"EAN128-CC", "GS1-128-CC",
"RSS14-CC", "GS1DataBarOmni-CC",
"RSSLimited-CC", "GS1DataBarLimited-CC",
"RSSEXPanded-CC", "GS1DataBarExpanded-CC",
"UPCA-CC", "UPCA-CC",
"UPCE-CC", "UPCE-CC",
"RSS14Stacked-CC", "GS1DataBarStacked-CC",
"RSS14Omni-CC", "GS1DataBarStackedOmni-CC",
"RSSExpandedStacked-CC", "GS1DataBarExpandedStacked-CC",
"Channel", "Channel",
"CodeOne", "CodeOne",
"GridMatrix", "GridMatrix",
@ -392,6 +412,7 @@ static char help_message[] = "zint tcl(stub,obj) dll\n"
" data: data to encode in the symbol\n" " data: data to encode in the symbol\n"
" photo: a tcl photo image handle ('p' after 'image create photo p')\n" " photo: a tcl photo image handle ('p' after 'image create photo p')\n"
" Available options:\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" " -barcode choice: symbology, use 'zint symbology' to get a list\n"
" -bind bool: bars above/below the code, size set by -border\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" " -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 destWidth = 0;
int destHeight = 0; int destHeight = 0;
int ECIIndex = 0; int ECIIndex = 0;
int fFullMultiByte = 0; int fFullMultiByte = 0;
int addon_gap = 0;
int Separator = 1; int Separator = 1;
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
/* >> Check if at least data and object is given and a pair number of */ /* >> 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 */ /* Option list and indexes */
char *optionList[] = { char *optionList[] = {
"-barcode", "-bg", "-bind", "-bold", "-border", "-box", "-cols", "-addongap", "-barcode", "-bg", "-bind", "-bold", "-border", "-box",
"-dmre", "-dotsize", "-dotty", "-eci", "-fg", "-format", "-gssep", "-cols", "-dmre", "-dotsize", "-dotty", "-eci", "-fg", "-format",
"-height", "-init", "-mode", "-notext", "-primary", "-rotate", "-gssep", "-height", "-init", "-mode", "-notext", "-primary",
"-rows", "-scale", "-secure", "-smalltext", "-square", "-to", "-rotate", "-rows", "-scale", "-secure", "-smalltext", "-square",
"-vers", "-whitesp", "-fullmultibyte", "-separator", NULL}; "-to", "-vers", "-whitesp", "-fullmultibyte", "-separator", NULL};
enum iOption { 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, iDMRE, iDotSize, iDotty, iECI, iFG, iFormat, iGSSep, iHeight,
iInit, iMode, iNoText, iPrimary, iRotate, iRows, iInit, iMode, iNoText, iPrimary, iRotate, iRows,
iScale, iSecure, iSmallText, iSquare, iTo, iVers, iScale, iSecure, iSmallText, iSquare, iTo, iVers,
@ -664,6 +686,7 @@ static int Encode(Tcl_Interp *interp, int objc,
fError = 1; fError = 1;
} }
break; break;
case iAddonGap:
case iBorder: case iBorder:
case iCols: case iCols:
case iHeight: case iHeight:
@ -699,6 +722,15 @@ static int Encode(Tcl_Interp *interp, int objc,
} }
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
switch (optionIndex) { 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: case iBind:
if (intValue) { if (intValue) {
hSymbol->output_options |= BARCODE_BIND; hSymbol->output_options |= BARCODE_BIND;
@ -963,6 +995,12 @@ static int Encode(Tcl_Interp *interp, int objc,
hSymbol->option_3 = Separator; 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*/ /* >>> Prepare input dstring and encode it to ECI encoding*/
Tcl_DStringInit(& dsInput); Tcl_DStringInit(& dsInput);
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
@ -1093,3 +1131,24 @@ static int is_stackable(const int symbology) {
return 0; 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;
}