CODEONE/DATAMATRIX/MAILMARK/PLESSEY: fix some 32-bit/portability bugs

PLESSEY: add options NCR weighted mod-10, hide check digit(s) in HRT
test suite: now runnable under MSVC 2019, 2017, 2015, MinGW/MSYS
win32/README: update with MSVC 2019 and CMake instructions
This commit is contained in:
gitlost 2021-06-10 11:15:39 +01:00
parent f471bb6e50
commit 4a8cac2a5a
63 changed files with 1189 additions and 983 deletions

View file

@ -32,6 +32,7 @@
*/
/* vim: set ts=4 sw=4 et : */
#include <errno.h>
#include <stdio.h>
#include <math.h>
#include <assert.h>
@ -333,14 +334,14 @@ INTERNAL int tif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
if (symbol->output_options & BARCODE_STDOUT) {
#ifdef _MSC_VER
if (-1 == _setmode(_fileno(stdout), _O_BINARY)) {
strcpy(symbol->errtxt, "671: Can't open output file");
sprintf(symbol->errtxt, "671: Can't open output file (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS;
}
#endif
tif_file = stdout;
} else {
if (!(tif_file = fopen(symbol->outfile, "wb+"))) {
strcpy(symbol->errtxt, "672: Can't open output file");
sprintf(symbol->errtxt, "672: Can't open output file (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS;
}
compression = TIF_LZW;