mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
modifications for VS2015, some
additional static/const's and a few bugfixes for HanXin and DotStream. Patch by Michael <virtual_worlds@gmx.de>
This commit is contained in:
parent
8d3abf8440
commit
2c2200a7cb
@ -84,7 +84,7 @@ int matrix_two_of_five(struct zint_symbol *symbol, unsigned char source[], int l
|
||||
}
|
||||
|
||||
/* Stop character */
|
||||
strcat(dest, "41111");
|
||||
strcat(dest, "41111");
|
||||
|
||||
expand(symbol, dest);
|
||||
ustrcpy(symbol->text, source);
|
||||
@ -117,7 +117,7 @@ int industrial_two_of_five(struct zint_symbol *symbol, unsigned char source[], i
|
||||
}
|
||||
|
||||
/* Stop character */
|
||||
strcat(dest, "31113");
|
||||
strcat(dest, "31113");
|
||||
|
||||
expand(symbol, dest);
|
||||
ustrcpy(symbol->text, source);
|
||||
@ -149,7 +149,7 @@ int iata_two_of_five(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
}
|
||||
|
||||
/* stop */
|
||||
strcat(dest, "311");
|
||||
strcat(dest, "311");
|
||||
|
||||
expand(symbol, dest);
|
||||
ustrcpy(symbol->text, source);
|
||||
@ -182,7 +182,7 @@ int logic_two_of_five(struct zint_symbol *symbol, unsigned char source[], int le
|
||||
}
|
||||
|
||||
/* Stop character */
|
||||
strcat(dest, "311");
|
||||
strcat(dest, "311");
|
||||
|
||||
expand(symbol, dest);
|
||||
ustrcpy(symbol->text, source);
|
||||
@ -190,7 +190,7 @@ int logic_two_of_five(struct zint_symbol *symbol, unsigned char source[], int le
|
||||
}
|
||||
|
||||
/* Code 2 of 5 Interleaved */
|
||||
int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
int interleaved_two_of_five(struct zint_symbol *symbol, const unsigned char source[], size_t length) {
|
||||
|
||||
int i, j, k, error_number;
|
||||
char bars[7], spaces[7], mixed[14], dest[1000];
|
||||
@ -219,7 +219,7 @@ int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[],
|
||||
ustrcpy(temp, (unsigned char *) "0");
|
||||
length++;
|
||||
}
|
||||
strcat((char*)temp, (char*)source);
|
||||
strcat((char*) temp, (char*) source);
|
||||
|
||||
/* start character */
|
||||
strcpy(dest, "1111");
|
||||
@ -240,11 +240,11 @@ int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[],
|
||||
k++;
|
||||
}
|
||||
mixed[k] = '\0';
|
||||
strcat(dest, mixed);
|
||||
strcat(dest, mixed);
|
||||
}
|
||||
|
||||
/* Stop character */
|
||||
strcat(dest, "311");
|
||||
strcat(dest, "311");
|
||||
|
||||
expand(symbol, dest);
|
||||
ustrcpy(symbol->text, temp);
|
||||
|
@ -106,7 +106,8 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
3 = Tracker only */
|
||||
int error_number, zeroes;
|
||||
int writer;
|
||||
unsigned int loopey, reader, h;
|
||||
unsigned int loopey, reader;
|
||||
size_t h;
|
||||
|
||||
char data_pattern[200];
|
||||
char fcc[3] = {0, 0, 0}, dpid[10];
|
||||
|
@ -40,10 +40,12 @@
|
||||
#include "aztec.h"
|
||||
#include "reedsol.h"
|
||||
|
||||
static int AztecMap[22801];
|
||||
|
||||
/**
|
||||
* Shorten the string by one character
|
||||
*/
|
||||
void mapshorten(int *charmap, int *typemap, int start, int length) {
|
||||
static void mapshorten(int *charmap, int *typemap, const int start, const int length) {
|
||||
memmove(charmap + start + 1, charmap + start + 2, (length - 1) * sizeof (int));
|
||||
memmove(typemap + start + 1, typemap + start + 2, (length - 1) * sizeof (int));
|
||||
}
|
||||
@ -51,7 +53,7 @@ void mapshorten(int *charmap, int *typemap, int start, int length) {
|
||||
/**
|
||||
* Insert a character into the middle of a string at position posn
|
||||
*/
|
||||
void insert(char binary_string[], int posn, char newbit) {
|
||||
static void insert(char binary_string[], const size_t posn, const char newbit) {
|
||||
size_t i, end;
|
||||
|
||||
end = strlen(binary_string);
|
||||
@ -64,7 +66,7 @@ void insert(char binary_string[], int posn, char newbit) {
|
||||
/**
|
||||
* Encode input data into a binary string
|
||||
*/
|
||||
int aztec_text_process(unsigned char source[], const unsigned int src_len, char binary_string[], int gs1, int eci) {
|
||||
static int aztec_text_process(const unsigned char source[], const unsigned int src_len, char binary_string[], const int gs1, const int eci) {
|
||||
int i, j, k, p, bytes;
|
||||
int curtable, newtable, lasttable, chartype, maplength, blocks, debug;
|
||||
#ifndef _MSC_VER
|
||||
@ -723,10 +725,8 @@ int aztec_text_process(unsigned char source[], const unsigned int src_len, char
|
||||
}
|
||||
|
||||
/* Prevent data from obscuring reference grid */
|
||||
int avoidReferenceGrid(int input) {
|
||||
int output;
|
||||
static int avoidReferenceGrid(int output) {
|
||||
|
||||
output = input;
|
||||
if (output > 10) {
|
||||
output++;
|
||||
}
|
||||
@ -759,7 +759,7 @@ int avoidReferenceGrid(int input) {
|
||||
}
|
||||
|
||||
/* Calculate the position of the bits in the grid */
|
||||
void populate_map() {
|
||||
static void populate_map() {
|
||||
int layer, start, length, n, i;
|
||||
int x, y;
|
||||
|
||||
@ -930,7 +930,7 @@ int aztec(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
ecc_level = 2;
|
||||
}
|
||||
|
||||
data_length = strlen(binary_string);
|
||||
data_length = (int) strlen(binary_string);
|
||||
|
||||
layers = 0; /* Keep compiler happy! */
|
||||
data_maxsize = 0; /* Keep compiler happy! */
|
||||
@ -1059,7 +1059,7 @@ int aztec(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
i++;
|
||||
} while (i <= (data_length + 1));
|
||||
adjusted_string[j] = '\0';
|
||||
adjusted_length = strlen(adjusted_string);
|
||||
adjusted_length = (int) strlen(adjusted_string);
|
||||
adjustment_size = adjusted_length - data_length;
|
||||
|
||||
/* Add padding */
|
||||
@ -1073,7 +1073,7 @@ int aztec(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
for (i = 0; i < padbits; i++) {
|
||||
strcat(adjusted_string, "1");
|
||||
}
|
||||
adjusted_length = strlen(adjusted_string);
|
||||
adjusted_length = (int) strlen(adjusted_string);
|
||||
|
||||
count = 0;
|
||||
for (i = (adjusted_length - codeword_size); i < adjusted_length; i++) {
|
||||
@ -1167,7 +1167,7 @@ int aztec(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
i++;
|
||||
} while (i <= (data_length + 1));
|
||||
adjusted_string[j] = '\0';
|
||||
adjusted_length = strlen(adjusted_string);
|
||||
adjusted_length = (int) strlen(adjusted_string);
|
||||
|
||||
remainder = adjusted_length % codeword_size;
|
||||
|
||||
@ -1179,7 +1179,7 @@ int aztec(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
for (i = 0; i < padbits; i++) {
|
||||
strcat(adjusted_string, "1");
|
||||
}
|
||||
adjusted_length = strlen(adjusted_string);
|
||||
adjusted_length = (int) strlen(adjusted_string);
|
||||
|
||||
count = 0;
|
||||
for (i = (adjusted_length - codeword_size); i < adjusted_length; i++) {
|
||||
|
@ -37,8 +37,6 @@
|
||||
#define DIGIT 16
|
||||
#define BINARY 32
|
||||
|
||||
static int AztecMap[22801];
|
||||
|
||||
static const int CompactAztecMap[] = {
|
||||
/* 27 x 27 data grid */
|
||||
609, 608, 411, 413, 415, 417, 419, 421, 423, 425, 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459,
|
||||
|
@ -69,7 +69,7 @@ int bmp_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
if (symbol->bitmap != NULL)
|
||||
free(symbol->bitmap);
|
||||
|
||||
row_size = 4 * floor((24 * symbol->bitmap_width + 31) / 32);
|
||||
row_size = 4 * floor((24.0 * symbol->bitmap_width + 31) / 32);
|
||||
symbol->bitmap = (char *) malloc(row_size * symbol->bitmap_height);
|
||||
|
||||
/* sort out colour options */
|
||||
@ -190,12 +190,12 @@ int bmp_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
data_size = symbol->bitmap_height * row_size;
|
||||
symbol->bitmap_byte_length = data_size;
|
||||
|
||||
file_header.header_field = 0x4d42; // "BM"
|
||||
file_header.file_size = sizeof(bitmap_file_header_t) + sizeof(bitmap_info_header_t) + data_size;
|
||||
file_header.header_field = 0x4d42; // "BM"
|
||||
file_header.file_size = sizeof (bitmap_file_header_t) + sizeof (bitmap_info_header_t) + data_size;
|
||||
file_header.reserved = 0;
|
||||
file_header.data_offset = sizeof(bitmap_file_header_t) + sizeof(bitmap_info_header_t);
|
||||
file_header.data_offset = sizeof (bitmap_file_header_t) + sizeof (bitmap_info_header_t);
|
||||
|
||||
info_header.header_size = sizeof(bitmap_info_header_t);
|
||||
info_header.header_size = sizeof (bitmap_info_header_t);
|
||||
info_header.width = symbol->bitmap_width;
|
||||
info_header.height = symbol->bitmap_height;
|
||||
info_header.colour_planes = 1;
|
||||
@ -207,14 +207,14 @@ int bmp_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
info_header.colours = 0;
|
||||
info_header.important_colours = 0;
|
||||
|
||||
bitmap_file_start = (unsigned char*)malloc(file_header.file_size);
|
||||
bitmap_file_start = (unsigned char*) malloc(file_header.file_size);
|
||||
memset(bitmap_file_start, 0xff, file_header.file_size);
|
||||
|
||||
bmp_posn = bitmap_file_start;
|
||||
memcpy( bitmap_file_start, &file_header, sizeof(bitmap_file_header_t));
|
||||
bmp_posn += sizeof(bitmap_file_header_t);
|
||||
memcpy(bmp_posn, &info_header, sizeof(bitmap_info_header_t) );
|
||||
bmp_posn += sizeof(bitmap_info_header_t);
|
||||
memcpy(bitmap_file_start, &file_header, sizeof (bitmap_file_header_t));
|
||||
bmp_posn += sizeof (bitmap_file_header_t);
|
||||
memcpy(bmp_posn, &info_header, sizeof (bitmap_info_header_t));
|
||||
bmp_posn += sizeof (bitmap_info_header_t);
|
||||
memcpy(bmp_posn, symbol->bitmap, data_size);
|
||||
|
||||
/* Open output file in binary mode */
|
||||
|
@ -50,9 +50,9 @@ extern "C" {
|
||||
uint32_t data_offset;
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
__attribute__((__packed__ ))
|
||||
__attribute__((__packed__))
|
||||
#endif
|
||||
bitmap_file_header_t;
|
||||
bitmap_file_header_t;
|
||||
|
||||
typedef struct bitmap_info_header {
|
||||
uint32_t header_size;
|
||||
@ -68,9 +68,9 @@ extern "C" {
|
||||
uint32_t important_colours;
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
__attribute__((__packed__ ))
|
||||
__attribute__((__packed__))
|
||||
#endif
|
||||
bitmap_info_header_t;
|
||||
bitmap_info_header_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -703,7 +703,7 @@ int codablock(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
rows = 1;
|
||||
} else {
|
||||
/* use 3/1 aspect/ratio Codablock */
|
||||
rows = ((int)floor(sqrt(dataLength)))/3;
|
||||
rows = ((int)floor(sqrt(1.0*dataLength)))/3;
|
||||
if (rows < 1)
|
||||
rows = 1;
|
||||
else if (rows > 44)
|
||||
@ -771,7 +771,7 @@ int codablock(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
#ifndef _MSC_VER
|
||||
uchar pOutput[columns * rows];
|
||||
#else
|
||||
pOutput = (char *)_alloca(columns * rows * sizeof(char));
|
||||
pOutput = (unsigned char *)_alloca(columns * rows * sizeof(char));
|
||||
#endif
|
||||
pOutPos = pOutput;
|
||||
charCur=0;
|
||||
@ -782,7 +782,7 @@ int codablock(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
/* >> Empty line with StartCCodeBCodeC */
|
||||
characterSetCur=CodeC;
|
||||
/* CDB Start C*/
|
||||
pOutPos+=sprintf(pOutPos,"\x67\x63");
|
||||
pOutPos+=sprintf((char*)pOutPos,"\x67\x63");
|
||||
SummeASCII(&pOutPos,rowCur+42,CodeC);
|
||||
emptyColumns=useColumns-2;
|
||||
while (emptyColumns>0)
|
||||
|
@ -187,7 +187,7 @@ int code_11(struct zint_symbol *symbol, unsigned char source[], int length) { /*
|
||||
}
|
||||
|
||||
/* Code 39 */
|
||||
int c39(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
int c39(struct zint_symbol *symbol, unsigned char source[], const size_t length) {
|
||||
unsigned int i;
|
||||
unsigned int counter;
|
||||
char check_digit;
|
||||
@ -269,7 +269,7 @@ int c39(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
|
||||
if ((symbol->symbology == BARCODE_LOGMARS) || (symbol->symbology == BARCODE_HIBC_39)) {
|
||||
/* LOGMARS uses wider 'wide' bars than normal Code 39 */
|
||||
counter = strlen(dest);
|
||||
counter = (unsigned int) strlen(dest);
|
||||
for (i = 0; i < counter; i++) {
|
||||
if (dest[i] == '2') {
|
||||
dest[i] = '3';
|
||||
@ -404,7 +404,7 @@ int c93(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
}
|
||||
|
||||
/* Now we can check the true length of the barcode */
|
||||
h = strlen(buffer);
|
||||
h = (int) strlen(buffer);
|
||||
if (h > 107) {
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
|
@ -140,7 +140,7 @@ int dq4bi(unsigned char source[], int sourcelen, int position) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int c1_look_ahead_test(unsigned char source[], int sourcelen, int position, int current_mode, int gs1) {
|
||||
static int c1_look_ahead_test(unsigned char source[], int sourcelen, int position, int current_mode, int gs1) {
|
||||
float ascii_count, c40_count, text_count, edi_count, byte_count;
|
||||
char reduced_char;
|
||||
int done, best_scheme, best_count, sp;
|
||||
@ -861,7 +861,7 @@ int c1_encode(struct zint_symbol *symbol, unsigned char source[], unsigned int t
|
||||
}
|
||||
|
||||
if (decimal_count != 3) {
|
||||
int bits_left_in_byte, target_count;
|
||||
size_t bits_left_in_byte, target_count;
|
||||
int sub_target;
|
||||
/* Finish Decimal mode and go back to ASCII */
|
||||
|
||||
@ -1150,7 +1150,7 @@ int c1_encode(struct zint_symbol *symbol, unsigned char source[], unsigned int t
|
||||
}
|
||||
|
||||
if (current_mode == C1_DECIMAL) {
|
||||
int bits_left_in_byte, target_count;
|
||||
size_t bits_left_in_byte, target_count;
|
||||
int sub_target;
|
||||
/* Finish Decimal mode and go back to ASCII */
|
||||
|
||||
|
@ -681,7 +681,7 @@ int code_128(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
}
|
||||
|
||||
/* Handle EAN-128 (Now known as GS1-128) */
|
||||
int ean_128(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
int ean_128(struct zint_symbol *symbol, unsigned char source[], const size_t length) {
|
||||
int i, j, values[170], bar_characters, read, total_sum;
|
||||
int error_number, indexchaine, indexliste;
|
||||
char set[170], mode, last_set;
|
||||
|
@ -35,16 +35,10 @@
|
||||
#include "common.h"
|
||||
|
||||
/* Local replacement for strlen() with unsigned char strings */
|
||||
int ustrlen(const unsigned char data[]) {
|
||||
size_t ustrlen(const unsigned char data[]) {
|
||||
return strlen((const char*) data);
|
||||
}
|
||||
|
||||
/* Local replacement for strcpy() with unsigned char strings */
|
||||
|
||||
void ustrcpy(unsigned char target[], const unsigned char source[]) {
|
||||
strcpy((char *) target, (const char*) source);
|
||||
}
|
||||
|
||||
/* Converts a character 0-9 to its equivalent integer value */
|
||||
int ctoi(const char source) {
|
||||
if ((source >= '0') && (source <= '9'))
|
||||
@ -63,7 +57,7 @@ char itoc(const int source) {
|
||||
|
||||
/* Converts lower case characters to upper case in a string source[] */
|
||||
void to_upper(unsigned char source[]) {
|
||||
unsigned int i, src_len = ustrlen(source);
|
||||
size_t i, src_len = ustrlen(source);
|
||||
|
||||
for (i = 0; i < src_len; i++) {
|
||||
if ((source[i] >= 'a') && (source[i] <= 'z')) {
|
||||
@ -73,9 +67,9 @@ void to_upper(unsigned char source[]) {
|
||||
}
|
||||
|
||||
/* Verifies that a string only uses valid characters */
|
||||
int is_sane(const char test_string[], const unsigned char source[], const int length) {
|
||||
unsigned int i, j, latch;
|
||||
unsigned int lt = strlen(test_string);
|
||||
int is_sane(const char test_string[], const unsigned char source[], const size_t length) {
|
||||
unsigned int j, latch;
|
||||
size_t i, lt = strlen(test_string);
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
latch = FALSE;
|
||||
@ -95,7 +89,7 @@ int is_sane(const char test_string[], const unsigned char source[], const int le
|
||||
|
||||
/* Returns the position of data in set_string */
|
||||
int posn(const char set_string[], const char data) {
|
||||
unsigned int i, n = strlen(set_string);
|
||||
size_t i, n = strlen(set_string);
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
if (data == set_string[i]) {
|
||||
@ -107,7 +101,7 @@ int posn(const char set_string[], const char data) {
|
||||
|
||||
/* Replaces huge switch statements for looking up in tables */
|
||||
void lookup(const char set_string[], const char *table[], const char data, char dest[]) {
|
||||
unsigned int i, n = strlen(set_string);
|
||||
size_t i, n = strlen(set_string);
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
if (data == set_string[i]) {
|
||||
@ -134,7 +128,7 @@ void unset_module(struct zint_symbol *symbol, const int y_coord, const int x_coo
|
||||
/* Expands from a width pattern to a bit pattern */
|
||||
void expand(struct zint_symbol *symbol, const char data[]) {
|
||||
|
||||
unsigned int reader, n = strlen(data);
|
||||
size_t reader, n = strlen(data);
|
||||
int writer, i;
|
||||
char latch;
|
||||
|
||||
|
@ -46,17 +46,19 @@
|
||||
#define NEON "0123456789"
|
||||
|
||||
#include "zint.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#define ustrcpy(target,source) strcpy((char*)target,(const char*)source)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern int ustrlen(const unsigned char source[]);
|
||||
extern void ustrcpy(unsigned char target[], const unsigned char source[]);
|
||||
extern size_t ustrlen(const unsigned char source[]);
|
||||
extern int ctoi(const char source);
|
||||
extern char itoc(const int source);
|
||||
extern void to_upper(unsigned char source[]);
|
||||
extern int is_sane(const char test_string[], const unsigned char source[], const int length);
|
||||
extern int is_sane(const char test_string[], const unsigned char source[], const size_t length);
|
||||
extern void lookup(const char set_string[], const char *table[], const char data, char dest[]);
|
||||
extern int posn(const char set_string[], const char data);
|
||||
extern void expand(struct zint_symbol *symbol, const char data[]);
|
||||
|
@ -65,7 +65,7 @@
|
||||
|
||||
extern int general_rules(char field[], char type[]);
|
||||
extern int eanx(struct zint_symbol *symbol, unsigned char source[], int length);
|
||||
extern int ean_128(struct zint_symbol *symbol, unsigned char source[], int length);
|
||||
extern int ean_128(struct zint_symbol *symbol, unsigned char source[], const size_t length);
|
||||
extern int rss14(struct zint_symbol *symbol, unsigned char source[], int length);
|
||||
extern int rsslimited(struct zint_symbol *symbol, unsigned char source[], int length);
|
||||
extern int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int length);
|
||||
|
@ -306,31 +306,31 @@ static int look_ahead_test(const unsigned char inputData[], const int sourcelen,
|
||||
|
||||
/* step (j) */
|
||||
if (current_mode == DM_ASCII) {
|
||||
ascii_count = 0.0;
|
||||
c40_count = 1.0;
|
||||
text_count = 1.0;
|
||||
x12_count = 1.0;
|
||||
edf_count = 1.0;
|
||||
b256_count = 1.25;
|
||||
ascii_count = 0.0F;
|
||||
c40_count = 1.0F;
|
||||
text_count = 1.0F;
|
||||
x12_count = 1.0F;
|
||||
edf_count = 1.0F;
|
||||
b256_count = 1.25F;
|
||||
} else {
|
||||
ascii_count = 1.0;
|
||||
c40_count = 2.0;
|
||||
text_count = 2.0;
|
||||
x12_count = 2.0;
|
||||
edf_count = 2.0;
|
||||
b256_count = 2.25;
|
||||
ascii_count = 1.0F;
|
||||
c40_count = 2.0F;
|
||||
text_count = 2.0F;
|
||||
x12_count = 2.0F;
|
||||
edf_count = 2.0F;
|
||||
b256_count = 2.25F;
|
||||
}
|
||||
|
||||
switch (current_mode) {
|
||||
case DM_C40: c40_count = 0.0;
|
||||
case DM_C40: c40_count = 0.0F;
|
||||
break;
|
||||
case DM_TEXT: text_count = 0.0;
|
||||
case DM_TEXT: text_count = 0.0F;
|
||||
break;
|
||||
case DM_X12: x12_count = 0.0;
|
||||
case DM_X12: x12_count = 0.0F;
|
||||
break;
|
||||
case DM_EDIFACT: edf_count = 0.0;
|
||||
case DM_EDIFACT: edf_count = 0.0F;
|
||||
break;
|
||||
case DM_BASE256: b256_count = 0.0;
|
||||
case DM_BASE256: b256_count = 0.0F;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -339,12 +339,12 @@ static int look_ahead_test(const unsigned char inputData[], const int sourcelen,
|
||||
do {
|
||||
if (sp == (sourcelen - 1)) {
|
||||
/* At the end of data ... step (k) */
|
||||
ascii_count = ceil(ascii_count);
|
||||
b256_count = ceil(b256_count);
|
||||
edf_count = ceil(edf_count);
|
||||
text_count = ceil(text_count);
|
||||
x12_count = ceil(x12_count);
|
||||
c40_count = ceil(c40_count);
|
||||
ascii_count = ceilf(ascii_count);
|
||||
b256_count = ceilf(b256_count);
|
||||
edf_count = ceilf(edf_count);
|
||||
text_count = ceilf(text_count);
|
||||
x12_count = ceilf(x12_count);
|
||||
c40_count = ceilf(c40_count);
|
||||
|
||||
best_count = c40_count;
|
||||
best_scheme = DM_C40; // (k)(7)
|
||||
@ -379,9 +379,9 @@ static int look_ahead_test(const unsigned char inputData[], const int sourcelen,
|
||||
ascii_count += 0.5F; // (l)(1)
|
||||
} else {
|
||||
if (inputData[sp] > 127) {
|
||||
ascii_count = ceil(ascii_count) + 2.0F; // (l)(2)
|
||||
ascii_count = ceilf(ascii_count) + 2.0F; // (l)(2)
|
||||
} else {
|
||||
ascii_count = ceil(ascii_count) + 1.0F; // (l)(3)
|
||||
ascii_count = ceilf(ascii_count) + 1.0F; // (l)(3)
|
||||
}
|
||||
}
|
||||
|
||||
@ -572,7 +572,7 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
if (symbol->eci > 3) {
|
||||
target[tp] = 241; /* ECI Character */
|
||||
tp++;
|
||||
target[tp] = symbol->eci + 1;
|
||||
target[tp] = (unsigned char) (symbol->eci + 1);
|
||||
tp++;
|
||||
if (debug) printf("ECI %d ", symbol->eci + 1);
|
||||
}
|
||||
@ -718,7 +718,7 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
int iv;
|
||||
|
||||
iv = (1600 * process_buffer[0]) + (40 * process_buffer[1]) + (process_buffer[2]) + 1;
|
||||
target[tp] = iv / 256;
|
||||
target[tp] = (unsigned char) (iv / 256);
|
||||
tp++;
|
||||
target[tp] = iv % 256;
|
||||
tp++;
|
||||
@ -781,7 +781,7 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
int iv;
|
||||
|
||||
iv = (1600 * process_buffer[0]) + (40 * process_buffer[1]) + (process_buffer[2]) + 1;
|
||||
target[tp] = iv / 256;
|
||||
target[tp] = (unsigned char) (iv / 256);
|
||||
tp++;
|
||||
target[tp] = iv % 256;
|
||||
tp++;
|
||||
@ -842,7 +842,7 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
int iv;
|
||||
|
||||
iv = (1600 * process_buffer[0]) + (40 * process_buffer[1]) + (process_buffer[2]) + 1;
|
||||
target[tp] = iv / 256;
|
||||
target[tp] = (unsigned char) (iv / 256);
|
||||
tp++;
|
||||
target[tp] = iv % 256;
|
||||
tp++;
|
||||
@ -889,11 +889,11 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
}
|
||||
|
||||
if (*process_p >= 4) {
|
||||
target[tp] = (process_buffer[0] << 2) + ((process_buffer[1] & 0x30) >> 4);
|
||||
target[tp] = (unsigned char) ((process_buffer[0] << 2) + ((process_buffer[1] & 0x30) >> 4));
|
||||
tp++;
|
||||
target[tp] = ((process_buffer[1] & 0x0f) << 4) + ((process_buffer[2] & 0x3c) >> 2);
|
||||
tp++;
|
||||
target[tp] = ((process_buffer[2] & 0x03) << 6) + process_buffer[3];
|
||||
target[tp] = (unsigned char) (((process_buffer[2] & 0x03) << 6) + process_buffer[3]);
|
||||
tp++;
|
||||
strcat(binary, " ");
|
||||
if (debug) printf("[%d %d %d %d] ", process_buffer[0], process_buffer[1], process_buffer[2], process_buffer[3]);
|
||||
@ -966,9 +966,9 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
prn = ((149 * (i + 1)) % 255) + 1;
|
||||
temp = target[i] + prn;
|
||||
if (temp <= 255) {
|
||||
target[i] = temp;
|
||||
target[i] = (unsigned char) (temp);
|
||||
} else {
|
||||
target[i] = temp - 256;
|
||||
target[i] = (unsigned char) (temp - 256);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1074,7 +1074,7 @@ static int dm200encode_remainder(unsigned char target[], int target_length, cons
|
||||
if (process_p == 1) {
|
||||
target[target_length] = (unsigned char) ((process_buffer[0] << 2) + ((31 & 0x30) >> 4));
|
||||
target_length++;
|
||||
target[target_length] = (unsigned char) ((31 & 0x0f) << 4) ;
|
||||
target[target_length] = (unsigned char) ((31 & 0x0f) << 4);
|
||||
target_length++;
|
||||
target[target_length] = (unsigned char) 0;
|
||||
target_length++;
|
||||
@ -1126,18 +1126,18 @@ static void add_tail(unsigned char target[], int tp, const int tail_length) {
|
||||
prn = ((149 * (tp + 1)) % 253) + 1;
|
||||
temp = 129 + prn;
|
||||
if (temp <= 254) {
|
||||
target[tp] = temp;
|
||||
target[tp] = (unsigned char) (temp);
|
||||
tp++;
|
||||
} else {
|
||||
target[tp] = temp - 254;
|
||||
target[tp] = (unsigned char) (temp - 254);
|
||||
tp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int data_matrix_200(struct zint_symbol *symbol, unsigned char source[], const int length) {
|
||||
int inputlen, i, skew = 0;
|
||||
int data_matrix_200(struct zint_symbol *symbol, const unsigned char source[], const int in_length) {
|
||||
int i, inputlen = in_length, skew = 0;
|
||||
unsigned char binary[2200];
|
||||
int binlen;
|
||||
int process_buffer[8]; /* holds remaining data to finalised */
|
||||
@ -1148,7 +1148,6 @@ int data_matrix_200(struct zint_symbol *symbol, unsigned char source[], const in
|
||||
int last_mode = DM_ASCII;
|
||||
unsigned char *grid = 0;
|
||||
int symbols_left;
|
||||
inputlen = length;
|
||||
|
||||
/* inputlen may be decremented by 2 if macro character is used */
|
||||
binlen = dm200encode(symbol, source, binary, &last_mode, &inputlen, process_buffer, &process_p);
|
||||
@ -1291,12 +1290,12 @@ int data_matrix_200(struct zint_symbol *symbol, unsigned char source[], const in
|
||||
return error_number;
|
||||
}
|
||||
|
||||
int dmatrix(struct zint_symbol *symbol, unsigned char source[], const int length) {
|
||||
int dmatrix(struct zint_symbol *symbol, const unsigned char source[], const int in_length) {
|
||||
int error_number;
|
||||
|
||||
if (symbol->option_1 <= 1) {
|
||||
/* ECC 200 */
|
||||
error_number = data_matrix_200(symbol, source, length);
|
||||
error_number = data_matrix_200(symbol, source, in_length);
|
||||
} else {
|
||||
/* ECC 000 - 140 */
|
||||
strcpy(symbol->errtxt, "Older Data Matrix standards are no longer supported");
|
||||
|
@ -44,7 +44,7 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern int data_matrix_200(struct zint_symbol *symbol, unsigned char source[], const int length);
|
||||
extern int data_matrix_200(struct zint_symbol *symbol, const unsigned char source[], const int length);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -38,11 +38,11 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <malloc.h>
|
||||
#include "ms_stdint.h"
|
||||
#endif
|
||||
#include "common.h"
|
||||
#include "gs1.h"
|
||||
@ -160,7 +160,7 @@ int score_array(char Dots[], int Hgt, int Wid) {
|
||||
if ((!get_dot(Dots, Hgt, Wid, x - 1, y - 1))
|
||||
&& (!get_dot(Dots, Hgt, Wid, x + 1, y - 1))
|
||||
&& (!get_dot(Dots, Hgt, Wid, x - 1, y + 1))
|
||||
&&(!get_dot(Dots, Hgt, Wid, x + 1, y + 1))
|
||||
&& (!get_dot(Dots, Hgt, Wid, x + 1, y + 1))
|
||||
&& ((!get_dot(Dots, Hgt, Wid, x, y))
|
||||
|| ((!get_dot(Dots, Hgt, Wid, x - 2, y))
|
||||
&& (!get_dot(Dots, Hgt, Wid, x, y - 2))
|
||||
@ -223,7 +223,7 @@ void rsencode(int nd, int nc, unsigned char *wd) {
|
||||
}
|
||||
|
||||
/* Check if the next character is directly encodable in code set A (Annex F.II.D) */
|
||||
int datum_a(unsigned char source[], int position, int length) {
|
||||
int datum_a(const unsigned char source[], int position, int length) {
|
||||
int retval = 0;
|
||||
|
||||
if (position < length) {
|
||||
@ -236,7 +236,7 @@ int datum_a(unsigned char source[], int position, int length) {
|
||||
}
|
||||
|
||||
/* Check if the next character is directly encodable in code set B (Annex F.II.D) */
|
||||
int datum_b(unsigned char source[], int position, int length) {
|
||||
int datum_b(const unsigned char source[], int position, int length) {
|
||||
int retval = 0;
|
||||
|
||||
if (position < length) {
|
||||
@ -263,7 +263,7 @@ int datum_b(unsigned char source[], int position, int length) {
|
||||
}
|
||||
|
||||
/* Check if the next characters are directly encodable in code set C (Annex F.II.D) */
|
||||
int datum_c(unsigned char source[], int position, int length) {
|
||||
int datum_c(const unsigned char source[], int position, int length) {
|
||||
int retval = 0;
|
||||
|
||||
if (position < length - 2) {
|
||||
@ -276,7 +276,7 @@ int datum_c(unsigned char source[], int position, int length) {
|
||||
}
|
||||
|
||||
/* Returns how many consecutive digits lie immediately ahead (Annex F.II.A) */
|
||||
int n_digits(unsigned char source[], int position, int length) {
|
||||
int n_digits(const unsigned char source[], int position, int length) {
|
||||
int i;
|
||||
|
||||
for (i = position; ((source[i] >= '0') && (source[i] <= '9')) && (i < length); i++);
|
||||
@ -285,7 +285,7 @@ int n_digits(unsigned char source[], int position, int length) {
|
||||
}
|
||||
|
||||
/* checks ahead for 10 or more digits starting "17xxxxxx10..." (Annex F.II.B) */
|
||||
int seventeen_ten(unsigned char source[], int position, int length) {
|
||||
int seventeen_ten(const unsigned char source[], int position, int length) {
|
||||
int found = 0;
|
||||
|
||||
if (n_digits(source, position, length) >= 10) {
|
||||
@ -301,9 +301,9 @@ int seventeen_ten(unsigned char source[], int position, int length) {
|
||||
/* checks how many characters ahead can be reached while datum_c is true,
|
||||
* returning the resulting number of codewords (Annex F.II.E)
|
||||
*/
|
||||
int ahead_c(unsigned char source[], int position, int length) {
|
||||
int ahead_c(const unsigned char source[], int position, int length) {
|
||||
int count = 0;
|
||||
int i;
|
||||
int i;
|
||||
|
||||
for (i = position; (i < length) && datum_c(source, i, length); i += 2) {
|
||||
count++;
|
||||
@ -313,7 +313,7 @@ int ahead_c(unsigned char source[], int position, int length) {
|
||||
}
|
||||
|
||||
/* Annex F.II.F */
|
||||
int try_c(unsigned char source[], int position, int length) {
|
||||
int try_c(const unsigned char source[], int position, int length) {
|
||||
int retval = 0;
|
||||
|
||||
if (n_digits(source, position, length) > 0) {
|
||||
@ -326,9 +326,9 @@ int try_c(unsigned char source[], int position, int length) {
|
||||
}
|
||||
|
||||
/* Annex F.II.G */
|
||||
int ahead_a(unsigned char source[], int position, int length) {
|
||||
int ahead_a(const unsigned char source[], int position, int length) {
|
||||
int count = 0;
|
||||
int i;
|
||||
int i;
|
||||
|
||||
for (i = position; ((i < length) && datum_a(source, i, length))
|
||||
&& (try_c(source, i, length) < 2); i++) {
|
||||
@ -339,9 +339,9 @@ int ahead_a(unsigned char source[], int position, int length) {
|
||||
}
|
||||
|
||||
/* Annex F.II.H */
|
||||
int ahead_b(unsigned char source[], int position, int length) {
|
||||
int ahead_b(const unsigned char source[], int position, int length) {
|
||||
int count = 0;
|
||||
int i;
|
||||
int i;
|
||||
|
||||
for (i = position; ((i < length) && datum_b(source, i, length))
|
||||
&& (try_c(source, i, length) < 2); i++) {
|
||||
@ -352,7 +352,7 @@ int ahead_b(unsigned char source[], int position, int length) {
|
||||
}
|
||||
|
||||
/* checks if the next character is in the range 128 to 255 (Annex F.II.I) */
|
||||
int binary(unsigned char source[], int position, int length) {
|
||||
int binary(const unsigned char source[], int position, int length) {
|
||||
int retval = 0;
|
||||
|
||||
if (source[position] >= 128) {
|
||||
@ -363,7 +363,7 @@ int binary(unsigned char source[], int position, int length) {
|
||||
}
|
||||
|
||||
/* Analyse input data stream and encode using algorithm from Annex F */
|
||||
int dotcode_encode_message(struct zint_symbol *symbol, unsigned char source[], int length, unsigned char *codeword_array) {
|
||||
int dotcode_encode_message(struct zint_symbol *symbol, const unsigned char source[], int length, unsigned char *codeword_array) {
|
||||
int input_position, array_length, i;
|
||||
char encoding_mode;
|
||||
int inside_macro, done;
|
||||
@ -889,7 +889,7 @@ int dotcode_encode_message(struct zint_symbol *symbol, unsigned char source[], i
|
||||
}
|
||||
|
||||
/* Convert codewords to binary data stream */
|
||||
int make_dotstream(unsigned char masked_array[], int array_length, char dot_stream[]) {
|
||||
static size_t make_dotstream(unsigned char masked_array[], int array_length, char dot_stream[]) {
|
||||
int i, j;
|
||||
int mask = 0x100;
|
||||
|
||||
@ -1035,14 +1035,15 @@ void fold_dotstream(char dot_stream[], int width, int height, char dot_array[])
|
||||
}
|
||||
}
|
||||
|
||||
int dotcode(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
int dotcode(struct zint_symbol *symbol, const unsigned char source[], int length) {
|
||||
int i, j, k;
|
||||
size_t jc;
|
||||
int data_length, ecc_length;
|
||||
int min_dots, n_dots;
|
||||
int height, width, pad_chars;
|
||||
int mask_score[4];
|
||||
int weight;
|
||||
int dot_stream_length;
|
||||
size_t dot_stream_length;
|
||||
int high_score, best_mask;
|
||||
int debug = 0;
|
||||
|
||||
@ -1068,7 +1069,7 @@ int dotcode(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
|
||||
if (symbol->option_2 == 0) {
|
||||
|
||||
height = sqrt(2 * min_dots);
|
||||
height = (int) sqrt(2.0 * min_dots);
|
||||
if (height % 2) {
|
||||
height++;
|
||||
}
|
||||
@ -1096,12 +1097,15 @@ int dotcode(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
n_dots = (height * width) / 2;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
char dot_stream[n_dots + 3];
|
||||
char dot_array[width * height];
|
||||
char dot_stream[height * width * 3];
|
||||
char dot_array[width * height * sizeof (char) ];
|
||||
#else
|
||||
dot_stream = (char *) _alloca((n_dots + 3) * sizeof (char));
|
||||
dot_stream = (char *) _alloca(height * width * 3);
|
||||
if (!dot_stream) return ZINT_ERROR_MEMORY;
|
||||
|
||||
dot_array = (char *) _alloca(width * height * sizeof (char));
|
||||
#endif /* _MSC_VER */
|
||||
if (!dot_array) return ZINT_ERROR_MEMORY;
|
||||
#endif
|
||||
|
||||
/* Add pad characters */
|
||||
for (pad_chars = 0; 9 * ((data_length + pad_chars + 3 + ((data_length + pad_chars) / 2)) + 2) < n_dots; pad_chars++);
|
||||
@ -1166,7 +1170,7 @@ int dotcode(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
dot_stream_length = make_dotstream(masked_codeword_array, (data_length + ecc_length + 1), dot_stream);
|
||||
|
||||
/* Add pad bits */
|
||||
for (j = dot_stream_length; j < n_dots; j++) {
|
||||
for (jc = dot_stream_length; jc < n_dots; jc++) {
|
||||
strcat(dot_stream, "1");
|
||||
}
|
||||
|
||||
@ -1220,7 +1224,7 @@ int dotcode(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
dot_stream_length = make_dotstream(masked_codeword_array, (data_length + ecc_length + 1), dot_stream);
|
||||
|
||||
/* Add pad bits */
|
||||
for (j = dot_stream_length; j < n_dots; j++) {
|
||||
for (jc = dot_stream_length; jc < n_dots; jc++) {
|
||||
strcat(dot_stream, "1");
|
||||
}
|
||||
|
||||
|
@ -31,8 +31,12 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "eci.h"
|
||||
#include "zint.h"
|
||||
#ifdef _MSC_VER
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
/* Convert Unicode to other character encodings */
|
||||
int utf_to_eci(int eci, const unsigned char source[], unsigned char dest[], int *length) {
|
||||
@ -57,7 +61,7 @@ int utf_to_eci(int eci, const unsigned char source[], unsigned char dest[], int
|
||||
do {
|
||||
/* Single byte (ASCII) character */
|
||||
bytelen = 1;
|
||||
glyph = (int)source[in_posn];
|
||||
glyph = (int) source[in_posn];
|
||||
|
||||
if ((source[in_posn] >= 0x80) && (source[in_posn] < 0xc0)) {
|
||||
/* Something has gone wrong, abort */
|
||||
|
378
backend/eci.h
378
backend/eci.h
@ -36,213 +36,213 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
static int iso_8859_1[] = { // Latin alphabet No. 1
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
|
||||
};
|
||||
static const int iso_8859_1[] = {// Latin alphabet No. 1
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
|
||||
};
|
||||
|
||||
static int iso_8859_2[] = { // Latin alphabet No. 2
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7, 0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b,
|
||||
0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7, 0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c,
|
||||
0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
|
||||
0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
|
||||
0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
|
||||
0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9
|
||||
};
|
||||
static const int iso_8859_2[] = {// Latin alphabet No. 2
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7, 0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b,
|
||||
0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7, 0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c,
|
||||
0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
|
||||
0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
|
||||
0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
|
||||
0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9
|
||||
};
|
||||
|
||||
static int iso_8859_3[] = { // Latin alphabet No. 3
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, 0x0000, 0x0124, 0x00a7, 0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, 0x0000, 0x017b,
|
||||
0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7, 0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd, 0x0000, 0x017c,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x0000, 0x00c4, 0x010a, 0x0108, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x0000, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7, 0x011c, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x0000, 0x00e4, 0x010b, 0x0109, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x0000, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7, 0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9
|
||||
};
|
||||
static const int iso_8859_3[] = {// Latin alphabet No. 3
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, 0x0000, 0x0124, 0x00a7, 0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, 0x0000, 0x017b,
|
||||
0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7, 0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd, 0x0000, 0x017c,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x0000, 0x00c4, 0x010a, 0x0108, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x0000, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7, 0x011c, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x0000, 0x00e4, 0x010b, 0x0109, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x0000, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7, 0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9
|
||||
};
|
||||
|
||||
static int iso_8859_4[] = { // Latin alphabet No. 4
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x012b, 0x013b, 0x00a7, 0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af,
|
||||
0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7, 0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b,
|
||||
0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a,
|
||||
0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df,
|
||||
0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b,
|
||||
0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9
|
||||
};
|
||||
static const int iso_8859_4[] = {// Latin alphabet No. 4
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x012b, 0x013b, 0x00a7, 0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af,
|
||||
0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7, 0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b,
|
||||
0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a,
|
||||
0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df,
|
||||
0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b,
|
||||
0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9
|
||||
};
|
||||
|
||||
static int iso_8859_5[] = { // Latin/Cyrillic alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f,
|
||||
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
|
||||
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
|
||||
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
|
||||
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
|
||||
0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f
|
||||
};
|
||||
static const int iso_8859_5[] = {// Latin/Cyrillic alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f,
|
||||
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
|
||||
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
|
||||
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
|
||||
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
|
||||
0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f
|
||||
};
|
||||
|
||||
static int iso_8859_6[] = { // Latin/Arabic alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0000, 0x0000, 0x0000, 0x00a4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x060c, 0x00ad, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x061b, 0x0000, 0x0000, 0x0000, 0x061f,
|
||||
0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f,
|
||||
0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f,
|
||||
0x0650, 0x0651, 0x0652, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
||||
};
|
||||
static const int iso_8859_6[] = {// Latin/Arabic alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0000, 0x0000, 0x0000, 0x00a4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x060c, 0x00ad, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x061b, 0x0000, 0x0000, 0x0000, 0x061f,
|
||||
0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f,
|
||||
0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f,
|
||||
0x0650, 0x0651, 0x0652, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
||||
};
|
||||
|
||||
static int iso_8859_7[] = { // Latin/Greek alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x2018, 0x2019, 0x00a3, 0x20ac, 0x20af, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x037a, 0x00ab, 0x00ac, 0x00ad, 0x0000, 0x2015,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386, 0x00b7, 0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f,
|
||||
0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,
|
||||
0x03a0, 0x03a1, 0x0000, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af,
|
||||
0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
|
||||
0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x0000
|
||||
};
|
||||
static const int iso_8859_7[] = {// Latin/Greek alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x2018, 0x2019, 0x00a3, 0x20ac, 0x20af, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x037a, 0x00ab, 0x00ac, 0x00ad, 0x0000, 0x2015,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386, 0x00b7, 0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f,
|
||||
0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,
|
||||
0x03a0, 0x03a1, 0x0000, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af,
|
||||
0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
|
||||
0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x0000
|
||||
};
|
||||
|
||||
static int iso_8859_8[] = { // Latin/Hebrew alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0000, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2017,
|
||||
0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df,
|
||||
0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, 0x05e8, 0x05e9, 0x05ea, 0x0000, 0x0000, 0x200e, 0x200f, 0x0000
|
||||
};
|
||||
static const int iso_8859_8[] = {// Latin/Hebrew alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0000, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2017,
|
||||
0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df,
|
||||
0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, 0x05e8, 0x05e9, 0x05ea, 0x0000, 0x0000, 0x200e, 0x200f, 0x0000
|
||||
};
|
||||
|
||||
static int iso_8859_9[] = { // Latin alphabet No. 5
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff
|
||||
};
|
||||
static const int iso_8859_9[] = {// Latin alphabet No. 5
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff
|
||||
};
|
||||
|
||||
static int iso_8859_10[] = { // Latin alphabet No. 6
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x012b, 0x0136, 0x00a7, 0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a,
|
||||
0x00b0, 0x0105, 0x0113, 0x0123, 0x012b, 0x0129, 0x0137, 0x00b7, 0x013c, 0x0111, 0x0161, 0x0167, 0x017e, 0x2015, 0x016b, 0x014b,
|
||||
0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00d0, 0x0145, 0x014c, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0168, 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
|
||||
0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169, 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138
|
||||
};
|
||||
static const int iso_8859_10[] = {// Latin alphabet No. 6
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x012b, 0x0136, 0x00a7, 0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a,
|
||||
0x00b0, 0x0105, 0x0113, 0x0123, 0x012b, 0x0129, 0x0137, 0x00b7, 0x013c, 0x0111, 0x0161, 0x0167, 0x017e, 0x2015, 0x016b, 0x014b,
|
||||
0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00d0, 0x0145, 0x014c, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0168, 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
|
||||
0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169, 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138
|
||||
};
|
||||
|
||||
static int iso_8859_11[] = { // Latin/Thai alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, 0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f,
|
||||
0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, 0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f,
|
||||
0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, 0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f,
|
||||
0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e36, 0x0e36, 0x0e37, 0x0e38, 0x0e39, 0x0e3a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0e3f,
|
||||
0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f,
|
||||
0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, 0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0x0000, 0x0000, 0x0000, 0x0000
|
||||
};
|
||||
static const int iso_8859_11[] = {// Latin/Thai alphabet
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, 0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f,
|
||||
0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, 0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f,
|
||||
0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, 0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f,
|
||||
0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e36, 0x0e36, 0x0e37, 0x0e38, 0x0e39, 0x0e3a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0e3f,
|
||||
0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f,
|
||||
0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, 0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0x0000, 0x0000, 0x0000, 0x0000
|
||||
};
|
||||
|
||||
static int iso_8859_13[] = { // Latin alphabet No. 7
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7, 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x201c, 0x00b5, 0x00b6, 0x00b7, 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6,
|
||||
0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b,
|
||||
0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df,
|
||||
0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c,
|
||||
0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019
|
||||
};
|
||||
static const int iso_8859_13[] = {// Latin alphabet No. 7
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7, 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x201c, 0x00b5, 0x00b6, 0x00b7, 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6,
|
||||
0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b,
|
||||
0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df,
|
||||
0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c,
|
||||
0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019
|
||||
};
|
||||
|
||||
static int iso_8859_14[] = { // Latin alphabet No. 8 (Celtic)
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x1e02, 0x1e03, 0x00a3, 0x010a, 0x010b, 0x1e0a, 0x00a7, 0x1e80, 0x00a9, 0x1e82, 0x1e0b, 0x1ef2, 0x00ad, 0x00ae, 0x0178,
|
||||
0x1e1e, 0x1e1f, 0x0120, 0x0121, 0x1e40, 0x1e41, 0x00b6, 0x1e56, 0x1e81, 0x1e57, 0x1e83, 0x1e60, 0x1ef3, 0x1e84, 0x1e85, 0x1e61,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x0174, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x1e6a, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x0176, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x0175, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x1e6b, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x0177, 0x00ff
|
||||
};
|
||||
static const int iso_8859_14[] = {// Latin alphabet No. 8 (Celtic)
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x1e02, 0x1e03, 0x00a3, 0x010a, 0x010b, 0x1e0a, 0x00a7, 0x1e80, 0x00a9, 0x1e82, 0x1e0b, 0x1ef2, 0x00ad, 0x00ae, 0x0178,
|
||||
0x1e1e, 0x1e1f, 0x0120, 0x0121, 0x1e40, 0x1e41, 0x00b6, 0x1e56, 0x1e81, 0x1e57, 0x1e83, 0x1e60, 0x1ef3, 0x1e84, 0x1e85, 0x1e61,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x0174, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x1e6a, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x0176, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x0175, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x1e6b, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x0177, 0x00ff
|
||||
};
|
||||
|
||||
static int iso_8859_15[] = { // Latin alphabet No. 9
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7, 0x0161, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x017d, 0x00b5, 0x00b6, 0x00b7, 0x017e, 0x00b9, 0x00ba, 0x00bb, 0x0152, 0x0153, 0x0178, 0x00bf,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
|
||||
};
|
||||
static const int iso_8859_15[] = {// Latin alphabet No. 9
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7, 0x0161, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x017d, 0x00b5, 0x00b6, 0x00b7, 0x017e, 0x00b9, 0x00ba, 0x00bb, 0x0152, 0x0153, 0x0178, 0x00bf,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
|
||||
};
|
||||
|
||||
static int iso_8859_16[] = { // Latin alphabet No. 10
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7, 0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b,
|
||||
0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7, 0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0106, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x0107, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b, 0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff
|
||||
};
|
||||
static const int iso_8859_16[] = {// Latin alphabet No. 10
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7, 0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b,
|
||||
0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7, 0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0106, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x0107, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b, 0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff
|
||||
};
|
||||
|
||||
static int windows_1250[] = {
|
||||
0x20ac, 0x0000, 0x201a, 0x0000, 0x201e, 0x2026, 0x2020, 0x2021, 0x0000, 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179,
|
||||
0x0000, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a,
|
||||
0x00a0, 0x02c7, 0x02db, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b,
|
||||
0x00b0, 0x00b1, 0x02db, 0x0142, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x0105, 0x015f, 0x00bb, 0x013d, 0x02dd, 0x013e, 0x017c,
|
||||
0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
|
||||
0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
|
||||
0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
|
||||
0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9
|
||||
};
|
||||
static const int windows_1250[] = {
|
||||
0x20ac, 0x0000, 0x201a, 0x0000, 0x201e, 0x2026, 0x2020, 0x2021, 0x0000, 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179,
|
||||
0x0000, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a,
|
||||
0x00a0, 0x02c7, 0x02db, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b,
|
||||
0x00b0, 0x00b1, 0x02db, 0x0142, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x0105, 0x015f, 0x00bb, 0x013d, 0x02dd, 0x013e, 0x017c,
|
||||
0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
|
||||
0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
|
||||
0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
|
||||
0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9
|
||||
};
|
||||
|
||||
static int windows_1251[] = {
|
||||
0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021, 0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f,
|
||||
0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f,
|
||||
0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7, 0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407,
|
||||
0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7, 0x0451, 0x2116, 0x0454, 0x00bb, 0x0458, 0x0405, 0x0455, 0x0457,
|
||||
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
|
||||
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
|
||||
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
|
||||
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f
|
||||
};
|
||||
static const int windows_1251[] = {
|
||||
0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021, 0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f,
|
||||
0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x0000, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f,
|
||||
0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7, 0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407,
|
||||
0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7, 0x0451, 0x2116, 0x0454, 0x00bb, 0x0458, 0x0405, 0x0455, 0x0457,
|
||||
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
|
||||
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
|
||||
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
|
||||
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f
|
||||
};
|
||||
|
||||
static int windows_1252[] = {
|
||||
0x20ac, 0x0000, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017d, 0x0000,
|
||||
0x0000, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x0000, 0x017e, 0x0178,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
|
||||
};
|
||||
static const int windows_1252[] = {
|
||||
0x20ac, 0x0000, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017d, 0x0000,
|
||||
0x0000, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x0000, 0x017e, 0x0178,
|
||||
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
|
||||
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
|
||||
0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
|
||||
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
|
||||
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
|
||||
};
|
||||
|
||||
static int windows_1256[] = {
|
||||
0x20ac, 0x067e, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
|
||||
0x06af, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x06a9, 0x2122, 0x0691, 0x203a, 0x0153, 0x200c, 0x200d, 0x06ba,
|
||||
0x00a0, 0x060c, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x06be, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x061b, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x061f,
|
||||
0x06c1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f,
|
||||
0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00d7, 0x0637, 0x0638, 0x0639, 0x063a, 0x0640, 0x0641, 0x0642, 0x0643,
|
||||
0x00e0, 0x0644, 0x00e2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x0649, 0x064a, 0x00ee, 0x00ef,
|
||||
0x064b, 0x064c, 0x064d, 0x064e, 0x00f4, 0x064f, 0x0650, 0x00f7, 0x0651, 0x00f9, 0x0652, 0x00fb, 0x00fc, 0x200e, 0x200f, 0x06d2
|
||||
};
|
||||
static const int windows_1256[] = {
|
||||
0x20ac, 0x067e, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
|
||||
0x06af, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x06a9, 0x2122, 0x0691, 0x203a, 0x0153, 0x200c, 0x200d, 0x06ba,
|
||||
0x00a0, 0x060c, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x06be, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
|
||||
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x061b, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x061f,
|
||||
0x06c1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f,
|
||||
0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00d7, 0x0637, 0x0638, 0x0639, 0x063a, 0x0640, 0x0641, 0x0642, 0x0643,
|
||||
0x00e0, 0x0644, 0x00e2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x0649, 0x064a, 0x00ee, 0x00ef,
|
||||
0x064b, 0x064c, 0x064d, 0x064e, 0x00f4, 0x064f, 0x0650, 0x00f7, 0x0651, 0x00f9, 0x0652, 0x00fb, 0x00fc, 0x200e, 0x200f, 0x06d2
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
461
backend/gif.c
461
backend/gif.c
@ -34,11 +34,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "common.h"
|
||||
#include "pcx.h" /* PCX header structure */
|
||||
#include <math.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#define SSET "0123456789ABCDEF"
|
||||
@ -53,232 +53,211 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct s_statestruct {
|
||||
unsigned char * pOut;
|
||||
unsigned char *pIn;
|
||||
unsigned int InLen;
|
||||
unsigned int OutLength;
|
||||
unsigned int OutPosCur;
|
||||
unsigned int OutByteCountPos;
|
||||
unsigned short ClearCode;
|
||||
unsigned short FreeCode;
|
||||
char fByteCountByteSet;
|
||||
unsigned char OutBitsFree;
|
||||
unsigned short NodeAxon[4096];
|
||||
unsigned short NodeNext[4096];
|
||||
unsigned char NodePix[4096];
|
||||
unsigned char * pOut;
|
||||
unsigned char *pIn;
|
||||
unsigned int InLen;
|
||||
unsigned int OutLength;
|
||||
unsigned int OutPosCur;
|
||||
unsigned int OutByteCountPos;
|
||||
unsigned short ClearCode;
|
||||
unsigned short FreeCode;
|
||||
char fByteCountByteSet;
|
||||
unsigned char OutBitsFree;
|
||||
unsigned short NodeAxon[4096];
|
||||
unsigned short NodeNext[4096];
|
||||
unsigned char NodePix[4096];
|
||||
} statestruct;
|
||||
|
||||
static char BufferNextByte(statestruct *pState)
|
||||
{
|
||||
(pState->OutPosCur)++;
|
||||
/* Check if this position is a byte count position
|
||||
* fg_f_bytecountbyte_set indicates, if byte count position bytes should be
|
||||
* inserted in general.
|
||||
* If this is true, and the distance to the last byte count position is 256
|
||||
* (e.g. 255 bytes in between), a byte count byte is inserted, and the value
|
||||
* of the last one is set to 255.
|
||||
* */
|
||||
if ( pState->fByteCountByteSet && ( pState->OutByteCountPos + 256 == pState->OutPosCur ) )
|
||||
{
|
||||
(pState->pOut)[pState->OutByteCountPos] = 255;
|
||||
pState->OutByteCountPos = pState->OutPosCur;
|
||||
(pState->OutPosCur)++;
|
||||
}
|
||||
if ( pState->OutPosCur >= pState->OutLength )
|
||||
return 1;
|
||||
(pState->pOut)[pState->OutPosCur]=0x00;
|
||||
return 0;
|
||||
static char BufferNextByte(statestruct *pState) {
|
||||
(pState->OutPosCur)++;
|
||||
/* Check if this position is a byte count position
|
||||
* fg_f_bytecountbyte_set indicates, if byte count position bytes should be
|
||||
* inserted in general.
|
||||
* If this is true, and the distance to the last byte count position is 256
|
||||
* (e.g. 255 bytes in between), a byte count byte is inserted, and the value
|
||||
* of the last one is set to 255.
|
||||
* */
|
||||
if (pState->fByteCountByteSet && (pState->OutByteCountPos + 256 == pState->OutPosCur)) {
|
||||
(pState->pOut)[pState->OutByteCountPos] = 255;
|
||||
pState->OutByteCountPos = pState->OutPosCur;
|
||||
(pState->OutPosCur)++;
|
||||
}
|
||||
if (pState->OutPosCur >= pState->OutLength)
|
||||
return 1;
|
||||
(pState->pOut)[pState->OutPosCur] = 0x00;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char AddCodeToBuffer(statestruct *pState, unsigned short CodeIn,unsigned char CodeBits)
|
||||
{
|
||||
/* Check, if we may fill up the current byte completely */
|
||||
if (CodeBits >= pState->OutBitsFree)
|
||||
{
|
||||
(pState->pOut)[pState->OutPosCur] |= (unsigned char)
|
||||
( CodeIn << ( 8 - pState->OutBitsFree ) );
|
||||
if ( BufferNextByte(pState) )
|
||||
return -1;
|
||||
CodeIn = (unsigned short) ( CodeIn >> pState->OutBitsFree );
|
||||
CodeBits -= pState->OutBitsFree;
|
||||
pState->OutBitsFree = 8;
|
||||
/* Write a full byte if there are at least 8 code bits left */
|
||||
if (CodeBits >= pState->OutBitsFree)
|
||||
{
|
||||
(pState->pOut)[pState->OutPosCur] = (unsigned char) CodeIn;
|
||||
if ( BufferNextByte(pState) )
|
||||
return -1;
|
||||
CodeIn = (unsigned short) ( CodeIn >> 8 );
|
||||
CodeBits -= 8;
|
||||
}
|
||||
}
|
||||
/* The remaining bits of CodeIn fit in the current byte. */
|
||||
if( CodeBits > 0 )
|
||||
{
|
||||
(pState->pOut)[pState->OutPosCur] |= (unsigned char)
|
||||
( CodeIn << ( 8 - pState->OutBitsFree ) );
|
||||
pState->OutBitsFree -= CodeBits;
|
||||
}
|
||||
return 0;
|
||||
static char AddCodeToBuffer(statestruct *pState, unsigned short CodeIn, unsigned char CodeBits) {
|
||||
/* Check, if we may fill up the current byte completely */
|
||||
if (CodeBits >= pState->OutBitsFree) {
|
||||
(pState->pOut)[pState->OutPosCur] |= (unsigned char)
|
||||
(CodeIn << (8 - pState->OutBitsFree));
|
||||
if (BufferNextByte(pState))
|
||||
return -1;
|
||||
CodeIn = (unsigned short) (CodeIn >> pState->OutBitsFree);
|
||||
CodeBits -= pState->OutBitsFree;
|
||||
pState->OutBitsFree = 8;
|
||||
/* Write a full byte if there are at least 8 code bits left */
|
||||
if (CodeBits >= pState->OutBitsFree) {
|
||||
(pState->pOut)[pState->OutPosCur] = (unsigned char) CodeIn;
|
||||
if (BufferNextByte(pState))
|
||||
return -1;
|
||||
CodeIn = (unsigned short) (CodeIn >> 8);
|
||||
CodeBits -= 8;
|
||||
}
|
||||
}
|
||||
/* The remaining bits of CodeIn fit in the current byte. */
|
||||
if (CodeBits > 0) {
|
||||
(pState->pOut)[pState->OutPosCur] |= (unsigned char)
|
||||
(CodeIn << (8 - pState->OutBitsFree));
|
||||
pState->OutBitsFree -= CodeBits;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void FlushStringTable(statestruct *pState)
|
||||
{
|
||||
unsigned short Pos;
|
||||
for( Pos = 0; Pos < pState->ClearCode; Pos++ )
|
||||
{
|
||||
(pState->NodeAxon)[Pos] = 0;
|
||||
}
|
||||
static void FlushStringTable(statestruct *pState) {
|
||||
unsigned short Pos;
|
||||
for (Pos = 0; Pos < pState->ClearCode; Pos++) {
|
||||
(pState->NodeAxon)[Pos] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned short FindPixelOutlet(statestruct *pState, unsigned short HeadNode, unsigned char Byte) {
|
||||
unsigned short Outlet;
|
||||
|
||||
unsigned short FindPixelOutlet( statestruct *pState, unsigned short HeadNode, unsigned char Byte )
|
||||
{
|
||||
unsigned short Outlet;
|
||||
|
||||
Outlet = (pState->NodeAxon)[HeadNode];
|
||||
while( Outlet )
|
||||
{
|
||||
if ( (pState->NodePix)[Outlet] == Byte )
|
||||
return Outlet;
|
||||
Outlet = (pState->NodeNext)[Outlet];
|
||||
}
|
||||
return 0;
|
||||
Outlet = (pState->NodeAxon)[HeadNode];
|
||||
while (Outlet) {
|
||||
if ((pState->NodePix)[Outlet] == Byte)
|
||||
return Outlet;
|
||||
Outlet = (pState->NodeNext)[Outlet];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char NextCode ( statestruct *pState, unsigned char * pPixelValueCur, unsigned char CodeBits )
|
||||
{
|
||||
unsigned short UpNode;
|
||||
unsigned short DownNode;
|
||||
/* start with the root node for last pixel chain */
|
||||
UpNode = *pPixelValueCur;
|
||||
if ( (pState->InLen) == 0 )
|
||||
return AddCodeToBuffer(pState, UpNode, CodeBits );
|
||||
static char NextCode(statestruct *pState, unsigned char * pPixelValueCur, unsigned char CodeBits) {
|
||||
unsigned short UpNode;
|
||||
unsigned short DownNode;
|
||||
/* start with the root node for last pixel chain */
|
||||
UpNode = *pPixelValueCur;
|
||||
if ((pState->InLen) == 0)
|
||||
return AddCodeToBuffer(pState, UpNode, CodeBits);
|
||||
|
||||
*pPixelValueCur = (*(pState->pIn))-'0';
|
||||
(pState->pIn)++;
|
||||
(pState->InLen)--;
|
||||
/* Follow the string table and the data stream to the end of the longest string that has a code */
|
||||
while( 0 != ( DownNode = FindPixelOutlet(pState, UpNode, *pPixelValueCur ) ) )
|
||||
{
|
||||
UpNode = DownNode;
|
||||
if ( (pState->InLen) == 0 )
|
||||
return AddCodeToBuffer(pState, UpNode, CodeBits);
|
||||
*pPixelValueCur = (*(pState->pIn)) - '0';
|
||||
(pState->pIn)++;
|
||||
(pState->InLen)--;
|
||||
/* Follow the string table and the data stream to the end of the longest string that has a code */
|
||||
while (0 != (DownNode = FindPixelOutlet(pState, UpNode, *pPixelValueCur))) {
|
||||
UpNode = DownNode;
|
||||
if ((pState->InLen) == 0)
|
||||
return AddCodeToBuffer(pState, UpNode, CodeBits);
|
||||
|
||||
*pPixelValueCur = (*(pState->pIn)) - '0';
|
||||
(pState->pIn)++;
|
||||
(pState->InLen)--;
|
||||
}
|
||||
/* Submit 'UpNode' which is the code of the longest string */
|
||||
if ( AddCodeToBuffer(pState, UpNode, CodeBits ) )
|
||||
return -1;
|
||||
/* ... and extend the string by appending 'PixelValueCur' */
|
||||
/* Create a successor node for 'PixelValueCur' whose code is 'freecode' */
|
||||
(pState->NodePix)[pState->FreeCode] = *pPixelValueCur;
|
||||
(pState->NodeAxon)[pState->FreeCode] = (pState->NodeNext)[pState->FreeCode]=0;
|
||||
/* ...and link it to the end of the chain emanating from fg_axon[UpNode]. */
|
||||
DownNode = (pState->NodeAxon)[UpNode];
|
||||
if( ! DownNode )
|
||||
{
|
||||
(pState->NodeAxon)[UpNode] = pState->FreeCode;
|
||||
} else {
|
||||
while( (pState->NodeNext)[DownNode] )
|
||||
{
|
||||
DownNode = (pState->NodeNext)[DownNode];
|
||||
}
|
||||
(pState->NodeNext)[DownNode] = pState->FreeCode;
|
||||
}
|
||||
return 1;
|
||||
*pPixelValueCur = (*(pState->pIn)) - '0';
|
||||
(pState->pIn)++;
|
||||
(pState->InLen)--;
|
||||
}
|
||||
/* Submit 'UpNode' which is the code of the longest string */
|
||||
if (AddCodeToBuffer(pState, UpNode, CodeBits))
|
||||
return -1;
|
||||
/* ... and extend the string by appending 'PixelValueCur' */
|
||||
/* Create a successor node for 'PixelValueCur' whose code is 'freecode' */
|
||||
(pState->NodePix)[pState->FreeCode] = *pPixelValueCur;
|
||||
(pState->NodeAxon)[pState->FreeCode] = (pState->NodeNext)[pState->FreeCode] = 0;
|
||||
/* ...and link it to the end of the chain emanating from fg_axon[UpNode]. */
|
||||
DownNode = (pState->NodeAxon)[UpNode];
|
||||
if (!DownNode) {
|
||||
(pState->NodeAxon)[UpNode] = pState->FreeCode;
|
||||
} else {
|
||||
while ((pState->NodeNext)[DownNode]) {
|
||||
DownNode = (pState->NodeNext)[DownNode];
|
||||
}
|
||||
(pState->NodeNext)[DownNode] = pState->FreeCode;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int gif_lzw(unsigned char *pOut, int OutLength, unsigned char *pIn, int InLen)
|
||||
{
|
||||
unsigned char PixelValueCur;
|
||||
unsigned char CodeBits;
|
||||
unsigned short Pos;
|
||||
statestruct State;
|
||||
int gif_lzw(unsigned char *pOut, int OutLength, unsigned char *pIn, int InLen) {
|
||||
unsigned char PixelValueCur;
|
||||
unsigned char CodeBits;
|
||||
unsigned short Pos;
|
||||
statestruct State;
|
||||
|
||||
State.pIn = pIn;
|
||||
State.InLen = InLen;
|
||||
State.pOut = pOut;
|
||||
State.OutLength = OutLength;
|
||||
// > Get first data byte
|
||||
if (State.InLen == 0)
|
||||
return 0;
|
||||
State.pIn = pIn;
|
||||
State.InLen = InLen;
|
||||
State.pOut = pOut;
|
||||
State.OutLength = OutLength;
|
||||
// > Get first data byte
|
||||
if (State.InLen == 0)
|
||||
return 0;
|
||||
|
||||
PixelValueCur = (unsigned char) ((*(State.pIn)) - '0');
|
||||
(State.pIn)++;
|
||||
(State.InLen)--;
|
||||
CodeBits = 3;
|
||||
State.ClearCode = 4;
|
||||
State.FreeCode = 6;
|
||||
State.OutBitsFree = 8;
|
||||
State.OutPosCur = -1;
|
||||
State.fByteCountByteSet = 0;
|
||||
PixelValueCur = (unsigned char) ((*(State.pIn)) - '0');
|
||||
(State.pIn)++;
|
||||
(State.InLen)--;
|
||||
CodeBits = 3;
|
||||
State.ClearCode = 4;
|
||||
State.FreeCode = 6;
|
||||
State.OutBitsFree = 8;
|
||||
State.OutPosCur = -1;
|
||||
State.fByteCountByteSet = 0;
|
||||
|
||||
if ( BufferNextByte(&State) )
|
||||
return 0;
|
||||
if (BufferNextByte(&State))
|
||||
return 0;
|
||||
|
||||
for ( Pos = 0; Pos < State.ClearCode; Pos++)
|
||||
State.NodePix[Pos] = (unsigned char) Pos;
|
||||
for (Pos = 0; Pos < State.ClearCode; Pos++)
|
||||
State.NodePix[Pos] = (unsigned char) Pos;
|
||||
|
||||
FlushStringTable(&State);
|
||||
FlushStringTable(&State);
|
||||
|
||||
/* Write what the GIF specification calls the "code size". */
|
||||
(State.pOut)[State.OutPosCur] = 2;
|
||||
/* Reserve first bytecount byte */
|
||||
if ( BufferNextByte(&State) )
|
||||
return 0;
|
||||
State.OutByteCountPos = State.OutPosCur;
|
||||
if ( BufferNextByte(&State) )
|
||||
return 0;
|
||||
State.fByteCountByteSet = 1;
|
||||
/* Submit one 'ClearCode' as the first code */
|
||||
if ( AddCodeToBuffer(&State, State.ClearCode, CodeBits) )
|
||||
return 0;
|
||||
/* Write what the GIF specification calls the "code size". */
|
||||
(State.pOut)[State.OutPosCur] = 2;
|
||||
/* Reserve first bytecount byte */
|
||||
if (BufferNextByte(&State))
|
||||
return 0;
|
||||
State.OutByteCountPos = State.OutPosCur;
|
||||
if (BufferNextByte(&State))
|
||||
return 0;
|
||||
State.fByteCountByteSet = 1;
|
||||
/* Submit one 'ClearCode' as the first code */
|
||||
if (AddCodeToBuffer(&State, State.ClearCode, CodeBits))
|
||||
return 0;
|
||||
|
||||
for(;;)
|
||||
{
|
||||
char Res;
|
||||
/* generate and save the next code, which may consist of multiple input pixels. */
|
||||
Res = NextCode(&State, &PixelValueCur, CodeBits);
|
||||
if ( Res < 0)
|
||||
return 0;
|
||||
//* Check for end of data stream */
|
||||
if( ! Res )
|
||||
{
|
||||
/* submit 'eoi' as the last item of the code stream */
|
||||
if ( AddCodeToBuffer(&State, (unsigned short)(State.ClearCode + 1), CodeBits ) )
|
||||
return 0;
|
||||
State.fByteCountByteSet = 0;
|
||||
if( State.OutBitsFree < 8 )
|
||||
{
|
||||
if ( BufferNextByte(&State) )
|
||||
return 0;
|
||||
}
|
||||
// > Update last bytecount byte;
|
||||
if ( State.OutByteCountPos < State.OutPosCur )
|
||||
{
|
||||
(State.pOut)[State.OutByteCountPos] = (unsigned char) (State.OutPosCur - State.OutByteCountPos - 1);
|
||||
}
|
||||
State.OutPosCur++;
|
||||
return State.OutPosCur;
|
||||
}
|
||||
/* Check for currently last code */
|
||||
if( State.FreeCode == ( 1U << CodeBits ) )
|
||||
CodeBits++;
|
||||
State.FreeCode++;
|
||||
/* Check for full stringtable */
|
||||
if( State.FreeCode == 0xfff )
|
||||
{
|
||||
FlushStringTable(&State);
|
||||
if ( AddCodeToBuffer(&State, State.ClearCode, CodeBits ) )
|
||||
return 0;
|
||||
for (;;) {
|
||||
char Res;
|
||||
/* generate and save the next code, which may consist of multiple input pixels. */
|
||||
Res = NextCode(&State, &PixelValueCur, CodeBits);
|
||||
if (Res < 0)
|
||||
return 0;
|
||||
//* Check for end of data stream */
|
||||
if (!Res) {
|
||||
/* submit 'eoi' as the last item of the code stream */
|
||||
if (AddCodeToBuffer(&State, (unsigned short) (State.ClearCode + 1), CodeBits))
|
||||
return 0;
|
||||
State.fByteCountByteSet = 0;
|
||||
if (State.OutBitsFree < 8) {
|
||||
if (BufferNextByte(&State))
|
||||
return 0;
|
||||
}
|
||||
// > Update last bytecount byte;
|
||||
if (State.OutByteCountPos < State.OutPosCur) {
|
||||
(State.pOut)[State.OutByteCountPos] = (unsigned char) (State.OutPosCur - State.OutByteCountPos - 1);
|
||||
}
|
||||
State.OutPosCur++;
|
||||
return State.OutPosCur;
|
||||
}
|
||||
/* Check for currently last code */
|
||||
if (State.FreeCode == (1U << CodeBits))
|
||||
CodeBits++;
|
||||
State.FreeCode++;
|
||||
/* Check for full stringtable */
|
||||
if (State.FreeCode == 0xfff) {
|
||||
FlushStringTable(&State);
|
||||
if (AddCodeToBuffer(&State, State.ClearCode, CodeBits))
|
||||
return 0;
|
||||
|
||||
CodeBits=(unsigned char)( 1 + 2 );
|
||||
State.FreeCode=(unsigned short)( State.ClearCode + 2 );
|
||||
}
|
||||
}
|
||||
CodeBits = (unsigned char) (1 + 2);
|
||||
State.FreeCode = (unsigned short) (State.ClearCode + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int gif_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width, char *pixelbuf, int rotate_angle) {
|
||||
@ -286,12 +265,12 @@ int gif_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
int errno;
|
||||
int row, column;
|
||||
FILE *gif_file;
|
||||
unsigned short ImageWidth = image_width;
|
||||
unsigned short ImageHeight = image_height;
|
||||
unsigned short usTemp;
|
||||
unsigned short ImageWidth = image_width;
|
||||
unsigned short ImageHeight = image_height;
|
||||
unsigned short usTemp;
|
||||
int byte_out;
|
||||
#ifdef _MSC_VER
|
||||
char* rotated_bitmap;
|
||||
char* rotated_bitmap;
|
||||
char * lzwoutbuf;
|
||||
#endif
|
||||
|
||||
@ -299,8 +278,8 @@ int gif_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
char rotated_bitmap[image_height * image_width];
|
||||
char lzwoutbuf[image_height * image_width];
|
||||
#else
|
||||
rotated_bitmap = (char *) _alloca((image_height * image_width) * sizeof(char));
|
||||
lzwoutbuf = (char *) _alloca((image_height * image_width) * sizeof(char));
|
||||
rotated_bitmap = (char *) _alloca((image_height * image_width) * sizeof (char));
|
||||
lzwoutbuf = (char *) _alloca((image_height * image_width) * sizeof (char));
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
switch (rotate_angle) {
|
||||
@ -400,26 +379,26 @@ int gif_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
rotated_bitmap[1] = 1;
|
||||
rotated_bitmap[2] = 0;
|
||||
rotated_bitmap[3] = 0;
|
||||
*/
|
||||
*/
|
||||
|
||||
/* GIF signature (6) */
|
||||
memcpy(outbuf,"GIF87a",6);
|
||||
if ( TRANSPARENT_INDEX != -1 )
|
||||
outbuf[4]='9';
|
||||
memcpy(outbuf, "GIF87a", 6);
|
||||
if (TRANSPARENT_INDEX != -1)
|
||||
outbuf[4] = '9';
|
||||
fwrite(outbuf, 6, 1, gif_file);
|
||||
/* Screen Descriptor (7) */
|
||||
/* Screen Width */
|
||||
usTemp=(unsigned short)ImageWidth;
|
||||
outbuf[0] = (unsigned char)(0xff & usTemp);
|
||||
outbuf[1] = (unsigned char)( (0xff00 & usTemp) / 0x100 );
|
||||
usTemp = (unsigned short) ImageWidth;
|
||||
outbuf[0] = (unsigned char) (0xff & usTemp);
|
||||
outbuf[1] = (unsigned char) ((0xff00 & usTemp) / 0x100);
|
||||
/* Screen Height */
|
||||
usTemp=(unsigned short)ImageHeight;
|
||||
outbuf[2] = (unsigned char)( 0xff & usTemp );
|
||||
outbuf[3] = (unsigned char)( (0xff00 & usTemp) / 0x100 );
|
||||
usTemp = (unsigned short) ImageHeight;
|
||||
outbuf[2] = (unsigned char) (0xff & usTemp);
|
||||
outbuf[3] = (unsigned char) ((0xff00 & usTemp) / 0x100);
|
||||
/* write ImageBits-1 to the three least significant bits of byte 5 of
|
||||
* the Screen Descriptor
|
||||
*/
|
||||
outbuf[4] = (unsigned char)( 0xf0 | (0x7&(DESTINATION_IMAGE_BITS-1)) );
|
||||
outbuf[4] = (unsigned char) (0xf0 | (0x7 & (DESTINATION_IMAGE_BITS - 1)));
|
||||
/* Background color = colortable index 0 */
|
||||
outbuf[5] = 0x00;
|
||||
/* Byte 7 must be 0x00 */
|
||||
@ -427,21 +406,20 @@ int gif_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
fwrite(outbuf, 7, 1, gif_file);
|
||||
/* Global Color Table (6) */
|
||||
/* RGB 0 color */
|
||||
outbuf[0] = (unsigned char)(16 * ctoi(symbol->bgcolour[0])) + ctoi(symbol->bgcolour[1]);
|
||||
outbuf[1] = (unsigned char)(16 * ctoi(symbol->bgcolour[2])) + ctoi(symbol->bgcolour[3]);
|
||||
outbuf[2] = (unsigned char)(16 * ctoi(symbol->bgcolour[4])) + ctoi(symbol->bgcolour[5]);
|
||||
outbuf[0] = (unsigned char) (16 * ctoi(symbol->bgcolour[0])) + ctoi(symbol->bgcolour[1]);
|
||||
outbuf[1] = (unsigned char) (16 * ctoi(symbol->bgcolour[2])) + ctoi(symbol->bgcolour[3]);
|
||||
outbuf[2] = (unsigned char) (16 * ctoi(symbol->bgcolour[4])) + ctoi(symbol->bgcolour[5]);
|
||||
/* RGB 1 color */
|
||||
outbuf[3] = (unsigned char)(16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]);
|
||||
outbuf[4] = (unsigned char)(16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]);
|
||||
outbuf[5] = (unsigned char)(16 * ctoi(symbol->fgcolour[4])) + ctoi(symbol->fgcolour[5]);
|
||||
outbuf[3] = (unsigned char) (16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]);
|
||||
outbuf[4] = (unsigned char) (16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]);
|
||||
outbuf[5] = (unsigned char) (16 * ctoi(symbol->fgcolour[4])) + ctoi(symbol->fgcolour[5]);
|
||||
fwrite(outbuf, 6, 1, gif_file);
|
||||
|
||||
/* Graphic control extension (8) */
|
||||
/* A graphic control extension block is used for overlay gifs.
|
||||
* This is necessary to define a transparent color.
|
||||
*/
|
||||
if (TRANSPARENT_INDEX != -1)
|
||||
{
|
||||
if (TRANSPARENT_INDEX != -1) {
|
||||
/* Extension Introducer = '!' */
|
||||
outbuf[0] = '\x21';
|
||||
/* Graphic Control Label */
|
||||
@ -459,7 +437,7 @@ int gif_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
outbuf[4] = 0;
|
||||
outbuf[5] = 0;
|
||||
/* Transparent Color Index */
|
||||
outbuf[6] = (unsigned char)TRANSPARENT_INDEX;
|
||||
outbuf[6] = (unsigned char) TRANSPARENT_INDEX;
|
||||
/* Block Terminator */
|
||||
outbuf[7] = 0;
|
||||
fwrite(outbuf, 8, 1, gif_file);
|
||||
@ -474,33 +452,32 @@ int gif_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
outbuf[3] = 0x00;
|
||||
outbuf[4] = 0x00;
|
||||
/* Image Width (low byte first) */
|
||||
outbuf[5] = (unsigned char)(0xff & ImageWidth);
|
||||
outbuf[6] = (unsigned char)((0xff00 & ImageWidth) / 0x100);
|
||||
outbuf[5] = (unsigned char) (0xff & ImageWidth);
|
||||
outbuf[6] = (unsigned char) ((0xff00 & ImageWidth) / 0x100);
|
||||
/* Image Height */
|
||||
outbuf[7] = (unsigned char)(0xff & ImageHeight);
|
||||
outbuf[8] = (unsigned char)((0xff00 & ImageHeight) / 0x100);
|
||||
outbuf[7] = (unsigned char) (0xff & ImageHeight);
|
||||
outbuf[8] = (unsigned char) ((0xff00 & ImageHeight) / 0x100);
|
||||
|
||||
/* Byte 10 contains the interlaced flag and
|
||||
* information on the local color table.
|
||||
* There is no local color table if its most significant bit is reset.
|
||||
*/
|
||||
outbuf[9] = (unsigned char)(0|(0x7 & (DESTINATION_IMAGE_BITS-1)));
|
||||
outbuf[9] = (unsigned char) (0 | (0x7 & (DESTINATION_IMAGE_BITS - 1)));
|
||||
fwrite(outbuf, 10, 1, gif_file);
|
||||
|
||||
/* call lzw encoding */
|
||||
byte_out = gif_lzw(
|
||||
(unsigned char *) lzwoutbuf,
|
||||
image_height * image_width,
|
||||
(unsigned char *) rotated_bitmap,
|
||||
image_height * image_width);
|
||||
if (byte_out <= 0)
|
||||
{
|
||||
(unsigned char *) lzwoutbuf,
|
||||
image_height * image_width,
|
||||
(unsigned char *) rotated_bitmap,
|
||||
image_height * image_width);
|
||||
if (byte_out <= 0) {
|
||||
fclose(gif_file);
|
||||
return ZINT_ERROR_MEMORY;
|
||||
}
|
||||
fwrite(lzwoutbuf, byte_out, 1, gif_file);
|
||||
|
||||
/* GIF terminator */
|
||||
/* GIF terminator */
|
||||
fputc('\x3b', gif_file);
|
||||
fclose(gif_file);
|
||||
|
||||
|
@ -69,7 +69,7 @@ void itostr(char ai_string[], int ai_value) {
|
||||
strcat(ai_string, ")");
|
||||
}
|
||||
|
||||
int gs1_verify(struct zint_symbol *symbol, const unsigned char source[], const unsigned int src_len, char reduced[]) {
|
||||
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[6];
|
||||
int bracket_level, max_bracket_level, ai_length, max_ai_length, min_ai_length;
|
||||
|
@ -36,7 +36,7 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern int gs1_verify(struct zint_symbol *symbol, const unsigned char source[], const unsigned int src_len, char reduced[]);
|
||||
extern int gs1_verify(struct zint_symbol *symbol, const unsigned char source[], const size_t src_len, char reduced[]);
|
||||
extern int ugs1_verify(struct zint_symbol *symbol, const unsigned char source[], const unsigned int src_len, unsigned char reduced[]);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "reedsol.h"
|
||||
#include "hanxin.h"
|
||||
#include "gb18030.h"
|
||||
#include "assert.h"
|
||||
|
||||
/* Find which submode to use for a text character */
|
||||
int getsubmode(char input) {
|
||||
@ -354,7 +355,7 @@ void calculate_binary(char binary[], char mode[], int source[], int length, int
|
||||
block_length++;
|
||||
} while (mode[position + block_length] == mode[position]);
|
||||
|
||||
switch(mode[position]) {
|
||||
switch (mode[position]) {
|
||||
case 'n':
|
||||
/* Numeric mode */
|
||||
/* Mode indicator */
|
||||
@ -841,7 +842,7 @@ void hx_setup_grid(unsigned char* grid, int size, int version) {
|
||||
grid[(7 * size) + i] = 0x10;
|
||||
grid[(i * size) + 7] = 0x10;
|
||||
|
||||
/* Top right */
|
||||
/* Top right */
|
||||
grid[(7 * size) + (size - i - 1)] = 0x10;
|
||||
grid[((size - i - 1) * size) + 7] = 0x10;
|
||||
|
||||
@ -860,7 +861,7 @@ void hx_setup_grid(unsigned char* grid, int size, int version) {
|
||||
grid[(8 * size) + i] = 0x10;
|
||||
grid[(i * size) + 8] = 0x10;
|
||||
|
||||
/* Top right */
|
||||
/* Top right */
|
||||
grid[(8 * size) + (size - i - 1)] = 0x10;
|
||||
grid[((size - i - 1) * size) + 8] = 0x10;
|
||||
|
||||
@ -991,7 +992,7 @@ void hx_add_ecc(unsigned char fullstream[], unsigned char datastream[], int vers
|
||||
data_length = hx_table_d1[(((version - 1) + (ecc_level - 1)) * 9) + (3 * i) + 1];
|
||||
ecc_length = hx_table_d1[(((version - 1) + (ecc_level - 1)) * 9) + (3 * i) + 2];
|
||||
|
||||
for(block = 0; block < batch_size; block++) {
|
||||
for (block = 0; block < batch_size; block++) {
|
||||
for (j = 0; j < data_length; j++) {
|
||||
input_position++;
|
||||
output_position++;
|
||||
@ -1319,7 +1320,7 @@ int han_xin(struct zint_symbol *symbol, const unsigned char source[], int length
|
||||
int* gbdata = (int *) _alloca(((length + 1) * 2) * sizeof (int));
|
||||
char* mode = (char *) _alloca((length + 1) * sizeof (char));
|
||||
char* binary;
|
||||
unsigned char *datastream;
|
||||
unsigned char *datastream;
|
||||
unsigned char *fullstream;
|
||||
unsigned char *picket_fence;
|
||||
unsigned char *grid;
|
||||
@ -1376,9 +1377,9 @@ int han_xin(struct zint_symbol *symbol, const unsigned char source[], int length
|
||||
}
|
||||
}
|
||||
}
|
||||
length = posn;
|
||||
}
|
||||
|
||||
length = posn;
|
||||
hx_define_mode(mode, gbdata, length);
|
||||
|
||||
est_binlen = calculate_binlength(mode, gbdata, length, symbol->eci);
|
||||
@ -1390,13 +1391,9 @@ int han_xin(struct zint_symbol *symbol, const unsigned char source[], int length
|
||||
#ifndef _MSC_VER
|
||||
char binary[est_binlen + 1];
|
||||
#else
|
||||
binary = (char *) _alloca((est_binlen + 1) * sizeof (char));;
|
||||
binary = (char *) _alloca((est_binlen + 10) * sizeof (char));
|
||||
#endif
|
||||
for (i = 0; i < est_binlen + 1; i++) {
|
||||
binary[i] = '\0';
|
||||
}
|
||||
|
||||
binary[0] = '\0';
|
||||
memset(binary, 0, (est_binlen + 1) * sizeof (char));
|
||||
|
||||
if ((ecc_level <= 0) || (ecc_level >= 5)) {
|
||||
ecc_level = 1;
|
||||
@ -1408,7 +1405,7 @@ int han_xin(struct zint_symbol *symbol, const unsigned char source[], int length
|
||||
for (i = 84; i > 0; i--) {
|
||||
switch (ecc_level) {
|
||||
case 1:
|
||||
if (hx_data_codewords_L1[i - 1] > est_codewords ) {
|
||||
if (hx_data_codewords_L1[i - 1] > est_codewords) {
|
||||
version = i;
|
||||
data_codewords = hx_data_codewords_L1[i - 1];
|
||||
}
|
||||
@ -1431,6 +1428,9 @@ int han_xin(struct zint_symbol *symbol, const unsigned char source[], int length
|
||||
data_codewords = hx_data_codewords_L4[i - 1];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1484,7 +1484,7 @@ int han_xin(struct zint_symbol *symbol, const unsigned char source[], int length
|
||||
datastream[i] = 0;
|
||||
}
|
||||
|
||||
for(i = 0; i < est_binlen; i++) {
|
||||
for (i = 0; i < est_binlen; i++) {
|
||||
if (binary[i] == '1') {
|
||||
datastream[i / 8] += 0x80 >> (i % 8);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
/* Data from table B1: Data capacity of Han Xin Code */
|
||||
static int hx_total_codewords[] = {
|
||||
static const int hx_total_codewords[] = {
|
||||
25, 37, 50, 54, 69, 84, 100, 117, 136, 155, 161, 181, 203, 225, 249,
|
||||
273, 299, 325, 353, 381, 411, 422, 453, 485, 518, 552, 587, 623, 660,
|
||||
698, 737, 754, 794, 836, 878, 922, 966, 1011, 1058, 1105, 1126, 1175,
|
||||
@ -41,7 +41,7 @@ static int hx_total_codewords[] = {
|
||||
3500, 3585, 3671, 3758, 3798, 3886
|
||||
};
|
||||
|
||||
static int hx_data_codewords_L1[] = {
|
||||
static const int hx_data_codewords_L1[] = {
|
||||
21, 31, 42, 46, 57, 70, 84, 99, 114, 131, 135, 153, 171, 189, 209, 229,
|
||||
251, 273, 297, 321, 345, 354, 381, 407, 436, 464, 493, 523, 554, 586, 619,
|
||||
634, 666, 702, 738, 774, 812, 849, 888, 929, 946, 987, 1028, 1071, 1115,
|
||||
@ -51,8 +51,8 @@ static int hx_data_codewords_L1[] = {
|
||||
3083, 3156, 3190, 3264
|
||||
};
|
||||
|
||||
static int hx_data_codewords_L2[] = {
|
||||
17, 25, 34, 38, 49, 58, 70, 81, 96, 109, 113, 127, 143, 157, 175,191, 209,
|
||||
static const int hx_data_codewords_L2[] = {
|
||||
17, 25, 34, 38, 49, 58, 70, 81, 96, 109, 113, 127, 143, 157, 175, 191, 209,
|
||||
227, 247, 267, 287, 296, 317, 339, 362, 386, 411, 437, 462, 488, 515, 528,
|
||||
556, 586, 614, 646, 676, 707, 740, 773, 788, 823, 856, 893, 929, 966, 1004,
|
||||
1043, 1059, 1099, 1140, 1180, 1221, 1263, 1307, 1351, 1394, 1415, 1460,
|
||||
@ -61,16 +61,16 @@ static int hx_data_codewords_L2[] = {
|
||||
2720
|
||||
};
|
||||
|
||||
static int hx_data_codewords_L3[] = {
|
||||
static const int hx_data_codewords_L3[] = {
|
||||
13, 19, 26, 30, 37, 46, 54, 63, 74, 83, 87, 97, 109, 121, 135, 147, 161,
|
||||
175, 191, 205, 221, 228, 245, 261, 280, 298, 317, 337, 358, 376, 397, 408,
|
||||
428, 452, 474, 498, 522, 545, 572, 597, 608, 635, 660, 689, 717, 746, 774,
|
||||
805, 817, 847, 880, 910, 943, 975, 1009, 1041, 1076, 1091, 1126, 1161, 1198,
|
||||
1234, 1271, 1309, 1348, 1366, 1404, 1443, 1485, 1524, 1566, 1607,1650, 1693,
|
||||
1234, 1271, 1309, 1348, 1366, 1404, 1443, 1485, 1524, 1566, 1607, 1650, 1693,
|
||||
1713, 1756, 1800, 1844, 1890, 1935, 1983, 2030, 2050, 2098
|
||||
};
|
||||
|
||||
static int hx_data_codewords_L4[] = {
|
||||
static const int hx_data_codewords_L4[] = {
|
||||
9, 15, 20, 22, 27, 34, 40, 47, 54, 61, 65, 73, 81, 89, 99, 109, 119, 129,
|
||||
141, 153, 165, 168, 181, 195, 208, 220, 235, 251, 264, 280, 295, 302, 318,
|
||||
334, 352, 368, 386, 405, 424, 441, 450, 469, 490, 509, 531, 552, 574, 595, 605,
|
||||
@ -80,8 +80,8 @@ static int hx_data_codewords_L4[] = {
|
||||
};
|
||||
|
||||
/* Value 'k' from Annex A */
|
||||
static int hx_module_k[] = {
|
||||
0, 0, 0, 14, 16, 16, 17, 18, 19, 20,
|
||||
static const int hx_module_k[] = {
|
||||
0, 0, 0, 14, 16, 16, 17, 18, 19, 20,
|
||||
14, 15, 16, 16, 17, 17, 18, 19, 20, 20,
|
||||
21, 16, 17, 17, 18, 18, 19, 19, 20, 20,
|
||||
21, 17, 17, 18, 18, 19, 19, 19, 20, 20,
|
||||
@ -93,8 +93,8 @@ static int hx_module_k[] = {
|
||||
};
|
||||
|
||||
/* Value 'r' from Annex A */
|
||||
static int hx_module_r[] = {
|
||||
0, 0, 0, 15, 15, 17, 18, 19, 20, 21,
|
||||
static const int hx_module_r[] = {
|
||||
0, 0, 0, 15, 15, 17, 18, 19, 20, 21,
|
||||
15, 15, 15, 17, 17, 19, 19, 19, 19, 21,
|
||||
21, 17, 16, 18, 17, 19, 18, 20, 19, 21,
|
||||
20, 17, 19, 17, 19, 17, 19, 21, 19, 21,
|
||||
@ -106,7 +106,7 @@ static int hx_module_r[] = {
|
||||
};
|
||||
|
||||
/* Value of 'm' from Annex A */
|
||||
static int hx_module_m[] = {
|
||||
static const int hx_module_m[] = {
|
||||
0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||
@ -119,7 +119,7 @@ static int hx_module_m[] = {
|
||||
};
|
||||
|
||||
/* Error correction block sizes from Table D1 */
|
||||
static int hx_table_d1[] = {
|
||||
static const int hx_table_d1[] = {
|
||||
/* #blocks, k, 2t, #blocks, k, 2t, #blocks, k, 2t */
|
||||
1, 21, 4, 0, 0, 0, 0, 0, 0, // version 1
|
||||
1, 17, 8, 0, 0, 0, 0, 0, 0,
|
||||
@ -247,7 +247,7 @@ static int hx_table_d1[] = {
|
||||
13, 19, 28, 3, 16, 26, 0, 0, 0,
|
||||
4, 127, 24, 1, 126, 24, 0, 0, 0, // version 32
|
||||
7, 66, 28, 1, 66, 30, 0, 0, 0,
|
||||
12, 30,24, 1, 24, 28, 1, 24, 30,
|
||||
12, 30, 24, 1, 24, 28, 1, 24, 30,
|
||||
15, 19, 28, 1, 17, 32, 0, 0, 0,
|
||||
7, 84, 16, 1, 78, 16, 0, 0, 0, // version 33
|
||||
7, 70, 30, 1, 66, 28, 0, 0, 0,
|
||||
|
@ -150,21 +150,21 @@ extern int get_best_eci(unsigned char source[], int length); /* Calculate suitab
|
||||
extern int utf_to_eci(int eci, const unsigned char source[], unsigned char dest[], int *length); /* Convert Unicode to other encodings */
|
||||
|
||||
extern int eanx(struct zint_symbol *symbol, unsigned char source[], int length); /* EAN system barcodes */
|
||||
extern int c39(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 3 from 9 (or Code 39) */
|
||||
extern int c39(struct zint_symbol *symbol, unsigned char source[], const size_t length); /* Code 3 from 9 (or Code 39) */
|
||||
extern int pharmazentral(struct zint_symbol *symbol, unsigned char source[], int length); /* Pharmazentral Nummer (PZN) */
|
||||
extern int ec39(struct zint_symbol *symbol, unsigned char source[], int length); /* Extended Code 3 from 9 (or Code 39+) */
|
||||
extern int codabar(struct zint_symbol *symbol, unsigned char source[], int length); /* Codabar - a simple substitution cipher */
|
||||
extern int matrix_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 Standard (& Matrix) */
|
||||
extern int industrial_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 Industrial */
|
||||
extern int iata_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 IATA */
|
||||
extern int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 Interleaved */
|
||||
extern int interleaved_two_of_five(struct zint_symbol *symbol, const unsigned char source[], size_t length); /* Code 2 of 5 Interleaved */
|
||||
extern int logic_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 Data Logic */
|
||||
extern int itf14(struct zint_symbol *symbol, unsigned char source[], int length); /* ITF-14 */
|
||||
extern int dpleit(struct zint_symbol *symbol, unsigned char source[], int length); /* Deutsche Post Leitcode */
|
||||
extern int dpident(struct zint_symbol *symbol, unsigned char source[], int length); /* Deutsche Post Identcode */
|
||||
extern int c93(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 93 - a re-working of Code 39+, generates 2 check digits */
|
||||
extern int code_128(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 128 and NVE-18 */
|
||||
extern int ean_128(struct zint_symbol *symbol, unsigned char source[], int length); /* EAN-128 (GS1-128) */
|
||||
extern int ean_128(struct zint_symbol *symbol, unsigned char source[], const size_t length); /* EAN-128 (GS1-128) */
|
||||
extern int code_11(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 11 */
|
||||
extern int msi_handle(struct zint_symbol *symbol, unsigned char source[], int length); /* MSI Plessey */
|
||||
extern int telepen(struct zint_symbol *symbol, unsigned char source[], int length); /* Telepen ASCII */
|
||||
@ -181,7 +181,7 @@ extern int royal_plot(struct zint_symbol *symbol, unsigned char source[], int le
|
||||
extern int australia_post(struct zint_symbol *symbol, unsigned char source[], int length); /* Australia Post 4-state */
|
||||
extern int code16k(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 16k */
|
||||
extern int pdf417enc(struct zint_symbol *symbol, unsigned char source[], int length); /* PDF417 */
|
||||
extern int dmatrix(struct zint_symbol *symbol, unsigned char source[], int length); /* Data Matrix (IEC16022) */
|
||||
extern int dmatrix(struct zint_symbol *symbol, const unsigned char source[], int length); /* Data Matrix (IEC16022) */
|
||||
extern int qr_code(struct zint_symbol *symbol, const unsigned char source[], int length); /* QR Code */
|
||||
extern int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], int length); /* Micro PDF417 */
|
||||
extern int maxicode(struct zint_symbol *symbol, unsigned char source[], int length); /* Maxicode */
|
||||
@ -283,7 +283,7 @@ int dump_plot(struct zint_symbol *symbol) {
|
||||
}
|
||||
|
||||
/* Process health industry bar code data */
|
||||
int hibc(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
static int hibc(struct zint_symbol *symbol, unsigned char source[], size_t length) {
|
||||
int counter, error_number, i;
|
||||
char to_process[40], temp[2], check_digit;
|
||||
|
||||
@ -575,14 +575,14 @@ static int extended_charset(struct zint_symbol *symbol, const unsigned char *sou
|
||||
return error_number;
|
||||
}
|
||||
|
||||
static int reduced_charset(struct zint_symbol *symbol, const unsigned char *source, int length) {
|
||||
static int reduced_charset(struct zint_symbol *symbol, const unsigned char *source, int in_length) {
|
||||
/* These are the "norm" standards which only support Latin-1 at most */
|
||||
int error_number = 0;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
unsigned char preprocessed[length + 1];
|
||||
unsigned char preprocessed[in_length + 1];
|
||||
#else
|
||||
unsigned char* preprocessed = (unsigned char*) _alloca(length + 1);
|
||||
unsigned char* preprocessed = (unsigned char*) _alloca(in_length + 1);
|
||||
#endif
|
||||
|
||||
if (symbol->symbology == BARCODE_CODE16K) {
|
||||
@ -592,8 +592,8 @@ static int reduced_charset(struct zint_symbol *symbol, const unsigned char *sour
|
||||
symbol->output_options += BARCODE_BIND;
|
||||
}
|
||||
}
|
||||
|
||||
if (symbol->symbology == BARCODE_ITF14) {
|
||||
else
|
||||
if (symbol->symbology == BARCODE_ITF14) {
|
||||
symbol->whitespace_width = 20;
|
||||
symbol->border_width = 8;
|
||||
if (!(symbol->output_options & BARCODE_BOX)) {
|
||||
@ -604,11 +604,11 @@ static int reduced_charset(struct zint_symbol *symbol, const unsigned char *sour
|
||||
switch (symbol->input_mode) {
|
||||
case DATA_MODE:
|
||||
case GS1_MODE:
|
||||
memcpy(preprocessed, source, length);
|
||||
preprocessed[length] = '\0';
|
||||
memcpy(preprocessed, source, in_length);
|
||||
preprocessed[in_length] = '\0';
|
||||
break;
|
||||
case UNICODE_MODE:
|
||||
error_number = utf_to_eci(symbol->eci, source, preprocessed, &length);
|
||||
error_number = utf_to_eci(symbol->eci, source, preprocessed, &in_length);
|
||||
if (error_number != 0) {
|
||||
strcpy(symbol->errtxt, "Invalid characters in input data");
|
||||
return error_number;
|
||||
@ -617,186 +617,186 @@ static int reduced_charset(struct zint_symbol *symbol, const unsigned char *sour
|
||||
}
|
||||
|
||||
switch (symbol->symbology) {
|
||||
case BARCODE_C25MATRIX: error_number = matrix_two_of_five(symbol, preprocessed, length);
|
||||
case BARCODE_C25MATRIX: error_number = matrix_two_of_five(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_C25IND: error_number = industrial_two_of_five(symbol, preprocessed, length);
|
||||
case BARCODE_C25IND: error_number = industrial_two_of_five(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_C25INTER: error_number = interleaved_two_of_five(symbol, preprocessed, length);
|
||||
case BARCODE_C25INTER: error_number = interleaved_two_of_five(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_C25IATA: error_number = iata_two_of_five(symbol, preprocessed, length);
|
||||
case BARCODE_C25IATA: error_number = iata_two_of_five(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_C25LOGIC: error_number = logic_two_of_five(symbol, preprocessed, length);
|
||||
case BARCODE_C25LOGIC: error_number = logic_two_of_five(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_DPLEIT: error_number = dpleit(symbol, preprocessed, length);
|
||||
case BARCODE_DPLEIT: error_number = dpleit(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_DPIDENT: error_number = dpident(symbol, preprocessed, length);
|
||||
case BARCODE_DPIDENT: error_number = dpident(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_UPCA: error_number = eanx(symbol, preprocessed, length);
|
||||
case BARCODE_UPCA: error_number = eanx(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_UPCE: error_number = eanx(symbol, preprocessed, length);
|
||||
case BARCODE_UPCE: error_number = eanx(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_EANX: error_number = eanx(symbol, preprocessed, length);
|
||||
case BARCODE_EANX: error_number = eanx(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_EAN128: error_number = ean_128(symbol, preprocessed, length);
|
||||
case BARCODE_EAN128: error_number = ean_128(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_CODE39: error_number = c39(symbol, preprocessed, length);
|
||||
case BARCODE_CODE39: error_number = c39(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_PZN: error_number = pharmazentral(symbol, preprocessed, length);
|
||||
case BARCODE_PZN: error_number = pharmazentral(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_EXCODE39: error_number = ec39(symbol, preprocessed, length);
|
||||
case BARCODE_EXCODE39: error_number = ec39(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_CODABAR: error_number = codabar(symbol, preprocessed, length);
|
||||
case BARCODE_CODABAR: error_number = codabar(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_CODE93: error_number = c93(symbol, preprocessed, length);
|
||||
case BARCODE_CODE93: error_number = c93(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_LOGMARS: error_number = c39(symbol, preprocessed, length);
|
||||
case BARCODE_LOGMARS: error_number = c39(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_CODE128: error_number = code_128(symbol, preprocessed, length);
|
||||
case BARCODE_CODE128: error_number = code_128(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_CODE128B: error_number = code_128(symbol, preprocessed, length);
|
||||
case BARCODE_CODE128B: error_number = code_128(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_NVE18: error_number = nve_18(symbol, preprocessed, length);
|
||||
case BARCODE_NVE18: error_number = nve_18(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_CODE11: error_number = code_11(symbol, preprocessed, length);
|
||||
case BARCODE_CODE11: error_number = code_11(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_MSI_PLESSEY: error_number = msi_handle(symbol, preprocessed, length);
|
||||
case BARCODE_MSI_PLESSEY: error_number = msi_handle(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_TELEPEN: error_number = telepen(symbol, preprocessed, length);
|
||||
case BARCODE_TELEPEN: error_number = telepen(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_TELEPEN_NUM: error_number = telepen_num(symbol, preprocessed, length);
|
||||
case BARCODE_TELEPEN_NUM: error_number = telepen_num(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_PHARMA: error_number = pharma_one(symbol, preprocessed, length);
|
||||
case BARCODE_PHARMA: error_number = pharma_one(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_PLESSEY: error_number = plessey(symbol, preprocessed, length);
|
||||
case BARCODE_PLESSEY: error_number = plessey(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_ITF14: error_number = itf14(symbol, preprocessed, length);
|
||||
case BARCODE_ITF14: error_number = itf14(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_FLAT: error_number = flattermarken(symbol, preprocessed, length);
|
||||
case BARCODE_FLAT: error_number = flattermarken(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_FIM: error_number = fim(symbol, preprocessed, length);
|
||||
case BARCODE_FIM: error_number = fim(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_POSTNET: error_number = post_plot(symbol, preprocessed, length);
|
||||
case BARCODE_POSTNET: error_number = post_plot(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_PLANET: error_number = planet_plot(symbol, preprocessed, length);
|
||||
case BARCODE_PLANET: error_number = planet_plot(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RM4SCC: error_number = royal_plot(symbol, preprocessed, length);
|
||||
case BARCODE_RM4SCC: error_number = royal_plot(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_AUSPOST: error_number = australia_post(symbol, preprocessed, length);
|
||||
case BARCODE_AUSPOST: error_number = australia_post(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_AUSREPLY: error_number = australia_post(symbol, preprocessed, length);
|
||||
case BARCODE_AUSREPLY: error_number = australia_post(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_AUSROUTE: error_number = australia_post(symbol, preprocessed, length);
|
||||
case BARCODE_AUSROUTE: error_number = australia_post(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_AUSREDIRECT: error_number = australia_post(symbol, preprocessed, length);
|
||||
case BARCODE_AUSREDIRECT: error_number = australia_post(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_CODE16K: error_number = code16k(symbol, preprocessed, length);
|
||||
case BARCODE_CODE16K: error_number = code16k(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_PHARMA_TWO: error_number = pharma_two(symbol, preprocessed, length);
|
||||
case BARCODE_PHARMA_TWO: error_number = pharma_two(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_ONECODE: error_number = imail(symbol, preprocessed, length);
|
||||
case BARCODE_ONECODE: error_number = imail(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_ISBNX: error_number = eanx(symbol, preprocessed, length);
|
||||
case BARCODE_ISBNX: error_number = eanx(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RSS14: error_number = rss14(symbol, preprocessed, length);
|
||||
case BARCODE_RSS14: error_number = rss14(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RSS14STACK: error_number = rss14(symbol, preprocessed, length);
|
||||
case BARCODE_RSS14STACK: error_number = rss14(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RSS14STACK_OMNI: error_number = rss14(symbol, preprocessed, length);
|
||||
case BARCODE_RSS14STACK_OMNI: error_number = rss14(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RSS_LTD: error_number = rsslimited(symbol, preprocessed, length);
|
||||
case BARCODE_RSS_LTD: error_number = rsslimited(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RSS_EXP: error_number = rssexpanded(symbol, preprocessed, length);
|
||||
case BARCODE_RSS_EXP: error_number = rssexpanded(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RSS_EXPSTACK: error_number = rssexpanded(symbol, preprocessed, length);
|
||||
case BARCODE_RSS_EXPSTACK: error_number = rssexpanded(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_EANX_CC: error_number = composite(symbol, preprocessed, length);
|
||||
case BARCODE_EANX_CC: error_number = composite(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_EAN128_CC: error_number = composite(symbol, preprocessed, length);
|
||||
case BARCODE_EAN128_CC: error_number = composite(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RSS14_CC: error_number = composite(symbol, preprocessed, length);
|
||||
case BARCODE_RSS14_CC: error_number = composite(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RSS_LTD_CC: error_number = composite(symbol, preprocessed, length);
|
||||
case BARCODE_RSS_LTD_CC: error_number = composite(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RSS_EXP_CC: error_number = composite(symbol, preprocessed, length);
|
||||
case BARCODE_RSS_EXP_CC: error_number = composite(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_UPCA_CC: error_number = composite(symbol, preprocessed, length);
|
||||
case BARCODE_UPCA_CC: error_number = composite(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_UPCE_CC: error_number = composite(symbol, preprocessed, length);
|
||||
case BARCODE_UPCE_CC: error_number = composite(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RSS14STACK_CC: error_number = composite(symbol, preprocessed, length);
|
||||
case BARCODE_RSS14STACK_CC: error_number = composite(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RSS14_OMNI_CC: error_number = composite(symbol, preprocessed, length);
|
||||
case BARCODE_RSS14_OMNI_CC: error_number = composite(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_RSS_EXPSTACK_CC: error_number = composite(symbol, preprocessed, length);
|
||||
case BARCODE_RSS_EXPSTACK_CC: error_number = composite(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_KIX: error_number = kix_code(symbol, preprocessed, length);
|
||||
case BARCODE_KIX: error_number = kix_code(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_CODE32: error_number = code32(symbol, preprocessed, length);
|
||||
case BARCODE_CODE32: error_number = code32(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_DAFT: error_number = daft_code(symbol, preprocessed, length);
|
||||
case BARCODE_DAFT: error_number = daft_code(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_EAN14: error_number = ean_14(symbol, preprocessed, length);
|
||||
case BARCODE_EAN14: error_number = ean_14(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_AZRUNE: error_number = aztec_runes(symbol, preprocessed, length);
|
||||
case BARCODE_AZRUNE: error_number = aztec_runes(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_KOREAPOST: error_number = korea_post(symbol, preprocessed, length);
|
||||
case BARCODE_KOREAPOST: error_number = korea_post(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_HIBC_128: error_number = hibc(symbol, preprocessed, length);
|
||||
case BARCODE_HIBC_128: error_number = hibc(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_HIBC_39: error_number = hibc(symbol, preprocessed, length);
|
||||
case BARCODE_HIBC_39: error_number = hibc(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_HIBC_DM: error_number = hibc(symbol, preprocessed, length);
|
||||
case BARCODE_HIBC_DM: error_number = hibc(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_HIBC_QR: error_number = hibc(symbol, preprocessed, length);
|
||||
case BARCODE_HIBC_QR: error_number = hibc(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_HIBC_PDF: error_number = hibc(symbol, preprocessed, length);
|
||||
case BARCODE_HIBC_PDF: error_number = hibc(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_HIBC_MICPDF: error_number = hibc(symbol, preprocessed, length);
|
||||
case BARCODE_HIBC_MICPDF: error_number = hibc(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_HIBC_AZTEC: error_number = hibc(symbol, preprocessed, length);
|
||||
case BARCODE_HIBC_AZTEC: error_number = hibc(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_HIBC_BLOCKF: error_number = hibc(symbol, preprocessed, length);
|
||||
case BARCODE_HIBC_BLOCKF: error_number = hibc(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_JAPANPOST: error_number = japan_post(symbol, preprocessed, length);
|
||||
case BARCODE_JAPANPOST: error_number = japan_post(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_CODE49: error_number = code_49(symbol, preprocessed, length);
|
||||
case BARCODE_CODE49: error_number = code_49(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_CHANNEL: error_number = channel_code(symbol, preprocessed, length);
|
||||
case BARCODE_CHANNEL: error_number = channel_code(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_CODEONE: error_number = code_one(symbol, preprocessed, length);
|
||||
case BARCODE_CODEONE: error_number = code_one(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_DATAMATRIX: error_number = dmatrix(symbol, preprocessed, length);
|
||||
case BARCODE_DATAMATRIX: error_number = dmatrix(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_PDF417: error_number = pdf417enc(symbol, preprocessed, length);
|
||||
case BARCODE_PDF417: error_number = pdf417enc(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_PDF417TRUNC: error_number = pdf417enc(symbol, preprocessed, length);
|
||||
case BARCODE_PDF417TRUNC: error_number = pdf417enc(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_MICROPDF417: error_number = micro_pdf417(symbol, preprocessed, length);
|
||||
case BARCODE_MICROPDF417: error_number = micro_pdf417(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_MAXICODE: error_number = maxicode(symbol, preprocessed, length);
|
||||
case BARCODE_MAXICODE: error_number = maxicode(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_AZTEC: error_number = aztec(symbol, preprocessed, length);
|
||||
case BARCODE_AZTEC: error_number = aztec(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_DOTCODE: error_number = dotcode(symbol, preprocessed, length);
|
||||
case BARCODE_DOTCODE: error_number = dotcode(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_CODABLOCK: error_number = codablock(symbol, preprocessed, length);
|
||||
case BARCODE_CODABLOCK: error_number = codablock(symbol, preprocessed, in_length);
|
||||
break;
|
||||
}
|
||||
|
||||
return error_number;
|
||||
}
|
||||
|
||||
int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int length) {
|
||||
int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int in_length) {
|
||||
int error_number, error_buffer, i;
|
||||
#ifdef _MSC_VER
|
||||
unsigned char* local_source;
|
||||
#endif
|
||||
error_number = 0;
|
||||
|
||||
if (length == 0) {
|
||||
length = ustrlen(source);
|
||||
if (in_length == 0) {
|
||||
in_length = (int) ustrlen(source);
|
||||
}
|
||||
if (length == 0) {
|
||||
if (in_length == 0) {
|
||||
strcpy(symbol->errtxt, "No input data");
|
||||
error_tag(symbol->errtxt, ZINT_ERROR_INVALID_DATA);
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
@ -810,9 +810,9 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt
|
||||
#endif
|
||||
}
|
||||
#ifndef _MSC_VER
|
||||
unsigned char local_source[length + 1];
|
||||
unsigned char local_source[in_length + 1];
|
||||
#else
|
||||
local_source = (unsigned char*) _alloca(length + 1);
|
||||
local_source = (unsigned char*) _alloca(in_length + 1);
|
||||
#endif
|
||||
|
||||
/* First check the symbology field */
|
||||
@ -965,25 +965,25 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt
|
||||
}
|
||||
|
||||
if (symbol->input_mode == GS1_MODE) {
|
||||
for (i = 0; i < length; i++) {
|
||||
for (i = 0; i < in_length; i++) {
|
||||
if (source[i] == '\0') {
|
||||
strcpy(symbol->errtxt, "NULL characters not permitted in GS1 mode");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
}
|
||||
if (gs1_compliant(symbol->symbology) == 1) {
|
||||
error_number = ugs1_verify(symbol, source, length, local_source);
|
||||
error_number = ugs1_verify(symbol, source, in_length, local_source);
|
||||
if (error_number != 0) {
|
||||
return error_number;
|
||||
}
|
||||
length = ustrlen(local_source);
|
||||
in_length = ustrlen(local_source);
|
||||
} else {
|
||||
strcpy(symbol->errtxt, "Selected symbology does not support GS1 mode");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
} else {
|
||||
memcpy(local_source, source, length);
|
||||
local_source[length] = '\0';
|
||||
memcpy(local_source, source, in_length);
|
||||
local_source[in_length] = '\0';
|
||||
}
|
||||
|
||||
switch (symbol->symbology) {
|
||||
@ -991,17 +991,17 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt
|
||||
case BARCODE_MICROQR:
|
||||
case BARCODE_GRIDMATRIX:
|
||||
case BARCODE_HANXIN:
|
||||
error_number = extended_charset(symbol, local_source, length);
|
||||
error_number = extended_charset(symbol, local_source, in_length);
|
||||
break;
|
||||
default:
|
||||
error_number = reduced_charset(symbol, local_source, length);
|
||||
error_number = reduced_charset(symbol, local_source, in_length);
|
||||
break;
|
||||
}
|
||||
|
||||
if ((error_number == ZINT_ERROR_INVALID_DATA) && (supports_eci(symbol->symbology)
|
||||
&& (symbol->input_mode == UNICODE_MODE))) {
|
||||
/* Try another ECI mode */
|
||||
symbol->eci = get_best_eci(local_source, length);
|
||||
symbol->eci = get_best_eci(local_source, in_length);
|
||||
|
||||
if (symbol->eci >= 3) {
|
||||
|
||||
@ -1012,18 +1012,18 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt
|
||||
case BARCODE_MICROQR:
|
||||
case BARCODE_GRIDMATRIX:
|
||||
case BARCODE_HANXIN:
|
||||
error_number = utf_to_eci(symbol->eci, source, local_source, &length);
|
||||
error_number = extended_charset(symbol, local_source, length);
|
||||
error_number = utf_to_eci(symbol->eci, source, local_source, &in_length);
|
||||
error_number = extended_charset(symbol, local_source, in_length);
|
||||
break;
|
||||
default:
|
||||
error_number = reduced_charset(symbol, local_source, length);
|
||||
error_number = reduced_charset(symbol, local_source, in_length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((symbol->symbology == BARCODE_CODE128) || (symbol->symbology == BARCODE_CODE128B)) {
|
||||
for (i = 0; i < length; i++) {
|
||||
for (i = 0; i < in_length; i++) {
|
||||
if (local_source[i] == '\0') {
|
||||
symbol->text[i] = ' ';
|
||||
} else {
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <stdlib.h>
|
||||
#include "common.h"
|
||||
|
||||
extern int c39(struct zint_symbol *symbol, unsigned char source[], int length);
|
||||
extern int c39(struct zint_symbol *symbol, unsigned char source[], const size_t length);
|
||||
/* Codabar table checked against EN 798:1995 */
|
||||
|
||||
#define CALCIUM "0123456789-$:/.+ABCD"
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "common.h"
|
||||
#include "pcx.h" /* PCX header structure */
|
||||
#include <math.h>
|
||||
#include <malloc.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
@ -51,14 +52,14 @@ int pcx_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
FILE *pcx_file;
|
||||
pcx_header_t header;
|
||||
#ifdef _MSC_VER
|
||||
char* rotated_bitmap;
|
||||
char* rotated_bitmap;
|
||||
unsigned char* rle_row;
|
||||
#endif
|
||||
|
||||
#ifndef _MSC_VER
|
||||
char rotated_bitmap[image_height * image_width];
|
||||
#else
|
||||
rotated_bitmap = (char *) _alloca((image_height * image_width) * sizeof(char));
|
||||
rotated_bitmap = (char *) _alloca((image_height * image_width) * sizeof (char));
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
switch (rotate_angle) {
|
||||
@ -77,7 +78,7 @@ int pcx_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
#ifndef _MSC_VER
|
||||
unsigned char rle_row[symbol->bitmap_width];
|
||||
#else
|
||||
rle_row = (unsigned char *) _alloca((symbol->bitmap_width * 6) * sizeof(unsigned char));
|
||||
rle_row = (unsigned char *) _alloca((symbol->bitmap_width * 6) * sizeof (unsigned char));
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* sort out colour options */
|
||||
@ -158,7 +159,7 @@ int pcx_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
header.horiz_dpi = 300;
|
||||
header.vert_dpi = 300;
|
||||
|
||||
for(i = 0; i < 48; i++) {
|
||||
for (i = 0; i < 48; i++) {
|
||||
header.colourmap[i] = 0x00;
|
||||
}
|
||||
|
||||
@ -175,7 +176,7 @@ int pcx_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
header.horiz_screen_size = 0;
|
||||
header.vert_screen_size = 0;
|
||||
|
||||
for(i = 0; i < 54; i++) {
|
||||
for (i = 0; i < 54; i++) {
|
||||
header.filler[i] = 0x00;
|
||||
}
|
||||
|
||||
@ -195,12 +196,12 @@ int pcx_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
}
|
||||
}
|
||||
|
||||
fwrite(&header, sizeof(pcx_header_t), 1, pcx_file);
|
||||
fwrite(&header, sizeof (pcx_header_t), 1, pcx_file);
|
||||
|
||||
for(row = 0; row < symbol->bitmap_height; row++) {
|
||||
for (row = 0; row < symbol->bitmap_height; row++) {
|
||||
for (colour = 0; colour < 3; colour++) {
|
||||
for (column = 0; column < symbol->bitmap_width; column++) {
|
||||
switch(colour) {
|
||||
switch (colour) {
|
||||
case 0:
|
||||
if (rotated_bitmap[(row * symbol->bitmap_width) + column] == '1') {
|
||||
rle_row[column] = fgred;
|
||||
|
@ -58,7 +58,7 @@ int ps_plot(struct zint_symbol *symbol) {
|
||||
#ifndef _MSC_VER
|
||||
unsigned char local_text[ustrlen(symbol->text) + 1];
|
||||
#else
|
||||
unsigned char* local_text = (unsigned char*) _alloca(ustrlen(symbol->text) + 1);
|
||||
unsigned char* local_text = (unsigned char*) malloc(ustrlen(symbol->text) + 1);
|
||||
#endif
|
||||
|
||||
row_height = 0;
|
||||
@ -284,9 +284,9 @@ int ps_plot(struct zint_symbol *symbol) {
|
||||
}
|
||||
fprintf(feps, "%%%%Pages: 0\n");
|
||||
if (symbol->symbology != BARCODE_MAXICODE) {
|
||||
fprintf(feps, "%%%%BoundingBox: 0 0 %d %d\n", (int)ceil((symbol->width + xoffset + xoffset) * scaler), (int)ceil((symbol->height + textoffset + yoffset + yoffset) * scaler));
|
||||
fprintf(feps, "%%%%BoundingBox: 0 0 %d %d\n", (int) ceil((symbol->width + xoffset + xoffset) * scaler), (int) ceil((symbol->height + textoffset + yoffset + yoffset) * scaler));
|
||||
} else {
|
||||
fprintf(feps, "%%%%BoundingBox: 0 0 %d %d\n", (int)ceil((74.0F + xoffset + xoffset) * scaler), (int)ceil((72.0F + yoffset + yoffset) * scaler));
|
||||
fprintf(feps, "%%%%BoundingBox: 0 0 %d %d\n", (int) ceil((74.0F + xoffset + xoffset) * scaler), (int) ceil((72.0F + yoffset + yoffset) * scaler));
|
||||
}
|
||||
fprintf(feps, "%%%%EndComments\n");
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <malloc.h>
|
||||
#include "common.h"
|
||||
|
||||
#define SSET "0123456789ABCDEF"
|
||||
@ -215,9 +216,9 @@ int svg_plot(struct zint_symbol *symbol) {
|
||||
fprintf(fsvg, "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n");
|
||||
fprintf(fsvg, " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n");
|
||||
if (symbol->symbology != BARCODE_MAXICODE) {
|
||||
fprintf(fsvg, "<svg width=\"%d\" height=\"%d\" version=\"1.1\"\n", (int)ceil((symbol->width + xoffset + xoffset) * scaler), (int)ceil((symbol->height + textoffset + yoffset + yoffset) * scaler));
|
||||
fprintf(fsvg, "<svg width=\"%d\" height=\"%d\" version=\"1.1\"\n", (int) ceil((symbol->width + xoffset + xoffset) * scaler), (int) ceil((symbol->height + textoffset + yoffset + yoffset) * scaler));
|
||||
} else {
|
||||
fprintf(fsvg, "<svg width=\"%d\" height=\"%d\" version=\"1.1\"\n", (int)ceil((74.0F + xoffset + xoffset) * scaler), (int)ceil((72.0F + yoffset + yoffset) * scaler));
|
||||
fprintf(fsvg, "<svg width=\"%d\" height=\"%d\" version=\"1.1\"\n", (int) ceil((74.0F + xoffset + xoffset) * scaler), (int) ceil((72.0F + yoffset + yoffset) * scaler));
|
||||
}
|
||||
fprintf(fsvg, " xmlns=\"http://www.w3.org/2000/svg\">\n");
|
||||
if ((ustrlen(local_text) != 0) && (symbol->show_hrt != 0)) {
|
||||
@ -229,9 +230,9 @@ int svg_plot(struct zint_symbol *symbol) {
|
||||
fprintf(fsvg, "\n <g id=\"barcode\" fill=\"#%s\">\n", symbol->fgcolour);
|
||||
|
||||
if (symbol->symbology != BARCODE_MAXICODE) {
|
||||
fprintf(fsvg, " <rect x=\"0\" y=\"0\" width=\"%d\" height=\"%d\" fill=\"#%s\" />\n", (int)ceil((symbol->width + xoffset + xoffset) * scaler), (int)ceil((symbol->height + textoffset + yoffset + yoffset) * scaler), symbol->bgcolour);
|
||||
fprintf(fsvg, " <rect x=\"0\" y=\"0\" width=\"%d\" height=\"%d\" fill=\"#%s\" />\n", (int) ceil((symbol->width + xoffset + xoffset) * scaler), (int) ceil((symbol->height + textoffset + yoffset + yoffset) * scaler), symbol->bgcolour);
|
||||
} else {
|
||||
fprintf(fsvg, " <rect x=\"0\" y=\"0\" width=\"%d\" height=\"%d\" fill=\"#%s\" />\n", (int)ceil((74.0F + xoffset + xoffset) * scaler), (int)ceil((72.0F + yoffset + yoffset) * scaler), symbol->bgcolour);
|
||||
fprintf(fsvg, " <rect x=\"0\" y=\"0\" width=\"%d\" height=\"%d\" fill=\"#%s\" />\n", (int) ceil((74.0F + xoffset + xoffset) * scaler), (int) ceil((72.0F + yoffset + yoffset) * scaler), symbol->bgcolour);
|
||||
}
|
||||
|
||||
if ((symbol->output_options & BARCODE_BOX) || (symbol->output_options & BARCODE_BIND)) {
|
||||
|
236
win32/libzint.vcxproj
Normal file
236
win32/libzint.vcxproj
Normal file
@ -0,0 +1,236 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release_LIB|Win32">
|
||||
<Configuration>Release_LIB</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{5C08DC40-8F7D-475E-AA3C-814DED735A4B}</ProjectGuid>
|
||||
<RootNamespace>libzint_png_qr</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\support\lpng169;..\..\zlib128-dll\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NO_PNG;WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;ZINT_VERSION="2.4.4";BUILD_ZINT_DLL;ZLIB_DLL;PNG_DLL;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<ExceptionHandling />
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<SmallerTypeCheck>true</SmallerTypeCheck>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<DisableSpecificWarnings>4018;4244;4305;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<ProjectReference>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zintd.dll</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\support\lpng169\projects\visualc71\Win32_LIB_Debug;..\..\..\support\lpng169\projects\visualc71\Win32_LIB_Debug\ZLib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>libcmtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\..\support\lpng169;..\..\zlib128-dll\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;ZINT_VERSION="2.4.4";BUILD_ZINT_DLL;ZLIB_DLL;PNG_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling />
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<DisableSpecificWarnings>4018;4244;4305;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<ProjectReference>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
<Link>
|
||||
<AdditionalDependencies>libpng.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zint.dll</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\support\lpng169\projects\visualc71\Win32_LIB_Release;..\..\..\support\lpng169\projects\visualc71\Win32_LIB_Release\ZLib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>d:\opt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;ZINT_VERSION="2.4.4";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling />
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat />
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<DisableSpecificWarnings>4018;4244;4305;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)libzintMD.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\backend\2of5.c" />
|
||||
<ClCompile Include="..\backend\auspost.c" />
|
||||
<ClCompile Include="..\backend\aztec.c" />
|
||||
<ClCompile Include="..\backend\bmp.c" />
|
||||
<ClCompile Include="..\backend\codablock.c" />
|
||||
<ClCompile Include="..\backend\code.c" />
|
||||
<ClCompile Include="..\backend\code1.c" />
|
||||
<ClCompile Include="..\backend\code128.c" />
|
||||
<ClCompile Include="..\backend\code16k.c" />
|
||||
<ClCompile Include="..\backend\code49.c" />
|
||||
<ClCompile Include="..\backend\common.c" />
|
||||
<ClCompile Include="..\backend\composite.c" />
|
||||
<ClCompile Include="..\backend\dllversion.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\backend\dmatrix.c" />
|
||||
<ClCompile Include="..\backend\dotcode.c" />
|
||||
<ClCompile Include="..\backend\eci.c" />
|
||||
<ClCompile Include="..\backend\gif.c" />
|
||||
<ClCompile Include="..\backend\gridmtx.c" />
|
||||
<ClCompile Include="..\backend\gs1.c" />
|
||||
<ClCompile Include="..\backend\hanxin.c" />
|
||||
<ClCompile Include="..\backend\imail.c" />
|
||||
<ClCompile Include="..\backend\large.c" />
|
||||
<ClCompile Include="..\backend\library.c" />
|
||||
<ClCompile Include="..\backend\maxicode.c" />
|
||||
<ClCompile Include="..\backend\medical.c" />
|
||||
<ClCompile Include="..\backend\pcx.c" />
|
||||
<ClCompile Include="..\backend\pdf417.c" />
|
||||
<ClCompile Include="..\backend\plessey.c" />
|
||||
<ClCompile Include="..\backend\png.c" />
|
||||
<ClCompile Include="..\backend\postal.c" />
|
||||
<ClCompile Include="..\backend\ps.c" />
|
||||
<ClCompile Include="..\backend\qr.c" />
|
||||
<ClCompile Include="..\backend\raster.c" />
|
||||
<ClCompile Include="..\backend\reedsol.c" />
|
||||
<ClCompile Include="..\backend\render.c" />
|
||||
<ClCompile Include="..\backend\rss.c" />
|
||||
<ClCompile Include="..\backend\svg.c" />
|
||||
<ClCompile Include="..\backend\telepen.c" />
|
||||
<ClCompile Include="..\backend\upcean.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\backend\aztec.h" />
|
||||
<ClInclude Include="..\backend\code1.h" />
|
||||
<ClInclude Include="..\backend\code49.h" />
|
||||
<ClInclude Include="..\backend\common.h" />
|
||||
<ClInclude Include="..\backend\composite.h" />
|
||||
<ClInclude Include="..\backend\dm200.h" />
|
||||
<ClInclude Include="..\backend\dmatrix.h" />
|
||||
<ClInclude Include="..\backend\font.h" />
|
||||
<ClInclude Include="..\backend\gb2312.h" />
|
||||
<ClInclude Include="..\backend\gridmtx.h" />
|
||||
<ClInclude Include="..\backend\gs1.h" />
|
||||
<ClInclude Include="..\backend\large.h" />
|
||||
<ClInclude Include="..\backend\maxicode.h" />
|
||||
<ClInclude Include="..\backend\maxipng.h" />
|
||||
<ClInclude Include="..\backend\ms_stdint.h" />
|
||||
<ClInclude Include="..\backend\pdf417.h" />
|
||||
<ClInclude Include="..\backend\qr.h" />
|
||||
<ClInclude Include="..\backend\reedsol.h" />
|
||||
<ClInclude Include="..\backend\resource.h" />
|
||||
<ClInclude Include="..\backend\rss.h" />
|
||||
<ClInclude Include="..\backend\sjis.h" />
|
||||
<ClInclude Include="..\backend\zint.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\backend\libzint.rc">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'">true</ExcludedFromBuild>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -1,12 +1,11 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zint", "zint.vcproj", "{3169C7FA-E52C-4BFC-B7BB-E55EBA133770}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5C08DC40-8F7D-475E-AA3C-814DED735A4B} = {5C08DC40-8F7D-475E-AA3C-814DED735A4B}
|
||||
EndProjectSection
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.40629.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zint", "zint.vcxproj", "{3169C7FA-E52C-4BFC-B7BB-E55EBA133770}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzint", "libzint.vcproj", "{5C08DC40-8F7D-475E-AA3C-814DED735A4B}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzint", "libzint.vcxproj", "{5C08DC40-8F7D-475E-AA3C-814DED735A4B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
145
win32/zint.vcxproj
Normal file
145
win32/zint.vcxproj
Normal file
@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release_LIB|Win32">
|
||||
<Configuration>Release_LIB</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{3169C7FA-E52C-4BFC-B7BB-E55EBA133770}</ProjectGuid>
|
||||
<RootNamespace>zint</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\backend;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;ZINT_VERSION="2.3.0";ZINT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<ExceptionHandling />
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<SmallerTypeCheck>true</SmallerTypeCheck>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>..\backend;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;ZINT_VERSION="2.3.0";ZINT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling />
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat />
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>d:\opt\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>..\backend;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;ZINT_VERSION="2.3.0";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling />
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat />
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>libpngMD.lib;zlibMD.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>d:\opt\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\frontend\getopt.c" />
|
||||
<ClCompile Include="..\frontend\getopt1.c" />
|
||||
<ClCompile Include="..\frontend\main.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\frontend\resource.h" />
|
||||
<ClInclude Include="frontend\getopt.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\frontend\zint.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="libzint.vcxproj">
|
||||
<Project>{5c08dc40-8f7d-475e-aa3c-814ded735a4b}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user