mirror of
https://git.code.sf.net/p/zint/code
synced 2026-05-14 18:13:53 +00:00
DATAMATRIX: add new options DM_B256_START and DM_C40_START to
`options_3`, allowing forcing of Base 256 or C40 mode a la BWIPP for initial no. of characters specified in `option_1`, with 0 meaning all (CLI "--dmb256=" and "--dmc40=", GUI also (apart from MAILMARK_2D, which may be added later); export masks `DM_B256_C40_START_MASK` & `DM_SQUARE_DMRE_MASK` in "zint.h" ZBarcode_Encode_File: report filename (possibly truncated) in error message on failed open GUI: uniquify some accelerators and add some child widget getter helpers to "mainwindow.cpp" backend/DEVELOPER -> backend/README, with some expansion debian/copyright: a few more fixes BWIPP/pandoc: update to latest tests/fuzz: adjust for new DATAMATRIX options
This commit is contained in:
@@ -1569,7 +1569,14 @@ int ZBarcode_Encode_File(struct zint_symbol *symbol, const char *filename) {
|
||||
file = fopen(filename, "rb");
|
||||
#endif
|
||||
if (!file) {
|
||||
ZEXT z_errtxtf(0, symbol, 229, "Unable to read input file (%1$d: %2$s)", errno, strerror(errno));
|
||||
const int len = (int) strlen(filename);
|
||||
if (len > 40) {
|
||||
ZEXT z_errtxtf(0, symbol, 233, "Unable to read input file \"%1$.10s...%2$.30s\" (%3$d: %4$s)",
|
||||
filename, filename + (len - 30), errno, strerror(errno));
|
||||
} else {
|
||||
ZEXT z_errtxtf(0, symbol, 229, "Unable to read input file \"%1$s\" (%2$d: %3$s)",
|
||||
filename, errno, strerror(errno));
|
||||
}
|
||||
return error_tag(ZINT_ERROR_INVALID_DATA, symbol, -1, NULL);
|
||||
}
|
||||
file_opened = 1;
|
||||
|
||||
Reference in New Issue
Block a user