raster.c: need ceilf(large_bar_height * si) to avoid zero height rows;

also improve non-half-int interpolation performance
raster/vector.c: use new stripf() func in "common.c" to workaround gcc
  32-bit float calculation variations
gs1.c: allow dummy AI "[]" if GS1NOCHECK_MODE and has data (#204);
  also add note re TPX AI 235 and terminating FNC1
Remove trailing whitespace in various files
This commit is contained in:
gitlost
2021-09-26 23:55:16 +01:00
parent 9884875fd5
commit eb6e5daa2d
18 changed files with 1255 additions and 1081 deletions

View File

@ -1127,7 +1127,7 @@ INTERNAL int ean_14(struct zint_symbol *symbol, unsigned char source[], int leng
}
/* DPD (Deutsher Paket Dienst) Code */
/* Specification at ftp://dpd.at/Datenspezifikationen/EN/gbs_V4.0.2_hauptdokument.pdf
/* Specification at ftp://dpd.at/Datenspezifikationen/EN/gbs_V4.0.2_hauptdokument.pdf
* or https://docplayer.net/33728877-Dpd-parcel-label-specification.html */
INTERNAL int dpd_parcel(struct zint_symbol *symbol, unsigned char source[], int length) {
int error_number = 0;
@ -1135,26 +1135,26 @@ INTERNAL int dpd_parcel(struct zint_symbol *symbol, unsigned char source[], int
unsigned char identifier;
const int mod = 36;
int cd; // Check digit
if (length != 28) {
strcpy(symbol->errtxt, "349: DPD input wrong length (28 characters required)");
return ZINT_ERROR_TOO_LONG;
}
identifier = source[0];
to_upper(source + 1);
error_number = is_sane(KRSET, source + 1, length - 1);
if (error_number == ZINT_ERROR_INVALID_DATA) {
strcpy(symbol->errtxt, "300: Invalid character in DPD data (alphanumerics only)");
return error_number;
}
if ((identifier < 32) || (identifier > 127)) {
strcpy(symbol->errtxt, "301: Invalid DPD identifier (first character), ASCII values 32 to 127 only");
return ZINT_ERROR_INVALID_DATA;
}
error_number = code_128(symbol, source, length); /* Only returns errors, not warnings */
if (error_number < ZINT_ERROR) {