mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
rss.c: some fixes for separators, allow check digit, refactoring; bwipp_dump.ps
This commit is contained in:
@ -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)" */
|
||||
|
Reference in New Issue
Block a user