mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
CLI/Tcl: fix version check (need <= 999 for DAFT permille)
UPNQR: fix required binary mode using mode_preset UPNQR: allow mask to be manually specified GUI: use non-native QColorDialog on Unix also; no noEXE for CLI equivalent; add shortcuts for copy-to-clipboard and CLI equivalent CLI: new --version option to print Zint version
This commit is contained in:
@ -32,6 +32,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include "common.h"
|
||||
#include "output.h"
|
||||
#include "font.h"
|
||||
@ -44,11 +45,11 @@ INTERNAL int out_check_colour_options(struct zint_symbol *symbol) {
|
||||
int bg_len = (int) strlen(symbol->bgcolour);
|
||||
|
||||
if ((fg_len != 6) && (fg_len != 8)) {
|
||||
strcpy(symbol->errtxt, "651: Malformed foreground colour target");
|
||||
strcpy(symbol->errtxt, "651: Malformed foreground colour (6 or 8 characters only)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if ((bg_len != 6) && (bg_len != 8)) {
|
||||
strcpy(symbol->errtxt, "652: Malformed background colour target");
|
||||
strcpy(symbol->errtxt, "652: Malformed background colour (6 or 8 characters only)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
@ -56,12 +57,12 @@ INTERNAL int out_check_colour_options(struct zint_symbol *symbol) {
|
||||
to_upper((unsigned char *) symbol->bgcolour, bg_len);
|
||||
|
||||
if (!is_sane(SSET_F, (unsigned char *) symbol->fgcolour, fg_len)) {
|
||||
strcpy(symbol->errtxt, "653: Malformed foreground colour target");
|
||||
sprintf(symbol->errtxt, "653: Malformed foreground colour '%s' (hexadecimal only)", symbol->fgcolour);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
if (!is_sane(SSET_F, (unsigned char *) symbol->bgcolour, bg_len)) {
|
||||
strcpy(symbol->errtxt, "654: Malformed background colour target");
|
||||
sprintf(symbol->errtxt, "654: Malformed background colour '%s' (hexadecimal only)", symbol->bgcolour);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user