mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Bugfix: Ouput binding in raster images
Also: tidy up use of output_options
This commit is contained in:
@ -35,10 +35,10 @@
|
||||
#include <string.h>
|
||||
#include "common.h"
|
||||
#include "pcx.h" /* PCX header structure */
|
||||
#include <math.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include <math.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#define SSET "0123456789ABCDEF"
|
||||
@ -49,11 +49,11 @@ int pcx_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
int row, column, i, colour;
|
||||
int run_count;
|
||||
FILE *pcx_file;
|
||||
pcx_header_t header;
|
||||
#ifdef _MSC_VER
|
||||
char* rotated_bitmap;
|
||||
unsigned char* rle_row;
|
||||
#endif
|
||||
pcx_header_t header;
|
||||
#ifdef _MSC_VER
|
||||
char* rotated_bitmap;
|
||||
unsigned char* rle_row;
|
||||
#endif
|
||||
|
||||
#ifndef _MSC_VER
|
||||
char rotated_bitmap[image_height * image_width];
|
||||
@ -180,7 +180,7 @@ int pcx_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
}
|
||||
|
||||
/* Open output file in binary mode */
|
||||
if ((symbol->output_options & BARCODE_STDOUT) != 0) {
|
||||
if (symbol->output_options & BARCODE_STDOUT) {
|
||||
#ifdef _MSC_VER
|
||||
if (-1 == _setmode(_fileno(stdout), _O_BINARY)) {
|
||||
strcpy(symbol->errtxt, "Can't open output file");
|
||||
|
Reference in New Issue
Block a user