Always parse input as GS1 for EAN128 and RSS_EXP

This commit is contained in:
gitlost 2019-10-17 10:06:21 +01:00
parent b1113db942
commit 739793a215
13 changed files with 549 additions and 106 deletions

View file

@ -29,6 +29,7 @@
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
/* vim: set ts=4 sw=4 et : */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
@ -232,6 +233,11 @@ int is_extendable(const int symbology) {
return 0;
}
/* Indicates which symbols can have composite 2D component data */
int is_composite(int symbology) {
return symbology >= BARCODE_EANX_CC && symbology <= BARCODE_RSS_EXPSTACK_CC;
}
int istwodigits(const unsigned char source[], const size_t position) {
if ((source[position] >= '0') && (source[position] <= '9')) {
if ((source[position + 1] >= '0') && (source[position + 1] <= '9')) {