mirror of
https://git.code.sf.net/p/zint/code
synced 2026-01-08 04:21:59 +00:00
Audit of error codes
This commit is contained in:
@@ -57,10 +57,10 @@ int tif_pixel_plot(struct zint_symbol *symbol, char *pixelbuf) {
|
||||
int free_memory;
|
||||
int row, column;
|
||||
FILE *tif_file;
|
||||
#ifdef _MSC_VER
|
||||
uint32_t* strip_offset;
|
||||
uint32_t* strip_bytes;
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
uint32_t* strip_offset;
|
||||
uint32_t* strip_bytes;
|
||||
#endif
|
||||
|
||||
tiff_header_t header;
|
||||
tiff_ifd_t ifd;
|
||||
@@ -115,7 +115,7 @@ int tif_pixel_plot(struct zint_symbol *symbol, char *pixelbuf) {
|
||||
free(strip_offset);
|
||||
free(strip_bytes);
|
||||
#endif
|
||||
strcpy(symbol->errtxt, "Output file size too big (T00)");
|
||||
strcpy(symbol->errtxt, "670: Output file size too big");
|
||||
return ZINT_ERROR_MEMORY;
|
||||
}
|
||||
|
||||
@@ -123,14 +123,14 @@ int tif_pixel_plot(struct zint_symbol *symbol, char *pixelbuf) {
|
||||
if (symbol->output_options & BARCODE_STDOUT) {
|
||||
#ifdef _MSC_VER
|
||||
if (-1 == _setmode(_fileno(stdout), _O_BINARY)) {
|
||||
strcpy(symbol->errtxt, "Can't open output file");
|
||||
strcpy(symbol->errtxt, "671: Can't open output file");
|
||||
return ZINT_ERROR_FILE_ACCESS;
|
||||
}
|
||||
#endif
|
||||
tif_file = stdout;
|
||||
} else {
|
||||
if (!(tif_file = fopen(symbol->outfile, "wb"))) {
|
||||
strcpy(symbol->errtxt, "Can't open output file (T01)");
|
||||
strcpy(symbol->errtxt, "672: Can't open output file");
|
||||
return ZINT_ERROR_FILE_ACCESS;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user