mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-31 15:18:29 -04:00
rss.c: some fixes for separators, allow check digit, refactoring; bwipp_dump.ps
This commit is contained in:
parent
9768cd004a
commit
c1fb51ba42
33 changed files with 4451 additions and 1360 deletions
|
@ -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)" */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue