mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
warnings --
This commit is contained in:
parent
414bc1c82b
commit
749d37721d
@ -65,7 +65,7 @@ int matrix_two_of_five(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
concat (dest, "41111");
|
concat (dest, "41111");
|
||||||
|
|
||||||
expand(symbol, dest);
|
expand(symbol, dest);
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ int industrial_two_of_five(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
concat (dest, "31113");
|
concat (dest, "31113");
|
||||||
|
|
||||||
expand(symbol, dest);
|
expand(symbol, dest);
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ int iata_two_of_five(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
concat (dest, "311");
|
concat (dest, "311");
|
||||||
|
|
||||||
expand(symbol, dest);
|
expand(symbol, dest);
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ int logic_two_of_five(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
concat (dest, "311");
|
concat (dest, "311");
|
||||||
|
|
||||||
expand(symbol, dest);
|
expand(symbol, dest);
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,7 +199,7 @@ int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
|
|
||||||
length = ustrlen(source);
|
length = ustrlen(source);
|
||||||
|
|
||||||
strcpy(temp, source);
|
strcpy(temp, (char*)source);
|
||||||
source[0] = '0';
|
source[0] = '0';
|
||||||
|
|
||||||
for(i = 0; i <= length; i++)
|
for(i = 0; i <= length; i++)
|
||||||
@ -234,7 +234,7 @@ int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
concat (dest, "311");
|
concat (dest, "311");
|
||||||
|
|
||||||
expand(symbol, dest);
|
expand(symbol, dest);
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return error_number;
|
return error_number;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@ int itf14(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
source[h] = itoc(check_digit);
|
source[h] = itoc(check_digit);
|
||||||
source[h + 1] = '\0';
|
source[h + 1] = '\0';
|
||||||
error_number = interleaved_two_of_five(symbol, source);
|
error_number = interleaved_two_of_five(symbol, source);
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ int dpleit(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
source[h] = itoc(check_digit);
|
source[h] = itoc(check_digit);
|
||||||
source[h + 1] = '\0';
|
source[h + 1] = '\0';
|
||||||
error_number = interleaved_two_of_five(symbol, source);
|
error_number = interleaved_two_of_five(symbol, source);
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,6 +347,6 @@ int dpident(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
source[h] = itoc(check_digit);
|
source[h] = itoc(check_digit);
|
||||||
source[h + 1] = '\0';
|
source[h + 1] = '\0';
|
||||||
error_number = interleaved_two_of_five(symbol, source);
|
error_number = interleaved_two_of_five(symbol, source);
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ int code_11(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
source[h + 1] = itoc(k_digit);
|
source[h + 1] = itoc(k_digit);
|
||||||
source[h + 2] = '\0';
|
source[h + 2] = '\0';
|
||||||
expand(symbol, dest);
|
expand(symbol, dest);
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,10 +233,10 @@ int c39(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
|
|
||||||
if(symbol->symbology == BARCODE_CODE39) {
|
if(symbol->symbology == BARCODE_CODE39) {
|
||||||
strcpy(symbol->text, "*");
|
strcpy(symbol->text, "*");
|
||||||
concat(symbol->text, source);
|
concat(symbol->text, (char*)source);
|
||||||
concat(symbol->text, "*");
|
concat(symbol->text, "*");
|
||||||
} else {
|
} else {
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
}
|
}
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
@ -277,7 +277,7 @@ int pharmazentral(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
source[h + 1] = itoc(check_digit);
|
source[h + 1] = itoc(check_digit);
|
||||||
source[h + 2] = '\0';
|
source[h + 2] = '\0';
|
||||||
error_number = c39(symbol, source);
|
error_number = c39(symbol, source);
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,12 +287,12 @@ int pharmazentral(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
int ec39(struct zint_symbol *symbol, unsigned char source[])
|
int ec39(struct zint_symbol *symbol, unsigned char source[])
|
||||||
{ /* Extended Code 39 - ISO/IEC 16388:2007 Annex A */
|
{ /* Extended Code 39 - ISO/IEC 16388:2007 Annex A */
|
||||||
|
|
||||||
char buffer[100];
|
unsigned char buffer[100];
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
strcpy(buffer, "");
|
|
||||||
int ascii_value;
|
int ascii_value;
|
||||||
int error_number;
|
int error_number;
|
||||||
|
|
||||||
|
memset(buffer,0,100);
|
||||||
error_number = 0;
|
error_number = 0;
|
||||||
|
|
||||||
if(ustrlen(source) > 45) {
|
if(ustrlen(source) > 45) {
|
||||||
@ -315,13 +315,13 @@ int ec39(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
/* Creates a buffer string and places control characters into it */
|
/* Creates a buffer string and places control characters into it */
|
||||||
for(i = 0; i < ustrlen(source); i++) {
|
for(i = 0; i < ustrlen(source); i++) {
|
||||||
ascii_value = source[i];
|
ascii_value = source[i];
|
||||||
concat(buffer, EC39Ctrl[ascii_value]);
|
concat((char*)buffer, EC39Ctrl[ascii_value]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Then sends the buffer to the C39 function */
|
/* Then sends the buffer to the C39 function */
|
||||||
error_number = c39(symbol, buffer);
|
error_number = c39(symbol, buffer);
|
||||||
|
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,6 +434,6 @@ int c93(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
source[h + 1] = set_copy[k];
|
source[h + 1] = set_copy[k];
|
||||||
source[h + 2] = '\0';
|
source[h + 2] = '\0';
|
||||||
expand(symbol, dest);
|
expand(symbol, dest);
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
@ -566,7 +566,7 @@ int code_128(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
/* Stop character */
|
/* Stop character */
|
||||||
concat(dest, C128Table[106]);
|
concat(dest, C128Table[106]);
|
||||||
expand(symbol, dest);
|
expand(symbol, dest);
|
||||||
strcpy(symbol->text, source);
|
strcpy(symbol->text, (char*)source);
|
||||||
return errornum;
|
return errornum;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -904,9 +904,9 @@ int ean_14(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
/* EAN-14 - A version of EAN-128 */
|
/* EAN-14 - A version of EAN-128 */
|
||||||
int input_length, i, count, check_digit;
|
int input_length, i, count, check_digit;
|
||||||
int error_number;
|
int error_number;
|
||||||
char ean128_equiv[20];
|
unsigned char ean128_equiv[20];
|
||||||
|
|
||||||
strcpy(ean128_equiv, "");
|
memset(ean128_equiv, 0, 20);
|
||||||
input_length = ustrlen(source);
|
input_length = ustrlen(source);
|
||||||
|
|
||||||
if(input_length != 13) {
|
if(input_length != 13) {
|
||||||
@ -919,8 +919,8 @@ int ean_14(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
strcpy(symbol->errtxt, "error: invalid character in data");
|
strcpy(symbol->errtxt, "error: invalid character in data");
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
concat(ean128_equiv, "[01]");
|
concat((char*)ean128_equiv, "[01]");
|
||||||
concat(ean128_equiv, source);
|
concat((char*)ean128_equiv, (char*)source);
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
for (i = input_length - 1; i >= 0; i--)
|
for (i = input_length - 1; i >= 0; i--)
|
||||||
|
@ -110,7 +110,7 @@ extern int daft_code(struct zint_symbol *symbol, unsigned char source[]); /* DAF
|
|||||||
extern int ean_14(struct zint_symbol *symbol, unsigned char source[]); /* EAN-14 */
|
extern int ean_14(struct zint_symbol *symbol, unsigned char source[]); /* EAN-14 */
|
||||||
|
|
||||||
#ifndef NO_PNG
|
#ifndef NO_PNG
|
||||||
extern int png_plot(struct zint_symbol *symbol);
|
int png_handle(struct zint_symbol *symbol, int rotate_angle);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int ps_plot(struct zint_symbol *symbol);
|
extern int ps_plot(struct zint_symbol *symbol);
|
||||||
@ -256,7 +256,7 @@ int ZBarcode_Print(struct zint_symbol *symbol)
|
|||||||
output[1] = symbol->outfile[strlen(symbol->outfile) - 2];
|
output[1] = symbol->outfile[strlen(symbol->outfile) - 2];
|
||||||
output[2] = symbol->outfile[strlen(symbol->outfile) - 1];
|
output[2] = symbol->outfile[strlen(symbol->outfile) - 1];
|
||||||
output[3] = '\0';
|
output[3] = '\0';
|
||||||
to_upper(output);
|
to_upper((unsigned char*)output);
|
||||||
#ifndef NO_PNG
|
#ifndef NO_PNG
|
||||||
if(!(strcmp(output, "PNG"))) {
|
if(!(strcmp(output, "PNG"))) {
|
||||||
error_number = png_handle(symbol, 0);
|
error_number = png_handle(symbol, 0);
|
||||||
@ -289,7 +289,7 @@ int ZBarcode_Print_Rotated(struct zint_symbol *symbol, int rotate_angle)
|
|||||||
output[1] = symbol->outfile[strlen(symbol->outfile) - 2];
|
output[1] = symbol->outfile[strlen(symbol->outfile) - 2];
|
||||||
output[2] = symbol->outfile[strlen(symbol->outfile) - 1];
|
output[2] = symbol->outfile[strlen(symbol->outfile) - 1];
|
||||||
output[3] = '\0';
|
output[3] = '\0';
|
||||||
to_upper(output);
|
to_upper((unsigned char*)output);
|
||||||
#ifndef NO_PNG
|
#ifndef NO_PNG
|
||||||
if(!(strcmp(output, "PNG"))) {
|
if(!(strcmp(output, "PNG"))) {
|
||||||
error_number = png_handle(symbol, rotate_angle);
|
error_number = png_handle(symbol, rotate_angle);
|
||||||
|
Loading…
Reference in New Issue
Block a user