CODE128: Add minimal encodation algorithm (non-extended ASCII only)

from ZXing (props Alex Geller) - about 25-60% slower depending on
  data & stack heavy but does improve some outcomes when FNC1s
  present (GS1_MODE or manual) although not much else it appears
  (the previous algorithm was very good), but has a logical clarity
  the other lacked - funcs `c128_dxsmooth()` etc shared with
  CODE16K now moved there and renamed as `c16k_`;
  also fix extended char latching when exactly 4 extended chars
  at end
  also manual code set switching now honoured exactly even if
  immediate shift required;
manual: make explicit that AI "(00)" and "(01)" prefixes added by
  Zint are HRT-only
general: add `extern "C"` wrappers to a few header files
This commit is contained in:
gitlost 2024-09-07 12:44:16 +01:00
parent 10747d6385
commit 93c3e27fba
23 changed files with 1017 additions and 958 deletions

View file

@ -1,7 +1,7 @@
/* eci.c - Extended Channel Interpretations to Unicode tables */
/*
libzint - the open source barcode library
Copyright (C) 2009-2022 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2009-2024 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@ -35,7 +35,7 @@
#ifdef __cplusplus
extern "C" {
#endif
#endif /* __cplusplus */
INTERNAL int is_eci_convertible(const int eci);
INTERNAL int is_eci_convertible_segs(const struct zint_seg segs[], const int seg_count, int convertible[]);
@ -75,7 +75,7 @@ INTERNAL int gb18030_utf8_to_eci(const int eci, const unsigned char source[], in
#ifdef __cplusplus
}
#endif
#endif /* __cplusplus */
/* vim: set ts=4 sw=4 et : */
#endif /* Z_ECI_H */