mirror of
https://git.code.sf.net/p/zint/code
synced 2026-07-31 02:19:50 +00:00
CLI: make --mirror available in standard non-batch mode via
new routines `mirror_start()`, `mirror_outfile()` & limit substitutions on Unix to backslash (Windows remains the same); restrict "borderwidth", "textgap", "vwhitesp", "whitesp" < 100 CODEONE: fix `ceilf()` -> `C1_MULT_CEIL()` in FAST_MODE encodation (improves/changes some encodation) composite: preserve `gs1_verify()` warning using `warn_level` hack; fix wrong name `zint_dbar_omnstk_set_height()` -> `zint_dbar_stk_set_height()`; use new `zint_micropdf_variant()` & `zint_micropdf_expand()` routines (see below) MICROPDF417: move variant determination into new shareable routine `zint_micropdf_variant()` & expansion into `zint_micropdf_expand()` qzint: add helper methods `setbordertypevalue()`, `encodedinputmode()`, `encodedoutputoptions()`, `ecivaluetoeciindex()` and `eciindextoecivalue()` dbar: for performance pre-calculate `combins()` as array coverage: add `malloc()`-type failure testing to AZTEC, CONTENT_SEGS, MEMORY_FILE, raster, Reed-Solomon & vector; numerous changes to remove unused code and test more branches common: add `isxdigit()` general: various code fiddlings manual: add char names to sequence and batch format char tables; mention long options can be shortened (& use "--compliantheight" -> "--compliant"); expand mirror explanation & document substitutions in footnote; workaround xecjk putting space after double quote when quoting cjk chars & rejig input mode examples; workaround html alignment bug in table gs1-enabled symbologies by adding extra rh dashes to header cols; add "figure nn: " to txt image tags via sed: various other small fixes and rephrasings
This commit is contained in:
+13
-6
@@ -142,12 +142,13 @@ typedef unsigned __int64 uint64_t;
|
||||
#define z_isfintf(arg) (fmodf(arg, 1.0f) == 0.0f)
|
||||
|
||||
/* Simple versions of <ctype.h> functions with no dependence on locale */
|
||||
#define z_isdigit(ch) ((ch) <= '9' && (ch) >= '0')
|
||||
#define z_isupper(ch) ((ch) >= 'A' && (ch) <= 'Z')
|
||||
#define z_islower(ch) ((ch) >= 'a' && (ch) <= 'z')
|
||||
#define z_isalpha(ch) (z_isupper(ch) || z_islower(ch))
|
||||
#define z_isascii(ch) (!((ch) & ~0x7F))
|
||||
#define z_iscntrl(ch) (!((ch) & ~0x1F) || (ch) == 127)
|
||||
#define z_isdigit(ch) ((ch) <= '9' && (ch) >= '0')
|
||||
#define z_isxdigit(ch) (z_isdigit(ch) || (((ch) | 0x20) >= 'a' && ((ch) | 0x20) <= 'f'))
|
||||
#define z_isupper(ch) ((ch) >= 'A' && (ch) <= 'Z')
|
||||
#define z_islower(ch) ((ch) >= 'a' && (ch) <= 'z')
|
||||
#define z_isalpha(ch) z_islower(ch | 0x20)
|
||||
#define z_isascii(ch) (!((ch) & ~0x7F))
|
||||
#define z_iscntrl(ch) (!((ch) & ~0x1F) || (ch) == 127)
|
||||
|
||||
/* Shorthands to cast away char pointer signedness */
|
||||
#define ZUCP(p) ((unsigned char *) (p))
|
||||
@@ -355,6 +356,12 @@ INTERNAL void z_hrt_printf_nochk(struct zint_symbol *symbol, const char *fmt, ..
|
||||
INTERNAL void z_hrt_conv_gs1_brackets_nochk(struct zint_symbol *symbol, const unsigned char source[],
|
||||
const int length);
|
||||
|
||||
#ifdef ZINT_TEST
|
||||
/* For testing content segment `calloc()`/`malloc()` failures */
|
||||
#define Z_CT_FAIL_ID_INIT_SEGS 1
|
||||
#define Z_CT_FAIL_ID_INIT_SEG_SRC 2
|
||||
INTERNAL void zint_test_ct_set_fail(const int id, const int at);
|
||||
#endif
|
||||
|
||||
/* Initialize `content_segs` for `seg_count` segments. On error sets `errtxt`, returning BARCODE_ERROR_MEMORY */
|
||||
INTERNAL int z_ct_init_segs(struct zint_symbol *symbol, const int seg_count);
|
||||
|
||||
Reference in New Issue
Block a user