mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-16 08:04:36 -04:00
Add verbose mode to output debug info without recompiling
This commit is contained in:
parent
5acbffff0d
commit
6f4610aa98
11 changed files with 26 additions and 22 deletions
12
backend/qr.c
12
backend/qr.c
|
@ -197,8 +197,8 @@ static void qr_bscan(char *binary, int data, int h) {
|
|||
}
|
||||
|
||||
/* Convert input data to a binary stream and add padding */
|
||||
void qr_binary(int datastream[], int version, int target_binlen, char mode[], int jisdata[], int length, int gs1, int eci, int est_binlen) {
|
||||
int position = 0, debug = 0;
|
||||
void qr_binary(int datastream[], int version, int target_binlen, char mode[], int jisdata[], int length, int gs1, int eci, int est_binlen, int debug) {
|
||||
int position = 0;
|
||||
int short_data_block_length, i, scheme = 1;
|
||||
char data_block, padbits;
|
||||
int current_binlen, current_bytes;
|
||||
|
@ -1672,7 +1672,7 @@ int qr_code(struct zint_symbol *symbol, const unsigned char source[], int length
|
|||
fullstream = (int *) _alloca((qr_total_codewords[version - 1] + 1) * sizeof (int));
|
||||
#endif
|
||||
|
||||
qr_binary(datastream, version, target_binlen, mode, jisdata, length, gs1, symbol->eci, est_binlen);
|
||||
qr_binary(datastream, version, target_binlen, mode, jisdata, length, gs1, symbol->eci, est_binlen, symbol->debug);
|
||||
add_ecc(fullstream, datastream, version, target_binlen, blocks);
|
||||
|
||||
size = qr_sizes[version - 1];
|
||||
|
@ -1718,10 +1718,10 @@ int qr_code(struct zint_symbol *symbol, const unsigned char source[], int length
|
|||
|
||||
/* NOTE: From this point forward concerns Micro QR Code only */
|
||||
|
||||
int micro_qr_intermediate(char binary[], int jisdata[], char mode[], int length, int *kanji_used, int *alphanum_used, int *byte_used) {
|
||||
int micro_qr_intermediate(char binary[], int jisdata[], char mode[], int length, int *kanji_used, int *alphanum_used, int *byte_used, int debug) {
|
||||
/* Convert input data to an "intermediate stage" where data is binary encoded but
|
||||
control information is not */
|
||||
int position = 0, debug = 0;
|
||||
int position = 0;
|
||||
int short_data_block_length, i;
|
||||
char data_block;
|
||||
char buffer[2];
|
||||
|
@ -2707,7 +2707,7 @@ int microqr(struct zint_symbol *symbol, const unsigned char source[], int length
|
|||
}
|
||||
}
|
||||
|
||||
error_number = micro_qr_intermediate(binary_stream, jisdata, mode, length, &kanji_used, &alphanum_used, &byte_used);
|
||||
error_number = micro_qr_intermediate(binary_stream, jisdata, mode, length, &kanji_used, &alphanum_used, &byte_used, symbol->debug);
|
||||
if (error_number != 0) {
|
||||
strcpy(symbol->errtxt, "Input data too long (E64)");
|
||||
return error_number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue