mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-09 13:41:59 -04:00
CODE128: optimize for extended ASCII as well using techniques from
BWIPP minimal encoding by Bue Jensen (BWIPP PR #278); new extra escape `\^@` to turn off manual switching zint.h: increase `symbol->text` size 200 -> 256 (means that for the moment can no longer generate ZINT_WARN_HRT_TRUNCATED) GS1_128/GS1_128_CC: warn if READER_INIT option used CODE16K: move `c16k_set_a/b/c()` routines from "code128.c" and rename `c16k_` (also `C128_` defines to `C16K_`) common: make `itoc()` simple macro which adds '0' (>= 10 now ':', ';' etc) and adjust `expand()` accordingly for slight speed-up general: EXTRA_ESCAPE_MODE now implies ESCAPE_MODE tests: update BWIPP to latest and enable CODE128AB ("suppressc"); new test args '-n' (exclude func) and '-m' (match func)
This commit is contained in:
parent
c9909d3d91
commit
86b6a0553b
23 changed files with 1113 additions and 1017 deletions
|
@ -350,14 +350,6 @@ static int validate_float(const char source[], const int allow_neg, float *p_val
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* Converts an integer value to its hexadecimal character */
|
||||
static char itoc(const int source) {
|
||||
if ((source >= 0) && (source <= 9)) {
|
||||
return ('0' + source);
|
||||
}
|
||||
return ('A' - 10 + source);
|
||||
}
|
||||
|
||||
/* Converts upper case characters to lower case in a string source[] */
|
||||
static void to_lower(char source[]) {
|
||||
int i;
|
||||
|
@ -970,7 +962,7 @@ static int batch_process(struct zint_symbol *symbol, const char *filename, const
|
|||
memset(reversed_string, 0, sizeof(reversed_string));
|
||||
memset(output_file, 0, sizeof(output_file));
|
||||
do {
|
||||
number[inpos] = itoc(local_line_count % 10);
|
||||
number[inpos] = (local_line_count % 10) + '0';
|
||||
local_line_count /= 10;
|
||||
inpos++;
|
||||
} while (local_line_count > 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue