mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
warnings --
This commit is contained in:
parent
749d37721d
commit
a4dd78018d
@ -32,6 +32,8 @@ static char *CodaTable[20] = {"11111221", "11112211", "11121121", "22111111", "1
|
||||
"12111121", "12112111", "12211111", "21121111", "11122111", "11221111", "21112121", "21211121",
|
||||
"21212111", "11212121", "11221211", "12121121", "11121221", "11122211"};
|
||||
|
||||
int c39(struct zint_symbol *symbol, unsigned char source[]);
|
||||
|
||||
int pharma_one(struct zint_symbol *symbol, unsigned char source[])
|
||||
{
|
||||
/* "Pharmacode can represent only a single integer from 3 to 131070. Unlike other
|
||||
@ -66,7 +68,7 @@ int pharma_one(struct zint_symbol *symbol, unsigned char source[])
|
||||
}
|
||||
|
||||
strcpy(inter, "");
|
||||
tester = atoi(source);
|
||||
tester = atoi((char*)source);
|
||||
|
||||
if((tester < 3) || (tester > 131070)) {
|
||||
strcpy(symbol->errtxt, "error: data out of range");
|
||||
@ -114,7 +116,7 @@ int pharma_two_calc(struct zint_symbol *symbol, unsigned char source[], char des
|
||||
strcpy(dest, "");
|
||||
|
||||
strcpy(inter, "");
|
||||
tester = atoi(source);
|
||||
tester = atoi((char*)source);
|
||||
|
||||
if((tester < 4) || (tester > 64570080))
|
||||
{
|
||||
@ -233,7 +235,7 @@ int codabar(struct zint_symbol *symbol, unsigned char source[])
|
||||
}
|
||||
|
||||
expand(symbol, dest);
|
||||
strcpy(symbol->text, source);
|
||||
strcpy(symbol->text, (char*)source);
|
||||
return error_number;
|
||||
}
|
||||
|
||||
@ -262,7 +264,7 @@ int code32(struct zint_symbol *symbol, unsigned char source[])
|
||||
for(i = 0; i < zeroes; i++) {
|
||||
concat(localstr, "0");
|
||||
}
|
||||
concat(localstr, source);
|
||||
concat(localstr, (char*)source);
|
||||
|
||||
/* Calculate the check digit */
|
||||
checksum = 0;
|
||||
@ -309,7 +311,7 @@ int code32(struct zint_symbol *symbol, unsigned char source[])
|
||||
}
|
||||
|
||||
/* Plot the barcode using Code 39 */
|
||||
error_number = c39(symbol, risultante);
|
||||
error_number = c39(symbol, (unsigned char*)risultante);
|
||||
if(error_number != 0) { return error_number; }
|
||||
|
||||
/* Override the normal text output with the Pharmacode number */
|
||||
|
@ -93,7 +93,7 @@ int plessey(struct zint_symbol *symbol, unsigned char source[])
|
||||
concat(dest, "331311313");
|
||||
|
||||
expand(symbol, dest);
|
||||
strcpy(symbol->text, source);
|
||||
strcpy(symbol->text, (char*)source);
|
||||
return error_number;
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ int msi_plessey(struct zint_symbol *symbol, unsigned char source[])
|
||||
concat (dest, "121");
|
||||
|
||||
expand(symbol, dest);
|
||||
strcpy(symbol->text, source);
|
||||
strcpy(symbol->text, (char*)source);
|
||||
return error_number;
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ int msi_plessey_mod10(struct zint_symbol *symbol, unsigned char source[])
|
||||
source[h] = itoc(pump);
|
||||
source[h + 1] = '\0';
|
||||
expand(symbol, dest);
|
||||
strcpy(symbol->text, source);
|
||||
strcpy(symbol->text, (char*)source);
|
||||
return error_number;
|
||||
}
|
||||
|
||||
@ -382,7 +382,7 @@ int msi_plessey_mod1010(struct zint_symbol *symbol, unsigned char source[])
|
||||
source[h + 1] = itoc(chwech);
|
||||
source[h + 2] = '\0';
|
||||
expand(symbol, dest);
|
||||
strcpy(symbol->text, source);
|
||||
strcpy(symbol->text, (char*)source);
|
||||
return error_number;
|
||||
}
|
||||
|
||||
@ -452,7 +452,7 @@ int msi_plessey_mod11(struct zint_symbol *symbol, unsigned char source[])
|
||||
concat (dest, "121");
|
||||
|
||||
expand(symbol, dest);
|
||||
strcpy(symbol->text, source);
|
||||
strcpy(symbol->text, (char*)source);
|
||||
return error_number;
|
||||
}
|
||||
|
||||
@ -578,13 +578,15 @@ int msi_plessey_mod1110(struct zint_symbol *symbol, unsigned char source[])
|
||||
source[h + 1] = '\0';
|
||||
|
||||
expand(symbol, dest);
|
||||
strcpy(symbol->text, source);
|
||||
strcpy(symbol->text, (char*)source);
|
||||
return error_number;
|
||||
}
|
||||
|
||||
int msi_handle(struct zint_symbol *symbol, unsigned char source[]) {
|
||||
int error_number;
|
||||
|
||||
error_number=0;
|
||||
|
||||
if((symbol->option_2 < 0) || (symbol->option_2 > 4)) {
|
||||
symbol->option_2 = 0;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ int telepen(struct zint_symbol *symbol, unsigned char source[])
|
||||
concat(dest, TeleTable['z']);
|
||||
|
||||
expand(symbol, dest);
|
||||
strcpy(symbol->text, source);
|
||||
strcpy(symbol->text, (char*)source);
|
||||
return error_number;
|
||||
}
|
||||
|
||||
@ -99,12 +99,13 @@ int telepen_num(struct zint_symbol *symbol, unsigned char source[])
|
||||
{
|
||||
unsigned int i, count, check_digit, glyph;
|
||||
int error_number, input_length;
|
||||
char dest[1000];
|
||||
char local_source[100];
|
||||
unsigned char dest[1000];
|
||||
unsigned char local_source[100];
|
||||
|
||||
error_number = 0;
|
||||
strcpy(dest, "");
|
||||
strcpy(local_source, source);
|
||||
memset(dest, 0, 1000);
|
||||
memset(local_source, 0, 100);
|
||||
strcpy((char*)local_source, (char*)source);
|
||||
input_length = ustrlen(source);
|
||||
|
||||
count = 0;
|
||||
@ -125,7 +126,7 @@ int telepen_num(struct zint_symbol *symbol, unsigned char source[])
|
||||
{
|
||||
char temp[200];
|
||||
|
||||
strcpy(temp, local_source);
|
||||
strcpy(temp, (char*)local_source);
|
||||
local_source[0] = '0';
|
||||
|
||||
for(i = 0; i <= input_length; i++)
|
||||
@ -136,7 +137,7 @@ int telepen_num(struct zint_symbol *symbol, unsigned char source[])
|
||||
}
|
||||
|
||||
/* Start character */
|
||||
concat(dest, TeleTable['_']);
|
||||
concat((char*)dest, TeleTable['_']);
|
||||
|
||||
for (i=0; i < input_length; i+=2)
|
||||
{
|
||||
@ -153,17 +154,17 @@ int telepen_num(struct zint_symbol *symbol, unsigned char source[])
|
||||
glyph += 27;
|
||||
count += glyph;
|
||||
}
|
||||
concat(dest, TeleTable[glyph]);
|
||||
concat((char*)dest, TeleTable[glyph]);
|
||||
}
|
||||
|
||||
check_digit = 127 - (count % 127);
|
||||
concat(dest, TeleTable[check_digit]);
|
||||
concat((char*)dest, TeleTable[check_digit]);
|
||||
|
||||
/* Stop character */
|
||||
concat(dest, TeleTable['z']);
|
||||
concat((char*)dest, TeleTable['z']);
|
||||
|
||||
expand(symbol, dest);
|
||||
strcpy(symbol->text, local_source);
|
||||
expand(symbol, (char*)dest);
|
||||
strcpy(symbol->text, (char*)local_source);
|
||||
return error_number;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user