test suite: zxing_cpp: -hints -> -opts

BWIPP: update to latest version
This commit is contained in:
gitlost 2023-12-11 12:21:31 +00:00
parent 0a6280dd80
commit 406fa0b086
2 changed files with 7 additions and 7 deletions

View file

@ -3703,7 +3703,7 @@ int testUtilCanZXingCPP(int index, const struct zint_symbol *symbol, const char
int testUtilZXingCPP(int index, struct zint_symbol *symbol, const char *source, const int length, char *bits, int testUtilZXingCPP(int index, struct zint_symbol *symbol, const char *source, const int length, char *bits,
char *buffer, const int buffer_size, int *p_cmp_len) { char *buffer, const int buffer_size, int *p_cmp_len) {
static const char cmd_fmt[] = "zxingcppdecoder -textonly -format %s -width %d -bits '%s'"; static const char cmd_fmt[] = "zxingcppdecoder -textonly -format %s -width %d -bits '%s'";
static const char hint_cmd_fmt[] = "zxingcppdecoder -textonly -format %s -hint '%s' -width %d -bits '%s'"; static const char opts_cmd_fmt[] = "zxingcppdecoder -textonly -format %s -opts '%s' -width %d -bits '%s'";
static const char cs_cmd_fmt[] = "zxingcppdecoder -textonly -format %s -charset %s -width %d -bits '%s'"; static const char cs_cmd_fmt[] = "zxingcppdecoder -textonly -format %s -charset %s -width %d -bits '%s'";
const int bits_len = (int) strlen(bits); const int bits_len = (int) strlen(bits);
@ -3713,7 +3713,7 @@ int testUtilZXingCPP(int index, struct zint_symbol *symbol, const char *source,
const char *zxingcpp_barcode = NULL; const char *zxingcpp_barcode = NULL;
const int data_mode = (symbol->input_mode & 0x07) == DATA_MODE; const int data_mode = (symbol->input_mode & 0x07) == DATA_MODE;
int set_charset = 0; int set_charset = 0;
const char *hint = NULL; const char *opts = NULL;
FILE *fp = NULL; FILE *fp = NULL;
int cnt; int cnt;
@ -3728,12 +3728,12 @@ int testUtilZXingCPP(int index, struct zint_symbol *symbol, const char *source,
if (symbology == BARCODE_EXCODE39) { if (symbology == BARCODE_EXCODE39) {
if (symbol->option_2 == 1) { if (symbol->option_2 == 1) {
hint = "tryCode39ExtendedMode,validateCode39CheckSum"; opts = "tryCode39ExtendedMode,validateCode39CheckSum";
} else { } else {
hint = "tryCode39ExtendedMode"; opts = "tryCode39ExtendedMode";
} }
} else if ((symbology == BARCODE_CODE39 || symbology == BARCODE_LOGMARS) && symbol->option_2 == 1) { } else if ((symbology == BARCODE_CODE39 || symbology == BARCODE_LOGMARS) && symbol->option_2 == 1) {
hint = "validateCode39CheckSum"; opts = "validateCode39CheckSum";
} }
if ((symbol->input_mode & 0x07) == UNICODE_MODE && symbol->eci == 0 if ((symbol->input_mode & 0x07) == UNICODE_MODE && symbol->eci == 0
@ -3754,8 +3754,8 @@ int testUtilZXingCPP(int index, struct zint_symbol *symbol, const char *source,
charset = "ISO8859_1"; charset = "ISO8859_1";
} }
sprintf(cmd, cs_cmd_fmt, zxingcpp_barcode, charset, width, bits); sprintf(cmd, cs_cmd_fmt, zxingcpp_barcode, charset, width, bits);
} else if (hint) { } else if (opts) {
sprintf(cmd, hint_cmd_fmt, zxingcpp_barcode, hint, width, bits); sprintf(cmd, opts_cmd_fmt, zxingcpp_barcode, opts, width, bits);
} else { } else {
sprintf(cmd, cmd_fmt, zxingcpp_barcode, width, bits); sprintf(cmd, cmd_fmt, zxingcpp_barcode, width, bits);
} }