mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-25 20:44:29 -04:00
Add text_length
(length of text
) to zint_symbol
, and new
`BARCODE_PLAIN_HRT` option for `output_options` - for use primarily by ZXing-C++ but may be generally useful; centralize setting of HRT using new common `hrt_cpy_nochk()` etc. routines to ensure `text_length` always set PLESSEY: add show default check characters option CODE32: ignore `option_2` (check digit options) PZN: ignore `option_2` (check digit options) except when indicates PZN7 only DPD: exclude DEL from ident tag also out_maybe_mkdir: fix `utf8_to_wide()` return (Windows only) general: replace use of `strcpy()` etc. (except for test suite) with `memcpy()`, `hrt_()` etc. in lib & `cpy_str()` etc. in CLI & `cpy_bytearray_left()` in backend_qt clang-tidy: update README reflecting above backend_tcl: use sizeof(primary) to check length; tabs -> spaces general: various code fiddling docs: pandoc 3.6.2 -> 3.6.3
This commit is contained in:
parent
ddedd00d2d
commit
fef8b083b4
82 changed files with 2873 additions and 1671 deletions
backend
|
@ -1,7 +1,7 @@
|
|||
/* bc412.c - Handles IBM BC412 (SEMI T1-95) symbology */
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2022-2024 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2022-2025 Robin Stuart <rstuart114@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -87,7 +87,6 @@ INTERNAL int bc412(struct zint_symbol *symbol, unsigned char source[], int lengt
|
|||
for (i = 2; i <= length; i++) {
|
||||
padded_source[i] = source[i - 1];
|
||||
}
|
||||
padded_source[length + 1] = 0;
|
||||
|
||||
if ((i = not_sane_lookup(BROMINE, 35, padded_source, length + 1, posns))) {
|
||||
return errtxtf(ZINT_ERROR_INVALID_DATA, symbol, 791,
|
||||
|
@ -131,7 +130,6 @@ INTERNAL int bc412(struct zint_symbol *symbol, unsigned char source[], int lengt
|
|||
d += 3;
|
||||
|
||||
expand(symbol, dest, d - dest);
|
||||
ustrcpy(symbol->text, padded_source);
|
||||
|
||||
if (symbol->output_options & COMPLIANT_HEIGHT) {
|
||||
/* SEMI T1-95 Table 1 "Module" (Character) Height 2mm ± 0.025mm, using Module Spacing 0.12mm ± 0.025mm as
|
||||
|
@ -146,6 +144,8 @@ INTERNAL int bc412(struct zint_symbol *symbol, unsigned char source[], int lengt
|
|||
(void) set_height(symbol, 0.0f, default_height, 0.0f, 1 /*no_errtxt*/);
|
||||
}
|
||||
|
||||
hrt_cpy_nochk(symbol, padded_source, length + 1);
|
||||
|
||||
return error_number;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue