1
0
mirror of https://git.code.sf.net/p/zint/code synced 2025-12-17 09:57:02 +00:00

Rename BARCODE_PLAIN_HRT -> BARCODE_RAW_TEXT and add warning

`ZINT_WARN_HRT_RAW_TEXT` if set when outputting HRT (ZXing-C++
  issue 883, props Axel Waggershauser)
README: Pharmacode -> One-Track, Pharmacode 2-trace -> Two-Track
This commit is contained in:
gitlost
2025-02-20 02:10:19 +00:00
parent 888b4b5684
commit 8e7931b147
55 changed files with 623 additions and 408 deletions

View File

@@ -3557,7 +3557,7 @@ with a terminating <code>NUL</code>.</td>
<tr>
<td style="text-align: left;"><code>text_length</code></td>
<td style="text-align: left;">integer</td>
<td style="text-align: left;">Length of <code>text</code>.</td>
<td style="text-align: left;">Length of <code>text</code> in bytes.</td>
<td style="text-align: left;">0 (output only)</td>
</tr>
<tr>
@@ -3692,6 +3692,12 @@ data-tag=": API Warning and Error Return Values">
</thead>
<tbody>
<tr>
<td style="text-align: left;"><code>ZINT_WARN_HRT_RAW_TEXT</code></td>
<td style="text-align: left;">The Human Readable Text returned in
<code>text</code> was outputted as raw text (<code>output_options</code>
set to <code>BARCODE_RAW_TEXT</code>).</td>
</tr>
<tr>
<td style="text-align: left;"><code>ZINT_WARN_HRT_TRUNCATED</code></td>
<td style="text-align: left;">The Human Readable Text returned in
<code>text</code> was truncated (maximum 255 bytes).</td>
@@ -3784,6 +3790,12 @@ occurs.</td>
<code>WARN_FAIL_ALL</code> and <code>ZINT_WARN_HRT_TRUNCATED</code>
occurs.</td>
</tr>
<tr>
<td style="text-align: left;"><code>ZINT_ERROR_HRT_RAW_TEXT</code></td>
<td style="text-align: left;">Returned if <code>warn_level</code> set to
<code>WARN_FAIL_ALL</code> and <code>ZINT_WARN_HRT_RAW_TEXT</code>
occurs.</td>
</tr>
</tbody>
</table>
</div>
@@ -3941,7 +3953,7 @@ available for SVG output only.</td>
file.</td>
</tr>
<tr>
<td style="text-align: left;"><code>BARCODE_PLAIN_HRT</code></td>
<td style="text-align: left;"><code>BARCODE_RAW_TEXT</code></td>
<td style="text-align: left;">Set HRT with no decoration,<a href="#fn13"
class="footnote-ref" id="fnref13" role="doc-noteref"><sup>13</sup></a>
complete with any control characters<a href="#fn14" class="footnote-ref"
@@ -9379,6 +9391,11 @@ Success (including when given informational options <code>-h</code> |
<code>-t</code> | <code>--types</code>, <code>-v</code> |
<code>--version</code>).
</dd>
<dt><code>-1</code></dt>
<dd>
Human Readable Text was outputted as raw text
(<code>ZINT_WARN_HRT_RAW_TEXT</code>)
</dd>
<dt><code>1</code></dt>
<dd>
Human Readable Text was truncated (maximum 199 bytes)
@@ -9446,6 +9463,11 @@ Error counterpart of warning if <code>--werror</code> given
Error counterpart of warning if <code>--werror</code> given
(<code>ZINT_ERROR_HRT_TRUNCATED</code>)
</dd>
<dt><code>16</code></dt>
<dd>
Error counterpart of warning if <code>--werror</code> given
(<code>ZINT_ERROR_HRT_RAW_TEXT</code>)
</dd>
</dl>
<h2 id="examples">EXAMPLES</h2>
<p>Create “out.png” (or “out.gif” if zint built without PNG support) in
@@ -9561,9 +9583,9 @@ class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn16"><p>HRT is normally not set for the postal codes Australia
Post (all variants), USPS Intelligent Mail, POSTNET and PLANET,
Brazilian CEPNet, Royal Mail 4-State Customer Code and 4-State Mailmark,
Dutch Post KIX Code, Japanese Postal Code, DAFT Code, Flattermarken and
FIM, the pharma codes Pharmacode One-Track and Pharmacode Two-Track, and
DX Film Edge Barcode.<a href="#fnref16" class="footnote-back"
Dutch Post KIX Code, Japanese Postal Code, DAFT Code and FIM, the pharma
codes Pharmacode One-Track and Pharmacode Two-Track, and DX Film Edge
Barcode and Flattermarken.<a href="#fnref16" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn17"><p><code>ZINT_CAP_EANUPC</code> was previously named
<code>ZINT_CAP_EXTENDABLE</code>, which is still recognised.<a

