rss.c: some fixes for separators, allow check digit, refactoring; bwipp_dump.ps

This commit is contained in:
gitlost 2020-07-10 19:39:32 +01:00
parent 9768cd004a
commit c1fb51ba42
33 changed files with 4451 additions and 1360 deletions

View file

@ -31,7 +31,6 @@
*/
/* vim: set ts=4 sw=4 et : */
#include <string.h>
#include <stdio.h>
#ifdef _MSC_VER
#include <malloc.h>
@ -69,6 +68,18 @@ static void itostr(char ai_string[], int ai_value) {
strcat(ai_string, ")");
}
/* Returns the number of times a character occurs in a string */
static int ustrchr_cnt(const unsigned char string[], const size_t length, const unsigned char c) {
int count = 0;
unsigned int i;
for (i = 0; i < length; i++) {
if (string[i] == c) {
count++;
}
}
return count;
}
INTERNAL int gs1_verify(struct zint_symbol *symbol, const unsigned char source[], const size_t src_len, char reduced[]) {
int i, j, last_ai, ai_latch;
char ai_string[7]; /* 6 char max "(NNNN)" */