Bugfix: Ouput binding in raster images

Also: tidy up use of output_options
This commit is contained in:
Robin Stuart 2016-08-26 15:13:40 +01:00
parent 747faf85ed
commit 3cf8a142b8
10 changed files with 52 additions and 44 deletions

View file

@ -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");