View File

@@ -2037,7 +2037,8 @@ Member Name Type Meaning Default Value
formatting, with a
terminating `NUL`.
`text_length` integer Length of `text`. 0 (output only)
`text_length` integer Length of `text` in 0 (output only)
bytes.
`rows` integer Number of rows used by (output only)
the symbol.
@@ -2145,6 +2146,10 @@ detailing the nature of the error. The errors generated by Zint are:
------------------------------------------------------------------------------
Return Value Meaning
----------------------------- -----------------------------------------------
`ZINT_WARN_HRT_RAW_TEXT` The Human Readable Text returned in `text` was
outputted as raw text (`output_options` set to
`BARCODE_RAW_TEXT`).
`ZINT_WARN_HRT_TRUNCATED` The Human Readable Text returned in `text` was
truncated (maximum 255 bytes).
@@ -2206,6 +2211,9 @@ Return Value Meaning
`ZINT_ERROR_HRT_TRUNCATED` Returned if `warn_level` set to `WARN_FAIL_ALL`
and `ZINT_WARN_HRT_TRUNCATED` occurs.
`ZINT_ERROR_HRT_RAW_TEXT` Returned if `warn_level` set to `WARN_FAIL_ALL`
and `ZINT_WARN_HRT_RAW_TEXT` occurs.
------------------------------------------------------------------------------
Table: {#tbl:api_warnings_errors tag=": API Warning and Error Return Values"}
@@ -2323,7 +2331,7 @@ Value Effect
`BARCODE_MEMORY_FILE` Write output to in-memory buffer `symbol->memfile`
instead of to `outfile` file.
`BARCODE_PLAIN_HRT` Set HRT with no decoration,[^13] complete with any
`BARCODE_RAW_TEXT` Set HRT with no decoration,[^13] complete with any
control characters[^14] and check characters,[^15]
and for all linear symbologies, including those
that normally don't set it.[^16]
@@ -2354,8 +2362,8 @@ representable in HRT.
[^16]: HRT is normally not set for the postal codes Australia Post (all
variants), USPS Intelligent Mail, POSTNET and PLANET, Brazilian CEPNet, Royal
Mail 4-State Customer Code and 4-State Mailmark, Dutch Post KIX Code, Japanese
Postal Code, DAFT Code, Flattermarken and FIM, the pharma codes Pharmacode
One-Track and Pharmacode Two-Track, and DX Film Edge Barcode.
Postal Code, DAFT Code and FIM, the pharma codes Pharmacode One-Track and
Pharmacode Two-Track, and DX Film Edge Barcode and Flattermarken.
## 5.11 Setting the Input Mode

View File

@@ -2053,7 +2053,7 @@ the following members:
formatting, with a
terminating NUL.
text_length integer Length of text. 0 (output only)
text_length integer Length of text in bytes. 0 (output only)
rows integer Number of rows used by the (output only)
symbol.
@@ -2146,6 +2146,10 @@ the nature of the error. The errors generated by Zint are:
------------------------------------------------------------------------------
Return Value Meaning
------------------------------ -----------------------------------------------
ZINT_WARN_HRT_RAW_TEXT The Human Readable Text returned in text was
outputted as raw text (output_options set to
BARCODE_RAW_TEXT).
ZINT_WARN_HRT_TRUNCATED The Human Readable Text returned in text was
truncated (maximum 255 bytes).
@@ -2207,6 +2211,9 @@ the nature of the error. The errors generated by Zint are:
ZINT_ERROR_HRT_TRUNCATED Returned if warn_level set to WARN_FAIL_ALL and
ZINT_WARN_HRT_TRUNCATED occurs.
ZINT_ERROR_HRT_RAW_TEXT Returned if warn_level set to WARN_FAIL_ALL and
ZINT_WARN_HRT_RAW_TEXT occurs.
------------------------------------------------------------------------------
Table : API Warning and Error Return Values
@@ -2314,7 +2321,7 @@ together when adjusting this value:
BARCODE_MEMORY_FILE Write output to in-memory buffer symbol->memfile
instead of to outfile file.
BARCODE_PLAIN_HRT Set HRT with no decoration,[13] complete with any
BARCODE_RAW_TEXT Set HRT with no decoration,[13] complete with any
control characters[14] and check characters,[15]
and for all linear symbologies, including those
that normally dont set it.[16]
@@ -5480,6 +5487,9 @@ EXIT STATUS
Success (including when given informational options -h | --help, -e |
--ecinos, -t | --types, -v | --version).
-1
Human Readable Text was outputted as raw text (ZINT_WARN_HRT_RAW_TEXT)
1
Human Readable Text was truncated (maximum 199 bytes)
(ZINT_WARN_HRT_TRUNCATED)
@@ -5526,6 +5536,9 @@ EXIT STATUS
15
Error counterpart of warning if --werror given (ZINT_ERROR_HRT_TRUNCATED)
16
Error counterpart of warning if --werror given (ZINT_ERROR_HRT_RAW_TEXT)
EXAMPLES
Create “out.png” (or “out.gif” if zint built without PNG support) in the current
@@ -5636,8 +5649,8 @@ representable in HRT.
[16] HRT is normally not set for the postal codes Australia Post (all variants),
USPS Intelligent Mail, POSTNET and PLANET, Brazilian CEPNet, Royal Mail 4-State
Customer Code and 4-State Mailmark, Dutch Post KIX Code, Japanese Postal Code,
DAFT Code, Flattermarken and FIM, the pharma codes Pharmacode One-Track and
Pharmacode Two-Track, and DX Film Edge Barcode.
DAFT Code and FIM, the pharma codes Pharmacode One-Track and Pharmacode
Two-Track, and DX Film Edge Barcode and Flattermarken.
[17] ZINT_CAP_EANUPC was previously named ZINT_CAP_EXTENDABLE, which is still
recognised.

View File

@@ -632,6 +632,10 @@ Success (including when given informational options \f[CR]\-h\f[R] |
\f[CR]\-t\f[R] | \f[CR]\-\-types\f[R], \f[CR]\-v\f[R] |
\f[CR]\-\-version\f[R]).
.TP
\f[CR]\-1\f[R]
Human Readable Text was outputted as raw text
(\f[CR]ZINT_WARN_HRT_RAW_TEXT\f[R])
.TP
\f[CR]1\f[R]
Human Readable Text was truncated (maximum 199 bytes)
(\f[CR]ZINT_WARN_HRT_TRUNCATED\f[R])
@@ -683,6 +687,10 @@ Error counterpart of warning if \f[CR]\-\-werror\f[R] given
\f[CR]15\f[R]
Error counterpart of warning if \f[CR]\-\-werror\f[R] given
(\f[CR]ZINT_ERROR_HRT_TRUNCATED\f[R])
.TP
\f[CR]16\f[R]
Error counterpart of warning if \f[CR]\-\-werror\f[R] given
(\f[CR]ZINT_ERROR_HRT_RAW_TEXT\f[R])
.SH EXAMPLES
Create \[lq]out.png\[rq] (or \[lq]out.gif\[rq] if zint built without PNG
support) in the current directory, as a Code 128 symbol.

View File

@@ -563,6 +563,9 @@ Paintbrush (`PCX`), Portable Network Format (`PNG`), Scalable Vector Graphic (`S
: Success (including when given informational options `-h` | `--help`, `-e` | `--ecinos`, `-t` | `--types`, `-v` |
`--version`).
`-1`
: Human Readable Text was outputted as raw text (`ZINT_WARN_HRT_RAW_TEXT`)
`1`
: Human Readable Text was truncated (maximum 199 bytes) (`ZINT_WARN_HRT_TRUNCATED`)
@@ -608,6 +611,9 @@ Paintbrush (`PCX`), Portable Network Format (`PNG`), Scalable Vector Graphic (`S
`15`
: Error counterpart of warning if `--werror` given (`ZINT_ERROR_HRT_TRUNCATED`)
`16`
: Error counterpart of warning if `--werror` given (`ZINT_ERROR_HRT_RAW_TEXT`)
# EXAMPLES
Create "out.png" (or "out.gif" if zint built without PNG support) in the current directory, as a Code 128 symbol.