diff --git a/backend/2of5.c b/backend/2of5.c index 1b02ae49..dd405986 100644 --- a/backend/2of5.c +++ b/backend/2of5.c @@ -39,26 +39,25 @@ int matrix_two_of_five(struct zint_symbol *symbol, unsigned char source[], int l { /* Code 2 of 5 Standard (Code 2 of 5 Matrix) */ int i, error_number; - char dest[1000]; + char dest[512]; /* 6 + 80 * 6 + 6 + 1 ~ 512*/ error_number = 0; - strcpy(dest, ""); if(length > 80) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } /* start character */ - concat (dest, "411111"); + strcpy(dest, "411111"); - for(i = 0; i <= length; i++) { - lookup(NESET, C25MatrixTable, source[i], dest); + for(i = 0; i < length; i++) { + lookup(NEON, C25MatrixTable, source[i], dest); } /* Stop character */ @@ -73,26 +72,25 @@ int industrial_two_of_five(struct zint_symbol *symbol, unsigned char source[], i { /* Code 2 of 5 Industrial */ int i, error_number; - char dest[1000]; + char dest[512]; /* 6 + 40 * 10 + 6 + 1 */ error_number = 0; - strcpy(dest, ""); if(length > 45) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid character in data"); return error_number; } /* start character */ - concat (dest, "313111"); + strcpy(dest, "313111"); - for(i = 0; i <= length; i++) { - lookup(NESET, C25IndustTable, source[i], dest); + for(i = 0; i < length; i++) { + lookup(NEON, C25IndustTable, source[i], dest); } /* Stop character */ @@ -106,26 +104,25 @@ int industrial_two_of_five(struct zint_symbol *symbol, unsigned char source[], i int iata_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length) { /* Code 2 of 5 IATA */ int i, error_number; - char dest[1000]; + char dest[512]; /* 4 + 45 * 10 + 3 + 1 */ error_number = 0; - strcpy(dest, ""); if(length > 45) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } /* start */ - concat (dest, "1111"); + strcpy(dest, "1111"); for(i = 0; i < length; i++) { - lookup(NESET, C25IndustTable, source[i], dest); + lookup(NEON, C25IndustTable, source[i], dest); } /* stop */ @@ -140,26 +137,25 @@ int logic_two_of_five(struct zint_symbol *symbol, unsigned char source[], int le { /* Code 2 of 5 Data Logic */ int i, error_number; - char dest[1000]; + char dest[512]; /* 4 + 80 * 6 + 3 + 1 */ error_number = 0; - strcpy(dest, ""); if(length > 80) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } /* start character */ - concat (dest, "1111"); + strcpy(dest, "1111"); - for(i = 0; i <= length; i++) { - lookup(NESET, C25MatrixTable, source[i], dest); + for(i = 0; i < length; i++) { + lookup(NEON, C25MatrixTable, source[i], dest); } /* Stop character */ @@ -175,15 +171,16 @@ int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[], int i, j, k, error_number; char bars[7], spaces[7], mixed[14], dest[1000]; + unsigned char *temp = source; + unsigned int temp_len = length; error_number = 0; - strcpy(dest, ""); if(length > 90) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if (error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; @@ -191,31 +188,28 @@ int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[], /* Input must be an even number of characters for Interlaced 2 of 5 to work: if an odd number of characters has been entered then add a leading zero */ - if ((length%2) != 0) + if ((length % 2) != 0) { /* there are an odd number of input characters */ - char temp[100]; - - strcpy(temp, (char*)source); - source[0] = '0'; - - for(i = 0; i <= length; i++) + if (NULL == (temp = (unsigned char*)malloc(++temp_len))) { - source[i + 1] = temp[i]; + strcpy(symbol->errtxt, "Memory allocation failed"); + return ERROR_MEMORY; } - length++; + temp[0] = '0'; + ustrcpy(temp + 1, source); } /* start character */ - concat(dest, "1111"); + strcpy(dest, "1111"); - for(i = 0; i < length; i+=2 ) + for(i = 0; i < temp_len; i+=2 ) { /* look up the bars and the spaces and put them in two strings */ strcpy(bars, ""); - lookup(NESET, C25InterTable, source[i], bars); + lookup(NEON, C25InterTable, temp[i], bars); strcpy(spaces, ""); - lookup(NESET, C25InterTable, source[i + 1], spaces); + lookup(NEON, C25InterTable, temp[i + 1], spaces); /* then merge (interlace) the strings together */ k = 0; @@ -232,7 +226,9 @@ int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[], concat (dest, "311"); expand(symbol, dest); - ustrcpy(symbol->text, source); + ustrcpy(symbol->text, temp); + if (temp != source) + free(source); return error_number; } @@ -241,8 +237,7 @@ int itf14(struct zint_symbol *symbol, unsigned char source[], int length) { int i, error_number, zeroes; unsigned int count, check_digit; - char localstr[15]; - char checkstr[3]; + char localstr[16]; error_number = 0; @@ -253,19 +248,18 @@ int itf14(struct zint_symbol *symbol, unsigned char source[], int length) return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid character in data"); return error_number; } /* Add leading zeros as required */ - strcpy(localstr, ""); zeroes = 13 - length; for(i = 0; i < zeroes; i++) { - concat(localstr, "0"); + localstr[i] = '0'; } - concat(localstr, (char *)source); + strcpy(localstr + zeroes, (char *)source); /* Calculate the check digit - the same method used for EAN-13 */ @@ -280,9 +274,8 @@ int itf14(struct zint_symbol *symbol, unsigned char source[], int length) } check_digit = 10 - (count%10); if (check_digit == 10) { check_digit = 0; } - checkstr[0] = itoc(check_digit); - checkstr[1] = '\0'; - concat(localstr, checkstr); + localstr[13] = itoc(check_digit); + localstr[14] = '\0'; error_number = interleaved_two_of_five(symbol, (unsigned char *)localstr, strlen(localstr)); ustrcpy(symbol->text, (unsigned char*)localstr); return error_number; @@ -292,7 +285,7 @@ int dpleit(struct zint_symbol *symbol, unsigned char source[], int length) { /* Deutshe Post Leitcode */ int i, error_number; unsigned int count, check_digit; - char localstr[15], checkstr[3]; + char localstr[16]; int zeroes; error_number = 0; @@ -301,17 +294,16 @@ int dpleit(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(symbol->errtxt, "Input wrong length"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } - strcpy(localstr, ""); zeroes = 13 - length; for(i = 0; i < zeroes; i++) - concat(localstr, "0"); - concat(localstr, (char *)source); + localstr[i] = '0'; + strcpy(localstr + zeroes, (char *)source); for (i = 12; i >= 0; i--) { @@ -324,11 +316,9 @@ int dpleit(struct zint_symbol *symbol, unsigned char source[], int length) } check_digit = 10 - (count%10); if (check_digit == 10) { check_digit = 0; } - checkstr[0] = itoc(check_digit); - checkstr[1] = '\0'; - concat(localstr, checkstr); - length = strlen(localstr); - error_number = interleaved_two_of_five(symbol, (unsigned char *)localstr, length); + localstr[13] = itoc(check_digit); + localstr[14] = '\0'; + error_number = interleaved_two_of_five(symbol, (unsigned char *)localstr, strlen(localstr)); ustrcpy(symbol->text, (unsigned char*)localstr); return error_number; } @@ -337,24 +327,23 @@ int dpident(struct zint_symbol *symbol, unsigned char source[], int length) { /* Deutsche Post Identcode */ int i, error_number, zeroes; unsigned int count, check_digit; - char localstr[13], checkstr[3]; + char localstr[16]; count = 0; if(length > 11) { strcpy(symbol->errtxt, "Input wrong length"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } - strcpy(localstr, ""); zeroes = 11 - length; for(i = 0; i < zeroes; i++) - concat(localstr, "0"); - concat(localstr, (char *)source); + localstr[i] = '0'; + strcpy(localstr + zeroes, (char *)source); for (i = 10; i >= 0; i--) { @@ -367,11 +356,9 @@ int dpident(struct zint_symbol *symbol, unsigned char source[], int length) } check_digit = 10 - (count%10); if (check_digit == 10) { check_digit = 0; } - checkstr[0] = itoc(check_digit); - checkstr[1] = '\0'; - concat(localstr, checkstr); - length = strlen(localstr); - error_number = interleaved_two_of_five(symbol, (unsigned char *)localstr, length); + localstr[11] = itoc(check_digit); + localstr[12] = '\0'; + error_number = interleaved_two_of_five(symbol, (unsigned char *)localstr, strlen(localstr)); ustrcpy(symbol->text, (unsigned char*)localstr); return error_number; } diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt index d7351f01..b5456339 100644 --- a/backend/CMakeLists.txt +++ b/backend/CMakeLists.txt @@ -3,12 +3,11 @@ project(zint) find_package(PNG) -find_package(Qr) -set(zint_COMMON_SRCS common.c library.c ps.c large.c reedsol.c gs1.c svg.c shiftjis.c) +set(zint_COMMON_SRCS common.c library.c ps.c large.c reedsol.c gs1.c svg.c) set(zint_ONEDIM_SRCS code.c code128.c 2of5.c upcean.c telepen.c medical.c plessey.c rss.c) set(zint_POSTAL_SRCS postal.c auspost.c imail.c) -set(zint_TWODIM_SRCS code16k.c blockf.c dmatrix.c dm200.c pdf417.c qr.c micqr.c maxicode.c composite.c aztec.c code49.c code1.c gridmtx.c) +set(zint_TWODIM_SRCS code16k.c blockf.c dmatrix.c dm200.c pdf417.c qr.c qrrs.c micqr.c maxicode.c composite.c aztec.c code49.c code1.c gridmtx.c) set(zint_SRCS ${zint_COMMON_SRCS} ${zint_ONEDIM_SRCS} ${zint_POSTAL_SRCS} ${zint_TWODIM_SRCS} ) if(PNG_FOUND) @@ -18,18 +17,12 @@ else(PNG_FOUND) add_definitions (-DNO_PNG) endif(PNG_FOUND) -if(QR_FOUND) - include_directories( ${QR_INCLUDES} ) -else(QR_FOUND) - add_definitions (-DNO_QR) -endif(QR_FOUND) - add_library(zint SHARED ${zint_SRCS}) set_target_properties(zint PROPERTIES SOVERSION "${ZINT_VERSION_MAJOR}.${ZINT_VERSION_MINOR}" VERSION ${ZINT_VERSION}) -target_link_libraries(zint ${PNG_LIBRARIES} ${QR_LIBRARIES} ) +target_link_libraries(zint ${PNG_LIBRARIES} ) install(TARGETS zint ${INSTALL_TARGETS_DEFAULT_ARGS} ) install(FILES zint.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) diff --git a/backend/Makefile b/backend/Makefile index 87d6ada1..5dfd9a14 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -1,7 +1,6 @@ # Linux makefile for libzint # -# make compiles with QR Code support -# make libzint_noqr compiles without QR Code support +# make compiles # make install copies to /usr/local/lib # make uninstall removes library # make clean cleans up a previous compilation and any object or editor files @@ -19,29 +18,22 @@ includedir := $(prefix)/include libdir := $(prefix)/lib DESTDIR := -COMMON:= common.c png.c library.c ps.c large.c reedsol.c gs1.c svg.c shiftjis.c -COMMON_OBJ:= common.o png.o library.o ps.o large.o reedsol.o gs1.o svg.o shiftjis.o -ONEDIM:= code.c code128.c 2of5.c upcean.c telepen.c medical.c plessey.c rss.c -ONEDIM_OBJ:= code.o code128.o 2of5.o upcean.o telepen.o medical.o plessey.o rss.o +COMMON:= common.c png.c library.c ps.c large.c reedsol.c gs1.c svg.c +COMMON_OBJ:= common.o png.o library.o ps.o large.o reedsol.o gs1.o svg.o +ONEDIM:= code.c code128.c 2of5.c upcean.c telepen.c medical.c plessey.c rss.c qrrs.c +ONEDIM_OBJ:= code.o code128.o 2of5.o upcean.o telepen.o medical.o plessey.o rss.o qrrs.o POSTAL:= postal.c auspost.c imail.c POSTAL_OBJ:= postal.o auspost.o imail.o TWODIM:= code16k.c blockf.c dmatrix.c dm200.c pdf417.c qr.c maxicode.c composite.c aztec.c micqr.c code49.c code1.c gridmtx.c TWODIM_OBJ:= code16k.o blockf.o dmatrix.o dm200.o pdf417.o qr.o maxicode.o composite.o aztec.o micqr.o code49.o code1.o gridmtx.o LIBS:= `libpng12-config --I_opts --L_opts --ldflags` -lz -lm - -ifeq ($(NO_QR),true) -DEFINES:= -DNO_QR -else -DEFINES:= -LIBS+= -lqrencode -endif -libzint: code.c code128.c 2of5.c upcean.c medical.c telepen.c plessey.c postal.c auspost.c imail.c code16k.c dmatrix.c dm200.c reedsol.c pdf417.c maxicode.c rss.c common.c png.c library.c ps.c qr.c large.c composite.c aztec.c blockf.c micqr.c gs1.c svg.c code49.c code1.c gridmtx.c +libzint: code.c code128.c 2of5.c upcean.c medical.c telepen.c plessey.c postal.c auspost.c imail.c code16k.c dmatrix.c dm200.c reedsol.c qrrs.c pdf417.c maxicode.c rss.c common.c png.c library.c ps.c qr.c large.c composite.c aztec.c blockf.c micqr.c gs1.c svg.c code49.c code1.c gridmtx.c $(CC) -Wall -fPIC $(CFLAGS) $(ZINT_VERSION) -c $(ONEDIM) $(CC) -Wall -fPIC $(CFLAGS) $(ZINT_VERSION) -c $(POSTAL) - $(CC) -Wall -fPIC $(DEFINES) $(CFLAGS) $(ZINT_VERSION) -c $(TWODIM) + $(CC) -Wall -fPIC $(CFLAGS) $(ZINT_VERSION) -c $(TWODIM) $(CC) -Wall -fPIC $(CFLAGS) $(ZINT_VERSION) -c $(COMMON) - $(CC) $(CFLAGS) $(ZINT_VERSION) -shared -Wl,-soname,libzint.so -o libzint.so.2.2.1 $(INCLUDE) $(COMMON_OBJ) $(ONEDIM_OBJ) $(TWODIM_OBJ) $(POSTAL_OBJ) $(LIBS) + $(CC) $(CFLAGS) $(ZINT_VERSION) -shared -Wl,-soname,libzint.so -o libzint.so.2.2.2 $(INCLUDE) $(COMMON_OBJ) $(ONEDIM_OBJ) $(TWODIM_OBJ) $(POSTAL_OBJ) $(LIBS) ln -s libzint.so.* libzint.so .PHONY: install uninstall clean dist diff --git a/backend/Makefile.mingw b/backend/Makefile.mingw index c9df5f9e..03de27d4 100644 --- a/backend/Makefile.mingw +++ b/backend/Makefile.mingw @@ -25,20 +25,14 @@ APP:=zint DLL:=$(APP).dll STATLIB:=lib$(APP).a -COMMON_OBJ:= common.o png.o library.o ps.o large.o reedsol.o gs1.o svg.o shiftjis.o -ONEDIM_OBJ:= code.o code128.o 2of5.o upcean.o telepen.o medical.o plessey.o rss.o +COMMON_OBJ:= common.o png.o library.o ps.o large.o reedsol.o gs1.o svg.o +ONEDIM_OBJ:= code.o code128.o 2of5.o upcean.o telepen.o medical.o plessey.o rss.o qrrs.o POSTAL_OBJ:= postal.o auspost.o imail.o TWODIM_OBJ:= code16k.o blockf.o dmatrix.o dm200.o pdf417.o qr.o maxicode.o composite.o aztec.o micqr.o code49.o code1.o gridmtx.o LIB_OBJ:= $(COMMON_OBJ) $(ONEDIM_OBJ) $(TWODIM_OBJ) $(POSTAL_OBJ) DLL_OBJ:= $(LIB_OBJ:.o=.lo) dllversion.lo -ifeq ($(NO_QR),true) -DEFINES+= -DNO_QR -else -DEFINES_DLL+= -DQRENCODE_DLL -LIBS+= -lqrencode -endif ifeq ($(NO_PNG),true) DEFINES+= -DNO_PNG diff --git a/backend/auspost.c b/backend/auspost.c index 9edfb39a..c19c377c 100644 --- a/backend/auspost.c +++ b/backend/auspost.c @@ -107,15 +107,14 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt 2 = Tracker and Descender 3 = Tracker only */ int error_number, zeroes; - int writer, i; - unsigned int loopey, reader; + int writer; + unsigned int loopey, reader, h; char data_pattern[200]; char fcc[3], dpid[10]; char localstr[30]; error_number = 0; - strcpy (data_pattern, ""); strcpy(localstr, ""); /* Do all of the length checking first to avoid stack smashing */ @@ -125,9 +124,9 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt { case 8: strcpy(fcc, "11"); break; case 13: strcpy(fcc, "59"); break; - case 16: strcpy(fcc, "59"); error_number = is_sane(NESET, source, length); break; + case 16: strcpy(fcc, "59"); error_number = is_sane(NEON, source, length); break; case 18: strcpy(fcc, "62"); break; - case 23: strcpy(fcc, "62"); error_number = is_sane(NESET, source, length); break; + case 23: strcpy(fcc, "62"); error_number = is_sane(NEON, source, length); break; default: strcpy(symbol->errtxt, "Auspost input is wrong length"); return ERROR_TOO_LONG; break; @@ -137,7 +136,7 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt return error_number; } } else { - if(ustrlen(source) > 8) { + if(length > 8) { strcpy(symbol->errtxt, "Auspost input is too long"); return ERROR_TOO_LONG; } @@ -149,36 +148,34 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt /* Add leading zeros as required */ zeroes = 8 - length; - for(i = 0; i < zeroes; i++) { - concat(localstr, "0"); - } + memset(localstr, '0', zeroes); + localstr[8] = '\0'; } concat(localstr, (char*)source); - error_number = is_sane(GDSET, (unsigned char *)localstr, length); + h = strlen(localstr); + error_number = is_sane(GDSET, (unsigned char *)localstr, h); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } /* Verifiy that the first 8 characters are numbers */ - for(loopey = 0; loopey < 8; loopey++) { - dpid[loopey] = localstr[loopey]; - } + memcpy(dpid, localstr, 8); dpid[8] = '\0'; - error_number = is_sane(NESET, (unsigned char *)dpid, 8); + error_number = is_sane(NEON, (unsigned char *)dpid, strlen(dpid)); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in DPID"); return error_number; } /* Start character */ - concat(data_pattern, "13"); + strcpy(data_pattern, "13"); /* Encode the FCC */ for(reader = 0; reader < 2; reader++) { - lookup(NESET, AusNTable, fcc[reader], data_pattern); + lookup(NEON, AusNTable, fcc[reader], data_pattern); } /* printf("AUSPOST FCC: %s ", fcc); */ @@ -186,32 +183,33 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt /* Delivery Point Identifier (DPID) */ for(reader = 0; reader < 8; reader++) { - lookup(NESET, AusNTable, dpid[reader], data_pattern); + lookup(NEON, AusNTable, dpid[reader], data_pattern); } /* Customer Information */ - if(strlen(localstr) > 8) + if(h > 8) { - if((strlen(localstr) == 13) || (strlen(localstr) == 18)) { - for(reader = 8; reader < strlen(localstr); reader++) { + if((h == 13) || (h == 18)) { + for(reader = 8; reader < h; reader++) { lookup(GDSET, AusCTable, localstr[reader], data_pattern); } } - if((strlen(localstr) == 16) || (strlen(localstr) == 23)) { - for(reader = 8; reader < strlen(localstr); reader++) { - lookup(NESET, AusNTable, localstr[reader], data_pattern); + if((h == 16) || (h == 23)) { + for(reader = 8; reader < h; reader++) { + lookup(NEON, AusNTable, localstr[reader], data_pattern); } } } /* Filler bar */ - if(strlen(data_pattern) == 22) { + h = strlen(data_pattern); + if(h == 22) { concat(data_pattern, "3"); } - if(strlen(data_pattern) == 37) { + else if(h == 37) { concat(data_pattern, "3"); } - if(strlen(data_pattern) == 52) { + else if(h == 52) { concat(data_pattern, "3"); } @@ -223,7 +221,8 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt /* Turn the symbol into a bar pattern ready for plotting */ writer = 0; - for(loopey = 0; loopey < strlen(data_pattern); loopey++) + h = strlen(data_pattern); + for(loopey = 0; loopey < h; loopey++) { if((data_pattern[loopey] == '1') || (data_pattern[loopey] == '0')) { diff --git a/backend/aztec.c b/backend/aztec.c index 5825bac3..079a97ae 100644 --- a/backend/aztec.c +++ b/backend/aztec.c @@ -31,12 +31,9 @@ void mapshorten(int *charmap, int *typemap, int start, int length) { /* Shorten the string by one character */ - int i; - for(i = start + 1; i < (length - 1); i++) { - charmap[i] = charmap[i + 1]; - typemap[i] = typemap[i + 1]; - } + memmove(charmap + start + 1 , charmap + start + 2, (length - 1) * sizeof(int)); + memmove(typemap + start + 1 , typemap + start + 2, (length - 1) * sizeof(int)); } void insert(char binary_string[], int posn, char newbit) @@ -50,51 +47,47 @@ void insert(char binary_string[], int posn, char newbit) binary_string[posn] = newbit; } -int aztec_text_process(unsigned char source[], char binary_string[], int gs1) +int aztec_text_process(unsigned char source[], const unsigned int src_len, char binary_string[], int gs1) { /* Encode input data into a binary string */ int i, j, k, bytes; int curtable, newtable, lasttable, chartype, maplength, blocks, debug; #ifndef _MSC_VER - int charmap[ustrlen(source) * 2], typemap[ustrlen(source) * 2]; - int blockmap[2][ustrlen(source)]; + int charmap[src_len * 2], typemap[src_len * 2]; + int blockmap[2][src_len]; #else - int* charmap = (int*)_alloca((ustrlen(source) * 2) * sizeof(int)); - int* typemap = (int*)_alloca((ustrlen(source) * 2) * sizeof(int)); + int* charmap = (int*)_alloca(src_len * 2 * sizeof(int)); + int* typemap = (int*)_alloca(src_len * 2 * sizeof(int)); int* blockmap[2]; - blockmap[0] = (int*)_alloca(ustrlen(source) * sizeof(int)); - blockmap[1] = (int*)_alloca(ustrlen(source) * sizeof(int)); + blockmap[0] = (int*)_alloca(src_len * sizeof(int)); + blockmap[1] = (int*)_alloca(src_len * sizeof(int)); #endif /* Lookup input string in encoding table */ maplength = 0; debug = 0; - for(i = 0; i < ustrlen(source); i++) { + for(i = 0; i < src_len; i++) { if(gs1 && (i == 0)) { /* Add FNC1 to beginning of GS1 messages */ charmap[maplength] = 0; - typemap[maplength] = PUNC; - maplength++; + typemap[maplength++] = PUNC; charmap[maplength] = 400; - typemap[maplength] = PUNC; - maplength++; + typemap[maplength++] = PUNC; } if((gs1) && (source[i] == '[')) { /* FNC1 represented by FLG(0) */ charmap[maplength] = 0; - typemap[maplength] = PUNC; - maplength++; + typemap[maplength++] = PUNC; charmap[maplength] = 400; - typemap[maplength] = PUNC; + typemap[maplength++] = PUNC; } else { if(source[i] > 127) { charmap[maplength] = source[i]; - typemap[maplength] = BINARY; + typemap[maplength++] = BINARY; } else { charmap[maplength] = AztecSymbolChar[source[i]]; - typemap[maplength] = AztecCodeSet[source[i]]; + typemap[maplength++] = AztecCodeSet[source[i]]; } } - maplength++; } /* Look for double character encoding possibilities */ @@ -245,10 +238,7 @@ int aztec_text_process(unsigned char source[], char binary_string[], int gs1) } } } - - for(i = 0; i < 20000; i++) { - binary_string[i] = '\0'; - } + *binary_string = '\0'; curtable = UPPER; /* start with UPPER table */ lasttable = UPPER; @@ -664,15 +654,11 @@ int aztec(struct zint_symbol *symbol, unsigned char source[], int length) int err_code, ecc_level, compact, data_length, data_maxsize, codeword_size, adjusted_length; int remainder, padbits, count, gs1, adjustment_size; int debug = 0; -#ifdef _MSC_VER - unsigned int* data_part; - unsigned int* ecc_part; -#endif #ifndef _MSC_VER - unsigned char local_source[length]; + unsigned char local_source[length + 1]; #else - unsigned char local_source = (unsigned char*)_alloca(length); + unsigned char* local_source = (unsigned char*)_alloca(length + 1); #endif memset(binary_string,0,20000); @@ -682,9 +668,8 @@ int aztec(struct zint_symbol *symbol, unsigned char source[], int length) /* The following to be replaced by ECI handling */ switch(symbol->input_mode) { case DATA_MODE: - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } + case GS1_MODE: + memcpy(local_source, source, length); local_source[length] = '\0'; break; case UNICODE_MODE: @@ -701,7 +686,7 @@ int aztec(struct zint_symbol *symbol, unsigned char source[], int length) } } - err_code = aztec_text_process(local_source, binary_string, gs1); + err_code = aztec_text_process(local_source, length, binary_string, gs1); if(err_code != 0) { strcpy(symbol->errtxt, "Input too long or too many extended ASCII characters"); @@ -985,8 +970,8 @@ int aztec(struct zint_symbol *symbol, unsigned char source[], int length) #ifndef _MSC_VER unsigned int data_part[data_blocks + 3], ecc_part[ecc_blocks + 3]; #else - data_part = (unsigned int*)_alloca((data_blocks + 3) * sizeof(unsigned int)); - ecc_part = (unsigned int*)_alloca((ecc_blocks + 3) * sizeof(unsigned int)); + unsigned int* data_part = (unsigned int*)_alloca((data_blocks + 3) * sizeof(unsigned int)); + unsigned int* ecc_part = (unsigned int*)_alloca((ecc_blocks + 3) * sizeof(unsigned int)); #endif /* Copy across data into separate integers */ memset(data_part,0,(data_blocks + 2)*sizeof(int)); @@ -1249,7 +1234,7 @@ int aztec_runes(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(symbol->errtxt, "Input too large"); return ERROR_INVALID_DATA; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number != 0) { strcpy(symbol->errtxt, "Invalid characters in input"); return ERROR_INVALID_DATA; diff --git a/backend/blockf.c b/backend/blockf.c index 31a895b3..c863bdb5 100644 --- a/backend/blockf.c +++ b/backend/blockf.c @@ -59,7 +59,6 @@ static char *C128Table[107] = {"212222", "222122", "222221", "121223", "121322", "411113", "411311", "113141", "114131", "311141", "411131", "211412", "211214", "211232", "2331112"}; -int parunmodd(unsigned char llyth); void grwp(int *indexliste); void dxsmooth(int *indexliste); @@ -94,16 +93,15 @@ int character_subset_select(unsigned char source[], int input_position) { return MODEB; } -int data_encode_blockf(unsigned char source[], int subset_selector[], int blockmatrix[][62], int *columns_needed, int *rows_needed, int *final_mode, int gs1) +int data_encode_blockf(unsigned char source[], int input_length, int subset_selector[], int blockmatrix[][62], int *columns_needed, int *rows_needed, int *final_mode, int gs1) { - int i, j, input_position, input_length, current_mode, current_row, error_number; + int i, j, input_position, current_mode, current_row, error_number; int column_position, c, done, exit_status; error_number = 0; exit_status = 0; current_row = 0; current_mode = MODEA; - input_length = ustrlen(source); column_position = 0; input_position = 0; done = 0; @@ -303,7 +301,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm } if(done == 0) { - if(((current_mode == MODEA) || (current_mode == MODEB)) && ((parunmodd(source[input_position])== ABORC) || (gs1 && (source[input_position] == '[')))) { + if(((current_mode == MODEA) || (current_mode == MODEB)) && ((parunmodd(source[input_position]) == ABORC) || (gs1 && (source[input_position] == '[')))) { /* Count the number of numeric digits */ /* If 4 or more numeric data characters occur together when in subsets A or B: a. If there is an even number of numeric data characters, insert a Code C character before the @@ -570,7 +568,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm int codablock(struct zint_symbol *symbol, unsigned char source[], int length) { - int error_number, input_length, i, j, k; + int error_number, input_length, i, j, k, h; int rows_needed, columns_needed; int min_module_height; int last_mode, this_mode, final_mode; @@ -624,7 +622,7 @@ int codablock(struct zint_symbol *symbol, unsigned char source[], int length) } /* Encode the data */ - error_number = data_encode_blockf(source, subset_selector, blockmatrix, &columns_needed, &rows_needed, &final_mode, gs1); + error_number = data_encode_blockf(source, input_length, subset_selector, blockmatrix, &columns_needed, &rows_needed, &final_mode, gs1); if(error_number > 0) { if(error_number == ERROR_TOO_LONG) { strcpy(symbol->errtxt, "Input data too long"); @@ -728,7 +726,8 @@ int codablock(struct zint_symbol *symbol, unsigned char source[], int length) /* Write the information into the symbol */ writer = 0; flip_flop = 1; - for (j = 0; j < strlen(row_pattern); j++) { + h = strlen(row_pattern); + for (j = 0; j < h; j++) { for(k = 0; k < ctoi(row_pattern[j]); k++) { if(flip_flop == 1) { set_module(symbol, i, writer); diff --git a/backend/code.c b/backend/code.c index 8fd2ec42..5135020a 100644 --- a/backend/code.c +++ b/backend/code.c @@ -26,15 +26,15 @@ #include #include "common.h" +#define SODIUM "0123456789-" +#define SILVER "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd" -#define NASET "0123456789-" static char *C11Table[11] = {"111121", "211121", "121121", "221111", "112121", "212111", "122111", "111221", "211211", "211111", "112111"}; /* Code 39 tables checked against ISO/IEC 16388:2007 */ -#define TCSET "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd" /* Incorporates Table A1 */ static char *C39Table[43] = { "1112212111", "2112111121", "1122111121", "2122111111", "1112211121", @@ -90,18 +90,17 @@ int code_11(struct zint_symbol *symbol, unsigned char source[], int length) unsigned int i; int h, c_digit, c_weight, c_count, k_digit, k_weight, k_count; - int weight[125], error_number; - char dest[1230]; + int weight[128], error_number; + char dest[1024]; /* 6 + 121 * 6 + 2 * 6 + 5 + 1 ~ 1024*/ char checkstr[3]; error_number = 0; - strcpy(dest, ""); if(length > 121) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NASET, source, length); + error_number = is_sane(SODIUM, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; @@ -112,11 +111,11 @@ int code_11(struct zint_symbol *symbol, unsigned char source[], int length) k_count = 0; /* start character */ - concat (dest, "112211"); + strcpy(dest, "112211"); /* Draw main body of barcode */ for(i = 0; i < length; i++) { - lookup(NASET, C11Table, source[i], dest); + lookup(SODIUM, C11Table, source[i], dest); if(source[i] == '-') weight[i] = 10; else @@ -124,7 +123,7 @@ int code_11(struct zint_symbol *symbol, unsigned char source[], int length) } /* Calculate C checksum */ - for(h = (length - 1); h >= 0; h--) { + for(h = length - 1; h >= 0; h--) { c_count += (c_weight * weight[h]); c_weight++; @@ -132,7 +131,7 @@ int code_11(struct zint_symbol *symbol, unsigned char source[], int length) c_weight = 1; } } - c_digit = c_count%11; + c_digit = c_count % 11; weight[length] = c_digit; @@ -145,15 +144,15 @@ int code_11(struct zint_symbol *symbol, unsigned char source[], int length) k_weight = 1; } } - k_digit = k_count%11; + k_digit = k_count % 11; checkstr[0] = itoc(c_digit); checkstr[1] = itoc(k_digit); if(checkstr[0] == 'A') { checkstr[0] = '-'; } if(checkstr[1] == 'A') { checkstr[1] = '-'; } checkstr[2] = '\0'; - lookup(NASET, C11Table, checkstr[0], dest); - lookup(NASET, C11Table, checkstr[1], dest); + lookup(SODIUM, C11Table, checkstr[0], dest); + lookup(SODIUM, C11Table, checkstr[1], dest); /* Stop character */ concat (dest, "11221"); @@ -172,45 +171,35 @@ int c39(struct zint_symbol *symbol, unsigned char source[], int length) char check_digit; int error_number; char dest[775]; - char localstr[3]; - unsigned char local_source[75]; + char localstr[2] = { 0 }; error_number = 0; counter = 0; - strcpy(dest, ""); - strcpy(localstr, ""); if((symbol->option_2 < 0) || (symbol->option_2 > 1)) { symbol->option_2 = 0; } - if(symbol->symbology == BARCODE_LOGMARS) { - if(length > 59) { + if((symbol->symbology == BARCODE_LOGMARS) && (length > 59)) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; - } - } else { - if(length > 74) { + } else if(length > 74) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; - } } - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } - to_upper(local_source); - error_number = is_sane(TCSET , local_source, length); + to_upper(source); + error_number = is_sane(SILVER , source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } /* Start character */ - concat(dest, "1211212111"); + strcpy(dest, "1211212111"); for(i = 0; i < length; i++) { - lookup(TCSET, C39Table, local_source[i], dest); - counter += posn(TCSET, local_source[i]); + lookup(SILVER, C39Table, source[i], dest); + counter += posn(SILVER, source[i]); } if((symbol->symbology == BARCODE_LOGMARS) || (symbol->option_2 == 1)) { @@ -234,7 +223,7 @@ int c39(struct zint_symbol *symbol, unsigned char source[], int length) } } } - lookup(TCSET, C39Table, check_digit, dest); + lookup(SILVER, C39Table, check_digit, dest); /* Display a space check digit as _, otherwise it looks like an error */ if(check_digit == ' ') { @@ -250,7 +239,8 @@ 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 */ - for(i = 0; i < strlen(dest); i++) { + counter = strlen(dest); + for(i = 0; i < counter; i++) { if(dest[i] == '2') { dest[i] = '3'; } @@ -261,11 +251,11 @@ int c39(struct zint_symbol *symbol, unsigned char source[], int length) if(symbol->symbology == BARCODE_CODE39) { ustrcpy(symbol->text, (unsigned char*)"*"); - uconcat(symbol->text, local_source); + uconcat(symbol->text, source); uconcat(symbol->text, (unsigned char*)localstr); uconcat(symbol->text, (unsigned char*)"*"); } else { - ustrcpy(symbol->text, local_source); + ustrcpy(symbol->text, source); uconcat(symbol->text, (unsigned char*)localstr); } return error_number; @@ -274,10 +264,9 @@ int c39(struct zint_symbol *symbol, unsigned char source[], int length) int pharmazentral(struct zint_symbol *symbol, unsigned char source[], int length) { /* Pharmazentral Nummer (PZN) */ - int i, error_number; + int i, error_number, zeroes; unsigned int count, check_digit; - char localstr[10], checkstr[3]; - int zeroes; + char localstr[10]; error_number = 0; @@ -286,34 +275,31 @@ int pharmazentral(struct zint_symbol *symbol, unsigned char source[], int length strcpy(symbol->errtxt, "Input wrong length"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } - strcpy(localstr, "-"); - zeroes = 6 - length; - for(i = 0; i < zeroes; i++) - concat(localstr, "0"); - concat(localstr, (char *)source); + localstr[0] = '-'; + zeroes = 6 - length + 1; + for(i = 1; i < zeroes; i++) + localstr[i] = '0'; + strcpy(localstr + zeroes, (char *)source); - for (i = 1; i < 7; i++) - { + for (i = 1; i < 7; i++) { count += (i + 1) * ctoi(localstr[i]); } check_digit = count%11; if (check_digit == 11) { check_digit = 0; } - checkstr[0] = itoc(check_digit); - checkstr[1] = '\0'; - if(checkstr[0] == 'A') { + localstr[7] = itoc(check_digit); + localstr[8] = '\0'; + if(localstr[7] == 'A') { strcpy(symbol->errtxt, "Invalid PZN Data"); return ERROR_INVALID_DATA; } - concat(localstr, checkstr); - length = strlen(localstr); - error_number = c39(symbol, (unsigned char *)localstr, length); + error_number = c39(symbol, (unsigned char *)localstr, strlen(localstr)); ustrcpy(symbol->text, (unsigned char *)"PZN"); uconcat(symbol->text, (unsigned char *)localstr); return error_number; @@ -325,11 +311,10 @@ int pharmazentral(struct zint_symbol *symbol, unsigned char source[], int length int ec39(struct zint_symbol *symbol, unsigned char source[], int length) { /* Extended Code 39 - ISO/IEC 16388:2007 Annex A */ - unsigned char buffer[150]; + unsigned char buffer[150] = { 0 }; unsigned int i; int error_number; - memset(buffer,0,150); error_number = 0; if(length > 74) { @@ -337,31 +322,23 @@ int ec39(struct zint_symbol *symbol, unsigned char source[], int length) return ERROR_TOO_LONG; } - + /* Creates a buffer string and places control characters into it */ for(i = 0; i < length; i++) { if(source[i] > 127) { /* Cannot encode extended ASCII */ strcpy(symbol->errtxt, "Invalid characters in input data"); return ERROR_INVALID_DATA; } - } - - /* Creates a buffer string and places control characters into it */ - for(i = 0; i < length; i++) { - concat((char*)buffer, EC39Ctrl[source[i]]); + concat((char*)buffer, EC39Ctrl[source[i]]); } /* Then sends the buffer to the C39 function */ error_number = c39(symbol, buffer, ustrlen(buffer)); - for(i = 0; i < length; i++) { - if(source[i] == '\0') { - symbol->text[i] = ' '; - } else { - symbol->text[i] = source[i]; - } - } + for(i = 0; i < length; i++) + symbol->text[i] = source[i] ? source[i] : ' '; symbol->text[length] = '\0'; + return error_number; } @@ -370,119 +347,89 @@ int ec39(struct zint_symbol *symbol, unsigned char source[], int length) int c93(struct zint_symbol *symbol, unsigned char source[], int length) { /* Code 93 is an advancement on Code 39 and the definition is a lot tighter */ - /* TCSET includes the extra characters a, b, c and d to represent Code 93 specific + /* SILVER includes the extra characters a, b, c and d to represent Code 93 specific shift characters 1, 2, 3 and 4 respectively. These characters are never used by c39() and ec39() */ - unsigned int i; - int h, weight, c, k, values[100], error_number; - char buffer[220], temp[2]; - char set_copy[] = TCSET; + int i; + int h, weight, c, k, values[128], error_number; + char buffer[220]; char dest[670]; - unsigned char local_source[110]; + char set_copy[] = SILVER; error_number = 0; - strcpy(buffer, ""); - strcpy(dest, ""); + strcpy(buffer, ""); if(length > 107) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } - - for(i = 0; i < length; i++) { - if(local_source[i] > 127) { + /* Message Content */ + for (i = 0; i < length; i++) { + if (source[i] > 127) { /* Cannot encode extended ASCII */ strcpy(symbol->errtxt, "Invalid characters in input data"); return ERROR_INVALID_DATA; } + concat(buffer, C93Ctrl[source[i]]); + symbol->text[i] = source[i] ? source[i] : ' '; } - /* Start character */ - concat(dest, "111141"); - - /* Message Content */ - for(i = 0; i < length; i++) { - concat(buffer, C93Ctrl[local_source[i]]); - } - /* Now we can check the true length of the barcode */ - if(strlen(buffer) > 107) { + h = strlen(buffer); + if (h > 107) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - for(i = 0; i < strlen(buffer); i++) { - values[i] = posn(TCSET, buffer[i]); + for (i = 0; i < h; i++) { + values[i] = posn(SILVER, buffer[i]); } /* Putting the data into dest[] is not done until after check digits are calculated */ /* Check digit C */ - c = 0; weight = 1; - for(h = strlen(buffer) - 1; h >= 0; h--) - { - c += values[h] * weight; - weight ++; - if(weight == 21) - { + for (i = h - 1; i >= 0; i--) { + c += values[i] * weight; + weight++; + if (weight == 21) weight = 1; - } } c = c % 47; - - /* Because concat() requires a string as its second argument the check digit is converted - to a character which is then put in temp[] before being added to buffer[] - its - a bit long winded but avoids putting yet another function into common.c */ - - values[strlen(buffer)] = c; - temp[0] = set_copy[c]; - temp[1] = '\0'; - concat(buffer, temp); + values[h] = c; + buffer[h] = set_copy[c]; /* Check digit K */ k = 0; weight = 1; - for(h = strlen(buffer) - 1; h >= 0; h--) - { - k += values[h] * weight; - weight ++; + for (i = h; i >= 0; i--) { + k += values[i] * weight; + weight++; if(weight == 16) - { weight = 1; - } } k = k % 47; - temp[0] = set_copy[k]; - temp[1] = '\0'; - concat(buffer, temp); + buffer[++h] = set_copy[k]; + buffer[++h] = '\0'; - for(i = 0; i < strlen(buffer); i++) { - lookup(TCSET, C93Table, buffer[i], dest); + /* Start character */ + strcpy(dest, "111141"); + + for(i = 0; i < h; i++) { + lookup(SILVER, C93Table, buffer[i], dest); } /* Stop character */ concat(dest, "1111411"); - - local_source[length] = set_copy[c]; - local_source[length + 1] = set_copy[k]; - local_source[length + 2] = '\0'; - length += 2; expand(symbol, dest); - for(i = 0; i < length; i++) { - if(local_source[i] == '\0') { - symbol->text[i] = ' '; - } else { - symbol->text[i] = local_source[i]; - } - } - symbol->text[length] = '\0'; + + symbol->text[length] = set_copy[c]; + symbol->text[length + 1] = set_copy[k]; + symbol->text[length + 2] = '\0'; + return error_number; } @@ -550,7 +497,7 @@ int channel_code(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; @@ -584,12 +531,9 @@ int channel_code(struct zint_symbol *symbol, unsigned char source[], int length) value = 0; NextS(channels,3,channels,channels); - strcpy(hrt, ""); zeroes = channels - 1 - length; - for(i = 0; i < zeroes; i++) { - concat(hrt, "0"); - } - concat(hrt, (char *)source); + memset(hrt, '0', zeroes); + strcpy(hrt + zeroes, (char *)source); ustrcpy(symbol->text, (unsigned char *)hrt); expand(symbol, pattern); diff --git a/backend/code1.c b/backend/code1.c index 119363c1..1a5e9ad2 100644 --- a/backend/code1.c +++ b/backend/code1.c @@ -1027,20 +1027,20 @@ int code_one(struct zint_symbol *symbol, unsigned char source[], int length) int stream[30]; int block_width; - if(is_sane(NESET, source, length) == ERROR_INVALID_DATA) { - strcpy(symbol->errtxt, "Invalid input data (Version S encodes numeric input only)"); - return ERROR_INVALID_DATA; - } if(length > 18) { strcpy(symbol->errtxt, "Input data too long"); return ERROR_TOO_LONG; } + if(is_sane(NEON, source, length) == ERROR_INVALID_DATA) { + strcpy(symbol->errtxt, "Invalid input data (Version S encodes numeric input only)"); + return ERROR_INVALID_DATA; + } sub_version = 3; codewords = 12; block_width = 6; /* Version S-30 */ if(length <= 12) { sub_version = 2; codewords = 8; block_width = 4; } /* Version S-20 */ if(length <= 6) { sub_version = 1; codewords = 4; block_width = 2; } /* Version S-10 */ - binary_load(elreg, (char *)source); + binary_load(elreg, (char *)source, length); hex_dump(elreg); for(i = 0; i < 15; i++) { diff --git a/backend/code128.c b/backend/code128.c index 0ff9d5e6..c6582403 100644 --- a/backend/code128.c +++ b/backend/code128.c @@ -67,12 +67,12 @@ int parunmodd(unsigned char llyth) modd = 0; if(llyth <= 31) { modd = SHIFTA; } - if((llyth >= 32) && (llyth <= 95)) { modd = AORB; } - if((llyth >= 48) && (llyth <= 57)) { modd = ABORC; } - if((llyth >= 96) && (llyth <= 127)) { modd = SHIFTB; } - if((llyth >= 128) && (llyth <= 159)) { modd = SHIFTA; } - if((llyth >= 160) && (llyth <= 223)) { modd = AORB; } - if(llyth >= 224) { modd = SHIFTB; } + else if((llyth >= 48) && (llyth <= 57)) { modd = ABORC; } + else if(llyth <= 95) { modd = AORB; } + else if(llyth <= 127) { modd = SHIFTB; } + else if(llyth <= 159) { modd = SHIFTA; } + else if(llyth <= 223) { modd = AORB; } + else { modd = SHIFTB; } return modd; } @@ -191,9 +191,9 @@ void c128_set_c(unsigned char source_a, unsigned char source_b, char dest[], int int code_128(struct zint_symbol *symbol, unsigned char source[], int length) { /* Handle Code 128 and NVE-18 */ - int i, j, k, e_count, values[170], bar_characters, read, total_sum, nve_check; + int i, j, k, e_count, values[170] = { 0 }, bar_characters, read, total_sum, nve_check; int error_number, indexchaine, indexliste, sourcelen, f_state; - char set[170], fset[170], mode, last_set, last_fset, current_set = ' '; + char set[170] = { ' ' }, fset[170] = { ' ' }, mode, last_set, last_fset, current_set = ' '; float glyph_count; char dest[1000]; @@ -208,12 +208,6 @@ int code_128(struct zint_symbol *symbol, unsigned char source[], int length) nve_check = 0; f_state = 0; - for(i = 0; i < 170; i++) { - values[i] = 0; - set[i] = ' '; - fset[i] = ' '; - } - if(sourcelen > 160) { /* This only blocks rediculously long input - the actual length of the resulting barcode depends on the type of data, so this is trapped later */ @@ -223,11 +217,8 @@ int code_128(struct zint_symbol *symbol, unsigned char source[], int length) /* Detect extended ASCII characters */ for(i = 0; i < sourcelen; i++) { - if(source[i] >= 128) { + if(source[i] >= 128) fset[i] = 'f'; - } else { - fset[i] = ' '; - } } fset[i] = '\0'; @@ -254,17 +245,15 @@ int code_128(struct zint_symbol *symbol, unsigned char source[], int length) } /* Decide if it is worth reverting to 646 encodation for a few characters as described in 4.3.4.2 (d) */ - if(sourcelen > 1) { - for(i = 1; i < sourcelen; i++) { - if((fset[i - 1] == 'F') && (fset[i] == ' ')) { - /* Detected a change from 8859-1 to 646 - count how long for */ - for(j = 0; (fset[i + j] == ' ') && ((i + j) < sourcelen); j++); - if((j < 5) || ((j < 3) && ((i + j) == (sourcelen - 1)))) { - /* Uses the same figures recommended by Annex E note 3 */ - /* Change to shifting back rather than latching back */ - for(k = 0; k < j; k++) { - fset[i + k] = 'n'; - } + for(i = 1; i < sourcelen; i++) { + if((fset[i - 1] == 'F') && (fset[i] == ' ')) { + /* Detected a change from 8859-1 to 646 - count how long for */ + for(j = 0; (fset[i + j] == ' ') && ((i + j) < sourcelen); j++); + if((j < 5) || ((j < 3) && ((i + j) == (sourcelen - 1)))) { + /* Uses the same figures recommended by Annex E note 3 */ + /* Change to shifting back rather than latching back */ + for(k = 0; k < j; k++) { + fset[i + k] = 'n'; } } } @@ -564,12 +553,9 @@ int code_128(struct zint_symbol *symbol, unsigned char source[], int length) /* Stop character */ concat(dest, C128Table[106]); expand(symbol, dest); + for(i = 0; i < length; i++) { - if(source[i] == '\0') { - symbol->text[i] = ' '; - } else { - symbol->text[i] = source[i]; - } + symbol->text[i] = source[i] ? source[i] : ' '; } symbol->text[length] = '\0'; return error_number; @@ -584,9 +570,9 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[], int length) char dest[1000]; int separator_row, linkage_flag, c_count; #ifndef _MSC_VER - char reduced[length]; + char reduced[length + 1]; #else - char* reduced = (char*)_alloca(length); + char* reduced = (char*)_alloca(length + 1); #endif error_number = 0; strcpy(dest, ""); @@ -597,10 +583,8 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[], int length) bar_characters = 0; separator_row = 0; - for(i = 0; i < 170; i++) { - values[i] = 0; - set[i] = ' '; - } + memset(values, 0, sizeof(values)); + memset(set, ' ', sizeof(set)); if(length > 160) { /* This only blocks rediculously long input - the actual length of the @@ -625,7 +609,7 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[], int length) if(symbol->input_mode != GS1_MODE) { /* GS1 data has not been checked yet */ - error_number = gs1_verify(symbol, source, reduced); + error_number = gs1_verify(symbol, source, length, reduced); if(error_number != 0) { return error_number; } } @@ -884,7 +868,7 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[], int length) } } - for(i = 0; i <= length; i++) { + for(i = 0; i < length; i++) { if((source[i] != '[') && (source[i] != ']')) { symbol->text[i] = source[i]; } @@ -902,7 +886,7 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[], int length) int nve_18(struct zint_symbol *symbol, unsigned char source[], int length) { /* Add check digit if encoding an NVE18 symbol */ - int error_number, zeroes, i, j, nve_check, total_sum, sourcelen; + int error_number, zeroes, i, nve_check, total_sum, sourcelen; unsigned char ean128_equiv[25]; memset(ean128_equiv, 0, 25); @@ -913,20 +897,15 @@ int nve_18(struct zint_symbol *symbol, unsigned char source[], int length) return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } - - concat((char *)ean128_equiv, "[00]"); zeroes = 17 - sourcelen; - for(i = 0; i < zeroes; i++) { - j = ustrlen(ean128_equiv); - ean128_equiv[j] = '0'; - ean128_equiv[j + 1] = '\0'; - } - concat((char*)ean128_equiv, (char*)source); + strcpy((char *)ean128_equiv, "[00]"); + memset(ean128_equiv + 4, '0', zeroes); + strcpy((char*)ean128_equiv + 4 + zeroes, (char*)source); total_sum = 0; for(i = sourcelen - 1; i >= 0; i--) @@ -937,7 +916,7 @@ int nve_18(struct zint_symbol *symbol, unsigned char source[], int length) total_sum += 2 * ctoi(source[i]); } } - nve_check = 10 - total_sum%10; + nve_check = 10 - total_sum % 10; if(nve_check == 10) { nve_check = 0; } ean128_equiv[21] = itoc(nve_check); ean128_equiv[22] = '\0'; @@ -950,43 +929,37 @@ int nve_18(struct zint_symbol *symbol, unsigned char source[], int length) int ean_14(struct zint_symbol *symbol, unsigned char source[], int length) { /* EAN-14 - A version of EAN-128 */ - int i, j, count, check_digit; + int i, count, check_digit; int error_number, zeroes; unsigned char ean128_equiv[20]; - memset(ean128_equiv, 0, 20); - if(length > 13) { strcpy(symbol->errtxt, "Input wrong length"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid character in data"); return error_number; } - concat((char*)ean128_equiv, "[01]"); zeroes = 13 - length; - for(i = 0; i < zeroes; i++) { - j = ustrlen(ean128_equiv); - ean128_equiv[j] = '0'; - ean128_equiv[j + 1] = '\0'; - } - concat((char*)ean128_equiv, (char*)source); + strcpy((char*)ean128_equiv, "[01]"); + memset(ean128_equiv + 4, '0', zeroes); + ustrcpy(ean128_equiv + 4 + zeroes, source); count = 0; for (i = length - 1; i >= 0; i--) { count += ctoi(source[i]); - if (!((i%2) == 1)) + if (!((i % 2) == 1)) { count += 2 * ctoi(source[i]); } } - check_digit = 10 - (count%10); + check_digit = 10 - (count % 10); if (check_digit == 10) { check_digit = 0; } ean128_equiv[17] = itoc(check_digit); ean128_equiv[18] = '\0'; diff --git a/backend/code16k.c b/backend/code16k.c index b360af6a..091b8b46 100644 --- a/backend/code16k.c +++ b/backend/code16k.c @@ -65,8 +65,6 @@ static char *C16KStartStop[8] = {"3211", "2221", "2122", "1411", "1132", "1231", static int C16KStartValues[16] = {0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7}; static int C16KStopValues[16] = {0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 0, 1, 2, 3}; -int parunmodd(unsigned char llyth); - void grwp16(int *indexliste) { int i, j; @@ -172,9 +170,9 @@ int code16k(struct zint_symbol *symbol, unsigned char source[], int length) char width_pattern[100]; int current_row, rows_needed, flip_flop, looper, first_check, second_check; int indexliste, indexchaine, pads_needed, f_state; - char set[160], fset[160], mode, last_set, last_fset, current_set; + char set[160] = { ' ' }, fset[160] = { ' ' }, mode, last_set, last_fset, current_set; unsigned int i, j, k, m, e_count, read, mx_reader, writer; - unsigned int values[160]; + unsigned int values[160] = { 0 }; unsigned int bar_characters; float glyph_count; int errornum, first_sum, second_sum; @@ -194,12 +192,6 @@ int code16k(struct zint_symbol *symbol, unsigned char source[], int length) e_count = 0; bar_characters = 0; - - for(i = 0; i < 160; i++) { - values[i] = 0; - set[i] = ' '; - fset[i] = ' '; - } /* Detect extended ASCII characters */ for(i = 0; i < input_length; i++) { diff --git a/backend/code49.c b/backend/code49.c index 8b259d56..74883b08 100644 --- a/backend/code49.c +++ b/backend/code49.c @@ -30,7 +30,7 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], int length) { - int i, j, rows, M, x_count, y_count, z_count, posn_val, local_value; + int i, j, rows, M, x_count, y_count, z_count, posn_val, local_value, h; char intermediate[170]; int codewords[170], codeword_count; int c_grid[8][8]; /* Refers to table 3 */ @@ -45,25 +45,21 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], int length) } if(symbol->input_mode == GS1_MODE) { gs1 = 1; } else { gs1 = 0; } - strcpy(intermediate, ""); + strcpy(intermediate, gs1 ? "*" : ""); /* FNC1 */ for(i = 0; i < length; i++) { if(source[i] > 127) { strcpy(symbol->errtxt, "Invalid characters in input data"); return ERROR_INVALID_DATA; } - if(gs1 && (i == 0)) { + if(gs1 && (source[i] == '[')) concat(intermediate, "*"); /* FNC1 */ - } - - if(gs1 && (source[i] == '[')) { - concat(intermediate, "*"); /* FNC1 */ - } else { + else concat(intermediate, c49_table7[source[i]]); - } } codeword_count = 0; i = 0; + h = strlen(intermediate); do { if((intermediate[i] >= '0') && (intermediate[i] <= '9')) { /* Numeric data */ @@ -166,7 +162,7 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], int length) i += 4; break; } - if(i < strlen(intermediate)) { + if(i < h) { /* There is more to add */ codewords[codeword_count] = 48; /* Numeric Shift */ codeword_count++; @@ -181,7 +177,7 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], int length) codeword_count++; i++; } - } while(i < strlen(intermediate)); + } while(i < h); switch(codewords[0]) { /* Set starting mode value */ case 48: M = 2; diff --git a/backend/common.c b/backend/common.c index 733818b0..9cf3a56d 100644 --- a/backend/common.c +++ b/backend/common.c @@ -23,8 +23,6 @@ #include #include "common.h" -#define SSET "0123456789ABCDEF" - const int ustrlen(unsigned char data[]) { /* Local replacement for strlen() with unsigned char strings */ int i; @@ -46,10 +44,11 @@ void ustrcpy(unsigned char target[], unsigned char source[]) { void concat(char dest[], char source[]) { /* Concatinates dest[] with the contents of source[], copying /0 as well */ - unsigned int i, j; + unsigned int i, j, n; j = strlen(dest); - for(i = 0; i <= strlen(source); i++) { + n = strlen(source); + for(i = 0; i <= n; i++) { dest[i + j] = source[i]; } } @@ -80,9 +79,9 @@ char itoc(int source) void to_upper(unsigned char source[]) { /* Converts lower case characters to upper case in a string source[] */ - unsigned int i; + unsigned int i, src_len = ustrlen(source); - for (i = 0; i < ustrlen(source); i++) { + for (i = 0; i < src_len; i++) { if ((source[i] >= 'a') && (source[i] <= 'z')) { source [i] = (source[i] - 'a') + 'A'; } } @@ -91,13 +90,19 @@ void to_upper(unsigned char source[]) int is_sane(char test_string[], unsigned char source[], int length) { /* Verifies that a string only uses valid characters */ unsigned int i, j, latch; + unsigned int lt = strlen(test_string); for(i = 0; i < length; i++) { latch = FALSE; - for(j = 0; j < strlen(test_string); j++) { - if (source[i] == test_string[j]) { latch = TRUE; } } + for(j = 0; j < lt; j++) { + if (source[i] == test_string[j]) { + latch = TRUE; + break; + } + } if (!(latch)) { - return ERROR_INVALID_DATA; } + return ERROR_INVALID_DATA; + } } return 0; @@ -105,29 +110,25 @@ int is_sane(char test_string[], unsigned char source[], int length) int posn(char set_string[], char data) { /* Returns the position of data in set_string */ - unsigned int i; + unsigned int i, n = strlen(set_string); - for(i = 0; i < strlen(set_string); i++) { + for(i = 0; i < n; i++) { if (data == set_string[i]) { return i; } } return 0; } void lookup(char set_string[], char *table[], char data, char dest[]) { /* Replaces huge switch statements for looking up in tables */ - unsigned int i; + unsigned int i, n = strlen(set_string); - for(i = 0; i < strlen(set_string); i++) { + for(i = 0; i < n; i++) { if (data == set_string[i]) { concat(dest, table[i]); } } } int module_is_set(struct zint_symbol *symbol, int y_coord, int x_coord) { - int x_char, x_sub, result; - - x_char = x_coord / 7; - x_sub = x_coord % 7; - result = 0; - + return (symbol->encoded_data[y_coord][x_coord / 7] & (1 << (x_coord % 7))) ? 1 : 0; +#if 0 switch(x_sub) { case 0: if((symbol->encoded_data[y_coord][x_char] & 0x01) != 0) { result = 1; } break; case 1: if((symbol->encoded_data[y_coord][x_char] & 0x02) != 0) { result = 1; } break; @@ -139,12 +140,15 @@ int module_is_set(struct zint_symbol *symbol, int y_coord, int x_coord) } return result; +#endif } void set_module(struct zint_symbol *symbol, int y_coord, int x_coord) { - int x_char, x_sub; if(module_is_set(symbol, y_coord, x_coord)) { return; } + symbol->encoded_data[y_coord][x_coord / 7] += 1 << (x_coord % 7); +#if 0 + int x_char, x_sub; x_char = x_coord / 7; @@ -159,12 +163,15 @@ void set_module(struct zint_symbol *symbol, int y_coord, int x_coord) case 5: symbol->encoded_data[y_coord][x_char] += 0x20; break; case 6: symbol->encoded_data[y_coord][x_char] += 0x40; break; } /* The last binary digit is reserved for colour barcodes */ +#endif } void unset_module(struct zint_symbol *symbol, int y_coord, int x_coord) { - int x_char, x_sub; if(!(module_is_set(symbol, y_coord, x_coord))) { return; } + symbol->encoded_data[y_coord][x_coord / 7] -= 1 << (x_coord % 7); +#if 0 + int x_char, x_sub; x_char = x_coord / 7; x_sub = x_coord % 7; @@ -178,18 +185,20 @@ void unset_module(struct zint_symbol *symbol, int y_coord, int x_coord) case 5: symbol->encoded_data[y_coord][x_char] -= 0x20; break; case 6: symbol->encoded_data[y_coord][x_char] -= 0x40; break; } /* The last binary digit is reserved for colour barcodes */ +#endif } void expand(struct zint_symbol *symbol, char data[]) { /* Expands from a width pattern to a bit pattern */ - int reader, writer, i; + unsigned int reader, n = strlen(data); + int writer, i; char latch; writer = 0; latch = '1'; - for(reader = 0; reader < strlen(data); reader++) { + for(reader = 0; reader < n; reader++) { for(i = 0; i < ctoi(data[reader]); i++) { if(latch == '1') { set_module(symbol, symbol->rows, writer); } writer++; @@ -316,4 +325,73 @@ int latin1_process(struct zint_symbol *symbol, unsigned char source[], unsigned return 0; } +int utf8toutf16(struct zint_symbol *symbol, unsigned char source[], int vals[], int *length) +{ + int bpos, jpos, error_number, done; + int next; + + bpos = 0; + jpos = 0; + error_number = 0; + next = 0; + + do { + done = 0; + + if(source[bpos] <= 0x7f) { + /* 1 byte mode (7-bit ASCII) */ + vals[jpos] = source[bpos]; + next = bpos + 1; + jpos++; + done = 1; + } + + if(done == 0) { + if((source[bpos] >= 0x80) && (source[bpos] <= 0xbf)) { + strcpy(symbol->errtxt, "Corrupt Unicode data"); + return ERROR_INVALID_DATA; + } + } + + if(done == 0) { + if((source[bpos] >= 0xc0) && (source[bpos] <= 0xc1)) { + strcpy(symbol->errtxt, "Overlong encoding not supported"); + return ERROR_INVALID_DATA; + } + } + + if(done == 0) { + if((source[bpos] >= 0xc2) && (source[bpos] <= 0xdf)) { + /* 2 byte mode */ + vals[jpos] = ((source[bpos] & 0x1f) << 6) + (source[bpos + 1] & 0x3f); + next = bpos + 2; + jpos++; + done = 1; + } + } + + if(done == 0) { + if((source[bpos] >= 0xe0) && (source[bpos] <= 0xef)) { + /* 3 byte mode */ + vals[jpos] = ((source[bpos] & 0x0f) << 12) + ((source[bpos + 1] & 0x3f) << 6) + (source[bpos + 2] & 0x3f); + next = bpos + 3; + jpos ++; + done = 1; + } + } + + if(done == 0) { + if(source[bpos] >= 0xf0) { + strcpy(symbol->errtxt, "Unicode sequences of more than 3 bytes not supported"); + return ERROR_INVALID_DATA; + } + } + + bpos = next; + + } while(bpos < *length); + *length = jpos; + + return error_number; +} diff --git a/backend/common.h b/backend/common.h index 611688cb..04602988 100644 --- a/backend/common.h +++ b/backend/common.h @@ -32,7 +32,7 @@ #endif /* The most commonly used set */ -#define NESET "0123456789" +#define NEON "0123456789" #include "zint.h" @@ -60,7 +60,9 @@ extern void set_module(struct zint_symbol *symbol, int y_coord, int x_coord); extern void unset_module(struct zint_symbol *symbol, int y_coord, int x_coord); extern int istwodigits(unsigned char source[], int position); extern float froundup(float input); +extern int parunmodd(unsigned char llyth); extern int latin1_process(struct zint_symbol *symbol, unsigned char source[], unsigned char preprocessed[], int *length); +extern int utf8toutf16(struct zint_symbol *symbol, unsigned char source[], int vals[], int *length); #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/backend/composite.c b/backend/composite.c index 8e6378a5..82f3360e 100644 --- a/backend/composite.c +++ b/backend/composite.c @@ -52,12 +52,12 @@ #define UINT unsigned short -int general_rules(char field[], char type[]); -int eanx(struct zint_symbol *symbol, unsigned char source[], int length); -int ean_128(struct zint_symbol *symbol, unsigned char source[], int length); -int rss14(struct zint_symbol *symbol, unsigned char source[], int length); -int rsslimited(struct zint_symbol *symbol, unsigned char source[], int length); -int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int length); +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 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); static UINT pwr928[69][7]; @@ -1694,14 +1694,12 @@ int cc_binary_string(struct zint_symbol *symbol, const char source[], char binar void add_leading_zeroes(struct zint_symbol *symbol) { - char source[100]; - char first_part[20], second_part[20], zfirst_part[20], zsecond_part[20]; int with_addon = 0; - int first_len = 0, second_len = 0, zfirst_len = 0, zsecond_len = 0, i; + int first_len = 0, second_len = 0, zfirst_len = 0, zsecond_len = 0, i, h, n = 0; - strcpy(source, symbol->primary); - for(i = 0; i < strlen(source); i++) { - if(source[i] == '+') { + h = strlen(symbol->primary); + for(i = 0; i < h; i++) { + if(symbol->primary[i] == '+') { with_addon = 1; } else { if(with_addon == 0) { @@ -1712,22 +1710,6 @@ void add_leading_zeroes(struct zint_symbol *symbol) } } - strcpy(first_part, ""); - strcpy(second_part, ""); - strcpy(zfirst_part, ""); - strcpy(zsecond_part, ""); - - /* Split input into two strings */ - for(i = 0; i < first_len; i++) { - first_part[i] = source[i]; - first_part[i + 1] = '\0'; - } - - for(i = 0; i < second_len; i++) { - second_part[i] = source[i + first_len + 1]; - second_part[i + 1] = '\0'; - } - /* Calculate target lengths */ if(first_len <= 12) { zfirst_len = 12; } if(first_len <= 7) { zfirst_len = 7; } @@ -1736,48 +1718,47 @@ void add_leading_zeroes(struct zint_symbol *symbol) if(second_len == 0) { zsecond_len = 0; } /* Add leading zeroes */ - for(i = 0; i < (zfirst_len - first_len); i++) { - concat(zfirst_part, "0"); + n = zfirst_len - first_len; + if (n > 0) + { + memmove(symbol->primary + n, symbol->primary, h); + memset(symbol->primary, '0', n); } - concat(zfirst_part, first_part); - for(i = 0; i < (zsecond_len - second_len); i++) { - concat(zsecond_part, "0"); - } - concat(zsecond_part, second_part); - - strcpy(symbol->primary, zfirst_part); - if(zsecond_len != 0) { - concat(symbol->primary, "+"); - concat(symbol->primary, zsecond_part); + n += first_len + 1; + if (zsecond_len) + { + memmove(symbol->primary + n + zsecond_len, symbol->primary + n, second_len); + memset(symbol->primary + n , '0', zsecond_len); + n += zsecond_len + second_len; } + symbol->primary[n] = '\0'; } int composite(struct zint_symbol *symbol, unsigned char source[], int length) { int error_number, cc_mode, cc_width, ecc_level; int j, i, k, separator_row; + unsigned int rs = length + 1; + unsigned int bs = 20 * rs; + unsigned int pri_len; #ifndef _MSC_VER - char reduced[ustrlen(source)]; - char binary_string[10 * length]; + char reduced[rs]; + char binary_string[bs]; #else - char* reduced = (char*)_alloca(length + 1); - char* binary_string = (char*)_alloca(20 * (length + 1)); + char* reduced = (char*)_alloca(rs); + char* binary_string = (char*)_alloca(bs); #endif struct zint_symbol *linear; int top_shift, bottom_shift; error_number = 0; separator_row = 0; - - if(strlen(symbol->primary) == 0) { + pri_len = strlen(symbol->primary); + if(pri_len == 0) { strcpy(symbol->errtxt, "No primary (linear) message in 2D composite"); return ERROR_INVALID_OPTION; } - if(symbol->symbology == BARCODE_EANX_CC) { - add_leading_zeroes(symbol); - } - if(length > 2990) { strcpy(symbol->errtxt, "2D component input data too long"); return ERROR_TOO_LONG; @@ -1785,7 +1766,7 @@ int composite(struct zint_symbol *symbol, unsigned char source[], int length) linear = ZBarcode_Create(); /* Symbol contains the 2D component and Linear contains the rest */ - error_number = gs1_verify(symbol, source, reduced); + error_number = gs1_verify(symbol, source, length, reduced); if(error_number != 0) { return error_number; } cc_mode = symbol->option_1; @@ -1807,16 +1788,16 @@ int composite(struct zint_symbol *symbol, unsigned char source[], int length) } switch(symbol->symbology) { - case BARCODE_EANX_CC: error_number = eanx(linear, (unsigned char *)symbol->primary, strlen(symbol->primary)); break; - case BARCODE_EAN128_CC: error_number = ean_128(linear, (unsigned char *)symbol->primary, strlen(symbol->primary)); break; - case BARCODE_RSS14_CC: error_number = rss14(linear, (unsigned char *)symbol->primary, strlen(symbol->primary)); break; - case BARCODE_RSS_LTD_CC: error_number = rsslimited(linear, (unsigned char *)symbol->primary, strlen(symbol->primary)); break; - case BARCODE_RSS_EXP_CC: error_number = rssexpanded(linear, (unsigned char *)symbol->primary, strlen(symbol->primary)); break; - case BARCODE_UPCA_CC: error_number = eanx(linear, (unsigned char *)symbol->primary, strlen(symbol->primary)); break; - case BARCODE_UPCE_CC: error_number = eanx(linear, (unsigned char *)symbol->primary, strlen(symbol->primary)); break; - case BARCODE_RSS14STACK_CC: error_number = rss14(linear, (unsigned char *)symbol->primary, strlen(symbol->primary)); break; - case BARCODE_RSS14_OMNI_CC: error_number = rss14(linear, (unsigned char *)symbol->primary, strlen(symbol->primary)); break; - case BARCODE_RSS_EXPSTACK_CC: error_number = rssexpanded(linear, (unsigned char *)symbol->primary, strlen(symbol->primary)); break; + case BARCODE_EANX_CC: error_number = eanx(linear, (unsigned char *)symbol->primary, pri_len); break; + case BARCODE_EAN128_CC: error_number = ean_128(linear, (unsigned char *)symbol->primary, pri_len); break; + case BARCODE_RSS14_CC: error_number = rss14(linear, (unsigned char *)symbol->primary, pri_len); break; + case BARCODE_RSS_LTD_CC: error_number = rsslimited(linear, (unsigned char *)symbol->primary, pri_len); break; + case BARCODE_RSS_EXP_CC: error_number = rssexpanded(linear, (unsigned char *)symbol->primary, pri_len); break; + case BARCODE_UPCA_CC: error_number = eanx(linear, (unsigned char *)symbol->primary, pri_len); break; + case BARCODE_UPCE_CC: error_number = eanx(linear, (unsigned char *)symbol->primary, pri_len); break; + case BARCODE_RSS14STACK_CC: error_number = rss14(linear, (unsigned char *)symbol->primary, pri_len); break; + case BARCODE_RSS14_OMNI_CC: error_number = rss14(linear, (unsigned char *)symbol->primary, pri_len); break; + case BARCODE_RSS_EXPSTACK_CC: error_number = rssexpanded(linear, (unsigned char *)symbol->primary, pri_len); break; } if(error_number != 0) { @@ -1828,7 +1809,7 @@ int composite(struct zint_symbol *symbol, unsigned char source[], int length) switch(symbol->symbology) { /* Determine width of 2D component according to ISO/IEC 24723 Table 1 */ case BARCODE_EANX_CC: - switch(strlen(symbol->primary)) { + switch(pri_len) { case 7: /* EAN-8 */ case 10: /* EAN-8 + 2 */ case 13: /* EAN-8 + 5 */ @@ -1841,18 +1822,18 @@ int composite(struct zint_symbol *symbol, unsigned char source[], int length) break; } break; - case BARCODE_EAN128_CC: cc_width = 4; break; - case BARCODE_RSS14_CC: cc_width = 4; break; - case BARCODE_RSS_LTD_CC: cc_width = 3; break; - case BARCODE_RSS_EXP_CC: cc_width = 4; break; - case BARCODE_UPCA_CC: cc_width = 4; break; - case BARCODE_UPCE_CC: cc_width = 2; break; - case BARCODE_RSS14STACK_CC: cc_width = 2; break; - case BARCODE_RSS14_OMNI_CC: cc_width = 2; break; - case BARCODE_RSS_EXPSTACK_CC: cc_width = 4; break; + case BARCODE_EAN128_CC: cc_width = 4; break; + case BARCODE_RSS14_CC: cc_width = 4; break; + case BARCODE_RSS_LTD_CC: cc_width = 3; break; + case BARCODE_RSS_EXP_CC: cc_width = 4; break; + case BARCODE_UPCA_CC: cc_width = 4; break; + case BARCODE_UPCE_CC: cc_width = 2; break; + case BARCODE_RSS14STACK_CC: cc_width = 2; break; + case BARCODE_RSS14_OMNI_CC: cc_width = 2; break; + case BARCODE_RSS_EXPSTACK_CC: cc_width = 4; break; } - memset(binary_string, 0, sizeof(binary_string)); + memset(binary_string, 0, bs); if(cc_mode < 1 || cc_mode > 3) { cc_mode = 1; } @@ -1900,7 +1881,7 @@ int composite(struct zint_symbol *symbol, unsigned char source[], int length) switch(symbol->symbology) { /* Determine horizontal alignment (according to section 12.3) */ case BARCODE_EANX_CC: - switch(strlen(symbol->primary)) { + switch(pri_len) { case 7: /* EAN-8 */ case 10: /* EAN-8 + 2 */ case 13: /* EAN-8 + 5 */ @@ -1967,10 +1948,6 @@ int composite(struct zint_symbol *symbol, unsigned char source[], int length) symbol->rows += linear->rows; ustrcpy(symbol->text, (unsigned char *)linear->text); -//#ifdef _MSC_VER -// free(reduced); -// free(binary_string); -//#endif ZBarcode_Delete(linear); return error_number; diff --git a/backend/dm200.c b/backend/dm200.c index 1c8a8d17..df98d5a7 100644 --- a/backend/dm200.c +++ b/backend/dm200.c @@ -344,6 +344,7 @@ int dm200encode(struct zint_symbol *symbol, unsigned char source[], unsigned cha #else char* binary = (char*)_alloca(2 * inputlen); #endif + sp = 0; tp = 0; memset(c40_buffer, 0, 6); @@ -772,26 +773,6 @@ int data_matrix_200(struct zint_symbol *symbol, unsigned char source[], int leng unsigned char *grid = 0; inputlen = length; -#ifndef _MSC_VER - unsigned char local_source[length]; -#else - unsigned char local_source = (unsigned char*)_alloca(length); -#endif - - /* The following to be replaced by ECI handling */ - switch(symbol->input_mode) { - case DATA_MODE: - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } - local_source[length] = '\0'; - break; - case UNICODE_MODE: - error_number = latin1_process(symbol, source, local_source, &length); - if(error_number != 0) { return error_number; } - break; - } - binlen = dm200encode(symbol, source, binary, &last_mode, length); if(binlen == 0) { diff --git a/backend/dmatrix.c b/backend/dmatrix.c index ad9b8667..42c1061a 100644 --- a/backend/dmatrix.c +++ b/backend/dmatrix.c @@ -26,16 +26,16 @@ #endif #include "dmatrix.h" #include "common.h" -#ifdef _MSC_VER +#ifdef __cplusplus #include "dm200.h" #else extern int data_matrix_200(struct zint_symbol *symbol, unsigned char source[], int length); #endif -#define B11SET " 0123456789" -#define B27SET " ABCDEFGHIJKLMNOPQRSTUVWXYZ" -#define B37SET " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -#define B41SET " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-/" +#define SODIUM " 0123456789" +#define COBALT " ABCDEFGHIJKLMNOPQRSTUVWXYZ" +#define RUBIDIUM " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +#define NIOBIUM " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-/" void crc_machine(char data_prefix_bitstream[], int scheme, unsigned char source[], int length) { @@ -43,10 +43,6 @@ void crc_machine(char data_prefix_bitstream[], int scheme, unsigned char source[ char xor_register[17]; int machine_cycles; char input_bit, out1, out2, out3; -#ifdef _MSC_VER - char* precrc_bitstream; - char* precrc_bitstream_reversed; -#endif input_length = length; @@ -54,8 +50,8 @@ void crc_machine(char data_prefix_bitstream[], int scheme, unsigned char source[ char precrc_bitstream[(input_length * 8) + 18]; char precrc_bitstream_reversed[(input_length * 8) + 18]; #else - precrc_bitstream = (char*)_alloca((input_length * 8) + 18); - precrc_bitstream_reversed = (char*)_alloca((input_length * 8) + 18); + char* precrc_bitstream = (char*)_alloca((input_length * 8) + 18); + char* precrc_bitstream_reversed = (char*)_alloca((input_length * 8) + 18); #endif switch(scheme) { @@ -155,7 +151,7 @@ void i1_base11(char binary_string[], unsigned char source[], int length) block_value = 0; binary_posn = strlen(binary_string); for(j = 0; j < 6; j++) { - c[j] = posn(B11SET, source[(i * 6) + j]); + c[j] = posn(SODIUM, source[(i * 6) + j]); c[j] *= weight[j]; block_value += c[j]; } @@ -193,7 +189,7 @@ void i1_base11(char binary_string[], unsigned char source[], int length) block_value = 0; binary_posn = strlen(binary_string); for(j = 0; j < remainder; j++) { - c[j] = posn(B11SET, source[(i * 6) + j]); + c[j] = posn(SODIUM, source[(i * 6) + j]); c[j] *= weight[j]; block_value += c[j]; } @@ -257,7 +253,7 @@ void i2_base27(char binary_string[], unsigned char source[], int length) strcpy(block_binary, ""); block_value = 0; for(j = 0; j < 5; j++) { - c[j] = posn(B27SET, source[(i * 5) + j]); + c[j] = posn(COBALT, source[(i * 5) + j]); c[j] *= weight[j]; block_value += c[j]; } @@ -297,7 +293,7 @@ void i2_base27(char binary_string[], unsigned char source[], int length) strcpy(block_binary, ""); block_value = 0; for(j = 0; j < remainder; j++) { - c[j] = posn(B27SET, source[(i * 5) + j]); + c[j] = posn(COBALT, source[(i * 5) + j]); c[j] *= weight[j]; block_value += c[j]; } @@ -361,7 +357,7 @@ void i3_base37(char binary_string[], unsigned char source[], int length) strcpy(block_binary, ""); block_value = 0; for(j = 0; j < 4; j++) { - c[j] = posn(B37SET, source[(i * 4) + j]); + c[j] = posn(RUBIDIUM, source[(i * 4) + j]); c[j] *= weight[j]; block_value += c[j]; } @@ -398,7 +394,7 @@ void i3_base37(char binary_string[], unsigned char source[], int length) strcpy(block_binary, ""); block_value = 0; for(j = 0; j < remainder; j++) { - c[j] = posn(B37SET, source[(i * 4) + j]); + c[j] = posn(RUBIDIUM, source[(i * 4) + j]); c[j] *= weight[j]; block_value += c[j]; } @@ -457,7 +453,7 @@ void i4_base41(char binary_string[], unsigned char source[], int length) strcpy(block_binary, ""); block_value = 0; for(j = 0; j < 4; j++) { - c[j] = posn(B41SET, source[(i * 4) + j]); + c[j] = posn(NIOBIUM, source[(i * 4) + j]); c[j] *= weight[j]; block_value += c[j]; } @@ -495,7 +491,7 @@ void i4_base41(char binary_string[], unsigned char source[], int length) strcpy(block_binary, ""); block_value = 0; for(j = 0; j < remainder; j++) { - c[j] = posn(B41SET, source[(i * 4) + j]); + c[j] = posn(NIOBIUM, source[(i * 4) + j]); c[j] *= weight[j]; block_value += c[j]; } @@ -1104,10 +1100,10 @@ int matrix89(struct zint_symbol *symbol, unsigned char source[], int length) /* Decide which encoding scheme to use */ scheme = 128; - if(!(is_sane(B41SET, source, length))) { scheme = 41; } - if(!(is_sane(B37SET, source, length))) { scheme = 37; } - if(!(is_sane(B27SET, source, length))) { scheme = 27; } - if(!(is_sane(B11SET, source, length))) { scheme = 11; } + if(!(is_sane(NIOBIUM, source, length))) { scheme = 41; } + if(!(is_sane(RUBIDIUM, source, length))) { scheme = 37; } + if(!(is_sane(COBALT, source, length))) { scheme = 27; } + if(!(is_sane(SODIUM, source, length))) { scheme = 11; } /* Data Prefix Bit Stream = Format ID + CRC + Data Length */ diff --git a/backend/gb2312.h b/backend/gb2312.h new file mode 100644 index 00000000..f78da006 --- /dev/null +++ b/backend/gb2312.h @@ -0,0 +1,7468 @@ +/* gb2312.h - Unicode to GB 2312-1980 lookup table + + libzint - the open source barcode library + Copyright (C) 2009 Robin Stuart + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + +unsigned long int gb2312_lookup[] = { +{ + 0x00A4, 0xA1E8, + 0x00A7, 0xA1EC, + 0x00A8, 0xA1A7, + 0x00B0, 0xA1E3, + 0x00B1, 0xA1C0, + 0x00B7, 0xA1A4, + 0x00D7, 0xA1C1, + 0x00E0, 0xA8A4, + 0x00E1, 0xA8A2, + 0x00E8, 0xA8A8, + 0x00E9, 0xA8A6, + 0x00EA, 0xA8BA, + 0x00EC, 0xA8AC, + 0x00ED, 0xA8AA, + 0x00F2, 0xA8B0, + 0x00F3, 0xA8AE, + 0x00F7, 0xA1C2, + 0x00F9, 0xA8B4, + 0x00FA, 0xA8B2, + 0x00FC, 0xA8B9, + 0x0101, 0xA8A1, + 0x0113, 0xA8A5, + 0x011B, 0xA8A7, + 0x012B, 0xA8A9, + 0x014D, 0xA8AD, + 0x016B, 0xA8B1, + 0x01CE, 0xA8A3, + 0x01D0, 0xA8AB, + 0x01D2, 0xA8AF, + 0x01D4, 0xA8B3, + 0x01D6, 0xA8B5, + 0x01D8, 0xA8B6, + 0x01DA, 0xA8B7, + 0x01DC, 0xA8B8, + 0x02C7, 0xA1A6, + 0x02C9, 0xA1A5, + 0x0391, 0xA6A1, + 0x0392, 0xA6A2, + 0x0393, 0xA6A3, + 0x0394, 0xA6A4, + 0x0395, 0xA6A5, + 0x0396, 0xA6A6, + 0x0397, 0xA6A7, + 0x0398, 0xA6A8, + 0x0399, 0xA6A9, + 0x039A, 0xA6AA, + 0x039B, 0xA6AB, + 0x039C, 0xA6AC, + 0x039D, 0xA6AD, + 0x039E, 0xA6AE, + 0x039F, 0xA6AF, + 0x03A0, 0xA6B0, + 0x03A1, 0xA6B1, + 0x03A3, 0xA6B2, + 0x03A4, 0xA6B3, + 0x03A5, 0xA6B4, + 0x03A6, 0xA6B5, + 0x03A7, 0xA6B6, + 0x03A8, 0xA6B7, + 0x03A9, 0xA6B8, + 0x03B1, 0xA6C1, + 0x03B2, 0xA6C2, + 0x03B3, 0xA6C3, + 0x03B4, 0xA6C4, + 0x03B5, 0xA6C5, + 0x03B6, 0xA6C6, + 0x03B7, 0xA6C7, + 0x03B8, 0xA6C8, + 0x03B9, 0xA6C9, + 0x03BA, 0xA6CA, + 0x03BB, 0xA6CB, + 0x03BC, 0xA6CC, + 0x03BD, 0xA6CD, + 0x03BE, 0xA6CE, + 0x03BF, 0xA6CF, + 0x03C0, 0xA6D0, + 0x03C1, 0xA6D1, + 0x03C3, 0xA6D2, + 0x03C4, 0xA6D3, + 0x03C5, 0xA6D4, + 0x03C6, 0xA6D5, + 0x03C7, 0xA6D6, + 0x03C8, 0xA6D7, + 0x03C9, 0xA6D8, + 0x0401, 0xA7A7, + 0x0410, 0xA7A1, + 0x0411, 0xA7A2, + 0x0412, 0xA7A3, + 0x0413, 0xA7A4, + 0x0414, 0xA7A5, + 0x0415, 0xA7A6, + 0x0416, 0xA7A8, + 0x0417, 0xA7A9, + 0x0418, 0xA7AA, + 0x0419, 0xA7AB, + 0x041A, 0xA7AC, + 0x041B, 0xA7AD, + 0x041C, 0xA7AE, + 0x041D, 0xA7AF, + 0x041E, 0xA7B0, + 0x041F, 0xA7B1, + 0x0420, 0xA7B2, + 0x0421, 0xA7B3, + 0x0422, 0xA7B4, + 0x0423, 0xA7B5, + 0x0424, 0xA7B6, + 0x0425, 0xA7B7, + 0x0426, 0xA7B8, + 0x0427, 0xA7B9, + 0x0428, 0xA7BA, + 0x0429, 0xA7BB, + 0x042A, 0xA7BC, + 0x042B, 0xA7BD, + 0x042C, 0xA7BE, + 0x042D, 0xA7BF, + 0x042E, 0xA7C0, + 0x042F, 0xA7C1, + 0x0430, 0xA7D1, + 0x0431, 0xA7D2, + 0x0432, 0xA7D3, + 0x0433, 0xA7D4, + 0x0434, 0xA7D5, + 0x0435, 0xA7D6, + 0x0436, 0xA7D8, + 0x0437, 0xA7D9, + 0x0438, 0xA7DA, + 0x0439, 0xA7DB, + 0x043A, 0xA7DC, + 0x043B, 0xA7DD, + 0x043C, 0xA7DE, + 0x043D, 0xA7DF, + 0x043E, 0xA7E0, + 0x043F, 0xA7E1, + 0x0440, 0xA7E2, + 0x0441, 0xA7E3, + 0x0442, 0xA7E4, + 0x0443, 0xA7E5, + 0x0444, 0xA7E6, + 0x0445, 0xA7E7, + 0x0446, 0xA7E8, + 0x0447, 0xA7E9, + 0x0448, 0xA7EA, + 0x0449, 0xA7EB, + 0x044A, 0xA7EC, + 0x044B, 0xA7ED, + 0x044C, 0xA7EE, + 0x044D, 0xA7EF, + 0x044E, 0xA7F0, + 0x044F, 0xA7F1, + 0x0451, 0xA7D7, + 0x2014, 0xA1AA, + 0x2016, 0xA1AC, + 0x2018, 0xA1AE, + 0x2019, 0xA1AF, + 0x201C, 0xA1B0, + 0x201D, 0xA1B1, + 0x2026, 0xA1AD, + 0x2030, 0xA1EB, + 0x2032, 0xA1E4, + 0x2033, 0xA1E5, + 0x203B, 0xA1F9, + 0x2103, 0xA1E6, + 0x2116, 0xA1ED, + 0x2160, 0xA2F1, + 0x2161, 0xA2F2, + 0x2162, 0xA2F3, + 0x2163, 0xA2F4, + 0x2164, 0xA2F5, + 0x2165, 0xA2F6, + 0x2166, 0xA2F7, + 0x2167, 0xA2F8, + 0x2168, 0xA2F9, + 0x2169, 0xA2FA, + 0x216A, 0xA2FB, + 0x216B, 0xA2FC, + 0x2190, 0xA1FB, + 0x2191, 0xA1FC, + 0x2192, 0xA1FA, + 0x2193, 0xA1FD, + 0x2208, 0xA1CA, + 0x220F, 0xA1C7, + 0x2211, 0xA1C6, + 0x221A, 0xA1CC, + 0x221D, 0xA1D8, + 0x221E, 0xA1DE, + 0x2220, 0xA1CF, + 0x2225, 0xA1CE, + 0x2227, 0xA1C4, + 0x2228, 0xA1C5, + 0x2229, 0xA1C9, + 0x222A, 0xA1C8, + 0x222B, 0xA1D2, + 0x222E, 0xA1D3, + 0x2234, 0xA1E0, + 0x2235, 0xA1DF, + 0x2236, 0xA1C3, + 0x2237, 0xA1CB, + 0x223D, 0xA1D7, + 0x2248, 0xA1D6, + 0x224C, 0xA1D5, + 0x2260, 0xA1D9, + 0x2261, 0xA1D4, + 0x2264, 0xA1DC, + 0x2265, 0xA1DD, + 0x226E, 0xA1DA, + 0x226F, 0xA1DB, + 0x2299, 0xA1D1, + 0x22A5, 0xA1CD, + 0x2312, 0xA1D0, + 0x2460, 0xA2D9, + 0x2461, 0xA2DA, + 0x2462, 0xA2DB, + 0x2463, 0xA2DC, + 0x2464, 0xA2DD, + 0x2465, 0xA2DE, + 0x2466, 0xA2DF, + 0x2467, 0xA2E0, + 0x2468, 0xA2E1, + 0x2469, 0xA2E2, + 0x2474, 0xA2C5, + 0x2475, 0xA2C6, + 0x2476, 0xA2C7, + 0x2477, 0xA2C8, + 0x2478, 0xA2C9, + 0x2479, 0xA2CA, + 0x247A, 0xA2CB, + 0x247B, 0xA2CC, + 0x247C, 0xA2CD, + 0x247D, 0xA2CE, + 0x247E, 0xA2CF, + 0x247F, 0xA2D0, + 0x2480, 0xA2D1, + 0x2481, 0xA2D2, + 0x2482, 0xA2D3, + 0x2483, 0xA2D4, + 0x2484, 0xA2D5, + 0x2485, 0xA2D6, + 0x2486, 0xA2D7, + 0x2487, 0xA2D8, + 0x2488, 0xA2B1, + 0x2489, 0xA2B2, + 0x248A, 0xA2B3, + 0x248B, 0xA2B4, + 0x248C, 0xA2B5, + 0x248D, 0xA2B6, + 0x248E, 0xA2B7, + 0x248F, 0xA2B8, + 0x2490, 0xA2B9, + 0x2491, 0xA2BA, + 0x2492, 0xA2BB, + 0x2493, 0xA2BC, + 0x2494, 0xA2BD, + 0x2495, 0xA2BE, + 0x2496, 0xA2BF, + 0x2497, 0xA2C0, + 0x2498, 0xA2C1, + 0x2499, 0xA2C2, + 0x249A, 0xA2C3, + 0x249B, 0xA2C4, + 0x2500, 0xA9A4, + 0x2501, 0xA9A5, + 0x2502, 0xA9A6, + 0x2503, 0xA9A7, + 0x2504, 0xA9A8, + 0x2505, 0xA9A9, + 0x2506, 0xA9AA, + 0x2507, 0xA9AB, + 0x2508, 0xA9AC, + 0x2509, 0xA9AD, + 0x250A, 0xA9AE, + 0x250B, 0xA9AF, + 0x250C, 0xA9B0, + 0x250D, 0xA9B1, + 0x250E, 0xA9B2, + 0x250F, 0xA9B3, + 0x2510, 0xA9B4, + 0x2511, 0xA9B5, + 0x2512, 0xA9B6, + 0x2513, 0xA9B7, + 0x2514, 0xA9B8, + 0x2515, 0xA9B9, + 0x2516, 0xA9BA, + 0x2517, 0xA9BB, + 0x2518, 0xA9BC, + 0x2519, 0xA9BD, + 0x251A, 0xA9BE, + 0x251B, 0xA9BF, + 0x251C, 0xA9C0, + 0x251D, 0xA9C1, + 0x251E, 0xA9C2, + 0x251F, 0xA9C3, + 0x2520, 0xA9C4, + 0x2521, 0xA9C5, + 0x2522, 0xA9C6, + 0x2523, 0xA9C7, + 0x2524, 0xA9C8, + 0x2525, 0xA9C9, + 0x2526, 0xA9CA, + 0x2527, 0xA9CB, + 0x2528, 0xA9CC, + 0x2529, 0xA9CD, + 0x252A, 0xA9CE, + 0x252B, 0xA9CF, + 0x252C, 0xA9D0, + 0x252D, 0xA9D1, + 0x252E, 0xA9D2, + 0x252F, 0xA9D3, + 0x2530, 0xA9D4, + 0x2531, 0xA9D5, + 0x2532, 0xA9D6, + 0x2533, 0xA9D7, + 0x2534, 0xA9D8, + 0x2535, 0xA9D9, + 0x2536, 0xA9DA, + 0x2537, 0xA9DB, + 0x2538, 0xA9DC, + 0x2539, 0xA9DD, + 0x253A, 0xA9DE, + 0x253B, 0xA9DF, + 0x253C, 0xA9E0, + 0x253D, 0xA9E1, + 0x253E, 0xA9E2, + 0x253F, 0xA9E3, + 0x2540, 0xA9E4, + 0x2541, 0xA9E5, + 0x2542, 0xA9E6, + 0x2543, 0xA9E7, + 0x2544, 0xA9E8, + 0x2545, 0xA9E9, + 0x2546, 0xA9EA, + 0x2547, 0xA9EB, + 0x2548, 0xA9EC, + 0x2549, 0xA9ED, + 0x254A, 0xA9EE, + 0x254B, 0xA9EF, + 0x25A0, 0xA1F6, + 0x25A1, 0xA1F5, + 0x25B2, 0xA1F8, + 0x25B3, 0xA1F7, + 0x25C6, 0xA1F4, + 0x25C7, 0xA1F3, + 0x25CB, 0xA1F0, + 0x25CE, 0xA1F2, + 0x25CF, 0xA1F1, + 0x2605, 0xA1EF, + 0x2606, 0xA1EE, + 0x2640, 0xA1E2, + 0x2642, 0xA1E1, + 0x3000, 0xA1A1, + 0x3001, 0xA1A2, + 0x3002, 0xA1A3, + 0x3003, 0xA1A8, + 0x3005, 0xA1A9, + 0x3008, 0xA1B4, + 0x3009, 0xA1B5, + 0x300A, 0xA1B6, + 0x300B, 0xA1B7, + 0x300C, 0xA1B8, + 0x300D, 0xA1B9, + 0x300E, 0xA1BA, + 0x300F, 0xA1BB, + 0x3010, 0xA1BE, + 0x3011, 0xA1BF, + 0x3013, 0xA1FE, + 0x3014, 0xA1B2, + 0x3015, 0xA1B3, + 0x3016, 0xA1BC, + 0x3017, 0xA1BD, + 0x3041, 0xA4A1, + 0x3042, 0xA4A2, + 0x3043, 0xA4A3, + 0x3044, 0xA4A4, + 0x3045, 0xA4A5, + 0x3046, 0xA4A6, + 0x3047, 0xA4A7, + 0x3048, 0xA4A8, + 0x3049, 0xA4A9, + 0x304A, 0xA4AA, + 0x304B, 0xA4AB, + 0x304C, 0xA4AC, + 0x304D, 0xA4AD, + 0x304E, 0xA4AE, + 0x304F, 0xA4AF, + 0x3050, 0xA4B0, + 0x3051, 0xA4B1, + 0x3052, 0xA4B2, + 0x3053, 0xA4B3, + 0x3054, 0xA4B4, + 0x3055, 0xA4B5, + 0x3056, 0xA4B6, + 0x3057, 0xA4B7, + 0x3058, 0xA4B8, + 0x3059, 0xA4B9, + 0x305A, 0xA4BA, + 0x305B, 0xA4BB, + 0x305C, 0xA4BC, + 0x305D, 0xA4BD, + 0x305E, 0xA4BE, + 0x305F, 0xA4BF, + 0x3060, 0xA4C0, + 0x3061, 0xA4C1, + 0x3062, 0xA4C2, + 0x3063, 0xA4C3, + 0x3064, 0xA4C4, + 0x3065, 0xA4C5, + 0x3066, 0xA4C6, + 0x3067, 0xA4C7, + 0x3068, 0xA4C8, + 0x3069, 0xA4C9, + 0x306A, 0xA4CA, + 0x306B, 0xA4CB, + 0x306C, 0xA4CC, + 0x306D, 0xA4CD, + 0x306E, 0xA4CE, + 0x306F, 0xA4CF, + 0x3070, 0xA4D0, + 0x3071, 0xA4D1, + 0x3072, 0xA4D2, + 0x3073, 0xA4D3, + 0x3074, 0xA4D4, + 0x3075, 0xA4D5, + 0x3076, 0xA4D6, + 0x3077, 0xA4D7, + 0x3078, 0xA4D8, + 0x3079, 0xA4D9, + 0x307A, 0xA4DA, + 0x307B, 0xA4DB, + 0x307C, 0xA4DC, + 0x307D, 0xA4DD, + 0x307E, 0xA4DE, + 0x307F, 0xA4DF, + 0x3080, 0xA4E0, + 0x3081, 0xA4E1, + 0x3082, 0xA4E2, + 0x3083, 0xA4E3, + 0x3084, 0xA4E4, + 0x3085, 0xA4E5, + 0x3086, 0xA4E6, + 0x3087, 0xA4E7, + 0x3088, 0xA4E8, + 0x3089, 0xA4E9, + 0x308A, 0xA4EA, + 0x308B, 0xA4EB, + 0x308C, 0xA4EC, + 0x308D, 0xA4ED, + 0x308E, 0xA4EE, + 0x308F, 0xA4EF, + 0x3090, 0xA4F0, + 0x3091, 0xA4F1, + 0x3092, 0xA4F2, + 0x3093, 0xA4F3, + 0x30A1, 0xA5A1, + 0x30A2, 0xA5A2, + 0x30A3, 0xA5A3, + 0x30A4, 0xA5A4, + 0x30A5, 0xA5A5, + 0x30A6, 0xA5A6, + 0x30A7, 0xA5A7, + 0x30A8, 0xA5A8, + 0x30A9, 0xA5A9, + 0x30AA, 0xA5AA, + 0x30AB, 0xA5AB, + 0x30AC, 0xA5AC, + 0x30AD, 0xA5AD, + 0x30AE, 0xA5AE, + 0x30AF, 0xA5AF, + 0x30B0, 0xA5B0, + 0x30B1, 0xA5B1, + 0x30B2, 0xA5B2, + 0x30B3, 0xA5B3, + 0x30B4, 0xA5B4, + 0x30B5, 0xA5B5, + 0x30B6, 0xA5B6, + 0x30B7, 0xA5B7, + 0x30B8, 0xA5B8, + 0x30B9, 0xA5B9, + 0x30BA, 0xA5BA, + 0x30BB, 0xA5BB, + 0x30BC, 0xA5BC, + 0x30BD, 0xA5BD, + 0x30BE, 0xA5BE, + 0x30BF, 0xA5BF, + 0x30C0, 0xA5C0, + 0x30C1, 0xA5C1, + 0x30C2, 0xA5C2, + 0x30C3, 0xA5C3, + 0x30C4, 0xA5C4, + 0x30C5, 0xA5C5, + 0x30C6, 0xA5C6, + 0x30C7, 0xA5C7, + 0x30C8, 0xA5C8, + 0x30C9, 0xA5C9, + 0x30CA, 0xA5CA, + 0x30CB, 0xA5CB, + 0x30CC, 0xA5CC, + 0x30CD, 0xA5CD, + 0x30CE, 0xA5CE, + 0x30CF, 0xA5CF, + 0x30D0, 0xA5D0, + 0x30D1, 0xA5D1, + 0x30D2, 0xA5D2, + 0x30D3, 0xA5D3, + 0x30D4, 0xA5D4, + 0x30D5, 0xA5D5, + 0x30D6, 0xA5D6, + 0x30D7, 0xA5D7, + 0x30D8, 0xA5D8, + 0x30D9, 0xA5D9, + 0x30DA, 0xA5DA, + 0x30DB, 0xA5DB, + 0x30DC, 0xA5DC, + 0x30DD, 0xA5DD, + 0x30DE, 0xA5DE, + 0x30DF, 0xA5DF, + 0x30E0, 0xA5E0, + 0x30E1, 0xA5E1, + 0x30E2, 0xA5E2, + 0x30E3, 0xA5E3, + 0x30E4, 0xA5E4, + 0x30E5, 0xA5E5, + 0x30E6, 0xA5E6, + 0x30E7, 0xA5E7, + 0x30E8, 0xA5E8, + 0x30E9, 0xA5E9, + 0x30EA, 0xA5EA, + 0x30EB, 0xA5EB, + 0x30EC, 0xA5EC, + 0x30ED, 0xA5ED, + 0x30EE, 0xA5EE, + 0x30EF, 0xA5EF, + 0x30F0, 0xA5F0, + 0x30F1, 0xA5F1, + 0x30F2, 0xA5F2, + 0x30F3, 0xA5F3, + 0x30F4, 0xA5F4, + 0x30F5, 0xA5F5, + 0x30F6, 0xA5F6, + 0x3105, 0xA8C5, + 0x3106, 0xA8C6, + 0x3107, 0xA8C7, + 0x3108, 0xA8C8, + 0x3109, 0xA8C9, + 0x310A, 0xA8CA, + 0x310B, 0xA8CB, + 0x310C, 0xA8CC, + 0x310D, 0xA8CD, + 0x310E, 0xA8CE, + 0x310F, 0xA8CF, + 0x3110, 0xA8D0, + 0x3111, 0xA8D1, + 0x3112, 0xA8D2, + 0x3113, 0xA8D3, + 0x3114, 0xA8D4, + 0x3115, 0xA8D5, + 0x3116, 0xA8D6, + 0x3117, 0xA8D7, + 0x3118, 0xA8D8, + 0x3119, 0xA8D9, + 0x311A, 0xA8DA, + 0x311B, 0xA8DB, + 0x311C, 0xA8DC, + 0x311D, 0xA8DD, + 0x311E, 0xA8DE, + 0x311F, 0xA8DF, + 0x3120, 0xA8E0, + 0x3121, 0xA8E1, + 0x3122, 0xA8E2, + 0x3123, 0xA8E3, + 0x3124, 0xA8E4, + 0x3125, 0xA8E5, + 0x3126, 0xA8E6, + 0x3127, 0xA8E7, + 0x3128, 0xA8E8, + 0x3129, 0xA8E9, + 0x3220, 0xA2E5, + 0x3221, 0xA2E6, + 0x3222, 0xA2E7, + 0x3223, 0xA2E8, + 0x3224, 0xA2E9, + 0x3225, 0xA2EA, + 0x3226, 0xA2EB, + 0x3227, 0xA2EC, + 0x3228, 0xA2ED, + 0x3229, 0xA2EE, + 0x4E00, 0xD2BB, + 0x4E01, 0xB6A1, + 0x4E03, 0xC6DF, + 0x4E07, 0xCDF2, + 0x4E08, 0xD5C9, + 0x4E09, 0xC8FD, + 0x4E0A, 0xC9CF, + 0x4E0B, 0xCFC2, + 0x4E0C, 0xD8A2, + 0x4E0D, 0xB2BB, + 0x4E0E, 0xD3EB, + 0x4E10, 0xD8A4, + 0x4E11, 0xB3F3, + 0x4E13, 0xD7A8, + 0x4E14, 0xC7D2, + 0x4E15, 0xD8A7, + 0x4E16, 0xCAC0, + 0x4E18, 0xC7F0, + 0x4E19, 0xB1FB, + 0x4E1A, 0xD2B5, + 0x4E1B, 0xB4D4, + 0x4E1C, 0xB6AB, + 0x4E1D, 0xCBBF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0x4FFE, 0xD9C2, + 0x500C, 0xD9C4, + 0x500D, 0xB1B6, + 0x500F, 0xD9BF, + 0x5012, 0xB5B9, + 0x5014, 0xBEF3, + 0x5018, 0xCCC8, + 0x5019, 0xBAF2, + 0x501A, 0xD2D0, + 0x501C, 0xD9C3, + 0x501F, 0xBDE8, + 0x5021, 0xB3AB, + 0x5025, 0xD9C5, + 0x5026, 0xBEEB, + 0x5028, 0xD9C6, + 0x5029, 0xD9BB, + 0x502A, 0xC4DF, + 0x502C, 0xD9BE, + 0x502D, 0xD9C1, + 0x502E, 0xD9C0, + 0x503A, 0xD5AE, + 0x503C, 0xD6B5, + 0x503E, 0xC7E3, + 0x5043, 0xD9C8, + 0x5047, 0xBCD9, + 0x5048, 0xD9CA, + 0x504C, 0xD9BC, + 0x504E, 0xD9CB, + 0x504F, 0xC6AB, + 0x5055, 0xD9C9, + 0x505A, 0xD7F6, + 0x505C, 0xCDA3, + 0x5065, 0xBDA1, + 0x506C, 0xD9CC, + 0x5076, 0xC5BC, + 0x5077, 0xCDB5, + 0x507B, 0xD9CD, + 0x507E, 0xD9C7, + 0x507F, 0xB3A5, + 0x5080, 0xBFFE, + 0x5085, 0xB8B5, + 0x5088, 0xC0FC, + 0x508D, 0xB0F8, + 0x50A3, 0xB4F6, + 0x50A5, 0xD9CE, + 0x50A7, 0xD9CF, + 0x50A8, 0xB4A2, + 0x50A9, 0xD9D0, + 0x50AC, 0xB4DF, + 0x50B2, 0xB0C1, + 0x50BA, 0xD9D1, + 0x50BB, 0xC9B5, + 0x50CF, 0xCFF1, + 0x50D6, 0xD9D2, + 0x50DA, 0xC1C5, + 0x50E6, 0xD9D6, + 0x50E7, 0xC9AE, + 0x50EC, 0xD9D5, + 0x50ED, 0xD9D4, + 0x50EE, 0xD9D7, + 0x50F3, 0xCBDB, + 0x50F5, 0xBDA9, + 0x50FB, 0xC6A7, + 0x5106, 0xD9D3, + 0x5107, 0xD9D8, + 0x510B, 0xD9D9, + 0x5112, 0xC8E5, + 0x5121, 0xC0DC, + 0x513F, 0xB6F9, + 0x5140, 0xD8A3, + 0x5141, 0xD4CA, + 0x5143, 0xD4AA, + 0x5144, 0xD0D6, + 0x5145, 0xB3E4, + 0x5146, 0xD5D7, + 0x5148, 0xCFC8, + 0x5149, 0xB9E2, + 0x514B, 0xBFCB, + 0x514D, 0xC3E2, + 0x5151, 0xB6D2, + 0x5154, 0xCDC3, + 0x5155, 0xD9EE, + 0x5156, 0xD9F0, + 0x515A, 0xB5B3, + 0x515C, 0xB6B5, + 0x5162, 0xBEA4, + 0x5165, 0xC8EB, + 0x5168, 0xC8AB, + 0x516B, 0xB0CB, + 0x516C, 0xB9AB, + 0x516D, 0xC1F9, + 0x516E, 0xD9E2, + 0x5170, 0xC0BC, + 0x5171, 0xB9B2, + 0x5173, 0xB9D8, + 0x5174, 0xD0CB, + 0x5175, 0xB1F8, + 0x5176, 0xC6E4, + 0x5177, 0xBEDF, + 0x5178, 0xB5E4, + 0x5179, 0xD7C8, + 0x517B, 0xD1F8, + 0x517C, 0xBCE6, + 0x517D, 0xCADE, + 0x5180, 0xBCBD, + 0x5181, 0xD9E6, + 0x5182, 0xD8E7, + 0x5185, 0xC4DA, + 0x5188, 0xB8D4, + 0x5189, 0xC8BD, + 0x518C, 0xB2E1, + 0x518D, 0xD4D9, + 0x5192, 0xC3B0, + 0x5195, 0xC3E1, + 0x5196, 0xDAA2, + 0x5197, 0xC8DF, + 0x5199, 0xD0B4, + 0x519B, 0xBEFC, + 0x519C, 0xC5A9, + 0x51A0, 0xB9DA, + 0x51A2, 0xDAA3, + 0x51A4, 0xD4A9, + 0x51A5, 0xDAA4, + 0x51AB, 0xD9FB, + 0x51AC, 0xB6AC, + 0x51AF, 0xB7EB, + 0x51B0, 0xB1F9, + 0x51B1, 0xD9FC, + 0x51B2, 0xB3E5, + 0x51B3, 0xBEF6, + 0x51B5, 0xBFF6, + 0x51B6, 0xD2B1, + 0x51B7, 0xC0E4, + 0x51BB, 0xB6B3, + 0x51BC, 0xD9FE, + 0x51BD, 0xD9FD, + 0x51C0, 0xBEBB, + 0x51C4, 0xC6E0, + 0x51C6, 0xD7BC, + 0x51C7, 0xDAA1, + 0x51C9, 0xC1B9, + 0x51CB, 0xB5F2, + 0x51CC, 0xC1E8, + 0x51CF, 0xBCF5, + 0x51D1, 0xB4D5, + 0x51DB, 0xC1DD, + 0x51DD, 0xC4FD, + 0x51E0, 0xBCB8, + 0x51E1, 0xB7B2, + 0x51E4, 0xB7EF, + 0x51EB, 0xD9EC, + 0x51ED, 0xC6BE, + 0x51EF, 0xBFAD, + 0x51F0, 0xBBCB, + 0x51F3, 0xB5CA, + 0x51F5, 0xDBC9, + 0x51F6, 0xD0D7, + 0x51F8, 0xCDB9, + 0x51F9, 0xB0BC, + 0x51FA, 0xB3F6, + 0x51FB, 0xBBF7, + 0x51FC, 0xDBCA, + 0x51FD, 0xBAAF, + 0x51FF, 0xD4E4, + 0x5200, 0xB5B6, + 0x5201, 0xB5F3, + 0x5202, 0xD8D6, + 0x5203, 0xC8D0, + 0x5206, 0xB7D6, + 0x5207, 0xC7D0, + 0x5208, 0xD8D7, + 0x520A, 0xBFAF, + 0x520D, 0xDBBB, + 0x520E, 0xD8D8, + 0x5211, 0xD0CC, + 0x5212, 0xBBAE, + 0x5216, 0xEBBE, + 0x5217, 0xC1D0, + 0x5218, 0xC1F5, + 0x5219, 0xD4F2, + 0x521A, 0xB8D5, + 0x521B, 0xB4B4, + 0x521D, 0xB3F5, + 0x5220, 0xC9BE, + 0x5224, 0xC5D0, + 0x5228, 0xC5D9, + 0x5229, 0xC0FB, + 0x522B, 0xB1F0, + 0x522D, 0xD8D9, + 0x522E, 0xB9CE, + 0x5230, 0xB5BD, + 0x5233, 0xD8DA, + 0x5236, 0xD6C6, + 0x5237, 0xCBA2, + 0x5238, 0xC8AF, + 0x5239, 0xC9B2, + 0x523A, 0xB4CC, + 0x523B, 0xBFCC, + 0x523D, 0xB9F4, + 0x523F, 0xD8DB, + 0x5240, 0xD8DC, + 0x5241, 0xB6E7, + 0x5242, 0xBCC1, + 0x5243, 0xCCEA, + 0x524A, 0xCFF7, + 0x524C, 0xD8DD, + 0x524D, 0xC7B0, + 0x5250, 0xB9D0, + 0x5251, 0xBDA3, + 0x5254, 0xCCDE, + 0x5256, 0xC6CA, + 0x525C, 0xD8E0, + 0x525E, 0xD8DE, + 0x5261, 0xD8DF, + 0x5265, 0xB0FE, + 0x5267, 0xBEE7, + 0x5269, 0xCAA3, + 0x526A, 0xBCF4, + 0x526F, 0xB8B1, + 0x5272, 0xB8EE, + 0x527D, 0xD8E2, + 0x527F, 0xBDCB, + 0x5281, 0xD8E4, + 0x5282, 0xD8E3, + 0x5288, 0xC5FC, + 0x5290, 0xD8E5, + 0x5293, 0xD8E6, + 0x529B, 0xC1A6, + 0x529D, 0xC8B0, + 0x529E, 0xB0EC, + 0x529F, 0xB9A6, + 0x52A0, 0xBCD3, + 0x52A1, 0xCEF1, + 0x52A2, 0xDBBD, + 0x52A3, 0xC1D3, + 0x52A8, 0xB6AF, + 0x52A9, 0xD6FA, + 0x52AA, 0xC5AC, + 0x52AB, 0xBDD9, + 0x52AC, 0xDBBE, + 0x52AD, 0xDBBF, + 0x52B1, 0xC0F8, + 0x52B2, 0xBEA2, + 0x52B3, 0xC0CD, + 0x52BE, 0xDBC0, + 0x52BF, 0xCAC6, + 0x52C3, 0xB2AA, + 0x52C7, 0xD3C2, + 0x52C9, 0xC3E3, + 0x52CB, 0xD1AB, + 0x52D0, 0xDBC2, + 0x52D2, 0xC0D5, + 0x52D6, 0xDBC3, + 0x52D8, 0xBFB1, + 0x52DF, 0xC4BC, + 0x52E4, 0xC7DA, + 0x52F0, 0xDBC4, + 0x52F9, 0xD9E8, + 0x52FA, 0xC9D7, + 0x52FE, 0xB9B4, + 0x52FF, 0xCEF0, + 0x5300, 0xD4C8, + 0x5305, 0xB0FC, + 0x5306, 0xB4D2, + 0x5308, 0xD0D9, + 0x530D, 0xD9E9, + 0x530F, 0xDECB, + 0x5310, 0xD9EB, + 0x5315, 0xD8B0, + 0x5316, 0xBBAF, + 0x5317, 0xB1B1, + 0x5319, 0xB3D7, + 0x531A, 0xD8CE, + 0x531D, 0xD4D1, + 0x5320, 0xBDB3, + 0x5321, 0xBFEF, + 0x5323, 0xCFBB, + 0x5326, 0xD8D0, + 0x532A, 0xB7CB, + 0x532E, 0xD8D1, + 0x5339, 0xC6A5, + 0x533A, 0xC7F8, + 0x533B, 0xD2BD, + 0x533E, 0xD8D2, + 0x533F, 0xC4E4, + 0x5341, 0xCAAE, + 0x5343, 0xC7A7, + 0x5345, 0xD8A6, + 0x5347, 0xC9FD, + 0x5348, 0xCEE7, + 0x5349, 0xBBDC, + 0x534A, 0xB0EB, + 0x534E, 0xBBAA, + 0x534F, 0xD0AD, + 0x5351, 0xB1B0, + 0x5352, 0xD7E4, + 0x5353, 0xD7BF, + 0x5355, 0xB5A5, + 0x5356, 0xC2F4, + 0x5357, 0xC4CF, + 0x535A, 0xB2A9, + 0x535C, 0xB2B7, + 0x535E, 0xB1E5, + 0x535F, 0xDFB2, + 0x5360, 0xD5BC, + 0x5361, 0xBFA8, + 0x5362, 0xC2AC, + 0x5363, 0xD8D5, + 0x5364, 0xC2B1, + 0x5366, 0xD8D4, + 0x5367, 0xCED4, + 0x5369, 0xDAE0, + 0x536B, 0xCEC0, + 0x536E, 0xD8B4, + 0x536F, 0xC3AE, + 0x5370, 0xD3A1, + 0x5371, 0xCEA3, + 0x5373, 0xBCB4, + 0x5374, 0xC8B4, + 0x5375, 0xC2D1, + 0x5377, 0xBEED, + 0x5378, 0xD0B6, + 0x537A, 0xDAE1, + 0x537F, 0xC7E4, + 0x5382, 0xB3A7, + 0x5384, 0xB6F2, + 0x5385, 0xCCFC, + 0x5386, 0xC0FA, + 0x5389, 0xC0F7, + 0x538B, 0xD1B9, + 0x538C, 0xD1E1, + 0x538D, 0xD8C7, + 0x5395, 0xB2DE, + 0x5398, 0xC0E5, + 0x539A, 0xBAF1, + 0x539D, 0xD8C8, + 0x539F, 0xD4AD, + 0x53A2, 0xCFE1, + 0x53A3, 0xD8C9, + 0x53A5, 0xD8CA, + 0x53A6, 0xCFC3, + 0x53A8, 0xB3F8, + 0x53A9, 0xBEC7, + 0x53AE, 0xD8CB, + 0x53B6, 0xDBCC, + 0x53BB, 0xC8A5, + 0x53BF, 0xCFD8, + 0x53C1, 0xC8FE, + 0x53C2, 0xB2CE, + 0x53C8, 0xD3D6, + 0x53C9, 0xB2E6, + 0x53CA, 0xBCB0, + 0x53CB, 0xD3D1, + 0x53CC, 0xCBAB, + 0x53CD, 0xB7B4, + 0x53D1, 0xB7A2, + 0x53D4, 0xCAE5, + 0x53D6, 0xC8A1, + 0x53D7, 0xCADC, + 0x53D8, 0xB1E4, + 0x53D9, 0xD0F0, + 0x53DB, 0xC5D1, + 0x53DF, 0xDBC5, + 0x53E0, 0xB5FE, + 0x53E3, 0xBFDA, + 0x53E4, 0xB9C5, + 0x53E5, 0xBEE4, + 0x53E6, 0xC1ED, + 0x53E8, 0xDFB6, + 0x53E9, 0xDFB5, + 0x53EA, 0xD6BB, + 0x53EB, 0xBDD0, + 0x53EC, 0xD5D9, + 0x53ED, 0xB0C8, + 0x53EE, 0xB6A3, + 0x53EF, 0xBFC9, + 0x53F0, 0xCCA8, + 0x53F1, 0xDFB3, + 0x53F2, 0xCAB7, + 0x53F3, 0xD3D2, + 0x53F5, 0xD8CF, + 0x53F6, 0xD2B6, + 0x53F7, 0xBAC5, + 0x53F8, 0xCBBE, + 0x53F9, 0xCCBE, + 0x53FB, 0xDFB7, + 0x53FC, 0xB5F0, + 0x53FD, 0xDFB4, + 0x5401, 0xD3F5, + 0x5403, 0xB3D4, + 0x5404, 0xB8F7, + 0x5406, 0xDFBA, + 0x5408, 0xBACF, + 0x5409, 0xBCAA, + 0x540A, 0xB5F5, + 0x540C, 0xCDAC, + 0x540D, 0xC3FB, + 0x540E, 0xBAF3, + 0x540F, 0xC0F4, + 0x5410, 0xCDC2, + 0x5411, 0xCFF2, + 0x5412, 0xDFB8, + 0x5413, 0xCFC5, + 0x5415, 0xC2C0, + 0x5416, 0xDFB9, + 0x5417, 0xC2F0, + 0x541B, 0xBEFD, + 0x541D, 0xC1DF, + 0x541E, 0xCDCC, + 0x541F, 0xD2F7, + 0x5420, 0xB7CD, + 0x5421, 0xDFC1, + 0x5423, 0xDFC4, + 0x5426, 0xB7F1, + 0x5427, 0xB0C9, + 0x5428, 0xB6D6, + 0x5429, 0xB7D4, + 0x542B, 0xBAAC, + 0x542C, 0xCCFD, + 0x542D, 0xBFD4, + 0x542E, 0xCBB1, + 0x542F, 0xC6F4, + 0x5431, 0xD6A8, + 0x5432, 0xDFC5, + 0x5434, 0xCEE2, + 0x5435, 0xB3B3, + 0x5438, 0xCEFC, + 0x5439, 0xB4B5, + 0x543B, 0xCEC7, + 0x543C, 0xBAF0, + 0x543E, 0xCEE1, + 0x5440, 0xD1BD, + 0x5443, 0xDFC0, + 0x5446, 0xB4F4, + 0x5448, 0xB3CA, + 0x544A, 0xB8E6, + 0x544B, 0xDFBB, + 0x5450, 0xC4C5, + 0x5452, 0xDFBC, + 0x5453, 0xDFBD, + 0x5454, 0xDFBE, + 0x5455, 0xC5BB, + 0x5456, 0xDFBF, + 0x5457, 0xDFC2, + 0x5458, 0xD4B1, + 0x5459, 0xDFC3, + 0x545B, 0xC7BA, + 0x545C, 0xCED8, + 0x5462, 0xC4D8, + 0x5464, 0xDFCA, + 0x5466, 0xDFCF, + 0x5468, 0xD6DC, + 0x5471, 0xDFC9, + 0x5472, 0xDFDA, + 0x5473, 0xCEB6, + 0x5475, 0xBAC7, + 0x5476, 0xDFCE, + 0x5477, 0xDFC8, + 0x5478, 0xC5DE, + 0x547B, 0xC9EB, + 0x547C, 0xBAF4, + 0x547D, 0xC3FC, + 0x5480, 0xBED7, + 0x5482, 0xDFC6, + 0x5484, 0xDFCD, + 0x5486, 0xC5D8, + 0x548B, 0xD5A6, + 0x548C, 0xBACD, + 0x548E, 0xBECC, + 0x548F, 0xD3BD, + 0x5490, 0xB8C0, + 0x5492, 0xD6E4, + 0x5494, 0xDFC7, + 0x5495, 0xB9BE, + 0x5496, 0xBFA7, + 0x5499, 0xC1FC, + 0x549A, 0xDFCB, + 0x549B, 0xDFCC, + 0x549D, 0xDFD0, + 0x54A3, 0xDFDB, + 0x54A4, 0xDFE5, + 0x54A6, 0xDFD7, + 0x54A7, 0xDFD6, + 0x54A8, 0xD7C9, + 0x54A9, 0xDFE3, + 0x54AA, 0xDFE4, + 0x54AB, 0xE5EB, + 0x54AC, 0xD2A7, + 0x54AD, 0xDFD2, + 0x54AF, 0xBFA9, + 0x54B1, 0xD4DB, + 0x54B3, 0xBFC8, + 0x54B4, 0xDFD4, + 0x54B8, 0xCFCC, + 0x54BB, 0xDFDD, + 0x54BD, 0xD1CA, + 0x54BF, 0xDFDE, + 0x54C0, 0xB0A7, + 0x54C1, 0xC6B7, + 0x54C2, 0xDFD3, + 0x54C4, 0xBAE5, + 0x54C6, 0xB6DF, + 0x54C7, 0xCDDB, + 0x54C8, 0xB9FE, + 0x54C9, 0xD4D5, + 0x54CC, 0xDFDF, + 0x54CD, 0xCFEC, + 0x54CE, 0xB0A5, + 0x54CF, 0xDFE7, + 0x54D0, 0xDFD1, + 0x54D1, 0xD1C6, + 0x54D2, 0xDFD5, + 0x54D3, 0xDFD8, + 0x54D4, 0xDFD9, + 0x54D5, 0xDFDC, + 0x54D7, 0xBBA9, + 0x54D9, 0xDFE0, + 0x54DA, 0xDFE1, + 0x54DC, 0xDFE2, + 0x54DD, 0xDFE6, + 0x54DE, 0xDFE8, + 0x54DF, 0xD3B4, + 0x54E5, 0xB8E7, + 0x54E6, 0xC5B6, + 0x54E7, 0xDFEA, + 0x54E8, 0xC9DA, + 0x54E9, 0xC1A8, + 0x54EA, 0xC4C4, + 0x54ED, 0xBFDE, + 0x54EE, 0xCFF8, + 0x54F2, 0xD5DC, + 0x54F3, 0xDFEE, + 0x54FA, 0xB2B8, + 0x54FC, 0xBADF, + 0x54FD, 0xDFEC, + 0x54FF, 0xDBC1, + 0x5501, 0xD1E4, + 0x5506, 0xCBF4, + 0x5507, 0xB4BD, + 0x5509, 0xB0A6, + 0x550F, 0xDFF1, + 0x5510, 0xCCC6, + 0x5511, 0xDFF2, + 0x5514, 0xDFED, + 0x551B, 0xDFE9, + 0x5520, 0xDFEB, + 0x5522, 0xDFEF, + 0x5523, 0xDFF0, + 0x5524, 0xBBBD, + 0x5527, 0xDFF3, + 0x552A, 0xDFF4, + 0x552C, 0xBBA3, + 0x552E, 0xCADB, + 0x552F, 0xCEA8, + 0x5530, 0xE0A7, + 0x5531, 0xB3AA, + 0x5533, 0xE0A6, + 0x5537, 0xE0A1, + 0x553C, 0xDFFE, + 0x553E, 0xCDD9, + 0x553F, 0xDFFC, + 0x5541, 0xDFFA, + 0x5543, 0xBFD0, + 0x5544, 0xD7C4, + 0x5546, 0xC9CC, + 0x5549, 0xDFF8, + 0x554A, 0xB0A1, + 0x5550, 0xDFFD, + 0x5555, 0xDFFB, + 0x5556, 0xE0A2, + 0x555C, 0xE0A8, + 0x5561, 0xB7C8, + 0x5564, 0xC6A1, + 0x5565, 0xC9B6, + 0x5566, 0xC0B2, + 0x5567, 0xDFF5, + 0x556A, 0xC5BE, + 0x556C, 0xD8C4, + 0x556D, 0xDFF9, + 0x556E, 0xC4F6, + 0x5575, 0xE0A3, + 0x5576, 0xE0A4, + 0x5577, 0xE0A5, + 0x5578, 0xD0A5, + 0x557B, 0xE0B4, + 0x557C, 0xCCE4, + 0x557E, 0xE0B1, + 0x5580, 0xBFA6, + 0x5581, 0xE0AF, + 0x5582, 0xCEB9, + 0x5583, 0xE0AB, + 0x5584, 0xC9C6, + 0x5587, 0xC0AE, + 0x5588, 0xE0AE, + 0x5589, 0xBAED, + 0x558A, 0xBAB0, + 0x558B, 0xE0A9, + 0x558F, 0xDFF6, + 0x5591, 0xE0B3, + 0x5594, 0xE0B8, + 0x5598, 0xB4AD, + 0x5599, 0xE0B9, + 0x559C, 0xCFB2, + 0x559D, 0xBAC8, + 0x559F, 0xE0B0, + 0x55A7, 0xD0FA, + 0x55B1, 0xE0AC, + 0x55B3, 0xD4FB, + 0x55B5, 0xDFF7, + 0x55B7, 0xC5E7, + 0x55B9, 0xE0AD, + 0x55BB, 0xD3F7, + 0x55BD, 0xE0B6, + 0x55BE, 0xE0B7, + 0x55C4, 0xE0C4, + 0x55C5, 0xD0E1, + 0x55C9, 0xE0BC, + 0x55CC, 0xE0C9, + 0x55CD, 0xE0CA, + 0x55D1, 0xE0BE, + 0x55D2, 0xE0AA, + 0x55D3, 0xC9A4, + 0x55D4, 0xE0C1, + 0x55D6, 0xE0B2, + 0x55DC, 0xCAC8, + 0x55DD, 0xE0C3, + 0x55DF, 0xE0B5, + 0x55E1, 0xCECB, + 0x55E3, 0xCBC3, + 0x55E4, 0xE0CD, + 0x55E5, 0xE0C6, + 0x55E6, 0xE0C2, + 0x55E8, 0xE0CB, + 0x55EA, 0xE0BA, + 0x55EB, 0xE0BF, + 0x55EC, 0xE0C0, + 0x55EF, 0xE0C5, + 0x55F2, 0xE0C7, + 0x55F3, 0xE0C8, + 0x55F5, 0xE0CC, + 0x55F7, 0xE0BB, + 0x55FD, 0xCBD4, + 0x55FE, 0xE0D5, + 0x5600, 0xE0D6, + 0x5601, 0xE0D2, + 0x5608, 0xE0D0, + 0x5609, 0xBCCE, + 0x560C, 0xE0D1, + 0x560E, 0xB8C2, + 0x560F, 0xD8C5, + 0x5618, 0xD0EA, + 0x561B, 0xC2EF, + 0x561E, 0xE0CF, + 0x561F, 0xE0BD, + 0x5623, 0xE0D4, + 0x5624, 0xE0D3, + 0x5627, 0xE0D7, + 0x562C, 0xE0DC, + 0x562D, 0xE0D8, + 0x5631, 0xD6F6, + 0x5632, 0xB3B0, + 0x5634, 0xD7EC, + 0x5636, 0xCBBB, + 0x5639, 0xE0DA, + 0x563B, 0xCEFB, + 0x563F, 0xBAD9, + 0x564C, 0xE0E1, + 0x564D, 0xE0DD, + 0x564E, 0xD2AD, + 0x5654, 0xE0E2, + 0x5657, 0xE0DB, + 0x5658, 0xE0D9, + 0x5659, 0xE0DF, + 0x565C, 0xE0E0, + 0x5662, 0xE0DE, + 0x5664, 0xE0E4, + 0x5668, 0xC6F7, + 0x5669, 0xD8AC, + 0x566A, 0xD4EB, + 0x566B, 0xE0E6, + 0x566C, 0xCAC9, + 0x5671, 0xE0E5, + 0x5676, 0xB8C1, + 0x567B, 0xE0E7, + 0x567C, 0xE0E8, + 0x5685, 0xE0E9, + 0x5686, 0xE0E3, + 0x568E, 0xBABF, + 0x568F, 0xCCE7, + 0x5693, 0xE0EA, + 0x56A3, 0xCFF9, + 0x56AF, 0xE0EB, + 0x56B7, 0xC8C2, + 0x56BC, 0xBDC0, + 0x56CA, 0xC4D2, + 0x56D4, 0xE0EC, + 0x56D7, 0xE0ED, + 0x56DA, 0xC7F4, + 0x56DB, 0xCBC4, + 0x56DD, 0xE0EE, + 0x56DE, 0xBBD8, + 0x56DF, 0xD8B6, + 0x56E0, 0xD2F2, + 0x56E1, 0xE0EF, + 0x56E2, 0xCDC5, + 0x56E4, 0xB6DA, + 0x56EB, 0xE0F1, + 0x56ED, 0xD4B0, + 0x56F0, 0xC0A7, + 0x56F1, 0xB4D1, + 0x56F4, 0xCEA7, + 0x56F5, 0xE0F0, + 0x56F9, 0xE0F2, + 0x56FA, 0xB9CC, + 0x56FD, 0xB9FA, + 0x56FE, 0xCDBC, + 0x56FF, 0xE0F3, + 0x5703, 0xC6D4, + 0x5704, 0xE0F4, + 0x5706, 0xD4B2, + 0x5708, 0xC8A6, + 0x5709, 0xE0F6, + 0x570A, 0xE0F5, + 0x571C, 0xE0F7, + 0x571F, 0xCDC1, + 0x5723, 0xCAA5, + 0x5728, 0xD4DA, + 0x5729, 0xDBD7, + 0x572A, 0xDBD9, + 0x572C, 0xDBD8, + 0x572D, 0xB9E7, + 0x572E, 0xDBDC, + 0x572F, 0xDBDD, + 0x5730, 0xB5D8, + 0x5733, 0xDBDA, + 0x5739, 0xDBDB, + 0x573A, 0xB3A1, + 0x573B, 0xDBDF, + 0x573E, 0xBBF8, + 0x5740, 0xD6B7, + 0x5742, 0xDBE0, + 0x5747, 0xBEF9, + 0x574A, 0xB7BB, + 0x574C, 0xDBD0, + 0x574D, 0xCCAE, + 0x574E, 0xBFB2, + 0x574F, 0xBBB5, + 0x5750, 0xD7F8, + 0x5751, 0xBFD3, + 0x5757, 0xBFE9, + 0x575A, 0xBCE1, + 0x575B, 0xCCB3, + 0x575C, 0xDBDE, + 0x575D, 0xB0D3, + 0x575E, 0xCEEB, + 0x575F, 0xB7D8, + 0x5760, 0xD7B9, + 0x5761, 0xC6C2, + 0x5764, 0xC0A4, + 0x5766, 0xCCB9, + 0x5768, 0xDBE7, + 0x5769, 0xDBE1, + 0x576A, 0xC6BA, + 0x576B, 0xDBE3, + 0x576D, 0xDBE8, + 0x576F, 0xC5F7, + 0x5773, 0xDBEA, + 0x5776, 0xDBE9, + 0x5777, 0xBFC0, + 0x577B, 0xDBE6, + 0x577C, 0xDBE5, + 0x5782, 0xB4B9, + 0x5783, 0xC0AC, + 0x5784, 0xC2A2, + 0x5785, 0xDBE2, + 0x5786, 0xDBE4, + 0x578B, 0xD0CD, + 0x578C, 0xDBED, + 0x5792, 0xC0DD, + 0x5793, 0xDBF2, + 0x579B, 0xB6E2, + 0x57A0, 0xDBF3, + 0x57A1, 0xDBD2, + 0x57A2, 0xB9B8, + 0x57A3, 0xD4AB, + 0x57A4, 0xDBEC, + 0x57A6, 0xBFD1, + 0x57A7, 0xDBF0, + 0x57A9, 0xDBD1, + 0x57AB, 0xB5E6, + 0x57AD, 0xDBEB, + 0x57AE, 0xBFE5, + 0x57B2, 0xDBEE, + 0x57B4, 0xDBF1, + 0x57B8, 0xDBF9, + 0x57C2, 0xB9A1, + 0x57C3, 0xB0A3, + 0x57CB, 0xC2F1, + 0x57CE, 0xB3C7, + 0x57CF, 0xDBEF, + 0x57D2, 0xDBF8, + 0x57D4, 0xC6D2, + 0x57D5, 0xDBF4, + 0x57D8, 0xDBF5, + 0x57D9, 0xDBF7, + 0x57DA, 0xDBF6, + 0x57DD, 0xDBFE, + 0x57DF, 0xD3F2, + 0x57E0, 0xB2BA, + 0x57E4, 0xDBFD, + 0x57ED, 0xDCA4, + 0x57EF, 0xDBFB, + 0x57F4, 0xDBFA, + 0x57F8, 0xDBFC, + 0x57F9, 0xC5E0, + 0x57FA, 0xBBF9, + 0x57FD, 0xDCA3, + 0x5800, 0xDCA5, + 0x5802, 0xCCC3, + 0x5806, 0xB6D1, + 0x5807, 0xDDC0, + 0x580B, 0xDCA1, + 0x580D, 0xDCA2, + 0x5811, 0xC7B5, + 0x5815, 0xB6E9, + 0x5819, 0xDCA7, + 0x581E, 0xDCA6, + 0x5820, 0xDCA9, + 0x5821, 0xB1A4, + 0x5824, 0xB5CC, + 0x582A, 0xBFB0, + 0x5830, 0xD1DF, + 0x5835, 0xB6C2, + 0x5844, 0xDCA8, + 0x584C, 0xCBFA, + 0x584D, 0xEBF3, + 0x5851, 0xCBDC, + 0x5854, 0xCBFE, + 0x5858, 0xCCC1, + 0x585E, 0xC8FB, + 0x5865, 0xDCAA, + 0x586B, 0xCCEE, + 0x586C, 0xDCAB, + 0x587E, 0xDBD3, + 0x5880, 0xDCAF, + 0x5881, 0xDCAC, + 0x5883, 0xBEB3, + 0x5885, 0xCAFB, + 0x5889, 0xDCAD, + 0x5892, 0xC9CA, + 0x5893, 0xC4B9, + 0x5899, 0xC7BD, + 0x589A, 0xDCAE, + 0x589E, 0xD4F6, + 0x589F, 0xD0E6, + 0x58A8, 0xC4AB, + 0x58A9, 0xB6D5, + 0x58BC, 0xDBD4, + 0x58C1, 0xB1DA, + 0x58C5, 0xDBD5, + 0x58D1, 0xDBD6, + 0x58D5, 0xBABE, + 0x58E4, 0xC8C0, + 0x58EB, 0xCABF, + 0x58EC, 0xC8C9, + 0x58EE, 0xD7B3, + 0x58F0, 0xC9F9, + 0x58F3, 0xBFC7, + 0x58F6, 0xBAF8, + 0x58F9, 0xD2BC, + 0x5902, 0xE2BA, + 0x5904, 0xB4A6, + 0x5907, 0xB1B8, + 0x590D, 0xB8B4, + 0x590F, 0xCFC4, + 0x5914, 0xD9E7, + 0x5915, 0xCFA6, + 0x5916, 0xCDE2, + 0x5919, 0xD9ED, + 0x591A, 0xB6E0, + 0x591C, 0xD2B9, + 0x591F, 0xB9BB, + 0x5924, 0xE2B9, + 0x5925, 0xE2B7, + 0x5927, 0xB4F3, + 0x5929, 0xCCEC, + 0x592A, 0xCCAB, + 0x592B, 0xB7F2, + 0x592D, 0xD8B2, + 0x592E, 0xD1EB, + 0x592F, 0xBABB, + 0x5931, 0xCAA7, + 0x5934, 0xCDB7, + 0x5937, 0xD2C4, + 0x5938, 0xBFE4, + 0x5939, 0xBCD0, + 0x593A, 0xB6E1, + 0x593C, 0xDEC5, + 0x5941, 0xDEC6, + 0x5942, 0xDBBC, + 0x5944, 0xD1D9, + 0x5947, 0xC6E6, + 0x5948, 0xC4CE, + 0x5949, 0xB7EE, + 0x594B, 0xB7DC, + 0x594E, 0xBFFC, + 0x594F, 0xD7E0, + 0x5951, 0xC6F5, + 0x5954, 0xB1BC, + 0x5955, 0xDEC8, + 0x5956, 0xBDB1, + 0x5957, 0xCCD7, + 0x5958, 0xDECA, + 0x595A, 0xDEC9, + 0x5960, 0xB5EC, + 0x5962, 0xC9DD, + 0x5965, 0xB0C2, + 0x5973, 0xC5AE, + 0x5974, 0xC5AB, + 0x5976, 0xC4CC, + 0x5978, 0xBCE9, + 0x5979, 0xCBFD, + 0x597D, 0xBAC3, + 0x5981, 0xE5F9, + 0x5982, 0xC8E7, + 0x5983, 0xE5FA, + 0x5984, 0xCDFD, + 0x5986, 0xD7B1, + 0x5987, 0xB8BE, + 0x5988, 0xC2E8, + 0x598A, 0xC8D1, + 0x598D, 0xE5FB, + 0x5992, 0xB6CA, + 0x5993, 0xBCCB, + 0x5996, 0xD1FD, + 0x5997, 0xE6A1, + 0x5999, 0xC3EE, + 0x599E, 0xE6A4, + 0x59A3, 0xE5FE, + 0x59A4, 0xE6A5, + 0x59A5, 0xCDD7, + 0x59A8, 0xB7C1, + 0x59A9, 0xE5FC, + 0x59AA, 0xE5FD, + 0x59AB, 0xE6A3, + 0x59AE, 0xC4DD, + 0x59AF, 0xE6A8, + 0x59B2, 0xE6A7, + 0x59B9, 0xC3C3, + 0x59BB, 0xC6DE, + 0x59BE, 0xE6AA, + 0x59C6, 0xC4B7, + 0x59CA, 0xE6A2, + 0x59CB, 0xCABC, + 0x59D0, 0xBDE3, + 0x59D1, 0xB9C3, + 0x59D2, 0xE6A6, + 0x59D3, 0xD0D5, + 0x59D4, 0xCEAF, + 0x59D7, 0xE6A9, + 0x59D8, 0xE6B0, + 0x59DA, 0xD2A6, + 0x59DC, 0xBDAA, + 0x59DD, 0xE6AD, + 0x59E3, 0xE6AF, + 0x59E5, 0xC0D1, + 0x59E8, 0xD2CC, + 0x59EC, 0xBCA7, + 0x59F9, 0xE6B1, + 0x59FB, 0xD2F6, + 0x59FF, 0xD7CB, + 0x5A01, 0xCDFE, + 0x5A03, 0xCDDE, + 0x5A04, 0xC2A6, + 0x5A05, 0xE6AB, + 0x5A06, 0xE6AC, + 0x5A07, 0xBDBF, + 0x5A08, 0xE6AE, + 0x5A09, 0xE6B3, + 0x5A0C, 0xE6B2, + 0x5A11, 0xE6B6, + 0x5A13, 0xE6B8, + 0x5A18, 0xC4EF, + 0x5A1C, 0xC4C8, + 0x5A1F, 0xBEEA, + 0x5A20, 0xC9EF, + 0x5A23, 0xE6B7, + 0x5A25, 0xB6F0, + 0x5A29, 0xC3E4, + 0x5A31, 0xD3E9, + 0x5A32, 0xE6B4, + 0x5A34, 0xE6B5, + 0x5A36, 0xC8A2, + 0x5A3C, 0xE6BD, + 0x5A40, 0xE6B9, + 0x5A46, 0xC6C5, + 0x5A49, 0xCDF1, + 0x5A4A, 0xE6BB, + 0x5A55, 0xE6BC, + 0x5A5A, 0x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8, + 0x5BE8, 0xD5AF, + 0x5BEE, 0xE5BC, + 0x5BF0, 0xE5BE, + 0x5BF8, 0xB4E7, + 0x5BF9, 0xB6D4, + 0x5BFA, 0xCBC2, + 0x5BFB, 0xD1B0, + 0x5BFC, 0xB5BC, + 0x5BFF, 0xCAD9, + 0x5C01, 0xB7E2, + 0x5C04, 0xC9E4, + 0x5C06, 0xBDAB, + 0x5C09, 0xCEBE, + 0x5C0A, 0xD7F0, + 0x5C0F, 0xD0A1, + 0x5C11, 0xC9D9, + 0x5C14, 0xB6FB, + 0x5C15, 0xE6D8, + 0x5C16, 0xBCE2, + 0x5C18, 0xB3BE, + 0x5C1A, 0xC9D0, + 0x5C1C, 0xE6D9, + 0x5C1D, 0xB3A2, + 0x5C22, 0xDECC, + 0x5C24, 0xD3C8, + 0x5C25, 0xDECD, + 0x5C27, 0xD2A2, + 0x5C2C, 0xDECE, + 0x5C31, 0xBECD, + 0x5C34, 0xDECF, + 0x5C38, 0xCAAC, + 0x5C39, 0xD2FC, + 0x5C3A, 0xB3DF, + 0x5C3B, 0xE5EA, + 0x5C3C, 0xC4E1, + 0x5C3D, 0xBEA1, + 0x5C3E, 0xCEB2, + 0x5C3F, 0xC4F2, + 0x5C40, 0xBED6, + 0x5C41, 0xC6A8, + 0x5C42, 0xB2E3, + 0x5C45, 0xBED3, + 0x5C48, 0xC7FC, + 0x5C49, 0xCCEB, + 0x5C4A, 0xBDEC, + 0x5C4B, 0xCEDD, + 0x5C4E, 0xCABA, + 0x5C4F, 0xC6C1, + 0x5C50, 0xE5EC, + 0x5C51, 0xD0BC, + 0x5C55, 0xD5B9, + 0x5C59, 0xE5ED, + 0x5C5E, 0xCAF4, + 0x5C60, 0xCDC0, + 0x5C61, 0xC2C5, + 0x5C63, 0xE5EF, + 0x5C65, 0xC2C4, + 0x5C66, 0xE5F0, + 0x5C6E, 0xE5F8, + 0x5C6F, 0xCDCD, + 0x5C71, 0xC9BD, + 0x5C79, 0xD2D9, + 0x5C7A, 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6, + 0x6005, 0xE2EA, + 0x6006, 0xE2EB, + 0x600A, 0xE2F7, + 0x600D, 0xE2F4, + 0x600E, 0xD4F5, + 0x600F, 0xE2F3, + 0x6012, 0xC5AD, + 0x6014, 0xD5FA, + 0x6015, 0xC5C2, + 0x6016, 0xB2C0, + 0x6019, 0xE2EF, + 0x601B, 0xE2F2, + 0x601C, 0xC1AF, + 0x601D, 0xCBBC, + 0x6020, 0xB5A1, + 0x6021, 0xE2F9, + 0x6025, 0xBCB1, + 0x6026, 0xE2F1, + 0x6027, 0xD0D4, + 0x6028, 0xD4B9, + 0x6029, 0xE2F5, + 0x602A, 0xB9D6, + 0x602B, 0xE2F6, + 0x602F, 0xC7D3, + 0x6035, 0xE2F0, + 0x603B, 0xD7DC, + 0x603C, 0xEDA1, + 0x603F, 0xE2F8, + 0x6041, 0xEDA5, + 0x6042, 0xE2FE, + 0x6043, 0xCAD1, + 0x604B, 0xC1B5, + 0x604D, 0xBBD0, + 0x6050, 0xBFD6, + 0x6052, 0xBAE3, + 0x6055, 0xCBA1, + 0x6059, 0xEDA6, + 0x605A, 0xEDA3, + 0x605D, 0xEDA2, + 0x6062, 0xBBD6, + 0x6063, 0xEDA7, + 0x6064, 0xD0F4, + 0x6067, 0xEDA4, + 0x6068, 0xBADE, + 0x6069, 0xB6F7, + 0x606A, 0xE3A1, + 0x606B, 0xB6B2, + 0x606C, 0xCCF1, + 0x606D, 0xB9A7, + 0x606F, 0xCFA2, + 0x6070, 0xC7A1, + 0x6073, 0xBFD2, + 0x6076, 0xB6F1, + 0x6078, 0xE2FA, + 0x6079, 0xE2FB, + 0x607A, 0xE2FD, + 0x607B, 0xE2FC, + 0x607C, 0xC4D5, + 0x607D, 0xE3A2, + 0x607F, 0xD3C1, + 0x6083, 0xE3A7, + 0x6084, 0xC7C4, + 0x6089, 0xCFA4, + 0x608C, 0xE3A9, + 0x608D, 0xBAB7, + 0x6092, 0xE3A8, + 0x6094, 0xBBDA, + 0x6096, 0xE3A3, + 0x609A, 0xE3A4, + 0x609B, 0xE3AA, + 0x609D, 0xE3A6, + 0x609F, 0xCEF2, + 0x60A0, 0xD3C6, + 0x60A3, 0xBBBC, + 0x60A6, 0xD4C3, + 0x60A8, 0xC4FA, + 0x60AB, 0xEDA8, + 0x60AC, 0xD0FC, + 0x60AD, 0xE3A5, + 0x60AF, 0xC3F5, + 0x60B1, 0xE3AD, + 0x60B2, 0xB1AF, + 0x60B4, 0xE3B2, + 0x60B8, 0xBCC2, + 0x60BB, 0xE3AC, + 0x60BC, 0xB5BF, + 0x60C5, 0xC7E9, + 0x60C6, 0xE3B0, + 0x60CA, 0xBEAA, + 0x60CB, 0xCDEF, + 0x60D1, 0xBBF3, + 0x60D5, 0xCCE8, + 0x60D8, 0xE3AF, + 0x60DA, 0xE3B1, + 0x60DC, 0xCFA7, + 0x60DD, 0xE3AE, + 0x60DF, 0xCEA9, + 0x60E0, 0xBBDD, + 0x60E6, 0xB5EB, + 0x60E7, 0xBEE5, + 0x60E8, 0xB2D2, + 0x60E9, 0xB3CD, + 0x60EB, 0xB1B9, + 0x60EC, 0xE3AB, + 0x60ED, 0xB2D1, + 0x60EE, 0xB5AC, + 0x60EF, 0xB9DF, + 0x60F0, 0xB6E8, + 0x60F3, 0xCFEB, + 0x60F4, 0xE3B7, + 0x60F6, 0xBBCC, + 0x60F9, 0xC8C7, + 0x60FA, 0xD0CA, + 0x6100, 0xE3B8, + 0x6101, 0xB3EE, + 0x6106, 0xEDA9, + 0x6108, 0xD3FA, + 0x6109, 0xD3E4, + 0x610D, 0xEDAA, + 0x610E, 0xE3B9, + 0x610F, 0xD2E2, + 0x6115, 0xE3B5, + 0x611A, 0xD3DE, + 0x611F, 0xB8D0, + 0x6120, 0xE3B3, + 0x6123, 0xE3B6, + 0x6124, 0xB7DF, + 0x6126, 0xE3B4, + 0x6127, 0xC0A2, + 0x612B, 0xE3BA, + 0x613F, 0xD4B8, + 0x6148, 0xB4C8, + 0x614A, 0xE3BB, + 0x614C, 0xBBC5, + 0x614E, 0xC9F7, + 0x6151, 0xC9E5, + 0x6155, 0xC4BD, + 0x615D, 0xEDAB, + 0x6162, 0xC2FD, + 0x6167, 0xBBDB, + 0x6168, 0xBFAE, + 0x6170, 0xCEBF, + 0x6175, 0xE3BC, + 0x6177, 0xBFB6, + 0x618B, 0xB1EF, + 0x618E, 0xD4F7, + 0x6194, 0xE3BE, + 0x619D, 0xEDAD, + 0x61A7, 0xE3BF, + 0x61A8, 0xBAA9, + 0x61A9, 0xEDAC, + 0x61AC, 0xE3BD, + 0x61B7, 0xE3C0, + 0x61BE, 0xBAB6, + 0x61C2, 0xB6AE, + 0x61C8, 0xD0B8, + 0x61CA, 0xB0C3, + 0x61CB, 0xEDAE, + 0x61D1, 0xEDAF, + 0x61D2, 0xC0C1, + 0x61D4, 0xE3C1, + 0x61E6, 0xC5B3, + 0x61F5, 0xE3C2, + 0x61FF, 0xDCB2, + 0x6206, 0xEDB0, + 0x6208, 0xB8EA, + 0x620A, 0xCEEC, + 0x620B, 0xEAA7, + 0x620C, 0xD0E7, + 0x620D, 0xCAF9, + 0x620E, 0xC8D6, + 0x620F, 0xCFB7, + 0x6210, 0xB3C9, + 0x6211, 0xCED2, + 0x6212, 0xBDE4, + 0x6215, 0xE3DE, + 0x6216, 0xBBF2, + 0x6217, 0xEAA8, + 0x6218, 0xD5BD, + 0x621A, 0xC6DD, + 0x621B, 0xEAA9, + 0x621F, 0xEAAA, + 0x6221, 0xEAAC, + 0x6222, 0xEAAB, + 0x6224, 0xEAAE, + 0x6225, 0xEAAD, + 0x622A, 0xBDD8, + 0x622C, 0xEAAF, + 0x622E, 0xC2BE, + 0x6233, 0xB4C1, + 0x6234, 0xB4F7, + 0x6237, 0xBBA7, + 0x623D, 0xECE6, + 0x623E, 0xECE5, + 0x623F, 0xB7BF, + 0x6240, 0xCBF9, + 0x6241, 0xB1E2, + 0x6243, 0xECE7, + 0x6247, 0xC9C8, + 0x6248, 0xECE8, + 0x6249, 0xECE9, + 0x624B, 0xCAD6, + 0x624C, 0xDED0, + 0x624D, 0xB2C5, + 0x624E, 0xD4FA, + 0x6251, 0xC6CB, + 0x6252, 0xB0C7, + 0x6253, 0xB4F2, + 0x6254, 0xC8D3, + 0x6258, 0xCDD0, + 0x625B, 0xBFB8, + 0x6263, 0xBFDB, + 0x6266, 0xC7A4, + 0x6267, 0xD6B4, + 0x6269, 0xC0A9, + 0x626A, 0xDED1, + 0x626B, 0xC9A8, + 0x626C, 0xD1EF, + 0x626D, 0xC5A4, + 0x626E, 0xB0E7, + 0x626F, 0xB3B6, + 0x6270, 0xC8C5, + 0x6273, 0xB0E2, + 0x6276, 0xB7F6, + 0x6279, 0xC5FA, + 0x627C, 0xB6F3, + 0x627E, 0xD5D2, + 0x627F, 0xB3D0, + 0x6280, 0xBCBC, + 0x6284, 0xB3AD, + 0x6289, 0xBEF1, + 0x628A, 0xB0D1, + 0x6291, 0xD2D6, + 0x6292, 0xCAE3, + 0x6293, 0xD7A5, + 0x6295, 0xCDB6, + 0x6296, 0xB6B6, + 0x6297, 0xBFB9, + 0x6298, 0xD5DB, + 0x629A, 0xB8A7, + 0x629B, 0xC5D7, + 0x629F, 0xDED2, + 0x62A0, 0xBFD9, + 0x62A1, 0xC2D5, + 0x62A2, 0xC7C0, + 0x62A4, 0xBBA4, + 0x62A5, 0xB1A8, + 0x62A8, 0xC5EA, + 0x62AB, 0xC5FB, + 0x62AC, 0xCCA7, + 0x62B1, 0xB1A7, + 0x62B5, 0xB5D6, + 0x62B9, 0xC4A8, + 0x62BB, 0xDED3, + 0x62BC, 0xD1BA, + 0x62BD, 0xB3E9, + 0x62BF, 0xC3F2, + 0x62C2, 0xB7F7, + 0x62C4, 0xD6F4, + 0x62C5, 0xB5A3, + 0x62C6, 0xB2F0, + 0x62C7, 0xC4B4, + 0x62C8, 0xC4E9, + 0x62C9, 0xC0AD, + 0x62CA, 0xDED4, + 0x62CC, 0xB0E8, + 0x62CD, 0xC5C4, + 0x62CE, 0xC1E0, + 0x62D0, 0xB9D5, + 0x62D2, 0xBEDC, + 0x62D3, 0xCDD8, + 0x62D4, 0xB0CE, + 0x62D6, 0xCDCF, + 0x62D7, 0xDED6, + 0x62D8, 0xBED0, + 0x62D9, 0xD7BE, + 0x62DA, 0xDED5, + 0x62DB, 0xD5D0, + 0x62DC, 0xB0DD, + 0x62DF, 0xC4E2, + 0x62E2, 0xC2A3, + 0x62E3, 0xBCF0, + 0x62E5, 0xD3B5, + 0x62E6, 0xC0B9, + 0x62E7, 0xC5A1, + 0x62E8, 0xB2A6, + 0x62E9, 0xD4F1, + 0x62EC, 0xC0A8, + 0x62ED, 0xCAC3, + 0x62EE, 0xDED7, + 0x62EF, 0xD5FC, + 0x62F1, 0xB9B0, + 0x62F3, 0xC8AD, + 0x62F4, 0xCBA9, + 0x62F6, 0xDED9, + 0x62F7, 0xBFBD, + 0x62FC, 0xC6B4, + 0x62FD, 0xD7A7, + 0x62FE, 0xCAB0, + 0x62FF, 0xC4C3, + 0x6301, 0xB3D6, + 0x6302, 0xB9D2, + 0x6307, 0xD6B8, + 0x6308, 0xEAFC, + 0x6309, 0xB0B4, + 0x630E, 0xBFE6, + 0x6311, 0xCCF4, + 0x6316, 0xCDDA, + 0x631A, 0xD6BF, + 0x631B, 0xC2CE, + 0x631D, 0xCECE, + 0x631E, 0xCCA2, + 0x631F, 0xD0AE, + 0x6320, 0xC4D3, + 0x6321, 0xB5B2, + 0x6322, 0xDED8, + 0x6323, 0xD5F5, + 0x6324, 0xBCB7, + 0x6325, 0xBBD3, + 0x6328, 0xB0A4, + 0x632A, 0xC5B2, + 0x632B, 0xB4EC, + 0x632F, 0xD5F1, + 0x6332, 0xEAFD, + 0x6339, 0xDEDA, + 0x633A, 0xCDA6, + 0x633D, 0xCDEC, + 0x6342, 0xCEE6, + 0x6343, 0xDEDC, + 0x6345, 0xCDB1, + 0x6346, 0xC0A6, + 0x6349, 0xD7BD, + 0x634B, 0xDEDB, + 0x634C, 0xB0C6, + 0x634D, 0xBAB4, + 0x634E, 0xC9D3, + 0x634F, 0xC4F3, + 0x6350, 0xBEE8, + 0x6355, 0xB2B6, + 0x635E, 0xC0CC, + 0x635F, 0xCBF0, + 0x6361, 0xBCF1, + 0x6362, 0xBBBB, + 0x6363, 0xB5B7, + 0x6367, 0xC5F5, + 0x6369, 0xDEE6, + 0x636D, 0xDEE3, + 0x636E, 0xBEDD, + 0x6371, 0xDEDF, + 0x6376, 0xB4B7, + 0x6377, 0xBDDD, + 0x637A, 0xDEE0, + 0x637B, 0xC4ED, + 0x6380, 0xCFC6, + 0x6382, 0xB5E0, + 0x6387, 0xB6DE, + 0x6388, 0xCADA, + 0x6389, 0xB5F4, + 0x638A, 0xDEE5, + 0x638C, 0xD5C6, + 0x638E, 0xDEE1, + 0x638F, 0xCCCD, + 0x6390, 0xC6FE, + 0x6392, 0xC5C5, + 0x6396, 0xD2B4, + 0x6398, 0xBEF2, + 0x63A0, 0xC2D3, + 0x63A2, 0xCCBD, + 0x63A3, 0xB3B8, + 0x63A5, 0xBDD3, + 0x63A7, 0xBFD8, + 0x63A8, 0xCDC6, + 0x63A9, 0xD1DA, + 0x63AA, 0xB4EB, + 0x63AC, 0xDEE4, + 0x63AD, 0xDEDD, + 0x63AE, 0xDEE7, + 0x63B0, 0xEAFE, + 0x63B3, 0xC2B0, + 0x63B4, 0xDEE2, + 0x63B7, 0xD6C0, + 0x63B8, 0xB5A7, + 0x63BA, 0xB2F4, + 0x63BC, 0xDEE8, + 0x63BE, 0xDEF2, + 0x63C4, 0xDEED, + 0x63C6, 0xDEF1, + 0x63C9, 0xC8E0, + 0x63CD, 0xD7E1, + 0x63CE, 0xDEEF, + 0x63CF, 0xC3E8, + 0x63D0, 0xCCE1, + 0x63D2, 0xB2E5, + 0x63D6, 0xD2BE, + 0x63DE, 0xDEEE, + 0x63E0, 0xDEEB, + 0x63E1, 0xCED5, + 0x63E3, 0xB4A7, + 0x63E9, 0xBFAB, + 0x63EA, 0xBEBE, + 0x63ED, 0xBDD2, + 0x63F2, 0xDEE9, + 0x63F4, 0xD4AE, + 0x63F6, 0xDEDE, + 0x63F8, 0xDEEA, + 0x63FD, 0xC0BF, + 0x63FF, 0xDEEC, + 0x6400, 0xB2F3, + 0x6401, 0xB8E9, + 0x6402, 0xC2A7, + 0x6405, 0xBDC1, + 0x640B, 0xDEF5, + 0x640C, 0xDEF8, + 0x640F, 0xB2AB, + 0x6410, 0xB4A4, + 0x6413, 0xB4EA, + 0x6414, 0xC9A6, + 0x641B, 0xDEF6, + 0x641C, 0xCBD1, + 0x641E, 0xB8E3, + 0x6420, 0xDEF7, + 0x6421, 0xDEFA, + 0x6426, 0xDEF9, + 0x642A, 0xCCC2, + 0x642C, 0xB0E1, + 0x642D, 0xB4EE, + 0x6434, 0xE5BA, + 0x643A, 0xD0AF, + 0x643D, 0xB2EB, + 0x643F, 0xEBA1, + 0x6441, 0xDEF4, + 0x6444, 0xC9E3, + 0x6445, 0xDEF3, + 0x6446, 0xB0DA, + 0x6447, 0xD2A1, + 0x6448, 0xB1F7, + 0x644A, 0xCCAF, + 0x6452, 0xDEF0, + 0x6454, 0xCBA4, + 0x6458, 0xD5AA, + 0x645E, 0xDEFB, + 0x6467, 0xB4DD, + 0x6469, 0xC4A6, + 0x646D, 0xDEFD, + 0x6478, 0xC3FE, + 0x6479, 0xC4A1, + 0x647A, 0xDFA1, + 0x6482, 0xC1CC, + 0x6484, 0xDEFC, + 0x6485, 0xBEEF, + 0x6487, 0xC6B2, + 0x6491, 0xB3C5, + 0x6492, 0xC8F6, + 0x6495, 0xCBBA, + 0x6496, 0xDEFE, + 0x6499, 0xDFA4, + 0x649E, 0xD7B2, + 0x64A4, 0xB3B7, + 0x64A9, 0xC1C3, + 0x64AC, 0xC7CB, + 0x64AD, 0xB2A5, + 0x64AE, 0xB4E9, + 0x64B0, 0xD7AB, + 0x64B5, 0xC4EC, + 0x64B7, 0xDFA2, + 0x64B8, 0xDFA3, + 0x64BA, 0xDFA5, + 0x64BC, 0xBAB3, + 0x64C0, 0xDFA6, + 0x64C2, 0xC0DE, + 0x64C5, 0xC9C3, + 0x64CD, 0xB2D9, + 0x64CE, 0xC7E6, + 0x64D0, 0xDFA7, + 0x64D2, 0xC7DC, + 0x64D7, 0xDFA8, + 0x64D8, 0xEBA2, + 0x64DE, 0xCBD3, + 0x64E2, 0xDFAA, + 0x64E4, 0xDFA9, + 0x64E6, 0xB2C1, + 0x6500, 0xC5CA, + 0x6509, 0xDFAB, + 0x6512, 0xD4DC, + 0x6518, 0xC8C1, + 0x6525, 0xDFAC, + 0x652B, 0xBEF0, + 0x652E, 0xDFAD, + 0x652F, 0xD6A7, + 0x6534, 0xEAB7, + 0x6535, 0xEBB6, + 0x6536, 0xCAD5, + 0x6538, 0xD8FC, + 0x6539, 0xB8C4, + 0x653B, 0xB9A5, + 0x653E, 0xB7C5, + 0x653F, 0xD5FE, + 0x6545, 0xB9CA, + 0x6548, 0xD0A7, + 0x6549, 0xF4CD, + 0x654C, 0xB5D0, + 0x654F, 0xC3F4, + 0x6551, 0xBEC8, + 0x6555, 0xEBB7, + 0x6556, 0xB0BD, + 0x6559, 0xBDCC, + 0x655B, 0xC1B2, + 0x655D, 0xB1D6, + 0x655E, 0xB3A8, + 0x6562, 0xB8D2, + 0x6563, 0xC9A2, + 0x6566, 0xB6D8, + 0x656B, 0xEBB8, + 0x656C, 0xBEB4, + 0x6570, 0xCAFD, + 0x6572, 0xC7C3, + 0x6574, 0xD5FB, + 0x6577, 0xB7F3, + 0x6587, 0xCEC4, + 0x658B, 0xD5AB, + 0x658C, 0xB1F3, + 0x6590, 0xECB3, + 0x6591, 0xB0DF, + 0x6593, 0xECB5, + 0x6597, 0xB6B7, + 0x6599, 0xC1CF, + 0x659B, 0xF5FA, + 0x659C, 0xD0B1, + 0x659F, 0xD5E5, + 0x65A1, 0xCED3, + 0x65A4, 0xBDEF, + 0x65A5, 0xB3E2, + 0x65A7, 0xB8AB, + 0x65A9, 0xD5B6, + 0x65AB, 0xEDBD, + 0x65AD, 0xB6CF, + 0x65AF, 0xCBB9, + 0x65B0, 0xD0C2, + 0x65B9, 0xB7BD, + 0x65BC, 0xECB6, + 0x65BD, 0xCAA9, + 0x65C1, 0xC5D4, + 0x65C3, 0xECB9, + 0x65C4, 0xECB8, + 0x65C5, 0xC2C3, + 0x65C6, 0xECB7, + 0x65CB, 0xD0FD, + 0x65CC, 0xECBA, + 0x65CE, 0xECBB, + 0x65CF, 0xD7E5, + 0x65D2, 0xECBC, + 0x65D6, 0xECBD, + 0x65D7, 0xC6EC, + 0x65E0, 0xCEDE, + 0x65E2, 0xBCC8, + 0x65E5, 0xC8D5, + 0x65E6, 0xB5A9, + 0x65E7, 0xBEC9, + 0x65E8, 0xD6BC, + 0x65E9, 0xD4E7, + 0x65EC, 0xD1AE, + 0x65ED, 0xD0F1, + 0x65EE, 0xEAB8, + 0x65EF, 0xEAB9, + 0x65F0, 0xEABA, + 0x65F1, 0xBAB5, + 0x65F6, 0xCAB1, + 0x65F7, 0xBFF5, + 0x65FA, 0xCDFA, + 0x6600, 0xEAC0, + 0x6602, 0xB0BA, + 0x6603, 0xEABE, + 0x6606, 0xC0A5, + 0x660A, 0xEABB, + 0x660C, 0xB2FD, + 0x660E, 0xC3F7, + 0x660F, 0xBBE8, + 0x6613, 0xD2D7, + 0x6614, 0xCEF4, + 0x6615, 0xEABF, + 0x6619, 0xEABC, + 0x661D, 0xEAC3, + 0x661F, 0xD0C7, + 0x6620, 0xD3B3, + 0x6625, 0xB4BA, + 0x6627, 0xC3C1, + 0x6628, 0xD7F2, + 0x662D, 0xD5D1, + 0x662F, 0xCAC7, + 0x6631, 0xEAC5, + 0x6634, 0xEAC4, + 0x6635, 0xEAC7, + 0x6636, 0xEAC6, + 0x663C, 0xD6E7, + 0x663E, 0xCFD4, + 0x6641, 0xEACB, + 0x6643, 0xBBCE, + 0x664B, 0xBDFA, + 0x664C, 0xC9CE, + 0x664F, 0xEACC, + 0x6652, 0xC9B9, + 0x6653, 0xCFFE, + 0x6654, 0xEACA, + 0x6655, 0xD4CE, + 0x6656, 0xEACD, + 0x6657, 0xEACF, + 0x665A, 0xCDED, + 0x665F, 0xEAC9, + 0x6661, 0xEACE, + 0x6664, 0xCEEE, + 0x6666, 0xBBDE, + 0x6668, 0xB3BF, + 0x666E, 0xC6D5, + 0x666F, 0xBEB0, + 0x6670, 0xCEFA, + 0x6674, 0xC7E7, + 0x6676, 0xBEA7, + 0x6677, 0xEAD0, + 0x667A, 0xD6C7, + 0x667E, 0xC1C0, + 0x6682, 0xD4DD, + 0x6684, 0xEAD1, + 0x6687, 0xCFBE, + 0x668C, 0xEAD2, + 0x6691, 0xCAEE, + 0x6696, 0xC5AF, + 0x6697, 0xB0B5, + 0x669D, 0xEAD4, + 0x66A7, 0xEAD3, + 0x66A8, 0xF4DF, + 0x66AE, 0xC4BA, + 0x66B4, 0xB1A9, + 0x66B9, 0xE5DF, + 0x66BE, 0xEAD5, + 0x66D9, 0xCAEF, + 0x66DB, 0xEAD6, + 0x66DC, 0xEAD7, + 0x66DD, 0xC6D8, + 0x66E6, 0xEAD8, + 0x66E9, 0xEAD9, + 0x66F0, 0xD4BB, + 0x66F2, 0xC7FA, + 0x66F3, 0xD2B7, + 0x66F4, 0xB8FC, + 0x66F7, 0xEAC2, + 0x66F9, 0xB2DC, + 0x66FC, 0xC2FC, + 0x66FE, 0xD4F8, + 0x66FF, 0xCCE6, + 0x6700, 0xD7EE, + 0x6708, 0xD4C2, + 0x6709, 0xD3D0, + 0x670A, 0xEBC3, + 0x670B, 0xC5F3, + 0x670D, 0xB7FE, + 0x6710, 0xEBD4, + 0x6714, 0xCBB7, + 0x6715, 0xEBDE, + 0x6717, 0xC0CA, + 0x671B, 0xCDFB, + 0x671D, 0xB3AF, + 0x671F, 0xC6DA, + 0x6726, 0xEBFC, + 0x6728, 0xC4BE, + 0x672A, 0xCEB4, + 0x672B, 0xC4A9, + 0x672C, 0xB1BE, + 0x672D, 0xD4FD, + 0x672F, 0xCAF5, + 0x6731, 0xD6EC, + 0x6734, 0xC6D3, + 0x6735, 0xB6E4, + 0x673A, 0xBBFA, + 0x673D, 0xD0E0, + 0x6740, 0xC9B1, + 0x6742, 0xD4D3, + 0x6743, 0xC8A8, + 0x6746, 0xB8CB, + 0x6748, 0xE8BE, + 0x6749, 0xC9BC, + 0x674C, 0xE8BB, + 0x674E, 0xC0EE, + 0x674F, 0xD0D3, + 0x6750, 0xB2C4, + 0x6751, 0xB4E5, + 0x6753, 0xE8BC, + 0x6756, 0xD5C8, + 0x675C, 0xB6C5, + 0x675E, 0xE8BD, + 0x675F, 0xCAF8, + 0x6760, 0xB8DC, + 0x6761, 0xCCF5, + 0x6765, 0xC0B4, + 0x6768, 0xD1EE, + 0x6769, 0xE8BF, + 0x676A, 0xE8C2, + 0x676D, 0xBABC, + 0x676F, 0xB1AD, + 0x6770, 0xBDDC, + 0x6772, 0xEABD, + 0x6773, 0xE8C3, + 0x6775, 0xE8C6, + 0x6777, 0xE8CB, + 0x677C, 0xE8CC, + 0x677E, 0xCBC9, + 0x677F, 0xB0E5, + 0x6781, 0xBCAB, + 0x6784, 0xB9B9, + 0x6787, 0xE8C1, + 0x6789, 0xCDF7, + 0x678B, 0xE8CA, + 0x6790, 0xCEF6, + 0x6795, 0xD5ED, + 0x6797, 0xC1D6, + 0x6798, 0xE8C4, + 0x679A, 0xC3B6, + 0x679C, 0xB9FB, + 0x679D, 0xD6A6, + 0x679E, 0xE8C8, + 0x67A2, 0xCAE0, + 0x67A3, 0xD4E6, + 0x67A5, 0xE8C0, + 0x67A7, 0xE8C5, + 0x67A8, 0xE8C7, + 0x67AA, 0xC7B9, + 0x67AB, 0xB7E3, + 0x67AD, 0xE8C9, + 0x67AF, 0xBFDD, + 0x67B0, 0xE8D2, + 0x67B3, 0xE8D7, + 0x67B5, 0xE8D5, + 0x67B6, 0xBCDC, + 0x67B7, 0xBCCF, + 0x67B8, 0xE8DB, + 0x67C1, 0xE8DE, + 0x67C3, 0xE8DA, + 0x67C4, 0xB1FA, + 0x67CF, 0xB0D8, + 0x67D0, 0xC4B3, + 0x67D1, 0xB8CC, + 0x67D2, 0xC6E2, + 0x67D3, 0xC8BE, + 0x67D4, 0xC8E1, + 0x67D8, 0xE8CF, + 0x67D9, 0xE8D4, + 0x67DA, 0xE8D6, + 0x67DC, 0xB9F1, + 0x67DD, 0xE8D8, + 0x67DE, 0xD7F5, + 0x67E0, 0xC4FB, + 0x67E2, 0xE8DC, + 0x67E5, 0xB2E9, + 0x67E9, 0xE8D1, + 0x67EC, 0xBCED, + 0x67EF, 0xBFC2, + 0x67F0, 0xE8CD, + 0x67F1, 0xD6F9, + 0x67F3, 0xC1F8, + 0x67F4, 0xB2F1, + 0x67FD, 0xE8DF, + 0x67FF, 0xCAC1, + 0x6800, 0xE8D9, + 0x6805, 0xD5A4, + 0x6807, 0xB1EA, + 0x6808, 0xD5BB, + 0x6809, 0xE8CE, + 0x680A, 0xE8D0, + 0x680B, 0xB6B0, + 0x680C, 0xE8D3, + 0x680E, 0xE8DD, + 0x680F, 0xC0B8, + 0x6811, 0xCAF7, + 0x6813, 0xCBA8, + 0x6816, 0xC6DC, + 0x6817, 0xC0F5, + 0x681D, 0xE8E9, + 0x6821, 0xD0A3, + 0x6829, 0xE8F2, + 0x682A, 0xD6EA, + 0x6832, 0xE8E0, + 0x6833, 0xE8E1, + 0x6837, 0xD1F9, + 0x6838, 0xBACB, + 0x6839, 0xB8F9, + 0x683C, 0xB8F1, + 0x683D, 0xD4D4, + 0x683E, 0xE8EF, + 0x6840, 0xE8EE, + 0x6841, 0xE8EC, + 0x6842, 0xB9F0, + 0x6843, 0xCCD2, + 0x6844, 0xE8E6, + 0x6845, 0xCEA6, + 0x6846, 0xBFF2, + 0x6848, 0xB0B8, + 0x6849, 0xE8F1, + 0x684A, 0xE8F0, + 0x684C, 0xD7C0, + 0x684E, 0xE8E4, + 0x6850, 0xCDA9, + 0x6851, 0xC9A3, + 0x6853, 0xBBB8, + 0x6854, 0xBDDB, + 0x6855, 0xE8EA, + 0x6860, 0xE8E2, + 0x6861, 0xE8E3, + 0x6862, 0xE8E5, + 0x6863, 0xB5B5, + 0x6864, 0xE8E7, + 0x6865, 0xC7C5, + 0x6866, 0xE8EB, + 0x6867, 0xE8ED, + 0x6868, 0xBDB0, + 0x6869, 0xD7AE, + 0x686B, 0xE8F8, + 0x6874, 0xE8F5, + 0x6876, 0xCDB0, + 0x6877, 0xE8F6, + 0x6881, 0xC1BA, + 0x6883, 0xE8E8, + 0x6885, 0xC3B7, + 0x6886, 0xB0F0, + 0x688F, 0xE8F4, + 0x6893, 0xE8F7, + 0x6897, 0xB9A3, + 0x68A2, 0xC9D2, + 0x68A6, 0xC3CE, + 0x68A7, 0xCEE0, + 0x68A8, 0xC0E6, + 0x68AD, 0xCBF3, + 0x68AF, 0xCCDD, + 0x68B0, 0xD0B5, + 0x68B3, 0xCAE1, + 0x68B5, 0xE8F3, + 0x68C0, 0xBCEC, + 0x68C2, 0xE8F9, + 0x68C9, 0xC3DE, + 0x68CB, 0xC6E5, + 0x68CD, 0xB9F7, + 0x68D2, 0xB0F4, + 0x68D5, 0xD7D8, + 0x68D8, 0xBCAC, + 0x68DA, 0xC5EF, + 0x68E0, 0xCCC4, + 0x68E3, 0xE9A6, + 0x68EE, 0xC9AD, + 0x68F0, 0xE9A2, + 0x68F1, 0xC0E2, + 0x68F5, 0xBFC3, + 0x68F9, 0xE8FE, + 0x68FA, 0xB9D7, + 0x68FC, 0xE8FB, + 0x6901, 0xE9A4, + 0x6905, 0xD2CE, + 0x690B, 0xE9A3, + 0x690D, 0xD6B2, + 0x690E, 0xD7B5, + 0x6910, 0xE9A7, + 0x6912, 0xBDB7, + 0x691F, 0xE8FC, + 0x6920, 0xE8FD, + 0x6924, 0xE9A1, + 0x692D, 0xCDD6, + 0x6930, 0xD2AC, + 0x6934, 0xE9B2, + 0x6939, 0xE9A9, + 0x693D, 0xB4AA, + 0x693F, 0xB4BB, + 0x6942, 0xE9AB, + 0x6954, 0xD0A8, + 0x6957, 0xE9A5, + 0x695A, 0xB3FE, + 0x695D, 0xE9AC, + 0x695E, 0xC0E3, + 0x6960, 0xE9AA, + 0x6963, 0xE9B9, + 0x6966, 0xE9B8, + 0x696B, 0xE9AE, + 0x696E, 0xE8FA, + 0x6971, 0xE9A8, + 0x6977, 0xBFAC, + 0x6978, 0xE9B1, + 0x6979, 0xE9BA, + 0x697C, 0xC2A5, + 0x6980, 0xE9AF, + 0x6982, 0xB8C5, + 0x6984, 0xE9AD, + 0x6986, 0xD3DC, + 0x6987, 0xE9B4, + 0x6988, 0xE9B5, + 0x6989, 0xE9B7, + 0x698D, 0xE9C7, + 0x6994, 0xC0C6, + 0x6995, 0xE9C5, + 0x6998, 0xE9B0, + 0x699B, 0xE9BB, + 0x699C, 0xB0F1, + 0x69A7, 0xE9BC, + 0x69A8, 0xD5A5, + 0x69AB, 0xE9BE, + 0x69AD, 0xE9BF, + 0x69B1, 0xE9C1, + 0x69B4, 0xC1F1, + 0x69B7, 0xC8B6, + 0x69BB, 0xE9BD, + 0x69C1, 0xE9C2, + 0x69CA, 0xE9C3, + 0x69CC, 0xE9B3, + 0x69CE, 0xE9B6, + 0x69D0, 0xBBB1, + 0x69D4, 0xE9C0, + 0x69DB, 0xBCF7, + 0x69DF, 0xE9C4, + 0x69E0, 0xE9C6, + 0x69ED, 0xE9CA, + 0x69F2, 0xE9CE, + 0x69FD, 0xB2DB, + 0x69FF, 0xE9C8, + 0x6A0A, 0xB7AE, + 0x6A17, 0xE9CB, + 0x6A18, 0xE9CC, + 0x6A1F, 0xD5C1, + 0x6A21, 0xC4A3, + 0x6A28, 0xE9D8, + 0x6A2A, 0xBAE1, + 0x6A2F, 0xE9C9, + 0x6A31, 0xD3A3, + 0x6A35, 0xE9D4, + 0x6A3D, 0xE9D7, + 0x6A3E, 0xE9D0, + 0x6A44, 0xE9CF, + 0x6A47, 0xC7C1, + 0x6A50, 0xE9D2, + 0x6A58, 0xE9D9, + 0x6A59, 0xB3C8, + 0x6A5B, 0xE9D3, + 0x6A61, 0xCFF0, + 0x6A65, 0xE9CD, + 0x6A71, 0xB3F7, + 0x6A79, 0xE9D6, + 0x6A7C, 0xE9DA, + 0x6A80, 0xCCB4, + 0x6A84, 0xCFAD, + 0x6A8E, 0xE9D5, + 0x6A90, 0xE9DC, + 0x6A91, 0xE9DB, + 0x6A97, 0xE9DE, + 0x6AA0, 0xE9D1, + 0x6AA9, 0xE9DD, + 0x6AAB, 0xE9DF, + 0x6AAC, 0xC3CA, + 0x6B20, 0xC7B7, + 0x6B21, 0xB4CE, + 0x6B22, 0xBBB6, + 0x6B23, 0xD0C0, + 0x6B24, 0xECA3, + 0x6B27, 0xC5B7, + 0x6B32, 0xD3FB, + 0x6B37, 0xECA4, + 0x6B39, 0xECA5, + 0x6B3A, 0xC6DB, + 0x6B3E, 0xBFEE, + 0x6B43, 0xECA6, + 0x6B46, 0xECA7, + 0x6B47, 0xD0AA, + 0x6B49, 0xC7B8, + 0x6B4C, 0xB8E8, + 0x6B59, 0xECA8, + 0x6B62, 0xD6B9, + 0x6B63, 0xD5FD, + 0x6B64, 0xB4CB, + 0x6B65, 0xB2BD, + 0x6B66, 0xCEE4, + 0x6B67, 0xC6E7, + 0x6B6A, 0xCDE1, + 0x6B79, 0xB4F5, + 0x6B7B, 0xCBC0, + 0x6B7C, 0xBCDF, + 0x6B81, 0xE9E2, + 0x6B82, 0xE9E3, + 0x6B83, 0xD1EA, + 0x6B84, 0xE9E5, + 0x6B86, 0xB4F9, + 0x6B87, 0xE9E4, + 0x6B89, 0xD1B3, + 0x6B8A, 0xCAE2, + 0x6B8B, 0xB2D0, + 0x6B8D, 0xE9E8, + 0x6B92, 0xE9E6, + 0x6B93, 0xE9E7, + 0x6B96, 0xD6B3, + 0x6B9A, 0xE9E9, + 0x6B9B, 0xE9EA, + 0x6BA1, 0xE9EB, + 0x6BAA, 0xE9EC, + 0x6BB3, 0xECAF, + 0x6BB4, 0xC5B9, + 0x6BB5, 0xB6CE, + 0x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1FA, + 0x6F46, 0xE4EB, + 0x6F47, 0xE4EC, + 0x6F4B, 0xE4F2, + 0x6F4D, 0xCEAB, + 0x6F58, 0xC5CB, + 0x6F5C, 0xC7B1, + 0x6F5E, 0xC2BA, + 0x6F62, 0xE4EA, + 0x6F66, 0xC1CA, + 0x6F6D, 0xCCB6, + 0x6F6E, 0xB3B1, + 0x6F72, 0xE4FB, + 0x6F74, 0xE4F3, + 0x6F78, 0xE4FA, + 0x6F7A, 0xE4FD, + 0x6F7C, 0xE4FC, + 0x6F84, 0xB3CE, + 0x6F88, 0xB3BA, + 0x6F89, 0xE4F7, + 0x6F8C, 0xE4F9, + 0x6F8D, 0xE4F8, + 0x6F8E, 0xC5EC, + 0x6F9C, 0xC0BD, + 0x6FA1, 0xD4E8, + 0x6FA7, 0xE5A2, + 0x6FB3, 0xB0C4, + 0x6FB6, 0xE5A4, + 0x6FB9, 0xE5A3, + 0x6FC0, 0xBCA4, + 0x6FC2, 0xE5A5, + 0x6FC9, 0xE5A1, + 0x6FD1, 0xE4FE, + 0x6FD2, 0xB1F4, + 0x6FDE, 0xE5A8, + 0x6FE0, 0xE5A9, + 0x6FE1, 0xE5A6, + 0x6FEE, 0xE5A7, + 0x6FEF, 0xE5AA, + 0x7011, 0xC6D9, + 0x701A, 0xE5AB, + 0x701B, 0xE5AD, + 0x7023, 0xE5AC, + 0x7035, 0xE5AF, + 0x7039, 0xE5AE, + 0x704C, 0xB9E0, + 0x704F, 0xE5B0, + 0x705E, 0xE5B1, + 0x706B, 0xBBF0, + 0x706C, 0xECE1, + 0x706D, 0xC3F0, + 0x706F, 0xB5C6, + 0x7070, 0xBBD2, + 0x7075, 0xC1E9, + 0x7076, 0xD4EE, + 0x7078, 0xBEC4, + 0x707C, 0xD7C6, + 0x707E, 0xD4D6, + 0x707F, 0xB2D3, + 0x7080, 0xECBE, + 0x7085, 0xEAC1, + 0x7089, 0xC2AF, + 0x708A, 0xB4B6, + 0x708E, 0xD1D7, + 0x7092, 0xB3B4, + 0x7094, 0xC8B2, + 0x7095, 0xBFBB, + 0x7096, 0xECC0, + 0x7099, 0xD6CB, + 0x709C, 0xECBF, + 0x709D, 0xECC1, + 0x70AB, 0xECC5, + 0x70AC, 0xBEE6, + 0x70AD, 0xCCBF, + 0x70AE, 0xC5DA, + 0x70AF, 0xBEBC, + 0x70B1, 0xECC6, + 0x70B3, 0xB1FE, + 0x70B7, 0xECC4, + 0x70B8, 0xD5A8, + 0x70B9, 0xB5E3, + 0x70BB, 0xECC2, + 0x70BC, 0xC1B6, + 0x70BD, 0xB3E3, + 0x70C0, 0xECC3, + 0x70C1, 0xCBB8, + 0x70C2, 0xC0C3, + 0x70C3, 0xCCFE, + 0x70C8, 0xC1D2, + 0x70CA, 0xECC8, + 0x70D8, 0xBAE6, + 0x70D9, 0xC0D3, + 0x70DB, 0xD6F2, + 0x70DF, 0xD1CC, + 0x70E4, 0xBFBE, + 0x70E6, 0xB7B3, + 0x70E7, 0xC9D5, + 0x70E8, 0xECC7, + 0x70E9, 0xBBE2, + 0x70EB, 0xCCCC, + 0x70EC, 0xBDFD, + 0x70ED, 0xC8C8, + 0x70EF, 0xCFA9, + 0x70F7, 0xCDE9, + 0x70F9, 0xC5EB, + 0x70FD, 0xB7E9, + 0x7109, 0xD1C9, + 0x710A, 0xBAB8, + 0x7110, 0xECC9, + 0x7113, 0xECCA, + 0x7115, 0xBBC0, + 0x7116, 0xECCB, + 0x7118, 0xECE2, + 0x7119, 0xB1BA, + 0x711A, 0xB7D9, + 0x7126, 0xBDB9, + 0x712F, 0xECCC, + 0x7130, 0xD1E6, + 0x7131, 0xECCD, + 0x7136, 0xC8BB, + 0x7145, 0xECD1, + 0x714A, 0xECD3, + 0x714C, 0xBBCD, + 0x714E, 0xBCE5, + 0x715C, 0xECCF, + 0x715E, 0xC9B7, + 0x7164, 0xC3BA, + 0x7166, 0xECE3, + 0x7167, 0xD5D5, + 0x7168, 0xECD0, + 0x716E, 0xD6F3, + 0x7172, 0xECD2, + 0x7173, 0xECCE, + 0x7178, 0xECD4, + 0x717A, 0xECD5, + 0x717D, 0xC9BF, + 0x7184, 0xCFA8, + 0x718A, 0xD0DC, + 0x718F, 0xD1AC, + 0x7194, 0xC8DB, + 0x7198, 0xECD6, + 0x7199, 0xCEF5, + 0x719F, 0xCAEC, + 0x71A0, 0xECDA, + 0x71A8, 0xECD9, + 0x71AC, 0xB0BE, + 0x71B3, 0xECD7, + 0x71B5, 0xECD8, + 0x71B9, 0xECE4, + 0x71C3, 0xC8BC, + 0x71CE, 0xC1C7, + 0x71D4, 0xECDC, + 0x71D5, 0xD1E0, + 0x71E0, 0xECDB, + 0x71E5, 0xD4EF, + 0x71E7, 0xECDD, + 0x71EE, 0xDBC6, + 0x71F9, 0xECDE, + 0x7206, 0xB1AC, + 0x721D, 0xECDF, + 0x7228, 0xECE0, + 0x722A, 0xD7A6, + 0x722C, 0xC5C0, + 0x7230, 0xEBBC, + 0x7231, 0xB0AE, + 0x7235, 0xBEF4, + 0x7236, 0xB8B8, + 0x7237, 0xD2AF, + 0x7238, 0xB0D6, + 0x7239, 0xB5F9, + 0x723B, 0xD8B3, + 0x723D, 0xCBAC, + 0x723F, 0xE3DD, + 0x7247, 0xC6AC, + 0x7248, 0xB0E6, + 0x724C, 0xC5C6, + 0x724D, 0xEBB9, + 0x7252, 0xEBBA, + 0x7256, 0xEBBB, + 0x7259, 0xD1C0, + 0x725B, 0xC5A3, + 0x725D, 0xEAF2, + 0x725F, 0xC4B2, + 0x7261, 0xC4B5, + 0x7262, 0xC0CE, + 0x7266, 0xEAF3, + 0x7267, 0xC4C1, + 0x7269, 0xCEEF, + 0x726E, 0xEAF0, + 0x726F, 0xEAF4, + 0x7272, 0xC9FC, + 0x7275, 0xC7A3, + 0x7279, 0xCCD8, + 0x727A, 0xCEFE, + 0x727E, 0xEAF5, + 0x727F, 0xEAF6, + 0x7280, 0xCFAC, + 0x7281, 0xC0E7, + 0x7284, 0xEAF7, + 0x728A, 0xB6BF, + 0x728B, 0xEAF8, + 0x728D, 0xEAF9, + 0x728F, 0xEAFA, + 0x7292, 0xEAFB, + 0x729F, 0xEAF1, + 0x72AC, 0xC8AE, + 0x72AD, 0xE1EB, + 0x72AF, 0xB7B8, + 0x72B0, 0xE1EC, + 0x72B4, 0xE1ED, + 0x72B6, 0xD7B4, + 0x72B7, 0xE1EE, + 0x72B8, 0xE1EF, + 0x72B9, 0xD3CC, + 0x72C1, 0xE1F1, + 0x72C2, 0xBFF1, + 0x72C3, 0xE1F0, + 0x72C4, 0xB5D2, + 0x72C8, 0xB1B7, + 0x72CD, 0xE1F3, + 0x72CE, 0xE1F2, + 0x72D0, 0xBAFC, + 0x72D2, 0xE1F4, + 0x72D7, 0xB9B7, + 0x72D9, 0xBED1, + 0x72DE, 0xC4FC, + 0x72E0, 0xBADD, + 0x72E1, 0xBDC6, + 0x72E8, 0xE1F5, + 0x72E9, 0xE1F7, + 0x72EC, 0xB6C0, + 0x72ED, 0xCFC1, + 0x72EE, 0xCAA8, + 0x72EF, 0xE1F6, + 0x72F0, 0xD5F8, + 0x72F1, 0xD3FC, + 0x72F2, 0xE1F8, + 0x72F3, 0xE1FC, + 0x72F4, 0xE1F9, + 0x72F7, 0xE1FA, + 0x72F8, 0xC0EA, + 0x72FA, 0xE1FE, + 0x72FB, 0xE2A1, + 0x72FC, 0xC0C7, + 0x7301, 0xE1FB, + 0x7303, 0xE1FD, + 0x730A, 0xE2A5, + 0x730E, 0xC1D4, + 0x7313, 0xE2A3, + 0x7315, 0xE2A8, + 0x7316, 0xB2FE, + 0x7317, 0xE2A2, + 0x731B, 0xC3CD, + 0x731C, 0xB2C2, + 0x731D, 0xE2A7, + 0x731E, 0xE2A6, + 0x7321, 0xE2A4, + 0x7322, 0xE2A9, + 0x7325, 0xE2AB, + 0x7329, 0xD0C9, + 0x732A, 0xD6ED, + 0x732B, 0xC3A8, + 0x732C, 0xE2AC, + 0x732E, 0xCFD7, + 0x7331, 0xE2AE, + 0x7334, 0xBAEF, + 0x7337, 0xE9E0, + 0x7338, 0xE2AD, + 0x7339, 0xE2AA, + 0x733E, 0xBBAB, + 0x733F, 0xD4B3, + 0x734D, 0xE2B0, + 0x7350, 0xE2AF, + 0x7352, 0xE9E1, + 0x7357, 0xE2B1, + 0x7360, 0xE2B2, + 0x736C, 0xE2B3, + 0x736D, 0xCCA1, + 0x736F, 0xE2B4, + 0x737E, 0xE2B5, + 0x7384, 0xD0FE, + 0x7387, 0xC2CA, + 0x7389, 0xD3F1, + 0x738B, 0xCDF5, + 0x738E, 0xE7E0, + 0x7391, 0xE7E1, + 0x7396, 0xBEC1, + 0x739B, 0xC2EA, + 0x739F, 0xE7E4, + 0x73A2, 0xE7E3, + 0x73A9, 0xCDE6, + 0x73AB, 0xC3B5, + 0x73AE, 0xE7E2, + 0x73AF, 0xBBB7, + 0x73B0, 0xCFD6, + 0x73B2, 0xC1E1, + 0x73B3, 0xE7E9, + 0x73B7, 0xE7E8, + 0x73BA, 0xE7F4, + 0x73BB, 0xB2A3, + 0x73C0, 0xE7EA, + 0x73C2, 0xE7E6, + 0x73C8, 0xE7EC, + 0x73C9, 0xE7EB, + 0x73CA, 0xC9BA, + 0x73CD, 0xD5E4, + 0x73CF, 0xE7E5, + 0x73D0, 0xB7A9, + 0x73D1, 0xE7E7, + 0x73D9, 0xE7EE, + 0x73DE, 0xE7F3, + 0x73E0, 0xD6E9, + 0x73E5, 0xE7ED, + 0x73E7, 0xE7F2, + 0x73E9, 0xE7F1, + 0x73ED, 0xB0E0, + 0x73F2, 0xE7F5, + 0x7403, 0xC7F2, + 0x7405, 0xC0C5, + 0x7406, 0xC0ED, + 0x7409, 0xC1F0, + 0x740A, 0xE7F0, + 0x740F, 0xE7F6, + 0x7410, 0xCBF6, + 0x741A, 0xE8A2, + 0x741B, 0xE8A1, + 0x7422, 0xD7C1, + 0x7425, 0xE7FA, + 0x7426, 0xE7F9, + 0x7428, 0xE7FB, + 0x742A, 0xE7F7, + 0x742C, 0xE7FE, + 0x742E, 0xE7FD, + 0x7430, 0xE7FC, + 0x7433, 0xC1D5, + 0x7434, 0xC7D9, + 0x7435, 0xC5FD, + 0x7436, 0xC5C3, + 0x743C, 0xC7ED, + 0x7441, 0xE8A3, + 0x7455, 0xE8A6, + 0x7457, 0xE8A5, + 0x7459, 0xE8A7, + 0x745A, 0xBAF7, + 0x745B, 0xE7F8, + 0x745C, 0xE8A4, + 0x745E, 0xC8F0, + 0x745F, 0xC9AA, + 0x746D, 0xE8A9, + 0x7470, 0xB9E5, + 0x7476, 0xD1FE, + 0x7477, 0xE8A8, + 0x747E, 0xE8AA, + 0x7480, 0xE8AD, + 0x7481, 0xE8AE, + 0x7483, 0xC1A7, + 0x7487, 0xE8AF, + 0x748B, 0xE8B0, + 0x748E, 0xE8AC, + 0x7490, 0xE8B4, + 0x749C, 0xE8AB, + 0x749E, 0xE8B1, + 0x74A7, 0xE8B5, + 0x74A8, 0xE8B2, + 0x74A9, 0xE8B3, + 0x74BA, 0xE8B7, + 0x74D2, 0xE8B6, + 0x74DC, 0xB9CF, + 0x74DE, 0xF0AC, + 0x74E0, 0xF0AD, + 0x74E2, 0xC6B0, + 0x74E3, 0xB0EA, + 0x74E4, 0xC8BF, + 0x74E6, 0xCDDF, + 0x74EE, 0xCECD, + 0x74EF, 0xEAB1, + 0x74F4, 0xEAB2, + 0x74F6, 0xC6BF, + 0x74F7, 0xB4C9, + 0x74FF, 0xEAB3, + 0x7504, 0xD5E7, + 0x750D, 0xDDF9, + 0x750F, 0xEAB4, + 0x7511, 0xEAB5, + 0x7513, 0xEAB6, + 0x7518, 0xB8CA, + 0x7519, 0xDFB0, + 0x751A, 0xC9F5, + 0x751C, 0xCCF0, + 0x751F, 0xC9FA, + 0x7525, 0xC9FB, + 0x7528, 0xD3C3, + 0x7529, 0xCBA6, + 0x752B, 0xB8A6, + 0x752C, 0xF0AE, + 0x752D, 0xB1C2, + 0x752F, 0xE5B8, + 0x7530, 0xCCEF, + 0x7531, 0xD3C9, + 0x7532, 0xBCD7, + 0x7533, 0xC9EA, + 0x7535, 0xB5E7, + 0x7537, 0xC4D0, + 0x7538, 0xB5E9, + 0x753A, 0xEEAE, + 0x753B, 0xBBAD, + 0x753E, 0xE7DE, + 0x7540, 0xEEAF, + 0x7545, 0xB3A9, + 0x7548, 0xEEB2, + 0x754B, 0xEEB1, + 0x754C, 0xBDE7, + 0x754E, 0xEEB0, + 0x754F, 0xCEB7, + 0x7554, 0xC5CF, + 0x7559, 0xC1F4, + 0x755A, 0xDBCE, + 0x755B, 0xEEB3, + 0x755C, 0xD0F3, + 0x7565, 0xC2D4, + 0x7566, 0xC6E8, + 0x756A, 0xB7AC, + 0x7572, 0xEEB4, + 0x7574, 0xB3EB, + 0x7578, 0xBBFB, + 0x7579, 0xEEB5, + 0x757F, 0xE7DC, + 0x7583, 0xEEB6, + 0x7586, 0xBDAE, + 0x758B, 0xF1E2, + 0x758F, 0xCAE8, + 0x7591, 0xD2C9, + 0x7592, 0xF0DA, + 0x7594, 0xF0DB, + 0x7596, 0xF0DC, + 0x7597, 0xC1C6, + 0x7599, 0xB8ED, + 0x759A, 0xBECE, + 0x759D, 0xF0DE, + 0x759F, 0xC5B1, + 0x75A0, 0xF0DD, + 0x75A1, 0xD1F1, + 0x75A3, 0xF0E0, + 0x75A4, 0xB0CC, + 0x75A5, 0xBDEA, + 0x75AB, 0xD2DF, + 0x75AC, 0xF0DF, + 0x75AE, 0xB4AF, + 0x75AF, 0xB7E8, + 0x75B0, 0xF0E6, + 0x75B1, 0xF0E5, + 0x75B2, 0xC6A3, + 0x75B3, 0xF0E1, + 0x75B4, 0xF0E2, + 0x75B5, 0xB4C3, + 0x75B8, 0xF0E3, + 0x75B9, 0xD5EE, + 0x75BC, 0xCCDB, + 0x75BD, 0xBED2, + 0x75BE, 0xBCB2, + 0x75C2, 0xF0E8, + 0x75C3, 0xF0E7, + 0x75C4, 0xF0E4, + 0x75C5, 0xB2A1, + 0x75C7, 0xD6A2, + 0x75C8, 0xD3B8, + 0x75C9, 0xBEB7, + 0x75CA, 0xC8AC, + 0x75CD, 0xF0EA, + 0x75D2, 0xD1F7, + 0x75D4, 0xD6CC, + 0x75D5, 0xBADB, + 0x75D6, 0xF0E9, + 0x75D8, 0xB6BB, + 0x75DB, 0xCDB4, + 0x75DE, 0xC6A6, + 0x75E2, 0xC1A1, + 0x75E3, 0xF0EB, + 0x75E4, 0xF0EE, + 0x75E6, 0xF0ED, + 0x75E7, 0xF0F0, + 0x75E8, 0xF0EC, + 0x75EA, 0xBBBE, + 0x75EB, 0xF0EF, + 0x75F0, 0xCCB5, + 0x75F1, 0xF0F2, + 0x75F4, 0xB3D5, + 0x75F9, 0xB1D4, + 0x75FC, 0xF0F3, + 0x75FF, 0xF0F4, + 0x7600, 0xF0F6, + 0x7601, 0xB4E1, + 0x7603, 0xF0F1, + 0x7605, 0xF0F7, + 0x760A, 0xF0FA, + 0x760C, 0xF0F8, + 0x7610, 0xF0F5, + 0x7615, 0xF0FD, + 0x7617, 0xF0F9, + 0x7618, 0xF0FC, + 0x7619, 0xF0FE, + 0x761B, 0xF1A1, + 0x761F, 0xCEC1, + 0x7620, 0xF1A4, + 0x7622, 0xF1A3, + 0x7624, 0xC1F6, + 0x7625, 0xF0FB, + 0x7626, 0xCADD, + 0x7629, 0xB4F1, + 0x762A, 0xB1F1, + 0x762B, 0xCCB1, + 0x762D, 0xF1A6, + 0x7630, 0xF1A7, + 0x7633, 0xF1AC, + 0x7634, 0xD5CE, + 0x7635, 0xF1A9, + 0x7638, 0xC8B3, + 0x763C, 0xF1A2, + 0x763E, 0xF1AB, + 0x763F, 0xF1A8, + 0x7640, 0xF1A5, + 0x7643, 0xF1AA, + 0x764C, 0xB0A9, + 0x764D, 0xF1AD, + 0x7654, 0xF1AF, + 0x7656, 0xF1B1, + 0x765C, 0xF1B0, + 0x765E, 0xF1AE, + 0x7663, 0xD1A2, + 0x766B, 0xF1B2, + 0x766F, 0xF1B3, + 0x7678, 0xB9EF, + 0x767B, 0xB5C7, + 0x767D, 0xB0D7, + 0x767E, 0xB0D9, + 0x7682, 0xD4ED, + 0x7684, 0xB5C4, + 0x7686, 0xBDD4, + 0x7687, 0xBBCA, + 0x7688, 0xF0A7, + 0x768B, 0xB8DE, + 0x768E, 0xF0A8, + 0x7691, 0xB0A8, + 0x7693, 0xF0A9, + 0x7696, 0xCDEE, + 0x7699, 0xF0AA, + 0x76A4, 0xF0AB, + 0x76AE, 0xC6A4, + 0x76B1, 0xD6E5, + 0x76B2, 0xF1E4, + 0x76B4, 0xF1E5, + 0x76BF, 0xC3F3, + 0x76C2, 0xD3DB, + 0x76C5, 0xD6D1, + 0x76C6, 0xC5E8, + 0x76C8, 0xD3AF, + 0x76CA, 0xD2E6, + 0x76CD, 0xEEC1, + 0x76CE, 0xB0BB, + 0x76CF, 0xD5B5, + 0x76D0, 0xD1CE, + 0x76D1, 0xBCE0, + 0x76D2, 0xBAD0, + 0x76D4, 0xBFF8, + 0x76D6, 0xB8C7, + 0x76D7, 0xB5C1, + 0x76D8, 0xC5CC, + 0x76DB, 0xCAA2, + 0x76DF, 0xC3CB, + 0x76E5, 0xEEC2, + 0x76EE, 0xC4BF, + 0x76EF, 0xB6A2, + 0x76F1, 0xEDEC, + 0x76F2, 0xC3A4, + 0x76F4, 0xD6B1, + 0x76F8, 0xCFE0, + 0x76F9, 0xEDEF, + 0x76FC, 0xC5CE, + 0x76FE, 0xB6DC, + 0x7701, 0xCAA1, + 0x7704, 0xEDED, + 0x7707, 0xEDF0, + 0x7708, 0xEDF1, + 0x7709, 0xC3BC, + 0x770B, 0xBFB4, + 0x770D, 0xEDEE, + 0x7719, 0xEDF4, + 0x771A, 0xEDF2, + 0x771F, 0xD5E6, + 0x7720, 0xC3DF, + 0x7722, 0xEDF3, + 0x7726, 0xEDF6, + 0x7728, 0xD5A3, + 0x7729, 0xD1A3, + 0x772D, 0xEDF5, + 0x772F, 0xC3D0, + 0x7735, 0xEDF7, + 0x7736, 0xBFF4, + 0x7737, 0xBEEC, + 0x7738, 0xEDF8, + 0x773A, 0xCCF7, + 0x773C, 0xD1DB, + 0x7740, 0xD7C5, + 0x7741, 0xD5F6, + 0x7743, 0xEDFC, + 0x7747, 0xEDFB, + 0x7750, 0xEDF9, + 0x7751, 0xEDFA, + 0x775A, 0xEDFD, + 0x775B, 0xBEA6, + 0x7761, 0xCBAF, + 0x7762, 0xEEA1, + 0x7763, 0xB6BD, + 0x7765, 0xEEA2, + 0x7766, 0xC4C0, + 0x7768, 0xEDFE, + 0x776B, 0xBDDE, + 0x776C, 0xB2C7, + 0x7779, 0xB6C3, + 0x777D, 0xEEA5, + 0x777E, 0xD8BA, + 0x777F, 0xEEA3, + 0x7780, 0xEEA6, + 0x7784, 0xC3E9, + 0x7785, 0xB3F2, + 0x778C, 0xEEA7, + 0x778D, 0xEEA4, + 0x778E, 0xCFB9, + 0x7791, 0xEEA8, + 0x7792, 0xC2F7, + 0x779F, 0xEEA9, + 0x77A0, 0xEEAA, + 0x77A2, 0xDEAB, + 0x77A5, 0xC6B3, + 0x77A7, 0xC7C6, + 0x77A9, 0xD6F5, + 0x77AA, 0xB5C9, + 0x77AC, 0xCBB2, + 0x77B0, 0xEEAB, + 0x77B3, 0xCDAB, + 0x77B5, 0xEEAC, + 0x77BB, 0xD5B0, + 0x77BD, 0xEEAD, + 0x77BF, 0xF6C4, + 0x77CD, 0xDBC7, + 0x77D7, 0xB4A3, + 0x77DB, 0xC3AC, + 0x77DC, 0xF1E6, + 0x77E2, 0xCAB8, + 0x77E3, 0xD2D3, + 0x77E5, 0xD6AA, + 0x77E7, 0xEFF2, + 0x77E9, 0xBED8, + 0x77EB, 0xBDC3, + 0x77EC, 0xEFF3, + 0x77ED, 0xB6CC, + 0x77EE, 0xB0AB, + 0x77F3, 0xCAAF, + 0x77F6, 0xEDB6, + 0x77F8, 0xEDB7, + 0x77FD, 0xCEF9, + 0x77FE, 0xB7AF, + 0x77FF, 0xBFF3, + 0x7800, 0xEDB8, + 0x7801, 0xC2EB, + 0x7802, 0xC9B0, + 0x7809, 0xEDB9, + 0x780C, 0xC6F6, + 0x780D, 0xBFB3, + 0x7811, 0xEDBC, + 0x7812, 0xC5F8, + 0x7814, 0xD1D0, + 0x7816, 0xD7A9, + 0x7817, 0xEDBA, + 0x7818, 0xEDBB, + 0x781A, 0xD1E2, + 0x781C, 0xEDBF, + 0x781D, 0xEDC0, + 0x781F, 0xEDC4, + 0x7823, 0xEDC8, + 0x7825, 0xEDC6, + 0x7826, 0xEDCE, + 0x7827, 0xD5E8, + 0x7829, 0xEDC9, + 0x782C, 0xEDC7, + 0x782D, 0xEDBE, + 0x7830, 0xC5E9, + 0x7834, 0xC6C6, + 0x7837, 0xC9E9, + 0x7838, 0xD4D2, + 0x7839, 0xEDC1, + 0x783A, 0xEDC2, + 0x783B, 0xEDC3, + 0x783C, 0xEDC5, + 0x783E, 0xC0F9, + 0x7840, 0xB4A1, + 0x7845, 0xB9E8, + 0x7847, 0xEDD0, + 0x784C, 0xEDD1, + 0x784E, 0xEDCA, + 0x7850, 0xEDCF, + 0x7852, 0xCEF8, + 0x7855, 0xCBB6, + 0x7856, 0xEDCC, + 0x7857, 0xEDCD, + 0x785D, 0xCFF5, + 0x786A, 0xEDD2, + 0x786B, 0xC1F2, + 0x786C, 0xD3B2, + 0x786D, 0xEDCB, + 0x786E, 0xC8B7, + 0x7877, 0xBCEF, + 0x787C, 0xC5F0, + 0x7887, 0xEDD6, + 0x7889, 0xB5EF, + 0x788C, 0xC2B5, + 0x788D, 0xB0AD, + 0x788E, 0xCBE9, + 0x7891, 0xB1AE, + 0x7893, 0xEDD4, + 0x7897, 0xCDEB, + 0x7898, 0xB5E2, + 0x789A, 0xEDD5, + 0x789B, 0xEDD3, + 0x789C, 0xEDD7, + 0x789F, 0xB5FA, + 0x78A1, 0xEDD8, + 0x78A3, 0xEDD9, + 0x78A5, 0xEDDC, + 0x78A7, 0xB1CC, + 0x78B0, 0xC5F6, + 0x78B1, 0xBCEE, + 0x78B2, 0xEDDA, + 0x78B3, 0xCCBC, + 0x78B4, 0xB2EA, + 0x78B9, 0xEDDB, + 0x78BE, 0xC4EB, + 0x78C1, 0xB4C5, + 0x78C5, 0xB0F5, + 0x78C9, 0xEDDF, + 0x78CA, 0xC0DA, + 0x78CB, 0xB4E8, + 0x78D0, 0xC5CD, + 0x78D4, 0xEDDD, + 0x78D5, 0xBFC4, + 0x78D9, 0xEDDE, + 0x78E8, 0xC4A5, + 0x78EC, 0xEDE0, + 0x78F2, 0xEDE1, + 0x78F4, 0xEDE3, + 0x78F7, 0xC1D7, + 0x78FA, 0xBBC7, + 0x7901, 0xBDB8, + 0x7905, 0xEDE2, + 0x7913, 0xEDE4, + 0x791E, 0xEDE6, + 0x7924, 0xEDE5, + 0x7934, 0xEDE7, + 0x793A, 0xCABE, + 0x793B, 0xECEA, + 0x793C, 0xC0F1, + 0x793E, 0xC9E7, + 0x7940, 0xECEB, + 0x7941, 0xC6EE, + 0x7946, 0xECEC, + 0x7948, 0xC6ED, + 0x7949, 0xECED, + 0x7953, 0xECF0, + 0x7956, 0xD7E6, + 0x7957, 0xECF3, + 0x795A, 0xECF1, + 0x795B, 0xECEE, + 0x795C, 0xECEF, + 0x795D, 0xD7A3, + 0x795E, 0xC9F1, + 0x795F, 0xCBEE, + 0x7960, 0xECF4, + 0x7962, 0xECF2, + 0x7965, 0xCFE9, + 0x7967, 0xECF6, + 0x7968, 0xC6B1, + 0x796D, 0xBCC0, + 0x796F, 0xECF5, + 0x7977, 0xB5BB, + 0x7978, 0xBBF6, + 0x797A, 0xECF7, + 0x7980, 0xD9F7, + 0x7981, 0xBDFB, + 0x7984, 0xC2BB, + 0x7985, 0xECF8, + 0x798A, 0xECF9, + 0x798F, 0xB8A3, + 0x799A, 0xECFA, + 0x79A7, 0xECFB, + 0x79B3, 0xECFC, + 0x79B9, 0xD3ED, + 0x79BA, 0xD8AE, + 0x79BB, 0xC0EB, + 0x79BD, 0xC7DD, + 0x79BE, 0xBACC, + 0x79C0, 0xD0E3, + 0x79C1, 0xCBBD, + 0x79C3, 0xCDBA, + 0x79C6, 0xB8D1, + 0x79C9, 0xB1FC, + 0x79CB, 0xC7EF, + 0x79CD, 0xD6D6, + 0x79D1, 0xBFC6, + 0x79D2, 0xC3EB, + 0x79D5, 0xEFF5, + 0x79D8, 0xC3D8, + 0x79DF, 0xD7E2, + 0x79E3, 0xEFF7, + 0x79E4, 0xB3D3, + 0x79E6, 0xC7D8, + 0x79E7, 0xD1ED, + 0x79E9, 0xD6C8, + 0x79EB, 0xEFF8, + 0x79ED, 0xEFF6, + 0x79EF, 0xBBFD, + 0x79F0, 0xB3C6, + 0x79F8, 0xBDD5, + 0x79FB, 0xD2C6, + 0x79FD, 0xBBE0, + 0x7A00, 0xCFA1, + 0x7A02, 0xEFFC, + 0x7A03, 0xEFFB, + 0x7A06, 0xEFF9, + 0x7A0B, 0xB3CC, + 0x7A0D, 0xC9D4, + 0x7A0E, 0xCBB0, + 0x7A14, 0xEFFE, + 0x7A17, 0xB0DE, + 0x7A1A, 0xD6C9, + 0x7A1E, 0xEFFD, + 0x7A20, 0xB3ED, + 0x7A23, 0xF6D5, + 0x7A33, 0xCEC8, + 0x7A37, 0xF0A2, + 0x7A39, 0xF0A1, + 0x7A3B, 0xB5BE, + 0x7A3C, 0xBCDA, + 0x7A3D, 0xBBFC, + 0x7A3F, 0xB8E5, + 0x7A46, 0xC4C2, + 0x7A51, 0xF0A3, + 0x7A57, 0xCBEB, + 0x7A70, 0xF0A6, + 0x7A74, 0xD1A8, + 0x7A76, 0xBEBF, + 0x7A77, 0xC7EE, + 0x7A78, 0xF1B6, + 0x7A79, 0xF1B7, + 0x7A7A, 0xBFD5, + 0x7A7F, 0xB4A9, + 0x7A80, 0xF1B8, + 0x7A81, 0xCDBB, + 0x7A83, 0xC7D4, + 0x7A84, 0xD5AD, + 0x7A86, 0xF1B9, + 0x7A88, 0xF1BA, + 0x7A8D, 0xC7CF, + 0x7A91, 0xD2A4, + 0x7A92, 0xD6CF, + 0x7A95, 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0xB1E0, + 0x7F17, 0xE7C5, + 0x7F18, 0xD4B5, + 0x7F19, 0xE7C6, + 0x7F1A, 0xB8BF, + 0x7F1B, 0xE7C8, + 0x7F1C, 0xE7C7, + 0x7F1D, 0xB7EC, + 0x7F1F, 0xE7C9, + 0x7F20, 0xB2F8, + 0x7F21, 0xE7CA, + 0x7F22, 0xE7CB, + 0x7F23, 0xE7CC, + 0x7F24, 0xE7CD, + 0x7F25, 0xE7CE, + 0x7F26, 0xE7CF, + 0x7F27, 0xE7D0, + 0x7F28, 0xD3A7, + 0x7F29, 0xCBF5, + 0x7F2A, 0xE7D1, + 0x7F2B, 0xE7D2, + 0x7F2C, 0xE7D3, + 0x7F2D, 0xE7D4, + 0x7F2E, 0xC9C9, + 0x7F2F, 0xE7D5, + 0x7F30, 0xE7D6, + 0x7F31, 0xE7D7, + 0x7F32, 0xE7D8, + 0x7F33, 0xE7D9, + 0x7F34, 0xBDC9, + 0x7F35, 0xE7DA, + 0x7F36, 0xF3BE, + 0x7F38, 0xB8D7, + 0x7F3A, 0xC8B1, + 0x7F42, 0xF3BF, + 0x7F44, 0xF3C0, + 0x7F45, 0xF3C1, + 0x7F50, 0xB9DE, + 0x7F51, 0xCDF8, + 0x7F54, 0xD8E8, + 0x7F55, 0xBAB1, + 0x7F57, 0xC2DE, + 0x7F58, 0xEEB7, + 0x7F5A, 0xB7A3, + 0x7F5F, 0xEEB9, + 0x7F61, 0xEEB8, + 0x7F62, 0xB0D5, + 0x7F68, 0xEEBB, + 0x7F69, 0xD5D6, + 0x7F6A, 0xD7EF, + 0x7F6E, 0xD6C3, + 0x7F71, 0xEEBD, + 0x7F72, 0xCAF0, + 0x7F74, 0xEEBC, + 0x7F79, 0xEEBE, + 0x7F7E, 0xEEC0, + 0x7F81, 0xEEBF, + 0x7F8A, 0xD1F2, + 0x7F8C, 0xC7BC, + 0x7F8E, 0xC3C0, + 0x7F94, 0xB8E1, + 0x7F9A, 0xC1E7, + 0x7F9D, 0xF4C6, + 0x7F9E, 0xD0DF, + 0x7F9F, 0xF4C7, + 0x7FA1, 0xCFDB, + 0x7FA4, 0xC8BA, + 0x7FA7, 0xF4C8, + 0x7FAF, 0xF4C9, + 0x7FB0, 0xF4CA, + 0x7FB2, 0xF4CB, + 0x7FB8, 0xD9FA, + 0x7FB9, 0xB8FE, + 0x7FBC, 0xE5F1, + 0x7FBD, 0xD3F0, + 0x7FBF, 0xF4E0, + 0x7FC1, 0xCECC, + 0x7FC5, 0xB3E1, + 0x7FCA, 0xF1B4, + 0x7FCC, 0xD2EE, + 0x7FCE, 0xF4E1, + 0x7FD4, 0xCFE8, + 0x7FD5, 0xF4E2, + 0x7FD8, 0xC7CC, + 0x7FDF, 0xB5D4, + 0x7FE0, 0xB4E4, + 0x7FE1, 0xF4E4, + 0x7FE5, 0xF4E3, + 0x7FE6, 0xF4E5, + 0x7FE9, 0xF4E6, + 0x7FEE, 0xF4E7, + 0x7FF0, 0xBAB2, + 0x7FF1, 0xB0BF, + 0x7FF3, 0xF4E8, + 0x7FFB, 0xB7AD, + 0x7FFC, 0xD2ED, + 0x8000, 0xD2AB, + 0x8001, 0xC0CF, + 0x8003, 0xBFBC, + 0x8004, 0xEBA3, + 0x8005, 0xD5DF, + 0x8006, 0xEAC8, + 0x800B, 0xF1F3, + 0x800C, 0xB6F8, + 0x800D, 0xCBA3, + 0x8010, 0xC4CD, + 0x8012, 0xF1E7, + 0x8014, 0xF1E8, + 0x8015, 0xB8FB, + 0x8016, 0xF1E9, + 0x8017, 0xBAC4, + 0x8018, 0xD4C5, + 0x8019, 0xB0D2, + 0x801C, 0xF1EA, + 0x8020, 0xF1EB, + 0x8022, 0xF1EC, + 0x8025, 0xF1ED, + 0x8026, 0xF1EE, + 0x8027, 0xF1EF, + 0x8028, 0xF1F1, + 0x8029, 0xF1F0, + 0x802A, 0xC5D5, + 0x8031, 0xF1F2, + 0x8033, 0xB6FA, + 0x8035, 0xF1F4, + 0x8036, 0xD2AE, + 0x8037, 0xDEC7, + 0x8038, 0xCBCA, + 0x803B, 0xB3DC, + 0x803D, 0xB5A2, + 0x803F, 0xB9A2, + 0x8042, 0xC4F4, + 0x8043, 0xF1F5, + 0x8046, 0xF1F6, + 0x804A, 0xC1C4, + 0x804B, 0xC1FB, + 0x804C, 0xD6B0, + 0x804D, 0xF1F7, + 0x8052, 0xF1F8, + 0x8054, 0xC1AA, + 0x8058, 0xC6B8, + 0x805A, 0xBEDB, + 0x8069, 0xF1F9, + 0x806A, 0xB4CF, + 0x8071, 0xF1FA, + 0x807F, 0xEDB2, + 0x8080, 0xEDB1, + 0x8083, 0xCBE0, + 0x8084, 0xD2DE, + 0x8086, 0xCBC1, + 0x8087, 0xD5D8, + 0x8089, 0xC8E2, + 0x808B, 0xC0DF, + 0x808C, 0xBCA1, + 0x8093, 0xEBC1, + 0x8096, 0xD0A4, + 0x8098, 0xD6E2, + 0x809A, 0xB6C7, + 0x809B, 0xB8D8, + 0x809C, 0xEBC0, + 0x809D, 0xB8CE, + 0x809F, 0xEBBF, + 0x80A0, 0xB3A6, + 0x80A1, 0xB9C9, + 0x80A2, 0xD6AB, + 0x80A4, 0xB7F4, + 0x80A5, 0xB7CA, + 0x80A9, 0xBCE7, + 0x80AA, 0xB7BE, + 0x80AB, 0xEBC6, + 0x80AD, 0xEBC7, + 0x80AE, 0xB0B9, + 0x80AF, 0xBFCF, + 0x80B1, 0xEBC5, + 0x80B2, 0xD3FD, + 0x80B4, 0xEBC8, + 0x80B7, 0xEBC9, + 0x80BA, 0xB7CE, + 0x80BC, 0xEBC2, + 0x80BD, 0xEBC4, + 0x80BE, 0xC9F6, + 0x80BF, 0xD6D7, + 0x80C0, 0xD5CD, + 0x80C1, 0xD0B2, + 0x80C2, 0xEBCF, + 0x80C3, 0xCEB8, + 0x80C4, 0xEBD0, + 0x80C6, 0xB5A8, + 0x80CC, 0xB1B3, + 0x80CD, 0xEBD2, + 0x80CE, 0xCCA5, + 0x80D6, 0xC5D6, + 0x80D7, 0xEBD3, + 0x80D9, 0xEBD1, + 0x80DA, 0xC5DF, + 0x80DB, 0xEBCE, + 0x80DC, 0xCAA4, + 0x80DD, 0xEBD5, + 0x80DE, 0xB0FB, + 0x80E1, 0xBAFA, + 0x80E4, 0xD8B7, + 0x80E5, 0xF1E3, + 0x80E7, 0xEBCA, + 0x80E8, 0xEBCB, + 0x80E9, 0xEBCC, + 0x80EA, 0xEBCD, + 0x80EB, 0xEBD6, + 0x80EC, 0xE6C0, + 0x80ED, 0xEBD9, + 0x80EF, 0xBFE8, + 0x80F0, 0xD2C8, + 0x80F1, 0xEBD7, + 0x80F2, 0xEBDC, + 0x80F3, 0xB8EC, + 0x80F4, 0xEBD8, + 0x80F6, 0xBDBA, + 0x80F8, 0xD0D8, + 0x80FA, 0xB0B7, + 0x80FC, 0xEBDD, + 0x80FD, 0xC4DC, + 0x8102, 0xD6AC, + 0x8106, 0xB4E0, + 0x8109, 0xC2F6, + 0x810A, 0xBCB9, + 0x810D, 0xEBDA, + 0x810E, 0xEBDB, + 0x810F, 0xD4E0, + 0x8110, 0xC6EA, + 0x8111, 0xC4D4, + 0x8112, 0xEBDF, + 0x8113, 0xC5A7, + 0x8114, 0xD9F5, + 0x8116, 0xB2B1, + 0x8118, 0xEBE4, + 0x811A, 0xBDC5, + 0x811E, 0xEBE2, + 0x812C, 0xEBE3, + 0x812F, 0xB8AC, + 0x8131, 0xCDD1, + 0x8132, 0xEBE5, + 0x8136, 0xEBE1, + 0x8138, 0xC1B3, + 0x813E, 0xC6A2, + 0x8146, 0xCCF3, + 0x8148, 0xEBE6, + 0x814A, 0xC0B0, + 0x814B, 0xD2B8, + 0x814C, 0xEBE7, + 0x8150, 0xB8AF, + 0x8151, 0xB8AD, + 0x8153, 0xEBE8, + 0x8154, 0xC7BB, + 0x8155, 0xCDF3, + 0x8159, 0xEBEA, + 0x815A, 0xEBEB, + 0x8160, 0xEBED, + 0x8165, 0xD0C8, + 0x8167, 0xEBF2, + 0x8169, 0xEBEE, + 0x816D, 0xEBF1, + 0x816E, 0xC8F9, + 0x8170, 0xD1FC, + 0x8171, 0xEBEC, + 0x8174, 0xEBE9, + 0x8179, 0xB8B9, + 0x817A, 0xCFD9, + 0x817B, 0xC4E5, + 0x817C, 0xEBEF, + 0x817D, 0xEBF0, + 0x817E, 0xCCDA, + 0x817F, 0xCDC8, + 0x8180, 0xB0F2, + 0x8182, 0xEBF6, + 0x8188, 0xEBF5, + 0x818A, 0xB2B2, + 0x818F, 0xB8E0, + 0x8191, 0xEBF7, + 0x8198, 0xB1EC, + 0x819B, 0xCCC5, + 0x819C, 0xC4A4, + 0x819D, 0xCFA5, + 0x81A3, 0xEBF9, + 0x81A6, 0xECA2, + 0x81A8, 0xC5F2, + 0x81AA, 0xEBFA, + 0x81B3, 0xC9C5, + 0x81BA, 0xE2DF, + 0x81BB, 0xEBFE, + 0x81C0, 0xCDCE, + 0x81C1, 0xECA1, + 0x81C2, 0xB1DB, + 0x81C3, 0xD3B7, + 0x81C6, 0xD2DC, + 0x81CA, 0xEBFD, + 0x81CC, 0xEBFB, + 0x81E3, 0xB3BC, + 0x81E7, 0xEAB0, + 0x81EA, 0xD7D4, + 0x81EC, 0xF4AB, + 0x81ED, 0xB3F4, + 0x81F3, 0xD6C1, + 0x81F4, 0xD6C2, + 0x81FB, 0xD5E9, + 0x81FC, 0xBECA, + 0x81FE, 0xF4A7, + 0x8200, 0xD2A8, + 0x8201, 0xF4A8, + 0x8202, 0xF4A9, + 0x8204, 0xF4AA, + 0x8205, 0xBECB, + 0x8206, 0xD3DF, + 0x820C, 0xC9E0, + 0x820D, 0xC9E1, + 0x8210, 0xF3C2, + 0x8212, 0xCAE6, + 0x8214, 0xCCF2, + 0x821B, 0xE2B6, + 0x821C, 0xCBB4, + 0x821E, 0xCEE8, + 0x821F, 0xD6DB, + 0x8221, 0xF4AD, + 0x8222, 0xF4AE, + 0x8223, 0xF4AF, + 0x8228, 0xF4B2, + 0x822A, 0xBABD, + 0x822B, 0xF4B3, + 0x822C, 0xB0E3, + 0x822D, 0xF4B0, + 0x822F, 0xF4B1, + 0x8230, 0xBDA2, + 0x8231, 0xB2D5, + 0x8233, 0xF4B6, + 0x8234, 0xF4B7, + 0x8235, 0xB6E6, + 0x8236, 0xB2B0, + 0x8237, 0xCFCF, + 0x8238, 0xF4B4, + 0x8239, 0xB4AC, + 0x823B, 0xF4B5, + 0x823E, 0xF4B8, + 0x8244, 0xF4B9, + 0x8247, 0xCDA7, + 0x8249, 0xF4BA, + 0x824B, 0xF4BB, + 0x824F, 0xF4BC, + 0x8258, 0xCBD2, + 0x825A, 0xF4BD, + 0x825F, 0xF4BE, + 0x8268, 0xF4BF, + 0x826E, 0xF4DE, + 0x826F, 0xC1BC, + 0x8270, 0xBCE8, + 0x8272, 0xC9AB, + 0x8273, 0xD1DE, + 0x8274, 0xE5F5, + 0x8279, 0xDCB3, + 0x827A, 0xD2D5, + 0x827D, 0xDCB4, + 0x827E, 0xB0AC, + 0x827F, 0xDCB5, + 0x8282, 0xBDDA, + 0x8284, 0xDCB9, + 0x8288, 0xD8C2, + 0x828A, 0xDCB7, + 0x828B, 0xD3F3, + 0x828D, 0xC9D6, + 0x828E, 0xDCBA, + 0x828F, 0xDCB6, + 0x8291, 0xDCBB, + 0x8292, 0xC3A2, + 0x8297, 0xDCBC, + 0x8298, 0xDCC5, + 0x8299, 0xDCBD, + 0x829C, 0xCEDF, + 0x829D, 0xD6A5, + 0x829F, 0xDCCF, + 0x82A1, 0xDCCD, + 0x82A4, 0xDCD2, + 0x82A5, 0xBDE6, + 0x82A6, 0xC2AB, + 0x82A8, 0xDCB8, + 0x82A9, 0xDCCB, + 0x82AA, 0xDCCE, + 0x82AB, 0xDCBE, + 0x82AC, 0xB7D2, + 0x82AD, 0xB0C5, + 0x82AE, 0xDCC7, + 0x82AF, 0xD0BE, + 0x82B0, 0xDCC1, + 0x82B1, 0xBBA8, + 0x82B3, 0xB7BC, + 0x82B4, 0xDCCC, + 0x82B7, 0xDCC6, + 0x82B8, 0xDCBF, + 0x82B9, 0xC7DB, + 0x82BD, 0xD1BF, + 0x82BE, 0xDCC0, + 0x82C1, 0xDCCA, + 0x82C4, 0xDCD0, + 0x82C7, 0xCEAD, + 0x82C8, 0xDCC2, + 0x82CA, 0xDCC3, + 0x82CB, 0xDCC8, + 0x82CC, 0xDCC9, + 0x82CD, 0xB2D4, + 0x82CE, 0xDCD1, + 0x82CF, 0xCBD5, + 0x82D1, 0xD4B7, + 0x82D2, 0xDCDB, + 0x82D3, 0xDCDF, + 0x82D4, 0xCCA6, + 0x82D5, 0xDCE6, + 0x82D7, 0xC3E7, + 0x82D8, 0xDCDC, + 0x82DB, 0xBFC1, + 0x82DC, 0xDCD9, + 0x82DE, 0xB0FA, + 0x82DF, 0xB9B6, + 0x82E0, 0xDCE5, + 0x82E1, 0xDCD3, + 0x82E3, 0xDCC4, + 0x82E4, 0xDCD6, + 0x82E5, 0xC8F4, + 0x82E6, 0xBFE0, + 0x82EB, 0xC9BB, + 0x82EF, 0xB1BD, + 0x82F1, 0xD3A2, + 0x82F4, 0xDCDA, + 0x82F7, 0xDCD5, + 0x82F9, 0xC6BB, + 0x82FB, 0xDCDE, + 0x8301, 0xD7C2, + 0x8302, 0xC3AF, + 0x8303, 0xB7B6, + 0x8304, 0xC7D1, + 0x8305, 0xC3A9, + 0x8306, 0xDCE2, + 0x8307, 0xDCD8, + 0x8308, 0xDCEB, + 0x8309, 0xDCD4, + 0x830C, 0xDCDD, + 0x830E, 0xBEA5, + 0x830F, 0xDCD7, + 0x8311, 0xDCE0, + 0x8314, 0xDCE3, + 0x8315, 0xDCE4, + 0x8317, 0xDCF8, + 0x831A, 0xDCE1, + 0x831B, 0xDDA2, + 0x831C, 0xDCE7, + 0x8327, 0xBCEB, + 0x8328, 0xB4C4, + 0x832B, 0xC3A3, + 0x832C, 0xB2E7, + 0x832D, 0xDCFA, + 0x832F, 0xDCF2, + 0x8331, 0xDCEF, + 0x8333, 0xDCFC, + 0x8334, 0xDCEE, + 0x8335, 0xD2F0, + 0x8336, 0xB2E8, + 0x8338, 0xC8D7, + 0x8339, 0xC8E3, + 0x833A, 0xDCFB, + 0x833C, 0xDCED, + 0x8340, 0xDCF7, + 0x8343, 0xDCF5, + 0x8346, 0xBEA3, + 0x8347, 0xDCF4, + 0x8349, 0xB2DD, + 0x834F, 0xDCF3, + 0x8350, 0xBCF6, + 0x8351, 0xDCE8, + 0x8352, 0xBBC4, + 0x8354, 0xC0F3, + 0x835A, 0xBCD4, + 0x835B, 0xDCE9, + 0x835C, 0xDCEA, + 0x835E, 0xDCF1, + 0x835F, 0xDCF6, + 0x8360, 0xDCF9, + 0x8361, 0xB5B4, + 0x8363, 0xC8D9, + 0x8364, 0xBBE7, + 0x8365, 0xDCFE, + 0x8366, 0xDCFD, + 0x8367, 0xD3AB, + 0x8368, 0xDDA1, + 0x8369, 0xDDA3, + 0x836A, 0xDDA5, + 0x836B, 0xD2F1, + 0x836C, 0xDDA4, + 0x836D, 0xDDA6, + 0x836E, 0xDDA7, + 0x836F, 0xD2A9, + 0x8377, 0xBAC9, + 0x8378, 0xDDA9, + 0x837B, 0xDDB6, + 0x837C, 0xDDB1, + 0x837D, 0xDDB4, + 0x8385, 0xDDB0, + 0x8386, 0xC6CE, + 0x8389, 0xC0F2, + 0x838E, 0xC9AF, + 0x8392, 0xDCEC, + 0x8393, 0xDDAE, + 0x8398, 0xDDB7, + 0x839B, 0xDCF0, + 0x839C, 0xDDAF, + 0x839E, 0xDDB8, + 0x83A0, 0xDDAC, + 0x83A8, 0xDDB9, + 0x83A9, 0xDDB3, + 0x83AA, 0xDDAD, + 0x83AB, 0xC4AA, + 0x83B0, 0xDDA8, + 0x83B1, 0xC0B3, + 0x83B2, 0xC1AB, + 0x83B3, 0xDDAA, + 0x83B4, 0xDDAB, + 0x83B6, 0xDDB2, + 0x83B7, 0xBBF1, + 0x83B8, 0xDDB5, + 0x83B9, 0xD3A8, + 0x83BA, 0xDDBA, + 0x83BC, 0xDDBB, + 0x83BD, 0xC3A7, + 0x83C0, 0xDDD2, + 0x83C1, 0xDDBC, + 0x83C5, 0xDDD1, + 0x83C7, 0xB9BD, + 0x83CA, 0xBED5, + 0x83CC, 0xBEFA, + 0x83CF, 0xBACA, + 0x83D4, 0xDDCA, + 0x83D6, 0xDDC5, + 0x83D8, 0xDDBF, + 0x83DC, 0xB2CB, + 0x83DD, 0xDDC3, + 0x83DF, 0xDDCB, + 0x83E0, 0xB2A4, + 0x83E1, 0xDDD5, + 0x83E5, 0xDDBE, + 0x83E9, 0xC6D0, + 0x83EA, 0xDDD0, + 0x83F0, 0xDDD4, + 0x83F1, 0xC1E2, + 0x83F2, 0xB7C6, + 0x83F8, 0xDDCE, + 0x83F9, 0xDDCF, + 0x83FD, 0xDDC4, + 0x8401, 0xDDBD, + 0x8403, 0xDDCD, + 0x8404, 0xCCD1, + 0x8406, 0xDDC9, + 0x840B, 0xDDC2, + 0x840C, 0xC3C8, + 0x840D, 0xC6BC, + 0x840E, 0xCEAE, + 0x840F, 0xDDCC, + 0x8411, 0xDDC8, + 0x8418, 0xDDC1, + 0x841C, 0xDDC6, + 0x841D, 0xC2DC, + 0x8424, 0xD3A9, + 0x8425, 0xD3AA, + 0x8426, 0xDDD3, + 0x8427, 0xCFF4, + 0x8428, 0xC8F8, + 0x8431, 0xDDE6, + 0x8438, 0xDDC7, + 0x843C, 0xDDE0, + 0x843D, 0xC2E4, + 0x8446, 0xDDE1, + 0x8451, 0xDDD7, + 0x8457, 0xD6F8, + 0x8459, 0xDDD9, + 0x845A, 0xDDD8, + 0x845B, 0xB8F0, + 0x845C, 0xDDD6, + 0x8461, 0xC6CF, + 0x8463, 0xB6AD, + 0x8469, 0xDDE2, + 0x846B, 0xBAF9, + 0x846C, 0xD4E1, + 0x846D, 0xDDE7, + 0x8471, 0xB4D0, + 0x8473, 0xDDDA, + 0x8475, 0xBFFB, + 0x8476, 0xDDE3, + 0x8478, 0xDDDF, + 0x847A, 0xDDDD, + 0x8482, 0xB5D9, + 0x8487, 0xDDDB, + 0x8488, 0xDDDC, + 0x8489, 0xDDDE, + 0x848B, 0xBDAF, + 0x848C, 0xDDE4, + 0x848E, 0xDDE5, + 0x8497, 0xDDF5, + 0x8499, 0xC3C9, + 0x849C, 0xCBE2, + 0x84A1, 0xDDF2, + 0x84AF, 0xD8E1, + 0x84B2, 0xC6D1, + 0x84B4, 0xDDF4, + 0x84B8, 0xD5F4, + 0x84B9, 0xDDF3, + 0x84BA, 0xDDF0, + 0x84BD, 0xDDEC, + 0x84BF, 0xDDEF, + 0x84C1, 0xDDE8, + 0x84C4, 0xD0EE, + 0x84C9, 0xC8D8, + 0x84CA, 0xDDEE, + 0x84CD, 0xDDE9, + 0x84D0, 0xDDEA, + 0x84D1, 0xCBF2, + 0x84D3, 0xDDED, + 0x84D6, 0xB1CD, + 0x84DD, 0xC0B6, + 0x84DF, 0xBCBB, + 0x84E0, 0xDDF1, + 0x84E3, 0xDDF7, + 0x84E5, 0xDDF6, + 0x84E6, 0xDDEB, + 0x84EC, 0xC5EE, + 0x84F0, 0xDDFB, + 0x84FC, 0xDEA4, + 0x84FF, 0xDEA3, + 0x850C, 0xDDF8, + 0x8511, 0xC3EF, + 0x8513, 0xC2FB, + 0x8517, 0xD5E1, + 0x851A, 0xCEB5, + 0x851F, 0xDDFD, + 0x8521, 0xB2CC, + 0x852B, 0xC4E8, + 0x852C, 0xCADF, + 0x8537, 0xC7BE, + 0x8538, 0xDDFA, + 0x8539, 0xDDFC, + 0x853A, 0xDDFE, + 0x853B, 0xDEA2, + 0x853C, 0xB0AA, + 0x853D, 0xB1CE, + 0x8543, 0xDEAC, + 0x8548, 0xDEA6, + 0x8549, 0xBDB6, + 0x854A, 0xC8EF, + 0x8556, 0xDEA1, + 0x8559, 0xDEA5, + 0x855E, 0xDEA9, + 0x8564, 0xDEA8, + 0x8568, 0xDEA7, + 0x8572, 0xDEAD, + 0x8574, 0xD4CC, + 0x8579, 0xDEB3, + 0x857A, 0xDEAA, + 0x857B, 0xDEAE, + 0x857E, 0xC0D9, + 0x8584, 0xB1A1, + 0x8585, 0xDEB6, + 0x8587, 0xDEB1, + 0x858F, 0xDEB2, + 0x859B, 0xD1A6, + 0x859C, 0xDEB5, + 0x85A4, 0xDEAF, + 0x85A8, 0xDEB0, + 0x85AA, 0xD0BD, + 0x85AE, 0xDEB4, + 0x85AF, 0xCAED, + 0x85B0, 0xDEB9, + 0x85B7, 0xDEB8, + 0x85B9, 0xDEB7, + 0x85C1, 0xDEBB, + 0x85C9, 0xBDE5, + 0x85CF, 0xB2D8, + 0x85D0, 0xC3EA, + 0x85D3, 0xDEBA, + 0x85D5, 0xC5BA, + 0x85DC, 0xDEBC, + 0x85E4, 0xCCD9, + 0x85E9, 0xB7AA, + 0x85FB, 0xD4E5, + 0x85FF, 0xDEBD, + 0x8605, 0xDEBF, + 0x8611, 0xC4A2, + 0x8616, 0xDEC1, + 0x8627, 0xDEBE, + 0x8629, 0xDEC0, + 0x8638, 0xD5BA, + 0x863C, 0xDEC2, + 0x864D, 0xF2AE, + 0x864E, 0xBBA2, + 0x864F, 0xC2B2, + 0x8650, 0xC5B0, + 0x8651, 0xC2C7, + 0x8654, 0xF2AF, + 0x865A, 0xD0E9, + 0x865E, 0xD3DD, + 0x8662, 0xEBBD, + 0x866B, 0xB3E6, + 0x866C, 0xF2B0, + 0x866E, 0xF2B1, + 0x8671, 0xCAAD, + 0x8679, 0xBAE7, + 0x867A, 0xF2B3, + 0x867B, 0xF2B5, + 0x867C, 0xF2B4, + 0x867D, 0xCBE4, + 0x867E, 0xCFBA, + 0x867F, 0xF2B2, + 0x8680, 0xCAB4, + 0x8681, 0xD2CF, + 0x8682, 0xC2EC, + 0x868A, 0xCEC3, + 0x868B, 0xF2B8, + 0x868C, 0xB0F6, + 0x868D, 0xF2B7, + 0x8693, 0xF2BE, + 0x8695, 0xB2CF, + 0x869C, 0xD1C1, + 0x869D, 0xF2BA, + 0x86A3, 0xF2BC, + 0x86A4, 0xD4E9, + 0x86A7, 0xF2BB, + 0x86A8, 0xF2B6, + 0x86A9, 0xF2BF, + 0x86AA, 0xF2BD, + 0x86AC, 0xF2B9, + 0x86AF, 0xF2C7, + 0x86B0, 0xF2C4, + 0x86B1, 0xF2C6, + 0x86B4, 0xF2CA, + 0x86B5, 0xF2C2, + 0x86B6, 0xF2C0, + 0x86BA, 0xF2C5, + 0x86C0, 0xD6FB, + 0x86C4, 0xF2C1, + 0x86C6, 0xC7F9, + 0x86C7, 0xC9DF, + 0x86C9, 0xF2C8, + 0x86CA, 0xB9C6, + 0x86CB, 0xB5B0, + 0x86CE, 0xF2C3, + 0x86CF, 0xF2C9, + 0x86D0, 0xF2D0, + 0x86D1, 0xF2D6, + 0x86D4, 0xBBD7, + 0x86D8, 0xF2D5, + 0x86D9, 0xCDDC, + 0x86DB, 0xD6EB, + 0x86DE, 0xF2D2, + 0x86DF, 0xF2D4, + 0x86E4, 0xB8F2, + 0x86E9, 0xF2CB, + 0x86ED, 0xF2CE, + 0x86EE, 0xC2F9, + 0x86F0, 0xD5DD, + 0x86F1, 0xF2CC, + 0x86F2, 0xF2CD, + 0x86F3, 0xF2CF, + 0x86F4, 0xF2D3, + 0x86F8, 0xF2D9, + 0x86F9, 0xD3BC, + 0x86FE, 0xB6EA, + 0x8700, 0xCAF1, + 0x8702, 0xB7E4, + 0x8703, 0xF2D7, + 0x8707, 0xF2D8, + 0x8708, 0xF2DA, + 0x8709, 0xF2DD, + 0x870A, 0xF2DB, + 0x870D, 0xF2DC, + 0x8712, 0xD1D1, + 0x8713, 0xF2D1, + 0x8715, 0xCDC9, + 0x8717, 0xCECF, + 0x8718, 0xD6A9, + 0x871A, 0xF2E3, + 0x871C, 0xC3DB, + 0x871E, 0xF2E0, + 0x8721, 0xC0AF, + 0x8722, 0xF2EC, + 0x8723, 0xF2DE, + 0x8725, 0xF2E1, + 0x8729, 0xF2E8, + 0x872E, 0xF2E2, + 0x8731, 0xF2E7, + 0x8734, 0xF2E6, + 0x8737, 0xF2E9, + 0x873B, 0xF2DF, + 0x873E, 0xF2E4, + 0x873F, 0xF2EA, + 0x8747, 0xD3AC, + 0x8748, 0xF2E5, + 0x8749, 0xB2F5, + 0x874C, 0xF2F2, + 0x874E, 0xD0AB, + 0x8753, 0xF2F5, + 0x8757, 0xBBC8, + 0x8759, 0xF2F9, + 0x8760, 0xF2F0, + 0x8763, 0xF2F6, + 0x8764, 0xF2F8, + 0x8765, 0xF2FA, + 0x876E, 0xF2F3, + 0x8770, 0xF2F1, + 0x8774, 0xBAFB, + 0x8776, 0xB5FB, + 0x877B, 0xF2EF, + 0x877C, 0xF2F7, + 0x877D, 0xF2ED, + 0x877E, 0xF2EE, + 0x8782, 0xF2EB, + 0x8783, 0xF3A6, + 0x8785, 0xF3A3, + 0x8788, 0xF3A2, + 0x878B, 0xF2F4, + 0x878D, 0xC8DA, + 0x8793, 0xF2FB, + 0x8797, 0xF3A5, + 0x879F, 0xC3F8, + 0x87A8, 0xF2FD, + 0x87AB, 0xF3A7, + 0x87AC, 0xF3A9, + 0x87AD, 0xF3A4, + 0x87AF, 0xF2FC, + 0x87B3, 0xF3AB, + 0x87B5, 0xF3AA, + 0x87BA, 0xC2DD, + 0x87BD, 0xF3AE, + 0x87C0, 0xF3B0, + 0x87C6, 0xF3A1, + 0x87CA, 0xF3B1, + 0x87CB, 0xF3AC, + 0x87D1, 0xF3AF, + 0x87D2, 0xF2FE, + 0x87D3, 0xF3AD, + 0x87DB, 0xF3B2, + 0x87E0, 0xF3B4, + 0x87E5, 0xF3A8, + 0x87EA, 0xF3B3, + 0x87EE, 0xF3B5, + 0x87F9, 0xD0B7, + 0x87FE, 0xF3B8, + 0x8803, 0xD9F9, + 0x880A, 0xF3B9, + 0x8813, 0xF3B7, + 0x8815, 0xC8E4, + 0x8816, 0xF3B6, + 0x881B, 0xF3BA, + 0x8821, 0xF3BB, + 0x8822, 0xB4C0, + 0x8832, 0xEEC3, + 0x8839, 0xF3BC, + 0x883C, 0xF3BD, + 0x8840, 0xD1AA, + 0x8844, 0xF4AC, + 0x8845, 0xD0C6, + 0x884C, 0xD0D0, + 0x884D, 0xD1DC, + 0x8854, 0xCFCE, + 0x8857, 0xBDD6, + 0x8859, 0xD1C3, + 0x8861, 0xBAE2, + 0x8862, 0xE1E9, + 0x8863, 0xD2C2, + 0x8864, 0xF1C2, + 0x8865, 0xB2B9, + 0x8868, 0xB1ED, + 0x8869, 0xF1C3, + 0x886B, 0xC9C0, + 0x886C, 0xB3C4, + 0x886E, 0xD9F2, + 0x8870, 0xCBA5, + 0x8872, 0xF1C4, + 0x8877, 0xD6D4, + 0x887D, 0xF1C5, + 0x887E, 0xF4C0, + 0x887F, 0xF1C6, + 0x8881, 0xD4AC, + 0x8882, 0xF1C7, + 0x8884, 0xB0C0, + 0x8885, 0xF4C1, + 0x8888, 0xF4C2, + 0x888B, 0xB4FC, + 0x888D, 0xC5DB, + 0x8892, 0xCCBB, + 0x8896, 0xD0E4, + 0x889C, 0xCDE0, + 0x88A2, 0xF1C8, + 0x88A4, 0xD9F3, + 0x88AB, 0xB1BB, + 0x88AD, 0xCFAE, + 0x88B1, 0xB8A4, + 0x88B7, 0xF1CA, + 0x88BC, 0xF1CB, + 0x88C1, 0xB2C3, + 0x88C2, 0xC1D1, + 0x88C5, 0xD7B0, + 0x88C6, 0xF1C9, + 0x88C9, 0xF1CC, + 0x88CE, 0xF1CE, + 0x88D2, 0xD9F6, + 0x88D4, 0xD2E1, + 0x88D5, 0xD4A3, + 0x88D8, 0xF4C3, + 0x88D9, 0xC8B9, + 0x88DF, 0xF4C4, + 0x88E2, 0xF1CD, + 0x88E3, 0xF1CF, + 0x88E4, 0xBFE3, + 0x88E5, 0xF1D0, + 0x88E8, 0xF1D4, + 0x88F0, 0xF1D6, + 0x88F1, 0xF1D1, + 0x88F3, 0xC9D1, + 0x88F4, 0xC5E1, + 0x88F8, 0xC2E3, + 0x88F9, 0xB9FC, + 0x88FC, 0xF1D3, + 0x88FE, 0xF1D5, + 0x8902, 0xB9D3, + 0x890A, 0xF1DB, + 0x8910, 0xBAD6, + 0x8912, 0xB0FD, + 0x8913, 0xF1D9, + 0x8919, 0xF1D8, + 0x891A, 0xF1D2, + 0x891B, 0xF1DA, + 0x8921, 0xF1D7, + 0x8925, 0xC8EC, + 0x892A, 0xCDCA, + 0x892B, 0xF1DD, + 0x8930, 0xE5BD, + 0x8934, 0xF1DC, + 0x8936, 0xF1DE, + 0x8941, 0xF1DF, + 0x8944, 0xCFE5, + 0x895E, 0xF4C5, + 0x895F, 0xBDF3, + 0x8966, 0xF1E0, + 0x897B, 0xF1E1, + 0x897F, 0xCEF7, + 0x8981, 0xD2AA, + 0x8983, 0xF1FB, + 0x8986, 0xB8B2, + 0x89C1, 0xBCFB, + 0x89C2, 0xB9DB, + 0x89C4, 0xB9E6, + 0x89C5, 0xC3D9, + 0x89C6, 0xCAD3, + 0x89C7, 0xEAE8, + 0x89C8, 0xC0C0, + 0x89C9, 0xBEF5, + 0x89CA, 0xEAE9, + 0x89CB, 0xEAEA, + 0x89CC, 0xEAEB, + 0x89CE, 0xEAEC, + 0x89CF, 0xEAED, + 0x89D0, 0xEAEE, + 0x89D1, 0xEAEF, + 0x89D2, 0xBDC7, + 0x89D6, 0xF5FB, + 0x89DA, 0xF5FD, + 0x89DC, 0xF5FE, + 0x89DE, 0xF5FC, + 0x89E3, 0xBDE2, + 0x89E5, 0xF6A1, + 0x89E6, 0xB4A5, + 0x89EB, 0xF6A2, + 0x89EF, 0xF6A3, + 0x89F3, 0xECB2, + 0x8A00, 0xD1D4, + 0x8A07, 0xD9EA, + 0x8A3E, 0xF6A4, + 0x8A48, 0xEEBA, + 0x8A79, 0xD5B2, + 0x8A89, 0xD3FE, + 0x8A8A, 0xCCDC, + 0x8A93, 0xCAC4, + 0x8B07, 0xE5C0, + 0x8B26, 0xF6A5, + 0x8B66, 0xBEAF, + 0x8B6C, 0xC6A9, + 0x8BA0, 0xDAA5, + 0x8BA1, 0xBCC6, + 0x8BA2, 0xB6A9, + 0x8BA3, 0xB8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0xC7AB, + 0x8C27, 0xDAD7, + 0x8C28, 0xBDF7, + 0x8C29, 0xC3A1, + 0x8C2A, 0xDAD8, + 0x8C2B, 0xDAD9, + 0x8C2C, 0xC3FD, + 0x8C2D, 0xCCB7, + 0x8C2E, 0xDADA, + 0x8C2F, 0xDADB, + 0x8C30, 0xC0BE, + 0x8C31, 0xC6D7, + 0x8C32, 0xDADC, + 0x8C33, 0xDADD, + 0x8C34, 0xC7B4, + 0x8C35, 0xDADE, + 0x8C36, 0xDADF, + 0x8C37, 0xB9C8, + 0x8C41, 0xBBED, + 0x8C46, 0xB6B9, + 0x8C47, 0xF4F8, + 0x8C49, 0xF4F9, + 0x8C4C, 0xCDE3, + 0x8C55, 0xF5B9, + 0x8C5A, 0xEBE0, + 0x8C61, 0xCFF3, + 0x8C62, 0xBBBF, + 0x8C6A, 0xBAC0, + 0x8C6B, 0xD4A5, + 0x8C73, 0xE1D9, + 0x8C78, 0xF5F4, + 0x8C79, 0xB1AA, + 0x8C7A, 0xB2F2, + 0x8C82, 0xF5F5, + 0x8C85, 0xF5F7, + 0x8C89, 0xBAD1, + 0x8C8A, 0xF5F6, + 0x8C8C, 0xC3B2, + 0x8C94, 0xF5F9, + 0x8C98, 0xF5F8, + 0x8D1D, 0xB1B4, + 0x8D1E, 0xD5EA, + 0x8D1F, 0xB8BA, + 0x8D21, 0xB9B1, + 0x8D22, 0xB2C6, + 0x8D23, 0xD4F0, + 0x8D24, 0xCFCD, + 0x8D25, 0xB0DC, + 0x8D26, 0xD5CB, + 0x8D27, 0xBBF5, + 0x8D28, 0xD6CA, + 0x8D29, 0xB7B7, + 0x8D2A, 0xCCB0, + 0x8D2B, 0xC6B6, + 0x8D2C, 0xB1E1, + 0x8D2D, 0xB9BA, + 0x8D2E, 0xD6FC, + 0x8D2F, 0xB9E1, + 0x8D30, 0xB7A1, + 0x8D31, 0xBCFA, + 0x8D32, 0xEADA, + 0x8D33, 0xEADB, + 0x8D34, 0xCCF9, + 0x8D35, 0xB9F3, + 0x8D36, 0xEADC, + 0x8D37, 0xB4FB, + 0x8D38, 0xC3B3, + 0x8D39, 0xB7D1, + 0x8D3A, 0xBAD8, + 0x8D3B, 0xEADD, + 0x8D3C, 0xD4F4, + 0x8D3D, 0xEADE, + 0x8D3E, 0xBCD6, + 0x8D3F, 0xBBDF, + 0x8D40, 0xEADF, + 0x8D41, 0xC1DE, + 0x8D42, 0xC2B8, + 0x8D43, 0xD4DF, + 0x8D44, 0xD7CA, + 0x8D45, 0xEAE0, + 0x8D46, 0xEAE1, + 0x8D47, 0xEAE4, + 0x8D48, 0xEAE2, + 0x8D49, 0xEAE3, + 0x8D4A, 0xC9DE, + 0x8D4B, 0xB8B3, + 0x8D4C, 0xB6C4, + 0x8D4D, 0xEAE5, + 0x8D4E, 0xCAEA, + 0x8D4F, 0xC9CD, + 0x8D50, 0xB4CD, + 0x8D53, 0xE2D9, + 0x8D54, 0xC5E2, + 0x8D55, 0xEAE6, + 0x8D56, 0xC0B5, + 0x8D58, 0xD7B8, + 0x8D59, 0xEAE7, + 0x8D5A, 0xD7AC, + 0x8D5B, 0xC8FC, + 0x8D5C, 0xD8D3, + 0x8D5D, 0xD8CD, + 0x8D5E, 0xD4DE, + 0x8D60, 0xD4F9, + 0x8D61, 0xC9C4, + 0x8D62, 0xD3AE, + 0x8D63, 0xB8D3, + 0x8D64, 0xB3E0, + 0x8D66, 0xC9E2, + 0x8D67, 0xF4F6, + 0x8D6B, 0xBAD5, + 0x8D6D, 0xF4F7, + 0x8D70, 0xD7DF, + 0x8D73, 0xF4F1, + 0x8D74, 0xB8B0, + 0x8D75, 0xD5D4, + 0x8D76, 0xB8CF, + 0x8D77, 0xC6F0, + 0x8D81, 0xB3C3, + 0x8D84, 0xF4F2, + 0x8D85, 0xB3AC, + 0x8D8A, 0xD4BD, + 0x8D8B, 0xC7F7, + 0x8D91, 0xF4F4, + 0x8D94, 0xF4F3, + 0x8D9F, 0xCCCB, + 0x8DA3, 0xC8A4, + 0x8DB1,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7, + 0x8FEA, 0xB5CF, + 0x8FEB, 0xC6C8, + 0x8FED, 0xB5FC, + 0x8FEE, 0xE5C5, + 0x8FF0, 0xCAF6, + 0x8FF3, 0xE5C9, + 0x8FF7, 0xC3D4, + 0x8FF8, 0xB1C5, + 0x8FF9, 0xBCA3, + 0x8FFD, 0xD7B7, + 0x9000, 0xCDCB, + 0x9001, 0xCBCD, + 0x9002, 0xCACA, + 0x9003, 0xCCD3, + 0x9004, 0xE5CC, + 0x9005, 0xE5CB, + 0x9006, 0xC4E6, + 0x9009, 0xD1A1, + 0x900A, 0xD1B7, + 0x900B, 0xE5CD, + 0x900D, 0xE5D0, + 0x900F, 0xCDB8, + 0x9010, 0xD6F0, + 0x9011, 0xE5CF, + 0x9012, 0xB5DD, + 0x9014, 0xCDBE, + 0x9016, 0xE5D1, + 0x9017, 0xB6BA, + 0x901A, 0xCDA8, + 0x901B, 0xB9E4, + 0x901D, 0xCAC5, + 0x901E, 0xB3D1, + 0x901F, 0xCBD9, + 0x9020, 0xD4EC, + 0x9021, 0xE5D2, + 0x9022, 0xB7EA, + 0x9026, 0xE5CE, + 0x902D, 0xE5D5, + 0x902E, 0xB4FE, + 0x902F, 0xE5D6, + 0x9035, 0xE5D3, + 0x9036, 0xE5D4, + 0x9038, 0xD2DD, + 0x903B, 0xC2DF, + 0x903C, 0xB1C6, + 0x903E, 0xD3E2, + 0x9041, 0xB6DD, + 0x9042, 0xCBEC, + 0x9044, 0xE5D7, + 0x9047, 0xD3F6, + 0x904D, 0xB1E9, + 0x904F, 0xB6F4, + 0x9050, 0xE5DA, + 0x9051, 0xE5D8, + 0x9052, 0xE5D9, + 0x9053, 0xB5C0, + 0x9057, 0xD2C5, + 0x9058, 0xE5DC, + 0x905B, 0xE5DE, + 0x9062, 0xE5DD, + 0x9063, 0xC7B2, + 0x9065, 0xD2A3, + 0x9068, 0xE5DB, + 0x906D, 0xD4E2, + 0x906E, 0xD5DA, + 0x9074, 0xE5E0, + 0x9075, 0xD7F1, + 0x907D, 0xE5E1, + 0x907F, 0xB1DC, + 0x9080, 0xD1FB, + 0x9082, 0xE5E2, + 0x9083, 0xE5E4, + 0x9088, 0xE5E3, + 0x908B, 0xE5E5, + 0x9091, 0xD2D8, + 0x9093, 0xB5CB, + 0x9095, 0xE7DF, + 0x9097, 0xDAF5, + 0x9099, 0xDAF8, + 0x909B, 0xDAF6, + 0x909D, 0xDAF7, + 0x90A1, 0xDAFA, + 0x90A2, 0xD0CF, + 0x90A3, 0xC4C7, + 0x90A6, 0xB0EE, + 0x90AA, 0xD0B0, + 0x90AC, 0xDAF9, + 0x90AE, 0xD3CA, + 0x90AF, 0xBAAA, + 0x90B0, 0xDBA2, + 0x90B1, 0xC7F1, + 0x90B3, 0xDAFC, + 0x90B4, 0xDAFB, + 0x90B5, 0xC9DB, + 0x90B6, 0xDAFD, + 0x90B8, 0xDBA1, + 0x90B9, 0xD7DE, + 0x90BA, 0xDAFE, + 0x90BB, 0xC1DA, + 0x90BE, 0xDBA5, + 0x90C1, 0xD3F4, + 0x90C4, 0xDBA7, + 0x90C5, 0xDBA4, + 0x90C7, 0xDBA8, + 0x90CA, 0xBDBC, + 0x90CE, 0xC0C9, + 0x90CF, 0xDBA3, + 0x90D0, 0xDBA6, + 0x90D1, 0xD6A3, + 0x90D3, 0xDBA9, + 0x90D7, 0xDBAD, + 0x90DB, 0xDBAE, + 0x90DC, 0xDBAC, + 0x90DD, 0xBAC2, + 0x90E1, 0xBFA4, + 0x90E2, 0xDBAB, + 0x90E6, 0xDBAA, + 0x90E7, 0xD4C7, + 0x90E8, 0xB2BF, + 0x90EB, 0xDBAF, + 0x90ED, 0xB9F9, + 0x90EF, 0xDBB0, + 0x90F4, 0xB3BB, + 0x90F8, 0xB5A6, + 0x90FD, 0xB6BC, + 0x90FE, 0xDBB1, + 0x9102, 0xB6F5, + 0x9104, 0xDBB2, + 0x9119, 0xB1C9, + 0x911E, 0xDBB4, + 0x9122, 0xDBB3, + 0x9123, 0xDBB5, + 0x912F, 0xDBB7, + 0x9131, 0xDBB6, + 0x9139, 0xDBB8, + 0x9143, 0xDBB9, + 0x9146, 0xDBBA, + 0x9149, 0xD3CF, + 0x914A, 0xF4FA, + 0x914B, 0xC7F5, + 0x914C, 0xD7C3, + 0x914D, 0xC5E4, + 0x914E, 0xF4FC, + 0x914F, 0xF4FD, + 0x9150, 0xF4FB, + 0x9152, 0xBEC6, + 0x9157, 0xD0EF, + 0x915A, 0xB7D3, + 0x915D, 0xD4CD, + 0x915E, 0xCCAA, + 0x9161, 0xF5A2, + 0x9162, 0xF5A1, + 0x9163, 0xBAA8, + 0x9164, 0xF4FE, + 0x9165, 0xCBD6, + 0x9169, 0xF5A4, + 0x916A, 0xC0D2, + 0x916C, 0xB3EA, + 0x916E, 0xCDAA, + 0x916F, 0xF5A5, + 0x9170, 0xF5A3, + 0x9171, 0xBDB4, + 0x9172, 0xF5A8, + 0x9174, 0xF5A9, + 0x9175, 0xBDCD, + 0x9176, 0xC3B8, + 0x9177, 0xBFE1, + 0x9178, 0xCBE1, + 0x9179, 0xF5AA, + 0x917D, 0xF5A6, + 0x917E, 0xF5A7, + 0x917F, 0xC4F0, + 0x9185, 0xF5AC, + 0x9187, 0xB4BC, + 0x9189, 0xD7ED, + 0x918B, 0xB4D7, + 0x918C, 0xF5AB, + 0x918D, 0xF5AE, + 0x9190, 0xF5AD, + 0x9191, 0xF5AF, + 0x9192, 0xD0D1, + 0x919A, 0xC3D1, + 0x919B, 0xC8A9, + 0x91A2, 0xF5B0, + 0x91A3, 0xF5B1, + 0x91AA, 0xF5B2, + 0x91AD, 0xF5B3, + 0x91AE, 0xF5B4, + 0x91AF, 0xF5B5, + 0x91B4, 0xF5B7, + 0x91B5, 0xF5B6, + 0x91BA, 0xF5B8, + 0x91C7, 0xB2C9, + 0x91C9, 0xD3D4, + 0x91CA, 0xCACD, + 0x91CC, 0xC0EF, + 0x91CD, 0xD6D8, + 0x91CE, 0xD2B0, + 0x91CF, 0xC1BF, + 0x91D1, 0xBDF0, + 0x91DC, 0xB8AA, + 0x9274, 0xBCF8, + 0x928E, 0xF6C6, + 0x92AE, 0xF6C7, + 0x92C8, 0xF6C8, + 0x933E, 0xF6C9, + 0x936A, 0xF6CA, + 0x938F, 0xF6CC, + 0x93CA, 0xF6CB, + 0x93D6, 0xF7E9, + 0x943E, 0xF6CD, + 0x946B, 0xF6CE, + 0x9485, 0xEEC4, + 0x9486, 0xEEC5, + 0x9487, 0xEEC6, + 0x9488, 0xD5EB, + 0x9489, 0xB6A4, + 0x948A, 0xEEC8, + 0x948B, 0xEEC7, + 0x948C, 0xEEC9, + 0x948D, 0xEECA, + 0x948E, 0xC7A5, + 0x948F, 0xEECB, + 0x9490, 0xEECC, + 0x9492, 0xB7B0, + 0x9493, 0xB5F6, + 0x9494, 0xEECD, + 0x9495, 0xEECF, + 0x9497, 0xEECE, + 0x9499, 0xB8C6, + 0x949A, 0xEED0, + 0x949B, 0xEED1, + 0x949C, 0xEED2, + 0x949D, 0xB6DB, + 0x949E, 0xB3AE, + 0x949F, 0xD6D3, + 0x94A0, 0xC4C6, + 0x94A1, 0xB1B5, + 0x94A2, 0xB8D6, + 0x94A3, 0xEED3, + 0x94A4, 0xEED4, + 0x94A5, 0xD4BF, + 0x94A6, 0xC7D5, + 0x94A7, 0xBEFB, + 0x94A8, 0xCED9, + 0x94A9, 0xB9B3, + 0x94AA, 0xEED6, + 0x94AB, 0xEED5, + 0x94AC, 0xEED8, + 0x94AD, 0xEED7, + 0x94AE, 0xC5A5, + 0x94AF, 0xEED9, + 0x94B0, 0xEEDA, + 0x94B1, 0xC7AE, + 0x94B2, 0xEEDB, + 0x94B3, 0xC7AF, + 0x94B4, 0xEEDC, + 0x94B5, 0xB2A7, + 0x94B6, 0xEEDD, + 0x94B7, 0xEEDE, + 0x94B8, 0xEEDF, + 0x94B9, 0xEEE0, + 0x94BA, 0xEEE1, + 0x94BB, 0xD7EA, + 0x94BC, 0xEEE2, + 0x94BD, 0xEEE3, + 0x94BE, 0xBCD8, + 0x94BF, 0xEEE4, + 0x94C0, 0xD3CB, + 0x94C1, 0xCCFA, + 0x94C2, 0xB2AC, + 0x94C3, 0xC1E5, + 0x94C4, 0xEEE5, + 0x94C5, 0xC7A6, + 0x94C6, 0xC3AD, + 0x94C8, 0xEEE6, + 0x94C9, 0xEEE7, + 0x94CA, 0xEEE8, + 0x94CB, 0xEEE9, + 0x94CC, 0xEEEA, + 0x94CD, 0xEEEB, + 0x94CE, 0xEEEC, + 0x94D0, 0xEEED, + 0x94D1, 0xEEEE, + 0x94D2, 0xEEEF, + 0x94D5, 0xEEF0, + 0x94D6, 0xEEF1, + 0x94D7, 0xEEF2, + 0x94D8, 0xEEF4, + 0x94D9, 0xEEF3, + 0x94DB, 0xEEF5, + 0x94DC, 0xCDAD, + 0x94DD, 0xC2C1, + 0x94DE, 0xEEF6, + 0x94DF, 0xEEF7, + 0x94E0, 0xEEF8, + 0x94E1, 0xD5A1, + 0x94E2, 0xEEF9, + 0x94E3, 0xCFB3, + 0x94E4, 0xEEFA, + 0x94E5, 0xEEFB, + 0x94E7, 0xEEFC, + 0x94E8, 0xEEFD, + 0x94E9, 0xEFA1, + 0x94EA, 0xEEFE, + 0x94EB, 0xEFA2, + 0x94EC, 0xB8F5, + 0x94ED, 0xC3FA, + 0x94EE, 0xEFA3, + 0x94EF, 0xEFA4, + 0x94F0, 0xBDC2, + 0x94F1, 0xD2BF, + 0x94F2, 0xB2F9, + 0x94F3, 0xEFA5, + 0x94F4, 0xEFA6, + 0x94F5, 0xEFA7, + 0x94F6, 0xD2F8, + 0x94F7, 0xEFA8, + 0x94F8, 0xD6FD, + 0x94F9, 0xEFA9, + 0x94FA, 0xC6CC, + 0x94FC, 0xEFAA, + 0x94FD, 0xEFAB, + 0x94FE, 0xC1B4, + 0x94FF, 0xEFAC, + 0x9500, 0xCFFA, + 0x9501, 0xCBF8, + 0x9502, 0xEFAE, + 0x9503, 0xEFAD, + 0x9504, 0xB3FA, + 0x9505, 0xB9F8, + 0x9506, 0xEFAF, + 0x9507, 0xEFB0, + 0x9508, 0xD0E2, + 0x9509, 0xEFB1, + 0x950A, 0xEFB2, + 0x950B, 0xB7E6, + 0x950C, 0xD0BF, + 0x950D, 0xEFB3, + 0x950E, 0xEFB4, + 0x950F, 0xEFB5, + 0x9510, 0xC8F1, + 0x9511, 0xCCE0, + 0x9512, 0xEFB6, + 0x9513, 0xEFB7, + 0x9514, 0xEFB8, + 0x9515, 0xEFB9, + 0x9516, 0xEFBA, + 0x9517, 0xD5E0, + 0x9518, 0xEFBB, + 0x9519, 0xB4ED, + 0x951A, 0xC3AA, + 0x951B, 0xEFBC, + 0x951D, 0xEFBD, + 0x951E, 0xEFBE, + 0x951F, 0xEFBF, + 0x9521, 0xCEFD, + 0x9522, 0xEFC0, + 0x9523, 0xC2E0, + 0x9524, 0xB4B8, + 0x9525, 0xD7B6, + 0x9526, 0xBDF5, + 0x9528, 0xCFC7, + 0x9529, 0xEFC3, + 0x952A, 0xEFC1, + 0x952B, 0xEFC2, + 0x952C, 0xEFC4, + 0x952D, 0xB6A7, + 0x952E, 0xBCFC, + 0x952F, 0xBEE2, + 0x9530, 0xC3CC, + 0x9531, 0xEFC5, + 0x9532, 0xEFC6, + 0x9534, 0xEFC7, + 0x9535, 0xEFCF, + 0x9536, 0xEFC8, + 0x9537, 0xEFC9, + 0x9538, 0xEFCA, + 0x9539, 0xC7C2, + 0x953A, 0xEFF1, + 0x953B, 0xB6CD, + 0x953C, 0xEFCB, + 0x953E, 0xEFCC, + 0x953F, 0xEFCD, + 0x9540, 0xB6C6, + 0x9541, 0xC3BE, + 0x9542, 0xEFCE, + 0x9544, 0xEFD0, + 0x9545, 0xEFD1, + 0x9546, 0xEFD2, + 0x9547, 0xD5F2, + 0x9549, 0xEFD3, + 0x954A, 0xC4F7, + 0x954C, 0xEFD4, + 0x954D, 0xC4F8, + 0x954E, 0xEFD5, + 0x954F, 0xEFD6, + 0x9550, 0xB8E4, + 0x9551, 0xB0F7, + 0x9552, 0xEFD7, + 0x9553, 0xEFD8, + 0x9554, 0xEFD9, + 0x9556, 0xEFDA, + 0x9557, 0xEFDB, + 0x9558, 0xEFDC, + 0x9559, 0xEFDD, + 0x955B, 0xEFDE, + 0x955C, 0xBEB5, + 0x955D, 0xEFE1, + 0x955E, 0xEFDF, + 0x955F, 0xEFE0, + 0x9561, 0xEFE2, + 0x9562, 0xEFE3, + 0x9563, 0xC1CD, + 0x9564, 0xEFE4, + 0x9565, 0xEFE5, + 0x9566, 0xEFE6, + 0x9567, 0xEFE7, + 0x9568, 0xEFE8, + 0x9569, 0xEFE9, + 0x956A, 0xEFEA, + 0x956B, 0xEFEB, + 0x956C, 0xEFEC, + 0x956D, 0xC0D8, + 0x956F, 0xEFED, + 0x9570, 0xC1AD, + 0x9571, 0xEFEE, + 0x9572, 0xEFEF, + 0x9573, 0xEFF0, + 0x9576, 0xCFE2, + 0x957F, 0xB3A4, + 0x95E8, 0xC3C5, + 0x95E9, 0xE3C5, + 0x95EA, 0xC9C1, + 0x95EB, 0xE3C6, + 0x95ED, 0xB1D5, + 0x95EE, 0xCECA, + 0x95EF, 0xB4B3, + 0x95F0, 0xC8F2, + 0x95F1, 0xE3C7, + 0x95F2, 0xCFD0, + 0x95F3, 0xE3C8, + 0x95F4, 0xBCE4, + 0x95F5, 0xE3C9, + 0x95F6, 0xE3CA, + 0x95F7, 0xC3C6, + 0x95F8, 0xD5A2, + 0x95F9, 0xC4D6, + 0x95FA, 0xB9EB, + 0x95FB, 0xCEC5, + 0x95FC, 0xE3CB, + 0x95FD, 0xC3F6, + 0x95FE, 0xE3CC, + 0x9600, 0xB7A7, + 0x9601, 0xB8F3, + 0x9602, 0xBAD2, + 0x9603, 0xE3CD, + 0x9604, 0xE3CE, + 0x9605, 0xD4C4, + 0x9606, 0xE3CF, + 0x9608, 0xE3D0, + 0x9609, 0xD1CB, + 0x960A, 0xE3D1, + 0x960B, 0xE3D2, + 0x960C, 0xE3D3, + 0x960D, 0xE3D4, + 0x960E, 0xD1D6, + 0x960F, 0xE3D5, + 0x9610, 0xB2FB, + 0x9611, 0xC0BB, + 0x9612, 0xE3D6, + 0x9614, 0xC0AB, + 0x9615, 0xE3D7, + 0x9616, 0xE3D8, + 0x9617, 0xE3D9, + 0x9619, 0xE3DA, + 0x961A, 0xE3DB, + 0x961C, 0xB8B7, + 0x961D, 0xDAE2, + 0x961F, 0xB6D3, + 0x9621, 0xDAE4, + 0x9622, 0xDAE3, + 0x962A, 0xDAE6, + 0x962E, 0xC8EE, + 0x9631, 0xDAE5, + 0x9632, 0xB7C0, + 0x9633, 0xD1F4, + 0x9634, 0xD2F5, + 0x9635, 0xD5F3, + 0x9636, 0xBDD7, + 0x963B, 0xD7E8, + 0x963C, 0xDAE8, + 0x963D, 0xDAE7, + 0x963F, 0xB0A2, + 0x9640, 0xCDD3, + 0x9642, 0xDAE9, + 0x9644, 0xB8BD, + 0x9645, 0xBCCA, + 0x9646, 0xC2BD, + 0x9647, 0xC2A4, + 0x9648, 0xB3C2, + 0x9649, 0xDAEA, + 0x964B, 0xC2AA, + 0x964C, 0xC4B0, + 0x964D, 0xBDB5, + 0x9650, 0xCFDE, + 0x9654, 0xDAEB, + 0x9655, 0xC9C2, + 0x965B, 0xB1DD, + 0x965F, 0xDAEC, + 0x9661, 0xB6B8, + 0x9662, 0xD4BA, + 0x9664, 0xB3FD, + 0x9667, 0xDAED, + 0x9668, 0xD4C9, + 0x9669, 0xCFD5, + 0x966A, 0xC5E3, + 0x966C, 0xDAEE, + 0x9672, 0xDAEF, + 0x9674, 0xDAF0, + 0x9675, 0xC1EA, + 0x9676, 0xCCD5, + 0x9677, 0xCFDD, + 0x9685, 0xD3E7, + 0x9686, 0xC2A1, + 0x9688, 0xDAF1, + 0x968B, 0xCBE5, + 0x968D, 0xDAF2, + 0x968F, 0xCBE6, + 0x9690, 0xD2FE, + 0x9694, 0xB8F4, + 0x9697, 0xDAF3, + 0x9698, 0xB0AF, + 0x9699, 0xCFB6, + 0x969C, 0xD5CF, + 0x96A7, 0xCBED, + 0x96B0, 0xDAF4, + 0x96B3, 0xE3C4, + 0x96B6, 0xC1A5, + 0x96B9, 0xF6BF, + 0x96BC, 0xF6C0, + 0x96BD, 0xF6C1, + 0x96BE, 0xC4D1, + 0x96C0, 0xC8B8, + 0x96C1, 0xD1E3, + 0x96C4, 0xD0DB, + 0x96C5, 0xD1C5, + 0x96C6, 0xBCAF, + 0x96C7, 0xB9CD, + 0x96C9, 0xEFF4, + 0x96CC, 0xB4C6, + 0x96CD, 0xD3BA, + 0x96CE, 0xF6C2, + 0x96CF, 0xB3FB, + 0x96D2, 0xF6C3, + 0x96D5, 0xB5F1, + 0x96E0, 0xF6C5, + 0x96E8, 0xD3EA, + 0x96E9, 0xF6A7, + 0x96EA, 0xD1A9, + 0x96EF, 0xF6A9, + 0x96F3, 0xF6A8, + 0x96F6, 0xC1E3, + 0x96F7, 0xC0D7, + 0x96F9, 0xB1A2, + 0x96FE, 0xCEED, + 0x9700, 0xD0E8, + 0x9701, 0xF6AB, + 0x9704, 0xCFF6, + 0x9706, 0xF6AA, + 0x9707, 0xD5F0, + 0x9708, 0xF6AC, + 0x9709, 0xC3B9, + 0x970D, 0xBBF4, + 0x970E, 0xF6AE, + 0x970F, 0xF6AD, + 0x9713, 0xC4DE, + 0x9716, 0xC1D8, + 0x971C, 0xCBAA, + 0x971E, 0xCFBC, + 0x972A, 0xF6AF, + 0x972D, 0xF6B0, + 0x9730, 0xF6B1, + 0x9732, 0xC2B6, + 0x9738, 0xB0D4, + 0x9739, 0xC5F9, + 0x973E, 0xF6B2, + 0x9752, 0xC7E0, + 0x9753, 0xF6A6, + 0x9756, 0xBEB8, + 0x9759, 0xBEB2, + 0x975B, 0xB5E5, + 0x975E, 0xB7C7, + 0x9760, 0xBFBF, + 0x9761, 0xC3D2, + 0x9762, 0xC3E6, + 0x9765, 0xD8CC, + 0x9769, 0xB8EF, + 0x9773, 0xBDF9, + 0x9774, 0xD1A5, + 0x9776, 0xB0D0, + 0x977C, 0xF7B0, + 0x9785, 0xF7B1, + 0x978B, 0xD0AC, + 0x978D, 0xB0B0, + 0x9791, 0xF7B2, + 0x9792, 0xF7B3, + 0x9794, 0xF7B4, + 0x9798, 0xC7CA, + 0x97A0, 0xBECF, + 0x97A3, 0xF7B7, + 0x97AB, 0xF7B6, + 0x97AD, 0xB1DE, + 0x97AF, 0xF7B5, + 0x97B2, 0xF7B8, + 0x97B4, 0xF7B9, + 0x97E6, 0xCEA4, + 0x97E7, 0xC8CD, + 0x97E9, 0xBAAB, + 0x97EA, 0xE8B8, + 0x97EB, 0xE8B9, + 0x97EC, 0xE8BA, + 0x97ED, 0xBEC2, + 0x97F3, 0xD2F4, + 0x97F5, 0xD4CF, + 0x97F6, 0xC9D8, + 0x9875, 0xD2B3, + 0x9876, 0xB6A5, + 0x9877, 0xC7EA, + 0x9878, 0xF1FC, + 0x9879, 0xCFEE, + 0x987A, 0xCBB3, + 0x987B, 0xD0EB, + 0x987C, 0xE7EF, + 0x987D, 0xCDE7, + 0x987E, 0xB9CB, + 0x987F, 0xB6D9, + 0x9880, 0xF1FD, + 0x9881, 0xB0E4, + 0x9882, 0xCBCC, + 0x9883, 0xF1FE, + 0x9884, 0xD4A4, + 0x9885, 0xC2AD, + 0x9886, 0xC1EC, + 0x9887, 0xC6C4, + 0x9888, 0xBEB1, + 0x9889, 0xF2A1, + 0x988A, 0xBCD5, + 0x988C, 0xF2A2, + 0x988D, 0xF2A3, + 0x988F, 0xF2A4, + 0x9890, 0xD2C3, + 0x9891, 0xC6B5, + 0x9893, 0xCDC7, + 0x9894, 0xF2A5, + 0x9896, 0xD3B1, + 0x9897, 0xBFC5, + 0x9898, 0xCCE2, + 0x989A, 0xF2A6, + 0x989B, 0xF2A7, + 0x989C, 0xD1D5, + 0x989D, 0xB6EE, + 0x989E, 0xF2A8, + 0x989F, 0xF2A9, + 0x98A0, 0xB5DF, + 0x98A1, 0xF2AA, + 0x98A2, 0xF2AB, + 0x98A4, 0xB2FC, + 0x98A5, 0xF2AC, + 0x98A6, 0xF2AD, + 0x98A7, 0xC8A7, + 0x98CE, 0xB7E7, + 0x98D1, 0xECA9, + 0x98D2, 0xECAA, + 0x98D3, 0xECAB, + 0x98D5, 0xECAC, + 0x98D8, 0xC6AE, + 0x98D9, 0xECAD, + 0x98DA, 0xECAE, + 0x98DE, 0xB7C9, + 0x98DF, 0xCAB3, + 0x98E7, 0xE2B8, + 0x98E8, 0xF7CF, + 0x990D, 0xF7D0, + 0x9910, 0xB2CD, + 0x992E, 0xF7D1, + 0x9954, 0xF7D3, + 0x9955, 0xF7D2, + 0x9963, 0xE2BB, + 0x9965, 0xBCA2, + 0x9967, 0xE2BC, + 0x9968, 0xE2BD, + 0x9969, 0xE2BE, + 0x996A, 0xE2BF, + 0x996B, 0xE2C0, + 0x996C, 0xE2C1, + 0x996D, 0xB7B9, + 0x996E, 0xD2FB, + 0x996F, 0xBDA4, + 0x9970, 0xCACE, + 0x9971, 0xB1A5, + 0x9972, 0xCBC7, + 0x9974, 0xE2C2, + 0x9975, 0xB6FC, + 0x9976, 0xC8C4, + 0x9977, 0xE2C3, + 0x997A, 0xBDC8, + 0x997C, 0xB1FD, + 0x997D, 0xE2C4, + 0x997F, 0xB6F6, + 0x9980, 0xE2C5, + 0x9981, 0xC4D9, + 0x9984, 0xE2C6, + 0x9985, 0xCFDA, + 0x9986, 0xB9DD, + 0x9987, 0xE2C7, + 0x9988, 0xC0A1, + 0x998A, 0xE2C8, + 0x998B, 0xB2F6, + 0x998D, 0xE2C9, + 0x998F, 0xC1F3, + 0x9990, 0xE2CA, + 0x9991, 0xE2CB, + 0x9992, 0xC2F8, + 0x9993, 0xE2CC, + 0x9994, 0xE2CD, + 0x9995, 0xE2CE, + 0x9996, 0xCAD7, + 0x9997, 0xD8B8, + 0x9998, 0xD9E5, + 0x9999, 0xCFE3, + 0x99A5, 0xF0A5, + 0x99A8, 0xDCB0, + 0x9A6C, 0xC2ED, + 0x9A6D, 0xD4A6,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, + 0xFF45, 0xA3E5, + 0xFF46, 0xA3E6, + 0xFF47, 0xA3E7, + 0xFF48, 0xA3E8, + 0xFF49, 0xA3E9, + 0xFF4A, 0xA3EA, + 0xFF4B, 0xA3EB, + 0xFF4C, 0xA3EC, + 0xFF4D, 0xA3ED, + 0xFF4E, 0xA3EE, + 0xFF4F, 0xA3EF, + 0xFF50, 0xA3F0, + 0xFF51, 0xA3F1, + 0xFF52, 0xA3F2, + 0xFF53, 0xA3F3, + 0xFF54, 0xA3F4, + 0xFF55, 0xA3F5, + 0xFF56, 0xA3F6, + 0xFF57, 0xA3F7, + 0xFF58, 0xA3F8, + 0xFF59, 0xA3F9, + 0xFF5A, 0xA3FA, + 0xFF5B, 0xA3FB, + 0xFF5C, 0xA3FC, + 0xFF5D, 0xA3FD, + 0xFF5E, 0xA1AB, + 0xFFE0, 0xA1E9, + 0xFFE1, 0xA1EA, + 0xFFE3, 0xA3FE, + 0xFFE5, 0xA3A4 +} diff --git a/backend/gridmtx.c b/backend/gridmtx.c index 847a2592..d3582324 100644 --- a/backend/gridmtx.c +++ b/backend/gridmtx.c @@ -31,7 +31,7 @@ #include "reedsol.h" #include "gridmtx.h" -int grid_matrix(struct zint_symbol *symbol, unsigned char source[]) +int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int length) { strcpy(symbol->errtxt, "Grid Matrix not yet implemented"); diff --git a/backend/gs1.c b/backend/gs1.c index ce8f898c..3c68b1da 100644 --- a/backend/gs1.c +++ b/backend/gs1.c @@ -53,7 +53,7 @@ void itostr(char ai_string[], int ai_value) concat(ai_string, ")"); } -int gs1_verify(struct zint_symbol *symbol, unsigned char source[], char reduced[]) +int gs1_verify(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len, char reduced[]) { int i, j, last_ai, ai_latch; char ai_string[6]; @@ -62,7 +62,7 @@ int gs1_verify(struct zint_symbol *symbol, unsigned char source[], char reduced[ int error_latch; /* Detect extended ASCII characters */ - for(i = 0; i < ustrlen(source); i++) { + for(i = 0; i < src_len; i++) { if(source[i] >=128) { strcpy(symbol->errtxt, "Extended ASCII characters are not supported by GS1"); return ERROR_INVALID_DATA; @@ -86,7 +86,7 @@ int gs1_verify(struct zint_symbol *symbol, unsigned char source[], char reduced[ min_ai_length = 5; j = 0; ai_latch = 0; - for(i = 0; i < ustrlen(source); i++) { + for(i = 0; i < src_len; i++) { ai_length += j; if(((j == 1) && (source[i] != ']')) && ((source[i] < '0') || (source[i] > '9'))) { ai_latch = 1; } if(source[i] == '[') { bracket_level++; j = 1; } @@ -94,7 +94,8 @@ int gs1_verify(struct zint_symbol *symbol, unsigned char source[], char reduced[ bracket_level--; if(ai_length < min_ai_length) { min_ai_length = ai_length; } j = 0; - ai_length = 0; } + ai_length = 0; + } if(bracket_level > max_bracket_level) { max_bracket_level = bracket_level; } if(ai_length > max_ai_length) { max_ai_length = ai_length; } } @@ -131,7 +132,7 @@ int gs1_verify(struct zint_symbol *symbol, unsigned char source[], char reduced[ } ai_count = 0; - for(i = 1; i < ustrlen(source); i++) { + for(i = 1; i < src_len; i++) { if(source[i - 1] == '[') { ai_location[ai_count] = i; j = 0; @@ -226,16 +227,14 @@ int gs1_verify(struct zint_symbol *symbol, unsigned char source[], char reduced[ j = 0; last_ai = 0; ai_latch = 1; - for(i = 0; i < ustrlen(source); i++) { + for(i = 0; i < src_len; i++) { if((source[i] != '[') && (source[i] != ']')) { - reduced[j] = source[i]; - j++; + reduced[j++] = source[i]; } if(source[i] == '[') { /* Start of an AI string */ if(ai_latch == 0) { - reduced[j] = '['; - j++; + reduced[j++] = '['; } ai_string[0] = source[i + 1]; ai_string[1] = source[i + 2]; @@ -258,22 +257,23 @@ int gs1_verify(struct zint_symbol *symbol, unsigned char source[], char reduced[ return 0; } -int ugs1_verify(struct zint_symbol *symbol, unsigned char source[], unsigned char reduced[]) +int ugs1_verify(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len, unsigned char reduced[]) { /* Only to keep the compiler happy */ #ifndef _MSC_VER - char temp[ustrlen(source) + 5]; + char temp[src_len + 5]; #else - char* temp = (char*)_alloca(ustrlen(source) + 5); + char* temp = (char*)_alloca(src_len + 5); #endif - int error_number, i; + int error_number; - error_number = gs1_verify(symbol, source, temp); + error_number = gs1_verify(symbol, source, src_len, temp); if(error_number != 0) { return error_number; } - for(i = 0; i <= strlen(temp); i++) { - reduced[i] = (unsigned char)temp[i]; + if (strlen(temp) < src_len + 5) { + ustrcpy(reduced, (unsigned char*)temp); + return 0; } - - return 0; + strcpy(symbol->errtxt, "ugs1_verify overflow"); + return ERROR_INVALID_DATA; } diff --git a/backend/gs1.h b/backend/gs1.h index 3477e9c4..42b40df7 100644 --- a/backend/gs1.h +++ b/backend/gs1.h @@ -25,8 +25,8 @@ extern "C" { #endif /* __cplusplus */ -extern int gs1_verify(struct zint_symbol *symbol, unsigned char source[], char reduced[]); -extern int ugs1_verify(struct zint_symbol *symbol, unsigned char source[], unsigned char reduced[]); +extern int gs1_verify(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len, char reduced[]); +extern int ugs1_verify(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len, unsigned char reduced[]); #ifdef __cplusplus } diff --git a/backend/imail.c b/backend/imail.c index bd2b01b1..fc9c82eb 100644 --- a/backend/imail.c +++ b/backend/imail.c @@ -41,7 +41,7 @@ static short int BCD[40] = { #include "common.h" #include "large.h" -#define NASET "0123456789-" +#define SODIUM "0123456789-" /* The following lookup tables were generated using the code in Appendix C */ @@ -325,7 +325,7 @@ int imail(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NASET, source, length); + error_number = is_sane(SODIUM, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; diff --git a/backend/large.c b/backend/large.c index bc808e6e..fbd7aeb7 100644 --- a/backend/large.c +++ b/backend/large.c @@ -155,16 +155,16 @@ short int islarger(short int accum[], short int reg[]) return larger; } -void binary_load(short int reg[], char data[]) +void binary_load(short int reg[], char data[], const unsigned int src_len) { int read, i; - short int temp[112]; + short int temp[112] = { 0 }; for(i = 0; i < 112; i++) { reg[i] = 0; } - for(read = 0; read < strlen(data); read++) { + for(read = 0; read < src_len; read++) { for(i = 0; i < 112; i++) { temp[i] = reg[i]; diff --git a/backend/large.h b/backend/large.h index b49e139e..72076b06 100644 --- a/backend/large.h +++ b/backend/large.h @@ -25,7 +25,7 @@ extern "C" { #endif /* __cplusplus */ -extern void binary_load(short int reg[], char data[]); +extern void binary_load(short int reg[], char data[], const unsigned int src_len); extern void binary_add(short int accumulator[], short int input_buffer[]); extern void binary_subtract(short int accumulator[], short int input_buffer[]); extern void shiftdown(short int buffer[]); diff --git a/backend/library.c b/backend/library.c index a7299e93..25cd8b78 100644 --- a/backend/library.c +++ b/backend/library.c @@ -27,7 +27,7 @@ #include "common.h" #include "gs1.h" -#define HIBCSET "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%" +#define TECHNETIUM "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%" struct zint_symbol *ZBarcode_Create() { @@ -61,7 +61,6 @@ struct zint_symbol *ZBarcode_Create() symbol->row_height[i] = 0; } return symbol; - symbol->nullchar = 0x00; } @@ -154,26 +153,14 @@ void error_tag(char error_string[], int error_number) int hibc(struct zint_symbol *symbol, unsigned char source[], int length) { int counter, error_number, i; - char to_process[40], temp[3], check_digit; - - strcpy(temp, ""); - -#ifndef _MSC_VER - unsigned char local_source[length]; -#else - unsigned char local_source = (unsigned char*)_alloca(length); -#endif + char to_process[40], temp[2], check_digit; if(length > 36) { strcpy(symbol->errtxt, "Data too long for HIBC LIC"); return ERROR_TOO_LONG; } - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } - local_source[length] = '\0'; - to_upper(local_source); - error_number = is_sane(HIBCSET , local_source, length); + to_upper(source); + error_number = is_sane(TECHNETIUM , source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; @@ -182,7 +169,7 @@ int hibc(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(to_process, "+"); counter = 41; for(i = 0; i < length; i++) { - counter += posn(HIBCSET, local_source[i]); + counter += posn(TECHNETIUM, source[i]); } counter = counter % 43; @@ -199,7 +186,7 @@ int hibc(struct zint_symbol *symbol, unsigned char source[], int length) case 39: check_digit = '$'; break; case 40: check_digit = '/'; break; case 41: check_digit = '+'; break; - case 42: check_digit = 37; break; + case 42: check_digit = '%'; break; default: check_digit = ' '; break; /* Keep compiler happy */ } } @@ -208,7 +195,7 @@ int hibc(struct zint_symbol *symbol, unsigned char source[], int length) temp[0] = check_digit; temp[1] = '\0'; - concat(to_process, (char *)local_source); + concat(to_process, (char *)source); concat(to_process, temp); length = strlen(to_process); @@ -272,7 +259,7 @@ int gs1_compliant(int symbology) case BARCODE_CODABLOCKF: case BARCODE_CODEONE: case BARCODE_CODE49: - /* case BARCODE_QRCODE: for future expansion */ + case BARCODE_QRCODE: result = 1; break; } @@ -321,9 +308,7 @@ int ZBarcode_ValidID(int symbol_id) case BARCODE_PDF417: case BARCODE_PDF417TRUNC: case BARCODE_MAXICODE: -#ifndef NO_QR case BARCODE_QRCODE: -#endif case BARCODE_CODE128B: case BARCODE_AUSPOST: case BARCODE_AUSREPLY: @@ -383,15 +368,9 @@ int extended_charset(struct zint_symbol *symbol, unsigned char *source, int leng { int error_number = 0; - /* These are the "elite" standards which can support multiple languages */ + /* These are the "elite" standards which can support multiple character sets */ switch(symbol->symbology) { - case BARCODE_DATAMATRIX: error_number = dmatrix(symbol, source, length); break; - case BARCODE_PDF417: error_number = pdf417enc(symbol, source, length); break; - case BARCODE_PDF417TRUNC: error_number = pdf417enc(symbol, source, length); break; case BARCODE_QRCODE: error_number = qr_code(symbol, source, length); break; - case BARCODE_MICROPDF417: error_number = micro_pdf417(symbol, source, length); break; - case BARCODE_MAXICODE: error_number = maxicode(symbol, source, length); break; - case BARCODE_AZTEC: error_number = aztec(symbol, source, length); break; case BARCODE_MICROQR: error_number = microqr(symbol, source, length); break; case BARCODE_GRIDMATRIX: error_number = grid_matrix(symbol, source, length); break; } @@ -402,15 +381,12 @@ int extended_charset(struct zint_symbol *symbol, unsigned char *source, int leng int reduced_charset(struct zint_symbol *symbol, unsigned char *source, int length) { /* These are the "norm" standards which only support Latin-1 at most */ - int error_number = 0, i; + int error_number = 0; -#ifdef _MSC_VER - unsigned char* preprocessed; -#endif #ifndef _MSC_VER - unsigned char preprocessed[length]; + unsigned char preprocessed[length + 1]; #else - preprocessed = (unsigned char*)_alloca(length + 1); + unsigned char* preprocessed = (unsigned char*)_alloca(length + 1); #endif if(symbol->symbology == BARCODE_CODE16K) { @@ -427,9 +403,8 @@ int reduced_charset(struct zint_symbol *symbol, unsigned char *source, int lengt switch(symbol->input_mode) { case DATA_MODE: - for(i = 0; i < length; i++) { - preprocessed[i] = source[i]; - } + case GS1_MODE: + memcpy(preprocessed, source, length); preprocessed[length] = '\0'; break; case UNICODE_MODE: @@ -513,10 +488,12 @@ int reduced_charset(struct zint_symbol *symbol, unsigned char *source, int lengt case BARCODE_CODE49: error_number = code_49(symbol, preprocessed, length); break; case BARCODE_CHANNEL: error_number = channel_code(symbol, preprocessed, length); break; case BARCODE_CODEONE: error_number = code_one(symbol, preprocessed, length); break; - } - - if((symbol->symbology == BARCODE_CODE128) || (symbol->symbology == BARCODE_CODE128B)) { - ustrcpy(symbol->text, source); + case BARCODE_DATAMATRIX: error_number = dmatrix(symbol, source, length); break; + case BARCODE_PDF417: error_number = pdf417enc(symbol, source, length); break; + case BARCODE_PDF417TRUNC: error_number = pdf417enc(symbol, source, length); break; + case BARCODE_MICROPDF417: error_number = micro_pdf417(symbol, source, length); break; + case BARCODE_MAXICODE: error_number = maxicode(symbol, source, length); break; + case BARCODE_AZTEC: error_number = aztec(symbol, source, length); break; } return error_number; @@ -527,20 +504,20 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt int error_number, error_buffer, i; error_number = 0; - if(ustrlen(source) == 0) { + if(length == 0) { + length = ustrlen(source); + } + if(length == 0) { strcpy(symbol->errtxt, "No input data"); error_tag(symbol->errtxt, ERROR_INVALID_DATA); return ERROR_INVALID_DATA; } - - if(length == 0) { - length = ustrlen(source); - } + #ifndef _MSC_VER - unsigned char local_source[length]; + unsigned char local_source[length + 1]; #else - unsigned char local_source = (unsigned char*)_alloca(length); + unsigned char* local_source = (unsigned char*)_alloca(length + 1); #endif /* First check the symbology field */ @@ -598,27 +575,20 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt } } if(gs1_compliant(symbol->symbology) == 1) { - error_number = ugs1_verify(symbol, source, local_source); + error_number = ugs1_verify(symbol, source, length, local_source); if(error_number != 0) { return error_number; } + length = ustrlen(local_source); } else { strcpy(symbol->errtxt, "Selected symbology does not support GS1 mode"); return ERROR_INVALID_OPTION; } } else { - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } + memcpy(local_source, source, length); local_source[length] = '\0'; } switch(symbol->symbology) { - case BARCODE_DATAMATRIX: - case BARCODE_PDF417: - case BARCODE_PDF417TRUNC: case BARCODE_QRCODE: - case BARCODE_MICROPDF417: - case BARCODE_MAXICODE: - case BARCODE_AZTEC: case BARCODE_MICROQR: case BARCODE_GRIDMATRIX: error_number = extended_charset(symbol, local_source, length); @@ -718,7 +688,6 @@ int ZBarcode_Encode_and_Print_Rotated(struct zint_symbol *symbol, unsigned char int ZBarcode_Encode_File(struct zint_symbol *symbol, char *filename) { FILE *file; - unsigned char *buffer; unsigned long fileLen, result; file = fopen(filename, "rb"); @@ -740,15 +709,14 @@ int ZBarcode_Encode_File(struct zint_symbol *symbol, char *filename) } /* Allocate memory */ - buffer = (unsigned char *)malloc((fileLen + 1)*sizeof(unsigned char)); - if(!buffer) { - strcpy(symbol->errtxt, "Internal memory error"); - fclose(file); - return ERROR_MEMORY; - } +#ifndef _MSC_VER + unsigned char buffer[fileLen + 1]; +#else + unsigned char buffer = (unsigned char *)_alloca(fileLen + 1); +#endif /* Read file contents into buffer */ - result = fread(buffer, fileLen, 1, file); + result = fread(&buffer, fileLen, 1, file); if(result != fileLen) { strcpy(symbol->errtxt, "File read error"); fclose(file); diff --git a/backend/maxicode.c b/backend/maxicode.c index 17e5c93a..7419fc79 100644 --- a/backend/maxicode.c +++ b/backend/maxicode.c @@ -26,6 +26,7 @@ #include "reedsol.h" #include #include +#include int maxi_codeword[144]; @@ -299,7 +300,7 @@ int maxi_text_process(int mode, unsigned char source[], int length) } } - for(i = ustrlen(source); i < 144; i++) { + for(i = length; i < 144; i++) { /* Add the padding */ if(set[length - 1] == 2) { set[i] = 2; @@ -493,7 +494,7 @@ void maxi_do_primary_2(char postcode[], int country, int service) int postcode_length, postcode_num, i; for(i = 0; i < 10; i++) { - if((postcode[i] <= '0') || (postcode[i] >= '9')) { + if((postcode[i] < '0') || (postcode[i] > '9')) { postcode[i] = '\0'; } } @@ -516,13 +517,14 @@ void maxi_do_primary_2(char postcode[], int country, int service) void maxi_do_primary_3(char postcode[], int country, int service) { /* Format structured primary for Mode 3 */ - int i; + int i, h; + h = strlen(postcode); to_upper((unsigned char*)postcode); - for(i = 0; i < strlen(postcode); i++) { - if((postcode[i] >= 65) && (postcode[i] <= 90)) { + for(i = 0; i < h; i++) { + if((postcode[i] >= 'A') && (postcode[i] <= 'Z')) { /* (Capital) letters shifted to Code Set A values */ - postcode[i] = postcode[i] - 64; + postcode[i] -= 64; } if(((postcode[i] == 27) || (postcode[i] == 31)) || ((postcode[i] == 33) || (postcode[i] >= 59))) { /* Not a valid postcode character */ @@ -546,14 +548,14 @@ void maxi_do_primary_3(char postcode[], int country, int service) int maxicode(struct zint_symbol *symbol, unsigned char source[], int length) { - int i, j, block, bit, mode, countrycode = 0, service = 0; + int i, j, block, bit, mode, countrycode = 0, service = 0, lp = 0; int bit_pattern[7], internal_error = 0, eclen, error_number; char postcode[12], countrystr[4], servicestr[4]; #ifndef _MSC_VER - unsigned char local_source[length]; + unsigned char local_source[length + 1]; #else - unsigned char local_source = (unsigned char*)_alloca(length); + unsigned char* local_source = (unsigned char*)_alloca(length + 1); #endif mode = symbol->option_1; @@ -564,9 +566,8 @@ int maxicode(struct zint_symbol *symbol, unsigned char source[], int length) /* The following to be replaced by ECI handling */ switch(symbol->input_mode) { case DATA_MODE: - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } + case GS1_MODE: + memcpy(local_source, source, length); local_source[length] = '\0'; break; case UNICODE_MODE: @@ -574,19 +575,18 @@ int maxicode(struct zint_symbol *symbol, unsigned char source[], int length) if(error_number != 0) { return error_number; } break; } - - for(i = 0; i < 145; i++) { - maxi_codeword[i] = 0; - } + memset(maxi_codeword, 0, sizeof(maxi_codeword)); if(mode == -1) { /* If mode is unspecified */ - if(strlen(symbol->primary) == 0) { + lp = strlen(symbol->primary); + if(lp == 0) { mode = 4; } else { mode = 2; - for(i = 0; i < 10; i++) { + for(i = 0; i < 10 && i < lp; i++) { if((symbol->primary[i] < 48) || (symbol->primary[i] > 57)) { mode = 3; + break; } } } @@ -598,19 +598,19 @@ int maxicode(struct zint_symbol *symbol, unsigned char source[], int length) } if((mode == 2) || (mode == 3)) { /* Modes 2 and 3 need data in symbol->primary */ - if(strlen(symbol->primary) != 15) { + if(lp != 15) { strcpy(symbol->errtxt, "Invalid Primary String"); return ERROR_INVALID_DATA; } for(i = 9; i < 15; i++) { /* check that country code and service are numeric */ - if((symbol->primary[i] < 48) || (symbol->primary[i] > 57)) { + if((symbol->primary[i] < '0') || (symbol->primary[i] > '9')) { strcpy(symbol->errtxt, "Invalid Primary String"); return ERROR_INVALID_DATA; } } - strncpy(postcode, symbol->primary, 9); + memcpy(postcode, symbol->primary, 9); postcode[9] = '\0'; if(mode == 2) { @@ -620,8 +620,7 @@ int maxicode(struct zint_symbol *symbol, unsigned char source[], int length) } } } - - if(mode == 3) { postcode[6] = '\0'; } + else if(mode == 3) { postcode[6] = '\0'; } countrystr[0] = symbol->primary[9]; countrystr[1] = symbol->primary[10]; diff --git a/backend/medical.c b/backend/medical.c index 206a1c3b..ab1a6331 100644 --- a/backend/medical.c +++ b/backend/medical.c @@ -24,16 +24,15 @@ #include #include "common.h" +extern int c39(struct zint_symbol *symbol, unsigned char source[], int length); /* Codabar table checked against EN 798:1995 */ -#define CASET "0123456789-$:/.+ABCD" +#define CALCIUM "0123456789-$:/.+ABCD" static char *CodaTable[20] = {"11111221", "11112211", "11121121", "22111111", "11211211", "21111211", "12111121", "12112111", "12211111", "21121111", "11122111", "11221111", "21112121", "21211121", "21212111", "11212121", "11221211", "12121121", "11121221", "11122211"}; -int c39(struct zint_symbol *symbol, unsigned char source[], int length); - int pharma_one(struct zint_symbol *symbol, unsigned char source[], int length) { /* "Pharmacode can represent only a single integer from 3 to 131070. Unlike other @@ -49,25 +48,22 @@ int pharma_one(struct zint_symbol *symbol, unsigned char source[], int length) the specification at http://www.laetus.com/laetus.php?request=file&id=69 */ unsigned long int tester; - int counter; - char inter[17]; - int error_number; - char dest[1000]; + int counter, error_number, h; + char inter[18] = { 0 }; /* 131070 -> 17 bits */ + char dest[64]; /* 17 * 2 + 1 */ error_number = 0; - strcpy(dest, ""); if(length > 6) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } - strcpy(inter, ""); tester = atoi((char*)source); if((tester < 3) || (tester > 131070)) { @@ -77,7 +73,7 @@ int pharma_one(struct zint_symbol *symbol, unsigned char source[], int length) do { - if(tester%2 == 0) { + if(tester % 2 == 0) { concat(inter, "W"); tester = (tester - 2) / 2; } else { @@ -87,7 +83,9 @@ int pharma_one(struct zint_symbol *symbol, unsigned char source[], int length) } while(tester != 0); - for(counter = (strlen(inter) - 1); counter >= 0; counter--) { + h = strlen(inter) - 1; + *dest = '\0'; + for(counter = h; counter >= 0; counter--) { if(inter[counter] == 'W') { concat(dest, "32"); } else { @@ -108,14 +106,10 @@ int pharma_two_calc(struct zint_symbol *symbol, unsigned char source[], char des from 4 to 64570080. */ unsigned long int tester; - int counter; + int counter, h; char inter[17]; int error_number; - error_number = 0; - strcpy(dest, ""); - - strcpy(inter, ""); tester = atoi((char*)source); if((tester < 4) || (tester > 64570080)) @@ -123,6 +117,8 @@ int pharma_two_calc(struct zint_symbol *symbol, unsigned char source[], char des strcpy(symbol->errtxt, "Data out of range"); return ERROR_INVALID_DATA; } + error_number = 0; + strcpy(inter, ""); do { switch(tester%3) { @@ -142,11 +138,12 @@ int pharma_two_calc(struct zint_symbol *symbol, unsigned char source[], char des } while(tester != 0); - for(counter = (strlen(inter) - 1); counter >= 0; counter--) + h = strlen(inter) - 1; + for(counter = h; counter >= 0; counter--) { - dest[(strlen(inter) - 1) - counter] = inter[counter]; + dest[h - counter] = inter[counter]; } - dest[strlen(inter)] = '\0'; + dest[h + 1] = '\0'; return error_number; } @@ -155,7 +152,7 @@ int pharma_two(struct zint_symbol *symbol, unsigned char source[], int length) { /* Draws the patterns for two track pharmacode */ char height_pattern[200]; - unsigned int loopey; + unsigned int loopey, h; int writer; int error_number = 0; strcpy(height_pattern, ""); @@ -164,7 +161,7 @@ int pharma_two(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; @@ -175,7 +172,8 @@ int pharma_two(struct zint_symbol *symbol, unsigned char source[], int length) } writer = 0; - for(loopey = 0; loopey < strlen(height_pattern); loopey++) + h = strlen(height_pattern); + for(loopey = 0; loopey < h; loopey++) { if((height_pattern[loopey] == '2') || (height_pattern[loopey] == '3')) { @@ -198,12 +196,7 @@ int codabar(struct zint_symbol *symbol, unsigned char source[], int length) { /* The Codabar system consisting of simple substitution */ int i, error_number; - char dest[1000]; -#ifndef _MSC_VER - unsigned char local_source[length]; -#else - unsigned char local_source = (unsigned char*)_alloca(length); -#endif + char dest[512]; error_number = 0; strcpy(dest, ""); @@ -212,26 +205,21 @@ int codabar(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } - to_upper(local_source); - error_number = is_sane(CASET, local_source, length); + to_upper(source); + error_number = is_sane(CALCIUM, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } - /* Codabar must begin and end with the characters A, B, C or D */ - if(((local_source[0] != 'A') && (local_source[0] != 'B')) && - ((local_source[0] != 'C') && (local_source[0] != 'D'))) + if((source[0] != 'A') && (source[0] != 'B') && (source[0] != 'C') && (source[0] != 'D')) { strcpy(symbol->errtxt, "Invalid characters in data"); return ERROR_INVALID_DATA; } - if(((local_source[ustrlen(local_source) - 1] != 'A') && (local_source[ustrlen(local_source) - 1] != 'B')) && - ((local_source[ustrlen(local_source) - 1] != 'C') && (local_source[ustrlen(local_source) - 1] != 'D'))) + if((source[length - 1] != 'A') && (source[length - 1] != 'B') && + (source[length - 1] != 'C') && (source[length - 1] != 'D')) { strcpy(symbol->errtxt, "Invalid characters in data"); return ERROR_INVALID_DATA; @@ -239,18 +227,18 @@ int codabar(struct zint_symbol *symbol, unsigned char source[], int length) for(i = 0; i < length; i++) { - lookup(CASET, CodaTable, local_source[i], dest); + lookup(CALCIUM, CodaTable, source[i], dest); } expand(symbol, dest); - ustrcpy(symbol->text, local_source); + ustrcpy(symbol->text, source); return error_number; } int code32(struct zint_symbol *symbol, unsigned char source[], int length) { /* Italian Pharmacode */ int i, zeroes, error_number, checksum, checkpart, checkdigit; - char localstr[10], tempstr[2], risultante[7]; + char localstr[10], risultante[7]; long int pharmacode, remainder, devisor; int codeword[6]; char tabella[34]; @@ -260,19 +248,16 @@ int code32(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } /* Add leading zeros as required */ - strcpy(localstr, ""); zeroes = 8 - length; - for(i = 0; i < zeroes; i++) { - concat(localstr, "0"); - } - concat(localstr, (char*)source); + memset(localstr, '0', zeroes); + strcpy(localstr + zeroes, (char*)source); /* Calculate the check digit */ checksum = 0; @@ -290,16 +275,11 @@ int code32(struct zint_symbol *symbol, unsigned char source[], int length) /* Add check digit to data string */ checkdigit = checksum % 10; - tempstr[0] = itoc(checkdigit); - tempstr[1] = '\0'; - concat(localstr, tempstr); + localstr[8] = itoc(checkdigit); + localstr[9] = '\0'; /* Convert string into an integer value */ - pharmacode = 0; - for(i = 0; i < 9; i++) { - pharmacode *= 10; - pharmacode += ctoi(localstr[i]); - } + pharmacode = atoi(localstr); /* Convert from decimal to base-32 */ devisor = 33554432; @@ -312,12 +292,10 @@ int code32(struct zint_symbol *symbol, unsigned char source[], int length) /* Look up values in 'Tabella di conversione' */ strcpy(tabella, "0123456789BCDFGHJKLMNPQRSTUVWXYZ"); - strcpy(risultante, ""); for(i = 5; i >= 0; i--) { - tempstr[0] = tabella[codeword[i]]; - concat(risultante, tempstr); + risultante[5 - i] = tabella[codeword[i]]; } - + risultante[6] = '\0'; /* Plot the barcode using Code 39 */ error_number = c39(symbol, (unsigned char*)risultante, strlen(risultante)); if(error_number != 0) { return error_number; } diff --git a/backend/micqr.c b/backend/micqr.c index 9bcd41ef..8356ec6a 100644 --- a/backend/micqr.c +++ b/backend/micqr.c @@ -22,27 +22,26 @@ #include #include #include +#include #include "common.h" #include "reedsol.h" #include "micqr.h" -#include "shiftjis.h" #define NUMERIC 1 #define ALPHANUM 2 #define BYTE 3 #define KANJI 4 -#define QRSET "0123456789ABCDEFGHIJKLNMOPQRSTUVWXYZ $%*+-./:" +#define RHODIUM "0123456789ABCDEFGHIJKLNMOPQRSTUVWXYZ $%*+-./:" -void qrnumeric_encode(char binary[], unsigned char source[]) +void qrnumeric_encode(char binary[], unsigned char source[], int length) { /* Encodes numeric data according to section 6.4.3 */ - int length, blocks, remainder, i; + int blocks, remainder, i; char block_binary[11]; int block_value; block_value = 0; - length = ustrlen(source); blocks = length / 3; remainder = length % 3; @@ -91,20 +90,19 @@ void qrnumeric_encode(char binary[], unsigned char source[]) return; } -void qralpha_encode(char binary[], unsigned char source[]) +void qralpha_encode(char binary[], unsigned char source[], int length) { /* Encodes alphanumeric data according to 6.4.4 */ - int length, blocks, remainder, i; + int blocks, remainder, i; char block_binary[12]; int block_value; - length = ustrlen(source); blocks = length / 2; remainder = length % 2; for(i = 0; i < blocks; i++) { - block_value = posn(QRSET, source[i * 2]) * 45; - block_value += posn(QRSET, source[(i * 2) + 1]); + block_value = posn(RHODIUM, source[i * 2]) * 45; + block_value += posn(RHODIUM, source[(i * 2) + 1]); strcpy(block_binary, ""); if(block_value & 0x400) { concat(block_binary, "1"); } else { concat(block_binary, "0"); } @@ -122,7 +120,7 @@ void qralpha_encode(char binary[], unsigned char source[]) } if(remainder == 1) { - block_value = posn(QRSET, source[i * 2]); + block_value = posn(RHODIUM, source[i * 2]); strcpy(block_binary, ""); if(block_value & 0x20) { concat(block_binary, "1"); } else { concat(block_binary, "0"); } @@ -137,13 +135,11 @@ void qralpha_encode(char binary[], unsigned char source[]) return; } -void qrbyte_encode(char binary[], unsigned char source[]) +void qrbyte_encode(char binary[], unsigned char source[], int length) { /* Encodes byte mode data according to 6.4.5 */ - int length, i; - - length = ustrlen(source); - + int i; + for(i = 0; i < length; i++) { if(source[i] & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); } if(source[i] & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); } @@ -158,14 +154,13 @@ void qrbyte_encode(char binary[], unsigned char source[]) return; } -int qrkanji_encode(char binary[], unsigned char source[]) +int qrkanji_encode(char binary[], unsigned char source[], int length) { /* Assumes input is in Shift-JIS format */ - int i, len, h, val, count; + int i, h, val, count; - len = ustrlen(source); count = 0; - for(i=0; iinput_mode) { - case DATA_MODE: - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } - local_source[length] = '\0'; - break; - case UNICODE_MODE: - error_number = shiftJIS(symbol, source, local_source, &length, &kanji); - if(error_number != 0) { return error_number; } - break; - } if(kanji) { char_system = KANJI; } else { - if(is_sane(QRSET, local_source, length) == 0) { char_system = ALPHANUM; } - if(is_sane(NESET, local_source, length) == 0) { char_system = NUMERIC; } + if(is_sane(RHODIUM, local_source, length) == 0) { char_system = ALPHANUM; } + if(is_sane(NEON, local_source, length) == 0) { char_system = NUMERIC; } } width = 0; format = 0; @@ -799,10 +776,10 @@ int microqr(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(binary_data, ""); switch(symbol_size) { - case 1: versionm1(binary_data, local_source); break; - case 2: versionm2(binary_data, local_source, char_system, symbol->option_1); break; - case 3: versionm3(binary_data, local_source, char_system, symbol->option_1); break; - case 4: versionm4(binary_data, local_source, char_system, symbol->option_1); break; + case 1: versionm1(binary_data, local_source, length); break; + case 2: versionm2(binary_data, local_source, length, char_system, symbol->option_1); break; + case 3: versionm3(binary_data, local_source, length, char_system, symbol->option_1); break; + case 4: versionm4(binary_data, local_source, length, char_system, symbol->option_1); break; } switch(symbol_size) { diff --git a/backend/pdf417.c b/backend/pdf417.c index 82daa828..f0bf2185 100644 --- a/backend/pdf417.c +++ b/backend/pdf417.c @@ -1,1118 +1,2189 @@ -/* pdf417.c - Handles PDF417 stacked symbology */ - -/* Zint - A barcode generating program using libpng - Copyright (C) 2008 Robin Stuart - Portions Copyright (C) 2004 Grandzebu - Bug Fixes thanks to KL Chin - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -/* This code is adapted from "Code barre PDF 417 / PDF 417 barcode" v2.5.0 - which is Copyright (C) 2004 (Grandzebu). - The original code can be downloaded from http://grandzebu.net/index.php */ - -/* NOTE: symbol->option_1 is used to specify the security level (i.e. control the - number of check codewords) - - symbol->option_2 is used to adjust the width of the resulting symbol (i.e. the - number of codeword columns not including row start and end data) */ - -/* @(#) $Id: pdf417.c,v 1.13 2009/09/29 09:45:47 hooper114 Exp $ */ - -#include -#include -#include -#include -#ifndef _MSC_VER -#include -#else -#include "ms_stdint.h" -#endif -#include "pdf417.h" -#include "common.h" -#include "large.h" - -/* - Three figure numbers in comments give the location of command equivalents in the - original Visual Basic source code file pdf417.frm - this code retains some original (French) procedure and variable names to ease conversion */ - -/* text mode processing tables */ -static int asciix[95] = { 7, 8, 8, 4, 12, 4, 4, 8, 8, 8, 12, 4, 12, 12, 12, 12, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 12, 8, 8, 4, 8, 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 8, 8, 8, 4, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 8, 8, 8, 8 }; -static int asciiy[95] = { 26, 10, 20, 15, 18, 21, 10, 28, 23, 24, 22, 20, 13, 16, 17, 19, 0, 1, 2, 3, - 4, 5, 6, 7, 8, 9, 14, 0, 1, 23, 2, 25, 3, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 4, 5, 6, 24, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 21, 27, 9 }; - -/* Automatic sizing table */ -static int MicroAutosize[56] = -{ 4, 6, 7, 8, 10, 12, 13, 14, 16, 18, 19, 20, 24, 29, 30, 33, 34, 37, 39, 46, 54, 58, 70, 72, 82, 90, 108, 126, - 1, 14, 2, 7, 3, 25, 8, 16, 5, 17, 9, 6, 10, 11, 28, 12, 19, 13, 29, 20, 30, 21, 22, 31, 23, 32, 33, 34 -}; - - -int liste[2][1000]; /* global - okay, so I got _almost_ everything local! */ - -/* 866 */ -int quelmode(char codeascii) -{ - int mode; - mode = BYT; - - if((codeascii >= ' ') && (codeascii <= '~')) { mode = TEX; } - if(codeascii == '\t') { mode = TEX; } - if(codeascii == '\n') { mode = TEX; } - if(codeascii == 13) { mode = TEX; } - if((codeascii >= '0') && (codeascii <= '9')) { mode = NUM; } - /* 876 */ - return mode; -} - -/* 844 */ -void regroupe(int *indexliste) -{ - int i, j; - - /* bring together same type blocks */ - if(*(indexliste) > 1) { - i = 1; - while(i < *(indexliste)) { - if(liste[1][i - 1] == liste[1][i]) { - /* bring together */ - liste[0][i - 1] = liste[0][i - 1] + liste[0][i]; - j = i + 1; - - /* decreace the list */ - while(j < *(indexliste)) { - liste[0][j - 1] = liste[0][j]; - liste[1][j - 1] = liste[1][j]; - j++; - } - *(indexliste) = *(indexliste) - 1; - i--; - } - i++; - } - } - /* 865 */ -} - -/* 478 */ -void pdfsmooth(int *indexliste) -{ - int i, crnt, last, next, length; - - for(i = 0; i < *(indexliste); i++) { - crnt = liste[1][i]; - length = liste[0][i]; - if(i != 0) { last = liste[1][i - 1]; } else { last = FALSE; } - if(i != *(indexliste) - 1) { next = liste[1][i + 1]; } else { next = FALSE; } - - if(crnt == NUM) { - if(i == 0) { /* first block */ - if(*(indexliste) > 1) { /* and there are others */ - if((next == TEX) && (length < 8)) { liste[1][i] = TEX;} - if((next == BYT) && (length == 1)) { liste[1][i] = BYT; } - } - } else { - if(i == *(indexliste) - 1) { /* last block */ - if((last == TEX) && (length < 7)) { liste[1][i] = TEX; } - if((last == BYT) && (length == 1)) { liste[1][i] = BYT; } - } else { /* not first or last block */ - if(((last == BYT) && (next == BYT)) && (length < 4)) { liste[1][i] = BYT; } - if(((last == BYT) && (next == TEX)) && (length < 4)) { liste[1][i] = TEX; } - if(((last == TEX) && (next == BYT)) && (length < 5)) { liste[1][i] = TEX; } - if(((last == TEX) && (next == TEX)) && (length < 8)) { liste[1][i] = TEX; } - } - } - } - } - regroupe(indexliste); - /* 520 */ - for(i = 0; i < *(indexliste); i++) { - crnt = liste[1][i]; - length = liste[0][i]; - if(i != 0) { last = liste[1][i - 1]; } else { last = FALSE; } - if(i != *(indexliste) - 1) { next = liste[1][i + 1]; } else { next = FALSE; } - - if((crnt == TEX) && (i > 0)) { /* not the first */ - if(i == *(indexliste) - 1) { /* the last one */ - if((last == BYT) && (length == 1)) { liste[1][i] = BYT; } - } else { /* not the last one */ - if(((last == BYT) && (next == BYT)) && (length < 5)) { liste[1][i] = BYT; } - if((((last == BYT) && (next != BYT)) || ((last != BYT) && (next == BYT))) && (length < 3)) { - liste[1][i] = BYT; - } - } - } - } - /* 540 */ - regroupe(indexliste); -} - -/* 547 */ -void textprocess(int *chainemc, int *mclength, char chaine[], int start, int length, int block) -{ - int j, indexlistet, curtable, listet[2][5000], chainet[5000], wnet; - char codeascii; - - codeascii = 0; - wnet = 0; - - for(j = 0; j < 1000; j++) { - listet[0][j] = 0; - } - /* listet will contain the table numbers and the value of each characters */ - for(indexlistet = 0; indexlistet < length; indexlistet++) { - codeascii = chaine[start + indexlistet]; - switch(codeascii) { - case '\t': listet[0][indexlistet] = 12; listet[1][indexlistet] = 12; break; - case '\n': listet[0][indexlistet] = 8; listet[1][indexlistet] = 15; break; - case 13: listet[0][indexlistet] = 12; listet[1][indexlistet] = 11; break; - default: listet[0][indexlistet] = asciix[codeascii - 32]; - listet[1][indexlistet] = asciiy[codeascii - 32]; break; - } - } - - /* 570 */ - curtable = 1; /* default table */ - for(j = 0; j < length; j++) { - if(listet[0][j] & curtable) { /* The character is in the current table */ - chainet[wnet] = listet[1][j]; - wnet++; - } else { /* Obliged to change table */ - int flag = FALSE; /* True if we change table for only one character */ - if (j == (length - 1)) { - flag = TRUE; - } else { - if(!(listet[0][j] & listet[0][j + 1])) { flag = TRUE; } - } - - if (flag) { /* we change only one character - look for temporary switch */ - if((listet[0][j] & 1) && (curtable == 2)) { /* T_UPP */ - chainet[wnet] = 27; - chainet[wnet + 1] = listet[1][j]; - wnet += 2; - } - if(listet[0][j] & 8) { /* T_PUN */ - chainet[wnet] = 29; - chainet[wnet + 1] = listet[1][j]; - wnet += 2; - } - if(!(((listet[0][j] & 1) && (curtable == 2)) || (listet[0][j] & 8))) { - /* No temporary switch available */ - flag = FALSE; - } - } - - /* 599 */ - if (!(flag)) { - int newtable; - - if(j == (length - 1)) { - newtable = listet[0][j]; - } else { - if(!(listet[0][j] & listet[0][j + 1])) { - newtable = listet[0][j]; - } else { - newtable = listet[0][j] & listet[0][j + 1]; - } - } - - /* Maintain the first if several tables are possible */ - switch (newtable) { - case 3: - case 5: - case 7: - case 9: - case 11: - case 13: - case 15: - newtable = 1; break; - case 6: - case 10: - case 14: - newtable = 2; break; - case 12: - newtable = 4; break; - } - - /* 619 - select the switch */ - switch (curtable) { - case 1: - switch (newtable) { - case 2: chainet[wnet] = 27; wnet++; break; - case 4: chainet[wnet] = 28; wnet++; break; - case 8: chainet[wnet] = 28; wnet++; chainet[wnet] = 25; wnet++; break; - } break; - case 2: - switch (newtable) { - case 1: chainet[wnet] = 28; wnet++; chainet[wnet] = 28; wnet++; break; - case 4: chainet[wnet] = 28; wnet++; break; - case 8: chainet[wnet] = 28; wnet++; chainet[wnet] = 25; wnet++; break; - } break; - case 4: - switch (newtable) { - case 1: chainet[wnet] = 28; wnet++; break; - case 2: chainet[wnet] = 27; wnet++; break; - case 8: chainet[wnet] = 25; wnet++; break; - } break; - case 8: - switch (newtable) { - case 1: chainet[wnet] = 29; wnet++; break; - case 2: chainet[wnet] = 29; wnet++; chainet[wnet] = 27; wnet++; break; - case 4: chainet[wnet] = 29; wnet++; chainet[wnet] = 28; wnet++; break; - } break; - } - curtable = newtable; - /* 659 - at last we add the character */ - chainet[wnet] = listet[1][j]; - wnet++; - } - } - } - - /* 663 */ - if ((wnet % 2) > 0) { - chainet[wnet] = 29; - wnet++; - } - - /* Now translate the string chainet into codewords */ - if (block > 0) { - chainemc[*(mclength)] = 900; - *(mclength) = *(mclength) + 1; - } - - for(j = 0; j < wnet; j+= 2) { - int cw_number; - - cw_number = (30 * chainet[j]) + chainet[j + 1]; - chainemc[*(mclength)] = cw_number; - *(mclength) = *(mclength) + 1; - - } -} - -/* 671 */ -void byteprocess(int *chainemc, int *mclength, unsigned char chaine[], int start, int length, int block) -{ - int debug = 0; - int len = 0; - unsigned int chunkLen = 0; - uint64_t mantisa = 0ULL; - uint64_t total = 0ULL; - - if(debug) printf("\nEntering byte mode at position %d\n", start); - - if(length == 1) { - chainemc[(*mclength)++] = 913; - chainemc[(*mclength)++] = chaine[start]; - if(debug) { printf("913 %d\n", chainemc[*mclength - 1]); } - } else { - /* select the switch for multiple of 6 bytes */ - if (length % 6 == 0) { - chainemc[(*mclength)++] = 924; - if(debug) printf("924 "); - } else { - chainemc[(*mclength)++] = 901; - if(debug) printf("901 "); - } - - while (len < length) - { - chunkLen = length - len; - if (6 <= chunkLen) /* Take groups of 6 */ - { - chunkLen = 6; - len += chunkLen; - total = 0ULL; - - while (chunkLen--) - { - mantisa = chaine[start++]; - total |= mantisa << (uint64_t)(chunkLen * 8ULL); - } - - chunkLen = 5; - - while (chunkLen--) - { - chainemc[*mclength + chunkLen] = (int)(total % 900ULL); - total /= 900ULL; - } - *mclength += 5; - } - else /* If it remain a group of less than 6 bytes */ - { - len += chunkLen; - - while (chunkLen--) - { - chainemc[(*mclength)++] = chaine[start++]; - } - } - } - } -} - -/* 712 */ -void numbprocess(int *chainemc, int *mclength, char chaine[], int start, int length, int block) -{ - int j, loop, longueur, dummy[100], dumlength, diviseur, nombre; - char chainemod[50], chainemult[100], temp; - - strcpy(chainemod, ""); - for(loop = 0; loop <= 50; loop++) { - dummy[loop] = 0; - } - - chainemc[*(mclength)] = 902; - *(mclength) = *(mclength) + 1; - - j = 0; - while(j < length) { - dumlength = 0; - strcpy(chainemod, ""); - longueur = length - j; - if(longueur > 44) { longueur = 44; } - concat(chainemod, "1"); - for(loop = 1; loop <= longueur; loop++) { - chainemod[loop] = chaine[start + loop + j - 1]; - } - chainemod[longueur + 1] = '\0'; - do { - diviseur = 900; - - /* 877 - gosub Modulo */ - strcpy(chainemult, ""); - nombre = 0; - while(strlen(chainemod) != 0) { - nombre *= 10; - nombre += ctoi(chainemod[0]); - for(loop = 0; loop < strlen(chainemod); loop++) { - chainemod[loop] = chainemod[loop + 1]; - } - if (nombre < diviseur) { - if (strlen(chainemult) != 0) { concat(chainemult, "0"); } - } else { - temp = (nombre / diviseur) + '0'; - chainemult[strlen(chainemult) + 1] = '\0'; - chainemult[strlen(chainemult)] = temp; - } - nombre = nombre % diviseur; - } - diviseur = nombre; - /* return to 723 */ - - for(loop = dumlength; loop > 0; loop--) { - dummy[loop] = dummy[loop - 1]; - } - dummy[0] = diviseur; - dumlength++; - strcpy(chainemod, chainemult); - } while(strlen(chainemult) != 0); - for(loop = 0; loop < dumlength; loop++) { - chainemc[*(mclength)] = dummy[loop]; - *(mclength) = *(mclength) + 1; - } - j += longueur; - } -} - -/* 366 */ -int pdf417(struct zint_symbol *symbol, unsigned char chaine[], int length) -{ - int i, k, j, indexchaine, indexliste, mode, longueur, loop, mccorrection[520], offset; - int total, chainemc[2700], mclength, c1, c2, c3, dummy[35], codeerr; - char codebarre[100], pattern[580]; - int debug = 0; - - codeerr = 0; - - /* 456 */ - indexliste = 0; - indexchaine = 0; - - mode = quelmode(chaine[indexchaine]); - - for(i = 0; i < 1000; i++) { - liste[0][i] = 0; - } - - /* 463 */ - do { - liste[1][indexliste] = mode; - while ((liste[1][indexliste] == mode) && (indexchaine < length)) { - liste[0][indexliste]++; - indexchaine++; - mode = quelmode(chaine[indexchaine]); - } - indexliste++; - } while (indexchaine < length); - - /* 474 */ - pdfsmooth(&indexliste); - - if(debug) { - printf("Initial block pattern:\n"); - for(i = 0; i < indexliste; i++) { - printf("Len: %d Type: ", liste[0][i]); - switch(liste[1][i]) { - case TEX: printf("Text\n"); break; - case BYT: printf("Byte\n"); break; - case NUM: printf("Number\n"); break; - default: printf("ERROR\n"); break; - } - } - } - - /* 541 - now compress the data */ - indexchaine = 0; - mclength = 0; - for(i = 0; i < indexliste; i++) { - switch(liste[1][i]) { - case TEX: /* 547 - text mode */ - textprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i); - break; - case BYT: /* 670 - octet stream mode */ - byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], i); - break; - case NUM: /* 712 - numeric mode */ - numbprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i); - break; - } - indexchaine = indexchaine + liste[0][i]; - } - - if(debug) { - printf("\nCompressed data stream:\n"); - for(i = 0; i < mclength; i++) { - printf("%d ", chainemc[i]); - } - printf("\n\n"); - } - - /* 752 - Now take care of the number of CWs per row */ - if (symbol->option_1 < 0) { - /* note that security level 8 is never used automatically */ - symbol->option_1 = 7; - if(mclength <= 1280) { symbol->option_1 = 6; } - if(mclength <= 640) { symbol->option_1 = 5; } - if(mclength <= 320) { symbol->option_1 = 4; } - if(mclength <= 160) { symbol->option_1 = 3; } - if(mclength <= 40) { symbol->option_1 = 2; } - } - k = 1; - for(loop = 1; loop <= (symbol->option_1 + 1); loop++) - { - k *= 2; - } - - longueur = mclength; - if(symbol->option_2 > 30) { symbol->option_2 = 30; } - if(symbol->option_2 < 1) { - /* This is a much more simple formula to Grand Zebu's - - it does not try to make the symbol square */ - symbol->option_2 = 0.5 + sqrt((longueur + k) / 3.0); - } - if(((longueur + k) / symbol->option_2) > 90) { - /* stop the symbol from becoming too high */ - symbol->option_2 = symbol->option_2 + 1; - } - - /* Reduce the correction level if there isn't room */ - /* while((longueur + k > PDF_MAX) && (symbol->option_1 > 0)) { - symbol->option_1 = symbol->option_1 - 1; - for(loop = 0; loop <= (symbol->option_1 + 1); loop++) - { - k *= 2; - } - } */ - /* this bit of the code would allow Zint to happily encode 2698 code words with - only 2 check digits, so I have abandoned it! - Zint now insists on a proportional - amount of check data unless overruled by the user */ - - if(longueur + k > symbol->option_3) { - return 2; - } - if(((longueur + k) / symbol->option_2) > 90) { - return 4; - } - - /* 781 - Padding calculation */ - longueur = mclength + 1 + k; - i = 0; - if ((longueur / symbol->option_2) < 3) { - i = (symbol->option_2 * 3) - longueur; /* A bar code must have at least three rows */ - } else { - if((longueur % symbol->option_2) > 0) { i = symbol->option_2 - (longueur % symbol->option_2); } - } - /* We add the padding */ - while (i > 0) { - chainemc[mclength] = 900; - mclength++; - i--; - } - /* we add the length descriptor */ - for(i = mclength; i > 0; i--) { - chainemc[i] = chainemc[i - 1]; - } - chainemc[0] = mclength + 1; - mclength++; - - /* 796 - we now take care of the Reed Solomon codes */ - switch(symbol->option_1) { - case 1: offset = 2; break; - case 2: offset = 6; break; - case 3: offset = 14; break; - case 4: offset = 30; break; - case 5: offset = 62; break; - case 6: offset = 126; break; - case 7: offset = 254; break; - case 8: offset = 510; break; - default: offset = 0; break; - } - - longueur = mclength; - for(loop = 0; loop < 520; loop++) { - mccorrection[loop] = 0; - } - total = 0; - for(i = 0; i < longueur; i++) { - total = (chainemc[i] + mccorrection[k - 1]) % 929; - for(j = k - 1; j > 0; j--) { - mccorrection[j] = (mccorrection[j - 1] + 929 - (total * coefrs[offset + j]) % 929) % 929; - } - mccorrection[0] = (929 - (total * coefrs[offset + j]) % 929) % 929; - } - - /* we add these codes to the string */ - for(i = k - 1; i >= 0; i--) { - chainemc[mclength++] = mccorrection[i] ? 929 - mccorrection[i] : 0; - } - - /* 818 - The CW string is finished */ - c1 = (mclength / symbol->option_2 - 1) / 3; - c2 = symbol->option_1 * 3 + (mclength / symbol->option_2 - 1) % 3; - c3 = symbol->option_2 - 1; - - /* we now encode each row */ - for(i = 0; i <= (mclength / symbol->option_2) - 1; i++) { - for(j = 0; j < symbol->option_2 ; j++) { - dummy[j + 1] = chainemc[i * symbol->option_2 + j]; - } - k = (i / 3) * 30; - switch(i % 3) { - /* follows this pattern from US Patent 5,243,655: - Row 0: L0 (row #, # of rows) R0 (row #, # of columns) - Row 1: L1 (row #, security level) R1 (row #, # of rows) - Row 2: L2 (row #, # of columns) R2 (row #, security level) - Row 3: L3 (row #, # of rows) R3 (row #, # of columns) - etc. */ - case 0: - dummy[0] = k + c1; - dummy[symbol->option_2 + 1] = k + c3; - break; - case 1: - dummy[0] = k + c2; - dummy[symbol->option_2 + 1] = k + c1; - break; - case 2: - dummy[0] = k + c3; - dummy[symbol->option_2 + 1] = k + c2; - break; - } - strcpy(codebarre, "+*"); /* Start with a start char and a separator */ - if(symbol->symbology == BARCODE_PDF417TRUNC) { - /* truncated - so same as before except knock off the last 5 chars */ - for(j = 0; j <= symbol->option_2; j++) { - switch(i % 3) { - case 1: offset = 929; break; - case 2: offset = 1858; break; - default: offset = 0; break; - } - concat(codebarre, codagemc[offset + dummy[j]]); - concat(codebarre, "*"); - } - } else { - /* normal PDF417 symbol */ - for(j = 0; j <= symbol->option_2 + 1; j++) { - switch(i % 3) { - case 1: offset = 929; /* cluster(3) */ break; - case 2: offset = 1858; /* cluster(6) */ break; - default: offset = 0; /* cluster(0) */ break; - } - concat(codebarre, codagemc[offset + dummy[j]]); - concat(codebarre, "*"); - } - concat(codebarre, "-"); - } - - strcpy(pattern, ""); - for(loop = 0; loop < strlen(codebarre); loop++) { - lookup(BRSET, PDFttf, codebarre[loop], pattern); - } - for(loop = 0; loop < strlen(pattern); loop++) { - if(pattern[loop] == '1') { set_module(symbol, i, loop); } - } - symbol->row_height[i] = 3; - } - symbol->rows = (mclength / symbol->option_2); - symbol->width = strlen(pattern); - - /* 843 */ - return codeerr; -} - -/* 345 */ -int pdf417enc(struct zint_symbol *symbol, unsigned char source[], int length) -{ - int codeerr, error_number, i; - -#ifndef _MSC_VER - unsigned char local_source[length]; -#else - unsigned char local_source = (unsigned char*)_alloca(length); -#endif - - error_number = 0; - - if((symbol->option_1 < -1) || (symbol->option_1 > 8)) { - strcpy(symbol->errtxt, "Security value out of range"); - symbol->option_1 = -1; - error_number = WARN_INVALID_OPTION; - } - if((symbol->option_2 < 0) || (symbol->option_2 > 30)) { - strcpy(symbol->errtxt, "Number of columns out of range"); - symbol->option_2 = 0; - error_number = WARN_INVALID_OPTION; - } - - /* The following to be replaced by ECI handling */ - switch(symbol->input_mode) { - case DATA_MODE: - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } - local_source[length] = '\0'; - break; - case UNICODE_MODE: - error_number = latin1_process(symbol, source, local_source, &length); - if(error_number != 0) { return error_number; } - break; - } - - /* 349 */ - codeerr = pdf417(symbol, local_source, length); - - /* 352 */ - if(codeerr != 0) { - switch(codeerr) { - case 1: - strcpy(symbol->errtxt, "No such file or file unreadable"); - error_number = ERROR_INVALID_OPTION; - break; - case 2: - strcpy(symbol->errtxt, "Input string too long"); - error_number = ERROR_TOO_LONG; - break; - case 3: - strcpy(symbol->errtxt, "Number of codewords per row too small"); - error_number = WARN_INVALID_OPTION; - break; - case 4: - strcpy(symbol->errtxt, "Data too long for specified number of columns"); - error_number = ERROR_TOO_LONG; - break; - default: - strcpy(symbol->errtxt, "Something strange happened"); - error_number = ERROR_ENCODING_PROBLEM; - break; - } - } - - /* 364 */ - return error_number; -} - - -int micro_pdf417(struct zint_symbol *symbol, unsigned char source[], int length) -{ /* like PDF417 only much smaller! */ - - int i, k, j, indexchaine, indexliste, mode, longueur, mccorrection[50], offset; - int total, chainemc[2700], mclength, dummy[5], codeerr; - char codebarre[100], pattern[580]; - int variant, LeftRAPStart, CentreRAPStart, RightRAPStart, StartCluster; - int LeftRAP, CentreRAP, RightRAP, Cluster, writer, flip, loop; - int debug = 0; - -#ifndef _MSC_VER - unsigned char chaine[length]; -#else - unsigned char chaine = (unsigned char*)_alloca(length); -#endif - - /* Encoding starts out the same as PDF417, so use the same code */ - codeerr = 0; - - /* 456 */ - indexliste = 0; - indexchaine = 0; - - /* The following to be replaced by ECI handling */ - switch(symbol->input_mode) { - case DATA_MODE: - for(i = 0; i < length; i++) { - chaine[i] = source[i]; - } - chaine[length] = '\0'; - break; - case UNICODE_MODE: - codeerr = latin1_process(symbol, source, chaine, &length); - if(codeerr != 0) { return codeerr; } - break; - } - - mode = quelmode(chaine[indexchaine]); - - for(i = 0; i < 1000; i++) { - liste[0][i] = 0; - } - - /* 463 */ - do { - liste[1][indexliste] = mode; - while ((liste[1][indexliste] == mode) && (indexchaine < length)) { - liste[0][indexliste]++; - indexchaine++; - mode = quelmode(chaine[indexchaine]); - } - indexliste++; - } while (indexchaine < length); - - /* 474 */ - pdfsmooth(&indexliste); - - if(debug) { - printf("Initial mapping:\n"); - for(i = 0; i < indexliste; i++) { - printf("len: %d type: ", liste[0][i]); - switch(liste[1][i]) { - case TEX: printf("TEXT\n"); break; - case BYT: printf("BYTE\n"); break; - case NUM: printf("NUMBER\n"); break; - default: printf("*ERROR*\n"); break; - } - } - } - - /* 541 - now compress the data */ - indexchaine = 0; - mclength = 0; - for(i = 0; i < indexliste; i++) { - switch(liste[1][i]) { - case TEX: /* 547 - text mode */ - textprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i); - break; - case BYT: /* 670 - octet stream mode */ - byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], i); - break; - case NUM: /* 712 - numeric mode */ - numbprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i); - break; - } - indexchaine = indexchaine + liste[0][i]; - } - - /* This is where it all changes! */ - - if(mclength > 126) { - strcpy(symbol->errtxt, "Input data too long"); - return ERROR_TOO_LONG; - } - if(symbol->option_2 > 4) { - strcpy(symbol->errtxt, "Specified width out of range"); - symbol->option_2 = 0; - codeerr = WARN_INVALID_OPTION; - } - - if(debug) { - printf("\nEncoded Data Stream:\n"); - for(i = 0; i < mclength; i++) { - printf("0x%02X ", chainemc[i]); - } - printf("\n"); - } - - /* Now figure out which variant of the symbol to use and load values accordingly */ - - variant = 0; - - if((symbol->option_2 == 1) && (mclength > 20)) { - /* the user specified 1 column but the data doesn't fit - go to automatic */ - symbol->option_2 = 0; - strcpy(symbol->errtxt, "Specified symbol size too small for data"); - codeerr = WARN_INVALID_OPTION; - } - - if((symbol->option_2 == 2) && (mclength > 37)) { - /* the user specified 2 columns but the data doesn't fit - go to automatic */ - symbol->option_2 = 0; - strcpy(symbol->errtxt, "Specified symbol size too small for data"); - codeerr = WARN_INVALID_OPTION; - } - - if((symbol->option_2 == 3) && (mclength > 82)) { - /* the user specified 3 columns but the data doesn't fit - go to automatic */ - symbol->option_2 = 0; - strcpy(symbol->errtxt, "Specified symbol size too small for data"); - codeerr = WARN_INVALID_OPTION; - } - - if(symbol->option_2 == 1) { - /* the user specified 1 column and the data does fit */ - variant = 6; - if(mclength <= 16) { variant = 5; } - if(mclength <= 12) { variant = 4; } - if(mclength <= 10) { variant = 3; } - if(mclength <= 7) { variant = 2; } - if(mclength <= 4) { variant = 1; } - } - - if(symbol->option_2 == 2) { - /* the user specified 2 columns and the data does fit */ - variant = 13; - if(mclength <= 33) { variant = 12; } - if(mclength <= 29) { variant = 11; } - if(mclength <= 24) { variant = 10; } - if(mclength <= 19) { variant = 9; } - if(mclength <= 13) { variant = 8; } - if(mclength <= 8) { variant = 7; } - } - - if(symbol->option_2 == 3) { - /* the user specified 3 columns and the data does fit */ - variant = 23; - if(mclength <= 70) { variant = 22; } - if(mclength <= 58) { variant = 21; } - if(mclength <= 46) { variant = 20; } - if(mclength <= 34) { variant = 19; } - if(mclength <= 24) { variant = 18; } - if(mclength <= 18) { variant = 17; } - if(mclength <= 14) { variant = 16; } - if(mclength <= 10) { variant = 15; } - if(mclength <= 6) { variant = 14; } - } - - if(symbol->option_2 == 4) { - /* the user specified 4 columns and the data does fit */ - variant = 34; - if(mclength <= 108) { variant = 33; } - if(mclength <= 90) { variant = 32; } - if(mclength <= 72) { variant = 31; } - if(mclength <= 54) { variant = 30; } - if(mclength <= 39) { variant = 29; } - if(mclength <= 30) { variant = 28; } - if(mclength <= 24) { variant = 27; } - if(mclength <= 18) { variant = 26; } - if(mclength <= 12) { variant = 25; } - if(mclength <= 8) { variant = 24; } - } - - if(variant == 0) { - /* Zint can choose automatically from all available variations */ - for(i = 27; i >= 0; i--) { - - if(MicroAutosize[i] >= mclength) { - variant = MicroAutosize[i + 28]; - } - } - } - - /* Now we have the variant we can load the data */ - variant --; - symbol->option_2 = MicroVariants[variant]; /* columns */ - symbol->rows = MicroVariants[variant + 34]; /* rows */ - k = MicroVariants[variant + 68]; /* number of EC CWs */ - longueur = (symbol->option_2 * symbol->rows) - k; /* number of non-EC CWs */ - i = longueur - mclength; /* amount of padding required */ - offset = MicroVariants[variant + 102]; /* coefficient offset */ - - if(debug) { - printf("\nChoose symbol size:\n"); - printf("%d columns x %d rows\n", symbol->option_2, symbol->rows); - printf("%d data codewords (including %d pads), %d ecc codewords\n", longueur, i, k); - printf("\n"); - } - - /* We add the padding */ - while (i > 0) { - chainemc[mclength] = 900; - mclength++; - i--; - } - - /* Reed-Solomon error correction */ - longueur = mclength; - for(loop = 0; loop < 50; loop++) { - mccorrection[loop] = 0; - } - total = 0; - for(i = 0; i < longueur; i++) { - total = (chainemc[i] + mccorrection[k - 1]) % 929; - for(j = k - 1; j >= 0; j--) { - if(j == 0) { - mccorrection[j] = (929 - (total * Microcoeffs[offset + j]) % 929) % 929; - } else { - mccorrection[j] = (mccorrection[j - 1] + 929 - (total * Microcoeffs[offset + j]) % 929) % 929; - } - } - } - - for(j = 0; j < k; j++) { - if(mccorrection[j] != 0) { mccorrection[j] = 929 - mccorrection[j]; } - } - /* we add these codes to the string */ - for(i = k - 1; i >= 0; i--) { - chainemc[mclength] = mccorrection[i]; - mclength++; - } - - if(debug) { - printf("Encoded Data Stream with ECC:\n"); - for(i = 0; i < mclength; i++) { - printf("0x%02X ", chainemc[i]); - } - printf("\n"); - } - - /* Now get the RAP (Row Address Pattern) start values */ - LeftRAPStart = RAPTable[variant]; - CentreRAPStart = RAPTable[variant + 34]; - RightRAPStart = RAPTable[variant + 68]; - StartCluster = RAPTable[variant + 102] / 3; - - /* That's all values loaded, get on with the encoding */ - - LeftRAP = LeftRAPStart; - CentreRAP = CentreRAPStart; - RightRAP = RightRAPStart; - Cluster = StartCluster; /* Cluster can be 0, 1 or 2 for Cluster(0), Cluster(3) and Cluster(6) */ - - if(debug) printf("\nInternal row representation:\n"); - for(i = 0; i < symbol->rows; i++) { - if(debug) printf("row %d: ", i); - strcpy(codebarre, ""); - offset = 929 * Cluster; - for(j = 0; j < 5; j++) { - dummy[j] = 0; - } - for(j = 0; j < symbol->option_2 ; j++) { - dummy[j + 1] = chainemc[i * symbol->option_2 + j]; - if(debug) printf("[%d] ", dummy[j + 1]); - } - - /* Copy the data into codebarre */ - concat(codebarre, RAPLR[LeftRAP]); - concat(codebarre, "1"); - concat(codebarre, codagemc[offset + dummy[1]]); - concat(codebarre, "1"); - if(symbol->option_2 == 3) { - concat(codebarre, RAPC[CentreRAP]); - } - if(symbol->option_2 >= 2) { - concat(codebarre, "1"); - concat(codebarre, codagemc[offset + dummy[2]]); - concat(codebarre, "1"); - } - if(symbol->option_2 == 4) { - concat(codebarre, RAPC[CentreRAP]); - } - if(symbol->option_2 >= 3) { - concat(codebarre, "1"); - concat(codebarre, codagemc[offset + dummy[3]]); - concat(codebarre, "1"); - } - if(symbol->option_2 == 4) { - concat(codebarre, "1"); - concat(codebarre, codagemc[offset + dummy[4]]); - concat(codebarre, "1"); - } - concat(codebarre, RAPLR[RightRAP]); - concat(codebarre, "1"); /* stop */ - if(debug) printf("%s\n", codebarre); - - /* Now codebarre is a mixture of letters and numbers */ - - writer = 0; - flip = 1; - strcpy(pattern, ""); - for(loop = 0; loop < strlen(codebarre); loop++) { - if((codebarre[loop] >= '0') && (codebarre[loop] <= '9')) { - for(k = 0; k < ctoi(codebarre[loop]); k++) { - if(flip == 0) { - pattern[writer] = '0'; - } else { - pattern[writer] = '1'; - } - writer++; - } - pattern[writer] = '\0'; - if(flip == 0) { - flip = 1; - } else { - flip = 0; - } - } else { - lookup(BRSET, PDFttf, codebarre[loop], pattern); - writer += 5; - } - } - symbol->width = writer; - - /* so now pattern[] holds the string of '1's and '0's. - copy this to the symbol */ - for(loop = 0; loop < strlen(pattern); loop++) { - if(pattern[loop] == '1') { set_module(symbol, i, loop); } - } - symbol->row_height[i] = 2; - - /* Set up RAPs and Cluster for next row */ - LeftRAP++; - CentreRAP++; - RightRAP++; - Cluster++; - - if(LeftRAP == 53) { - LeftRAP = 1; - } - if(CentreRAP == 53) { - CentreRAP = 1; - } - if(RightRAP == 53) { - RightRAP = 1; - } - if(Cluster == 3) { - Cluster = 0; - } - } - - return codeerr; -} - +/* pdf417.c - Handles PDF417 stacked symbology */ + + + +/* Zint - A barcode generating program using libpng + + Copyright (C) 2008 Robin Stuart + + Portions Copyright (C) 2004 Grandzebu + + Bug Fixes thanks to KL Chin + + + + This program is free software; you can redistribute it and/or modify + + it under the terms of the GNU General Public License as published by + + the Free Software Foundation; either version 3 of the License, or + + (at your option) any later version. + + + + This program is distributed in the hope that it will be useful, + + but WITHOUT ANY WARRANTY; without even the implied warranty of + + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + + GNU General Public License for more details. + + + + You should have received a copy of the GNU General Public License along + + with this program; if not, write to the Free Software Foundation, Inc., + + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*/ + + + +/* This code is adapted from "Code barre PDF 417 / PDF 417 barcode" v2.5.0 + + which is Copyright (C) 2004 (Grandzebu). + + The original code can be downloaded from http://grandzebu.net/index.php */ + + + +/* NOTE: symbol->option_1 is used to specify the security level (i.e. control the + + number of check codewords) + + + + symbol->option_2 is used to adjust the width of the resulting symbol (i.e. the + + number of codeword columns not including row start and end data) */ + + + +/* @(#) $Id: pdf417.c,v 1.14 2009/10/06 19:03:01 hooper114 Exp $ */ + + + +#include + +#include + +#include + +#include + +#ifndef _MSC_VER + +#include + +#else +#include +#include "ms_stdint.h" + +#endif + +#include "pdf417.h" + +#include "common.h" + +#include "large.h" + + + +/* + + Three figure numbers in comments give the location of command equivalents in the + + original Visual Basic source code file pdf417.frm + + this code retains some original (French) procedure and variable names to ease conversion */ + + + +/* text mode processing tables */ + +static int asciix[95] = { 7, 8, 8, 4, 12, 4, 4, 8, 8, 8, 12, 4, 12, 12, 12, 12, 4, 4, 4, 4, 4, 4, 4, 4, + + 4, 4, 12, 8, 8, 4, 8, 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 8, 8, 8, 4, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 2, 2, 2, 2, 8, 8, 8, 8 }; + +static int asciiy[95] = { 26, 10, 20, 15, 18, 21, 10, 28, 23, 24, 22, 20, 13, 16, 17, 19, 0, 1, 2, 3, + + 4, 5, 6, 7, 8, 9, 14, 0, 1, 23, 2, 25, 3, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 4, 5, 6, 24, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, + + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 21, 27, 9 }; + + + +/* Automatic sizing table */ + +static int MicroAutosize[56] = + +{ 4, 6, 7, 8, 10, 12, 13, 14, 16, 18, 19, 20, 24, 29, 30, 33, 34, 37, 39, 46, 54, 58, 70, 72, 82, 90, 108, 126, + + 1, 14, 2, 7, 3, 25, 8, 16, 5, 17, 9, 6, 10, 11, 28, 12, 19, 13, 29, 20, 30, 21, 22, 31, 23, 32, 33, 34 + +}; + + + + + +int liste[2][1000]; /* global - okay, so I got _almost_ everything local! */ + + + +/* 866 */ + +int quelmode(char codeascii) + +{ + int mode = BYT; + + if ((codeascii == '\t') || (codeascii == '\n') || (codeascii == '\r') || ((codeascii >= ' ') && (codeascii <= '~'))) { mode = TEX; } + else if((codeascii >= '0') && (codeascii <= '9')) { mode = NUM; } + /* 876 */ + + return mode; + +} + + + +/* 844 */ + +void regroupe(int *indexliste) + +{ + + int i, j; + + + + /* bring together same type blocks */ + + if(*(indexliste) > 1) { + + i = 1; + + while(i < *(indexliste)) { + + if(liste[1][i - 1] == liste[1][i]) { + + /* bring together */ + + liste[0][i - 1] = liste[0][i - 1] + liste[0][i]; + + j = i + 1; + + + + /* decreace the list */ + + while(j < *(indexliste)) { + + liste[0][j - 1] = liste[0][j]; + + liste[1][j - 1] = liste[1][j]; + + j++; + + } + + *(indexliste) = *(indexliste) - 1; + + i--; + + } + + i++; + + } + + } + + /* 865 */ + +} + + + +/* 478 */ + +void pdfsmooth(int *indexliste) + +{ + + int i, crnt, last, next, length; + + + + for(i = 0; i < *(indexliste); i++) { + + crnt = liste[1][i]; + + length = liste[0][i]; + + if(i != 0) { last = liste[1][i - 1]; } else { last = FALSE; } + + if(i != *(indexliste) - 1) { next = liste[1][i + 1]; } else { next = FALSE; } + + + + if(crnt == NUM) { + + if(i == 0) { /* first block */ + + if(*(indexliste) > 1) { /* and there are others */ + + if((next == TEX) && (length < 8)) { liste[1][i] = TEX;} + + if((next == BYT) && (length == 1)) { liste[1][i] = BYT; } + + } + + } else { + + if(i == *(indexliste) - 1) { /* last block */ + + if((last == TEX) && (length < 7)) { liste[1][i] = TEX; } + + if((last == BYT) && (length == 1)) { liste[1][i] = BYT; } + + } else { /* not first or last block */ + + if(((last == BYT) && (next == BYT)) && (length < 4)) { liste[1][i] = BYT; } + + if(((last == BYT) && (next == TEX)) && (length < 4)) { liste[1][i] = TEX; } + + if(((last == TEX) && (next == BYT)) && (length < 5)) { liste[1][i] = TEX; } + + if(((last == TEX) && (next == TEX)) && (length < 8)) { liste[1][i] = TEX; } + + } + + } + + } + + } + + regroupe(indexliste); + + /* 520 */ + + for(i = 0; i < *(indexliste); i++) { + + crnt = liste[1][i]; + + length = liste[0][i]; + + if(i != 0) { last = liste[1][i - 1]; } else { last = FALSE; } + + if(i != *(indexliste) - 1) { next = liste[1][i + 1]; } else { next = FALSE; } + + + + if((crnt == TEX) && (i > 0)) { /* not the first */ + + if(i == *(indexliste) - 1) { /* the last one */ + + if((last == BYT) && (length == 1)) { liste[1][i] = BYT; } + + } else { /* not the last one */ + + if(((last == BYT) && (next == BYT)) && (length < 5)) { liste[1][i] = BYT; } + + if((((last == BYT) && (next != BYT)) || ((last != BYT) && (next == BYT))) && (length < 3)) { + + liste[1][i] = BYT; + + } + + } + + } + + } + + /* 540 */ + + regroupe(indexliste); + +} + + + +/* 547 */ + +void textprocess(int *chainemc, int *mclength, char chaine[], int start, int length, int block) + +{ + + int j, indexlistet, curtable, listet[2][5000], chainet[5000], wnet; + + char codeascii; + + + + codeascii = 0; + + wnet = 0; + + + + for(j = 0; j < 1000; j++) { + + listet[0][j] = 0; + + } + + /* listet will contain the table numbers and the value of each characters */ + + for(indexlistet = 0; indexlistet < length; indexlistet++) { + + codeascii = chaine[start + indexlistet]; + + switch(codeascii) { + + case '\t': listet[0][indexlistet] = 12; listet[1][indexlistet] = 12; break; + + case '\n': listet[0][indexlistet] = 8; listet[1][indexlistet] = 15; break; + + case 13: listet[0][indexlistet] = 12; listet[1][indexlistet] = 11; break; + + default: listet[0][indexlistet] = asciix[codeascii - 32]; + + listet[1][indexlistet] = asciiy[codeascii - 32]; break; + + } + + } + + + + /* 570 */ + + curtable = 1; /* default table */ + + for(j = 0; j < length; j++) { + + if(listet[0][j] & curtable) { /* The character is in the current table */ + + chainet[wnet] = listet[1][j]; + + wnet++; + + } else { /* Obliged to change table */ + + int flag = FALSE; /* True if we change table for only one character */ + + if (j == (length - 1)) { + + flag = TRUE; + + } else { + + if(!(listet[0][j] & listet[0][j + 1])) { flag = TRUE; } + + } + + + + if (flag) { /* we change only one character - look for temporary switch */ + + if((listet[0][j] & 1) && (curtable == 2)) { /* T_UPP */ + + chainet[wnet] = 27; + + chainet[wnet + 1] = listet[1][j]; + + wnet += 2; + + } + + if(listet[0][j] & 8) { /* T_PUN */ + + chainet[wnet] = 29; + + chainet[wnet + 1] = listet[1][j]; + + wnet += 2; + + } + + if(!(((listet[0][j] & 1) && (curtable == 2)) || (listet[0][j] & 8))) { + + /* No temporary switch available */ + + flag = FALSE; + + } + + } + + + + /* 599 */ + + if (!(flag)) { + + int newtable; + + + + if(j == (length - 1)) { + + newtable = listet[0][j]; + + } else { + + if(!(listet[0][j] & listet[0][j + 1])) { + + newtable = listet[0][j]; + + } else { + + newtable = listet[0][j] & listet[0][j + 1]; + + } + + } + + + + /* Maintain the first if several tables are possible */ + + switch (newtable) { + + case 3: + + case 5: + + case 7: + + case 9: + + case 11: + + case 13: + + case 15: + + newtable = 1; break; + + case 6: + + case 10: + + case 14: + + newtable = 2; break; + + case 12: + + newtable = 4; break; + + } + + + + /* 619 - select the switch */ + + switch (curtable) { + + case 1: + + switch (newtable) { + + case 2: chainet[wnet] = 27; wnet++; break; + + case 4: chainet[wnet] = 28; wnet++; break; + + case 8: chainet[wnet] = 28; wnet++; chainet[wnet] = 25; wnet++; break; + + } break; + + case 2: + + switch (newtable) { + + case 1: chainet[wnet] = 28; wnet++; chainet[wnet] = 28; wnet++; break; + + case 4: chainet[wnet] = 28; wnet++; break; + + case 8: chainet[wnet] = 28; wnet++; chainet[wnet] = 25; wnet++; break; + + } break; + + case 4: + + switch (newtable) { + + case 1: chainet[wnet] = 28; wnet++; break; + + case 2: chainet[wnet] = 27; wnet++; break; + + case 8: chainet[wnet] = 25; wnet++; break; + + } break; + + case 8: + + switch (newtable) { + + case 1: chainet[wnet] = 29; wnet++; break; + + case 2: chainet[wnet] = 29; wnet++; chainet[wnet] = 27; wnet++; break; + + case 4: chainet[wnet] = 29; wnet++; chainet[wnet] = 28; wnet++; break; + + } break; + + } + + curtable = newtable; + + /* 659 - at last we add the character */ + + chainet[wnet] = listet[1][j]; + + wnet++; + + } + + } + + } + + + + /* 663 */ + + if ((wnet % 2) > 0) { + + chainet[wnet] = 29; + + wnet++; + + } + + + + /* Now translate the string chainet into codewords */ + + if (block > 0) { + + chainemc[*(mclength)] = 900; + + *(mclength) = *(mclength) + 1; + + } + + + + for(j = 0; j < wnet; j+= 2) { + + int cw_number; + + + + cw_number = (30 * chainet[j]) + chainet[j + 1]; + + chainemc[*(mclength)] = cw_number; + + *(mclength) = *(mclength) + 1; + + + + } + +} + + + +/* 671 */ + +void byteprocess(int *chainemc, int *mclength, unsigned char chaine[], int start, int length, int block) + +{ + + int debug = 0; + + int len = 0; + + unsigned int chunkLen = 0; + + uint64_t mantisa = 0ULL; + + uint64_t total = 0ULL; + + + + if(debug) printf("\nEntering byte mode at position %d\n", start); + + + + if(length == 1) { + + chainemc[(*mclength)++] = 913; + + chainemc[(*mclength)++] = chaine[start]; + + if(debug) { printf("913 %d\n", chainemc[*mclength - 1]); } + + } else { + + /* select the switch for multiple of 6 bytes */ + + if (length % 6 == 0) { + + chainemc[(*mclength)++] = 924; + + if(debug) printf("924 "); + + } else { + + chainemc[(*mclength)++] = 901; + + if(debug) printf("901 "); + + } + + + + while (len < length) + + { + + chunkLen = length - len; + + if (6 <= chunkLen) /* Take groups of 6 */ + + { + + chunkLen = 6; + + len += chunkLen; + + total = 0ULL; + + + + while (chunkLen--) + + { + + mantisa = chaine[start++]; + + total |= mantisa << (uint64_t)(chunkLen * 8ULL); + + } + + + + chunkLen = 5; + + + + while (chunkLen--) + + { + + chainemc[*mclength + chunkLen] = (int)(total % 900ULL); + + total /= 900ULL; + + } + + *mclength += 5; + + } + + else /* If it remain a group of less than 6 bytes */ + + { + + len += chunkLen; + + + + while (chunkLen--) + + { + + chainemc[(*mclength)++] = chaine[start++]; + + } + + } + + } + + } + +} + + + +/* 712 */ + +void numbprocess(int *chainemc, int *mclength, char chaine[], int start, int length, int block) + +{ + + int j, loop, longueur, dummy[100], dumlength, diviseur, nombre; + + char chainemod[50], chainemult[100], temp; + + + + strcpy(chainemod, ""); + + for(loop = 0; loop <= 50; loop++) { + + dummy[loop] = 0; + + } + + + + chainemc[*(mclength)] = 902; + + *(mclength) = *(mclength) + 1; + + + + j = 0; + + while(j < length) { + + dumlength = 0; + + strcpy(chainemod, ""); + + longueur = length - j; + + if(longueur > 44) { longueur = 44; } + + concat(chainemod, "1"); + + for(loop = 1; loop <= longueur; loop++) { + + chainemod[loop] = chaine[start + loop + j - 1]; + + } + + chainemod[longueur + 1] = '\0'; + + do { + + diviseur = 900; + + + + /* 877 - gosub Modulo */ + + strcpy(chainemult, ""); + + nombre = 0; + + while(strlen(chainemod) != 0) { + + nombre *= 10; + + nombre += ctoi(chainemod[0]); + + for(loop = 0; loop < strlen(chainemod); loop++) { + + chainemod[loop] = chainemod[loop + 1]; + + } + + if (nombre < diviseur) { + + if (strlen(chainemult) != 0) { concat(chainemult, "0"); } + + } else { + + temp = (nombre / diviseur) + '0'; + + chainemult[strlen(chainemult) + 1] = '\0'; + + chainemult[strlen(chainemult)] = temp; + + } + + nombre = nombre % diviseur; + + } + + diviseur = nombre; + + /* return to 723 */ + + + + for(loop = dumlength; loop > 0; loop--) { + + dummy[loop] = dummy[loop - 1]; + + } + + dummy[0] = diviseur; + + dumlength++; + + strcpy(chainemod, chainemult); + + } while(strlen(chainemult) != 0); + + for(loop = 0; loop < dumlength; loop++) { + + chainemc[*(mclength)] = dummy[loop]; + + *(mclength) = *(mclength) + 1; + + } + + j += longueur; + + } + +} + + + +/* 366 */ + +int pdf417(struct zint_symbol *symbol, unsigned char chaine[], int length) + +{ + + int i, k, j, indexchaine, indexliste, mode, longueur, loop, mccorrection[520], offset; + + int total, chainemc[2700], mclength, c1, c2, c3, dummy[35], codeerr; + + char codebarre[100], pattern[580]; + + int debug = 0; + + + + codeerr = 0; + + + + /* 456 */ + + indexliste = 0; + + indexchaine = 0; + + + + mode = quelmode(chaine[indexchaine]); + + + + for(i = 0; i < 1000; i++) { + + liste[0][i] = 0; + + } + + + + /* 463 */ + + do { + + liste[1][indexliste] = mode; + + while ((liste[1][indexliste] == mode) && (indexchaine < length)) { + + liste[0][indexliste]++; + + indexchaine++; + + mode = quelmode(chaine[indexchaine]); + + } + + indexliste++; + + } while (indexchaine < length); + + + + /* 474 */ + + pdfsmooth(&indexliste); + + + + if(debug) { + + printf("Initial block pattern:\n"); + + for(i = 0; i < indexliste; i++) { + + printf("Len: %d Type: ", liste[0][i]); + + switch(liste[1][i]) { + + case TEX: printf("Text\n"); break; + + case BYT: printf("Byte\n"); break; + + case NUM: printf("Number\n"); break; + + default: printf("ERROR\n"); break; + + } + + } + + } + + + + /* 541 - now compress the data */ + + indexchaine = 0; + + mclength = 0; + + for(i = 0; i < indexliste; i++) { + + switch(liste[1][i]) { + + case TEX: /* 547 - text mode */ + + textprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i); + + break; + + case BYT: /* 670 - octet stream mode */ + + byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], i); + + break; + + case NUM: /* 712 - numeric mode */ + + numbprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i); + + break; + + } + + indexchaine = indexchaine + liste[0][i]; + + } + + + + if(debug) { + + printf("\nCompressed data stream:\n"); + + for(i = 0; i < mclength; i++) { + + printf("%d ", chainemc[i]); + + } + + printf("\n\n"); + + } + + + + /* 752 - Now take care of the number of CWs per row */ + + if (symbol->option_1 < 0) { + + /* note that security level 8 is never used automatically */ + + symbol->option_1 = 7; + + if(mclength <= 1280) { symbol->option_1 = 6; } + + if(mclength <= 640) { symbol->option_1 = 5; } + + if(mclength <= 320) { symbol->option_1 = 4; } + + if(mclength <= 160) { symbol->option_1 = 3; } + + if(mclength <= 40) { symbol->option_1 = 2; } + + } + + k = 1; + + for(loop = 1; loop <= (symbol->option_1 + 1); loop++) + + { + + k *= 2; + + } + + + + longueur = mclength; + + if(symbol->option_2 > 30) { symbol->option_2 = 30; } + + if(symbol->option_2 < 1) { + + /* This is a much more simple formula to Grand Zebu's - + + it does not try to make the symbol square */ + + symbol->option_2 = 0.5 + sqrt((longueur + k) / 3.0); + + } + + if(((longueur + k) / symbol->option_2) > 90) { + + /* stop the symbol from becoming too high */ + + symbol->option_2 = symbol->option_2 + 1; + + } + + + + /* Reduce the correction level if there isn't room */ + + /* while((longueur + k > PDF_MAX) && (symbol->option_1 > 0)) { + + symbol->option_1 = symbol->option_1 - 1; + + for(loop = 0; loop <= (symbol->option_1 + 1); loop++) + + { + + k *= 2; + + } + + } */ + + /* this bit of the code would allow Zint to happily encode 2698 code words with + + only 2 check digits, so I have abandoned it! - Zint now insists on a proportional + + amount of check data unless overruled by the user */ + + + + if(longueur + k > symbol->option_3) { + + return 2; + + } + + if(((longueur + k) / symbol->option_2) > 90) { + + return 4; + + } + + + + /* 781 - Padding calculation */ + + longueur = mclength + 1 + k; + + i = 0; + + if ((longueur / symbol->option_2) < 3) { + + i = (symbol->option_2 * 3) - longueur; /* A bar code must have at least three rows */ + + } else { + + if((longueur % symbol->option_2) > 0) { i = symbol->option_2 - (longueur % symbol->option_2); } + + } + + /* We add the padding */ + + while (i > 0) { + + chainemc[mclength] = 900; + + mclength++; + + i--; + + } + + /* we add the length descriptor */ + + for(i = mclength; i > 0; i--) { + + chainemc[i] = chainemc[i - 1]; + + } + + chainemc[0] = mclength + 1; + + mclength++; + + + + /* 796 - we now take care of the Reed Solomon codes */ + + switch(symbol->option_1) { + + case 1: offset = 2; break; + + case 2: offset = 6; break; + + case 3: offset = 14; break; + + case 4: offset = 30; break; + + case 5: offset = 62; break; + + case 6: offset = 126; break; + + case 7: offset = 254; break; + + case 8: offset = 510; break; + + default: offset = 0; break; + + } + + + + longueur = mclength; + + for(loop = 0; loop < 520; loop++) { + + mccorrection[loop] = 0; + + } + + total = 0; + + for(i = 0; i < longueur; i++) { + + total = (chainemc[i] + mccorrection[k - 1]) % 929; + + for(j = k - 1; j > 0; j--) { + + mccorrection[j] = (mccorrection[j - 1] + 929 - (total * coefrs[offset + j]) % 929) % 929; + + } + + mccorrection[0] = (929 - (total * coefrs[offset + j]) % 929) % 929; + + } + + + + /* we add these codes to the string */ + + for(i = k - 1; i >= 0; i--) { + + chainemc[mclength++] = mccorrection[i] ? 929 - mccorrection[i] : 0; + + } + + + + /* 818 - The CW string is finished */ + + c1 = (mclength / symbol->option_2 - 1) / 3; + + c2 = symbol->option_1 * 3 + (mclength / symbol->option_2 - 1) % 3; + + c3 = symbol->option_2 - 1; + + + + /* we now encode each row */ + + for(i = 0; i <= (mclength / symbol->option_2) - 1; i++) { + + for(j = 0; j < symbol->option_2 ; j++) { + + dummy[j + 1] = chainemc[i * symbol->option_2 + j]; + + } + + k = (i / 3) * 30; + + switch(i % 3) { + + /* follows this pattern from US Patent 5,243,655: + + Row 0: L0 (row #, # of rows) R0 (row #, # of columns) + + Row 1: L1 (row #, security level) R1 (row #, # of rows) + + Row 2: L2 (row #, # of columns) R2 (row #, security level) + + Row 3: L3 (row #, # of rows) R3 (row #, # of columns) + + etc. */ + + case 0: + + dummy[0] = k + c1; + + dummy[symbol->option_2 + 1] = k + c3; + + break; + + case 1: + + dummy[0] = k + c2; + + dummy[symbol->option_2 + 1] = k + c1; + + break; + + case 2: + + dummy[0] = k + c3; + + dummy[symbol->option_2 + 1] = k + c2; + + break; + + } + + strcpy(codebarre, "+*"); /* Start with a start char and a separator */ + + if(symbol->symbology == BARCODE_PDF417TRUNC) { + + /* truncated - so same as before except knock off the last 5 chars */ + + for(j = 0; j <= symbol->option_2; j++) { + + switch(i % 3) { + + case 1: offset = 929; break; + + case 2: offset = 1858; break; + + default: offset = 0; break; + + } + + concat(codebarre, codagemc[offset + dummy[j]]); + + concat(codebarre, "*"); + + } + + } else { + + /* normal PDF417 symbol */ + + for(j = 0; j <= symbol->option_2 + 1; j++) { + + switch(i % 3) { + + case 1: offset = 929; /* cluster(3) */ break; + + case 2: offset = 1858; /* cluster(6) */ break; + + default: offset = 0; /* cluster(0) */ break; + + } + + concat(codebarre, codagemc[offset + dummy[j]]); + + concat(codebarre, "*"); + + } + + concat(codebarre, "-"); + + } + + + + strcpy(pattern, ""); + + for(loop = 0; loop < strlen(codebarre); loop++) { + + lookup(BRSET, PDFttf, codebarre[loop], pattern); + + } + + for(loop = 0; loop < strlen(pattern); loop++) { + + if(pattern[loop] == '1') { set_module(symbol, i, loop); } + + } + + symbol->row_height[i] = 3; + + } + + symbol->rows = (mclength / symbol->option_2); + + symbol->width = strlen(pattern); + + + + /* 843 */ + + return codeerr; + +} + + + +/* 345 */ + +int pdf417enc(struct zint_symbol *symbol, unsigned char source[], int length) + +{ + + int codeerr, error_number; + + + +#ifndef _MSC_VER + + unsigned char local_source[length + 1]; + +#else + + unsigned char* local_source = (unsigned char*)_alloca(length + 1); + +#endif + + + + error_number = 0; + + + + if((symbol->option_1 < -1) || (symbol->option_1 > 8)) { + + strcpy(symbol->errtxt, "Security value out of range"); + + symbol->option_1 = -1; + + error_number = WARN_INVALID_OPTION; + + } + + if((symbol->option_2 < 0) || (symbol->option_2 > 30)) { + + strcpy(symbol->errtxt, "Number of columns out of range"); + + symbol->option_2 = 0; + + error_number = WARN_INVALID_OPTION; + + } + + + + /* The following to be replaced by ECI handling */ + + switch(symbol->input_mode) { + + case DATA_MODE: + case GS1_MODE: + memcpy(local_source, source, length); + local_source[length] = '\0'; + break; + + case UNICODE_MODE: + + error_number = latin1_process(symbol, source, local_source, &length); + + if(error_number != 0) { return error_number; } + + break; + + } + + + + /* 349 */ + + codeerr = pdf417(symbol, local_source, length); + + + + /* 352 */ + + if(codeerr != 0) { + + switch(codeerr) { + + case 1: + + strcpy(symbol->errtxt, "No such file or file unreadable"); + + error_number = ERROR_INVALID_OPTION; + + break; + + case 2: + + strcpy(symbol->errtxt, "Input string too long"); + + error_number = ERROR_TOO_LONG; + + break; + + case 3: + + strcpy(symbol->errtxt, "Number of codewords per row too small"); + + error_number = WARN_INVALID_OPTION; + + break; + + case 4: + + strcpy(symbol->errtxt, "Data too long for specified number of columns"); + + error_number = ERROR_TOO_LONG; + + break; + + default: + + strcpy(symbol->errtxt, "Something strange happened"); + + error_number = ERROR_ENCODING_PROBLEM; + + break; + + } + + } + + + + /* 364 */ + + return error_number; + +} + + + + + +int micro_pdf417(struct zint_symbol *symbol, unsigned char source[], int length) + +{ /* like PDF417 only much smaller! */ + + + + int i, k, j, indexchaine, indexliste, mode, longueur, mccorrection[50], offset; + + int total, chainemc[2700], mclength, dummy[5], codeerr; + + char codebarre[100], pattern[580]; + + int variant, LeftRAPStart, CentreRAPStart, RightRAPStart, StartCluster; + + int LeftRAP, CentreRAP, RightRAP, Cluster, writer, flip, loop; + + int debug = 0; + + + +#ifndef _MSC_VER + + unsigned char chaine[length + 1]; + +#else + + unsigned char* chaine = (unsigned char*)_alloca(length + 1); + +#endif + + + + /* Encoding starts out the same as PDF417, so use the same code */ + + codeerr = 0; + + + + /* 456 */ + + indexliste = 0; + + indexchaine = 0; + + + + + + mode = quelmode(chaine[indexchaine]); + + + + for(i = 0; i < 1000; i++) { + + liste[0][i] = 0; + + } + + + + /* 463 */ + + do { + + liste[1][indexliste] = mode; + + while ((liste[1][indexliste] == mode) && (indexchaine < length)) { + + liste[0][indexliste]++; + + indexchaine++; + + mode = quelmode(chaine[indexchaine]); + + } + + indexliste++; + + } while (indexchaine < length); + + + + /* 474 */ + + pdfsmooth(&indexliste); + + + + if(debug) { + + printf("Initial mapping:\n"); + + for(i = 0; i < indexliste; i++) { + + printf("len: %d type: ", liste[0][i]); + + switch(liste[1][i]) { + + case TEX: printf("TEXT\n"); break; + + case BYT: printf("BYTE\n"); break; + + case NUM: printf("NUMBER\n"); break; + + default: printf("*ERROR*\n"); break; + + } + + } + + } + + + + /* 541 - now compress the data */ + + indexchaine = 0; + + mclength = 0; + + for(i = 0; i < indexliste; i++) { + + switch(liste[1][i]) { + + case TEX: /* 547 - text mode */ + + textprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i); + + break; + + case BYT: /* 670 - octet stream mode */ + + byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], i); + + break; + + case NUM: /* 712 - numeric mode */ + + numbprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i); + + break; + + } + + indexchaine = indexchaine + liste[0][i]; + + } + + + + /* This is where it all changes! */ + + + + if(mclength > 126) { + + strcpy(symbol->errtxt, "Input data too long"); + + return ERROR_TOO_LONG; + + } + + if(symbol->option_2 > 4) { + + strcpy(symbol->errtxt, "Specified width out of range"); + + symbol->option_2 = 0; + + codeerr = WARN_INVALID_OPTION; + + } + + + + if(debug) { + + printf("\nEncoded Data Stream:\n"); + + for(i = 0; i < mclength; i++) { + + printf("0x%02X ", chainemc[i]); + + } + + printf("\n"); + + } + + + + /* Now figure out which variant of the symbol to use and load values accordingly */ + + + + variant = 0; + + + + if((symbol->option_2 == 1) && (mclength > 20)) { + + /* the user specified 1 column but the data doesn't fit - go to automatic */ + + symbol->option_2 = 0; + + strcpy(symbol->errtxt, "Specified symbol size too small for data"); + + codeerr = WARN_INVALID_OPTION; + + } + + + + if((symbol->option_2 == 2) && (mclength > 37)) { + + /* the user specified 2 columns but the data doesn't fit - go to automatic */ + + symbol->option_2 = 0; + + strcpy(symbol->errtxt, "Specified symbol size too small for data"); + + codeerr = WARN_INVALID_OPTION; + + } + + + + if((symbol->option_2 == 3) && (mclength > 82)) { + + /* the user specified 3 columns but the data doesn't fit - go to automatic */ + + symbol->option_2 = 0; + + strcpy(symbol->errtxt, "Specified symbol size too small for data"); + + codeerr = WARN_INVALID_OPTION; + + } + + + + if(symbol->option_2 == 1) { + + /* the user specified 1 column and the data does fit */ + + variant = 6; + + if(mclength <= 16) { variant = 5; } + + if(mclength <= 12) { variant = 4; } + + if(mclength <= 10) { variant = 3; } + + if(mclength <= 7) { variant = 2; } + + if(mclength <= 4) { variant = 1; } + + } + + + + if(symbol->option_2 == 2) { + + /* the user specified 2 columns and the data does fit */ + + variant = 13; + + if(mclength <= 33) { variant = 12; } + + if(mclength <= 29) { variant = 11; } + + if(mclength <= 24) { variant = 10; } + + if(mclength <= 19) { variant = 9; } + + if(mclength <= 13) { variant = 8; } + + if(mclength <= 8) { variant = 7; } + + } + + + + if(symbol->option_2 == 3) { + + /* the user specified 3 columns and the data does fit */ + + variant = 23; + + if(mclength <= 70) { variant = 22; } + + if(mclength <= 58) { variant = 21; } + + if(mclength <= 46) { variant = 20; } + + if(mclength <= 34) { variant = 19; } + + if(mclength <= 24) { variant = 18; } + + if(mclength <= 18) { variant = 17; } + + if(mclength <= 14) { variant = 16; } + + if(mclength <= 10) { variant = 15; } + + if(mclength <= 6) { variant = 14; } + + } + + + + if(symbol->option_2 == 4) { + + /* the user specified 4 columns and the data does fit */ + + variant = 34; + + if(mclength <= 108) { variant = 33; } + + if(mclength <= 90) { variant = 32; } + + if(mclength <= 72) { variant = 31; } + + if(mclength <= 54) { variant = 30; } + + if(mclength <= 39) { variant = 29; } + + if(mclength <= 30) { variant = 28; } + + if(mclength <= 24) { variant = 27; } + + if(mclength <= 18) { variant = 26; } + + if(mclength <= 12) { variant = 25; } + + if(mclength <= 8) { variant = 24; } + + } + + + + if(variant == 0) { + + /* Zint can choose automatically from all available variations */ + + for(i = 27; i >= 0; i--) { + + + + if(MicroAutosize[i] >= mclength) { + + variant = MicroAutosize[i + 28]; + + } + + } + + } + + + + /* Now we have the variant we can load the data */ + + variant --; + + symbol->option_2 = MicroVariants[variant]; /* columns */ + + symbol->rows = MicroVariants[variant + 34]; /* rows */ + + k = MicroVariants[variant + 68]; /* number of EC CWs */ + + longueur = (symbol->option_2 * symbol->rows) - k; /* number of non-EC CWs */ + + i = longueur - mclength; /* amount of padding required */ + + offset = MicroVariants[variant + 102]; /* coefficient offset */ + + + + if(debug) { + + printf("\nChoose symbol size:\n"); + + printf("%d columns x %d rows\n", symbol->option_2, symbol->rows); + + printf("%d data codewords (including %d pads), %d ecc codewords\n", longueur, i, k); + + printf("\n"); + + } + + + + /* We add the padding */ + + while (i > 0) { + + chainemc[mclength] = 900; + + mclength++; + + i--; + + } + + + + /* Reed-Solomon error correction */ + + longueur = mclength; + + for(loop = 0; loop < 50; loop++) { + + mccorrection[loop] = 0; + + } + + total = 0; + + for(i = 0; i < longueur; i++) { + + total = (chainemc[i] + mccorrection[k - 1]) % 929; + + for(j = k - 1; j >= 0; j--) { + + if(j == 0) { + + mccorrection[j] = (929 - (total * Microcoeffs[offset + j]) % 929) % 929; + + } else { + + mccorrection[j] = (mccorrection[j - 1] + 929 - (total * Microcoeffs[offset + j]) % 929) % 929; + + } + + } + + } + + + + for(j = 0; j < k; j++) { + + if(mccorrection[j] != 0) { mccorrection[j] = 929 - mccorrection[j]; } + + } + + /* we add these codes to the string */ + + for(i = k - 1; i >= 0; i--) { + + chainemc[mclength] = mccorrection[i]; + + mclength++; + + } + + + + if(debug) { + + printf("Encoded Data Stream with ECC:\n"); + + for(i = 0; i < mclength; i++) { + + printf("0x%02X ", chainemc[i]); + + } + + printf("\n"); + + } + + + + /* Now get the RAP (Row Address Pattern) start values */ + + LeftRAPStart = RAPTable[variant]; + + CentreRAPStart = RAPTable[variant + 34]; + + RightRAPStart = RAPTable[variant + 68]; + + StartCluster = RAPTable[variant + 102] / 3; + + + + /* That's all values loaded, get on with the encoding */ + + + + LeftRAP = LeftRAPStart; + + CentreRAP = CentreRAPStart; + + RightRAP = RightRAPStart; + + Cluster = StartCluster; /* Cluster can be 0, 1 or 2 for Cluster(0), Cluster(3) and Cluster(6) */ + + + + if(debug) printf("\nInternal row representation:\n"); + + for(i = 0; i < symbol->rows; i++) { + + if(debug) printf("row %d: ", i); + + strcpy(codebarre, ""); + + offset = 929 * Cluster; + + for(j = 0; j < 5; j++) { + + dummy[j] = 0; + + } + + for(j = 0; j < symbol->option_2 ; j++) { + + dummy[j + 1] = chainemc[i * symbol->option_2 + j]; + + if(debug) printf("[%d] ", dummy[j + 1]); + + } + + + + /* Copy the data into codebarre */ + + concat(codebarre, RAPLR[LeftRAP]); + + concat(codebarre, "1"); + + concat(codebarre, codagemc[offset + dummy[1]]); + + concat(codebarre, "1"); + + if(symbol->option_2 == 3) { + + concat(codebarre, RAPC[CentreRAP]); + + } + + if(symbol->option_2 >= 2) { + + concat(codebarre, "1"); + + concat(codebarre, codagemc[offset + dummy[2]]); + + concat(codebarre, "1"); + + } + + if(symbol->option_2 == 4) { + + concat(codebarre, RAPC[CentreRAP]); + + } + + if(symbol->option_2 >= 3) { + + concat(codebarre, "1"); + + concat(codebarre, codagemc[offset + dummy[3]]); + + concat(codebarre, "1"); + + } + + if(symbol->option_2 == 4) { + + concat(codebarre, "1"); + + concat(codebarre, codagemc[offset + dummy[4]]); + + concat(codebarre, "1"); + + } + + concat(codebarre, RAPLR[RightRAP]); + + concat(codebarre, "1"); /* stop */ + + if(debug) printf("%s\n", codebarre); + + + + /* Now codebarre is a mixture of letters and numbers */ + + + + writer = 0; + + flip = 1; + + strcpy(pattern, ""); + + for(loop = 0; loop < strlen(codebarre); loop++) { + + if((codebarre[loop] >= '0') && (codebarre[loop] <= '9')) { + + for(k = 0; k < ctoi(codebarre[loop]); k++) { + + if(flip == 0) { + + pattern[writer] = '0'; + + } else { + + pattern[writer] = '1'; + + } + + writer++; + + } + + pattern[writer] = '\0'; + + if(flip == 0) { + + flip = 1; + + } else { + + flip = 0; + + } + + } else { + + lookup(BRSET, PDFttf, codebarre[loop], pattern); + + writer += 5; + + } + + } + + symbol->width = writer; + + + + /* so now pattern[] holds the string of '1's and '0's. - copy this to the symbol */ + + for(loop = 0; loop < strlen(pattern); loop++) { + + if(pattern[loop] == '1') { set_module(symbol, i, loop); } + + } + + symbol->row_height[i] = 2; + + + + /* Set up RAPs and Cluster for next row */ + + LeftRAP++; + + CentreRAP++; + + RightRAP++; + + Cluster++; + + + + if(LeftRAP == 53) { + + LeftRAP = 1; + + } + + if(CentreRAP == 53) { + + CentreRAP = 1; + + } + + if(RightRAP == 53) { + + RightRAP = 1; + + } + + if(Cluster == 3) { + + Cluster = 0; + + } + + } + + + + return codeerr; + +} + diff --git a/backend/plessey.c b/backend/plessey.c index f1ab8007..baaf9700 100644 --- a/backend/plessey.c +++ b/backend/plessey.c @@ -40,11 +40,10 @@ int plessey(struct zint_symbol *symbol, unsigned char source[], int length) unsigned int i, check; unsigned char *checkptr; static char grid[9] = {1,1,1,1,0,1,0,0,1}; - char dest[1000]; + char dest[1024]; /* 8 + 65 * 8 + 8 * 2 + 9 + 1 ~ 1024 */ int error_number; error_number = 0; - strcpy(dest, ""); if(length > 65) { strcpy(symbol->errtxt, "Input too long"); @@ -58,10 +57,10 @@ int plessey(struct zint_symbol *symbol, unsigned char source[], int length) checkptr = (unsigned char *)calloc (1, length * 4 + 8); /* Start character */ - concat(dest, "31311331"); + strcpy(dest, "31311331"); /* Data area */ - for(i = 0; i <= length; i++) + for(i = 0; i < length; i++) { check = posn(SSET, source[i]); lookup(SSET, PlessTable, source[i], dest); @@ -98,27 +97,23 @@ int plessey(struct zint_symbol *symbol, unsigned char source[], int length) return error_number; } -int msi_plessey(struct zint_symbol *symbol, unsigned char source[]) +int msi_plessey(struct zint_symbol *symbol, unsigned char source[], int length) { /* Plain MSI Plessey - does not calculate any check character */ unsigned int i; - int error_number; - char dest[1000]; + char dest[512]; /* 2 + 55 * 8 + 3 + 1 ~ 512 */ - error_number = 0; - strcpy(dest, ""); - - if(ustrlen(source) > 55) { + if(length > 55) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } /* start character */ - concat (dest, "21"); + strcpy(dest, "21"); - for(i = 0; i <= ustrlen(source); i++) + for(i = 0; i < length; i++) { - lookup(NESET, MSITable, source[i], dest); + lookup(NEON, MSITable, source[i], dest); } /* Stop character */ @@ -126,176 +121,134 @@ int msi_plessey(struct zint_symbol *symbol, unsigned char source[]) expand(symbol, dest); ustrcpy(symbol->text, source); - return error_number; + return 0; } -int msi_plessey_mod10(struct zint_symbol *symbol, unsigned char source[]) +int msi_plessey_mod10(struct zint_symbol *symbol, unsigned char source[], int length) { /* MSI Plessey with Modulo 10 check digit - algorithm from Barcode Island http://www.barcodeisland.com/ */ - unsigned int i, wright, dau, pedwar, pump; - char un[200], tri[200]; + unsigned long i, wright, dau, pedwar, pump, n; + char un[200], tri[32]; int error_number, h; char dest[1000]; error_number = 0; - strcpy(dest, ""); - if(ustrlen(source) > 55) { + if(length > 18) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } /* start character */ - concat (dest, "21"); + strcpy(dest, "21"); /* draw data section */ - for(i = 0; i < ustrlen(source); i++) + for(i = 0; i < length; i++) { - lookup(NESET, MSITable, source[i], dest); + lookup(NEON, MSITable, source[i], dest); } /* caluculate check digit */ wright = 0; - if((ustrlen(source)%2) == 0) + n = ((length % 2) == 0) ? 1 : 0; + for(i = n; i < length; i += 2) { - for(i = 1; i < ustrlen(source); i+=2) - { - un[wright] = source[i]; - wright ++; - } - } - else - { - for(i = 0; i < ustrlen(source); i+=2) - { - un[wright] = source[i]; - wright ++; - } + un[wright++] = source[i]; } un[wright] = '\0'; - dau = atoi(un); + dau = strtoul(un, NULL, 10); dau *= 2; - sprintf(tri,"%d",dau); + sprintf(tri, "%ld", dau); pedwar = 0; - for(i = 0; i < strlen(tri); i++) + h = strlen(tri); + for(i = 0; i < h; i++) { pedwar += ctoi(tri[i]); } - - if((ustrlen(source)%2) == 0) + n = length % 2; + for(i = n; i < length; i+=2) { - for(i = 0; i < ustrlen(source); i+=2) - { - pedwar += ctoi(source[i]); - } - } - else - { - for(i = 1; i < ustrlen(source); i+=2) - { - pedwar += ctoi(source[i]); - } + pedwar += ctoi(source[i]); } - pump = (10 - pedwar%10); + pump = (10 - pedwar % 10); if(pump == 10) { pump = 0; } /* draw check digit */ - lookup(NESET, MSITable, itoc(pump), dest); + lookup(NEON, MSITable, itoc(pump), dest); /* Stop character */ concat (dest, "121"); - - h = ustrlen(source); - source[h] = itoc(pump); - source[h + 1] = '\0'; expand(symbol, dest); + ustrcpy(symbol->text, source); + symbol->text[length] = itoc(pump); + symbol->text[length + 1] = '\0'; return error_number; } -int msi_plessey_mod1010(struct zint_symbol *symbol, unsigned char source[]) +int msi_plessey_mod1010(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len) { /* MSI Plessey with two Modulo 10 check digits - algorithm from Barcode Island http://www.barcodeisland.com/ */ - unsigned int i, wright, dau, pedwar, pump, chwech; - char un[200], tri[200]; + unsigned long i, n, wright, dau, pedwar, pump, chwech; + char un[16], tri[32]; int error_number, h; char dest[1000]; error_number = 0; - strcpy(dest, ""); - if(ustrlen(source) > 55) { /* No Entry Stack Smashers! */ + if(src_len > 18) { /* No Entry Stack Smashers! limit because of str->number conversion*/ strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } /* start character */ - concat (dest, "21"); + strcpy(dest, "21"); /* draw data section */ - for(i = 0; i < ustrlen(source); i++) + for(i = 0; i < src_len; i++) { - lookup(NESET, MSITable, source[i], dest); + lookup(NEON, MSITable, source[i], dest); } /* calculate first check digit */ wright = 0; - if((ustrlen(source)%2) == 0) + + n = ((src_len %2) == 0) ? 1 : 0; + for(i = n; i < src_len; i += 2) { - for(i = 1; i < ustrlen(source); i+=2) - { - un[wright] = source[i]; - wright ++; - } - } - else - { - for(i = 0; i < ustrlen(source); i+=2) - { - un[wright] = source[i]; - wright ++; - } + un[wright++] = source[i]; } un[wright] = '\0'; - dau = atoi(un); + dau = strtoul(un, NULL, 10); dau *= 2; - sprintf(tri,"%d",dau); + sprintf(tri, "%ld", dau); pedwar = 0; - for(i = 0; i < strlen(tri); i++) + h = strlen(tri); + for(i = 0; i < h; i++) { pedwar += ctoi(tri[i]); } - - if((ustrlen(source)%2) == 0) + n = src_len % 2; + for(i = n; i < src_len; i += 2) { - for(i = 0; i < ustrlen(source); i+=2) - { - pedwar += ctoi(source[i]); - } - } - else - { - for(i = 1; i < ustrlen(source); i+=2) - { - pedwar += ctoi(source[i]); - } + pedwar += ctoi(source[i]); } - pump = (10 - pedwar%10); + pump = 10 - pedwar % 10; if(pump == 10) { pump = 0; @@ -303,107 +256,87 @@ int msi_plessey_mod1010(struct zint_symbol *symbol, unsigned char source[]) /* calculate second check digit */ wright = 0; - if((ustrlen(source)%2) == 0) + n = src_len % 2; + for(i = n; i < src_len; i += 2) { - for(i = 0; i < ustrlen(source); i+=2) - { - un[wright] = source[i]; - wright ++; - } + un[wright++] = source[i]; } - else - { - for(i = 1; i < ustrlen(source); i+=2) - { - un[wright] = source[i]; - wright ++; - } - } - un[wright] = itoc(pump); - wright++; + un[wright++] = itoc(pump); un[wright] = '\0'; - dau = atoi(un); + dau = strtoul(un, NULL, 10); dau *= 2; - sprintf(tri,"%d",dau); + sprintf(tri, "%ld", dau); pedwar = 0; - for(i = 0; i < strlen(tri); i++) + h = strlen(tri); + for(i = 0; i < h; i++) { pedwar += ctoi(tri[i]); } - if((ustrlen(source)%2) == 0) + i = ((src_len % 2) == 0) ? 1 : 0; + for(; i < src_len; i += 2) { - for(i = 1; i < ustrlen(source); i+=2) - { - pedwar += ctoi(source[i]); - } - } - else - { - for(i = 0; i < ustrlen(source); i+=2) - { - pedwar += ctoi(source[i]); - } + pedwar += ctoi(source[i]); } - chwech = (10 - pedwar%10); + chwech = 10 - pedwar % 10; if(chwech == 10) { chwech = 0; } /* Draw check digits */ - lookup(NESET, MSITable, itoc(pump), dest); - lookup(NESET, MSITable, itoc(chwech), dest); + lookup(NEON, MSITable, itoc(pump), dest); + lookup(NEON, MSITable, itoc(chwech), dest); /* Stop character */ concat (dest, "121"); - h = ustrlen(source); - source[h] = itoc(pump); - source[h + 1] = itoc(chwech); - source[h + 2] = '\0'; expand(symbol, dest); + ustrcpy(symbol->text, source); + symbol->text[src_len] = itoc(pump); + symbol->text[src_len + 1] = itoc(chwech); + symbol->text[src_len + 2] = '\0'; + return error_number; } -int msi_plessey_mod11(struct zint_symbol *symbol, unsigned char source[]) +int msi_plessey_mod11(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len) { /* Calculate a Modulo 11 check digit using the system discussed on Wikipedia - see http://en.wikipedia.org/wiki/Talk:MSI_Barcode */ /* uses the IBM weight system */ - int i, weight, x, check, h; + int i, weight, x, check; int error_number; char dest[1000]; error_number = 0; - strcpy(dest, ""); - if(ustrlen(source) > 55) { + if(src_len > 55) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } /* start character */ - concat (dest, "21"); + strcpy(dest, "21"); /* draw data section */ - for(i = 0; i < ustrlen(source); i++) + for(i = 0; i < src_len; i++) { - lookup(NESET, MSITable, source[i], dest); + lookup(NEON, MSITable, source[i], dest); } /* calculate check digit */ x = 0; weight = 2; - for(i = (ustrlen(source) - 1); i >= 0; i--) { + for(i = src_len - 1; i >= 0; i--) { x += weight * ctoi(source[i]); weight++; if(weight > 7) { @@ -413,63 +346,61 @@ int msi_plessey_mod11(struct zint_symbol *symbol, unsigned char source[]) check = (11 - (x % 11)) % 11; if(check == 10) { - lookup(NESET, MSITable, '1', dest); - lookup(NESET, MSITable, '0', dest); + lookup(NEON, MSITable, '1', dest); + lookup(NEON, MSITable, '0', dest); } else { - lookup(NESET, MSITable, itoc(check), dest); - } - - h = ustrlen(source); - if(check == 10) { - source[h] = '1'; - source[h + 1] = '0'; - source[h + 2] = '\0'; - } else { - source[h] = itoc(check); - source[h + 1] = '\0'; + lookup(NEON, MSITable, itoc(check), dest); } /* stop character */ concat (dest, "121"); expand(symbol, dest); + ustrcpy(symbol->text, source); + if(check == 10) { + concat((char* )symbol->text, "10"); + } else { + symbol->text[src_len] = itoc(check); + symbol->text[src_len + 1] = '\0'; + } + return error_number; } -int msi_plessey_mod1110(struct zint_symbol *symbol, unsigned char source[]) +int msi_plessey_mod1110(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len) { /* Combining the Barcode Island and Wikipedia code */ /* Verified against http://www.bokai.com/BarcodeJSP/applet/BarcodeSampleApplet.htm */ /* Weighted using the IBM system */ - int i, weight, x, check, wright, dau, pedwar, pump, h; - char un[200], tri[200]; + unsigned long i, weight, x, check, wright, dau, pedwar, pump, h; + char un[16], tri[16]; int error_number; char dest[1000]; + unsigned char temp[32]; + unsigned int temp_len; error_number = 0; - strcpy(dest, ""); - if(ustrlen(source) > 55) { + if(src_len > 18) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } /* start character */ - concat (dest, "21"); + strcpy(dest, "21"); /* draw data section */ - for(i = 0; i < ustrlen(source); i++) + for(i = 0; i < src_len; i++) { - lookup(NESET, MSITable, source[i], dest); + lookup(NEON, MSITable, source[i], dest); } /* calculate first (mod 11) digit */ - wright = ustrlen(source); x = 0; weight = 2; - for(i = (ustrlen(source) - 1); i >= 0; i--) { + for(i = src_len - 1; i >= 0; i--) { x += weight * ctoi(source[i]); weight++; if(weight > 7) { @@ -478,105 +409,87 @@ int msi_plessey_mod1110(struct zint_symbol *symbol, unsigned char source[]) } check = (11 - (x % 11)) % 11; + ustrcpy(temp, source); + temp_len = src_len; if(check == 10) { - lookup(NESET, MSITable, '1', dest); - lookup(NESET, MSITable, '0', dest); - source[wright] = '1'; - source[wright + 1] = '0'; - source[wright + 2] = '\0'; + lookup(NEON, MSITable, '1', dest); + lookup(NEON, MSITable, '0', dest); + uconcat(temp, (unsigned char *)"10"); + temp_len += 2; } else { - lookup(NESET, MSITable, itoc(check), dest); - source[wright] = itoc(check); - source[wright + 1] = '\0'; + lookup(NEON, MSITable, itoc(check), dest); + temp[temp_len++] = itoc(check); + temp[temp_len] = '\0'; } /* caluculate second (mod 10) check digit */ wright = 0; - if((ustrlen(source)%2) == 0) + i = ((temp_len % 2) == 0) ? 1 : 0; + for(; i < temp_len; i += 2) { - for(i = 1; i < ustrlen(source); i+=2) - { - un[wright] = source[i]; - wright ++; - } - } - else - { - for(i = 0; i < ustrlen(source); i+=2) - { - un[wright] = source[i]; - wright ++; - } + un[wright++] = temp[i]; } un[wright] = '\0'; - dau = atoi(un); + dau = strtoul(un, NULL, 10); dau *= 2; - sprintf(tri,"%d",dau); + sprintf(tri, "%ld", dau); pedwar = 0; - for(i = 0; i < strlen(tri); i++) + h = strlen(tri); + for(i = 0; i < h; i++) { pedwar += ctoi(tri[i]); } - - if((ustrlen(source)%2) == 0) + i = temp_len % 2; + for(; i < temp_len; i+=2) { - for(i = 0; i < ustrlen(source); i+=2) - { - pedwar += ctoi(source[i]); - } - } - else - { - for(i = 1; i < ustrlen(source); i+=2) - { - pedwar += ctoi(source[i]); - } + pedwar += ctoi(temp[i]); } - pump = (10 - pedwar%10); + pump = 10 - pedwar % 10; if(pump == 10) { pump = 0; } /* draw check digit */ - lookup(NESET, MSITable, itoc(pump), dest); + lookup(NEON, MSITable, itoc(pump), dest); /* stop character */ concat (dest, "121"); - - h = ustrlen(source); - source[h] = itoc(pump); - source[h + 1] = '\0'; - expand(symbol, dest); - ustrcpy(symbol->text, source); + + temp[temp_len++] = itoc(pump); + temp[temp_len] = '\0'; + + + ustrcpy(symbol->text, temp); return error_number; } int msi_handle(struct zint_symbol *symbol, unsigned char source[], int length) { int error_number; - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number != 0) { strcpy(symbol->errtxt, "Invalid characters in input data"); return ERROR_INVALID_DATA; } + if((symbol->option_2 < 0) || (symbol->option_2 > 4)) { symbol->option_2 = 0; } switch(symbol->option_2) { - case 0: error_number = msi_plessey(symbol, source); break; - case 1: error_number = msi_plessey_mod10(symbol, source); break; - case 2: error_number = msi_plessey_mod1010(symbol, source); break; - case 3: error_number = msi_plessey_mod11(symbol, source); break; - case 4: error_number = msi_plessey_mod1110(symbol, source); break; + case 0: error_number = msi_plessey(symbol, source, length); break; + case 1: error_number = msi_plessey_mod10(symbol, source, length); break; + case 2: error_number = msi_plessey_mod1010(symbol, source, length); break; + case 3: error_number = msi_plessey_mod11(symbol, source, length); break; + case 4: error_number = msi_plessey_mod1110(symbol, source, length); break; } return error_number; diff --git a/backend/png.c b/backend/png.c index ba84119d..f9d30c5c 100644 --- a/backend/png.c +++ b/backend/png.c @@ -104,12 +104,12 @@ int png_to_file(struct zint_symbol *symbol, int image_height, int image_width, c strcpy(symbol->errtxt, "Malformed background colour target"); return ERROR_INVALID_OPTION; } - errno = is_sane(SSET, (unsigned char*)symbol->fgcolour, 6); + errno = is_sane(SSET, (unsigned char*)symbol->fgcolour, strlen(symbol->fgcolour)); if (errno == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Malformed foreground colour target"); return ERROR_INVALID_OPTION; } - errno = is_sane(SSET, (unsigned char*)symbol->bgcolour, 6); + errno = is_sane(SSET, (unsigned char*)symbol->bgcolour, strlen(symbol->bgcolour)); if (errno == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Malformed background colour target"); return ERROR_INVALID_OPTION; diff --git a/backend/postal.c b/backend/postal.c index 19d2c6a5..15d4971f 100644 --- a/backend/postal.c +++ b/backend/postal.c @@ -70,7 +70,7 @@ int postnet(struct zint_symbol *symbol, unsigned char source[], char dest[], int strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; @@ -78,15 +78,15 @@ int postnet(struct zint_symbol *symbol, unsigned char source[], char dest[], int sum = 0; /* start character */ - concat (dest, "L"); + strcpy(dest, "L"); for (i=0; i < length; i++) { - lookup(NESET, PNTable, source[i], dest); + lookup(NEON, PNTable, source[i], dest); sum += ctoi(source[i]); } - check_digit = (10 - (sum%10))%10; + check_digit = (10 - (sum % 10)) % 10; concat(dest, PNTable[check_digit]); /* stop character */ @@ -98,11 +98,10 @@ int postnet(struct zint_symbol *symbol, unsigned char source[], char dest[], int int post_plot(struct zint_symbol *symbol, unsigned char source[], int length) { /* Puts PostNet barcodes into the pattern matrix */ - char height_pattern[200]; - unsigned int loopey; + char height_pattern[256]; /* 5 + 38 * 5 + 5 + 5 + 1 ~ 256 */ + unsigned int loopey, h; int writer; int error_number; - strcpy(height_pattern, ""); error_number = 0; @@ -112,7 +111,8 @@ int post_plot(struct zint_symbol *symbol, unsigned char source[], int length) } writer = 0; - for(loopey = 0; loopey < strlen(height_pattern); loopey++) + h = strlen(height_pattern); + for(loopey = 0; loopey < h; loopey++) { if(height_pattern[loopey] == 'L') { @@ -141,7 +141,7 @@ int planet(struct zint_symbol *symbol, unsigned char source[], char dest[], int strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; @@ -149,15 +149,15 @@ int planet(struct zint_symbol *symbol, unsigned char source[], char dest[], int sum = 0; /* start character */ - concat (dest, "L"); + strcpy(dest, "L"); for (i=0; i < length; i++) { - lookup(NESET, PLTable, source[i], dest); + lookup(NEON, PLTable, source[i], dest); sum += ctoi(source[i]); } - check_digit = (10 - (sum%10))%10; + check_digit = (10 - (sum % 10)) % 10; concat(dest, PLTable[check_digit]); /* stop character */ @@ -169,11 +169,10 @@ int planet(struct zint_symbol *symbol, unsigned char source[], char dest[], int int planet_plot(struct zint_symbol *symbol, unsigned char source[], int length) { /* Puts PLANET barcodes into the pattern matrix */ - char height_pattern[200]; - unsigned int loopey; + char height_pattern[256]; /* 5 + 38 * 5 + 5 + 5 + 1 ~ 256 */ + unsigned int loopey, h; int writer; int error_number; - strcpy(height_pattern, ""); error_number = 0; @@ -183,7 +182,8 @@ int planet_plot(struct zint_symbol *symbol, unsigned char source[], int length) } writer = 0; - for(loopey = 0; loopey < strlen(height_pattern); loopey++) + h = strlen(height_pattern); + for(loopey = 0; loopey < h; loopey++) { if(height_pattern[loopey] == 'L') { @@ -203,23 +203,21 @@ int korea_post(struct zint_symbol *symbol, unsigned char source[], int length) { /* Korean Postal Authority */ int total, loop, check, zeroes, error_number; - char localstr[8], checkstr[3], dest[80]; + char localstr[8], dest[80]; error_number = 0; if(length > 6) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } - strcpy(localstr, ""); zeroes = 6 - length; - for(loop = 0; loop < zeroes; loop++) - concat(localstr, "0"); - concat(localstr, (char *)source); + memset(localstr, '0', zeroes); + strcpy(localstr + zeroes, (char *)source); total = 0; for(loop = 0; loop < 6; loop++) { @@ -227,15 +225,13 @@ int korea_post(struct zint_symbol *symbol, unsigned char source[], int length) } check = 10 - (total % 10); if(check == 10) { check = 0; } - checkstr[0] = itoc(check); - checkstr[1] = '\0'; - concat(localstr, checkstr); - - strcpy(dest, ""); + localstr[6] = itoc(check); + localstr[7] = '\0'; + *dest = '\0'; for(loop = 5; loop >= 0; loop--) { - lookup(NESET, KoreaTable, localstr[loop], dest); + lookup(NEON, KoreaTable, localstr[loop], dest); } - lookup(NESET, KoreaTable, localstr[6], dest); + lookup(NEON, KoreaTable, localstr[6], dest); expand(symbol, dest); ustrcpy(symbol->text, (unsigned char*)localstr); return error_number; @@ -245,7 +241,8 @@ int fim(struct zint_symbol *symbol, unsigned char source[], int length) { /* The simplest barcode symbology ever! Supported by MS Word, so here it is! */ /* glyphs from http://en.wikipedia.org/wiki/Facing_Identification_Mark */ - char dest[17]; + + char dest[16] = { 0 }; if(length > 1) { strcpy(symbol->errtxt, "Input too long"); @@ -279,21 +276,20 @@ int fim(struct zint_symbol *symbol, unsigned char source[], int length) return 0; } -char rm4scc(char source[], unsigned char dest[]) +char rm4scc(char source[], unsigned char dest[], int length) { /* Handles the 4 State barcodes used in the UK by Royal Mail */ unsigned int i; int top, bottom, row, column, check_digit; - char values[3], set_copy[38]; - strcpy(set_copy, KRSET); + char values[3], set_copy[] = KRSET; top = 0; bottom = 0; /* start character */ - concat ((char*)dest, "1"); + strcpy((char*)dest, "1"); - for (i=0; i < strlen(source); i++) { + for (i = 0; i < length; i++) { lookup(KRSET, RoyalTable, source[i], (char*)dest); strcpy(values, RoyalValues[posn(KRSET, source[i])]); top += ctoi(values[0]); @@ -318,11 +314,10 @@ int royal_plot(struct zint_symbol *symbol, unsigned char source[], int length) { /* Puts RM4SCC into the data matrix */ char height_pattern[200], check; - unsigned int loopey; - int writer, i; + unsigned int loopey, h; + int writer; int error_number; strcpy(height_pattern, ""); - unsigned char local_source[120]; error_number = 0; @@ -330,19 +325,17 @@ int royal_plot(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } - to_upper(local_source); - error_number = is_sane(KRSET, local_source, length); + to_upper(source); + error_number = is_sane(KRSET, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } - check = rm4scc((char*)local_source, (unsigned char*)height_pattern); + check = rm4scc((char*)source, (unsigned char*)height_pattern, length); writer = 0; - for(loopey = 0; loopey < strlen(height_pattern); loopey++) + h = strlen(height_pattern); + for(loopey = 0; loopey < h; loopey++) { if((height_pattern[loopey] == '1') || (height_pattern[loopey] == '0')) { @@ -372,10 +365,9 @@ int kix_code(struct zint_symbol *symbol, unsigned char source[], int length) /* Specification at http://www.tntpost.nl/zakelijk/klantenservice/downloads/kIX_code/download.aspx */ char height_pattern[50], localstr[13]; unsigned int loopey; - int writer, i; + int writer, i, h; int error_number, zeroes; strcpy(height_pattern, ""); - unsigned char local_source[13]; error_number = 0; @@ -383,22 +375,17 @@ int kix_code(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } - to_upper(local_source); - error_number = is_sane(KRSET, local_source, length); + to_upper(source); + error_number = is_sane(KRSET, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } /* Add leading zeroes */ - strcpy(localstr, ""); zeroes = 11 - length; - for(i = 0; i < zeroes; i++) - concat(localstr, "0"); - concat(localstr, (char *)local_source); + memset(localstr, '0', zeroes); + strcpy(localstr + zeroes, (char *)source); /* Encode data */ for (i = 0; i < 11; i++) { @@ -406,7 +393,8 @@ int kix_code(struct zint_symbol *symbol, unsigned char source[], int length) } writer = 0; - for(loopey = 0; loopey < strlen(height_pattern); loopey++) + h = strlen(height_pattern); + for(loopey = 0; loopey < h; loopey++) { if((height_pattern[loopey] == '1') || (height_pattern[loopey] == '0')) { @@ -433,8 +421,8 @@ int daft_code(struct zint_symbol *symbol, unsigned char source[], int length) { /* Handles DAFT Code symbols */ /* Presumably 'daft' doesn't mean the same thing in Germany as it does in the UK! */ - char height_pattern[100], local_source[55]; - unsigned int loopey; + char height_pattern[100]; + unsigned int loopey, h; int writer, i, error_number; strcpy(height_pattern, ""); @@ -443,25 +431,24 @@ int daft_code(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } - to_upper((unsigned char*)local_source); - error_number = is_sane(DAFTSET, (unsigned char*)local_source, length); + to_upper((unsigned char*)source); + error_number = is_sane(DAFTSET, (unsigned char*)source, length); + if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } for (i = 0; i < length; i++) { - if(local_source[i] == 'D') { concat(height_pattern, "2"); } - if(local_source[i] == 'A') { concat(height_pattern, "1"); } - if(local_source[i] == 'F') { concat(height_pattern, "0"); } - if(local_source[i] == 'T') { concat(height_pattern, "3"); } + if(source[i] == 'D') { concat(height_pattern, "2"); } + if(source[i] == 'A') { concat(height_pattern, "1"); } + if(source[i] == 'F') { concat(height_pattern, "0"); } + if(source[i] == 'T') { concat(height_pattern, "3"); } } writer = 0; - for(loopey = 0; loopey < strlen(height_pattern); loopey++) + h = strlen(height_pattern); + for(loopey = 0; loopey < h; loopey++) { if((height_pattern[loopey] == '1') || (height_pattern[loopey] == '0')) { @@ -488,23 +475,22 @@ int flattermarken(struct zint_symbol *symbol, unsigned char source[], int length { /* Flattermarken - Not really a barcode symbology and (in my opinion) probably not much use but it's supported by TBarCode so it's supported by Zint! */ int loop, error_number; - char dest[1000]; + char dest[512]; /* 90 * 4 + 1 ~ */ error_number = 0; - strcpy(dest, ""); if(length > 90) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } - + *dest = '\0'; for(loop = 0; loop < length; loop++) { - lookup(NESET, FlatTable, source[loop], dest); + lookup(NEON, FlatTable, source[loop], dest); } expand(symbol, dest); @@ -513,19 +499,16 @@ int flattermarken(struct zint_symbol *symbol, unsigned char source[], int length int japan_post(struct zint_symbol *symbol, unsigned char source[], int length) { /* Japanese Postal Code (Kasutama Barcode) */ - int error_number; + int error_number, h; char pattern[69]; int writer, loopey, inter_posn, i, sum, check; char check_char; char inter[23]; -#ifdef _MSC_VER - char* local_source; -#endif #ifndef _MSC_VER char local_source[length + 1]; #else - local_source = (char*)_alloca(length + 1); + char* local_source = (char*)_alloca(length + 1); #endif inter_posn = 0; @@ -542,10 +525,7 @@ int japan_post(struct zint_symbol *symbol, unsigned char source[], int length) strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } - - for(i = 0; i < 20; i++) { - inter[i] = 'd'; /* Pad character CC4 */ - } + memset(inter, 'd', 20);/* Pad character CC4 */ inter[20] = '\0'; i = 0; @@ -597,7 +577,8 @@ int japan_post(struct zint_symbol *symbol, unsigned char source[], int length) /* Resolve pattern to 4-state symbols */ writer = 0; - for(loopey = 0; loopey < strlen(pattern); loopey++) + h = strlen(pattern); + for(loopey = 0; loopey < h; loopey++) { if((pattern[loopey] == '2') || (pattern[loopey] == '1')) { diff --git a/backend/ps.c b/backend/ps.c index ce7fcb8b..cd011049 100644 --- a/backend/ps.c +++ b/backend/ps.c @@ -74,12 +74,12 @@ int ps_plot(struct zint_symbol *symbol) strcpy(symbol->errtxt, "Malformed background colour target"); return ERROR_INVALID_OPTION; } - error_number = is_sane(SSET, (unsigned char*)symbol->fgcolour, 6); + error_number = is_sane(SSET, (unsigned char*)symbol->fgcolour, strlen(symbol->fgcolour)); if (error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Malformed foreground colour target"); return ERROR_INVALID_OPTION; } - error_number = is_sane(SSET, (unsigned char*)symbol->bgcolour, 6); + error_number = is_sane(SSET, (unsigned char*)symbol->bgcolour, strlen(symbol->bgcolour)); if (error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Malformed background colour target"); return ERROR_INVALID_OPTION; diff --git a/backend/qr.c b/backend/qr.c index 4b4c3f3a..570ed5ab 100644 --- a/backend/qr.c +++ b/backend/qr.c @@ -1,9 +1,8 @@ -/* qr.c Handles QR Code by utilising libqrencode */ +/* qr.c Handles QR Code */ /* libzint - the open source barcode library - Copyright (C) 2008 Robin Stuart - Copyright (C) 2006 Kentaro Fukuchi + Copyright (C) 2009 Robin Stuart This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,123 +21,760 @@ #include #include "common.h" - -#ifndef NO_QR -#include #include -#include "shiftjis.h" +#include "sjis.h" +#include "qr.h" +#include "qrrs.h" -QRcode *encode(int security, int size, const unsigned char *intext, int kanji, int gs1, int input_length) +int in_alpha(int glyph) { + /* Returns true if input glyph is in the Alphanumeric set */ + int retval = 0; + char cglyph = (char) glyph; + + if((cglyph >= '0') && (cglyph <= '9')) { + retval = 1; + } + if((cglyph >= 'A') && (cglyph <= 'Z')) { + retval = 1; + } + switch (cglyph) { + case ' ': + case '$': + case '%': + case '*': + case '+': + case '-': + case '.': + case '/': + case ':': + retval = 1; + break; + } + + return retval; +} + +void define_mode(char mode[], int jisdata[], int length) { - int version; - QRecLevel level; - QRencodeMode hint; - QRcode *code; - - hint = 0; - - if(kanji) { - hint = QR_MODE_KANJI; - } - /* if(gs1) { - hint = QR_MODE_GS1; - } - for future expansion */ - if(hint == 0) { - hint = QR_MODE_8; - } - - level = QR_ECLEVEL_L; - if((security >= 1) && (security <= 4)) { - switch (security) { - case 1: level = QR_ECLEVEL_L; break; - case 2: level = QR_ECLEVEL_M; break; - case 3: level = QR_ECLEVEL_Q; break; - case 4: level = QR_ECLEVEL_H; break; + /* Values placed into mode[] are: K = Kanji, B = Binary, A = Alphanumeric, N = Numeric */ + int i, mlen, j; + + for(i = 0; i < length; i++) { + if(jisdata[i] > 0xff) { + mode[i] = 'K'; + } else { + mode[i] = 'B'; + if(in_alpha(jisdata[i])) { mode[i] = 'A'; } + if((jisdata[i] >= '0') && (jisdata[i] <= '9')) { mode[i] = 'N'; } } } - if((size >= 1) && (size <= 40)) { - version = size; - } else { - version = 0; + /* If less than 6 numeric digits together then don't use numeric mode */ + for(i = 0; i < length; i++) { + if(mode[i] == 'N') { + if(((i != 0) && (mode[i - 1] != 'N')) || (i == 0)) { + mlen = 0; + while (((mlen + i) < length) && (mode[mlen + i] == 'N')) { + mlen++; + }; + if(mlen < 6) { + for(j = 0; j < mlen; j++) { + mode[i + j] = 'A'; + } + } + } + } + } + + /* If less than 4 alphanumeric characters together then don't use alphanumeric mode */ + for(i = 0; i < length; i++) { + if(mode[i] == 'A') { + if(((i != 0) && (mode[i - 1] != 'A')) || (i == 0)) { + mlen = 0; + while (((mlen + i) < length) && (mode[mlen + i] == 'A')) { + mlen++; + }; + if(mlen < 6) { + for(j = 0; j < mlen; j++) { + mode[i + j] = 'B'; + } + } + } + } + } +} + +int estimate_binary_length(char mode[], int length) +{ + /* Make an estimate (worst case scenario) of how long the binary string will be */ + int i, count = 0; + char current = 0; + int a_count = 0; + int n_count = 0; + + switch(mode[0]) { + case 'K': count = 12 + 4; current = 'K'; break; + case 'B': count = 16 + 4; current = 'B'; break; + case 'A': count = 13 + 4; current = 'A'; break; + case 'N': count = 14 + 4; current = 'N'; break; + } + + for(i = 0; i < length; i++) { + if(mode[i] != current) { + if(current == 'N') { + switch(n_count) { + case 1: count += 4; break; + case 2: count += 7; break; + } + } + + switch(mode[i]) { + case 'K': count += 12 + 4; current = 'K'; break; + case 'B': count += 16 + 4; current = 'B'; break; + case 'A': count += 13 + 4; current = 'A'; break; + case 'N': count += 14 + 4; current = 'N'; break; + } + } + + switch(mode[i]) { + case 'K': count += 13; break; + case 'B': count += 8; break; + case 'A': a_count++; if((a_count % 2) == 0) { count += 11; a_count = 0; } break; + case 'N': n_count++; if((n_count % 3) == 0) { count += 10; n_count = 0; } break; + } + + } + + return count; +} + +void qr_binary(int datastream[], int version, int target_binlen, char mode[], int jisdata[], int length) +{ + /* Convert input data to a binary stream and add padding */ + int position = 0, debug = 1; + int short_data_block_length, i, scheme; + char data_block, padbits; + int current_binlen, current_bytes; + int toggle; + +#ifndef _MSC_VER + char binary[target_binlen * 8]; +#else + char binary = (char *)_alloca(target_binlen * 8); +#endif + strcpy(binary, ""); + + if(version <= 9) { + scheme = 1; + } + if((version >= 10) && (version <= 26)) { + scheme = 2; + } + if(version >= 27) { + scheme = 3; + } + + if(debug) { + for(i = 0; i < length; i++) { + printf("%c", mode[i]); + } + printf("\n"); + } + + do { + data_block = mode[position]; + short_data_block_length = 0; + do { + short_data_block_length++; + } while (((short_data_block_length + position) < length) && (mode[position + short_data_block_length] == data_block)); + + switch(data_block) { + case 'K': + /* Kanji mode */ + /* Mode indicator */ + concat(binary, "1000"); + + /* Character count indicator */ + switch(scheme) { + case 3: + if(short_data_block_length & 0x800) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x400) { concat(binary, "1"); } else { concat(binary, "0"); } + case 2: + if(short_data_block_length & 0x200) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x100) { concat(binary, "1"); } else { concat(binary, "0"); } + case 1: + if(short_data_block_length & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); } + break; + } + + if(debug) { printf("Kanji block (length %d)\n\t", short_data_block_length); } + + /* Character representation */ + for(i = 0; i < short_data_block_length; i++) { + int jis = jisdata[position + i]; + int msb, lsb, prod; + + if(jis > 0x9fff) { jis -= 0xc140; } + msb = (jis & 0xff00) >> 4; + lsb = (jis & 0xff); + prod = (msb * 0xc0) + lsb; + + if(prod & 0x1000) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x800) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x400) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x200) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x100) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); } + + if(debug) { printf("0x%4X ", prod); } + } + + if(debug) { printf("\n"); } + + break; + case 'B': + /* Byte mode */ + /* Mode indicator */ + concat(binary, "0100"); + + /* Character count indicator */ + switch (scheme) { + case 3: + case 2: + if(short_data_block_length & 0x8000) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x4000) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x2000) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x1000) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x800) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x400) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x200) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x100) { concat(binary, "1"); } else { concat(binary, "0"); } + case 1: + if(short_data_block_length & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); } + break; + } + + if(debug) { printf("Byte block (length %d)\n\t", short_data_block_length); } + + /* Character representation */ + for(i = 0; i < short_data_block_length; i++) { + int byte = jisdata[position + i]; + + if(byte & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); } + if(byte & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); } + if(byte & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); } + if(byte & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); } + if(byte & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); } + if(byte & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); } + if(byte & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); } + if(byte & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); } + + if(debug) { printf("0x%4X ", byte); } + } + + if(debug) { printf("\n"); } + + break; + case 'A': + /* Alphanumeric mode */ + /* Mode indicator */ + concat(binary, "0010"); + + /* Character count indicator */ + switch (scheme) { + case 3: + if(short_data_block_length & 0x1000) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x800) { concat(binary, "1"); } else { concat(binary, "0"); } + case 2: + if(short_data_block_length & 0x400) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x200) { concat(binary, "1"); } else { concat(binary, "0"); } + case 1: + if(short_data_block_length & 0x100) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); } + break; + } + + if(debug) { printf("Alpha block (length %d)\n\t", short_data_block_length); } + + /* Character representation */ + i = 0; + while ( i < short_data_block_length ) { + int count; + int first = 0, second = 0, prod; + + first = posn(RHODIUM, (char) jisdata[position + i]); + count = 1; + prod = first; + + if(mode[position + i + 1] == 'A') { + second = posn(RHODIUM, (char) jisdata[position + i + 1]); + count = 2; + prod = (first * 45) + second; + } + + switch(count) { + case 2: + if(prod & 0x400) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x200) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x100) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); } + case 1: + if(prod & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); } + break; + } + + if(debug) { printf("0x%4X ", prod); } + + i += 2; + }; + + if(debug) { printf("\n"); } + + break; + case 'N': + /* Numeric mode */ + /* Mode indicator */ + concat(binary, "0001"); + + /* Character count indicator */ + switch (scheme) { + case 3: + if(short_data_block_length & 0x2000) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x1000) { concat(binary, "1"); } else { concat(binary, "0"); } + case 2: + if(short_data_block_length & 0x800) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x400) { concat(binary, "1"); } else { concat(binary, "0"); } + case 1: + if(short_data_block_length & 0x200) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x100) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); } + if(short_data_block_length & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); } + break; + } + + if(debug) { printf("Number block (length %d)\n\t", short_data_block_length); } + + /* Character representation */ + i = 0; + while ( i < short_data_block_length ) { + int count; + int first = 0, second = 0, third = 0, prod; + + first = posn(NEON, (char) jisdata[position + i]); + count = 1; + prod = first; + + if(mode[position + i + 1] == 'N') { + second = posn(NEON, (char) jisdata[position + i + 1]); + count = 2; + prod = (prod * 10) + second; + } + + if(mode[position + i + 2] == 'N') { + third = posn(NEON, (char) jisdata[position + i + 2]); + count = 3; + prod = (prod * 10) + third; + } + + switch(count) { + case 3: + if(prod & 0x200) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x100) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); } + case 2: + if(prod & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); } + case 1: + if(prod & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); } + if(prod & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); } + break; + } + + if(debug) { printf("0x%4X (%d)", prod, prod); } + + i += 3; + }; + + if(debug) { printf("\n"); } + + break; + } + + position += short_data_block_length; + } while (position < length - 1) ; + + /* Terminator */ + concat(binary, "0000"); + + current_binlen = strlen(binary); + padbits = 8 - (current_binlen % 8); + if(padbits == 8) { padbits = 0; } + current_bytes = (current_binlen + padbits) / 8; + + /* Padding bits */ + for(i = 0; i < padbits; i++) { + concat(binary, "0"); } - code = QRcode_encodeString((char*)intext, version, level, hint, 1); + /* Put data into 8-bit codewords */ + for(i = 0; i < current_bytes; i++) { + datastream[i] = 0x00; + if(binary[i * 8] == '1') { datastream[i] += 0x80; } + if(binary[i * 8 + 1] == '1') { datastream[i] += 0x40; } + if(binary[i * 8 + 2] == '1') { datastream[i] += 0x20; } + if(binary[i * 8 + 3] == '1') { datastream[i] += 0x10; } + if(binary[i * 8 + 4] == '1') { datastream[i] += 0x08; } + if(binary[i * 8 + 5] == '1') { datastream[i] += 0x04; } + if(binary[i * 8 + 6] == '1') { datastream[i] += 0x02; } + if(binary[i * 8 + 7] == '1') { datastream[i] += 0x01; } + } + + /* Add pad codewords */ + toggle = 0; + for(i = current_bytes; i < target_binlen; i++) { + if(toggle == 0) { + datastream[i] = 0xec; + toggle = 1; + } else { + datastream[i] = 0x11; + toggle = 0; + } + } - return code; + if(debug) { + for(i = 0; i < target_binlen; i++) { + printf("0x%2X ", datastream[i]); + } + printf("\n"); + } +} + +void add_ecc(int fullstream[], int datastream[], int version, int data_cw, int blocks) +{ + /* Split data into blocks, add error correction and then interleave the blocks and error correction data */ + int ecc_cw = qr_total_codewords[version - 1] - data_cw; + int short_data_block_length = data_cw / blocks; + int qty_long_blocks = data_cw % blocks; + int qty_short_blocks = blocks - qty_long_blocks; + int ecc_block_length = ecc_cw / blocks; + int i, j, length_this_block, posn, debug = 1; + RS *rs; + + +#ifndef _MSC_VER + unsigned char data_block[short_data_block_length + 2]; + unsigned char ecc_block[ecc_block_length + 2]; + int interleaved_data[data_cw + 2]; + int interleaved_ecc[ecc_cw + 2]; +#else + unsigned char data_block = (unsigned char *)_alloca(short_data_block_length + 2); + unsigned char ecc_block = (unsigned char *)_alloca(ecc_block_length + 2); + int interleaved_data = (int *)_alloca(data_cw + 2); + int interleaved_ecc = (int *)_alloca(ecc_cw + 2); +#endif + + posn = 0; + + for(i = 0; i < blocks; i++) { + if(i < qty_short_blocks) { length_this_block = short_data_block_length; } else { length_this_block = short_data_block_length + 1; } + + for(j = 0; j < ecc_block_length; j++) { + ecc_block[j] = 0; + } + + for(j = 0; j < length_this_block; j++) { + data_block[j] = (unsigned char) datastream[posn + j]; + } + + rs = init_rs(8, 0x11d, 0, 1, ecc_block_length, 255 - length_this_block - ecc_block_length); + encode_rs_char(rs, data_block, ecc_block); + + if(debug) { + printf("Block %d: ", i + 1); + for(j = 0; j < length_this_block; j++) { + printf("%2X ", data_block[j]); + } + if(i < qty_short_blocks) { + printf(" "); + } + printf(" // "); + for(j = 0; j < ecc_block_length; j++) { + printf("%2X ", ecc_block[j]); + } + printf("\n"); + } + + for(j = 0; j < short_data_block_length; j++) { + interleaved_data[(j * blocks) + i] = (int) data_block[j]; + } + + if(i >= qty_short_blocks){ + interleaved_data[(short_data_block_length * blocks) + (i - qty_short_blocks)] = (int) data_block[short_data_block_length]; + } + + for(j = 0; j < ecc_block_length; j++) { + interleaved_ecc[(j * blocks) + i] = (int) ecc_block[j]; + } + + posn += length_this_block; + } + free_rs_cache(); + + for(j = 0; j < data_cw; j++) { + fullstream[j] = interleaved_data[j]; + } + for(j = 0; j < ecc_cw; j++) { + fullstream[j + data_cw] = interleaved_ecc[j]; + } + + if(debug) { + printf("\nData Stream: \n"); + for(j = 0; j < (data_cw + ecc_cw); j++) { + printf("%2X ", fullstream[j]); + } + printf("\n"); + } +} + +void place_finder(unsigned char grid[], int size, int x, int y) +{ + int xp, yp; + + int finder[] = { + 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 1, + 1, 0, 1, 1, 1, 0, 1, + 1, 0, 1, 1, 1, 0, 1, + 1, 0, 1, 1, 1, 0, 1, + 1, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1 + }; + + for(xp = 0; xp < 7; xp++) { + for(yp = 0; yp < 7; yp++) { + if (finder[xp + (7 * yp)] == 1) { + grid[((yp + y) * size) + (xp + x)] = 0x11; + } else { + grid[((yp + y) * size) + (xp + x)] = 0x10; + } + } + } +} + +void setup_grid(unsigned char* grid, int size) +{ + int i, toggle = 1; + + for(i = 0; i < size; i++) { + if(toggle == 1) { + grid[(6 * size) + i] = 0x11; + grid[(i * size) + 6] = 0x11; + toggle = 0; + } else { + grid[(6 * size) + i] = 0x10; + grid[(i * size) + 6] = 0x10; + toggle = 1; + } + } + + place_finder(grid, size, 0, 0); + place_finder(grid, size, 0, size - 7); + place_finder(grid, size, size - 7, 0); } int qr_code(struct zint_symbol *symbol, unsigned char source[], int length) { - QRcode *code; - int i, j; - int kanji, gs1; - int error_number; + int error_number, i, j, glyph, est_binlen; + int ecc_level, autosize, version, max_cw, target_binlen, blocks, size; #ifndef _MSC_VER - unsigned char local_source[length]; + int utfdata[length + 1]; + int jisdata[length + 1]; + char mode[length + 1]; #else - unsigned char local_source = (unsigned char*)_alloca(length); + int utfdata = (int *)_alloca((length + 1) * sizeof(int)); + int jisdata = (int *)_alloca((length + 1) * sizeof(int)); + char mode = (char *)_alloca((length + 1) * sizeof(int)); #endif - if(symbol->input_mode == GS1_MODE) { gs1 = 1; } else { gs1 = 0; } - - if(gs1) { - strcpy(symbol->errtxt, "GS1 mode not yet supported in QR Code"); - return ERROR_INVALID_OPTION; - } - - for(i = 0; i < length; i++) { - if(source[i] == '\0') { - strcpy(symbol->errtxt, "QR Code not yet able to handle NULL characters"); - return ERROR_INVALID_DATA; - } - } - - /* The following to be replaced by ECI handling */ switch(symbol->input_mode) { case DATA_MODE: for(i = 0; i < length; i++) { - local_source[i] = source[i]; + jisdata[i] = (int)source[i]; } - local_source[length] = '\0'; - kanji = 0; break; - case UNICODE_MODE: - error_number = shiftJIS(symbol, source, local_source, &length, &kanji); + default: + /* Convert Unicode input to Shift-JIS */ + error_number = utf8toutf16(symbol, source, utfdata, &length); if(error_number != 0) { return error_number; } + + for(i = 0; i < length; i++) { + if(utfdata[i] <= 0xff) { + jisdata[i] = utfdata[i]; + } else { + j = 0; + glyph = 0; + do { + if(sjis_lookup[j * 2] == utfdata[i]) { + glyph = sjis_lookup[(j * 2) + 1]; + } + j++; + } while ((j < 6843) && (glyph == 0)); + if(glyph == 0) { + strcpy(symbol->errtxt, "Invalid character in input data"); + return ERROR_INVALID_DATA; + } + jisdata[i] = glyph; + } + } break; } + + define_mode(mode, jisdata, length); + est_binlen = estimate_binary_length(mode, length); + + ecc_level = LEVEL_L; + max_cw = 2956; + if((symbol->option_1 >= 1) && (symbol->option_1 <= 4)) { + switch (symbol->option_1) { + case 1: ecc_level = LEVEL_L; max_cw = 2956; break; + case 2: ecc_level = LEVEL_M; max_cw = 2334; break; + case 3: ecc_level = LEVEL_Q; max_cw = 1666; break; + case 4: ecc_level = LEVEL_H; max_cw = 1276; break; + } + } + + if(est_binlen > (8 * max_cw)) { + strcpy(symbol->errtxt, "Input too long for selected error correction level"); + return ERROR_TOO_LONG; + } + + autosize = 40; + for(i = 39; i >= 0; i--) { + switch(ecc_level) { + case LEVEL_L: + if ((8 * qr_data_codewords_L[i]) >= est_binlen) { + autosize = i + 1; + } + break; + case LEVEL_M: + if ((8 * qr_data_codewords_M[i]) >= est_binlen) { + autosize = i + 1; + } + break; + case LEVEL_Q: + if ((8 * qr_data_codewords_Q[i]) >= est_binlen) { + autosize = i + 1; + } + break; + case LEVEL_H: + if ((8 * qr_data_codewords_H[i]) >= est_binlen) { + autosize = i + 1; + } + break; + } + } + + if((symbol->option_2 >= 1) && (symbol->option_2 <= 40)) { + if (symbol->option_2 > autosize) { + version = symbol->option_2; + } else { + version = autosize; + } + } else { + version = autosize; + } - code = encode(symbol->option_1, symbol->option_2, local_source, kanji, gs1, length); - if(code == NULL) { - strcpy(symbol->errtxt, "libqrencode failed to encode the input data"); - return ERROR_ENCODING_PROBLEM; + target_binlen = qr_data_codewords_L[version - 1]; blocks = qr_blocks_L[version - 1]; + switch(ecc_level) { + case LEVEL_M: target_binlen = qr_data_codewords_M[version - 1]; blocks = qr_blocks_M[version - 1]; break; + case LEVEL_Q: target_binlen = qr_data_codewords_Q[version - 1]; blocks = qr_blocks_Q[version - 1]; break; + case LEVEL_H: target_binlen = qr_data_codewords_H[version - 1]; blocks = qr_blocks_H[version - 1]; break; } - symbol->width = code->width; - symbol->rows = code->width; +#ifndef _MSC_VER + int datastream[target_binlen + 1]; + int fullstream[qr_total_codewords[version - 1] + 1]; +#else + int datastream = (int *)_alloca((target_binlen + 1) * sizeof(int)); + int fullstream = (int *)_alloca((qr_total_codewords[version - 1] + 1) * sizeof(int)); +#endif + + qr_binary(datastream, version, target_binlen, mode, jisdata, length); + add_ecc(fullstream, datastream, version, target_binlen, blocks); - for(i = 0; i < code->width; i++) { - for(j = 0; j < code->width; j++) { - if((*(code->data + (i * code->width) + j) & 0x01) != 0) { + size = qr_sizes[version - 1]; +#ifndef _MSC_VER + unsigned char grid[size * size]; +#else + unsigned char grid = (unsigned char *)_alloca((size * size) * sizeof(unsigned char)); +#endif + + for(i = 0; i < size; i++) { + for(j = 0; j < size; j++) { + grid[(i * size) + j] = 0; + } + } + + setup_grid(grid, size); + + symbol->width = size; + symbol->rows = size; + + for(i = 0; i < size; i++) { + for(j = 0; j < size; j++) { + if(grid[(i * size) + j] & 0x01) { set_module(symbol, i, j); } } symbol->row_height[i] = 1; } - QRcode_free(code); + printf("Version %d: target %d bytes\n", version, target_binlen); return 0; } -#else -/* Handler if no QR Encode library is available */ -int qr_code(struct zint_symbol *symbol, unsigned char source[]) -{ - strcpy(symbol->errtxt, "QR Code library not available"); - return ERROR_INVALID_OPTION; -} -#endif - diff --git a/backend/qr.h b/backend/qr.h new file mode 100644 index 00000000..7f4efb15 --- /dev/null +++ b/backend/qr.h @@ -0,0 +1,84 @@ +/* qr.h Data for QR Code */ + +/* + libzint - the open source barcode library + Copyright (C) 2008 Robin Stuart + Copyright (C) 2006 Kentaro Fukuchi + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + +#define LEVEL_L 1 +#define LEVEL_M 2 +#define LEVEL_Q 3 +#define LEVEL_H 4 + +#define RHODIUM "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:" + +/* From ISO/IEC 18004:2006 Table 7 */ +static int qr_data_codewords_L[] = { + 19, 34, 55, 80, 108, 136, 156, 194, 232, 274, 324, 370, 428, 461, 523, 589, 647, + 721, 795, 861, 932, 1006, 1094, 1174, 1276, 1370, 1468, 1531, 1631, + 1735, 1843, 1955, 2071, 2191, 2306, 2434, 2566, 2702, 2812, 2956 +}; + +static int qr_data_codewords_M[] = { + 16, 28, 44, 64, 86, 108, 124, 154, 182, 216, 254, 290, 334, 365, 415, 453, 507, + 563, 627, 669, 714, 782, 860, 914, 1000, 1062, 1128, 1193, 1267, + 1373, 1455, 1541, 1631, 1725, 1812, 1914, 1992, 2102, 2216, 2334 +}; + +static int qr_data_codewords_Q[] = { + 13, 22, 34, 48, 62, 76, 88, 110, 132, 154, 180, 206, 244, 261, 295, 325, 367, + 397, 445, 485, 512, 568, 614, 664, 718, 754, 808, 871, 911, + 985, 1033, 1115, 1171, 1231, 1286, 1354, 1426, 1502, 1582, 1666 +}; + +static int qr_data_codewords_H[] = { + 9, 16, 26, 36, 46, 60, 66, 86, 100, 122, 140, 158, 180, 197, 223, 253, 283, + 313, 341, 385, 406, 442, 464, 514, 538, 596, 628, 661, 701, + 745, 793, 845, 901, 961, 986, 1054, 1096, 1142, 1222, 1276 +}; + +static int qr_total_codewords[] = { + 26, 44, 70, 100, 134, 172, 196, 242, 292, 346, 404, 466, 532, 581, 655, 733, 815, + 901, 991, 1085, 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, + 2185, 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706 +}; + +static int qr_blocks_L[] = { + 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, + 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25 +}; + +static int qr_blocks_M[] = { + 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, + 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49 +}; + +static int qr_blocks_Q[] = { + 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, + 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68 +}; + +static int qr_blocks_H[] = { + 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, + 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81 +}; + +static int qr_sizes[] = { + 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 97, + 101, 105, 109, 113, 117, 121, 125, 129, 133, 137, 141, 145, 149, 153, 157, 161, 165, 169, 173, 177 +}; diff --git a/backend/qrrs.c b/backend/qrrs.c new file mode 100644 index 00000000..d6162615 --- /dev/null +++ b/backend/qrrs.c @@ -0,0 +1,310 @@ +/* qrrs.c - Reed Solomon routines for QR Code + + This file pinched wholesale from libqrencode and unchanged hence + original copyright and license applies as below +*/ + +/* + * qrencode - QR Code encoder + * + * Reed solomon encoder. This code is taken from Phil Karn's libfec then + * editted and packed into a pair of .c and .h files. + * + * Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q + * (libfec is released under the GNU Lesser General Public License.) + * + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include "qrrs.h" + +/* Stuff specific to the 8-bit symbol version of the general purpose RS codecs + * + */ +typedef unsigned char data_t; + + +/** + * Reed-Solomon codec control block + */ +struct _RS { + int mm; /* Bits per symbol */ + int nn; /* Symbols per block (= (1<= rs->nn) { + x -= rs->nn; + x = (x >> rs->mm) + (x & rs->nn); + } + return x; +} + + +#define MODNN(x) modnn(rs,x) + +#define MM (rs->mm) +#define NN (rs->nn) +#define ALPHA_TO (rs->alpha_to) +#define INDEX_OF (rs->index_of) +#define GENPOLY (rs->genpoly) +#define NROOTS (rs->nroots) +#define FCR (rs->fcr) +#define PRIM (rs->prim) +#define IPRIM (rs->iprim) +#define PAD (rs->pad) +#define A0 (NN) + + +/* Initialize a Reed-Solomon codec + * symsize = symbol size, bits + * gfpoly = Field generator polynomial coefficients + * fcr = first root of RS code generator polynomial, index form + * prim = primitive element to generate polynomial roots + * nroots = RS code generator polynomial degree (number of roots) + * pad = padding bytes at front of shortened block + */ +static RS *init_rs_char(int symsize, int gfpoly, int fcr, int prim, int nroots, int pad) +{ + RS *rs; + + +/* Common code for intializing a Reed-Solomon control block (char or int symbols) + * Copyright 2004 Phil Karn, KA9Q + * May be used under the terms of the GNU Lesser General Public License (LGPL) + */ +//#undef NULL +//#define NULL ((void *)0) + + int i, j, sr,root,iprim; + + rs = NULL; + /* Check parameter ranges */ + if(symsize < 0 || symsize > (int)(8*sizeof(data_t))){ + goto done; + } + + if(fcr < 0 || fcr >= (1<= (1<= (1<= ((1<mm = symsize; + rs->nn = (1<pad = pad; + + rs->alpha_to = (data_t *)malloc(sizeof(data_t)*(rs->nn+1)); + if(rs->alpha_to == NULL){ + free(rs); + rs = NULL; + goto done; + } + rs->index_of = (data_t *)malloc(sizeof(data_t)*(rs->nn+1)); + if(rs->index_of == NULL){ + free(rs->alpha_to); + free(rs); + rs = NULL; + goto done; + } + + /* Generate Galois field lookup tables */ + rs->index_of[0] = A0; /* log(zero) = -inf */ + rs->alpha_to[A0] = 0; /* alpha**-inf = 0 */ + sr = 1; + for(i=0;inn;i++){ + rs->index_of[sr] = i; + rs->alpha_to[i] = sr; + sr <<= 1; + if(sr & (1<nn; + } + if(sr != 1){ + /* field generator polynomial is not primitive! */ + free(rs->alpha_to); + free(rs->index_of); + free(rs); + rs = NULL; + goto done; + } + + /* Form RS code generator polynomial from its roots */ + rs->genpoly = (data_t *)malloc(sizeof(data_t)*(nroots+1)); + if(rs->genpoly == NULL){ + free(rs->alpha_to); + free(rs->index_of); + free(rs); + rs = NULL; + goto done; + } + rs->fcr = fcr; + rs->prim = prim; + rs->nroots = nroots; + rs->gfpoly = gfpoly; + + /* Find prim-th root of 1, used in decoding */ + for(iprim=1;(iprim % prim) != 0;iprim += rs->nn) + ; + rs->iprim = iprim / prim; + + rs->genpoly[0] = 1; + for (i = 0,root=fcr*prim; i < nroots; i++,root += prim) { + rs->genpoly[i+1] = 1; + + /* Multiply rs->genpoly[] by @**(root + x) */ + for (j = i; j > 0; j--){ + if (rs->genpoly[j] != 0) + rs->genpoly[j] = rs->genpoly[j-1] ^ rs->alpha_to[modnn(rs,rs->index_of[rs->genpoly[j]] + root)]; + else + rs->genpoly[j] = rs->genpoly[j-1]; + } + /* rs->genpoly[0] can never be zero */ + rs->genpoly[0] = rs->alpha_to[modnn(rs,rs->index_of[rs->genpoly[0]] + root)]; + } + /* convert rs->genpoly[] to index form for quicker encoding */ + for (i = 0; i <= nroots; i++) + rs->genpoly[i] = rs->index_of[rs->genpoly[i]]; + done:; + + return rs; +} + +RS *init_rs(int symsize, int gfpoly, int fcr, int prim, int nroots, int pad) +{ + RS *rs; + + for(rs = rslist; rs != NULL; rs = rs->next) { + if(rs->pad != pad) continue; + if(rs->nroots != nroots) continue; + if(rs->mm != symsize) continue; + if(rs->gfpoly != gfpoly) continue; + if(rs->fcr != fcr) continue; + if(rs->prim != prim) continue; + + goto DONE; + } + + rs = init_rs_char(symsize, gfpoly, fcr, prim, nroots, pad); + if(rs == NULL) goto DONE; + rs->next = rslist; + rslist = rs; + +DONE: + return rs; +} + + +void free_rs_char(RS *rs) +{ + free(rs->alpha_to); + free(rs->index_of); + free(rs->genpoly); + free(rs); +} + +void free_rs_cache(void) +{ + RS *rs, *next; + + rs = rslist; + while(rs != NULL) { + next = rs->next; + free_rs_char(rs); + rs = next; + } +} + +/* The guts of the Reed-Solomon encoder, meant to be #included + * into a function body with the following typedefs, macros and variables supplied + * according to the code parameters: + + * data_t - a typedef for the data symbol + * data_t data[] - array of NN-NROOTS-PAD and type data_t to be encoded + * data_t parity[] - an array of NROOTS and type data_t to be written with parity symbols + * NROOTS - the number of roots in the RS code generator polynomial, + * which is the same as the number of parity symbols in a block. + Integer variable or literal. + * + * NN - the total number of symbols in a RS block. Integer variable or literal. + * PAD - the number of pad symbols in a block. Integer variable or literal. + * ALPHA_TO - The address of an array of NN elements to convert Galois field + * elements in index (log) form to polynomial form. Read only. + * INDEX_OF - The address of an array of NN elements to convert Galois field + * elements in polynomial form to index (log) form. Read only. + * MODNN - a function to reduce its argument modulo NN. May be inline or a macro. + * GENPOLY - an array of NROOTS+1 elements containing the generator polynomial in index form + + * The memset() and memmove() functions are used. The appropriate header + * file declaring these functions (usually ) must be included by the calling + * program. + + * Copyright 2004, Phil Karn, KA9Q + * May be used under the terms of the GNU Lesser General Public License (LGPL) + */ + +#undef A0 +#define A0 (NN) /* Special reserved value encoding zero in index form */ + +void encode_rs_char(RS *rs, const data_t *data, data_t *parity) +{ + int i, j; + data_t feedback; + + memset(parity,0,NROOTS*sizeof(data_t)); + + for(i=0;i + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __QRRS_H__ +#define __QRRS_H__ + +/* + * General purpose RS codec, 8-bit symbols. + */ + +typedef struct _RS RS; + +/* WARNING: Thread unsafe!!! */ +extern RS *init_rs(int symsize, int gfpoly, int fcr, int prim, int nroots, int pad); +extern void encode_rs_char(RS *rs, const unsigned char *data, unsigned char *parity); +extern void free_rs_char(RS *rs); +extern void free_rs_cache(void); + +#endif /* __QRRS_H__ */ diff --git a/backend/reedsol.h b/backend/reedsol.h index 5de691b4..3a7f8efa 100644 --- a/backend/reedsol.h +++ b/backend/reedsol.h @@ -22,10 +22,19 @@ #ifndef __REEDSOL_H #define __REEDSOL_H -void rs_init_gf(int poly); -void rs_init_code(int nsym, int index); -void rs_encode(int len, unsigned char *data, unsigned char *res); -void rs_encode_long(int len, unsigned int *data, unsigned int *res); -void rs_free(); +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +extern void rs_init_gf(int poly); +extern void rs_init_code(int nsym, int index); +extern void rs_encode(int len, unsigned char *data, unsigned char *res); +extern void rs_encode_long(int len, unsigned int *data, unsigned int *res); +extern void rs_free(void); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif /* __REEDSOL_H */ diff --git a/backend/rss.c b/backend/rss.c index 866ce2f4..2eb3aac1 100644 --- a/backend/rss.c +++ b/backend/rss.c @@ -142,22 +142,22 @@ void getRSSwidths(int val, int n, int elements, int maxWidth, int noNarrow) return; } -int rss14(struct zint_symbol *symbol, unsigned char source[], int length) +int rss14(struct zint_symbol *symbol, unsigned char source[], int src_len) { /* GS1 DataBar-14 */ int error_number = 0, i, j, mask; short int accum[112], left_reg[112], right_reg[112], x_reg[112], y_reg[112]; int data_character[4], data_group[4], v_odd[4], v_even[4]; int data_widths[8][4], checksum, c_left, c_right, total_widths[46], writer; - char latch, hrt[15]; + char latch, hrt[15], temp[32]; int check_digit, count, separator_row; separator_row = 0; - if(length > 13) { + if(src_len > 13) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, src_len); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; @@ -185,11 +185,11 @@ int rss14(struct zint_symbol *symbol, unsigned char source[], int length) data_group[i] = 0; } - binary_load(accum, (char*)source); - + binary_load(accum, (char*)source, src_len); + strcpy(temp, "10000000000000"); if(symbol->option_1 == 2) { /* Add symbol linkage flag */ - binary_load(y_reg, "10000000000000"); + binary_load(y_reg, temp, strlen(temp)); binary_add(accum, y_reg); for(i = 0; i < 112; i++) { y_reg[i] = 0; @@ -197,7 +197,8 @@ int rss14(struct zint_symbol *symbol, unsigned char source[], int length) } /* Calculate left and right pair values */ - binary_load(x_reg, "4537077"); + strcpy(temp, "4537077"); + binary_load(x_reg, temp, strlen(temp)); for(i = 0; i < 24; i++) { shiftup(x_reg); @@ -217,7 +218,8 @@ int rss14(struct zint_symbol *symbol, unsigned char source[], int length) } /* Calculate four data characters */ - binary_load(x_reg, "1597"); + strcpy(temp, "1597"); + binary_load(x_reg, temp, strlen(temp)); for(i = 0; i < 112; i++) { accum[i] = left_reg[i]; } @@ -246,8 +248,8 @@ int rss14(struct zint_symbol *symbol, unsigned char source[], int length) } mask = mask >> 1; } - - binary_load(x_reg, "1597"); + strcpy(temp, "1597"); + binary_load(x_reg, temp, strlen(temp)); for(i = 0; i < 112; i++) { accum[i] = right_reg[i]; } @@ -431,8 +433,8 @@ int rss14(struct zint_symbol *symbol, unsigned char source[], int length) for(i = 0; i < 14; i++) { hrt[i] = '0'; } - for(i = 0; i < ustrlen(source); i++) { - hrt[12 - i] = source[ustrlen(source) - i - 1]; + for(i = 0; i < src_len; i++) { + hrt[12 - i] = source[src_len - i - 1]; } hrt[14] = '\0'; @@ -651,28 +653,28 @@ int rss14(struct zint_symbol *symbol, unsigned char source[], int length) return error_number; } -int rsslimited(struct zint_symbol *symbol, unsigned char source[], int length) +int rsslimited(struct zint_symbol *symbol, unsigned char source[], int src_len) { /* GS1 DataBar Limited */ int error_number = 0, i, mask; short int accum[112], left_reg[112], right_reg[112], x_reg[112], y_reg[112]; int left_group, right_group, left_odd, left_even, right_odd, right_even; int left_character, right_character, left_widths[14], right_widths[14]; int checksum, check_elements[14], total_widths[46], writer, j, check_digit, count; - char latch, hrt[15]; + char latch, hrt[15], temp[32]; int separator_row; separator_row = 0; - if(length > 13) { + if(src_len > 13) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - error_number = is_sane(NESET, source, length); + error_number = is_sane(NEON, source, src_len); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } - if(length == 13) { + if(src_len == 13) { if((source[0] != '0') && (source[0] != '1')) { strcpy(symbol->errtxt, "Input out of range"); return ERROR_INVALID_DATA; @@ -692,10 +694,11 @@ int rsslimited(struct zint_symbol *symbol, unsigned char source[], int length) y_reg[i] = 0; } - binary_load(accum, (char*)source); + binary_load(accum, (char*)source, src_len); if(symbol->option_1 == 2) { /* Add symbol linkage flag */ - binary_load(y_reg, "2015133531096"); + strcpy(temp, "2015133531096"); + binary_load(y_reg, temp, strlen(temp)); binary_add(accum, y_reg); for(i = 0; i < 112; i++) { y_reg[i] = 0; @@ -703,7 +706,8 @@ int rsslimited(struct zint_symbol *symbol, unsigned char source[], int length) } /* Calculate left and right pair values */ - binary_load(x_reg, "2013571"); + strcpy(temp, "2013571"); + binary_load(x_reg, temp, strlen(temp)); for(i = 0; i < 24; i++) { shiftup(x_reg); @@ -723,72 +727,96 @@ int rsslimited(struct zint_symbol *symbol, unsigned char source[], int length) } left_group = 0; - binary_load(accum, "183063"); + strcpy(temp, "183063"); + binary_load(accum, temp, strlen(temp)); if(islarger(left_reg, accum)) { left_group = 1; } - binary_load(accum, "820063"); + strcpy(temp, "820063"); + binary_load(accum, temp, strlen(temp)); if(islarger(left_reg, accum)) { left_group = 2; } - binary_load(accum, "1000775"); + strcpy(temp, "1000775"); + binary_load(accum, temp, strlen(temp)); if(islarger(left_reg, accum)) { left_group = 3; } - binary_load(accum, "1491020"); + strcpy(temp, "1491020"); + binary_load(accum, temp, strlen(temp)); if(islarger(left_reg, accum)) { left_group = 4; } - binary_load(accum, "1979844"); + strcpy(temp, "1979844"); + binary_load(accum, temp, strlen(temp)); if(islarger(left_reg, accum)) { left_group = 5; } - binary_load(accum, "1996938"); + strcpy(temp, "1996938"); + binary_load(accum, temp, strlen(temp)); if(islarger(left_reg, accum)) { left_group = 6; } right_group = 0; - binary_load(accum, "183063"); + strcpy(temp, "183063"); + binary_load(accum, temp, strlen(temp)); if(islarger(right_reg, accum)) { right_group = 1; } - binary_load(accum, "820063"); + strcpy(temp, "820063"); + binary_load(accum, temp, strlen(temp)); if(islarger(right_reg, accum)) { right_group = 2; } - binary_load(accum, "1000775"); + strcpy(temp, "1000775"); + binary_load(accum, temp, strlen(temp)); if(islarger(right_reg, accum)) { right_group = 3; } - binary_load(accum, "1491020"); + strcpy(temp, "1491020"); + binary_load(accum, temp, strlen(temp)); if(islarger(right_reg, accum)) { right_group = 4; } - binary_load(accum, "1979844"); + strcpy(temp, "1979844"); + binary_load(accum, temp, strlen(temp)); if(islarger(right_reg, accum)) { right_group = 5; } - binary_load(accum, "1996938"); + strcpy(temp, "1996938"); + binary_load(accum, temp, strlen(temp)); if(islarger(right_reg, accum)) { right_group = 6; } switch(left_group) { - case 1: binary_load(accum, "183064"); + case 1: strcpy(temp, "183064"); + binary_load(accum, temp, strlen(temp)); binary_subtract(left_reg, accum); break; - case 2: binary_load(accum, "820064"); + case 2: strcpy(temp, "820064"); + binary_load(accum, temp, strlen(temp)); binary_subtract(left_reg, accum); break; - case 3: binary_load(accum, "1000776"); + case 3: strcpy(temp, "1000776"); + binary_load(accum, temp, strlen(temp)); binary_subtract(left_reg, accum); break; - case 4: binary_load(accum, "1491021"); + case 4: strcpy(temp, "1491021"); + binary_load(accum, temp, strlen(temp)); binary_subtract(left_reg, accum); break; - case 5: binary_load(accum, "1979845"); + case 5: strcpy(temp, "1979845"); + binary_load(accum, temp, strlen(temp)); binary_subtract(left_reg, accum); break; - case 6: binary_load(accum, "1996939"); + case 6: strcpy(temp, "1996939"); + binary_load(accum, temp, strlen(temp)); binary_subtract(left_reg, accum); break; } switch(right_group) { - case 1: binary_load(accum, "183064"); - binary_subtract(right_reg, accum); - break; - case 2: binary_load(accum, "820064"); - binary_subtract(right_reg, accum); - break; - case 3: binary_load(accum, "1000776"); - binary_subtract(right_reg, accum); - break; - case 4: binary_load(accum, "1491021"); - binary_subtract(right_reg, accum); - break; - case 5: binary_load(accum, "1979845"); - binary_subtract(right_reg, accum); - break; - case 6: binary_load(accum, "1996939"); - binary_subtract(right_reg, accum); - break; + case 1: strcpy(temp, "183064"); + binary_load(accum, temp, strlen(temp)); + binary_subtract(right_reg, accum); + break; + case 2: strcpy(temp, "820064"); + binary_load(accum, temp, strlen(temp)); + binary_subtract(right_reg, accum); + break; + case 3: strcpy(temp, "1000776"); + binary_load(accum, temp, strlen(temp)); + binary_subtract(right_reg, accum); + break; + case 4: strcpy(temp, "1491021"); + binary_load(accum, temp, strlen(temp)); + binary_subtract(right_reg, accum); + break; + case 5: strcpy(temp, "1979845"); + binary_load(accum, temp, strlen(temp)); + binary_subtract(right_reg, accum); + break; + case 6: strcpy(temp, "1996939"); + binary_load(accum, temp, strlen(temp)); + binary_subtract(right_reg, accum); + break; } left_character = 0; @@ -898,8 +926,8 @@ int rsslimited(struct zint_symbol *symbol, unsigned char source[], int length) for(i = 0; i < 14; i++) { hrt[i] = '0'; } - for(i = 0; i < ustrlen(source); i++) { - hrt[12 - i] = source[ustrlen(source) - i - 1]; + for(i = 0; i < src_len; i++) { + hrt[12 - i] = source[src_len - i - 1]; } for (i = 0; i < 13; i++) @@ -1858,7 +1886,7 @@ int rss_binary_string(struct zint_symbol *symbol, char source[], char binary_str return 0; } -int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int length) +int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int src_len) { /* GS1 DataBar Expanded */ int i, j, k, l, data_chars, vs[21], group[21], v_odd[21], v_even[21]; char substring[21][14], latch; @@ -1868,10 +1896,10 @@ int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int length) int codeblocks, sub_elements[235], stack_rows, current_row, current_block; int separator_row; #ifndef _MSC_VER - char reduced[length], binary_string[7 * length]; + char reduced[src_len], binary_string[7 * src_len]; #else - char* reduced = (char*)_alloca(length); - char* binary_string = (char*)_alloca(7 * length); + char* reduced = (char*)_alloca(src_len); + char* binary_string = (char*)_alloca(7 * src_len); #endif separator_row = 0; @@ -1879,7 +1907,7 @@ int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int length) if(symbol->input_mode != GS1_MODE) { /* GS1 data has not been verified yet */ - i = gs1_verify(symbol, source, reduced); + i = gs1_verify(symbol, source, src_len, reduced); if(i != 0) { return i; } } @@ -2060,7 +2088,7 @@ int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int length) } /* Add human readable text */ - for(i = 0; i <= ustrlen(source); i++) { + for(i = 0; i <= src_len; i++) { if((source[i] != '[') && (source[i] != ']')) { symbol->text[i] = source[i]; } else { diff --git a/backend/shiftjis.c b/backend/shiftjis.c deleted file mode 100644 index 2c8a7e5b..00000000 --- a/backend/shiftjis.c +++ /dev/null @@ -1,118 +0,0 @@ -/* shiftjis.c - Handle conversion to Shift-JIS */ - -/* - libzint - the open source barcode library - Copyright (C) 2009 Robin Stuart - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -#include -#include "common.h" -#include "sjis.h" - -int shiftJIS(struct zint_symbol *symbol, unsigned char source[], unsigned char preprocessed[], int *length, int *kanji) -{ /* QR Code supports compression of Shift-JIS data using "Kanji" mode - this function - attempts to convert Unicode characters to Shift-JIS to allow this */ - int bpos, jpos, error_number, i, done; - int next; - unsigned long int uval, jval; - - bpos = 0; - jpos = 0; - error_number = 0; - next = 0; - - do { - uval = 0; - jval = 0; - done = 0; - - if(source[bpos] <= 0x7f) { - /* 1 byte mode (7-bit ASCII) */ - uval = source[bpos]; - next = bpos + 1; - preprocessed[jpos] = uval; - jpos++; - done = 1; - } - - if(done == 0) { - if((source[bpos] >= 0x80) && (source[bpos] <= 0xbf)) { - strcpy(symbol->errtxt, "Corrupt Unicode data"); - return ERROR_INVALID_DATA; - } - } - - if(done == 0) { - if((source[bpos] >= 0xc0) && (source[bpos] <= 0xc1)) { - strcpy(symbol->errtxt, "Overlong encoding not supported"); - return ERROR_INVALID_DATA; - } - } - - if(done == 0) { - if((source[bpos] >= 0xc2) && (source[bpos] <= 0xdf)) { - /* 2 byte mode (Latin 1) */ - uval = ((source[bpos] & 0x1f) << 6) + (source[bpos + 1] & 0x3f); - next = bpos + 2; - preprocessed[jpos] = uval; - jpos++; - done = 1; - } - } - - if(done == 0) { - if((source[bpos] >= 0xe0) && (source[bpos] <= 0xef)) { - /* 3 byte mode (Japanese) */ - uval = ((source[bpos] & 0x0f) << 12) + ((source[bpos + 1] & 0x3f) << 6) + (source[bpos + 2] & 0x3f); - next = bpos + 3; - *kanji = 1; - - for(i = 0; i < 6843; i++) { - if(sjis_lookup[i * 2] == uval) { - jval = sjis_lookup[(i * 2) + 1]; - } - } - - if(jval == 0) { - strcpy(symbol->errtxt, "Invalid Shift JIS character"); - return ERROR_INVALID_DATA; - } - - preprocessed[jpos] = (jval & 0xff00) >> 8; - preprocessed[jpos + 1] = (jval & 0xff); - - /* printf("Unicode value U+%04X = Shift JIS value 0x%04X\n", uval, jval); */ - - jpos += 2; - done = 1; - } - } - - if(done == 0) { - if(source[bpos] >= 0xf0) { - strcpy(symbol->errtxt, "Unicode sequences of more than 3 bytes not supported"); - return ERROR_INVALID_DATA; - } - } - - bpos = next; - - } while(bpos < *length); - *length = jpos; - - return error_number; -} diff --git a/backend/shiftjis.h b/backend/shiftjis.h deleted file mode 100644 index f3e3f5b4..00000000 --- a/backend/shiftjis.h +++ /dev/null @@ -1,27 +0,0 @@ -/* shiftjis.h - Handle conversion to Shift-JIS */ - -/* - libzint - the open source barcode library - Copyright (C) 2009 Robin Stuart - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -#ifndef __SHIFTJIS_H -#define __SHIFTJIS_H - -int shiftJIS(struct zint_symbol *symbol, unsigned char source[], unsigned char preprocessed[], int *length, int *kanji); - -#endif diff --git a/backend/svg.c b/backend/svg.c index f67fea41..b7b34e79 100644 --- a/backend/svg.c +++ b/backend/svg.c @@ -70,12 +70,12 @@ int svg_plot(struct zint_symbol *symbol) strcpy(symbol->errtxt, "Malformed background colour target"); return ERROR_INVALID_OPTION; } - error_number = is_sane(SSET, (unsigned char*)symbol->fgcolour, 6); + error_number = is_sane(SSET, (unsigned char*)symbol->fgcolour, strlen(symbol->fgcolour)); if (error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Malformed foreground colour target"); return ERROR_INVALID_OPTION; } - error_number = is_sane(SSET, (unsigned char*)symbol->bgcolour, 6); + error_number = is_sane(SSET, (unsigned char*)symbol->bgcolour, strlen(symbol->bgcolour)); if (error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Malformed background colour target"); return ERROR_INVALID_OPTION; diff --git a/backend/telepen.c b/backend/telepen.c index 8cced800..5d1ccd95 100644 --- a/backend/telepen.c +++ b/backend/telepen.c @@ -19,65 +19,55 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define NASET "0123456789X" +#define SODIUM "0123456789X" #include #include #include #include "common.h" -static char *TeleTable[] = { "1111111111111111", "1131313111", "33313111", "1111313131", - "3111313111", "11333131", "13133131", "111111313111", "31333111", "1131113131", "33113131", - "1111333111", "3111113131", "1113133111", "1311133111", "111111113131", "3131113111", - "11313331", "333331", "111131113111", "31113331", "1133113111", "1313113111", "1111113331", - "31131331", "113111113111", "3311113111", "1111131331", "311111113111", "1113111331", - "1311111331", "11111111113111", "31313311", "1131311131", "33311131", "1111313311", - "3111311131", "11333311", "13133311", "111111311131", "31331131", "1131113311", "33113311", - "1111331131", "3111113311", "1113131131", "1311131131", "111111113311", "3131111131", - "1131131311", "33131311", "111131111131", "3111131311", "1133111131", "1313111131", - "111111131311", "3113111311", "113111111131", "3311111131", "111113111311", "311111111131", - "111311111311", "131111111311", "11111111111131", "3131311111", "11313133", "333133", - "111131311111", "31113133", "1133311111", "1313311111", "1111113133", "313333", - "113111311111", "3311311111", "11113333", "311111311111", "11131333", "13111333", - "11111111311111", "31311133", "1131331111", "33331111", "1111311133", "3111331111", - "11331133", "13131133", "111111331111", "3113131111", "1131111133", "33111133", - "111113131111", "3111111133", "111311131111", "131111131111", "111111111133", "31311313", - "113131111111", "3331111111", "1111311313", "311131111111", "11331313", "13131313", - "11111131111111", "3133111111", "1131111313", "33111313", "111133111111", "3111111313", - "111313111111", "131113111111", "111111111313", "313111111111", "1131131113", "33131113", - "11113111111111", "3111131113", "113311111111", "131311111111", "111111131113", "3113111113", - "11311111111111", "331111111111", "111113111113", "31111111111111", "111311111113", - "131111111113"}; +static char *TeleTable[] = +{ + "1111111111111111", "1131313111", "33313111", "1111313131", "3111313111", "11333131", "13133131", "111111313111", + "31333111", "1131113131", "33113131", "1111333111", "3111113131", "1113133111", "1311133111", "111111113131", + "3131113111", "11313331", "333331", "111131113111", "31113331", "1133113111", "1313113111", "1111113331", + "31131331", "113111113111", "3311113111", "1111131331", "311111113111", "1113111331", "1311111331", "11111111113111", + "31313311", "1131311131", "33311131", "1111313311", "3111311131", "11333311", "13133311", "111111311131", + "31331131", "1131113311", "33113311", "1111331131", "3111113311", "1113131131", "1311131131", "111111113311", + "3131111131", "1131131311", "33131311", "111131111131", "3111131311", "1133111131", "1313111131", "111111131311", + "3113111311", "113111111131", "3311111131", "111113111311", "311111111131", "111311111311", "131111111311", "11111111111131", + "3131311111", "11313133", "333133", "111131311111", "31113133", "1133311111", "1313311111", "1111113133", + "313333", "113111311111", "3311311111", "11113333", "311111311111", "11131333", "13111333", "11111111311111", + "31311133", "1131331111", "33331111", " 1111311133", "3111331111", "11331133", "13131133", "111111331111", + "3113131111", "1131111133", "33111133", "111113131111", "3111111133", "111311131111", "131111131111", "111111111133", + "31311313", "113131111111", "3331111111", "1111311313", "311131111111", "11331313", "13131313", "11111131111111", + "3133111111", "1131111313", "33111313", "111133111111", "3111111313", "111313111111", "131113111111", "111111111313", + "313111111111", "1131131113", "33131113", "11113111111111","3111131113", "113311111111", "131311111111", "111111131113", + "3113111113", "11311111111111","331111111111","111113111113", "31111111111111","111311111113","131111111113"}; -int telepen(struct zint_symbol *symbol, unsigned char source[], int length) +int telepen(struct zint_symbol *symbol, unsigned char source[], int src_len) { unsigned int i, count, check_digit; int error_number; - char dest[1000]; + char dest[512]; /*14 + 30 * 14 + 14 + 14 + 1 ~ 512 */ error_number = 0; - strcpy(dest, ""); count = 0; - if(length > 30) { + if(src_len > 30) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } + /* Start character */ + strcpy(dest, TeleTable['_']); - for(i = 0; i < length; i++) { + for(i = 0; i < src_len; i++) { if(source[i] > 127) { /* Cannot encode extended ASCII */ strcpy(symbol->errtxt, "Invalid characters in input data"); return ERROR_INVALID_DATA; } - } - - /* Start character */ - concat(dest, TeleTable['_']); - - for (i=0; i < length; i++) - { concat(dest, TeleTable[source[i]]); count += source[i]; } @@ -90,89 +80,78 @@ int telepen(struct zint_symbol *symbol, unsigned char source[], int length) concat(dest, TeleTable['z']); expand(symbol, dest); - for(i = 0; i < length; i++) { + for(i = 0; i < src_len; i++) { if(source[i] == '\0') { symbol->text[i] = ' '; } else { symbol->text[i] = source[i]; } } - symbol->text[length] = '\0'; + symbol->text[src_len] = '\0'; return error_number; } -int telepen_num(struct zint_symbol *symbol, unsigned char source[], int length) +int telepen_num(struct zint_symbol *symbol, unsigned char source[], int src_len) { unsigned int i, count, check_digit, glyph; - int error_number; - unsigned char dest[1000]; - unsigned char local_source[100]; + int error_number, temp_length = src_len; + char dest[1024]; /* 14 + 60 * 14 + 14 + 14 + 1 ~ 1024 */ + unsigned char temp[64]; error_number = 0; - memset(dest, 0, 1000); - memset(local_source, 0, 100); - count = 0; - if(length > 60) { + if(temp_length > 60) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - for(i = 0; i < length; i++) { - local_source[i] = source[i]; - } - to_upper(local_source); - error_number = is_sane(NASET, local_source, length); + ustrcpy(temp, source); + to_upper(temp); + error_number = is_sane(NEON, temp, temp_length); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } /* Add a leading zero if required */ - if ((length % 2) != 0) + if ((temp_length % 2) != 0) { - char temp[200]; + memmove(temp + 1, temp, temp_length); + temp[0] = '0'; - strcpy(temp, (char*)local_source); - local_source[0] = '0'; - - for(i = 0; i <= length; i++) - { - local_source[i + 1] = temp[i]; - } - length++; + temp[++temp_length] = '\0'; } /* Start character */ - concat((char*)dest, TeleTable['_']); + strcpy(dest, TeleTable['_']); - for (i=0; i < length; i+=2) + for (i = 0; i < temp_length; i += 2) { - if(local_source[i] == 'X') { + if(temp[i] == 'X') { strcpy(symbol->errtxt, "Invalid position of X in Telepen data"); return ERROR_INVALID_DATA; } - if(local_source[i + 1] == 'X') { - glyph = ctoi(local_source[i]) + 17; + if(temp[i + 1] == 'X') { + glyph = ctoi(temp[i]) + 17; count += glyph; } else { - glyph = (10 * ctoi(local_source[i])) + ctoi(local_source[i + 1]); + glyph = (10 * ctoi(temp[i])) + ctoi(temp[i + 1]); glyph += 27; count += glyph; } - concat((char*)dest, TeleTable[glyph]); + concat(dest, TeleTable[glyph]); } check_digit = 127 - (count % 127); if(check_digit == 127) { check_digit = 0; } - concat((char*)dest, TeleTable[check_digit]); + concat(dest, TeleTable[check_digit]); /* Stop character */ - concat((char*)dest, TeleTable['z']); + concat(dest, TeleTable['z']); - expand(symbol, (char*)dest); - ustrcpy(symbol->text, local_source); + expand(symbol, dest); + ustrcpy(symbol->text, temp); return error_number; } diff --git a/backend/upcean.c b/backend/upcean.c index 7a810045..75cfeb71 100644 --- a/backend/upcean.c +++ b/backend/upcean.c @@ -18,7 +18,7 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define NASET "0123456789+" +#define SODIUM "0123456789+" #define EAN2 102 #define EAN5 105 @@ -82,7 +82,7 @@ void upca_draw(char source[], char dest[]) concat(dest, "11111"); } - lookup(NESET, EANsetA, source[i], dest); + lookup(NEON, EANsetA, source[i], dest); } /* stop character */ @@ -200,8 +200,8 @@ void upce(struct zint_symbol *symbol, unsigned char source[], char dest[]) for(i = 0; i <= ustrlen(source); i++) { switch(parity[i]) { - case 'A': lookup(NESET, EANsetA, source[i], dest); break; - case 'B': lookup(NESET, EANsetB, source[i], dest); break; + case 'A': lookup(NEON, EANsetA, source[i], dest); break; + case 'B': lookup(NEON, EANsetB, source[i], dest); break; } } @@ -267,8 +267,8 @@ void add_on(unsigned char source[], char dest[], int mode) for(i = 0; i < ustrlen(source); i++) { switch(parity[i]) { - case 'A': lookup(NESET, EANsetA, source[i], dest); break; - case 'B': lookup(NESET, EANsetB, source[i], dest); break; + case 'A': lookup(NEON, EANsetA, source[i], dest); break; + case 'B': lookup(NEON, EANsetB, source[i], dest); break; } /* Glyph separator */ @@ -319,15 +319,15 @@ void ean13(struct zint_symbol *symbol, unsigned char source[], char dest[]) gtin[length + 1] = '\0'; /* Get parity for first half of the symbol */ - lookup(NASET, EAN13Parity, gtin[0], parity); + lookup(SODIUM, EAN13Parity, gtin[0], parity); /* Now get on with the cipher */ half_way = 7; /* start character */ concat (dest, "111"); - - for(i = 1; i <= strlen(gtin); i++) + length = strlen(gtin); + for(i = 1; i <= length; i++) { if (i == half_way) { @@ -338,11 +338,11 @@ void ean13(struct zint_symbol *symbol, unsigned char source[], char dest[]) if(((i > 1) && (i < 7)) && (parity[i - 2] == 'B')) { - lookup(NESET, EANsetB, gtin[i], dest); + lookup(NEON, EANsetB, gtin[i], dest); } else { - lookup(NESET, EANsetA, gtin[i], dest); + lookup(NEON, EANsetA, gtin[i], dest); } } @@ -368,12 +368,13 @@ void ean8(struct zint_symbol *symbol, unsigned char source[], char dest[]) char isbn13_check(unsigned char source[]) /* For ISBN(13) only */ { - unsigned int i, weight, sum, check; + unsigned int i, weight, sum, check, h; sum = 0; weight = 1; + h = ustrlen(source) - 1; - for(i = 0; i < (ustrlen(source) - 1); i++) + for(i = 0; i < h; i++) { sum += ctoi(source[i]) * weight; if(weight == 1) weight = 3; else weight = 1; @@ -386,11 +387,13 @@ char isbn13_check(unsigned char source[]) /* For ISBN(13) only */ char isbn_check(unsigned char source[]) /* For ISBN(10) and SBN only */ { - unsigned int i, weight, sum, check; + unsigned int i, weight, sum, check, h; sum = 0; weight = 1; - for(i = 0; i < (ustrlen(source) - 1); i++) + h = ustrlen(source) - 1; + + for(i = 0; i < h; i++) { sum += ctoi(source[i]) * weight; weight++; @@ -400,19 +403,26 @@ char isbn_check(unsigned char source[]) /* For ISBN(10) and SBN only */ return itoc(check); } -int isbn(struct zint_symbol *symbol, unsigned char source[], char dest[]) /* Make an EAN-13 barcode from an SBN or ISBN */ +int isbn(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len, char dest[]) /* Make an EAN-13 barcode from an SBN or ISBN */ { - int i; + int i, error_number; char check_digit; + to_upper(source); + error_number = is_sane("0123456789X", source, src_len); + if(error_number == ERROR_INVALID_DATA) { + strcpy(symbol->errtxt, "Invalid characters in input"); + return error_number; + } + /* Input must be 9, 10 or 13 characters */ - if(((ustrlen(source) < 9) || (ustrlen(source) > 13)) || ((ustrlen(source) > 10) && (ustrlen(source) < 13))) + if(((src_len < 9) || (src_len > 13)) || ((src_len > 10) && (src_len < 13))) { strcpy(symbol->errtxt, "Input wrong length"); return ERROR_TOO_LONG; } - if(ustrlen(source) == 13) /* Using 13 character ISBN */ + if(src_len == 13) /* Using 13 character ISBN */ { if(!(((source[0] == '9') && (source[1] == '7')) && ((source[2] == '8') || (source[2] == '9')))) @@ -422,7 +432,7 @@ int isbn(struct zint_symbol *symbol, unsigned char source[], char dest[]) /* Mak } check_digit = isbn13_check(source); - if (source[ustrlen(source) - 1] != check_digit) + if (source[src_len - 1] != check_digit) { strcpy(symbol->errtxt, "Incorrect ISBN check"); return ERROR_INVALID_CHECK; @@ -432,10 +442,10 @@ int isbn(struct zint_symbol *symbol, unsigned char source[], char dest[]) /* Mak ean13(symbol, source, dest); } - if(ustrlen(source) == 10) /* Using 10 digit ISBN */ + if(src_len == 10) /* Using 10 digit ISBN */ { check_digit = isbn_check(source); - if(check_digit != source[ustrlen(source) - 1]) + if(check_digit != source[src_len - 1]) { strcpy(symbol->errtxt, "Incorrect ISBN check"); return ERROR_INVALID_CHECK; @@ -452,7 +462,7 @@ int isbn(struct zint_symbol *symbol, unsigned char source[], char dest[]) /* Mak ean13(symbol, source, dest); } - if(ustrlen(source) == 9) /* Using 9 digit SBN */ + if(src_len == 9) /* Using 9 digit SBN */ { /* Add leading zero */ for(i = 10; i > 0; i--) @@ -489,9 +499,10 @@ void ean_leading_zeroes(struct zint_symbol *symbol, unsigned char source[], unsi /* Add leading zeroes to EAN and UPC strings */ unsigned char first_part[20], second_part[20], zfirst_part[20], zsecond_part[20]; int with_addon = 0; - int first_len = 0, second_len = 0, zfirst_len = 0, zsecond_len = 0, i; + int first_len = 0, second_len = 0, zfirst_len = 0, zsecond_len = 0, i, h; - for(i = 0; i < ustrlen(source); i++) { + h = ustrlen(source); + for(i = 0; i < h; i++) { if(source[i] == '+') { with_addon = 1; } else { @@ -566,36 +577,32 @@ void ean_leading_zeroes(struct zint_symbol *symbol, unsigned char source[], unsi } } -int eanx(struct zint_symbol *symbol, unsigned char source[], int length) +int eanx(struct zint_symbol *symbol, unsigned char source[], int src_len) { /* splits string to parts before and after '+' parts */ - unsigned char first_part[20], second_part[20], dest[1000]; - unsigned char local_source[20]; + unsigned char first_part[20] = { 0 }, second_part[20] = { 0 }, dest[1000] = { 0 }; + unsigned char local_source[20] = { 0 }; unsigned int latch, reader, writer, with_addon; int error_number, i; - error_number = 0; - memset(dest,0,1000); - memset(first_part,0,20); - memset(second_part,0,20); with_addon = FALSE; latch = FALSE; writer = 0; - if(length > 19) { + if(src_len > 19) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } if(symbol->symbology != BARCODE_ISBNX) { /* ISBN has it's own checking routine */ - error_number = is_sane(NASET, source, length); + error_number = is_sane(NEON, source, src_len); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in data"); return error_number; } } else { - error_number = is_sane("0123456789Xx", source, length); + error_number = is_sane("0123456789Xx", source, src_len); if(error_number == ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "Invalid characters in input"); return error_number; @@ -734,7 +741,7 @@ int eanx(struct zint_symbol *symbol, unsigned char source[], int length) } break; case BARCODE_ISBNX: - error_number = isbn(symbol, first_part, (char*)dest); + error_number = isbn(symbol, first_part, ustrlen(first_part), (char*)dest); if(error_number > 4) { return error_number; } diff --git a/backend/zint.h b/backend/zint.h index a276f555..304b38b2 100644 --- a/backend/zint.h +++ b/backend/zint.h @@ -24,7 +24,6 @@ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -//#define ZINT_VERSION "2.0.A" struct zint_symbol { int symbology; @@ -40,14 +39,13 @@ struct zint_symbol { int option_2; int option_3; int input_mode; - unsigned char text[100]; + unsigned char text[128]; int rows; int width; - char primary[100]; + char primary[128]; unsigned char encoded_data[178][143]; int row_height[178]; /* Largest symbol is 177x177 QR Code */ char errtxt[100]; - char nullchar; }; /* Tbarcode 7 codes */ diff --git a/frontend/main.c b/frontend/main.c index c5e062a3..c66df221 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -92,7 +92,6 @@ void usage(void) " --secure=NUMBER (PDF417 and QR Code) Error correction level.\n" " --primary=STRING (Maxicode and Composite) Structured primary message.\n" " --mode=NUMBER (Maxicode and Composite) Set encoding mode.\n" - " --null=NUMBER Character to represent NULL.\n" " --gs1 Treat input as GS1 data\n" " --kanji Treat input as Kanji characters in Unicode\n" " --sjis Treat input as Shift-JIS\n" @@ -161,7 +160,6 @@ int main(int argc, char **argv) {"mode", 1, 0, 0}, {"primary", 1, 0, 0}, {"scale", 1, 0, 0}, - {"null", 1, 0, 0}, {"gs1", 0, 0, 0}, {"kanji", 0, 0, 0}, {"sjis", 0, 0, 0}, @@ -229,18 +227,6 @@ int main(int argc, char **argv) fprintf(stderr, "Border width out of range\n"); } } - if(!strcmp(long_options[option_index].name, "null")) { - error_number = validator(NESET, optarg); - if(error_number == ERROR_INVALID_DATA) { - fprintf(stderr, "Invalid NULL replacement\n"); - exit(1); - } - if((atoi(optarg) >= 1) && (atoi(optarg) <= 128)) { - my_symbol->nullchar = atoi(optarg); - } else { - fprintf(stderr, "Invalid NULL replacement\n"); - } - } if(!strcmp(long_options[option_index].name, "height")) { error_number = validator(NESET, optarg); if(error_number == ERROR_INVALID_DATA) {