From 660d8148bd843606ce0159fc41f789fe0a6c0e63 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Sat, 20 Feb 2016 11:29:19 +0000 Subject: [PATCH] Code format and audit, part 3 Update copyright info, remove unused code, etc. --- backend/ps.c | 1388 +++-- backend/qr.c | 4852 ++++++++-------- backend/qr.h | 172 +- backend/reedsol.c | 161 +- backend/reedsol.h | 13 +- backend/render.c | 1329 +++-- backend/rss.c | 4516 ++++++++------- backend/rss.h | 427 +- backend/sjis.h | 13692 ++++++++++++++++++++++---------------------- backend/svg.c | 1072 ++-- backend/telepen.c | 233 +- backend/upcean.c | 1387 ++--- backend/zint.h | 160 +- 13 files changed, 14979 insertions(+), 14423 deletions(-) diff --git a/backend/ps.c b/backend/ps.c index 605d46cb..0ea642cf 100644 --- a/backend/ps.c +++ b/backend/ps.c @@ -2,20 +2,20 @@ /* libzint - the open source barcode library - Copyright (C) 2009 Robin Stuart + Copyright (C) 2009-2016 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + documentation and/or other materials provided with the distribution. 3. Neither the name of the project nor the names of its contributors may be used to endorse or promote products derived from this software - without specific prior written permission. + without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -26,9 +26,9 @@ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ #include #include @@ -38,739 +38,733 @@ #define SSET "0123456789ABCDEF" -/* This file has expanded quite a bit since version 1.5 in order to accomodate - the formatting rules for EAN and UPC symbols as set out in EN 797:1995 - the - down side of this support is that the code is now vertually unreadable! */ +int ps_plot(struct zint_symbol *symbol) { + int i, block_width, latch, r, this_row; + float textpos, large_bar_height, preset_height, row_height, row_posn; + FILE *feps; + int fgred, fggrn, fgblu, bgred, bggrn, bgblu; + float red_ink, green_ink, blue_ink, red_paper, green_paper, blue_paper; + int error_number = 0; + int textoffset, xoffset, yoffset, textdone, main_width; + char textpart[10], addon[6]; + int large_bar_count, comp_offset; + float addon_text_posn; + float scaler = symbol->scale; + float default_text_posn; + int plot_text = 1; + const char *locale = NULL; -int ps_plot(struct zint_symbol *symbol) -{ - int i, block_width, latch, r, this_row; - float textpos, large_bar_height, preset_height, row_height, row_posn; - FILE *feps; - int fgred, fggrn, fgblu, bgred, bggrn, bgblu; - float red_ink, green_ink, blue_ink, red_paper, green_paper, blue_paper; - int error_number = 0; - int textoffset, xoffset, yoffset, textdone, main_width; - char textpart[10], addon[6]; - int large_bar_count, comp_offset; - float addon_text_posn; - float scaler = symbol->scale; - float default_text_posn; - int plot_text = 1; - const char *locale = NULL; + row_height = 0; + textdone = 0; + main_width = symbol->width; + strcpy(addon, ""); + comp_offset = 0; + addon_text_posn = 0.0; - row_height=0; - textdone = 0; - main_width = symbol->width; - strcpy(addon, ""); - comp_offset = 0; - addon_text_posn = 0.0; + if ((symbol->output_options & BARCODE_STDOUT) != 0) { + feps = stdout; + } else { + feps = fopen(symbol->outfile, "w"); + } + if (feps == NULL) { + strcpy(symbol->errtxt, "Could not open output file"); + return ZINT_ERROR_FILE_ACCESS; + } - if((symbol->output_options & BARCODE_STDOUT) != 0) { - feps = stdout; - } else { - feps = fopen(symbol->outfile, "w"); - } - if(feps == NULL) { - strcpy(symbol->errtxt, "Could not open output file"); - return ZINT_ERROR_FILE_ACCESS; - } + /* sort out colour options */ + to_upper((unsigned char*) symbol->fgcolour); + to_upper((unsigned char*) symbol->bgcolour); - /* sort out colour options */ - to_upper((unsigned char*)symbol->fgcolour); - to_upper((unsigned char*)symbol->bgcolour); + if (strlen(symbol->fgcolour) != 6) { + strcpy(symbol->errtxt, "Malformed foreground colour target"); + return ZINT_ERROR_INVALID_OPTION; + } + if (strlen(symbol->bgcolour) != 6) { + strcpy(symbol->errtxt, "Malformed background colour target"); + return ZINT_ERROR_INVALID_OPTION; + } + error_number = is_sane(SSET, (unsigned char*) symbol->fgcolour, strlen(symbol->fgcolour)); + if (error_number == ZINT_ERROR_INVALID_DATA) { + strcpy(symbol->errtxt, "Malformed foreground colour target"); + return ZINT_ERROR_INVALID_OPTION; + } + error_number = is_sane(SSET, (unsigned char*) symbol->bgcolour, strlen(symbol->bgcolour)); + if (error_number == ZINT_ERROR_INVALID_DATA) { + strcpy(symbol->errtxt, "Malformed background colour target"); + return ZINT_ERROR_INVALID_OPTION; + } + locale = setlocale(LC_ALL, "C"); - if(strlen(symbol->fgcolour) != 6) { - strcpy(symbol->errtxt, "Malformed foreground colour target"); - return ZINT_ERROR_INVALID_OPTION; - } - if(strlen(symbol->bgcolour) != 6) { - strcpy(symbol->errtxt, "Malformed background colour target"); - return ZINT_ERROR_INVALID_OPTION; - } - error_number = is_sane(SSET, (unsigned char*)symbol->fgcolour, strlen(symbol->fgcolour)); - if (error_number == ZINT_ERROR_INVALID_DATA) { - strcpy(symbol->errtxt, "Malformed foreground colour target"); - return ZINT_ERROR_INVALID_OPTION; - } - error_number = is_sane(SSET, (unsigned char*)symbol->bgcolour, strlen(symbol->bgcolour)); - if (error_number == ZINT_ERROR_INVALID_DATA) { - strcpy(symbol->errtxt, "Malformed background colour target"); - return ZINT_ERROR_INVALID_OPTION; - } - locale = setlocale(LC_ALL, "C"); + fgred = (16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]); + fggrn = (16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]); + fgblu = (16 * ctoi(symbol->fgcolour[4])) + ctoi(symbol->fgcolour[5]); + bgred = (16 * ctoi(symbol->bgcolour[0])) + ctoi(symbol->bgcolour[1]); + bggrn = (16 * ctoi(symbol->bgcolour[2])) + ctoi(symbol->bgcolour[3]); + bgblu = (16 * ctoi(symbol->bgcolour[4])) + ctoi(symbol->bgcolour[5]); + red_ink = fgred / 256.0; + green_ink = fggrn / 256.0; + blue_ink = fgblu / 256.0; + red_paper = bgred / 256.0; + green_paper = bggrn / 256.0; + blue_paper = bgblu / 256.0; - fgred = (16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]); - fggrn = (16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]); - fgblu = (16 * ctoi(symbol->fgcolour[4])) + ctoi(symbol->fgcolour[5]); - bgred = (16 * ctoi(symbol->bgcolour[0])) + ctoi(symbol->bgcolour[1]); - bggrn = (16 * ctoi(symbol->bgcolour[2])) + ctoi(symbol->bgcolour[3]); - bgblu = (16 * ctoi(symbol->bgcolour[4])) + ctoi(symbol->bgcolour[5]); - red_ink = fgred / 256.0; - green_ink = fggrn / 256.0; - blue_ink = fgblu / 256.0; - red_paper = bgred / 256.0; - green_paper = bggrn / 256.0; - blue_paper = bgblu / 256.0; + if (symbol->height == 0) { + symbol->height = 50; + } - if (symbol->height == 0) { - symbol->height = 50; - } + large_bar_count = 0; + preset_height = 0.0; + for (i = 0; i < symbol->rows; i++) { + preset_height += symbol->row_height[i]; + if (symbol->row_height[i] == 0) { + large_bar_count++; + } + } + large_bar_height = (symbol->height - preset_height) / large_bar_count; - large_bar_count = 0; - preset_height = 0.0; - for(i = 0; i < symbol->rows; i++) { - preset_height += symbol->row_height[i]; - if(symbol->row_height[i] == 0) { - large_bar_count++; - } - } - large_bar_height = (symbol->height - preset_height) / large_bar_count; + if (large_bar_count == 0) { + symbol->height = preset_height; + } - if (large_bar_count == 0) { - symbol->height = preset_height; - } + while (!(module_is_set(symbol, symbol->rows - 1, comp_offset))) { + comp_offset++; + } - while(!(module_is_set(symbol, symbol->rows - 1, comp_offset))) { - comp_offset++; - } + /* Certain symbols need whitespace otherwise characters get chopped off the sides */ + if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC)) + || (symbol->symbology == BARCODE_ISBNX)) { + switch (ustrlen(symbol->text)) { + case 13: /* EAN 13 */ + case 16: + case 19: + if (symbol->whitespace_width == 0) { + symbol->whitespace_width = 10; + } + main_width = 96 + comp_offset; + break; + default: + main_width = 68 + comp_offset; + } + } - /* Certain symbols need whitespace otherwise characters get chopped off the sides */ - if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC)) - || (symbol->symbology == BARCODE_ISBNX)) { - switch(ustrlen(symbol->text)) { - case 13: /* EAN 13 */ - case 16: - case 19: - if(symbol->whitespace_width == 0) { - symbol->whitespace_width = 10; - } - main_width = 96 + comp_offset; - break; - default: - main_width = 68 + comp_offset; - } - } + if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) { + if (symbol->whitespace_width == 0) { + symbol->whitespace_width = 10; + main_width = 96 + comp_offset; + } + } - if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) { - if(symbol->whitespace_width == 0) { - symbol->whitespace_width = 10; - main_width = 96 + comp_offset; - } - } + if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) { + if (symbol->whitespace_width == 0) { + symbol->whitespace_width = 10; + main_width = 51 + comp_offset; + } + } - if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) { - if(symbol->whitespace_width == 0) { - symbol->whitespace_width = 10; - main_width = 51 + comp_offset; - } - } + latch = 0; + r = 0; + /* Isolate add-on text */ + if (is_extendable(symbol->symbology)) { + for (i = 0; i < ustrlen(symbol->text); i++) { + if (latch == 1) { + addon[r] = symbol->text[i]; + r++; + } + if (symbol->text[i] == '+') { + latch = 1; + } + } + } + addon[r] = '\0'; - latch = 0; - r = 0; - /* Isolate add-on text */ - if(is_extendable(symbol->symbology)) { - for(i = 0; i < ustrlen(symbol->text); i++) { - if (latch == 1) { - addon[r] = symbol->text[i]; - r++; - } - if (symbol->text[i] == '+') { - latch = 1; - } - } - } - addon[r] = '\0'; + if ((symbol->show_hrt == 0) || (ustrlen(symbol->text) == 0)) { + plot_text = 0; + } + if (plot_text) { + textoffset = 9; + } else { + textoffset = 0; + } + xoffset = symbol->border_width + symbol->whitespace_width; + yoffset = symbol->border_width; - if((symbol->show_hrt == 0) || (ustrlen(symbol->text) == 0)) { - plot_text = 0; - } - if(plot_text) { - textoffset = 9; - } else { - textoffset = 0; - } - xoffset = symbol->border_width + symbol->whitespace_width; - yoffset = symbol->border_width; + /* Start writing the header */ + fprintf(feps, "%%!PS-Adobe-3.0 EPSF-3.0\n"); + fprintf(feps, "%%%%Creator: Zint %s\n", ZINT_VERSION); + if (ustrlen(symbol->text) != 0) { + fprintf(feps, "%%%%Title: %s\n", symbol->text); + } else { + fprintf(feps, "%%%%Title: Zint Generated Symbol\n"); + } + fprintf(feps, "%%%%Pages: 0\n"); + if (symbol->symbology != BARCODE_MAXICODE) { + fprintf(feps, "%%%%BoundingBox: 0 0 %d %d\n", roundup((symbol->width + xoffset + xoffset) * scaler), roundup((symbol->height + textoffset + yoffset + yoffset) * scaler)); + } else { + fprintf(feps, "%%%%BoundingBox: 0 0 %d %d\n", roundup((74.0 + xoffset + xoffset) * scaler), roundup((72.0 + yoffset + yoffset) * scaler)); + } + fprintf(feps, "%%%%EndComments\n"); - /* Start writing the header */ - fprintf(feps, "%%!PS-Adobe-3.0 EPSF-3.0\n"); - fprintf(feps, "%%%%Creator: Zint %s\n", ZINT_VERSION); - if(ustrlen(symbol->text) != 0) { - fprintf(feps, "%%%%Title: %s\n",symbol->text); - } else { - fprintf(feps, "%%%%Title: Zint Generated Symbol\n"); - } - fprintf(feps, "%%%%Pages: 0\n"); - if(symbol->symbology != BARCODE_MAXICODE) { - fprintf(feps, "%%%%BoundingBox: 0 0 %d %d\n", roundup((symbol->width + xoffset + xoffset) * scaler), roundup((symbol->height + textoffset + yoffset + yoffset) * scaler)); - } else { - fprintf(feps, "%%%%BoundingBox: 0 0 %d %d\n", roundup((74.0 + xoffset + xoffset) * scaler), roundup((72.0 + yoffset + yoffset) * scaler)); - } - fprintf(feps, "%%%%EndComments\n"); + /* Definitions */ + fprintf(feps, "/TL { setlinewidth moveto lineto stroke } bind def\n"); + fprintf(feps, "/TC { moveto 0 360 arc 360 0 arcn fill } bind def\n"); + fprintf(feps, "/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def\n"); + fprintf(feps, "/TB { 2 copy } bind def\n"); + fprintf(feps, "/TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def\n"); + fprintf(feps, "/TE { pop pop } bind def\n"); - /* Definitions */ - fprintf(feps, "/TL { setlinewidth moveto lineto stroke } bind def\n"); - fprintf(feps, "/TC { moveto 0 360 arc 360 0 arcn fill } bind def\n"); - fprintf(feps, "/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def\n"); - fprintf(feps, "/TB { 2 copy } bind def\n"); - fprintf(feps, "/TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def\n"); - fprintf(feps, "/TE { pop pop } bind def\n"); + fprintf(feps, "newpath\n"); - fprintf(feps, "newpath\n"); + /* Now the actual representation */ + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_paper, green_paper, blue_paper); + fprintf(feps, "%.2f 0.00 TB 0.00 %.2f TR\n", (symbol->height + textoffset + yoffset + yoffset) * scaler, (symbol->width + xoffset + xoffset) * scaler); - /* Now the actual representation */ - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_paper, green_paper, blue_paper); - fprintf(feps, "%.2f 0.00 TB 0.00 %.2f TR\n", (symbol->height + textoffset + yoffset + yoffset) * scaler, (symbol->width + xoffset + xoffset) * scaler); + if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + default_text_posn = 0.5 * scaler; + } else { + default_text_posn = (symbol->border_width + 0.5) * scaler; + } - if(((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { - default_text_posn = 0.5 * scaler; - } else { - default_text_posn = (symbol->border_width + 0.5) * scaler; - } - - if(symbol->symbology == BARCODE_MAXICODE) { - /* Maxicode uses hexagons */ - float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy, mx, my; + if (symbol->symbology == BARCODE_MAXICODE) { + /* Maxicode uses hexagons */ + float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy, mx, my; - textoffset = 0.0; - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, textoffset * scaler, 0.0, (74.0 + xoffset + xoffset) * scaler); - fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, (textoffset + 72.0 + symbol->border_width) * scaler, 0.0, (74.0 + xoffset + xoffset) * scaler); - } - if((symbol->output_options & BARCODE_BOX) != 0) { - /* side bars */ - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", (72.0 + (2 * symbol->border_width)) * scaler, textoffset * scaler, 0.0, symbol->border_width * scaler); - fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", (72.0 + (2 * symbol->border_width)) * scaler, textoffset * scaler, (74.0 + xoffset + xoffset - symbol->border_width) * scaler, symbol->border_width * scaler); - } + textoffset = 0.0; + if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, textoffset * scaler, 0.0, (74.0 + xoffset + xoffset) * scaler); + fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, (textoffset + 72.0 + symbol->border_width) * scaler, 0.0, (74.0 + xoffset + xoffset) * scaler); + } + if ((symbol->output_options & BARCODE_BOX) != 0) { + /* side bars */ + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", (72.0 + (2 * symbol->border_width)) * scaler, textoffset * scaler, 0.0, symbol->border_width * scaler); + fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", (72.0 + (2 * symbol->border_width)) * scaler, textoffset * scaler, (74.0 + xoffset + xoffset - symbol->border_width) * scaler, symbol->border_width * scaler); + } - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TC\n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 10.85 * scaler, (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 8.97 * scaler, (44.73 + xoffset) * scaler, (35.60 + yoffset) * scaler); - fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TC\n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 7.10 * scaler, (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 5.22 * scaler, (40.98 + xoffset) * scaler, (35.60 + yoffset) * scaler); - fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TC\n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 3.31 * scaler, (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 1.43 * scaler, (37.19 + xoffset) * scaler, (35.60 + yoffset) * scaler); - for(r = 0; r < symbol->rows; r++) { - for(i = 0; i < symbol->width; i++) { - if(module_is_set(symbol, r, i)) { - /* Dump a hexagon */ - my = ((symbol->rows - r - 1)) * 2.135 + 1.43; - ay = my + 1.0 + yoffset; - by = my + 0.5 + yoffset; - cy = my - 0.5 + yoffset; - dy = my - 1.0 + yoffset; - ey = my - 0.5 + yoffset; - fy = my + 0.5 + yoffset; + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TC\n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 10.85 * scaler, (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 8.97 * scaler, (44.73 + xoffset) * scaler, (35.60 + yoffset) * scaler); + fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TC\n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 7.10 * scaler, (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 5.22 * scaler, (40.98 + xoffset) * scaler, (35.60 + yoffset) * scaler); + fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TC\n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 3.31 * scaler, (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 1.43 * scaler, (37.19 + xoffset) * scaler, (35.60 + yoffset) * scaler); + for (r = 0; r < symbol->rows; r++) { + for (i = 0; i < symbol->width; i++) { + if (module_is_set(symbol, r, i)) { + /* Dump a hexagon */ + my = ((symbol->rows - r - 1)) * 2.135 + 1.43; + ay = my + 1.0 + yoffset; + by = my + 0.5 + yoffset; + cy = my - 0.5 + yoffset; + dy = my - 1.0 + yoffset; + ey = my - 0.5 + yoffset; + fy = my + 0.5 + yoffset; - mx = 2.46 * i + 1.23 + (r & 1 ? 1.23 : 0); + mx = 2.46 * i + 1.23 + (r & 1 ? 1.23 : 0); - ax = mx + xoffset; - bx = mx + 0.86 + xoffset; - cx = mx + 0.86 + xoffset; - dx = mx + xoffset; - ex = mx - 0.86 + xoffset; - fx = mx - 0.86 + xoffset; - fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TH\n", ax * scaler, ay * scaler, bx * scaler, by * scaler, cx * scaler, cy * scaler, dx * scaler, dy * scaler, ex * scaler, ey * scaler, fx * scaler, fy * scaler); - } - } - } - } + ax = mx + xoffset; + bx = mx + 0.86 + xoffset; + cx = mx + 0.86 + xoffset; + dx = mx + xoffset; + ex = mx - 0.86 + xoffset; + fx = mx - 0.86 + xoffset; + fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TH\n", ax * scaler, ay * scaler, bx * scaler, by * scaler, cx * scaler, cy * scaler, dx * scaler, dy * scaler, ex * scaler, ey * scaler, fx * scaler, fy * scaler); + } + } + } + } - if(symbol->symbology != BARCODE_MAXICODE) { - /* everything else uses rectangles (or squares) */ - /* Works from the bottom of the symbol up */ - int addon_latch = 0; + if (symbol->symbology != BARCODE_MAXICODE) { + /* everything else uses rectangles (or squares) */ + /* Works from the bottom of the symbol up */ + int addon_latch = 0; - for(r = 0; r < symbol->rows; r++) { - this_row = symbol->rows - r - 1; /* invert r otherwise plots upside down */ - if(symbol->row_height[this_row] == 0) { - row_height = large_bar_height; - } else { - row_height = symbol->row_height[this_row]; - } - row_posn = 0; - for(i = 0; i < r; i++) { - if(symbol->row_height[symbol->rows - i - 1] == 0) { - row_posn += large_bar_height; - } else { - row_posn += symbol->row_height[symbol->rows - i - 1]; - } - } - row_posn += (textoffset + yoffset); + for (r = 0; r < symbol->rows; r++) { + this_row = symbol->rows - r - 1; /* invert r otherwise plots upside down */ + if (symbol->row_height[this_row] == 0) { + row_height = large_bar_height; + } else { + row_height = symbol->row_height[this_row]; + } + row_posn = 0; + for (i = 0; i < r; i++) { + if (symbol->row_height[symbol->rows - i - 1] == 0) { + row_posn += large_bar_height; + } else { + row_posn += symbol->row_height[symbol->rows - i - 1]; + } + } + row_posn += (textoffset + yoffset); - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f ", row_height * scaler, row_posn * scaler); - i = 0; - if(module_is_set(symbol, this_row, 0)) { - latch = 1; - } else { - latch = 0; - } + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f ", row_height * scaler, row_posn * scaler); + i = 0; + if (module_is_set(symbol, this_row, 0)) { + latch = 1; + } else { + latch = 0; + } - do { - block_width = 0; - do { - block_width++; - } while (module_is_set(symbol, this_row, i + block_width) == module_is_set(symbol, this_row, i)); - if((addon_latch == 0) && (r == 0) && (i > main_width)) { - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f ", (row_height - 5.0) * scaler, (row_posn - 5.0) * scaler); - addon_text_posn = row_posn + row_height - 8.0; - addon_latch = 1; - } - if(latch == 1) { - /* a bar */ - fprintf(feps, "TB %.2f %.2f TR\n", (i + xoffset) * scaler, block_width * scaler); - latch = 0; - } else { - /* a space */ - latch = 1; - } - i += block_width; + do { + block_width = 0; + do { + block_width++; + } while (module_is_set(symbol, this_row, i + block_width) == module_is_set(symbol, this_row, i)); + if ((addon_latch == 0) && (r == 0) && (i > main_width)) { + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f ", (row_height - 5.0) * scaler, (row_posn - 5.0) * scaler); + addon_text_posn = row_posn + row_height - 8.0; + addon_latch = 1; + } + if (latch == 1) { + /* a bar */ + fprintf(feps, "TB %.2f %.2f TR\n", (i + xoffset) * scaler, block_width * scaler); + latch = 0; + } else { + /* a space */ + latch = 1; + } + i += block_width; - } while (i < symbol->width); - } - } - /* That's done the actual data area, everything else is human-friendly */ + } while (i < symbol->width); + } + } + /* That's done the actual data area, everything else is human-friendly */ - xoffset += comp_offset; + xoffset += comp_offset; - if (plot_text) { - if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC)) || - (symbol->symbology == BARCODE_ISBNX)) { - /* guard bar extensions and text formatting for EAN8 and EAN13 */ - switch(ustrlen(symbol->text)) { - case 8: /* EAN-8 */ - case 11: - case 14: - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f ", 5.0 * scaler, (4.0 + yoffset) * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (0 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (2 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (32 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (34 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (64 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (66 + xoffset) * scaler, 1 * scaler); - for(i = 0; i < 4; i++) { - textpart[i] = symbol->text[i]; - } - textpart[4] = '\0'; - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = 17; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", textpart); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", textpart); - fprintf(feps, "setmatrix\n"); - for(i = 0; i < 4; i++) { - textpart[i] = symbol->text[i + 4]; - } - textpart[4] = '\0'; - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = 50; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", textpart); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", textpart); - fprintf(feps, "setmatrix\n"); - textdone = 1; - switch(strlen(addon)) { - case 2: - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = xoffset + 86; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); - fprintf(feps, " (%s) stringwidth\n", addon); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", addon); - fprintf(feps, "setmatrix\n"); - break; - case 5: - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = xoffset + 100; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); - fprintf(feps, " (%s) stringwidth\n", addon); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", addon); - fprintf(feps, "setmatrix\n"); - break; - } + if (plot_text) { + if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC)) || + (symbol->symbology == BARCODE_ISBNX)) { + /* guard bar extensions and text formatting for EAN8 and EAN13 */ + switch (ustrlen(symbol->text)) { + case 8: /* EAN-8 */ + case 11: + case 14: + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f ", 5.0 * scaler, (4.0 + yoffset) * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (0 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (2 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (32 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (34 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (64 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (66 + xoffset) * scaler, 1 * scaler); + for (i = 0; i < 4; i++) { + textpart[i] = symbol->text[i]; + } + textpart[4] = '\0'; + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = 17; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", textpart); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", textpart); + fprintf(feps, "setmatrix\n"); + for (i = 0; i < 4; i++) { + textpart[i] = symbol->text[i + 4]; + } + textpart[4] = '\0'; + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = 50; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", textpart); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", textpart); + fprintf(feps, "setmatrix\n"); + textdone = 1; + switch (strlen(addon)) { + case 2: + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = xoffset + 86; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); + fprintf(feps, " (%s) stringwidth\n", addon); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", addon); + fprintf(feps, "setmatrix\n"); + break; + case 5: + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = xoffset + 100; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); + fprintf(feps, " (%s) stringwidth\n", addon); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", addon); + fprintf(feps, "setmatrix\n"); + break; + } - break; - case 13: /* EAN 13 */ - case 16: - case 19: - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f ", 5.0 * scaler, (4.0 + yoffset) * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (0 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (2 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (46 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (48 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (92 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (94 + xoffset) * scaler, 1 * scaler); - textpart[0] = symbol->text[0]; - textpart[1] = '\0'; - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = -7; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", textpart); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", textpart); - fprintf(feps, "setmatrix\n"); - for(i = 0; i < 6; i++) { - textpart[i] = symbol->text[i + 1]; - } - textpart[6] = '\0'; - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = 24; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", textpart); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", textpart); - fprintf(feps, "setmatrix\n"); - for(i = 0; i < 6; i++) { - textpart[i] = symbol->text[i + 7]; - } - textpart[6] = '\0'; - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = 71; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", textpart); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", textpart); - fprintf(feps, "setmatrix\n"); - textdone = 1; - switch(strlen(addon)) { - case 2: - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = xoffset + 114; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); - fprintf(feps, " (%s) stringwidth\n", addon); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", addon); - fprintf(feps, "setmatrix\n"); - break; - case 5: - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = xoffset + 128; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); - fprintf(feps, " (%s) stringwidth\n", addon); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", addon); - fprintf(feps, "setmatrix\n"); - break; - } - break; + break; + case 13: /* EAN 13 */ + case 16: + case 19: + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f ", 5.0 * scaler, (4.0 + yoffset) * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (0 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (2 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (46 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (48 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (92 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (94 + xoffset) * scaler, 1 * scaler); + textpart[0] = symbol->text[0]; + textpart[1] = '\0'; + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = -7; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", textpart); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", textpart); + fprintf(feps, "setmatrix\n"); + for (i = 0; i < 6; i++) { + textpart[i] = symbol->text[i + 1]; + } + textpart[6] = '\0'; + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = 24; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", textpart); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", textpart); + fprintf(feps, "setmatrix\n"); + for (i = 0; i < 6; i++) { + textpart[i] = symbol->text[i + 7]; + } + textpart[6] = '\0'; + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = 71; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", textpart); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", textpart); + fprintf(feps, "setmatrix\n"); + textdone = 1; + switch (strlen(addon)) { + case 2: + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = xoffset + 114; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); + fprintf(feps, " (%s) stringwidth\n", addon); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", addon); + fprintf(feps, "setmatrix\n"); + break; + case 5: + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = xoffset + 128; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); + fprintf(feps, " (%s) stringwidth\n", addon); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", addon); + fprintf(feps, "setmatrix\n"); + break; + } + break; - } - } + } + } - if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) { - /* guard bar extensions and text formatting for UPCA */ - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f ", 5.0 * scaler, (4.0 + yoffset) * scaler); - latch = 1; + if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) { + /* guard bar extensions and text formatting for UPCA */ + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f ", 5.0 * scaler, (4.0 + yoffset) * scaler); + latch = 1; - i = 0 + comp_offset; - do { - block_width = 0; - do { - block_width++; - } while (module_is_set(symbol, symbol->rows - 1, i + block_width) == module_is_set(symbol, symbol->rows - 1, i)); - if(latch == 1) { - /* a bar */ - fprintf(feps, "TB %.2f %.2f TR\n", (i + xoffset - comp_offset) * scaler, block_width * scaler); - latch = 0; - } else { - /* a space */ - latch = 1; - } - i += block_width; - } while (i < 11 + comp_offset); - fprintf(feps, "TB %.2f %.2f TR\n", (46 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (48 + xoffset) * scaler, 1 * scaler); - latch = 1; - i = 85 + comp_offset; - do { - block_width = 0; - do { - block_width++; - } while (module_is_set(symbol, symbol->rows - 1, i + block_width) == module_is_set(symbol, symbol->rows - 1, i)); - if(latch == 1) { - /* a bar */ - fprintf(feps, "TB %.2f %.2f TR\n", (i + xoffset - comp_offset) * scaler, block_width * scaler); - latch = 0; - } else { - /* a space */ - latch = 1; - } - i += block_width; - } while (i < 96 + comp_offset); - textpart[0] = symbol->text[0]; - textpart[1] = '\0'; - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler); - textpos = -5; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", textpart); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", textpart); - fprintf(feps, "setmatrix\n"); - for(i = 0; i < 5; i++) { - textpart[i] = symbol->text[i + 1]; - } - textpart[5] = '\0'; - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = 27; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", textpart); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", textpart); - fprintf(feps, "setmatrix\n"); - for(i = 0; i < 5; i++) { - textpart[i] = symbol->text[i + 6]; - } - textpart[6] = '\0'; - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = 68; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", textpart); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", textpart); - fprintf(feps, "setmatrix\n"); - textpart[0] = symbol->text[11]; - textpart[1] = '\0'; - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler); - textpos = 100; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", textpart); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", textpart); - fprintf(feps, "setmatrix\n"); - textdone = 1; - switch(strlen(addon)) { - case 2: - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = xoffset + 116; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); - fprintf(feps, " (%s) stringwidth\n", addon); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", addon); - fprintf(feps, "setmatrix\n"); - break; - case 5: - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = xoffset + 130; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); - fprintf(feps, " (%s) stringwidth\n", addon); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", addon); - fprintf(feps, "setmatrix\n"); - break; - } + i = 0 + comp_offset; + do { + block_width = 0; + do { + block_width++; + } while (module_is_set(symbol, symbol->rows - 1, i + block_width) == module_is_set(symbol, symbol->rows - 1, i)); + if (latch == 1) { + /* a bar */ + fprintf(feps, "TB %.2f %.2f TR\n", (i + xoffset - comp_offset) * scaler, block_width * scaler); + latch = 0; + } else { + /* a space */ + latch = 1; + } + i += block_width; + } while (i < 11 + comp_offset); + fprintf(feps, "TB %.2f %.2f TR\n", (46 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (48 + xoffset) * scaler, 1 * scaler); + latch = 1; + i = 85 + comp_offset; + do { + block_width = 0; + do { + block_width++; + } while (module_is_set(symbol, symbol->rows - 1, i + block_width) == module_is_set(symbol, symbol->rows - 1, i)); + if (latch == 1) { + /* a bar */ + fprintf(feps, "TB %.2f %.2f TR\n", (i + xoffset - comp_offset) * scaler, block_width * scaler); + latch = 0; + } else { + /* a space */ + latch = 1; + } + i += block_width; + } while (i < 96 + comp_offset); + textpart[0] = symbol->text[0]; + textpart[1] = '\0'; + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler); + textpos = -5; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", textpart); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", textpart); + fprintf(feps, "setmatrix\n"); + for (i = 0; i < 5; i++) { + textpart[i] = symbol->text[i + 1]; + } + textpart[5] = '\0'; + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = 27; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", textpart); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", textpart); + fprintf(feps, "setmatrix\n"); + for (i = 0; i < 5; i++) { + textpart[i] = symbol->text[i + 6]; + } + textpart[6] = '\0'; + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = 68; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", textpart); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", textpart); + fprintf(feps, "setmatrix\n"); + textpart[0] = symbol->text[11]; + textpart[1] = '\0'; + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler); + textpos = 100; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", textpart); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", textpart); + fprintf(feps, "setmatrix\n"); + textdone = 1; + switch (strlen(addon)) { + case 2: + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = xoffset + 116; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); + fprintf(feps, " (%s) stringwidth\n", addon); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", addon); + fprintf(feps, "setmatrix\n"); + break; + case 5: + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = xoffset + 130; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); + fprintf(feps, " (%s) stringwidth\n", addon); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", addon); + fprintf(feps, "setmatrix\n"); + break; + } - } + } - if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) { - /* guard bar extensions and text formatting for UPCE */ - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f ", 5.0 * scaler, (4.0 + yoffset) * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (0 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (2 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (46 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (48 + xoffset) * scaler, 1 * scaler); - fprintf(feps, "TB %.2f %.2f TR\n", (50 + xoffset) * scaler, 1 * scaler); - textpart[0] = symbol->text[0]; - textpart[1] = '\0'; - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler); - textpos = -5; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", textpart); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", textpart); - fprintf(feps, "setmatrix\n"); - for(i = 0; i < 6; i++) { - textpart[i] = symbol->text[i + 1]; - } - textpart[6] = '\0'; - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = 24; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", textpart); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", textpart); - fprintf(feps, "setmatrix\n"); - textpart[0] = symbol->text[7]; - textpart[1] = '\0'; - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler); - textpos = 55; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", textpart); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", textpart); - fprintf(feps, "setmatrix\n"); - textdone = 1; - switch(strlen(addon)) { - case 2: - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = xoffset + 70; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); - fprintf(feps, " (%s) stringwidth\n", addon); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", addon); - fprintf(feps, "setmatrix\n"); - break; - case 5: - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); - textpos = xoffset + 84; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); - fprintf(feps, " (%s) stringwidth\n", addon); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", addon); - fprintf(feps, "setmatrix\n"); - break; - } + if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) { + /* guard bar extensions and text formatting for UPCE */ + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f ", 5.0 * scaler, (4.0 + yoffset) * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (0 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (2 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (46 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (48 + xoffset) * scaler, 1 * scaler); + fprintf(feps, "TB %.2f %.2f TR\n", (50 + xoffset) * scaler, 1 * scaler); + textpart[0] = symbol->text[0]; + textpart[1] = '\0'; + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler); + textpos = -5; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", textpart); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", textpart); + fprintf(feps, "setmatrix\n"); + for (i = 0; i < 6; i++) { + textpart[i] = symbol->text[i + 1]; + } + textpart[6] = '\0'; + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = 24; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", textpart); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", textpart); + fprintf(feps, "setmatrix\n"); + textpart[0] = symbol->text[7]; + textpart[1] = '\0'; + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler); + textpos = 55; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", textpart); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", textpart); + fprintf(feps, "setmatrix\n"); + textdone = 1; + switch (strlen(addon)) { + case 2: + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = xoffset + 70; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); + fprintf(feps, " (%s) stringwidth\n", addon); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", addon); + fprintf(feps, "setmatrix\n"); + break; + case 5: + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler); + textpos = xoffset + 84; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler); + fprintf(feps, " (%s) stringwidth\n", addon); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", addon); + fprintf(feps, "setmatrix\n"); + break; + } - } - } /* if (plot_text) */ + } + } /* if (plot_text) */ - xoffset -= comp_offset; + xoffset -= comp_offset; - switch(symbol->symbology) { - case BARCODE_MAXICODE: - /* Do nothing! (It's already been done) */ - break; - default: - if((symbol->output_options & BARCODE_BIND) != 0) { - if((symbol->rows > 1) && (is_stackable(symbol->symbology) == 1)) { - /* row binding */ - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - for(r = 1; r < symbol->rows; r++) { - fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", 2.0 * scaler, ((r * row_height) + textoffset + yoffset - 1) * scaler, xoffset * scaler, symbol->width * scaler); - } - } - } - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, textoffset * scaler, 0.0, (symbol->width + xoffset + xoffset) * scaler); - fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, (textoffset + symbol->height + symbol->border_width) * scaler, 0.0, (symbol->width + xoffset + xoffset) * scaler); - } - if((symbol->output_options & BARCODE_BOX) != 0) { - /* side bars */ - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", (symbol->height + (2 * symbol->border_width)) * scaler, textoffset * scaler, 0.0, symbol->border_width * scaler); - fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", (symbol->height + (2 * symbol->border_width)) * scaler, textoffset * scaler, (symbol->width + xoffset + xoffset - symbol->border_width) * scaler, symbol->border_width * scaler); - } - break; - } + switch (symbol->symbology) { + case BARCODE_MAXICODE: + /* Do nothing! (It's already been done) */ + break; + default: + if ((symbol->output_options & BARCODE_BIND) != 0) { + if ((symbol->rows > 1) && (is_stackable(symbol->symbology) == 1)) { + /* row binding */ + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + for (r = 1; r < symbol->rows; r++) { + fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", 2.0 * scaler, ((r * row_height) + textoffset + yoffset - 1) * scaler, xoffset * scaler, symbol->width * scaler); + } + } + } + if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, textoffset * scaler, 0.0, (symbol->width + xoffset + xoffset) * scaler); + fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, (textoffset + symbol->height + symbol->border_width) * scaler, 0.0, (symbol->width + xoffset + xoffset) * scaler); + } + if ((symbol->output_options & BARCODE_BOX) != 0) { + /* side bars */ + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", (symbol->height + (2 * symbol->border_width)) * scaler, textoffset * scaler, 0.0, symbol->border_width * scaler); + fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", (symbol->height + (2 * symbol->border_width)) * scaler, textoffset * scaler, (symbol->width + xoffset + xoffset - symbol->border_width) * scaler, symbol->border_width * scaler); + } + break; + } - /* Put the human readable text at the bottom */ - if(plot_text && (textdone == 0)) { - fprintf(feps, "TE\n"); - fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); - fprintf(feps, "matrix currentmatrix\n"); - fprintf(feps, "/Helvetica findfont\n"); - fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler); - textpos = symbol->width / 2.0; - fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); - fprintf(feps, " (%s) stringwidth\n", symbol->text); - fprintf(feps, "pop\n"); - fprintf(feps, "-2 div 0 rmoveto\n"); - fprintf(feps, " (%s) show\n", symbol->text); - fprintf(feps, "setmatrix\n"); - } - fprintf(feps, "\nshowpage\n"); + /* Put the human readable text at the bottom */ + if (plot_text && (textdone == 0)) { + fprintf(feps, "TE\n"); + fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); + fprintf(feps, "matrix currentmatrix\n"); + fprintf(feps, "/Helvetica findfont\n"); + fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler); + textpos = symbol->width / 2.0; + fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn); + fprintf(feps, " (%s) stringwidth\n", symbol->text); + fprintf(feps, "pop\n"); + fprintf(feps, "-2 div 0 rmoveto\n"); + fprintf(feps, " (%s) show\n", symbol->text); + fprintf(feps, "setmatrix\n"); + } + fprintf(feps, "\nshowpage\n"); - if(symbol->output_options & BARCODE_STDOUT) { - fflush(feps); - } else { - fclose(feps); - } + if (symbol->output_options & BARCODE_STDOUT) { + fflush(feps); + } else { + fclose(feps); + } - if (locale) - setlocale(LC_ALL, locale); + if (locale) + setlocale(LC_ALL, locale); - return error_number; + return error_number; } - diff --git a/backend/qr.c b/backend/qr.c index 408463b4..b467f353 100644 --- a/backend/qr.c +++ b/backend/qr.c @@ -2,20 +2,20 @@ /* libzint - the open source barcode library - Copyright (C) 2009 Robin Stuart + Copyright (C) 2009 -2016Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + documentation and/or other materials provided with the distribution. 3. Neither the name of the project nor the names of its contributors may be used to endorse or promote products derived from this software - without specific prior written permission. + without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -26,9 +26,9 @@ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ #include #ifdef _MSC_VER @@ -41,1200 +41,1241 @@ #include "reedsol.h" #include /* abs */ +/* Returns true if input glyph is in the Alphanumeric set */ int in_alpha(int glyph) { - /* Returns true if input glyph is in the Alphanumeric set */ - int retval = 0; - char cglyph = (char) glyph; + 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; - } + 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; + return retval; } -void define_mode(char mode[], int jisdata[], int length, int gs1) -{ - /* Values placed into mode[] are: K = Kanji, B = Binary, A = Alphanumeric, N = Numeric */ - int i, mlen, j; +void define_mode(char mode[], int jisdata[], int length, int gs1) { + /* 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(gs1 && (jisdata[i] == '[')) { mode[i] = 'A'; } - if((jisdata[i] >= '0') && (jisdata[i] <= '9')) { mode[i] = 'N'; } - } - } + 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 (gs1 && (jisdata[i] == '[')) { + mode[i] = 'A'; + } + if ((jisdata[i] >= '0') && (jisdata[i] <= '9')) { + mode[i] = 'N'; + } + } + } - /* 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 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'; - } - } - } - } - } + /* 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, int gs1) -{ - /* 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; +/* Make an estimate (worst case scenario) of how long the binary string will be */ +int estimate_binary_length(char mode[], int length, int gs1) { + int i, count = 0; + char current = 0; + int a_count = 0; + int n_count = 0; - if(gs1) { count += 4; } + if (gs1) { + count += 4; + } - for(i = 0; i < length; i++) { - if(mode[i] != current) { - 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'; a_count = 0; break; - case 'N': count += 14 + 4; current = 'N'; n_count = 0; break; - } - } + for (i = 0; i < length; i++) { + if (mode[i] != current) { + 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'; + a_count = 0; + break; + case 'N': count += 14 + 4; + current = 'N'; + n_count = 0; + break; + } + } - switch(mode[i]) { - case 'K': count += 13; break; - case 'B': count += 8; break; - case 'A': - a_count++; - if((a_count & 1) == 0) { - count += 5; // 11 in total - a_count = 0; - } - else - count += 6; - break; - case 'N': - n_count++; - if((n_count % 3) == 0) { - count += 3; // 10 in total - n_count = 0; - } - else if ((n_count & 1) == 0) - count += 3; // 7 in total - else - count += 4; - break; - } - } + switch (mode[i]) { + case 'K': count += 13; + break; + case 'B': count += 8; + break; + case 'A': + a_count++; + if ((a_count & 1) == 0) { + count += 5; // 11 in total + a_count = 0; + } else + count += 6; + break; + case 'N': + n_count++; + if ((n_count % 3) == 0) { + count += 3; // 10 in total + n_count = 0; + } else if ((n_count & 1) == 0) + count += 3; // 7 in total + else + count += 4; + break; + } + } - return count; + return count; } -static void qr_bscan(char *binary, int data, int h) -{ - for (; h; h>>=1) { - concat(binary, data & h ? "1" : "0"); - } +static void qr_bscan(char *binary, int data, int h) { + for (; h; h >>= 1) { + concat(binary, data & h ? "1" : "0"); + } } -void qr_binary(int datastream[], int version, int target_binlen, char mode[], int jisdata[], int length, int gs1, int est_binlen) -{ - /* Convert input data to a binary stream and add padding */ - int position = 0, debug = 0; - int short_data_block_length, i, scheme = 1; - char data_block, padbits; - int current_binlen, current_bytes; - int toggle, percent; - +/* Convert input data to a binary stream and add padding */ +void qr_binary(int datastream[], int version, int target_binlen, char mode[], int jisdata[], int length, int gs1, int est_binlen) { + int position = 0, debug = 0; + int short_data_block_length, i, scheme = 1; + char data_block, padbits; + int current_binlen, current_bytes; + int toggle, percent; + #ifndef _MSC_VER - char binary[est_binlen + 12]; + char binary[est_binlen + 12]; #else - char* binary = (char *)_alloca(est_binlen + 12); + char* binary = (char *) _alloca(est_binlen + 12); #endif - strcpy(binary, ""); + strcpy(binary, ""); - if(gs1) { - concat(binary, "0101"); /* FNC1 */ - } + if (gs1) { + concat(binary, "0101"); /* FNC1 */ + } - if(version <= 9) { - scheme = 1; - } else if((version >= 10) && (version <= 26)) { - scheme = 2; - } else if(version >= 27) { - scheme = 3; - } + if (version <= 9) { + scheme = 1; + } else if ((version >= 10) && (version <= 26)) { + scheme = 2; + } else if (version >= 27) { + scheme = 3; + } - if(debug) { - for(i = 0; i < length; i++) { - printf("%c", mode[i]); - } - printf("\n"); - } + if (debug) { + for (i = 0; i < length; i++) { + printf("%c", mode[i]); + } + printf("\n"); + } - percent = 0; + percent = 0; - 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)); + 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"); + switch (data_block) { + case 'K': + /* Kanji mode */ + /* Mode indicator */ + concat(binary, "1000"); - /* Character count indicator */ - qr_bscan(binary, short_data_block_length, 0x20 << (scheme*2)); /* scheme = 1..3 */ - - if(debug) { printf("Kanji block (length %d)\n\t", short_data_block_length); } + /* Character count indicator */ + qr_bscan(binary, short_data_block_length, 0x20 << (scheme * 2)); /* scheme = 1..3 */ - /* Character representation */ - for(i = 0; i < short_data_block_length; i++) { - int jis = jisdata[position + i]; - int msb, lsb, prod; + if (debug) { + printf("Kanji block (length %d)\n\t", short_data_block_length); + } - if(jis > 0x9fff) { jis -= 0xc140; } - msb = (jis & 0xff00) >> 4; - lsb = (jis & 0xff); - prod = (msb * 0xc0) + lsb; - - qr_bscan(binary, prod, 0x1000); - - if(debug) { printf("0x%4X ", prod); } - } + /* Character representation */ + for (i = 0; i < short_data_block_length; i++) { + int jis = jisdata[position + i]; + int msb, lsb, prod; - if(debug) { printf("\n"); } + if (jis > 0x9fff) { + jis -= 0xc140; + } + msb = (jis & 0xff00) >> 4; + lsb = (jis & 0xff); + prod = (msb * 0xc0) + lsb; - break; - case 'B': - /* Byte mode */ - /* Mode indicator */ - concat(binary, "0100"); + qr_bscan(binary, prod, 0x1000); - /* Character count indicator */ - qr_bscan(binary, short_data_block_length, scheme > 1 ? 0x8000 : 0x80); /* scheme = 1..3 */ - - if(debug) { printf("Byte block (length %d)\n\t", short_data_block_length); } + if (debug) { + printf("0x%4X ", prod); + } + } - /* Character representation */ - for(i = 0; i < short_data_block_length; i++) { - int byte = jisdata[position + i]; + if (debug) { + printf("\n"); + } - if(gs1 && (byte == '[')) { - byte = 0x1d; /* FNC1 */ - } - - qr_bscan(binary, byte, 0x80); - - if(debug) { printf("0x%2X(%d) ", byte, byte); } - } + break; + case 'B': + /* Byte mode */ + /* Mode indicator */ + concat(binary, "0100"); - if(debug) { printf("\n"); } + /* Character count indicator */ + qr_bscan(binary, short_data_block_length, scheme > 1 ? 0x8000 : 0x80); /* scheme = 1..3 */ - break; - case 'A': - /* Alphanumeric mode */ - /* Mode indicator */ - concat(binary, "0010"); + if (debug) { + printf("Byte block (length %d)\n\t", short_data_block_length); + } - /* Character count indicator */ - qr_bscan(binary, short_data_block_length, 0x40 << (2 * scheme)); /* scheme = 1..3 */ - - if(debug) { printf("Alpha 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]; - /* Character representation */ - i = 0; - while ( i < short_data_block_length ) { - int count; - int first = 0, second = 0, prod; + if (gs1 && (byte == '[')) { + byte = 0x1d; /* FNC1 */ + } - if(percent == 0) { - if(gs1 && (jisdata[position + i] == '%')) { - first = posn(RHODIUM, '%'); - second = posn(RHODIUM, '%'); - count = 2; - prod = (first * 45) + second; - i++; - } else { - if(gs1 && (jisdata[position + i] == '[')) { - first = posn(RHODIUM, '%'); /* FNC1 */ - } else { - first = posn(RHODIUM, (char) jisdata[position + i]); - } - count = 1; - i++; - prod = first; + qr_bscan(binary, byte, 0x80); - if(i < short_data_block_length && mode[position + i] == 'A') { - if(gs1 && (jisdata[position + i] == '%')) { - second = posn(RHODIUM, '%'); - count = 2; - prod = (first * 45) + second; - percent = 1; - } else { - if(gs1 && (jisdata[position + i] == '[')) { - second = posn(RHODIUM, '%'); /* FNC1 */ - } else { - second = posn(RHODIUM, (char) jisdata[position + i]); - } - count = 2; - i++; - prod = (first * 45) + second; - } - } - } - } else { - first = posn(RHODIUM, '%'); - count = 1; - i++; - prod = first; - percent = 0; + if (debug) { + printf("0x%2X(%d) ", byte, byte); + } + } - if(i < short_data_block_length && mode[position + i] == 'A') { - if(gs1 && (jisdata[position + i] == '%')) { - second = posn(RHODIUM, '%'); - count = 2; - prod = (first * 45) + second; - percent = 1; - } else { - if(gs1 && (jisdata[position + i] == '[')) { - second = posn(RHODIUM, '%'); /* FNC1 */ - } else { - second = posn(RHODIUM, (char) jisdata[position + i]); - } - count = 2; - i++; - prod = (first * 45) + second; - } - } - } + if (debug) { + printf("\n"); + } - qr_bscan(binary, prod, count == 2 ? 0x400 : 0x20); /* count = 1..2 */ - - if(debug) { printf("0x%4X ", prod); } - }; + break; + case 'A': + /* Alphanumeric mode */ + /* Mode indicator */ + concat(binary, "0010"); - if(debug) { printf("\n"); } + /* Character count indicator */ + qr_bscan(binary, short_data_block_length, 0x40 << (2 * scheme)); /* scheme = 1..3 */ - break; - case 'N': - /* Numeric mode */ - /* Mode indicator */ - concat(binary, "0001"); + if (debug) { + printf("Alpha block (length %d)\n\t", short_data_block_length); + } - /* Character count indicator */ - qr_bscan(binary, short_data_block_length, 0x80 << (2 * scheme)); /* scheme = 1..3 */ - - 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, prod; - /* Character representation */ - i = 0; - while ( i < short_data_block_length ) { - int count; - int first = 0, second = 0, third = 0, prod; + if (percent == 0) { + if (gs1 && (jisdata[position + i] == '%')) { + first = posn(RHODIUM, '%'); + second = posn(RHODIUM, '%'); + count = 2; + prod = (first * 45) + second; + i++; + } else { + if (gs1 && (jisdata[position + i] == '[')) { + first = posn(RHODIUM, '%'); /* FNC1 */ + } else { + first = posn(RHODIUM, (char) jisdata[position + i]); + } + count = 1; + i++; + prod = first; - first = posn(NEON, (char) jisdata[position + i]); - count = 1; - prod = first; + if (i < short_data_block_length && mode[position + i] == 'A') { + if (gs1 && (jisdata[position + i] == '%')) { + second = posn(RHODIUM, '%'); + count = 2; + prod = (first * 45) + second; + percent = 1; + } else { + if (gs1 && (jisdata[position + i] == '[')) { + second = posn(RHODIUM, '%'); /* FNC1 */ + } else { + second = posn(RHODIUM, (char) jisdata[position + i]); + } + count = 2; + i++; + prod = (first * 45) + second; + } + } + } + } else { + first = posn(RHODIUM, '%'); + count = 1; + i++; + prod = first; + percent = 0; - if(i + 1 < short_data_block_length && mode[position + i + 1] == 'N') { - second = posn(NEON, (char) jisdata[position + i + 1]); - count = 2; - prod = (prod * 10) + second; + if (i < short_data_block_length && mode[position + i] == 'A') { + if (gs1 && (jisdata[position + i] == '%')) { + second = posn(RHODIUM, '%'); + count = 2; + prod = (first * 45) + second; + percent = 1; + } else { + if (gs1 && (jisdata[position + i] == '[')) { + second = posn(RHODIUM, '%'); /* FNC1 */ + } else { + second = posn(RHODIUM, (char) jisdata[position + i]); + } + count = 2; + i++; + prod = (first * 45) + second; + } + } + } - if(i + 2 < short_data_block_length && mode[position + i + 2] == 'N') { - third = posn(NEON, (char) jisdata[position + i + 2]); - count = 3; - prod = (prod * 10) + third; - } - } - - qr_bscan(binary, prod, 1 << (3 * count)); /* count = 1..3 */ - - if(debug) { printf("0x%4X (%d)", prod, prod); } + qr_bscan(binary, prod, count == 2 ? 0x400 : 0x20); /* count = 1..2 */ - i += count; - }; + if (debug) { + printf("0x%4X ", prod); + } + }; - if(debug) { printf("\n"); } + if (debug) { + printf("\n"); + } - break; - } + break; + case 'N': + /* Numeric mode */ + /* Mode indicator */ + concat(binary, "0001"); - position += short_data_block_length; - } while (position < length) ; - - /* Terminator */ - concat(binary, "0000"); + /* Character count indicator */ + qr_bscan(binary, short_data_block_length, 0x80 << (2 * scheme)); /* scheme = 1..3 */ - current_binlen = strlen(binary); - padbits = 8 - (current_binlen % 8); - if(padbits == 8) { padbits = 0; } - current_bytes = (current_binlen + padbits) / 8; + if (debug) { + printf("Number block (length %d)\n\t", short_data_block_length); + } - /* Padding bits */ - for(i = 0; i < padbits; i++) { - concat(binary, "0"); - } + /* Character representation */ + i = 0; + while (i < short_data_block_length) { + int count; + int first = 0, second = 0, third = 0, prod; - /* 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; } - } + first = posn(NEON, (char) jisdata[position + i]); + count = 1; + prod = first; - /* 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; - } - } + if (i + 1 < short_data_block_length && mode[position + i + 1] == 'N') { + second = posn(NEON, (char) jisdata[position + i + 1]); + count = 2; + prod = (prod * 10) + second; - if(debug) { - printf("Resulting codewords:\n\t"); - for(i = 0; i < target_binlen; i++) { - printf("0x%2X ", datastream[i]); - } - printf("\n"); - } + if (i + 2 < short_data_block_length && mode[position + i + 2] == 'N') { + third = posn(NEON, (char) jisdata[position + i + 2]); + count = 3; + prod = (prod * 10) + third; + } + } + + qr_bscan(binary, prod, 1 << (3 * count)); /* count = 1..3 */ + + if (debug) { + printf("0x%4X (%d)", prod, prod); + } + + i += count; + }; + + if (debug) { + printf("\n"); + } + + break; + } + + position += short_data_block_length; + } while (position < length); + + /* 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"); + } + + /* Put data into 8-bit codewords */ + for (i = 0; i < current_bytes; i++) { + datastream[i] = 0x00; + for (int p = 0; p < 8; p++) { + if (binary[i * 8 + p] == '1') { + datastream[i] += (0x80 >> p); + } + } + } + + /* 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; + } + } + + if (debug) { + printf("Resulting codewords:\n\t"); + 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 = 0; - - +/* Split data into blocks, add error correction and then interleave the blocks and error correction data */ +void add_ecc(int fullstream[], int datastream[], int version, int data_cw, int blocks) { + 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 = 0; + + #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]; + 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) * sizeof(int)); - int* interleaved_ecc = (int *)_alloca((ecc_cw + 2) * sizeof(int)); + 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) * sizeof (int)); + int* interleaved_ecc = (int *) _alloca((ecc_cw + 2) * sizeof (int)); #endif - posn = 0; + 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 (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 < ecc_block_length; j++) { + ecc_block[j] = 0; + } - for(j = 0; j < length_this_block; j++) { - data_block[j] = (unsigned char) datastream[posn + j]; - } + for (j = 0; j < length_this_block; j++) { + data_block[j] = (unsigned char) datastream[posn + j]; + } - rs_init_gf(0x11d); - rs_init_code(ecc_block_length, 0); - rs_encode(length_this_block, data_block, ecc_block); - rs_free(); + rs_init_gf(0x11d); + rs_init_code(ecc_block_length, 0); + rs_encode(length_this_block, data_block, ecc_block); + rs_free(); - 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[ecc_block_length - j - 1]); - } - printf("\n"); - } + 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[ecc_block_length - j - 1]); + } + printf("\n"); + } - for(j = 0; j < short_data_block_length; j++) { - interleaved_data[(j * blocks) + i] = (int) data_block[j]; - } + 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]; - } + 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[ecc_block_length - j - 1]; - } + for (j = 0; j < ecc_block_length; j++) { + interleaved_ecc[(j * blocks) + i] = (int) ecc_block[ecc_block_length - j - 1]; + } - posn += length_this_block; - } + posn += length_this_block; + } - 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]; - } + 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"); - } + 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; +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 - }; + 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; - } - } - } + 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 place_align(unsigned char grid[], int size, int x, int y) -{ - int xp, yp; +void place_align(unsigned char grid[], int size, int x, int y) { + int xp, yp; - int alignment[] = { - 1, 1, 1, 1, 1, - 1, 0, 0, 0, 1, - 1, 0, 1, 0, 1, - 1, 0, 0, 0, 1, - 1, 1, 1, 1, 1 - }; + int alignment[] = { + 1, 1, 1, 1, 1, + 1, 0, 0, 0, 1, + 1, 0, 1, 0, 1, + 1, 0, 0, 0, 1, + 1, 1, 1, 1, 1 + }; - x -= 2; - y -= 2; /* Input values represent centre of pattern */ + x -= 2; + y -= 2; /* Input values represent centre of pattern */ - for(xp = 0; xp < 5; xp++) { - for(yp = 0; yp < 5; yp++) { - if (alignment[xp + (5 * yp)] == 1) { - grid[((yp + y) * size) + (xp + x)] = 0x11; - } else { - grid[((yp + y) * size) + (xp + x)] = 0x10; - } - } - } + for (xp = 0; xp < 5; xp++) { + for (yp = 0; yp < 5; yp++) { + if (alignment[xp + (5 * 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 version) -{ - int i, toggle = 1; - int loopsize, x, y, xcoord, ycoord; +void setup_grid(unsigned char* grid, int size, int version) { + int i, toggle = 1; + int loopsize, x, y, xcoord, ycoord; - /* Add timing patterns */ - for(i = 0; i < size; i++) { - if(toggle == 1) { - grid[(6 * size) + i] = 0x21; - grid[(i * size) + 6] = 0x21; - toggle = 0; - } else { - grid[(6 * size) + i] = 0x20; - grid[(i * size) + 6] = 0x20; - toggle = 1; - } - } + /* Add timing patterns */ + for (i = 0; i < size; i++) { + if (toggle == 1) { + grid[(6 * size) + i] = 0x21; + grid[(i * size) + 6] = 0x21; + toggle = 0; + } else { + grid[(6 * size) + i] = 0x20; + grid[(i * size) + 6] = 0x20; + toggle = 1; + } + } - /* Add finder patterns */ - place_finder(grid, size, 0, 0); - place_finder(grid, size, 0, size - 7); - place_finder(grid, size, size - 7, 0); + /* Add finder patterns */ + place_finder(grid, size, 0, 0); + place_finder(grid, size, 0, size - 7); + place_finder(grid, size, size - 7, 0); - /* Add separators */ - for(i = 0; i < 7; i++) { - grid[(7 * size) + i] = 0x10; - grid[(i * size) + 7] = 0x10; - grid[(7 * size) + (size - 1 - i)] = 0x10; - grid[(i * size) + (size - 8)] = 0x10; - grid[((size - 8) * size) + i] = 0x10; - grid[((size - 1 - i) * size) + 7] = 0x10; - } - grid[(7 * size) + 7] = 0x10; - grid[(7 * size) + (size - 8)] = 0x10; - grid[((size - 8) * size) + 7] = 0x10; + /* Add separators */ + for (i = 0; i < 7; i++) { + grid[(7 * size) + i] = 0x10; + grid[(i * size) + 7] = 0x10; + grid[(7 * size) + (size - 1 - i)] = 0x10; + grid[(i * size) + (size - 8)] = 0x10; + grid[((size - 8) * size) + i] = 0x10; + grid[((size - 1 - i) * size) + 7] = 0x10; + } + grid[(7 * size) + 7] = 0x10; + grid[(7 * size) + (size - 8)] = 0x10; + grid[((size - 8) * size) + 7] = 0x10; - /* Add alignment patterns */ - if(version != 1) { - /* Version 1 does not have alignment patterns */ + /* Add alignment patterns */ + if (version != 1) { + /* Version 1 does not have alignment patterns */ - loopsize = qr_align_loopsize[version - 1]; - for(x = 0; x < loopsize; x++) { - for(y = 0; y < loopsize; y++) { - xcoord = qr_table_e1[((version - 2) * 7) + x]; - ycoord = qr_table_e1[((version - 2) * 7) + y]; + loopsize = qr_align_loopsize[version - 1]; + for (x = 0; x < loopsize; x++) { + for (y = 0; y < loopsize; y++) { + xcoord = qr_table_e1[((version - 2) * 7) + x]; + ycoord = qr_table_e1[((version - 2) * 7) + y]; - if(!(grid[(ycoord * size) + xcoord] & 0x10)) { - place_align(grid, size, xcoord, ycoord); - } - } - } - } + if (!(grid[(ycoord * size) + xcoord] & 0x10)) { + place_align(grid, size, xcoord, ycoord); + } + } + } + } - /* Reserve space for format information */ - for(i = 0; i < 8; i++) { - grid[(8 * size) + i] += 0x20; - grid[(i * size) + 8] += 0x20; - grid[(8 * size) + (size - 1 - i)] = 0x20; - grid[((size - 1 - i) * size) + 8] = 0x20; - } - grid[(8 * size) + 8] += 20; - grid[((size - 1 - 7) * size) + 8] = 0x21; /* Dark Module from Figure 25 */ + /* Reserve space for format information */ + for (i = 0; i < 8; i++) { + grid[(8 * size) + i] += 0x20; + grid[(i * size) + 8] += 0x20; + grid[(8 * size) + (size - 1 - i)] = 0x20; + grid[((size - 1 - i) * size) + 8] = 0x20; + } + grid[(8 * size) + 8] += 20; + grid[((size - 1 - 7) * size) + 8] = 0x21; /* Dark Module from Figure 25 */ - /* Reserve space for version information */ - if(version >= 7) { - for(i = 0; i < 6; i++) { - grid[((size - 9) * size) + i] = 0x20; - grid[((size - 10) * size) + i] = 0x20; - grid[((size - 11) * size) + i] = 0x20; - grid[(i * size) + (size - 9)] = 0x20; - grid[(i * size) + (size - 10)] = 0x20; - grid[(i * size) + (size - 11)] = 0x20; - } - } + /* Reserve space for version information */ + if (version >= 7) { + for (i = 0; i < 6; i++) { + grid[((size - 9) * size) + i] = 0x20; + grid[((size - 10) * size) + i] = 0x20; + grid[((size - 11) * size) + i] = 0x20; + grid[(i * size) + (size - 9)] = 0x20; + grid[(i * size) + (size - 10)] = 0x20; + grid[(i * size) + (size - 11)] = 0x20; + } + } } int cwbit(int* datastream, int i) { - int word = i / 8; - int bit = i % 8; - int resultant = 0; - - switch(bit) { - case 0: if(datastream[word] & 0x80) { resultant = 1; } else { resultant = 0; } break; - case 1: if(datastream[word] & 0x40) { resultant = 1; } else { resultant = 0; } break; - case 2: if(datastream[word] & 0x20) { resultant = 1; } else { resultant = 0; } break; - case 3: if(datastream[word] & 0x10) { resultant = 1; } else { resultant = 0; } break; - case 4: if(datastream[word] & 0x08) { resultant = 1; } else { resultant = 0; } break; - case 5: if(datastream[word] & 0x04) { resultant = 1; } else { resultant = 0; } break; - case 6: if(datastream[word] & 0x02) { resultant = 1; } else { resultant = 0; } break; - case 7: if(datastream[word] & 0x01) { resultant = 1; } else { resultant = 0; } break; - } - - return resultant; + int resultant = 0; + + if (datastream[(i / 8)] & (0x80 >> (i % 8))) { + resultant = 1; + } + + return resultant; } -void populate_grid(unsigned char* grid, int size, int* datastream, int cw) -{ - int direction = 1; /* up */ - int row = 0; /* right hand side */ +void populate_grid(unsigned char* grid, int size, int* datastream, int cw) { + int direction = 1; /* up */ + int row = 0; /* right hand side */ - int i, n, x, y; + int i, n, x, y; - n = cw * 8; - y = size - 1; - i = 0; - do { - x = (size - 2) - (row * 2); - if(x < 6) - x--; /* skip over vertical timing pattern */ + n = cw * 8; + y = size - 1; + i = 0; + do { + x = (size - 2) - (row * 2); + if (x < 6) + x--; /* skip over vertical timing pattern */ - if(!(grid[(y * size) + (x + 1)] & 0xf0)) { - if (cwbit(datastream, i)) { - grid[(y * size) + (x + 1)] = 0x01; - } else { - grid[(y * size) + (x + 1)] = 0x00; - } - i++; - } + if (!(grid[(y * size) + (x + 1)] & 0xf0)) { + if (cwbit(datastream, i)) { + grid[(y * size) + (x + 1)] = 0x01; + } else { + grid[(y * size) + (x + 1)] = 0x00; + } + i++; + } - if(i < n) { - if(!(grid[(y * size) + x] & 0xf0)) { - if (cwbit(datastream, i)) { - grid[(y * size) + x] = 0x01; - } else { - grid[(y * size) + x] = 0x00; - } - i++; - } - } - - if(direction) { y--; } else { y++; } - if(y == -1) { - /* reached the top */ - row++; - y = 0; - direction = 0; - } - if(y == size) { - /* reached the bottom */ - row++; - y = size - 1; - direction = 1; - } - } while (i < n); -} - -#ifdef ZINTLOG -int append_log(char log) -{ - FILE *file; - - file = fopen("zintlog.txt", "a+"); - fprintf(file, "%c", log); - fclose(file); - return 0; -} - -int write_log(char log[]) -{ - FILE *file; - - file = fopen("zintlog.txt", "a+"); - fprintf(file, log); /*writes*/ - fprintf(file, "\r\n"); /*writes*/ - fclose(file); - return 0; -} -#endif - -int evaluate(unsigned char *eval, int size, int pattern) -{ - int x, y, block, weight; - int result = 0; - char state; - int p; - int dark_mods; - int percentage, k; - int a, b, afterCount, beforeCount; -#ifdef ZINTLOG - int result_b = 0; - char str[15]; -#endif - -#ifndef _MSC_VER - char local[size * size]; -#else - char* local = (char *)_alloca((size * size) * sizeof(char)); -#endif - - -#ifdef ZINTLOG - write_log(""); - sprintf(str, "%d", pattern); - write_log(str); -#endif - - // all eight bitmask variants have been encoded in the 8 bits of the bytes that make up the grid array. select them for evaluation according to the desired pattern. - for(x = 0; x < size; x++) { - for(y = 0; y < size; y++) { - if ((eval[(y * size) + x] & (0x01 << pattern)) != 0) { - local[(y * size) + x] = '1'; - } else { - local[(y * size) + x] = '0'; - } - } - } - -#ifdef ZINTLOG - //bitmask output - for(y = 0; y < size; y++) { - strcpy (str, ""); - for(x = 0; x < size; x++) { - state =local[(y * size) + x]; - append_log(state); - } - write_log(""); - } - write_log(""); -#endif - - /* Test 1: Adjacent modules in row/column in same colour */ - /* Vertical */ - /*for(x = 0; x < size; x++) { - state = local[x]; - block = 0; - for(y = 0; y < size; y++) { - if(local[(y * size) + x] == state) { - block++; - if(block ==5) - result += 3; - - if(block>5) - result +=1; - } else { - block=0; - } - } - }*/ - - /* Horizontal */ - /*for(y = 0; y < size; y++) { - state = local[y * size]; - block = 0; - for(x = 0; x < size; x++) { - if(local[(y * size) + x] == state) { - block++; - if(block ==5) - result += 3; - - if(block>5) - result +=1; - } else { - block=0; - } - } - }*/ - - /* Test 1: Adjacent modules in row/column in same colour */ - /* Vertical */ - for (x = 0; x < size; x++) { - state = local[x]; - block = 0; - for (y = 0; y < size; y++) { - if (local[(y * size) + x] == state) { - block++; + if (i < n) { + if (!(grid[(y * size) + x] & 0xf0)) { + if (cwbit(datastream, i)) { + grid[(y * size) + x] = 0x01; } else { - if (block > 5) { - result += (3 + (block - 5)); - } - block = 0; - state = local[(y * size) + x]; + grid[(y * size) + x] = 0x00; } - } - if (block > 5) { - result += (3 + (block - 5)); + i++; } } - /* Horizontal */ - for (y = 0; y < size; y++) { - state = local[y * size]; - block = 0; - for (x = 0; x < size; x++) { - if (local[(y * size) + x] == state) { - block++; - } else { - if (block > 5) { - result += (3 + (block - 5)); - } - block = 0; - state = local[(y * size) + x]; - } - } - if (block > 5) { - result += (3 + (block - 5)); - } - } - -#ifdef ZINTLOG - /* output Test 1 */ - sprintf(str, "%d", result); - result_b=result; - write_log(str); -#endif - - /* Test 2: Block of modules in same color */ - for (x = 0; x < size - 1; x++) { - for (y = 0; y < size - 1; y++) { - if (((local[(y * size) + x] == local[((y + 1) * size) + x]) && - (local[(y * size) + x] == local[(y * size) + (x + 1)])) && - (local[(y * size) + x] == local[((y + 1) * size) + (x + 1)])) { - result += 3; - } - } - } - -#ifdef ZINTLOG - /* output Test 2 */ - sprintf(str, "%d", result-result_b); - result_b=result; - write_log(str); -#endif - - /* Test 3: 1:1:3:1:1 ratio pattern in row/column */ - /* Vertical */ - for (x = 0; x < size; x++) { - for (y = 0; y < (size - 7); y++) { - p = 0; - for (weight = 0; weight < 7; weight++) { - if (local[((y + weight) * size) + x] == '1') { - p += (0x40 >> weight); - } - } - if (p == 0x5d) { - /* Pattern found, check before and after */ - beforeCount = 0; - for (b = (y - 4); b < y; b++) { - if (b < 0) { - beforeCount++; - } else { - if (local[(b * size) + x] == '0') { - beforeCount++; - } else { - beforeCount = 0; - } - } - } - - afterCount = 0; - for (a = (y + 7); a <= (y + 10); a++) { - if (a >= size) { - afterCount++; - } else { - if (local[(a * size) + x] == '0') { - afterCount++; - } else { - afterCount = 0; - } - } - } - - if ((beforeCount == 4) || (afterCount == 4)) { - /* Pattern is preceeded or followed by light area - 4 modules wide */ - result += 40; - } - } - } - } - - /* Horizontal */ - for (y = 0; y < size; y++) { - for (x = 0; x < (size - 7); x++) { - p = 0; - for (weight = 0; weight < 7; weight++) { - if (local[(y * size) + x + weight] == '1') { - p += (0x40 >> weight); - } - } - if (p == 0x5d) { - /* Pattern found, check before and after */ - beforeCount = 0; - for (b = (x - 4); b < x; b++) { - if (b < 0) { - beforeCount++; - } else { - if (local[(y * size) + b] == '0') { - beforeCount++; - } else { - beforeCount = 0; - } - } - } - - afterCount = 0; - for (a = (x + 7); a <= (x + 10); a++) { - if (a >= size) { - afterCount++; - } else { - if (local[(y * size) + a] == '0') { - afterCount++; - } else { - afterCount = 0; - } - } - } - - if ((beforeCount == 4) || (afterCount == 4)) { - /* Pattern is preceeded or followed by light area - 4 modules wide */ - result += 40; - } - } - } - } - -#ifdef ZINTLOG - /* output Test 3 */ - sprintf(str, "%d", result-result_b); - result_b=result; - write_log(str); -#endif - - /* Test 4: Proportion of dark modules in entire symbol */ - dark_mods = 0; - for(x = 0; x < size; x++) { - for(y = 0; y < size; y++) { - if(local[(y * size) + x] == '1') { - dark_mods++; - } - } - } - percentage = 100 * (dark_mods / (size * size)); - if (percentage <= 50) { - k = ((100 - percentage) - 50) / 5; + if (direction) { + y--; } else { - k = (percentage - 50) / 5; + y++; } - - result += 10 * k; - -#ifdef ZINTLOG - /* output Test 4+summary */ - sprintf(str, "%d", result-result_b); - write_log(str); - write_log("=========="); - sprintf(str, "%d", result); - write_log(str); -#endif - - return result; + if (y == -1) { + /* reached the top */ + row++; + y = 0; + direction = 0; + } + if (y == size) { + /* reached the bottom */ + row++; + y = size - 1; + direction = 1; + } + } while (i < n); } -void add_format_info_eval(unsigned char *eval, int size, int ecc_level, int pattern) -{ - /* Add format information to grid */ +#ifdef ZINTLOG - int format = pattern; - unsigned int seq; - int i; +int append_log(char log) { + FILE *file; - switch(ecc_level) { - case LEVEL_L: format += 0x08; break; - case LEVEL_Q: format += 0x18; break; - case LEVEL_H: format += 0x10; break; - } - - seq = qr_annex_c[format]; - - for(i = 0; i < 6; i++) { - eval[(i * size) + 8] = (seq >> i) & 0x01 ? (0x01 >> pattern) : 0x00; - } - - for(i = 0; i < 8; i++) { - eval[(8 * size) + (size - i - 1)] = (seq >> i) & 0x01 ? (0x01 >> pattern) : 0x00; - } - - for(i = 0; i < 6; i++) { - eval[(8 * size) + (5 - i)] = (seq >> (i + 9)) & 0x01 ? (0x01 >> pattern) : 0x00; - } - - for(i = 0; i < 7; i++) { - eval[(((size - 7) + i) * size) + 8] = (seq >> (i + 8)) & 0x01 ? (0x01 >> pattern) : 0x00; - } - - eval[(7 * size) + 8] = (seq >> 6) & 0x01 ? (0x01 >> pattern) : 0x00; - eval[(8 * size) + 8] = (seq >> 7) & 0x01 ? (0x01 >> pattern) : 0x00; - eval[(8 * size) + 7] = (seq >> 8) & 0x01 ? (0x01 >> pattern) : 0x00; + file = fopen("zintlog.txt", "a+"); + fprintf(file, "%c", log); + fclose(file); + return 0; } -int apply_bitmask(unsigned char *grid, int size, int ecc_level) -{ - int x, y; - unsigned char p; - int pattern, penalty[8]; - int best_val, best_pattern; - int bit; - +int write_log(char log[]) { + FILE *file; + + file = fopen("zintlog.txt", "a+"); + fprintf(file, log); /*writes*/ + fprintf(file, "\r\n"); /*writes*/ + fclose(file); + return 0; +} +#endif + +int evaluate(unsigned char *eval, int size, int pattern) { + int x, y, block, weight; + int result = 0; + char state; + int p; + int dark_mods; + int percentage, k; + int a, b, afterCount, beforeCount; +#ifdef ZINTLOG + int result_b = 0; + char str[15]; +#endif + #ifndef _MSC_VER - unsigned char mask[size * size]; - unsigned char eval[size * size]; + char local[size * size]; #else - unsigned char* mask = (unsigned char *)_alloca((size * size) * sizeof(unsigned char)); - unsigned char* eval = (unsigned char *)_alloca((size * size) * sizeof(unsigned char)); + char* local = (char *) _alloca((size * size) * sizeof (char)); #endif - /* Perform data masking */ - for(x = 0; x < size; x++) { - for(y = 0; y < size; y++) { - mask[(y * size) + x] = 0x00; - - // all eight bitmask variants are encoded in the 8 bits of the bytes that make up the mask array. - if (!(grid[(y * size) + x] & 0xf0)) { // exclude areas not to be masked. - if(((y + x) & 1) == 0) { mask[(y * size) + x] += 0x01; } - if((y & 1) == 0) { mask[(y * size) + x] += 0x02; } - if((x % 3) == 0) { mask[(y * size) + x] += 0x04; } - if(((y + x) % 3) == 0) { mask[(y * size) + x] += 0x08; } - if((((y / 2) + (x / 3)) & 1) == 0) { mask[(y * size) + x] += 0x10; } - if((((y * x) & 1) + ((y * x) % 3)) == 0) { mask[(y * size) + x] += 0x20; } - if(((((y * x) & 1) + ((y * x) % 3)) & 1) == 0) { mask[(y * size) + x] += 0x40; } - if(((((y + x) & 1) + ((y * x) % 3)) & 1) == 0) { mask[(y * size) + x] += 0x80; } - } - } - } - // apply data masks to grid, result in eval - for(x = 0; x < size; x++) { - for(y = 0; y < size; y++) { - if(grid[(y * size) + x] & 0x01) - { p = 0xff; } - else { p = 0x00; } - - eval[(y * size) + x] = mask[(y * size) + x] ^ p; - } - } - - - /* Evaluate result */ - for(pattern = 0; pattern < 8; pattern++) { - - add_format_info_eval(eval, size, ecc_level, pattern); - - penalty[pattern] = evaluate(eval, size, pattern); - } - - best_pattern = 0; - best_val = penalty[0]; - for(pattern = 1; pattern < 8; pattern++) { - if(penalty[pattern] < best_val) { - best_pattern = pattern; - best_val = penalty[pattern]; - } - } - -#ifdef ZINTLOG - char str[15]; - sprintf(str, "%d", best_val); - write_log("choosed pattern:"); - write_log(str); +#ifdef ZINTLOG + write_log(""); + sprintf(str, "%d", pattern); + write_log(str); #endif - /* Apply mask */ - for(x = 0; x < size; x++) { - for(y = 0; y < size; y++) { - bit = 0; - switch(best_pattern) { - case 0: if(mask[(y * size) + x] & 0x01) { bit = 1; } break; - case 1: if(mask[(y * size) + x] & 0x02) { bit = 1; } break; - case 2: if(mask[(y * size) + x] & 0x04) { bit = 1; } break; - case 3: if(mask[(y * size) + x] & 0x08) { bit = 1; } break; - case 4: if(mask[(y * size) + x] & 0x10) { bit = 1; } break; - case 5: if(mask[(y * size) + x] & 0x20) { bit = 1; } break; - case 6: if(mask[(y * size) + x] & 0x40) { bit = 1; } break; - case 7: if(mask[(y * size) + x] & 0x80) { bit = 1; } break; - } - if(bit == 1) { - if(grid[(y * size) + x] & 0x01) { - grid[(y * size) + x] = 0x00; - } else { - grid[(y * size) + x] = 0x01; - } - } - } - } + /* all eight bitmask variants have been encoded in the 8 bits of the bytes + * that make up the grid array. select them for evaluation according to the + * desired pattern.*/ + for (x = 0; x < size; x++) { + for (y = 0; y < size; y++) { + if ((eval[(y * size) + x] & (0x01 << pattern)) != 0) { + local[(y * size) + x] = '1'; + } else { + local[(y * size) + x] = '0'; + } + } + } - return best_pattern; +#ifdef ZINTLOG + //bitmask output + for (y = 0; y < size; y++) { + strcpy(str, ""); + for (x = 0; x < size; x++) { + state = local[(y * size) + x]; + append_log(state); + } + write_log(""); + } + write_log(""); +#endif + + /* Test 1: Adjacent modules in row/column in same colour */ + /* Vertical */ + for (x = 0; x < size; x++) { + state = local[x]; + block = 0; + for (y = 0; y < size; y++) { + if (local[(y * size) + x] == state) { + block++; + } else { + if (block > 5) { + result += (3 + (block - 5)); + } + block = 0; + state = local[(y * size) + x]; + } + } + if (block > 5) { + result += (3 + (block - 5)); + } + } + + /* Horizontal */ + for (y = 0; y < size; y++) { + state = local[y * size]; + block = 0; + for (x = 0; x < size; x++) { + if (local[(y * size) + x] == state) { + block++; + } else { + if (block > 5) { + result += (3 + (block - 5)); + } + block = 0; + state = local[(y * size) + x]; + } + } + if (block > 5) { + result += (3 + (block - 5)); + } + } + +#ifdef ZINTLOG + /* output Test 1 */ + sprintf(str, "%d", result); + result_b = result; + write_log(str); +#endif + + /* Test 2: Block of modules in same color */ + for (x = 0; x < size - 1; x++) { + for (y = 0; y < size - 1; y++) { + if (((local[(y * size) + x] == local[((y + 1) * size) + x]) && + (local[(y * size) + x] == local[(y * size) + (x + 1)])) && + (local[(y * size) + x] == local[((y + 1) * size) + (x + 1)])) { + result += 3; + } + } + } + +#ifdef ZINTLOG + /* output Test 2 */ + sprintf(str, "%d", result - result_b); + result_b = result; + write_log(str); +#endif + + /* Test 3: 1:1:3:1:1 ratio pattern in row/column */ + /* Vertical */ + for (x = 0; x < size; x++) { + for (y = 0; y < (size - 7); y++) { + p = 0; + for (weight = 0; weight < 7; weight++) { + if (local[((y + weight) * size) + x] == '1') { + p += (0x40 >> weight); + } + } + if (p == 0x5d) { + /* Pattern found, check before and after */ + beforeCount = 0; + for (b = (y - 4); b < y; b++) { + if (b < 0) { + beforeCount++; + } else { + if (local[(b * size) + x] == '0') { + beforeCount++; + } else { + beforeCount = 0; + } + } + } + + afterCount = 0; + for (a = (y + 7); a <= (y + 10); a++) { + if (a >= size) { + afterCount++; + } else { + if (local[(a * size) + x] == '0') { + afterCount++; + } else { + afterCount = 0; + } + } + } + + if ((beforeCount == 4) || (afterCount == 4)) { + /* Pattern is preceeded or followed by light area + 4 modules wide */ + result += 40; + } + } + } + } + + /* Horizontal */ + for (y = 0; y < size; y++) { + for (x = 0; x < (size - 7); x++) { + p = 0; + for (weight = 0; weight < 7; weight++) { + if (local[(y * size) + x + weight] == '1') { + p += (0x40 >> weight); + } + } + if (p == 0x5d) { + /* Pattern found, check before and after */ + beforeCount = 0; + for (b = (x - 4); b < x; b++) { + if (b < 0) { + beforeCount++; + } else { + if (local[(y * size) + b] == '0') { + beforeCount++; + } else { + beforeCount = 0; + } + } + } + + afterCount = 0; + for (a = (x + 7); a <= (x + 10); a++) { + if (a >= size) { + afterCount++; + } else { + if (local[(y * size) + a] == '0') { + afterCount++; + } else { + afterCount = 0; + } + } + } + + if ((beforeCount == 4) || (afterCount == 4)) { + /* Pattern is preceeded or followed by light area + 4 modules wide */ + result += 40; + } + } + } + } + +#ifdef ZINTLOG + /* output Test 3 */ + sprintf(str, "%d", result - result_b); + result_b = result; + write_log(str); +#endif + + /* Test 4: Proportion of dark modules in entire symbol */ + dark_mods = 0; + for (x = 0; x < size; x++) { + for (y = 0; y < size; y++) { + if (local[(y * size) + x] == '1') { + dark_mods++; + } + } + } + percentage = 100 * (dark_mods / (size * size)); + if (percentage <= 50) { + k = ((100 - percentage) - 50) / 5; + } else { + k = (percentage - 50) / 5; + } + + result += 10 * k; + +#ifdef ZINTLOG + /* output Test 4+summary */ + sprintf(str, "%d", result - result_b); + write_log(str); + write_log("=========="); + sprintf(str, "%d", result); + write_log(str); +#endif + + return result; } -void add_format_info(unsigned char *grid, int size, int ecc_level, int pattern) -{ - /* Add format information to grid */ +void add_format_info_eval(unsigned char *eval, int size, int ecc_level, int pattern) { + /* Add format information to grid */ - int format = pattern; - unsigned int seq; - int i; + int format = pattern; + unsigned int seq; + int i; - switch(ecc_level) { - case LEVEL_L: format += 0x08; break; - case LEVEL_Q: format += 0x18; break; - case LEVEL_H: format += 0x10; break; - } + switch (ecc_level) { + case LEVEL_L: format += 0x08; + break; + case LEVEL_Q: format += 0x18; + break; + case LEVEL_H: format += 0x10; + break; + } - seq = qr_annex_c[format]; + seq = qr_annex_c[format]; - for(i = 0; i < 6; i++) { - grid[(i * size) + 8] += (seq >> i) & 0x01; - } + for (i = 0; i < 6; i++) { + eval[(i * size) + 8] = (seq >> i) & 0x01 ? (0x01 >> pattern) : 0x00; + } - for(i = 0; i < 8; i++) { - grid[(8 * size) + (size - i - 1)] += (seq >> i) & 0x01; - } + for (i = 0; i < 8; i++) { + eval[(8 * size) + (size - i - 1)] = (seq >> i) & 0x01 ? (0x01 >> pattern) : 0x00; + } - for(i = 0; i < 6; i++) { - grid[(8 * size) + (5 - i)] += (seq >> (i + 9)) & 0x01; - } + for (i = 0; i < 6; i++) { + eval[(8 * size) + (5 - i)] = (seq >> (i + 9)) & 0x01 ? (0x01 >> pattern) : 0x00; + } - for(i = 0; i < 7; i++) { - grid[(((size - 7) + i) * size) + 8] += (seq >> (i + 8)) & 0x01; - } + for (i = 0; i < 7; i++) { + eval[(((size - 7) + i) * size) + 8] = (seq >> (i + 8)) & 0x01 ? (0x01 >> pattern) : 0x00; + } - grid[(7 * size) + 8] += (seq >> 6) & 0x01; - grid[(8 * size) + 8] += (seq >> 7) & 0x01; - grid[(8 * size) + 7] += (seq >> 8) & 0x01; + eval[(7 * size) + 8] = (seq >> 6) & 0x01 ? (0x01 >> pattern) : 0x00; + eval[(8 * size) + 8] = (seq >> 7) & 0x01 ? (0x01 >> pattern) : 0x00; + eval[(8 * size) + 7] = (seq >> 8) & 0x01 ? (0x01 >> pattern) : 0x00; } -void add_version_info(unsigned char *grid, int size, int version) -{ - /* Add version information */ - int i; +int apply_bitmask(unsigned char *grid, int size, int ecc_level) { + int x, y; + unsigned char p; + int pattern, penalty[8]; + int best_val, best_pattern; + int bit; - long int version_data = qr_annex_d[version - 7]; - for(i = 0; i < 6; i++) { - grid[((size - 11) * size) + i] += (version_data >> (i * 3)) & 0x41; - grid[((size - 10) * size) + i] += (version_data >> ((i * 3) + 1)) & 0x41; - grid[((size - 9) * size) + i] += (version_data >> ((i * 3) + 2)) & 0x41; - grid[(i * size) + (size - 11)] += (version_data >> (i * 3)) & 0x41; - grid[(i * size) + (size - 10)] += (version_data >> ((i * 3) + 1)) & 0x41; - grid[(i * size) + (size - 9)] += (version_data >> ((i * 3) + 2)) & 0x41; - } +#ifndef _MSC_VER + unsigned char mask[size * size]; + unsigned char eval[size * size]; +#else + unsigned char* mask = (unsigned char *) _alloca((size * size) * sizeof (unsigned char)); + unsigned char* eval = (unsigned char *) _alloca((size * size) * sizeof (unsigned char)); +#endif + + /* Perform data masking */ + for (x = 0; x < size; x++) { + for (y = 0; y < size; y++) { + mask[(y * size) + x] = 0x00; + + // all eight bitmask variants are encoded in the 8 bits of the bytes that make up the mask array. + if (!(grid[(y * size) + x] & 0xf0)) { // exclude areas not to be masked. + if (((y + x) & 1) == 0) { + mask[(y * size) + x] += 0x01; + } + if ((y & 1) == 0) { + mask[(y * size) + x] += 0x02; + } + if ((x % 3) == 0) { + mask[(y * size) + x] += 0x04; + } + if (((y + x) % 3) == 0) { + mask[(y * size) + x] += 0x08; + } + if ((((y / 2) + (x / 3)) & 1) == 0) { + mask[(y * size) + x] += 0x10; + } + if ((((y * x) & 1) + ((y * x) % 3)) == 0) { + mask[(y * size) + x] += 0x20; + } + if (((((y * x) & 1) + ((y * x) % 3)) & 1) == 0) { + mask[(y * size) + x] += 0x40; + } + if (((((y + x) & 1) + ((y * x) % 3)) & 1) == 0) { + mask[(y * size) + x] += 0x80; + } + } + } + } + + // apply data masks to grid, result in eval + for (x = 0; x < size; x++) { + for (y = 0; y < size; y++) { + if (grid[(y * size) + x] & 0x01) { + p = 0xff; + } + else { + p = 0x00; + } + + eval[(y * size) + x] = mask[(y * size) + x] ^ p; + } + } + + + /* Evaluate result */ + for (pattern = 0; pattern < 8; pattern++) { + + add_format_info_eval(eval, size, ecc_level, pattern); + + penalty[pattern] = evaluate(eval, size, pattern); + } + + best_pattern = 0; + best_val = penalty[0]; + for (pattern = 1; pattern < 8; pattern++) { + if (penalty[pattern] < best_val) { + best_pattern = pattern; + best_val = penalty[pattern]; + } + } + +#ifdef ZINTLOG + char str[15]; + sprintf(str, "%d", best_val); + write_log("choosed pattern:"); + write_log(str); +#endif + + /* Apply mask */ + for (x = 0; x < size; x++) { + for (y = 0; y < size; y++) { + bit = 0; + switch (best_pattern) { + case 0: if (mask[(y * size) + x] & 0x01) { + bit = 1; + } + break; + case 1: if (mask[(y * size) + x] & 0x02) { + bit = 1; + } + break; + case 2: if (mask[(y * size) + x] & 0x04) { + bit = 1; + } + break; + case 3: if (mask[(y * size) + x] & 0x08) { + bit = 1; + } + break; + case 4: if (mask[(y * size) + x] & 0x10) { + bit = 1; + } + break; + case 5: if (mask[(y * size) + x] & 0x20) { + bit = 1; + } + break; + case 6: if (mask[(y * size) + x] & 0x40) { + bit = 1; + } + break; + case 7: if (mask[(y * size) + x] & 0x80) { + bit = 1; + } + break; + } + if (bit == 1) { + if (grid[(y * size) + x] & 0x01) { + grid[(y * size) + x] = 0x00; + } else { + grid[(y * size) + x] = 0x01; + } + } + } + } + + return best_pattern; } +/* Add format information to grid */ +void add_format_info(unsigned char *grid, int size, int ecc_level, int pattern) { + int format = pattern; + unsigned int seq; + int i; + + switch (ecc_level) { + case LEVEL_L: format += 0x08; + break; + case LEVEL_Q: format += 0x18; + break; + case LEVEL_H: format += 0x10; + break; + } + + seq = qr_annex_c[format]; + + for (i = 0; i < 6; i++) { + grid[(i * size) + 8] += (seq >> i) & 0x01; + } + + for (i = 0; i < 8; i++) { + grid[(8 * size) + (size - i - 1)] += (seq >> i) & 0x01; + } + + for (i = 0; i < 6; i++) { + grid[(8 * size) + (5 - i)] += (seq >> (i + 9)) & 0x01; + } + + for (i = 0; i < 7; i++) { + grid[(((size - 7) + i) * size) + 8] += (seq >> (i + 8)) & 0x01; + } + + grid[(7 * size) + 8] += (seq >> 6) & 0x01; + grid[(8 * size) + 8] += (seq >> 7) & 0x01; + grid[(8 * size) + 7] += (seq >> 8) & 0x01; +} + +/* Add version information */ +void add_version_info(unsigned char *grid, int size, int version) { + int i; + + long int version_data = qr_annex_d[version - 7]; + for (i = 0; i < 6; i++) { + grid[((size - 11) * size) + i] += (version_data >> (i * 3)) & 0x41; + grid[((size - 10) * size) + i] += (version_data >> ((i * 3) + 1)) & 0x41; + grid[((size - 9) * size) + i] += (version_data >> ((i * 3) + 2)) & 0x41; + grid[(i * size) + (size - 11)] += (version_data >> (i * 3)) & 0x41; + grid[(i * size) + (size - 10)] += (version_data >> ((i * 3) + 1)) & 0x41; + grid[(i * size) + (size - 9)] += (version_data >> ((i * 3) + 2)) & 0x41; + } +} + +/* Choose from three numbers based on version */ int tribus(int version, int a, int b, int c) { - /* Choose from three numbers based on version */ int RetVal; RetVal = c; @@ -1250,10 +1291,10 @@ int tribus(int version, int a, int b, int c) { return RetVal; } +/* Implements a custom optimisation algorithm, more efficient than that + given in Annex J. */ void applyOptimisation(int version, char inputMode[], int inputLength) { - /* Implements a custom optimisation algorithm, more efficient than that - given in Annex J. - */ + int blockCount = 0; int i, j; @@ -1437,1307 +1478,1592 @@ int getBinaryLength(int version, char inputMode[], int inputData[], int inputLen return count; } -int qr_code(struct zint_symbol *symbol, unsigned char source[], int length) -{ - int error_number, i, j, glyph, est_binlen; - int ecc_level, autosize, version, max_cw, target_binlen, blocks, size; - int bitmask, gs1; - int canShrink; - +int qr_code(struct zint_symbol *symbol, unsigned char source[], int length) { + int error_number, i, j, glyph, est_binlen; + int ecc_level, autosize, version, max_cw, target_binlen, blocks, size; + int bitmask, gs1; + int canShrink; + #ifndef _MSC_VER - int utfdata[length + 1]; - int jisdata[length + 1]; - char mode[length + 1]; + int utfdata[length + 1]; + int jisdata[length + 1]; + char mode[length + 1]; #else - int* datastream; - int* fullstream; - unsigned char* grid; - int* utfdata = (int *)_alloca((length + 1) * sizeof(int)); - int* jisdata = (int *)_alloca((length + 1) * sizeof(int)); - char* mode = (char *)_alloca(length + 1); + int* datastream; + int* fullstream; + unsigned char* grid; + int* utfdata = (int *) _alloca((length + 1) * sizeof (int)); + int* jisdata = (int *) _alloca((length + 1) * sizeof (int)); + char* mode = (char *) _alloca(length + 1); #endif - - gs1 = (symbol->input_mode == GS1_MODE); - switch(symbol->input_mode) { - case DATA_MODE: - for(i = 0; i < length; i++) { - jisdata[i] = (int)source[i]; - } - break; - 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 ZINT_ERROR_INVALID_DATA; - } - jisdata[i] = glyph; - } - } - break; - } + gs1 = (symbol->input_mode == GS1_MODE); - define_mode(mode, jisdata, length, gs1); - est_binlen = estimate_binary_length(mode, length, gs1); + switch (symbol->input_mode) { + case DATA_MODE: + for (i = 0; i < length; i++) { + jisdata[i] = (int) source[i]; + } + break; + default: + /* Convert Unicode input to Shift-JIS */ + error_number = utf8toutf16(symbol, source, utfdata, &length); + if (error_number != 0) { + return error_number; + } - 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 ZINT_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; - } - } - - // Now see if the optimised binary will fit in a smaller symbol. - canShrink = 1; - - do { - if (autosize == 1) { - canShrink = 0; - } else { - if (tribus(autosize - 1, 1, 2, 3) != tribus(autosize, 1, 2, 3)) { - // Length of binary needed to encode the data in the smaller symbol is different, recalculate - est_binlen = getBinaryLength(autosize - 1, mode, jisdata, length, gs1); - } - - switch (ecc_level) { - case LEVEL_L: - if ((8 * qr_data_codewords_L[autosize - 2]) < est_binlen) { - canShrink = 0; - } - break; - case LEVEL_M: - if ((8 * qr_data_codewords_M[autosize - 2]) < est_binlen) { - canShrink = 0; - } - break; - case LEVEL_Q: - if ((8 * qr_data_codewords_Q[autosize - 2]) < est_binlen) { - canShrink = 0; - } - break; - case LEVEL_H: - if ((8 * qr_data_codewords_H[autosize - 2]) < est_binlen) { - canShrink = 0; - } - break; - } - - if (canShrink == 1) { - // Optimisation worked - data will fit in a smaller symbol - autosize--; + for (i = 0; i < length; i++) { + if (utfdata[i] <= 0xff) { + jisdata[i] = utfdata[i]; } else { - // Data did not fit in the smaller symbol, revert to original size - if (tribus(autosize - 1, 1, 2, 3) != tribus(autosize, 1, 2, 3)) { - est_binlen = getBinaryLength(autosize, mode, jisdata, length, gs1); + 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 ZINT_ERROR_INVALID_DATA; } + jisdata[i] = glyph; } } - } while (canShrink == 1); + break; + } - version = autosize; + define_mode(mode, jisdata, length, gs1); + est_binlen = estimate_binary_length(mode, length, gs1); - if ((symbol->option_2 >= 1) && (symbol->option_2 <= 40)) { - /* If the user has selected a larger symbol than the smallest available, - then use the size the user has selected, and re-optimise for this - symbol size. - */ - if (symbol->option_2 > version) { - version = symbol->option_2; - est_binlen = getBinaryLength(symbol->option_2, mode, jisdata, length, gs1); + 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 ZINT_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; + } + } + + // Now see if the optimised binary will fit in a smaller symbol. + canShrink = 1; + + do { + if (autosize == 1) { + canShrink = 0; + } else { + if (tribus(autosize - 1, 1, 2, 3) != tribus(autosize, 1, 2, 3)) { + // Length of binary needed to encode the data in the smaller symbol is different, recalculate + est_binlen = getBinaryLength(autosize - 1, mode, jisdata, length, gs1); + } + + switch (ecc_level) { + case LEVEL_L: + if ((8 * qr_data_codewords_L[autosize - 2]) < est_binlen) { + canShrink = 0; + } + break; + case LEVEL_M: + if ((8 * qr_data_codewords_M[autosize - 2]) < est_binlen) { + canShrink = 0; + } + break; + case LEVEL_Q: + if ((8 * qr_data_codewords_Q[autosize - 2]) < est_binlen) { + canShrink = 0; + } + break; + case LEVEL_H: + if ((8 * qr_data_codewords_H[autosize - 2]) < est_binlen) { + canShrink = 0; + } + break; + } + + if (canShrink == 1) { + // Optimisation worked - data will fit in a smaller symbol + autosize--; + } else { + // Data did not fit in the smaller symbol, revert to original size + if (tribus(autosize - 1, 1, 2, 3) != tribus(autosize, 1, 2, 3)) { + est_binlen = getBinaryLength(autosize, mode, jisdata, length, gs1); + } } } + } while (canShrink == 1); - /* Ensure maxium error correction capacity */ - if(est_binlen <= qr_data_codewords_M[version - 1]) { ecc_level = LEVEL_M; } - if(est_binlen <= qr_data_codewords_Q[version - 1]) { ecc_level = LEVEL_Q; } - if(est_binlen <= qr_data_codewords_H[version - 1]) { ecc_level = LEVEL_H; } + version = autosize; + + if ((symbol->option_2 >= 1) && (symbol->option_2 <= 40)) { + /* If the user has selected a larger symbol than the smallest available, + then use the size the user has selected, and re-optimise for this + symbol size. + */ + if (symbol->option_2 > version) { + version = symbol->option_2; + est_binlen = getBinaryLength(symbol->option_2, mode, jisdata, length, gs1); + } + } + + /* Ensure maxium error correction capacity */ + if (est_binlen <= qr_data_codewords_M[version - 1]) { + ecc_level = LEVEL_M; + } + if (est_binlen <= qr_data_codewords_Q[version - 1]) { + ecc_level = LEVEL_Q; + } + if (est_binlen <= qr_data_codewords_H[version - 1]) { + ecc_level = LEVEL_H; + } + + 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; + } - 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; - } - #ifndef _MSC_VER - int datastream[target_binlen + 1]; - int fullstream[qr_total_codewords[version - 1] + 1]; + int datastream[target_binlen + 1]; + int fullstream[qr_total_codewords[version - 1] + 1]; #else - datastream = (int *)_alloca((target_binlen + 1) * sizeof(int)); - fullstream = (int *)_alloca((qr_total_codewords[version - 1] + 1) * sizeof(int)); + datastream = (int *) _alloca((target_binlen + 1) * sizeof (int)); + fullstream = (int *) _alloca((qr_total_codewords[version - 1] + 1) * sizeof (int)); #endif - qr_binary(datastream, version, target_binlen, mode, jisdata, length, gs1, est_binlen); - add_ecc(fullstream, datastream, version, target_binlen, blocks); + qr_binary(datastream, version, target_binlen, mode, jisdata, length, gs1, est_binlen); + add_ecc(fullstream, datastream, version, target_binlen, blocks); - size = qr_sizes[version - 1]; + size = qr_sizes[version - 1]; #ifndef _MSC_VER - unsigned char grid[size * size]; + unsigned char grid[size * size]; #else - grid = (unsigned char *)_alloca((size * size) * sizeof(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, version); - populate_grid(grid, size, fullstream, qr_total_codewords[version - 1]); + for (i = 0; i < size; i++) { + for (j = 0; j < size; j++) { + grid[(i * size) + j] = 0; + } + } - if(version >= 7) { - add_version_info(grid, size, version); - } - - bitmask = apply_bitmask(grid, size, ecc_level); + setup_grid(grid, size, version); + populate_grid(grid, size, fullstream, qr_total_codewords[version - 1]); - add_format_info(grid, size, ecc_level, bitmask); - - + if (version >= 7) { + add_version_info(grid, size, version); + } - 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; - } + bitmask = apply_bitmask(grid, size, ecc_level); - return 0; + add_format_info(grid, size, ecc_level, bitmask); + + + + 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; + } + + return 0; } /* NOTE: From this point forward concerns Micro QR Code only */ -int micro_qr_intermediate(char binary[], int jisdata[], char mode[], int length, int *kanji_used, int *alphanum_used, int *byte_used) -{ - /* Convert input data to an "intermediate stage" where data is binary encoded but - control information is not */ - int position = 0, debug = 0; - int short_data_block_length, i; - char data_block; - char buffer[2]; +int micro_qr_intermediate(char binary[], int jisdata[], char mode[], int length, int *kanji_used, int *alphanum_used, int *byte_used) { + /* Convert input data to an "intermediate stage" where data is binary encoded but + control information is not */ + int position = 0, debug = 0; + int short_data_block_length, i; + char data_block; + char buffer[2]; - strcpy(binary, ""); - - if(debug) { - for(i = 0; i < length; i++) { - printf("%c", mode[i]); - } - printf("\n"); - } + strcpy(binary, ""); - do { - if(strlen(binary) > 128) { - return ZINT_ERROR_TOO_LONG; - } + if (debug) { + for (i = 0; i < length; i++) { + printf("%c", mode[i]); + } + printf("\n"); + } - 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)); + do { + if (strlen(binary) > 128) { + return ZINT_ERROR_TOO_LONG; + } - switch(data_block) { - case 'K': - /* Kanji mode */ - /* Mode indicator */ - concat(binary, "K"); - *kanji_used = 1; + 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)); - /* Character count indicator */ - buffer[0] = short_data_block_length; - buffer[1] = '\0'; - concat(binary, buffer); + switch (data_block) { + case 'K': + /* Kanji mode */ + /* Mode indicator */ + concat(binary, "K"); + *kanji_used = 1; - if(debug) { printf("Kanji block (length %d)\n\t", short_data_block_length); } + /* Character count indicator */ + buffer[0] = short_data_block_length; + buffer[1] = '\0'; + concat(binary, buffer); - /* Character representation */ - for(i = 0; i < short_data_block_length; i++) { - int jis = jisdata[position + i]; - int msb, lsb, prod; + if (debug) { + printf("Kanji block (length %d)\n\t", short_data_block_length); + } - if(jis > 0x9fff) { jis -= 0xc140; } - msb = (jis & 0xff00) >> 4; - lsb = (jis & 0xff); - prod = (msb * 0xc0) + lsb; - - qr_bscan(binary, prod, 0x1000); - - if(debug) { printf("0x%4X ", prod); } + /* Character representation */ + for (i = 0; i < short_data_block_length; i++) { + int jis = jisdata[position + i]; + int msb, lsb, prod; - if(strlen(binary) > 128) { - return ZINT_ERROR_TOO_LONG; - } - } + if (jis > 0x9fff) { + jis -= 0xc140; + } + msb = (jis & 0xff00) >> 4; + lsb = (jis & 0xff); + prod = (msb * 0xc0) + lsb; - if(debug) { printf("\n"); } + qr_bscan(binary, prod, 0x1000); - break; - case 'B': - /* Byte mode */ - /* Mode indicator */ - concat(binary, "B"); - *byte_used = 1; + if (debug) { + printf("0x%4X ", prod); + } - /* Character count indicator */ - buffer[0] = short_data_block_length; - buffer[1] = '\0'; - concat(binary, buffer); + if (strlen(binary) > 128) { + return ZINT_ERROR_TOO_LONG; + } + } - if(debug) { printf("Byte block (length %d)\n\t", short_data_block_length); } + if (debug) { + printf("\n"); + } - /* Character representation */ - for(i = 0; i < short_data_block_length; i++) { - int byte = jisdata[position + i]; - - qr_bscan(binary, byte, 0x80); - - if(debug) { printf("0x%4X ", byte); } + break; + case 'B': + /* Byte mode */ + /* Mode indicator */ + concat(binary, "B"); + *byte_used = 1; - if(strlen(binary) > 128) { - return ZINT_ERROR_TOO_LONG; - } - } + /* Character count indicator */ + buffer[0] = short_data_block_length; + buffer[1] = '\0'; + concat(binary, buffer); - if(debug) { printf("\n"); } + if (debug) { + printf("Byte block (length %d)\n\t", short_data_block_length); + } - break; - case 'A': - /* Alphanumeric mode */ - /* Mode indicator */ - concat(binary, "A"); - *alphanum_used = 1; + /* Character representation */ + for (i = 0; i < short_data_block_length; i++) { + int byte = jisdata[position + i]; - /* Character count indicator */ - buffer[0] = short_data_block_length; - buffer[1] = '\0'; - concat(binary, buffer); + qr_bscan(binary, byte, 0x80); - if(debug) { printf("Alpha block (length %d)\n\t", short_data_block_length); } + if (debug) { + printf("0x%4X ", byte); + } - /* Character representation */ - i = 0; - while ( i < short_data_block_length ) { - int count; - int first = 0, second = 0, prod; + if (strlen(binary) > 128) { + return ZINT_ERROR_TOO_LONG; + } + } - first = posn(RHODIUM, (char) jisdata[position + i]); - count = 1; - prod = first; + if (debug) { + printf("\n"); + } - if(i + 1 < short_data_block_length && mode[position + i + 1] == 'A') { - second = posn(RHODIUM, (char) jisdata[position + i + 1]); - count = 2; - prod = (first * 45) + second; - } - - qr_bscan(binary, prod, 1 << (5 * count)); /* count = 1..2 */ - - if(debug) { printf("0x%4X ", prod); } + break; + case 'A': + /* Alphanumeric mode */ + /* Mode indicator */ + concat(binary, "A"); + *alphanum_used = 1; - if(strlen(binary) > 128) { - return ZINT_ERROR_TOO_LONG; - } + /* Character count indicator */ + buffer[0] = short_data_block_length; + buffer[1] = '\0'; + concat(binary, buffer); - i += 2; - }; + if (debug) { + printf("Alpha block (length %d)\n\t", short_data_block_length); + } - if(debug) { printf("\n"); } + /* Character representation */ + i = 0; + while (i < short_data_block_length) { + int count; + int first = 0, second = 0, prod; - break; - case 'N': - /* Numeric mode */ - /* Mode indicator */ - concat(binary, "N"); + first = posn(RHODIUM, (char) jisdata[position + i]); + count = 1; + prod = first; - /* Character count indicator */ - buffer[0] = short_data_block_length; - buffer[1] = '\0'; - concat(binary, buffer); + if (i + 1 < short_data_block_length && mode[position + i + 1] == 'A') { + second = posn(RHODIUM, (char) jisdata[position + i + 1]); + count = 2; + prod = (first * 45) + second; + } - if(debug) { printf("Number block (length %d)\n\t", short_data_block_length); } + qr_bscan(binary, prod, 1 << (5 * count)); /* count = 1..2 */ - /* Character representation */ - i = 0; - while ( i < short_data_block_length ) { - int count; - int first = 0, second = 0, third = 0, prod; + if (debug) { + printf("0x%4X ", prod); + } - first = posn(NEON, (char) jisdata[position + i]); - count = 1; - prod = first; + if (strlen(binary) > 128) { + return ZINT_ERROR_TOO_LONG; + } - if(i + 1 < short_data_block_length && mode[position + i + 1] == 'N') { - second = posn(NEON, (char) jisdata[position + i + 1]); - count = 2; - prod = (prod * 10) + second; - } + i += 2; + }; - if(i + 2 < short_data_block_length && mode[position + i + 2] == 'N') { - third = posn(NEON, (char) jisdata[position + i + 2]); - count = 3; - prod = (prod * 10) + third; - } - - qr_bscan(binary, prod, 1 << (3 * count)); /* count = 1..3 */ - - if(debug) { printf("0x%4X (%d)", prod, prod); } - - if(strlen(binary) > 128) { - return ZINT_ERROR_TOO_LONG; - } - - i += 3; - }; - - if(debug) { printf("\n"); } - - break; - } - - position += short_data_block_length; - } while (position < length - 1) ; - - return 0; + if (debug) { + printf("\n"); + } + + break; + case 'N': + /* Numeric mode */ + /* Mode indicator */ + concat(binary, "N"); + + /* Character count indicator */ + buffer[0] = short_data_block_length; + buffer[1] = '\0'; + concat(binary, buffer); + + 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 (i + 1 < short_data_block_length && mode[position + i + 1] == 'N') { + second = posn(NEON, (char) jisdata[position + i + 1]); + count = 2; + prod = (prod * 10) + second; + } + + if (i + 2 < short_data_block_length && mode[position + i + 2] == 'N') { + third = posn(NEON, (char) jisdata[position + i + 2]); + count = 3; + prod = (prod * 10) + third; + } + + qr_bscan(binary, prod, 1 << (3 * count)); /* count = 1..3 */ + + if (debug) { + printf("0x%4X (%d)", prod, prod); + } + + if (strlen(binary) > 128) { + return ZINT_ERROR_TOO_LONG; + } + + i += 3; + }; + + if (debug) { + printf("\n"); + } + + break; + } + + position += short_data_block_length; + } while (position < length - 1); + + return 0; } void get_bitlength(int count[], char stream[]) { - int length, i; - - length = strlen(stream); - - for(i = 0; i < 4; i++) { - count[i] = 0; - } - - i = 0; - do { - if((stream[i] == '0') || (stream[i] == '1')) { - count[0]++; - count[1]++; - count[2]++; - count[3]++; - i++; - } else { - switch(stream[i]) { - case 'K': - count[2] += 5; - count[3] += 7; - i += 2; - break; - case 'B': - count[2] += 6; - count[3] += 8; - i += 2; - break; - case 'A': - count[1] += 4; - count[2] += 6; - count[3] += 8; - i += 2; - break; - case 'N': - count[0] += 3; - count[1] += 5; - count[2] += 7; - count[3] += 9; - i += 2; - break; - } - } - } while (i < length); + int length, i; + + length = strlen(stream); + + for (i = 0; i < 4; i++) { + count[i] = 0; + } + + i = 0; + do { + if ((stream[i] == '0') || (stream[i] == '1')) { + count[0]++; + count[1]++; + count[2]++; + count[3]++; + i++; + } else { + switch (stream[i]) { + case 'K': + count[2] += 5; + count[3] += 7; + i += 2; + break; + case 'B': + count[2] += 6; + count[3] += 8; + i += 2; + break; + case 'A': + count[1] += 4; + count[2] += 6; + count[3] += 8; + i += 2; + break; + case 'N': + count[0] += 3; + count[1] += 5; + count[2] += 7; + count[3] += 9; + i += 2; + break; + } + } + } while (i < length); } -void microqr_expand_binary(char binary_stream[], char full_stream[], int version) -{ - int i, length; - - length = strlen(binary_stream); - - i = 0; - do { - switch(binary_stream[i]) { - case '1': concat(full_stream, "1"); i++; break; - case '0': concat(full_stream, "0"); i++; break; - case 'N': - /* Numeric Mode */ - /* Mode indicator */ - switch(version) { - case 1: concat(full_stream, "0"); break; - case 2: concat(full_stream, "00"); break; - case 3: concat(full_stream, "000"); break; - } - - /* Character count indicator */ - qr_bscan(full_stream, binary_stream[i + 1], 4 << version); /* version = 0..3 */ - - i += 2; - break; - case 'A': - /* Alphanumeric Mode */ - /* Mode indicator */ - switch(version) { - case 1: concat(full_stream, "1"); break; - case 2: concat(full_stream, "01"); break; - case 3: concat(full_stream, "001"); break; - } - - /* Character count indicator */ - qr_bscan(full_stream, binary_stream[i + 1], 2 << version); /* version = 1..3 */ - - i += 2; - break; - case 'B': - /* Byte Mode */ - /* Mode indicator */ - switch(version) { - case 2: concat(full_stream, "10"); break; - case 3: concat(full_stream, "010"); break; - } - - /* Character count indicator */ - qr_bscan(full_stream, binary_stream[i + 1], 2 << version); /* version = 2..3 */ - - i += 2; - break; - case 'K': - /* Kanji Mode */ - /* Mode indicator */ - switch(version) { - case 2: concat(full_stream, "11"); break; - case 3: concat(full_stream, "011"); break; - } - - /* Character count indicator */ - qr_bscan(full_stream, binary_stream[i + 1], 1 << version); /* version = 2..3 */ - - i += 2; - break; - } - - } while (i < length); +void microqr_expand_binary(char binary_stream[], char full_stream[], int version) { + int i, length; + + length = strlen(binary_stream); + + i = 0; + do { + switch (binary_stream[i]) { + case '1': concat(full_stream, "1"); + i++; + break; + case '0': concat(full_stream, "0"); + i++; + break; + case 'N': + /* Numeric Mode */ + /* Mode indicator */ + switch (version) { + case 1: concat(full_stream, "0"); + break; + case 2: concat(full_stream, "00"); + break; + case 3: concat(full_stream, "000"); + break; + } + + /* Character count indicator */ + qr_bscan(full_stream, binary_stream[i + 1], 4 << version); /* version = 0..3 */ + + i += 2; + break; + case 'A': + /* Alphanumeric Mode */ + /* Mode indicator */ + switch (version) { + case 1: concat(full_stream, "1"); + break; + case 2: concat(full_stream, "01"); + break; + case 3: concat(full_stream, "001"); + break; + } + + /* Character count indicator */ + qr_bscan(full_stream, binary_stream[i + 1], 2 << version); /* version = 1..3 */ + + i += 2; + break; + case 'B': + /* Byte Mode */ + /* Mode indicator */ + switch (version) { + case 2: concat(full_stream, "10"); + break; + case 3: concat(full_stream, "010"); + break; + } + + /* Character count indicator */ + qr_bscan(full_stream, binary_stream[i + 1], 2 << version); /* version = 2..3 */ + + i += 2; + break; + case 'K': + /* Kanji Mode */ + /* Mode indicator */ + switch (version) { + case 2: concat(full_stream, "11"); + break; + case 3: concat(full_stream, "011"); + break; + } + + /* Character count indicator */ + qr_bscan(full_stream, binary_stream[i + 1], 1 << version); /* version = 2..3 */ + + i += 2; + break; + } + + } while (i < length); } -void micro_qr_m1(char binary_data[]) -{ - int i, latch; - int bits_total, bits_left, remainder; - int data_codewords, ecc_codewords; - unsigned char data_blocks[4], ecc_blocks[3]; - - bits_total = 20; - latch = 0; - - /* Add terminator */ - bits_left = bits_total - strlen(binary_data); - if(bits_left <= 3) { - for(i = 0; i < bits_left; i++) { - concat(binary_data, "0"); - } - latch = 1; - } else { - concat(binary_data, "000"); - } - - if(latch == 0) { - /* Manage last (4-bit) block */ - bits_left = bits_total - strlen(binary_data); - if(bits_left <= 4) { - for(i = 0; i < bits_left; i++) { - concat(binary_data, "0"); - } - latch = 1; - } - } +void micro_qr_m1(char binary_data[]) { + int i, latch; + int bits_total, bits_left, remainder; + int data_codewords, ecc_codewords; + unsigned char data_blocks[4], ecc_blocks[3]; - if(latch == 0) { - /* Complete current byte */ - remainder = 8 - (strlen(binary_data) % 8); - if(remainder == 8) { remainder = 0; } - for(i = 0; i < remainder; i++) { - concat(binary_data, "0"); - } - - /* Add padding */ - bits_left = bits_total - strlen(binary_data); - if(bits_left > 4) { - remainder = (bits_left - 4) / 8; - for(i = 0; i < remainder; i++) { - concat(binary_data, i & 1 ? "00010001" : "11101100"); - } - } - concat(binary_data, "0000"); - } - - data_codewords = 3; - ecc_codewords = 2; - - /* Copy data into codewords */ - for(i = 0; i < (data_codewords - 1); i++) { - data_blocks[i] = 0; - if(binary_data[i * 8] == '1') { data_blocks[i] += 0x80; } - if(binary_data[(i * 8) + 1] == '1') { data_blocks[i] += 0x40; } - if(binary_data[(i * 8) + 2] == '1') { data_blocks[i] += 0x20; } - if(binary_data[(i * 8) + 3] == '1') { data_blocks[i] += 0x10; } - if(binary_data[(i * 8) + 4] == '1') { data_blocks[i] += 0x08; } - if(binary_data[(i * 8) + 5] == '1') { data_blocks[i] += 0x04; } - if(binary_data[(i * 8) + 6] == '1') { data_blocks[i] += 0x02; } - if(binary_data[(i * 8) + 7] == '1') { data_blocks[i] += 0x01; } - } - data_blocks[2] = 0; - if(binary_data[16] == '1') { data_blocks[2] += 0x08; } - if(binary_data[17] == '1') { data_blocks[2] += 0x04; } - if(binary_data[18] == '1') { data_blocks[2] += 0x02; } - if(binary_data[19] == '1') { data_blocks[2] += 0x01; } - - /* Calculate Reed-Solomon error codewords */ - rs_init_gf(0x11d); - rs_init_code(ecc_codewords, 0); - rs_encode(data_codewords,data_blocks,ecc_blocks); - rs_free(); - - /* Add Reed-Solomon codewords to binary data */ - for(i = 0; i < ecc_codewords; i++) { - qr_bscan(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80); - } + bits_total = 20; + latch = 0; + + /* Add terminator */ + bits_left = bits_total - strlen(binary_data); + if (bits_left <= 3) { + for (i = 0; i < bits_left; i++) { + concat(binary_data, "0"); + } + latch = 1; + } else { + concat(binary_data, "000"); + } + + if (latch == 0) { + /* Manage last (4-bit) block */ + bits_left = bits_total - strlen(binary_data); + if (bits_left <= 4) { + for (i = 0; i < bits_left; i++) { + concat(binary_data, "0"); + } + latch = 1; + } + } + + if (latch == 0) { + /* Complete current byte */ + remainder = 8 - (strlen(binary_data) % 8); + if (remainder == 8) { + remainder = 0; + } + for (i = 0; i < remainder; i++) { + concat(binary_data, "0"); + } + + /* Add padding */ + bits_left = bits_total - strlen(binary_data); + if (bits_left > 4) { + remainder = (bits_left - 4) / 8; + for (i = 0; i < remainder; i++) { + concat(binary_data, i & 1 ? "00010001" : "11101100"); + } + } + concat(binary_data, "0000"); + } + + data_codewords = 3; + ecc_codewords = 2; + + /* Copy data into codewords */ + for (i = 0; i < (data_codewords - 1); i++) { + data_blocks[i] = 0; + if (binary_data[i * 8] == '1') { + data_blocks[i] += 0x80; + } + if (binary_data[(i * 8) + 1] == '1') { + data_blocks[i] += 0x40; + } + if (binary_data[(i * 8) + 2] == '1') { + data_blocks[i] += 0x20; + } + if (binary_data[(i * 8) + 3] == '1') { + data_blocks[i] += 0x10; + } + if (binary_data[(i * 8) + 4] == '1') { + data_blocks[i] += 0x08; + } + if (binary_data[(i * 8) + 5] == '1') { + data_blocks[i] += 0x04; + } + if (binary_data[(i * 8) + 6] == '1') { + data_blocks[i] += 0x02; + } + if (binary_data[(i * 8) + 7] == '1') { + data_blocks[i] += 0x01; + } + } + data_blocks[2] = 0; + if (binary_data[16] == '1') { + data_blocks[2] += 0x08; + } + if (binary_data[17] == '1') { + data_blocks[2] += 0x04; + } + if (binary_data[18] == '1') { + data_blocks[2] += 0x02; + } + if (binary_data[19] == '1') { + data_blocks[2] += 0x01; + } + + /* Calculate Reed-Solomon error codewords */ + rs_init_gf(0x11d); + rs_init_code(ecc_codewords, 0); + rs_encode(data_codewords, data_blocks, ecc_blocks); + rs_free(); + + /* Add Reed-Solomon codewords to binary data */ + for (i = 0; i < ecc_codewords; i++) { + qr_bscan(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80); + } } -void micro_qr_m2(char binary_data[], int ecc_mode) -{ - int i, latch; - int bits_total, bits_left, remainder; - int data_codewords, ecc_codewords; - unsigned char data_blocks[6], ecc_blocks[7]; - - latch = 0; - - if(ecc_mode == LEVEL_L) { bits_total = 40; } - if(ecc_mode == LEVEL_M) { bits_total = 32; } - - /* Add terminator */ - bits_left = bits_total - strlen(binary_data); - if(bits_left <= 5) { - for(i = 0; i < bits_left; i++) { - concat(binary_data, "0"); - } - latch = 1; - } else { - concat(binary_data, "00000"); - } +void micro_qr_m2(char binary_data[], int ecc_mode) { + int i, latch; + int bits_total, bits_left, remainder; + int data_codewords, ecc_codewords; + unsigned char data_blocks[6], ecc_blocks[7]; - if(latch == 0) { - /* Complete current byte */ - remainder = 8 - (strlen(binary_data) % 8); - if(remainder == 8) { remainder = 0; } - for(i = 0; i < remainder; i++) { - concat(binary_data, "0"); - } - - /* Add padding */ - bits_left = bits_total - strlen(binary_data); - remainder = bits_left / 8; - for(i = 0; i < remainder; i++) { - concat(binary_data, i & 1 ? "00010001" : "11101100"); - } - } - - if(ecc_mode == LEVEL_L) { data_codewords = 5; ecc_codewords = 5; } - if(ecc_mode == LEVEL_M) { data_codewords = 4; ecc_codewords = 6; } - - /* Copy data into codewords */ - for(i = 0; i < data_codewords; i++) { - data_blocks[i] = 0; - if(binary_data[i * 8] == '1') { data_blocks[i] += 0x80; } - if(binary_data[(i * 8) + 1] == '1') { data_blocks[i] += 0x40; } - if(binary_data[(i * 8) + 2] == '1') { data_blocks[i] += 0x20; } - if(binary_data[(i * 8) + 3] == '1') { data_blocks[i] += 0x10; } - if(binary_data[(i * 8) + 4] == '1') { data_blocks[i] += 0x08; } - if(binary_data[(i * 8) + 5] == '1') { data_blocks[i] += 0x04; } - if(binary_data[(i * 8) + 6] == '1') { data_blocks[i] += 0x02; } - if(binary_data[(i * 8) + 7] == '1') { data_blocks[i] += 0x01; } - } - - /* Calculate Reed-Solomon error codewords */ - rs_init_gf(0x11d); - rs_init_code(ecc_codewords, 0); - rs_encode(data_codewords,data_blocks,ecc_blocks); - rs_free(); - - /* Add Reed-Solomon codewords to binary data */ - for(i = 0; i < ecc_codewords; i++) { - qr_bscan(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80); - } - - return; + latch = 0; + + if (ecc_mode == LEVEL_L) { + bits_total = 40; + } + if (ecc_mode == LEVEL_M) { + bits_total = 32; + } + + /* Add terminator */ + bits_left = bits_total - strlen(binary_data); + if (bits_left <= 5) { + for (i = 0; i < bits_left; i++) { + concat(binary_data, "0"); + } + latch = 1; + } else { + concat(binary_data, "00000"); + } + + if (latch == 0) { + /* Complete current byte */ + remainder = 8 - (strlen(binary_data) % 8); + if (remainder == 8) { + remainder = 0; + } + for (i = 0; i < remainder; i++) { + concat(binary_data, "0"); + } + + /* Add padding */ + bits_left = bits_total - strlen(binary_data); + remainder = bits_left / 8; + for (i = 0; i < remainder; i++) { + concat(binary_data, i & 1 ? "00010001" : "11101100"); + } + } + + if (ecc_mode == LEVEL_L) { + data_codewords = 5; + ecc_codewords = 5; + } + if (ecc_mode == LEVEL_M) { + data_codewords = 4; + ecc_codewords = 6; + } + + /* Copy data into codewords */ + for (i = 0; i < data_codewords; i++) { + data_blocks[i] = 0; + if (binary_data[i * 8] == '1') { + data_blocks[i] += 0x80; + } + if (binary_data[(i * 8) + 1] == '1') { + data_blocks[i] += 0x40; + } + if (binary_data[(i * 8) + 2] == '1') { + data_blocks[i] += 0x20; + } + if (binary_data[(i * 8) + 3] == '1') { + data_blocks[i] += 0x10; + } + if (binary_data[(i * 8) + 4] == '1') { + data_blocks[i] += 0x08; + } + if (binary_data[(i * 8) + 5] == '1') { + data_blocks[i] += 0x04; + } + if (binary_data[(i * 8) + 6] == '1') { + data_blocks[i] += 0x02; + } + if (binary_data[(i * 8) + 7] == '1') { + data_blocks[i] += 0x01; + } + } + + /* Calculate Reed-Solomon error codewords */ + rs_init_gf(0x11d); + rs_init_code(ecc_codewords, 0); + rs_encode(data_codewords, data_blocks, ecc_blocks); + rs_free(); + + /* Add Reed-Solomon codewords to binary data */ + for (i = 0; i < ecc_codewords; i++) { + qr_bscan(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80); + } + + return; } -void micro_qr_m3(char binary_data[], int ecc_mode) -{ - int i, latch; - int bits_total, bits_left, remainder; - int data_codewords, ecc_codewords; - unsigned char data_blocks[12], ecc_blocks[9]; - - latch = 0; - - if(ecc_mode == LEVEL_L) { bits_total = 84; } - if(ecc_mode == LEVEL_M) { bits_total = 68; } - - /* Add terminator */ - bits_left = bits_total - strlen(binary_data); - if(bits_left <= 7) { - for(i = 0; i < bits_left; i++) { - concat(binary_data, "0"); - } - latch = 1; - } else { - concat(binary_data, "0000000"); - } - - if(latch == 0) { - /* Manage last (4-bit) block */ - bits_left = bits_total - strlen(binary_data); - if(bits_left <= 4) { - for(i = 0; i < bits_left; i++) { - concat(binary_data, "0"); - } - latch = 1; - } - } - - if(latch == 0) { - /* Complete current byte */ - remainder = 8 - (strlen(binary_data) % 8); - if(remainder == 8) { remainder = 0; } - for(i = 0; i < remainder; i++) { - concat(binary_data, "0"); - } - - /* Add padding */ - bits_left = bits_total - strlen(binary_data); - if(bits_left > 4) { - remainder = (bits_left - 4) / 8; - for(i = 0; i < remainder; i++) { - concat(binary_data, i & 1 ? "00010001" : "11101100"); - } - } - concat(binary_data, "0000"); - } - - if(ecc_mode == LEVEL_L) { data_codewords = 11; ecc_codewords = 6; } - if(ecc_mode == LEVEL_M) { data_codewords = 9; ecc_codewords = 8; } - - /* Copy data into codewords */ - for(i = 0; i < (data_codewords - 1); i++) { - data_blocks[i] = 0; - if(binary_data[i * 8] == '1') { data_blocks[i] += 0x80; } - if(binary_data[(i * 8) + 1] == '1') { data_blocks[i] += 0x40; } - if(binary_data[(i * 8) + 2] == '1') { data_blocks[i] += 0x20; } - if(binary_data[(i * 8) + 3] == '1') { data_blocks[i] += 0x10; } - if(binary_data[(i * 8) + 4] == '1') { data_blocks[i] += 0x08; } - if(binary_data[(i * 8) + 5] == '1') { data_blocks[i] += 0x04; } - if(binary_data[(i * 8) + 6] == '1') { data_blocks[i] += 0x02; } - if(binary_data[(i * 8) + 7] == '1') { data_blocks[i] += 0x01; } - } - - if(ecc_mode == LEVEL_L) { - data_blocks[10] = 0; - if(binary_data[80] == '1') { data_blocks[10] += 0x08; } - if(binary_data[81] == '1') { data_blocks[10] += 0x04; } - if(binary_data[82] == '1') { data_blocks[10] += 0x02; } - if(binary_data[83] == '1') { data_blocks[10] += 0x01; } - } - - if(ecc_mode == LEVEL_M) { - data_blocks[8] = 0; - if(binary_data[64] == '1') { data_blocks[8] += 0x08; } - if(binary_data[65] == '1') { data_blocks[8] += 0x04; } - if(binary_data[66] == '1') { data_blocks[8] += 0x02; } - if(binary_data[67] == '1') { data_blocks[8] += 0x01; } - } - - /* Calculate Reed-Solomon error codewords */ - rs_init_gf(0x11d); - rs_init_code(ecc_codewords, 0); - rs_encode(data_codewords,data_blocks,ecc_blocks); - rs_free(); - - /* Add Reed-Solomon codewords to binary data */ - for(i = 0; i < ecc_codewords; i++) { - qr_bscan(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80); - } - - return; +void micro_qr_m3(char binary_data[], int ecc_mode) { + int i, latch; + int bits_total, bits_left, remainder; + int data_codewords, ecc_codewords; + unsigned char data_blocks[12], ecc_blocks[9]; + + latch = 0; + + if (ecc_mode == LEVEL_L) { + bits_total = 84; + } + if (ecc_mode == LEVEL_M) { + bits_total = 68; + } + + /* Add terminator */ + bits_left = bits_total - strlen(binary_data); + if (bits_left <= 7) { + for (i = 0; i < bits_left; i++) { + concat(binary_data, "0"); + } + latch = 1; + } else { + concat(binary_data, "0000000"); + } + + if (latch == 0) { + /* Manage last (4-bit) block */ + bits_left = bits_total - strlen(binary_data); + if (bits_left <= 4) { + for (i = 0; i < bits_left; i++) { + concat(binary_data, "0"); + } + latch = 1; + } + } + + if (latch == 0) { + /* Complete current byte */ + remainder = 8 - (strlen(binary_data) % 8); + if (remainder == 8) { + remainder = 0; + } + for (i = 0; i < remainder; i++) { + concat(binary_data, "0"); + } + + /* Add padding */ + bits_left = bits_total - strlen(binary_data); + if (bits_left > 4) { + remainder = (bits_left - 4) / 8; + for (i = 0; i < remainder; i++) { + concat(binary_data, i & 1 ? "00010001" : "11101100"); + } + } + concat(binary_data, "0000"); + } + + if (ecc_mode == LEVEL_L) { + data_codewords = 11; + ecc_codewords = 6; + } + if (ecc_mode == LEVEL_M) { + data_codewords = 9; + ecc_codewords = 8; + } + + /* Copy data into codewords */ + for (i = 0; i < (data_codewords - 1); i++) { + data_blocks[i] = 0; + if (binary_data[i * 8] == '1') { + data_blocks[i] += 0x80; + } + if (binary_data[(i * 8) + 1] == '1') { + data_blocks[i] += 0x40; + } + if (binary_data[(i * 8) + 2] == '1') { + data_blocks[i] += 0x20; + } + if (binary_data[(i * 8) + 3] == '1') { + data_blocks[i] += 0x10; + } + if (binary_data[(i * 8) + 4] == '1') { + data_blocks[i] += 0x08; + } + if (binary_data[(i * 8) + 5] == '1') { + data_blocks[i] += 0x04; + } + if (binary_data[(i * 8) + 6] == '1') { + data_blocks[i] += 0x02; + } + if (binary_data[(i * 8) + 7] == '1') { + data_blocks[i] += 0x01; + } + } + + if (ecc_mode == LEVEL_L) { + data_blocks[10] = 0; + if (binary_data[80] == '1') { + data_blocks[10] += 0x08; + } + if (binary_data[81] == '1') { + data_blocks[10] += 0x04; + } + if (binary_data[82] == '1') { + data_blocks[10] += 0x02; + } + if (binary_data[83] == '1') { + data_blocks[10] += 0x01; + } + } + + if (ecc_mode == LEVEL_M) { + data_blocks[8] = 0; + if (binary_data[64] == '1') { + data_blocks[8] += 0x08; + } + if (binary_data[65] == '1') { + data_blocks[8] += 0x04; + } + if (binary_data[66] == '1') { + data_blocks[8] += 0x02; + } + if (binary_data[67] == '1') { + data_blocks[8] += 0x01; + } + } + + /* Calculate Reed-Solomon error codewords */ + rs_init_gf(0x11d); + rs_init_code(ecc_codewords, 0); + rs_encode(data_codewords, data_blocks, ecc_blocks); + rs_free(); + + /* Add Reed-Solomon codewords to binary data */ + for (i = 0; i < ecc_codewords; i++) { + qr_bscan(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80); + } + + return; } -void micro_qr_m4(char binary_data[], int ecc_mode) -{ - int i, latch; - int bits_total, bits_left, remainder; - int data_codewords, ecc_codewords; - unsigned char data_blocks[17], ecc_blocks[15]; - - latch = 0; - - if(ecc_mode == LEVEL_L) { bits_total = 128; } - if(ecc_mode == LEVEL_M) { bits_total = 112; } - if(ecc_mode == LEVEL_Q) { bits_total = 80; } - - /* Add terminator */ - bits_left = bits_total - strlen(binary_data); - if(bits_left <= 9) { - for(i = 0; i < bits_left; i++) { - concat(binary_data, "0"); - } - latch = 1; - } else { - concat(binary_data, "000000000"); - } - - if(latch == 0) { - /* Complete current byte */ - remainder = 8 - (strlen(binary_data) % 8); - if(remainder == 8) { remainder = 0; } - for(i = 0; i < remainder; i++) { - concat(binary_data, "0"); - } - - /* Add padding */ - bits_left = bits_total - strlen(binary_data); - remainder = bits_left / 8; - for(i = 0; i < remainder; i++) { - concat(binary_data, i & 1 ? "00010001" : "11101100"); - } - } - - if(ecc_mode == LEVEL_L) { data_codewords = 16; ecc_codewords = 8; } - if(ecc_mode == LEVEL_M) { data_codewords = 14; ecc_codewords = 10; } - if(ecc_mode == LEVEL_Q) { data_codewords = 10; ecc_codewords = 14; } - - /* Copy data into codewords */ - for(i = 0; i < data_codewords; i++) { - data_blocks[i] = 0; - if(binary_data[i * 8] == '1') { data_blocks[i] += 0x80; } - if(binary_data[(i * 8) + 1] == '1') { data_blocks[i] += 0x40; } - if(binary_data[(i * 8) + 2] == '1') { data_blocks[i] += 0x20; } - if(binary_data[(i * 8) + 3] == '1') { data_blocks[i] += 0x10; } - if(binary_data[(i * 8) + 4] == '1') { data_blocks[i] += 0x08; } - if(binary_data[(i * 8) + 5] == '1') { data_blocks[i] += 0x04; } - if(binary_data[(i * 8) + 6] == '1') { data_blocks[i] += 0x02; } - if(binary_data[(i * 8) + 7] == '1') { data_blocks[i] += 0x01; } - } - - /* Calculate Reed-Solomon error codewords */ - rs_init_gf(0x11d); - rs_init_code(ecc_codewords, 0); - rs_encode(data_codewords,data_blocks,ecc_blocks); - rs_free(); - - /* Add Reed-Solomon codewords to binary data */ - for(i = 0; i < ecc_codewords; i++) { - qr_bscan(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80); - } +void micro_qr_m4(char binary_data[], int ecc_mode) { + int i, latch; + int bits_total, bits_left, remainder; + int data_codewords, ecc_codewords; + unsigned char data_blocks[17], ecc_blocks[15]; + + latch = 0; + + if (ecc_mode == LEVEL_L) { + bits_total = 128; + } + if (ecc_mode == LEVEL_M) { + bits_total = 112; + } + if (ecc_mode == LEVEL_Q) { + bits_total = 80; + } + + /* Add terminator */ + bits_left = bits_total - strlen(binary_data); + if (bits_left <= 9) { + for (i = 0; i < bits_left; i++) { + concat(binary_data, "0"); + } + latch = 1; + } else { + concat(binary_data, "000000000"); + } + + if (latch == 0) { + /* Complete current byte */ + remainder = 8 - (strlen(binary_data) % 8); + if (remainder == 8) { + remainder = 0; + } + for (i = 0; i < remainder; i++) { + concat(binary_data, "0"); + } + + /* Add padding */ + bits_left = bits_total - strlen(binary_data); + remainder = bits_left / 8; + for (i = 0; i < remainder; i++) { + concat(binary_data, i & 1 ? "00010001" : "11101100"); + } + } + + if (ecc_mode == LEVEL_L) { + data_codewords = 16; + ecc_codewords = 8; + } + if (ecc_mode == LEVEL_M) { + data_codewords = 14; + ecc_codewords = 10; + } + if (ecc_mode == LEVEL_Q) { + data_codewords = 10; + ecc_codewords = 14; + } + + /* Copy data into codewords */ + for (i = 0; i < data_codewords; i++) { + data_blocks[i] = 0; + if (binary_data[i * 8] == '1') { + data_blocks[i] += 0x80; + } + if (binary_data[(i * 8) + 1] == '1') { + data_blocks[i] += 0x40; + } + if (binary_data[(i * 8) + 2] == '1') { + data_blocks[i] += 0x20; + } + if (binary_data[(i * 8) + 3] == '1') { + data_blocks[i] += 0x10; + } + if (binary_data[(i * 8) + 4] == '1') { + data_blocks[i] += 0x08; + } + if (binary_data[(i * 8) + 5] == '1') { + data_blocks[i] += 0x04; + } + if (binary_data[(i * 8) + 6] == '1') { + data_blocks[i] += 0x02; + } + if (binary_data[(i * 8) + 7] == '1') { + data_blocks[i] += 0x01; + } + } + + /* Calculate Reed-Solomon error codewords */ + rs_init_gf(0x11d); + rs_init_code(ecc_codewords, 0); + rs_encode(data_codewords, data_blocks, ecc_blocks); + rs_free(); + + /* Add Reed-Solomon codewords to binary data */ + for (i = 0; i < ecc_codewords; i++) { + qr_bscan(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80); + } } -void micro_setup_grid(unsigned char* grid, int size) -{ - int i, toggle = 1; +void micro_setup_grid(unsigned char* grid, int size) { + int i, toggle = 1; - /* Add timing patterns */ - for(i = 0; i < size; i++) { - if(toggle == 1) { - grid[i] = 0x21; - grid[(i * size)] = 0x21; - toggle = 0; - } else { - grid[i] = 0x20; - grid[(i * size)] = 0x20; - toggle = 1; - } - } - - /* Add finder patterns */ - place_finder(grid, size, 0, 0); - - /* Add separators */ - for(i = 0; i < 7; i++) { - grid[(7 * size) + i] = 0x10; - grid[(i * size) + 7] = 0x10; - } - grid[(7 * size) + 7] = 0x10; - - - /* Reserve space for format information */ - for(i = 0; i < 8; i++) { - grid[(8 * size) + i] += 0x20; - grid[(i * size) + 8] += 0x20; - } - grid[(8 * size) + 8] += 20; + /* Add timing patterns */ + for (i = 0; i < size; i++) { + if (toggle == 1) { + grid[i] = 0x21; + grid[(i * size)] = 0x21; + toggle = 0; + } else { + grid[i] = 0x20; + grid[(i * size)] = 0x20; + toggle = 1; + } + } + + /* Add finder patterns */ + place_finder(grid, size, 0, 0); + + /* Add separators */ + for (i = 0; i < 7; i++) { + grid[(7 * size) + i] = 0x10; + grid[(i * size) + 7] = 0x10; + } + grid[(7 * size) + 7] = 0x10; + + + /* Reserve space for format information */ + for (i = 0; i < 8; i++) { + grid[(8 * size) + i] += 0x20; + grid[(i * size) + 8] += 0x20; + } + grid[(8 * size) + 8] += 20; } -void micro_populate_grid(unsigned char* grid, int size, char full_stream[]) -{ - int direction = 1; /* up */ - int row = 0; /* right hand side */ - - int i, n, x, y; - - n = strlen(full_stream); - y = size - 1; - i = 0; - do { - x = (size - 2) - (row * 2); +void micro_populate_grid(unsigned char* grid, int size, char full_stream[]) { + int direction = 1; /* up */ + int row = 0; /* right hand side */ - if(!(grid[(y * size) + (x + 1)] & 0xf0)) { - if (full_stream[i] == '1') { - grid[(y * size) + (x + 1)] = 0x01; - } else { - grid[(y * size) + (x + 1)] = 0x00; - } - i++; - } - - if(i < n) { - if(!(grid[(y * size) + x] & 0xf0)) { - if (full_stream[i] == '1') { - grid[(y * size) + x] = 0x01; - } else { - grid[(y * size) + x] = 0x00; - } - i++; - } - } - - if(direction) { y--; } else { y++; } - if(y == 0) { - /* reached the top */ - row++; - y = 1; - direction = 0; - } - if(y == size) { - /* reached the bottom */ - row++; - y = size - 1; - direction = 1; - } - } while (i < n); + int i, n, x, y; + + n = strlen(full_stream); + y = size - 1; + i = 0; + do { + x = (size - 2) - (row * 2); + + if (!(grid[(y * size) + (x + 1)] & 0xf0)) { + if (full_stream[i] == '1') { + grid[(y * size) + (x + 1)] = 0x01; + } else { + grid[(y * size) + (x + 1)] = 0x00; + } + i++; + } + + if (i < n) { + if (!(grid[(y * size) + x] & 0xf0)) { + if (full_stream[i] == '1') { + grid[(y * size) + x] = 0x01; + } else { + grid[(y * size) + x] = 0x00; + } + i++; + } + } + + if (direction) { + y--; + } else { + y++; + } + if (y == 0) { + /* reached the top */ + row++; + y = 1; + direction = 0; + } + if (y == size) { + /* reached the bottom */ + row++; + y = size - 1; + direction = 1; + } + } while (i < n); } -int micro_evaluate(unsigned char *grid, int size, int pattern) -{ - int sum1, sum2, i, filter = 0, retval; - - switch(pattern) { - case 0: filter = 0x01; break; - case 1: filter = 0x02; break; - case 2: filter = 0x04; break; - case 3: filter = 0x08; break; - } - - sum1 = 0; - sum2 = 0; - for(i = 1; i < size; i++) { - if(grid[(i * size) + size - 1] & filter) { sum1++; } - if(grid[((size - 1) * size) + i] & filter) { sum2++; } - } - - if(sum1 <= sum2) { retval = (sum1 * 16) + sum2; } else { retval = (sum2 * 16) + sum1; } - - return retval; +int micro_evaluate(unsigned char *grid, int size, int pattern) { + int sum1, sum2, i, filter = 0, retval; + + switch (pattern) { + case 0: filter = 0x01; + break; + case 1: filter = 0x02; + break; + case 2: filter = 0x04; + break; + case 3: filter = 0x08; + break; + } + + sum1 = 0; + sum2 = 0; + for (i = 1; i < size; i++) { + if (grid[(i * size) + size - 1] & filter) { + sum1++; + } + if (grid[((size - 1) * size) + i] & filter) { + sum2++; + } + } + + if (sum1 <= sum2) { + retval = (sum1 * 16) + sum2; + } else { + retval = (sum2 * 16) + sum1; + } + + return retval; } -int micro_apply_bitmask(unsigned char *grid, int size) -{ - int x, y; - unsigned char p; - int pattern, value[8]; - int best_val, best_pattern; - int bit; - +int micro_apply_bitmask(unsigned char *grid, int size) { + int x, y; + unsigned char p; + int pattern, value[8]; + int best_val, best_pattern; + int bit; + #ifndef _MSC_VER - unsigned char mask[size * size]; - unsigned char eval[size * size]; + unsigned char mask[size * size]; + unsigned char eval[size * size]; #else - unsigned char* mask = (unsigned char *)_alloca((size * size) * sizeof(unsigned char)); - unsigned char* eval = (unsigned char *)_alloca((size * size) * sizeof(unsigned char)); + unsigned char* mask = (unsigned char *) _alloca((size * size) * sizeof (unsigned char)); + unsigned char* eval = (unsigned char *) _alloca((size * size) * sizeof (unsigned char)); #endif - /* Perform data masking */ - for(x = 0; x < size; x++) { - for(y = 0; y < size; y++) { - mask[(y * size) + x] = 0x00; - - if (!(grid[(y * size) + x] & 0xf0)) { - if((y & 1) == 0) { - mask[(y * size) + x] += 0x01; - } + /* Perform data masking */ + for (x = 0; x < size; x++) { + for (y = 0; y < size; y++) { + mask[(y * size) + x] = 0x00; - if((((y / 2) + (x / 3)) & 1) == 0) { - mask[(y * size) + x] += 0x02; - } - - if(((((y * x) & 1) + ((y * x) % 3)) & 1) == 0) { - mask[(y * size) + x] += 0x04; - } - - if(((((y + x) & 1) + ((y * x) % 3)) & 1) == 0) { - mask[(y * size) + x] += 0x08; - } - } - } - } - - for(x = 0; x < size; x++) { - for(y = 0; y < size; y++) { - if(grid[(y * size) + x] & 0x01) { p = 0xff; } else { p = 0x00; } - - eval[(y * size) + x] = mask[(y * size) + x] ^ p; - } - } - - - /* Evaluate result */ - for(pattern = 0; pattern < 8; pattern++) { - value[pattern] = micro_evaluate(eval, size, pattern); - } - - best_pattern = 0; - best_val = value[0]; - for(pattern = 1; pattern < 4; pattern++) { - if(value[pattern] > best_val) { - best_pattern = pattern; - best_val = value[pattern]; - } - } - - /* Apply mask */ - for(x = 0; x < size; x++) { - for(y = 0; y < size; y++) { - bit = 0; - switch(best_pattern) { - case 0: if(mask[(y * size) + x] & 0x01) { bit = 1; } break; - case 1: if(mask[(y * size) + x] & 0x02) { bit = 1; } break; - case 2: if(mask[(y * size) + x] & 0x04) { bit = 1; } break; - case 3: if(mask[(y * size) + x] & 0x08) { bit = 1; } break; - } - if(bit == 1) { - if(grid[(y * size) + x] & 0x01) { - grid[(y * size) + x] = 0x00; - } else { - grid[(y * size) + x] = 0x01; - } - } - } - } - - return best_pattern; + if (!(grid[(y * size) + x] & 0xf0)) { + if ((y & 1) == 0) { + mask[(y * size) + x] += 0x01; + } + + if ((((y / 2) + (x / 3)) & 1) == 0) { + mask[(y * size) + x] += 0x02; + } + + if (((((y * x) & 1) + ((y * x) % 3)) & 1) == 0) { + mask[(y * size) + x] += 0x04; + } + + if (((((y + x) & 1) + ((y * x) % 3)) & 1) == 0) { + mask[(y * size) + x] += 0x08; + } + } + } + } + + for (x = 0; x < size; x++) { + for (y = 0; y < size; y++) { + if (grid[(y * size) + x] & 0x01) { + p = 0xff; + } else { + p = 0x00; + } + + eval[(y * size) + x] = mask[(y * size) + x] ^ p; + } + } + + + /* Evaluate result */ + for (pattern = 0; pattern < 8; pattern++) { + value[pattern] = micro_evaluate(eval, size, pattern); + } + + best_pattern = 0; + best_val = value[0]; + for (pattern = 1; pattern < 4; pattern++) { + if (value[pattern] > best_val) { + best_pattern = pattern; + best_val = value[pattern]; + } + } + + /* Apply mask */ + for (x = 0; x < size; x++) { + for (y = 0; y < size; y++) { + bit = 0; + switch (best_pattern) { + case 0: if (mask[(y * size) + x] & 0x01) { + bit = 1; + } + break; + case 1: if (mask[(y * size) + x] & 0x02) { + bit = 1; + } + break; + case 2: if (mask[(y * size) + x] & 0x04) { + bit = 1; + } + break; + case 3: if (mask[(y * size) + x] & 0x08) { + bit = 1; + } + break; + } + if (bit == 1) { + if (grid[(y * size) + x] & 0x01) { + grid[(y * size) + x] = 0x00; + } else { + grid[(y * size) + x] = 0x01; + } + } + } + } + + return best_pattern; } -int microqr(struct zint_symbol *symbol, unsigned char source[], int length) -{ - int i, j, glyph, size; - char binary_stream[200]; - char full_stream[200]; - int utfdata[40]; - int jisdata[40]; - char mode[40]; - int error_number, kanji_used = 0, alphanum_used = 0, byte_used = 0; - int version_valid[4]; - int binary_count[4]; - int ecc_level, autoversion, version; - int n_count, a_count, bitmask, format, format_full; +int microqr(struct zint_symbol *symbol, unsigned char source[], int length) { + int i, j, glyph, size; + char binary_stream[200]; + char full_stream[200]; + int utfdata[40]; + int jisdata[40]; + char mode[40]; + int error_number, kanji_used = 0, alphanum_used = 0, byte_used = 0; + int version_valid[4]; + int binary_count[4]; + int ecc_level, autoversion, version; + int n_count, a_count, bitmask, format, format_full; #ifdef _MSC_VER - unsigned char* grid; + unsigned char* grid; #endif - - if(length > 35) { - strcpy(symbol->errtxt, "Input data too long"); - return ZINT_ERROR_TOO_LONG; - } - - for(i = 0; i < 4; i++) { - version_valid[i] = 1; - } - switch(symbol->input_mode) { - case DATA_MODE: - for(i = 0; i < length; i++) { - jisdata[i] = (int)source[i]; - } - break; - 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 ZINT_ERROR_INVALID_DATA; - } - jisdata[i] = glyph; - } - } - break; - } - - define_mode(mode, jisdata, length, 0); - - n_count = 0; - a_count = 0; - for(i = 0; i < length; i++) { - if((jisdata[i] >= '0') && (jisdata[i] <= '9')) { n_count++; } - if(in_alpha(jisdata[i])) { a_count++; } - } - - if(a_count == length) { - /* All data can be encoded in Alphanumeric mode */ - for(i = 0; i < length; i++) { - mode[i] = 'A'; - } - } - - if(n_count == length) { - /* All data can be encoded in Numeric mode */ - for(i = 0; i < length; i++) { - mode[i] = 'N'; - } - } - - error_number = micro_qr_intermediate(binary_stream, jisdata, mode, length, &kanji_used, &alphanum_used, &byte_used); - if(error_number != 0) { - strcpy(symbol->errtxt, "Input data too long"); - return error_number; - } - - get_bitlength(binary_count, binary_stream); - - /* Eliminate possivle versions depending on type of content */ - if(byte_used) { - version_valid[0] = 0; - version_valid[1] = 0; - } - - if(alphanum_used) { - version_valid[0] = 0; - } - - if(kanji_used) { - version_valid[0] = 0; - version_valid[1] = 0; - } - - /* Eliminate possible versions depending on length of binary data */ - if(binary_count[0] > 20) { version_valid[0] = 0; } - if(binary_count[1] > 40) { version_valid[1] = 0; } - if(binary_count[2] > 84) { version_valid[2] = 0; } - if(binary_count[3] > 128) { - strcpy(symbol->errtxt, "Input data too long"); - return ZINT_ERROR_TOO_LONG; - } - - /* Eliminate possible versions depending on error correction level specified */ - ecc_level = LEVEL_L; - if((symbol->option_1 >= 1) && (symbol->option_2 <= 4)) { - ecc_level = symbol->option_1; - } - - if(ecc_level == LEVEL_H) { - strcpy(symbol->errtxt, "Error correction level H not available"); - return ZINT_ERROR_INVALID_OPTION; - } - - if(ecc_level == LEVEL_Q) { - version_valid[0] = 0; - version_valid[1] = 0; - version_valid[2] = 0; - if(binary_count[3] > 80) { - strcpy(symbol->errtxt, "Input data too long"); - return ZINT_ERROR_TOO_LONG; - } - } - - if(ecc_level == LEVEL_M) { - version_valid[0] = 0; - if(binary_count[1] > 32) { version_valid[1] = 0; } - if(binary_count[2] > 68) { version_valid[2] = 0; } - if(binary_count[3] > 112) { - strcpy(symbol->errtxt, "Input data too long"); - return ZINT_ERROR_TOO_LONG; - } - } - - autoversion = 3; - if(version_valid[2]) { autoversion = 2; } - if(version_valid[1]) { autoversion = 1; } - if(version_valid[0]) { autoversion = 0; } - - version = autoversion; - /* Get version from user */ - if((symbol->option_2 >= 1) && (symbol->option_2 <= 4)) { - if(symbol->option_2 >= autoversion) { - version = symbol->option_2; - } - } - - /* If there is enough unused space then increase the error correction level */ - if(version == 3) { - if(binary_count[3] <= 112) { ecc_level = LEVEL_M; } - if(binary_count[3] <= 80) { ecc_level = LEVEL_Q; } - } - - if(version == 2) { - if(binary_count[2] <= 68) { ecc_level = LEVEL_M; } - } - - if(version == 1) { - if(binary_count[1] <= 32) { ecc_level = LEVEL_M; } - } - - strcpy(full_stream, ""); - microqr_expand_binary(binary_stream, full_stream, version); - - switch(version) { - case 0: micro_qr_m1(full_stream); break; - case 1: micro_qr_m2(full_stream, ecc_level); break; - case 2: micro_qr_m3(full_stream, ecc_level); break; - case 3: micro_qr_m4(full_stream, ecc_level); break; - } - - size = micro_qr_sizes[version]; + if (length > 35) { + strcpy(symbol->errtxt, "Input data too long"); + return ZINT_ERROR_TOO_LONG; + } + + for (i = 0; i < 4; i++) { + version_valid[i] = 1; + } + + switch (symbol->input_mode) { + case DATA_MODE: + for (i = 0; i < length; i++) { + jisdata[i] = (int) source[i]; + } + break; + 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 ZINT_ERROR_INVALID_DATA; + } + jisdata[i] = glyph; + } + } + break; + } + + define_mode(mode, jisdata, length, 0); + + n_count = 0; + a_count = 0; + for (i = 0; i < length; i++) { + if ((jisdata[i] >= '0') && (jisdata[i] <= '9')) { + n_count++; + } + if (in_alpha(jisdata[i])) { + a_count++; + } + } + + if (a_count == length) { + /* All data can be encoded in Alphanumeric mode */ + for (i = 0; i < length; i++) { + mode[i] = 'A'; + } + } + + if (n_count == length) { + /* All data can be encoded in Numeric mode */ + for (i = 0; i < length; i++) { + mode[i] = 'N'; + } + } + + error_number = micro_qr_intermediate(binary_stream, jisdata, mode, length, &kanji_used, &alphanum_used, &byte_used); + if (error_number != 0) { + strcpy(symbol->errtxt, "Input data too long"); + return error_number; + } + + get_bitlength(binary_count, binary_stream); + + /* Eliminate possivle versions depending on type of content */ + if (byte_used) { + version_valid[0] = 0; + version_valid[1] = 0; + } + + if (alphanum_used) { + version_valid[0] = 0; + } + + if (kanji_used) { + version_valid[0] = 0; + version_valid[1] = 0; + } + + /* Eliminate possible versions depending on length of binary data */ + if (binary_count[0] > 20) { + version_valid[0] = 0; + } + if (binary_count[1] > 40) { + version_valid[1] = 0; + } + if (binary_count[2] > 84) { + version_valid[2] = 0; + } + if (binary_count[3] > 128) { + strcpy(symbol->errtxt, "Input data too long"); + return ZINT_ERROR_TOO_LONG; + } + + /* Eliminate possible versions depending on error correction level specified */ + ecc_level = LEVEL_L; + if ((symbol->option_1 >= 1) && (symbol->option_2 <= 4)) { + ecc_level = symbol->option_1; + } + + if (ecc_level == LEVEL_H) { + strcpy(symbol->errtxt, "Error correction level H not available"); + return ZINT_ERROR_INVALID_OPTION; + } + + if (ecc_level == LEVEL_Q) { + version_valid[0] = 0; + version_valid[1] = 0; + version_valid[2] = 0; + if (binary_count[3] > 80) { + strcpy(symbol->errtxt, "Input data too long"); + return ZINT_ERROR_TOO_LONG; + } + } + + if (ecc_level == LEVEL_M) { + version_valid[0] = 0; + if (binary_count[1] > 32) { + version_valid[1] = 0; + } + if (binary_count[2] > 68) { + version_valid[2] = 0; + } + if (binary_count[3] > 112) { + strcpy(symbol->errtxt, "Input data too long"); + return ZINT_ERROR_TOO_LONG; + } + } + + autoversion = 3; + if (version_valid[2]) { + autoversion = 2; + } + if (version_valid[1]) { + autoversion = 1; + } + if (version_valid[0]) { + autoversion = 0; + } + + version = autoversion; + /* Get version from user */ + if ((symbol->option_2 >= 1) && (symbol->option_2 <= 4)) { + if (symbol->option_2 >= autoversion) { + version = symbol->option_2; + } + } + + /* If there is enough unused space then increase the error correction level */ + if (version == 3) { + if (binary_count[3] <= 112) { + ecc_level = LEVEL_M; + } + if (binary_count[3] <= 80) { + ecc_level = LEVEL_Q; + } + } + + if (version == 2) { + if (binary_count[2] <= 68) { + ecc_level = LEVEL_M; + } + } + + if (version == 1) { + if (binary_count[1] <= 32) { + ecc_level = LEVEL_M; + } + } + + strcpy(full_stream, ""); + microqr_expand_binary(binary_stream, full_stream, version); + + switch (version) { + case 0: micro_qr_m1(full_stream); + break; + case 1: micro_qr_m2(full_stream, ecc_level); + break; + case 2: micro_qr_m3(full_stream, ecc_level); + break; + case 3: micro_qr_m4(full_stream, ecc_level); + break; + } + + size = micro_qr_sizes[version]; #ifndef _MSC_VER - unsigned char grid[size * size]; + unsigned char grid[size * size]; #else - grid = (unsigned char *)_alloca((size * size) * sizeof(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; - } - } - - micro_setup_grid(grid, size); - micro_populate_grid(grid, size, full_stream); - bitmask = micro_apply_bitmask(grid, size); - - /* Add format data */ - format = 0; - switch(version) { - case 1: switch(ecc_level) { - case 1: format = 1; break; - case 2: format = 2; break; - } - break; - case 2: switch(ecc_level) { - case 1: format = 3; break; - case 2: format = 4; break; - } - break; - case 3: switch(ecc_level) { - case 1: format = 5; break; - case 2: format = 6; break; - case 3: format = 7; break; - } - break; - } - - format_full = qr_annex_c1[(format << 2) + bitmask]; - - if(format_full & 0x4000) { grid[(8 * size) + 1] += 0x01; } - if(format_full & 0x2000) { grid[(8 * size) + 2] += 0x01; } - if(format_full & 0x1000) { grid[(8 * size) + 3] += 0x01; } - if(format_full & 0x800) { grid[(8 * size) + 4] += 0x01; } - if(format_full & 0x400) { grid[(8 * size) + 5] += 0x01; } - if(format_full & 0x200) { grid[(8 * size) + 6] += 0x01; } - if(format_full & 0x100) { grid[(8 * size) + 7] += 0x01; } - if(format_full & 0x80) { grid[(8 * size) + 8] += 0x01; } - if(format_full & 0x40) { grid[(7 * size) + 8] += 0x01; } - if(format_full & 0x20) { grid[(6 * size) + 8] += 0x01; } - if(format_full & 0x10) { grid[(5 * size) + 8] += 0x01; } - if(format_full & 0x08) { grid[(4 * size) + 8] += 0x01; } - if(format_full & 0x04) { grid[(3 * size) + 8] += 0x01; } - if(format_full & 0x02) { grid[(2 * size) + 8] += 0x01; } - if(format_full & 0x01) { grid[(1 * size) + 8] += 0x01; } - - 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; - } - - return 0; + + for (i = 0; i < size; i++) { + for (j = 0; j < size; j++) { + grid[(i * size) + j] = 0; + } + } + + micro_setup_grid(grid, size); + micro_populate_grid(grid, size, full_stream); + bitmask = micro_apply_bitmask(grid, size); + + /* Add format data */ + format = 0; + switch (version) { + case 1: switch (ecc_level) { + case 1: format = 1; + break; + case 2: format = 2; + break; + } + break; + case 2: switch (ecc_level) { + case 1: format = 3; + break; + case 2: format = 4; + break; + } + break; + case 3: switch (ecc_level) { + case 1: format = 5; + break; + case 2: format = 6; + break; + case 3: format = 7; + break; + } + break; + } + + format_full = qr_annex_c1[(format << 2) + bitmask]; + + if (format_full & 0x4000) { + grid[(8 * size) + 1] += 0x01; + } + if (format_full & 0x2000) { + grid[(8 * size) + 2] += 0x01; + } + if (format_full & 0x1000) { + grid[(8 * size) + 3] += 0x01; + } + if (format_full & 0x800) { + grid[(8 * size) + 4] += 0x01; + } + if (format_full & 0x400) { + grid[(8 * size) + 5] += 0x01; + } + if (format_full & 0x200) { + grid[(8 * size) + 6] += 0x01; + } + if (format_full & 0x100) { + grid[(8 * size) + 7] += 0x01; + } + if (format_full & 0x80) { + grid[(8 * size) + 8] += 0x01; + } + if (format_full & 0x40) { + grid[(7 * size) + 8] += 0x01; + } + if (format_full & 0x20) { + grid[(6 * size) + 8] += 0x01; + } + if (format_full & 0x10) { + grid[(5 * size) + 8] += 0x01; + } + if (format_full & 0x08) { + grid[(4 * size) + 8] += 0x01; + } + if (format_full & 0x04) { + grid[(3 * size) + 8] += 0x01; + } + if (format_full & 0x02) { + grid[(2 * size) + 8] += 0x01; + } + if (format_full & 0x01) { + grid[(1 * size) + 8] += 0x01; + } + + 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; + } + + return 0; } diff --git a/backend/qr.h b/backend/qr.h index 2eed4959..3f911a67 100644 --- a/backend/qr.h +++ b/backend/qr.h @@ -2,21 +2,21 @@ /* libzint - the open source barcode library - Copyright (C) 2008 Robin Stuart + Copyright (C) 2008-2016 Robin Stuart Copyright (C) 2006 Kentaro Fukuchi Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + documentation and/or other materials provided with the distribution. 3. Neither the name of the project nor the names of its contributors may be used to endorse or promote products derived from this software - without specific prior written permission. + without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -27,9 +27,9 @@ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ #define LEVEL_L 1 #define LEVEL_M 2 @@ -40,128 +40,128 @@ /* 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 }; static int micro_qr_sizes[] = { - 11, 13, 15, 17 + 11, 13, 15, 17 }; static int qr_align_loopsize[] = { - 0, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 + 0, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 }; static int qr_table_e1[] = { - 6, 18, 0, 0, 0, 0, 0, - 6, 22, 0, 0, 0, 0, 0, - 6, 26, 0, 0, 0, 0, 0, - 6, 30, 0, 0, 0, 0, 0, - 6, 34, 0, 0, 0, 0, 0, - 6, 22, 38, 0, 0, 0, 0, - 6, 24, 42, 0, 0, 0, 0, - 6, 26, 46, 0, 0, 0, 0, - 6, 28, 50, 0, 0, 0, 0, - 6, 30, 54, 0, 0, 0, 0, - 6, 32, 58, 0, 0, 0, 0, - 6, 34, 62, 0, 0, 0, 0, - 6, 26, 46, 66, 0, 0, 0, - 6, 26, 48, 70, 0, 0, 0, - 6, 26, 50, 74, 0, 0, 0, - 6, 30, 54, 78, 0, 0, 0, - 6, 30, 56, 82, 0, 0, 0, - 6, 30, 58, 86, 0, 0, 0, - 6, 34, 62, 90, 0, 0, 0, - 6, 28, 50, 72, 94, 0, 0, - 6, 26, 50, 74, 98, 0, 0, - 6, 30, 54, 78, 102, 0, 0, - 6, 28, 54, 80, 106, 0, 0, - 6, 32, 58, 84, 110, 0, 0, - 6, 30, 58, 86, 114, 0, 0, - 6, 34, 62, 90, 118, 0, 0, - 6, 26, 50, 74, 98, 122, 0, - 6, 30, 54, 78, 102, 126, 0, - 6, 26, 52, 78, 104, 130, 0, - 6, 30, 56, 82, 108, 134, 0, - 6, 34, 60, 86, 112, 138, 0, - 6, 30, 58, 86, 114, 142, 0, - 6, 34, 62, 90, 118, 146, 0, - 6, 30, 54, 78, 102, 126, 150, - 6, 24, 50, 76, 102, 128, 154, - 6, 28, 54, 80, 106, 132, 158, - 6, 32, 58, 84, 110, 136, 162, - 6, 26, 54, 82, 110, 138, 166, - 6, 30, 58, 86, 114, 142, 170 + 6, 18, 0, 0, 0, 0, 0, + 6, 22, 0, 0, 0, 0, 0, + 6, 26, 0, 0, 0, 0, 0, + 6, 30, 0, 0, 0, 0, 0, + 6, 34, 0, 0, 0, 0, 0, + 6, 22, 38, 0, 0, 0, 0, + 6, 24, 42, 0, 0, 0, 0, + 6, 26, 46, 0, 0, 0, 0, + 6, 28, 50, 0, 0, 0, 0, + 6, 30, 54, 0, 0, 0, 0, + 6, 32, 58, 0, 0, 0, 0, + 6, 34, 62, 0, 0, 0, 0, + 6, 26, 46, 66, 0, 0, 0, + 6, 26, 48, 70, 0, 0, 0, + 6, 26, 50, 74, 0, 0, 0, + 6, 30, 54, 78, 0, 0, 0, + 6, 30, 56, 82, 0, 0, 0, + 6, 30, 58, 86, 0, 0, 0, + 6, 34, 62, 90, 0, 0, 0, + 6, 28, 50, 72, 94, 0, 0, + 6, 26, 50, 74, 98, 0, 0, + 6, 30, 54, 78, 102, 0, 0, + 6, 28, 54, 80, 106, 0, 0, + 6, 32, 58, 84, 110, 0, 0, + 6, 30, 58, 86, 114, 0, 0, + 6, 34, 62, 90, 118, 0, 0, + 6, 26, 50, 74, 98, 122, 0, + 6, 30, 54, 78, 102, 126, 0, + 6, 26, 52, 78, 104, 130, 0, + 6, 30, 56, 82, 108, 134, 0, + 6, 34, 60, 86, 112, 138, 0, + 6, 30, 58, 86, 114, 142, 0, + 6, 34, 62, 90, 118, 146, 0, + 6, 30, 54, 78, 102, 126, 150, + 6, 24, 50, 76, 102, 128, 154, + 6, 28, 54, 80, 106, 132, 158, + 6, 32, 58, 84, 110, 136, 162, + 6, 26, 54, 82, 110, 138, 166, + 6, 30, 58, 86, 114, 142, 170 }; static unsigned int qr_annex_c[] = { - /* Format information bit sequences */ - 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0, 0x77c4, 0x72f3, 0x7daa, 0x789d, - 0x662f, 0x6318, 0x6c41, 0x6976, 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b, - 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed + /* Format information bit sequences */ + 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0, 0x77c4, 0x72f3, 0x7daa, 0x789d, + 0x662f, 0x6318, 0x6c41, 0x6976, 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b, + 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed }; static long int qr_annex_d[] = { - /* Version information bit sequences */ - 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, 0x0f928, 0x10b78, - 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, 0x177ec, 0x18ec4, 0x191e1, 0x1afab, - 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, - 0x2542e, 0x26a64, 0x27541, 0x28c69 + /* Version information bit sequences */ + 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, 0x0f928, 0x10b78, + 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, 0x177ec, 0x18ec4, 0x191e1, 0x1afab, + 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, + 0x2542e, 0x26a64, 0x27541, 0x28c69 }; static int qr_annex_c1[] = { - /* Micro QR Code format information */ - 0x4445, 0x4172, 0x4e2b, 0x4b1c, 0x55ae, 0x5099, 0x5fc0, 0x5af7, 0x6793, 0x62a4, 0x6dfd, 0x68ca, 0x7678, 0x734f, - 0x7c16, 0x7921, 0x06de, 0x03e9, 0x0cb0, 0x0987, 0x1735, 0x1202, 0x1d5b, 0x186c, 0x2508, 0x203f, 0x2f66, 0x2a51, 0x34e3, - 0x31d4, 0x3e8d, 0x3bba + /* Micro QR Code format information */ + 0x4445, 0x4172, 0x4e2b, 0x4b1c, 0x55ae, 0x5099, 0x5fc0, 0x5af7, 0x6793, 0x62a4, 0x6dfd, 0x68ca, 0x7678, 0x734f, + 0x7c16, 0x7921, 0x06de, 0x03e9, 0x0cb0, 0x0987, 0x1735, 0x1202, 0x1d5b, 0x186c, 0x2508, 0x203f, 0x2f66, 0x2a51, 0x34e3, + 0x31d4, 0x3e8d, 0x3bba }; \ No newline at end of file diff --git a/backend/reedsol.c b/backend/reedsol.c index 211c6fbb..fdac476a 100644 --- a/backend/reedsol.c +++ b/backend/reedsol.c @@ -27,7 +27,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ // It is not written with high efficiency in mind, so is probably // not suitable for real-time encoding. The aim was to keep it @@ -52,8 +52,8 @@ #include // only needed for malloc/free #include "reedsol.h" static int gfpoly; -static int symsize; // in bits -static int logmod; // 2**symsize - 1 +static int symsize; // in bits +static int logmod; // 2**symsize - 1 static int rlen; static int *logt = NULL, *alog = NULL, *rspoly = NULL; @@ -68,30 +68,29 @@ static int *logt = NULL, *alog = NULL, *rspoly = NULL; // polynomial. e.g. for ECC200 (8-bit symbols) the polynomial is // a**8 + a**5 + a**3 + a**2 + 1, which translates to 0x12d. -void rs_init_gf(int poly) -{ - int m, b, p, v; +void rs_init_gf(int poly) { + int m, b, p, v; - // Find the top bit, and hence the symbol size - for (b = 1, m = 0; b <= poly; b <<= 1) - m++; - b >>= 1; - m--; - gfpoly = poly; - symsize = m; + // Find the top bit, and hence the symbol size + for (b = 1, m = 0; b <= poly; b <<= 1) + m++; + b >>= 1; + m--; + gfpoly = poly; + symsize = m; - // Calculate the log/alog tables - logmod = (1 << m) - 1; - logt = (int *)malloc(sizeof(int) * (logmod + 1)); - alog = (int *)malloc(sizeof(int) * logmod); + // Calculate the log/alog tables + logmod = (1 << m) - 1; + logt = (int *) malloc(sizeof (int) * (logmod + 1)); + alog = (int *) malloc(sizeof (int) * logmod); - for (p = 1, v = 0; v < logmod; v++) { - alog[v] = p; - logt[p] = v; - p <<= 1; - if (p & b) - p ^= poly; - } + for (p = 1, v = 0; v < logmod; v++) { + alog[v] = p; + logt[p] = v; + p <<= 1; + if (p & b) + p ^= poly; + } } // rs_init_code(nsym, index) initialises the Reed-Solomon encoder @@ -101,71 +100,69 @@ void rs_init_gf(int poly) // (x + 2**i)*(x + 2**(i+1))*... [nsym terms] // For ECC200, index is 1. -void rs_init_code(int nsym, int index) -{ - int i, k; +void rs_init_code(int nsym, int index) { + int i, k; - rspoly = (int *)malloc(sizeof(int) * (nsym + 1)); + rspoly = (int *) malloc(sizeof (int) * (nsym + 1)); - rlen = nsym; + rlen = nsym; - rspoly[0] = 1; - for (i = 1; i <= nsym; i++) { - rspoly[i] = 1; - for (k = i - 1; k > 0; k--) { - if (rspoly[k]) - rspoly[k] = alog[(logt[rspoly[k]] + index) % logmod]; - rspoly[k] ^= rspoly[k - 1]; - } - rspoly[0] = alog[(logt[rspoly[0]] + index) % logmod]; - index++; - } + rspoly[0] = 1; + for (i = 1; i <= nsym; i++) { + rspoly[i] = 1; + for (k = i - 1; k > 0; k--) { + if (rspoly[k]) + rspoly[k] = alog[(logt[rspoly[k]] + index) % logmod]; + rspoly[k] ^= rspoly[k - 1]; + } + rspoly[0] = alog[(logt[rspoly[0]] + index) % logmod]; + index++; + } } -void rs_encode(int len, unsigned char *data, unsigned char *res) -{ - int i, k, m; - for (i = 0; i < rlen; i++) - res[i] = 0; - for (i = 0; i < len; i++) { - m = res[rlen - 1] ^ data[i]; - for (k = rlen - 1; k > 0; k--) { - if (m && rspoly[k]) - res[k] = res[k - 1] ^ alog[(logt[m] + logt[rspoly[k]]) % logmod]; - else - res[k] = res[k - 1]; - } - if (m && rspoly[0]) - res[0] = alog[(logt[m] + logt[rspoly[0]]) % logmod]; - else - res[0] = 0; - } +void rs_encode(int len, unsigned char *data, unsigned char *res) { + int i, k, m; + for (i = 0; i < rlen; i++) + res[i] = 0; + for (i = 0; i < len; i++) { + m = res[rlen - 1] ^ data[i]; + for (k = rlen - 1; k > 0; k--) { + if (m && rspoly[k]) + res[k] = res[k - 1] ^ alog[(logt[m] + logt[rspoly[k]]) % logmod]; + else + res[k] = res[k - 1]; + } + if (m && rspoly[0]) + res[0] = alog[(logt[m] + logt[rspoly[0]]) % logmod]; + else + res[0] = 0; + } } -void rs_encode_long(int len, unsigned int *data, unsigned int *res) -{ /* The same as above but for larger bitlengths - Aztec code compatible */ - int i, k, m; - for (i = 0; i < rlen; i++) - res[i] = 0; - for (i = 0; i < len; i++) { - m = res[rlen - 1] ^ data[i]; - for (k = rlen - 1; k > 0; k--) { - if (m && rspoly[k]) - res[k] = res[k - 1] ^ alog[(logt[m] + logt[rspoly[k]]) % logmod]; - else - res[k] = res[k - 1]; - } - if (m && rspoly[0]) - res[0] = alog[(logt[m] + logt[rspoly[0]]) % logmod]; - else - res[0] = 0; - } +/* The same as above but for larger bitlengths - Aztec code compatible */ +void rs_encode_long(int len, unsigned int *data, unsigned int *res) { + int i, k, m; + for (i = 0; i < rlen; i++) + res[i] = 0; + for (i = 0; i < len; i++) { + m = res[rlen - 1] ^ data[i]; + for (k = rlen - 1; k > 0; k--) { + if (m && rspoly[k]) + res[k] = res[k - 1] ^ alog[(logt[m] + logt[rspoly[k]]) % logmod]; + else + res[k] = res[k - 1]; + } + if (m && rspoly[0]) + res[0] = alog[(logt[m] + logt[rspoly[0]]) % logmod]; + else + res[0] = 0; + } } -void rs_free(void) -{ /* Free memory */ - free(logt); - free(alog); - free(rspoly); - rspoly = NULL; +/* Free memory */ +void rs_free(void) { + free(logt); + free(alog); + free(rspoly); + rspoly = NULL; } diff --git a/backend/reedsol.h b/backend/reedsol.h index 4720c03e..9afeee99 100644 --- a/backend/reedsol.h +++ b/backend/reedsol.h @@ -34,15 +34,14 @@ #define __REEDSOL_H #ifdef __cplusplus -extern "C" -{ +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); + 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 } diff --git a/backend/render.c b/backend/render.c index c7434b0d..591e9761 100644 --- a/backend/render.c +++ b/backend/render.c @@ -8,7 +8,7 @@ /* libzint - the open source barcode library - Copyright (C) 2009 Robin Stuart + Copyright (C) 2009-2016 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -34,7 +34,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ #include #include @@ -56,703 +56,695 @@ int render_plot_add_hexagon(struct zint_symbol *symbol, struct zint_render_hexag int render_plot_add_string(struct zint_symbol *symbol, unsigned char *text, float x, float y, float fsize, float width, struct zint_render_string **last_string); -int render_plot(struct zint_symbol *symbol, float width, float height) -{ - struct zint_render *render; - struct zint_render_line *line, *last_line = NULL; - struct zint_render_string *last_string = NULL; - struct zint_render_ring *ring, *last_ring = NULL; - struct zint_render_hexagon *hexagon, *last_hexagon = NULL; +int render_plot(struct zint_symbol *symbol, float width, float height) { + struct zint_render *render; + struct zint_render_line *line, *last_line = NULL; + struct zint_render_string *last_string = NULL; + struct zint_render_ring *ring, *last_ring = NULL; + struct zint_render_hexagon *hexagon, *last_hexagon = NULL; - int i, r, block_width, latch, this_row; - float textpos, textwidth, large_bar_height, preset_height, row_height, row_posn = 0.0; - // int error_number = 0; - int text_offset, text_height, xoffset, yoffset, textdone, main_symbol_width_x, addon_width_x; - char addon[6], textpart[10]; - int large_bar_count, symbol_lead_in, total_symbol_width_x, total_area_width_x; - float addon_text_posn; - float default_text_posn; - float scaler; - const char *locale = NULL; - int hide_text = 0; - float required_aspect; - float symbol_aspect = 1; - float x_dimension; - int upceanflag = 0; + int i, r, block_width, latch, this_row; + float textpos, textwidth, large_bar_height, preset_height, row_height, row_posn = 0.0; + // int error_number = 0; + int text_offset, text_height, xoffset, yoffset, textdone, main_symbol_width_x, addon_width_x; + char addon[6], textpart[10]; + int large_bar_count, symbol_lead_in, total_symbol_width_x, total_area_width_x; + float addon_text_posn; + float default_text_posn; + float scaler; + const char *locale = NULL; + int hide_text = 0; + float required_aspect; + float symbol_aspect = 1; + float x_dimension; + int upceanflag = 0; - // Allocate memory for the rendered version - render = symbol->rendered = (struct zint_render *) malloc(sizeof(struct zint_render)); - render->lines = NULL; - render->strings = NULL; - render->rings = NULL; - render->hexagons = NULL; + // Allocate memory for the rendered version + render = symbol->rendered = (struct zint_render *) malloc(sizeof (struct zint_render)); + render->lines = NULL; + render->strings = NULL; + render->rings = NULL; + render->hexagons = NULL; - locale = setlocale(LC_ALL, "C"); + locale = setlocale(LC_ALL, "C"); - row_height = 0; - textdone = 0; - textpos = 0.0; - main_symbol_width_x = symbol->width; - strcpy(addon, ""); - symbol_lead_in = 0; - addon_text_posn = 0.0; - addon_width_x = 0; - - /* - * Determine if there will be any addon texts and text height - */ - latch = 0; - r = 0; - /* Isolate add-on text */ - if(is_extendable(symbol->symbology)) { - for(i = 0; i < ustrlen(symbol->text); i++) { - if (latch == 1) { - addon[r] = symbol->text[i]; - r++; - } - if (symbol->text[i] == '+') { - latch = 1; - } - } - } - addon[r] = '\0'; - - if((!symbol->show_hrt) || (ustrlen(symbol->text) == 0)) { - hide_text = 1; - text_height = text_offset = 0.0; - } else { - text_height = 9.0; - text_offset = 2.0; - } + row_height = 0; + textdone = 0; + textpos = 0.0; + main_symbol_width_x = symbol->width; + strcpy(addon, ""); + symbol_lead_in = 0; + addon_text_posn = 0.0; + addon_width_x = 0; + + /* + * Determine if there will be any addon texts and text height + */ + latch = 0; + r = 0; + /* Isolate add-on text */ + if (is_extendable(symbol->symbology)) { + for (i = 0; i < ustrlen(symbol->text); i++) { + if (latch == 1) { + addon[r] = symbol->text[i]; + r++; + } + if (symbol->text[i] == '+') { + latch = 1; + } + } + } + addon[r] = '\0'; + + if ((!symbol->show_hrt) || (ustrlen(symbol->text) == 0)) { + hide_text = 1; + text_height = text_offset = 0.0; + } else { + text_height = 9.0; + text_offset = 2.0; + } - /* - * Calculate the width of the barcode, especially if there are any extra - * borders or white space to add. - */ - - while(!(module_is_set(symbol, symbol->rows - 1, symbol_lead_in))) { - symbol_lead_in++; - } + /* + * Calculate the width of the barcode, especially if there are any extra + * borders or white space to add. + */ - /* Certain symbols need whitespace otherwise characters get chopped off the sides */ - if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC)) - || (symbol->symbology == BARCODE_ISBNX)) { - switch(ustrlen(symbol->text)) { - case 13: /* EAN 13 */ - case 16: - case 19: - if(symbol->whitespace_width == 0) { - symbol->whitespace_width = 10; - } - main_symbol_width_x = 96 + symbol_lead_in; - upceanflag = 13; - break; - case 2: - main_symbol_width_x = 22 + symbol_lead_in; - upceanflag = 2; - break; - case 5: - main_symbol_width_x = 49 + symbol_lead_in; - upceanflag = 5; - break; - default: - main_symbol_width_x = 68 + symbol_lead_in; - upceanflag = 8; - } - switch(ustrlen(symbol->text)) { - case 11: - case 16: - /* EAN-2 add-on */ - addon_width_x = 31; - break; - case 14: - case 19: - /* EAN-5 add-on */ - addon_width_x = 58; - break; - } - } + while (!(module_is_set(symbol, symbol->rows - 1, symbol_lead_in))) { + symbol_lead_in++; + } - if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) { - upceanflag = 12; - if(symbol->whitespace_width < 10) { - symbol->whitespace_width = 10; - main_symbol_width_x = 96 + symbol_lead_in; - } - switch(ustrlen(symbol->text)) { - case 15: - /* EAN-2 add-on */ - addon_width_x = 31; - break; - case 18: - /* EAN-5 add-on */ - addon_width_x = 58; - break; - } - } - - if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) { - upceanflag = 6; - if(symbol->whitespace_width == 0) { - symbol->whitespace_width = 10; - main_symbol_width_x = 51 + symbol_lead_in; - } - switch(ustrlen(symbol->text)) { - case 11: - /* EAN-2 add-on */ - addon_width_x = 31; - break; - case 14: - /* EAN-5 add-on */ - addon_width_x = 58; - break; - } - } - - total_symbol_width_x = main_symbol_width_x + addon_width_x; - total_area_width_x = total_symbol_width_x + (2 * (symbol->border_width + symbol->whitespace_width)); + /* Certain symbols need whitespace otherwise characters get chopped off the sides */ + if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC)) + || (symbol->symbology == BARCODE_ISBNX)) { + switch (ustrlen(symbol->text)) { + case 13: /* EAN 13 */ + case 16: + case 19: + if (symbol->whitespace_width == 0) { + symbol->whitespace_width = 10; + } + main_symbol_width_x = 96 + symbol_lead_in; + upceanflag = 13; + break; + case 2: + main_symbol_width_x = 22 + symbol_lead_in; + upceanflag = 2; + break; + case 5: + main_symbol_width_x = 49 + symbol_lead_in; + upceanflag = 5; + break; + default: + main_symbol_width_x = 68 + symbol_lead_in; + upceanflag = 8; + } + switch (ustrlen(symbol->text)) { + case 11: + case 16: + /* EAN-2 add-on */ + addon_width_x = 31; + break; + case 14: + case 19: + /* EAN-5 add-on */ + addon_width_x = 58; + break; + } + } - xoffset = symbol->border_width + symbol->whitespace_width; - yoffset = symbol->border_width; + if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) { + upceanflag = 12; + if (symbol->whitespace_width < 10) { + symbol->whitespace_width = 10; + main_symbol_width_x = 96 + symbol_lead_in; + } + switch (ustrlen(symbol->text)) { + case 15: + /* EAN-2 add-on */ + addon_width_x = 31; + break; + case 18: + /* EAN-5 add-on */ + addon_width_x = 58; + break; + } + } - // Determine if height should be overridden - large_bar_count = 0; - preset_height = 0.0; - for(i = 0; i < symbol->rows; i++) { - preset_height += symbol->row_height[i]; - if(symbol->row_height[i] == 0) { - large_bar_count++; - } - } + if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) { + upceanflag = 6; + if (symbol->whitespace_width == 0) { + symbol->whitespace_width = 10; + main_symbol_width_x = 51 + symbol_lead_in; + } + switch (ustrlen(symbol->text)) { + case 11: + /* EAN-2 add-on */ + addon_width_x = 31; + break; + case 14: + /* EAN-5 add-on */ + addon_width_x = 58; + break; + } + } - if (large_bar_count == 0) { - required_aspect = width / height; - symbol_aspect = (total_symbol_width_x + (2 * xoffset)) / (preset_height + (2 * yoffset) + text_offset + text_height); - symbol->height = preset_height; - if (required_aspect > symbol_aspect) { - /* the area is too wide */ - scaler = height / (preset_height + (2 * yoffset) + text_offset + text_height); - render->width = symbol_aspect * height; - render->height = height; - } else { - /* the area is too high */ - scaler = width / (total_symbol_width_x + (2 * xoffset)); - render->width = width; - render->height = width / symbol_aspect; - } - } else { - scaler = width / (total_symbol_width_x + (2 * xoffset)); - symbol->height = (height / scaler) - ((2 * yoffset) + text_offset + text_height); - - render->width = width; - render->height = height; - } - large_bar_height = (symbol->height - preset_height) / large_bar_count; + total_symbol_width_x = main_symbol_width_x + addon_width_x; + total_area_width_x = total_symbol_width_x + (2 * (symbol->border_width + symbol->whitespace_width)); - if(((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { - default_text_posn = (symbol->height + text_offset + symbol->border_width + symbol->border_width) * scaler; - } else { - default_text_posn = (symbol->height + text_offset + symbol->border_width) * scaler; - } + xoffset = symbol->border_width + symbol->whitespace_width; + yoffset = symbol->border_width; - x_dimension = render->width / total_area_width_x; - x_dimension /= GL_CONST; - - /* Set minimum size of symbol */ - /* Barcode must be at least 2mm high by 2mm across */ - if(render->height < ((x_dimension * ((2 * symbol->border_width) + text_offset + text_height)) + 2.0) * GL_CONST) { - render->height = ((x_dimension * ((2 * symbol->border_width) + text_offset + text_height)) + 2.0) * GL_CONST; - } - if(render->width < (2.0 * GL_CONST)) { - render->width = (2.0 * GL_CONST); - } - - if(symbol->symbology == BARCODE_CODABAR) { - /* The minimum X-dimension of Codabar is 0.191mm. The minimum bar height is 5mm */ - if(x_dimension < 0.191) { - render->width = 0.191 * GL_CONST * total_area_width_x; - } - if(render->height < ((x_dimension * ((2 * symbol->border_width) + text_offset + text_height)) + 5.0) * GL_CONST) { - render->height = ((x_dimension * ((2 * symbol->border_width) + text_offset + text_height)) + 5.0) * GL_CONST; - } - } - - if(symbol->symbology == BARCODE_CODE49) { - /* The minimum X-dimension of Code 49 is 0.191mm */ - if(x_dimension < 0.191) { - render->width = 0.191 * GL_CONST * total_area_width_x; - render->height = render->width / symbol_aspect; - } - } - - if(upceanflag != 0) { - /* The X-dimension of UPC/EAN symbols is fixed at 0.330mm */ - /* NOTE: This code will need adjustment before it correctly deals with composite symbols */ - render->width = 0.330 * GL_CONST * total_area_width_x; - /* The height is also fixed */ - switch (upceanflag) { - case 6: - case 12: - case 13: - /* UPC-A, UPC-E and EAN-13 */ - /* Height of bars should be 22.85mm */ - render->height = ((0.330 * ((2 * symbol->border_width) + text_offset + text_height)) + 22.85) * GL_CONST; - break; - case 8: - /* EAN-8 */ - /* Height of bars should be 18.23mm */ - render->height = ((0.330 * ((2 * symbol->border_width) + text_offset + text_height)) + 18.23) * GL_CONST; - break; - default: - /* EAN-2 and EAN-5 */ - /* Height of bars should be 21.10mm */ - render->height = ((0.330 * ((2 * symbol->border_width) + text_offset + text_height)) + 21.10) * GL_CONST; - } - } - - if(symbol->symbology == BARCODE_ONECODE) { - /* The size of USPS Intelligent Mail barcode is fixed */ - render->width = 0.508 * GL_CONST * total_area_width_x; - render->height = 4.064 * GL_CONST; - } - - if((symbol->symbology == BARCODE_POSTNET) || (symbol->symbology == BARCODE_PLANET)) { - /* The size of PostNet and PLANET are fized */ - render->width = 0.508 * GL_CONST * total_area_width_x; - render->height = 2.921 * GL_CONST; - } + // Determine if height should be overridden + large_bar_count = 0; + preset_height = 0.0; + for (i = 0; i < symbol->rows; i++) { + preset_height += symbol->row_height[i]; + if (symbol->row_height[i] == 0) { + large_bar_count++; + } + } - if(((symbol->symbology == BARCODE_AUSPOST) || (symbol->symbology == BARCODE_AUSREPLY)) || - ((symbol->symbology == BARCODE_AUSROUTE) || (symbol->symbology == BARCODE_AUSREDIRECT))) { - /* Australia Post use the same sizes as USPS */ - render->width = 0.508 * GL_CONST * total_area_width_x; - render->height = 4.064 * GL_CONST; - } - - if((symbol->symbology == BARCODE_RM4SCC) || (symbol->symbology == BARCODE_KIX)) { - /* Royal Mail and KIX Code uses 22 bars per inch */ - render->width = 0.577 * GL_CONST * total_area_width_x; - render->height = 5.22 * GL_CONST; - } - - if(symbol->symbology == BARCODE_MAXICODE) { - /* Maxicode is a fixed size */ - scaler = GL_CONST; /* Converts from millimeters to the scale used by glabels */ - render->width = 28.16 * scaler; - render->height = 26.86 * scaler; - - /* Central bullseye pattern */ - ring = render_plot_create_ring(13.64 * scaler, 13.43 * scaler, 0.85 * scaler, 0.67 * scaler); - render_plot_add_ring(symbol, ring, &last_ring); - ring = render_plot_create_ring(13.64 * scaler, 13.43 * scaler, 2.20 * scaler, 0.67 * scaler); - render_plot_add_ring(symbol, ring, &last_ring); - ring = render_plot_create_ring(13.64 * scaler, 13.43 * scaler, 3.54 * scaler, 0.67 * scaler); - render_plot_add_ring(symbol, ring, &last_ring); - - /* Hexagons */ - for(r = 0; r < symbol->rows; r++) { - for(i = 0; i < symbol->width; i++) { - if(module_is_set(symbol, r, i)) { - hexagon = render_plot_create_hexagon(((i * 0.88) + (r & 1 ? 1.76 : 1.32)) * scaler, ((r * 0.76) + 0.76) * scaler); - render_plot_add_hexagon(symbol, hexagon, &last_hexagon); - } - } - } - - } else { - /* everything else uses rectangles (or squares) */ - /* Works from the bottom of the symbol up */ - int addon_latch = 0; - - for(r = 0; r < symbol->rows; r++) { - this_row = r; - if(symbol->row_height[this_row] == 0) { - row_height = large_bar_height; - } else { - row_height = symbol->row_height[this_row]; - } - row_posn = 0; - for(i = 0; i < r; i++) { - if(symbol->row_height[i] == 0) { - row_posn += large_bar_height; - } else { - row_posn += symbol->row_height[i]; - } - } - row_posn += yoffset; - - i = 0; - if(module_is_set(symbol, this_row, 0)) { - latch = 1; - } else { - latch = 0; - } + if (large_bar_count == 0) { + required_aspect = width / height; + symbol_aspect = (total_symbol_width_x + (2 * xoffset)) / (preset_height + (2 * yoffset) + text_offset + text_height); + symbol->height = preset_height; + if (required_aspect > symbol_aspect) { + /* the area is too wide */ + scaler = height / (preset_height + (2 * yoffset) + text_offset + text_height); + render->width = symbol_aspect * height; + render->height = height; + } else { + /* the area is too high */ + scaler = width / (total_symbol_width_x + (2 * xoffset)); + render->width = width; + render->height = width / symbol_aspect; + } + } else { + scaler = width / (total_symbol_width_x + (2 * xoffset)); + symbol->height = (height / scaler) - ((2 * yoffset) + text_offset + text_height); - do { - block_width = 0; - do { - block_width++; - } while (module_is_set(symbol, this_row, i + block_width) == module_is_set(symbol, this_row, i)); - if((addon_latch == 0) && (r == (symbol->rows - 1)) && (i > main_symbol_width_x)) { - addon_text_posn = row_posn * scaler; - addon_latch = 1; - } - if(latch == 1) { - /* a bar */ - if(addon_latch == 0) { - line = render_plot_create_line((i + xoffset) * scaler, (row_posn) * scaler, block_width * scaler, row_height * scaler); - } else { - line = render_plot_create_line((i + xoffset) * scaler, (row_posn + 10.0) * scaler, block_width * scaler, (row_height - 5.0) * scaler); - } - latch = 0; - - render_plot_add_line(symbol, line, &last_line); - } else { - /* a space */ - latch = 1; - } - i += block_width; - - } while (i < symbol->width); - } - } - /* That's done the actual data area, everything else is human-friendly */ + render->width = width; + render->height = height; + } + large_bar_height = (symbol->height - preset_height) / large_bar_count; + + if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + default_text_posn = (symbol->height + text_offset + symbol->border_width + symbol->border_width) * scaler; + } else { + default_text_posn = (symbol->height + text_offset + symbol->border_width) * scaler; + } + + x_dimension = render->width / total_area_width_x; + x_dimension /= GL_CONST; + + /* Set minimum size of symbol */ + /* Barcode must be at least 2mm high by 2mm across */ + if (render->height < ((x_dimension * ((2 * symbol->border_width) + text_offset + text_height)) + 2.0) * GL_CONST) { + render->height = ((x_dimension * ((2 * symbol->border_width) + text_offset + text_height)) + 2.0) * GL_CONST; + } + if (render->width < (2.0 * GL_CONST)) { + render->width = (2.0 * GL_CONST); + } + + if (symbol->symbology == BARCODE_CODABAR) { + /* The minimum X-dimension of Codabar is 0.191mm. The minimum bar height is 5mm */ + if (x_dimension < 0.191) { + render->width = 0.191 * GL_CONST * total_area_width_x; + } + if (render->height < ((x_dimension * ((2 * symbol->border_width) + text_offset + text_height)) + 5.0) * GL_CONST) { + render->height = ((x_dimension * ((2 * symbol->border_width) + text_offset + text_height)) + 5.0) * GL_CONST; + } + } + + if (symbol->symbology == BARCODE_CODE49) { + /* The minimum X-dimension of Code 49 is 0.191mm */ + if (x_dimension < 0.191) { + render->width = 0.191 * GL_CONST * total_area_width_x; + render->height = render->width / symbol_aspect; + } + } + + if (upceanflag != 0) { + /* The X-dimension of UPC/EAN symbols is fixed at 0.330mm */ + /* NOTE: This code will need adjustment before it correctly deals with composite symbols */ + render->width = 0.330 * GL_CONST * total_area_width_x; + /* The height is also fixed */ + switch (upceanflag) { + case 6: + case 12: + case 13: + /* UPC-A, UPC-E and EAN-13 */ + /* Height of bars should be 22.85mm */ + render->height = ((0.330 * ((2 * symbol->border_width) + text_offset + text_height)) + 22.85) * GL_CONST; + break; + case 8: + /* EAN-8 */ + /* Height of bars should be 18.23mm */ + render->height = ((0.330 * ((2 * symbol->border_width) + text_offset + text_height)) + 18.23) * GL_CONST; + break; + default: + /* EAN-2 and EAN-5 */ + /* Height of bars should be 21.10mm */ + render->height = ((0.330 * ((2 * symbol->border_width) + text_offset + text_height)) + 21.10) * GL_CONST; + } + } + + if (symbol->symbology == BARCODE_ONECODE) { + /* The size of USPS Intelligent Mail barcode is fixed */ + render->width = 0.508 * GL_CONST * total_area_width_x; + render->height = 4.064 * GL_CONST; + } + + if ((symbol->symbology == BARCODE_POSTNET) || (symbol->symbology == BARCODE_PLANET)) { + /* The size of PostNet and PLANET are fized */ + render->width = 0.508 * GL_CONST * total_area_width_x; + render->height = 2.921 * GL_CONST; + } + + if (((symbol->symbology == BARCODE_AUSPOST) || (symbol->symbology == BARCODE_AUSREPLY)) || + ((symbol->symbology == BARCODE_AUSROUTE) || (symbol->symbology == BARCODE_AUSREDIRECT))) { + /* Australia Post use the same sizes as USPS */ + render->width = 0.508 * GL_CONST * total_area_width_x; + render->height = 4.064 * GL_CONST; + } + + if ((symbol->symbology == BARCODE_RM4SCC) || (symbol->symbology == BARCODE_KIX)) { + /* Royal Mail and KIX Code uses 22 bars per inch */ + render->width = 0.577 * GL_CONST * total_area_width_x; + render->height = 5.22 * GL_CONST; + } + + if (symbol->symbology == BARCODE_MAXICODE) { + /* Maxicode is a fixed size */ + scaler = GL_CONST; /* Converts from millimeters to the scale used by glabels */ + render->width = 28.16 * scaler; + render->height = 26.86 * scaler; + + /* Central bullseye pattern */ + ring = render_plot_create_ring(13.64 * scaler, 13.43 * scaler, 0.85 * scaler, 0.67 * scaler); + render_plot_add_ring(symbol, ring, &last_ring); + ring = render_plot_create_ring(13.64 * scaler, 13.43 * scaler, 2.20 * scaler, 0.67 * scaler); + render_plot_add_ring(symbol, ring, &last_ring); + ring = render_plot_create_ring(13.64 * scaler, 13.43 * scaler, 3.54 * scaler, 0.67 * scaler); + render_plot_add_ring(symbol, ring, &last_ring); + + /* Hexagons */ + for (r = 0; r < symbol->rows; r++) { + for (i = 0; i < symbol->width; i++) { + if (module_is_set(symbol, r, i)) { + hexagon = render_plot_create_hexagon(((i * 0.88) + (r & 1 ? 1.76 : 1.32)) * scaler, ((r * 0.76) + 0.76) * scaler); + render_plot_add_hexagon(symbol, hexagon, &last_hexagon); + } + } + } + + } else { + /* everything else uses rectangles (or squares) */ + /* Works from the bottom of the symbol up */ + int addon_latch = 0; + + for (r = 0; r < symbol->rows; r++) { + this_row = r; + if (symbol->row_height[this_row] == 0) { + row_height = large_bar_height; + } else { + row_height = symbol->row_height[this_row]; + } + row_posn = 0; + for (i = 0; i < r; i++) { + if (symbol->row_height[i] == 0) { + row_posn += large_bar_height; + } else { + row_posn += symbol->row_height[i]; + } + } + row_posn += yoffset; + + i = 0; + if (module_is_set(symbol, this_row, 0)) { + latch = 1; + } else { + latch = 0; + } + + do { + block_width = 0; + do { + block_width++; + } while (module_is_set(symbol, this_row, i + block_width) == module_is_set(symbol, this_row, i)); + if ((addon_latch == 0) && (r == (symbol->rows - 1)) && (i > main_symbol_width_x)) { + addon_text_posn = row_posn * scaler; + addon_latch = 1; + } + if (latch == 1) { + /* a bar */ + if (addon_latch == 0) { + line = render_plot_create_line((i + xoffset) * scaler, (row_posn) * scaler, block_width * scaler, row_height * scaler); + } else { + line = render_plot_create_line((i + xoffset) * scaler, (row_posn + 10.0) * scaler, block_width * scaler, (row_height - 5.0) * scaler); + } + latch = 0; + + render_plot_add_line(symbol, line, &last_line); + } else { + /* a space */ + latch = 1; + } + i += block_width; + + } while (i < symbol->width); + } + } + /* That's done the actual data area, everything else is human-friendly */ - /* Add the text */ - xoffset -= symbol_lead_in; - row_posn = (row_posn + large_bar_height) * scaler; + /* Add the text */ + xoffset -= symbol_lead_in; + row_posn = (row_posn + large_bar_height) * scaler; - if (!hide_text) { - if(upceanflag == 8) { - /* guard bar extensions and text formatting for EAN-8 */ - i = 0; - for (line = symbol->rendered->lines; line != NULL; line = line->next) { - switch(i) { - case 0: - case 1: - case 10: - case 11: - case 20: - case 21: - line->length += (5.0 * scaler); - break; - } - i++; - } + if (!hide_text) { + if (upceanflag == 8) { + /* guard bar extensions and text formatting for EAN-8 */ + i = 0; + for (line = symbol->rendered->lines; line != NULL; line = line->next) { + switch (i) { + case 0: + case 1: + case 10: + case 11: + case 20: + case 21: + line->length += (5.0 * scaler); + break; + } + i++; + } - for(i = 0; i < 4; i++) { - textpart[i] = symbol->text[i]; - } - textpart[4] = '\0'; - textpos = 17; - textwidth = 4.0 * 8.5; - render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); - for(i = 0; i < 4; i++) { - textpart[i] = symbol->text[i + 4]; - } - textpart[4] = '\0'; - textpos = 50; - render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); - textdone = 1; - switch(strlen(addon)) { - case 2: - textpos = xoffset + 86; - textwidth = 2.0 * 8.5; - render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); - break; - case 5: - textpos = xoffset + 100; - textwidth = 5.0 * 8.5; - render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); - break; - } + for (i = 0; i < 4; i++) { + textpart[i] = symbol->text[i]; + } + textpart[4] = '\0'; + textpos = 17; + textwidth = 4.0 * 8.5; + render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); + for (i = 0; i < 4; i++) { + textpart[i] = symbol->text[i + 4]; + } + textpart[4] = '\0'; + textpos = 50; + render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); + textdone = 1; + switch (strlen(addon)) { + case 2: + textpos = xoffset + 86; + textwidth = 2.0 * 8.5; + render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); + break; + case 5: + textpos = xoffset + 100; + textwidth = 5.0 * 8.5; + render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); + break; + } - } - - if(upceanflag == 13) { - /* guard bar extensions and text formatting for EAN-13 */ - i = 0; - for (line = symbol->rendered->lines; line != NULL; line = line->next) { - switch(i) { - case 0: - case 1: - case 14: - case 15: - case 28: - case 29: - line->length += (5.0 * scaler); - break; - } - i++; - } + } - textpart[0] = symbol->text[0]; - textpart[1] = '\0'; - textpos = -5; // 7 - textwidth = 8.5; - render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); + if (upceanflag == 13) { + /* guard bar extensions and text formatting for EAN-13 */ + i = 0; + for (line = symbol->rendered->lines; line != NULL; line = line->next) { + switch (i) { + case 0: + case 1: + case 14: + case 15: + case 28: + case 29: + line->length += (5.0 * scaler); + break; + } + i++; + } - for(i = 0; i < 6; i++) { - textpart[i] = symbol->text[i + 1]; - } - textpart[6] = '\0'; - textpos = 25; - textwidth = 6.0 * 8.5; - render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); - for(i = 0; i < 6; i++) { - textpart[i] = symbol->text[i + 7]; - } - textpart[6] = '\0'; - textpos = 72; - render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); - textdone = 1; - switch(strlen(addon)) { - case 2: - textpos = xoffset + 114; - textwidth = 2.0 * 8.5; - render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); - break; - case 5: - textpos = xoffset + 128; - textwidth = 5.0 * 8.5; - render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); - break; - } - } - - if (upceanflag == 12) { - /* guard bar extensions and text formatting for UPCA */ - i = 0; - for (line = symbol->rendered->lines; line != NULL; line = line->next) { - switch(i) { - case 0: - case 1: - case 2: - case 3: - case 14: - case 15: - case 26: - case 27: - case 28: - case 29: - line->length += (5.0 * scaler); - break; - } - i++; - } - - textpart[0] = symbol->text[0]; - textpart[1] = '\0'; - textpos = -5; - textwidth = 6.2; - render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn + (2.0 * scaler), 8.0 * scaler, textwidth * scaler, &last_string); - for(i = 0; i < 5; i++) { - textpart[i] = symbol->text[i + 1]; - } - textpart[5] = '\0'; - textpos = 27; - textwidth = 5.0 * 8.5; - render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); - for(i = 0; i < 5; i++) { - textpart[i] = symbol->text[i + 6]; - } - textpos = 68; - render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); - textpart[0] = symbol->text[11]; - textpart[1] = '\0'; - textpos = 100; - textwidth = 6.2; - render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn + (2.0 * scaler), 8.0 * scaler, textwidth * scaler, &last_string); - textdone = 1; - switch(strlen(addon)) { - case 2: - textpos = xoffset + 116; - textwidth = 2.0 * 8.5; - render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); - break; - case 5: - textpos = xoffset + 130; - textwidth = 5.0 * 8.5; - render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); - break; - } - } - - if (upceanflag == 6) { - /* guard bar extensions and text formatting for UPCE */ - i = 0; - for (line = symbol->rendered->lines; line != NULL; line = line->next) { - switch(i) { - case 0: - case 1: - case 14: - case 15: - case 16: - line->length += (5.0 * scaler); - break; - } - i++; - } - - textpart[0] = symbol->text[0]; - textpart[1] = '\0'; - textpos = -5; - textwidth = 6.2; - render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn + (2.0 * scaler), 8.0 * scaler, textwidth * scaler, &last_string); - for(i = 0; i < 6; i++) { - textpart[i] = symbol->text[i + 1]; - } - textpart[6] = '\0'; - textpos = 24; - textwidth = 6.0 * 8.5; - render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); - textpart[0] = symbol->text[7]; - textpart[1] = '\0'; - textpos = 55; - textwidth = 6.2; - render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn + (2.0 * scaler), 8.0 * scaler, textwidth * scaler, &last_string); - textdone = 1; - switch(strlen(addon)) { - case 2: - textpos = xoffset + 70; - textwidth = 2.0 * 8.5; - render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); - break; - case 5: - textpos = xoffset + 84; - textwidth = 5.0 * 8.5; - render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); - break; - } - } + textpart[0] = symbol->text[0]; + textpart[1] = '\0'; + textpos = -5; // 7 + textwidth = 8.5; + render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); - /* Put normal human readable text at the bottom (and centered) */ - if (textdone == 0) { - // caculate start xoffset to center text - render_plot_add_string(symbol, symbol->text, ((symbol->width / 2.0) + xoffset) * scaler, default_text_posn, 9.0 * scaler, 0.0, &last_string); - } - } - - switch(symbol->symbology) { - case BARCODE_MAXICODE: - /* Do nothing! */ - break; - default: - if((symbol->output_options & BARCODE_BIND) != 0) { - if((symbol->rows > 1) && (is_stackable(symbol->symbology) == 1)) { - /* row binding */ - for(r = 1; r < symbol->rows; r++) { - line = render_plot_create_line(xoffset * scaler, ((r * row_height) + yoffset - 1) * scaler, symbol->width * scaler, 2.0 * scaler); - render_plot_add_line(symbol, line, &last_line); - } - } - } - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { - line = render_plot_create_line(0, 0, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler); - render_plot_add_line(symbol, line, &last_line); - line = render_plot_create_line(0, (symbol->height + symbol->border_width) * scaler, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler); - render_plot_add_line(symbol, line, &last_line); - } - if((symbol->output_options & BARCODE_BOX) != 0) { - /* side bars */ - line = render_plot_create_line(0, 0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler); - render_plot_add_line(symbol, line, &last_line); - line = render_plot_create_line((symbol->width + xoffset + xoffset - symbol->border_width) * scaler, 0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler); - render_plot_add_line(symbol, line, &last_line); - } - break; - } + for (i = 0; i < 6; i++) { + textpart[i] = symbol->text[i + 1]; + } + textpart[6] = '\0'; + textpos = 25; + textwidth = 6.0 * 8.5; + render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); + for (i = 0; i < 6; i++) { + textpart[i] = symbol->text[i + 7]; + } + textpart[6] = '\0'; + textpos = 72; + render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); + textdone = 1; + switch (strlen(addon)) { + case 2: + textpos = xoffset + 114; + textwidth = 2.0 * 8.5; + render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); + break; + case 5: + textpos = xoffset + 128; + textwidth = 5.0 * 8.5; + render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); + break; + } + } - if (locale) - setlocale(LC_ALL, locale); + if (upceanflag == 12) { + /* guard bar extensions and text formatting for UPCA */ + i = 0; + for (line = symbol->rendered->lines; line != NULL; line = line->next) { + switch (i) { + case 0: + case 1: + case 2: + case 3: + case 14: + case 15: + case 26: + case 27: + case 28: + case 29: + line->length += (5.0 * scaler); + break; + } + i++; + } - return 1; + textpart[0] = symbol->text[0]; + textpart[1] = '\0'; + textpos = -5; + textwidth = 6.2; + render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn + (2.0 * scaler), 8.0 * scaler, textwidth * scaler, &last_string); + for (i = 0; i < 5; i++) { + textpart[i] = symbol->text[i + 1]; + } + textpart[5] = '\0'; + textpos = 27; + textwidth = 5.0 * 8.5; + render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); + for (i = 0; i < 5; i++) { + textpart[i] = symbol->text[i + 6]; + } + textpos = 68; + render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); + textpart[0] = symbol->text[11]; + textpart[1] = '\0'; + textpos = 100; + textwidth = 6.2; + render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn + (2.0 * scaler), 8.0 * scaler, textwidth * scaler, &last_string); + textdone = 1; + switch (strlen(addon)) { + case 2: + textpos = xoffset + 116; + textwidth = 2.0 * 8.5; + render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); + break; + case 5: + textpos = xoffset + 130; + textwidth = 5.0 * 8.5; + render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); + break; + } + } + + if (upceanflag == 6) { + /* guard bar extensions and text formatting for UPCE */ + i = 0; + for (line = symbol->rendered->lines; line != NULL; line = line->next) { + switch (i) { + case 0: + case 1: + case 14: + case 15: + case 16: + line->length += (5.0 * scaler); + break; + } + i++; + } + + textpart[0] = symbol->text[0]; + textpart[1] = '\0'; + textpos = -5; + textwidth = 6.2; + render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn + (2.0 * scaler), 8.0 * scaler, textwidth * scaler, &last_string); + for (i = 0; i < 6; i++) { + textpart[i] = symbol->text[i + 1]; + } + textpart[6] = '\0'; + textpos = 24; + textwidth = 6.0 * 8.5; + render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string); + textpart[0] = symbol->text[7]; + textpart[1] = '\0'; + textpos = 55; + textwidth = 6.2; + render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn + (2.0 * scaler), 8.0 * scaler, textwidth * scaler, &last_string); + textdone = 1; + switch (strlen(addon)) { + case 2: + textpos = xoffset + 70; + textwidth = 2.0 * 8.5; + render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); + break; + case 5: + textpos = xoffset + 84; + textwidth = 5.0 * 8.5; + render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string); + break; + } + } + + /* Put normal human readable text at the bottom (and centered) */ + if (textdone == 0) { + // caculate start xoffset to center text + render_plot_add_string(symbol, symbol->text, ((symbol->width / 2.0) + xoffset) * scaler, default_text_posn, 9.0 * scaler, 0.0, &last_string); + } + } + + switch (symbol->symbology) { + case BARCODE_MAXICODE: + /* Do nothing! */ + break; + default: + if ((symbol->output_options & BARCODE_BIND) != 0) { + if ((symbol->rows > 1) && (is_stackable(symbol->symbology) == 1)) { + /* row binding */ + for (r = 1; r < symbol->rows; r++) { + line = render_plot_create_line(xoffset * scaler, ((r * row_height) + yoffset - 1) * scaler, symbol->width * scaler, 2.0 * scaler); + render_plot_add_line(symbol, line, &last_line); + } + } + } + if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + line = render_plot_create_line(0, 0, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler); + render_plot_add_line(symbol, line, &last_line); + line = render_plot_create_line(0, (symbol->height + symbol->border_width) * scaler, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler); + render_plot_add_line(symbol, line, &last_line); + } + if ((symbol->output_options & BARCODE_BOX) != 0) { + /* side bars */ + line = render_plot_create_line(0, 0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler); + render_plot_add_line(symbol, line, &last_line); + line = render_plot_create_line((symbol->width + xoffset + xoffset - symbol->border_width) * scaler, 0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler); + render_plot_add_line(symbol, line, &last_line); + } + break; + } + + if (locale) + setlocale(LC_ALL, locale); + + return 1; } - /* * Create a new line with its memory allocated ready for adding to the * rendered structure. * * This is much quicker than writing out each line manually (in some cases!) */ -struct zint_render_line *render_plot_create_line(float x, float y, float width, float length) -{ - struct zint_render_line *line; - - line = (struct zint_render_line*) malloc(sizeof(struct zint_render_line)); - line->next = NULL; - line->x = x; - line->y = y; - line->width = width; - line->length = length; +struct zint_render_line *render_plot_create_line(float x, float y, float width, float length) { + struct zint_render_line *line; - return line; + line = (struct zint_render_line*) malloc(sizeof (struct zint_render_line)); + line->next = NULL; + line->x = x; + line->y = y; + line->width = width; + line->length = length; + + return line; } /* * Add the line to the current rendering and update the last line's * next value. */ -int render_plot_add_line(struct zint_symbol *symbol, struct zint_render_line *line, struct zint_render_line **last_line) -{ - if (*last_line) - (*last_line)->next = line; - else - symbol->rendered->lines = line; // first line +int render_plot_add_line(struct zint_symbol *symbol, struct zint_render_line *line, struct zint_render_line **last_line) { + if (*last_line) + (*last_line)->next = line; + else + symbol->rendered->lines = line; // first line - *last_line = line; - return 1; + *last_line = line; + return 1; } -struct zint_render_ring *render_plot_create_ring(float x, float y, float radius, float line_width) -{ - struct zint_render_ring *ring; - - ring = (struct zint_render_ring *) malloc(sizeof(struct zint_render_ring)); - ring->next = NULL; - ring->x = x; - ring->y = y; - ring->radius = radius; - ring->line_width = line_width; - - return ring; +struct zint_render_ring *render_plot_create_ring(float x, float y, float radius, float line_width) { + struct zint_render_ring *ring; + + ring = (struct zint_render_ring *) malloc(sizeof (struct zint_render_ring)); + ring->next = NULL; + ring->x = x; + ring->y = y; + ring->radius = radius; + ring->line_width = line_width; + + return ring; } -int render_plot_add_ring(struct zint_symbol *symbol, struct zint_render_ring *ring, struct zint_render_ring **last_ring) -{ - if (*last_ring) - (*last_ring)->next = ring; - else - symbol->rendered->rings = ring; // first ring - - *last_ring = ring; - return 1; +int render_plot_add_ring(struct zint_symbol *symbol, struct zint_render_ring *ring, struct zint_render_ring **last_ring) { + if (*last_ring) + (*last_ring)->next = ring; + else + symbol->rendered->rings = ring; // first ring + + *last_ring = ring; + return 1; } -struct zint_render_hexagon *render_plot_create_hexagon(float x, float y) -{ - struct zint_render_hexagon *hexagon; - - hexagon = (struct zint_render_hexagon*) malloc(sizeof(struct zint_render_hexagon)); - hexagon->next = NULL; - hexagon->x = x; - hexagon->y = y; - - return hexagon; +struct zint_render_hexagon *render_plot_create_hexagon(float x, float y) { + struct zint_render_hexagon *hexagon; + + hexagon = (struct zint_render_hexagon*) malloc(sizeof (struct zint_render_hexagon)); + hexagon->next = NULL; + hexagon->x = x; + hexagon->y = y; + + return hexagon; } -int render_plot_add_hexagon(struct zint_symbol *symbol, struct zint_render_hexagon *hexagon, struct zint_render_hexagon **last_hexagon) -{ - if (*last_hexagon) - (*last_hexagon)->next = hexagon; - else - symbol->rendered->hexagons = hexagon; // first hexagon - - *last_hexagon = hexagon; - return 1; +int render_plot_add_hexagon(struct zint_symbol *symbol, struct zint_render_hexagon *hexagon, struct zint_render_hexagon **last_hexagon) { + if (*last_hexagon) + (*last_hexagon)->next = hexagon; + else + symbol->rendered->hexagons = hexagon; // first hexagon + + *last_hexagon = hexagon; + return 1; } /* @@ -760,26 +752,25 @@ int render_plot_add_hexagon(struct zint_symbol *symbol, struct zint_render_hexag * Coordinates assumed to be from top-center. */ int render_plot_add_string(struct zint_symbol *symbol, - unsigned char *text, float x, float y, float fsize, float width, - struct zint_render_string **last_string) -{ - struct zint_render_string *string; + unsigned char *text, float x, float y, float fsize, float width, + struct zint_render_string **last_string) { + struct zint_render_string *string; - string = (struct zint_render_string*) malloc(sizeof(struct zint_render_string)); - string->next = NULL; - string->x = x; - string->y = y; - string->width = width; - string->fsize = fsize; - string->length = ustrlen(text); - string->text = (unsigned char*) malloc(sizeof(unsigned char) * (ustrlen(text) + 1)); - ustrcpy(string->text, text); + string = (struct zint_render_string*) malloc(sizeof (struct zint_render_string)); + string->next = NULL; + string->x = x; + string->y = y; + string->width = width; + string->fsize = fsize; + string->length = ustrlen(text); + string->text = (unsigned char*) malloc(sizeof (unsigned char) * (ustrlen(text) + 1)); + ustrcpy(string->text, text); - if (*last_string) - (*last_string)->next = string; - else - symbol->rendered->strings = string; // First character - *last_string = string; + if (*last_string) + (*last_string)->next = string; + else + symbol->rendered->strings = string; // First character + *last_string = string; - return 1; + return 1; } diff --git a/backend/rss.c b/backend/rss.c index 6e90ef8b..9b852e7b 100644 --- a/backend/rss.c +++ b/backend/rss.c @@ -2,7 +2,7 @@ /* libzint - the open source barcode library - Copyright (C) 2008 Robin Stuart + Copyright (C) 2008-2016 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -28,7 +28,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ /* The functions "combins" and "getRSSwidths" are copyright BSI and are released with permission under the following terms: @@ -46,7 +46,7 @@ written permission of BSI must be obtained." The date of publication for these functions is 30 November 2006 -*/ + */ /* Includes numerous bugfixes thanks to Pablo Orduña @ the PIRAmIDE project */ @@ -61,7 +61,7 @@ * RSS Expanded > GS1 DataBar Expanded Omnidirectional * RSS Expanded Stacked > GS1 DataBar Expanded Stacked Omnidirectional */ - + #include #include #include @@ -74,2224 +74,2388 @@ #include "gs1.h" /********************************************************************** -* combins(n,r): returns the number of Combinations of r selected from n: -* Combinations = n! / ((n - r)! * r!) -**********************************************************************/ + * combins(n,r): returns the number of Combinations of r selected from n: + * Combinations = n! / ((n - r)! * r!) + **********************************************************************/ int combins(int n, int r) { - int i, j; - int maxDenom, minDenom; - int val; - - if (n-r > r) { - minDenom = r; - maxDenom = n-r; - } - else { - minDenom = n-r; - maxDenom = r; - } - val = 1; - j = 1; - for (i = n; i > maxDenom; i--) { - val *= i; - if (j <= minDenom) { - val /= j; - j++; - } - } - for (; j <= minDenom; j++) { - val /= j; - } - return(val); + int i, j; + int maxDenom, minDenom; + int val; + + if (n - r > r) { + minDenom = r; + maxDenom = n - r; + } else { + minDenom = n - r; + maxDenom = r; + } + val = 1; + j = 1; + for (i = n; i > maxDenom; i--) { + val *= i; + if (j <= minDenom) { + val /= j; + j++; + } + } + for (; j <= minDenom; j++) { + val /= j; + } + return (val); } /********************************************************************** -* getRSSwidths -* routine to generate widths for RSS elements for a given value.# -* -* Calling arguments: -* val = required value -* n = number of modules -* elements = elements in a set (RSS-14 & Expanded = 4; RSS Limited = 7) -* maxWidth = maximum module width of an element -* noNarrow = 0 will skip patterns without a one module wide element -* -* Return: -* static int widths[] = element widths -**********************************************************************/ -void getRSSwidths(int val, int n, int elements, int maxWidth, int noNarrow) -{ - int bar; - int elmWidth; - int mxwElement; - int subVal, lessVal; - int narrowMask = 0; - for (bar = 0; bar < elements-1; bar++) - { - for(elmWidth = 1, narrowMask |= (1<= elements-bar-1)) - { - subVal -= combins(n-elmWidth-(elements-bar), elements-bar-2); - } - /* less combinations with elements > maxVal */ - if (elements-bar-1 > 1) - { - lessVal = 0; - for (mxwElement = n-elmWidth-(elements-bar-2); - mxwElement > maxWidth; - mxwElement--) - { - lessVal += combins(n-elmWidth-mxwElement-1, elements-bar-3); - } - subVal -= lessVal * (elements-1-bar); - } - else if (n-elmWidth > maxWidth) - { - subVal--; - } - val -= subVal; - if (val < 0) break; - } - val += subVal; - n -= elmWidth; - widths[bar] = elmWidth; - } - widths[bar] = n; - return; + * getRSSwidths + * routine to generate widths for RSS elements for a given value.# + * + * Calling arguments: + * val = required value + * n = number of modules + * elements = elements in a set (RSS-14 & Expanded = 4; RSS Limited = 7) + * maxWidth = maximum module width of an element + * noNarrow = 0 will skip patterns without a one module wide element + * + * Return: + * static int widths[] = element widths + **********************************************************************/ +void getRSSwidths(int val, int n, int elements, int maxWidth, int noNarrow) { + int bar; + int elmWidth; + int mxwElement; + int subVal, lessVal; + int narrowMask = 0; + for (bar = 0; bar < elements - 1; bar++) { + for (elmWidth = 1, narrowMask |= (1 << bar); + ; + elmWidth++, narrowMask &= ~(1 << bar)) { + /* get all combinations */ + subVal = combins(n - elmWidth - 1, elements - bar - 2); + /* less combinations with no single-module element */ + if ((!noNarrow) && (!narrowMask) && + (n - elmWidth - (elements - bar - 1) >= elements - bar - 1)) { + subVal -= combins(n - elmWidth - (elements - bar), elements - bar - 2); + } + /* less combinations with elements > maxVal */ + if (elements - bar - 1 > 1) { + lessVal = 0; + for (mxwElement = n - elmWidth - (elements - bar - 2); + mxwElement > maxWidth; + mxwElement--) { + lessVal += combins(n - elmWidth - mxwElement - 1, elements - bar - 3); + } + subVal -= lessVal * (elements - 1 - bar); + } else if (n - elmWidth > maxWidth) { + subVal--; + } + val -= subVal; + if (val < 0) break; + } + val += subVal; + n -= elmWidth; + widths[bar] = elmWidth; + } + widths[bar] = n; + return; } -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], temp[32]; - int check_digit, count, separator_row; - - separator_row = 0; +/* GS1 DataBar-14 */ +int rss14(struct zint_symbol *symbol, unsigned char source[], int src_len) { + 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], temp[32]; + int check_digit, count, separator_row; - if(src_len > 13) { - strcpy(symbol->errtxt, "Input too long"); - return ZINT_ERROR_TOO_LONG; - } - error_number = is_sane(NEON, source, src_len); - if(error_number == ZINT_ERROR_INVALID_DATA) { - strcpy(symbol->errtxt, "Invalid characters in data"); - return error_number; - } - - /* make some room for a separator row for composite symbols */ - switch(symbol->symbology) { - case BARCODE_RSS14_CC: - case BARCODE_RSS14STACK_CC: - case BARCODE_RSS14_OMNI_CC: - separator_row = symbol->rows; - symbol->row_height[separator_row] = 1; - symbol->rows += 1; - break; - } - - for(i = 0; i < 112; i++) { - accum[i] = 0; - x_reg[i] = 0; - y_reg[i] = 0; - } - - for(i = 0; i < 4; i++) { - data_character[i] = 0; - data_group[i] = 0; - } - - binary_load(accum, (char*)source, src_len); - strcpy(temp, "10000000000000"); - if(symbol->option_1 == 2) { - /* Add symbol linkage flag */ - binary_load(y_reg, temp, strlen(temp)); - binary_add(accum, y_reg); - for(i = 0; i < 112; i++) { - y_reg[i] = 0; - } - } - - /* Calculate left and right pair values */ - strcpy(temp, "4537077"); - binary_load(x_reg, temp, strlen(temp)); - - for(i = 0; i < 24; i++) { - shiftup(x_reg); - } - - for(i = 24; i >= 0; i--) { - y_reg[i] = islarger(accum, x_reg); - if(y_reg[i] == 1) { - binary_subtract(accum, x_reg); - } - shiftdown(x_reg); - } - - for(i = 0; i < 112; i++) { - left_reg[i] = y_reg[i]; - right_reg[i] = accum[i]; - } - - /* Calculate four data characters */ - strcpy(temp, "1597"); - binary_load(x_reg, temp, strlen(temp)); - for(i = 0; i < 112; i++) { - accum[i] = left_reg[i]; - } - - for(i = 0; i < 24; i++) { - shiftup(x_reg); - } - - for(i = 24; i >= 0; i--) { - y_reg[i] = islarger(accum, x_reg); - if(y_reg[i] == 1) { - binary_subtract(accum, x_reg); - } - shiftdown(x_reg); - } - - data_character[0] = 0; - data_character[1] = 0; - mask = 0x2000; - for(i = 13; i >= 0; i--) { - if(y_reg[i] == 1) { - data_character[0] += mask; - } - if(accum[i] == 1) { - data_character[1] += mask; - } - mask = mask >> 1; - } - strcpy(temp, "1597"); - binary_load(x_reg, temp, strlen(temp)); - for(i = 0; i < 112; i++) { - accum[i] = right_reg[i]; - } - - for(i = 0; i < 24; i++) { - shiftup(x_reg); - } - - for(i = 24; i >= 0; i--) { - y_reg[i] = islarger(accum, x_reg); - if(y_reg[i] == 1) { - binary_subtract(accum, x_reg); - } - shiftdown(x_reg); - } - - data_character[2] = 0; - data_character[3] = 0; - mask = 0x2000; - for(i = 13; i >= 0; i--) { - if(y_reg[i] == 1) { - data_character[2] += mask; - } - if(accum[i] == 1) { - data_character[3] += mask; - } - mask = mask >> 1; - } - - /* Calculate odd and even subset values */ - - if((data_character[0] >= 0) && (data_character[0] <= 160)) { data_group[0] = 0; } - if((data_character[0] >= 161) && (data_character[0] <= 960)) { data_group[0] = 1; } - if((data_character[0] >= 961) && (data_character[0] <= 2014)) { data_group[0] = 2; } - if((data_character[0] >= 2015) && (data_character[0] <= 2714)) { data_group[0] = 3; } - if((data_character[0] >= 2715) && (data_character[0] <= 2840)) { data_group[0] = 4; } - if((data_character[1] >= 0) && (data_character[1] <= 335)) { data_group[1] = 5; } - if((data_character[1] >= 336) && (data_character[1] <= 1035)) { data_group[1] = 6; } - if((data_character[1] >= 1036) && (data_character[1] <= 1515)) { data_group[1] = 7; } - if((data_character[1] >= 1516) && (data_character[1] <= 1596)) { data_group[1] = 8; } - if((data_character[3] >= 0) && (data_character[3] <= 335)) { data_group[3] = 5; } - if((data_character[3] >= 336) && (data_character[3] <= 1035)) { data_group[3] = 6; } - if((data_character[3] >= 1036) && (data_character[3] <= 1515)) { data_group[3] = 7; } - if((data_character[3] >= 1516) && (data_character[3] <= 1596)) { data_group[3] = 8; } - if((data_character[2] >= 0) && (data_character[2] <= 160)) { data_group[2] = 0; } - if((data_character[2] >= 161) && (data_character[2] <= 960)) { data_group[2] = 1; } - if((data_character[2] >= 961) && (data_character[2] <= 2014)) { data_group[2] = 2; } - if((data_character[2] >= 2015) && (data_character[2] <= 2714)) { data_group[2] = 3; } - if((data_character[2] >= 2715) && (data_character[2] <= 2840)) { data_group[2] = 4; } - - v_odd[0] = (data_character[0] - g_sum_table[data_group[0]]) / t_table[data_group[0]]; - v_even[0] = (data_character[0] - g_sum_table[data_group[0]]) % t_table[data_group[0]]; - v_odd[1] = (data_character[1] - g_sum_table[data_group[1]]) % t_table[data_group[1]]; - v_even[1] = (data_character[1] - g_sum_table[data_group[1]]) / t_table[data_group[1]]; - v_odd[3] = (data_character[3] - g_sum_table[data_group[3]]) % t_table[data_group[3]]; - v_even[3] = (data_character[3] - g_sum_table[data_group[3]]) / t_table[data_group[3]]; - v_odd[2] = (data_character[2] - g_sum_table[data_group[2]]) / t_table[data_group[2]]; - v_even[2] = (data_character[2] - g_sum_table[data_group[2]]) % t_table[data_group[2]]; + separator_row = 0; - - /* Use RSS subset width algorithm */ - for(i = 0; i < 4; i++) { - if((i == 0)||(i == 2)) { - getRSSwidths(v_odd[i], modules_odd[data_group[i]], 4, widest_odd[data_group[i]], 1); - data_widths[0][i] = widths[0]; - data_widths[2][i] = widths[1]; - data_widths[4][i] = widths[2]; - data_widths[6][i] = widths[3]; - getRSSwidths(v_even[i], modules_even[data_group[i]], 4, widest_even[data_group[i]], 0); - data_widths[1][i] = widths[0]; - data_widths[3][i] = widths[1]; - data_widths[5][i] = widths[2]; - data_widths[7][i] = widths[3]; - } else { - getRSSwidths(v_odd[i], modules_odd[data_group[i]], 4, widest_odd[data_group[i]], 0); - data_widths[0][i] = widths[0]; - data_widths[2][i] = widths[1]; - data_widths[4][i] = widths[2]; - data_widths[6][i] = widths[3]; - getRSSwidths(v_even[i], modules_even[data_group[i]], 4, widest_even[data_group[i]], 1); - data_widths[1][i] = widths[0]; - data_widths[3][i] = widths[1]; - data_widths[5][i] = widths[2]; - data_widths[7][i] = widths[3]; - } - } - - - checksum = 0; - /* Calculate the checksum */ - for(i = 0; i < 8; i++) { - checksum += checksum_weight[i] * data_widths[i][0]; - checksum += checksum_weight[i+8] * data_widths[i][1]; - checksum += checksum_weight[i+16] * data_widths[i][2]; - checksum += checksum_weight[i+24] * data_widths[i][3]; - } - checksum %= 79; - - /* Calculate the two check characters */ - if(checksum >= 8) { checksum++; } - if(checksum >= 72) { checksum++; } - c_left = checksum / 9; - c_right = checksum % 9; - - /* Put element widths together */ - total_widths[0] = 1; - total_widths[1] = 1; - total_widths[44] = 1; - total_widths[45] = 1; - for(i = 0; i < 8; i++) { - total_widths[i + 2] = data_widths[i][0]; - total_widths[i + 15] = data_widths[7 - i][1]; - total_widths[i + 23] = data_widths[i][3]; - total_widths[i + 36] = data_widths[7 - i][2]; - } - for(i = 0; i < 5; i++) { - total_widths[i + 10] = finder_pattern[i + (5 * c_left)]; - total_widths[i + 31] = finder_pattern[(4 - i) + (5 * c_right)]; - } - - /* Put this data into the symbol */ - if((symbol->symbology == BARCODE_RSS14) || (symbol->symbology == BARCODE_RSS14_CC)) { - writer = 0; - latch = '0'; - for(i = 0; i < 46; i++) { - for(j = 0; j < total_widths[i]; j++) { - if(latch == '1') { set_module(symbol, symbol->rows, writer); } - writer++; - } - if(latch == '1') { - latch = '0'; - } else { - latch = '1'; - } - } - if(symbol->width < writer) { symbol->width = writer; } - if(symbol->symbology == BARCODE_RSS14_CC) { - /* separator pattern for composite symbol */ - for(i = 4; i < 92; i++) { - if(!(module_is_set(symbol, separator_row + 1, i))) { - set_module(symbol, separator_row, i); } - } - latch = '1'; - for(i = 16; i < 32; i++) { - if(!(module_is_set(symbol, separator_row + 1, i))) { - if(latch == '1') { - set_module(symbol, separator_row, i); - latch = '0'; - } else { - unset_module(symbol, separator_row, i); - latch = '1'; - } - } else { - unset_module(symbol, separator_row, i); - latch = '1'; - } - } - latch = '1'; - for(i = 63; i < 78; i++) { - if(!(module_is_set(symbol, separator_row + 1, i))) { - if(latch == '1') { - set_module(symbol, separator_row, i); - latch = '0'; - } else { - unset_module(symbol, separator_row, i); - latch = '1'; - } - } else { - unset_module(symbol, separator_row, i); - latch = '1'; - } - } - } - symbol->rows = symbol->rows + 1; - - count = 0; - check_digit = 0; - - /* Calculate check digit from Annex A and place human readable text */ - ustrcpy(symbol->text, (unsigned char*)"(01)"); - for(i = 0; i < 14; i++) { - hrt[i] = '0'; - } - for(i = 0; i < src_len; i++) { - hrt[12 - i] = source[src_len - i - 1]; - } - hrt[14] = '\0'; - - for (i = 0; i < 13; i++) { - count += ctoi(hrt[i]); + if (src_len > 13) { + strcpy(symbol->errtxt, "Input too long"); + return ZINT_ERROR_TOO_LONG; + } + error_number = is_sane(NEON, source, src_len); + if (error_number == ZINT_ERROR_INVALID_DATA) { + strcpy(symbol->errtxt, "Invalid characters in data"); + return error_number; + } - if (!(i & 1)) { - count += 2 * (ctoi(hrt[i])); - } - } + /* make some room for a separator row for composite symbols */ + switch (symbol->symbology) { + case BARCODE_RSS14_CC: + case BARCODE_RSS14STACK_CC: + case BARCODE_RSS14_OMNI_CC: + separator_row = symbol->rows; + symbol->row_height[separator_row] = 1; + symbol->rows += 1; + break; + } - check_digit = 10 - (count%10); - if (check_digit == 10) { check_digit = 0; } - hrt[13] = itoc(check_digit); - - uconcat(symbol->text, (unsigned char*)hrt); - } - - if((symbol->symbology == BARCODE_RSS14STACK) || (symbol->symbology == BARCODE_RSS14STACK_CC)) { - /* top row */ - writer = 0; - latch = '0'; - for(i = 0; i < 23; i++) { - for(j = 0; j < total_widths[i]; j++) { - if(latch == '1') { - set_module(symbol, symbol->rows, writer); - } else { - unset_module(symbol, symbol->rows, writer); - } - writer++; - } - if(latch == '1') { - latch = '0'; - } else { - latch = '1'; - } - } - set_module(symbol, symbol->rows, writer); - unset_module(symbol, symbol->rows, writer + 1); - symbol->row_height[symbol->rows] = 5; - /* bottom row */ - symbol->rows = symbol->rows + 2; - set_module(symbol, symbol->rows, 0); - unset_module(symbol, symbol->rows, 1); - writer = 0; - latch = '1'; - for(i = 23; i < 46; i++) { - for(j = 0; j < total_widths[i]; j++) { - if(latch == '1') { - set_module(symbol, symbol->rows, writer + 2); - } else { - unset_module(symbol, symbol->rows, writer + 2); - } - writer++; - } - if(latch == '1') { - latch = '0'; - } else { - latch = '1'; - } - } - symbol->row_height[symbol->rows] = 7; - /* separator pattern */ - for(i = 4; i < 46; i++) { - if(module_is_set(symbol, symbol->rows - 2, i) == module_is_set(symbol, symbol->rows, i)) { - if(!(module_is_set(symbol, symbol->rows - 2, i))) { - set_module(symbol, symbol->rows - 1, i); - } - } else { - if(!(module_is_set(symbol, symbol->rows - 1, i - 1))) { - set_module(symbol, symbol->rows - 1, i); - } - } - } - symbol->row_height[symbol->rows - 1] = 1; - if(symbol->symbology == BARCODE_RSS14STACK_CC) { - /* separator pattern for composite symbol */ - for(i = 4; i < 46; i++) { - if(!(module_is_set(symbol, separator_row + 1, i))) { - set_module(symbol, separator_row, i); - } - } - latch = '1'; - for(i = 16; i < 32; i++) { - if(!(module_is_set(symbol, separator_row + 1, i))) { - if(latch == '1') { - set_module(symbol, separator_row, i); - latch = '0'; - } else { - unset_module(symbol, separator_row, i); - latch = '1'; - } - } else { - unset_module(symbol, separator_row, i); - latch = '1'; - } - } - } - symbol->rows = symbol->rows + 1; - if(symbol->width < 50) { symbol->width = 50; } - } + for (i = 0; i < 112; i++) { + accum[i] = 0; + x_reg[i] = 0; + y_reg[i] = 0; + } - if((symbol->symbology == BARCODE_RSS14STACK_OMNI) || (symbol->symbology == BARCODE_RSS14_OMNI_CC)) { - /* top row */ - writer = 0; - latch = '0'; - for(i = 0; i < 23; i++) { - for(j = 0; j < total_widths[i]; j++) { - if(latch == '1') { set_module(symbol, symbol->rows, writer); } else { unset_module(symbol, symbol->rows, writer); } - writer++; - } - latch = (latch == '1' ? '0' : '1'); - } - set_module(symbol, symbol->rows, writer); - unset_module(symbol, symbol->rows, writer + 1); - /* bottom row */ - symbol->rows = symbol->rows + 4; - set_module(symbol, symbol->rows, 0); - unset_module(symbol, symbol->rows, 1); - writer = 0; - latch = '1'; - for(i = 23; i < 46; i++) { - for(j = 0; j < total_widths[i]; j++) { - if(latch == '1') { set_module(symbol, symbol->rows, writer + 2); } else { unset_module(symbol, symbol->rows, writer + 2); } - writer++; - } - if(latch == '1') { - latch = '0'; - } else { - latch = '1'; - } - } - /* middle separator */ - for(i = 5; i < 46; i += 2) { - set_module(symbol, symbol->rows - 2, i); - } - symbol->row_height[symbol->rows - 2] = 1; - /* top separator */ - for(i = 4; i < 46; i++) { - if(!(module_is_set(symbol, symbol->rows - 4, i))) { - set_module(symbol, symbol->rows - 3, i); - } - } - latch = '1'; - for(i = 17; i < 33; i++) { - if(!(module_is_set(symbol, symbol->rows - 4, i))) { - if(latch == '1') { - set_module(symbol, symbol->rows - 3, i); - latch = '0'; - } else { - unset_module(symbol, symbol->rows - 3, i); - latch = '1'; - } - } else { - unset_module(symbol, symbol->rows - 3, i); - latch = '1'; - } - } - symbol->row_height[symbol->rows - 3] = 1; - /* bottom separator */ - for(i = 4; i < 46; i++) { - if(!(module_is_set(symbol, symbol->rows, i))) { - set_module(symbol, symbol->rows - 1, i); - } - } - latch = '1'; - for(i = 16; i < 32; i++) { - if(!(module_is_set(symbol, symbol->rows, i))) { - if(latch == '1') { - set_module(symbol, symbol->rows - 1, i); - latch = '0'; - } else { - unset_module(symbol, symbol->rows - 1, i); - latch = '1'; - } - } else { - unset_module(symbol, symbol->rows - 1, i); - latch = '1'; - } - } - symbol->row_height[symbol->rows - 1] = 1; - if(symbol->width < 50) { symbol->width = 50; } - if(symbol->symbology == BARCODE_RSS14_OMNI_CC) { - /* separator pattern for composite symbol */ - for(i = 4; i < 46; i++) { - if(!(module_is_set(symbol, separator_row + 1, i))) { - set_module(symbol, separator_row, i); - } - } - latch = '1'; - for(i = 16; i < 32; i++) { - if(!(module_is_set(symbol, separator_row + 1, i))) { - if(latch == '1') { - set_module(symbol, separator_row, i); - latch = '0'; - } else { - unset_module(symbol, separator_row, i); - latch = '1'; - } - } else { - unset_module(symbol, separator_row, i); - latch = '1'; - } - } - } - symbol->rows = symbol->rows + 1; - } + for (i = 0; i < 4; i++) { + data_character[i] = 0; + data_group[i] = 0; + } - - return error_number; + binary_load(accum, (char*) source, src_len); + strcpy(temp, "10000000000000"); + if (symbol->option_1 == 2) { + /* Add symbol linkage flag */ + binary_load(y_reg, temp, strlen(temp)); + binary_add(accum, y_reg); + for (i = 0; i < 112; i++) { + y_reg[i] = 0; + } + } + + /* Calculate left and right pair values */ + strcpy(temp, "4537077"); + binary_load(x_reg, temp, strlen(temp)); + + for (i = 0; i < 24; i++) { + shiftup(x_reg); + } + + for (i = 24; i >= 0; i--) { + y_reg[i] = islarger(accum, x_reg); + if (y_reg[i] == 1) { + binary_subtract(accum, x_reg); + } + shiftdown(x_reg); + } + + for (i = 0; i < 112; i++) { + left_reg[i] = y_reg[i]; + right_reg[i] = accum[i]; + } + + /* Calculate four data characters */ + strcpy(temp, "1597"); + binary_load(x_reg, temp, strlen(temp)); + for (i = 0; i < 112; i++) { + accum[i] = left_reg[i]; + } + + for (i = 0; i < 24; i++) { + shiftup(x_reg); + } + + for (i = 24; i >= 0; i--) { + y_reg[i] = islarger(accum, x_reg); + if (y_reg[i] == 1) { + binary_subtract(accum, x_reg); + } + shiftdown(x_reg); + } + + data_character[0] = 0; + data_character[1] = 0; + mask = 0x2000; + for (i = 13; i >= 0; i--) { + if (y_reg[i] == 1) { + data_character[0] += mask; + } + if (accum[i] == 1) { + data_character[1] += mask; + } + mask = mask >> 1; + } + strcpy(temp, "1597"); + binary_load(x_reg, temp, strlen(temp)); + for (i = 0; i < 112; i++) { + accum[i] = right_reg[i]; + } + + for (i = 0; i < 24; i++) { + shiftup(x_reg); + } + + for (i = 24; i >= 0; i--) { + y_reg[i] = islarger(accum, x_reg); + if (y_reg[i] == 1) { + binary_subtract(accum, x_reg); + } + shiftdown(x_reg); + } + + data_character[2] = 0; + data_character[3] = 0; + mask = 0x2000; + for (i = 13; i >= 0; i--) { + if (y_reg[i] == 1) { + data_character[2] += mask; + } + if (accum[i] == 1) { + data_character[3] += mask; + } + mask = mask >> 1; + } + + /* Calculate odd and even subset values */ + + if ((data_character[0] >= 0) && (data_character[0] <= 160)) { + data_group[0] = 0; + } + if ((data_character[0] >= 161) && (data_character[0] <= 960)) { + data_group[0] = 1; + } + if ((data_character[0] >= 961) && (data_character[0] <= 2014)) { + data_group[0] = 2; + } + if ((data_character[0] >= 2015) && (data_character[0] <= 2714)) { + data_group[0] = 3; + } + if ((data_character[0] >= 2715) && (data_character[0] <= 2840)) { + data_group[0] = 4; + } + if ((data_character[1] >= 0) && (data_character[1] <= 335)) { + data_group[1] = 5; + } + if ((data_character[1] >= 336) && (data_character[1] <= 1035)) { + data_group[1] = 6; + } + if ((data_character[1] >= 1036) && (data_character[1] <= 1515)) { + data_group[1] = 7; + } + if ((data_character[1] >= 1516) && (data_character[1] <= 1596)) { + data_group[1] = 8; + } + if ((data_character[3] >= 0) && (data_character[3] <= 335)) { + data_group[3] = 5; + } + if ((data_character[3] >= 336) && (data_character[3] <= 1035)) { + data_group[3] = 6; + } + if ((data_character[3] >= 1036) && (data_character[3] <= 1515)) { + data_group[3] = 7; + } + if ((data_character[3] >= 1516) && (data_character[3] <= 1596)) { + data_group[3] = 8; + } + if ((data_character[2] >= 0) && (data_character[2] <= 160)) { + data_group[2] = 0; + } + if ((data_character[2] >= 161) && (data_character[2] <= 960)) { + data_group[2] = 1; + } + if ((data_character[2] >= 961) && (data_character[2] <= 2014)) { + data_group[2] = 2; + } + if ((data_character[2] >= 2015) && (data_character[2] <= 2714)) { + data_group[2] = 3; + } + if ((data_character[2] >= 2715) && (data_character[2] <= 2840)) { + data_group[2] = 4; + } + + v_odd[0] = (data_character[0] - g_sum_table[data_group[0]]) / t_table[data_group[0]]; + v_even[0] = (data_character[0] - g_sum_table[data_group[0]]) % t_table[data_group[0]]; + v_odd[1] = (data_character[1] - g_sum_table[data_group[1]]) % t_table[data_group[1]]; + v_even[1] = (data_character[1] - g_sum_table[data_group[1]]) / t_table[data_group[1]]; + v_odd[3] = (data_character[3] - g_sum_table[data_group[3]]) % t_table[data_group[3]]; + v_even[3] = (data_character[3] - g_sum_table[data_group[3]]) / t_table[data_group[3]]; + v_odd[2] = (data_character[2] - g_sum_table[data_group[2]]) / t_table[data_group[2]]; + v_even[2] = (data_character[2] - g_sum_table[data_group[2]]) % t_table[data_group[2]]; + + + /* Use RSS subset width algorithm */ + for (i = 0; i < 4; i++) { + if ((i == 0) || (i == 2)) { + getRSSwidths(v_odd[i], modules_odd[data_group[i]], 4, widest_odd[data_group[i]], 1); + data_widths[0][i] = widths[0]; + data_widths[2][i] = widths[1]; + data_widths[4][i] = widths[2]; + data_widths[6][i] = widths[3]; + getRSSwidths(v_even[i], modules_even[data_group[i]], 4, widest_even[data_group[i]], 0); + data_widths[1][i] = widths[0]; + data_widths[3][i] = widths[1]; + data_widths[5][i] = widths[2]; + data_widths[7][i] = widths[3]; + } else { + getRSSwidths(v_odd[i], modules_odd[data_group[i]], 4, widest_odd[data_group[i]], 0); + data_widths[0][i] = widths[0]; + data_widths[2][i] = widths[1]; + data_widths[4][i] = widths[2]; + data_widths[6][i] = widths[3]; + getRSSwidths(v_even[i], modules_even[data_group[i]], 4, widest_even[data_group[i]], 1); + data_widths[1][i] = widths[0]; + data_widths[3][i] = widths[1]; + data_widths[5][i] = widths[2]; + data_widths[7][i] = widths[3]; + } + } + + + checksum = 0; + /* Calculate the checksum */ + for (i = 0; i < 8; i++) { + checksum += checksum_weight[i] * data_widths[i][0]; + checksum += checksum_weight[i + 8] * data_widths[i][1]; + checksum += checksum_weight[i + 16] * data_widths[i][2]; + checksum += checksum_weight[i + 24] * data_widths[i][3]; + } + checksum %= 79; + + /* Calculate the two check characters */ + if (checksum >= 8) { + checksum++; + } + if (checksum >= 72) { + checksum++; + } + c_left = checksum / 9; + c_right = checksum % 9; + + /* Put element widths together */ + total_widths[0] = 1; + total_widths[1] = 1; + total_widths[44] = 1; + total_widths[45] = 1; + for (i = 0; i < 8; i++) { + total_widths[i + 2] = data_widths[i][0]; + total_widths[i + 15] = data_widths[7 - i][1]; + total_widths[i + 23] = data_widths[i][3]; + total_widths[i + 36] = data_widths[7 - i][2]; + } + for (i = 0; i < 5; i++) { + total_widths[i + 10] = finder_pattern[i + (5 * c_left)]; + total_widths[i + 31] = finder_pattern[(4 - i) + (5 * c_right)]; + } + + /* Put this data into the symbol */ + if ((symbol->symbology == BARCODE_RSS14) || (symbol->symbology == BARCODE_RSS14_CC)) { + writer = 0; + latch = '0'; + for (i = 0; i < 46; i++) { + for (j = 0; j < total_widths[i]; j++) { + if (latch == '1') { + set_module(symbol, symbol->rows, writer); + } + writer++; + } + if (latch == '1') { + latch = '0'; + } else { + latch = '1'; + } + } + if (symbol->width < writer) { + symbol->width = writer; + } + if (symbol->symbology == BARCODE_RSS14_CC) { + /* separator pattern for composite symbol */ + for (i = 4; i < 92; i++) { + if (!(module_is_set(symbol, separator_row + 1, i))) { + set_module(symbol, separator_row, i); + } + } + latch = '1'; + for (i = 16; i < 32; i++) { + if (!(module_is_set(symbol, separator_row + 1, i))) { + if (latch == '1') { + set_module(symbol, separator_row, i); + latch = '0'; + } else { + unset_module(symbol, separator_row, i); + latch = '1'; + } + } else { + unset_module(symbol, separator_row, i); + latch = '1'; + } + } + latch = '1'; + for (i = 63; i < 78; i++) { + if (!(module_is_set(symbol, separator_row + 1, i))) { + if (latch == '1') { + set_module(symbol, separator_row, i); + latch = '0'; + } else { + unset_module(symbol, separator_row, i); + latch = '1'; + } + } else { + unset_module(symbol, separator_row, i); + latch = '1'; + } + } + } + symbol->rows = symbol->rows + 1; + + count = 0; + check_digit = 0; + + /* Calculate check digit from Annex A and place human readable text */ + ustrcpy(symbol->text, (unsigned char*) "(01)"); + for (i = 0; i < 14; i++) { + hrt[i] = '0'; + } + for (i = 0; i < src_len; i++) { + hrt[12 - i] = source[src_len - i - 1]; + } + hrt[14] = '\0'; + + for (i = 0; i < 13; i++) { + count += ctoi(hrt[i]); + + if (!(i & 1)) { + count += 2 * (ctoi(hrt[i])); + } + } + + check_digit = 10 - (count % 10); + if (check_digit == 10) { + check_digit = 0; + } + hrt[13] = itoc(check_digit); + + uconcat(symbol->text, (unsigned char*) hrt); + } + + if ((symbol->symbology == BARCODE_RSS14STACK) || (symbol->symbology == BARCODE_RSS14STACK_CC)) { + /* top row */ + writer = 0; + latch = '0'; + for (i = 0; i < 23; i++) { + for (j = 0; j < total_widths[i]; j++) { + if (latch == '1') { + set_module(symbol, symbol->rows, writer); + } else { + unset_module(symbol, symbol->rows, writer); + } + writer++; + } + if (latch == '1') { + latch = '0'; + } else { + latch = '1'; + } + } + set_module(symbol, symbol->rows, writer); + unset_module(symbol, symbol->rows, writer + 1); + symbol->row_height[symbol->rows] = 5; + /* bottom row */ + symbol->rows = symbol->rows + 2; + set_module(symbol, symbol->rows, 0); + unset_module(symbol, symbol->rows, 1); + writer = 0; + latch = '1'; + for (i = 23; i < 46; i++) { + for (j = 0; j < total_widths[i]; j++) { + if (latch == '1') { + set_module(symbol, symbol->rows, writer + 2); + } else { + unset_module(symbol, symbol->rows, writer + 2); + } + writer++; + } + if (latch == '1') { + latch = '0'; + } else { + latch = '1'; + } + } + symbol->row_height[symbol->rows] = 7; + /* separator pattern */ + for (i = 4; i < 46; i++) { + if (module_is_set(symbol, symbol->rows - 2, i) == module_is_set(symbol, symbol->rows, i)) { + if (!(module_is_set(symbol, symbol->rows - 2, i))) { + set_module(symbol, symbol->rows - 1, i); + } + } else { + if (!(module_is_set(symbol, symbol->rows - 1, i - 1))) { + set_module(symbol, symbol->rows - 1, i); + } + } + } + symbol->row_height[symbol->rows - 1] = 1; + if (symbol->symbology == BARCODE_RSS14STACK_CC) { + /* separator pattern for composite symbol */ + for (i = 4; i < 46; i++) { + if (!(module_is_set(symbol, separator_row + 1, i))) { + set_module(symbol, separator_row, i); + } + } + latch = '1'; + for (i = 16; i < 32; i++) { + if (!(module_is_set(symbol, separator_row + 1, i))) { + if (latch == '1') { + set_module(symbol, separator_row, i); + latch = '0'; + } else { + unset_module(symbol, separator_row, i); + latch = '1'; + } + } else { + unset_module(symbol, separator_row, i); + latch = '1'; + } + } + } + symbol->rows = symbol->rows + 1; + if (symbol->width < 50) { + symbol->width = 50; + } + } + + if ((symbol->symbology == BARCODE_RSS14STACK_OMNI) || (symbol->symbology == BARCODE_RSS14_OMNI_CC)) { + /* top row */ + writer = 0; + latch = '0'; + for (i = 0; i < 23; i++) { + for (j = 0; j < total_widths[i]; j++) { + if (latch == '1') { + set_module(symbol, symbol->rows, writer); + } else { + unset_module(symbol, symbol->rows, writer); + } + writer++; + } + latch = (latch == '1' ? '0' : '1'); + } + set_module(symbol, symbol->rows, writer); + unset_module(symbol, symbol->rows, writer + 1); + /* bottom row */ + symbol->rows = symbol->rows + 4; + set_module(symbol, symbol->rows, 0); + unset_module(symbol, symbol->rows, 1); + writer = 0; + latch = '1'; + for (i = 23; i < 46; i++) { + for (j = 0; j < total_widths[i]; j++) { + if (latch == '1') { + set_module(symbol, symbol->rows, writer + 2); + } else { + unset_module(symbol, symbol->rows, writer + 2); + } + writer++; + } + if (latch == '1') { + latch = '0'; + } else { + latch = '1'; + } + } + /* middle separator */ + for (i = 5; i < 46; i += 2) { + set_module(symbol, symbol->rows - 2, i); + } + symbol->row_height[symbol->rows - 2] = 1; + /* top separator */ + for (i = 4; i < 46; i++) { + if (!(module_is_set(symbol, symbol->rows - 4, i))) { + set_module(symbol, symbol->rows - 3, i); + } + } + latch = '1'; + for (i = 17; i < 33; i++) { + if (!(module_is_set(symbol, symbol->rows - 4, i))) { + if (latch == '1') { + set_module(symbol, symbol->rows - 3, i); + latch = '0'; + } else { + unset_module(symbol, symbol->rows - 3, i); + latch = '1'; + } + } else { + unset_module(symbol, symbol->rows - 3, i); + latch = '1'; + } + } + symbol->row_height[symbol->rows - 3] = 1; + /* bottom separator */ + for (i = 4; i < 46; i++) { + if (!(module_is_set(symbol, symbol->rows, i))) { + set_module(symbol, symbol->rows - 1, i); + } + } + latch = '1'; + for (i = 16; i < 32; i++) { + if (!(module_is_set(symbol, symbol->rows, i))) { + if (latch == '1') { + set_module(symbol, symbol->rows - 1, i); + latch = '0'; + } else { + unset_module(symbol, symbol->rows - 1, i); + latch = '1'; + } + } else { + unset_module(symbol, symbol->rows - 1, i); + latch = '1'; + } + } + symbol->row_height[symbol->rows - 1] = 1; + if (symbol->width < 50) { + symbol->width = 50; + } + if (symbol->symbology == BARCODE_RSS14_OMNI_CC) { + /* separator pattern for composite symbol */ + for (i = 4; i < 46; i++) { + if (!(module_is_set(symbol, separator_row + 1, i))) { + set_module(symbol, separator_row, i); + } + } + latch = '1'; + for (i = 16; i < 32; i++) { + if (!(module_is_set(symbol, separator_row + 1, i))) { + if (latch == '1') { + set_module(symbol, separator_row, i); + latch = '0'; + } else { + unset_module(symbol, separator_row, i); + latch = '1'; + } + } else { + unset_module(symbol, separator_row, i); + latch = '1'; + } + } + } + symbol->rows = symbol->rows + 1; + } + + + return error_number; } -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], temp[32]; - int separator_row; +/* GS1 DataBar Limited */ +int rsslimited(struct zint_symbol *symbol, unsigned char source[], int src_len) { + 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], temp[32]; + int separator_row; - separator_row = 0; - - if(src_len > 13) { - strcpy(symbol->errtxt, "Input too long"); - return ZINT_ERROR_TOO_LONG; - } - error_number = is_sane(NEON, source, src_len); - if(error_number == ZINT_ERROR_INVALID_DATA) { - strcpy(symbol->errtxt, "Invalid characters in data"); - return error_number; - } - if(src_len == 13) { - if((source[0] != '0') && (source[0] != '1')) { - strcpy(symbol->errtxt, "Input out of range"); - return ZINT_ERROR_INVALID_DATA; - } - } - - /* make some room for a separator row for composite symbols */ - if(symbol->symbology == BARCODE_RSS_LTD_CC) { - separator_row = symbol->rows; - symbol->row_height[separator_row] = 1; - symbol->rows += 1; - } + separator_row = 0; - for(i = 0; i < 112; i++) { - accum[i] = 0; - x_reg[i] = 0; - y_reg[i] = 0; - } - - binary_load(accum, (char*)source, src_len); - if(symbol->option_1 == 2) { - /* Add symbol linkage flag */ - 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; - } - } - - /* Calculate left and right pair values */ - strcpy(temp, "2013571"); - binary_load(x_reg, temp, strlen(temp)); - - for(i = 0; i < 24; i++) { - shiftup(x_reg); - } - - for(i = 24; i >= 0; i--) { - y_reg[i] = islarger(accum, x_reg); - if(y_reg[i] == 1) { - binary_subtract(accum, x_reg); - } - shiftdown(x_reg); - } - - for(i = 0; i < 112; i++) { - left_reg[i] = y_reg[i]; - right_reg[i] = accum[i]; - } - - left_group = 0; - strcpy(temp, "183063"); - binary_load(accum, temp, strlen(temp)); - if(islarger(left_reg, accum)) { left_group = 1; } - strcpy(temp, "820063"); - binary_load(accum, temp, strlen(temp)); - if(islarger(left_reg, accum)) { left_group = 2; } - strcpy(temp, "1000775"); - binary_load(accum, temp, strlen(temp)); - if(islarger(left_reg, accum)) { left_group = 3; } - strcpy(temp, "1491020"); - binary_load(accum, temp, strlen(temp)); - if(islarger(left_reg, accum)) { left_group = 4; } - strcpy(temp, "1979844"); - binary_load(accum, temp, strlen(temp)); - if(islarger(left_reg, accum)) { left_group = 5; } - strcpy(temp, "1996938"); - binary_load(accum, temp, strlen(temp)); - if(islarger(left_reg, accum)) { left_group = 6; } - right_group = 0; - strcpy(temp, "183063"); - binary_load(accum, temp, strlen(temp)); - if(islarger(right_reg, accum)) { right_group = 1; } - strcpy(temp, "820063"); - binary_load(accum, temp, strlen(temp)); - if(islarger(right_reg, accum)) { right_group = 2; } - strcpy(temp, "1000775"); - binary_load(accum, temp, strlen(temp)); - if(islarger(right_reg, accum)) { right_group = 3; } - strcpy(temp, "1491020"); - binary_load(accum, temp, strlen(temp)); - if(islarger(right_reg, accum)) { right_group = 4; } - strcpy(temp, "1979844"); - binary_load(accum, temp, strlen(temp)); - if(islarger(right_reg, accum)) { right_group = 5; } - strcpy(temp, "1996938"); - binary_load(accum, temp, strlen(temp)); - if(islarger(right_reg, accum)) { right_group = 6; } - - switch(left_group) { - case 1: strcpy(temp, "183064"); - binary_load(accum, temp, strlen(temp)); - binary_subtract(left_reg, accum); - break; - case 2: strcpy(temp, "820064"); - binary_load(accum, temp, strlen(temp)); - binary_subtract(left_reg, accum); - break; - case 3: strcpy(temp, "1000776"); - binary_load(accum, temp, strlen(temp)); - binary_subtract(left_reg, accum); - break; - case 4: strcpy(temp, "1491021"); - binary_load(accum, temp, strlen(temp)); - binary_subtract(left_reg, accum); - break; - case 5: strcpy(temp, "1979845"); - binary_load(accum, temp, strlen(temp)); - binary_subtract(left_reg, accum); - break; - case 6: strcpy(temp, "1996939"); - binary_load(accum, temp, strlen(temp)); - binary_subtract(left_reg, accum); - break; - } - - switch(right_group) { - 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; - } + if (src_len > 13) { + strcpy(symbol->errtxt, "Input too long"); + return ZINT_ERROR_TOO_LONG; + } + error_number = is_sane(NEON, source, src_len); + if (error_number == ZINT_ERROR_INVALID_DATA) { + strcpy(symbol->errtxt, "Invalid characters in data"); + return error_number; + } + if (src_len == 13) { + if ((source[0] != '0') && (source[0] != '1')) { + strcpy(symbol->errtxt, "Input out of range"); + return ZINT_ERROR_INVALID_DATA; + } + } - left_character = 0; - right_character = 0; - mask = 0x800000; - for(i = 23; i >= 0; i--) { - if(left_reg[i] == 1) { - left_character += mask; - } - if(right_reg[i] == 1) { - right_character += mask; - } - mask = mask >> 1; - } - - left_odd = left_character / t_even_ltd[left_group]; - left_even = left_character % t_even_ltd[left_group]; - right_odd = right_character / t_even_ltd[right_group]; - right_even = right_character % t_even_ltd[right_group]; - - getRSSwidths(left_odd, modules_odd_ltd[left_group], 7, widest_odd_ltd[left_group], 1); - left_widths[0] = widths[0]; - left_widths[2] = widths[1]; - left_widths[4] = widths[2]; - left_widths[6] = widths[3]; - left_widths[8] = widths[4]; - left_widths[10] = widths[5]; - left_widths[12] = widths[6]; - getRSSwidths(left_even, modules_even_ltd[left_group], 7, widest_even_ltd[left_group], 0); - left_widths[1] = widths[0]; - left_widths[3] = widths[1]; - left_widths[5] = widths[2]; - left_widths[7] = widths[3]; - left_widths[9] = widths[4]; - left_widths[11] = widths[5]; - left_widths[13] = widths[6]; - getRSSwidths(right_odd, modules_odd_ltd[right_group], 7, widest_odd_ltd[right_group], 1); - right_widths[0] = widths[0]; - right_widths[2] = widths[1]; - right_widths[4] = widths[2]; - right_widths[6] = widths[3]; - right_widths[8] = widths[4]; - right_widths[10] = widths[5]; - right_widths[12] = widths[6]; - getRSSwidths(right_even, modules_even_ltd[right_group], 7, widest_even_ltd[right_group], 0); - right_widths[1] = widths[0]; - right_widths[3] = widths[1]; - right_widths[5] = widths[2]; - right_widths[7] = widths[3]; - right_widths[9] = widths[4]; - right_widths[11] = widths[5]; - right_widths[13] = widths[6]; - - checksum = 0; - /* Calculate the checksum */ - for(i = 0; i < 14; i++) { - checksum += checksum_weight_ltd[i] * left_widths[i]; - checksum += checksum_weight_ltd[i + 14] * right_widths[i]; - } - checksum %= 89; - - for(i = 0; i < 14; i++) { - check_elements[i] = finder_pattern_ltd[i + (checksum * 14)]; - } - - total_widths[0] = 1; - total_widths[1] = 1; - total_widths[44] = 1; - total_widths[45] = 1; - for(i = 0; i < 14; i++) { - total_widths[i + 2] = left_widths[i]; - total_widths[i + 16] = check_elements[i]; - total_widths[i + 30] = right_widths[i]; - } - - writer = 0; - latch = '0'; - for(i = 0; i < 46; i++) { - for(j = 0; j < total_widths[i]; j++) { - if(latch == '1') { set_module(symbol, symbol->rows, writer); } else { unset_module(symbol, symbol->rows, writer); } - writer++; - } - latch = (latch == '1' ? '0' : '1'); - } - if(symbol->width < writer) { symbol->width = writer; } - symbol->rows = symbol->rows + 1; - - /* add separator pattern if composite symbol */ - if(symbol->symbology == BARCODE_RSS_LTD_CC) { - for(i = 4; i < 70; i++) { - if(!(module_is_set(symbol, separator_row + 1, i))) { - set_module(symbol, separator_row, i); - } - } - } + /* make some room for a separator row for composite symbols */ + if (symbol->symbology == BARCODE_RSS_LTD_CC) { + separator_row = symbol->rows; + symbol->row_height[separator_row] = 1; + symbol->rows += 1; + } - /* Calculate check digit from Annex A and place human readable text */ - - check_digit = 0; - count = 0; - - ustrcpy(symbol->text, (unsigned char*)"(01)"); - for(i = 0; i < 14; i++) { - hrt[i] = '0'; - } - for(i = 0; i < src_len; i++) { - hrt[12 - i] = source[src_len - i - 1]; - } - - for (i = 0; i < 13; i++) { - count += ctoi(hrt[i]); + for (i = 0; i < 112; i++) { + accum[i] = 0; + x_reg[i] = 0; + y_reg[i] = 0; + } - if (!(i & 1)) { - count += 2 * (ctoi(hrt[i])); - } - } + binary_load(accum, (char*) source, src_len); + if (symbol->option_1 == 2) { + /* Add symbol linkage flag */ + 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; + } + } - check_digit = 10 - (count%10); - if (check_digit == 10) { check_digit = 0; } - - hrt[13] = itoc(check_digit); - hrt[14] = '\0'; - - uconcat(symbol->text, (unsigned char*)hrt); - - return error_number; + /* Calculate left and right pair values */ + strcpy(temp, "2013571"); + binary_load(x_reg, temp, strlen(temp)); + + for (i = 0; i < 24; i++) { + shiftup(x_reg); + } + + for (i = 24; i >= 0; i--) { + y_reg[i] = islarger(accum, x_reg); + if (y_reg[i] == 1) { + binary_subtract(accum, x_reg); + } + shiftdown(x_reg); + } + + for (i = 0; i < 112; i++) { + left_reg[i] = y_reg[i]; + right_reg[i] = accum[i]; + } + + left_group = 0; + strcpy(temp, "183063"); + binary_load(accum, temp, strlen(temp)); + if (islarger(left_reg, accum)) { + left_group = 1; + } + strcpy(temp, "820063"); + binary_load(accum, temp, strlen(temp)); + if (islarger(left_reg, accum)) { + left_group = 2; + } + strcpy(temp, "1000775"); + binary_load(accum, temp, strlen(temp)); + if (islarger(left_reg, accum)) { + left_group = 3; + } + strcpy(temp, "1491020"); + binary_load(accum, temp, strlen(temp)); + if (islarger(left_reg, accum)) { + left_group = 4; + } + strcpy(temp, "1979844"); + binary_load(accum, temp, strlen(temp)); + if (islarger(left_reg, accum)) { + left_group = 5; + } + strcpy(temp, "1996938"); + binary_load(accum, temp, strlen(temp)); + if (islarger(left_reg, accum)) { + left_group = 6; + } + right_group = 0; + strcpy(temp, "183063"); + binary_load(accum, temp, strlen(temp)); + if (islarger(right_reg, accum)) { + right_group = 1; + } + strcpy(temp, "820063"); + binary_load(accum, temp, strlen(temp)); + if (islarger(right_reg, accum)) { + right_group = 2; + } + strcpy(temp, "1000775"); + binary_load(accum, temp, strlen(temp)); + if (islarger(right_reg, accum)) { + right_group = 3; + } + strcpy(temp, "1491020"); + binary_load(accum, temp, strlen(temp)); + if (islarger(right_reg, accum)) { + right_group = 4; + } + strcpy(temp, "1979844"); + binary_load(accum, temp, strlen(temp)); + if (islarger(right_reg, accum)) { + right_group = 5; + } + strcpy(temp, "1996938"); + binary_load(accum, temp, strlen(temp)); + if (islarger(right_reg, accum)) { + right_group = 6; + } + + switch (left_group) { + case 1: strcpy(temp, "183064"); + binary_load(accum, temp, strlen(temp)); + binary_subtract(left_reg, accum); + break; + case 2: strcpy(temp, "820064"); + binary_load(accum, temp, strlen(temp)); + binary_subtract(left_reg, accum); + break; + case 3: strcpy(temp, "1000776"); + binary_load(accum, temp, strlen(temp)); + binary_subtract(left_reg, accum); + break; + case 4: strcpy(temp, "1491021"); + binary_load(accum, temp, strlen(temp)); + binary_subtract(left_reg, accum); + break; + case 5: strcpy(temp, "1979845"); + binary_load(accum, temp, strlen(temp)); + binary_subtract(left_reg, accum); + break; + case 6: strcpy(temp, "1996939"); + binary_load(accum, temp, strlen(temp)); + binary_subtract(left_reg, accum); + break; + } + + switch (right_group) { + 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; + right_character = 0; + mask = 0x800000; + for (i = 23; i >= 0; i--) { + if (left_reg[i] == 1) { + left_character += mask; + } + if (right_reg[i] == 1) { + right_character += mask; + } + mask = mask >> 1; + } + + left_odd = left_character / t_even_ltd[left_group]; + left_even = left_character % t_even_ltd[left_group]; + right_odd = right_character / t_even_ltd[right_group]; + right_even = right_character % t_even_ltd[right_group]; + + getRSSwidths(left_odd, modules_odd_ltd[left_group], 7, widest_odd_ltd[left_group], 1); + left_widths[0] = widths[0]; + left_widths[2] = widths[1]; + left_widths[4] = widths[2]; + left_widths[6] = widths[3]; + left_widths[8] = widths[4]; + left_widths[10] = widths[5]; + left_widths[12] = widths[6]; + getRSSwidths(left_even, modules_even_ltd[left_group], 7, widest_even_ltd[left_group], 0); + left_widths[1] = widths[0]; + left_widths[3] = widths[1]; + left_widths[5] = widths[2]; + left_widths[7] = widths[3]; + left_widths[9] = widths[4]; + left_widths[11] = widths[5]; + left_widths[13] = widths[6]; + getRSSwidths(right_odd, modules_odd_ltd[right_group], 7, widest_odd_ltd[right_group], 1); + right_widths[0] = widths[0]; + right_widths[2] = widths[1]; + right_widths[4] = widths[2]; + right_widths[6] = widths[3]; + right_widths[8] = widths[4]; + right_widths[10] = widths[5]; + right_widths[12] = widths[6]; + getRSSwidths(right_even, modules_even_ltd[right_group], 7, widest_even_ltd[right_group], 0); + right_widths[1] = widths[0]; + right_widths[3] = widths[1]; + right_widths[5] = widths[2]; + right_widths[7] = widths[3]; + right_widths[9] = widths[4]; + right_widths[11] = widths[5]; + right_widths[13] = widths[6]; + + checksum = 0; + /* Calculate the checksum */ + for (i = 0; i < 14; i++) { + checksum += checksum_weight_ltd[i] * left_widths[i]; + checksum += checksum_weight_ltd[i + 14] * right_widths[i]; + } + checksum %= 89; + + for (i = 0; i < 14; i++) { + check_elements[i] = finder_pattern_ltd[i + (checksum * 14)]; + } + + total_widths[0] = 1; + total_widths[1] = 1; + total_widths[44] = 1; + total_widths[45] = 1; + for (i = 0; i < 14; i++) { + total_widths[i + 2] = left_widths[i]; + total_widths[i + 16] = check_elements[i]; + total_widths[i + 30] = right_widths[i]; + } + + writer = 0; + latch = '0'; + for (i = 0; i < 46; i++) { + for (j = 0; j < total_widths[i]; j++) { + if (latch == '1') { + set_module(symbol, symbol->rows, writer); + } else { + unset_module(symbol, symbol->rows, writer); + } + writer++; + } + latch = (latch == '1' ? '0' : '1'); + } + if (symbol->width < writer) { + symbol->width = writer; + } + symbol->rows = symbol->rows + 1; + + /* add separator pattern if composite symbol */ + if (symbol->symbology == BARCODE_RSS_LTD_CC) { + for (i = 4; i < 70; i++) { + if (!(module_is_set(symbol, separator_row + 1, i))) { + set_module(symbol, separator_row, i); + } + } + } + + /* Calculate check digit from Annex A and place human readable text */ + + check_digit = 0; + count = 0; + + ustrcpy(symbol->text, (unsigned char*) "(01)"); + for (i = 0; i < 14; i++) { + hrt[i] = '0'; + } + for (i = 0; i < src_len; i++) { + hrt[12 - i] = source[src_len - i - 1]; + } + + for (i = 0; i < 13; i++) { + count += ctoi(hrt[i]); + + if (!(i & 1)) { + count += 2 * (ctoi(hrt[i])); + } + } + + check_digit = 10 - (count % 10); + if (check_digit == 10) { + check_digit = 0; + } + + hrt[13] = itoc(check_digit); + hrt[14] = '\0'; + + uconcat(symbol->text, (unsigned char*) hrt); + + return error_number; } -int general_rules(char field[], char type[]) -{ /* Attempts to apply encoding rules from secions 7.2.5.5.1 to 7.2.5.5.3 - of ISO/IEC 24724:2006 */ - int block[2][200], block_count, i, j, k; - char current, next, last; +/* Attempts to apply encoding rules from secions 7.2.5.5.1 to 7.2.5.5.3 + * of ISO/IEC 24724:2006 */ +int general_rules(char field[], char type[]) { + + int block[2][200], block_count, i, j, k; + char current, next, last; - block_count = 0; - - block[0][block_count] = 1; - block[1][block_count] = type[0]; - - for(i = 1; i < strlen(type); i++) { - current = type[i]; - last = type[i - 1]; - - if(current == last) { - block[0][block_count] = block[0][block_count] + 1; - } else { - block_count++; - block[0][block_count] = 1; - block[1][block_count] = type[i]; - } - } - - block_count++; - - for(i = 0; i < block_count; i++) { - } - - for(i = 0; i < block_count; i++) { - current = block[1][i]; - next = (block[1][i + 1] & 0xFF); - - if((current == ISOIEC) && (i != (block_count - 1))) { - if((next == ANY_ENC) && (block[0][i + 1] >= 4)) { - block[1][i + 1] = NUMERIC; - } - if((next == ANY_ENC) && (block[0][i + 1] < 4)) { - block[1][i + 1] = ISOIEC; - } - if((next == ALPHA_OR_ISO) && (block[0][i + 1] >= 5)) { - block[1][i + 1] = ALPHA; - } - if((next == ALPHA_OR_ISO) && (block[0][i + 1] < 5)) { - block[1][i + 1] = ISOIEC; - } - } - - if(current == ALPHA_OR_ISO) { - block[1][i] = ALPHA; - } - - if((current == ALPHA) && (i != (block_count - 1))) { - if((next == ANY_ENC) && (block[0][i + 1] >= 6)) { - block[1][i + 1] = NUMERIC; - } - if((next == ANY_ENC) && (block[0][i + 1] < 6)) { - if((i == block_count - 2) && (block[0][i + 1] >= 4)) { - block[1][i + 1] = NUMERIC; - } else { - block[1][i + 1] = ALPHA; - } - } - } - - if(current == ANY_ENC) { - block[1][i] = NUMERIC; - } - } - - if(block_count > 1) { - i = 1; - while(i < block_count) { - if(block[1][i - 1] == block[1][i]) { - /* bring together */ - block[0][i - 1] = block[0][i - 1] + block[0][i]; - j = i + 1; - - /* decreace the list */ - while(j < block_count) { - block[0][j - 1] = block[0][j]; - block[1][j - 1] = block[1][j]; - j++; - } - block_count--; - i--; - } - i++; - } - } + block_count = 0; - for(i = 0; i < block_count - 1; i++) { - if((block[1][i] == NUMERIC) && (block[0][i] & 1)) { - /* Odd size numeric block */ - block[0][i] = block[0][i] - 1; - block[0][i + 1] = block[0][i + 1] + 1; - } - } - - j = 0; - for(i = 0; i < block_count; i++) { - for(k = 0; k < block[0][i]; k++) { - type[j] = block[1][i]; - j++; - } - } - - if((block[1][block_count - 1] == NUMERIC) && (block[0][block_count - 1] & 1)) { - /* If the last block is numeric and an odd size, further - processing needs to be done outside this procedure */ - return 1; - } else { - return 0; - } + block[0][block_count] = 1; + block[1][block_count] = type[0]; + + for (i = 1; i < strlen(type); i++) { + current = type[i]; + last = type[i - 1]; + + if (current == last) { + block[0][block_count] = block[0][block_count] + 1; + } else { + block_count++; + block[0][block_count] = 1; + block[1][block_count] = type[i]; + } + } + + block_count++; + + for (i = 0; i < block_count; i++) { + } + + for (i = 0; i < block_count; i++) { + current = block[1][i]; + next = (block[1][i + 1] & 0xFF); + + if ((current == ISOIEC) && (i != (block_count - 1))) { + if ((next == ANY_ENC) && (block[0][i + 1] >= 4)) { + block[1][i + 1] = NUMERIC; + } + if ((next == ANY_ENC) && (block[0][i + 1] < 4)) { + block[1][i + 1] = ISOIEC; + } + if ((next == ALPHA_OR_ISO) && (block[0][i + 1] >= 5)) { + block[1][i + 1] = ALPHA; + } + if ((next == ALPHA_OR_ISO) && (block[0][i + 1] < 5)) { + block[1][i + 1] = ISOIEC; + } + } + + if (current == ALPHA_OR_ISO) { + block[1][i] = ALPHA; + } + + if ((current == ALPHA) && (i != (block_count - 1))) { + if ((next == ANY_ENC) && (block[0][i + 1] >= 6)) { + block[1][i + 1] = NUMERIC; + } + if ((next == ANY_ENC) && (block[0][i + 1] < 6)) { + if ((i == block_count - 2) && (block[0][i + 1] >= 4)) { + block[1][i + 1] = NUMERIC; + } else { + block[1][i + 1] = ALPHA; + } + } + } + + if (current == ANY_ENC) { + block[1][i] = NUMERIC; + } + } + + if (block_count > 1) { + i = 1; + while (i < block_count) { + if (block[1][i - 1] == block[1][i]) { + /* bring together */ + block[0][i - 1] = block[0][i - 1] + block[0][i]; + j = i + 1; + + /* decreace the list */ + while (j < block_count) { + block[0][j - 1] = block[0][j]; + block[1][j - 1] = block[1][j]; + j++; + } + block_count--; + i--; + } + i++; + } + } + + for (i = 0; i < block_count - 1; i++) { + if ((block[1][i] == NUMERIC) && (block[0][i] & 1)) { + /* Odd size numeric block */ + block[0][i] = block[0][i] - 1; + block[0][i + 1] = block[0][i + 1] + 1; + } + } + + j = 0; + for (i = 0; i < block_count; i++) { + for (k = 0; k < block[0][i]; k++) { + type[j] = block[1][i]; + j++; + } + } + + if ((block[1][block_count - 1] == NUMERIC) && (block[0][block_count - 1] & 1)) { + /* If the last block is numeric and an odd size, further + processing needs to be done outside this procedure */ + return 1; + } else { + return 0; + } } -int rss_binary_string(struct zint_symbol *symbol, char source[], char binary_string[]) -{ /* Handles all data encodation from section 7.2.5 of ISO/IEC 24724 */ - int encoding_method, i, mask, j, read_posn, latch, debug = 0, last_mode = ISOIEC; +/* Handles all data encodation from section 7.2.5 of ISO/IEC 24724 */ +int rss_binary_string(struct zint_symbol *symbol, char source[], char binary_string[]) { + int encoding_method, i, mask, j, read_posn, latch, debug = 0, last_mode = ISOIEC; #ifndef _MSC_VER - char general_field[strlen(source)], general_field_type[strlen(source)]; + char general_field[strlen(source)], general_field_type[strlen(source)]; #else - char* general_field = (char*)_alloca(strlen(source)); - char* general_field_type = (char*)_alloca(strlen(source)); + char* general_field = (char*) _alloca(strlen(source)); + char* general_field_type = (char*) _alloca(strlen(source)); #endif - int remainder, d1, d2, value; - char padstring[40]; + int remainder, d1, d2, value; + char padstring[40]; - read_posn=0; - value=0; + read_posn = 0; + value = 0; - /* Decide whether a compressed data field is required and if so what - method to use - method 2 = no compressed data field */ - - if((strlen(source) >= 16) && ((source[0] == '0') && (source[1] == '1'))) { - /* (01) and other AIs */ - encoding_method = 1; - if(debug) printf("Choosing Method 1\n"); - } else { - /* any AIs */ - encoding_method = 2; - if(debug) printf("Choosing Mehod 2\n"); - } - - if(((strlen(source) >= 20) && (encoding_method == 1)) && ((source[2] == '9') && (source[16] == '3'))) { - /* Possibly encoding method > 2 */ - if(debug) printf("Checking for other methods\n"); - - if((strlen(source) >= 26) && (source[17] == '1')) { - /* Methods 3, 7, 9, 11 and 13 */ - - if(source[18] == '0') { - /* (01) and (310x) */ - char weight_str[7]; - float weight; /* In kilos */ - - for(i = 0; i < 6; i++) { - weight_str[i] = source[20 + i]; - } - weight_str[6] = '\0'; - - if (weight_str[0] == '0') { /* Maximum weight = 99999 */ + /* Decide whether a compressed data field is required and if so what + method to use - method 2 = no compressed data field */ + + if ((strlen(source) >= 16) && ((source[0] == '0') && (source[1] == '1'))) { + /* (01) and other AIs */ + encoding_method = 1; + if (debug) printf("Choosing Method 1\n"); + } else { + /* any AIs */ + encoding_method = 2; + if (debug) printf("Choosing Mehod 2\n"); + } + + if (((strlen(source) >= 20) && (encoding_method == 1)) && ((source[2] == '9') && (source[16] == '3'))) { + /* Possibly encoding method > 2 */ + if (debug) printf("Checking for other methods\n"); + + if ((strlen(source) >= 26) && (source[17] == '1')) { + /* Methods 3, 7, 9, 11 and 13 */ + + if (source[18] == '0') { + /* (01) and (310x) */ + char weight_str[7]; + float weight; /* In kilos */ + + for (i = 0; i < 6; i++) { + weight_str[i] = source[20 + i]; + } + weight_str[6] = '\0'; + + if (weight_str[0] == '0') { /* Maximum weight = 99999 */ - encoding_method = 7; - - if((source[19] == '3') && (strlen(source) == 26)) { - /* (01) and (3103) */ - weight = atof(weight_str) / 1000.0; - - if(weight <= 32.767) { encoding_method = 3; } - } - - if(strlen(source) == 34){ - if((source[26] == '1') && (source[27] == '1')) { - /* (01), (310x) and (11) - metric weight and production date */ - encoding_method = 7; - } - - if((source[26] == '1') && (source[27] == '3')) { - /* (01), (310x) and (13) - metric weight and packaging date */ - encoding_method = 9; - } - - if((source[26] == '1') && (source[27] == '5')) { - /* (01), (310x) and (15) - metric weight and "best before" date */ - encoding_method = 11; - } - - if((source[26] == '1') && (source[27] == '7')) { - /* (01), (310x) and (17) - metric weight and expiration date */ - encoding_method = 13; - } - } - } - } - if(debug) printf("Now using method %d\n", encoding_method); - } - - if((strlen(source) >= 26) && (source[17] == '2')) { - /* Methods 4, 8, 10, 12 and 14 */ - - if(source[18] == '0') { - /* (01) and (320x) */ - char weight_str[7]; - float weight; /* In pounds */ - - for(i = 0; i < 6; i++) { - weight_str[i] = source[20 + i]; - } - weight_str[6] = '\0'; - - if (weight_str[0] == '0') { /* Maximum weight = 99999 */ + encoding_method = 7; - encoding_method = 8; - - if(((source[19] == '2') || (source[19] == '3')) && (strlen(source) == 26)) { - /* (01) and (3202)/(3203) */ - - if(source[19] == '3') { - weight = atof(weight_str) / 1000.0; - if(weight <= 22.767) { - encoding_method = 4; - } - } else { - weight = atof(weight_str) / 100.0; - if(weight <= 99.99) { - encoding_method = 4; - } - } - - } - - if(strlen(source) == 34){ - if((source[26] == '1') && (source[27] == '1')) { - /* (01), (320x) and (11) - English weight and production date */ - encoding_method = 8; - } - - if((source[26] == '1') && (source[27] == '3')) { - /* (01), (320x) and (13) - English weight and packaging date */ - encoding_method = 10; - } - - if((source[26] == '1') && (source[27] == '5')) { - /* (01), (320x) and (15) - English weight and "best before" date */ - encoding_method = 12; - } - - if((source[26] == '1') && (source[27] == '7')) { - /* (01), (320x) and (17) - English weight and expiration date */ - encoding_method = 14; - } - } - } - } - if(debug) printf("Now using method %d\n", encoding_method); + if ((source[19] == '3') && (strlen(source) == 26)) { + /* (01) and (3103) */ + weight = atof(weight_str) / 1000.0; - } - - if(source[17] == '9') { - /* Methods 5 and 6 */ - if((source[18] == '2') && ((source[19] >= '0') && (source[19] <= '3'))) { - /* (01) and (392x) */ - encoding_method = 5; - } - if((source[18] == '3') && ((source[19] >= '0') && (source[19] <= '3'))) { - /* (01) and (393x) */ - encoding_method = 6; - } - if(debug) printf("Now using method %d\n", encoding_method); - } - } - - switch(encoding_method) { /* Encoding method - Table 10 */ - case 1: concat(binary_string, "1XX"); read_posn = 16; break; - case 2: concat(binary_string, "00XX"); read_posn = 0; break; - case 3: concat(binary_string, "0100"); read_posn = strlen(source); break; - case 4: concat(binary_string, "0101"); read_posn = strlen(source); break; - case 5: concat(binary_string, "01100XX"); read_posn = 20; break; - case 6: concat(binary_string, "01101XX"); read_posn = 23; break; - case 7: concat(binary_string, "0111000"); read_posn = strlen(source); break; - case 8: concat(binary_string, "0111001"); read_posn = strlen(source); break; - case 9: concat(binary_string, "0111010"); read_posn = strlen(source); break; - case 10: concat(binary_string, "0111011"); read_posn = strlen(source); break; - case 11: concat(binary_string, "0111100"); read_posn = strlen(source); break; - case 12: concat(binary_string, "0111101"); read_posn = strlen(source); break; - case 13: concat(binary_string, "0111110"); read_posn = strlen(source); break; - case 14: concat(binary_string, "0111111"); read_posn = strlen(source); break; - } - if(debug) printf("Setting binary = %s\n", binary_string); - - /* Variable length symbol bit field is just given a place holder (XX) - for the time being */ - - /* Verify that the data to be placed in the compressed data field is all - numeric data before carrying out compression */ - for(i = 0; i < read_posn; i++) { - if((source[i] < '0') || (source[i] > '9')) { - if((source[i] != '[') && (source[i] != ']')) { - /* Something is wrong */ - strcpy(symbol->errtxt, "Invalid characters in input data"); - return ZINT_ERROR_INVALID_DATA; - } - } - } - - /* Now encode the compressed data field */ - - if(debug) printf("Proceeding to encode data\n"); - if(encoding_method == 1) { - /* Encoding method field "1" - general item identification data */ - char group[4]; - int group_val; - - group[0] = source[2]; - group[1] = '\0'; - group_val = atoi(group); - - mask = 0x08; - for(j = 0; j < 4; j++) { - concat(binary_string, (group_val & mask) ? "1" : "0"); - mask = mask >> 1; - } - - for(i = 1; i < 5; i++) { - group[0] = source[(i * 3)]; - group[1] = source[(i * 3) + 1]; - group[2] = source[(i * 3) + 2]; - group[3] = '\0'; - group_val = atoi(group); - - mask = 0x200; - for(j = 0; j < 10; j++) { - concat(binary_string, (group_val & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - - - } - - - if(encoding_method == 3) { - /* Encoding method field "0100" - variable weight item - (0,001 kilogram icrements) */ - char group[4]; - int group_val; - char weight_str[7]; - - for(i = 1; i < 5; i++) { - group[0] = source[(i * 3)]; - group[1] = source[(i * 3) + 1]; - group[2] = source[(i * 3) + 2]; - group[3] = '\0'; - group_val = atoi(group); - - mask = 0x200; - for(j = 0; j < 10; j++) { - concat(binary_string, (group_val & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - - for(i = 0; i < 6; i++) { - weight_str[i] = source[20 + i]; - } - weight_str[6] = '\0'; - group_val = atoi(weight_str); - - mask = 0x4000; - for(j = 0; j < 15; j++) { - concat(binary_string, (group_val & mask) ? "1" : "0"); - mask = mask >> 1; - } - - - } - - if(encoding_method == 4) { - /* Encoding method field "0101" - variable weight item (0,01 or - 0,001 pound increment) */ - char group[4]; - int group_val; - char weight_str[7]; - - for(i = 1; i < 5; i++) { - group[0] = source[(i * 3)]; - group[1] = source[(i * 3) + 1]; - group[2] = source[(i * 3) + 2]; - group[3] = '\0'; - group_val = atoi(group); - - mask = 0x200; - for(j = 0; j < 10; j++) { - concat(binary_string, (group_val & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - - for(i = 0; i < 6; i++) { - weight_str[i] = source[20 + i]; - } - weight_str[6] = '\0'; - group_val = atoi(weight_str); + if (weight <= 32.767) { + encoding_method = 3; + } + } - if(source[19] == '3') { - group_val = group_val + 10000; - } - - mask = 0x4000; - for(j = 0; j < 15; j++) { - concat(binary_string, (group_val & mask) ? "1" : "0"); - mask = mask >> 1; - } - - } - - - if((encoding_method >= 7) && (encoding_method <= 14)) { - /* Encoding method fields "0111000" through "0111111" - variable - weight item plus date */ - char group[4]; - int group_val; - char weight_str[8]; - char date_str[4]; - - for(i = 1; i < 5; i++) { - group[0] = source[(i * 3)]; - group[1] = source[(i * 3) + 1]; - group[2] = source[(i * 3) + 2]; - group[3] = '\0'; - group_val = atoi(group); - - mask = 0x200; - for(j = 0; j < 10; j++) { - concat(binary_string, (group_val & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - - weight_str[0] = source[19]; - - for(i = 0; i < 5; i++) { - weight_str[i + 1] = source[21 + i]; - } - weight_str[6] = '\0'; - group_val = atoi(weight_str); - - mask = 0x80000; - for(j = 0; j < 20; j++) { - concat(binary_string, (group_val & mask) ? "1" : "0"); - mask = mask >> 1; - } - - if(strlen(source) == 34) { - /* Date information is included */ - date_str[0] = source[28]; - date_str[1] = source[29]; - date_str[2] = '\0'; - group_val = atoi(date_str) * 384; - - date_str[0] = source[30]; - date_str[1] = source[31]; - group_val += (atoi(date_str) - 1) * 32; - - date_str[0] = source[32]; - date_str[1] = source[33]; - group_val += atoi(date_str); - } else { - group_val = 38400; - } - - mask = 0x8000; - for(j = 0; j < 16; j++) { - concat(binary_string, (group_val & mask) ? "1" : "0"); - mask = mask >> 1; - } - - } - - if(encoding_method == 5) { - /* Encoding method field "01100" - variable measure item and price */ - char group[4]; - int group_val; - - for(i = 1; i < 5; i++) { - group[0] = source[(i * 3)]; - group[1] = source[(i * 3) + 1]; - group[2] = source[(i * 3) + 2]; - group[3] = '\0'; - group_val = atoi(group); - - mask = 0x200; - for(j = 0; j < 10; j++) { - concat(binary_string, (group_val & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - - switch(source[19]) { - case '0': concat(binary_string, "00"); break; - case '1': concat(binary_string, "01"); break; - case '2': concat(binary_string, "10"); break; - case '3': concat(binary_string, "11"); break; - } - } - - if(encoding_method == 6) { - /* Encoding method "01101" - variable measure item and price with ISO 4217 - Currency Code */ - - char group[4]; - int group_val; - char currency_str[5]; - - for(i = 1; i < 5; i++) { - group[0] = source[(i * 3)]; - group[1] = source[(i * 3) + 1]; - group[2] = source[(i * 3) + 2]; - group[3] = '\0'; - group_val = atoi(group); - - mask = 0x200; - for(j = 0; j < 10; j++) { - concat(binary_string, (group_val & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - - switch(source[19]) { - case '0': concat(binary_string, "00"); break; - case '1': concat(binary_string, "01"); break; - case '2': concat(binary_string, "10"); break; - case '3': concat(binary_string, "11"); break; - } - - for(i = 0; i < 3; i++) { - currency_str[i] = source[20 + i]; - } - currency_str[3] = '\0'; - group_val = atoi(currency_str); - - mask = 0x200; - for(j = 0; j < 10; j++) { - concat(binary_string, (group_val & mask) ? "1" : "0"); - mask = mask >> 1; - } - - - } - - /* The compressed data field has been processed if appropriate - the - rest of the data (if any) goes into a general-purpose data compaction field */ - - j = 0; - for(i = read_posn; i < strlen(source); i++) { - general_field[j] = source[i]; - j++; - } - general_field[j] = '\0'; - if(debug) printf("General field data = %s\n", general_field); - - latch = 0; - for(i = 0; i < strlen(general_field); i++) { - /* Table 13 - ISO/IEC 646 encodation */ - if((general_field[i] < ' ') || (general_field[i] > 'z')) { - general_field_type[i] = INVALID_CHAR; latch = 1; - } else { - general_field_type[i] = ISOIEC; - } - - if(general_field[i] == '#') { - general_field_type[i] = INVALID_CHAR; latch = 1; - } - if(general_field[i] == '$') { - general_field_type[i] = INVALID_CHAR; latch = 1; - } - if(general_field[i] == '@') { - general_field_type[i] = INVALID_CHAR; latch = 1; - } - if(general_field[i] == 92) { - general_field_type[i] = INVALID_CHAR; latch = 1; - } - if(general_field[i] == '^') { - general_field_type[i] = INVALID_CHAR; latch = 1; - } - if(general_field[i] == 96) { - general_field_type[i] = INVALID_CHAR; latch = 1; - } + if (strlen(source) == 34) { + if ((source[26] == '1') && (source[27] == '1')) { + /* (01), (310x) and (11) - metric weight and production date */ + encoding_method = 7; + } - /* Table 12 - Alphanumeric encodation */ - if((general_field[i] >= 'A') && (general_field[i] <= 'Z')) { - general_field_type[i] = ALPHA_OR_ISO; - } - if(general_field[i] == '*') { - general_field_type[i] = ALPHA_OR_ISO; - } - if(general_field[i] == ',') { - general_field_type[i] = ALPHA_OR_ISO; - } - if(general_field[i] == '-') { - general_field_type[i] = ALPHA_OR_ISO; - } - if(general_field[i] == '.') { - general_field_type[i] = ALPHA_OR_ISO; - } - if(general_field[i] == '/') { - general_field_type[i] = ALPHA_OR_ISO; - } + if ((source[26] == '1') && (source[27] == '3')) { + /* (01), (310x) and (13) - metric weight and packaging date */ + encoding_method = 9; + } - /* Numeric encodation */ - if((general_field[i] >= '0') && (general_field[i] <= '9')) { - general_field_type[i] = ANY_ENC; - } - if(general_field[i] == '[') { - /* FNC1 can be encoded in any system */ - general_field_type[i] = ANY_ENC; - } + if ((source[26] == '1') && (source[27] == '5')) { + /* (01), (310x) and (15) - metric weight and "best before" date */ + encoding_method = 11; + } - } - - general_field_type[strlen(general_field)] = '\0'; - if(debug) printf("General field type: %s\n", general_field_type); - - if(latch == 1) { - /* Invalid characters in input data */ - strcpy(symbol->errtxt, "Invalid characters in input data"); - return ZINT_ERROR_INVALID_DATA; - } - - for(i = 0; i < strlen(general_field); i++) { - if((general_field_type[i] == ISOIEC) && (general_field[i + 1] == '[')) { - general_field_type[i + 1] = ISOIEC; - } - } - - for(i = 0; i < strlen(general_field); i++) { - if((general_field_type[i] == ALPHA_OR_ISO) && (general_field[i + 1] == '[')) { - general_field_type[i + 1] = ALPHA_OR_ISO; - } - } - - latch = general_rules(general_field, general_field_type); - if(debug) printf("General field type: %s\n", general_field_type); - - last_mode = NUMERIC; - - /* Set initial mode if not NUMERIC */ - if(general_field_type[0] == ALPHA) { - concat(binary_string, "0000"); /* Alphanumeric latch */ - last_mode = ALPHA; - } - if(general_field_type[0] == ISOIEC) { - concat(binary_string, "0000"); /* Alphanumeric latch */ - concat(binary_string, "00100"); /* ISO/IEC 646 latch */ - last_mode = ISOIEC; - } - - i = 0; - do { - if(debug) printf("Processing character %d ", i); - switch(general_field_type[i]) { - case NUMERIC: - if(debug) printf("as NUMERIC:"); - - if(last_mode != NUMERIC) { - concat(binary_string, "000"); /* Numeric latch */ - if(debug) printf("\n"); - } - - if(debug) printf(" %c%c > ", general_field[i], general_field[i + 1]); - if(general_field[i] != '[') { - d1 = ctoi(general_field[i]); - } else { - d1 = 10; - } - - if(general_field[i + 1] != '[') { - d2 = ctoi(general_field[i + 1]); - } else { - d2 = 10; - } - - value = (11 * d1) + d2 + 8; - - mask = 0x40; - for(j = 0; j < 7; j++) { - concat(binary_string, (value & mask) ? "1" : "0"); - if (debug) { - printf("%d", !!(value & mask)); - } - mask = mask >> 1; - } - - i += 2; - if(debug) printf("\n"); - last_mode = NUMERIC; - break; - - case ALPHA: - if(debug) printf("as ALPHA\n"); - if(i != 0) { - if(last_mode == NUMERIC) { - concat(binary_string, "0000"); /* Alphanumeric latch */ - } - if(last_mode == ISOIEC) { - concat(binary_string, "00100"); /* Alphanumeric latch */ - } - } - - if((general_field[i] >= '0') && (general_field[i] <= '9')) { - - value = general_field[i] - 43; - - mask = 0x10; - for(j = 0; j < 5; j++) { - concat(binary_string, (value & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - - if((general_field[i] >= 'A') && (general_field[i] <= 'Z')) { - - value = general_field[i] - 33; - - mask = 0x20; - for(j = 0; j < 6; j++) { - concat(binary_string, (value & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - - last_mode = ALPHA; - if(general_field[i] == '[') { concat(binary_string, "01111"); last_mode = NUMERIC; } /* FNC1/Numeric latch */ - if(general_field[i] == '*') concat(binary_string, "111010"); /* asterisk */ - if(general_field[i] == ',') concat(binary_string, "111011"); /* comma */ - if(general_field[i] == '-') concat(binary_string, "111100"); /* minus or hyphen */ - if(general_field[i] == '.') concat(binary_string, "111101"); /* period or full stop */ - if(general_field[i] == '/') concat(binary_string, "111110"); /* slash or solidus */ - - i++; - break; - - case ISOIEC: - if(debug) printf("as ISOIEC\n"); - if(i != 0) { - if(last_mode == NUMERIC) { - concat(binary_string, "0000"); /* Alphanumeric latch */ - concat(binary_string, "00100"); /* ISO/IEC 646 latch */ - } - if(last_mode == ALPHA) { - concat(binary_string, "00100"); /* ISO/IEC 646 latch */ - } - } - - if((general_field[i] >= '0') && (general_field[i] <= '9')) { - - value = general_field[i] - 43; - - mask = 0x10; - for(j = 0; j < 5; j++) { - concat(binary_string, (value & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - - if((general_field[i] >= 'A') && (general_field[i] <= 'Z')) { - - value = general_field[i] - 1; - - mask = 0x40; - for(j = 0; j < 7; j++) { - concat(binary_string, (value & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - - if((general_field[i] >= 'a') && (general_field[i] <= 'z')) { - - value = general_field[i] - 7; - - mask = 0x40; - for(j = 0; j < 7; j++) { - concat(binary_string, (value & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - - last_mode = ISOIEC; - if(general_field[i] == '[') { concat(binary_string, "01111"); last_mode = NUMERIC; } /* FNC1/Numeric latch */ - if(general_field[i] == '!') concat(binary_string, "11101000"); /* exclamation mark */ - if(general_field[i] == 34) concat(binary_string, "11101001"); /* quotation mark */ - if(general_field[i] == 37) concat(binary_string, "11101010"); /* percent sign */ - if(general_field[i] == '&') concat(binary_string, "11101011"); /* ampersand */ - if(general_field[i] == 39) concat(binary_string, "11101100"); /* apostrophe */ - if(general_field[i] == '(') concat(binary_string, "11101101"); /* left parenthesis */ - if(general_field[i] == ')') concat(binary_string, "11101110"); /* right parenthesis */ - if(general_field[i] == '*') concat(binary_string, "11101111"); /* asterisk */ - if(general_field[i] == '+') concat(binary_string, "11110000"); /* plus sign */ - if(general_field[i] == ',') concat(binary_string, "11110001"); /* comma */ - if(general_field[i] == '-') concat(binary_string, "11110010"); /* minus or hyphen */ - if(general_field[i] == '.') concat(binary_string, "11110011"); /* period or full stop */ - if(general_field[i] == '/') concat(binary_string, "11110100"); /* slash or solidus */ - if(general_field[i] == ':') concat(binary_string, "11110101"); /* colon */ - if(general_field[i] == ';') concat(binary_string, "11110110"); /* semicolon */ - if(general_field[i] == '<') concat(binary_string, "11110111"); /* less-than sign */ - if(general_field[i] == '=') concat(binary_string, "11111000"); /* equals sign */ - if(general_field[i] == '>') concat(binary_string, "11111001"); /* greater-than sign */ - if(general_field[i] == '?') concat(binary_string, "11111010"); /* question mark */ - if(general_field[i] == '_') concat(binary_string, "11111011"); /* underline or low line */ - if(general_field[i] == ' ') concat(binary_string, "11111100"); /* space */ - - i++; - break; - } - } while (i + latch < strlen(general_field)); - if(debug) printf("Resultant binary = %s\n", binary_string); - if(debug) printf("\tLength: %d\n", (int)strlen(binary_string)); - - remainder = 12 - (strlen(binary_string) % 12); - if(remainder == 12) { remainder = 0; } - if(strlen(binary_string) < 36) { remainder = 36 - strlen(binary_string); } + if ((source[26] == '1') && (source[27] == '7')) { + /* (01), (310x) and (17) - metric weight and expiration date */ + encoding_method = 13; + } + } + } + } + if (debug) printf("Now using method %d\n", encoding_method); + } - if(latch == 1) { - /* There is still one more numeric digit to encode */ - if(debug) printf("Adding extra (odd) numeric digit\n"); - - if(last_mode == NUMERIC) { - if((remainder >= 4) && (remainder <= 6)) { - value = ctoi(general_field[i]); - value++; - - mask = 0x08; - for(j = 0; j < 4; j++) { - concat(binary_string, (value & mask) ? "1" : "0"); - mask = mask >> 1; - } - } else { - d1 = ctoi(general_field[i]); - d2 = 10; - - value = (11 * d1) + d2 + 8; - - mask = 0x40; - for(j = 0; j < 7; j++) { - concat(binary_string, (value & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - } else { - value = general_field[i] - 43; - - mask = 0x10; - for(j = 0; j < 5; j++) { - concat(binary_string, (value & mask) ? "1" : "0"); - mask = mask >> 1; - } - } - - remainder = 12 - (strlen(binary_string) % 12); - if(remainder == 12) { remainder = 0; } - if(strlen(binary_string) < 36) { remainder = 36 - strlen(binary_string); } - if(debug) printf("Resultant binary = %s\n", binary_string); - if(debug) printf("\tLength: %d\n", (int)strlen(binary_string)); - } - - if(strlen(binary_string) > 252) { - strcpy(symbol->errtxt, "Input too long"); - return ZINT_ERROR_TOO_LONG; - } - - /* Now add padding to binary string (7.2.5.5.4) */ - i = remainder; - if((strlen(general_field) != 0) && (last_mode == NUMERIC)) { - strcpy(padstring, "0000"); - i -= 4; - } else { - strcpy(padstring, ""); - } - for(;i > 0;i -= 5) { - concat(padstring, "00100"); - } + if ((strlen(source) >= 26) && (source[17] == '2')) { + /* Methods 4, 8, 10, 12 and 14 */ - padstring[remainder] = '\0'; - concat(binary_string, padstring); - - /* Patch variable length symbol bit field */ - d1 = ((strlen(binary_string) / 12) + 1) & 1; - if(strlen(binary_string) <= 156) { d2 = 0; } else { d2 = 1; } - - if(encoding_method == 1) { - binary_string[2] = d1 ? '1' : '0'; - binary_string[3] = d2 ? '1' : '0'; - } - if(encoding_method == 2) { - binary_string[3] = d1 ? '1' : '0'; - binary_string[4] = d2 ? '1' : '0'; - } - if((encoding_method == 5) || (encoding_method == 6)) { - binary_string[6] = d1 ? '1' : '0'; - binary_string[7] = d2 ? '1' : '0'; - } - if(debug) printf("Resultant binary = %s\n", binary_string); - if(debug) printf("\tLength: %d\n", (int)strlen(binary_string)); - return 0; + if (source[18] == '0') { + /* (01) and (320x) */ + char weight_str[7]; + float weight; /* In pounds */ + + for (i = 0; i < 6; i++) { + weight_str[i] = source[20 + i]; + } + weight_str[6] = '\0'; + + if (weight_str[0] == '0') { /* Maximum weight = 99999 */ + + encoding_method = 8; + + if (((source[19] == '2') || (source[19] == '3')) && (strlen(source) == 26)) { + /* (01) and (3202)/(3203) */ + + if (source[19] == '3') { + weight = atof(weight_str) / 1000.0; + if (weight <= 22.767) { + encoding_method = 4; + } + } else { + weight = atof(weight_str) / 100.0; + if (weight <= 99.99) { + encoding_method = 4; + } + } + + } + + if (strlen(source) == 34) { + if ((source[26] == '1') && (source[27] == '1')) { + /* (01), (320x) and (11) - English weight and production date */ + encoding_method = 8; + } + + if ((source[26] == '1') && (source[27] == '3')) { + /* (01), (320x) and (13) - English weight and packaging date */ + encoding_method = 10; + } + + if ((source[26] == '1') && (source[27] == '5')) { + /* (01), (320x) and (15) - English weight and "best before" date */ + encoding_method = 12; + } + + if ((source[26] == '1') && (source[27] == '7')) { + /* (01), (320x) and (17) - English weight and expiration date */ + encoding_method = 14; + } + } + } + } + if (debug) printf("Now using method %d\n", encoding_method); + + } + + if (source[17] == '9') { + /* Methods 5 and 6 */ + if ((source[18] == '2') && ((source[19] >= '0') && (source[19] <= '3'))) { + /* (01) and (392x) */ + encoding_method = 5; + } + if ((source[18] == '3') && ((source[19] >= '0') && (source[19] <= '3'))) { + /* (01) and (393x) */ + encoding_method = 6; + } + if (debug) printf("Now using method %d\n", encoding_method); + } + } + + switch (encoding_method) { /* Encoding method - Table 10 */ + case 1: concat(binary_string, "1XX"); + read_posn = 16; + break; + case 2: concat(binary_string, "00XX"); + read_posn = 0; + break; + case 3: concat(binary_string, "0100"); + read_posn = strlen(source); + break; + case 4: concat(binary_string, "0101"); + read_posn = strlen(source); + break; + case 5: concat(binary_string, "01100XX"); + read_posn = 20; + break; + case 6: concat(binary_string, "01101XX"); + read_posn = 23; + break; + case 7: concat(binary_string, "0111000"); + read_posn = strlen(source); + break; + case 8: concat(binary_string, "0111001"); + read_posn = strlen(source); + break; + case 9: concat(binary_string, "0111010"); + read_posn = strlen(source); + break; + case 10: concat(binary_string, "0111011"); + read_posn = strlen(source); + break; + case 11: concat(binary_string, "0111100"); + read_posn = strlen(source); + break; + case 12: concat(binary_string, "0111101"); + read_posn = strlen(source); + break; + case 13: concat(binary_string, "0111110"); + read_posn = strlen(source); + break; + case 14: concat(binary_string, "0111111"); + read_posn = strlen(source); + break; + } + if (debug) printf("Setting binary = %s\n", binary_string); + + /* Variable length symbol bit field is just given a place holder (XX) + for the time being */ + + /* Verify that the data to be placed in the compressed data field is all + numeric data before carrying out compression */ + for (i = 0; i < read_posn; i++) { + if ((source[i] < '0') || (source[i] > '9')) { + if ((source[i] != '[') && (source[i] != ']')) { + /* Something is wrong */ + strcpy(symbol->errtxt, "Invalid characters in input data"); + return ZINT_ERROR_INVALID_DATA; + } + } + } + + /* Now encode the compressed data field */ + + if (debug) printf("Proceeding to encode data\n"); + if (encoding_method == 1) { + /* Encoding method field "1" - general item identification data */ + char group[4]; + int group_val; + + group[0] = source[2]; + group[1] = '\0'; + group_val = atoi(group); + + mask = 0x08; + for (j = 0; j < 4; j++) { + concat(binary_string, (group_val & mask) ? "1" : "0"); + mask = mask >> 1; + } + + for (i = 1; i < 5; i++) { + group[0] = source[(i * 3)]; + group[1] = source[(i * 3) + 1]; + group[2] = source[(i * 3) + 2]; + group[3] = '\0'; + group_val = atoi(group); + + mask = 0x200; + for (j = 0; j < 10; j++) { + concat(binary_string, (group_val & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + } + + + if (encoding_method == 3) { + /* Encoding method field "0100" - variable weight item + (0,001 kilogram icrements) */ + char group[4]; + int group_val; + char weight_str[7]; + + for (i = 1; i < 5; i++) { + group[0] = source[(i * 3)]; + group[1] = source[(i * 3) + 1]; + group[2] = source[(i * 3) + 2]; + group[3] = '\0'; + group_val = atoi(group); + + mask = 0x200; + for (j = 0; j < 10; j++) { + concat(binary_string, (group_val & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + for (i = 0; i < 6; i++) { + weight_str[i] = source[20 + i]; + } + weight_str[6] = '\0'; + group_val = atoi(weight_str); + + mask = 0x4000; + for (j = 0; j < 15; j++) { + concat(binary_string, (group_val & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + if (encoding_method == 4) { + /* Encoding method field "0101" - variable weight item (0,01 or + 0,001 pound increment) */ + char group[4]; + int group_val; + char weight_str[7]; + + for (i = 1; i < 5; i++) { + group[0] = source[(i * 3)]; + group[1] = source[(i * 3) + 1]; + group[2] = source[(i * 3) + 2]; + group[3] = '\0'; + group_val = atoi(group); + + mask = 0x200; + for (j = 0; j < 10; j++) { + concat(binary_string, (group_val & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + for (i = 0; i < 6; i++) { + weight_str[i] = source[20 + i]; + } + weight_str[6] = '\0'; + group_val = atoi(weight_str); + + if (source[19] == '3') { + group_val = group_val + 10000; + } + + mask = 0x4000; + for (j = 0; j < 15; j++) { + concat(binary_string, (group_val & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + + if ((encoding_method >= 7) && (encoding_method <= 14)) { + /* Encoding method fields "0111000" through "0111111" - variable + weight item plus date */ + char group[4]; + int group_val; + char weight_str[8]; + char date_str[4]; + + for (i = 1; i < 5; i++) { + group[0] = source[(i * 3)]; + group[1] = source[(i * 3) + 1]; + group[2] = source[(i * 3) + 2]; + group[3] = '\0'; + group_val = atoi(group); + + mask = 0x200; + for (j = 0; j < 10; j++) { + concat(binary_string, (group_val & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + weight_str[0] = source[19]; + + for (i = 0; i < 5; i++) { + weight_str[i + 1] = source[21 + i]; + } + weight_str[6] = '\0'; + group_val = atoi(weight_str); + + mask = 0x80000; + for (j = 0; j < 20; j++) { + concat(binary_string, (group_val & mask) ? "1" : "0"); + mask = mask >> 1; + } + + if (strlen(source) == 34) { + /* Date information is included */ + date_str[0] = source[28]; + date_str[1] = source[29]; + date_str[2] = '\0'; + group_val = atoi(date_str) * 384; + + date_str[0] = source[30]; + date_str[1] = source[31]; + group_val += (atoi(date_str) - 1) * 32; + + date_str[0] = source[32]; + date_str[1] = source[33]; + group_val += atoi(date_str); + } else { + group_val = 38400; + } + + mask = 0x8000; + for (j = 0; j < 16; j++) { + concat(binary_string, (group_val & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + if (encoding_method == 5) { + /* Encoding method field "01100" - variable measure item and price */ + char group[4]; + int group_val; + + for (i = 1; i < 5; i++) { + group[0] = source[(i * 3)]; + group[1] = source[(i * 3) + 1]; + group[2] = source[(i * 3) + 2]; + group[3] = '\0'; + group_val = atoi(group); + + mask = 0x200; + for (j = 0; j < 10; j++) { + concat(binary_string, (group_val & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + switch (source[19]) { + case '0': concat(binary_string, "00"); + break; + case '1': concat(binary_string, "01"); + break; + case '2': concat(binary_string, "10"); + break; + case '3': concat(binary_string, "11"); + break; + } + } + + if (encoding_method == 6) { + /* Encoding method "01101" - variable measure item and price with ISO 4217 + Currency Code */ + + char group[4]; + int group_val; + char currency_str[5]; + + for (i = 1; i < 5; i++) { + group[0] = source[(i * 3)]; + group[1] = source[(i * 3) + 1]; + group[2] = source[(i * 3) + 2]; + group[3] = '\0'; + group_val = atoi(group); + + mask = 0x200; + for (j = 0; j < 10; j++) { + concat(binary_string, (group_val & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + switch (source[19]) { + case '0': concat(binary_string, "00"); + break; + case '1': concat(binary_string, "01"); + break; + case '2': concat(binary_string, "10"); + break; + case '3': concat(binary_string, "11"); + break; + } + + for (i = 0; i < 3; i++) { + currency_str[i] = source[20 + i]; + } + currency_str[3] = '\0'; + group_val = atoi(currency_str); + + mask = 0x200; + for (j = 0; j < 10; j++) { + concat(binary_string, (group_val & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + /* The compressed data field has been processed if appropriate - the + rest of the data (if any) goes into a general-purpose data compaction field */ + + j = 0; + for (i = read_posn; i < strlen(source); i++) { + general_field[j] = source[i]; + j++; + } + general_field[j] = '\0'; + if (debug) printf("General field data = %s\n", general_field); + + latch = 0; + for (i = 0; i < strlen(general_field); i++) { + /* Table 13 - ISO/IEC 646 encodation */ + if ((general_field[i] < ' ') || (general_field[i] > 'z')) { + general_field_type[i] = INVALID_CHAR; + latch = 1; + } else { + general_field_type[i] = ISOIEC; + } + + if (general_field[i] == '#') { + general_field_type[i] = INVALID_CHAR; + latch = 1; + } + if (general_field[i] == '$') { + general_field_type[i] = INVALID_CHAR; + latch = 1; + } + if (general_field[i] == '@') { + general_field_type[i] = INVALID_CHAR; + latch = 1; + } + if (general_field[i] == 92) { + general_field_type[i] = INVALID_CHAR; + latch = 1; + } + if (general_field[i] == '^') { + general_field_type[i] = INVALID_CHAR; + latch = 1; + } + if (general_field[i] == 96) { + general_field_type[i] = INVALID_CHAR; + latch = 1; + } + + /* Table 12 - Alphanumeric encodation */ + if ((general_field[i] >= 'A') && (general_field[i] <= 'Z')) { + general_field_type[i] = ALPHA_OR_ISO; + } + if (general_field[i] == '*') { + general_field_type[i] = ALPHA_OR_ISO; + } + if (general_field[i] == ',') { + general_field_type[i] = ALPHA_OR_ISO; + } + if (general_field[i] == '-') { + general_field_type[i] = ALPHA_OR_ISO; + } + if (general_field[i] == '.') { + general_field_type[i] = ALPHA_OR_ISO; + } + if (general_field[i] == '/') { + general_field_type[i] = ALPHA_OR_ISO; + } + + /* Numeric encodation */ + if ((general_field[i] >= '0') && (general_field[i] <= '9')) { + general_field_type[i] = ANY_ENC; + } + if (general_field[i] == '[') { + /* FNC1 can be encoded in any system */ + general_field_type[i] = ANY_ENC; + } + } + + general_field_type[strlen(general_field)] = '\0'; + if (debug) printf("General field type: %s\n", general_field_type); + + if (latch == 1) { + /* Invalid characters in input data */ + strcpy(symbol->errtxt, "Invalid characters in input data"); + return ZINT_ERROR_INVALID_DATA; + } + + for (i = 0; i < strlen(general_field); i++) { + if ((general_field_type[i] == ISOIEC) && (general_field[i + 1] == '[')) { + general_field_type[i + 1] = ISOIEC; + } + } + + for (i = 0; i < strlen(general_field); i++) { + if ((general_field_type[i] == ALPHA_OR_ISO) && (general_field[i + 1] == '[')) { + general_field_type[i + 1] = ALPHA_OR_ISO; + } + } + + latch = general_rules(general_field, general_field_type); + if (debug) printf("General field type: %s\n", general_field_type); + + last_mode = NUMERIC; + + /* Set initial mode if not NUMERIC */ + if (general_field_type[0] == ALPHA) { + concat(binary_string, "0000"); /* Alphanumeric latch */ + last_mode = ALPHA; + } + if (general_field_type[0] == ISOIEC) { + concat(binary_string, "0000"); /* Alphanumeric latch */ + concat(binary_string, "00100"); /* ISO/IEC 646 latch */ + last_mode = ISOIEC; + } + + i = 0; + do { + if (debug) printf("Processing character %d ", i); + switch (general_field_type[i]) { + case NUMERIC: + if (debug) printf("as NUMERIC:"); + + if (last_mode != NUMERIC) { + concat(binary_string, "000"); /* Numeric latch */ + if (debug) printf("\n"); + } + + if (debug) printf(" %c%c > ", general_field[i], general_field[i + 1]); + if (general_field[i] != '[') { + d1 = ctoi(general_field[i]); + } else { + d1 = 10; + } + + if (general_field[i + 1] != '[') { + d2 = ctoi(general_field[i + 1]); + } else { + d2 = 10; + } + + value = (11 * d1) + d2 + 8; + + mask = 0x40; + for (j = 0; j < 7; j++) { + concat(binary_string, (value & mask) ? "1" : "0"); + if (debug) { + printf("%d", !!(value & mask)); + } + mask = mask >> 1; + } + + i += 2; + if (debug) printf("\n"); + last_mode = NUMERIC; + break; + + case ALPHA: + if (debug) printf("as ALPHA\n"); + if (i != 0) { + if (last_mode == NUMERIC) { + concat(binary_string, "0000"); /* Alphanumeric latch */ + } + if (last_mode == ISOIEC) { + concat(binary_string, "00100"); /* Alphanumeric latch */ + } + } + + if ((general_field[i] >= '0') && (general_field[i] <= '9')) { + + value = general_field[i] - 43; + + mask = 0x10; + for (j = 0; j < 5; j++) { + concat(binary_string, (value & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + if ((general_field[i] >= 'A') && (general_field[i] <= 'Z')) { + + value = general_field[i] - 33; + + mask = 0x20; + for (j = 0; j < 6; j++) { + concat(binary_string, (value & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + last_mode = ALPHA; + if (general_field[i] == '[') { + concat(binary_string, "01111"); + last_mode = NUMERIC; + } /* FNC1/Numeric latch */ + if (general_field[i] == '*') concat(binary_string, "111010"); /* asterisk */ + if (general_field[i] == ',') concat(binary_string, "111011"); /* comma */ + if (general_field[i] == '-') concat(binary_string, "111100"); /* minus or hyphen */ + if (general_field[i] == '.') concat(binary_string, "111101"); /* period or full stop */ + if (general_field[i] == '/') concat(binary_string, "111110"); /* slash or solidus */ + + i++; + break; + + case ISOIEC: + if (debug) printf("as ISOIEC\n"); + if (i != 0) { + if (last_mode == NUMERIC) { + concat(binary_string, "0000"); /* Alphanumeric latch */ + concat(binary_string, "00100"); /* ISO/IEC 646 latch */ + } + if (last_mode == ALPHA) { + concat(binary_string, "00100"); /* ISO/IEC 646 latch */ + } + } + + if ((general_field[i] >= '0') && (general_field[i] <= '9')) { + + value = general_field[i] - 43; + + mask = 0x10; + for (j = 0; j < 5; j++) { + concat(binary_string, (value & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + if ((general_field[i] >= 'A') && (general_field[i] <= 'Z')) { + + value = general_field[i] - 1; + + mask = 0x40; + for (j = 0; j < 7; j++) { + concat(binary_string, (value & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + if ((general_field[i] >= 'a') && (general_field[i] <= 'z')) { + + value = general_field[i] - 7; + + mask = 0x40; + for (j = 0; j < 7; j++) { + concat(binary_string, (value & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + last_mode = ISOIEC; + if (general_field[i] == '[') { + concat(binary_string, "01111"); + last_mode = NUMERIC; + } /* FNC1/Numeric latch */ + if (general_field[i] == '!') concat(binary_string, "11101000"); /* exclamation mark */ + if (general_field[i] == 34) concat(binary_string, "11101001"); /* quotation mark */ + if (general_field[i] == 37) concat(binary_string, "11101010"); /* percent sign */ + if (general_field[i] == '&') concat(binary_string, "11101011"); /* ampersand */ + if (general_field[i] == 39) concat(binary_string, "11101100"); /* apostrophe */ + if (general_field[i] == '(') concat(binary_string, "11101101"); /* left parenthesis */ + if (general_field[i] == ')') concat(binary_string, "11101110"); /* right parenthesis */ + if (general_field[i] == '*') concat(binary_string, "11101111"); /* asterisk */ + if (general_field[i] == '+') concat(binary_string, "11110000"); /* plus sign */ + if (general_field[i] == ',') concat(binary_string, "11110001"); /* comma */ + if (general_field[i] == '-') concat(binary_string, "11110010"); /* minus or hyphen */ + if (general_field[i] == '.') concat(binary_string, "11110011"); /* period or full stop */ + if (general_field[i] == '/') concat(binary_string, "11110100"); /* slash or solidus */ + if (general_field[i] == ':') concat(binary_string, "11110101"); /* colon */ + if (general_field[i] == ';') concat(binary_string, "11110110"); /* semicolon */ + if (general_field[i] == '<') concat(binary_string, "11110111"); /* less-than sign */ + if (general_field[i] == '=') concat(binary_string, "11111000"); /* equals sign */ + if (general_field[i] == '>') concat(binary_string, "11111001"); /* greater-than sign */ + if (general_field[i] == '?') concat(binary_string, "11111010"); /* question mark */ + if (general_field[i] == '_') concat(binary_string, "11111011"); /* underline or low line */ + if (general_field[i] == ' ') concat(binary_string, "11111100"); /* space */ + + i++; + break; + } + } while (i + latch < strlen(general_field)); + if (debug) printf("Resultant binary = %s\n", binary_string); + if (debug) printf("\tLength: %d\n", (int) strlen(binary_string)); + + remainder = 12 - (strlen(binary_string) % 12); + if (remainder == 12) { + remainder = 0; + } + if (strlen(binary_string) < 36) { + remainder = 36 - strlen(binary_string); + } + + if (latch == 1) { + /* There is still one more numeric digit to encode */ + if (debug) printf("Adding extra (odd) numeric digit\n"); + + if (last_mode == NUMERIC) { + if ((remainder >= 4) && (remainder <= 6)) { + value = ctoi(general_field[i]); + value++; + + mask = 0x08; + for (j = 0; j < 4; j++) { + concat(binary_string, (value & mask) ? "1" : "0"); + mask = mask >> 1; + } + } else { + d1 = ctoi(general_field[i]); + d2 = 10; + + value = (11 * d1) + d2 + 8; + + mask = 0x40; + for (j = 0; j < 7; j++) { + concat(binary_string, (value & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + } else { + value = general_field[i] - 43; + + mask = 0x10; + for (j = 0; j < 5; j++) { + concat(binary_string, (value & mask) ? "1" : "0"); + mask = mask >> 1; + } + } + + remainder = 12 - (strlen(binary_string) % 12); + if (remainder == 12) { + remainder = 0; + } + if (strlen(binary_string) < 36) { + remainder = 36 - strlen(binary_string); + } + if (debug) printf("Resultant binary = %s\n", binary_string); + if (debug) printf("\tLength: %d\n", (int) strlen(binary_string)); + } + + if (strlen(binary_string) > 252) { + strcpy(symbol->errtxt, "Input too long"); + return ZINT_ERROR_TOO_LONG; + } + + /* Now add padding to binary string (7.2.5.5.4) */ + i = remainder; + if ((strlen(general_field) != 0) && (last_mode == NUMERIC)) { + strcpy(padstring, "0000"); + i -= 4; + } else { + strcpy(padstring, ""); + } + for (; i > 0; i -= 5) { + concat(padstring, "00100"); + } + + padstring[remainder] = '\0'; + concat(binary_string, padstring); + + /* Patch variable length symbol bit field */ + d1 = ((strlen(binary_string) / 12) + 1) & 1; + if (strlen(binary_string) <= 156) { + d2 = 0; + } else { + d2 = 1; + } + + if (encoding_method == 1) { + binary_string[2] = d1 ? '1' : '0'; + binary_string[3] = d2 ? '1' : '0'; + } + if (encoding_method == 2) { + binary_string[3] = d1 ? '1' : '0'; + binary_string[4] = d2 ? '1' : '0'; + } + if ((encoding_method == 5) || (encoding_method == 6)) { + binary_string[6] = d1 ? '1' : '0'; + binary_string[7] = d2 ? '1' : '0'; + } + if (debug) printf("Resultant binary = %s\n", binary_string); + if (debug) printf("\tLength: %d\n", (int) strlen(binary_string)); + return 0; } -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; - int char_widths[21][8], checksum, check_widths[8], c_group; - int check_char, c_odd, c_even, elements[235], pattern_width, reader, writer; - int row, elements_in_sub, special_case_row, left_to_right; - int codeblocks, sub_elements[235], stack_rows, current_row, current_block; - int separator_row; +/* GS1 DataBar Expanded */ +int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int src_len) { + int i, j, k, l, data_chars, vs[21], group[21], v_odd[21], v_even[21]; + char substring[21][14], latch; + int char_widths[21][8], checksum, check_widths[8], c_group; + int check_char, c_odd, c_even, elements[235], pattern_width, reader, writer; + int row, elements_in_sub, special_case_row, left_to_right; + int codeblocks, sub_elements[235], stack_rows, current_row, current_block; + int separator_row; #ifndef _MSC_VER - char reduced[src_len], binary_string[7 * src_len]; + char reduced[src_len], binary_string[7 * src_len]; #else - char* reduced = (char*)_alloca(src_len); - char* binary_string = (char*)_alloca(7 * src_len); + char* reduced = (char*) _alloca(src_len); + char* binary_string = (char*) _alloca(7 * src_len); #endif - - separator_row = 0; - reader=0; - if(symbol->input_mode != GS1_MODE) { - /* GS1 data has not been verified yet */ - i = gs1_verify(symbol, source, src_len, reduced); - if(i != 0) { return i; } - } - - if((symbol->symbology == BARCODE_RSS_EXP_CC) || (symbol->symbology == BARCODE_RSS_EXPSTACK_CC)) { - /* make space for a composite separator pattern */ - separator_row = symbol->rows; - symbol->row_height[separator_row] = 1; - symbol->rows += 1; - } - - strcpy(binary_string, ""); - - if(symbol->option_1 == 2) { - concat(binary_string, "1"); - } else { - concat(binary_string, "0"); - } - - i = rss_binary_string(symbol, reduced, binary_string); - if(i != 0) { - return i; - } + separator_row = 0; + reader = 0; - data_chars = strlen(binary_string) / 12; - - for(i = 0; i < data_chars; i++) { - for(j = 0; j < 12; j++) { - substring[i][j] = binary_string[(i * 12) + j]; - } - substring[i][12] = '\0'; - } - - for(i = 0; i < data_chars; i++) { - vs[i] = 0; - if(substring[i][0] == '1') { vs[i] += 2048; } - if(substring[i][1] == '1') { vs[i] += 1024; } - if(substring[i][2] == '1') { vs[i] += 512; } - if(substring[i][3] == '1') { vs[i] += 256; } - if(substring[i][4] == '1') { vs[i] += 128; } - if(substring[i][5] == '1') { vs[i] += 64; } - if(substring[i][6] == '1') { vs[i] += 32; } - if(substring[i][7] == '1') { vs[i] += 16; } - if(substring[i][8] == '1') { vs[i] += 8; } - if(substring[i][9] == '1') { vs[i] += 4; } - if(substring[i][10] == '1') { vs[i] += 2; } - if(substring[i][11] == '1') { vs[i] += 1; } - } - - for(i = 0; i < data_chars; i++) { - if(vs[i] <= 347) { group[i] = 1; } - if((vs[i] >= 348) && (vs[i] <= 1387)) { group[i] = 2; } - if((vs[i] >= 1388) && (vs[i] <= 2947)) { group[i] = 3; } - if((vs[i] >= 2948) && (vs[i] <= 3987)) { group[i] = 4; } - if(vs[i] >= 3988) { group[i] = 5; } - v_odd[i] = (vs[i] - g_sum_exp[group[i] - 1]) / t_even_exp[group[i] - 1]; - v_even[i] = (vs[i] - g_sum_exp[group[i] - 1]) % t_even_exp[group[i] - 1]; - - getRSSwidths(v_odd[i], modules_odd_exp[group[i] - 1], 4, widest_odd_exp[group[i] - 1], 0); - char_widths[i][0] = widths[0]; - char_widths[i][2] = widths[1]; - char_widths[i][4] = widths[2]; - char_widths[i][6] = widths[3]; - getRSSwidths(v_even[i], modules_even_exp[group[i] - 1], 4, widest_even_exp[group[i] - 1], 1); - char_widths[i][1] = widths[0]; - char_widths[i][3] = widths[1]; - char_widths[i][5] = widths[2]; - char_widths[i][7] = widths[3]; - } - - /* 7.2.6 Check character */ - /* The checksum value is equal to the mod 211 residue of the weighted sum of the widths of the - elements in the data characters. */ - checksum = 0; - for(i = 0; i < data_chars; i++) { - row = weight_rows[(((data_chars - 2) / 2) * 21) + i]; - for(j = 0; j < 8; j++) { - checksum += (char_widths[i][j] * checksum_weight_exp[(row * 8) + j]); - - } - } - - check_char = (211 * ((data_chars + 1) - 4)) + (checksum % 211); - - if(check_char <= 347) { c_group = 1; } - if((check_char >= 348) && (check_char <= 1387)) { c_group = 2; } - if((check_char >= 1388) && (check_char <= 2947)) { c_group = 3; } - if((check_char >= 2948) && (check_char <= 3987)) { c_group = 4; } - if(check_char >= 3988) { c_group = 5; } - - c_odd = (check_char - g_sum_exp[c_group - 1]) / t_even_exp[c_group - 1]; - c_even = (check_char - g_sum_exp[c_group - 1]) % t_even_exp[c_group - 1]; - - getRSSwidths(c_odd, modules_odd_exp[c_group - 1], 4, widest_odd_exp[c_group - 1], 0); - check_widths[0] = widths[0]; - check_widths[2] = widths[1]; - check_widths[4] = widths[2]; - check_widths[6] = widths[3]; - getRSSwidths(c_even, modules_even_exp[c_group - 1], 4, widest_even_exp[c_group - 1], 1); - check_widths[1] = widths[0]; - check_widths[3] = widths[1]; - check_widths[5] = widths[2]; - check_widths[7] = widths[3]; - - /* Initialise element array */ - pattern_width = ((((data_chars + 1) / 2) + ((data_chars + 1) & 1)) * 5) + ((data_chars + 1) * 8) + 4; - for(i = 0; i < pattern_width; i++) { - elements[i] = 0; - } - - elements[0] = 1; - elements[1] = 1; - elements[pattern_width - 2] = 1; - elements[pattern_width - 1] = 1; - - /* Put finder patterns in element array */ - for(i = 0; i < (((data_chars + 1) / 2) + ((data_chars + 1) & 1)); i++) { - k = ((((((data_chars + 1) - 2) / 2) + ((data_chars + 1) & 1)) - 1) * 11) + i; - for(j = 0; j < 5; j++) { - elements[(21 * i) + j + 10] = finder_pattern_exp[((finder_sequence[k] - 1) * 5) + j]; - } - } - - /* Put check character in element array */ - for(i = 0; i < 8; i++) { - elements[i + 2] = check_widths[i]; - } - - /* Put forward reading data characters in element array */ - for(i = 1; i < data_chars; i += 2) { - for(j = 0; j < 8; j++) { - elements[(((i - 1) / 2) * 21) + 23 + j] = char_widths[i][j]; - } - } - - /* Put reversed data characters in element array */ - for(i = 0; i < data_chars; i += 2) { - for(j = 0; j < 8; j++) { - elements[((i / 2) * 21) + 15 + j] = char_widths[i][7 - j]; - } - } - - if((symbol->symbology == BARCODE_RSS_EXP) || (symbol->symbology == BARCODE_RSS_EXP_CC)) { - /* Copy elements into symbol */ - writer = 0; - latch = '0'; - for(i = 0; i < pattern_width; i++) { - for(j = 0; j < elements[i]; j++) { - if(latch == '1') { set_module(symbol, symbol->rows, writer); } else { unset_module(symbol, symbol->rows, writer); } - writer++; - } - if(latch == '1') { - latch = '0'; - } else { - latch = '1'; - } - } - if(symbol->width < writer) { symbol->width = writer; } - symbol->rows = symbol->rows + 1; - if(symbol->symbology == BARCODE_RSS_EXP_CC) { - for(j = 4; j < (symbol->width - 4); j++) { - if(module_is_set(symbol, separator_row + 1, j)) { - unset_module(symbol, separator_row, j); - } else { - set_module(symbol, separator_row, j); - } - } - /* finder bar adjustment */ - for(j = 0; j < (writer / 49); j++) { - k = (49 * j) + 18; - for(i = 0; i < 15; i++) { - if((!(module_is_set(symbol, separator_row + 1, i + k - 1))) && - (!(module_is_set(symbol, separator_row + 1, i + k))) && - module_is_set(symbol, separator_row, i + k - 1)) { - unset_module(symbol, separator_row, i + k); - } - } - } - } - - /* Add human readable text */ - for(i = 0; i <= src_len; i++) { - if((source[i] != '[') && (source[i] != ']')) { - symbol->text[i] = source[i]; - } else { - if(source[i] == '[') { - symbol->text[i] = '('; - } - if(source[i] == ']') { - symbol->text[i] = ')'; - } - } - } - - } else { - /* RSS Expanded Stacked */ - - /* Bug corrected: Character missing for message - * [01]90614141999996[10]1234222222222221 - * Patch by Daniel Frede - */ - codeblocks = (data_chars + 1) / 2 + ((data_chars + 1) % 2); - - if((symbol->option_2 < 1) || (symbol->option_2 > 10)) { - symbol->option_2 = 2; - } - if((symbol->option_1 == 2) && (symbol->option_2 == 1)) { - /* "There shall be a minimum of four symbol characters in the - first row of an RSS Expanded Stacked symbol when it is the linear - component of an EAN.UCC Composite symbol." */ - symbol->option_2 = 2; - } - - stack_rows = codeblocks / symbol->option_2; - if(codeblocks % symbol->option_2 > 0) { - stack_rows++; - } - - current_block = 0; - for(current_row = 1; current_row <= stack_rows; current_row++) { - for(i = 0; i < 235; i++) { - sub_elements[i] = 0; - } - special_case_row = 0; - - /* Row Start */ - sub_elements[0] = 1; - sub_elements[1] = 1; - elements_in_sub = 2; - - /* Row Data */ - reader = 0; - do { - if(((symbol->option_2 & 1) || (current_row & 1)) || - ((current_row == stack_rows) && (codeblocks != (current_row * symbol->option_2)) && - (((current_row * symbol->option_2) - codeblocks) & 1))) { - /* left to right */ - left_to_right = 1; - i = 2 + (current_block * 21); - for(j = 0; j < 21; j++) { - if((i + j) < pattern_width) { - sub_elements[j + (reader * 21) + 2] = elements[i + j]; - elements_in_sub++; - } - } - } else { - /* right to left */ - left_to_right = 0; - if((current_row * symbol->option_2) < codeblocks) { - /* a full row */ - i = 2 + (((current_row * symbol->option_2) - reader - 1) * 21); - for(j = 0; j < 21; j++) { - if((i + j) < pattern_width) { - sub_elements[(20 - j) + (reader * 21) + 2] = elements[i + j]; - elements_in_sub++; - } - } - } else { - /* a partial row */ - k = ((current_row * symbol->option_2) - codeblocks); - l = (current_row * symbol->option_2) - reader - 1; - i = 2 + ((l - k) * 21); - for(j = 0; j < 21; j++) { - if((i + j) < pattern_width) { - sub_elements[(20 - j) + (reader * 21) + 2] = elements[i + j]; - elements_in_sub++; - } - } - } - } - reader++; - current_block++; - } while ((reader < symbol->option_2) && (current_block < codeblocks)); - - /* Row Stop */ - sub_elements[elements_in_sub] = 1; - sub_elements[elements_in_sub + 1] = 1; - elements_in_sub += 2; - - latch = current_row & 1 ? '0' : '1'; - - if ((current_row == stack_rows) && (codeblocks != (current_row * symbol->option_2)) && - (((current_row * symbol->option_2) - codeblocks) & 1) ) { - /* Special case bottom row */ - special_case_row = 1; - sub_elements[0] = 2; - latch = '0'; - } - - writer = 0; - for(i = 0; i < elements_in_sub; i++) { - for(j = 0; j < sub_elements[i]; j++) { - if(latch == '1') { set_module(symbol, symbol->rows, writer); } else { unset_module(symbol, symbol->rows, writer); } - writer++; - } - if(latch == '1') { - latch = '0'; - } else { - latch = '1'; - } - } - if(symbol->width < writer) { symbol->width = writer; } - - if(current_row != 1) { - /* middle separator pattern (above current row) */ - for(j = 5; j < (49 * symbol->option_2); j += 2) { - set_module(symbol, symbol->rows - 2, j); - } - symbol->row_height[symbol->rows - 2] = 1; - /* bottom separator pattern (above current row) */ - for(j = 4; j < (writer - 4); j++) { - if(module_is_set(symbol, symbol->rows, j)) { - unset_module(symbol, symbol->rows - 1, j); - } else { - set_module(symbol, symbol->rows - 1, j); - } - } - symbol->row_height[symbol->rows - 1] = 1; - /* finder bar adjustment */ - for(j = 0; j < reader; j++) { - k = (49 * j) + (special_case_row ? 19 : 18); - if(left_to_right) { - for(i = 0; i < 15; i++) { - if((!(module_is_set(symbol, symbol->rows, i + k - 1))) && - (!(module_is_set(symbol, symbol->rows, i + k))) && - module_is_set(symbol, symbol->rows - 1, i + k - 1)) { - unset_module(symbol, symbol->rows - 1, i + k); - } - } - } else { - for(i = 14; i >= 0; i--) { - if((!(module_is_set(symbol, symbol->rows, i + k + 1))) && - (!(module_is_set(symbol, symbol->rows, i + k))) && - module_is_set(symbol, symbol->rows - 1, i + k + 1)) { - unset_module(symbol, symbol->rows - 1, i + k); - } - } - } - } - } - - if(current_row != stack_rows) { - /* top separator pattern (below current row) */ - for(j = 4; j < (writer - 4); j++) { - if(module_is_set(symbol, symbol->rows, j)) { - unset_module(symbol, symbol->rows + 1, j); - } else { - set_module(symbol, symbol->rows + 1, j); - } - } - symbol->row_height[symbol->rows + 1] = 1; - /* finder bar adjustment */ - for(j = 0; j < reader; j++) { - k = (49 * j) + 18; - if(left_to_right) { - for(i = 0; i < 15; i++) { - if((!(module_is_set(symbol, symbol->rows, i + k - 1))) && - (!(module_is_set(symbol, symbol->rows, i + k))) && - module_is_set(symbol, symbol->rows + 1, i + k - 1)) { - unset_module(symbol, symbol->rows + 1, i + k); - } - } - } else{ - for(i = 14; i >= 0; i--) { - if((!(module_is_set(symbol, symbol->rows, i + k + 1))) && - (!(module_is_set(symbol, symbol->rows, i + k))) && - module_is_set(symbol, symbol->rows + 1, i + k + 1)) { - unset_module(symbol, symbol->rows + 1, i + k); - } - } - } - } - } - - symbol->rows = symbol->rows + 4; - } - symbol->rows = symbol->rows - 3; - if(symbol->symbology == BARCODE_RSS_EXPSTACK_CC) { - for(j = 4; j < (symbol->width - 4); j++) { - if(module_is_set(symbol, separator_row + 1, j)) { - unset_module(symbol, separator_row, j); - } else { - set_module(symbol, separator_row, j); - } - } - /* finder bar adjustment */ - for(j = 0; j < reader; j++) { - k = (49 * j) + 18; - for(i = 0; i < 15; i++) { - if((!(module_is_set(symbol, separator_row + 1, i + k - 1))) && - (!(module_is_set(symbol, separator_row + 1, i + k))) && - module_is_set(symbol, separator_row, i + k - 1)) { - unset_module(symbol, separator_row, i + k); - } - } - } - } - - } - - return 0; + if (symbol->input_mode != GS1_MODE) { + /* GS1 data has not been verified yet */ + i = gs1_verify(symbol, source, src_len, reduced); + if (i != 0) { + return i; + } + } + + if ((symbol->symbology == BARCODE_RSS_EXP_CC) || (symbol->symbology == BARCODE_RSS_EXPSTACK_CC)) { + /* make space for a composite separator pattern */ + separator_row = symbol->rows; + symbol->row_height[separator_row] = 1; + symbol->rows += 1; + } + + strcpy(binary_string, ""); + + if (symbol->option_1 == 2) { + concat(binary_string, "1"); + } else { + concat(binary_string, "0"); + } + + i = rss_binary_string(symbol, reduced, binary_string); + if (i != 0) { + return i; + } + + data_chars = strlen(binary_string) / 12; + + for (i = 0; i < data_chars; i++) { + for (j = 0; j < 12; j++) { + substring[i][j] = binary_string[(i * 12) + j]; + } + substring[i][12] = '\0'; + } + + for (i = 0; i < data_chars; i++) { + vs[i] = 0; + for (int p = 0; p < 12; p++) { + if (substring[i][p] == '1') { + vs[i] += (0x800 >> p); + } + } + } + + for (i = 0; i < data_chars; i++) { + if (vs[i] <= 347) { + group[i] = 1; + } + if ((vs[i] >= 348) && (vs[i] <= 1387)) { + group[i] = 2; + } + if ((vs[i] >= 1388) && (vs[i] <= 2947)) { + group[i] = 3; + } + if ((vs[i] >= 2948) && (vs[i] <= 3987)) { + group[i] = 4; + } + if (vs[i] >= 3988) { + group[i] = 5; + } + v_odd[i] = (vs[i] - g_sum_exp[group[i] - 1]) / t_even_exp[group[i] - 1]; + v_even[i] = (vs[i] - g_sum_exp[group[i] - 1]) % t_even_exp[group[i] - 1]; + + getRSSwidths(v_odd[i], modules_odd_exp[group[i] - 1], 4, widest_odd_exp[group[i] - 1], 0); + char_widths[i][0] = widths[0]; + char_widths[i][2] = widths[1]; + char_widths[i][4] = widths[2]; + char_widths[i][6] = widths[3]; + getRSSwidths(v_even[i], modules_even_exp[group[i] - 1], 4, widest_even_exp[group[i] - 1], 1); + char_widths[i][1] = widths[0]; + char_widths[i][3] = widths[1]; + char_widths[i][5] = widths[2]; + char_widths[i][7] = widths[3]; + } + + /* 7.2.6 Check character */ + /* The checksum value is equal to the mod 211 residue of the weighted sum of the widths of the + elements in the data characters. */ + checksum = 0; + for (i = 0; i < data_chars; i++) { + row = weight_rows[(((data_chars - 2) / 2) * 21) + i]; + for (j = 0; j < 8; j++) { + checksum += (char_widths[i][j] * checksum_weight_exp[(row * 8) + j]); + + } + } + + check_char = (211 * ((data_chars + 1) - 4)) + (checksum % 211); + + if (check_char <= 347) { + c_group = 1; + } + if ((check_char >= 348) && (check_char <= 1387)) { + c_group = 2; + } + if ((check_char >= 1388) && (check_char <= 2947)) { + c_group = 3; + } + if ((check_char >= 2948) && (check_char <= 3987)) { + c_group = 4; + } + if (check_char >= 3988) { + c_group = 5; + } + + c_odd = (check_char - g_sum_exp[c_group - 1]) / t_even_exp[c_group - 1]; + c_even = (check_char - g_sum_exp[c_group - 1]) % t_even_exp[c_group - 1]; + + getRSSwidths(c_odd, modules_odd_exp[c_group - 1], 4, widest_odd_exp[c_group - 1], 0); + check_widths[0] = widths[0]; + check_widths[2] = widths[1]; + check_widths[4] = widths[2]; + check_widths[6] = widths[3]; + getRSSwidths(c_even, modules_even_exp[c_group - 1], 4, widest_even_exp[c_group - 1], 1); + check_widths[1] = widths[0]; + check_widths[3] = widths[1]; + check_widths[5] = widths[2]; + check_widths[7] = widths[3]; + + /* Initialise element array */ + pattern_width = ((((data_chars + 1) / 2) + ((data_chars + 1) & 1)) * 5) + ((data_chars + 1) * 8) + 4; + for (i = 0; i < pattern_width; i++) { + elements[i] = 0; + } + + elements[0] = 1; + elements[1] = 1; + elements[pattern_width - 2] = 1; + elements[pattern_width - 1] = 1; + + /* Put finder patterns in element array */ + for (i = 0; i < (((data_chars + 1) / 2) + ((data_chars + 1) & 1)); i++) { + k = ((((((data_chars + 1) - 2) / 2) + ((data_chars + 1) & 1)) - 1) * 11) + i; + for (j = 0; j < 5; j++) { + elements[(21 * i) + j + 10] = finder_pattern_exp[((finder_sequence[k] - 1) * 5) + j]; + } + } + + /* Put check character in element array */ + for (i = 0; i < 8; i++) { + elements[i + 2] = check_widths[i]; + } + + /* Put forward reading data characters in element array */ + for (i = 1; i < data_chars; i += 2) { + for (j = 0; j < 8; j++) { + elements[(((i - 1) / 2) * 21) + 23 + j] = char_widths[i][j]; + } + } + + /* Put reversed data characters in element array */ + for (i = 0; i < data_chars; i += 2) { + for (j = 0; j < 8; j++) { + elements[((i / 2) * 21) + 15 + j] = char_widths[i][7 - j]; + } + } + + if ((symbol->symbology == BARCODE_RSS_EXP) || (symbol->symbology == BARCODE_RSS_EXP_CC)) { + /* Copy elements into symbol */ + writer = 0; + latch = '0'; + for (i = 0; i < pattern_width; i++) { + for (j = 0; j < elements[i]; j++) { + if (latch == '1') { + set_module(symbol, symbol->rows, writer); + } else { + unset_module(symbol, symbol->rows, writer); + } + writer++; + } + if (latch == '1') { + latch = '0'; + } else { + latch = '1'; + } + } + if (symbol->width < writer) { + symbol->width = writer; + } + symbol->rows = symbol->rows + 1; + if (symbol->symbology == BARCODE_RSS_EXP_CC) { + for (j = 4; j < (symbol->width - 4); j++) { + if (module_is_set(symbol, separator_row + 1, j)) { + unset_module(symbol, separator_row, j); + } else { + set_module(symbol, separator_row, j); + } + } + /* finder bar adjustment */ + for (j = 0; j < (writer / 49); j++) { + k = (49 * j) + 18; + for (i = 0; i < 15; i++) { + if ((!(module_is_set(symbol, separator_row + 1, i + k - 1))) && + (!(module_is_set(symbol, separator_row + 1, i + k))) && + module_is_set(symbol, separator_row, i + k - 1)) { + unset_module(symbol, separator_row, i + k); + } + } + } + } + + /* Add human readable text */ + for (i = 0; i <= src_len; i++) { + if ((source[i] != '[') && (source[i] != ']')) { + symbol->text[i] = source[i]; + } else { + if (source[i] == '[') { + symbol->text[i] = '('; + } + if (source[i] == ']') { + symbol->text[i] = ')'; + } + } + } + + } else { + /* RSS Expanded Stacked */ + + /* Bug corrected: Character missing for message + * [01]90614141999996[10]1234222222222221 + * Patch by Daniel Frede + */ + codeblocks = (data_chars + 1) / 2 + ((data_chars + 1) % 2); + + if ((symbol->option_2 < 1) || (symbol->option_2 > 10)) { + symbol->option_2 = 2; + } + if ((symbol->option_1 == 2) && (symbol->option_2 == 1)) { + /* "There shall be a minimum of four symbol characters in the + first row of an RSS Expanded Stacked symbol when it is the linear + component of an EAN.UCC Composite symbol." */ + symbol->option_2 = 2; + } + + stack_rows = codeblocks / symbol->option_2; + if (codeblocks % symbol->option_2 > 0) { + stack_rows++; + } + + current_block = 0; + for (current_row = 1; current_row <= stack_rows; current_row++) { + for (i = 0; i < 235; i++) { + sub_elements[i] = 0; + } + special_case_row = 0; + + /* Row Start */ + sub_elements[0] = 1; + sub_elements[1] = 1; + elements_in_sub = 2; + + /* Row Data */ + reader = 0; + do { + if (((symbol->option_2 & 1) || (current_row & 1)) || + ((current_row == stack_rows) && (codeblocks != (current_row * symbol->option_2)) && + (((current_row * symbol->option_2) - codeblocks) & 1))) { + /* left to right */ + left_to_right = 1; + i = 2 + (current_block * 21); + for (j = 0; j < 21; j++) { + if ((i + j) < pattern_width) { + sub_elements[j + (reader * 21) + 2] = elements[i + j]; + elements_in_sub++; + } + } + } else { + /* right to left */ + left_to_right = 0; + if ((current_row * symbol->option_2) < codeblocks) { + /* a full row */ + i = 2 + (((current_row * symbol->option_2) - reader - 1) * 21); + for (j = 0; j < 21; j++) { + if ((i + j) < pattern_width) { + sub_elements[(20 - j) + (reader * 21) + 2] = elements[i + j]; + elements_in_sub++; + } + } + } else { + /* a partial row */ + k = ((current_row * symbol->option_2) - codeblocks); + l = (current_row * symbol->option_2) - reader - 1; + i = 2 + ((l - k) * 21); + for (j = 0; j < 21; j++) { + if ((i + j) < pattern_width) { + sub_elements[(20 - j) + (reader * 21) + 2] = elements[i + j]; + elements_in_sub++; + } + } + } + } + reader++; + current_block++; + } while ((reader < symbol->option_2) && (current_block < codeblocks)); + + /* Row Stop */ + sub_elements[elements_in_sub] = 1; + sub_elements[elements_in_sub + 1] = 1; + elements_in_sub += 2; + + latch = current_row & 1 ? '0' : '1'; + + if ((current_row == stack_rows) && (codeblocks != (current_row * symbol->option_2)) && + (((current_row * symbol->option_2) - codeblocks) & 1)) { + /* Special case bottom row */ + special_case_row = 1; + sub_elements[0] = 2; + latch = '0'; + } + + writer = 0; + for (i = 0; i < elements_in_sub; i++) { + for (j = 0; j < sub_elements[i]; j++) { + if (latch == '1') { + set_module(symbol, symbol->rows, writer); + } else { + unset_module(symbol, symbol->rows, writer); + } + writer++; + } + if (latch == '1') { + latch = '0'; + } else { + latch = '1'; + } + } + if (symbol->width < writer) { + symbol->width = writer; + } + + if (current_row != 1) { + /* middle separator pattern (above current row) */ + for (j = 5; j < (49 * symbol->option_2); j += 2) { + set_module(symbol, symbol->rows - 2, j); + } + symbol->row_height[symbol->rows - 2] = 1; + /* bottom separator pattern (above current row) */ + for (j = 4; j < (writer - 4); j++) { + if (module_is_set(symbol, symbol->rows, j)) { + unset_module(symbol, symbol->rows - 1, j); + } else { + set_module(symbol, symbol->rows - 1, j); + } + } + symbol->row_height[symbol->rows - 1] = 1; + /* finder bar adjustment */ + for (j = 0; j < reader; j++) { + k = (49 * j) + (special_case_row ? 19 : 18); + if (left_to_right) { + for (i = 0; i < 15; i++) { + if ((!(module_is_set(symbol, symbol->rows, i + k - 1))) && + (!(module_is_set(symbol, symbol->rows, i + k))) && + module_is_set(symbol, symbol->rows - 1, i + k - 1)) { + unset_module(symbol, symbol->rows - 1, i + k); + } + } + } else { + for (i = 14; i >= 0; i--) { + if ((!(module_is_set(symbol, symbol->rows, i + k + 1))) && + (!(module_is_set(symbol, symbol->rows, i + k))) && + module_is_set(symbol, symbol->rows - 1, i + k + 1)) { + unset_module(symbol, symbol->rows - 1, i + k); + } + } + } + } + } + + if (current_row != stack_rows) { + /* top separator pattern (below current row) */ + for (j = 4; j < (writer - 4); j++) { + if (module_is_set(symbol, symbol->rows, j)) { + unset_module(symbol, symbol->rows + 1, j); + } else { + set_module(symbol, symbol->rows + 1, j); + } + } + symbol->row_height[symbol->rows + 1] = 1; + /* finder bar adjustment */ + for (j = 0; j < reader; j++) { + k = (49 * j) + 18; + if (left_to_right) { + for (i = 0; i < 15; i++) { + if ((!(module_is_set(symbol, symbol->rows, i + k - 1))) && + (!(module_is_set(symbol, symbol->rows, i + k))) && + module_is_set(symbol, symbol->rows + 1, i + k - 1)) { + unset_module(symbol, symbol->rows + 1, i + k); + } + } + } else { + for (i = 14; i >= 0; i--) { + if ((!(module_is_set(symbol, symbol->rows, i + k + 1))) && + (!(module_is_set(symbol, symbol->rows, i + k))) && + module_is_set(symbol, symbol->rows + 1, i + k + 1)) { + unset_module(symbol, symbol->rows + 1, i + k); + } + } + } + } + } + + symbol->rows = symbol->rows + 4; + } + symbol->rows = symbol->rows - 3; + if (symbol->symbology == BARCODE_RSS_EXPSTACK_CC) { + for (j = 4; j < (symbol->width - 4); j++) { + if (module_is_set(symbol, separator_row + 1, j)) { + unset_module(symbol, separator_row, j); + } else { + set_module(symbol, separator_row, j); + } + } + /* finder bar adjustment */ + for (j = 0; j < reader; j++) { + k = (49 * j) + 18; + for (i = 0; i < 15; i++) { + if ((!(module_is_set(symbol, separator_row + 1, i + k - 1))) && + (!(module_is_set(symbol, separator_row + 1, i + k))) && + module_is_set(symbol, separator_row, i + k - 1)) { + unset_module(symbol, separator_row, i + k); + } + } + } + } + + } + + return 0; } diff --git a/backend/rss.h b/backend/rss.h index c8e7c8e9..4fad12a7 100644 --- a/backend/rss.h +++ b/backend/rss.h @@ -2,7 +2,7 @@ /* libzint - the open source barcode library - Copyright (C) 2007 Robin Stuart + Copyright (C) 2007-2016 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -28,7 +28,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ #define NUMERIC 110 #define ALPHA 97 @@ -38,200 +38,261 @@ #define ALPHA_OR_ISO 121 /* RSS-14 Tables */ -static int g_sum_table[9] = { 0, 161, 961, 2015, 2715, 0, 336, 1036, 1516}; -static int t_table[9] = { 1, 10, 34, 70, 126, 4, 20, 48, 81}; -static int modules_odd[9] = { 12, 10, 8, 6, 4, 5, 7, 9, 11 }; -static int modules_even[9] = { 4, 6, 8, 10, 12, 10, 8, 6, 4 }; -static int widest_odd[9] = { 8, 6, 4, 3, 1, 2, 4, 6, 8 }; -static int widest_even[9] = { 1, 3, 5, 6, 8, 7, 5, 3, 1 }; +static int g_sum_table[9] = { + 0, 161, 961, 2015, 2715, 0, 336, 1036, 1516 +}; + +static int t_table[9] = { + 1, 10, 34, 70, 126, 4, 20, 48, 81 +}; + +static int modules_odd[9] = { + 12, 10, 8, 6, 4, 5, 7, 9, 11 +}; + +static int modules_even[9] = { + 4, 6, 8, 10, 12, 10, 8, 6, 4 +}; + +static int widest_odd[9] = { + 8, 6, 4, 3, 1, 2, 4, 6, 8 +}; + +static int widest_even[9] = { + 1, 3, 5, 6, 8, 7, 5, 3, 1 +}; + static int widths[8]; static int finder_pattern[45] = { - 3, 8, 2, 1, 1, - 3, 5, 5, 1, 1, - 3, 3, 7, 1, 1, - 3, 1, 9, 1, 1, - 2, 7, 4, 1, 1, - 2, 5, 6, 1, 1, - 2, 3, 8, 1, 1, - 1, 5, 7, 1, 1, - 1, 3, 9, 1, 1 + 3, 8, 2, 1, 1, + 3, 5, 5, 1, 1, + 3, 3, 7, 1, 1, + 3, 1, 9, 1, 1, + 2, 7, 4, 1, 1, + 2, 5, 6, 1, 1, + 2, 3, 8, 1, 1, + 1, 5, 7, 1, 1, + 1, 3, 9, 1, 1 }; -static int checksum_weight[32] = { /* Table 5 */ - 1, 3, 9, 27, 2, 6, 18, 54, - 4, 12, 36, 29, 8, 24, 72, 58, - 16, 48, 65, 37, 32, 17, 51, 74, - 64, 34, 23, 69, 49, 68, 46, 59 + +static int checksum_weight[32] = { + /* Table 5 */ + 1, 3, 9, 27, 2, 6, 18, 54, + 4, 12, 36, 29, 8, 24, 72, 58, + 16, 48, 65, 37, 32, 17, 51, 74, + 64, 34, 23, 69, 49, 68, 46, 59 }; /* RSS Limited Tables */ -static int t_even_ltd[7] = { 28, 728, 6454, 203, 2408, 1, 16632 }; -static int modules_odd_ltd[7] = { 17, 13, 9, 15, 11, 19, 7 }; -static int modules_even_ltd[7] = { 9, 13, 17, 11, 15, 7, 19 }; -static int widest_odd_ltd[7] = { 6, 5, 3, 5, 4, 8, 1 }; -static int widest_even_ltd[7] = { 3, 4, 6, 4, 5, 1, 8 }; -static int checksum_weight_ltd[28] = { /* Table 7 */ - 1, 3, 9, 27, 81, 65, 17, 51, 64, 14, 42, 37, 22, 66, - 20, 60, 2, 6, 18, 54, 73, 41, 34, 13, 39, 28, 84, 74 +static int t_even_ltd[7] = { + 28, 728, 6454, 203, 2408, 1, 16632 }; + +static int modules_odd_ltd[7] = { + 17, 13, 9, 15, 11, 19, 7 +}; + +static int modules_even_ltd[7] = { + 9, 13, 17, 11, 15, 7, 19 +}; + +static int widest_odd_ltd[7] = { + 6, 5, 3, 5, 4, 8, 1 +}; + +static int widest_even_ltd[7] = { + 3, 4, 6, 4, 5, 1, 8 +}; + +static int checksum_weight_ltd[28] = { + /* Table 7 */ + 1, 3, 9, 27, 81, 65, 17, 51, 64, 14, 42, 37, 22, 66, + 20, 60, 2, 6, 18, 54, 73, 41, 34, 13, 39, 28, 84, 74 +}; + static int finder_pattern_ltd[1246] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 3, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 2, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, - 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, - 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 2, 1, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, - 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, - 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, - 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, - 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, - 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, - 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, - 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, - 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, - 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 3, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 2, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, - 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, - 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, - 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, - 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, - 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, - 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, - 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, - 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, - 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, - 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, - 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, - 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, - 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, - 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, - 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, - 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 2, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, + 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, + 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 2, 1, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, + 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, + 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, + 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, + 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, + 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, + 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, + 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, + 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, + 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, + 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 3, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 2, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, + 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, + 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, + 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, + 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, + 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, + 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, + 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, + 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, + 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, + 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, + 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, + 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, + 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, + 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, + 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, + 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, + 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, + 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1 }; /* RSS Expanded Tables */ -static int g_sum_exp[5] = { 0, 348, 1388, 2948, 3988 }; -static int t_even_exp[5] = { 4, 20, 52, 104, 204 }; -static int modules_odd_exp[5] = { 12, 10, 8, 6, 4 }; -static int modules_even_exp[5] = { 5, 7, 9, 11, 13 }; -static int widest_odd_exp[5] = { 7, 5, 4, 3, 1 }; -static int widest_even_exp[5] = { 2, 4, 5, 6, 8 }; -static int checksum_weight_exp[184] = { /* Table 14 */ - 1, 3, 9, 27, 81, 32, 96, 77, - 20, 60, 180, 118, 143, 7, 21, 63, - 189, 145, 13, 39, 117, 140, 209, 205, - 193, 157, 49, 147, 19, 57, 171, 91, - 62, 186, 136, 197, 169, 85, 44, 132, - 185, 133, 188, 142, 4, 12, 36, 108, - 113, 128, 173, 97, 80, 29, 87, 50, - 150, 28, 84, 41, 123, 158, 52, 156, - 46, 138, 203, 187, 139, 206, 196, 166, - 76, 17, 51, 153, 37, 111, 122, 155, - 43, 129, 176, 106, 107, 110, 119, 146, - 16, 48, 144, 10, 30, 90, 59, 177, - 109, 116, 137, 200, 178, 112, 125, 164, - 70, 210, 208, 202, 184, 130, 179, 115, - 134, 191, 151, 31, 93, 68, 204, 190, - 148, 22, 66, 198, 172, 94, 71, 2, - 6, 18, 54, 162, 64, 192, 154, 40, - 120, 149, 25, 75, 14, 42, 126, 167, - 79, 26, 78, 23, 69, 207, 199, 175, - 103, 98, 83, 38, 114, 131, 182, 124, - 161, 61, 183, 127, 170, 88, 53, 159, - 55, 165, 73, 8, 24, 72, 5, 15, - 45, 135, 194, 160, 58, 174, 100, 89 +static int g_sum_exp[5] = { + 0, 348, 1388, 2948, 3988 }; -static int finder_pattern_exp[60] = { /* Table 15 */ - 1, 8, 4, 1, 1, - 1, 1, 4, 8, 1, - 3, 6, 4, 1, 1, - 1, 1, 4, 6, 3, - 3, 4, 6, 1, 1, - 1, 1, 6, 4, 3, - 3, 2, 8, 1, 1, - 1, 1, 8, 2, 3, - 2, 6, 5, 1, 1, - 1, 1, 5, 6, 2, - 2, 2, 9, 1, 1, - 1, 1, 9, 2, 2 + +static int t_even_exp[5] = { + 4, 20, 52, 104, 204 }; -static int finder_sequence[198] = { /* Table 16 */ - 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 6, 3, 8, 0, 0, 0, 0, 0, 0, 0, - 1, 10, 3, 8, 5, 0, 0, 0, 0, 0, 0, - 1, 10, 3, 8, 7, 12, 0, 0, 0, 0, 0, - 1, 10, 3, 8, 9, 12, 11, 0, 0, 0, 0, - 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, - 1, 2, 3, 4, 5, 6, 7, 10, 9, 0, 0, - 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 0, - 1, 2, 3, 4, 5, 8, 7, 10, 9, 12, 11 + +static int modules_odd_exp[5] = { + 12, 10, 8, 6, 4 }; + +static int modules_even_exp[5] = { + 5, 7, 9, 11, 13 +}; + +static int widest_odd_exp[5] = { + 7, 5, 4, 3, 1 +}; + +static int widest_even_exp[5] = { + 2, 4, 5, 6, 8 +}; + +static int checksum_weight_exp[184] = { + /* Table 14 */ + 1, 3, 9, 27, 81, 32, 96, 77, + 20, 60, 180, 118, 143, 7, 21, 63, + 189, 145, 13, 39, 117, 140, 209, 205, + 193, 157, 49, 147, 19, 57, 171, 91, + 62, 186, 136, 197, 169, 85, 44, 132, + 185, 133, 188, 142, 4, 12, 36, 108, + 113, 128, 173, 97, 80, 29, 87, 50, + 150, 28, 84, 41, 123, 158, 52, 156, + 46, 138, 203, 187, 139, 206, 196, 166, + 76, 17, 51, 153, 37, 111, 122, 155, + 43, 129, 176, 106, 107, 110, 119, 146, + 16, 48, 144, 10, 30, 90, 59, 177, + 109, 116, 137, 200, 178, 112, 125, 164, + 70, 210, 208, 202, 184, 130, 179, 115, + 134, 191, 151, 31, 93, 68, 204, 190, + 148, 22, 66, 198, 172, 94, 71, 2, + 6, 18, 54, 162, 64, 192, 154, 40, + 120, 149, 25, 75, 14, 42, 126, 167, + 79, 26, 78, 23, 69, 207, 199, 175, + 103, 98, 83, 38, 114, 131, 182, 124, + 161, 61, 183, 127, 170, 88, 53, 159, + 55, 165, 73, 8, 24, 72, 5, 15, + 45, 135, 194, 160, 58, 174, 100, 89 +}; + +static int finder_pattern_exp[60] = { + /* Table 15 */ + 1, 8, 4, 1, 1, + 1, 1, 4, 8, 1, + 3, 6, 4, 1, 1, + 1, 1, 4, 6, 3, + 3, 4, 6, 1, 1, + 1, 1, 6, 4, 3, + 3, 2, 8, 1, 1, + 1, 1, 8, 2, 3, + 2, 6, 5, 1, 1, + 1, 1, 5, 6, 2, + 2, 2, 9, 1, 1, + 1, 1, 9, 2, 2 +}; + +static int finder_sequence[198] = { + /* Table 16 */ + 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 6, 3, 8, 0, 0, 0, 0, 0, 0, 0, + 1, 10, 3, 8, 5, 0, 0, 0, 0, 0, 0, + 1, 10, 3, 8, 7, 12, 0, 0, 0, 0, 0, + 1, 10, 3, 8, 9, 12, 11, 0, 0, 0, 0, + 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, + 1, 2, 3, 4, 5, 6, 7, 10, 9, 0, 0, + 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 0, + 1, 2, 3, 4, 5, 8, 7, 10, 9, 12, 11 +}; + static int weight_rows[210] = { - 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 6, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 9, 10, 3, 4, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 17, 18, 3, 4, 13, 14, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 17, 18, 3, 4, 13, 14, 11, 12, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 17, 18, 3, 4, 13, 14, 15, 16, 21, 22, 19, 20, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 17, 18, 15, 16, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 17, 18, 19, 20, 21, 22, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 13, 14, 11, 12, 17, 18, 15, 16, 21, 22, 19, 20 + 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 6, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 9, 10, 3, 4, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 18, 3, 4, 13, 14, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 18, 3, 4, 13, 14, 11, 12, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 18, 3, 4, 13, 14, 15, 16, 21, 22, 19, 20, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 17, 18, 15, 16, 0, 0, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 17, 18, 19, 20, 21, 22, 0, 0, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 13, 14, 11, 12, 17, 18, 15, 16, 21, 22, 19, 20 }; diff --git a/backend/sjis.h b/backend/sjis.h index 1aaf9b10..237f2476 100644 --- a/backend/sjis.h +++ b/backend/sjis.h @@ -1,7 +1,7 @@ /* sjis.h - Unicode to Shift JIS lookup table libzint - the open source barcode library - Copyright (C) 2009 Robin Stuart + Copyright (C) 2009-2016 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -27,7 +27,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ /* Derived from : ## Shift_JIS (JIS X 0208:1997 Appendix 1) vs Unicode mapping table @@ -37,6850 +37,6850 @@ ## Copyright (C) 2001 earthian@tama.or.jp, All Rights Reserved. ## Copyright (C) 2001 I'O, All Rights Reserved. ## You can use, modify, distribute this table freely. -*/ + */ unsigned long int sjis_lookup[] = { - 0x005C,0x815F, // REVERSE SOLIDUS - 0x00A2,0x8191, // CENT SIGN - 0x00A3,0x8192, // POUND SIGN - 0x00A7,0x8198, // SECTION SIGN - 0x00A8,0x814E, // DIAERESIS - 0x00AC,0x81CA, // NOT SIGN - 0x00B0,0x818B, // DEGREE SIGN - 0x00B1,0x817D, // PLUS-MINUS SIGN - 0x00B4,0x814C, // ACUTE ACCENT - 0x00B6,0x81F7, // PILCROW SIGN - 0x00D7,0x817E, // MULTIPLICATION SIGN - 0x00F7,0x8180, // DIVISION SIGN - 0x0391,0x839F, // GREEK CAPITAL LETTER ALPHA - 0x0392,0x83A0, // GREEK CAPITAL LETTER BETA - 0x0393,0x83A1, // GREEK CAPITAL LETTER GAMMA - 0x0394,0x83A2, // GREEK CAPITAL LETTER DELTA - 0x0395,0x83A3, // GREEK CAPITAL LETTER EPSILON - 0x0396,0x83A4, // GREEK CAPITAL LETTER ZETA - 0x0397,0x83A5, // GREEK CAPITAL LETTER ETA - 0x0398,0x83A6, // GREEK CAPITAL LETTER THETA - 0x0399,0x83A7, // GREEK CAPITAL LETTER IOTA - 0x039A,0x83A8, // GREEK CAPITAL LETTER KAPPA - 0x039B,0x83A9, // GREEK CAPITAL LETTER LAMDA - 0x039C,0x83AA, // GREEK CAPITAL LETTER MU - 0x039D,0x83AB, // GREEK CAPITAL LETTER NU - 0x039E,0x83AC, // GREEK CAPITAL LETTER XI - 0x039F,0x83AD, // GREEK CAPITAL LETTER OMICRON - 0x03A0,0x83AE, // GREEK CAPITAL LETTER PI - 0x03A1,0x83AF, // GREEK CAPITAL LETTER RHO - 0x03A3,0x83B0, // GREEK CAPITAL LETTER SIGMA - 0x03A4,0x83B1, // GREEK CAPITAL LETTER TAU - 0x03A5,0x83B2, // GREEK CAPITAL LETTER UPSILON - 0x03A6,0x83B3, // GREEK CAPITAL LETTER PHI - 0x03A7,0x83B4, // GREEK CAPITAL LETTER CHI - 0x03A8,0x83B5, // GREEK CAPITAL LETTER PSI - 0x03A9,0x83B6, // GREEK CAPITAL LETTER OMEGA - 0x03B1,0x83BF, // GREEK SMALL LETTER ALPHA - 0x03B2,0x83C0, // GREEK SMALL LETTER BETA - 0x03B3,0x83C1, // GREEK SMALL LETTER GAMMA - 0x03B4,0x83C2, // GREEK SMALL LETTER DELTA - 0x03B5,0x83C3, // GREEK SMALL LETTER EPSILON - 0x03B6,0x83C4, // GREEK SMALL LETTER ZETA - 0x03B7,0x83C5, // GREEK SMALL LETTER ETA - 0x03B8,0x83C6, // GREEK SMALL LETTER THETA - 0x03B9,0x83C7, // GREEK SMALL LETTER IOTA - 0x03BA,0x83C8, // GREEK SMALL LETTER KAPPA - 0x03BB,0x83C9, // GREEK SMALL LETTER LAMDA - 0x03BC,0x83CA, // GREEK SMALL LETTER MU - 0x03BD,0x83CB, // GREEK SMALL LETTER NU - 0x03BE,0x83CC, // GREEK SMALL LETTER XI - 0x03BF,0x83CD, // GREEK SMALL LETTER OMICRON - 0x03C0,0x83CE, // GREEK SMALL LETTER PI - 0x03C1,0x83CF, // GREEK SMALL LETTER RHO - 0x03C3,0x83D0, // GREEK SMALL LETTER SIGMA - 0x03C4,0x83D1, // GREEK SMALL LETTER TAU - 0x03C5,0x83D2, // GREEK SMALL LETTER UPSILON - 0x03C6,0x83D3, // GREEK SMALL LETTER PHI - 0x03C7,0x83D4, // GREEK SMALL LETTER CHI - 0x03C8,0x83D5, // GREEK SMALL LETTER PSI - 0x03C9,0x83D6, // GREEK SMALL LETTER OMEGA - 0x0401,0x8446, // CYRILLIC CAPITAL LETTER IO - 0x0410,0x8440, // CYRILLIC CAPITAL LETTER A - 0x0411,0x8441, // CYRILLIC CAPITAL LETTER BE - 0x0412,0x8442, // CYRILLIC CAPITAL LETTER VE - 0x0413,0x8443, // CYRILLIC CAPITAL LETTER GHE - 0x0414,0x8444, // CYRILLIC CAPITAL LETTER DE - 0x0415,0x8445, // CYRILLIC CAPITAL LETTER IE - 0x0416,0x8447, // CYRILLIC CAPITAL LETTER ZHE - 0x0417,0x8448, // CYRILLIC CAPITAL LETTER ZE - 0x0418,0x8449, // CYRILLIC CAPITAL LETTER I - 0x0419,0x844A, // CYRILLIC CAPITAL LETTER SHORT I - 0x041A,0x844B, // CYRILLIC CAPITAL LETTER KA - 0x041B,0x844C, // CYRILLIC CAPITAL LETTER EL - 0x041C,0x844D, // CYRILLIC CAPITAL LETTER EM - 0x041D,0x844E, // CYRILLIC CAPITAL LETTER EN - 0x041E,0x844F, // CYRILLIC CAPITAL LETTER O - 0x041F,0x8450, // CYRILLIC CAPITAL LETTER PE - 0x0420,0x8451, // CYRILLIC CAPITAL LETTER ER - 0x0421,0x8452, // CYRILLIC CAPITAL LETTER ES - 0x0422,0x8453, // CYRILLIC CAPITAL LETTER TE - 0x0423,0x8454, // CYRILLIC CAPITAL LETTER U - 0x0424,0x8455, // CYRILLIC CAPITAL LETTER EF - 0x0425,0x8456, // CYRILLIC CAPITAL LETTER HA - 0x0426,0x8457, // CYRILLIC CAPITAL LETTER TSE - 0x0427,0x8458, // CYRILLIC CAPITAL LETTER CHE - 0x0428,0x8459, // CYRILLIC CAPITAL LETTER SHA - 0x0429,0x845A, // CYRILLIC CAPITAL LETTER SHCHA - 0x042B,0x845C, // CYRILLIC CAPITAL LETTER YERU - 0x042C,0x845D, // CYRILLIC CAPITAL LETTER SOFT SIGN - 0x042D,0x845E, // CYRILLIC CAPITAL LETTER E - 0x042E,0x845F, // CYRILLIC CAPITAL LETTER YU - 0x042F,0x8460, // CYRILLIC CAPITAL LETTER YA - 0x0430,0x8470, // CYRILLIC SMALL LETTER A - 0x0431,0x8471, // CYRILLIC SMALL LETTER BE - 0x0432,0x8472, // CYRILLIC SMALL LETTER VE - 0x0433,0x8473, // CYRILLIC SMALL LETTER GHE - 0x0434,0x8474, // CYRILLIC SMALL LETTER DE - 0x0435,0x8475, // CYRILLIC SMALL LETTER IE - 0x0436,0x8477, // CYRILLIC SMALL LETTER ZHE - 0x0437,0x8478, // CYRILLIC SMALL LETTER ZE - 0x0438,0x8479, // CYRILLIC SMALL LETTER I - 0x0439,0x847A, // CYRILLIC SMALL LETTER SHORT I - 0x043A,0x847B, // CYRILLIC SMALL LETTER KA - 0x043B,0x847C, // CYRILLIC SMALL LETTER EL - 0x043C,0x847D, // CYRILLIC SMALL LETTER EM - 0x043D,0x847E, // CYRILLIC SMALL LETTER EN - 0x043E,0x8480, // CYRILLIC SMALL LETTER O - 0x043F,0x8481, // CYRILLIC SMALL LETTER PE - 0x0440,0x8482, // CYRILLIC SMALL LETTER ER - 0x0441,0x8483, // CYRILLIC SMALL LETTER ES - 0x0442,0x8484, // CYRILLIC SMALL LETTER TE - 0x0443,0x8485, // CYRILLIC SMALL LETTER U - 0x0444,0x8486, // CYRILLIC SMALL LETTER EF - 0x0445,0x8487, // CYRILLIC SMALL LETTER HA - 0x0446,0x8488, // CYRILLIC SMALL LETTER TSE - 0x0447,0x8489, // CYRILLIC SMALL LETTER CHE - 0x0448,0x848A, // CYRILLIC SMALL LETTER SHA - 0x0449,0x848B, // CYRILLIC SMALL LETTER SHCHA - 0x044A,0x848C, // CYRILLIC SMALL LETTER HARD SIGN - 0x044B,0x848D, // CYRILLIC SMALL LETTER YERU - 0x044C,0x848E, // CYRILLIC SMALL LETTER SOFT SIGN - 0x044D,0x848F, // CYRILLIC SMALL LETTER E - 0x044E,0x8490, // CYRILLIC SMALL LETTER YU - 0x044F,0x8491, // CYRILLIC SMALL LETTER YA - 0x0451,0x8476, // CYRILLIC SMALL LETTER IO - 0x2010,0x815D, // HYPHEN - 0x2014,0x815C, // EM DASH - 0x2016,0x8161, // DOUBLE VERTICAL LINE - 0x2018,0x8165, // LEFT SINGLE QUOTATION MARK - 0x2019,0x8166, // RIGHT SINGLE QUOTATION MARK - 0x201C,0x8167, // LEFT DOUBLE QUOTATION MARK - 0x201D,0x8168, // RIGHT DOUBLE QUOTATION MARK - 0x2020,0x81F5, // DAGGER - 0x2021,0x81F6, // DOUBLE DAGGER - 0x2025,0x8164, // TWO DOT LEADER - 0x2026,0x8163, // HORIZONTAL ELLIPSIS - 0x2030,0x81F1, // PER MILLE SIGN - 0x2032,0x818C, // PRIME - 0x2033,0x818D, // DOUBLE PRIME - 0x203B,0x81A6, // REFERENCE MARK - 0x2103,0x818E, // DEGREE CELSIUS - 0x212B,0x81F0, // ANGSTROM SIGN - 0x2190,0x81A9, // LEFTWARDS ARROW - 0x2191,0x81AA, // UPWARDS ARROW - 0x2192,0x81A8, // RIGHTWARDS ARROW - 0x2193,0x81AB, // DOWNWARDS ARROW - 0x21D2,0x81CB, // RIGHTWARDS DOUBLE ARROW - 0x21D4,0x81CC, // LEFT RIGHT DOUBLE ARROW - 0x2200,0x81CD, // FOR ALL - 0x2202,0x81DD, // PARTIAL DIFFERENTIAL - 0x2203,0x81CE, // THERE EXISTS - 0x2207,0x81DE, // NABLA - 0x2208,0x81B8, // ELEMENT OF - 0x220B,0x81B9, // CONTAINS AS MEMBER - 0x2212,0x817C, // MINUS SIGN - 0x221A,0x81E3, // SQUARE ROOT - 0x221D,0x81E5, // PROPORTIONAL TO - 0x221E,0x8187, // INFINITY - 0x2220,0x81DA, // ANGLE - 0x2227,0x81C8, // LOGICAL AND - 0x2228,0x81C9, // LOGICAL OR - 0x2229,0x81BF, // INTERSECTION - 0x222A,0x81BE, // UNION - 0x222B,0x81E7, // INTEGRAL - 0x222C,0x81E8, // DOUBLE INTEGRAL - 0x2234,0x8188, // THEREFORE - 0x2235,0x81E6, // BECAUSE - 0x223D,0x81E4, // REVERSED TILDE - 0x2252,0x81E0, // APPROXIMATELY EQUAL TO OR THE IMAGE OF - 0x2260,0x8182, // NOT EQUAL TO - 0x2261,0x81DF, // IDENTICAL TO - 0x2266,0x8185, // LESS-THAN OVER EQUAL TO - 0x2267,0x8186, // GREATER-THAN OVER EQUAL TO - 0x226A,0x81E1, // MUCH LESS-THAN - 0x226B,0x81E2, // MUCH GREATER-THAN - 0x2282,0x81BC, // SUBSET OF - 0x2283,0x81BD, // SUPERSET OF - 0x2286,0x81BA, // SUBSET OF OR EQUAL TO - 0x2287,0x81BB, // SUPERSET OF OR EQUAL TO - 0x22A5,0x81DB, // UP TACK - 0x2312,0x81DC, // ARC - 0x2500,0x849F, // BOX DRAWINGS LIGHT HORIZONTAL - 0x2501,0x84AA, // BOX DRAWINGS HEAVY HORIZONTAL - 0x2502,0x84A0, // BOX DRAWINGS LIGHT VERTICAL - 0x2503,0x84AB, // BOX DRAWINGS HEAVY VERTICAL - 0x250C,0x84A1, // BOX DRAWINGS LIGHT DOWN AND RIGHT - 0x250F,0x84AC, // BOX DRAWINGS HEAVY DOWN AND RIGHT - 0x2510,0x84A2, // BOX DRAWINGS LIGHT DOWN AND LEFT - 0x2513,0x84AD, // BOX DRAWINGS HEAVY DOWN AND LEFT - 0x2514,0x84A4, // BOX DRAWINGS LIGHT UP AND RIGHT - 0x2517,0x84AF, // BOX DRAWINGS HEAVY UP AND RIGHT - 0x2518,0x84A3, // BOX DRAWINGS LIGHT UP AND LEFT - 0x251B,0x84AE, // BOX DRAWINGS HEAVY UP AND LEFT - 0x251C,0x84A5, // BOX DRAWINGS LIGHT VERTICAL AND RIGHT - 0x251D,0x84BA, // BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY - 0x2520,0x84B5, // BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT - 0x2523,0x84B0, // BOX DRAWINGS HEAVY VERTICAL AND RIGHT - 0x2524,0x84A7, // BOX DRAWINGS LIGHT VERTICAL AND LEFT - 0x2525,0x84BC, // BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY - 0x2528,0x84B7, // BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT - 0x252B,0x84B2, // BOX DRAWINGS HEAVY VERTICAL AND LEFT - 0x252C,0x84A6, // BOX DRAWINGS LIGHT DOWN AND HORIZONTAL - 0x252F,0x84B6, // BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY - 0x2530,0x84BB, // BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT - 0x2533,0x84B1, // BOX DRAWINGS HEAVY DOWN AND HORIZONTAL - 0x2534,0x84A8, // BOX DRAWINGS LIGHT UP AND HORIZONTAL - 0x2537,0x84B8, // BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY - 0x2538,0x84BD, // BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT - 0x253B,0x84B3, // BOX DRAWINGS HEAVY UP AND HORIZONTAL - 0x253C,0x84A9, // BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL - 0x253F,0x84B9, // BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY - 0x2542,0x84BE, // BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT - 0x254B,0x84B4, // BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL - 0x25A0,0x81A1, // BLACK SQUARE - 0x25A1,0x81A0, // WHITE SQUARE - 0x25B2,0x81A3, // BLACK UP-POINTING TRIANGLE - 0x25B3,0x81A2, // WHITE UP-POINTING TRIANGLE - 0x25BC,0x81A5, // BLACK DOWN-POINTING TRIANGLE - 0x25BD,0x81A4, // WHITE DOWN-POINTING TRIANGLE - 0x25C6,0x819F, // BLACK DIAMOND - 0x25C7,0x819E, // WHITE DIAMOND - 0x25CB,0x819B, // WHITE CIRCLE - 0x25CE,0x819D, // BULLSEYE - 0x25CF,0x819C, // BLACK CIRCLE - 0x25EF,0x81FC, // LARGE CIRCLE - 0x2605,0x819A, // BLACK STAR - 0x2606,0x8199, // WHITE STAR - 0x2640,0x818A, // FEMALE SIGN - 0x2642,0x8189, // MALE SIGN - 0x266A,0x81F4, // EIGHTH NOTE - 0x266D,0x81F3, // MUSIC FLAT SIGN - 0x266F,0x81F2, // MUSIC SHARP SIGN - 0x3000,0x8140, // IDEOGRAPHIC SPACE - 0x3001,0x8141, // IDEOGRAPHIC COMMA - 0x3002,0x8142, // IDEOGRAPHIC FULL STOP - 0x3003,0x8156, // DITTO MARK - 0x3005,0x8158, // IDEOGRAPHIC ITERATION MARK - 0x3006,0x8159, // IDEOGRAPHIC CLOSING MARK - 0x3007,0x815A, // IDEOGRAPHIC NUMBER ZERO - 0x3008,0x8171, // LEFT ANGLE BRACKET - 0x3009,0x8172, // RIGHT ANGLE BRACKET - 0x300A,0x8173, // LEFT DOUBLE ANGLE BRACKET - 0x300B,0x8174, // RIGHT DOUBLE ANGLE BRACKET - 0x300C,0x8175, // LEFT CORNER BRACKET - 0x300D,0x8176, // RIGHT CORNER BRACKET - 0x300E,0x8177, // LEFT WHITE CORNER BRACKET - 0x300F,0x8178, // RIGHT WHITE CORNER BRACKET - 0x3010,0x8179, // LEFT BLACK LENTICULAR BRACKET - 0x3011,0x817A, // RIGHT BLACK LENTICULAR BRACKET - 0x3012,0x81A7, // POSTAL MARK - 0x3013,0x81AC, // GETA MARK - 0x3014,0x816B, // LEFT TORTOISE SHELL BRACKET - 0x3015,0x816C, // RIGHT TORTOISE SHELL BRACKET - 0x301C,0x8160, // WAVE DASH - 0x3041,0x829F, // HIRAGANA LETTER SMALL A - 0x3042,0x82A0, // HIRAGANA LETTER A - 0x3043,0x82A1, // HIRAGANA LETTER SMALL I - 0x3044,0x82A2, // HIRAGANA LETTER I - 0x3045,0x82A3, // HIRAGANA LETTER SMALL U - 0x3046,0x82A4, // HIRAGANA LETTER U - 0x3047,0x82A5, // HIRAGANA LETTER SMALL E - 0x3048,0x82A6, // HIRAGANA LETTER E - 0x3049,0x82A7, // HIRAGANA LETTER SMALL O - 0x304A,0x82A8, // HIRAGANA LETTER O - 0x304B,0x82A9, // HIRAGANA LETTER KA - 0x304C,0x82AA, // HIRAGANA LETTER GA - 0x304D,0x82AB, // HIRAGANA LETTER KI - 0x304E,0x82AC, // HIRAGANA LETTER GI - 0x304F,0x82AD, // HIRAGANA LETTER KU - 0x3050,0x82AE, // HIRAGANA LETTER GU - 0x3051,0x82AF, // HIRAGANA LETTER KE - 0x3052,0x82B0, // HIRAGANA LETTER GE - 0x3053,0x82B1, // HIRAGANA LETTER KO - 0x3054,0x82B2, // HIRAGANA LETTER GO - 0x3055,0x82B3, // HIRAGANA LETTER SA - 0x3056,0x82B4, // HIRAGANA LETTER ZA - 0x3057,0x82B5, // HIRAGANA LETTER SI - 0x3058,0x82B6, // HIRAGANA LETTER ZI - 0x3059,0x82B7, // HIRAGANA LETTER SU - 0x305A,0x82B8, // HIRAGANA LETTER ZU - 0x305B,0x82B9, // HIRAGANA LETTER SE - 0x305C,0x82BA, // HIRAGANA LETTER ZE - 0x305D,0x82BB, // HIRAGANA LETTER SO - 0x305E,0x82BC, // HIRAGANA LETTER ZO - 0x305F,0x82BD, // HIRAGANA LETTER TA - 0x3060,0x82BE, // HIRAGANA LETTER DA - 0x3061,0x82BF, // HIRAGANA LETTER TI - 0x3062,0x82C0, // HIRAGANA LETTER DI - 0x3063,0x82C1, // HIRAGANA LETTER SMALL TU - 0x3064,0x82C2, // HIRAGANA LETTER TU - 0x3065,0x82C3, // HIRAGANA LETTER DU - 0x3066,0x82C4, // HIRAGANA LETTER TE - 0x3067,0x82C5, // HIRAGANA LETTER DE - 0x3068,0x82C6, // HIRAGANA LETTER TO - 0x3069,0x82C7, // HIRAGANA LETTER DO - 0x306A,0x82C8, // HIRAGANA LETTER NA - 0x306B,0x82C9, // HIRAGANA LETTER NI - 0x306C,0x82CA, // HIRAGANA LETTER NU - 0x306D,0x82CB, // HIRAGANA LETTER NE - 0x306E,0x82CC, // HIRAGANA LETTER NO - 0x306F,0x82CD, // HIRAGANA LETTER HA - 0x3070,0x82CE, // HIRAGANA LETTER BA - 0x3071,0x82CF, // HIRAGANA LETTER PA - 0x3072,0x82D0, // HIRAGANA LETTER HI - 0x3073,0x82D1, // HIRAGANA LETTER BI - 0x3074,0x82D2, // HIRAGANA LETTER PI - 0x3075,0x82D3, // HIRAGANA LETTER HU - 0x3076,0x82D4, // HIRAGANA LETTER BU - 0x3077,0x82D5, // HIRAGANA LETTER PU - 0x3078,0x82D6, // HIRAGANA LETTER HE - 0x3079,0x82D7, // HIRAGANA LETTER BE - 0x307A,0x82D8, // HIRAGANA LETTER PE - 0x307B,0x82D9, // HIRAGANA LETTER HO - 0x307C,0x82DA, // HIRAGANA LETTER BO - 0x307D,0x82DB, // HIRAGANA LETTER PO - 0x307E,0x82DC, // HIRAGANA LETTER MA - 0x307F,0x82DD, // HIRAGANA LETTER MI - 0x3080,0x82DE, // HIRAGANA LETTER MU - 0x3081,0x82DF, // HIRAGANA LETTER ME - 0x3082,0x82E0, // HIRAGANA LETTER MO - 0x3083,0x82E1, // HIRAGANA LETTER SMALL YA - 0x3084,0x82E2, // HIRAGANA LETTER YA - 0x3085,0x82E3, // HIRAGANA LETTER SMALL YU - 0x3086,0x82E4, // HIRAGANA LETTER YU - 0x3087,0x82E5, // HIRAGANA LETTER SMALL YO - 0x3088,0x82E6, // HIRAGANA LETTER YO - 0x3089,0x82E7, // HIRAGANA LETTER RA - 0x308A,0x82E8, // HIRAGANA LETTER RI - 0x308B,0x82E9, // HIRAGANA LETTER RU - 0x308C,0x82EA, // HIRAGANA LETTER RE - 0x308D,0x82EB, // HIRAGANA LETTER RO - 0x308E,0x82EC, // HIRAGANA LETTER SMALL WA - 0x308F,0x82ED, // HIRAGANA LETTER WA - 0x3090,0x82EE, // HIRAGANA LETTER WI - 0x3091,0x82EF, // HIRAGANA LETTER WE - 0x3092,0x82F0, // HIRAGANA LETTER WO - 0x3093,0x82F1, // HIRAGANA LETTER N - 0x309B,0x814A, // KATAKANA-HIRAGANA VOICED SOUND MARK - 0x309C,0x814B, // KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK - 0x309D,0x8154, // HIRAGANA ITERATION MARK - 0x309E,0x8155, // HIRAGANA VOICED ITERATION MARK - 0x30A1,0x8340, // KATAKANA LETTER SMALL A - 0x30A2,0x8341, // KATAKANA LETTER A - 0x30A3,0x8342, // KATAKANA LETTER SMALL I - 0x30A4,0x8343, // KATAKANA LETTER I - 0x30A5,0x8344, // KATAKANA LETTER SMALL U - 0x30A6,0x8345, // KATAKANA LETTER U - 0x30A7,0x8346, // KATAKANA LETTER SMALL E - 0x30A8,0x8347, // KATAKANA LETTER E - 0x30A9,0x8348, // KATAKANA LETTER SMALL O - 0x30AA,0x8349, // KATAKANA LETTER O - 0x30AB,0x834A, // KATAKANA LETTER KA - 0x30AC,0x834B, // KATAKANA LETTER GA - 0x30AD,0x834C, // KATAKANA LETTER KI - 0x30AE,0x834D, // KATAKANA LETTER GI - 0x30AF,0x834E, // KATAKANA LETTER KU - 0x30B0,0x834F, // KATAKANA LETTER GU - 0x30B1,0x8350, // KATAKANA LETTER KE - 0x30B2,0x8351, // KATAKANA LETTER GE - 0x30B3,0x8352, // KATAKANA LETTER KO - 0x30B4,0x8353, // KATAKANA LETTER GO - 0x30B5,0x8354, // KATAKANA LETTER SA - 0x30B6,0x8355, // KATAKANA LETTER ZA - 0x30B7,0x8356, // KATAKANA LETTER SI - 0x30B8,0x8357, // KATAKANA LETTER ZI - 0x30B9,0x8358, // KATAKANA LETTER SU - 0x30BA,0x8359, // KATAKANA LETTER ZU - 0x30BB,0x835A, // KATAKANA LETTER SE - 0x30BD,0x835C, // KATAKANA LETTER SO - 0x30BE,0x835D, // KATAKANA LETTER ZO - 0x30BF,0x835E, // KATAKANA LETTER TA - 0x30C0,0x835F, // KATAKANA LETTER DA - 0x30C1,0x8360, // KATAKANA LETTER TI - 0x30C2,0x8361, // KATAKANA LETTER DI - 0x30C3,0x8362, // KATAKANA LETTER SMALL TU - 0x30C4,0x8363, // KATAKANA LETTER TU - 0x30C5,0x8364, // KATAKANA LETTER DU - 0x30C6,0x8365, // KATAKANA LETTER TE - 0x30C7,0x8366, // KATAKANA LETTER DE - 0x30C8,0x8367, // KATAKANA LETTER TO - 0x30C9,0x8368, // KATAKANA LETTER DO - 0x30CA,0x8369, // KATAKANA LETTER NA - 0x30CB,0x836A, // KATAKANA LETTER NI - 0x30CC,0x836B, // KATAKANA LETTER NU - 0x30CD,0x836C, // KATAKANA LETTER NE - 0x30CE,0x836D, // KATAKANA LETTER NO - 0x30CF,0x836E, // KATAKANA LETTER HA - 0x30D0,0x836F, // KATAKANA LETTER BA - 0x30D1,0x8370, // KATAKANA LETTER PA - 0x30D2,0x8371, // KATAKANA LETTER HI - 0x30D3,0x8372, // KATAKANA LETTER BI - 0x30D4,0x8373, // KATAKANA LETTER PI - 0x30D5,0x8374, // KATAKANA LETTER HU - 0x30D6,0x8375, // KATAKANA LETTER BU - 0x30D7,0x8376, // KATAKANA LETTER PU - 0x30D8,0x8377, // KATAKANA LETTER HE - 0x30D9,0x8378, // KATAKANA LETTER BE - 0x30DA,0x8379, // KATAKANA LETTER PE - 0x30DB,0x837A, // KATAKANA LETTER HO - 0x30DC,0x837B, // KATAKANA LETTER BO - 0x30DD,0x837C, // KATAKANA LETTER PO - 0x30DE,0x837D, // KATAKANA LETTER MA - 0x30DF,0x837E, // KATAKANA LETTER MI - 0x30E0,0x8380, // KATAKANA LETTER MU - 0x30E1,0x8381, // KATAKANA LETTER ME - 0x30E2,0x8382, // KATAKANA LETTER MO - 0x30E3,0x8383, // KATAKANA LETTER SMALL YA - 0x30E4,0x8384, // KATAKANA LETTER YA - 0x30E5,0x8385, // KATAKANA LETTER SMALL YU - 0x30E6,0x8386, // KATAKANA LETTER YU - 0x30E7,0x8387, // KATAKANA LETTER SMALL YO - 0x30E8,0x8388, // KATAKANA LETTER YO - 0x30E9,0x8389, // KATAKANA LETTER RA - 0x30EA,0x838A, // KATAKANA LETTER RI - 0x30EB,0x838B, // KATAKANA LETTER RU - 0x30EC,0x838C, // KATAKANA LETTER RE - 0x30ED,0x838D, // KATAKANA LETTER RO - 0x30EE,0x838E, // KATAKANA LETTER SMALL WA - 0x30EF,0x838F, // KATAKANA LETTER WA - 0x30F0,0x8390, // KATAKANA LETTER WI - 0x30F1,0x8391, // KATAKANA LETTER WE - 0x30F2,0x8392, // KATAKANA LETTER WO - 0x30F3,0x8393, // KATAKANA LETTER N - 0x30F4,0x8394, // KATAKANA LETTER VU - 0x30F5,0x8395, // KATAKANA LETTER SMALL KA - 0x30F6,0x8396, // KATAKANA LETTER SMALL KE - 0x30FB,0x8145, // KATAKANA MIDDLE DOT - 0x30FD,0x8152, // KATAKANA ITERATION MARK - 0x30FE,0x8153, // KATAKANA VOICED ITERATION MARK - 0x4E00,0x88EA, // - 0x4E01,0x929A, // - 0x4E03,0x8EB5, // - 0x4E07,0x969C, // - 0x4E08,0x8FE4, // - 0x4E09,0x8E4F, // - 0x4E0A,0x8FE3, // - 0x4E0B,0x89BA, // - 0x4E0D,0x9573, // - 0x4E0E,0x975E, // - 0x4E10,0x98A0, // - 0x4E11,0x894E, // - 0x4E14,0x8A8E, // - 0x4E15,0x98A1, // - 0x4E16,0x90A2, // - 0x4E17,0x99C0, // - 0x4E18,0x8B75, // - 0x4E19,0x95B8, // - 0x4E1E,0x8FE5, // - 0x4E21,0x97BC, // - 0x4E26,0x95C0, // - 0x4E2A,0x98A2, // - 0x4E2D,0x9286, // - 0x4E31,0x98A3, // - 0x4E32,0x8BF8, // - 0x4E36,0x98A4, // - 0x4E38,0x8ADB, // - 0x4E39,0x924F, // - 0x4E3B,0x8EE5, // - 0x4E3C,0x98A5, // - 0x4E3F,0x98A6, // - 0x4E42,0x98A7, // - 0x4E43,0x9454, // - 0x4E45,0x8B76, // - 0x4E4B,0x9456, // - 0x4E4D,0x93E1, // - 0x4E4E,0x8CC1, // - 0x4E4F,0x9652, // - 0x4E55,0xE568, // - 0x4E56,0x98A8, // - 0x4E57,0x8FE6, // - 0x4E58,0x98A9, // - 0x4E59,0x89B3, // - 0x4E5D,0x8BE3, // - 0x4E5E,0x8CEE, // - 0x4E5F,0x96E7, // - 0x4E62,0x9BA4, // - 0x4E71,0x9790, // - 0x4E73,0x93FB, // - 0x4E7E,0x8AA3, // - 0x4E80,0x8B54, // - 0x4E82,0x98AA, // - 0x4E85,0x98AB, // - 0x4E86,0x97B9, // - 0x4E88,0x975C, // - 0x4E89,0x9188, // - 0x4E8A,0x98AD, // - 0x4E8B,0x8E96, // - 0x4E8C,0x93F1, // - 0x4E8E,0x98B0, // - 0x4E91,0x895D, // - 0x4E92,0x8CDD, // - 0x4E94,0x8CDC, // - 0x4E95,0x88E4, // - 0x4E98,0x986A, // - 0x4E99,0x9869, // - 0x4E9B,0x8DB1, // - 0x4E9C,0x889F, // - 0x4E9E,0x98B1, // - 0x4E9F,0x98B2, // - 0x4EA0,0x98B3, // - 0x4EA1,0x9653, // - 0x4EA2,0x98B4, // - 0x4EA4,0x8CF0, // - 0x4EA5,0x88E5, // - 0x4EA6,0x9692, // - 0x4EA8,0x8B9C, // - 0x4EAB,0x8B9D, // - 0x4EAC,0x8B9E, // - 0x4EAD,0x92E0, // - 0x4EAE,0x97BA, // - 0x4EB0,0x98B5, // - 0x4EB3,0x98B6, // - 0x4EB6,0x98B7, // - 0x4EBA,0x906C, // - 0x4EC0,0x8F59, // - 0x4EC1,0x906D, // - 0x4EC2,0x98BC, // - 0x4EC4,0x98BA, // - 0x4EC6,0x98BB, // - 0x4EC7,0x8B77, // - 0x4ECA,0x8DA1, // - 0x4ECB,0x89EE, // - 0x4ECD,0x98B9, // - 0x4ECE,0x98B8, // - 0x4ECF,0x95A7, // - 0x4ED4,0x8E65, // - 0x4ED5,0x8E64, // - 0x4ED6,0x91BC, // - 0x4ED7,0x98BD, // - 0x4ED8,0x9574, // - 0x4ED9,0x90E5, // - 0x4EDD,0x8157, // - 0x4EDE,0x98BE, // - 0x4EDF,0x98C0, // - 0x4EE3,0x91E3, // - 0x4EE4,0x97DF, // - 0x4EE5,0x88C8, // - 0x4EED,0x98BF, // - 0x4EEE,0x89BC, // - 0x4EF0,0x8BC2, // - 0x4EF2,0x9287, // - 0x4EF6,0x8C8F, // - 0x4EF7,0x98C1, // - 0x4EFB,0x9443, // - 0x4F01,0x8AE9, // - 0x4F09,0x98C2, // - 0x4F0A,0x88C9, // - 0x4F0D,0x8CDE, // - 0x4F0E,0x8AEA, // - 0x4F0F,0x959A, // - 0x4F10,0x94B0, // - 0x4F11,0x8B78, // - 0x4F1A,0x89EF, // - 0x4F1C,0x98E5, // - 0x4F1D,0x9360, // - 0x4F2F,0x948C, // - 0x4F30,0x98C4, // - 0x4F34,0x94BA, // - 0x4F36,0x97E0, // - 0x4F38,0x904C, // - 0x4F3A,0x8E66, // - 0x4F3C,0x8E97, // - 0x4F3D,0x89BE, // - 0x4F43,0x92CF, // - 0x4F46,0x9241, // - 0x4F47,0x98C8, // - 0x4F4D,0x88CA, // - 0x4F4E,0x92E1, // - 0x4F4F,0x8F5A, // - 0x4F50,0x8DB2, // - 0x4F51,0x9743, // - 0x4F53,0x91CC, // - 0x4F55,0x89BD, // - 0x4F57,0x98C7, // - 0x4F59,0x975D, // - 0x4F5A,0x98C3, // - 0x4F5B,0x98C5, // - 0x4F5C,0x8DEC, // - 0x4F5D,0x98C6, // - 0x4F5E,0x9B43, // - 0x4F69,0x98CE, // - 0x4F6F,0x98D1, // - 0x4F70,0x98CF, // - 0x4F73,0x89C0, // - 0x4F75,0x95B9, // - 0x4F76,0x98C9, // - 0x4F7B,0x98CD, // - 0x4F7C,0x8CF1, // - 0x4F7F,0x8E67, // - 0x4F83,0x8AA4, // - 0x4F86,0x98D2, // - 0x4F88,0x98CA, // - 0x4F8B,0x97E1, // - 0x4F8D,0x8E98, // - 0x4F8F,0x98CB, // - 0x4F91,0x98D0, // - 0x4F96,0x98D3, // - 0x4F98,0x98CC, // - 0x4F9B,0x8B9F, // - 0x4F9D,0x88CB, // - 0x4FA0,0x8BA0, // - 0x4FA1,0x89BF, // - 0x4FAB,0x9B44, // - 0x4FAD,0x9699, // - 0x4FAE,0x958E, // - 0x4FAF,0x8CF2, // - 0x4FB5,0x904E, // - 0x4FB6,0x97B5, // - 0x4FBF,0x95D6, // - 0x4FC2,0x8C57, // - 0x4FC3,0x91A3, // - 0x4FC4,0x89E2, // - 0x4FCA,0x8F72, // - 0x4FCE,0x98D7, // - 0x4FD0,0x98DC, // - 0x4FD1,0x98DA, // - 0x4FD4,0x98D5, // - 0x4FD7,0x91AD, // - 0x4FD8,0x98D8, // - 0x4FDA,0x98DB, // - 0x4FDB,0x98D9, // - 0x4FDD,0x95DB, // - 0x4FDF,0x98D6, // - 0x4FE1,0x904D, // - 0x4FE3,0x9693, // - 0x4FE4,0x98DD, // - 0x4FE5,0x98DE, // - 0x4FEE,0x8F43, // - 0x4FEF,0x98EB, // - 0x4FF3,0x946F, // - 0x4FF5,0x9555, // - 0x4FF6,0x98E6, // - 0x4FF8,0x95EE, // - 0x4FFA,0x89B4, // - 0x4FFE,0x98EA, // - 0x5005,0x98E4, // - 0x5006,0x98ED, // - 0x5009,0x9171, // - 0x500B,0x8CC2, // - 0x500D,0x947B, // - 0x500F,0xE0C5, // - 0x5011,0x98EC, // - 0x5012,0x937C, // - 0x5014,0x98E1, // - 0x5016,0x8CF4, // - 0x5019,0x8CF3, // - 0x501A,0x98DF, // - 0x501F,0x8ED8, // - 0x5021,0x98E7, // - 0x5023,0x95ED, // - 0x5024,0x926C, // - 0x5025,0x98E3, // - 0x5026,0x8C91, // - 0x5028,0x98E0, // - 0x5029,0x98E8, // - 0x502A,0x98E2, // - 0x502B,0x97CF, // - 0x502C,0x98E9, // - 0x502D,0x9860, // - 0x5036,0x8BE4, // - 0x5039,0x8C90, // - 0x5043,0x98EE, // - 0x5047,0x98EF, // - 0x5048,0x98F3, // - 0x5049,0x88CC, // - 0x504F,0x95CE, // - 0x5050,0x98F2, // - 0x5055,0x98F1, // - 0x5056,0x98F5, // - 0x505A,0x98F4, // - 0x505C,0x92E2, // - 0x5065,0x8C92, // - 0x506C,0x98F6, // - 0x5072,0x8EC3, // - 0x5074,0x91A4, // - 0x5075,0x92E3, // - 0x5076,0x8BF4, // - 0x5078,0x98F7, // - 0x507D,0x8B55, // - 0x5080,0x98F8, // - 0x5085,0x98FA, // - 0x508D,0x9654, // - 0x5091,0x8C86, // - 0x5098,0x8E50, // - 0x5099,0x94F5, // - 0x509A,0x98F9, // - 0x50AC,0x8DC3, // - 0x50AD,0x9762, // - 0x50B2,0x98FC, // - 0x50B3,0x9942, // - 0x50B4,0x98FB, // - 0x50B5,0x8DC2, // - 0x50B7,0x8F9D, // - 0x50BE,0x8C58, // - 0x50C2,0x9943, // - 0x50C5,0x8BCD, // - 0x50C9,0x9940, // - 0x50CA,0x9941, // - 0x50CD,0x93AD, // - 0x50CF,0x919C, // - 0x50D1,0x8BA1, // - 0x50D5,0x966C, // - 0x50D6,0x9944, // - 0x50DA,0x97BB, // - 0x50DE,0x9945, // - 0x50E3,0x9948, // - 0x50E5,0x9946, // - 0x50E7,0x916D, // - 0x50ED,0x9947, // - 0x50EE,0x9949, // - 0x50F5,0x994B, // - 0x50F9,0x994A, // - 0x50FB,0x95C6, // - 0x5100,0x8B56, // - 0x5101,0x994D, // - 0x5102,0x994E, // - 0x5104,0x89AD, // - 0x5109,0x994C, // - 0x5112,0x8EF2, // - 0x5114,0x9951, // - 0x5115,0x9950, // - 0x5116,0x994F, // - 0x5118,0x98D4, // - 0x511A,0x9952, // - 0x511F,0x8F9E, // - 0x5121,0x9953, // - 0x512A,0x9744, // - 0x5132,0x96D7, // - 0x5137,0x9955, // - 0x513A,0x9954, // - 0x513B,0x9957, // - 0x513C,0x9956, // - 0x513F,0x9958, // - 0x5140,0x9959, // - 0x5141,0x88F2, // - 0x5143,0x8CB3, // - 0x5144,0x8C5A, // - 0x5146,0x929B, // - 0x5147,0x8BA2, // - 0x5148,0x90E6, // - 0x5149,0x8CF5, // - 0x514B,0x8D8E, // - 0x514D,0x96C6, // - 0x514E,0x9365, // - 0x5150,0x8E99, // - 0x5152,0x995A, // - 0x5154,0x995C, // - 0x515A,0x937D, // - 0x515C,0x8A95, // - 0x5162,0x995D, // - 0x5165,0x93FC, // - 0x5168,0x9153, // - 0x5169,0x995F, // - 0x516A,0x9960, // - 0x516B,0x94AA, // - 0x516C,0x8CF6, // - 0x516D,0x985A, // - 0x516E,0x9961, // - 0x5171,0x8BA4, // - 0x5175,0x95BA, // - 0x5176,0x91B4, // - 0x5177,0x8BEF, // - 0x5178,0x9354, // - 0x517C,0x8C93, // - 0x5180,0x9962, // - 0x5182,0x9963, // - 0x5185,0x93E0, // - 0x5186,0x897E, // - 0x5189,0x9966, // - 0x518A,0x8DFB, // - 0x518C,0x9965, // - 0x518D,0x8DC4, // - 0x518F,0x9967, // - 0x5190,0xE3EC, // - 0x5191,0x9968, // - 0x5192,0x9660, // - 0x5193,0x9969, // - 0x5195,0x996A, // - 0x5196,0x996B, // - 0x5197,0x8FE7, // - 0x5199,0x8ECA, // - 0x51A0,0x8AA5, // - 0x51A2,0x996E, // - 0x51A4,0x996C, // - 0x51A5,0x96BB, // - 0x51A6,0x996D, // - 0x51A8,0x9579, // - 0x51A9,0x996F, // - 0x51AA,0x9970, // - 0x51AB,0x9971, // - 0x51AC,0x937E, // - 0x51B0,0x9975, // - 0x51B1,0x9973, // - 0x51B2,0x9974, // - 0x51B3,0x9972, // - 0x51B4,0x8DE1, // - 0x51B5,0x9976, // - 0x51B6,0x96E8, // - 0x51B7,0x97E2, // - 0x51BD,0x9977, // - 0x51C4,0x90A6, // - 0x51C5,0x9978, // - 0x51C6,0x8F79, // - 0x51C9,0x9979, // - 0x51CB,0x929C, // - 0x51CC,0x97BD, // - 0x51CD,0x9380, // - 0x51D6,0x99C3, // - 0x51DB,0x997A, // - 0x51DC,0xEAA3, // - 0x51DD,0x8BC3, // - 0x51E0,0x997B, // - 0x51E1,0x967D, // - 0x51E6,0x8F88, // - 0x51E7,0x91FA, // - 0x51E9,0x997D, // - 0x51EA,0x93E2, // - 0x51ED,0x997E, // - 0x51F0,0x9980, // - 0x51F1,0x8A4D, // - 0x51F5,0x9981, // - 0x51F6,0x8BA5, // - 0x51F8,0x93CA, // - 0x51F9,0x899A, // - 0x51FA,0x8F6F, // - 0x51FD,0x949F, // - 0x51FE,0x9982, // - 0x5200,0x9381, // - 0x5203,0x906E, // - 0x5204,0x9983, // - 0x5206,0x95AA, // - 0x5207,0x90D8, // - 0x5208,0x8AA0, // - 0x520A,0x8AA7, // - 0x520B,0x9984, // - 0x520E,0x9986, // - 0x5211,0x8C59, // - 0x5214,0x9985, // - 0x5217,0x97F1, // - 0x521D,0x8F89, // - 0x5224,0x94BB, // - 0x5225,0x95CA, // - 0x5227,0x9987, // - 0x5229,0x9798, // - 0x522A,0x9988, // - 0x522E,0x9989, // - 0x5230,0x939E, // - 0x5233,0x998A, // - 0x5236,0x90A7, // - 0x5237,0x8DFC, // - 0x5238,0x8C94, // - 0x5239,0x998B, // - 0x523A,0x8E68, // - 0x523B,0x8D8F, // - 0x5243,0x92E4, // - 0x5244,0x998D, // - 0x5247,0x91A5, // - 0x524A,0x8DED, // - 0x524B,0x998E, // - 0x524C,0x998F, // - 0x524D,0x914F, // - 0x524F,0x998C, // - 0x5254,0x9991, // - 0x5256,0x9655, // - 0x525B,0x8D84, // - 0x525E,0x9990, // - 0x5263,0x8C95, // - 0x5264,0x8DDC, // - 0x5265,0x948D, // - 0x5269,0x9994, // - 0x526A,0x9992, // - 0x526F,0x959B, // - 0x5270,0x8FE8, // - 0x5271,0x999B, // - 0x5272,0x8A84, // - 0x5273,0x9995, // - 0x5274,0x9993, // - 0x5275,0x916E, // - 0x527D,0x9997, // - 0x527F,0x9996, // - 0x5283,0x8A63, // - 0x5287,0x8C80, // - 0x5288,0x999C, // - 0x5289,0x97AB, // - 0x528D,0x9998, // - 0x5291,0x999D, // - 0x5292,0x999A, // - 0x5294,0x9999, // - 0x529B,0x97CD, // - 0x529F,0x8CF7, // - 0x52A0,0x89C1, // - 0x52A3,0x97F2, // - 0x52A9,0x8F95, // - 0x52AA,0x9377, // - 0x52AB,0x8D85, // - 0x52AC,0x99A0, // - 0x52AD,0x99A1, // - 0x52B1,0x97E3, // - 0x52B4,0x984A, // - 0x52B5,0x99A3, // - 0x52B9,0x8CF8, // - 0x52BC,0x99A2, // - 0x52BE,0x8A4E, // - 0x52C1,0x99A4, // - 0x52C3,0x9675, // - 0x52C5,0x92BA, // - 0x52C7,0x9745, // - 0x52C9,0x95D7, // - 0x52CD,0x99A5, // - 0x52D2,0xE8D3, // - 0x52D5,0x93AE, // - 0x52D7,0x99A6, // - 0x52D8,0x8AA8, // - 0x52D9,0x96B1, // - 0x52DD,0x8F9F, // - 0x52DE,0x99A7, // - 0x52DF,0x95E5, // - 0x52E0,0x99AB, // - 0x52E2,0x90A8, // - 0x52E3,0x99A8, // - 0x52E4,0x8BCE, // - 0x52E6,0x99A9, // - 0x52E7,0x8AA9, // - 0x52F2,0x8C4D, // - 0x52F3,0x99AC, // - 0x52F5,0x99AD, // - 0x52F8,0x99AE, // - 0x52F9,0x99AF, // - 0x52FA,0x8ED9, // - 0x52FE,0x8CF9, // - 0x52FF,0x96DC, // - 0x5301,0x96E6, // - 0x5302,0x93F5, // - 0x5305,0x95EF, // - 0x5306,0x99B0, // - 0x5308,0x99B1, // - 0x530D,0x99B3, // - 0x530F,0x99B5, // - 0x5310,0x99B4, // - 0x5315,0x99B6, // - 0x5316,0x89BB, // - 0x5317,0x966B, // - 0x5319,0x8DFA, // - 0x531A,0x99B7, // - 0x531D,0x9178, // - 0x5320,0x8FA0, // - 0x5321,0x8BA7, // - 0x5323,0x99B8, // - 0x532A,0x94D9, // - 0x532F,0x99B9, // - 0x5331,0x99BA, // - 0x5333,0x99BB, // - 0x5338,0x99BC, // - 0x5339,0x9543, // - 0x533A,0x8BE6, // - 0x533B,0x88E3, // - 0x533F,0x93BD, // - 0x5340,0x99BD, // - 0x5341,0x8F5C, // - 0x5343,0x90E7, // - 0x5345,0x99BF, // - 0x5346,0x99BE, // - 0x5347,0x8FA1, // - 0x5348,0x8CDF, // - 0x5349,0x99C1, // - 0x534A,0x94BC, // - 0x534D,0x99C2, // - 0x5351,0x94DA, // - 0x5352,0x91B2, // - 0x5353,0x91EC, // - 0x5354,0x8BA6, // - 0x5357,0x93EC, // - 0x5358,0x9250, // - 0x535A,0x948E, // - 0x535C,0x966D, // - 0x535E,0x99C4, // - 0x5360,0x90E8, // - 0x5366,0x8C54, // - 0x5369,0x99C5, // - 0x536E,0x99C6, // - 0x536F,0x894B, // - 0x5370,0x88F3, // - 0x5371,0x8AEB, // - 0x5373,0x91A6, // - 0x5374,0x8B70, // - 0x5375,0x9791, // - 0x5377,0x99C9, // - 0x5378,0x89B5, // - 0x537B,0x99C8, // - 0x537F,0x8BA8, // - 0x5382,0x99CA, // - 0x5384,0x96EF, // - 0x5396,0x99CB, // - 0x5398,0x97D0, // - 0x539A,0x8CFA, // - 0x539F,0x8CB4, // - 0x53A0,0x99CC, // - 0x53A5,0x99CE, // - 0x53A6,0x99CD, // - 0x53A8,0x907E, // - 0x53A9,0x8958, // - 0x53AD,0x897D, // - 0x53AE,0x99CF, // - 0x53B0,0x99D0, // - 0x53B3,0x8CB5, // - 0x53B6,0x99D1, // - 0x53BB,0x8B8E, // - 0x53C2,0x8E51, // - 0x53C3,0x99D2, // - 0x53C8,0x9694, // - 0x53C9,0x8DB3, // - 0x53CA,0x8B79, // - 0x53CB,0x9746, // - 0x53CC,0x916F, // - 0x53CD,0x94BD, // - 0x53CE,0x8EFB, // - 0x53D4,0x8F66, // - 0x53D6,0x8EE6, // - 0x53D7,0x8EF3, // - 0x53D9,0x8F96, // - 0x53DB,0x94BE, // - 0x53DF,0x99D5, // - 0x53E1,0x8962, // - 0x53E2,0x9170, // - 0x53E3,0x8CFB, // - 0x53E4,0x8CC3, // - 0x53E5,0x8BE5, // - 0x53E8,0x99D9, // - 0x53E9,0x9240, // - 0x53EA,0x91FC, // - 0x53EB,0x8BA9, // - 0x53EC,0x8FA2, // - 0x53ED,0x99DA, // - 0x53EE,0x99D8, // - 0x53EF,0x89C2, // - 0x53F0,0x91E4, // - 0x53F1,0x8EB6, // - 0x53F2,0x8E6A, // - 0x53F3,0x8945, // - 0x53F6,0x8A90, // - 0x53F7,0x8D86, // - 0x53F8,0x8E69, // - 0x53FA,0x99DB, // - 0x5401,0x99DC, // - 0x5403,0x8B68, // - 0x5404,0x8A65, // - 0x5408,0x8D87, // - 0x5409,0x8B67, // - 0x540A,0x92DD, // - 0x540B,0x8944, // - 0x540C,0x93AF, // - 0x540D,0x96BC, // - 0x540E,0x8D40, // - 0x540F,0x9799, // - 0x5410,0x9366, // - 0x5411,0x8CFC, // - 0x541B,0x8C4E, // - 0x541D,0x99E5, // - 0x541F,0x8BE1, // - 0x5420,0x9669, // - 0x5426,0x94DB, // - 0x5429,0x99E4, // - 0x542B,0x8ADC, // - 0x542C,0x99DF, // - 0x542D,0x99E0, // - 0x542E,0x99E2, // - 0x5436,0x99E3, // - 0x5438,0x8B7A, // - 0x5439,0x9081, // - 0x543B,0x95AB, // - 0x543C,0x99E1, // - 0x543D,0x99DD, // - 0x543E,0x8CE1, // - 0x5440,0x99DE, // - 0x5442,0x9843, // - 0x5446,0x95F0, // - 0x5448,0x92E6, // - 0x5449,0x8CE0, // - 0x544A,0x8D90, // - 0x544E,0x99E6, // - 0x5451,0x93DB, // - 0x545F,0x99EA, // - 0x5468,0x8EFC, // - 0x546A,0x8EF4, // - 0x5470,0x99ED, // - 0x5471,0x99EB, // - 0x5473,0x96A1, // - 0x5475,0x99E8, // - 0x5476,0x99F1, // - 0x5477,0x99EC, // - 0x547B,0x99EF, // - 0x547C,0x8CC4, // - 0x547D,0x96BD, // - 0x5480,0x99F0, // - 0x5484,0x99F2, // - 0x5486,0x99F4, // - 0x548B,0x8DEE, // - 0x548C,0x9861, // - 0x548E,0x99E9, // - 0x548F,0x99E7, // - 0x5490,0x99F3, // - 0x5492,0x99EE, // - 0x54A2,0x99F6, // - 0x54A4,0x9A42, // - 0x54A5,0x99F8, // - 0x54A8,0x99FC, // - 0x54AB,0x9A40, // - 0x54AC,0x99F9, // - 0x54AF,0x9A5D, // - 0x54B2,0x8DE7, // - 0x54B3,0x8A50, // - 0x54B8,0x99F7, // - 0x54BC,0x9A44, // - 0x54BD,0x88F4, // - 0x54BE,0x9A43, // - 0x54C0,0x88A3, // - 0x54C1,0x9569, // - 0x54C2,0x9A41, // - 0x54C4,0x99FA, // - 0x54C7,0x99F5, // - 0x54C8,0x99FB, // - 0x54C9,0x8DC6, // - 0x54D8,0x9A45, // - 0x54E1,0x88F5, // - 0x54E2,0x9A4E, // - 0x54E5,0x9A46, // - 0x54E6,0x9A47, // - 0x54E8,0x8FA3, // - 0x54E9,0x9689, // - 0x54ED,0x9A4C, // - 0x54EE,0x9A4B, // - 0x54F2,0x934E, // - 0x54FA,0x9A4D, // - 0x54FD,0x9A4A, // - 0x5504,0x8953, // - 0x5506,0x8DB4, // - 0x5507,0x904F, // - 0x550F,0x9A48, // - 0x5510,0x9382, // - 0x5514,0x9A49, // - 0x5516,0x88A0, // - 0x552E,0x9A53, // - 0x552F,0x9742, // - 0x5531,0x8FA5, // - 0x5533,0x9A59, // - 0x5538,0x9A58, // - 0x5539,0x9A4F, // - 0x553E,0x91C1, // - 0x5540,0x9A50, // - 0x5544,0x91ED, // - 0x5545,0x9A55, // - 0x5546,0x8FA4, // - 0x554C,0x9A52, // - 0x554F,0x96E2, // - 0x5556,0x9A56, // - 0x5557,0x9A57, // - 0x555C,0x9A54, // - 0x555D,0x9A5A, // - 0x5563,0x9A51, // - 0x557B,0x9A60, // - 0x557C,0x9A65, // - 0x557E,0x9A61, // - 0x5580,0x9A5C, // - 0x5583,0x9A66, // - 0x5584,0x9150, // - 0x5587,0x9A68, // - 0x5589,0x8D41, // - 0x558A,0x9A5E, // - 0x558B,0x929D, // - 0x5598,0x9A62, // - 0x559A,0x8AAB, // - 0x559C,0x8AEC, // - 0x559D,0x8A85, // - 0x559E,0x9A63, // - 0x559F,0x9A5F, // - 0x55A7,0x8C96, // - 0x55A8,0x9A69, // - 0x55A9,0x9A67, // - 0x55AA,0x9172, // - 0x55AB,0x8B69, // - 0x55AC,0x8BAA, // - 0x55AE,0x9A64, // - 0x55B0,0x8BF2, // - 0x55B6,0x8963, // - 0x55C4,0x9A6D, // - 0x55C5,0x9A6B, // - 0x55C7,0x9AA5, // - 0x55D4,0x9A70, // - 0x55DA,0x9A6A, // - 0x55DC,0x9A6E, // - 0x55DF,0x9A6C, // - 0x55E3,0x8E6B, // - 0x55E4,0x9A6F, // - 0x55F7,0x9A72, // - 0x55F9,0x9A77, // - 0x55FD,0x9A75, // - 0x55FE,0x9A74, // - 0x5606,0x9251, // - 0x5609,0x89C3, // - 0x5614,0x9A71, // - 0x5616,0x9A73, // - 0x5617,0x8FA6, // - 0x5618,0x8952, // - 0x561B,0x9A76, // - 0x5629,0x89DC, // - 0x562F,0x9A82, // - 0x5631,0x8FFA, // - 0x5632,0x9A7D, // - 0x5634,0x9A7B, // - 0x5636,0x9A7C, // - 0x5638,0x9A7E, // - 0x5642,0x895C, // - 0x564C,0x9158, // - 0x564E,0x9A78, // - 0x5650,0x9A79, // - 0x565B,0x8A9A, // - 0x5664,0x9A81, // - 0x5668,0x8AED, // - 0x566A,0x9A84, // - 0x566B,0x9A80, // - 0x566C,0x9A83, // - 0x5674,0x95AC, // - 0x5678,0x93D3, // - 0x567A,0x94B6, // - 0x5680,0x9A86, // - 0x5686,0x9A85, // - 0x5687,0x8A64, // - 0x568A,0x9A87, // - 0x568F,0x9A8A, // - 0x5694,0x9A89, // - 0x56A0,0x9A88, // - 0x56A2,0x9458, // - 0x56A5,0x9A8B, // - 0x56AE,0x9A8C, // - 0x56B4,0x9A8E, // - 0x56B6,0x9A8D, // - 0x56BC,0x9A90, // - 0x56C0,0x9A93, // - 0x56C1,0x9A91, // - 0x56C2,0x9A8F, // - 0x56C3,0x9A92, // - 0x56C8,0x9A94, // - 0x56CE,0x9A95, // - 0x56D1,0x9A96, // - 0x56D3,0x9A97, // - 0x56D7,0x9A98, // - 0x56D8,0x9964, // - 0x56DA,0x8EFA, // - 0x56DB,0x8E6C, // - 0x56DE,0x89F1, // - 0x56E0,0x88F6, // - 0x56E3,0x9263, // - 0x56EE,0x9A99, // - 0x56F0,0x8DA2, // - 0x56F2,0x88CD, // - 0x56F3,0x907D, // - 0x56F9,0x9A9A, // - 0x56FA,0x8CC5, // - 0x56FD,0x8D91, // - 0x56FF,0x9A9C, // - 0x5700,0x9A9B, // - 0x5703,0x95DE, // - 0x5704,0x9A9D, // - 0x5708,0x9A9F, // - 0x5709,0x9A9E, // - 0x570B,0x9AA0, // - 0x570D,0x9AA1, // - 0x570F,0x8C97, // - 0x5712,0x8980, // - 0x5713,0x9AA2, // - 0x5716,0x9AA4, // - 0x5718,0x9AA3, // - 0x571C,0x9AA6, // - 0x571F,0x9379, // - 0x5726,0x9AA7, // - 0x5727,0x88B3, // - 0x5728,0x8DDD, // - 0x572D,0x8C5C, // - 0x5730,0x926E, // - 0x5737,0x9AA8, // - 0x5738,0x9AA9, // - 0x573B,0x9AAB, // - 0x5740,0x9AAC, // - 0x5742,0x8DE2, // - 0x5747,0x8BCF, // - 0x574A,0x9656, // - 0x574E,0x9AAA, // - 0x574F,0x9AAD, // - 0x5750,0x8DBF, // - 0x5751,0x8D42, // - 0x5761,0x9AB1, // - 0x5764,0x8DA3, // - 0x5766,0x9252, // - 0x5769,0x9AAE, // - 0x576A,0x92D8, // - 0x577F,0x9AB2, // - 0x5782,0x9082, // - 0x5788,0x9AB0, // - 0x5789,0x9AB3, // - 0x578B,0x8C5E, // - 0x5793,0x9AB4, // - 0x57A0,0x9AB5, // - 0x57A2,0x8D43, // - 0x57A3,0x8A5F, // - 0x57A4,0x9AB7, // - 0x57AA,0x9AB8, // - 0x57B0,0x9AB9, // - 0x57B3,0x9AB6, // - 0x57C0,0x9AAF, // - 0x57C3,0x9ABA, // - 0x57C6,0x9ABB, // - 0x57CB,0x9684, // - 0x57CE,0x8FE9, // - 0x57D2,0x9ABD, // - 0x57D3,0x9ABE, // - 0x57D4,0x9ABC, // - 0x57D6,0x9AC0, // - 0x57DC,0x9457, // - 0x57DF,0x88E6, // - 0x57E0,0x9575, // - 0x57E3,0x9AC1, // - 0x57F4,0x8FFB, // - 0x57F7,0x8EB7, // - 0x57F9,0x947C, // - 0x57FA,0x8AEE, // - 0x57FC,0x8DE9, // - 0x5800,0x9678, // - 0x5802,0x93B0, // - 0x5805,0x8C98, // - 0x5806,0x91CD, // - 0x580A,0x9ABF, // - 0x580B,0x9AC2, // - 0x5815,0x91C2, // - 0x5819,0x9AC3, // - 0x581D,0x9AC4, // - 0x5821,0x9AC6, // - 0x5824,0x92E7, // - 0x582A,0x8AAC, // - 0x582F,0xEA9F, // - 0x5830,0x8981, // - 0x5831,0x95F1, // - 0x5834,0x8FEA, // - 0x5835,0x9367, // - 0x583A,0x8DE4, // - 0x583D,0x9ACC, // - 0x5840,0x95BB, // - 0x5841,0x97DB, // - 0x584A,0x89F2, // - 0x584B,0x9AC8, // - 0x5851,0x9159, // - 0x5852,0x9ACB, // - 0x5854,0x9383, // - 0x5857,0x9368, // - 0x5858,0x9384, // - 0x5859,0x94B7, // - 0x585A,0x92CB, // - 0x585E,0x8DC7, // - 0x5862,0x9AC7, // - 0x5869,0x8996, // - 0x586B,0x9355, // - 0x5870,0x9AC9, // - 0x5872,0x9AC5, // - 0x5875,0x906F, // - 0x5879,0x9ACD, // - 0x587E,0x8F6D, // - 0x5883,0x8BAB, // - 0x5885,0x9ACE, // - 0x5893,0x95E6, // - 0x5897,0x919D, // - 0x589C,0x92C4, // - 0x589F,0x9AD0, // - 0x58A8,0x966E, // - 0x58AB,0x9AD1, // - 0x58AE,0x9AD6, // - 0x58B3,0x95AD, // - 0x58B8,0x9AD5, // - 0x58B9,0x9ACF, // - 0x58BA,0x9AD2, // - 0x58BB,0x9AD4, // - 0x58BE,0x8DA4, // - 0x58C1,0x95C7, // - 0x58C5,0x9AD7, // - 0x58C7,0x9264, // - 0x58CA,0x89F3, // - 0x58CC,0x8FEB, // - 0x58D1,0x9AD9, // - 0x58D3,0x9AD8, // - 0x58D5,0x8D88, // - 0x58D7,0x9ADA, // - 0x58D8,0x9ADC, // - 0x58D9,0x9ADB, // - 0x58DC,0x9ADE, // - 0x58DE,0x9AD3, // - 0x58DF,0x9AE0, // - 0x58E4,0x9ADF, // - 0x58E5,0x9ADD, // - 0x58EB,0x8E6D, // - 0x58EC,0x9070, // - 0x58EE,0x9173, // - 0x58EF,0x9AE1, // - 0x58F0,0x90BA, // - 0x58F1,0x88EB, // - 0x58F2,0x9484, // - 0x58F7,0x92D9, // - 0x58F9,0x9AE3, // - 0x58FA,0x9AE2, // - 0x58FB,0x9AE4, // - 0x58FC,0x9AE5, // - 0x58FD,0x9AE6, // - 0x5902,0x9AE7, // - 0x5909,0x95CF, // - 0x590A,0x9AE8, // - 0x590F,0x89C4, // - 0x5910,0x9AE9, // - 0x5916,0x8A4F, // - 0x5918,0x99C7, // - 0x5919,0x8F67, // - 0x591A,0x91BD, // - 0x591B,0x9AEA, // - 0x591C,0x96E9, // - 0x5922,0x96B2, // - 0x5925,0x9AEC, // - 0x5927,0x91E5, // - 0x5929,0x9356, // - 0x592A,0x91BE, // - 0x592B,0x9576, // - 0x592C,0x9AED, // - 0x592D,0x9AEE, // - 0x592E,0x899B, // - 0x5931,0x8EB8, // - 0x5932,0x9AEF, // - 0x5937,0x88CE, // - 0x5938,0x9AF0, // - 0x593E,0x9AF1, // - 0x5944,0x8982, // - 0x5947,0x8AEF, // - 0x5948,0x93DE, // - 0x5949,0x95F2, // - 0x594E,0x9AF5, // - 0x594F,0x9174, // - 0x5950,0x9AF4, // - 0x5951,0x8C5F, // - 0x5954,0x967A, // - 0x5955,0x9AF3, // - 0x5957,0x9385, // - 0x5958,0x9AF7, // - 0x595A,0x9AF6, // - 0x5960,0x9AF9, // - 0x5962,0x9AF8, // - 0x5965,0x899C, // - 0x5967,0x9AFA, // - 0x5968,0x8FA7, // - 0x5969,0x9AFC, // - 0x596A,0x9244, // - 0x596C,0x9AFB, // - 0x596E,0x95B1, // - 0x5973,0x8F97, // - 0x5974,0x937A, // - 0x5978,0x9B40, // - 0x597D,0x8D44, // - 0x5981,0x9B41, // - 0x5982,0x9440, // - 0x5983,0x94DC, // - 0x5984,0x96CF, // - 0x598A,0x9444, // - 0x598D,0x9B4A, // - 0x5993,0x8B57, // - 0x5996,0x9764, // - 0x5999,0x96AD, // - 0x599B,0x9BAA, // - 0x599D,0x9B42, // - 0x59A3,0x9B45, // - 0x59A5,0x91C3, // - 0x59A8,0x9657, // - 0x59AC,0x9369, // - 0x59B2,0x9B46, // - 0x59B9,0x9685, // - 0x59BB,0x8DC8, // - 0x59BE,0x8FA8, // - 0x59C6,0x9B47, // - 0x59C9,0x8E6F, // - 0x59CB,0x8E6E, // - 0x59D0,0x88B7, // - 0x59D1,0x8CC6, // - 0x59D3,0x90A9, // - 0x59D4,0x88CF, // - 0x59D9,0x9B4B, // - 0x59DA,0x9B4C, // - 0x59DC,0x9B49, // - 0x59E5,0x8957, // - 0x59E6,0x8AAD, // - 0x59E8,0x9B48, // - 0x59EA,0x96C3, // - 0x59EB,0x9550, // - 0x59F6,0x88A6, // - 0x59FB,0x88F7, // - 0x59FF,0x8E70, // - 0x5A01,0x88D0, // - 0x5A03,0x88A1, // - 0x5A09,0x9B51, // - 0x5A11,0x9B4F, // - 0x5A18,0x96BA, // - 0x5A1A,0x9B52, // - 0x5A1C,0x9B50, // - 0x5A1F,0x9B4E, // - 0x5A20,0x9050, // - 0x5A25,0x9B4D, // - 0x5A29,0x95D8, // - 0x5A2F,0x8CE2, // - 0x5A35,0x9B56, // - 0x5A36,0x9B57, // - 0x5A3C,0x8FA9, // - 0x5A40,0x9B53, // - 0x5A41,0x984B, // - 0x5A46,0x946B, // - 0x5A49,0x9B55, // - 0x5A5A,0x8DA5, // - 0x5A62,0x9B58, // - 0x5A66,0x9577, // - 0x5A6A,0x9B59, // - 0x5A6C,0x9B54, // - 0x5A7F,0x96B9, // - 0x5A92,0x947D, // - 0x5A9A,0x9B5A, // - 0x5A9B,0x9551, // - 0x5ABD,0x9B5F, // - 0x5ABE,0x9B5C, // - 0x5AC1,0x89C5, // - 0x5AC2,0x9B5E, // - 0x5AC9,0x8EB9, // - 0x5ACB,0x9B5D, // - 0x5ACC,0x8C99, // - 0x5AD0,0x9B6B, // - 0x5AD6,0x9B64, // - 0x5AD7,0x9B61, // - 0x5AE1,0x9284, // - 0x5AE3,0x9B60, // - 0x5AE6,0x9B62, // - 0x5AE9,0x9B63, // - 0x5AFA,0x9B65, // - 0x5AFB,0x9B66, // - 0x5B09,0x8AF0, // - 0x5B0B,0x9B68, // - 0x5B0C,0x9B67, // - 0x5B16,0x9B69, // - 0x5B22,0x8FEC, // - 0x5B2A,0x9B6C, // - 0x5B2C,0x92DA, // - 0x5B30,0x8964, // - 0x5B32,0x9B6A, // - 0x5B36,0x9B6D, // - 0x5B3E,0x9B6E, // - 0x5B40,0x9B71, // - 0x5B43,0x9B6F, // - 0x5B45,0x9B70, // - 0x5B50,0x8E71, // - 0x5B51,0x9B72, // - 0x5B54,0x8D45, // - 0x5B55,0x9B73, // - 0x5B57,0x8E9A, // - 0x5B58,0x91B6, // - 0x5B5A,0x9B74, // - 0x5B5B,0x9B75, // - 0x5B5C,0x8E79, // - 0x5B5D,0x8D46, // - 0x5B5F,0x96D0, // - 0x5B63,0x8B47, // - 0x5B64,0x8CC7, // - 0x5B65,0x9B76, // - 0x5B66,0x8A77, // - 0x5B69,0x9B77, // - 0x5B6B,0x91B7, // - 0x5B70,0x9B78, // - 0x5B71,0x9BA1, // - 0x5B73,0x9B79, // - 0x5B75,0x9B7A, // - 0x5B78,0x9B7B, // - 0x5B7A,0x9B7D, // - 0x5B80,0x9B7E, // - 0x5B83,0x9B80, // - 0x5B85,0x91EE, // - 0x5B87,0x8946, // - 0x5B88,0x8EE7, // - 0x5B89,0x88C0, // - 0x5B8B,0x9176, // - 0x5B8C,0x8AAE, // - 0x5B8D,0x8EB3, // - 0x5B8F,0x8D47, // - 0x5B95,0x9386, // - 0x5B97,0x8F40, // - 0x5B98,0x8AAF, // - 0x5B99,0x9288, // - 0x5B9A,0x92E8, // - 0x5B9B,0x88B6, // - 0x5B9C,0x8B58, // - 0x5B9D,0x95F3, // - 0x5B9F,0x8EC0, // - 0x5BA2,0x8B71, // - 0x5BA3,0x90E9, // - 0x5BA4,0x8EBA, // - 0x5BA5,0x9747, // - 0x5BA6,0x9B81, // - 0x5BAE,0x8B7B, // - 0x5BB0,0x8DC9, // - 0x5BB3,0x8A51, // - 0x5BB4,0x8983, // - 0x5BB5,0x8FAA, // - 0x5BB6,0x89C6, // - 0x5BB8,0x9B82, // - 0x5BB9,0x9765, // - 0x5BBF,0x8F68, // - 0x5BC2,0x8EE2, // - 0x5BC3,0x9B83, // - 0x5BC4,0x8AF1, // - 0x5BC5,0x93D0, // - 0x5BC6,0x96A7, // - 0x5BC7,0x9B84, // - 0x5BC9,0x9B85, // - 0x5BCC,0x9578, // - 0x5BD0,0x9B87, // - 0x5BD2,0x8AA6, // - 0x5BD3,0x8BF5, // - 0x5BD4,0x9B86, // - 0x5BDB,0x8AB0, // - 0x5BDD,0x9051, // - 0x5BDE,0x9B8B, // - 0x5BDF,0x8E40, // - 0x5BE1,0x89C7, // - 0x5BE2,0x9B8A, // - 0x5BE4,0x9B88, // - 0x5BE5,0x9B8C, // - 0x5BE6,0x9B89, // - 0x5BE7,0x944A, // - 0x5BE8,0x9ECB, // - 0x5BE9,0x9052, // - 0x5BEB,0x9B8D, // - 0x5BEE,0x97BE, // - 0x5BF0,0x9B8E, // - 0x5BF3,0x9B90, // - 0x5BF5,0x929E, // - 0x5BF6,0x9B8F, // - 0x5BF8,0x90A1, // - 0x5BFA,0x8E9B, // - 0x5BFE,0x91CE, // - 0x5BFF,0x8EF5, // - 0x5C01,0x9595, // - 0x5C02,0x90EA, // - 0x5C04,0x8ECB, // - 0x5C05,0x9B91, // - 0x5C06,0x8FAB, // - 0x5C07,0x9B92, // - 0x5C08,0x9B93, // - 0x5C09,0x88D1, // - 0x5C0A,0x91B8, // - 0x5C0B,0x9071, // - 0x5C0D,0x9B94, // - 0x5C0E,0x93B1, // - 0x5C0F,0x8FAC, // - 0x5C11,0x8FAD, // - 0x5C13,0x9B95, // - 0x5C16,0x90EB, // - 0x5C1A,0x8FAE, // - 0x5C20,0x9B96, // - 0x5C22,0x9B97, // - 0x5C24,0x96DE, // - 0x5C28,0x9B98, // - 0x5C2D,0x8BC4, // - 0x5C31,0x8F41, // - 0x5C38,0x9B99, // - 0x5C39,0x9B9A, // - 0x5C3A,0x8EDA, // - 0x5C3B,0x904B, // - 0x5C3C,0x93F2, // - 0x5C3D,0x9073, // - 0x5C3E,0x94F6, // - 0x5C3F,0x9441, // - 0x5C40,0x8BC7, // - 0x5C41,0x9B9B, // - 0x5C45,0x8B8F, // - 0x5C46,0x9B9C, // - 0x5C48,0x8BFC, // - 0x5C4A,0x93CD, // - 0x5C4B,0x89AE, // - 0x5C4D,0x8E72, // - 0x5C4E,0x9B9D, // - 0x5C4F,0x9BA0, // - 0x5C50,0x9B9F, // - 0x5C51,0x8BFB, // - 0x5C53,0x9B9E, // - 0x5C55,0x9357, // - 0x5C5E,0x91AE, // - 0x5C60,0x936A, // - 0x5C61,0x8EC6, // - 0x5C64,0x9177, // - 0x5C65,0x979A, // - 0x5C6C,0x9BA2, // - 0x5C6E,0x9BA3, // - 0x5C6F,0x93D4, // - 0x5C71,0x8E52, // - 0x5C76,0x9BA5, // - 0x5C79,0x9BA6, // - 0x5C8C,0x9BA7, // - 0x5C90,0x8AF2, // - 0x5C91,0x9BA8, // - 0x5C94,0x9BA9, // - 0x5CA1,0x89AA, // - 0x5CA8,0x915A, // - 0x5CA9,0x8AE2, // - 0x5CAB,0x9BAB, // - 0x5CAC,0x96A6, // - 0x5CB1,0x91D0, // - 0x5CB3,0x8A78, // - 0x5CB6,0x9BAD, // - 0x5CB7,0x9BAF, // - 0x5CB8,0x8ADD, // - 0x5CBB,0x9BAC, // - 0x5CBC,0x9BAE, // - 0x5CBE,0x9BB1, // - 0x5CC5,0x9BB0, // - 0x5CC7,0x9BB2, // - 0x5CD9,0x9BB3, // - 0x5CE0,0x93BB, // - 0x5CE1,0x8BAC, // - 0x5CE8,0x89E3, // - 0x5CE9,0x9BB4, // - 0x5CEA,0x9BB9, // - 0x5CED,0x9BB7, // - 0x5CEF,0x95F5, // - 0x5CF0,0x95F4, // - 0x5CF6,0x9387, // - 0x5CFA,0x9BB6, // - 0x5CFB,0x8F73, // - 0x5CFD,0x9BB5, // - 0x5D07,0x9092, // - 0x5D0B,0x9BBA, // - 0x5D0E,0x8DE8, // - 0x5D11,0x9BC0, // - 0x5D14,0x9BC1, // - 0x5D15,0x9BBB, // - 0x5D16,0x8A52, // - 0x5D17,0x9BBC, // - 0x5D18,0x9BC5, // - 0x5D19,0x9BC4, // - 0x5D1A,0x9BC3, // - 0x5D1B,0x9BBF, // - 0x5D1F,0x9BBE, // - 0x5D22,0x9BC2, // - 0x5D29,0x95F6, // - 0x5D4B,0x9BC9, // - 0x5D4C,0x9BC6, // - 0x5D4E,0x9BC8, // - 0x5D50,0x9792, // - 0x5D52,0x9BC7, // - 0x5D5C,0x9BBD, // - 0x5D69,0x9093, // - 0x5D6C,0x9BCA, // - 0x5D6F,0x8DB5, // - 0x5D73,0x9BCB, // - 0x5D76,0x9BCC, // - 0x5D82,0x9BCF, // - 0x5D84,0x9BCE, // - 0x5D87,0x9BCD, // - 0x5D8B,0x9388, // - 0x5D8C,0x9BB8, // - 0x5D90,0x9BD5, // - 0x5D9D,0x9BD1, // - 0x5DA2,0x9BD0, // - 0x5DAC,0x9BD2, // - 0x5DAE,0x9BD3, // - 0x5DB7,0x9BD6, // - 0x5DBA,0x97E4, // - 0x5DBC,0x9BD7, // - 0x5DBD,0x9BD4, // - 0x5DC9,0x9BD8, // - 0x5DCC,0x8ADE, // - 0x5DCD,0x9BD9, // - 0x5DD2,0x9BDB, // - 0x5DD3,0x9BDA, // - 0x5DD6,0x9BDC, // - 0x5DDB,0x9BDD, // - 0x5DDD,0x90EC, // - 0x5DDE,0x8F42, // - 0x5DE1,0x8F84, // - 0x5DE3,0x9183, // - 0x5DE5,0x8D48, // - 0x5DE6,0x8DB6, // - 0x5DE7,0x8D49, // - 0x5DE8,0x8B90, // - 0x5DEB,0x9BDE, // - 0x5DEE,0x8DB7, // - 0x5DF1,0x8CC8, // - 0x5DF2,0x9BDF, // - 0x5DF3,0x96A4, // - 0x5DF4,0x9462, // - 0x5DF5,0x9BE0, // - 0x5DF7,0x8D4A, // - 0x5DFB,0x8AAA, // - 0x5DFD,0x9246, // - 0x5DFE,0x8BD0, // - 0x5E02,0x8E73, // - 0x5E03,0x957A, // - 0x5E06,0x94BF, // - 0x5E0B,0x9BE1, // - 0x5E0C,0x8AF3, // - 0x5E11,0x9BE4, // - 0x5E16,0x929F, // - 0x5E19,0x9BE3, // - 0x5E1A,0x9BE2, // - 0x5E1B,0x9BE5, // - 0x5E1D,0x92E9, // - 0x5E25,0x9083, // - 0x5E2B,0x8E74, // - 0x5E2D,0x90C8, // - 0x5E2F,0x91D1, // - 0x5E30,0x8B41, // - 0x5E33,0x92A0, // - 0x5E36,0x9BE6, // - 0x5E37,0x9BE7, // - 0x5E38,0x8FED, // - 0x5E3D,0x9658, // - 0x5E40,0x9BEA, // - 0x5E43,0x9BE9, // - 0x5E44,0x9BE8, // - 0x5E45,0x959D, // - 0x5E47,0x9BF1, // - 0x5E4C,0x9679, // - 0x5E4E,0x9BEB, // - 0x5E54,0x9BED, // - 0x5E55,0x968B, // - 0x5E57,0x9BEC, // - 0x5E5F,0x9BEE, // - 0x5E61,0x94A6, // - 0x5E62,0x9BEF, // - 0x5E63,0x95BC, // - 0x5E64,0x9BF0, // - 0x5E72,0x8AB1, // - 0x5E73,0x95BD, // - 0x5E74,0x944E, // - 0x5E75,0x9BF2, // - 0x5E76,0x9BF3, // - 0x5E78,0x8D4B, // - 0x5E79,0x8AB2, // - 0x5E7A,0x9BF4, // - 0x5E7B,0x8CB6, // - 0x5E7C,0x9763, // - 0x5E7D,0x9748, // - 0x5E7E,0x8AF4, // - 0x5E7F,0x9BF6, // - 0x5E81,0x92A1, // - 0x5E83,0x8D4C, // - 0x5E84,0x8FAF, // - 0x5E87,0x94DD, // - 0x5E8A,0x8FB0, // - 0x5E8F,0x8F98, // - 0x5E95,0x92EA, // - 0x5E96,0x95F7, // - 0x5E97,0x9358, // - 0x5E9A,0x8D4D, // - 0x5E9C,0x957B, // - 0x5EA0,0x9BF7, // - 0x5EA6,0x9378, // - 0x5EA7,0x8DC0, // - 0x5EAB,0x8CC9, // - 0x5EAD,0x92EB, // - 0x5EB5,0x88C1, // - 0x5EB6,0x8F8E, // - 0x5EB7,0x8D4E, // - 0x5EB8,0x9766, // - 0x5EC1,0x9BF8, // - 0x5EC2,0x9BF9, // - 0x5EC3,0x9470, // - 0x5EC8,0x9BFA, // - 0x5EC9,0x97F5, // - 0x5ECA,0x984C, // - 0x5ECF,0x9BFC, // - 0x5ED0,0x9BFB, // - 0x5ED3,0x8A66, // - 0x5ED6,0x9C40, // - 0x5EDA,0x9C43, // - 0x5EDB,0x9C44, // - 0x5EDD,0x9C42, // - 0x5EDF,0x955F, // - 0x5EE0,0x8FB1, // - 0x5EE1,0x9C46, // - 0x5EE2,0x9C45, // - 0x5EE3,0x9C41, // - 0x5EE8,0x9C47, // - 0x5EE9,0x9C48, // - 0x5EEC,0x9C49, // - 0x5EF0,0x9C4C, // - 0x5EF1,0x9C4A, // - 0x5EF3,0x9C4B, // - 0x5EF4,0x9C4D, // - 0x5EF6,0x8984, // - 0x5EF7,0x92EC, // - 0x5EF8,0x9C4E, // - 0x5EFA,0x8C9A, // - 0x5EFB,0x89F4, // - 0x5EFC,0x9455, // - 0x5EFE,0x9C4F, // - 0x5EFF,0x93F9, // - 0x5F01,0x95D9, // - 0x5F03,0x9C50, // - 0x5F04,0x984D, // - 0x5F09,0x9C51, // - 0x5F0A,0x95BE, // - 0x5F0B,0x9C54, // - 0x5F0C,0x989F, // - 0x5F0D,0x98AF, // - 0x5F0F,0x8EAE, // - 0x5F10,0x93F3, // - 0x5F11,0x9C55, // - 0x5F13,0x8B7C, // - 0x5F14,0x92A2, // - 0x5F15,0x88F8, // - 0x5F16,0x9C56, // - 0x5F17,0x95A4, // - 0x5F18,0x8D4F, // - 0x5F1B,0x926F, // - 0x5F1F,0x92ED, // - 0x5F25,0x96ED, // - 0x5F26,0x8CB7, // - 0x5F27,0x8CCA, // - 0x5F29,0x9C57, // - 0x5F2D,0x9C58, // - 0x5F2F,0x9C5E, // - 0x5F31,0x8EE3, // - 0x5F35,0x92A3, // - 0x5F37,0x8BAD, // - 0x5F38,0x9C59, // - 0x5F3C,0x954A, // - 0x5F3E,0x9265, // - 0x5F41,0x9C5A, // - 0x5F4A,0x8BAE, // - 0x5F4C,0x9C5C, // - 0x5F4E,0x9C5D, // - 0x5F51,0x9C5F, // - 0x5F53,0x9396, // - 0x5F56,0x9C60, // - 0x5F57,0x9C61, // - 0x5F59,0x9C62, // - 0x5F5C,0x9C53, // - 0x5F5D,0x9C52, // - 0x5F61,0x9C63, // - 0x5F62,0x8C60, // - 0x5F66,0x9546, // - 0x5F69,0x8DCA, // - 0x5F6A,0x9556, // - 0x5F6B,0x92A4, // - 0x5F6C,0x956A, // - 0x5F6D,0x9C64, // - 0x5F70,0x8FB2, // - 0x5F71,0x8965, // - 0x5F73,0x9C65, // - 0x5F77,0x9C66, // - 0x5F79,0x96F0, // - 0x5F7C,0x94DE, // - 0x5F7F,0x9C69, // - 0x5F80,0x899D, // - 0x5F81,0x90AA, // - 0x5F82,0x9C68, // - 0x5F83,0x9C67, // - 0x5F84,0x8C61, // - 0x5F85,0x91D2, // - 0x5F87,0x9C6D, // - 0x5F88,0x9C6B, // - 0x5F8A,0x9C6A, // - 0x5F8B,0x97A5, // - 0x5F8C,0x8CE3, // - 0x5F90,0x8F99, // - 0x5F91,0x9C6C, // - 0x5F92,0x936B, // - 0x5F93,0x8F5D, // - 0x5F97,0x93BE, // - 0x5F98,0x9C70, // - 0x5F99,0x9C6F, // - 0x5F9E,0x9C6E, // - 0x5FA0,0x9C71, // - 0x5FA1,0x8CE4, // - 0x5FA8,0x9C72, // - 0x5FA9,0x959C, // - 0x5FAA,0x8F7A, // - 0x5FAD,0x9C73, // - 0x5FAE,0x94F7, // - 0x5FB3,0x93BF, // - 0x5FB4,0x92A5, // - 0x5FB9,0x934F, // - 0x5FBC,0x9C74, // - 0x5FBD,0x8B4A, // - 0x5FC3,0x9053, // - 0x5FC5,0x954B, // - 0x5FCC,0x8AF5, // - 0x5FCD,0x9445, // - 0x5FD6,0x9C75, // - 0x5FD7,0x8E75, // - 0x5FD8,0x9659, // - 0x5FD9,0x965A, // - 0x5FDC,0x899E, // - 0x5FDD,0x9C7A, // - 0x5FE0,0x9289, // - 0x5FE4,0x9C77, // - 0x5FEB,0x89F5, // - 0x5FF0,0x9CAB, // - 0x5FF1,0x9C79, // - 0x5FF5,0x944F, // - 0x5FF8,0x9C78, // - 0x5FFB,0x9C76, // - 0x5FFD,0x8D9A, // - 0x5FFF,0x9C7C, // - 0x600E,0x9C83, // - 0x600F,0x9C89, // - 0x6010,0x9C81, // - 0x6012,0x937B, // - 0x6015,0x9C86, // - 0x6016,0x957C, // - 0x6019,0x9C80, // - 0x601B,0x9C85, // - 0x601C,0x97E5, // - 0x601D,0x8E76, // - 0x6020,0x91D3, // - 0x6021,0x9C7D, // - 0x6025,0x8B7D, // - 0x6026,0x9C88, // - 0x6027,0x90AB, // - 0x6028,0x8985, // - 0x6029,0x9C82, // - 0x602A,0x89F6, // - 0x602B,0x9C87, // - 0x602F,0x8BAF, // - 0x6031,0x9C84, // - 0x603A,0x9C8A, // - 0x6041,0x9C8C, // - 0x6042,0x9C96, // - 0x6043,0x9C94, // - 0x6046,0x9C91, // - 0x604A,0x9C90, // - 0x604B,0x97F6, // - 0x604D,0x9C92, // - 0x6050,0x8BB0, // - 0x6052,0x8D50, // - 0x6055,0x8F9A, // - 0x6059,0x9C99, // - 0x605A,0x9C8B, // - 0x605F,0x9C8F, // - 0x6060,0x9C7E, // - 0x6062,0x89F8, // - 0x6063,0x9C93, // - 0x6064,0x9C95, // - 0x6065,0x9270, // - 0x6068,0x8DA6, // - 0x6069,0x89B6, // - 0x606A,0x9C8D, // - 0x606B,0x9C98, // - 0x606C,0x9C97, // - 0x606D,0x8BB1, // - 0x606F,0x91A7, // - 0x6070,0x8A86, // - 0x6075,0x8C62, // - 0x6077,0x9C8E, // - 0x6081,0x9C9A, // - 0x6083,0x9C9D, // - 0x6084,0x9C9F, // - 0x6089,0x8EBB, // - 0x608B,0x9CA5, // - 0x608C,0x92EE, // - 0x608D,0x9C9B, // - 0x6092,0x9CA3, // - 0x6094,0x89F7, // - 0x6096,0x9CA1, // - 0x6097,0x9CA2, // - 0x609A,0x9C9E, // - 0x609B,0x9CA0, // - 0x609F,0x8CE5, // - 0x60A0,0x9749, // - 0x60A3,0x8AB3, // - 0x60A6,0x8978, // - 0x60A7,0x9CA4, // - 0x60A9,0x9459, // - 0x60AA,0x88AB, // - 0x60B2,0x94DF, // - 0x60B3,0x9C7B, // - 0x60B4,0x9CAA, // - 0x60B5,0x9CAE, // - 0x60B6,0x96E3, // - 0x60B8,0x9CA7, // - 0x60BC,0x9389, // - 0x60BD,0x9CAC, // - 0x60C5,0x8FEE, // - 0x60C6,0x9CAD, // - 0x60C7,0x93D5, // - 0x60D1,0x9866, // - 0x60D3,0x9CA9, // - 0x60D8,0x9CAF, // - 0x60DA,0x8D9B, // - 0x60DC,0x90C9, // - 0x60DF,0x88D2, // - 0x60E0,0x9CA8, // - 0x60E1,0x9CA6, // - 0x60E3,0x9179, // - 0x60E7,0x9C9C, // - 0x60E8,0x8E53, // - 0x60F0,0x91C4, // - 0x60F1,0x9CBB, // - 0x60F3,0x917A, // - 0x60F4,0x9CB6, // - 0x60F6,0x9CB3, // - 0x60F7,0x9CB4, // - 0x60F9,0x8EE4, // - 0x60FA,0x9CB7, // - 0x60FB,0x9CBA, // - 0x6100,0x9CB5, // - 0x6101,0x8F44, // - 0x6103,0x9CB8, // - 0x6106,0x9CB2, // - 0x6108,0x96FA, // - 0x6109,0x96F9, // - 0x610D,0x9CBC, // - 0x610E,0x9CBD, // - 0x610F,0x88D3, // - 0x6115,0x9CB1, // - 0x611A,0x8BF0, // - 0x611B,0x88A4, // - 0x611F,0x8AB4, // - 0x6121,0x9CB9, // - 0x6127,0x9CC1, // - 0x6128,0x9CC0, // - 0x612C,0x9CC5, // - 0x6134,0x9CC6, // - 0x613C,0x9CC4, // - 0x613D,0x9CC7, // - 0x613E,0x9CBF, // - 0x613F,0x9CC3, // - 0x6142,0x9CC8, // - 0x6144,0x9CC9, // - 0x6147,0x9CBE, // - 0x6148,0x8E9C, // - 0x614A,0x9CC2, // - 0x614B,0x91D4, // - 0x614C,0x8D51, // - 0x614D,0x9CB0, // - 0x614E,0x9054, // - 0x6153,0x9CD6, // - 0x6155,0x95E7, // - 0x6158,0x9CCC, // - 0x6159,0x9CCD, // - 0x615A,0x9CCE, // - 0x615D,0x9CD5, // - 0x615F,0x9CD4, // - 0x6162,0x969D, // - 0x6163,0x8AB5, // - 0x6165,0x9CD2, // - 0x6167,0x8C64, // - 0x6168,0x8A53, // - 0x616B,0x9CCF, // - 0x616E,0x97B6, // - 0x616F,0x9CD1, // - 0x6170,0x88D4, // - 0x6171,0x9CD3, // - 0x6173,0x9CCA, // - 0x6174,0x9CD0, // - 0x6175,0x9CD7, // - 0x6176,0x8C63, // - 0x6177,0x9CCB, // - 0x617E,0x977C, // - 0x6182,0x974A, // - 0x6187,0x9CDA, // - 0x618A,0x9CDE, // - 0x618E,0x919E, // - 0x6190,0x97F7, // - 0x6191,0x9CDF, // - 0x6194,0x9CDC, // - 0x6196,0x9CD9, // - 0x6199,0x9CD8, // - 0x619A,0x9CDD, // - 0x61A4,0x95AE, // - 0x61A7,0x93B2, // - 0x61A9,0x8C65, // - 0x61AB,0x9CE0, // - 0x61AC,0x9CDB, // - 0x61AE,0x9CE1, // - 0x61B2,0x8C9B, // - 0x61B6,0x89AF, // - 0x61BA,0x9CE9, // - 0x61BE,0x8AB6, // - 0x61C3,0x9CE7, // - 0x61C6,0x9CE8, // - 0x61C7,0x8DA7, // - 0x61C8,0x9CE6, // - 0x61C9,0x9CE4, // - 0x61CA,0x9CE3, // - 0x61CB,0x9CEA, // - 0x61CC,0x9CE2, // - 0x61CD,0x9CEC, // - 0x61D0,0x89F9, // - 0x61E3,0x9CEE, // - 0x61E6,0x9CED, // - 0x61F2,0x92A6, // - 0x61F4,0x9CF1, // - 0x61F6,0x9CEF, // - 0x61F7,0x9CE5, // - 0x61F8,0x8C9C, // - 0x61FA,0x9CF0, // - 0x61FC,0x9CF4, // - 0x61FD,0x9CF3, // - 0x61FE,0x9CF5, // - 0x61FF,0x9CF2, // - 0x6200,0x9CF6, // - 0x6208,0x9CF7, // - 0x6209,0x9CF8, // - 0x620A,0x95E8, // - 0x620C,0x9CFA, // - 0x620D,0x9CF9, // - 0x620E,0x8F5E, // - 0x6210,0x90AC, // - 0x6211,0x89E4, // - 0x6212,0x89FA, // - 0x6214,0x9CFB, // - 0x6216,0x88BD, // - 0x621A,0x90CA, // - 0x621B,0x9CFC, // - 0x621D,0xE6C1, // - 0x621E,0x9D40, // - 0x621F,0x8C81, // - 0x6221,0x9D41, // - 0x6226,0x90ED, // - 0x622A,0x9D42, // - 0x622E,0x9D43, // - 0x622F,0x8B59, // - 0x6230,0x9D44, // - 0x6232,0x9D45, // - 0x6233,0x9D46, // - 0x6234,0x91D5, // - 0x6238,0x8CCB, // - 0x623B,0x96DF, // - 0x6240,0x8F8A, // - 0x6241,0x9D47, // - 0x6247,0x90EE, // - 0x6248,0xE7BB, // - 0x6249,0x94E0, // - 0x624B,0x8EE8, // - 0x624D,0x8DCB, // - 0x624E,0x9D48, // - 0x6253,0x91C5, // - 0x6255,0x95A5, // - 0x6258,0x91EF, // - 0x625B,0x9D4B, // - 0x625E,0x9D49, // - 0x6260,0x9D4C, // - 0x6263,0x9D4A, // - 0x6268,0x9D4D, // - 0x626E,0x95AF, // - 0x6271,0x88B5, // - 0x6276,0x957D, // - 0x6279,0x94E1, // - 0x627C,0x9D4E, // - 0x627E,0x9D51, // - 0x627F,0x8FB3, // - 0x6280,0x8B5A, // - 0x6282,0x9D4F, // - 0x6283,0x9D56, // - 0x6284,0x8FB4, // - 0x6289,0x9D50, // - 0x628A,0x9463, // - 0x6291,0x977D, // - 0x6292,0x9D52, // - 0x6293,0x9D53, // - 0x6294,0x9D57, // - 0x6295,0x938A, // - 0x6296,0x9D54, // - 0x6297,0x8D52, // - 0x6298,0x90DC, // - 0x629B,0x9D65, // - 0x629C,0x94B2, // - 0x629E,0x91F0, // - 0x62AB,0x94E2, // - 0x62AC,0x9DAB, // - 0x62B1,0x95F8, // - 0x62B5,0x92EF, // - 0x62B9,0x9695, // - 0x62BB,0x9D5A, // - 0x62BC,0x899F, // - 0x62BD,0x928A, // - 0x62C2,0x9D63, // - 0x62C5,0x9253, // - 0x62C6,0x9D5D, // - 0x62C7,0x9D64, // - 0x62C8,0x9D5F, // - 0x62C9,0x9D66, // - 0x62CA,0x9D62, // - 0x62CC,0x9D61, // - 0x62CD,0x948F, // - 0x62D0,0x89FB, // - 0x62D1,0x9D59, // - 0x62D2,0x8B91, // - 0x62D3,0x91F1, // - 0x62D4,0x9D55, // - 0x62D7,0x9D58, // - 0x62D8,0x8D53, // - 0x62D9,0x90D9, // - 0x62DB,0x8FB5, // - 0x62DC,0x9D60, // - 0x62DD,0x9471, // - 0x62E0,0x8B92, // - 0x62E1,0x8A67, // - 0x62EC,0x8A87, // - 0x62ED,0x9040, // - 0x62EE,0x9D68, // - 0x62EF,0x9D6D, // - 0x62F1,0x9D69, // - 0x62F3,0x8C9D, // - 0x62F5,0x9D6E, // - 0x62F6,0x8E41, // - 0x62F7,0x8D89, // - 0x62FE,0x8F45, // - 0x62FF,0x9D5C, // - 0x6301,0x8E9D, // - 0x6302,0x9D6B, // - 0x6307,0x8E77, // - 0x6308,0x9D6C, // - 0x6309,0x88C2, // - 0x630C,0x9D67, // - 0x6311,0x92A7, // - 0x6319,0x8B93, // - 0x631F,0x8BB2, // - 0x6327,0x9D6A, // - 0x6328,0x88A5, // - 0x632B,0x8DC1, // - 0x632F,0x9055, // - 0x633A,0x92F0, // - 0x633D,0x94D2, // - 0x633E,0x9D70, // - 0x633F,0x917D, // - 0x6349,0x91A8, // - 0x634C,0x8E4A, // - 0x634D,0x9D71, // - 0x634F,0x9D73, // - 0x6350,0x9D6F, // - 0x6355,0x95DF, // - 0x6357,0x92BB, // - 0x635C,0x917B, // - 0x6367,0x95F9, // - 0x6368,0x8ECC, // - 0x6369,0x9D80, // - 0x636B,0x9D7E, // - 0x636E,0x9098, // - 0x6372,0x8C9E, // - 0x6376,0x9D78, // - 0x6377,0x8FB7, // - 0x637A,0x93E6, // - 0x637B,0x9450, // - 0x6380,0x9D76, // - 0x6383,0x917C, // - 0x6388,0x8EF6, // - 0x6389,0x9D7B, // - 0x638C,0x8FB6, // - 0x638E,0x9D75, // - 0x638F,0x9D7A, // - 0x6392,0x9472, // - 0x6396,0x9D74, // - 0x6398,0x8C40, // - 0x639B,0x8A7C, // - 0x639F,0x9D7C, // - 0x63A0,0x97A9, // - 0x63A1,0x8DCC, // - 0x63A2,0x9254, // - 0x63A3,0x9D79, // - 0x63A5,0x90DA, // - 0x63A7,0x8D54, // - 0x63A8,0x9084, // - 0x63A9,0x8986, // - 0x63AB,0x9D77, // - 0x63AC,0x8B64, // - 0x63B2,0x8C66, // - 0x63B4,0x92CD, // - 0x63B5,0x9D7D, // - 0x63BB,0x917E, // - 0x63BE,0x9D81, // - 0x63C0,0x9D83, // - 0x63C3,0x91B5, // - 0x63C4,0x9D89, // - 0x63C6,0x9D84, // - 0x63C9,0x9D86, // - 0x63CF,0x9560, // - 0x63D0,0x92F1, // - 0x63D2,0x9D87, // - 0x63D6,0x974B, // - 0x63DA,0x9767, // - 0x63DB,0x8AB7, // - 0x63E1,0x88AC, // - 0x63E3,0x9D85, // - 0x63E9,0x9D82, // - 0x63EE,0x8AF6, // - 0x63F4,0x8987, // - 0x63F6,0x9D88, // - 0x63FA,0x9768, // - 0x6406,0x9D8C, // - 0x640D,0x91B9, // - 0x640F,0x9D93, // - 0x6413,0x9D8D, // - 0x6416,0x9D8A, // - 0x6417,0x9D91, // - 0x641C,0x9D72, // - 0x6426,0x9D8E, // - 0x6428,0x9D92, // - 0x642C,0x94C0, // - 0x642D,0x938B, // - 0x6434,0x9D8B, // - 0x6436,0x9D8F, // - 0x643A,0x8C67, // - 0x643E,0x8DEF, // - 0x6442,0x90DB, // - 0x644E,0x9D97, // - 0x6458,0x9345, // - 0x6467,0x9D94, // - 0x6469,0x9680, // - 0x646F,0x9D95, // - 0x6476,0x9D96, // - 0x6478,0x96CC, // - 0x647A,0x90A0, // - 0x6483,0x8C82, // - 0x6488,0x9D9D, // - 0x6492,0x8E54, // - 0x6493,0x9D9A, // - 0x6495,0x9D99, // - 0x649A,0x9451, // - 0x649E,0x93B3, // - 0x64A4,0x9350, // - 0x64A5,0x9D9B, // - 0x64A9,0x9D9C, // - 0x64AB,0x958F, // - 0x64AD,0x9464, // - 0x64AE,0x8E42, // - 0x64B0,0x90EF, // - 0x64B2,0x966F, // - 0x64B9,0x8A68, // - 0x64BB,0x9DA3, // - 0x64BC,0x9D9E, // - 0x64C1,0x9769, // - 0x64C2,0x9DA5, // - 0x64C5,0x9DA1, // - 0x64C7,0x9DA2, // - 0x64CD,0x9180, // - 0x64D2,0x9DA0, // - 0x64D4,0x9D5E, // - 0x64D8,0x9DA4, // - 0x64DA,0x9D9F, // - 0x64E0,0x9DA9, // - 0x64E1,0x9DAA, // - 0x64E2,0x9346, // - 0x64E3,0x9DAC, // - 0x64E6,0x8E43, // - 0x64E7,0x9DA7, // - 0x64EF,0x9DAD, // - 0x64F1,0x9DA6, // - 0x64F2,0x9DB1, // - 0x64F4,0x9DB0, // - 0x64F6,0x9DAF, // - 0x64FA,0x9DB2, // - 0x64FD,0x9DB4, // - 0x64FE,0x8FEF, // - 0x6500,0x9DB3, // - 0x6505,0x9DB7, // - 0x6518,0x9DB5, // - 0x651C,0x9DB6, // - 0x651D,0x9D90, // - 0x6523,0x9DB9, // - 0x6524,0x9DB8, // - 0x652A,0x9D98, // - 0x652B,0x9DBA, // - 0x652C,0x9DAE, // - 0x652F,0x8E78, // - 0x6534,0x9DBB, // - 0x6535,0x9DBC, // - 0x6536,0x9DBE, // - 0x6537,0x9DBD, // - 0x6538,0x9DBF, // - 0x6539,0x89FC, // - 0x653B,0x8D55, // - 0x653E,0x95FA, // - 0x653F,0x90AD, // - 0x6545,0x8CCC, // - 0x6548,0x9DC1, // - 0x654D,0x9DC4, // - 0x654F,0x9571, // - 0x6551,0x8B7E, // - 0x6555,0x9DC3, // - 0x6556,0x9DC2, // - 0x6557,0x9473, // - 0x6558,0x9DC5, // - 0x6559,0x8BB3, // - 0x655D,0x9DC7, // - 0x655E,0x9DC6, // - 0x6562,0x8AB8, // - 0x6563,0x8E55, // - 0x6566,0x93D6, // - 0x656C,0x8C68, // - 0x6570,0x9094, // - 0x6572,0x9DC8, // - 0x6574,0x90AE, // - 0x6575,0x9347, // - 0x6577,0x957E, // - 0x6578,0x9DC9, // - 0x6582,0x9DCA, // - 0x6583,0x9DCB, // - 0x6587,0x95B6, // - 0x6588,0x9B7C, // - 0x6589,0x90C4, // - 0x658C,0x956B, // - 0x658E,0x8DD6, // - 0x6590,0x94E3, // - 0x6591,0x94C1, // - 0x6597,0x936C, // - 0x6599,0x97BF, // - 0x659B,0x9DCD, // - 0x659C,0x8ECE, // - 0x659F,0x9DCE, // - 0x65A1,0x88B4, // - 0x65A4,0x8BD2, // - 0x65A5,0x90CB, // - 0x65A7,0x9580, // - 0x65AB,0x9DCF, // - 0x65AC,0x8E61, // - 0x65AD,0x9266, // - 0x65AF,0x8E7A, // - 0x65B0,0x9056, // - 0x65B7,0x9DD0, // - 0x65B9,0x95FB, // - 0x65BC,0x8997, // - 0x65BD,0x8E7B, // - 0x65C1,0x9DD3, // - 0x65C3,0x9DD1, // - 0x65C4,0x9DD4, // - 0x65C5,0x97B7, // - 0x65C6,0x9DD2, // - 0x65CB,0x90F9, // - 0x65CC,0x9DD5, // - 0x65CF,0x91B0, // - 0x65D2,0x9DD6, // - 0x65D7,0x8AF8, // - 0x65D9,0x9DD8, // - 0x65DB,0x9DD7, // - 0x65E0,0x9DD9, // - 0x65E1,0x9DDA, // - 0x65E2,0x8AF9, // - 0x65E5,0x93FA, // - 0x65E6,0x9255, // - 0x65E7,0x8B8C, // - 0x65E8,0x8E7C, // - 0x65E9,0x9181, // - 0x65EC,0x8F7B, // - 0x65ED,0x88AE, // - 0x65F1,0x9DDB, // - 0x65FA,0x89A0, // - 0x65FB,0x9DDF, // - 0x6602,0x8D56, // - 0x6603,0x9DDE, // - 0x6606,0x8DA9, // - 0x6607,0x8FB8, // - 0x660A,0x9DDD, // - 0x660C,0x8FB9, // - 0x660E,0x96BE, // - 0x660F,0x8DA8, // - 0x6613,0x88D5, // - 0x6614,0x90CC, // - 0x661C,0x9DE4, // - 0x661F,0x90AF, // - 0x6620,0x8966, // - 0x6625,0x8F74, // - 0x6627,0x9686, // - 0x6628,0x8DF0, // - 0x662D,0x8FBA, // - 0x662F,0x90A5, // - 0x6634,0x9DE3, // - 0x6635,0x9DE1, // - 0x6636,0x9DE2, // - 0x663C,0x928B, // - 0x663F,0x9E45, // - 0x6641,0x9DE8, // - 0x6642,0x8E9E, // - 0x6643,0x8D57, // - 0x6644,0x9DE6, // - 0x6649,0x9DE7, // - 0x664B,0x9057, // - 0x664F,0x9DE5, // - 0x6652,0x8E4E, // - 0x665D,0x9DEA, // - 0x665E,0x9DE9, // - 0x665F,0x9DEE, // - 0x6662,0x9DEF, // - 0x6664,0x9DEB, // - 0x6666,0x8A41, // - 0x6667,0x9DEC, // - 0x6668,0x9DED, // - 0x6669,0x94D3, // - 0x666E,0x9581, // - 0x666F,0x8C69, // - 0x6670,0x9DF0, // - 0x6674,0x90B0, // - 0x6676,0x8FBB, // - 0x667A,0x9271, // - 0x6681,0x8BC5, // - 0x6683,0x9DF1, // - 0x6684,0x9DF5, // - 0x6687,0x89C9, // - 0x6688,0x9DF2, // - 0x6689,0x9DF4, // - 0x668E,0x9DF3, // - 0x6691,0x8F8B, // - 0x6696,0x9267, // - 0x6697,0x88C3, // - 0x6698,0x9DF6, // - 0x669D,0x9DF7, // - 0x66A2,0x92A8, // - 0x66A6,0x97EF, // - 0x66AB,0x8E62, // - 0x66AE,0x95E9, // - 0x66B4,0x965C, // - 0x66B8,0x9E41, // - 0x66B9,0x9DF9, // - 0x66BC,0x9DFC, // - 0x66BE,0x9DFB, // - 0x66C1,0x9DF8, // - 0x66C4,0x9E40, // - 0x66C7,0x93DC, // - 0x66C9,0x9DFA, // - 0x66D6,0x9E42, // - 0x66D9,0x8F8C, // - 0x66DA,0x9E43, // - 0x66DC,0x976A, // - 0x66DD,0x9498, // - 0x66E0,0x9E44, // - 0x66E6,0x9E46, // - 0x66E9,0x9E47, // - 0x66F0,0x9E48, // - 0x66F2,0x8BC8, // - 0x66F3,0x8967, // - 0x66F4,0x8D58, // - 0x66F5,0x9E49, // - 0x66F7,0x9E4A, // - 0x66F8,0x8F91, // - 0x66F9,0x9182, // - 0x66FC,0x99D6, // - 0x66FD,0x915D, // - 0x66FE,0x915C, // - 0x66FF,0x91D6, // - 0x6700,0x8DC5, // - 0x6703,0x98F0, // - 0x6708,0x8C8E, // - 0x6709,0x974C, // - 0x670B,0x95FC, // - 0x670D,0x959E, // - 0x670F,0x9E4B, // - 0x6714,0x8DF1, // - 0x6715,0x92BD, // - 0x6716,0x9E4C, // - 0x6717,0x984E, // - 0x671B,0x965D, // - 0x671D,0x92A9, // - 0x671E,0x9E4D, // - 0x671F,0x8AFA, // - 0x6726,0x9E4E, // - 0x6727,0x9E4F, // - 0x6728,0x96D8, // - 0x672A,0x96A2, // - 0x672B,0x9696, // - 0x672C,0x967B, // - 0x672D,0x8E44, // - 0x672E,0x9E51, // - 0x6731,0x8EE9, // - 0x6734,0x9670, // - 0x6736,0x9E53, // - 0x6737,0x9E56, // - 0x6738,0x9E55, // - 0x673A,0x8AF7, // - 0x673D,0x8B80, // - 0x673F,0x9E52, // - 0x6741,0x9E54, // - 0x6746,0x9E57, // - 0x6749,0x9099, // - 0x674E,0x979B, // - 0x674F,0x88C7, // - 0x6750,0x8DDE, // - 0x6751,0x91BA, // - 0x6753,0x8EDB, // - 0x6756,0x8FF1, // - 0x6759,0x9E5A, // - 0x675C,0x936D, // - 0x675E,0x9E58, // - 0x675F,0x91A9, // - 0x6760,0x9E59, // - 0x6761,0x8FF0, // - 0x6762,0x96DB, // - 0x6764,0x9E5C, // - 0x6765,0x9788, // - 0x676A,0x9E61, // - 0x676D,0x8D59, // - 0x676F,0x9474, // - 0x6770,0x9E5E, // - 0x6771,0x938C, // - 0x6772,0x9DDC, // - 0x6773,0x9DE0, // - 0x6775,0x8B6E, // - 0x6777,0x9466, // - 0x677C,0x9E60, // - 0x677E,0x8FBC, // - 0x677F,0x94C2, // - 0x6785,0x9E66, // - 0x6787,0x94F8, // - 0x6789,0x9E5D, // - 0x678B,0x9E63, // - 0x678C,0x9E62, // - 0x6790,0x90CD, // - 0x6795,0x968D, // - 0x6797,0x97D1, // - 0x679A,0x9687, // - 0x679C,0x89CA, // - 0x679D,0x8E7D, // - 0x67A0,0x9867, // - 0x67A1,0x9E65, // - 0x67A2,0x9095, // - 0x67A6,0x9E64, // - 0x67A9,0x9E5F, // - 0x67AF,0x8CCD, // - 0x67B3,0x9E6B, // - 0x67B4,0x9E69, // - 0x67B6,0x89CB, // - 0x67B7,0x9E67, // - 0x67B8,0x9E6D, // - 0x67B9,0x9E73, // - 0x67C1,0x91C6, // - 0x67C4,0x95BF, // - 0x67C6,0x9E75, // - 0x67CA,0x9541, // - 0x67CE,0x9E74, // - 0x67CF,0x9490, // - 0x67D0,0x965E, // - 0x67D1,0x8AB9, // - 0x67D3,0x90F5, // - 0x67D4,0x8F5F, // - 0x67D8,0x92D1, // - 0x67DA,0x974D, // - 0x67DD,0x9E70, // - 0x67DE,0x9E6F, // - 0x67E2,0x9E71, // - 0x67E4,0x9E6E, // - 0x67E7,0x9E76, // - 0x67E9,0x9E6C, // - 0x67EC,0x9E6A, // - 0x67EE,0x9E72, // - 0x67EF,0x9E68, // - 0x67F1,0x928C, // - 0x67F3,0x96F6, // - 0x67F4,0x8EC4, // - 0x67F5,0x8DF2, // - 0x67FB,0x8DB8, // - 0x67FE,0x968F, // - 0x67FF,0x8A60, // - 0x6802,0x92CC, // - 0x6803,0x93C8, // - 0x6804,0x8968, // - 0x6813,0x90F0, // - 0x6816,0x90B2, // - 0x6817,0x8C49, // - 0x681E,0x9E78, // - 0x6821,0x8D5A, // - 0x6822,0x8A9C, // - 0x6829,0x9E7A, // - 0x682A,0x8A94, // - 0x682B,0x9E81, // - 0x6832,0x9E7D, // - 0x6834,0x90F1, // - 0x6838,0x8A6A, // - 0x6839,0x8DAA, // - 0x683C,0x8A69, // - 0x683D,0x8DCD, // - 0x6840,0x9E7B, // - 0x6841,0x8C85, // - 0x6842,0x8C6A, // - 0x6843,0x938D, // - 0x6846,0x9E79, // - 0x6848,0x88C4, // - 0x684D,0x9E7C, // - 0x684E,0x9E7E, // - 0x6850,0x8BCB, // - 0x6851,0x8C4B, // - 0x6853,0x8ABA, // - 0x6854,0x8B6A, // - 0x6859,0x9E82, // - 0x685C,0x8DF7, // - 0x685D,0x9691, // - 0x685F,0x8E56, // - 0x6863,0x9E83, // - 0x6867,0x954F, // - 0x6874,0x9E8F, // - 0x6876,0x89B1, // - 0x6877,0x9E84, // - 0x687E,0x9E95, // - 0x687F,0x9E85, // - 0x6881,0x97C0, // - 0x6883,0x9E8C, // - 0x6885,0x947E, // - 0x688D,0x9E94, // - 0x688F,0x9E87, // - 0x6893,0x88B2, // - 0x6894,0x9E89, // - 0x689B,0x9E8B, // - 0x689D,0x9E8A, // - 0x689F,0x9E86, // - 0x68A0,0x9E91, // - 0x68A2,0x8FBD, // - 0x68A6,0x9AEB, // - 0x68A7,0x8CE6, // - 0x68A8,0x979C, // - 0x68AD,0x9E88, // - 0x68AF,0x92F2, // - 0x68B0,0x8A42, // - 0x68B1,0x8DAB, // - 0x68B3,0x9E80, // - 0x68B5,0x9E90, // - 0x68B6,0x8A81, // - 0x68B9,0x9E8E, // - 0x68BA,0x9E92, // - 0x68BC,0x938E, // - 0x68C4,0x8AFC, // - 0x68C6,0x9EB0, // - 0x68C9,0x96C7, // - 0x68CA,0x9E97, // - 0x68CB,0x8AFB, // - 0x68CD,0x9E9E, // - 0x68D2,0x965F, // - 0x68D4,0x9E9F, // - 0x68D5,0x9EA1, // - 0x68D7,0x9EA5, // - 0x68D8,0x9E99, // - 0x68DA,0x9249, // - 0x68DF,0x938F, // - 0x68E0,0x9EA9, // - 0x68E1,0x9E9C, // - 0x68E3,0x9EA6, // - 0x68E7,0x9EA0, // - 0x68EE,0x9058, // - 0x68EF,0x9EAA, // - 0x68F2,0x90B1, // - 0x68F9,0x9EA8, // - 0x68FA,0x8ABB, // - 0x6900,0x986F, // - 0x6901,0x9E96, // - 0x6904,0x9EA4, // - 0x6905,0x88D6, // - 0x6908,0x9E98, // - 0x690B,0x96B8, // - 0x690C,0x9E9D, // - 0x690D,0x9041, // - 0x690E,0x92C5, // - 0x690F,0x9E93, // - 0x6912,0x9EA3, // - 0x6919,0x909A, // - 0x691A,0x9EAD, // - 0x691B,0x8A91, // - 0x691C,0x8C9F, // - 0x6921,0x9EAF, // - 0x6922,0x9E9A, // - 0x6923,0x9EAE, // - 0x6925,0x9EA7, // - 0x6926,0x9E9B, // - 0x6928,0x9EAB, // - 0x692A,0x9EAC, // - 0x6930,0x9EBD, // - 0x6934,0x93CC, // - 0x6936,0x9EA2, // - 0x6939,0x9EB9, // - 0x693D,0x9EBB, // - 0x693F,0x92D6, // - 0x694A,0x976B, // - 0x6953,0x9596, // - 0x6954,0x9EB6, // - 0x6955,0x91C8, // - 0x6959,0x9EBC, // - 0x695A,0x915E, // - 0x695C,0x9EB3, // - 0x695D,0x9EC0, // - 0x695E,0x9EBF, // - 0x6960,0x93ED, // - 0x6961,0x9EBE, // - 0x6962,0x93E8, // - 0x696A,0x9EC2, // - 0x696B,0x9EB5, // - 0x696D,0x8BC6, // - 0x696E,0x9EB8, // - 0x696F,0x8F7C, // - 0x6973,0x9480, // - 0x6974,0x9EBA, // - 0x6975,0x8BC9, // - 0x6977,0x9EB2, // - 0x6978,0x9EB4, // - 0x6979,0x9EB1, // - 0x697C,0x984F, // - 0x697D,0x8A79, // - 0x697E,0x9EB7, // - 0x6981,0x9EC1, // - 0x6982,0x8A54, // - 0x698A,0x8DE5, // - 0x698E,0x897C, // - 0x6991,0x9ED2, // - 0x6994,0x9850, // - 0x6995,0x9ED5, // - 0x699B,0x9059, // - 0x699C,0x9ED4, // - 0x69A0,0x9ED3, // - 0x69A7,0x9ED0, // - 0x69AE,0x9EC4, // - 0x69B1,0x9EE1, // - 0x69B2,0x9EC3, // - 0x69B4,0x9ED6, // - 0x69BB,0x9ECE, // - 0x69BE,0x9EC9, // - 0x69BF,0x9EC6, // - 0x69C1,0x9EC7, // - 0x69C3,0x9ECF, // - 0x69C7,0xEAA0, // - 0x69CA,0x9ECC, // - 0x69CB,0x8D5C, // - 0x69CC,0x92C6, // - 0x69CD,0x9184, // - 0x69CE,0x9ECA, // - 0x69D0,0x9EC5, // - 0x69D3,0x9EC8, // - 0x69D8,0x976C, // - 0x69D9,0x968A, // - 0x69DD,0x9ECD, // - 0x69DE,0x9ED7, // - 0x69E7,0x9EDF, // - 0x69E8,0x9ED8, // - 0x69EB,0x9EE5, // - 0x69ED,0x9EE3, // - 0x69F2,0x9EDE, // - 0x69F9,0x9EDD, // - 0x69FB,0x92CE, // - 0x69FD,0x9185, // - 0x69FF,0x9EDB, // - 0x6A02,0x9ED9, // - 0x6A05,0x9EE0, // - 0x6A0A,0x9EE6, // - 0x6A0B,0x94F3, // - 0x6A0C,0x9EEC, // - 0x6A12,0x9EE7, // - 0x6A13,0x9EEA, // - 0x6A14,0x9EE4, // - 0x6A17,0x9294, // - 0x6A19,0x9557, // - 0x6A1B,0x9EDA, // - 0x6A1E,0x9EE2, // - 0x6A1F,0x8FBE, // - 0x6A21,0x96CD, // - 0x6A22,0x9EF6, // - 0x6A23,0x9EE9, // - 0x6A29,0x8CA0, // - 0x6A2A,0x89A1, // - 0x6A2B,0x8A7E, // - 0x6A2E,0x9ED1, // - 0x6A35,0x8FBF, // - 0x6A36,0x9EEE, // - 0x6A38,0x9EF5, // - 0x6A39,0x8EF7, // - 0x6A3A,0x8A92, // - 0x6A3D,0x924D, // - 0x6A44,0x9EEB, // - 0x6A47,0x9EF0, // - 0x6A48,0x9EF4, // - 0x6A4B,0x8BB4, // - 0x6A58,0x8B6B, // - 0x6A59,0x9EF2, // - 0x6A5F,0x8B40, // - 0x6A61,0x93C9, // - 0x6A62,0x9EF1, // - 0x6A66,0x9EF3, // - 0x6A72,0x9EED, // - 0x6A78,0x9EEF, // - 0x6A7F,0x8A80, // - 0x6A80,0x9268, // - 0x6A84,0x9EFA, // - 0x6A8D,0x9EF8, // - 0x6A8E,0x8CE7, // - 0x6A90,0x9EF7, // - 0x6A97,0x9F40, // - 0x6A9C,0x9E77, // - 0x6AA0,0x9EF9, // - 0x6AA2,0x9EFB, // - 0x6AA3,0x9EFC, // - 0x6AAA,0x9F4B, // - 0x6AAC,0x9F47, // - 0x6AAE,0x9E8D, // - 0x6AB3,0x9F46, // - 0x6AB8,0x9F45, // - 0x6ABB,0x9F42, // - 0x6AC1,0x9EE8, // - 0x6AC2,0x9F44, // - 0x6AC3,0x9F43, // - 0x6AD1,0x9F49, // - 0x6AD3,0x9845, // - 0x6ADA,0x9F4C, // - 0x6ADB,0x8BF9, // - 0x6ADE,0x9F48, // - 0x6ADF,0x9F4A, // - 0x6AE8,0x94A5, // - 0x6AEA,0x9F4D, // - 0x6AFA,0x9F51, // - 0x6AFB,0x9F4E, // - 0x6B04,0x9793, // - 0x6B05,0x9F4F, // - 0x6B0A,0x9EDC, // - 0x6B12,0x9F52, // - 0x6B16,0x9F53, // - 0x6B1D,0x8954, // - 0x6B1F,0x9F55, // - 0x6B20,0x8C87, // - 0x6B21,0x8E9F, // - 0x6B23,0x8BD3, // - 0x6B27,0x89A2, // - 0x6B32,0x977E, // - 0x6B37,0x9F57, // - 0x6B38,0x9F56, // - 0x6B39,0x9F59, // - 0x6B3A,0x8B5C, // - 0x6B3D,0x8BD4, // - 0x6B3E,0x8ABC, // - 0x6B43,0x9F5C, // - 0x6B49,0x9F5D, // - 0x6B4C,0x89CC, // - 0x6B4E,0x9256, // - 0x6B50,0x9F5E, // - 0x6B53,0x8ABD, // - 0x6B54,0x9F60, // - 0x6B59,0x9F5F, // - 0x6B5B,0x9F61, // - 0x6B5F,0x9F62, // - 0x6B61,0x9F63, // - 0x6B62,0x8E7E, // - 0x6B63,0x90B3, // - 0x6B64,0x8D9F, // - 0x6B66,0x9590, // - 0x6B69,0x95E0, // - 0x6B6A,0x9863, // - 0x6B6F,0x8E95, // - 0x6B73,0x8DCE, // - 0x6B74,0x97F0, // - 0x6B78,0x9F64, // - 0x6B79,0x9F65, // - 0x6B7B,0x8E80, // - 0x6B7F,0x9F66, // - 0x6B80,0x9F67, // - 0x6B83,0x9F69, // - 0x6B84,0x9F68, // - 0x6B86,0x9677, // - 0x6B89,0x8F7D, // - 0x6B8A,0x8EEA, // - 0x6B8B,0x8E63, // - 0x6B8D,0x9F6A, // - 0x6B95,0x9F6C, // - 0x6B96,0x9042, // - 0x6B98,0x9F6B, // - 0x6B9E,0x9F6D, // - 0x6BA4,0x9F6E, // - 0x6BAA,0x9F6F, // - 0x6BAB,0x9F70, // - 0x6BAF,0x9F71, // - 0x6BB1,0x9F73, // - 0x6BB2,0x9F72, // - 0x6BB3,0x9F74, // - 0x6BB4,0x89A3, // - 0x6BB5,0x9269, // - 0x6BB7,0x9F75, // - 0x6BBA,0x8E45, // - 0x6BBB,0x8A6B, // - 0x6BBC,0x9F76, // - 0x6BBF,0x9361, // - 0x6BC0,0x9ACA, // - 0x6BC5,0x8B42, // - 0x6BC6,0x9F77, // - 0x6BCB,0x9F78, // - 0x6BCD,0x95EA, // - 0x6BCE,0x9688, // - 0x6BD2,0x93C5, // - 0x6BD3,0x9F79, // - 0x6BD4,0x94E4, // - 0x6BD8,0x94F9, // - 0x6BDB,0x96D1, // - 0x6BDF,0x9F7A, // - 0x6BEB,0x9F7C, // - 0x6BEC,0x9F7B, // - 0x6BEF,0x9F7E, // - 0x6BF3,0x9F7D, // - 0x6C08,0x9F81, // - 0x6C0F,0x8E81, // - 0x6C11,0x96AF, // - 0x6C13,0x9F82, // - 0x6C14,0x9F83, // - 0x6C17,0x8B43, // - 0x6C1B,0x9F84, // - 0x6C23,0x9F86, // - 0x6C24,0x9F85, // - 0x6C34,0x9085, // - 0x6C37,0x9558, // - 0x6C38,0x8969, // - 0x6C3E,0x94C3, // - 0x6C40,0x92F3, // - 0x6C41,0x8F60, // - 0x6C42,0x8B81, // - 0x6C4E,0x94C4, // - 0x6C50,0x8EAC, // - 0x6C55,0x9F88, // - 0x6C57,0x8ABE, // - 0x6C5A,0x8998, // - 0x6C5D,0x93F0, // - 0x6C5E,0x9F87, // - 0x6C5F,0x8D5D, // - 0x6C60,0x9272, // - 0x6C62,0x9F89, // - 0x6C68,0x9F91, // - 0x6C6A,0x9F8A, // - 0x6C70,0x91BF, // - 0x6C72,0x8B82, // - 0x6C73,0x9F92, // - 0x6C7A,0x8C88, // - 0x6C7D,0x8B44, // - 0x6C7E,0x9F90, // - 0x6C81,0x9F8E, // - 0x6C82,0x9F8B, // - 0x6C83,0x9780, // - 0x6C88,0x92BE, // - 0x6C8C,0x93D7, // - 0x6C8D,0x9F8C, // - 0x6C90,0x9F94, // - 0x6C92,0x9F93, // - 0x6C93,0x8C42, // - 0x6C96,0x89AB, // - 0x6C99,0x8DB9, // - 0x6C9A,0x9F8D, // - 0x6C9B,0x9F8F, // - 0x6CA1,0x9676, // - 0x6CA2,0x91F2, // - 0x6CAB,0x9697, // - 0x6CAE,0x9F9C, // - 0x6CB1,0x9F9D, // - 0x6CB3,0x89CD, // - 0x6CB8,0x95A6, // - 0x6CB9,0x96FB, // - 0x6CBA,0x9F9F, // - 0x6CBB,0x8EA1, // - 0x6CBC,0x8FC0, // - 0x6CBD,0x9F98, // - 0x6CBE,0x9F9E, // - 0x6CBF,0x8988, // - 0x6CC1,0x8BB5, // - 0x6CC4,0x9F95, // - 0x6CC5,0x9F9A, // - 0x6CC9,0x90F2, // - 0x6CCA,0x9491, // - 0x6CCC,0x94E5, // - 0x6CD3,0x9F97, // - 0x6CD5,0x9640, // - 0x6CD7,0x9F99, // - 0x6CD9,0x9FA2, // - 0x6CDB,0x9FA0, // - 0x6CDD,0x9F9B, // - 0x6CE1,0x9641, // - 0x6CE2,0x9467, // - 0x6CE3,0x8B83, // - 0x6CE5,0x9344, // - 0x6CE8,0x928D, // - 0x6CEA,0x9FA3, // - 0x6CEF,0x9FA1, // - 0x6CF0,0x91D7, // - 0x6CF1,0x9F96, // - 0x6CF3,0x896A, // - 0x6D0B,0x976D, // - 0x6D0C,0x9FAE, // - 0x6D12,0x9FAD, // - 0x6D17,0x90F4, // - 0x6D19,0x9FAA, // - 0x6D1B,0x978C, // - 0x6D1E,0x93B4, // - 0x6D1F,0x9FA4, // - 0x6D25,0x92C3, // - 0x6D29,0x896B, // - 0x6D2A,0x8D5E, // - 0x6D2B,0x9FA7, // - 0x6D32,0x8F46, // - 0x6D33,0x9FAC, // - 0x6D35,0x9FAB, // - 0x6D36,0x9FA6, // - 0x6D38,0x9FA9, // - 0x6D3B,0x8A88, // - 0x6D3D,0x9FA8, // - 0x6D3E,0x9468, // - 0x6D41,0x97AC, // - 0x6D44,0x8FF2, // - 0x6D45,0x90F3, // - 0x6D59,0x9FB4, // - 0x6D5A,0x9FB2, // - 0x6D5C,0x956C, // - 0x6D63,0x9FAF, // - 0x6D64,0x9FB1, // - 0x6D66,0x8959, // - 0x6D69,0x8D5F, // - 0x6D6A,0x9851, // - 0x6D6C,0x8A5C, // - 0x6D6E,0x9582, // - 0x6D74,0x9781, // - 0x6D77,0x8A43, // - 0x6D78,0x905A, // - 0x6D79,0x9FB3, // - 0x6D85,0x9FB8, // - 0x6D88,0x8FC1, // - 0x6D8C,0x974F, // - 0x6D8E,0x9FB5, // - 0x6D93,0x9FB0, // - 0x6D95,0x9FB6, // - 0x6D99,0x97DC, // - 0x6D9B,0x9393, // - 0x6D9C,0x93C0, // - 0x6DAF,0x8A55, // - 0x6DB2,0x8974, // - 0x6DB5,0x9FBC, // - 0x6DB8,0x9FBF, // - 0x6DBC,0x97C1, // - 0x6DC0,0x9784, // - 0x6DC5,0x9FC6, // - 0x6DC6,0x9FC0, // - 0x6DC7,0x9FBD, // - 0x6DCB,0x97D2, // - 0x6DCC,0x9FC3, // - 0x6DD1,0x8F69, // - 0x6DD2,0x9FC5, // - 0x6DD5,0x9FCA, // - 0x6DD8,0x9391, // - 0x6DD9,0x9FC8, // - 0x6DDE,0x9FC2, // - 0x6DE1,0x9257, // - 0x6DE4,0x9FC9, // - 0x6DE6,0x9FBE, // - 0x6DE8,0x9FC4, // - 0x6DEA,0x9FCB, // - 0x6DEB,0x88FA, // - 0x6DEC,0x9FC1, // - 0x6DEE,0x9FCC, // - 0x6DF3,0x8F7E, // - 0x6DF5,0x95A3, // - 0x6DF7,0x8DAC, // - 0x6DF9,0x9FB9, // - 0x6DFA,0x9FC7, // - 0x6DFB,0x9359, // - 0x6E05,0x90B4, // - 0x6E07,0x8A89, // - 0x6E08,0x8DCF, // - 0x6E09,0x8FC2, // - 0x6E0A,0x9FBB, // - 0x6E0B,0x8F61, // - 0x6E13,0x8C6B, // - 0x6E15,0x9FBA, // - 0x6E19,0x9FD0, // - 0x6E1A,0x8F8D, // - 0x6E1B,0x8CB8, // - 0x6E1D,0x9FDF, // - 0x6E1F,0x9FD9, // - 0x6E20,0x8B94, // - 0x6E21,0x936E, // - 0x6E23,0x9FD4, // - 0x6E24,0x9FDD, // - 0x6E25,0x88AD, // - 0x6E26,0x8951, // - 0x6E29,0x89B7, // - 0x6E2B,0x9FD6, // - 0x6E2C,0x91AA, // - 0x6E2D,0x9FCD, // - 0x6E2E,0x9FCF, // - 0x6E2F,0x8D60, // - 0x6E38,0x9FE0, // - 0x6E3A,0x9FDB, // - 0x6E3E,0x9FD3, // - 0x6E43,0x9FDA, // - 0x6E4A,0x96A9, // - 0x6E4D,0x9FD8, // - 0x6E4E,0x9FDC, // - 0x6E56,0x8CCE, // - 0x6E58,0x8FC3, // - 0x6E5B,0x9258, // - 0x6E5F,0x9FD2, // - 0x6E67,0x974E, // - 0x6E6B,0x9FD5, // - 0x6E6E,0x9FCE, // - 0x6E6F,0x9392, // - 0x6E72,0x9FD1, // - 0x6E76,0x9FD7, // - 0x6E7E,0x9870, // - 0x6E7F,0x8EBC, // - 0x6E80,0x969E, // - 0x6E82,0x9FE1, // - 0x6E8C,0x94AC, // - 0x6E8F,0x9FED, // - 0x6E90,0x8CB9, // - 0x6E96,0x8F80, // - 0x6E98,0x9FE3, // - 0x6E9C,0x97AD, // - 0x6E9D,0x8D61, // - 0x6E9F,0x9FF0, // - 0x6EA2,0x88EC, // - 0x6EA5,0x9FEE, // - 0x6EAA,0x9FE2, // - 0x6EAF,0x9FE8, // - 0x6EB2,0x9FEA, // - 0x6EB6,0x976E, // - 0x6EB7,0x9FE5, // - 0x6EBA,0x934D, // - 0x6EBD,0x9FE7, // - 0x6EC2,0x9FEF, // - 0x6EC4,0x9FE9, // - 0x6EC5,0x96C5, // - 0x6EC9,0x9FE4, // - 0x6ECB,0x8EA0, // - 0x6ECC,0x9FFC, // - 0x6ED1,0x8A8A, // - 0x6ED3,0x9FE6, // - 0x6ED4,0x9FEB, // - 0x6ED5,0x9FEC, // - 0x6EDD,0x91EA, // - 0x6EDE,0x91D8, // - 0x6EEC,0x9FF4, // - 0x6EEF,0x9FFA, // - 0x6EF2,0x9FF8, // - 0x6EF4,0x9348, // - 0x6EF7,0xE042, // - 0x6EF8,0x9FF5, // - 0x6EFE,0x9FF6, // - 0x6EFF,0x9FDE, // - 0x6F01,0x8B99, // - 0x6F02,0x9559, // - 0x6F06,0x8EBD, // - 0x6F09,0x8D97, // - 0x6F0F,0x9852, // - 0x6F11,0x9FF2, // - 0x6F13,0xE041, // - 0x6F14,0x8989, // - 0x6F15,0x9186, // - 0x6F20,0x9499, // - 0x6F22,0x8ABF, // - 0x6F23,0x97F8, // - 0x6F2B,0x969F, // - 0x6F2C,0x92D0, // - 0x6F31,0x9FF9, // - 0x6F32,0x9FFB, // - 0x6F38,0x9151, // - 0x6F3E,0xE040, // - 0x6F3F,0x9FF7, // - 0x6F41,0x9FF1, // - 0x6F45,0x8AC1, // - 0x6F54,0x8C89, // - 0x6F58,0xE04E, // - 0x6F5B,0xE049, // - 0x6F5C,0x90F6, // - 0x6F5F,0x8A83, // - 0x6F64,0x8F81, // - 0x6F66,0xE052, // - 0x6F6D,0xE04B, // - 0x6F6E,0x92AA, // - 0x6F6F,0xE048, // - 0x6F70,0x92D7, // - 0x6F74,0xE06B, // - 0x6F78,0xE045, // - 0x6F7A,0xE044, // - 0x6F7C,0xE04D, // - 0x6F80,0xE047, // - 0x6F81,0xE046, // - 0x6F82,0xE04C, // - 0x6F84,0x909F, // - 0x6F86,0xE043, // - 0x6F8E,0xE04F, // - 0x6F91,0xE050, // - 0x6F97,0x8AC0, // - 0x6FA1,0xE055, // - 0x6FA3,0xE054, // - 0x6FA4,0xE056, // - 0x6FAA,0xE059, // - 0x6FB1,0x9362, // - 0x6FB3,0xE053, // - 0x6FB9,0xE057, // - 0x6FC0,0x8C83, // - 0x6FC1,0x91F7, // - 0x6FC2,0xE051, // - 0x6FC3,0x945A, // - 0x6FC6,0xE058, // - 0x6FD4,0xE05D, // - 0x6FD8,0xE05E, // - 0x6FDB,0xE061, // - 0x6FDF,0xE05A, // - 0x6FE0,0x8D8A, // - 0x6FE1,0x9447, // - 0x6FE4,0x9FB7, // - 0x6FEB,0x9794, // - 0x6FEC,0xE05C, // - 0x6FEE,0xE060, // - 0x6FEF,0x91F3, // - 0x6FF1,0xE05F, // - 0x6FF3,0xE04A, // - 0x6FF6,0xE889, // - 0x6FFA,0xE064, // - 0x6FFE,0xE068, // - 0x7001,0xE066, // - 0x7009,0xE062, // - 0x700B,0xE063, // - 0x700F,0xE067, // - 0x7011,0xE065, // - 0x7015,0x956D, // - 0x7018,0xE06D, // - 0x701A,0xE06A, // - 0x701B,0xE069, // - 0x701D,0xE06C, // - 0x701E,0x93D2, // - 0x701F,0xE06E, // - 0x7026,0x9295, // - 0x7027,0x91EB, // - 0x702C,0x90A3, // - 0x7030,0xE06F, // - 0x7032,0xE071, // - 0x703E,0xE070, // - 0x704C,0x9FF3, // - 0x7051,0xE072, // - 0x7058,0x93E5, // - 0x7063,0xE073, // - 0x706B,0x89CE, // - 0x706F,0x9394, // - 0x7070,0x8A44, // - 0x7078,0x8B84, // - 0x707C,0x8EDC, // - 0x707D,0x8DD0, // - 0x7089,0x9846, // - 0x708A,0x9086, // - 0x708E,0x898A, // - 0x7092,0xE075, // - 0x7099,0xE074, // - 0x70AC,0xE078, // - 0x70AD,0x9259, // - 0x70AE,0xE07B, // - 0x70AF,0xE076, // - 0x70B3,0xE07A, // - 0x70B8,0xE079, // - 0x70B9,0x935F, // - 0x70BA,0x88D7, // - 0x70C8,0x97F3, // - 0x70CB,0xE07D, // - 0x70CF,0x8947, // - 0x70D9,0xE080, // - 0x70DD,0xE07E, // - 0x70DF,0xE07C, // - 0x70F1,0xE077, // - 0x70F9,0x9642, // - 0x70FD,0xE082, // - 0x7109,0xE081, // - 0x7114,0x898B, // - 0x7119,0xE084, // - 0x711A,0x95B0, // - 0x711C,0xE083, // - 0x7121,0x96B3, // - 0x7126,0x8FC5, // - 0x7136,0x9152, // - 0x713C,0x8FC4, // - 0x7149,0x97F9, // - 0x714C,0xE08A, // - 0x714E,0x90F7, // - 0x7155,0xE086, // - 0x7156,0xE08B, // - 0x7159,0x898C, // - 0x7162,0xE089, // - 0x7164,0x9481, // - 0x7165,0xE085, // - 0x7166,0xE088, // - 0x7167,0x8FC6, // - 0x7169,0x94CF, // - 0x716C,0xE08C, // - 0x716E,0x8ECF, // - 0x717D,0x90F8, // - 0x7184,0xE08F, // - 0x7188,0xE087, // - 0x718A,0x8C46, // - 0x718F,0xE08D, // - 0x7194,0x976F, // - 0x7195,0xE090, // - 0x7199,0xEAA4, // - 0x719F,0x8F6E, // - 0x71A8,0xE091, // - 0x71AC,0xE092, // - 0x71B1,0x944D, // - 0x71B9,0xE094, // - 0x71BE,0xE095, // - 0x71C3,0x9452, // - 0x71C8,0x9395, // - 0x71C9,0xE097, // - 0x71CE,0xE099, // - 0x71D0,0x97D3, // - 0x71D2,0xE096, // - 0x71D4,0xE098, // - 0x71D5,0x898D, // - 0x71D7,0xE093, // - 0x71DF,0x9A7A, // - 0x71E0,0xE09A, // - 0x71E5,0x9187, // - 0x71E6,0x8E57, // - 0x71E7,0xE09C, // - 0x71EC,0xE09B, // - 0x71ED,0x9043, // - 0x71EE,0x99D7, // - 0x71F5,0xE09D, // - 0x71F9,0xE09F, // - 0x71FB,0xE08E, // - 0x71FC,0xE09E, // - 0x71FF,0xE0A0, // - 0x7206,0x949A, // - 0x720D,0xE0A1, // - 0x7210,0xE0A2, // - 0x721B,0xE0A3, // - 0x7228,0xE0A4, // - 0x722A,0x92DC, // - 0x722C,0xE0A6, // - 0x722D,0xE0A5, // - 0x7230,0xE0A7, // - 0x7232,0xE0A8, // - 0x7235,0x8EDD, // - 0x7236,0x9583, // - 0x723A,0x96EA, // - 0x723B,0xE0A9, // - 0x723C,0xE0AA, // - 0x723D,0x9175, // - 0x723E,0x8EA2, // - 0x723F,0xE0AB, // - 0x7240,0xE0AC, // - 0x7246,0xE0AD, // - 0x7247,0x95D0, // - 0x7248,0x94C5, // - 0x724B,0xE0AE, // - 0x724C,0x9476, // - 0x7252,0x92AB, // - 0x7258,0xE0AF, // - 0x7259,0x89E5, // - 0x725B,0x8B8D, // - 0x725D,0x96C4, // - 0x725F,0x96B4, // - 0x7261,0x89B2, // - 0x7262,0x9853, // - 0x7267,0x9671, // - 0x7269,0x95A8, // - 0x7272,0x90B5, // - 0x7274,0xE0B0, // - 0x7279,0x93C1, // - 0x727D,0x8CA1, // - 0x727E,0xE0B1, // - 0x7280,0x8DD2, // - 0x7281,0xE0B3, // - 0x7282,0xE0B2, // - 0x7287,0xE0B4, // - 0x7292,0xE0B5, // - 0x7296,0xE0B6, // - 0x72A0,0x8B5D, // - 0x72A2,0xE0B7, // - 0x72A7,0xE0B8, // - 0x72AC,0x8CA2, // - 0x72AF,0x94C6, // - 0x72B2,0xE0BA, // - 0x72B6,0x8FF3, // - 0x72B9,0xE0B9, // - 0x72C2,0x8BB6, // - 0x72C3,0xE0BB, // - 0x72C4,0xE0BD, // - 0x72C6,0xE0BC, // - 0x72CE,0xE0BE, // - 0x72D0,0x8CCF, // - 0x72D2,0xE0BF, // - 0x72D7,0x8BE7, // - 0x72D9,0x915F, // - 0x72DB,0x8D9D, // - 0x72E0,0xE0C1, // - 0x72E1,0xE0C2, // - 0x72E2,0xE0C0, // - 0x72E9,0x8EEB, // - 0x72EC,0x93C6, // - 0x72ED,0x8BB7, // - 0x72F7,0xE0C4, // - 0x72F8,0x924B, // - 0x72F9,0xE0C3, // - 0x72FC,0x9854, // - 0x72FD,0x9482, // - 0x730A,0xE0C7, // - 0x7316,0xE0C9, // - 0x7317,0xE0C6, // - 0x731B,0x96D2, // - 0x731C,0xE0C8, // - 0x731D,0xE0CA, // - 0x731F,0x97C2, // - 0x7325,0xE0CE, // - 0x7329,0xE0CD, // - 0x732A,0x9296, // - 0x732B,0x944C, // - 0x732E,0x8CA3, // - 0x732F,0xE0CC, // - 0x7334,0xE0CB, // - 0x7336,0x9750, // - 0x7337,0x9751, // - 0x733E,0xE0CF, // - 0x733F,0x898E, // - 0x7344,0x8D96, // - 0x7345,0x8E82, // - 0x734E,0xE0D0, // - 0x734F,0xE0D1, // - 0x7357,0xE0D3, // - 0x7363,0x8F62, // - 0x7368,0xE0D5, // - 0x736A,0xE0D4, // - 0x7370,0xE0D6, // - 0x7372,0x8A6C, // - 0x7375,0xE0D8, // - 0x7378,0xE0D7, // - 0x737A,0xE0DA, // - 0x737B,0xE0D9, // - 0x7384,0x8CBA, // - 0x7387,0x97A6, // - 0x7389,0x8BCA, // - 0x738B,0x89A4, // - 0x7396,0x8BE8, // - 0x73A9,0x8ADF, // - 0x73B2,0x97E6, // - 0x73B3,0xE0DC, // - 0x73BB,0xE0DE, // - 0x73C0,0xE0DF, // - 0x73C2,0x89CF, // - 0x73C8,0xE0DB, // - 0x73CA,0x8E58, // - 0x73CD,0x92BF, // - 0x73CE,0xE0DD, // - 0x73DE,0xE0E2, // - 0x73E0,0x8EEC, // - 0x73E5,0xE0E0, // - 0x73EA,0x8C5D, // - 0x73ED,0x94C7, // - 0x73EE,0xE0E1, // - 0x73F1,0xE0FC, // - 0x73F8,0xE0E7, // - 0x73FE,0x8CBB, // - 0x7403,0x8B85, // - 0x7405,0xE0E4, // - 0x7406,0x979D, // - 0x7409,0x97AE, // - 0x7422,0x91F4, // - 0x7425,0xE0E6, // - 0x7432,0xE0E8, // - 0x7433,0x97D4, // - 0x7434,0x8BD5, // - 0x7435,0x94FA, // - 0x7436,0x9469, // - 0x743A,0xE0E9, // - 0x743F,0xE0EB, // - 0x7441,0xE0EE, // - 0x7455,0xE0EA, // - 0x7459,0xE0ED, // - 0x745A,0x8CE8, // - 0x745B,0x896C, // - 0x745C,0xE0EF, // - 0x745E,0x9090, // - 0x745F,0xE0EC, // - 0x7460,0x97DA, // - 0x7463,0xE0F2, // - 0x7464,0xEAA2, // - 0x7469,0xE0F0, // - 0x746A,0xE0F3, // - 0x746F,0xE0E5, // - 0x7470,0xE0F1, // - 0x7473,0x8DBA, // - 0x7476,0xE0F4, // - 0x747E,0xE0F5, // - 0x7483,0x979E, // - 0x748B,0xE0F6, // - 0x749E,0xE0F7, // - 0x74A2,0xE0E3, // - 0x74A7,0xE0F8, // - 0x74B0,0x8AC2, // - 0x74BD,0x8EA3, // - 0x74CA,0xE0F9, // - 0x74CF,0xE0FA, // - 0x74D4,0xE0FB, // - 0x74DC,0x895A, // - 0x74E0,0xE140, // - 0x74E2,0x955A, // - 0x74E3,0xE141, // - 0x74E6,0x8AA2, // - 0x74E7,0xE142, // - 0x74E9,0xE143, // - 0x74EE,0xE144, // - 0x74F0,0xE146, // - 0x74F1,0xE147, // - 0x74F2,0xE145, // - 0x74F6,0x9572, // - 0x74F7,0xE149, // - 0x74F8,0xE148, // - 0x7503,0xE14B, // - 0x7504,0xE14A, // - 0x7505,0xE14C, // - 0x750C,0xE14D, // - 0x750D,0xE14F, // - 0x750E,0xE14E, // - 0x7511,0x8D99, // - 0x7513,0xE151, // - 0x7515,0xE150, // - 0x7518,0x8AC3, // - 0x751A,0x9072, // - 0x751E,0xE152, // - 0x751F,0x90B6, // - 0x7523,0x8E59, // - 0x7525,0x8999, // - 0x7526,0xE153, // - 0x7528,0x9770, // - 0x752B,0x95E1, // - 0x752C,0xE154, // - 0x7530,0x9363, // - 0x7531,0x9752, // - 0x7532,0x8D62, // - 0x7533,0x905C, // - 0x7537,0x926A, // - 0x7538,0x99B2, // - 0x753A,0x92AC, // - 0x753B,0x89E6, // - 0x753C,0xE155, // - 0x7544,0xE156, // - 0x7549,0xE159, // - 0x754A,0xE158, // - 0x754B,0x9DC0, // - 0x754C,0x8A45, // - 0x754D,0xE157, // - 0x754F,0x88D8, // - 0x7551,0x94A8, // - 0x7554,0x94C8, // - 0x7559,0x97AF, // - 0x755A,0xE15C, // - 0x755B,0xE15A, // - 0x755C,0x927B, // - 0x755D,0x90A4, // - 0x7560,0x94A9, // - 0x7562,0x954C, // - 0x7564,0xE15E, // - 0x7565,0x97AA, // - 0x7566,0x8C6C, // - 0x7567,0xE15F, // - 0x7569,0xE15D, // - 0x756A,0x94D4, // - 0x756B,0xE160, // - 0x756D,0xE161, // - 0x7570,0x88D9, // - 0x7573,0x8FF4, // - 0x7574,0xE166, // - 0x7576,0xE163, // - 0x7577,0x93EB, // - 0x7578,0xE162, // - 0x757F,0x8B45, // - 0x7582,0xE169, // - 0x7586,0xE164, // - 0x7587,0xE165, // - 0x7589,0xE168, // - 0x758A,0xE167, // - 0x758B,0x9544, // - 0x758E,0x9161, // - 0x758F,0x9160, // - 0x7591,0x8B5E, // - 0x7594,0xE16A, // - 0x759A,0xE16B, // - 0x759D,0xE16C, // - 0x75A3,0xE16E, // - 0x75A5,0xE16D, // - 0x75AB,0x8975, // - 0x75B1,0xE176, // - 0x75B2,0x94E6, // - 0x75B3,0xE170, // - 0x75B5,0xE172, // - 0x75B8,0xE174, // - 0x75B9,0x905D, // - 0x75BC,0xE175, // - 0x75BD,0xE173, // - 0x75BE,0x8EBE, // - 0x75C2,0xE16F, // - 0x75C3,0xE171, // - 0x75C5,0x9561, // - 0x75C7,0x8FC7, // - 0x75CA,0xE178, // - 0x75CD,0xE177, // - 0x75D2,0xE179, // - 0x75D4,0x8EA4, // - 0x75D5,0x8DAD, // - 0x75D8,0x9397, // - 0x75D9,0xE17A, // - 0x75DB,0x92C9, // - 0x75DE,0xE17C, // - 0x75E2,0x979F, // - 0x75E3,0xE17B, // - 0x75E9,0x9189, // - 0x75F0,0xE182, // - 0x75F2,0xE184, // - 0x75F3,0xE185, // - 0x75F4,0x9273, // - 0x75FA,0xE183, // - 0x75FC,0xE180, // - 0x75FE,0xE17D, // - 0x75FF,0xE17E, // - 0x7601,0xE181, // - 0x7609,0xE188, // - 0x760B,0xE186, // - 0x760D,0xE187, // - 0x761F,0xE189, // - 0x7620,0xE18B, // - 0x7621,0xE18C, // - 0x7622,0xE18D, // - 0x7624,0xE18E, // - 0x7627,0xE18A, // - 0x7630,0xE190, // - 0x7634,0xE18F, // - 0x763B,0xE191, // - 0x7642,0x97C3, // - 0x7646,0xE194, // - 0x7647,0xE192, // - 0x7648,0xE193, // - 0x764C,0x8AE0, // - 0x7652,0x96FC, // - 0x7656,0x95C8, // - 0x7658,0xE196, // - 0x765C,0xE195, // - 0x7661,0xE197, // - 0x7662,0xE198, // - 0x7667,0xE19C, // - 0x7668,0xE199, // - 0x7669,0xE19A, // - 0x766A,0xE19B, // - 0x766C,0xE19D, // - 0x7670,0xE19E, // - 0x7672,0xE19F, // - 0x7676,0xE1A0, // - 0x7678,0xE1A1, // - 0x767A,0x94AD, // - 0x767B,0x936F, // - 0x767C,0xE1A2, // - 0x767D,0x9492, // - 0x767E,0x9553, // - 0x7680,0xE1A3, // - 0x7683,0xE1A4, // - 0x7684,0x9349, // - 0x7686,0x8A46, // - 0x7687,0x8D63, // - 0x7688,0xE1A5, // - 0x768B,0xE1A6, // - 0x768E,0xE1A7, // - 0x7690,0x8E48, // - 0x7693,0xE1A9, // - 0x7696,0xE1A8, // - 0x7699,0xE1AA, // - 0x769A,0xE1AB, // - 0x76AE,0x94E7, // - 0x76B0,0xE1AC, // - 0x76B4,0xE1AD, // - 0x76B7,0xEA89, // - 0x76B8,0xE1AE, // - 0x76B9,0xE1AF, // - 0x76BA,0xE1B0, // - 0x76BF,0x8E4D, // - 0x76C2,0xE1B1, // - 0x76C3,0x9475, // - 0x76C6,0x967E, // - 0x76C8,0x896D, // - 0x76CA,0x8976, // - 0x76CD,0xE1B2, // - 0x76D2,0xE1B4, // - 0x76D6,0xE1B3, // - 0x76D7,0x9390, // - 0x76DB,0x90B7, // - 0x76DC,0x9F58, // - 0x76DE,0xE1B5, // - 0x76DF,0x96BF, // - 0x76E1,0xE1B6, // - 0x76E3,0x8AC4, // - 0x76E4,0x94D5, // - 0x76E5,0xE1B7, // - 0x76E7,0xE1B8, // - 0x76EA,0xE1B9, // - 0x76EE,0x96DA, // - 0x76F2,0x96D3, // - 0x76F4,0x92BC, // - 0x76F8,0x918A, // - 0x76FB,0xE1BB, // - 0x76FE,0x8F82, // - 0x7701,0x8FC8, // - 0x7704,0xE1BE, // - 0x7707,0xE1BD, // - 0x7708,0xE1BC, // - 0x7709,0x94FB, // - 0x770B,0x8AC5, // - 0x770C,0x8CA7, // - 0x771B,0xE1C4, // - 0x771E,0xE1C1, // - 0x771F,0x905E, // - 0x7720,0x96B0, // - 0x7724,0xE1C0, // - 0x7725,0xE1C2, // - 0x7726,0xE1C3, // - 0x7729,0xE1BF, // - 0x7737,0xE1C5, // - 0x7738,0xE1C6, // - 0x773A,0x92AD, // - 0x773C,0x8AE1, // - 0x7740,0x9285, // - 0x7747,0xE1C7, // - 0x775A,0xE1C8, // - 0x775B,0xE1CB, // - 0x7761,0x9087, // - 0x7763,0x93C2, // - 0x7765,0xE1CC, // - 0x7766,0x9672, // - 0x7768,0xE1C9, // - 0x776B,0xE1CA, // - 0x7779,0xE1CF, // - 0x777E,0xE1CE, // - 0x777F,0xE1CD, // - 0x778B,0xE1D1, // - 0x778E,0xE1D0, // - 0x7791,0xE1D2, // - 0x779E,0xE1D4, // - 0x77A0,0xE1D3, // - 0x77A5,0x95CB, // - 0x77AC,0x8F75, // - 0x77AD,0x97C4, // - 0x77B0,0xE1D5, // - 0x77B3,0x93B5, // - 0x77B6,0xE1D6, // - 0x77B9,0xE1D7, // - 0x77BB,0xE1DB, // - 0x77BC,0xE1D9, // - 0x77BD,0xE1DA, // - 0x77BF,0xE1D8, // - 0x77C7,0xE1DC, // - 0x77CD,0xE1DD, // - 0x77D7,0xE1DE, // - 0x77DA,0xE1DF, // - 0x77DB,0x96B5, // - 0x77DC,0xE1E0, // - 0x77E2,0x96EE, // - 0x77E3,0xE1E1, // - 0x77E5,0x926D, // - 0x77E7,0x948A, // - 0x77E9,0x8BE9, // - 0x77ED,0x925A, // - 0x77EE,0xE1E2, // - 0x77EF,0x8BB8, // - 0x77F3,0x90CE, // - 0x77FC,0xE1E3, // - 0x7802,0x8DBB, // - 0x780C,0xE1E4, // - 0x7812,0xE1E5, // - 0x7814,0x8CA4, // - 0x7815,0x8DD3, // - 0x7820,0xE1E7, // - 0x7825,0x9375, // - 0x7826,0x8DD4, // - 0x7827,0x8B6D, // - 0x7832,0x9643, // - 0x7834,0x946A, // - 0x783A,0x9376, // - 0x783F,0x8D7B, // - 0x7845,0xE1E9, // - 0x785D,0x8FC9, // - 0x786B,0x97B0, // - 0x786C,0x8D64, // - 0x786F,0x8CA5, // - 0x7872,0x94A1, // - 0x7874,0xE1EB, // - 0x787C,0xE1ED, // - 0x7881,0x8CE9, // - 0x7886,0xE1EC, // - 0x7887,0x92F4, // - 0x788C,0xE1EF, // - 0x788D,0x8A56, // - 0x788E,0xE1EA, // - 0x7891,0x94E8, // - 0x7893,0x894F, // - 0x7895,0x8DEA, // - 0x7897,0x9871, // - 0x789A,0xE1EE, // - 0x78A3,0xE1F0, // - 0x78A7,0x95C9, // - 0x78A9,0x90D7, // - 0x78AA,0xE1F2, // - 0x78AF,0xE1F3, // - 0x78B5,0xE1F1, // - 0x78BA,0x8A6D, // - 0x78BC,0xE1F9, // - 0x78BE,0xE1F8, // - 0x78C1,0x8EA5, // - 0x78C5,0xE1FA, // - 0x78C6,0xE1F5, // - 0x78CA,0xE1FB, // - 0x78CB,0xE1F6, // - 0x78D0,0x94D6, // - 0x78D1,0xE1F4, // - 0x78D4,0xE1F7, // - 0x78DA,0xE241, // - 0x78E7,0xE240, // - 0x78E8,0x9681, // - 0x78EC,0xE1FC, // - 0x78EF,0x88E9, // - 0x78F4,0xE243, // - 0x78FD,0xE242, // - 0x7901,0x8FCA, // - 0x7907,0xE244, // - 0x790E,0x9162, // - 0x7911,0xE246, // - 0x7912,0xE245, // - 0x7919,0xE247, // - 0x7926,0xE1E6, // - 0x792A,0xE1E8, // - 0x792B,0xE249, // - 0x792C,0xE248, // - 0x793A,0x8EA6, // - 0x793C,0x97E7, // - 0x793E,0x8ED0, // - 0x7940,0xE24A, // - 0x7941,0x8C56, // - 0x7947,0x8B5F, // - 0x7948,0x8B46, // - 0x7949,0x8E83, // - 0x7950,0x9753, // - 0x7953,0xE250, // - 0x7955,0xE24F, // - 0x7956,0x9163, // - 0x7957,0xE24C, // - 0x795A,0xE24E, // - 0x795D,0x8F6A, // - 0x795E,0x905F, // - 0x795F,0xE24D, // - 0x7960,0xE24B, // - 0x7962,0x9449, // - 0x7965,0x8FCB, // - 0x796D,0x8DD5, // - 0x7977,0x9398, // - 0x797A,0xE251, // - 0x797F,0xE252, // - 0x7980,0xE268, // - 0x7981,0x8BD6, // - 0x7984,0x985C, // - 0x7985,0x9154, // - 0x798A,0xE253, // - 0x798D,0x89D0, // - 0x798E,0x92F5, // - 0x798F,0x959F, // - 0x799D,0xE254, // - 0x79A6,0x8B9A, // - 0x79A7,0xE255, // - 0x79AA,0xE257, // - 0x79AE,0xE258, // - 0x79B0,0x9448, // - 0x79B3,0xE259, // - 0x79B9,0xE25A, // - 0x79BD,0x8BD7, // - 0x79BE,0x89D1, // - 0x79BF,0x93C3, // - 0x79C0,0x8F47, // - 0x79C1,0x8E84, // - 0x79C9,0xE25C, // - 0x79CB,0x8F48, // - 0x79D1,0x89C8, // - 0x79D2,0x9562, // - 0x79D5,0xE25D, // - 0x79D8,0x94E9, // - 0x79DF,0x9164, // - 0x79E1,0xE260, // - 0x79E3,0xE261, // - 0x79E4,0x9489, // - 0x79E6,0x9060, // - 0x79E7,0xE25E, // - 0x79E9,0x9281, // - 0x79EC,0xE25F, // - 0x79F0,0x8FCC, // - 0x79FB,0x88DA, // - 0x7A00,0x8B48, // - 0x7A08,0xE262, // - 0x7A0B,0x92F6, // - 0x7A0D,0xE263, // - 0x7A0E,0x90C5, // - 0x7A14,0x96AB, // - 0x7A17,0x9542, // - 0x7A18,0xE264, // - 0x7A19,0xE265, // - 0x7A1A,0x9274, // - 0x7A1C,0x97C5, // - 0x7A1F,0xE267, // - 0x7A20,0xE266, // - 0x7A2E,0x8EED, // - 0x7A31,0xE269, // - 0x7A32,0x88EE, // - 0x7A37,0xE26C, // - 0x7A3B,0xE26A, // - 0x7A3C,0x89D2, // - 0x7A3D,0x8C6D, // - 0x7A3E,0xE26B, // - 0x7A3F,0x8D65, // - 0x7A40,0x8D92, // - 0x7A42,0x95E4, // - 0x7A43,0xE26D, // - 0x7A46,0x9673, // - 0x7A49,0xE26F, // - 0x7A4D,0x90CF, // - 0x7A4E,0x896E, // - 0x7A4F,0x89B8, // - 0x7A50,0x88AA, // - 0x7A57,0xE26E, // - 0x7A61,0xE270, // - 0x7A62,0xE271, // - 0x7A63,0x8FF5, // - 0x7A69,0xE272, // - 0x7A6B,0x8A6E, // - 0x7A70,0xE274, // - 0x7A74,0x8C8A, // - 0x7A76,0x8B86, // - 0x7A79,0xE275, // - 0x7A7A,0x8BF3, // - 0x7A7D,0xE276, // - 0x7A7F,0x90FA, // - 0x7A81,0x93CB, // - 0x7A83,0x90DE, // - 0x7A84,0x8DF3, // - 0x7A88,0xE277, // - 0x7A92,0x9282, // - 0x7A93,0x918B, // - 0x7A95,0xE279, // - 0x7A96,0xE27B, // - 0x7A97,0xE278, // - 0x7A98,0xE27A, // - 0x7A9F,0x8C41, // - 0x7AA9,0xE27C, // - 0x7AAA,0x8C45, // - 0x7AAE,0x8B87, // - 0x7AAF,0x9771, // - 0x7AB0,0xE27E, // - 0x7AB6,0xE280, // - 0x7ABA,0x894D, // - 0x7ABF,0xE283, // - 0x7AC3,0x8A96, // - 0x7AC4,0xE282, // - 0x7AC5,0xE281, // - 0x7AC7,0xE285, // - 0x7AC8,0xE27D, // - 0x7ACA,0xE286, // - 0x7ACB,0x97A7, // - 0x7ACD,0xE287, // - 0x7ACF,0xE288, // - 0x7AD2,0x9AF2, // - 0x7AD3,0xE28A, // - 0x7AD5,0xE289, // - 0x7AD9,0xE28B, // - 0x7ADA,0xE28C, // - 0x7ADC,0x97B3, // - 0x7ADD,0xE28D, // - 0x7ADF,0xE8ED, // - 0x7AE0,0x8FCD, // - 0x7AE1,0xE28E, // - 0x7AE2,0xE28F, // - 0x7AE3,0x8F76, // - 0x7AE5,0x93B6, // - 0x7AE6,0xE290, // - 0x7AEA,0x9247, // - 0x7AED,0xE291, // - 0x7AF0,0xE292, // - 0x7AF6,0x8BA3, // - 0x7AF8,0x995E, // - 0x7AF9,0x927C, // - 0x7AFA,0x8EB1, // - 0x7AFF,0x8AC6, // - 0x7B02,0xE293, // - 0x7B04,0xE2A0, // - 0x7B06,0xE296, // - 0x7B08,0x8B88, // - 0x7B0A,0xE295, // - 0x7B0B,0xE2A2, // - 0x7B0F,0xE294, // - 0x7B11,0x8FCE, // - 0x7B18,0xE298, // - 0x7B19,0xE299, // - 0x7B1B,0x934A, // - 0x7B1E,0xE29A, // - 0x7B20,0x8A7D, // - 0x7B25,0x9079, // - 0x7B26,0x9584, // - 0x7B28,0xE29C, // - 0x7B2C,0x91E6, // - 0x7B33,0xE297, // - 0x7B35,0xE29B, // - 0x7B36,0xE29D, // - 0x7B39,0x8DF9, // - 0x7B45,0xE2A4, // - 0x7B46,0x954D, // - 0x7B48,0x94A4, // - 0x7B49,0x9399, // - 0x7B4B,0x8BD8, // - 0x7B4C,0xE2A3, // - 0x7B4D,0xE2A1, // - 0x7B4F,0x94B3, // - 0x7B50,0xE29E, // - 0x7B51,0x927D, // - 0x7B52,0x939B, // - 0x7B54,0x939A, // - 0x7B56,0x8DF4, // - 0x7B5D,0xE2B6, // - 0x7B65,0xE2A6, // - 0x7B67,0xE2A8, // - 0x7B6C,0xE2AB, // - 0x7B6E,0xE2AC, // - 0x7B70,0xE2A9, // - 0x7B71,0xE2AA, // - 0x7B74,0xE2A7, // - 0x7B75,0xE2A5, // - 0x7B7A,0xE29F, // - 0x7B86,0x95CD, // - 0x7B87,0x89D3, // - 0x7B8B,0xE2B3, // - 0x7B8D,0xE2B0, // - 0x7B8F,0xE2B5, // - 0x7B92,0xE2B4, // - 0x7B94,0x9493, // - 0x7B95,0x96A5, // - 0x7B97,0x8E5A, // - 0x7B98,0xE2AE, // - 0x7B99,0xE2B7, // - 0x7B9A,0xE2B2, // - 0x7B9C,0xE2B1, // - 0x7B9D,0xE2AD, // - 0x7B9F,0xE2AF, // - 0x7BA1,0x8AC7, // - 0x7BAA,0x925C, // - 0x7BAD,0x90FB, // - 0x7BB1,0x94A0, // - 0x7BB4,0xE2BC, // - 0x7BB8,0x94A2, // - 0x7BC0,0x90DF, // - 0x7BC1,0xE2B9, // - 0x7BC4,0x94CD, // - 0x7BC6,0xE2BD, // - 0x7BC7,0x95D1, // - 0x7BC9,0x927A, // - 0x7BCB,0xE2B8, // - 0x7BCC,0xE2BA, // - 0x7BCF,0xE2BB, // - 0x7BDD,0xE2BE, // - 0x7BE0,0x8EC2, // - 0x7BE4,0x93C4, // - 0x7BE5,0xE2C3, // - 0x7BE6,0xE2C2, // - 0x7BE9,0xE2BF, // - 0x7BED,0x9855, // - 0x7BF3,0xE2C8, // - 0x7BF6,0xE2CC, // - 0x7BF7,0xE2C9, // - 0x7C00,0xE2C5, // - 0x7C07,0xE2C6, // - 0x7C0D,0xE2CB, // - 0x7C11,0xE2C0, // - 0x7C12,0x99D3, // - 0x7C13,0xE2C7, // - 0x7C14,0xE2C1, // - 0x7C17,0xE2CA, // - 0x7C1F,0xE2D0, // - 0x7C21,0x8AC8, // - 0x7C23,0xE2CD, // - 0x7C27,0xE2CE, // - 0x7C2A,0xE2CF, // - 0x7C2B,0xE2D2, // - 0x7C37,0xE2D1, // - 0x7C38,0x94F4, // - 0x7C3D,0xE2D3, // - 0x7C3E,0x97FA, // - 0x7C3F,0x95EB, // - 0x7C40,0xE2D8, // - 0x7C43,0xE2D5, // - 0x7C4C,0xE2D4, // - 0x7C4D,0x90D0, // - 0x7C4F,0xE2D7, // - 0x7C50,0xE2D9, // - 0x7C54,0xE2D6, // - 0x7C56,0xE2DD, // - 0x7C58,0xE2DA, // - 0x7C5F,0xE2DB, // - 0x7C60,0xE2C4, // - 0x7C64,0xE2DC, // - 0x7C65,0xE2DE, // - 0x7C6C,0xE2DF, // - 0x7C73,0x95C4, // - 0x7C75,0xE2E0, // - 0x7C7E,0x96E0, // - 0x7C81,0x8BCC, // - 0x7C82,0x8C48, // - 0x7C83,0xE2E1, // - 0x7C89,0x95B2, // - 0x7C8B,0x9088, // - 0x7C8D,0x96AE, // - 0x7C90,0xE2E2, // - 0x7C92,0x97B1, // - 0x7C95,0x9494, // - 0x7C97,0x9165, // - 0x7C98,0x9453, // - 0x7C9B,0x8F6C, // - 0x7C9F,0x88BE, // - 0x7CA1,0xE2E7, // - 0x7CA2,0xE2E5, // - 0x7CA4,0xE2E3, // - 0x7CA5,0x8A9F, // - 0x7CA7,0x8FCF, // - 0x7CA8,0xE2E8, // - 0x7CAB,0xE2E6, // - 0x7CAD,0xE2E4, // - 0x7CAE,0xE2EC, // - 0x7CB1,0xE2EB, // - 0x7CB2,0xE2EA, // - 0x7CB3,0xE2E9, // - 0x7CB9,0xE2ED, // - 0x7CBD,0xE2EE, // - 0x7CBE,0x90B8, // - 0x7CC0,0xE2EF, // - 0x7CC2,0xE2F1, // - 0x7CC5,0xE2F0, // - 0x7CCA,0x8CD0, // - 0x7CCE,0x9157, // - 0x7CD2,0xE2F3, // - 0x7CD6,0x939C, // - 0x7CD8,0xE2F2, // - 0x7CDC,0xE2F4, // - 0x7CDE,0x95B3, // - 0x7CDF,0x918C, // - 0x7CE0,0x8D66, // - 0x7CE2,0xE2F5, // - 0x7CE7,0x97C6, // - 0x7CEF,0xE2F7, // - 0x7CF2,0xE2F8, // - 0x7CF4,0xE2F9, // - 0x7CF6,0xE2FA, // - 0x7CF8,0x8E85, // - 0x7CFA,0xE2FB, // - 0x7CFB,0x8C6E, // - 0x7CFE,0x8B8A, // - 0x7D00,0x8B49, // - 0x7D02,0xE340, // - 0x7D04,0x96F1, // - 0x7D05,0x8D67, // - 0x7D06,0xE2FC, // - 0x7D0A,0xE343, // - 0x7D0B,0x96E4, // - 0x7D10,0x9552, // - 0x7D14,0x8F83, // - 0x7D15,0xE342, // - 0x7D17,0x8ED1, // - 0x7D18,0x8D68, // - 0x7D19,0x8E86, // - 0x7D1A,0x8B89, // - 0x7D1B,0x95B4, // - 0x7D1C,0xE341, // - 0x7D20,0x9166, // - 0x7D21,0x9661, // - 0x7D22,0x8DF5, // - 0x7D2B,0x8E87, // - 0x7D2C,0x92DB, // - 0x7D2E,0xE346, // - 0x7D2F,0x97DD, // - 0x7D30,0x8DD7, // - 0x7D32,0xE347, // - 0x7D33,0x9061, // - 0x7D35,0xE349, // - 0x7D39,0x8FD0, // - 0x7D3A,0x8DAE, // - 0x7D3F,0xE348, // - 0x7D42,0x8F49, // - 0x7D43,0x8CBC, // - 0x7D44,0x9167, // - 0x7D45,0xE344, // - 0x7D46,0xE34A, // - 0x7D4B,0xE345, // - 0x7D4C,0x8C6F, // - 0x7D4E,0xE34D, // - 0x7D4F,0xE351, // - 0x7D50,0x8C8B, // - 0x7D56,0xE34C, // - 0x7D5B,0xE355, // - 0x7D5E,0x8D69, // - 0x7D61,0x978D, // - 0x7D62,0x88BA, // - 0x7D63,0xE352, // - 0x7D66,0x8B8B, // - 0x7D68,0xE34F, // - 0x7D6E,0xE350, // - 0x7D71,0x939D, // - 0x7D72,0xE34E, // - 0x7D73,0xE34B, // - 0x7D75,0x8A47, // - 0x7D76,0x90E2, // - 0x7D79,0x8CA6, // - 0x7D7D,0xE357, // - 0x7D89,0xE354, // - 0x7D8F,0xE356, // - 0x7D93,0xE353, // - 0x7D99,0x8C70, // - 0x7D9A,0x91B1, // - 0x7D9B,0xE358, // - 0x7D9C,0x918E, // - 0x7D9F,0xE365, // - 0x7DA2,0xE361, // - 0x7DAB,0xE35F, // - 0x7DAC,0x8EF8, // - 0x7DAD,0x88DB, // - 0x7DAE,0xE35A, // - 0x7DAF,0xE362, // - 0x7DB0,0xE366, // - 0x7DB1,0x8D6A, // - 0x7DB2,0x96D4, // - 0x7DB4,0x92D4, // - 0x7DB5,0xE35C, // - 0x7DB8,0xE364, // - 0x7DBA,0xE359, // - 0x7DBB,0x925D, // - 0x7DBD,0xE35E, // - 0x7DBE,0x88BB, // - 0x7DBF,0x96C8, // - 0x7DC7,0xE35D, // - 0x7DCA,0x8BD9, // - 0x7DCB,0x94EA, // - 0x7DCF,0x918D, // - 0x7DD1,0x97CE, // - 0x7DD2,0x8F8F, // - 0x7DD5,0xE38E, // - 0x7DD8,0xE367, // - 0x7DDA,0x90FC, // - 0x7DDC,0xE363, // - 0x7DDD,0xE368, // - 0x7DDE,0xE36A, // - 0x7DE0,0x92F7, // - 0x7DE1,0xE36D, // - 0x7DE4,0xE369, // - 0x7DE8,0x95D2, // - 0x7DE9,0x8AC9, // - 0x7DEC,0x96C9, // - 0x7DEF,0x88DC, // - 0x7DF2,0xE36C, // - 0x7DF4,0x97FB, // - 0x7DFB,0xE36B, // - 0x7E01,0x898F, // - 0x7E04,0x93EA, // - 0x7E05,0xE36E, // - 0x7E09,0xE375, // - 0x7E0A,0xE36F, // - 0x7E0B,0xE376, // - 0x7E12,0xE372, // - 0x7E1B,0x949B, // - 0x7E1E,0x8EC8, // - 0x7E1F,0xE374, // - 0x7E21,0xE371, // - 0x7E22,0xE377, // - 0x7E23,0xE370, // - 0x7E26,0x8F63, // - 0x7E2B,0x9644, // - 0x7E2E,0x8F6B, // - 0x7E31,0xE373, // - 0x7E32,0xE380, // - 0x7E35,0xE37B, // - 0x7E37,0xE37E, // - 0x7E39,0xE37C, // - 0x7E3A,0xE381, // - 0x7E3B,0xE37A, // - 0x7E3D,0xE360, // - 0x7E3E,0x90D1, // - 0x7E41,0x94C9, // - 0x7E43,0xE37D, // - 0x7E46,0xE378, // - 0x7E4A,0x9140, // - 0x7E4B,0x8C71, // - 0x7E4D,0x8F4A, // - 0x7E54,0x9044, // - 0x7E55,0x9155, // - 0x7E56,0xE384, // - 0x7E59,0xE386, // - 0x7E5A,0xE387, // - 0x7E5D,0xE383, // - 0x7E5E,0xE385, // - 0x7E66,0xE379, // - 0x7E67,0xE382, // - 0x7E69,0xE38A, // - 0x7E6A,0xE389, // - 0x7E6D,0x969A, // - 0x7E70,0x8C4A, // - 0x7E79,0xE388, // - 0x7E7B,0xE38C, // - 0x7E7C,0xE38B, // - 0x7E7D,0xE38F, // - 0x7E7F,0xE391, // - 0x7E83,0xE38D, // - 0x7E88,0xE392, // - 0x7E89,0xE393, // - 0x7E8C,0xE394, // - 0x7E8E,0xE39A, // - 0x7E8F,0x935A, // - 0x7E90,0xE396, // - 0x7E92,0xE395, // - 0x7E93,0xE397, // - 0x7E94,0xE398, // - 0x7E96,0xE399, // - 0x7E9B,0xE39B, // - 0x7E9C,0xE39C, // - 0x7F36,0x8ACA, // - 0x7F38,0xE39D, // - 0x7F3A,0xE39E, // - 0x7F45,0xE39F, // - 0x7F4C,0xE3A0, // - 0x7F4D,0xE3A1, // - 0x7F4E,0xE3A2, // - 0x7F50,0xE3A3, // - 0x7F51,0xE3A4, // - 0x7F54,0xE3A6, // - 0x7F55,0xE3A5, // - 0x7F58,0xE3A7, // - 0x7F5F,0xE3A8, // - 0x7F60,0xE3A9, // - 0x7F67,0xE3AC, // - 0x7F68,0xE3AA, // - 0x7F69,0xE3AB, // - 0x7F6A,0x8DDF, // - 0x7F6B,0x8C72, // - 0x7F6E,0x9275, // - 0x7F70,0x94B1, // - 0x7F72,0x8F90, // - 0x7F75,0x946C, // - 0x7F77,0x94EB, // - 0x7F78,0xE3AD, // - 0x7F79,0x9CEB, // - 0x7F82,0xE3AE, // - 0x7F83,0xE3B0, // - 0x7F85,0x9785, // - 0x7F86,0xE3AF, // - 0x7F87,0xE3B2, // - 0x7F88,0xE3B1, // - 0x7F8A,0x9772, // - 0x7F8C,0xE3B3, // - 0x7F8E,0x94FC, // - 0x7F94,0xE3B4, // - 0x7F9A,0xE3B7, // - 0x7F9D,0xE3B6, // - 0x7F9E,0xE3B5, // - 0x7FA3,0xE3B8, // - 0x7FA4,0x8C51, // - 0x7FA8,0x9141, // - 0x7FA9,0x8B60, // - 0x7FAE,0xE3BC, // - 0x7FAF,0xE3B9, // - 0x7FB2,0xE3BA, // - 0x7FB6,0xE3BD, // - 0x7FB8,0xE3BE, // - 0x7FB9,0xE3BB, // - 0x7FBD,0x8948, // - 0x7FC1,0x89A5, // - 0x7FC5,0xE3C0, // - 0x7FC6,0xE3C1, // - 0x7FCA,0xE3C2, // - 0x7FCC,0x9782, // - 0x7FD2,0x8F4B, // - 0x7FD4,0xE3C4, // - 0x7FD5,0xE3C3, // - 0x7FE0,0x9089, // - 0x7FE1,0xE3C5, // - 0x7FE6,0xE3C6, // - 0x7FE9,0xE3C7, // - 0x7FEB,0x8AE3, // - 0x7FF0,0x8ACB, // - 0x7FF3,0xE3C8, // - 0x7FF9,0xE3C9, // - 0x7FFB,0x967C, // - 0x7FFC,0x9783, // - 0x8000,0x9773, // - 0x8001,0x9856, // - 0x8003,0x8D6C, // - 0x8004,0xE3CC, // - 0x8005,0x8ED2, // - 0x8006,0xE3CB, // - 0x800B,0xE3CD, // - 0x800C,0x8EA7, // - 0x8010,0x91CF, // - 0x8012,0xE3CE, // - 0x8015,0x8D6B, // - 0x8017,0x96D5, // - 0x8018,0xE3CF, // - 0x8019,0xE3D0, // - 0x801C,0xE3D1, // - 0x8021,0xE3D2, // - 0x8028,0xE3D3, // - 0x8033,0x8EA8, // - 0x8036,0x96EB, // - 0x803B,0xE3D5, // - 0x803D,0x925E, // - 0x803F,0xE3D4, // - 0x8046,0xE3D7, // - 0x804A,0xE3D6, // - 0x8052,0xE3D8, // - 0x8056,0x90B9, // - 0x8058,0xE3D9, // - 0x805A,0xE3DA, // - 0x805E,0x95B7, // - 0x805F,0xE3DB, // - 0x8061,0x918F, // - 0x8062,0xE3DC, // - 0x8068,0xE3DD, // - 0x806F,0x97FC, // - 0x8070,0xE3E0, // - 0x8072,0xE3DF, // - 0x8073,0xE3DE, // - 0x8074,0x92AE, // - 0x8076,0xE3E1, // - 0x8077,0x9045, // - 0x8079,0xE3E2, // - 0x807D,0xE3E3, // - 0x807E,0x9857, // - 0x807F,0xE3E4, // - 0x8084,0xE3E5, // - 0x8085,0xE3E7, // - 0x8086,0xE3E6, // - 0x8087,0x94A3, // - 0x8089,0x93F7, // - 0x808B,0x985D, // - 0x808C,0x94A7, // - 0x8093,0xE3E9, // - 0x8096,0x8FD1, // - 0x8098,0x9549, // - 0x809A,0xE3EA, // - 0x809B,0xE3E8, // - 0x809D,0x8ACC, // - 0x80A1,0x8CD2, // - 0x80A2,0x8E88, // - 0x80A5,0x94EC, // - 0x80A9,0x8CA8, // - 0x80AA,0x9662, // - 0x80AC,0xE3ED, // - 0x80AD,0xE3EB, // - 0x80AF,0x8D6D, // - 0x80B1,0x8D6E, // - 0x80B2,0x88E7, // - 0x80B4,0x8DE6, // - 0x80BA,0x9478, // - 0x80C3,0x88DD, // - 0x80C4,0xE3F2, // - 0x80C6,0x925F, // - 0x80CC,0x9477, // - 0x80CE,0x91D9, // - 0x80D6,0xE3F4, // - 0x80D9,0xE3F0, // - 0x80DA,0xE3F3, // - 0x80DB,0xE3EE, // - 0x80DD,0xE3F1, // - 0x80DE,0x9645, // - 0x80E1,0x8CD3, // - 0x80E4,0x88FB, // - 0x80E5,0xE3EF, // - 0x80EF,0xE3F6, // - 0x80F1,0xE3F7, // - 0x80F4,0x93B7, // - 0x80F8,0x8BB9, // - 0x80FC,0xE445, // - 0x80FD,0x945C, // - 0x8102,0x8E89, // - 0x8105,0x8BBA, // - 0x8106,0x90C6, // - 0x8107,0x9865, // - 0x8108,0x96AC, // - 0x8109,0xE3F5, // - 0x810A,0x90D2, // - 0x811A,0x8B72, // - 0x811B,0xE3F8, // - 0x8123,0xE3FA, // - 0x8129,0xE3F9, // - 0x812F,0xE3FB, // - 0x8131,0x9245, // - 0x8133,0x945D, // - 0x8139,0x92AF, // - 0x813E,0xE442, // - 0x8146,0xE441, // - 0x814B,0xE3FC, // - 0x814E,0x9074, // - 0x8150,0x9585, // - 0x8151,0xE444, // - 0x8153,0xE443, // - 0x8154,0x8D6F, // - 0x8155,0x9872, // - 0x815F,0xE454, // - 0x8165,0xE448, // - 0x8166,0xE449, // - 0x816B,0x8EEE, // - 0x816E,0xE447, // - 0x8170,0x8D98, // - 0x8171,0xE446, // - 0x8174,0xE44A, // - 0x8178,0x92B0, // - 0x8179,0x95A0, // - 0x817A,0x9142, // - 0x817F,0x91DA, // - 0x8180,0xE44E, // - 0x8182,0xE44F, // - 0x8183,0xE44B, // - 0x8188,0xE44C, // - 0x818A,0xE44D, // - 0x818F,0x8D70, // - 0x8193,0xE455, // - 0x8195,0xE451, // - 0x819A,0x9586, // - 0x819C,0x968C, // - 0x819D,0x9547, // - 0x81A0,0xE450, // - 0x81A3,0xE453, // - 0x81A4,0xE452, // - 0x81A8,0x9663, // - 0x81A9,0xE456, // - 0x81B0,0xE457, // - 0x81B3,0x9156, // - 0x81B5,0xE458, // - 0x81B8,0xE45A, // - 0x81BA,0xE45E, // - 0x81BE,0xE459, // - 0x81BF,0x945E, // - 0x81C0,0xE45C, // - 0x81C2,0xE45D, // - 0x81C6,0x89B0, // - 0x81C8,0xE464, // - 0x81C9,0xE45F, // - 0x81CD,0xE460, // - 0x81D1,0xE461, // - 0x81D3,0x919F, // - 0x81D8,0xE463, // - 0x81D9,0xE462, // - 0x81DA,0xE465, // - 0x81DF,0xE466, // - 0x81E0,0xE467, // - 0x81E3,0x9062, // - 0x81E5,0x89E7, // - 0x81E7,0xE468, // - 0x81E8,0x97D5, // - 0x81EA,0x8EA9, // - 0x81ED,0x8F4C, // - 0x81F3,0x8E8A, // - 0x81F4,0x9276, // - 0x81FA,0xE469, // - 0x81FB,0xE46A, // - 0x81FC,0x8950, // - 0x81FE,0xE46B, // - 0x8201,0xE46C, // - 0x8202,0xE46D, // - 0x8205,0xE46E, // - 0x8207,0xE46F, // - 0x8208,0x8BBB, // - 0x8209,0x9DA8, // - 0x820A,0xE470, // - 0x820C,0x90E3, // - 0x820D,0xE471, // - 0x820E,0x8EC9, // - 0x8210,0xE472, // - 0x8212,0x98AE, // - 0x8216,0xE473, // - 0x8217,0x95DC, // - 0x8218,0x8ADA, // - 0x821B,0x9143, // - 0x821C,0x8F77, // - 0x821E,0x9591, // - 0x821F,0x8F4D, // - 0x8229,0xE474, // - 0x822A,0x8D71, // - 0x822B,0xE475, // - 0x822C,0x94CA, // - 0x822E,0xE484, // - 0x8233,0xE477, // - 0x8235,0x91C7, // - 0x8236,0x9495, // - 0x8237,0x8CBD, // - 0x8238,0xE476, // - 0x8239,0x9144, // - 0x8240,0xE478, // - 0x8247,0x92F8, // - 0x8258,0xE47A, // - 0x8259,0xE479, // - 0x825A,0xE47C, // - 0x825D,0xE47B, // - 0x825F,0xE47D, // - 0x8262,0xE480, // - 0x8264,0xE47E, // - 0x8266,0x8ACD, // - 0x8268,0xE481, // - 0x826A,0xE482, // - 0x826B,0xE483, // - 0x826E,0x8DAF, // - 0x826F,0x97C7, // - 0x8271,0xE485, // - 0x8272,0x9046, // - 0x8276,0x8990, // - 0x8277,0xE486, // - 0x8278,0xE487, // - 0x827E,0xE488, // - 0x828B,0x88F0, // - 0x828D,0xE489, // - 0x8292,0xE48A, // - 0x8299,0x9587, // - 0x829D,0x8EC5, // - 0x829F,0xE48C, // - 0x82A5,0x8A48, // - 0x82A6,0x88B0, // - 0x82AB,0xE48B, // - 0x82AC,0xE48E, // - 0x82AD,0x946D, // - 0x82AF,0x9063, // - 0x82B1,0x89D4, // - 0x82B3,0x9646, // - 0x82B8,0x8C7C, // - 0x82B9,0x8BDA, // - 0x82BB,0xE48D, // - 0x82BD,0x89E8, // - 0x82C5,0x8AA1, // - 0x82D1,0x8991, // - 0x82D2,0xE492, // - 0x82D3,0x97E8, // - 0x82D4,0x91DB, // - 0x82D7,0x9563, // - 0x82D9,0xE49E, // - 0x82DB,0x89D5, // - 0x82DC,0xE49C, // - 0x82DE,0xE49A, // - 0x82DF,0xE491, // - 0x82E1,0xE48F, // - 0x82E3,0xE490, // - 0x82E5,0x8EE1, // - 0x82E6,0x8BEA, // - 0x82E7,0x9297, // - 0x82EB,0x93CF, // - 0x82F1,0x8970, // - 0x82F3,0xE494, // - 0x82F4,0xE493, // - 0x82F9,0xE499, // - 0x82FA,0xE495, // - 0x82FB,0xE498, // - 0x8302,0x96CE, // - 0x8303,0xE497, // - 0x8304,0x89D6, // - 0x8305,0x8A9D, // - 0x8306,0xE49B, // - 0x8309,0xE49D, // - 0x830E,0x8C73, // - 0x8316,0xE4A1, // - 0x8317,0xE4AA, // - 0x8318,0xE4AB, // - 0x831C,0x88A9, // - 0x8323,0xE4B2, // - 0x8328,0x88EF, // - 0x832B,0xE4A9, // - 0x832F,0xE4A8, // - 0x8331,0xE4A3, // - 0x8332,0xE4A2, // - 0x8334,0xE4A0, // - 0x8335,0xE49F, // - 0x8336,0x9283, // - 0x8338,0x91F9, // - 0x8339,0xE4A5, // - 0x8340,0xE4A4, // - 0x8345,0xE4A7, // - 0x8349,0x9190, // - 0x834A,0x8C74, // - 0x834F,0x8960, // - 0x8350,0xE4A6, // - 0x8352,0x8D72, // - 0x8358,0x9191, // - 0x8373,0xE4B8, // - 0x8375,0xE4B9, // - 0x8377,0x89D7, // - 0x837B,0x89AC, // - 0x837C,0xE4B6, // - 0x8385,0xE4AC, // - 0x8387,0xE4B4, // - 0x8389,0xE4BB, // - 0x838A,0xE4B5, // - 0x838E,0xE4B3, // - 0x8393,0xE496, // - 0x8396,0xE4B1, // - 0x839A,0xE4AD, // - 0x839E,0x8ACE, // - 0x839F,0xE4AF, // - 0x83A0,0xE4BA, // - 0x83A2,0xE4B0, // - 0x83A8,0xE4BC, // - 0x83AA,0xE4AE, // - 0x83AB,0x949C, // - 0x83B1,0x9789, // - 0x83B5,0xE4B7, // - 0x83BD,0xE4CD, // - 0x83C1,0xE4C5, // - 0x83C5,0x909B, // - 0x83CA,0x8B65, // - 0x83CC,0x8BDB, // - 0x83CE,0xE4C0, // - 0x83D3,0x89D9, // - 0x83D6,0x8FD2, // - 0x83D8,0xE4C3, // - 0x83DC,0x8DD8, // - 0x83DF,0x9370, // - 0x83E0,0xE4C8, // - 0x83E9,0x95EC, // - 0x83EB,0xE4BF, // - 0x83EF,0x89D8, // - 0x83F0,0x8CD4, // - 0x83F1,0x9548, // - 0x83F2,0xE4C9, // - 0x83F4,0xE4BD, // - 0x83F7,0xE4C6, // - 0x83FB,0xE4D0, // - 0x83FD,0xE4C1, // - 0x8403,0xE4C2, // - 0x8404,0x93B8, // - 0x8407,0xE4C7, // - 0x840B,0xE4C4, // - 0x840C,0x9647, // - 0x840D,0xE4CA, // - 0x840E,0x88DE, // - 0x8413,0xE4BE, // - 0x8420,0xE4CC, // - 0x8422,0xE4CB, // - 0x8429,0x948B, // - 0x842A,0xE4D2, // - 0x842C,0xE4DD, // - 0x8431,0x8A9E, // - 0x8435,0xE4E0, // - 0x8438,0xE4CE, // - 0x843C,0xE4D3, // - 0x843D,0x978E, // - 0x8446,0xE4DC, // - 0x8449,0x9774, // - 0x844E,0x97A8, // - 0x8457,0x9298, // - 0x845B,0x8A8B, // - 0x8461,0x9592, // - 0x8462,0xE4E2, // - 0x8463,0x939F, // - 0x8466,0x88AF, // - 0x8469,0xE4DB, // - 0x846B,0xE4D7, // - 0x846C,0x9192, // - 0x846D,0xE4D1, // - 0x846E,0xE4D9, // - 0x846F,0xE4DE, // - 0x8471,0x944B, // - 0x8475,0x88A8, // - 0x8477,0xE4D6, // - 0x8479,0xE4DF, // - 0x847A,0x9598, // - 0x8482,0xE4DA, // - 0x8484,0xE4D5, // - 0x848B,0x8FD3, // - 0x8490,0x8F4E, // - 0x8494,0x8EAA, // - 0x8499,0x96D6, // - 0x849C,0x9566, // - 0x849F,0xE4E5, // - 0x84A1,0xE4EE, // - 0x84AD,0xE4D8, // - 0x84B2,0x8A97, // - 0x84B8,0x8FF6, // - 0x84B9,0xE4E3, // - 0x84BB,0xE4E8, // - 0x84BC,0x9193, // - 0x84BF,0xE4E4, // - 0x84C1,0xE4EB, // - 0x84C4,0x927E, // - 0x84C6,0xE4EC, // - 0x84C9,0x9775, // - 0x84CA,0xE4E1, // - 0x84CB,0x8A57, // - 0x84CD,0xE4E7, // - 0x84D0,0xE4EA, // - 0x84D1,0x96AA, // - 0x84D6,0xE4ED, // - 0x84D9,0xE4E6, // - 0x84DA,0xE4E9, // - 0x84EC,0x9648, // - 0x84EE,0x9840, // - 0x84F4,0xE4F1, // - 0x84FC,0xE4F8, // - 0x84FF,0xE4F0, // - 0x8500,0x8EC1, // - 0x8506,0xE4CF, // - 0x8511,0x95CC, // - 0x8513,0x96A0, // - 0x8514,0xE4F7, // - 0x8515,0xE4F6, // - 0x8517,0xE4F2, // - 0x8518,0xE4F3, // - 0x851A,0x8955, // - 0x851F,0xE4F5, // - 0x8521,0xE4EF, // - 0x8526,0x92D3, // - 0x852C,0xE4F4, // - 0x852D,0x88FC, // - 0x8535,0x91A0, // - 0x853D,0x95C1, // - 0x8540,0xE4F9, // - 0x8541,0xE540, // - 0x8543,0x94D7, // - 0x8548,0xE4FC, // - 0x8549,0x8FD4, // - 0x854A,0x8EC7, // - 0x854B,0xE542, // - 0x854E,0x8BBC, // - 0x8555,0xE543, // - 0x8557,0x9599, // - 0x8558,0xE4FB, // - 0x855A,0xE4D4, // - 0x8563,0xE4FA, // - 0x8568,0x986E, // - 0x8569,0x93A0, // - 0x856A,0x9593, // - 0x856D,0xE54A, // - 0x8577,0xE550, // - 0x857E,0xE551, // - 0x8580,0xE544, // - 0x8584,0x9496, // - 0x8587,0xE54E, // - 0x8588,0xE546, // - 0x858A,0xE548, // - 0x8590,0xE552, // - 0x8591,0xE547, // - 0x8594,0xE54B, // - 0x8597,0x8992, // - 0x8599,0x93E3, // - 0x859B,0xE54C, // - 0x859C,0xE54F, // - 0x85A4,0xE545, // - 0x85A6,0x9145, // - 0x85A8,0xE549, // - 0x85A9,0x8E46, // - 0x85AA,0x9064, // - 0x85AB,0x8C4F, // - 0x85AC,0x96F2, // - 0x85AE,0x96F7, // - 0x85AF,0x8F92, // - 0x85B9,0xE556, // - 0x85BA,0xE554, // - 0x85C1,0x986D, // - 0x85C9,0xE553, // - 0x85CD,0x9795, // - 0x85CF,0xE555, // - 0x85D0,0xE557, // - 0x85D5,0xE558, // - 0x85DD,0xE559, // - 0x85E4,0x93A1, // - 0x85E5,0xE55A, // - 0x85E9,0x94CB, // - 0x85EA,0xE54D, // - 0x85F7,0x8F93, // - 0x85F9,0xE55C, // - 0x85FA,0xE561, // - 0x85FB,0x9194, // - 0x85FE,0xE560, // - 0x8602,0xE541, // - 0x8606,0xE562, // - 0x8607,0x9168, // - 0x860A,0xE55D, // - 0x860B,0xE55F, // - 0x8613,0xE55E, // - 0x8616,0x9F50, // - 0x8617,0x9F41, // - 0x861A,0xE564, // - 0x8622,0xE563, // - 0x862D,0x9796, // - 0x862F,0xE1BA, // - 0x8630,0xE565, // - 0x863F,0xE566, // - 0x864D,0xE567, // - 0x864E,0x8CD5, // - 0x8650,0x8B73, // - 0x8654,0xE569, // - 0x8655,0x997C, // - 0x865A,0x8B95, // - 0x865C,0x97B8, // - 0x865E,0x8BF1, // - 0x865F,0xE56A, // - 0x8667,0xE56B, // - 0x866B,0x928E, // - 0x8671,0xE56C, // - 0x8679,0x93F8, // - 0x867B,0x88B8, // - 0x868A,0x89E1, // - 0x868B,0xE571, // - 0x868C,0xE572, // - 0x8693,0xE56D, // - 0x8695,0x8E5C, // - 0x86A3,0xE56E, // - 0x86A4,0x9461, // - 0x86A9,0xE56F, // - 0x86AA,0xE570, // - 0x86AB,0xE57A, // - 0x86AF,0xE574, // - 0x86B0,0xE577, // - 0x86B6,0xE573, // - 0x86C4,0xE575, // - 0x86C6,0xE576, // - 0x86C7,0x8ED6, // - 0x86C9,0xE578, // - 0x86CB,0x9260, // - 0x86CD,0x8C75, // - 0x86CE,0x8A61, // - 0x86D4,0xE57B, // - 0x86D9,0x8A5E, // - 0x86DB,0xE581, // - 0x86DE,0xE57C, // - 0x86DF,0xE580, // - 0x86E4,0x94B8, // - 0x86E9,0xE57D, // - 0x86EC,0xE57E, // - 0x86ED,0x9567, // - 0x86EE,0x94D8, // - 0x86EF,0xE582, // - 0x86F8,0x91FB, // - 0x86F9,0xE58C, // - 0x86FB,0xE588, // - 0x86FE,0x89E9, // - 0x8700,0xE586, // - 0x8702,0x9649, // - 0x8703,0xE587, // - 0x8706,0xE584, // - 0x8708,0xE585, // - 0x8709,0xE58A, // - 0x870A,0xE58D, // - 0x870D,0xE58B, // - 0x8711,0xE589, // - 0x8712,0xE583, // - 0x8718,0x9277, // - 0x871A,0xE594, // - 0x871C,0x96A8, // - 0x8725,0xE592, // - 0x8729,0xE593, // - 0x8734,0xE58E, // - 0x8737,0xE590, // - 0x873B,0xE591, // - 0x873F,0xE58F, // - 0x8749,0x90E4, // - 0x874B,0x9858, // - 0x874C,0xE598, // - 0x874E,0xE599, // - 0x8753,0xE59F, // - 0x8755,0x9049, // - 0x8757,0xE59B, // - 0x8759,0xE59E, // - 0x875F,0xE596, // - 0x8760,0xE595, // - 0x8763,0xE5A0, // - 0x8766,0x89DA, // - 0x8768,0xE59C, // - 0x876A,0xE5A1, // - 0x876E,0xE59D, // - 0x8774,0xE59A, // - 0x8776,0x92B1, // - 0x8778,0xE597, // - 0x877F,0x9488, // - 0x8782,0xE5A5, // - 0x878D,0x975A, // - 0x879F,0xE5A4, // - 0x87A2,0xE5A3, // - 0x87AB,0xE5AC, // - 0x87AF,0xE5A6, // - 0x87B3,0xE5AE, // - 0x87BA,0x9786, // - 0x87BB,0xE5B1, // - 0x87BD,0xE5A8, // - 0x87C0,0xE5A9, // - 0x87C4,0xE5AD, // - 0x87C6,0xE5B0, // - 0x87C7,0xE5AF, // - 0x87CB,0xE5A7, // - 0x87D0,0xE5AA, // - 0x87D2,0xE5BB, // - 0x87E0,0xE5B4, // - 0x87EF,0xE5B2, // - 0x87F2,0xE5B3, // - 0x87F6,0xE5B8, // - 0x87F7,0xE5B9, // - 0x87F9,0x8A49, // - 0x87FB,0x8B61, // - 0x87FE,0xE5B7, // - 0x8805,0xE5A2, // - 0x880D,0xE5B6, // - 0x880E,0xE5BA, // - 0x880F,0xE5B5, // - 0x8811,0xE5BC, // - 0x8815,0xE5BE, // - 0x8816,0xE5BD, // - 0x8821,0xE5C0, // - 0x8822,0xE5BF, // - 0x8823,0xE579, // - 0x8827,0xE5C4, // - 0x8831,0xE5C1, // - 0x8836,0xE5C2, // - 0x8839,0xE5C3, // - 0x883B,0xE5C5, // - 0x8840,0x8C8C, // - 0x8842,0xE5C7, // - 0x8844,0xE5C6, // - 0x8846,0x8F4F, // - 0x884C,0x8D73, // - 0x884D,0x9FA5, // - 0x8852,0xE5C8, // - 0x8853,0x8F70, // - 0x8857,0x8A58, // - 0x8859,0xE5C9, // - 0x885B,0x8971, // - 0x885D,0x8FD5, // - 0x885E,0xE5CA, // - 0x8861,0x8D74, // - 0x8862,0xE5CB, // - 0x8863,0x88DF, // - 0x8868,0x955C, // - 0x886B,0xE5CC, // - 0x8870,0x908A, // - 0x8872,0xE5D3, // - 0x8875,0xE5D0, // - 0x8877,0x928F, // - 0x887D,0xE5D1, // - 0x887E,0xE5CE, // - 0x887F,0x8BDC, // - 0x8881,0xE5CD, // - 0x8882,0xE5D4, // - 0x8888,0x8C55, // - 0x888B,0x91DC, // - 0x888D,0xE5DA, // - 0x8892,0xE5D6, // - 0x8896,0x91B3, // - 0x8897,0xE5D5, // - 0x8899,0xE5D8, // - 0x889E,0xE5CF, // - 0x88A2,0xE5D9, // - 0x88A4,0xE5DB, // - 0x88AB,0x94ED, // - 0x88AE,0xE5D7, // - 0x88B0,0xE5DC, // - 0x88B1,0xE5DE, // - 0x88B4,0x8CD1, // - 0x88B5,0xE5D2, // - 0x88B7,0x88BF, // - 0x88BF,0xE5DD, // - 0x88C1,0x8DD9, // - 0x88C2,0x97F4, // - 0x88C3,0xE5DF, // - 0x88C4,0xE5E0, // - 0x88C5,0x9195, // - 0x88CF,0x97A0, // - 0x88D4,0xE5E1, // - 0x88D5,0x9754, // - 0x88D8,0xE5E2, // - 0x88D9,0xE5E3, // - 0x88DC,0x95E2, // - 0x88DD,0xE5E4, // - 0x88DF,0x8DBE, // - 0x88E1,0x97A1, // - 0x88E8,0xE5E9, // - 0x88F2,0xE5EA, // - 0x88F3,0x8FD6, // - 0x88F4,0xE5E8, // - 0x88F8,0x9787, // - 0x88F9,0xE5E5, // - 0x88FC,0xE5E7, // - 0x88FD,0x90BB, // - 0x88FE,0x909E, // - 0x8902,0xE5E6, // - 0x8904,0xE5EB, // - 0x8907,0x95A1, // - 0x890A,0xE5ED, // - 0x890C,0xE5EC, // - 0x8910,0x8A8C, // - 0x8912,0x964A, // - 0x8913,0xE5EE, // - 0x891D,0xE5FA, // - 0x891E,0xE5F0, // - 0x8925,0xE5F1, // - 0x892A,0xE5F2, // - 0x892B,0xE5F3, // - 0x8936,0xE5F7, // - 0x8938,0xE5F8, // - 0x893B,0xE5F6, // - 0x8941,0xE5F4, // - 0x8943,0xE5EF, // - 0x8944,0xE5F5, // - 0x894C,0xE5F9, // - 0x894D,0xE8B5, // - 0x8956,0x89A6, // - 0x895E,0xE5FC, // - 0x895F,0x8BDD, // - 0x8960,0xE5FB, // - 0x8964,0xE641, // - 0x8966,0xE640, // - 0x896A,0xE643, // - 0x896D,0xE642, // - 0x896F,0xE644, // - 0x8972,0x8F50, // - 0x8974,0xE645, // - 0x8977,0xE646, // - 0x897E,0xE647, // - 0x897F,0x90BC, // - 0x8981,0x9776, // - 0x8983,0xE648, // - 0x8986,0x95A2, // - 0x8987,0x9465, // - 0x8988,0xE649, // - 0x898A,0xE64A, // - 0x898B,0x8CA9, // - 0x898F,0x8B4B, // - 0x8993,0xE64B, // - 0x8996,0x8E8B, // - 0x8997,0x9460, // - 0x8998,0xE64C, // - 0x899A,0x8A6F, // - 0x89A1,0xE64D, // - 0x89A6,0xE64F, // - 0x89A7,0x9797, // - 0x89A9,0xE64E, // - 0x89AA,0x9065, // - 0x89AC,0xE650, // - 0x89AF,0xE651, // - 0x89B2,0xE652, // - 0x89B3,0x8ACF, // - 0x89BA,0xE653, // - 0x89BD,0xE654, // - 0x89BF,0xE655, // - 0x89C0,0xE656, // - 0x89D2,0x8A70, // - 0x89DA,0xE657, // - 0x89DC,0xE658, // - 0x89DD,0xE659, // - 0x89E3,0x89F0, // - 0x89E6,0x9047, // - 0x89E7,0xE65A, // - 0x89F8,0xE65C, // - 0x8A00,0x8CBE, // - 0x8A02,0x92F9, // - 0x8A03,0xE65D, // - 0x8A08,0x8C76, // - 0x8A0A,0x9075, // - 0x8A0C,0xE660, // - 0x8A0E,0x93A2, // - 0x8A10,0xE65F, // - 0x8A13,0x8C50, // - 0x8A16,0xE65E, // - 0x8A17,0x91F5, // - 0x8A18,0x8B4C, // - 0x8A1B,0xE661, // - 0x8A1D,0xE662, // - 0x8A1F,0x8FD7, // - 0x8A23,0x8C8D, // - 0x8A25,0xE663, // - 0x8A2A,0x964B, // - 0x8A2D,0x90DD, // - 0x8A31,0x8B96, // - 0x8A33,0x96F3, // - 0x8A34,0x9169, // - 0x8A36,0xE664, // - 0x8A3A,0x9066, // - 0x8A3B,0x9290, // - 0x8A3C,0x8FD8, // - 0x8A41,0xE665, // - 0x8A46,0xE668, // - 0x8A48,0xE669, // - 0x8A50,0x8DBC, // - 0x8A51,0x91C0, // - 0x8A52,0xE667, // - 0x8A54,0x8FD9, // - 0x8A55,0x955D, // - 0x8A5B,0xE666, // - 0x8A5E,0x8E8C, // - 0x8A60,0x8972, // - 0x8A62,0xE66D, // - 0x8A63,0x8C77, // - 0x8A66,0x8E8E, // - 0x8A69,0x8E8D, // - 0x8A6B,0x986C, // - 0x8A6C,0xE66C, // - 0x8A6D,0xE66B, // - 0x8A6E,0x9146, // - 0x8A70,0x8B6C, // - 0x8A71,0x9862, // - 0x8A72,0x8A59, // - 0x8A73,0x8FDA, // - 0x8A7C,0xE66A, // - 0x8A82,0xE66F, // - 0x8A84,0xE670, // - 0x8A85,0xE66E, // - 0x8A87,0x8CD6, // - 0x8A89,0x975F, // - 0x8A8C,0x8E8F, // - 0x8A8D,0x9446, // - 0x8A91,0xE673, // - 0x8A93,0x90BE, // - 0x8A95,0x9261, // - 0x8A98,0x9755, // - 0x8A9A,0xE676, // - 0x8A9E,0x8CEA, // - 0x8AA0,0x90BD, // - 0x8AA1,0xE672, // - 0x8AA3,0xE677, // - 0x8AA4,0x8CEB, // - 0x8AA5,0xE674, // - 0x8AA6,0xE675, // - 0x8AA8,0xE671, // - 0x8AAC,0x90E0, // - 0x8AAD,0x93C7, // - 0x8AB0,0x924E, // - 0x8AB2,0x89DB, // - 0x8AB9,0x94EE, // - 0x8ABC,0x8B62, // - 0x8ABF,0x92B2, // - 0x8AC2,0xE67A, // - 0x8AC4,0xE678, // - 0x8AC7,0x926B, // - 0x8ACB,0x90BF, // - 0x8ACC,0x8AD0, // - 0x8ACD,0xE679, // - 0x8ACF,0x907A, // - 0x8AD2,0x97C8, // - 0x8AD6,0x985F, // - 0x8ADA,0xE67B, // - 0x8ADB,0xE687, // - 0x8ADC,0x92B3, // - 0x8ADE,0xE686, // - 0x8AE0,0xE683, // - 0x8AE1,0xE68B, // - 0x8AE2,0xE684, // - 0x8AE4,0xE680, // - 0x8AE6,0x92FA, // - 0x8AE7,0xE67E, // - 0x8AEB,0xE67C, // - 0x8AED,0x9740, // - 0x8AEE,0x8E90, // - 0x8AF1,0xE681, // - 0x8AF3,0xE67D, // - 0x8AF7,0xE685, // - 0x8AF8,0x8F94, // - 0x8AFA,0x8CBF, // - 0x8AFE,0x91F8, // - 0x8B00,0x9664, // - 0x8B01,0x8979, // - 0x8B02,0x88E0, // - 0x8B04,0x93A3, // - 0x8B07,0xE689, // - 0x8B0C,0xE688, // - 0x8B0E,0x93E4, // - 0x8B10,0xE68D, // - 0x8B14,0xE682, // - 0x8B16,0xE68C, // - 0x8B17,0xE68E, // - 0x8B19,0x8CAA, // - 0x8B1A,0xE68A, // - 0x8B1B,0x8D75, // - 0x8B1D,0x8ED3, // - 0x8B20,0xE68F, // - 0x8B21,0x9777, // - 0x8B26,0xE692, // - 0x8B28,0xE695, // - 0x8B2B,0xE693, // - 0x8B2C,0x9554, // - 0x8B33,0xE690, // - 0x8B39,0x8BDE, // - 0x8B3E,0xE694, // - 0x8B41,0xE696, // - 0x8B49,0xE69A, // - 0x8B4C,0xE697, // - 0x8B4E,0xE699, // - 0x8B4F,0xE698, // - 0x8B56,0xE69B, // - 0x8B58,0x8EAF, // - 0x8B5A,0xE69D, // - 0x8B5B,0xE69C, // - 0x8B5C,0x9588, // - 0x8B5F,0xE69F, // - 0x8B66,0x8C78, // - 0x8B6B,0xE69E, // - 0x8B6C,0xE6A0, // - 0x8B6F,0xE6A1, // - 0x8B70,0x8B63, // - 0x8B71,0xE3BF, // - 0x8B72,0x8FF7, // - 0x8B74,0xE6A2, // - 0x8B77,0x8CEC, // - 0x8B7D,0xE6A3, // - 0x8B80,0xE6A4, // - 0x8B83,0x8E5D, // - 0x8B8A,0x9DCC, // - 0x8B8C,0xE6A5, // - 0x8B8E,0xE6A6, // - 0x8B90,0x8F51, // - 0x8B92,0xE6A7, // - 0x8B93,0xE6A8, // - 0x8B96,0xE6A9, // - 0x8B99,0xE6AA, // - 0x8B9A,0xE6AB, // - 0x8C37,0x924A, // - 0x8C3A,0xE6AC, // - 0x8C3F,0xE6AE, // - 0x8C41,0xE6AD, // - 0x8C46,0x93A4, // - 0x8C48,0xE6AF, // - 0x8C4A,0x964C, // - 0x8C4C,0xE6B0, // - 0x8C4E,0xE6B1, // - 0x8C50,0xE6B2, // - 0x8C55,0xE6B3, // - 0x8C5A,0x93D8, // - 0x8C61,0x8FDB, // - 0x8C62,0xE6B4, // - 0x8C6A,0x8D8B, // - 0x8C6B,0x98AC, // - 0x8C6C,0xE6B5, // - 0x8C78,0xE6B6, // - 0x8C79,0x955E, // - 0x8C7A,0xE6B7, // - 0x8C7C,0xE6BF, // - 0x8C82,0xE6B8, // - 0x8C85,0xE6BA, // - 0x8C89,0xE6B9, // - 0x8C8A,0xE6BB, // - 0x8C8C,0x9665, // - 0x8C8D,0xE6BC, // - 0x8C8E,0xE6BD, // - 0x8C94,0xE6BE, // - 0x8C98,0xE6C0, // - 0x8C9D,0x8A4C, // - 0x8C9E,0x92E5, // - 0x8CA0,0x9589, // - 0x8CA1,0x8DE0, // - 0x8CA2,0x8D76, // - 0x8CA7,0x956E, // - 0x8CA8,0x89DD, // - 0x8CA9,0x94CC, // - 0x8CAA,0xE6C3, // - 0x8CAB,0x8AD1, // - 0x8CAC,0x90D3, // - 0x8CAD,0xE6C2, // - 0x8CAE,0xE6C7, // - 0x8CAF,0x9299, // - 0x8CB0,0x96E1, // - 0x8CB2,0xE6C5, // - 0x8CB3,0xE6C6, // - 0x8CB4,0x8B4D, // - 0x8CB6,0xE6C8, // - 0x8CB7,0x9483, // - 0x8CB8,0x91DD, // - 0x8CBB,0x94EF, // - 0x8CBC,0x935C, // - 0x8CBD,0xE6C4, // - 0x8CBF,0x9666, // - 0x8CC0,0x89EA, // - 0x8CC1,0xE6CA, // - 0x8CC2,0x9847, // - 0x8CC3,0x92C0, // - 0x8CC4,0x9864, // - 0x8CC7,0x8E91, // - 0x8CC8,0xE6C9, // - 0x8CCA,0x91AF, // - 0x8CCD,0xE6DA, // - 0x8CCE,0x9147, // - 0x8CD1,0x93F6, // - 0x8CD3,0x956F, // - 0x8CDA,0xE6CD, // - 0x8CDB,0x8E5E, // - 0x8CDC,0x8E92, // - 0x8CDE,0x8FDC, // - 0x8CE0,0x9485, // - 0x8CE2,0x8CAB, // - 0x8CE3,0xE6CC, // - 0x8CE4,0xE6CB, // - 0x8CE6,0x958A, // - 0x8CEA,0x8EBF, // - 0x8CED,0x9371, // - 0x8CFA,0xE6CF, // - 0x8CFB,0xE6D0, // - 0x8CFC,0x8D77, // - 0x8CFD,0xE6CE, // - 0x8D04,0xE6D1, // - 0x8D05,0xE6D2, // - 0x8D07,0xE6D4, // - 0x8D08,0x91A1, // - 0x8D0A,0xE6D3, // - 0x8D0B,0x8AE4, // - 0x8D0D,0xE6D6, // - 0x8D0F,0xE6D5, // - 0x8D10,0xE6D7, // - 0x8D13,0xE6D9, // - 0x8D14,0xE6DB, // - 0x8D16,0xE6DC, // - 0x8D64,0x90D4, // - 0x8D66,0x8ECD, // - 0x8D67,0xE6DD, // - 0x8D6B,0x8A71, // - 0x8D6D,0xE6DE, // - 0x8D70,0x9196, // - 0x8D71,0xE6DF, // - 0x8D73,0xE6E0, // - 0x8D74,0x958B, // - 0x8D77,0x8B4E, // - 0x8D81,0xE6E1, // - 0x8D85,0x92B4, // - 0x8D8A,0x897A, // - 0x8D99,0xE6E2, // - 0x8DA3,0x8EEF, // - 0x8DA8,0x9096, // - 0x8DB3,0x91AB, // - 0x8DBA,0xE6E5, // - 0x8DBE,0xE6E4, // - 0x8DC2,0xE6E3, // - 0x8DCB,0xE6EB, // - 0x8DCC,0xE6E9, // - 0x8DCF,0xE6E6, // - 0x8DD6,0xE6E8, // - 0x8DDA,0xE6E7, // - 0x8DDB,0xE6EA, // - 0x8DDD,0x8B97, // - 0x8DDF,0xE6EE, // - 0x8DE1,0x90D5, // - 0x8DE3,0xE6EF, // - 0x8DE8,0x8CD7, // - 0x8DEA,0xE6EC, // - 0x8DEB,0xE6ED, // - 0x8DEF,0x9848, // - 0x8DF3,0x92B5, // - 0x8DF5,0x9148, // - 0x8DFC,0xE6F0, // - 0x8DFF,0xE6F3, // - 0x8E08,0xE6F1, // - 0x8E09,0xE6F2, // - 0x8E0A,0x9778, // - 0x8E0F,0x93A5, // - 0x8E10,0xE6F6, // - 0x8E1D,0xE6F4, // - 0x8E1E,0xE6F5, // - 0x8E1F,0xE6F7, // - 0x8E2A,0xE748, // - 0x8E30,0xE6FA, // - 0x8E34,0xE6FB, // - 0x8E35,0xE6F9, // - 0x8E42,0xE6F8, // - 0x8E44,0x92FB, // - 0x8E47,0xE740, // - 0x8E48,0xE744, // - 0x8E49,0xE741, // - 0x8E4A,0xE6FC, // - 0x8E4C,0xE742, // - 0x8E50,0xE743, // - 0x8E55,0xE74A, // - 0x8E59,0xE745, // - 0x8E5F,0x90D6, // - 0x8E60,0xE747, // - 0x8E63,0xE749, // - 0x8E64,0xE746, // - 0x8E72,0xE74C, // - 0x8E74,0x8F52, // - 0x8E76,0xE74B, // - 0x8E7C,0xE74D, // - 0x8E81,0xE74E, // - 0x8E84,0xE751, // - 0x8E85,0xE750, // - 0x8E87,0xE74F, // - 0x8E8A,0xE753, // - 0x8E8B,0xE752, // - 0x8E8D,0x96F4, // - 0x8E91,0xE755, // - 0x8E93,0xE754, // - 0x8E94,0xE756, // - 0x8E99,0xE757, // - 0x8EA1,0xE759, // - 0x8EAA,0xE758, // - 0x8EAB,0x9067, // - 0x8EAC,0xE75A, // - 0x8EAF,0x8BEB, // - 0x8EB1,0xE75D, // - 0x8EBE,0xE75E, // - 0x8EC5,0xE75F, // - 0x8EC6,0xE75C, // - 0x8EC8,0xE760, // - 0x8ECA,0x8ED4, // - 0x8ECB,0xE761, // - 0x8ECC,0x8B4F, // - 0x8ECD,0x8C52, // - 0x8ED2,0x8CAC, // - 0x8EDB,0xE762, // - 0x8EDF,0x93EE, // - 0x8EE2,0x935D, // - 0x8EE3,0xE763, // - 0x8EEB,0xE766, // - 0x8EF8,0x8EB2, // - 0x8EFB,0xE765, // - 0x8EFC,0xE764, // - 0x8EFD,0x8C79, // - 0x8EFE,0xE767, // - 0x8F03,0x8A72, // - 0x8F05,0xE769, // - 0x8F09,0x8DDA, // - 0x8F0A,0xE768, // - 0x8F0C,0xE771, // - 0x8F12,0xE76B, // - 0x8F13,0xE76D, // - 0x8F14,0x95E3, // - 0x8F15,0xE76A, // - 0x8F19,0xE76C, // - 0x8F1B,0xE770, // - 0x8F1C,0xE76E, // - 0x8F1D,0x8B50, // - 0x8F1F,0xE76F, // - 0x8F26,0xE772, // - 0x8F29,0x9479, // - 0x8F2A,0x97D6, // - 0x8F2F,0x8F53, // - 0x8F33,0xE773, // - 0x8F38,0x9741, // - 0x8F39,0xE775, // - 0x8F3B,0xE774, // - 0x8F3E,0xE778, // - 0x8F3F,0x9760, // - 0x8F42,0xE777, // - 0x8F44,0x8A8D, // - 0x8F45,0xE776, // - 0x8F46,0xE77B, // - 0x8F49,0xE77A, // - 0x8F4C,0xE779, // - 0x8F4D,0x9351, // - 0x8F4E,0xE77C, // - 0x8F57,0xE77D, // - 0x8F5C,0xE77E, // - 0x8F5F,0x8D8C, // - 0x8F61,0x8C44, // - 0x8F62,0xE780, // - 0x8F63,0xE781, // - 0x8F64,0xE782, // - 0x8F9B,0x9068, // - 0x8F9C,0xE783, // - 0x8F9E,0x8EAB, // - 0x8F9F,0xE784, // - 0x8FA3,0xE785, // - 0x8FA7,0x999F, // - 0x8FA8,0x999E, // - 0x8FAD,0xE786, // - 0x8FAE,0xE390, // - 0x8FAF,0xE787, // - 0x8FB0,0x9243, // - 0x8FB1,0x904A, // - 0x8FB2,0x945F, // - 0x8FB7,0xE788, // - 0x8FBA,0x95D3, // - 0x8FBB,0x92D2, // - 0x8FBC,0x8D9E, // - 0x8FBF,0x9248, // - 0x8FC2,0x8949, // - 0x8FC4,0x9698, // - 0x8FC5,0x9076, // - 0x8FCE,0x8C7D, // - 0x8FD1,0x8BDF, // - 0x8FD4,0x95D4, // - 0x8FDA,0xE789, // - 0x8FE2,0xE78B, // - 0x8FE5,0xE78A, // - 0x8FE6,0x89DE, // - 0x8FE9,0x93F4, // - 0x8FEA,0xE78C, // - 0x8FEB,0x9497, // - 0x8FED,0x9352, // - 0x8FEF,0xE78D, // - 0x8FF0,0x8F71, // - 0x8FF4,0xE78F, // - 0x8FF7,0x96C0, // - 0x8FF8,0xE79E, // - 0x8FF9,0xE791, // - 0x8FFA,0xE792, // - 0x8FFD,0x92C7, // - 0x9000,0x91DE, // - 0x9001,0x9197, // - 0x9003,0x93A6, // - 0x9005,0xE790, // - 0x9006,0x8B74, // - 0x900B,0xE799, // - 0x900D,0xE796, // - 0x900E,0xE7A3, // - 0x900F,0x93A7, // - 0x9010,0x9280, // - 0x9011,0xE793, // - 0x9013,0x92FC, // - 0x9014,0x9372, // - 0x9015,0xE794, // - 0x9016,0xE798, // - 0x9017,0x9080, // - 0x9019,0x9487, // - 0x901A,0x92CA, // - 0x901D,0x90C0, // - 0x901E,0xE797, // - 0x901F,0x91AC, // - 0x9020,0x91A2, // - 0x9021,0xE795, // - 0x9022,0x88A7, // - 0x9023,0x9841, // - 0x9027,0xE79A, // - 0x902E,0x91DF, // - 0x9031,0x8F54, // - 0x9032,0x9069, // - 0x9035,0xE79C, // - 0x9036,0xE79B, // - 0x9038,0x88ED, // - 0x9039,0xE79D, // - 0x903C,0x954E, // - 0x903E,0xE7A5, // - 0x9041,0x93D9, // - 0x9042,0x908B, // - 0x9045,0x9278, // - 0x9047,0x8BF6, // - 0x9049,0xE7A4, // - 0x904A,0x9756, // - 0x904B,0x895E, // - 0x904D,0x95D5, // - 0x904E,0x89DF, // - 0x904F,0xE79F, // - 0x9050,0xE7A0, // - 0x9051,0xE7A1, // - 0x9052,0xE7A2, // - 0x9053,0x93B9, // - 0x9054,0x9242, // - 0x9055,0x88E1, // - 0x9056,0xE7A6, // - 0x9058,0xE7A7, // - 0x9059,0xEAA1, // - 0x905C,0x91BB, // - 0x905E,0xE7A8, // - 0x9060,0x8993, // - 0x9061,0x916B, // - 0x9063,0x8CAD, // - 0x9065,0x9779, // - 0x9068,0xE7A9, // - 0x9069,0x934B, // - 0x906D,0x9198, // - 0x906E,0x8ED5, // - 0x906F,0xE7AA, // - 0x9072,0xE7AD, // - 0x9075,0x8F85, // - 0x9076,0xE7AB, // - 0x9077,0x914A, // - 0x9078,0x9149, // - 0x907A,0x88E2, // - 0x907C,0x97C9, // - 0x907D,0xE7AF, // - 0x907F,0x94F0, // - 0x9080,0xE7B1, // - 0x9081,0xE7B0, // - 0x9082,0xE7AE, // - 0x9083,0xE284, // - 0x9084,0x8AD2, // - 0x9087,0xE78E, // - 0x9089,0xE7B3, // - 0x908A,0xE7B2, // - 0x908F,0xE7B4, // - 0x9091,0x9757, // - 0x90A3,0x93DF, // - 0x90A6,0x964D, // - 0x90A8,0xE7B5, // - 0x90AA,0x8ED7, // - 0x90AF,0xE7B6, // - 0x90B1,0xE7B7, // - 0x90B5,0xE7B8, // - 0x90B8,0x9340, // - 0x90C1,0x88E8, // - 0x90CA,0x8D78, // - 0x90CE,0x9859, // - 0x90DB,0xE7BC, // - 0x90E1,0x8C53, // - 0x90E2,0xE7B9, // - 0x90E4,0xE7BA, // - 0x90E8,0x9594, // - 0x90ED,0x8A73, // - 0x90F5,0x9758, // - 0x90F7,0x8BBD, // - 0x90FD,0x9373, // - 0x9102,0xE7BD, // - 0x9112,0xE7BE, // - 0x9119,0xE7BF, // - 0x912D,0x9341, // - 0x9130,0xE7C1, // - 0x9132,0xE7C0, // - 0x9149,0x93D1, // - 0x914A,0xE7C2, // - 0x914B,0x8F55, // - 0x914C,0x8EDE, // - 0x914D,0x947A, // - 0x914E,0x9291, // - 0x9152,0x8EF0, // - 0x9154,0x908C, // - 0x9156,0xE7C3, // - 0x9158,0xE7C4, // - 0x9162,0x907C, // - 0x9163,0xE7C5, // - 0x9165,0xE7C6, // - 0x9169,0xE7C7, // - 0x916A,0x978F, // - 0x916C,0x8F56, // - 0x9172,0xE7C9, // - 0x9173,0xE7C8, // - 0x9175,0x8D79, // - 0x9177,0x8D93, // - 0x9178,0x8E5F, // - 0x9182,0xE7CC, // - 0x9187,0x8F86, // - 0x9189,0xE7CB, // - 0x918B,0xE7CA, // - 0x918D,0x91E7, // - 0x9190,0x8CED, // - 0x9192,0x90C1, // - 0x9197,0x94AE, // - 0x919C,0x8F58, // - 0x91A2,0xE7CD, // - 0x91A4,0x8FDD, // - 0x91AA,0xE7D0, // - 0x91AB,0xE7CE, // - 0x91AF,0xE7CF, // - 0x91B4,0xE7D2, // - 0x91B5,0xE7D1, // - 0x91B8,0x8FF8, // - 0x91BA,0xE7D3, // - 0x91C0,0xE7D4, // - 0x91C1,0xE7D5, // - 0x91C6,0x94CE, // - 0x91C7,0x8DD1, // - 0x91C8,0x8EDF, // - 0x91C9,0xE7D6, // - 0x91CB,0xE7D7, // - 0x91CC,0x97A2, // - 0x91CD,0x8F64, // - 0x91CE,0x96EC, // - 0x91CF,0x97CA, // - 0x91D0,0xE7D8, // - 0x91D1,0x8BE0, // - 0x91D6,0xE7D9, // - 0x91D8,0x9342, // - 0x91DB,0xE7DC, // - 0x91DC,0x8A98, // - 0x91DD,0x906A, // - 0x91DF,0xE7DA, // - 0x91E1,0xE7DB, // - 0x91E3,0x92DE, // - 0x91E6,0x9674, // - 0x91E7,0x8BFA, // - 0x91F5,0xE7DE, // - 0x91F6,0xE7DF, // - 0x91FC,0xE7DD, // - 0x91FF,0xE7E1, // - 0x920D,0x93DD, // - 0x920E,0x8A62, // - 0x9211,0xE7E5, // - 0x9214,0xE7E2, // - 0x9215,0xE7E4, // - 0x921E,0xE7E0, // - 0x9229,0xE86E, // - 0x922C,0xE7E3, // - 0x9234,0x97E9, // - 0x9237,0x8CD8, // - 0x923F,0xE7ED, // - 0x9244,0x9353, // - 0x9245,0xE7E8, // - 0x9248,0xE7EB, // - 0x9249,0xE7E9, // - 0x924B,0xE7EE, // - 0x9250,0xE7EF, // - 0x9257,0xE7E7, // - 0x925A,0xE7F4, // - 0x925B,0x8994, // - 0x925E,0xE7E6, // - 0x9262,0x94AB, // - 0x9264,0xE7EA, // - 0x9266,0x8FDE, // - 0x9271,0x8D7A, // - 0x927E,0x9667, // - 0x9280,0x8BE2, // - 0x9283,0x8F65, // - 0x9285,0x93BA, // - 0x9291,0x914C, // - 0x9293,0xE7F2, // - 0x9295,0xE7EC, // - 0x9296,0xE7F1, // - 0x9298,0x96C1, // - 0x929A,0x92B6, // - 0x929B,0xE7F3, // - 0x929C,0xE7F0, // - 0x92AD,0x914B, // - 0x92B7,0xE7F7, // - 0x92B9,0xE7F6, // - 0x92CF,0xE7F5, // - 0x92D2,0x964E, // - 0x92E4,0x8F9B, // - 0x92E9,0xE7F8, // - 0x92EA,0x95DD, // - 0x92ED,0x8973, // - 0x92F2,0x9565, // - 0x92F3,0x9292, // - 0x92F8,0x8B98, // - 0x92FA,0xE7FA, // - 0x92FC,0x8D7C, // - 0x9306,0x8E4B, // - 0x930F,0xE7F9, // - 0x9310,0x908D, // - 0x9318,0x908E, // - 0x9319,0xE840, // - 0x931A,0xE842, // - 0x9320,0x8FF9, // - 0x9322,0xE841, // - 0x9323,0xE843, // - 0x9326,0x8BD1, // - 0x9328,0x9564, // - 0x932B,0x8EE0, // - 0x932C,0x9842, // - 0x932E,0xE7FC, // - 0x932F,0x8DF6, // - 0x9332,0x985E, // - 0x9335,0xE845, // - 0x933A,0xE844, // - 0x933B,0xE846, // - 0x9344,0xE7FB, // - 0x934B,0x93E7, // - 0x934D,0x9374, // - 0x9354,0x92D5, // - 0x9356,0xE84B, // - 0x935B,0x9262, // - 0x935C,0xE847, // - 0x9360,0xE848, // - 0x936C,0x8C4C, // - 0x936E,0xE84A, // - 0x9375,0x8CAE, // - 0x937C,0xE849, // - 0x937E,0x8FDF, // - 0x938C,0x8A99, // - 0x9394,0xE84F, // - 0x9396,0x8DBD, // - 0x9397,0x9199, // - 0x939A,0x92C8, // - 0x93A7,0x8A5A, // - 0x93AC,0xE84D, // - 0x93AD,0xE84E, // - 0x93AE,0x92C1, // - 0x93B0,0xE84C, // - 0x93B9,0xE850, // - 0x93C3,0xE856, // - 0x93C8,0xE859, // - 0x93D0,0xE858, // - 0x93D1,0x934C, // - 0x93D6,0xE851, // - 0x93D7,0xE852, // - 0x93D8,0xE855, // - 0x93DD,0xE857, // - 0x93E1,0x8BBE, // - 0x93E4,0xE85A, // - 0x93E5,0xE854, // - 0x93E8,0xE853, // - 0x9403,0xE85E, // - 0x9407,0xE85F, // - 0x9410,0xE860, // - 0x9413,0xE85D, // - 0x9414,0xE85C, // - 0x9418,0x8FE0, // - 0x9419,0x93A8, // - 0x9421,0xE864, // - 0x942B,0xE862, // - 0x9435,0xE863, // - 0x9436,0xE861, // - 0x9438,0x91F6, // - 0x943A,0xE865, // - 0x9441,0xE866, // - 0x9444,0xE868, // - 0x9451,0x8AD3, // - 0x9452,0xE867, // - 0x9453,0x96F8, // - 0x945A,0xE873, // - 0x945B,0xE869, // - 0x945E,0xE86C, // - 0x9460,0xE86A, // - 0x9462,0xE86B, // - 0x946A,0xE86D, // - 0x9470,0xE86F, // - 0x9475,0xE870, // - 0x9477,0xE871, // - 0x947C,0xE874, // - 0x947D,0xE872, // - 0x947E,0xE875, // - 0x947F,0xE877, // - 0x9481,0xE876, // - 0x9577,0x92B7, // - 0x9580,0x96E5, // - 0x9582,0xE878, // - 0x9583,0x914D, // - 0x9587,0xE879, // - 0x9589,0x95C2, // - 0x958A,0xE87A, // - 0x958B,0x8A4A, // - 0x9591,0x8AD5, // - 0x9593,0x8AD4, // - 0x9594,0xE87B, // - 0x9596,0xE87C, // - 0x9598,0xE87D, // - 0x9599,0xE87E, // - 0x95A0,0xE880, // - 0x95A2,0x8AD6, // - 0x95A3,0x8A74, // - 0x95A4,0x8D7D, // - 0x95A5,0x94B4, // - 0x95A7,0xE882, // - 0x95A8,0xE881, // - 0x95AD,0xE883, // - 0x95B2,0x897B, // - 0x95B9,0xE886, // - 0x95BB,0xE885, // - 0x95BC,0xE884, // - 0x95BE,0xE887, // - 0x95C3,0xE88A, // - 0x95C7,0x88C5, // - 0x95CA,0xE888, // - 0x95CC,0xE88C, // - 0x95CD,0xE88B, // - 0x95D4,0xE88E, // - 0x95D5,0xE88D, // - 0x95D6,0xE88F, // - 0x95D8,0x93AC, // - 0x95DC,0xE890, // - 0x95E1,0xE891, // - 0x95E2,0xE893, // - 0x95E5,0xE892, // - 0x961C,0x958C, // - 0x9621,0xE894, // - 0x9628,0xE895, // - 0x962A,0x8DE3, // - 0x962E,0xE896, // - 0x962F,0xE897, // - 0x9632,0x9668, // - 0x963B,0x916A, // - 0x963F,0x88A2, // - 0x9640,0x91C9, // - 0x9642,0xE898, // - 0x9644,0x958D, // - 0x964B,0xE89B, // - 0x964C,0xE899, // - 0x964D,0x8D7E, // - 0x964F,0xE89A, // - 0x9650,0x8CC0, // - 0x965B,0x95C3, // - 0x965C,0xE89D, // - 0x965D,0xE89F, // - 0x965E,0xE89E, // - 0x965F,0xE8A0, // - 0x9662,0x8940, // - 0x9663,0x9077, // - 0x9664,0x8F9C, // - 0x9665,0x8AD7, // - 0x9666,0xE8A1, // - 0x966A,0x9486, // - 0x966C,0xE8A3, // - 0x9670,0x8941, // - 0x9672,0xE8A2, // - 0x9673,0x92C2, // - 0x9675,0x97CB, // - 0x9676,0x93A9, // - 0x9677,0xE89C, // - 0x9678,0x97A4, // - 0x967A,0x8CAF, // - 0x967D,0x977A, // - 0x9685,0x8BF7, // - 0x9686,0x97B2, // - 0x9688,0x8C47, // - 0x968A,0x91E0, // - 0x968B,0xE440, // - 0x968D,0xE8A4, // - 0x968E,0x8A4B, // - 0x968F,0x908F, // - 0x9694,0x8A75, // - 0x9695,0xE8A6, // - 0x9697,0xE8A7, // - 0x9698,0xE8A5, // - 0x9699,0x8C84, // - 0x969B,0x8DDB, // - 0x969C,0x8FE1, // - 0x96A0,0x8942, // - 0x96A3,0x97D7, // - 0x96A7,0xE8A9, // - 0x96A8,0xE7AC, // - 0x96AA,0xE8A8, // - 0x96B0,0xE8AC, // - 0x96B1,0xE8AA, // - 0x96B2,0xE8AB, // - 0x96B4,0xE8AD, // - 0x96B6,0xE8AE, // - 0x96B7,0x97EA, // - 0x96B8,0xE8AF, // - 0x96B9,0xE8B0, // - 0x96BB,0x90C7, // - 0x96BC,0x94B9, // - 0x96C0,0x909D, // - 0x96C1,0x8AE5, // - 0x96C4,0x9759, // - 0x96C5,0x89EB, // - 0x96C6,0x8F57, // - 0x96C7,0x8CD9, // - 0x96C9,0xE8B3, // - 0x96CB,0xE8B2, // - 0x96CC,0x8E93, // - 0x96CD,0xE8B4, // - 0x96CE,0xE8B1, // - 0x96D1,0x8E47, // - 0x96D5,0xE8B8, // - 0x96D6,0xE5AB, // - 0x96D9,0x99D4, // - 0x96DB,0x9097, // - 0x96DC,0xE8B6, // - 0x96E2,0x97A3, // - 0x96E3,0x93EF, // - 0x96E8,0x894A, // - 0x96EA,0x90E1, // - 0x96EB,0x8EB4, // - 0x96F0,0x95B5, // - 0x96F2,0x895F, // - 0x96F6,0x97EB, // - 0x96F7,0x978B, // - 0x96F9,0xE8B9, // - 0x96FB,0x9364, // - 0x9700,0x8EF9, // - 0x9704,0xE8BA, // - 0x9706,0xE8BB, // - 0x9707,0x906B, // - 0x9708,0xE8BC, // - 0x970A,0x97EC, // - 0x970D,0xE8B7, // - 0x970E,0xE8BE, // - 0x970F,0xE8C0, // - 0x9711,0xE8BF, // - 0x9713,0xE8BD, // - 0x9716,0xE8C1, // - 0x9719,0xE8C2, // - 0x971C,0x919A, // - 0x971E,0x89E0, // - 0x9724,0xE8C3, // - 0x9727,0x96B6, // - 0x972A,0xE8C4, // - 0x9730,0xE8C5, // - 0x9732,0x9849, // - 0x9738,0x9E50, // - 0x9739,0xE8C6, // - 0x973D,0xE8C7, // - 0x973E,0xE8C8, // - 0x9742,0xE8CC, // - 0x9744,0xE8C9, // - 0x9746,0xE8CA, // - 0x9748,0xE8CB, // - 0x9749,0xE8CD, // - 0x9752,0x90C2, // - 0x9756,0x96F5, // - 0x9759,0x90C3, // - 0x975C,0xE8CE, // - 0x975E,0x94F1, // - 0x9760,0xE8CF, // - 0x9761,0xEA72, // - 0x9762,0x96CA, // - 0x9764,0xE8D0, // - 0x9766,0xE8D1, // - 0x9768,0xE8D2, // - 0x9769,0x8A76, // - 0x976B,0xE8D4, // - 0x976D,0x9078, // - 0x9771,0xE8D5, // - 0x9774,0x8C43, // - 0x9779,0xE8D6, // - 0x977A,0xE8DA, // - 0x977C,0xE8D8, // - 0x9781,0xE8D9, // - 0x9784,0x8A93, // - 0x9785,0xE8D7, // - 0x9786,0xE8DB, // - 0x978B,0xE8DC, // - 0x978D,0x88C6, // - 0x978F,0xE8DD, // - 0x9790,0xE8DE, // - 0x9798,0x8FE2, // - 0x979C,0xE8DF, // - 0x97A0,0x8B66, // - 0x97A3,0xE8E2, // - 0x97A6,0xE8E1, // - 0x97A8,0xE8E0, // - 0x97AB,0xE691, // - 0x97AD,0x95DA, // - 0x97B3,0xE8E3, // - 0x97B4,0xE8E4, // - 0x97C3,0xE8E5, // - 0x97C6,0xE8E6, // - 0x97C8,0xE8E7, // - 0x97CB,0xE8E8, // - 0x97D3,0x8AD8, // - 0x97DC,0xE8E9, // - 0x97ED,0xE8EA, // - 0x97EE,0x9442, // - 0x97F2,0xE8EC, // - 0x97F3,0x89B9, // - 0x97F5,0xE8EF, // - 0x97F6,0xE8EE, // - 0x97FB,0x8943, // - 0x97FF,0x8BBF, // - 0x9801,0x95C5, // - 0x9802,0x92B8, // - 0x9803,0x8DA0, // - 0x9805,0x8D80, // - 0x9806,0x8F87, // - 0x9808,0x907B, // - 0x980C,0xE8F1, // - 0x980F,0xE8F0, // - 0x9810,0x9761, // - 0x9811,0x8AE6, // - 0x9812,0x94D0, // - 0x9813,0x93DA, // - 0x9817,0x909C, // - 0x9818,0x97CC, // - 0x981A,0x8C7A, // - 0x9821,0xE8F4, // - 0x9824,0xE8F3, // - 0x982C,0x966A, // - 0x982D,0x93AA, // - 0x9834,0x896F, // - 0x9837,0xE8F5, // - 0x9838,0xE8F2, // - 0x983B,0x9570, // - 0x983C,0x978A, // - 0x983D,0xE8F6, // - 0x9846,0xE8F7, // - 0x984B,0xE8F9, // - 0x984C,0x91E8, // - 0x984D,0x8A7A, // - 0x984E,0x8A7B, // - 0x984F,0xE8F8, // - 0x9854,0x8AE7, // - 0x9855,0x8CB0, // - 0x9858,0x8AE8, // - 0x985B,0x935E, // - 0x985E,0x97DE, // - 0x9867,0x8CDA, // - 0x986B,0xE8FA, // - 0x986F,0xE8FB, // - 0x9870,0xE8FC, // - 0x9871,0xE940, // - 0x9873,0xE942, // - 0x9874,0xE941, // - 0x98A8,0x9597, // - 0x98AA,0xE943, // - 0x98AF,0xE944, // - 0x98B1,0xE945, // - 0x98B6,0xE946, // - 0x98C3,0xE948, // - 0x98C4,0xE947, // - 0x98C6,0xE949, // - 0x98DB,0x94F2, // - 0x98DC,0xE3CA, // - 0x98DF,0x9048, // - 0x98E2,0x8B51, // - 0x98E9,0xE94A, // - 0x98EB,0xE94B, // - 0x98ED,0x99AA, // - 0x98EE,0x9F5A, // - 0x98EF,0x94D1, // - 0x98F2,0x88F9, // - 0x98F4,0x88B9, // - 0x98FC,0x8E94, // - 0x98FD,0x964F, // - 0x98FE,0x8FFC, // - 0x9903,0xE94C, // - 0x9905,0x96DD, // - 0x9909,0xE94D, // - 0x990A,0x977B, // - 0x990C,0x8961, // - 0x9910,0x8E60, // - 0x9912,0xE94E, // - 0x9913,0x89EC, // - 0x9914,0xE94F, // - 0x9918,0xE950, // - 0x991D,0xE952, // - 0x991E,0xE953, // - 0x9920,0xE955, // - 0x9921,0xE951, // - 0x9924,0xE954, // - 0x9928,0x8AD9, // - 0x992C,0xE956, // - 0x992E,0xE957, // - 0x993D,0xE958, // - 0x993E,0xE959, // - 0x9942,0xE95A, // - 0x9945,0xE95C, // - 0x994B,0xE95E, // - 0x994C,0xE961, // - 0x9950,0xE95D, // - 0x9951,0xE95F, // - 0x9952,0xE960, // - 0x9955,0xE962, // - 0x9957,0x8BC0, // - 0x9996,0x8EF1, // - 0x9997,0xE963, // - 0x9998,0xE964, // - 0x9999,0x8D81, // - 0x99A5,0xE965, // - 0x99A8,0x8A5D, // - 0x99AC,0x946E, // - 0x99AD,0xE966, // - 0x99AE,0xE967, // - 0x99B3,0x9279, // - 0x99B4,0x93E9, // - 0x99BC,0xE968, // - 0x99C1,0x949D, // - 0x99C4,0x91CA, // - 0x99C5,0x8977, // - 0x99C6,0x8BEC, // - 0x99C8,0x8BED, // - 0x99D0,0x9293, // - 0x99D1,0xE96D, // - 0x99D2,0x8BEE, // - 0x99D5,0x89ED, // - 0x99D8,0xE96C, // - 0x99DB,0xE96A, // - 0x99DD,0xE96B, // - 0x99DF,0xE969, // - 0x99E2,0xE977, // - 0x99ED,0xE96E, // - 0x99EE,0xE96F, // - 0x99F1,0xE970, // - 0x99F2,0xE971, // - 0x99F8,0xE973, // - 0x99FB,0xE972, // - 0x99FF,0x8F78, // - 0x9A01,0xE974, // - 0x9A05,0xE976, // - 0x9A0E,0x8B52, // - 0x9A0F,0xE975, // - 0x9A12,0x919B, // - 0x9A13,0x8CB1, // - 0x9A19,0xE978, // - 0x9A28,0x91CB, // - 0x9A2B,0xE979, // - 0x9A30,0x93AB, // - 0x9A37,0xE97A, // - 0x9A3E,0xE980, // - 0x9A40,0xE97D, // - 0x9A42,0xE97C, // - 0x9A43,0xE97E, // - 0x9A45,0xE97B, // - 0x9A4D,0xE982, // - 0x9A55,0xE981, // - 0x9A57,0xE984, // - 0x9A5A,0x8BC1, // - 0x9A5B,0xE983, // - 0x9A5F,0xE985, // - 0x9A62,0xE986, // - 0x9A64,0xE988, // - 0x9A65,0xE987, // - 0x9A69,0xE989, // - 0x9A6A,0xE98B, // - 0x9A6B,0xE98A, // - 0x9AA8,0x8D9C, // - 0x9AAD,0xE98C, // - 0x9AB0,0xE98D, // - 0x9ABC,0xE98E, // - 0x9AC0,0xE98F, // - 0x9AC4,0x9091, // - 0x9ACF,0xE990, // - 0x9AD1,0xE991, // - 0x9AD3,0xE992, // - 0x9AD4,0xE993, // - 0x9AD8,0x8D82, // - 0x9ADE,0xE994, // - 0x9ADF,0xE995, // - 0x9AE2,0xE996, // - 0x9AE3,0xE997, // - 0x9AE6,0xE998, // - 0x9AEA,0x94AF, // - 0x9AEB,0xE99A, // - 0x9AED,0x9545, // - 0x9AEE,0xE99B, // - 0x9AEF,0xE999, // - 0x9AF1,0xE99D, // - 0x9AF4,0xE99C, // - 0x9AF7,0xE99E, // - 0x9AFB,0xE99F, // - 0x9B06,0xE9A0, // - 0x9B18,0xE9A1, // - 0x9B1A,0xE9A2, // - 0x9B1F,0xE9A3, // - 0x9B22,0xE9A4, // - 0x9B23,0xE9A5, // - 0x9B25,0xE9A6, // - 0x9B27,0xE9A7, // - 0x9B28,0xE9A8, // - 0x9B29,0xE9A9, // - 0x9B2A,0xE9AA, // - 0x9B2E,0xE9AB, // - 0x9B2F,0xE9AC, // - 0x9B31,0x9F54, // - 0x9B32,0xE9AD, // - 0x9B3B,0xE2F6, // - 0x9B3C,0x8B53, // - 0x9B41,0x8A40, // - 0x9B42,0x8DB0, // - 0x9B43,0xE9AF, // - 0x9B44,0xE9AE, // - 0x9B45,0x96A3, // - 0x9B4D,0xE9B1, // - 0x9B4E,0xE9B2, // - 0x9B4F,0xE9B0, // - 0x9B51,0xE9B3, // - 0x9B54,0x9682, // - 0x9B58,0xE9B4, // - 0x9B5A,0x8B9B, // - 0x9B6F,0x9844, // - 0x9B74,0xE9B5, // - 0x9B83,0xE9B7, // - 0x9B8E,0x88BC, // - 0x9B91,0xE9B8, // - 0x9B92,0x95A9, // - 0x9B93,0xE9B6, // - 0x9B96,0xE9B9, // - 0x9B97,0xE9BA, // - 0x9B9F,0xE9BB, // - 0x9BA0,0xE9BC, // - 0x9BA8,0xE9BD, // - 0x9BAA,0x968E, // - 0x9BAB,0x8E4C, // - 0x9BAD,0x8DF8, // - 0x9BAE,0x914E, // - 0x9BB4,0xE9BE, // - 0x9BB9,0xE9C1, // - 0x9BC0,0xE9BF, // - 0x9BC6,0xE9C2, // - 0x9BC9,0x8CEF, // - 0x9BCA,0xE9C0, // - 0x9BCF,0xE9C3, // - 0x9BD1,0xE9C4, // - 0x9BD2,0xE9C5, // - 0x9BD4,0xE9C9, // - 0x9BD6,0x8E49, // - 0x9BDB,0x91E2, // - 0x9BE1,0xE9CA, // - 0x9BE2,0xE9C7, // - 0x9BE3,0xE9C6, // - 0x9BE4,0xE9C8, // - 0x9BE8,0x8C7E, // - 0x9BF0,0xE9CE, // - 0x9BF1,0xE9CD, // - 0x9BF2,0xE9CC, // - 0x9BF5,0x88B1, // - 0x9C04,0xE9D8, // - 0x9C06,0xE9D4, // - 0x9C08,0xE9D5, // - 0x9C09,0xE9D1, // - 0x9C0A,0xE9D7, // - 0x9C0C,0xE9D3, // - 0x9C0D,0x8A82, // - 0x9C10,0x986B, // - 0x9C12,0xE9D6, // - 0x9C13,0xE9D2, // - 0x9C14,0xE9D0, // - 0x9C15,0xE9CF, // - 0x9C1B,0xE9DA, // - 0x9C21,0xE9DD, // - 0x9C24,0xE9DC, // - 0x9C25,0xE9DB, // - 0x9C2D,0x9568, // - 0x9C2E,0xE9D9, // - 0x9C2F,0x88F1, // - 0x9C30,0xE9DE, // - 0x9C32,0xE9E0, // - 0x9C39,0x8A8F, // - 0x9C3A,0xE9CB, // - 0x9C3B,0x8956, // - 0x9C3E,0xE9E2, // - 0x9C46,0xE9E1, // - 0x9C47,0xE9DF, // - 0x9C48,0x924C, // - 0x9C52,0x9690, // - 0x9C57,0x97D8, // - 0x9C5A,0xE9E3, // - 0x9C60,0xE9E4, // - 0x9C67,0xE9E5, // - 0x9C76,0xE9E6, // - 0x9C78,0xE9E7, // - 0x9CE5,0x92B9, // - 0x9CE7,0xE9E8, // - 0x9CE9,0x94B5, // - 0x9CEB,0xE9ED, // - 0x9CEC,0xE9E9, // - 0x9CF0,0xE9EA, // - 0x9CF3,0x9650, // - 0x9CF4,0x96C2, // - 0x9CF6,0x93CE, // - 0x9D03,0xE9EE, // - 0x9D06,0xE9EF, // - 0x9D07,0x93BC, // - 0x9D08,0xE9EC, // - 0x9D09,0xE9EB, // - 0x9D0E,0x89A8, // - 0x9D12,0xE9F7, // - 0x9D15,0xE9F6, // - 0x9D1B,0x8995, // - 0x9D1F,0xE9F4, // - 0x9D23,0xE9F3, // - 0x9D26,0xE9F1, // - 0x9D28,0x8A9B, // - 0x9D2A,0xE9F0, // - 0x9D2B,0x8EB0, // - 0x9D2C,0x89A7, // - 0x9D3B,0x8D83, // - 0x9D3E,0xE9FA, // - 0x9D3F,0xE9F9, // - 0x9D41,0xE9F8, // - 0x9D44,0xE9F5, // - 0x9D46,0xE9FB, // - 0x9D48,0xE9FC, // - 0x9D50,0xEA44, // - 0x9D51,0xEA43, // - 0x9D59,0xEA45, // - 0x9D5C,0x894C, // - 0x9D5D,0xEA40, // - 0x9D5E,0xEA41, // - 0x9D60,0x8D94, // - 0x9D61,0x96B7, // - 0x9D64,0xEA42, // - 0x9D6C,0x9651, // - 0x9D6F,0xEA4A, // - 0x9D72,0xEA46, // - 0x9D7A,0xEA4B, // - 0x9D87,0xEA48, // - 0x9D89,0xEA47, // - 0x9D8F,0x8C7B, // - 0x9D9A,0xEA4C, // - 0x9DA4,0xEA4D, // - 0x9DA9,0xEA4E, // - 0x9DAB,0xEA49, // - 0x9DAF,0xE9F2, // - 0x9DB2,0xEA4F, // - 0x9DB4,0x92DF, // - 0x9DB8,0xEA53, // - 0x9DBA,0xEA54, // - 0x9DBB,0xEA52, // - 0x9DC1,0xEA51, // - 0x9DC2,0xEA57, // - 0x9DC4,0xEA50, // - 0x9DC6,0xEA55, // - 0x9DCF,0xEA56, // - 0x9DD3,0xEA59, // - 0x9DD9,0xEA58, // - 0x9DED,0xEA5C, // - 0x9DEF,0xEA5D, // - 0x9DF2,0x9868, // - 0x9DF8,0xEA5A, // - 0x9DF9,0x91E9, // - 0x9DFA,0x8DEB, // - 0x9DFD,0xEA5E, // - 0x9E1A,0xEA5F, // - 0x9E1B,0xEA60, // - 0x9E1E,0xEA61, // - 0x9E75,0xEA62, // - 0x9E78,0x8CB2, // - 0x9E79,0xEA63, // - 0x9E7D,0xEA64, // - 0x9E7F,0x8EAD, // - 0x9E81,0xEA65, // - 0x9E88,0xEA66, // - 0x9E8B,0xEA67, // - 0x9E8C,0xEA68, // - 0x9E91,0xEA6B, // - 0x9E92,0xEA69, // - 0x9E95,0xEA6A, // - 0x9E97,0x97ED, // - 0x9E9D,0xEA6C, // - 0x9E9F,0x97D9, // - 0x9EA5,0xEA6D, // - 0x9EA6,0x949E, // - 0x9EA9,0xEA6E, // - 0x9EAA,0xEA70, // - 0x9EAD,0xEA71, // - 0x9EB8,0xEA6F, // - 0x9EB9,0x8D8D, // - 0x9EBA,0x96CB, // - 0x9EBB,0x9683, // - 0x9EBC,0x9BF5, // - 0x9EBE,0x9F80, // - 0x9EBF,0x969B, // - 0x9EC4,0x89A9, // - 0x9ECC,0xEA73, // - 0x9ECD,0x8B6F, // - 0x9ECE,0xEA74, // - 0x9ECF,0xEA75, // - 0x9ED0,0xEA76, // - 0x9ED2,0x8D95, // - 0x9ED4,0xEA77, // - 0x9ED8,0xE0D2, // - 0x9ED9,0x96D9, // - 0x9EDB,0x91E1, // - 0x9EDC,0xEA78, // - 0x9EDD,0xEA7A, // - 0x9EDE,0xEA79, // - 0x9EE0,0xEA7B, // - 0x9EE5,0xEA7C, // - 0x9EE8,0xEA7D, // - 0x9EEF,0xEA7E, // - 0x9EF4,0xEA80, // - 0x9EF6,0xEA81, // - 0x9EF7,0xEA82, // - 0x9EF9,0xEA83, // - 0x9EFB,0xEA84, // - 0x9EFC,0xEA85, // - 0x9EFD,0xEA86, // - 0x9F07,0xEA87, // - 0x9F08,0xEA88, // - 0x9F0E,0x9343, // - 0x9F13,0x8CDB, // - 0x9F15,0xEA8A, // - 0x9F20,0x916C, // - 0x9F21,0xEA8B, // - 0x9F2C,0xEA8C, // - 0x9F3B,0x9540, // - 0x9F3E,0xEA8D, // - 0x9F4A,0xEA8E, // - 0x9F4B,0xE256, // - 0x9F4E,0xE6D8, // - 0x9F4F,0xE8EB, // - 0x9F52,0xEA8F, // - 0x9F54,0xEA90, // - 0x9F5F,0xEA92, // - 0x9F60,0xEA93, // - 0x9F61,0xEA94, // - 0x9F62,0x97EE, // - 0x9F63,0xEA91, // - 0x9F66,0xEA95, // - 0x9F67,0xEA96, // - 0x9F6A,0xEA98, // - 0x9F6C,0xEA97, // - 0x9F72,0xEA9A, // - 0x9F76,0xEA9B, // - 0x9F77,0xEA99, // - 0x9F8D,0x97B4, // - 0x9F95,0xEA9C, // - 0x9F9C,0xEA9D, // - 0x9F9D,0xE273, // - 0x9FA0,0xEA9E, // - 0xFF01,0x8149, // FULLWIDTH EXCLAMATION MARK - 0xFF03,0x8194, // FULLWIDTH NUMBER SIGN - 0xFF04,0x8190, // FULLWIDTH DOLLAR SIGN - 0xFF05,0x8193, // FULLWIDTH PERCENT SIGN - 0xFF06,0x8195, // FULLWIDTH AMPERSAND - 0xFF07,0x81AD, // FULLWIDTH APOSTROPHE - 0xFF08,0x8169, // FULLWIDTH LEFT PARENTHESIS - 0xFF09,0x816A, // FULLWIDTH RIGHT PARENTHESIS - 0xFF0A,0x8196, // FULLWIDTH ASTERISK - 0xFF0B,0x817B, // FULLWIDTH PLUS SIGN - 0xFF0C,0x8143, // FULLWIDTH COMMA - 0xFF0E,0x8144, // FULLWIDTH FULL STOP - 0xFF0F,0x815E, // FULLWIDTH SOLIDUS - 0xFF10,0x824F, // FULLWIDTH DIGIT ZERO - 0xFF11,0x8250, // FULLWIDTH DIGIT ONE - 0xFF12,0x8251, // FULLWIDTH DIGIT TWO - 0xFF13,0x8252, // FULLWIDTH DIGIT THREE - 0xFF14,0x8253, // FULLWIDTH DIGIT FOUR - 0xFF15,0x8254, // FULLWIDTH DIGIT FIVE - 0xFF16,0x8255, // FULLWIDTH DIGIT SIX - 0xFF17,0x8256, // FULLWIDTH DIGIT SEVEN - 0xFF18,0x8257, // FULLWIDTH DIGIT EIGHT - 0xFF19,0x8258, // FULLWIDTH DIGIT NINE - 0xFF1A,0x8146, // FULLWIDTH COLON - 0xFF1B,0x8147, // FULLWIDTH SEMICOLON - 0xFF1C,0x8183, // FULLWIDTH LESS-THAN SIGN - 0xFF1D,0x8181, // FULLWIDTH EQUALS SIGN - 0xFF1E,0x8184, // FULLWIDTH GREATER-THAN SIGN - 0xFF1F,0x8148, // FULLWIDTH QUESTION MARK - 0xFF20,0x8197, // FULLWIDTH COMMERCIAL AT - 0xFF21,0x8260, // FULLWIDTH LATIN CAPITAL LETTER A - 0xFF22,0x8261, // FULLWIDTH LATIN CAPITAL LETTER B - 0xFF23,0x8262, // FULLWIDTH LATIN CAPITAL LETTER C - 0xFF24,0x8263, // FULLWIDTH LATIN CAPITAL LETTER D - 0xFF25,0x8264, // FULLWIDTH LATIN CAPITAL LETTER E - 0xFF26,0x8265, // FULLWIDTH LATIN CAPITAL LETTER F - 0xFF27,0x8266, // FULLWIDTH LATIN CAPITAL LETTER G - 0xFF28,0x8267, // FULLWIDTH LATIN CAPITAL LETTER H - 0xFF29,0x8268, // FULLWIDTH LATIN CAPITAL LETTER I - 0xFF2A,0x8269, // FULLWIDTH LATIN CAPITAL LETTER J - 0xFF2B,0x826A, // FULLWIDTH LATIN CAPITAL LETTER K - 0xFF2C,0x826B, // FULLWIDTH LATIN CAPITAL LETTER L - 0xFF2D,0x826C, // FULLWIDTH LATIN CAPITAL LETTER M - 0xFF2E,0x826D, // FULLWIDTH LATIN CAPITAL LETTER N - 0xFF2F,0x826E, // FULLWIDTH LATIN CAPITAL LETTER O - 0xFF30,0x826F, // FULLWIDTH LATIN CAPITAL LETTER P - 0xFF31,0x8270, // FULLWIDTH LATIN CAPITAL LETTER Q - 0xFF32,0x8271, // FULLWIDTH LATIN CAPITAL LETTER R - 0xFF33,0x8272, // FULLWIDTH LATIN CAPITAL LETTER S - 0xFF34,0x8273, // FULLWIDTH LATIN CAPITAL LETTER T - 0xFF35,0x8274, // FULLWIDTH LATIN CAPITAL LETTER U - 0xFF36,0x8275, // FULLWIDTH LATIN CAPITAL LETTER V - 0xFF37,0x8276, // FULLWIDTH LATIN CAPITAL LETTER W - 0xFF38,0x8277, // FULLWIDTH LATIN CAPITAL LETTER X - 0xFF39,0x8278, // FULLWIDTH LATIN CAPITAL LETTER Y - 0xFF3A,0x8279, // FULLWIDTH LATIN CAPITAL LETTER Z - 0xFF3B,0x816D, // FULLWIDTH LEFT SQUARE BRACKET - 0xFF3D,0x816E, // FULLWIDTH RIGHT SQUARE BRACKET - 0xFF3E,0x814F, // FULLWIDTH CIRCUMFLEX ACCENT - 0xFF3F,0x8151, // FULLWIDTH LOW LINE - 0xFF40,0x814D, // FULLWIDTH GRAVE ACCENT - 0xFF41,0x8281, // FULLWIDTH LATIN SMALL LETTER A - 0xFF42,0x8282, // FULLWIDTH LATIN SMALL LETTER B - 0xFF43,0x8283, // FULLWIDTH LATIN SMALL LETTER C - 0xFF44,0x8284, // FULLWIDTH LATIN SMALL LETTER D - 0xFF45,0x8285, // FULLWIDTH LATIN SMALL LETTER E - 0xFF46,0x8286, // FULLWIDTH LATIN SMALL LETTER F - 0xFF47,0x8287, // FULLWIDTH LATIN SMALL LETTER G - 0xFF48,0x8288, // FULLWIDTH LATIN SMALL LETTER H - 0xFF49,0x8289, // FULLWIDTH LATIN SMALL LETTER I - 0xFF4A,0x828A, // FULLWIDTH LATIN SMALL LETTER J - 0xFF4B,0x828B, // FULLWIDTH LATIN SMALL LETTER K - 0xFF4C,0x828C, // FULLWIDTH LATIN SMALL LETTER L - 0xFF4D,0x828D, // FULLWIDTH LATIN SMALL LETTER M - 0xFF4E,0x828E, // FULLWIDTH LATIN SMALL LETTER N - 0xFF4F,0x828F, // FULLWIDTH LATIN SMALL LETTER O - 0xFF50,0x8290, // FULLWIDTH LATIN SMALL LETTER P - 0xFF51,0x8291, // FULLWIDTH LATIN SMALL LETTER Q - 0xFF52,0x8292, // FULLWIDTH LATIN SMALL LETTER R - 0xFF53,0x8293, // FULLWIDTH LATIN SMALL LETTER S - 0xFF54,0x8294, // FULLWIDTH LATIN SMALL LETTER T - 0xFF55,0x8295, // FULLWIDTH LATIN SMALL LETTER U - 0xFF56,0x8296, // FULLWIDTH LATIN SMALL LETTER V - 0xFF57,0x8297, // FULLWIDTH LATIN SMALL LETTER W - 0xFF58,0x8298, // FULLWIDTH LATIN SMALL LETTER X - 0xFF59,0x8299, // FULLWIDTH LATIN SMALL LETTER Y - 0xFF5A,0x829A, // FULLWIDTH LATIN SMALL LETTER Z - 0xFF5B,0x816F, // FULLWIDTH LEFT CURLY BRACKET - 0xFF5C,0x8162, // FULLWIDTH VERTICAL LINE - 0xFF5D,0x8170, // FULLWIDTH RIGHT CURLY BRACKET - 0xFFE3,0x8150, // FULLWIDTH MACRON - 0xFFE5,0x818F // FULLWIDTH YEN SIGN + 0x005C, 0x815F, // REVERSE SOLIDUS + 0x00A2, 0x8191, // CENT SIGN + 0x00A3, 0x8192, // POUND SIGN + 0x00A7, 0x8198, // SECTION SIGN + 0x00A8, 0x814E, // DIAERESIS + 0x00AC, 0x81CA, // NOT SIGN + 0x00B0, 0x818B, // DEGREE SIGN + 0x00B1, 0x817D, // PLUS-MINUS SIGN + 0x00B4, 0x814C, // ACUTE ACCENT + 0x00B6, 0x81F7, // PILCROW SIGN + 0x00D7, 0x817E, // MULTIPLICATION SIGN + 0x00F7, 0x8180, // DIVISION SIGN + 0x0391, 0x839F, // GREEK CAPITAL LETTER ALPHA + 0x0392, 0x83A0, // GREEK CAPITAL LETTER BETA + 0x0393, 0x83A1, // GREEK CAPITAL LETTER GAMMA + 0x0394, 0x83A2, // GREEK CAPITAL LETTER DELTA + 0x0395, 0x83A3, // GREEK CAPITAL LETTER EPSILON + 0x0396, 0x83A4, // GREEK CAPITAL LETTER ZETA + 0x0397, 0x83A5, // GREEK CAPITAL LETTER ETA + 0x0398, 0x83A6, // GREEK CAPITAL LETTER THETA + 0x0399, 0x83A7, // GREEK CAPITAL LETTER IOTA + 0x039A, 0x83A8, // GREEK CAPITAL LETTER KAPPA + 0x039B, 0x83A9, // GREEK CAPITAL LETTER LAMDA + 0x039C, 0x83AA, // GREEK CAPITAL LETTER MU + 0x039D, 0x83AB, // GREEK CAPITAL LETTER NU + 0x039E, 0x83AC, // GREEK CAPITAL LETTER XI + 0x039F, 0x83AD, // GREEK CAPITAL LETTER OMICRON + 0x03A0, 0x83AE, // GREEK CAPITAL LETTER PI + 0x03A1, 0x83AF, // GREEK CAPITAL LETTER RHO + 0x03A3, 0x83B0, // GREEK CAPITAL LETTER SIGMA + 0x03A4, 0x83B1, // GREEK CAPITAL LETTER TAU + 0x03A5, 0x83B2, // GREEK CAPITAL LETTER UPSILON + 0x03A6, 0x83B3, // GREEK CAPITAL LETTER PHI + 0x03A7, 0x83B4, // GREEK CAPITAL LETTER CHI + 0x03A8, 0x83B5, // GREEK CAPITAL LETTER PSI + 0x03A9, 0x83B6, // GREEK CAPITAL LETTER OMEGA + 0x03B1, 0x83BF, // GREEK SMALL LETTER ALPHA + 0x03B2, 0x83C0, // GREEK SMALL LETTER BETA + 0x03B3, 0x83C1, // GREEK SMALL LETTER GAMMA + 0x03B4, 0x83C2, // GREEK SMALL LETTER DELTA + 0x03B5, 0x83C3, // GREEK SMALL LETTER EPSILON + 0x03B6, 0x83C4, // GREEK SMALL LETTER ZETA + 0x03B7, 0x83C5, // GREEK SMALL LETTER ETA + 0x03B8, 0x83C6, // GREEK SMALL LETTER THETA + 0x03B9, 0x83C7, // GREEK SMALL LETTER IOTA + 0x03BA, 0x83C8, // GREEK SMALL LETTER KAPPA + 0x03BB, 0x83C9, // GREEK SMALL LETTER LAMDA + 0x03BC, 0x83CA, // GREEK SMALL LETTER MU + 0x03BD, 0x83CB, // GREEK SMALL LETTER NU + 0x03BE, 0x83CC, // GREEK SMALL LETTER XI + 0x03BF, 0x83CD, // GREEK SMALL LETTER OMICRON + 0x03C0, 0x83CE, // GREEK SMALL LETTER PI + 0x03C1, 0x83CF, // GREEK SMALL LETTER RHO + 0x03C3, 0x83D0, // GREEK SMALL LETTER SIGMA + 0x03C4, 0x83D1, // GREEK SMALL LETTER TAU + 0x03C5, 0x83D2, // GREEK SMALL LETTER UPSILON + 0x03C6, 0x83D3, // GREEK SMALL LETTER PHI + 0x03C7, 0x83D4, // GREEK SMALL LETTER CHI + 0x03C8, 0x83D5, // GREEK SMALL LETTER PSI + 0x03C9, 0x83D6, // GREEK SMALL LETTER OMEGA + 0x0401, 0x8446, // CYRILLIC CAPITAL LETTER IO + 0x0410, 0x8440, // CYRILLIC CAPITAL LETTER A + 0x0411, 0x8441, // CYRILLIC CAPITAL LETTER BE + 0x0412, 0x8442, // CYRILLIC CAPITAL LETTER VE + 0x0413, 0x8443, // CYRILLIC CAPITAL LETTER GHE + 0x0414, 0x8444, // CYRILLIC CAPITAL LETTER DE + 0x0415, 0x8445, // CYRILLIC CAPITAL LETTER IE + 0x0416, 0x8447, // CYRILLIC CAPITAL LETTER ZHE + 0x0417, 0x8448, // CYRILLIC CAPITAL LETTER ZE + 0x0418, 0x8449, // CYRILLIC CAPITAL LETTER I + 0x0419, 0x844A, // CYRILLIC CAPITAL LETTER SHORT I + 0x041A, 0x844B, // CYRILLIC CAPITAL LETTER KA + 0x041B, 0x844C, // CYRILLIC CAPITAL LETTER EL + 0x041C, 0x844D, // CYRILLIC CAPITAL LETTER EM + 0x041D, 0x844E, // CYRILLIC CAPITAL LETTER EN + 0x041E, 0x844F, // CYRILLIC CAPITAL LETTER O + 0x041F, 0x8450, // CYRILLIC CAPITAL LETTER PE + 0x0420, 0x8451, // CYRILLIC CAPITAL LETTER ER + 0x0421, 0x8452, // CYRILLIC CAPITAL LETTER ES + 0x0422, 0x8453, // CYRILLIC CAPITAL LETTER TE + 0x0423, 0x8454, // CYRILLIC CAPITAL LETTER U + 0x0424, 0x8455, // CYRILLIC CAPITAL LETTER EF + 0x0425, 0x8456, // CYRILLIC CAPITAL LETTER HA + 0x0426, 0x8457, // CYRILLIC CAPITAL LETTER TSE + 0x0427, 0x8458, // CYRILLIC CAPITAL LETTER CHE + 0x0428, 0x8459, // CYRILLIC CAPITAL LETTER SHA + 0x0429, 0x845A, // CYRILLIC CAPITAL LETTER SHCHA + 0x042B, 0x845C, // CYRILLIC CAPITAL LETTER YERU + 0x042C, 0x845D, // CYRILLIC CAPITAL LETTER SOFT SIGN + 0x042D, 0x845E, // CYRILLIC CAPITAL LETTER E + 0x042E, 0x845F, // CYRILLIC CAPITAL LETTER YU + 0x042F, 0x8460, // CYRILLIC CAPITAL LETTER YA + 0x0430, 0x8470, // CYRILLIC SMALL LETTER A + 0x0431, 0x8471, // CYRILLIC SMALL LETTER BE + 0x0432, 0x8472, // CYRILLIC SMALL LETTER VE + 0x0433, 0x8473, // CYRILLIC SMALL LETTER GHE + 0x0434, 0x8474, // CYRILLIC SMALL LETTER DE + 0x0435, 0x8475, // CYRILLIC SMALL LETTER IE + 0x0436, 0x8477, // CYRILLIC SMALL LETTER ZHE + 0x0437, 0x8478, // CYRILLIC SMALL LETTER ZE + 0x0438, 0x8479, // CYRILLIC SMALL LETTER I + 0x0439, 0x847A, // CYRILLIC SMALL LETTER SHORT I + 0x043A, 0x847B, // CYRILLIC SMALL LETTER KA + 0x043B, 0x847C, // CYRILLIC SMALL LETTER EL + 0x043C, 0x847D, // CYRILLIC SMALL LETTER EM + 0x043D, 0x847E, // CYRILLIC SMALL LETTER EN + 0x043E, 0x8480, // CYRILLIC SMALL LETTER O + 0x043F, 0x8481, // CYRILLIC SMALL LETTER PE + 0x0440, 0x8482, // CYRILLIC SMALL LETTER ER + 0x0441, 0x8483, // CYRILLIC SMALL LETTER ES + 0x0442, 0x8484, // CYRILLIC SMALL LETTER TE + 0x0443, 0x8485, // CYRILLIC SMALL LETTER U + 0x0444, 0x8486, // CYRILLIC SMALL LETTER EF + 0x0445, 0x8487, // CYRILLIC SMALL LETTER HA + 0x0446, 0x8488, // CYRILLIC SMALL LETTER TSE + 0x0447, 0x8489, // CYRILLIC SMALL LETTER CHE + 0x0448, 0x848A, // CYRILLIC SMALL LETTER SHA + 0x0449, 0x848B, // CYRILLIC SMALL LETTER SHCHA + 0x044A, 0x848C, // CYRILLIC SMALL LETTER HARD SIGN + 0x044B, 0x848D, // CYRILLIC SMALL LETTER YERU + 0x044C, 0x848E, // CYRILLIC SMALL LETTER SOFT SIGN + 0x044D, 0x848F, // CYRILLIC SMALL LETTER E + 0x044E, 0x8490, // CYRILLIC SMALL LETTER YU + 0x044F, 0x8491, // CYRILLIC SMALL LETTER YA + 0x0451, 0x8476, // CYRILLIC SMALL LETTER IO + 0x2010, 0x815D, // HYPHEN + 0x2014, 0x815C, // EM DASH + 0x2016, 0x8161, // DOUBLE VERTICAL LINE + 0x2018, 0x8165, // LEFT SINGLE QUOTATION MARK + 0x2019, 0x8166, // RIGHT SINGLE QUOTATION MARK + 0x201C, 0x8167, // LEFT DOUBLE QUOTATION MARK + 0x201D, 0x8168, // RIGHT DOUBLE QUOTATION MARK + 0x2020, 0x81F5, // DAGGER + 0x2021, 0x81F6, // DOUBLE DAGGER + 0x2025, 0x8164, // TWO DOT LEADER + 0x2026, 0x8163, // HORIZONTAL ELLIPSIS + 0x2030, 0x81F1, // PER MILLE SIGN + 0x2032, 0x818C, // PRIME + 0x2033, 0x818D, // DOUBLE PRIME + 0x203B, 0x81A6, // REFERENCE MARK + 0x2103, 0x818E, // DEGREE CELSIUS + 0x212B, 0x81F0, // ANGSTROM SIGN + 0x2190, 0x81A9, // LEFTWARDS ARROW + 0x2191, 0x81AA, // UPWARDS ARROW + 0x2192, 0x81A8, // RIGHTWARDS ARROW + 0x2193, 0x81AB, // DOWNWARDS ARROW + 0x21D2, 0x81CB, // RIGHTWARDS DOUBLE ARROW + 0x21D4, 0x81CC, // LEFT RIGHT DOUBLE ARROW + 0x2200, 0x81CD, // FOR ALL + 0x2202, 0x81DD, // PARTIAL DIFFERENTIAL + 0x2203, 0x81CE, // THERE EXISTS + 0x2207, 0x81DE, // NABLA + 0x2208, 0x81B8, // ELEMENT OF + 0x220B, 0x81B9, // CONTAINS AS MEMBER + 0x2212, 0x817C, // MINUS SIGN + 0x221A, 0x81E3, // SQUARE ROOT + 0x221D, 0x81E5, // PROPORTIONAL TO + 0x221E, 0x8187, // INFINITY + 0x2220, 0x81DA, // ANGLE + 0x2227, 0x81C8, // LOGICAL AND + 0x2228, 0x81C9, // LOGICAL OR + 0x2229, 0x81BF, // INTERSECTION + 0x222A, 0x81BE, // UNION + 0x222B, 0x81E7, // INTEGRAL + 0x222C, 0x81E8, // DOUBLE INTEGRAL + 0x2234, 0x8188, // THEREFORE + 0x2235, 0x81E6, // BECAUSE + 0x223D, 0x81E4, // REVERSED TILDE + 0x2252, 0x81E0, // APPROXIMATELY EQUAL TO OR THE IMAGE OF + 0x2260, 0x8182, // NOT EQUAL TO + 0x2261, 0x81DF, // IDENTICAL TO + 0x2266, 0x8185, // LESS-THAN OVER EQUAL TO + 0x2267, 0x8186, // GREATER-THAN OVER EQUAL TO + 0x226A, 0x81E1, // MUCH LESS-THAN + 0x226B, 0x81E2, // MUCH GREATER-THAN + 0x2282, 0x81BC, // SUBSET OF + 0x2283, 0x81BD, // SUPERSET OF + 0x2286, 0x81BA, // SUBSET OF OR EQUAL TO + 0x2287, 0x81BB, // SUPERSET OF OR EQUAL TO + 0x22A5, 0x81DB, // UP TACK + 0x2312, 0x81DC, // ARC + 0x2500, 0x849F, // BOX DRAWINGS LIGHT HORIZONTAL + 0x2501, 0x84AA, // BOX DRAWINGS HEAVY HORIZONTAL + 0x2502, 0x84A0, // BOX DRAWINGS LIGHT VERTICAL + 0x2503, 0x84AB, // BOX DRAWINGS HEAVY VERTICAL + 0x250C, 0x84A1, // BOX DRAWINGS LIGHT DOWN AND RIGHT + 0x250F, 0x84AC, // BOX DRAWINGS HEAVY DOWN AND RIGHT + 0x2510, 0x84A2, // BOX DRAWINGS LIGHT DOWN AND LEFT + 0x2513, 0x84AD, // BOX DRAWINGS HEAVY DOWN AND LEFT + 0x2514, 0x84A4, // BOX DRAWINGS LIGHT UP AND RIGHT + 0x2517, 0x84AF, // BOX DRAWINGS HEAVY UP AND RIGHT + 0x2518, 0x84A3, // BOX DRAWINGS LIGHT UP AND LEFT + 0x251B, 0x84AE, // BOX DRAWINGS HEAVY UP AND LEFT + 0x251C, 0x84A5, // BOX DRAWINGS LIGHT VERTICAL AND RIGHT + 0x251D, 0x84BA, // BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY + 0x2520, 0x84B5, // BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT + 0x2523, 0x84B0, // BOX DRAWINGS HEAVY VERTICAL AND RIGHT + 0x2524, 0x84A7, // BOX DRAWINGS LIGHT VERTICAL AND LEFT + 0x2525, 0x84BC, // BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY + 0x2528, 0x84B7, // BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT + 0x252B, 0x84B2, // BOX DRAWINGS HEAVY VERTICAL AND LEFT + 0x252C, 0x84A6, // BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + 0x252F, 0x84B6, // BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY + 0x2530, 0x84BB, // BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT + 0x2533, 0x84B1, // BOX DRAWINGS HEAVY DOWN AND HORIZONTAL + 0x2534, 0x84A8, // BOX DRAWINGS LIGHT UP AND HORIZONTAL + 0x2537, 0x84B8, // BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY + 0x2538, 0x84BD, // BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT + 0x253B, 0x84B3, // BOX DRAWINGS HEAVY UP AND HORIZONTAL + 0x253C, 0x84A9, // BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + 0x253F, 0x84B9, // BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY + 0x2542, 0x84BE, // BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT + 0x254B, 0x84B4, // BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL + 0x25A0, 0x81A1, // BLACK SQUARE + 0x25A1, 0x81A0, // WHITE SQUARE + 0x25B2, 0x81A3, // BLACK UP-POINTING TRIANGLE + 0x25B3, 0x81A2, // WHITE UP-POINTING TRIANGLE + 0x25BC, 0x81A5, // BLACK DOWN-POINTING TRIANGLE + 0x25BD, 0x81A4, // WHITE DOWN-POINTING TRIANGLE + 0x25C6, 0x819F, // BLACK DIAMOND + 0x25C7, 0x819E, // WHITE DIAMOND + 0x25CB, 0x819B, // WHITE CIRCLE + 0x25CE, 0x819D, // BULLSEYE + 0x25CF, 0x819C, // BLACK CIRCLE + 0x25EF, 0x81FC, // LARGE CIRCLE + 0x2605, 0x819A, // BLACK STAR + 0x2606, 0x8199, // WHITE STAR + 0x2640, 0x818A, // FEMALE SIGN + 0x2642, 0x8189, // MALE SIGN + 0x266A, 0x81F4, // EIGHTH NOTE + 0x266D, 0x81F3, // MUSIC FLAT SIGN + 0x266F, 0x81F2, // MUSIC SHARP SIGN + 0x3000, 0x8140, // IDEOGRAPHIC SPACE + 0x3001, 0x8141, // IDEOGRAPHIC COMMA + 0x3002, 0x8142, // IDEOGRAPHIC FULL STOP + 0x3003, 0x8156, // DITTO MARK + 0x3005, 0x8158, // IDEOGRAPHIC ITERATION MARK + 0x3006, 0x8159, // IDEOGRAPHIC CLOSING MARK + 0x3007, 0x815A, // IDEOGRAPHIC NUMBER ZERO + 0x3008, 0x8171, // LEFT ANGLE BRACKET + 0x3009, 0x8172, // RIGHT ANGLE BRACKET + 0x300A, 0x8173, // LEFT DOUBLE ANGLE BRACKET + 0x300B, 0x8174, // RIGHT DOUBLE ANGLE BRACKET + 0x300C, 0x8175, // LEFT CORNER BRACKET + 0x300D, 0x8176, // RIGHT CORNER BRACKET + 0x300E, 0x8177, // LEFT WHITE CORNER BRACKET + 0x300F, 0x8178, // RIGHT WHITE CORNER BRACKET + 0x3010, 0x8179, // LEFT BLACK LENTICULAR BRACKET + 0x3011, 0x817A, // RIGHT BLACK LENTICULAR BRACKET + 0x3012, 0x81A7, // POSTAL MARK + 0x3013, 0x81AC, // GETA MARK + 0x3014, 0x816B, // LEFT TORTOISE SHELL BRACKET + 0x3015, 0x816C, // RIGHT TORTOISE SHELL BRACKET + 0x301C, 0x8160, // WAVE DASH + 0x3041, 0x829F, // HIRAGANA LETTER SMALL A + 0x3042, 0x82A0, // HIRAGANA LETTER A + 0x3043, 0x82A1, // HIRAGANA LETTER SMALL I + 0x3044, 0x82A2, // HIRAGANA LETTER I + 0x3045, 0x82A3, // HIRAGANA LETTER SMALL U + 0x3046, 0x82A4, // HIRAGANA LETTER U + 0x3047, 0x82A5, // HIRAGANA LETTER SMALL E + 0x3048, 0x82A6, // HIRAGANA LETTER E + 0x3049, 0x82A7, // HIRAGANA LETTER SMALL O + 0x304A, 0x82A8, // HIRAGANA LETTER O + 0x304B, 0x82A9, // HIRAGANA LETTER KA + 0x304C, 0x82AA, // HIRAGANA LETTER GA + 0x304D, 0x82AB, // HIRAGANA LETTER KI + 0x304E, 0x82AC, // HIRAGANA LETTER GI + 0x304F, 0x82AD, // HIRAGANA LETTER KU + 0x3050, 0x82AE, // HIRAGANA LETTER GU + 0x3051, 0x82AF, // HIRAGANA LETTER KE + 0x3052, 0x82B0, // HIRAGANA LETTER GE + 0x3053, 0x82B1, // HIRAGANA LETTER KO + 0x3054, 0x82B2, // HIRAGANA LETTER GO + 0x3055, 0x82B3, // HIRAGANA LETTER SA + 0x3056, 0x82B4, // HIRAGANA LETTER ZA + 0x3057, 0x82B5, // HIRAGANA LETTER SI + 0x3058, 0x82B6, // HIRAGANA LETTER ZI + 0x3059, 0x82B7, // HIRAGANA LETTER SU + 0x305A, 0x82B8, // HIRAGANA LETTER ZU + 0x305B, 0x82B9, // HIRAGANA LETTER SE + 0x305C, 0x82BA, // HIRAGANA LETTER ZE + 0x305D, 0x82BB, // HIRAGANA LETTER SO + 0x305E, 0x82BC, // HIRAGANA LETTER ZO + 0x305F, 0x82BD, // HIRAGANA LETTER TA + 0x3060, 0x82BE, // HIRAGANA LETTER DA + 0x3061, 0x82BF, // HIRAGANA LETTER TI + 0x3062, 0x82C0, // HIRAGANA LETTER DI + 0x3063, 0x82C1, // HIRAGANA LETTER SMALL TU + 0x3064, 0x82C2, // HIRAGANA LETTER TU + 0x3065, 0x82C3, // HIRAGANA LETTER DU + 0x3066, 0x82C4, // HIRAGANA LETTER TE + 0x3067, 0x82C5, // HIRAGANA LETTER DE + 0x3068, 0x82C6, // HIRAGANA LETTER TO + 0x3069, 0x82C7, // HIRAGANA LETTER DO + 0x306A, 0x82C8, // HIRAGANA LETTER NA + 0x306B, 0x82C9, // HIRAGANA LETTER NI + 0x306C, 0x82CA, // HIRAGANA LETTER NU + 0x306D, 0x82CB, // HIRAGANA LETTER NE + 0x306E, 0x82CC, // HIRAGANA LETTER NO + 0x306F, 0x82CD, // HIRAGANA LETTER HA + 0x3070, 0x82CE, // HIRAGANA LETTER BA + 0x3071, 0x82CF, // HIRAGANA LETTER PA + 0x3072, 0x82D0, // HIRAGANA LETTER HI + 0x3073, 0x82D1, // HIRAGANA LETTER BI + 0x3074, 0x82D2, // HIRAGANA LETTER PI + 0x3075, 0x82D3, // HIRAGANA LETTER HU + 0x3076, 0x82D4, // HIRAGANA LETTER BU + 0x3077, 0x82D5, // HIRAGANA LETTER PU + 0x3078, 0x82D6, // HIRAGANA LETTER HE + 0x3079, 0x82D7, // HIRAGANA LETTER BE + 0x307A, 0x82D8, // HIRAGANA LETTER PE + 0x307B, 0x82D9, // HIRAGANA LETTER HO + 0x307C, 0x82DA, // HIRAGANA LETTER BO + 0x307D, 0x82DB, // HIRAGANA LETTER PO + 0x307E, 0x82DC, // HIRAGANA LETTER MA + 0x307F, 0x82DD, // HIRAGANA LETTER MI + 0x3080, 0x82DE, // HIRAGANA LETTER MU + 0x3081, 0x82DF, // HIRAGANA LETTER ME + 0x3082, 0x82E0, // HIRAGANA LETTER MO + 0x3083, 0x82E1, // HIRAGANA LETTER SMALL YA + 0x3084, 0x82E2, // HIRAGANA LETTER YA + 0x3085, 0x82E3, // HIRAGANA LETTER SMALL YU + 0x3086, 0x82E4, // HIRAGANA LETTER YU + 0x3087, 0x82E5, // HIRAGANA LETTER SMALL YO + 0x3088, 0x82E6, // HIRAGANA LETTER YO + 0x3089, 0x82E7, // HIRAGANA LETTER RA + 0x308A, 0x82E8, // HIRAGANA LETTER RI + 0x308B, 0x82E9, // HIRAGANA LETTER RU + 0x308C, 0x82EA, // HIRAGANA LETTER RE + 0x308D, 0x82EB, // HIRAGANA LETTER RO + 0x308E, 0x82EC, // HIRAGANA LETTER SMALL WA + 0x308F, 0x82ED, // HIRAGANA LETTER WA + 0x3090, 0x82EE, // HIRAGANA LETTER WI + 0x3091, 0x82EF, // HIRAGANA LETTER WE + 0x3092, 0x82F0, // HIRAGANA LETTER WO + 0x3093, 0x82F1, // HIRAGANA LETTER N + 0x309B, 0x814A, // KATAKANA-HIRAGANA VOICED SOUND MARK + 0x309C, 0x814B, // KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK + 0x309D, 0x8154, // HIRAGANA ITERATION MARK + 0x309E, 0x8155, // HIRAGANA VOICED ITERATION MARK + 0x30A1, 0x8340, // KATAKANA LETTER SMALL A + 0x30A2, 0x8341, // KATAKANA LETTER A + 0x30A3, 0x8342, // KATAKANA LETTER SMALL I + 0x30A4, 0x8343, // KATAKANA LETTER I + 0x30A5, 0x8344, // KATAKANA LETTER SMALL U + 0x30A6, 0x8345, // KATAKANA LETTER U + 0x30A7, 0x8346, // KATAKANA LETTER SMALL E + 0x30A8, 0x8347, // KATAKANA LETTER E + 0x30A9, 0x8348, // KATAKANA LETTER SMALL O + 0x30AA, 0x8349, // KATAKANA LETTER O + 0x30AB, 0x834A, // KATAKANA LETTER KA + 0x30AC, 0x834B, // KATAKANA LETTER GA + 0x30AD, 0x834C, // KATAKANA LETTER KI + 0x30AE, 0x834D, // KATAKANA LETTER GI + 0x30AF, 0x834E, // KATAKANA LETTER KU + 0x30B0, 0x834F, // KATAKANA LETTER GU + 0x30B1, 0x8350, // KATAKANA LETTER KE + 0x30B2, 0x8351, // KATAKANA LETTER GE + 0x30B3, 0x8352, // KATAKANA LETTER KO + 0x30B4, 0x8353, // KATAKANA LETTER GO + 0x30B5, 0x8354, // KATAKANA LETTER SA + 0x30B6, 0x8355, // KATAKANA LETTER ZA + 0x30B7, 0x8356, // KATAKANA LETTER SI + 0x30B8, 0x8357, // KATAKANA LETTER ZI + 0x30B9, 0x8358, // KATAKANA LETTER SU + 0x30BA, 0x8359, // KATAKANA LETTER ZU + 0x30BB, 0x835A, // KATAKANA LETTER SE + 0x30BD, 0x835C, // KATAKANA LETTER SO + 0x30BE, 0x835D, // KATAKANA LETTER ZO + 0x30BF, 0x835E, // KATAKANA LETTER TA + 0x30C0, 0x835F, // KATAKANA LETTER DA + 0x30C1, 0x8360, // KATAKANA LETTER TI + 0x30C2, 0x8361, // KATAKANA LETTER DI + 0x30C3, 0x8362, // KATAKANA LETTER SMALL TU + 0x30C4, 0x8363, // KATAKANA LETTER TU + 0x30C5, 0x8364, // KATAKANA LETTER DU + 0x30C6, 0x8365, // KATAKANA LETTER TE + 0x30C7, 0x8366, // KATAKANA LETTER DE + 0x30C8, 0x8367, // KATAKANA LETTER TO + 0x30C9, 0x8368, // KATAKANA LETTER DO + 0x30CA, 0x8369, // KATAKANA LETTER NA + 0x30CB, 0x836A, // KATAKANA LETTER NI + 0x30CC, 0x836B, // KATAKANA LETTER NU + 0x30CD, 0x836C, // KATAKANA LETTER NE + 0x30CE, 0x836D, // KATAKANA LETTER NO + 0x30CF, 0x836E, // KATAKANA LETTER HA + 0x30D0, 0x836F, // KATAKANA LETTER BA + 0x30D1, 0x8370, // KATAKANA LETTER PA + 0x30D2, 0x8371, // KATAKANA LETTER HI + 0x30D3, 0x8372, // KATAKANA LETTER BI + 0x30D4, 0x8373, // KATAKANA LETTER PI + 0x30D5, 0x8374, // KATAKANA LETTER HU + 0x30D6, 0x8375, // KATAKANA LETTER BU + 0x30D7, 0x8376, // KATAKANA LETTER PU + 0x30D8, 0x8377, // KATAKANA LETTER HE + 0x30D9, 0x8378, // KATAKANA LETTER BE + 0x30DA, 0x8379, // KATAKANA LETTER PE + 0x30DB, 0x837A, // KATAKANA LETTER HO + 0x30DC, 0x837B, // KATAKANA LETTER BO + 0x30DD, 0x837C, // KATAKANA LETTER PO + 0x30DE, 0x837D, // KATAKANA LETTER MA + 0x30DF, 0x837E, // KATAKANA LETTER MI + 0x30E0, 0x8380, // KATAKANA LETTER MU + 0x30E1, 0x8381, // KATAKANA LETTER ME + 0x30E2, 0x8382, // KATAKANA LETTER MO + 0x30E3, 0x8383, // KATAKANA LETTER SMALL YA + 0x30E4, 0x8384, // KATAKANA LETTER YA + 0x30E5, 0x8385, // KATAKANA LETTER SMALL YU + 0x30E6, 0x8386, // KATAKANA LETTER YU + 0x30E7, 0x8387, // KATAKANA LETTER SMALL YO + 0x30E8, 0x8388, // KATAKANA LETTER YO + 0x30E9, 0x8389, // KATAKANA LETTER RA + 0x30EA, 0x838A, // KATAKANA LETTER RI + 0x30EB, 0x838B, // KATAKANA LETTER RU + 0x30EC, 0x838C, // KATAKANA LETTER RE + 0x30ED, 0x838D, // KATAKANA LETTER RO + 0x30EE, 0x838E, // KATAKANA LETTER SMALL WA + 0x30EF, 0x838F, // KATAKANA LETTER WA + 0x30F0, 0x8390, // KATAKANA LETTER WI + 0x30F1, 0x8391, // KATAKANA LETTER WE + 0x30F2, 0x8392, // KATAKANA LETTER WO + 0x30F3, 0x8393, // KATAKANA LETTER N + 0x30F4, 0x8394, // KATAKANA LETTER VU + 0x30F5, 0x8395, // KATAKANA LETTER SMALL KA + 0x30F6, 0x8396, // KATAKANA LETTER SMALL KE + 0x30FB, 0x8145, // KATAKANA MIDDLE DOT + 0x30FD, 0x8152, // KATAKANA ITERATION MARK + 0x30FE, 0x8153, // KATAKANA VOICED ITERATION MARK + 0x4E00, 0x88EA, // + 0x4E01, 0x929A, // + 0x4E03, 0x8EB5, // + 0x4E07, 0x969C, // + 0x4E08, 0x8FE4, // + 0x4E09, 0x8E4F, // + 0x4E0A, 0x8FE3, // + 0x4E0B, 0x89BA, // + 0x4E0D, 0x9573, // + 0x4E0E, 0x975E, // + 0x4E10, 0x98A0, // + 0x4E11, 0x894E, // + 0x4E14, 0x8A8E, // + 0x4E15, 0x98A1, // + 0x4E16, 0x90A2, // + 0x4E17, 0x99C0, // + 0x4E18, 0x8B75, // + 0x4E19, 0x95B8, // + 0x4E1E, 0x8FE5, // + 0x4E21, 0x97BC, // + 0x4E26, 0x95C0, // + 0x4E2A, 0x98A2, // + 0x4E2D, 0x9286, // + 0x4E31, 0x98A3, // + 0x4E32, 0x8BF8, // + 0x4E36, 0x98A4, // + 0x4E38, 0x8ADB, // + 0x4E39, 0x924F, // + 0x4E3B, 0x8EE5, // + 0x4E3C, 0x98A5, // + 0x4E3F, 0x98A6, // + 0x4E42, 0x98A7, // + 0x4E43, 0x9454, // + 0x4E45, 0x8B76, // + 0x4E4B, 0x9456, // + 0x4E4D, 0x93E1, // + 0x4E4E, 0x8CC1, // + 0x4E4F, 0x9652, // + 0x4E55, 0xE568, // + 0x4E56, 0x98A8, // + 0x4E57, 0x8FE6, // + 0x4E58, 0x98A9, // + 0x4E59, 0x89B3, // + 0x4E5D, 0x8BE3, // + 0x4E5E, 0x8CEE, // + 0x4E5F, 0x96E7, // + 0x4E62, 0x9BA4, // + 0x4E71, 0x9790, // + 0x4E73, 0x93FB, // + 0x4E7E, 0x8AA3, // + 0x4E80, 0x8B54, // + 0x4E82, 0x98AA, // + 0x4E85, 0x98AB, // + 0x4E86, 0x97B9, // + 0x4E88, 0x975C, // + 0x4E89, 0x9188, // + 0x4E8A, 0x98AD, // + 0x4E8B, 0x8E96, // + 0x4E8C, 0x93F1, // + 0x4E8E, 0x98B0, // + 0x4E91, 0x895D, // + 0x4E92, 0x8CDD, // + 0x4E94, 0x8CDC, // + 0x4E95, 0x88E4, // + 0x4E98, 0x986A, // + 0x4E99, 0x9869, // + 0x4E9B, 0x8DB1, // + 0x4E9C, 0x889F, // + 0x4E9E, 0x98B1, // + 0x4E9F, 0x98B2, // + 0x4EA0, 0x98B3, // + 0x4EA1, 0x9653, // + 0x4EA2, 0x98B4, // + 0x4EA4, 0x8CF0, // + 0x4EA5, 0x88E5, // + 0x4EA6, 0x9692, // + 0x4EA8, 0x8B9C, // + 0x4EAB, 0x8B9D, // + 0x4EAC, 0x8B9E, // + 0x4EAD, 0x92E0, // + 0x4EAE, 0x97BA, // + 0x4EB0, 0x98B5, // + 0x4EB3, 0x98B6, // + 0x4EB6, 0x98B7, // + 0x4EBA, 0x906C, // + 0x4EC0, 0x8F59, // + 0x4EC1, 0x906D, // + 0x4EC2, 0x98BC, // + 0x4EC4, 0x98BA, // + 0x4EC6, 0x98BB, // + 0x4EC7, 0x8B77, // + 0x4ECA, 0x8DA1, // + 0x4ECB, 0x89EE, // + 0x4ECD, 0x98B9, // + 0x4ECE, 0x98B8, // + 0x4ECF, 0x95A7, // + 0x4ED4, 0x8E65, // + 0x4ED5, 0x8E64, // + 0x4ED6, 0x91BC, // + 0x4ED7, 0x98BD, // + 0x4ED8, 0x9574, // + 0x4ED9, 0x90E5, // + 0x4EDD, 0x8157, // + 0x4EDE, 0x98BE, // + 0x4EDF, 0x98C0, // + 0x4EE3, 0x91E3, // + 0x4EE4, 0x97DF, // + 0x4EE5, 0x88C8, // + 0x4EED, 0x98BF, // + 0x4EEE, 0x89BC, // + 0x4EF0, 0x8BC2, // + 0x4EF2, 0x9287, // + 0x4EF6, 0x8C8F, // + 0x4EF7, 0x98C1, // + 0x4EFB, 0x9443, // + 0x4F01, 0x8AE9, // + 0x4F09, 0x98C2, // + 0x4F0A, 0x88C9, // + 0x4F0D, 0x8CDE, // + 0x4F0E, 0x8AEA, // + 0x4F0F, 0x959A, // + 0x4F10, 0x94B0, // + 0x4F11, 0x8B78, // + 0x4F1A, 0x89EF, // + 0x4F1C, 0x98E5, // + 0x4F1D, 0x9360, // + 0x4F2F, 0x948C, // + 0x4F30, 0x98C4, // + 0x4F34, 0x94BA, // + 0x4F36, 0x97E0, // + 0x4F38, 0x904C, // + 0x4F3A, 0x8E66, // + 0x4F3C, 0x8E97, // + 0x4F3D, 0x89BE, // + 0x4F43, 0x92CF, // + 0x4F46, 0x9241, // + 0x4F47, 0x98C8, // + 0x4F4D, 0x88CA, // + 0x4F4E, 0x92E1, // + 0x4F4F, 0x8F5A, // + 0x4F50, 0x8DB2, // + 0x4F51, 0x9743, // + 0x4F53, 0x91CC, // + 0x4F55, 0x89BD, // + 0x4F57, 0x98C7, // + 0x4F59, 0x975D, // + 0x4F5A, 0x98C3, // + 0x4F5B, 0x98C5, // + 0x4F5C, 0x8DEC, // + 0x4F5D, 0x98C6, // + 0x4F5E, 0x9B43, // + 0x4F69, 0x98CE, // + 0x4F6F, 0x98D1, // + 0x4F70, 0x98CF, // + 0x4F73, 0x89C0, // + 0x4F75, 0x95B9, // + 0x4F76, 0x98C9, // + 0x4F7B, 0x98CD, // + 0x4F7C, 0x8CF1, // + 0x4F7F, 0x8E67, // + 0x4F83, 0x8AA4, // + 0x4F86, 0x98D2, // + 0x4F88, 0x98CA, // + 0x4F8B, 0x97E1, // + 0x4F8D, 0x8E98, // + 0x4F8F, 0x98CB, // + 0x4F91, 0x98D0, // + 0x4F96, 0x98D3, // + 0x4F98, 0x98CC, // + 0x4F9B, 0x8B9F, // + 0x4F9D, 0x88CB, // + 0x4FA0, 0x8BA0, // + 0x4FA1, 0x89BF, // + 0x4FAB, 0x9B44, // + 0x4FAD, 0x9699, // + 0x4FAE, 0x958E, // + 0x4FAF, 0x8CF2, // + 0x4FB5, 0x904E, // + 0x4FB6, 0x97B5, // + 0x4FBF, 0x95D6, // + 0x4FC2, 0x8C57, // + 0x4FC3, 0x91A3, // + 0x4FC4, 0x89E2, // + 0x4FCA, 0x8F72, // + 0x4FCE, 0x98D7, // + 0x4FD0, 0x98DC, // + 0x4FD1, 0x98DA, // + 0x4FD4, 0x98D5, // + 0x4FD7, 0x91AD, // + 0x4FD8, 0x98D8, // + 0x4FDA, 0x98DB, // + 0x4FDB, 0x98D9, // + 0x4FDD, 0x95DB, // + 0x4FDF, 0x98D6, // + 0x4FE1, 0x904D, // + 0x4FE3, 0x9693, // + 0x4FE4, 0x98DD, // + 0x4FE5, 0x98DE, // + 0x4FEE, 0x8F43, // + 0x4FEF, 0x98EB, // + 0x4FF3, 0x946F, // + 0x4FF5, 0x9555, // + 0x4FF6, 0x98E6, // + 0x4FF8, 0x95EE, // + 0x4FFA, 0x89B4, // + 0x4FFE, 0x98EA, // + 0x5005, 0x98E4, // + 0x5006, 0x98ED, // + 0x5009, 0x9171, // + 0x500B, 0x8CC2, // + 0x500D, 0x947B, // + 0x500F, 0xE0C5, // + 0x5011, 0x98EC, // + 0x5012, 0x937C, // + 0x5014, 0x98E1, // + 0x5016, 0x8CF4, // + 0x5019, 0x8CF3, // + 0x501A, 0x98DF, // + 0x501F, 0x8ED8, // + 0x5021, 0x98E7, // + 0x5023, 0x95ED, // + 0x5024, 0x926C, // + 0x5025, 0x98E3, // + 0x5026, 0x8C91, // + 0x5028, 0x98E0, // + 0x5029, 0x98E8, // + 0x502A, 0x98E2, // + 0x502B, 0x97CF, // + 0x502C, 0x98E9, // + 0x502D, 0x9860, // + 0x5036, 0x8BE4, // + 0x5039, 0x8C90, // + 0x5043, 0x98EE, // + 0x5047, 0x98EF, // + 0x5048, 0x98F3, // + 0x5049, 0x88CC, // + 0x504F, 0x95CE, // + 0x5050, 0x98F2, // + 0x5055, 0x98F1, // + 0x5056, 0x98F5, // + 0x505A, 0x98F4, // + 0x505C, 0x92E2, // + 0x5065, 0x8C92, // + 0x506C, 0x98F6, // + 0x5072, 0x8EC3, // + 0x5074, 0x91A4, // + 0x5075, 0x92E3, // + 0x5076, 0x8BF4, // + 0x5078, 0x98F7, // + 0x507D, 0x8B55, // + 0x5080, 0x98F8, // + 0x5085, 0x98FA, // + 0x508D, 0x9654, // + 0x5091, 0x8C86, // + 0x5098, 0x8E50, // + 0x5099, 0x94F5, // + 0x509A, 0x98F9, // + 0x50AC, 0x8DC3, // + 0x50AD, 0x9762, // + 0x50B2, 0x98FC, // + 0x50B3, 0x9942, // + 0x50B4, 0x98FB, // + 0x50B5, 0x8DC2, // + 0x50B7, 0x8F9D, // + 0x50BE, 0x8C58, // + 0x50C2, 0x9943, // + 0x50C5, 0x8BCD, // + 0x50C9, 0x9940, // + 0x50CA, 0x9941, // + 0x50CD, 0x93AD, // + 0x50CF, 0x919C, // + 0x50D1, 0x8BA1, // + 0x50D5, 0x966C, // + 0x50D6, 0x9944, // + 0x50DA, 0x97BB, // + 0x50DE, 0x9945, // + 0x50E3, 0x9948, // + 0x50E5, 0x9946, // + 0x50E7, 0x916D, // + 0x50ED, 0x9947, // + 0x50EE, 0x9949, // + 0x50F5, 0x994B, // + 0x50F9, 0x994A, // + 0x50FB, 0x95C6, // + 0x5100, 0x8B56, // + 0x5101, 0x994D, // + 0x5102, 0x994E, // + 0x5104, 0x89AD, // + 0x5109, 0x994C, // + 0x5112, 0x8EF2, // + 0x5114, 0x9951, // + 0x5115, 0x9950, // + 0x5116, 0x994F, // + 0x5118, 0x98D4, // + 0x511A, 0x9952, // + 0x511F, 0x8F9E, // + 0x5121, 0x9953, // + 0x512A, 0x9744, // + 0x5132, 0x96D7, // + 0x5137, 0x9955, // + 0x513A, 0x9954, // + 0x513B, 0x9957, // + 0x513C, 0x9956, // + 0x513F, 0x9958, // + 0x5140, 0x9959, // + 0x5141, 0x88F2, // + 0x5143, 0x8CB3, // + 0x5144, 0x8C5A, // + 0x5146, 0x929B, // + 0x5147, 0x8BA2, // + 0x5148, 0x90E6, // + 0x5149, 0x8CF5, // + 0x514B, 0x8D8E, // + 0x514D, 0x96C6, // + 0x514E, 0x9365, // + 0x5150, 0x8E99, // + 0x5152, 0x995A, // + 0x5154, 0x995C, // + 0x515A, 0x937D, // + 0x515C, 0x8A95, // + 0x5162, 0x995D, // + 0x5165, 0x93FC, // + 0x5168, 0x9153, // + 0x5169, 0x995F, // + 0x516A, 0x9960, // + 0x516B, 0x94AA, // + 0x516C, 0x8CF6, // + 0x516D, 0x985A, // + 0x516E, 0x9961, // + 0x5171, 0x8BA4, // + 0x5175, 0x95BA, // + 0x5176, 0x91B4, // + 0x5177, 0x8BEF, // + 0x5178, 0x9354, // + 0x517C, 0x8C93, // + 0x5180, 0x9962, // + 0x5182, 0x9963, // + 0x5185, 0x93E0, // + 0x5186, 0x897E, // + 0x5189, 0x9966, // + 0x518A, 0x8DFB, // + 0x518C, 0x9965, // + 0x518D, 0x8DC4, // + 0x518F, 0x9967, // + 0x5190, 0xE3EC, // + 0x5191, 0x9968, // + 0x5192, 0x9660, // + 0x5193, 0x9969, // + 0x5195, 0x996A, // + 0x5196, 0x996B, // + 0x5197, 0x8FE7, // + 0x5199, 0x8ECA, // + 0x51A0, 0x8AA5, // + 0x51A2, 0x996E, // + 0x51A4, 0x996C, // + 0x51A5, 0x96BB, // + 0x51A6, 0x996D, // + 0x51A8, 0x9579, // + 0x51A9, 0x996F, // + 0x51AA, 0x9970, // + 0x51AB, 0x9971, // + 0x51AC, 0x937E, // + 0x51B0, 0x9975, // + 0x51B1, 0x9973, // + 0x51B2, 0x9974, // + 0x51B3, 0x9972, // + 0x51B4, 0x8DE1, // + 0x51B5, 0x9976, // + 0x51B6, 0x96E8, // + 0x51B7, 0x97E2, // + 0x51BD, 0x9977, // + 0x51C4, 0x90A6, // + 0x51C5, 0x9978, // + 0x51C6, 0x8F79, // + 0x51C9, 0x9979, // + 0x51CB, 0x929C, // + 0x51CC, 0x97BD, // + 0x51CD, 0x9380, // + 0x51D6, 0x99C3, // + 0x51DB, 0x997A, // + 0x51DC, 0xEAA3, // + 0x51DD, 0x8BC3, // + 0x51E0, 0x997B, // + 0x51E1, 0x967D, // + 0x51E6, 0x8F88, // + 0x51E7, 0x91FA, // + 0x51E9, 0x997D, // + 0x51EA, 0x93E2, // + 0x51ED, 0x997E, // + 0x51F0, 0x9980, // + 0x51F1, 0x8A4D, // + 0x51F5, 0x9981, // + 0x51F6, 0x8BA5, // + 0x51F8, 0x93CA, // + 0x51F9, 0x899A, // + 0x51FA, 0x8F6F, // + 0x51FD, 0x949F, // + 0x51FE, 0x9982, // + 0x5200, 0x9381, // + 0x5203, 0x906E, // + 0x5204, 0x9983, // + 0x5206, 0x95AA, // + 0x5207, 0x90D8, // + 0x5208, 0x8AA0, // + 0x520A, 0x8AA7, // + 0x520B, 0x9984, // + 0x520E, 0x9986, // + 0x5211, 0x8C59, // + 0x5214, 0x9985, // + 0x5217, 0x97F1, // + 0x521D, 0x8F89, // + 0x5224, 0x94BB, // + 0x5225, 0x95CA, // + 0x5227, 0x9987, // + 0x5229, 0x9798, // + 0x522A, 0x9988, // + 0x522E, 0x9989, // + 0x5230, 0x939E, // + 0x5233, 0x998A, // + 0x5236, 0x90A7, // + 0x5237, 0x8DFC, // + 0x5238, 0x8C94, // + 0x5239, 0x998B, // + 0x523A, 0x8E68, // + 0x523B, 0x8D8F, // + 0x5243, 0x92E4, // + 0x5244, 0x998D, // + 0x5247, 0x91A5, // + 0x524A, 0x8DED, // + 0x524B, 0x998E, // + 0x524C, 0x998F, // + 0x524D, 0x914F, // + 0x524F, 0x998C, // + 0x5254, 0x9991, // + 0x5256, 0x9655, // + 0x525B, 0x8D84, // + 0x525E, 0x9990, // + 0x5263, 0x8C95, // + 0x5264, 0x8DDC, // + 0x5265, 0x948D, // + 0x5269, 0x9994, // + 0x526A, 0x9992, // + 0x526F, 0x959B, // + 0x5270, 0x8FE8, // + 0x5271, 0x999B, // + 0x5272, 0x8A84, // + 0x5273, 0x9995, // + 0x5274, 0x9993, // + 0x5275, 0x916E, // + 0x527D, 0x9997, // + 0x527F, 0x9996, // + 0x5283, 0x8A63, // + 0x5287, 0x8C80, // + 0x5288, 0x999C, // + 0x5289, 0x97AB, // + 0x528D, 0x9998, // + 0x5291, 0x999D, // + 0x5292, 0x999A, // + 0x5294, 0x9999, // + 0x529B, 0x97CD, // + 0x529F, 0x8CF7, // + 0x52A0, 0x89C1, // + 0x52A3, 0x97F2, // + 0x52A9, 0x8F95, // + 0x52AA, 0x9377, // + 0x52AB, 0x8D85, // + 0x52AC, 0x99A0, // + 0x52AD, 0x99A1, // + 0x52B1, 0x97E3, // + 0x52B4, 0x984A, // + 0x52B5, 0x99A3, // + 0x52B9, 0x8CF8, // + 0x52BC, 0x99A2, // + 0x52BE, 0x8A4E, // + 0x52C1, 0x99A4, // + 0x52C3, 0x9675, // + 0x52C5, 0x92BA, // + 0x52C7, 0x9745, // + 0x52C9, 0x95D7, // + 0x52CD, 0x99A5, // + 0x52D2, 0xE8D3, // + 0x52D5, 0x93AE, // + 0x52D7, 0x99A6, // + 0x52D8, 0x8AA8, // + 0x52D9, 0x96B1, // + 0x52DD, 0x8F9F, // + 0x52DE, 0x99A7, // + 0x52DF, 0x95E5, // + 0x52E0, 0x99AB, // + 0x52E2, 0x90A8, // + 0x52E3, 0x99A8, // + 0x52E4, 0x8BCE, // + 0x52E6, 0x99A9, // + 0x52E7, 0x8AA9, // + 0x52F2, 0x8C4D, // + 0x52F3, 0x99AC, // + 0x52F5, 0x99AD, // + 0x52F8, 0x99AE, // + 0x52F9, 0x99AF, // + 0x52FA, 0x8ED9, // + 0x52FE, 0x8CF9, // + 0x52FF, 0x96DC, // + 0x5301, 0x96E6, // + 0x5302, 0x93F5, // + 0x5305, 0x95EF, // + 0x5306, 0x99B0, // + 0x5308, 0x99B1, // + 0x530D, 0x99B3, // + 0x530F, 0x99B5, // + 0x5310, 0x99B4, // + 0x5315, 0x99B6, // + 0x5316, 0x89BB, // + 0x5317, 0x966B, // + 0x5319, 0x8DFA, // + 0x531A, 0x99B7, // + 0x531D, 0x9178, // + 0x5320, 0x8FA0, // + 0x5321, 0x8BA7, // + 0x5323, 0x99B8, // + 0x532A, 0x94D9, // + 0x532F, 0x99B9, // + 0x5331, 0x99BA, // + 0x5333, 0x99BB, // + 0x5338, 0x99BC, // + 0x5339, 0x9543, // + 0x533A, 0x8BE6, // + 0x533B, 0x88E3, // + 0x533F, 0x93BD, // + 0x5340, 0x99BD, // + 0x5341, 0x8F5C, // + 0x5343, 0x90E7, // + 0x5345, 0x99BF, // + 0x5346, 0x99BE, // + 0x5347, 0x8FA1, // + 0x5348, 0x8CDF, // + 0x5349, 0x99C1, // + 0x534A, 0x94BC, // + 0x534D, 0x99C2, // + 0x5351, 0x94DA, // + 0x5352, 0x91B2, // + 0x5353, 0x91EC, // + 0x5354, 0x8BA6, // + 0x5357, 0x93EC, // + 0x5358, 0x9250, // + 0x535A, 0x948E, // + 0x535C, 0x966D, // + 0x535E, 0x99C4, // + 0x5360, 0x90E8, // + 0x5366, 0x8C54, // + 0x5369, 0x99C5, // + 0x536E, 0x99C6, // + 0x536F, 0x894B, // + 0x5370, 0x88F3, // + 0x5371, 0x8AEB, // + 0x5373, 0x91A6, // + 0x5374, 0x8B70, // + 0x5375, 0x9791, // + 0x5377, 0x99C9, // + 0x5378, 0x89B5, // + 0x537B, 0x99C8, // + 0x537F, 0x8BA8, // + 0x5382, 0x99CA, // + 0x5384, 0x96EF, // + 0x5396, 0x99CB, // + 0x5398, 0x97D0, // + 0x539A, 0x8CFA, // + 0x539F, 0x8CB4, // + 0x53A0, 0x99CC, // + 0x53A5, 0x99CE, // + 0x53A6, 0x99CD, // + 0x53A8, 0x907E, // + 0x53A9, 0x8958, // + 0x53AD, 0x897D, // + 0x53AE, 0x99CF, // + 0x53B0, 0x99D0, // + 0x53B3, 0x8CB5, // + 0x53B6, 0x99D1, // + 0x53BB, 0x8B8E, // + 0x53C2, 0x8E51, // + 0x53C3, 0x99D2, // + 0x53C8, 0x9694, // + 0x53C9, 0x8DB3, // + 0x53CA, 0x8B79, // + 0x53CB, 0x9746, // + 0x53CC, 0x916F, // + 0x53CD, 0x94BD, // + 0x53CE, 0x8EFB, // + 0x53D4, 0x8F66, // + 0x53D6, 0x8EE6, // + 0x53D7, 0x8EF3, // + 0x53D9, 0x8F96, // + 0x53DB, 0x94BE, // + 0x53DF, 0x99D5, // + 0x53E1, 0x8962, // + 0x53E2, 0x9170, // + 0x53E3, 0x8CFB, // + 0x53E4, 0x8CC3, // + 0x53E5, 0x8BE5, // + 0x53E8, 0x99D9, // + 0x53E9, 0x9240, // + 0x53EA, 0x91FC, // + 0x53EB, 0x8BA9, // + 0x53EC, 0x8FA2, // + 0x53ED, 0x99DA, // + 0x53EE, 0x99D8, // + 0x53EF, 0x89C2, // + 0x53F0, 0x91E4, // + 0x53F1, 0x8EB6, // + 0x53F2, 0x8E6A, // + 0x53F3, 0x8945, // + 0x53F6, 0x8A90, // + 0x53F7, 0x8D86, // + 0x53F8, 0x8E69, // + 0x53FA, 0x99DB, // + 0x5401, 0x99DC, // + 0x5403, 0x8B68, // + 0x5404, 0x8A65, // + 0x5408, 0x8D87, // + 0x5409, 0x8B67, // + 0x540A, 0x92DD, // + 0x540B, 0x8944, // + 0x540C, 0x93AF, // + 0x540D, 0x96BC, // + 0x540E, 0x8D40, // + 0x540F, 0x9799, // + 0x5410, 0x9366, // + 0x5411, 0x8CFC, // + 0x541B, 0x8C4E, // + 0x541D, 0x99E5, // + 0x541F, 0x8BE1, // + 0x5420, 0x9669, // + 0x5426, 0x94DB, // + 0x5429, 0x99E4, // + 0x542B, 0x8ADC, // + 0x542C, 0x99DF, // + 0x542D, 0x99E0, // + 0x542E, 0x99E2, // + 0x5436, 0x99E3, // + 0x5438, 0x8B7A, // + 0x5439, 0x9081, // + 0x543B, 0x95AB, // + 0x543C, 0x99E1, // + 0x543D, 0x99DD, // + 0x543E, 0x8CE1, // + 0x5440, 0x99DE, // + 0x5442, 0x9843, // + 0x5446, 0x95F0, // + 0x5448, 0x92E6, // + 0x5449, 0x8CE0, // + 0x544A, 0x8D90, // + 0x544E, 0x99E6, // + 0x5451, 0x93DB, // + 0x545F, 0x99EA, // + 0x5468, 0x8EFC, // + 0x546A, 0x8EF4, // + 0x5470, 0x99ED, // + 0x5471, 0x99EB, // + 0x5473, 0x96A1, // + 0x5475, 0x99E8, // + 0x5476, 0x99F1, // + 0x5477, 0x99EC, // + 0x547B, 0x99EF, // + 0x547C, 0x8CC4, // + 0x547D, 0x96BD, // + 0x5480, 0x99F0, // + 0x5484, 0x99F2, // + 0x5486, 0x99F4, // + 0x548B, 0x8DEE, // + 0x548C, 0x9861, // + 0x548E, 0x99E9, // + 0x548F, 0x99E7, // + 0x5490, 0x99F3, // + 0x5492, 0x99EE, // + 0x54A2, 0x99F6, // + 0x54A4, 0x9A42, // + 0x54A5, 0x99F8, // + 0x54A8, 0x99FC, // + 0x54AB, 0x9A40, // + 0x54AC, 0x99F9, // + 0x54AF, 0x9A5D, // + 0x54B2, 0x8DE7, // + 0x54B3, 0x8A50, // + 0x54B8, 0x99F7, // + 0x54BC, 0x9A44, // + 0x54BD, 0x88F4, // + 0x54BE, 0x9A43, // + 0x54C0, 0x88A3, // + 0x54C1, 0x9569, // + 0x54C2, 0x9A41, // + 0x54C4, 0x99FA, // + 0x54C7, 0x99F5, // + 0x54C8, 0x99FB, // + 0x54C9, 0x8DC6, // + 0x54D8, 0x9A45, // + 0x54E1, 0x88F5, // + 0x54E2, 0x9A4E, // + 0x54E5, 0x9A46, // + 0x54E6, 0x9A47, // + 0x54E8, 0x8FA3, // + 0x54E9, 0x9689, // + 0x54ED, 0x9A4C, // + 0x54EE, 0x9A4B, // + 0x54F2, 0x934E, // + 0x54FA, 0x9A4D, // + 0x54FD, 0x9A4A, // + 0x5504, 0x8953, // + 0x5506, 0x8DB4, // + 0x5507, 0x904F, // + 0x550F, 0x9A48, // + 0x5510, 0x9382, // + 0x5514, 0x9A49, // + 0x5516, 0x88A0, // + 0x552E, 0x9A53, // + 0x552F, 0x9742, // + 0x5531, 0x8FA5, // + 0x5533, 0x9A59, // + 0x5538, 0x9A58, // + 0x5539, 0x9A4F, // + 0x553E, 0x91C1, // + 0x5540, 0x9A50, // + 0x5544, 0x91ED, // + 0x5545, 0x9A55, // + 0x5546, 0x8FA4, // + 0x554C, 0x9A52, // + 0x554F, 0x96E2, // + 0x5556, 0x9A56, // + 0x5557, 0x9A57, // + 0x555C, 0x9A54, // + 0x555D, 0x9A5A, // + 0x5563, 0x9A51, // + 0x557B, 0x9A60, // + 0x557C, 0x9A65, // + 0x557E, 0x9A61, // + 0x5580, 0x9A5C, // + 0x5583, 0x9A66, // + 0x5584, 0x9150, // + 0x5587, 0x9A68, // + 0x5589, 0x8D41, // + 0x558A, 0x9A5E, // + 0x558B, 0x929D, // + 0x5598, 0x9A62, // + 0x559A, 0x8AAB, // + 0x559C, 0x8AEC, // + 0x559D, 0x8A85, // + 0x559E, 0x9A63, // + 0x559F, 0x9A5F, // + 0x55A7, 0x8C96, // + 0x55A8, 0x9A69, // + 0x55A9, 0x9A67, // + 0x55AA, 0x9172, // + 0x55AB, 0x8B69, // + 0x55AC, 0x8BAA, // + 0x55AE, 0x9A64, // + 0x55B0, 0x8BF2, // + 0x55B6, 0x8963, // + 0x55C4, 0x9A6D, // + 0x55C5, 0x9A6B, // + 0x55C7, 0x9AA5, // + 0x55D4, 0x9A70, // + 0x55DA, 0x9A6A, // + 0x55DC, 0x9A6E, // + 0x55DF, 0x9A6C, // + 0x55E3, 0x8E6B, // + 0x55E4, 0x9A6F, // + 0x55F7, 0x9A72, // + 0x55F9, 0x9A77, // + 0x55FD, 0x9A75, // + 0x55FE, 0x9A74, // + 0x5606, 0x9251, // + 0x5609, 0x89C3, // + 0x5614, 0x9A71, // + 0x5616, 0x9A73, // + 0x5617, 0x8FA6, // + 0x5618, 0x8952, // + 0x561B, 0x9A76, // + 0x5629, 0x89DC, // + 0x562F, 0x9A82, // + 0x5631, 0x8FFA, // + 0x5632, 0x9A7D, // + 0x5634, 0x9A7B, // + 0x5636, 0x9A7C, // + 0x5638, 0x9A7E, // + 0x5642, 0x895C, // + 0x564C, 0x9158, // + 0x564E, 0x9A78, // + 0x5650, 0x9A79, // + 0x565B, 0x8A9A, // + 0x5664, 0x9A81, // + 0x5668, 0x8AED, // + 0x566A, 0x9A84, // + 0x566B, 0x9A80, // + 0x566C, 0x9A83, // + 0x5674, 0x95AC, // + 0x5678, 0x93D3, // + 0x567A, 0x94B6, // + 0x5680, 0x9A86, // + 0x5686, 0x9A85, // + 0x5687, 0x8A64, // + 0x568A, 0x9A87, // + 0x568F, 0x9A8A, // + 0x5694, 0x9A89, // + 0x56A0, 0x9A88, // + 0x56A2, 0x9458, // + 0x56A5, 0x9A8B, // + 0x56AE, 0x9A8C, // + 0x56B4, 0x9A8E, // + 0x56B6, 0x9A8D, // + 0x56BC, 0x9A90, // + 0x56C0, 0x9A93, // + 0x56C1, 0x9A91, // + 0x56C2, 0x9A8F, // + 0x56C3, 0x9A92, // + 0x56C8, 0x9A94, // + 0x56CE, 0x9A95, // + 0x56D1, 0x9A96, // + 0x56D3, 0x9A97, // + 0x56D7, 0x9A98, // + 0x56D8, 0x9964, // + 0x56DA, 0x8EFA, // + 0x56DB, 0x8E6C, // + 0x56DE, 0x89F1, // + 0x56E0, 0x88F6, // + 0x56E3, 0x9263, // + 0x56EE, 0x9A99, // + 0x56F0, 0x8DA2, // + 0x56F2, 0x88CD, // + 0x56F3, 0x907D, // + 0x56F9, 0x9A9A, // + 0x56FA, 0x8CC5, // + 0x56FD, 0x8D91, // + 0x56FF, 0x9A9C, // + 0x5700, 0x9A9B, // + 0x5703, 0x95DE, // + 0x5704, 0x9A9D, // + 0x5708, 0x9A9F, // + 0x5709, 0x9A9E, // + 0x570B, 0x9AA0, // + 0x570D, 0x9AA1, // + 0x570F, 0x8C97, // + 0x5712, 0x8980, // + 0x5713, 0x9AA2, // + 0x5716, 0x9AA4, // + 0x5718, 0x9AA3, // + 0x571C, 0x9AA6, // + 0x571F, 0x9379, // + 0x5726, 0x9AA7, // + 0x5727, 0x88B3, // + 0x5728, 0x8DDD, // + 0x572D, 0x8C5C, // + 0x5730, 0x926E, // + 0x5737, 0x9AA8, // + 0x5738, 0x9AA9, // + 0x573B, 0x9AAB, // + 0x5740, 0x9AAC, // + 0x5742, 0x8DE2, // + 0x5747, 0x8BCF, // + 0x574A, 0x9656, // + 0x574E, 0x9AAA, // + 0x574F, 0x9AAD, // + 0x5750, 0x8DBF, // + 0x5751, 0x8D42, // + 0x5761, 0x9AB1, // + 0x5764, 0x8DA3, // + 0x5766, 0x9252, // + 0x5769, 0x9AAE, // + 0x576A, 0x92D8, // + 0x577F, 0x9AB2, // + 0x5782, 0x9082, // + 0x5788, 0x9AB0, // + 0x5789, 0x9AB3, // + 0x578B, 0x8C5E, // + 0x5793, 0x9AB4, // + 0x57A0, 0x9AB5, // + 0x57A2, 0x8D43, // + 0x57A3, 0x8A5F, // + 0x57A4, 0x9AB7, // + 0x57AA, 0x9AB8, // + 0x57B0, 0x9AB9, // + 0x57B3, 0x9AB6, // + 0x57C0, 0x9AAF, // + 0x57C3, 0x9ABA, // + 0x57C6, 0x9ABB, // + 0x57CB, 0x9684, // + 0x57CE, 0x8FE9, // + 0x57D2, 0x9ABD, // + 0x57D3, 0x9ABE, // + 0x57D4, 0x9ABC, // + 0x57D6, 0x9AC0, // + 0x57DC, 0x9457, // + 0x57DF, 0x88E6, // + 0x57E0, 0x9575, // + 0x57E3, 0x9AC1, // + 0x57F4, 0x8FFB, // + 0x57F7, 0x8EB7, // + 0x57F9, 0x947C, // + 0x57FA, 0x8AEE, // + 0x57FC, 0x8DE9, // + 0x5800, 0x9678, // + 0x5802, 0x93B0, // + 0x5805, 0x8C98, // + 0x5806, 0x91CD, // + 0x580A, 0x9ABF, // + 0x580B, 0x9AC2, // + 0x5815, 0x91C2, // + 0x5819, 0x9AC3, // + 0x581D, 0x9AC4, // + 0x5821, 0x9AC6, // + 0x5824, 0x92E7, // + 0x582A, 0x8AAC, // + 0x582F, 0xEA9F, // + 0x5830, 0x8981, // + 0x5831, 0x95F1, // + 0x5834, 0x8FEA, // + 0x5835, 0x9367, // + 0x583A, 0x8DE4, // + 0x583D, 0x9ACC, // + 0x5840, 0x95BB, // + 0x5841, 0x97DB, // + 0x584A, 0x89F2, // + 0x584B, 0x9AC8, // + 0x5851, 0x9159, // + 0x5852, 0x9ACB, // + 0x5854, 0x9383, // + 0x5857, 0x9368, // + 0x5858, 0x9384, // + 0x5859, 0x94B7, // + 0x585A, 0x92CB, // + 0x585E, 0x8DC7, // + 0x5862, 0x9AC7, // + 0x5869, 0x8996, // + 0x586B, 0x9355, // + 0x5870, 0x9AC9, // + 0x5872, 0x9AC5, // + 0x5875, 0x906F, // + 0x5879, 0x9ACD, // + 0x587E, 0x8F6D, // + 0x5883, 0x8BAB, // + 0x5885, 0x9ACE, // + 0x5893, 0x95E6, // + 0x5897, 0x919D, // + 0x589C, 0x92C4, // + 0x589F, 0x9AD0, // + 0x58A8, 0x966E, // + 0x58AB, 0x9AD1, // + 0x58AE, 0x9AD6, // + 0x58B3, 0x95AD, // + 0x58B8, 0x9AD5, // + 0x58B9, 0x9ACF, // + 0x58BA, 0x9AD2, // + 0x58BB, 0x9AD4, // + 0x58BE, 0x8DA4, // + 0x58C1, 0x95C7, // + 0x58C5, 0x9AD7, // + 0x58C7, 0x9264, // + 0x58CA, 0x89F3, // + 0x58CC, 0x8FEB, // + 0x58D1, 0x9AD9, // + 0x58D3, 0x9AD8, // + 0x58D5, 0x8D88, // + 0x58D7, 0x9ADA, // + 0x58D8, 0x9ADC, // + 0x58D9, 0x9ADB, // + 0x58DC, 0x9ADE, // + 0x58DE, 0x9AD3, // + 0x58DF, 0x9AE0, // + 0x58E4, 0x9ADF, // + 0x58E5, 0x9ADD, // + 0x58EB, 0x8E6D, // + 0x58EC, 0x9070, // + 0x58EE, 0x9173, // + 0x58EF, 0x9AE1, // + 0x58F0, 0x90BA, // + 0x58F1, 0x88EB, // + 0x58F2, 0x9484, // + 0x58F7, 0x92D9, // + 0x58F9, 0x9AE3, // + 0x58FA, 0x9AE2, // + 0x58FB, 0x9AE4, // + 0x58FC, 0x9AE5, // + 0x58FD, 0x9AE6, // + 0x5902, 0x9AE7, // + 0x5909, 0x95CF, // + 0x590A, 0x9AE8, // + 0x590F, 0x89C4, // + 0x5910, 0x9AE9, // + 0x5916, 0x8A4F, // + 0x5918, 0x99C7, // + 0x5919, 0x8F67, // + 0x591A, 0x91BD, // + 0x591B, 0x9AEA, // + 0x591C, 0x96E9, // + 0x5922, 0x96B2, // + 0x5925, 0x9AEC, // + 0x5927, 0x91E5, // + 0x5929, 0x9356, // + 0x592A, 0x91BE, // + 0x592B, 0x9576, // + 0x592C, 0x9AED, // + 0x592D, 0x9AEE, // + 0x592E, 0x899B, // + 0x5931, 0x8EB8, // + 0x5932, 0x9AEF, // + 0x5937, 0x88CE, // + 0x5938, 0x9AF0, // + 0x593E, 0x9AF1, // + 0x5944, 0x8982, // + 0x5947, 0x8AEF, // + 0x5948, 0x93DE, // + 0x5949, 0x95F2, // + 0x594E, 0x9AF5, // + 0x594F, 0x9174, // + 0x5950, 0x9AF4, // + 0x5951, 0x8C5F, // + 0x5954, 0x967A, // + 0x5955, 0x9AF3, // + 0x5957, 0x9385, // + 0x5958, 0x9AF7, // + 0x595A, 0x9AF6, // + 0x5960, 0x9AF9, // + 0x5962, 0x9AF8, // + 0x5965, 0x899C, // + 0x5967, 0x9AFA, // + 0x5968, 0x8FA7, // + 0x5969, 0x9AFC, // + 0x596A, 0x9244, // + 0x596C, 0x9AFB, // + 0x596E, 0x95B1, // + 0x5973, 0x8F97, // + 0x5974, 0x937A, // + 0x5978, 0x9B40, // + 0x597D, 0x8D44, // + 0x5981, 0x9B41, // + 0x5982, 0x9440, // + 0x5983, 0x94DC, // + 0x5984, 0x96CF, // + 0x598A, 0x9444, // + 0x598D, 0x9B4A, // + 0x5993, 0x8B57, // + 0x5996, 0x9764, // + 0x5999, 0x96AD, // + 0x599B, 0x9BAA, // + 0x599D, 0x9B42, // + 0x59A3, 0x9B45, // + 0x59A5, 0x91C3, // + 0x59A8, 0x9657, // + 0x59AC, 0x9369, // + 0x59B2, 0x9B46, // + 0x59B9, 0x9685, // + 0x59BB, 0x8DC8, // + 0x59BE, 0x8FA8, // + 0x59C6, 0x9B47, // + 0x59C9, 0x8E6F, // + 0x59CB, 0x8E6E, // + 0x59D0, 0x88B7, // + 0x59D1, 0x8CC6, // + 0x59D3, 0x90A9, // + 0x59D4, 0x88CF, // + 0x59D9, 0x9B4B, // + 0x59DA, 0x9B4C, // + 0x59DC, 0x9B49, // + 0x59E5, 0x8957, // + 0x59E6, 0x8AAD, // + 0x59E8, 0x9B48, // + 0x59EA, 0x96C3, // + 0x59EB, 0x9550, // + 0x59F6, 0x88A6, // + 0x59FB, 0x88F7, // + 0x59FF, 0x8E70, // + 0x5A01, 0x88D0, // + 0x5A03, 0x88A1, // + 0x5A09, 0x9B51, // + 0x5A11, 0x9B4F, // + 0x5A18, 0x96BA, // + 0x5A1A, 0x9B52, // + 0x5A1C, 0x9B50, // + 0x5A1F, 0x9B4E, // + 0x5A20, 0x9050, // + 0x5A25, 0x9B4D, // + 0x5A29, 0x95D8, // + 0x5A2F, 0x8CE2, // + 0x5A35, 0x9B56, // + 0x5A36, 0x9B57, // + 0x5A3C, 0x8FA9, // + 0x5A40, 0x9B53, // + 0x5A41, 0x984B, // + 0x5A46, 0x946B, // + 0x5A49, 0x9B55, // + 0x5A5A, 0x8DA5, // + 0x5A62, 0x9B58, // + 0x5A66, 0x9577, // + 0x5A6A, 0x9B59, // + 0x5A6C, 0x9B54, // + 0x5A7F, 0x96B9, // + 0x5A92, 0x947D, // + 0x5A9A, 0x9B5A, // + 0x5A9B, 0x9551, // + 0x5ABD, 0x9B5F, // + 0x5ABE, 0x9B5C, // + 0x5AC1, 0x89C5, // + 0x5AC2, 0x9B5E, // + 0x5AC9, 0x8EB9, // + 0x5ACB, 0x9B5D, // + 0x5ACC, 0x8C99, // + 0x5AD0, 0x9B6B, // + 0x5AD6, 0x9B64, // + 0x5AD7, 0x9B61, // + 0x5AE1, 0x9284, // + 0x5AE3, 0x9B60, // + 0x5AE6, 0x9B62, // + 0x5AE9, 0x9B63, // + 0x5AFA, 0x9B65, // + 0x5AFB, 0x9B66, // + 0x5B09, 0x8AF0, // + 0x5B0B, 0x9B68, // + 0x5B0C, 0x9B67, // + 0x5B16, 0x9B69, // + 0x5B22, 0x8FEC, // + 0x5B2A, 0x9B6C, // + 0x5B2C, 0x92DA, // + 0x5B30, 0x8964, // + 0x5B32, 0x9B6A, // + 0x5B36, 0x9B6D, // + 0x5B3E, 0x9B6E, // + 0x5B40, 0x9B71, // + 0x5B43, 0x9B6F, // + 0x5B45, 0x9B70, // + 0x5B50, 0x8E71, // + 0x5B51, 0x9B72, // + 0x5B54, 0x8D45, // + 0x5B55, 0x9B73, // + 0x5B57, 0x8E9A, // + 0x5B58, 0x91B6, // + 0x5B5A, 0x9B74, // + 0x5B5B, 0x9B75, // + 0x5B5C, 0x8E79, // + 0x5B5D, 0x8D46, // + 0x5B5F, 0x96D0, // + 0x5B63, 0x8B47, // + 0x5B64, 0x8CC7, // + 0x5B65, 0x9B76, // + 0x5B66, 0x8A77, // + 0x5B69, 0x9B77, // + 0x5B6B, 0x91B7, // + 0x5B70, 0x9B78, // + 0x5B71, 0x9BA1, // + 0x5B73, 0x9B79, // + 0x5B75, 0x9B7A, // + 0x5B78, 0x9B7B, // + 0x5B7A, 0x9B7D, // + 0x5B80, 0x9B7E, // + 0x5B83, 0x9B80, // + 0x5B85, 0x91EE, // + 0x5B87, 0x8946, // + 0x5B88, 0x8EE7, // + 0x5B89, 0x88C0, // + 0x5B8B, 0x9176, // + 0x5B8C, 0x8AAE, // + 0x5B8D, 0x8EB3, // + 0x5B8F, 0x8D47, // + 0x5B95, 0x9386, // + 0x5B97, 0x8F40, // + 0x5B98, 0x8AAF, // + 0x5B99, 0x9288, // + 0x5B9A, 0x92E8, // + 0x5B9B, 0x88B6, // + 0x5B9C, 0x8B58, // + 0x5B9D, 0x95F3, // + 0x5B9F, 0x8EC0, // + 0x5BA2, 0x8B71, // + 0x5BA3, 0x90E9, // + 0x5BA4, 0x8EBA, // + 0x5BA5, 0x9747, // + 0x5BA6, 0x9B81, // + 0x5BAE, 0x8B7B, // + 0x5BB0, 0x8DC9, // + 0x5BB3, 0x8A51, // + 0x5BB4, 0x8983, // + 0x5BB5, 0x8FAA, // + 0x5BB6, 0x89C6, // + 0x5BB8, 0x9B82, // + 0x5BB9, 0x9765, // + 0x5BBF, 0x8F68, // + 0x5BC2, 0x8EE2, // + 0x5BC3, 0x9B83, // + 0x5BC4, 0x8AF1, // + 0x5BC5, 0x93D0, // + 0x5BC6, 0x96A7, // + 0x5BC7, 0x9B84, // + 0x5BC9, 0x9B85, // + 0x5BCC, 0x9578, // + 0x5BD0, 0x9B87, // + 0x5BD2, 0x8AA6, // + 0x5BD3, 0x8BF5, // + 0x5BD4, 0x9B86, // + 0x5BDB, 0x8AB0, // + 0x5BDD, 0x9051, // + 0x5BDE, 0x9B8B, // + 0x5BDF, 0x8E40, // + 0x5BE1, 0x89C7, // + 0x5BE2, 0x9B8A, // + 0x5BE4, 0x9B88, // + 0x5BE5, 0x9B8C, // + 0x5BE6, 0x9B89, // + 0x5BE7, 0x944A, // + 0x5BE8, 0x9ECB, // + 0x5BE9, 0x9052, // + 0x5BEB, 0x9B8D, // + 0x5BEE, 0x97BE, // + 0x5BF0, 0x9B8E, // + 0x5BF3, 0x9B90, // + 0x5BF5, 0x929E, // + 0x5BF6, 0x9B8F, // + 0x5BF8, 0x90A1, // + 0x5BFA, 0x8E9B, // + 0x5BFE, 0x91CE, // + 0x5BFF, 0x8EF5, // + 0x5C01, 0x9595, // + 0x5C02, 0x90EA, // + 0x5C04, 0x8ECB, // + 0x5C05, 0x9B91, // + 0x5C06, 0x8FAB, // + 0x5C07, 0x9B92, // + 0x5C08, 0x9B93, // + 0x5C09, 0x88D1, // + 0x5C0A, 0x91B8, // + 0x5C0B, 0x9071, // + 0x5C0D, 0x9B94, // + 0x5C0E, 0x93B1, // + 0x5C0F, 0x8FAC, // + 0x5C11, 0x8FAD, // + 0x5C13, 0x9B95, // + 0x5C16, 0x90EB, // + 0x5C1A, 0x8FAE, // + 0x5C20, 0x9B96, // + 0x5C22, 0x9B97, // + 0x5C24, 0x96DE, // + 0x5C28, 0x9B98, // + 0x5C2D, 0x8BC4, // + 0x5C31, 0x8F41, // + 0x5C38, 0x9B99, // + 0x5C39, 0x9B9A, // + 0x5C3A, 0x8EDA, // + 0x5C3B, 0x904B, // + 0x5C3C, 0x93F2, // + 0x5C3D, 0x9073, // + 0x5C3E, 0x94F6, // + 0x5C3F, 0x9441, // + 0x5C40, 0x8BC7, // + 0x5C41, 0x9B9B, // + 0x5C45, 0x8B8F, // + 0x5C46, 0x9B9C, // + 0x5C48, 0x8BFC, // + 0x5C4A, 0x93CD, // + 0x5C4B, 0x89AE, // + 0x5C4D, 0x8E72, // + 0x5C4E, 0x9B9D, // + 0x5C4F, 0x9BA0, // + 0x5C50, 0x9B9F, // + 0x5C51, 0x8BFB, // + 0x5C53, 0x9B9E, // + 0x5C55, 0x9357, // + 0x5C5E, 0x91AE, // + 0x5C60, 0x936A, // + 0x5C61, 0x8EC6, // + 0x5C64, 0x9177, // + 0x5C65, 0x979A, // + 0x5C6C, 0x9BA2, // + 0x5C6E, 0x9BA3, // + 0x5C6F, 0x93D4, // + 0x5C71, 0x8E52, // + 0x5C76, 0x9BA5, // + 0x5C79, 0x9BA6, // + 0x5C8C, 0x9BA7, // + 0x5C90, 0x8AF2, // + 0x5C91, 0x9BA8, // + 0x5C94, 0x9BA9, // + 0x5CA1, 0x89AA, // + 0x5CA8, 0x915A, // + 0x5CA9, 0x8AE2, // + 0x5CAB, 0x9BAB, // + 0x5CAC, 0x96A6, // + 0x5CB1, 0x91D0, // + 0x5CB3, 0x8A78, // + 0x5CB6, 0x9BAD, // + 0x5CB7, 0x9BAF, // + 0x5CB8, 0x8ADD, // + 0x5CBB, 0x9BAC, // + 0x5CBC, 0x9BAE, // + 0x5CBE, 0x9BB1, // + 0x5CC5, 0x9BB0, // + 0x5CC7, 0x9BB2, // + 0x5CD9, 0x9BB3, // + 0x5CE0, 0x93BB, // + 0x5CE1, 0x8BAC, // + 0x5CE8, 0x89E3, // + 0x5CE9, 0x9BB4, // + 0x5CEA, 0x9BB9, // + 0x5CED, 0x9BB7, // + 0x5CEF, 0x95F5, // + 0x5CF0, 0x95F4, // + 0x5CF6, 0x9387, // + 0x5CFA, 0x9BB6, // + 0x5CFB, 0x8F73, // + 0x5CFD, 0x9BB5, // + 0x5D07, 0x9092, // + 0x5D0B, 0x9BBA, // + 0x5D0E, 0x8DE8, // + 0x5D11, 0x9BC0, // + 0x5D14, 0x9BC1, // + 0x5D15, 0x9BBB, // + 0x5D16, 0x8A52, // + 0x5D17, 0x9BBC, // + 0x5D18, 0x9BC5, // + 0x5D19, 0x9BC4, // + 0x5D1A, 0x9BC3, // + 0x5D1B, 0x9BBF, // + 0x5D1F, 0x9BBE, // + 0x5D22, 0x9BC2, // + 0x5D29, 0x95F6, // + 0x5D4B, 0x9BC9, // + 0x5D4C, 0x9BC6, // + 0x5D4E, 0x9BC8, // + 0x5D50, 0x9792, // + 0x5D52, 0x9BC7, // + 0x5D5C, 0x9BBD, // + 0x5D69, 0x9093, // + 0x5D6C, 0x9BCA, // + 0x5D6F, 0x8DB5, // + 0x5D73, 0x9BCB, // + 0x5D76, 0x9BCC, // + 0x5D82, 0x9BCF, // + 0x5D84, 0x9BCE, // + 0x5D87, 0x9BCD, // + 0x5D8B, 0x9388, // + 0x5D8C, 0x9BB8, // + 0x5D90, 0x9BD5, // + 0x5D9D, 0x9BD1, // + 0x5DA2, 0x9BD0, // + 0x5DAC, 0x9BD2, // + 0x5DAE, 0x9BD3, // + 0x5DB7, 0x9BD6, // + 0x5DBA, 0x97E4, // + 0x5DBC, 0x9BD7, // + 0x5DBD, 0x9BD4, // + 0x5DC9, 0x9BD8, // + 0x5DCC, 0x8ADE, // + 0x5DCD, 0x9BD9, // + 0x5DD2, 0x9BDB, // + 0x5DD3, 0x9BDA, // + 0x5DD6, 0x9BDC, // + 0x5DDB, 0x9BDD, // + 0x5DDD, 0x90EC, // + 0x5DDE, 0x8F42, // + 0x5DE1, 0x8F84, // + 0x5DE3, 0x9183, // + 0x5DE5, 0x8D48, // + 0x5DE6, 0x8DB6, // + 0x5DE7, 0x8D49, // + 0x5DE8, 0x8B90, // + 0x5DEB, 0x9BDE, // + 0x5DEE, 0x8DB7, // + 0x5DF1, 0x8CC8, // + 0x5DF2, 0x9BDF, // + 0x5DF3, 0x96A4, // + 0x5DF4, 0x9462, // + 0x5DF5, 0x9BE0, // + 0x5DF7, 0x8D4A, // + 0x5DFB, 0x8AAA, // + 0x5DFD, 0x9246, // + 0x5DFE, 0x8BD0, // + 0x5E02, 0x8E73, // + 0x5E03, 0x957A, // + 0x5E06, 0x94BF, // + 0x5E0B, 0x9BE1, // + 0x5E0C, 0x8AF3, // + 0x5E11, 0x9BE4, // + 0x5E16, 0x929F, // + 0x5E19, 0x9BE3, // + 0x5E1A, 0x9BE2, // + 0x5E1B, 0x9BE5, // + 0x5E1D, 0x92E9, // + 0x5E25, 0x9083, // + 0x5E2B, 0x8E74, // + 0x5E2D, 0x90C8, // + 0x5E2F, 0x91D1, // + 0x5E30, 0x8B41, // + 0x5E33, 0x92A0, // + 0x5E36, 0x9BE6, // + 0x5E37, 0x9BE7, // + 0x5E38, 0x8FED, // + 0x5E3D, 0x9658, // + 0x5E40, 0x9BEA, // + 0x5E43, 0x9BE9, // + 0x5E44, 0x9BE8, // + 0x5E45, 0x959D, // + 0x5E47, 0x9BF1, // + 0x5E4C, 0x9679, // + 0x5E4E, 0x9BEB, // + 0x5E54, 0x9BED, // + 0x5E55, 0x968B, // + 0x5E57, 0x9BEC, // + 0x5E5F, 0x9BEE, // + 0x5E61, 0x94A6, // + 0x5E62, 0x9BEF, // + 0x5E63, 0x95BC, // + 0x5E64, 0x9BF0, // + 0x5E72, 0x8AB1, // + 0x5E73, 0x95BD, // + 0x5E74, 0x944E, // + 0x5E75, 0x9BF2, // + 0x5E76, 0x9BF3, // + 0x5E78, 0x8D4B, // + 0x5E79, 0x8AB2, // + 0x5E7A, 0x9BF4, // + 0x5E7B, 0x8CB6, // + 0x5E7C, 0x9763, // + 0x5E7D, 0x9748, // + 0x5E7E, 0x8AF4, // + 0x5E7F, 0x9BF6, // + 0x5E81, 0x92A1, // + 0x5E83, 0x8D4C, // + 0x5E84, 0x8FAF, // + 0x5E87, 0x94DD, // + 0x5E8A, 0x8FB0, // + 0x5E8F, 0x8F98, // + 0x5E95, 0x92EA, // + 0x5E96, 0x95F7, // + 0x5E97, 0x9358, // + 0x5E9A, 0x8D4D, // + 0x5E9C, 0x957B, // + 0x5EA0, 0x9BF7, // + 0x5EA6, 0x9378, // + 0x5EA7, 0x8DC0, // + 0x5EAB, 0x8CC9, // + 0x5EAD, 0x92EB, // + 0x5EB5, 0x88C1, // + 0x5EB6, 0x8F8E, // + 0x5EB7, 0x8D4E, // + 0x5EB8, 0x9766, // + 0x5EC1, 0x9BF8, // + 0x5EC2, 0x9BF9, // + 0x5EC3, 0x9470, // + 0x5EC8, 0x9BFA, // + 0x5EC9, 0x97F5, // + 0x5ECA, 0x984C, // + 0x5ECF, 0x9BFC, // + 0x5ED0, 0x9BFB, // + 0x5ED3, 0x8A66, // + 0x5ED6, 0x9C40, // + 0x5EDA, 0x9C43, // + 0x5EDB, 0x9C44, // + 0x5EDD, 0x9C42, // + 0x5EDF, 0x955F, // + 0x5EE0, 0x8FB1, // + 0x5EE1, 0x9C46, // + 0x5EE2, 0x9C45, // + 0x5EE3, 0x9C41, // + 0x5EE8, 0x9C47, // + 0x5EE9, 0x9C48, // + 0x5EEC, 0x9C49, // + 0x5EF0, 0x9C4C, // + 0x5EF1, 0x9C4A, // + 0x5EF3, 0x9C4B, // + 0x5EF4, 0x9C4D, // + 0x5EF6, 0x8984, // + 0x5EF7, 0x92EC, // + 0x5EF8, 0x9C4E, // + 0x5EFA, 0x8C9A, // + 0x5EFB, 0x89F4, // + 0x5EFC, 0x9455, // + 0x5EFE, 0x9C4F, // + 0x5EFF, 0x93F9, // + 0x5F01, 0x95D9, // + 0x5F03, 0x9C50, // + 0x5F04, 0x984D, // + 0x5F09, 0x9C51, // + 0x5F0A, 0x95BE, // + 0x5F0B, 0x9C54, // + 0x5F0C, 0x989F, // + 0x5F0D, 0x98AF, // + 0x5F0F, 0x8EAE, // + 0x5F10, 0x93F3, // + 0x5F11, 0x9C55, // + 0x5F13, 0x8B7C, // + 0x5F14, 0x92A2, // + 0x5F15, 0x88F8, // + 0x5F16, 0x9C56, // + 0x5F17, 0x95A4, // + 0x5F18, 0x8D4F, // + 0x5F1B, 0x926F, // + 0x5F1F, 0x92ED, // + 0x5F25, 0x96ED, // + 0x5F26, 0x8CB7, // + 0x5F27, 0x8CCA, // + 0x5F29, 0x9C57, // + 0x5F2D, 0x9C58, // + 0x5F2F, 0x9C5E, // + 0x5F31, 0x8EE3, // + 0x5F35, 0x92A3, // + 0x5F37, 0x8BAD, // + 0x5F38, 0x9C59, // + 0x5F3C, 0x954A, // + 0x5F3E, 0x9265, // + 0x5F41, 0x9C5A, // + 0x5F4A, 0x8BAE, // + 0x5F4C, 0x9C5C, // + 0x5F4E, 0x9C5D, // + 0x5F51, 0x9C5F, // + 0x5F53, 0x9396, // + 0x5F56, 0x9C60, // + 0x5F57, 0x9C61, // + 0x5F59, 0x9C62, // + 0x5F5C, 0x9C53, // + 0x5F5D, 0x9C52, // + 0x5F61, 0x9C63, // + 0x5F62, 0x8C60, // + 0x5F66, 0x9546, // + 0x5F69, 0x8DCA, // + 0x5F6A, 0x9556, // + 0x5F6B, 0x92A4, // + 0x5F6C, 0x956A, // + 0x5F6D, 0x9C64, // + 0x5F70, 0x8FB2, // + 0x5F71, 0x8965, // + 0x5F73, 0x9C65, // + 0x5F77, 0x9C66, // + 0x5F79, 0x96F0, // + 0x5F7C, 0x94DE, // + 0x5F7F, 0x9C69, // + 0x5F80, 0x899D, // + 0x5F81, 0x90AA, // + 0x5F82, 0x9C68, // + 0x5F83, 0x9C67, // + 0x5F84, 0x8C61, // + 0x5F85, 0x91D2, // + 0x5F87, 0x9C6D, // + 0x5F88, 0x9C6B, // + 0x5F8A, 0x9C6A, // + 0x5F8B, 0x97A5, // + 0x5F8C, 0x8CE3, // + 0x5F90, 0x8F99, // + 0x5F91, 0x9C6C, // + 0x5F92, 0x936B, // + 0x5F93, 0x8F5D, // + 0x5F97, 0x93BE, // + 0x5F98, 0x9C70, // + 0x5F99, 0x9C6F, // + 0x5F9E, 0x9C6E, // + 0x5FA0, 0x9C71, // + 0x5FA1, 0x8CE4, // + 0x5FA8, 0x9C72, // + 0x5FA9, 0x959C, // + 0x5FAA, 0x8F7A, // + 0x5FAD, 0x9C73, // + 0x5FAE, 0x94F7, // + 0x5FB3, 0x93BF, // + 0x5FB4, 0x92A5, // + 0x5FB9, 0x934F, // + 0x5FBC, 0x9C74, // + 0x5FBD, 0x8B4A, // + 0x5FC3, 0x9053, // + 0x5FC5, 0x954B, // + 0x5FCC, 0x8AF5, // + 0x5FCD, 0x9445, // + 0x5FD6, 0x9C75, // + 0x5FD7, 0x8E75, // + 0x5FD8, 0x9659, // + 0x5FD9, 0x965A, // + 0x5FDC, 0x899E, // + 0x5FDD, 0x9C7A, // + 0x5FE0, 0x9289, // + 0x5FE4, 0x9C77, // + 0x5FEB, 0x89F5, // + 0x5FF0, 0x9CAB, // + 0x5FF1, 0x9C79, // + 0x5FF5, 0x944F, // + 0x5FF8, 0x9C78, // + 0x5FFB, 0x9C76, // + 0x5FFD, 0x8D9A, // + 0x5FFF, 0x9C7C, // + 0x600E, 0x9C83, // + 0x600F, 0x9C89, // + 0x6010, 0x9C81, // + 0x6012, 0x937B, // + 0x6015, 0x9C86, // + 0x6016, 0x957C, // + 0x6019, 0x9C80, // + 0x601B, 0x9C85, // + 0x601C, 0x97E5, // + 0x601D, 0x8E76, // + 0x6020, 0x91D3, // + 0x6021, 0x9C7D, // + 0x6025, 0x8B7D, // + 0x6026, 0x9C88, // + 0x6027, 0x90AB, // + 0x6028, 0x8985, // + 0x6029, 0x9C82, // + 0x602A, 0x89F6, // + 0x602B, 0x9C87, // + 0x602F, 0x8BAF, // + 0x6031, 0x9C84, // + 0x603A, 0x9C8A, // + 0x6041, 0x9C8C, // + 0x6042, 0x9C96, // + 0x6043, 0x9C94, // + 0x6046, 0x9C91, // + 0x604A, 0x9C90, // + 0x604B, 0x97F6, // + 0x604D, 0x9C92, // + 0x6050, 0x8BB0, // + 0x6052, 0x8D50, // + 0x6055, 0x8F9A, // + 0x6059, 0x9C99, // + 0x605A, 0x9C8B, // + 0x605F, 0x9C8F, // + 0x6060, 0x9C7E, // + 0x6062, 0x89F8, // + 0x6063, 0x9C93, // + 0x6064, 0x9C95, // + 0x6065, 0x9270, // + 0x6068, 0x8DA6, // + 0x6069, 0x89B6, // + 0x606A, 0x9C8D, // + 0x606B, 0x9C98, // + 0x606C, 0x9C97, // + 0x606D, 0x8BB1, // + 0x606F, 0x91A7, // + 0x6070, 0x8A86, // + 0x6075, 0x8C62, // + 0x6077, 0x9C8E, // + 0x6081, 0x9C9A, // + 0x6083, 0x9C9D, // + 0x6084, 0x9C9F, // + 0x6089, 0x8EBB, // + 0x608B, 0x9CA5, // + 0x608C, 0x92EE, // + 0x608D, 0x9C9B, // + 0x6092, 0x9CA3, // + 0x6094, 0x89F7, // + 0x6096, 0x9CA1, // + 0x6097, 0x9CA2, // + 0x609A, 0x9C9E, // + 0x609B, 0x9CA0, // + 0x609F, 0x8CE5, // + 0x60A0, 0x9749, // + 0x60A3, 0x8AB3, // + 0x60A6, 0x8978, // + 0x60A7, 0x9CA4, // + 0x60A9, 0x9459, // + 0x60AA, 0x88AB, // + 0x60B2, 0x94DF, // + 0x60B3, 0x9C7B, // + 0x60B4, 0x9CAA, // + 0x60B5, 0x9CAE, // + 0x60B6, 0x96E3, // + 0x60B8, 0x9CA7, // + 0x60BC, 0x9389, // + 0x60BD, 0x9CAC, // + 0x60C5, 0x8FEE, // + 0x60C6, 0x9CAD, // + 0x60C7, 0x93D5, // + 0x60D1, 0x9866, // + 0x60D3, 0x9CA9, // + 0x60D8, 0x9CAF, // + 0x60DA, 0x8D9B, // + 0x60DC, 0x90C9, // + 0x60DF, 0x88D2, // + 0x60E0, 0x9CA8, // + 0x60E1, 0x9CA6, // + 0x60E3, 0x9179, // + 0x60E7, 0x9C9C, // + 0x60E8, 0x8E53, // + 0x60F0, 0x91C4, // + 0x60F1, 0x9CBB, // + 0x60F3, 0x917A, // + 0x60F4, 0x9CB6, // + 0x60F6, 0x9CB3, // + 0x60F7, 0x9CB4, // + 0x60F9, 0x8EE4, // + 0x60FA, 0x9CB7, // + 0x60FB, 0x9CBA, // + 0x6100, 0x9CB5, // + 0x6101, 0x8F44, // + 0x6103, 0x9CB8, // + 0x6106, 0x9CB2, // + 0x6108, 0x96FA, // + 0x6109, 0x96F9, // + 0x610D, 0x9CBC, // + 0x610E, 0x9CBD, // + 0x610F, 0x88D3, // + 0x6115, 0x9CB1, // + 0x611A, 0x8BF0, // + 0x611B, 0x88A4, // + 0x611F, 0x8AB4, // + 0x6121, 0x9CB9, // + 0x6127, 0x9CC1, // + 0x6128, 0x9CC0, // + 0x612C, 0x9CC5, // + 0x6134, 0x9CC6, // + 0x613C, 0x9CC4, // + 0x613D, 0x9CC7, // + 0x613E, 0x9CBF, // + 0x613F, 0x9CC3, // + 0x6142, 0x9CC8, // + 0x6144, 0x9CC9, // + 0x6147, 0x9CBE, // + 0x6148, 0x8E9C, // + 0x614A, 0x9CC2, // + 0x614B, 0x91D4, // + 0x614C, 0x8D51, // + 0x614D, 0x9CB0, // + 0x614E, 0x9054, // + 0x6153, 0x9CD6, // + 0x6155, 0x95E7, // + 0x6158, 0x9CCC, // + 0x6159, 0x9CCD, // + 0x615A, 0x9CCE, // + 0x615D, 0x9CD5, // + 0x615F, 0x9CD4, // + 0x6162, 0x969D, // + 0x6163, 0x8AB5, // + 0x6165, 0x9CD2, // + 0x6167, 0x8C64, // + 0x6168, 0x8A53, // + 0x616B, 0x9CCF, // + 0x616E, 0x97B6, // + 0x616F, 0x9CD1, // + 0x6170, 0x88D4, // + 0x6171, 0x9CD3, // + 0x6173, 0x9CCA, // + 0x6174, 0x9CD0, // + 0x6175, 0x9CD7, // + 0x6176, 0x8C63, // + 0x6177, 0x9CCB, // + 0x617E, 0x977C, // + 0x6182, 0x974A, // + 0x6187, 0x9CDA, // + 0x618A, 0x9CDE, // + 0x618E, 0x919E, // + 0x6190, 0x97F7, // + 0x6191, 0x9CDF, // + 0x6194, 0x9CDC, // + 0x6196, 0x9CD9, // + 0x6199, 0x9CD8, // + 0x619A, 0x9CDD, // + 0x61A4, 0x95AE, // + 0x61A7, 0x93B2, // + 0x61A9, 0x8C65, // + 0x61AB, 0x9CE0, // + 0x61AC, 0x9CDB, // + 0x61AE, 0x9CE1, // + 0x61B2, 0x8C9B, // + 0x61B6, 0x89AF, // + 0x61BA, 0x9CE9, // + 0x61BE, 0x8AB6, // + 0x61C3, 0x9CE7, // + 0x61C6, 0x9CE8, // + 0x61C7, 0x8DA7, // + 0x61C8, 0x9CE6, // + 0x61C9, 0x9CE4, // + 0x61CA, 0x9CE3, // + 0x61CB, 0x9CEA, // + 0x61CC, 0x9CE2, // + 0x61CD, 0x9CEC, // + 0x61D0, 0x89F9, // + 0x61E3, 0x9CEE, // + 0x61E6, 0x9CED, // + 0x61F2, 0x92A6, // + 0x61F4, 0x9CF1, // + 0x61F6, 0x9CEF, // + 0x61F7, 0x9CE5, // + 0x61F8, 0x8C9C, // + 0x61FA, 0x9CF0, // + 0x61FC, 0x9CF4, // + 0x61FD, 0x9CF3, // + 0x61FE, 0x9CF5, // + 0x61FF, 0x9CF2, // + 0x6200, 0x9CF6, // + 0x6208, 0x9CF7, // + 0x6209, 0x9CF8, // + 0x620A, 0x95E8, // + 0x620C, 0x9CFA, // + 0x620D, 0x9CF9, // + 0x620E, 0x8F5E, // + 0x6210, 0x90AC, // + 0x6211, 0x89E4, // + 0x6212, 0x89FA, // + 0x6214, 0x9CFB, // + 0x6216, 0x88BD, // + 0x621A, 0x90CA, // + 0x621B, 0x9CFC, // + 0x621D, 0xE6C1, // + 0x621E, 0x9D40, // + 0x621F, 0x8C81, // + 0x6221, 0x9D41, // + 0x6226, 0x90ED, // + 0x622A, 0x9D42, // + 0x622E, 0x9D43, // + 0x622F, 0x8B59, // + 0x6230, 0x9D44, // + 0x6232, 0x9D45, // + 0x6233, 0x9D46, // + 0x6234, 0x91D5, // + 0x6238, 0x8CCB, // + 0x623B, 0x96DF, // + 0x6240, 0x8F8A, // + 0x6241, 0x9D47, // + 0x6247, 0x90EE, // + 0x6248, 0xE7BB, // + 0x6249, 0x94E0, // + 0x624B, 0x8EE8, // + 0x624D, 0x8DCB, // + 0x624E, 0x9D48, // + 0x6253, 0x91C5, // + 0x6255, 0x95A5, // + 0x6258, 0x91EF, // + 0x625B, 0x9D4B, // + 0x625E, 0x9D49, // + 0x6260, 0x9D4C, // + 0x6263, 0x9D4A, // + 0x6268, 0x9D4D, // + 0x626E, 0x95AF, // + 0x6271, 0x88B5, // + 0x6276, 0x957D, // + 0x6279, 0x94E1, // + 0x627C, 0x9D4E, // + 0x627E, 0x9D51, // + 0x627F, 0x8FB3, // + 0x6280, 0x8B5A, // + 0x6282, 0x9D4F, // + 0x6283, 0x9D56, // + 0x6284, 0x8FB4, // + 0x6289, 0x9D50, // + 0x628A, 0x9463, // + 0x6291, 0x977D, // + 0x6292, 0x9D52, // + 0x6293, 0x9D53, // + 0x6294, 0x9D57, // + 0x6295, 0x938A, // + 0x6296, 0x9D54, // + 0x6297, 0x8D52, // + 0x6298, 0x90DC, // + 0x629B, 0x9D65, // + 0x629C, 0x94B2, // + 0x629E, 0x91F0, // + 0x62AB, 0x94E2, // + 0x62AC, 0x9DAB, // + 0x62B1, 0x95F8, // + 0x62B5, 0x92EF, // + 0x62B9, 0x9695, // + 0x62BB, 0x9D5A, // + 0x62BC, 0x899F, // + 0x62BD, 0x928A, // + 0x62C2, 0x9D63, // + 0x62C5, 0x9253, // + 0x62C6, 0x9D5D, // + 0x62C7, 0x9D64, // + 0x62C8, 0x9D5F, // + 0x62C9, 0x9D66, // + 0x62CA, 0x9D62, // + 0x62CC, 0x9D61, // + 0x62CD, 0x948F, // + 0x62D0, 0x89FB, // + 0x62D1, 0x9D59, // + 0x62D2, 0x8B91, // + 0x62D3, 0x91F1, // + 0x62D4, 0x9D55, // + 0x62D7, 0x9D58, // + 0x62D8, 0x8D53, // + 0x62D9, 0x90D9, // + 0x62DB, 0x8FB5, // + 0x62DC, 0x9D60, // + 0x62DD, 0x9471, // + 0x62E0, 0x8B92, // + 0x62E1, 0x8A67, // + 0x62EC, 0x8A87, // + 0x62ED, 0x9040, // + 0x62EE, 0x9D68, // + 0x62EF, 0x9D6D, // + 0x62F1, 0x9D69, // + 0x62F3, 0x8C9D, // + 0x62F5, 0x9D6E, // + 0x62F6, 0x8E41, // + 0x62F7, 0x8D89, // + 0x62FE, 0x8F45, // + 0x62FF, 0x9D5C, // + 0x6301, 0x8E9D, // + 0x6302, 0x9D6B, // + 0x6307, 0x8E77, // + 0x6308, 0x9D6C, // + 0x6309, 0x88C2, // + 0x630C, 0x9D67, // + 0x6311, 0x92A7, // + 0x6319, 0x8B93, // + 0x631F, 0x8BB2, // + 0x6327, 0x9D6A, // + 0x6328, 0x88A5, // + 0x632B, 0x8DC1, // + 0x632F, 0x9055, // + 0x633A, 0x92F0, // + 0x633D, 0x94D2, // + 0x633E, 0x9D70, // + 0x633F, 0x917D, // + 0x6349, 0x91A8, // + 0x634C, 0x8E4A, // + 0x634D, 0x9D71, // + 0x634F, 0x9D73, // + 0x6350, 0x9D6F, // + 0x6355, 0x95DF, // + 0x6357, 0x92BB, // + 0x635C, 0x917B, // + 0x6367, 0x95F9, // + 0x6368, 0x8ECC, // + 0x6369, 0x9D80, // + 0x636B, 0x9D7E, // + 0x636E, 0x9098, // + 0x6372, 0x8C9E, // + 0x6376, 0x9D78, // + 0x6377, 0x8FB7, // + 0x637A, 0x93E6, // + 0x637B, 0x9450, // + 0x6380, 0x9D76, // + 0x6383, 0x917C, // + 0x6388, 0x8EF6, // + 0x6389, 0x9D7B, // + 0x638C, 0x8FB6, // + 0x638E, 0x9D75, // + 0x638F, 0x9D7A, // + 0x6392, 0x9472, // + 0x6396, 0x9D74, // + 0x6398, 0x8C40, // + 0x639B, 0x8A7C, // + 0x639F, 0x9D7C, // + 0x63A0, 0x97A9, // + 0x63A1, 0x8DCC, // + 0x63A2, 0x9254, // + 0x63A3, 0x9D79, // + 0x63A5, 0x90DA, // + 0x63A7, 0x8D54, // + 0x63A8, 0x9084, // + 0x63A9, 0x8986, // + 0x63AB, 0x9D77, // + 0x63AC, 0x8B64, // + 0x63B2, 0x8C66, // + 0x63B4, 0x92CD, // + 0x63B5, 0x9D7D, // + 0x63BB, 0x917E, // + 0x63BE, 0x9D81, // + 0x63C0, 0x9D83, // + 0x63C3, 0x91B5, // + 0x63C4, 0x9D89, // + 0x63C6, 0x9D84, // + 0x63C9, 0x9D86, // + 0x63CF, 0x9560, // + 0x63D0, 0x92F1, // + 0x63D2, 0x9D87, // + 0x63D6, 0x974B, // + 0x63DA, 0x9767, // + 0x63DB, 0x8AB7, // + 0x63E1, 0x88AC, // + 0x63E3, 0x9D85, // + 0x63E9, 0x9D82, // + 0x63EE, 0x8AF6, // + 0x63F4, 0x8987, // + 0x63F6, 0x9D88, // + 0x63FA, 0x9768, // + 0x6406, 0x9D8C, // + 0x640D, 0x91B9, // + 0x640F, 0x9D93, // + 0x6413, 0x9D8D, // + 0x6416, 0x9D8A, // + 0x6417, 0x9D91, // + 0x641C, 0x9D72, // + 0x6426, 0x9D8E, // + 0x6428, 0x9D92, // + 0x642C, 0x94C0, // + 0x642D, 0x938B, // + 0x6434, 0x9D8B, // + 0x6436, 0x9D8F, // + 0x643A, 0x8C67, // + 0x643E, 0x8DEF, // + 0x6442, 0x90DB, // + 0x644E, 0x9D97, // + 0x6458, 0x9345, // + 0x6467, 0x9D94, // + 0x6469, 0x9680, // + 0x646F, 0x9D95, // + 0x6476, 0x9D96, // + 0x6478, 0x96CC, // + 0x647A, 0x90A0, // + 0x6483, 0x8C82, // + 0x6488, 0x9D9D, // + 0x6492, 0x8E54, // + 0x6493, 0x9D9A, // + 0x6495, 0x9D99, // + 0x649A, 0x9451, // + 0x649E, 0x93B3, // + 0x64A4, 0x9350, // + 0x64A5, 0x9D9B, // + 0x64A9, 0x9D9C, // + 0x64AB, 0x958F, // + 0x64AD, 0x9464, // + 0x64AE, 0x8E42, // + 0x64B0, 0x90EF, // + 0x64B2, 0x966F, // + 0x64B9, 0x8A68, // + 0x64BB, 0x9DA3, // + 0x64BC, 0x9D9E, // + 0x64C1, 0x9769, // + 0x64C2, 0x9DA5, // + 0x64C5, 0x9DA1, // + 0x64C7, 0x9DA2, // + 0x64CD, 0x9180, // + 0x64D2, 0x9DA0, // + 0x64D4, 0x9D5E, // + 0x64D8, 0x9DA4, // + 0x64DA, 0x9D9F, // + 0x64E0, 0x9DA9, // + 0x64E1, 0x9DAA, // + 0x64E2, 0x9346, // + 0x64E3, 0x9DAC, // + 0x64E6, 0x8E43, // + 0x64E7, 0x9DA7, // + 0x64EF, 0x9DAD, // + 0x64F1, 0x9DA6, // + 0x64F2, 0x9DB1, // + 0x64F4, 0x9DB0, // + 0x64F6, 0x9DAF, // + 0x64FA, 0x9DB2, // + 0x64FD, 0x9DB4, // + 0x64FE, 0x8FEF, // + 0x6500, 0x9DB3, // + 0x6505, 0x9DB7, // + 0x6518, 0x9DB5, // + 0x651C, 0x9DB6, // + 0x651D, 0x9D90, // + 0x6523, 0x9DB9, // + 0x6524, 0x9DB8, // + 0x652A, 0x9D98, // + 0x652B, 0x9DBA, // + 0x652C, 0x9DAE, // + 0x652F, 0x8E78, // + 0x6534, 0x9DBB, // + 0x6535, 0x9DBC, // + 0x6536, 0x9DBE, // + 0x6537, 0x9DBD, // + 0x6538, 0x9DBF, // + 0x6539, 0x89FC, // + 0x653B, 0x8D55, // + 0x653E, 0x95FA, // + 0x653F, 0x90AD, // + 0x6545, 0x8CCC, // + 0x6548, 0x9DC1, // + 0x654D, 0x9DC4, // + 0x654F, 0x9571, // + 0x6551, 0x8B7E, // + 0x6555, 0x9DC3, // + 0x6556, 0x9DC2, // + 0x6557, 0x9473, // + 0x6558, 0x9DC5, // + 0x6559, 0x8BB3, // + 0x655D, 0x9DC7, // + 0x655E, 0x9DC6, // + 0x6562, 0x8AB8, // + 0x6563, 0x8E55, // + 0x6566, 0x93D6, // + 0x656C, 0x8C68, // + 0x6570, 0x9094, // + 0x6572, 0x9DC8, // + 0x6574, 0x90AE, // + 0x6575, 0x9347, // + 0x6577, 0x957E, // + 0x6578, 0x9DC9, // + 0x6582, 0x9DCA, // + 0x6583, 0x9DCB, // + 0x6587, 0x95B6, // + 0x6588, 0x9B7C, // + 0x6589, 0x90C4, // + 0x658C, 0x956B, // + 0x658E, 0x8DD6, // + 0x6590, 0x94E3, // + 0x6591, 0x94C1, // + 0x6597, 0x936C, // + 0x6599, 0x97BF, // + 0x659B, 0x9DCD, // + 0x659C, 0x8ECE, // + 0x659F, 0x9DCE, // + 0x65A1, 0x88B4, // + 0x65A4, 0x8BD2, // + 0x65A5, 0x90CB, // + 0x65A7, 0x9580, // + 0x65AB, 0x9DCF, // + 0x65AC, 0x8E61, // + 0x65AD, 0x9266, // + 0x65AF, 0x8E7A, // + 0x65B0, 0x9056, // + 0x65B7, 0x9DD0, // + 0x65B9, 0x95FB, // + 0x65BC, 0x8997, // + 0x65BD, 0x8E7B, // + 0x65C1, 0x9DD3, // + 0x65C3, 0x9DD1, // + 0x65C4, 0x9DD4, // + 0x65C5, 0x97B7, // + 0x65C6, 0x9DD2, // + 0x65CB, 0x90F9, // + 0x65CC, 0x9DD5, // + 0x65CF, 0x91B0, // + 0x65D2, 0x9DD6, // + 0x65D7, 0x8AF8, // + 0x65D9, 0x9DD8, // + 0x65DB, 0x9DD7, // + 0x65E0, 0x9DD9, // + 0x65E1, 0x9DDA, // + 0x65E2, 0x8AF9, // + 0x65E5, 0x93FA, // + 0x65E6, 0x9255, // + 0x65E7, 0x8B8C, // + 0x65E8, 0x8E7C, // + 0x65E9, 0x9181, // + 0x65EC, 0x8F7B, // + 0x65ED, 0x88AE, // + 0x65F1, 0x9DDB, // + 0x65FA, 0x89A0, // + 0x65FB, 0x9DDF, // + 0x6602, 0x8D56, // + 0x6603, 0x9DDE, // + 0x6606, 0x8DA9, // + 0x6607, 0x8FB8, // + 0x660A, 0x9DDD, // + 0x660C, 0x8FB9, // + 0x660E, 0x96BE, // + 0x660F, 0x8DA8, // + 0x6613, 0x88D5, // + 0x6614, 0x90CC, // + 0x661C, 0x9DE4, // + 0x661F, 0x90AF, // + 0x6620, 0x8966, // + 0x6625, 0x8F74, // + 0x6627, 0x9686, // + 0x6628, 0x8DF0, // + 0x662D, 0x8FBA, // + 0x662F, 0x90A5, // + 0x6634, 0x9DE3, // + 0x6635, 0x9DE1, // + 0x6636, 0x9DE2, // + 0x663C, 0x928B, // + 0x663F, 0x9E45, // + 0x6641, 0x9DE8, // + 0x6642, 0x8E9E, // + 0x6643, 0x8D57, // + 0x6644, 0x9DE6, // + 0x6649, 0x9DE7, // + 0x664B, 0x9057, // + 0x664F, 0x9DE5, // + 0x6652, 0x8E4E, // + 0x665D, 0x9DEA, // + 0x665E, 0x9DE9, // + 0x665F, 0x9DEE, // + 0x6662, 0x9DEF, // + 0x6664, 0x9DEB, // + 0x6666, 0x8A41, // + 0x6667, 0x9DEC, // + 0x6668, 0x9DED, // + 0x6669, 0x94D3, // + 0x666E, 0x9581, // + 0x666F, 0x8C69, // + 0x6670, 0x9DF0, // + 0x6674, 0x90B0, // + 0x6676, 0x8FBB, // + 0x667A, 0x9271, // + 0x6681, 0x8BC5, // + 0x6683, 0x9DF1, // + 0x6684, 0x9DF5, // + 0x6687, 0x89C9, // + 0x6688, 0x9DF2, // + 0x6689, 0x9DF4, // + 0x668E, 0x9DF3, // + 0x6691, 0x8F8B, // + 0x6696, 0x9267, // + 0x6697, 0x88C3, // + 0x6698, 0x9DF6, // + 0x669D, 0x9DF7, // + 0x66A2, 0x92A8, // + 0x66A6, 0x97EF, // + 0x66AB, 0x8E62, // + 0x66AE, 0x95E9, // + 0x66B4, 0x965C, // + 0x66B8, 0x9E41, // + 0x66B9, 0x9DF9, // + 0x66BC, 0x9DFC, // + 0x66BE, 0x9DFB, // + 0x66C1, 0x9DF8, // + 0x66C4, 0x9E40, // + 0x66C7, 0x93DC, // + 0x66C9, 0x9DFA, // + 0x66D6, 0x9E42, // + 0x66D9, 0x8F8C, // + 0x66DA, 0x9E43, // + 0x66DC, 0x976A, // + 0x66DD, 0x9498, // + 0x66E0, 0x9E44, // + 0x66E6, 0x9E46, // + 0x66E9, 0x9E47, // + 0x66F0, 0x9E48, // + 0x66F2, 0x8BC8, // + 0x66F3, 0x8967, // + 0x66F4, 0x8D58, // + 0x66F5, 0x9E49, // + 0x66F7, 0x9E4A, // + 0x66F8, 0x8F91, // + 0x66F9, 0x9182, // + 0x66FC, 0x99D6, // + 0x66FD, 0x915D, // + 0x66FE, 0x915C, // + 0x66FF, 0x91D6, // + 0x6700, 0x8DC5, // + 0x6703, 0x98F0, // + 0x6708, 0x8C8E, // + 0x6709, 0x974C, // + 0x670B, 0x95FC, // + 0x670D, 0x959E, // + 0x670F, 0x9E4B, // + 0x6714, 0x8DF1, // + 0x6715, 0x92BD, // + 0x6716, 0x9E4C, // + 0x6717, 0x984E, // + 0x671B, 0x965D, // + 0x671D, 0x92A9, // + 0x671E, 0x9E4D, // + 0x671F, 0x8AFA, // + 0x6726, 0x9E4E, // + 0x6727, 0x9E4F, // + 0x6728, 0x96D8, // + 0x672A, 0x96A2, // + 0x672B, 0x9696, // + 0x672C, 0x967B, // + 0x672D, 0x8E44, // + 0x672E, 0x9E51, // + 0x6731, 0x8EE9, // + 0x6734, 0x9670, // + 0x6736, 0x9E53, // + 0x6737, 0x9E56, // + 0x6738, 0x9E55, // + 0x673A, 0x8AF7, // + 0x673D, 0x8B80, // + 0x673F, 0x9E52, // + 0x6741, 0x9E54, // + 0x6746, 0x9E57, // + 0x6749, 0x9099, // + 0x674E, 0x979B, // + 0x674F, 0x88C7, // + 0x6750, 0x8DDE, // + 0x6751, 0x91BA, // + 0x6753, 0x8EDB, // + 0x6756, 0x8FF1, // + 0x6759, 0x9E5A, // + 0x675C, 0x936D, // + 0x675E, 0x9E58, // + 0x675F, 0x91A9, // + 0x6760, 0x9E59, // + 0x6761, 0x8FF0, // + 0x6762, 0x96DB, // + 0x6764, 0x9E5C, // + 0x6765, 0x9788, // + 0x676A, 0x9E61, // + 0x676D, 0x8D59, // + 0x676F, 0x9474, // + 0x6770, 0x9E5E, // + 0x6771, 0x938C, // + 0x6772, 0x9DDC, // + 0x6773, 0x9DE0, // + 0x6775, 0x8B6E, // + 0x6777, 0x9466, // + 0x677C, 0x9E60, // + 0x677E, 0x8FBC, // + 0x677F, 0x94C2, // + 0x6785, 0x9E66, // + 0x6787, 0x94F8, // + 0x6789, 0x9E5D, // + 0x678B, 0x9E63, // + 0x678C, 0x9E62, // + 0x6790, 0x90CD, // + 0x6795, 0x968D, // + 0x6797, 0x97D1, // + 0x679A, 0x9687, // + 0x679C, 0x89CA, // + 0x679D, 0x8E7D, // + 0x67A0, 0x9867, // + 0x67A1, 0x9E65, // + 0x67A2, 0x9095, // + 0x67A6, 0x9E64, // + 0x67A9, 0x9E5F, // + 0x67AF, 0x8CCD, // + 0x67B3, 0x9E6B, // + 0x67B4, 0x9E69, // + 0x67B6, 0x89CB, // + 0x67B7, 0x9E67, // + 0x67B8, 0x9E6D, // + 0x67B9, 0x9E73, // + 0x67C1, 0x91C6, // + 0x67C4, 0x95BF, // + 0x67C6, 0x9E75, // + 0x67CA, 0x9541, // + 0x67CE, 0x9E74, // + 0x67CF, 0x9490, // + 0x67D0, 0x965E, // + 0x67D1, 0x8AB9, // + 0x67D3, 0x90F5, // + 0x67D4, 0x8F5F, // + 0x67D8, 0x92D1, // + 0x67DA, 0x974D, // + 0x67DD, 0x9E70, // + 0x67DE, 0x9E6F, // + 0x67E2, 0x9E71, // + 0x67E4, 0x9E6E, // + 0x67E7, 0x9E76, // + 0x67E9, 0x9E6C, // + 0x67EC, 0x9E6A, // + 0x67EE, 0x9E72, // + 0x67EF, 0x9E68, // + 0x67F1, 0x928C, // + 0x67F3, 0x96F6, // + 0x67F4, 0x8EC4, // + 0x67F5, 0x8DF2, // + 0x67FB, 0x8DB8, // + 0x67FE, 0x968F, // + 0x67FF, 0x8A60, // + 0x6802, 0x92CC, // + 0x6803, 0x93C8, // + 0x6804, 0x8968, // + 0x6813, 0x90F0, // + 0x6816, 0x90B2, // + 0x6817, 0x8C49, // + 0x681E, 0x9E78, // + 0x6821, 0x8D5A, // + 0x6822, 0x8A9C, // + 0x6829, 0x9E7A, // + 0x682A, 0x8A94, // + 0x682B, 0x9E81, // + 0x6832, 0x9E7D, // + 0x6834, 0x90F1, // + 0x6838, 0x8A6A, // + 0x6839, 0x8DAA, // + 0x683C, 0x8A69, // + 0x683D, 0x8DCD, // + 0x6840, 0x9E7B, // + 0x6841, 0x8C85, // + 0x6842, 0x8C6A, // + 0x6843, 0x938D, // + 0x6846, 0x9E79, // + 0x6848, 0x88C4, // + 0x684D, 0x9E7C, // + 0x684E, 0x9E7E, // + 0x6850, 0x8BCB, // + 0x6851, 0x8C4B, // + 0x6853, 0x8ABA, // + 0x6854, 0x8B6A, // + 0x6859, 0x9E82, // + 0x685C, 0x8DF7, // + 0x685D, 0x9691, // + 0x685F, 0x8E56, // + 0x6863, 0x9E83, // + 0x6867, 0x954F, // + 0x6874, 0x9E8F, // + 0x6876, 0x89B1, // + 0x6877, 0x9E84, // + 0x687E, 0x9E95, // + 0x687F, 0x9E85, // + 0x6881, 0x97C0, // + 0x6883, 0x9E8C, // + 0x6885, 0x947E, // + 0x688D, 0x9E94, // + 0x688F, 0x9E87, // + 0x6893, 0x88B2, // + 0x6894, 0x9E89, // + 0x689B, 0x9E8B, // + 0x689D, 0x9E8A, // + 0x689F, 0x9E86, // + 0x68A0, 0x9E91, // + 0x68A2, 0x8FBD, // + 0x68A6, 0x9AEB, // + 0x68A7, 0x8CE6, // + 0x68A8, 0x979C, // + 0x68AD, 0x9E88, // + 0x68AF, 0x92F2, // + 0x68B0, 0x8A42, // + 0x68B1, 0x8DAB, // + 0x68B3, 0x9E80, // + 0x68B5, 0x9E90, // + 0x68B6, 0x8A81, // + 0x68B9, 0x9E8E, // + 0x68BA, 0x9E92, // + 0x68BC, 0x938E, // + 0x68C4, 0x8AFC, // + 0x68C6, 0x9EB0, // + 0x68C9, 0x96C7, // + 0x68CA, 0x9E97, // + 0x68CB, 0x8AFB, // + 0x68CD, 0x9E9E, // + 0x68D2, 0x965F, // + 0x68D4, 0x9E9F, // + 0x68D5, 0x9EA1, // + 0x68D7, 0x9EA5, // + 0x68D8, 0x9E99, // + 0x68DA, 0x9249, // + 0x68DF, 0x938F, // + 0x68E0, 0x9EA9, // + 0x68E1, 0x9E9C, // + 0x68E3, 0x9EA6, // + 0x68E7, 0x9EA0, // + 0x68EE, 0x9058, // + 0x68EF, 0x9EAA, // + 0x68F2, 0x90B1, // + 0x68F9, 0x9EA8, // + 0x68FA, 0x8ABB, // + 0x6900, 0x986F, // + 0x6901, 0x9E96, // + 0x6904, 0x9EA4, // + 0x6905, 0x88D6, // + 0x6908, 0x9E98, // + 0x690B, 0x96B8, // + 0x690C, 0x9E9D, // + 0x690D, 0x9041, // + 0x690E, 0x92C5, // + 0x690F, 0x9E93, // + 0x6912, 0x9EA3, // + 0x6919, 0x909A, // + 0x691A, 0x9EAD, // + 0x691B, 0x8A91, // + 0x691C, 0x8C9F, // + 0x6921, 0x9EAF, // + 0x6922, 0x9E9A, // + 0x6923, 0x9EAE, // + 0x6925, 0x9EA7, // + 0x6926, 0x9E9B, // + 0x6928, 0x9EAB, // + 0x692A, 0x9EAC, // + 0x6930, 0x9EBD, // + 0x6934, 0x93CC, // + 0x6936, 0x9EA2, // + 0x6939, 0x9EB9, // + 0x693D, 0x9EBB, // + 0x693F, 0x92D6, // + 0x694A, 0x976B, // + 0x6953, 0x9596, // + 0x6954, 0x9EB6, // + 0x6955, 0x91C8, // + 0x6959, 0x9EBC, // + 0x695A, 0x915E, // + 0x695C, 0x9EB3, // + 0x695D, 0x9EC0, // + 0x695E, 0x9EBF, // + 0x6960, 0x93ED, // + 0x6961, 0x9EBE, // + 0x6962, 0x93E8, // + 0x696A, 0x9EC2, // + 0x696B, 0x9EB5, // + 0x696D, 0x8BC6, // + 0x696E, 0x9EB8, // + 0x696F, 0x8F7C, // + 0x6973, 0x9480, // + 0x6974, 0x9EBA, // + 0x6975, 0x8BC9, // + 0x6977, 0x9EB2, // + 0x6978, 0x9EB4, // + 0x6979, 0x9EB1, // + 0x697C, 0x984F, // + 0x697D, 0x8A79, // + 0x697E, 0x9EB7, // + 0x6981, 0x9EC1, // + 0x6982, 0x8A54, // + 0x698A, 0x8DE5, // + 0x698E, 0x897C, // + 0x6991, 0x9ED2, // + 0x6994, 0x9850, // + 0x6995, 0x9ED5, // + 0x699B, 0x9059, // + 0x699C, 0x9ED4, // + 0x69A0, 0x9ED3, // + 0x69A7, 0x9ED0, // + 0x69AE, 0x9EC4, // + 0x69B1, 0x9EE1, // + 0x69B2, 0x9EC3, // + 0x69B4, 0x9ED6, // + 0x69BB, 0x9ECE, // + 0x69BE, 0x9EC9, // + 0x69BF, 0x9EC6, // + 0x69C1, 0x9EC7, // + 0x69C3, 0x9ECF, // + 0x69C7, 0xEAA0, // + 0x69CA, 0x9ECC, // + 0x69CB, 0x8D5C, // + 0x69CC, 0x92C6, // + 0x69CD, 0x9184, // + 0x69CE, 0x9ECA, // + 0x69D0, 0x9EC5, // + 0x69D3, 0x9EC8, // + 0x69D8, 0x976C, // + 0x69D9, 0x968A, // + 0x69DD, 0x9ECD, // + 0x69DE, 0x9ED7, // + 0x69E7, 0x9EDF, // + 0x69E8, 0x9ED8, // + 0x69EB, 0x9EE5, // + 0x69ED, 0x9EE3, // + 0x69F2, 0x9EDE, // + 0x69F9, 0x9EDD, // + 0x69FB, 0x92CE, // + 0x69FD, 0x9185, // + 0x69FF, 0x9EDB, // + 0x6A02, 0x9ED9, // + 0x6A05, 0x9EE0, // + 0x6A0A, 0x9EE6, // + 0x6A0B, 0x94F3, // + 0x6A0C, 0x9EEC, // + 0x6A12, 0x9EE7, // + 0x6A13, 0x9EEA, // + 0x6A14, 0x9EE4, // + 0x6A17, 0x9294, // + 0x6A19, 0x9557, // + 0x6A1B, 0x9EDA, // + 0x6A1E, 0x9EE2, // + 0x6A1F, 0x8FBE, // + 0x6A21, 0x96CD, // + 0x6A22, 0x9EF6, // + 0x6A23, 0x9EE9, // + 0x6A29, 0x8CA0, // + 0x6A2A, 0x89A1, // + 0x6A2B, 0x8A7E, // + 0x6A2E, 0x9ED1, // + 0x6A35, 0x8FBF, // + 0x6A36, 0x9EEE, // + 0x6A38, 0x9EF5, // + 0x6A39, 0x8EF7, // + 0x6A3A, 0x8A92, // + 0x6A3D, 0x924D, // + 0x6A44, 0x9EEB, // + 0x6A47, 0x9EF0, // + 0x6A48, 0x9EF4, // + 0x6A4B, 0x8BB4, // + 0x6A58, 0x8B6B, // + 0x6A59, 0x9EF2, // + 0x6A5F, 0x8B40, // + 0x6A61, 0x93C9, // + 0x6A62, 0x9EF1, // + 0x6A66, 0x9EF3, // + 0x6A72, 0x9EED, // + 0x6A78, 0x9EEF, // + 0x6A7F, 0x8A80, // + 0x6A80, 0x9268, // + 0x6A84, 0x9EFA, // + 0x6A8D, 0x9EF8, // + 0x6A8E, 0x8CE7, // + 0x6A90, 0x9EF7, // + 0x6A97, 0x9F40, // + 0x6A9C, 0x9E77, // + 0x6AA0, 0x9EF9, // + 0x6AA2, 0x9EFB, // + 0x6AA3, 0x9EFC, // + 0x6AAA, 0x9F4B, // + 0x6AAC, 0x9F47, // + 0x6AAE, 0x9E8D, // + 0x6AB3, 0x9F46, // + 0x6AB8, 0x9F45, // + 0x6ABB, 0x9F42, // + 0x6AC1, 0x9EE8, // + 0x6AC2, 0x9F44, // + 0x6AC3, 0x9F43, // + 0x6AD1, 0x9F49, // + 0x6AD3, 0x9845, // + 0x6ADA, 0x9F4C, // + 0x6ADB, 0x8BF9, // + 0x6ADE, 0x9F48, // + 0x6ADF, 0x9F4A, // + 0x6AE8, 0x94A5, // + 0x6AEA, 0x9F4D, // + 0x6AFA, 0x9F51, // + 0x6AFB, 0x9F4E, // + 0x6B04, 0x9793, // + 0x6B05, 0x9F4F, // + 0x6B0A, 0x9EDC, // + 0x6B12, 0x9F52, // + 0x6B16, 0x9F53, // + 0x6B1D, 0x8954, // + 0x6B1F, 0x9F55, // + 0x6B20, 0x8C87, // + 0x6B21, 0x8E9F, // + 0x6B23, 0x8BD3, // + 0x6B27, 0x89A2, // + 0x6B32, 0x977E, // + 0x6B37, 0x9F57, // + 0x6B38, 0x9F56, // + 0x6B39, 0x9F59, // + 0x6B3A, 0x8B5C, // + 0x6B3D, 0x8BD4, // + 0x6B3E, 0x8ABC, // + 0x6B43, 0x9F5C, // + 0x6B49, 0x9F5D, // + 0x6B4C, 0x89CC, // + 0x6B4E, 0x9256, // + 0x6B50, 0x9F5E, // + 0x6B53, 0x8ABD, // + 0x6B54, 0x9F60, // + 0x6B59, 0x9F5F, // + 0x6B5B, 0x9F61, // + 0x6B5F, 0x9F62, // + 0x6B61, 0x9F63, // + 0x6B62, 0x8E7E, // + 0x6B63, 0x90B3, // + 0x6B64, 0x8D9F, // + 0x6B66, 0x9590, // + 0x6B69, 0x95E0, // + 0x6B6A, 0x9863, // + 0x6B6F, 0x8E95, // + 0x6B73, 0x8DCE, // + 0x6B74, 0x97F0, // + 0x6B78, 0x9F64, // + 0x6B79, 0x9F65, // + 0x6B7B, 0x8E80, // + 0x6B7F, 0x9F66, // + 0x6B80, 0x9F67, // + 0x6B83, 0x9F69, // + 0x6B84, 0x9F68, // + 0x6B86, 0x9677, // + 0x6B89, 0x8F7D, // + 0x6B8A, 0x8EEA, // + 0x6B8B, 0x8E63, // + 0x6B8D, 0x9F6A, // + 0x6B95, 0x9F6C, // + 0x6B96, 0x9042, // + 0x6B98, 0x9F6B, // + 0x6B9E, 0x9F6D, // + 0x6BA4, 0x9F6E, // + 0x6BAA, 0x9F6F, // + 0x6BAB, 0x9F70, // + 0x6BAF, 0x9F71, // + 0x6BB1, 0x9F73, // + 0x6BB2, 0x9F72, // + 0x6BB3, 0x9F74, // + 0x6BB4, 0x89A3, // + 0x6BB5, 0x9269, // + 0x6BB7, 0x9F75, // + 0x6BBA, 0x8E45, // + 0x6BBB, 0x8A6B, // + 0x6BBC, 0x9F76, // + 0x6BBF, 0x9361, // + 0x6BC0, 0x9ACA, // + 0x6BC5, 0x8B42, // + 0x6BC6, 0x9F77, // + 0x6BCB, 0x9F78, // + 0x6BCD, 0x95EA, // + 0x6BCE, 0x9688, // + 0x6BD2, 0x93C5, // + 0x6BD3, 0x9F79, // + 0x6BD4, 0x94E4, // + 0x6BD8, 0x94F9, // + 0x6BDB, 0x96D1, // + 0x6BDF, 0x9F7A, // + 0x6BEB, 0x9F7C, // + 0x6BEC, 0x9F7B, // + 0x6BEF, 0x9F7E, // + 0x6BF3, 0x9F7D, // + 0x6C08, 0x9F81, // + 0x6C0F, 0x8E81, // + 0x6C11, 0x96AF, // + 0x6C13, 0x9F82, // + 0x6C14, 0x9F83, // + 0x6C17, 0x8B43, // + 0x6C1B, 0x9F84, // + 0x6C23, 0x9F86, // + 0x6C24, 0x9F85, // + 0x6C34, 0x9085, // + 0x6C37, 0x9558, // + 0x6C38, 0x8969, // + 0x6C3E, 0x94C3, // + 0x6C40, 0x92F3, // + 0x6C41, 0x8F60, // + 0x6C42, 0x8B81, // + 0x6C4E, 0x94C4, // + 0x6C50, 0x8EAC, // + 0x6C55, 0x9F88, // + 0x6C57, 0x8ABE, // + 0x6C5A, 0x8998, // + 0x6C5D, 0x93F0, // + 0x6C5E, 0x9F87, // + 0x6C5F, 0x8D5D, // + 0x6C60, 0x9272, // + 0x6C62, 0x9F89, // + 0x6C68, 0x9F91, // + 0x6C6A, 0x9F8A, // + 0x6C70, 0x91BF, // + 0x6C72, 0x8B82, // + 0x6C73, 0x9F92, // + 0x6C7A, 0x8C88, // + 0x6C7D, 0x8B44, // + 0x6C7E, 0x9F90, // + 0x6C81, 0x9F8E, // + 0x6C82, 0x9F8B, // + 0x6C83, 0x9780, // + 0x6C88, 0x92BE, // + 0x6C8C, 0x93D7, // + 0x6C8D, 0x9F8C, // + 0x6C90, 0x9F94, // + 0x6C92, 0x9F93, // + 0x6C93, 0x8C42, // + 0x6C96, 0x89AB, // + 0x6C99, 0x8DB9, // + 0x6C9A, 0x9F8D, // + 0x6C9B, 0x9F8F, // + 0x6CA1, 0x9676, // + 0x6CA2, 0x91F2, // + 0x6CAB, 0x9697, // + 0x6CAE, 0x9F9C, // + 0x6CB1, 0x9F9D, // + 0x6CB3, 0x89CD, // + 0x6CB8, 0x95A6, // + 0x6CB9, 0x96FB, // + 0x6CBA, 0x9F9F, // + 0x6CBB, 0x8EA1, // + 0x6CBC, 0x8FC0, // + 0x6CBD, 0x9F98, // + 0x6CBE, 0x9F9E, // + 0x6CBF, 0x8988, // + 0x6CC1, 0x8BB5, // + 0x6CC4, 0x9F95, // + 0x6CC5, 0x9F9A, // + 0x6CC9, 0x90F2, // + 0x6CCA, 0x9491, // + 0x6CCC, 0x94E5, // + 0x6CD3, 0x9F97, // + 0x6CD5, 0x9640, // + 0x6CD7, 0x9F99, // + 0x6CD9, 0x9FA2, // + 0x6CDB, 0x9FA0, // + 0x6CDD, 0x9F9B, // + 0x6CE1, 0x9641, // + 0x6CE2, 0x9467, // + 0x6CE3, 0x8B83, // + 0x6CE5, 0x9344, // + 0x6CE8, 0x928D, // + 0x6CEA, 0x9FA3, // + 0x6CEF, 0x9FA1, // + 0x6CF0, 0x91D7, // + 0x6CF1, 0x9F96, // + 0x6CF3, 0x896A, // + 0x6D0B, 0x976D, // + 0x6D0C, 0x9FAE, // + 0x6D12, 0x9FAD, // + 0x6D17, 0x90F4, // + 0x6D19, 0x9FAA, // + 0x6D1B, 0x978C, // + 0x6D1E, 0x93B4, // + 0x6D1F, 0x9FA4, // + 0x6D25, 0x92C3, // + 0x6D29, 0x896B, // + 0x6D2A, 0x8D5E, // + 0x6D2B, 0x9FA7, // + 0x6D32, 0x8F46, // + 0x6D33, 0x9FAC, // + 0x6D35, 0x9FAB, // + 0x6D36, 0x9FA6, // + 0x6D38, 0x9FA9, // + 0x6D3B, 0x8A88, // + 0x6D3D, 0x9FA8, // + 0x6D3E, 0x9468, // + 0x6D41, 0x97AC, // + 0x6D44, 0x8FF2, // + 0x6D45, 0x90F3, // + 0x6D59, 0x9FB4, // + 0x6D5A, 0x9FB2, // + 0x6D5C, 0x956C, // + 0x6D63, 0x9FAF, // + 0x6D64, 0x9FB1, // + 0x6D66, 0x8959, // + 0x6D69, 0x8D5F, // + 0x6D6A, 0x9851, // + 0x6D6C, 0x8A5C, // + 0x6D6E, 0x9582, // + 0x6D74, 0x9781, // + 0x6D77, 0x8A43, // + 0x6D78, 0x905A, // + 0x6D79, 0x9FB3, // + 0x6D85, 0x9FB8, // + 0x6D88, 0x8FC1, // + 0x6D8C, 0x974F, // + 0x6D8E, 0x9FB5, // + 0x6D93, 0x9FB0, // + 0x6D95, 0x9FB6, // + 0x6D99, 0x97DC, // + 0x6D9B, 0x9393, // + 0x6D9C, 0x93C0, // + 0x6DAF, 0x8A55, // + 0x6DB2, 0x8974, // + 0x6DB5, 0x9FBC, // + 0x6DB8, 0x9FBF, // + 0x6DBC, 0x97C1, // + 0x6DC0, 0x9784, // + 0x6DC5, 0x9FC6, // + 0x6DC6, 0x9FC0, // + 0x6DC7, 0x9FBD, // + 0x6DCB, 0x97D2, // + 0x6DCC, 0x9FC3, // + 0x6DD1, 0x8F69, // + 0x6DD2, 0x9FC5, // + 0x6DD5, 0x9FCA, // + 0x6DD8, 0x9391, // + 0x6DD9, 0x9FC8, // + 0x6DDE, 0x9FC2, // + 0x6DE1, 0x9257, // + 0x6DE4, 0x9FC9, // + 0x6DE6, 0x9FBE, // + 0x6DE8, 0x9FC4, // + 0x6DEA, 0x9FCB, // + 0x6DEB, 0x88FA, // + 0x6DEC, 0x9FC1, // + 0x6DEE, 0x9FCC, // + 0x6DF3, 0x8F7E, // + 0x6DF5, 0x95A3, // + 0x6DF7, 0x8DAC, // + 0x6DF9, 0x9FB9, // + 0x6DFA, 0x9FC7, // + 0x6DFB, 0x9359, // + 0x6E05, 0x90B4, // + 0x6E07, 0x8A89, // + 0x6E08, 0x8DCF, // + 0x6E09, 0x8FC2, // + 0x6E0A, 0x9FBB, // + 0x6E0B, 0x8F61, // + 0x6E13, 0x8C6B, // + 0x6E15, 0x9FBA, // + 0x6E19, 0x9FD0, // + 0x6E1A, 0x8F8D, // + 0x6E1B, 0x8CB8, // + 0x6E1D, 0x9FDF, // + 0x6E1F, 0x9FD9, // + 0x6E20, 0x8B94, // + 0x6E21, 0x936E, // + 0x6E23, 0x9FD4, // + 0x6E24, 0x9FDD, // + 0x6E25, 0x88AD, // + 0x6E26, 0x8951, // + 0x6E29, 0x89B7, // + 0x6E2B, 0x9FD6, // + 0x6E2C, 0x91AA, // + 0x6E2D, 0x9FCD, // + 0x6E2E, 0x9FCF, // + 0x6E2F, 0x8D60, // + 0x6E38, 0x9FE0, // + 0x6E3A, 0x9FDB, // + 0x6E3E, 0x9FD3, // + 0x6E43, 0x9FDA, // + 0x6E4A, 0x96A9, // + 0x6E4D, 0x9FD8, // + 0x6E4E, 0x9FDC, // + 0x6E56, 0x8CCE, // + 0x6E58, 0x8FC3, // + 0x6E5B, 0x9258, // + 0x6E5F, 0x9FD2, // + 0x6E67, 0x974E, // + 0x6E6B, 0x9FD5, // + 0x6E6E, 0x9FCE, // + 0x6E6F, 0x9392, // + 0x6E72, 0x9FD1, // + 0x6E76, 0x9FD7, // + 0x6E7E, 0x9870, // + 0x6E7F, 0x8EBC, // + 0x6E80, 0x969E, // + 0x6E82, 0x9FE1, // + 0x6E8C, 0x94AC, // + 0x6E8F, 0x9FED, // + 0x6E90, 0x8CB9, // + 0x6E96, 0x8F80, // + 0x6E98, 0x9FE3, // + 0x6E9C, 0x97AD, // + 0x6E9D, 0x8D61, // + 0x6E9F, 0x9FF0, // + 0x6EA2, 0x88EC, // + 0x6EA5, 0x9FEE, // + 0x6EAA, 0x9FE2, // + 0x6EAF, 0x9FE8, // + 0x6EB2, 0x9FEA, // + 0x6EB6, 0x976E, // + 0x6EB7, 0x9FE5, // + 0x6EBA, 0x934D, // + 0x6EBD, 0x9FE7, // + 0x6EC2, 0x9FEF, // + 0x6EC4, 0x9FE9, // + 0x6EC5, 0x96C5, // + 0x6EC9, 0x9FE4, // + 0x6ECB, 0x8EA0, // + 0x6ECC, 0x9FFC, // + 0x6ED1, 0x8A8A, // + 0x6ED3, 0x9FE6, // + 0x6ED4, 0x9FEB, // + 0x6ED5, 0x9FEC, // + 0x6EDD, 0x91EA, // + 0x6EDE, 0x91D8, // + 0x6EEC, 0x9FF4, // + 0x6EEF, 0x9FFA, // + 0x6EF2, 0x9FF8, // + 0x6EF4, 0x9348, // + 0x6EF7, 0xE042, // + 0x6EF8, 0x9FF5, // + 0x6EFE, 0x9FF6, // + 0x6EFF, 0x9FDE, // + 0x6F01, 0x8B99, // + 0x6F02, 0x9559, // + 0x6F06, 0x8EBD, // + 0x6F09, 0x8D97, // + 0x6F0F, 0x9852, // + 0x6F11, 0x9FF2, // + 0x6F13, 0xE041, // + 0x6F14, 0x8989, // + 0x6F15, 0x9186, // + 0x6F20, 0x9499, // + 0x6F22, 0x8ABF, // + 0x6F23, 0x97F8, // + 0x6F2B, 0x969F, // + 0x6F2C, 0x92D0, // + 0x6F31, 0x9FF9, // + 0x6F32, 0x9FFB, // + 0x6F38, 0x9151, // + 0x6F3E, 0xE040, // + 0x6F3F, 0x9FF7, // + 0x6F41, 0x9FF1, // + 0x6F45, 0x8AC1, // + 0x6F54, 0x8C89, // + 0x6F58, 0xE04E, // + 0x6F5B, 0xE049, // + 0x6F5C, 0x90F6, // + 0x6F5F, 0x8A83, // + 0x6F64, 0x8F81, // + 0x6F66, 0xE052, // + 0x6F6D, 0xE04B, // + 0x6F6E, 0x92AA, // + 0x6F6F, 0xE048, // + 0x6F70, 0x92D7, // + 0x6F74, 0xE06B, // + 0x6F78, 0xE045, // + 0x6F7A, 0xE044, // + 0x6F7C, 0xE04D, // + 0x6F80, 0xE047, // + 0x6F81, 0xE046, // + 0x6F82, 0xE04C, // + 0x6F84, 0x909F, // + 0x6F86, 0xE043, // + 0x6F8E, 0xE04F, // + 0x6F91, 0xE050, // + 0x6F97, 0x8AC0, // + 0x6FA1, 0xE055, // + 0x6FA3, 0xE054, // + 0x6FA4, 0xE056, // + 0x6FAA, 0xE059, // + 0x6FB1, 0x9362, // + 0x6FB3, 0xE053, // + 0x6FB9, 0xE057, // + 0x6FC0, 0x8C83, // + 0x6FC1, 0x91F7, // + 0x6FC2, 0xE051, // + 0x6FC3, 0x945A, // + 0x6FC6, 0xE058, // + 0x6FD4, 0xE05D, // + 0x6FD8, 0xE05E, // + 0x6FDB, 0xE061, // + 0x6FDF, 0xE05A, // + 0x6FE0, 0x8D8A, // + 0x6FE1, 0x9447, // + 0x6FE4, 0x9FB7, // + 0x6FEB, 0x9794, // + 0x6FEC, 0xE05C, // + 0x6FEE, 0xE060, // + 0x6FEF, 0x91F3, // + 0x6FF1, 0xE05F, // + 0x6FF3, 0xE04A, // + 0x6FF6, 0xE889, // + 0x6FFA, 0xE064, // + 0x6FFE, 0xE068, // + 0x7001, 0xE066, // + 0x7009, 0xE062, // + 0x700B, 0xE063, // + 0x700F, 0xE067, // + 0x7011, 0xE065, // + 0x7015, 0x956D, // + 0x7018, 0xE06D, // + 0x701A, 0xE06A, // + 0x701B, 0xE069, // + 0x701D, 0xE06C, // + 0x701E, 0x93D2, // + 0x701F, 0xE06E, // + 0x7026, 0x9295, // + 0x7027, 0x91EB, // + 0x702C, 0x90A3, // + 0x7030, 0xE06F, // + 0x7032, 0xE071, // + 0x703E, 0xE070, // + 0x704C, 0x9FF3, // + 0x7051, 0xE072, // + 0x7058, 0x93E5, // + 0x7063, 0xE073, // + 0x706B, 0x89CE, // + 0x706F, 0x9394, // + 0x7070, 0x8A44, // + 0x7078, 0x8B84, // + 0x707C, 0x8EDC, // + 0x707D, 0x8DD0, // + 0x7089, 0x9846, // + 0x708A, 0x9086, // + 0x708E, 0x898A, // + 0x7092, 0xE075, // + 0x7099, 0xE074, // + 0x70AC, 0xE078, // + 0x70AD, 0x9259, // + 0x70AE, 0xE07B, // + 0x70AF, 0xE076, // + 0x70B3, 0xE07A, // + 0x70B8, 0xE079, // + 0x70B9, 0x935F, // + 0x70BA, 0x88D7, // + 0x70C8, 0x97F3, // + 0x70CB, 0xE07D, // + 0x70CF, 0x8947, // + 0x70D9, 0xE080, // + 0x70DD, 0xE07E, // + 0x70DF, 0xE07C, // + 0x70F1, 0xE077, // + 0x70F9, 0x9642, // + 0x70FD, 0xE082, // + 0x7109, 0xE081, // + 0x7114, 0x898B, // + 0x7119, 0xE084, // + 0x711A, 0x95B0, // + 0x711C, 0xE083, // + 0x7121, 0x96B3, // + 0x7126, 0x8FC5, // + 0x7136, 0x9152, // + 0x713C, 0x8FC4, // + 0x7149, 0x97F9, // + 0x714C, 0xE08A, // + 0x714E, 0x90F7, // + 0x7155, 0xE086, // + 0x7156, 0xE08B, // + 0x7159, 0x898C, // + 0x7162, 0xE089, // + 0x7164, 0x9481, // + 0x7165, 0xE085, // + 0x7166, 0xE088, // + 0x7167, 0x8FC6, // + 0x7169, 0x94CF, // + 0x716C, 0xE08C, // + 0x716E, 0x8ECF, // + 0x717D, 0x90F8, // + 0x7184, 0xE08F, // + 0x7188, 0xE087, // + 0x718A, 0x8C46, // + 0x718F, 0xE08D, // + 0x7194, 0x976F, // + 0x7195, 0xE090, // + 0x7199, 0xEAA4, // + 0x719F, 0x8F6E, // + 0x71A8, 0xE091, // + 0x71AC, 0xE092, // + 0x71B1, 0x944D, // + 0x71B9, 0xE094, // + 0x71BE, 0xE095, // + 0x71C3, 0x9452, // + 0x71C8, 0x9395, // + 0x71C9, 0xE097, // + 0x71CE, 0xE099, // + 0x71D0, 0x97D3, // + 0x71D2, 0xE096, // + 0x71D4, 0xE098, // + 0x71D5, 0x898D, // + 0x71D7, 0xE093, // + 0x71DF, 0x9A7A, // + 0x71E0, 0xE09A, // + 0x71E5, 0x9187, // + 0x71E6, 0x8E57, // + 0x71E7, 0xE09C, // + 0x71EC, 0xE09B, // + 0x71ED, 0x9043, // + 0x71EE, 0x99D7, // + 0x71F5, 0xE09D, // + 0x71F9, 0xE09F, // + 0x71FB, 0xE08E, // + 0x71FC, 0xE09E, // + 0x71FF, 0xE0A0, // + 0x7206, 0x949A, // + 0x720D, 0xE0A1, // + 0x7210, 0xE0A2, // + 0x721B, 0xE0A3, // + 0x7228, 0xE0A4, // + 0x722A, 0x92DC, // + 0x722C, 0xE0A6, // + 0x722D, 0xE0A5, // + 0x7230, 0xE0A7, // + 0x7232, 0xE0A8, // + 0x7235, 0x8EDD, // + 0x7236, 0x9583, // + 0x723A, 0x96EA, // + 0x723B, 0xE0A9, // + 0x723C, 0xE0AA, // + 0x723D, 0x9175, // + 0x723E, 0x8EA2, // + 0x723F, 0xE0AB, // + 0x7240, 0xE0AC, // + 0x7246, 0xE0AD, // + 0x7247, 0x95D0, // + 0x7248, 0x94C5, // + 0x724B, 0xE0AE, // + 0x724C, 0x9476, // + 0x7252, 0x92AB, // + 0x7258, 0xE0AF, // + 0x7259, 0x89E5, // + 0x725B, 0x8B8D, // + 0x725D, 0x96C4, // + 0x725F, 0x96B4, // + 0x7261, 0x89B2, // + 0x7262, 0x9853, // + 0x7267, 0x9671, // + 0x7269, 0x95A8, // + 0x7272, 0x90B5, // + 0x7274, 0xE0B0, // + 0x7279, 0x93C1, // + 0x727D, 0x8CA1, // + 0x727E, 0xE0B1, // + 0x7280, 0x8DD2, // + 0x7281, 0xE0B3, // + 0x7282, 0xE0B2, // + 0x7287, 0xE0B4, // + 0x7292, 0xE0B5, // + 0x7296, 0xE0B6, // + 0x72A0, 0x8B5D, // + 0x72A2, 0xE0B7, // + 0x72A7, 0xE0B8, // + 0x72AC, 0x8CA2, // + 0x72AF, 0x94C6, // + 0x72B2, 0xE0BA, // + 0x72B6, 0x8FF3, // + 0x72B9, 0xE0B9, // + 0x72C2, 0x8BB6, // + 0x72C3, 0xE0BB, // + 0x72C4, 0xE0BD, // + 0x72C6, 0xE0BC, // + 0x72CE, 0xE0BE, // + 0x72D0, 0x8CCF, // + 0x72D2, 0xE0BF, // + 0x72D7, 0x8BE7, // + 0x72D9, 0x915F, // + 0x72DB, 0x8D9D, // + 0x72E0, 0xE0C1, // + 0x72E1, 0xE0C2, // + 0x72E2, 0xE0C0, // + 0x72E9, 0x8EEB, // + 0x72EC, 0x93C6, // + 0x72ED, 0x8BB7, // + 0x72F7, 0xE0C4, // + 0x72F8, 0x924B, // + 0x72F9, 0xE0C3, // + 0x72FC, 0x9854, // + 0x72FD, 0x9482, // + 0x730A, 0xE0C7, // + 0x7316, 0xE0C9, // + 0x7317, 0xE0C6, // + 0x731B, 0x96D2, // + 0x731C, 0xE0C8, // + 0x731D, 0xE0CA, // + 0x731F, 0x97C2, // + 0x7325, 0xE0CE, // + 0x7329, 0xE0CD, // + 0x732A, 0x9296, // + 0x732B, 0x944C, // + 0x732E, 0x8CA3, // + 0x732F, 0xE0CC, // + 0x7334, 0xE0CB, // + 0x7336, 0x9750, // + 0x7337, 0x9751, // + 0x733E, 0xE0CF, // + 0x733F, 0x898E, // + 0x7344, 0x8D96, // + 0x7345, 0x8E82, // + 0x734E, 0xE0D0, // + 0x734F, 0xE0D1, // + 0x7357, 0xE0D3, // + 0x7363, 0x8F62, // + 0x7368, 0xE0D5, // + 0x736A, 0xE0D4, // + 0x7370, 0xE0D6, // + 0x7372, 0x8A6C, // + 0x7375, 0xE0D8, // + 0x7378, 0xE0D7, // + 0x737A, 0xE0DA, // + 0x737B, 0xE0D9, // + 0x7384, 0x8CBA, // + 0x7387, 0x97A6, // + 0x7389, 0x8BCA, // + 0x738B, 0x89A4, // + 0x7396, 0x8BE8, // + 0x73A9, 0x8ADF, // + 0x73B2, 0x97E6, // + 0x73B3, 0xE0DC, // + 0x73BB, 0xE0DE, // + 0x73C0, 0xE0DF, // + 0x73C2, 0x89CF, // + 0x73C8, 0xE0DB, // + 0x73CA, 0x8E58, // + 0x73CD, 0x92BF, // + 0x73CE, 0xE0DD, // + 0x73DE, 0xE0E2, // + 0x73E0, 0x8EEC, // + 0x73E5, 0xE0E0, // + 0x73EA, 0x8C5D, // + 0x73ED, 0x94C7, // + 0x73EE, 0xE0E1, // + 0x73F1, 0xE0FC, // + 0x73F8, 0xE0E7, // + 0x73FE, 0x8CBB, // + 0x7403, 0x8B85, // + 0x7405, 0xE0E4, // + 0x7406, 0x979D, // + 0x7409, 0x97AE, // + 0x7422, 0x91F4, // + 0x7425, 0xE0E6, // + 0x7432, 0xE0E8, // + 0x7433, 0x97D4, // + 0x7434, 0x8BD5, // + 0x7435, 0x94FA, // + 0x7436, 0x9469, // + 0x743A, 0xE0E9, // + 0x743F, 0xE0EB, // + 0x7441, 0xE0EE, // + 0x7455, 0xE0EA, // + 0x7459, 0xE0ED, // + 0x745A, 0x8CE8, // + 0x745B, 0x896C, // + 0x745C, 0xE0EF, // + 0x745E, 0x9090, // + 0x745F, 0xE0EC, // + 0x7460, 0x97DA, // + 0x7463, 0xE0F2, // + 0x7464, 0xEAA2, // + 0x7469, 0xE0F0, // + 0x746A, 0xE0F3, // + 0x746F, 0xE0E5, // + 0x7470, 0xE0F1, // + 0x7473, 0x8DBA, // + 0x7476, 0xE0F4, // + 0x747E, 0xE0F5, // + 0x7483, 0x979E, // + 0x748B, 0xE0F6, // + 0x749E, 0xE0F7, // + 0x74A2, 0xE0E3, // + 0x74A7, 0xE0F8, // + 0x74B0, 0x8AC2, // + 0x74BD, 0x8EA3, // + 0x74CA, 0xE0F9, // + 0x74CF, 0xE0FA, // + 0x74D4, 0xE0FB, // + 0x74DC, 0x895A, // + 0x74E0, 0xE140, // + 0x74E2, 0x955A, // + 0x74E3, 0xE141, // + 0x74E6, 0x8AA2, // + 0x74E7, 0xE142, // + 0x74E9, 0xE143, // + 0x74EE, 0xE144, // + 0x74F0, 0xE146, // + 0x74F1, 0xE147, // + 0x74F2, 0xE145, // + 0x74F6, 0x9572, // + 0x74F7, 0xE149, // + 0x74F8, 0xE148, // + 0x7503, 0xE14B, // + 0x7504, 0xE14A, // + 0x7505, 0xE14C, // + 0x750C, 0xE14D, // + 0x750D, 0xE14F, // + 0x750E, 0xE14E, // + 0x7511, 0x8D99, // + 0x7513, 0xE151, // + 0x7515, 0xE150, // + 0x7518, 0x8AC3, // + 0x751A, 0x9072, // + 0x751E, 0xE152, // + 0x751F, 0x90B6, // + 0x7523, 0x8E59, // + 0x7525, 0x8999, // + 0x7526, 0xE153, // + 0x7528, 0x9770, // + 0x752B, 0x95E1, // + 0x752C, 0xE154, // + 0x7530, 0x9363, // + 0x7531, 0x9752, // + 0x7532, 0x8D62, // + 0x7533, 0x905C, // + 0x7537, 0x926A, // + 0x7538, 0x99B2, // + 0x753A, 0x92AC, // + 0x753B, 0x89E6, // + 0x753C, 0xE155, // + 0x7544, 0xE156, // + 0x7549, 0xE159, // + 0x754A, 0xE158, // + 0x754B, 0x9DC0, // + 0x754C, 0x8A45, // + 0x754D, 0xE157, // + 0x754F, 0x88D8, // + 0x7551, 0x94A8, // + 0x7554, 0x94C8, // + 0x7559, 0x97AF, // + 0x755A, 0xE15C, // + 0x755B, 0xE15A, // + 0x755C, 0x927B, // + 0x755D, 0x90A4, // + 0x7560, 0x94A9, // + 0x7562, 0x954C, // + 0x7564, 0xE15E, // + 0x7565, 0x97AA, // + 0x7566, 0x8C6C, // + 0x7567, 0xE15F, // + 0x7569, 0xE15D, // + 0x756A, 0x94D4, // + 0x756B, 0xE160, // + 0x756D, 0xE161, // + 0x7570, 0x88D9, // + 0x7573, 0x8FF4, // + 0x7574, 0xE166, // + 0x7576, 0xE163, // + 0x7577, 0x93EB, // + 0x7578, 0xE162, // + 0x757F, 0x8B45, // + 0x7582, 0xE169, // + 0x7586, 0xE164, // + 0x7587, 0xE165, // + 0x7589, 0xE168, // + 0x758A, 0xE167, // + 0x758B, 0x9544, // + 0x758E, 0x9161, // + 0x758F, 0x9160, // + 0x7591, 0x8B5E, // + 0x7594, 0xE16A, // + 0x759A, 0xE16B, // + 0x759D, 0xE16C, // + 0x75A3, 0xE16E, // + 0x75A5, 0xE16D, // + 0x75AB, 0x8975, // + 0x75B1, 0xE176, // + 0x75B2, 0x94E6, // + 0x75B3, 0xE170, // + 0x75B5, 0xE172, // + 0x75B8, 0xE174, // + 0x75B9, 0x905D, // + 0x75BC, 0xE175, // + 0x75BD, 0xE173, // + 0x75BE, 0x8EBE, // + 0x75C2, 0xE16F, // + 0x75C3, 0xE171, // + 0x75C5, 0x9561, // + 0x75C7, 0x8FC7, // + 0x75CA, 0xE178, // + 0x75CD, 0xE177, // + 0x75D2, 0xE179, // + 0x75D4, 0x8EA4, // + 0x75D5, 0x8DAD, // + 0x75D8, 0x9397, // + 0x75D9, 0xE17A, // + 0x75DB, 0x92C9, // + 0x75DE, 0xE17C, // + 0x75E2, 0x979F, // + 0x75E3, 0xE17B, // + 0x75E9, 0x9189, // + 0x75F0, 0xE182, // + 0x75F2, 0xE184, // + 0x75F3, 0xE185, // + 0x75F4, 0x9273, // + 0x75FA, 0xE183, // + 0x75FC, 0xE180, // + 0x75FE, 0xE17D, // + 0x75FF, 0xE17E, // + 0x7601, 0xE181, // + 0x7609, 0xE188, // + 0x760B, 0xE186, // + 0x760D, 0xE187, // + 0x761F, 0xE189, // + 0x7620, 0xE18B, // + 0x7621, 0xE18C, // + 0x7622, 0xE18D, // + 0x7624, 0xE18E, // + 0x7627, 0xE18A, // + 0x7630, 0xE190, // + 0x7634, 0xE18F, // + 0x763B, 0xE191, // + 0x7642, 0x97C3, // + 0x7646, 0xE194, // + 0x7647, 0xE192, // + 0x7648, 0xE193, // + 0x764C, 0x8AE0, // + 0x7652, 0x96FC, // + 0x7656, 0x95C8, // + 0x7658, 0xE196, // + 0x765C, 0xE195, // + 0x7661, 0xE197, // + 0x7662, 0xE198, // + 0x7667, 0xE19C, // + 0x7668, 0xE199, // + 0x7669, 0xE19A, // + 0x766A, 0xE19B, // + 0x766C, 0xE19D, // + 0x7670, 0xE19E, // + 0x7672, 0xE19F, // + 0x7676, 0xE1A0, // + 0x7678, 0xE1A1, // + 0x767A, 0x94AD, // + 0x767B, 0x936F, // + 0x767C, 0xE1A2, // + 0x767D, 0x9492, // + 0x767E, 0x9553, // + 0x7680, 0xE1A3, // + 0x7683, 0xE1A4, // + 0x7684, 0x9349, // + 0x7686, 0x8A46, // + 0x7687, 0x8D63, // + 0x7688, 0xE1A5, // + 0x768B, 0xE1A6, // + 0x768E, 0xE1A7, // + 0x7690, 0x8E48, // + 0x7693, 0xE1A9, // + 0x7696, 0xE1A8, // + 0x7699, 0xE1AA, // + 0x769A, 0xE1AB, // + 0x76AE, 0x94E7, // + 0x76B0, 0xE1AC, // + 0x76B4, 0xE1AD, // + 0x76B7, 0xEA89, // + 0x76B8, 0xE1AE, // + 0x76B9, 0xE1AF, // + 0x76BA, 0xE1B0, // + 0x76BF, 0x8E4D, // + 0x76C2, 0xE1B1, // + 0x76C3, 0x9475, // + 0x76C6, 0x967E, // + 0x76C8, 0x896D, // + 0x76CA, 0x8976, // + 0x76CD, 0xE1B2, // + 0x76D2, 0xE1B4, // + 0x76D6, 0xE1B3, // + 0x76D7, 0x9390, // + 0x76DB, 0x90B7, // + 0x76DC, 0x9F58, // + 0x76DE, 0xE1B5, // + 0x76DF, 0x96BF, // + 0x76E1, 0xE1B6, // + 0x76E3, 0x8AC4, // + 0x76E4, 0x94D5, // + 0x76E5, 0xE1B7, // + 0x76E7, 0xE1B8, // + 0x76EA, 0xE1B9, // + 0x76EE, 0x96DA, // + 0x76F2, 0x96D3, // + 0x76F4, 0x92BC, // + 0x76F8, 0x918A, // + 0x76FB, 0xE1BB, // + 0x76FE, 0x8F82, // + 0x7701, 0x8FC8, // + 0x7704, 0xE1BE, // + 0x7707, 0xE1BD, // + 0x7708, 0xE1BC, // + 0x7709, 0x94FB, // + 0x770B, 0x8AC5, // + 0x770C, 0x8CA7, // + 0x771B, 0xE1C4, // + 0x771E, 0xE1C1, // + 0x771F, 0x905E, // + 0x7720, 0x96B0, // + 0x7724, 0xE1C0, // + 0x7725, 0xE1C2, // + 0x7726, 0xE1C3, // + 0x7729, 0xE1BF, // + 0x7737, 0xE1C5, // + 0x7738, 0xE1C6, // + 0x773A, 0x92AD, // + 0x773C, 0x8AE1, // + 0x7740, 0x9285, // + 0x7747, 0xE1C7, // + 0x775A, 0xE1C8, // + 0x775B, 0xE1CB, // + 0x7761, 0x9087, // + 0x7763, 0x93C2, // + 0x7765, 0xE1CC, // + 0x7766, 0x9672, // + 0x7768, 0xE1C9, // + 0x776B, 0xE1CA, // + 0x7779, 0xE1CF, // + 0x777E, 0xE1CE, // + 0x777F, 0xE1CD, // + 0x778B, 0xE1D1, // + 0x778E, 0xE1D0, // + 0x7791, 0xE1D2, // + 0x779E, 0xE1D4, // + 0x77A0, 0xE1D3, // + 0x77A5, 0x95CB, // + 0x77AC, 0x8F75, // + 0x77AD, 0x97C4, // + 0x77B0, 0xE1D5, // + 0x77B3, 0x93B5, // + 0x77B6, 0xE1D6, // + 0x77B9, 0xE1D7, // + 0x77BB, 0xE1DB, // + 0x77BC, 0xE1D9, // + 0x77BD, 0xE1DA, // + 0x77BF, 0xE1D8, // + 0x77C7, 0xE1DC, // + 0x77CD, 0xE1DD, // + 0x77D7, 0xE1DE, // + 0x77DA, 0xE1DF, // + 0x77DB, 0x96B5, // + 0x77DC, 0xE1E0, // + 0x77E2, 0x96EE, // + 0x77E3, 0xE1E1, // + 0x77E5, 0x926D, // + 0x77E7, 0x948A, // + 0x77E9, 0x8BE9, // + 0x77ED, 0x925A, // + 0x77EE, 0xE1E2, // + 0x77EF, 0x8BB8, // + 0x77F3, 0x90CE, // + 0x77FC, 0xE1E3, // + 0x7802, 0x8DBB, // + 0x780C, 0xE1E4, // + 0x7812, 0xE1E5, // + 0x7814, 0x8CA4, // + 0x7815, 0x8DD3, // + 0x7820, 0xE1E7, // + 0x7825, 0x9375, // + 0x7826, 0x8DD4, // + 0x7827, 0x8B6D, // + 0x7832, 0x9643, // + 0x7834, 0x946A, // + 0x783A, 0x9376, // + 0x783F, 0x8D7B, // + 0x7845, 0xE1E9, // + 0x785D, 0x8FC9, // + 0x786B, 0x97B0, // + 0x786C, 0x8D64, // + 0x786F, 0x8CA5, // + 0x7872, 0x94A1, // + 0x7874, 0xE1EB, // + 0x787C, 0xE1ED, // + 0x7881, 0x8CE9, // + 0x7886, 0xE1EC, // + 0x7887, 0x92F4, // + 0x788C, 0xE1EF, // + 0x788D, 0x8A56, // + 0x788E, 0xE1EA, // + 0x7891, 0x94E8, // + 0x7893, 0x894F, // + 0x7895, 0x8DEA, // + 0x7897, 0x9871, // + 0x789A, 0xE1EE, // + 0x78A3, 0xE1F0, // + 0x78A7, 0x95C9, // + 0x78A9, 0x90D7, // + 0x78AA, 0xE1F2, // + 0x78AF, 0xE1F3, // + 0x78B5, 0xE1F1, // + 0x78BA, 0x8A6D, // + 0x78BC, 0xE1F9, // + 0x78BE, 0xE1F8, // + 0x78C1, 0x8EA5, // + 0x78C5, 0xE1FA, // + 0x78C6, 0xE1F5, // + 0x78CA, 0xE1FB, // + 0x78CB, 0xE1F6, // + 0x78D0, 0x94D6, // + 0x78D1, 0xE1F4, // + 0x78D4, 0xE1F7, // + 0x78DA, 0xE241, // + 0x78E7, 0xE240, // + 0x78E8, 0x9681, // + 0x78EC, 0xE1FC, // + 0x78EF, 0x88E9, // + 0x78F4, 0xE243, // + 0x78FD, 0xE242, // + 0x7901, 0x8FCA, // + 0x7907, 0xE244, // + 0x790E, 0x9162, // + 0x7911, 0xE246, // + 0x7912, 0xE245, // + 0x7919, 0xE247, // + 0x7926, 0xE1E6, // + 0x792A, 0xE1E8, // + 0x792B, 0xE249, // + 0x792C, 0xE248, // + 0x793A, 0x8EA6, // + 0x793C, 0x97E7, // + 0x793E, 0x8ED0, // + 0x7940, 0xE24A, // + 0x7941, 0x8C56, // + 0x7947, 0x8B5F, // + 0x7948, 0x8B46, // + 0x7949, 0x8E83, // + 0x7950, 0x9753, // + 0x7953, 0xE250, // + 0x7955, 0xE24F, // + 0x7956, 0x9163, // + 0x7957, 0xE24C, // + 0x795A, 0xE24E, // + 0x795D, 0x8F6A, // + 0x795E, 0x905F, // + 0x795F, 0xE24D, // + 0x7960, 0xE24B, // + 0x7962, 0x9449, // + 0x7965, 0x8FCB, // + 0x796D, 0x8DD5, // + 0x7977, 0x9398, // + 0x797A, 0xE251, // + 0x797F, 0xE252, // + 0x7980, 0xE268, // + 0x7981, 0x8BD6, // + 0x7984, 0x985C, // + 0x7985, 0x9154, // + 0x798A, 0xE253, // + 0x798D, 0x89D0, // + 0x798E, 0x92F5, // + 0x798F, 0x959F, // + 0x799D, 0xE254, // + 0x79A6, 0x8B9A, // + 0x79A7, 0xE255, // + 0x79AA, 0xE257, // + 0x79AE, 0xE258, // + 0x79B0, 0x9448, // + 0x79B3, 0xE259, // + 0x79B9, 0xE25A, // + 0x79BD, 0x8BD7, // + 0x79BE, 0x89D1, // + 0x79BF, 0x93C3, // + 0x79C0, 0x8F47, // + 0x79C1, 0x8E84, // + 0x79C9, 0xE25C, // + 0x79CB, 0x8F48, // + 0x79D1, 0x89C8, // + 0x79D2, 0x9562, // + 0x79D5, 0xE25D, // + 0x79D8, 0x94E9, // + 0x79DF, 0x9164, // + 0x79E1, 0xE260, // + 0x79E3, 0xE261, // + 0x79E4, 0x9489, // + 0x79E6, 0x9060, // + 0x79E7, 0xE25E, // + 0x79E9, 0x9281, // + 0x79EC, 0xE25F, // + 0x79F0, 0x8FCC, // + 0x79FB, 0x88DA, // + 0x7A00, 0x8B48, // + 0x7A08, 0xE262, // + 0x7A0B, 0x92F6, // + 0x7A0D, 0xE263, // + 0x7A0E, 0x90C5, // + 0x7A14, 0x96AB, // + 0x7A17, 0x9542, // + 0x7A18, 0xE264, // + 0x7A19, 0xE265, // + 0x7A1A, 0x9274, // + 0x7A1C, 0x97C5, // + 0x7A1F, 0xE267, // + 0x7A20, 0xE266, // + 0x7A2E, 0x8EED, // + 0x7A31, 0xE269, // + 0x7A32, 0x88EE, // + 0x7A37, 0xE26C, // + 0x7A3B, 0xE26A, // + 0x7A3C, 0x89D2, // + 0x7A3D, 0x8C6D, // + 0x7A3E, 0xE26B, // + 0x7A3F, 0x8D65, // + 0x7A40, 0x8D92, // + 0x7A42, 0x95E4, // + 0x7A43, 0xE26D, // + 0x7A46, 0x9673, // + 0x7A49, 0xE26F, // + 0x7A4D, 0x90CF, // + 0x7A4E, 0x896E, // + 0x7A4F, 0x89B8, // + 0x7A50, 0x88AA, // + 0x7A57, 0xE26E, // + 0x7A61, 0xE270, // + 0x7A62, 0xE271, // + 0x7A63, 0x8FF5, // + 0x7A69, 0xE272, // + 0x7A6B, 0x8A6E, // + 0x7A70, 0xE274, // + 0x7A74, 0x8C8A, // + 0x7A76, 0x8B86, // + 0x7A79, 0xE275, // + 0x7A7A, 0x8BF3, // + 0x7A7D, 0xE276, // + 0x7A7F, 0x90FA, // + 0x7A81, 0x93CB, // + 0x7A83, 0x90DE, // + 0x7A84, 0x8DF3, // + 0x7A88, 0xE277, // + 0x7A92, 0x9282, // + 0x7A93, 0x918B, // + 0x7A95, 0xE279, // + 0x7A96, 0xE27B, // + 0x7A97, 0xE278, // + 0x7A98, 0xE27A, // + 0x7A9F, 0x8C41, // + 0x7AA9, 0xE27C, // + 0x7AAA, 0x8C45, // + 0x7AAE, 0x8B87, // + 0x7AAF, 0x9771, // + 0x7AB0, 0xE27E, // + 0x7AB6, 0xE280, // + 0x7ABA, 0x894D, // + 0x7ABF, 0xE283, // + 0x7AC3, 0x8A96, // + 0x7AC4, 0xE282, // + 0x7AC5, 0xE281, // + 0x7AC7, 0xE285, // + 0x7AC8, 0xE27D, // + 0x7ACA, 0xE286, // + 0x7ACB, 0x97A7, // + 0x7ACD, 0xE287, // + 0x7ACF, 0xE288, // + 0x7AD2, 0x9AF2, // + 0x7AD3, 0xE28A, // + 0x7AD5, 0xE289, // + 0x7AD9, 0xE28B, // + 0x7ADA, 0xE28C, // + 0x7ADC, 0x97B3, // + 0x7ADD, 0xE28D, // + 0x7ADF, 0xE8ED, // + 0x7AE0, 0x8FCD, // + 0x7AE1, 0xE28E, // + 0x7AE2, 0xE28F, // + 0x7AE3, 0x8F76, // + 0x7AE5, 0x93B6, // + 0x7AE6, 0xE290, // + 0x7AEA, 0x9247, // + 0x7AED, 0xE291, // + 0x7AF0, 0xE292, // + 0x7AF6, 0x8BA3, // + 0x7AF8, 0x995E, // + 0x7AF9, 0x927C, // + 0x7AFA, 0x8EB1, // + 0x7AFF, 0x8AC6, // + 0x7B02, 0xE293, // + 0x7B04, 0xE2A0, // + 0x7B06, 0xE296, // + 0x7B08, 0x8B88, // + 0x7B0A, 0xE295, // + 0x7B0B, 0xE2A2, // + 0x7B0F, 0xE294, // + 0x7B11, 0x8FCE, // + 0x7B18, 0xE298, // + 0x7B19, 0xE299, // + 0x7B1B, 0x934A, // + 0x7B1E, 0xE29A, // + 0x7B20, 0x8A7D, // + 0x7B25, 0x9079, // + 0x7B26, 0x9584, // + 0x7B28, 0xE29C, // + 0x7B2C, 0x91E6, // + 0x7B33, 0xE297, // + 0x7B35, 0xE29B, // + 0x7B36, 0xE29D, // + 0x7B39, 0x8DF9, // + 0x7B45, 0xE2A4, // + 0x7B46, 0x954D, // + 0x7B48, 0x94A4, // + 0x7B49, 0x9399, // + 0x7B4B, 0x8BD8, // + 0x7B4C, 0xE2A3, // + 0x7B4D, 0xE2A1, // + 0x7B4F, 0x94B3, // + 0x7B50, 0xE29E, // + 0x7B51, 0x927D, // + 0x7B52, 0x939B, // + 0x7B54, 0x939A, // + 0x7B56, 0x8DF4, // + 0x7B5D, 0xE2B6, // + 0x7B65, 0xE2A6, // + 0x7B67, 0xE2A8, // + 0x7B6C, 0xE2AB, // + 0x7B6E, 0xE2AC, // + 0x7B70, 0xE2A9, // + 0x7B71, 0xE2AA, // + 0x7B74, 0xE2A7, // + 0x7B75, 0xE2A5, // + 0x7B7A, 0xE29F, // + 0x7B86, 0x95CD, // + 0x7B87, 0x89D3, // + 0x7B8B, 0xE2B3, // + 0x7B8D, 0xE2B0, // + 0x7B8F, 0xE2B5, // + 0x7B92, 0xE2B4, // + 0x7B94, 0x9493, // + 0x7B95, 0x96A5, // + 0x7B97, 0x8E5A, // + 0x7B98, 0xE2AE, // + 0x7B99, 0xE2B7, // + 0x7B9A, 0xE2B2, // + 0x7B9C, 0xE2B1, // + 0x7B9D, 0xE2AD, // + 0x7B9F, 0xE2AF, // + 0x7BA1, 0x8AC7, // + 0x7BAA, 0x925C, // + 0x7BAD, 0x90FB, // + 0x7BB1, 0x94A0, // + 0x7BB4, 0xE2BC, // + 0x7BB8, 0x94A2, // + 0x7BC0, 0x90DF, // + 0x7BC1, 0xE2B9, // + 0x7BC4, 0x94CD, // + 0x7BC6, 0xE2BD, // + 0x7BC7, 0x95D1, // + 0x7BC9, 0x927A, // + 0x7BCB, 0xE2B8, // + 0x7BCC, 0xE2BA, // + 0x7BCF, 0xE2BB, // + 0x7BDD, 0xE2BE, // + 0x7BE0, 0x8EC2, // + 0x7BE4, 0x93C4, // + 0x7BE5, 0xE2C3, // + 0x7BE6, 0xE2C2, // + 0x7BE9, 0xE2BF, // + 0x7BED, 0x9855, // + 0x7BF3, 0xE2C8, // + 0x7BF6, 0xE2CC, // + 0x7BF7, 0xE2C9, // + 0x7C00, 0xE2C5, // + 0x7C07, 0xE2C6, // + 0x7C0D, 0xE2CB, // + 0x7C11, 0xE2C0, // + 0x7C12, 0x99D3, // + 0x7C13, 0xE2C7, // + 0x7C14, 0xE2C1, // + 0x7C17, 0xE2CA, // + 0x7C1F, 0xE2D0, // + 0x7C21, 0x8AC8, // + 0x7C23, 0xE2CD, // + 0x7C27, 0xE2CE, // + 0x7C2A, 0xE2CF, // + 0x7C2B, 0xE2D2, // + 0x7C37, 0xE2D1, // + 0x7C38, 0x94F4, // + 0x7C3D, 0xE2D3, // + 0x7C3E, 0x97FA, // + 0x7C3F, 0x95EB, // + 0x7C40, 0xE2D8, // + 0x7C43, 0xE2D5, // + 0x7C4C, 0xE2D4, // + 0x7C4D, 0x90D0, // + 0x7C4F, 0xE2D7, // + 0x7C50, 0xE2D9, // + 0x7C54, 0xE2D6, // + 0x7C56, 0xE2DD, // + 0x7C58, 0xE2DA, // + 0x7C5F, 0xE2DB, // + 0x7C60, 0xE2C4, // + 0x7C64, 0xE2DC, // + 0x7C65, 0xE2DE, // + 0x7C6C, 0xE2DF, // + 0x7C73, 0x95C4, // + 0x7C75, 0xE2E0, // + 0x7C7E, 0x96E0, // + 0x7C81, 0x8BCC, // + 0x7C82, 0x8C48, // + 0x7C83, 0xE2E1, // + 0x7C89, 0x95B2, // + 0x7C8B, 0x9088, // + 0x7C8D, 0x96AE, // + 0x7C90, 0xE2E2, // + 0x7C92, 0x97B1, // + 0x7C95, 0x9494, // + 0x7C97, 0x9165, // + 0x7C98, 0x9453, // + 0x7C9B, 0x8F6C, // + 0x7C9F, 0x88BE, // + 0x7CA1, 0xE2E7, // + 0x7CA2, 0xE2E5, // + 0x7CA4, 0xE2E3, // + 0x7CA5, 0x8A9F, // + 0x7CA7, 0x8FCF, // + 0x7CA8, 0xE2E8, // + 0x7CAB, 0xE2E6, // + 0x7CAD, 0xE2E4, // + 0x7CAE, 0xE2EC, // + 0x7CB1, 0xE2EB, // + 0x7CB2, 0xE2EA, // + 0x7CB3, 0xE2E9, // + 0x7CB9, 0xE2ED, // + 0x7CBD, 0xE2EE, // + 0x7CBE, 0x90B8, // + 0x7CC0, 0xE2EF, // + 0x7CC2, 0xE2F1, // + 0x7CC5, 0xE2F0, // + 0x7CCA, 0x8CD0, // + 0x7CCE, 0x9157, // + 0x7CD2, 0xE2F3, // + 0x7CD6, 0x939C, // + 0x7CD8, 0xE2F2, // + 0x7CDC, 0xE2F4, // + 0x7CDE, 0x95B3, // + 0x7CDF, 0x918C, // + 0x7CE0, 0x8D66, // + 0x7CE2, 0xE2F5, // + 0x7CE7, 0x97C6, // + 0x7CEF, 0xE2F7, // + 0x7CF2, 0xE2F8, // + 0x7CF4, 0xE2F9, // + 0x7CF6, 0xE2FA, // + 0x7CF8, 0x8E85, // + 0x7CFA, 0xE2FB, // + 0x7CFB, 0x8C6E, // + 0x7CFE, 0x8B8A, // + 0x7D00, 0x8B49, // + 0x7D02, 0xE340, // + 0x7D04, 0x96F1, // + 0x7D05, 0x8D67, // + 0x7D06, 0xE2FC, // + 0x7D0A, 0xE343, // + 0x7D0B, 0x96E4, // + 0x7D10, 0x9552, // + 0x7D14, 0x8F83, // + 0x7D15, 0xE342, // + 0x7D17, 0x8ED1, // + 0x7D18, 0x8D68, // + 0x7D19, 0x8E86, // + 0x7D1A, 0x8B89, // + 0x7D1B, 0x95B4, // + 0x7D1C, 0xE341, // + 0x7D20, 0x9166, // + 0x7D21, 0x9661, // + 0x7D22, 0x8DF5, // + 0x7D2B, 0x8E87, // + 0x7D2C, 0x92DB, // + 0x7D2E, 0xE346, // + 0x7D2F, 0x97DD, // + 0x7D30, 0x8DD7, // + 0x7D32, 0xE347, // + 0x7D33, 0x9061, // + 0x7D35, 0xE349, // + 0x7D39, 0x8FD0, // + 0x7D3A, 0x8DAE, // + 0x7D3F, 0xE348, // + 0x7D42, 0x8F49, // + 0x7D43, 0x8CBC, // + 0x7D44, 0x9167, // + 0x7D45, 0xE344, // + 0x7D46, 0xE34A, // + 0x7D4B, 0xE345, // + 0x7D4C, 0x8C6F, // + 0x7D4E, 0xE34D, // + 0x7D4F, 0xE351, // + 0x7D50, 0x8C8B, // + 0x7D56, 0xE34C, // + 0x7D5B, 0xE355, // + 0x7D5E, 0x8D69, // + 0x7D61, 0x978D, // + 0x7D62, 0x88BA, // + 0x7D63, 0xE352, // + 0x7D66, 0x8B8B, // + 0x7D68, 0xE34F, // + 0x7D6E, 0xE350, // + 0x7D71, 0x939D, // + 0x7D72, 0xE34E, // + 0x7D73, 0xE34B, // + 0x7D75, 0x8A47, // + 0x7D76, 0x90E2, // + 0x7D79, 0x8CA6, // + 0x7D7D, 0xE357, // + 0x7D89, 0xE354, // + 0x7D8F, 0xE356, // + 0x7D93, 0xE353, // + 0x7D99, 0x8C70, // + 0x7D9A, 0x91B1, // + 0x7D9B, 0xE358, // + 0x7D9C, 0x918E, // + 0x7D9F, 0xE365, // + 0x7DA2, 0xE361, // + 0x7DAB, 0xE35F, // + 0x7DAC, 0x8EF8, // + 0x7DAD, 0x88DB, // + 0x7DAE, 0xE35A, // + 0x7DAF, 0xE362, // + 0x7DB0, 0xE366, // + 0x7DB1, 0x8D6A, // + 0x7DB2, 0x96D4, // + 0x7DB4, 0x92D4, // + 0x7DB5, 0xE35C, // + 0x7DB8, 0xE364, // + 0x7DBA, 0xE359, // + 0x7DBB, 0x925D, // + 0x7DBD, 0xE35E, // + 0x7DBE, 0x88BB, // + 0x7DBF, 0x96C8, // + 0x7DC7, 0xE35D, // + 0x7DCA, 0x8BD9, // + 0x7DCB, 0x94EA, // + 0x7DCF, 0x918D, // + 0x7DD1, 0x97CE, // + 0x7DD2, 0x8F8F, // + 0x7DD5, 0xE38E, // + 0x7DD8, 0xE367, // + 0x7DDA, 0x90FC, // + 0x7DDC, 0xE363, // + 0x7DDD, 0xE368, // + 0x7DDE, 0xE36A, // + 0x7DE0, 0x92F7, // + 0x7DE1, 0xE36D, // + 0x7DE4, 0xE369, // + 0x7DE8, 0x95D2, // + 0x7DE9, 0x8AC9, // + 0x7DEC, 0x96C9, // + 0x7DEF, 0x88DC, // + 0x7DF2, 0xE36C, // + 0x7DF4, 0x97FB, // + 0x7DFB, 0xE36B, // + 0x7E01, 0x898F, // + 0x7E04, 0x93EA, // + 0x7E05, 0xE36E, // + 0x7E09, 0xE375, // + 0x7E0A, 0xE36F, // + 0x7E0B, 0xE376, // + 0x7E12, 0xE372, // + 0x7E1B, 0x949B, // + 0x7E1E, 0x8EC8, // + 0x7E1F, 0xE374, // + 0x7E21, 0xE371, // + 0x7E22, 0xE377, // + 0x7E23, 0xE370, // + 0x7E26, 0x8F63, // + 0x7E2B, 0x9644, // + 0x7E2E, 0x8F6B, // + 0x7E31, 0xE373, // + 0x7E32, 0xE380, // + 0x7E35, 0xE37B, // + 0x7E37, 0xE37E, // + 0x7E39, 0xE37C, // + 0x7E3A, 0xE381, // + 0x7E3B, 0xE37A, // + 0x7E3D, 0xE360, // + 0x7E3E, 0x90D1, // + 0x7E41, 0x94C9, // + 0x7E43, 0xE37D, // + 0x7E46, 0xE378, // + 0x7E4A, 0x9140, // + 0x7E4B, 0x8C71, // + 0x7E4D, 0x8F4A, // + 0x7E54, 0x9044, // + 0x7E55, 0x9155, // + 0x7E56, 0xE384, // + 0x7E59, 0xE386, // + 0x7E5A, 0xE387, // + 0x7E5D, 0xE383, // + 0x7E5E, 0xE385, // + 0x7E66, 0xE379, // + 0x7E67, 0xE382, // + 0x7E69, 0xE38A, // + 0x7E6A, 0xE389, // + 0x7E6D, 0x969A, // + 0x7E70, 0x8C4A, // + 0x7E79, 0xE388, // + 0x7E7B, 0xE38C, // + 0x7E7C, 0xE38B, // + 0x7E7D, 0xE38F, // + 0x7E7F, 0xE391, // + 0x7E83, 0xE38D, // + 0x7E88, 0xE392, // + 0x7E89, 0xE393, // + 0x7E8C, 0xE394, // + 0x7E8E, 0xE39A, // + 0x7E8F, 0x935A, // + 0x7E90, 0xE396, // + 0x7E92, 0xE395, // + 0x7E93, 0xE397, // + 0x7E94, 0xE398, // + 0x7E96, 0xE399, // + 0x7E9B, 0xE39B, // + 0x7E9C, 0xE39C, // + 0x7F36, 0x8ACA, // + 0x7F38, 0xE39D, // + 0x7F3A, 0xE39E, // + 0x7F45, 0xE39F, // + 0x7F4C, 0xE3A0, // + 0x7F4D, 0xE3A1, // + 0x7F4E, 0xE3A2, // + 0x7F50, 0xE3A3, // + 0x7F51, 0xE3A4, // + 0x7F54, 0xE3A6, // + 0x7F55, 0xE3A5, // + 0x7F58, 0xE3A7, // + 0x7F5F, 0xE3A8, // + 0x7F60, 0xE3A9, // + 0x7F67, 0xE3AC, // + 0x7F68, 0xE3AA, // + 0x7F69, 0xE3AB, // + 0x7F6A, 0x8DDF, // + 0x7F6B, 0x8C72, // + 0x7F6E, 0x9275, // + 0x7F70, 0x94B1, // + 0x7F72, 0x8F90, // + 0x7F75, 0x946C, // + 0x7F77, 0x94EB, // + 0x7F78, 0xE3AD, // + 0x7F79, 0x9CEB, // + 0x7F82, 0xE3AE, // + 0x7F83, 0xE3B0, // + 0x7F85, 0x9785, // + 0x7F86, 0xE3AF, // + 0x7F87, 0xE3B2, // + 0x7F88, 0xE3B1, // + 0x7F8A, 0x9772, // + 0x7F8C, 0xE3B3, // + 0x7F8E, 0x94FC, // + 0x7F94, 0xE3B4, // + 0x7F9A, 0xE3B7, // + 0x7F9D, 0xE3B6, // + 0x7F9E, 0xE3B5, // + 0x7FA3, 0xE3B8, // + 0x7FA4, 0x8C51, // + 0x7FA8, 0x9141, // + 0x7FA9, 0x8B60, // + 0x7FAE, 0xE3BC, // + 0x7FAF, 0xE3B9, // + 0x7FB2, 0xE3BA, // + 0x7FB6, 0xE3BD, // + 0x7FB8, 0xE3BE, // + 0x7FB9, 0xE3BB, // + 0x7FBD, 0x8948, // + 0x7FC1, 0x89A5, // + 0x7FC5, 0xE3C0, // + 0x7FC6, 0xE3C1, // + 0x7FCA, 0xE3C2, // + 0x7FCC, 0x9782, // + 0x7FD2, 0x8F4B, // + 0x7FD4, 0xE3C4, // + 0x7FD5, 0xE3C3, // + 0x7FE0, 0x9089, // + 0x7FE1, 0xE3C5, // + 0x7FE6, 0xE3C6, // + 0x7FE9, 0xE3C7, // + 0x7FEB, 0x8AE3, // + 0x7FF0, 0x8ACB, // + 0x7FF3, 0xE3C8, // + 0x7FF9, 0xE3C9, // + 0x7FFB, 0x967C, // + 0x7FFC, 0x9783, // + 0x8000, 0x9773, // + 0x8001, 0x9856, // + 0x8003, 0x8D6C, // + 0x8004, 0xE3CC, // + 0x8005, 0x8ED2, // + 0x8006, 0xE3CB, // + 0x800B, 0xE3CD, // + 0x800C, 0x8EA7, // + 0x8010, 0x91CF, // + 0x8012, 0xE3CE, // + 0x8015, 0x8D6B, // + 0x8017, 0x96D5, // + 0x8018, 0xE3CF, // + 0x8019, 0xE3D0, // + 0x801C, 0xE3D1, // + 0x8021, 0xE3D2, // + 0x8028, 0xE3D3, // + 0x8033, 0x8EA8, // + 0x8036, 0x96EB, // + 0x803B, 0xE3D5, // + 0x803D, 0x925E, // + 0x803F, 0xE3D4, // + 0x8046, 0xE3D7, // + 0x804A, 0xE3D6, // + 0x8052, 0xE3D8, // + 0x8056, 0x90B9, // + 0x8058, 0xE3D9, // + 0x805A, 0xE3DA, // + 0x805E, 0x95B7, // + 0x805F, 0xE3DB, // + 0x8061, 0x918F, // + 0x8062, 0xE3DC, // + 0x8068, 0xE3DD, // + 0x806F, 0x97FC, // + 0x8070, 0xE3E0, // + 0x8072, 0xE3DF, // + 0x8073, 0xE3DE, // + 0x8074, 0x92AE, // + 0x8076, 0xE3E1, // + 0x8077, 0x9045, // + 0x8079, 0xE3E2, // + 0x807D, 0xE3E3, // + 0x807E, 0x9857, // + 0x807F, 0xE3E4, // + 0x8084, 0xE3E5, // + 0x8085, 0xE3E7, // + 0x8086, 0xE3E6, // + 0x8087, 0x94A3, // + 0x8089, 0x93F7, // + 0x808B, 0x985D, // + 0x808C, 0x94A7, // + 0x8093, 0xE3E9, // + 0x8096, 0x8FD1, // + 0x8098, 0x9549, // + 0x809A, 0xE3EA, // + 0x809B, 0xE3E8, // + 0x809D, 0x8ACC, // + 0x80A1, 0x8CD2, // + 0x80A2, 0x8E88, // + 0x80A5, 0x94EC, // + 0x80A9, 0x8CA8, // + 0x80AA, 0x9662, // + 0x80AC, 0xE3ED, // + 0x80AD, 0xE3EB, // + 0x80AF, 0x8D6D, // + 0x80B1, 0x8D6E, // + 0x80B2, 0x88E7, // + 0x80B4, 0x8DE6, // + 0x80BA, 0x9478, // + 0x80C3, 0x88DD, // + 0x80C4, 0xE3F2, // + 0x80C6, 0x925F, // + 0x80CC, 0x9477, // + 0x80CE, 0x91D9, // + 0x80D6, 0xE3F4, // + 0x80D9, 0xE3F0, // + 0x80DA, 0xE3F3, // + 0x80DB, 0xE3EE, // + 0x80DD, 0xE3F1, // + 0x80DE, 0x9645, // + 0x80E1, 0x8CD3, // + 0x80E4, 0x88FB, // + 0x80E5, 0xE3EF, // + 0x80EF, 0xE3F6, // + 0x80F1, 0xE3F7, // + 0x80F4, 0x93B7, // + 0x80F8, 0x8BB9, // + 0x80FC, 0xE445, // + 0x80FD, 0x945C, // + 0x8102, 0x8E89, // + 0x8105, 0x8BBA, // + 0x8106, 0x90C6, // + 0x8107, 0x9865, // + 0x8108, 0x96AC, // + 0x8109, 0xE3F5, // + 0x810A, 0x90D2, // + 0x811A, 0x8B72, // + 0x811B, 0xE3F8, // + 0x8123, 0xE3FA, // + 0x8129, 0xE3F9, // + 0x812F, 0xE3FB, // + 0x8131, 0x9245, // + 0x8133, 0x945D, // + 0x8139, 0x92AF, // + 0x813E, 0xE442, // + 0x8146, 0xE441, // + 0x814B, 0xE3FC, // + 0x814E, 0x9074, // + 0x8150, 0x9585, // + 0x8151, 0xE444, // + 0x8153, 0xE443, // + 0x8154, 0x8D6F, // + 0x8155, 0x9872, // + 0x815F, 0xE454, // + 0x8165, 0xE448, // + 0x8166, 0xE449, // + 0x816B, 0x8EEE, // + 0x816E, 0xE447, // + 0x8170, 0x8D98, // + 0x8171, 0xE446, // + 0x8174, 0xE44A, // + 0x8178, 0x92B0, // + 0x8179, 0x95A0, // + 0x817A, 0x9142, // + 0x817F, 0x91DA, // + 0x8180, 0xE44E, // + 0x8182, 0xE44F, // + 0x8183, 0xE44B, // + 0x8188, 0xE44C, // + 0x818A, 0xE44D, // + 0x818F, 0x8D70, // + 0x8193, 0xE455, // + 0x8195, 0xE451, // + 0x819A, 0x9586, // + 0x819C, 0x968C, // + 0x819D, 0x9547, // + 0x81A0, 0xE450, // + 0x81A3, 0xE453, // + 0x81A4, 0xE452, // + 0x81A8, 0x9663, // + 0x81A9, 0xE456, // + 0x81B0, 0xE457, // + 0x81B3, 0x9156, // + 0x81B5, 0xE458, // + 0x81B8, 0xE45A, // + 0x81BA, 0xE45E, // + 0x81BE, 0xE459, // + 0x81BF, 0x945E, // + 0x81C0, 0xE45C, // + 0x81C2, 0xE45D, // + 0x81C6, 0x89B0, // + 0x81C8, 0xE464, // + 0x81C9, 0xE45F, // + 0x81CD, 0xE460, // + 0x81D1, 0xE461, // + 0x81D3, 0x919F, // + 0x81D8, 0xE463, // + 0x81D9, 0xE462, // + 0x81DA, 0xE465, // + 0x81DF, 0xE466, // + 0x81E0, 0xE467, // + 0x81E3, 0x9062, // + 0x81E5, 0x89E7, // + 0x81E7, 0xE468, // + 0x81E8, 0x97D5, // + 0x81EA, 0x8EA9, // + 0x81ED, 0x8F4C, // + 0x81F3, 0x8E8A, // + 0x81F4, 0x9276, // + 0x81FA, 0xE469, // + 0x81FB, 0xE46A, // + 0x81FC, 0x8950, // + 0x81FE, 0xE46B, // + 0x8201, 0xE46C, // + 0x8202, 0xE46D, // + 0x8205, 0xE46E, // + 0x8207, 0xE46F, // + 0x8208, 0x8BBB, // + 0x8209, 0x9DA8, // + 0x820A, 0xE470, // + 0x820C, 0x90E3, // + 0x820D, 0xE471, // + 0x820E, 0x8EC9, // + 0x8210, 0xE472, // + 0x8212, 0x98AE, // + 0x8216, 0xE473, // + 0x8217, 0x95DC, // + 0x8218, 0x8ADA, // + 0x821B, 0x9143, // + 0x821C, 0x8F77, // + 0x821E, 0x9591, // + 0x821F, 0x8F4D, // + 0x8229, 0xE474, // + 0x822A, 0x8D71, // + 0x822B, 0xE475, // + 0x822C, 0x94CA, // + 0x822E, 0xE484, // + 0x8233, 0xE477, // + 0x8235, 0x91C7, // + 0x8236, 0x9495, // + 0x8237, 0x8CBD, // + 0x8238, 0xE476, // + 0x8239, 0x9144, // + 0x8240, 0xE478, // + 0x8247, 0x92F8, // + 0x8258, 0xE47A, // + 0x8259, 0xE479, // + 0x825A, 0xE47C, // + 0x825D, 0xE47B, // + 0x825F, 0xE47D, // + 0x8262, 0xE480, // + 0x8264, 0xE47E, // + 0x8266, 0x8ACD, // + 0x8268, 0xE481, // + 0x826A, 0xE482, // + 0x826B, 0xE483, // + 0x826E, 0x8DAF, // + 0x826F, 0x97C7, // + 0x8271, 0xE485, // + 0x8272, 0x9046, // + 0x8276, 0x8990, // + 0x8277, 0xE486, // + 0x8278, 0xE487, // + 0x827E, 0xE488, // + 0x828B, 0x88F0, // + 0x828D, 0xE489, // + 0x8292, 0xE48A, // + 0x8299, 0x9587, // + 0x829D, 0x8EC5, // + 0x829F, 0xE48C, // + 0x82A5, 0x8A48, // + 0x82A6, 0x88B0, // + 0x82AB, 0xE48B, // + 0x82AC, 0xE48E, // + 0x82AD, 0x946D, // + 0x82AF, 0x9063, // + 0x82B1, 0x89D4, // + 0x82B3, 0x9646, // + 0x82B8, 0x8C7C, // + 0x82B9, 0x8BDA, // + 0x82BB, 0xE48D, // + 0x82BD, 0x89E8, // + 0x82C5, 0x8AA1, // + 0x82D1, 0x8991, // + 0x82D2, 0xE492, // + 0x82D3, 0x97E8, // + 0x82D4, 0x91DB, // + 0x82D7, 0x9563, // + 0x82D9, 0xE49E, // + 0x82DB, 0x89D5, // + 0x82DC, 0xE49C, // + 0x82DE, 0xE49A, // + 0x82DF, 0xE491, // + 0x82E1, 0xE48F, // + 0x82E3, 0xE490, // + 0x82E5, 0x8EE1, // + 0x82E6, 0x8BEA, // + 0x82E7, 0x9297, // + 0x82EB, 0x93CF, // + 0x82F1, 0x8970, // + 0x82F3, 0xE494, // + 0x82F4, 0xE493, // + 0x82F9, 0xE499, // + 0x82FA, 0xE495, // + 0x82FB, 0xE498, // + 0x8302, 0x96CE, // + 0x8303, 0xE497, // + 0x8304, 0x89D6, // + 0x8305, 0x8A9D, // + 0x8306, 0xE49B, // + 0x8309, 0xE49D, // + 0x830E, 0x8C73, // + 0x8316, 0xE4A1, // + 0x8317, 0xE4AA, // + 0x8318, 0xE4AB, // + 0x831C, 0x88A9, // + 0x8323, 0xE4B2, // + 0x8328, 0x88EF, // + 0x832B, 0xE4A9, // + 0x832F, 0xE4A8, // + 0x8331, 0xE4A3, // + 0x8332, 0xE4A2, // + 0x8334, 0xE4A0, // + 0x8335, 0xE49F, // + 0x8336, 0x9283, // + 0x8338, 0x91F9, // + 0x8339, 0xE4A5, // + 0x8340, 0xE4A4, // + 0x8345, 0xE4A7, // + 0x8349, 0x9190, // + 0x834A, 0x8C74, // + 0x834F, 0x8960, // + 0x8350, 0xE4A6, // + 0x8352, 0x8D72, // + 0x8358, 0x9191, // + 0x8373, 0xE4B8, // + 0x8375, 0xE4B9, // + 0x8377, 0x89D7, // + 0x837B, 0x89AC, // + 0x837C, 0xE4B6, // + 0x8385, 0xE4AC, // + 0x8387, 0xE4B4, // + 0x8389, 0xE4BB, // + 0x838A, 0xE4B5, // + 0x838E, 0xE4B3, // + 0x8393, 0xE496, // + 0x8396, 0xE4B1, // + 0x839A, 0xE4AD, // + 0x839E, 0x8ACE, // + 0x839F, 0xE4AF, // + 0x83A0, 0xE4BA, // + 0x83A2, 0xE4B0, // + 0x83A8, 0xE4BC, // + 0x83AA, 0xE4AE, // + 0x83AB, 0x949C, // + 0x83B1, 0x9789, // + 0x83B5, 0xE4B7, // + 0x83BD, 0xE4CD, // + 0x83C1, 0xE4C5, // + 0x83C5, 0x909B, // + 0x83CA, 0x8B65, // + 0x83CC, 0x8BDB, // + 0x83CE, 0xE4C0, // + 0x83D3, 0x89D9, // + 0x83D6, 0x8FD2, // + 0x83D8, 0xE4C3, // + 0x83DC, 0x8DD8, // + 0x83DF, 0x9370, // + 0x83E0, 0xE4C8, // + 0x83E9, 0x95EC, // + 0x83EB, 0xE4BF, // + 0x83EF, 0x89D8, // + 0x83F0, 0x8CD4, // + 0x83F1, 0x9548, // + 0x83F2, 0xE4C9, // + 0x83F4, 0xE4BD, // + 0x83F7, 0xE4C6, // + 0x83FB, 0xE4D0, // + 0x83FD, 0xE4C1, // + 0x8403, 0xE4C2, // + 0x8404, 0x93B8, // + 0x8407, 0xE4C7, // + 0x840B, 0xE4C4, // + 0x840C, 0x9647, // + 0x840D, 0xE4CA, // + 0x840E, 0x88DE, // + 0x8413, 0xE4BE, // + 0x8420, 0xE4CC, // + 0x8422, 0xE4CB, // + 0x8429, 0x948B, // + 0x842A, 0xE4D2, // + 0x842C, 0xE4DD, // + 0x8431, 0x8A9E, // + 0x8435, 0xE4E0, // + 0x8438, 0xE4CE, // + 0x843C, 0xE4D3, // + 0x843D, 0x978E, // + 0x8446, 0xE4DC, // + 0x8449, 0x9774, // + 0x844E, 0x97A8, // + 0x8457, 0x9298, // + 0x845B, 0x8A8B, // + 0x8461, 0x9592, // + 0x8462, 0xE4E2, // + 0x8463, 0x939F, // + 0x8466, 0x88AF, // + 0x8469, 0xE4DB, // + 0x846B, 0xE4D7, // + 0x846C, 0x9192, // + 0x846D, 0xE4D1, // + 0x846E, 0xE4D9, // + 0x846F, 0xE4DE, // + 0x8471, 0x944B, // + 0x8475, 0x88A8, // + 0x8477, 0xE4D6, // + 0x8479, 0xE4DF, // + 0x847A, 0x9598, // + 0x8482, 0xE4DA, // + 0x8484, 0xE4D5, // + 0x848B, 0x8FD3, // + 0x8490, 0x8F4E, // + 0x8494, 0x8EAA, // + 0x8499, 0x96D6, // + 0x849C, 0x9566, // + 0x849F, 0xE4E5, // + 0x84A1, 0xE4EE, // + 0x84AD, 0xE4D8, // + 0x84B2, 0x8A97, // + 0x84B8, 0x8FF6, // + 0x84B9, 0xE4E3, // + 0x84BB, 0xE4E8, // + 0x84BC, 0x9193, // + 0x84BF, 0xE4E4, // + 0x84C1, 0xE4EB, // + 0x84C4, 0x927E, // + 0x84C6, 0xE4EC, // + 0x84C9, 0x9775, // + 0x84CA, 0xE4E1, // + 0x84CB, 0x8A57, // + 0x84CD, 0xE4E7, // + 0x84D0, 0xE4EA, // + 0x84D1, 0x96AA, // + 0x84D6, 0xE4ED, // + 0x84D9, 0xE4E6, // + 0x84DA, 0xE4E9, // + 0x84EC, 0x9648, // + 0x84EE, 0x9840, // + 0x84F4, 0xE4F1, // + 0x84FC, 0xE4F8, // + 0x84FF, 0xE4F0, // + 0x8500, 0x8EC1, // + 0x8506, 0xE4CF, // + 0x8511, 0x95CC, // + 0x8513, 0x96A0, // + 0x8514, 0xE4F7, // + 0x8515, 0xE4F6, // + 0x8517, 0xE4F2, // + 0x8518, 0xE4F3, // + 0x851A, 0x8955, // + 0x851F, 0xE4F5, // + 0x8521, 0xE4EF, // + 0x8526, 0x92D3, // + 0x852C, 0xE4F4, // + 0x852D, 0x88FC, // + 0x8535, 0x91A0, // + 0x853D, 0x95C1, // + 0x8540, 0xE4F9, // + 0x8541, 0xE540, // + 0x8543, 0x94D7, // + 0x8548, 0xE4FC, // + 0x8549, 0x8FD4, // + 0x854A, 0x8EC7, // + 0x854B, 0xE542, // + 0x854E, 0x8BBC, // + 0x8555, 0xE543, // + 0x8557, 0x9599, // + 0x8558, 0xE4FB, // + 0x855A, 0xE4D4, // + 0x8563, 0xE4FA, // + 0x8568, 0x986E, // + 0x8569, 0x93A0, // + 0x856A, 0x9593, // + 0x856D, 0xE54A, // + 0x8577, 0xE550, // + 0x857E, 0xE551, // + 0x8580, 0xE544, // + 0x8584, 0x9496, // + 0x8587, 0xE54E, // + 0x8588, 0xE546, // + 0x858A, 0xE548, // + 0x8590, 0xE552, // + 0x8591, 0xE547, // + 0x8594, 0xE54B, // + 0x8597, 0x8992, // + 0x8599, 0x93E3, // + 0x859B, 0xE54C, // + 0x859C, 0xE54F, // + 0x85A4, 0xE545, // + 0x85A6, 0x9145, // + 0x85A8, 0xE549, // + 0x85A9, 0x8E46, // + 0x85AA, 0x9064, // + 0x85AB, 0x8C4F, // + 0x85AC, 0x96F2, // + 0x85AE, 0x96F7, // + 0x85AF, 0x8F92, // + 0x85B9, 0xE556, // + 0x85BA, 0xE554, // + 0x85C1, 0x986D, // + 0x85C9, 0xE553, // + 0x85CD, 0x9795, // + 0x85CF, 0xE555, // + 0x85D0, 0xE557, // + 0x85D5, 0xE558, // + 0x85DD, 0xE559, // + 0x85E4, 0x93A1, // + 0x85E5, 0xE55A, // + 0x85E9, 0x94CB, // + 0x85EA, 0xE54D, // + 0x85F7, 0x8F93, // + 0x85F9, 0xE55C, // + 0x85FA, 0xE561, // + 0x85FB, 0x9194, // + 0x85FE, 0xE560, // + 0x8602, 0xE541, // + 0x8606, 0xE562, // + 0x8607, 0x9168, // + 0x860A, 0xE55D, // + 0x860B, 0xE55F, // + 0x8613, 0xE55E, // + 0x8616, 0x9F50, // + 0x8617, 0x9F41, // + 0x861A, 0xE564, // + 0x8622, 0xE563, // + 0x862D, 0x9796, // + 0x862F, 0xE1BA, // + 0x8630, 0xE565, // + 0x863F, 0xE566, // + 0x864D, 0xE567, // + 0x864E, 0x8CD5, // + 0x8650, 0x8B73, // + 0x8654, 0xE569, // + 0x8655, 0x997C, // + 0x865A, 0x8B95, // + 0x865C, 0x97B8, // + 0x865E, 0x8BF1, // + 0x865F, 0xE56A, // + 0x8667, 0xE56B, // + 0x866B, 0x928E, // + 0x8671, 0xE56C, // + 0x8679, 0x93F8, // + 0x867B, 0x88B8, // + 0x868A, 0x89E1, // + 0x868B, 0xE571, // + 0x868C, 0xE572, // + 0x8693, 0xE56D, // + 0x8695, 0x8E5C, // + 0x86A3, 0xE56E, // + 0x86A4, 0x9461, // + 0x86A9, 0xE56F, // + 0x86AA, 0xE570, // + 0x86AB, 0xE57A, // + 0x86AF, 0xE574, // + 0x86B0, 0xE577, // + 0x86B6, 0xE573, // + 0x86C4, 0xE575, // + 0x86C6, 0xE576, // + 0x86C7, 0x8ED6, // + 0x86C9, 0xE578, // + 0x86CB, 0x9260, // + 0x86CD, 0x8C75, // + 0x86CE, 0x8A61, // + 0x86D4, 0xE57B, // + 0x86D9, 0x8A5E, // + 0x86DB, 0xE581, // + 0x86DE, 0xE57C, // + 0x86DF, 0xE580, // + 0x86E4, 0x94B8, // + 0x86E9, 0xE57D, // + 0x86EC, 0xE57E, // + 0x86ED, 0x9567, // + 0x86EE, 0x94D8, // + 0x86EF, 0xE582, // + 0x86F8, 0x91FB, // + 0x86F9, 0xE58C, // + 0x86FB, 0xE588, // + 0x86FE, 0x89E9, // + 0x8700, 0xE586, // + 0x8702, 0x9649, // + 0x8703, 0xE587, // + 0x8706, 0xE584, // + 0x8708, 0xE585, // + 0x8709, 0xE58A, // + 0x870A, 0xE58D, // + 0x870D, 0xE58B, // + 0x8711, 0xE589, // + 0x8712, 0xE583, // + 0x8718, 0x9277, // + 0x871A, 0xE594, // + 0x871C, 0x96A8, // + 0x8725, 0xE592, // + 0x8729, 0xE593, // + 0x8734, 0xE58E, // + 0x8737, 0xE590, // + 0x873B, 0xE591, // + 0x873F, 0xE58F, // + 0x8749, 0x90E4, // + 0x874B, 0x9858, // + 0x874C, 0xE598, // + 0x874E, 0xE599, // + 0x8753, 0xE59F, // + 0x8755, 0x9049, // + 0x8757, 0xE59B, // + 0x8759, 0xE59E, // + 0x875F, 0xE596, // + 0x8760, 0xE595, // + 0x8763, 0xE5A0, // + 0x8766, 0x89DA, // + 0x8768, 0xE59C, // + 0x876A, 0xE5A1, // + 0x876E, 0xE59D, // + 0x8774, 0xE59A, // + 0x8776, 0x92B1, // + 0x8778, 0xE597, // + 0x877F, 0x9488, // + 0x8782, 0xE5A5, // + 0x878D, 0x975A, // + 0x879F, 0xE5A4, // + 0x87A2, 0xE5A3, // + 0x87AB, 0xE5AC, // + 0x87AF, 0xE5A6, // + 0x87B3, 0xE5AE, // + 0x87BA, 0x9786, // + 0x87BB, 0xE5B1, // + 0x87BD, 0xE5A8, // + 0x87C0, 0xE5A9, // + 0x87C4, 0xE5AD, // + 0x87C6, 0xE5B0, // + 0x87C7, 0xE5AF, // + 0x87CB, 0xE5A7, // + 0x87D0, 0xE5AA, // + 0x87D2, 0xE5BB, // + 0x87E0, 0xE5B4, // + 0x87EF, 0xE5B2, // + 0x87F2, 0xE5B3, // + 0x87F6, 0xE5B8, // + 0x87F7, 0xE5B9, // + 0x87F9, 0x8A49, // + 0x87FB, 0x8B61, // + 0x87FE, 0xE5B7, // + 0x8805, 0xE5A2, // + 0x880D, 0xE5B6, // + 0x880E, 0xE5BA, // + 0x880F, 0xE5B5, // + 0x8811, 0xE5BC, // + 0x8815, 0xE5BE, // + 0x8816, 0xE5BD, // + 0x8821, 0xE5C0, // + 0x8822, 0xE5BF, // + 0x8823, 0xE579, // + 0x8827, 0xE5C4, // + 0x8831, 0xE5C1, // + 0x8836, 0xE5C2, // + 0x8839, 0xE5C3, // + 0x883B, 0xE5C5, // + 0x8840, 0x8C8C, // + 0x8842, 0xE5C7, // + 0x8844, 0xE5C6, // + 0x8846, 0x8F4F, // + 0x884C, 0x8D73, // + 0x884D, 0x9FA5, // + 0x8852, 0xE5C8, // + 0x8853, 0x8F70, // + 0x8857, 0x8A58, // + 0x8859, 0xE5C9, // + 0x885B, 0x8971, // + 0x885D, 0x8FD5, // + 0x885E, 0xE5CA, // + 0x8861, 0x8D74, // + 0x8862, 0xE5CB, // + 0x8863, 0x88DF, // + 0x8868, 0x955C, // + 0x886B, 0xE5CC, // + 0x8870, 0x908A, // + 0x8872, 0xE5D3, // + 0x8875, 0xE5D0, // + 0x8877, 0x928F, // + 0x887D, 0xE5D1, // + 0x887E, 0xE5CE, // + 0x887F, 0x8BDC, // + 0x8881, 0xE5CD, // + 0x8882, 0xE5D4, // + 0x8888, 0x8C55, // + 0x888B, 0x91DC, // + 0x888D, 0xE5DA, // + 0x8892, 0xE5D6, // + 0x8896, 0x91B3, // + 0x8897, 0xE5D5, // + 0x8899, 0xE5D8, // + 0x889E, 0xE5CF, // + 0x88A2, 0xE5D9, // + 0x88A4, 0xE5DB, // + 0x88AB, 0x94ED, // + 0x88AE, 0xE5D7, // + 0x88B0, 0xE5DC, // + 0x88B1, 0xE5DE, // + 0x88B4, 0x8CD1, // + 0x88B5, 0xE5D2, // + 0x88B7, 0x88BF, // + 0x88BF, 0xE5DD, // + 0x88C1, 0x8DD9, // + 0x88C2, 0x97F4, // + 0x88C3, 0xE5DF, // + 0x88C4, 0xE5E0, // + 0x88C5, 0x9195, // + 0x88CF, 0x97A0, // + 0x88D4, 0xE5E1, // + 0x88D5, 0x9754, // + 0x88D8, 0xE5E2, // + 0x88D9, 0xE5E3, // + 0x88DC, 0x95E2, // + 0x88DD, 0xE5E4, // + 0x88DF, 0x8DBE, // + 0x88E1, 0x97A1, // + 0x88E8, 0xE5E9, // + 0x88F2, 0xE5EA, // + 0x88F3, 0x8FD6, // + 0x88F4, 0xE5E8, // + 0x88F8, 0x9787, // + 0x88F9, 0xE5E5, // + 0x88FC, 0xE5E7, // + 0x88FD, 0x90BB, // + 0x88FE, 0x909E, // + 0x8902, 0xE5E6, // + 0x8904, 0xE5EB, // + 0x8907, 0x95A1, // + 0x890A, 0xE5ED, // + 0x890C, 0xE5EC, // + 0x8910, 0x8A8C, // + 0x8912, 0x964A, // + 0x8913, 0xE5EE, // + 0x891D, 0xE5FA, // + 0x891E, 0xE5F0, // + 0x8925, 0xE5F1, // + 0x892A, 0xE5F2, // + 0x892B, 0xE5F3, // + 0x8936, 0xE5F7, // + 0x8938, 0xE5F8, // + 0x893B, 0xE5F6, // + 0x8941, 0xE5F4, // + 0x8943, 0xE5EF, // + 0x8944, 0xE5F5, // + 0x894C, 0xE5F9, // + 0x894D, 0xE8B5, // + 0x8956, 0x89A6, // + 0x895E, 0xE5FC, // + 0x895F, 0x8BDD, // + 0x8960, 0xE5FB, // + 0x8964, 0xE641, // + 0x8966, 0xE640, // + 0x896A, 0xE643, // + 0x896D, 0xE642, // + 0x896F, 0xE644, // + 0x8972, 0x8F50, // + 0x8974, 0xE645, // + 0x8977, 0xE646, // + 0x897E, 0xE647, // + 0x897F, 0x90BC, // + 0x8981, 0x9776, // + 0x8983, 0xE648, // + 0x8986, 0x95A2, // + 0x8987, 0x9465, // + 0x8988, 0xE649, // + 0x898A, 0xE64A, // + 0x898B, 0x8CA9, // + 0x898F, 0x8B4B, // + 0x8993, 0xE64B, // + 0x8996, 0x8E8B, // + 0x8997, 0x9460, // + 0x8998, 0xE64C, // + 0x899A, 0x8A6F, // + 0x89A1, 0xE64D, // + 0x89A6, 0xE64F, // + 0x89A7, 0x9797, // + 0x89A9, 0xE64E, // + 0x89AA, 0x9065, // + 0x89AC, 0xE650, // + 0x89AF, 0xE651, // + 0x89B2, 0xE652, // + 0x89B3, 0x8ACF, // + 0x89BA, 0xE653, // + 0x89BD, 0xE654, // + 0x89BF, 0xE655, // + 0x89C0, 0xE656, // + 0x89D2, 0x8A70, // + 0x89DA, 0xE657, // + 0x89DC, 0xE658, // + 0x89DD, 0xE659, // + 0x89E3, 0x89F0, // + 0x89E6, 0x9047, // + 0x89E7, 0xE65A, // + 0x89F8, 0xE65C, // + 0x8A00, 0x8CBE, // + 0x8A02, 0x92F9, // + 0x8A03, 0xE65D, // + 0x8A08, 0x8C76, // + 0x8A0A, 0x9075, // + 0x8A0C, 0xE660, // + 0x8A0E, 0x93A2, // + 0x8A10, 0xE65F, // + 0x8A13, 0x8C50, // + 0x8A16, 0xE65E, // + 0x8A17, 0x91F5, // + 0x8A18, 0x8B4C, // + 0x8A1B, 0xE661, // + 0x8A1D, 0xE662, // + 0x8A1F, 0x8FD7, // + 0x8A23, 0x8C8D, // + 0x8A25, 0xE663, // + 0x8A2A, 0x964B, // + 0x8A2D, 0x90DD, // + 0x8A31, 0x8B96, // + 0x8A33, 0x96F3, // + 0x8A34, 0x9169, // + 0x8A36, 0xE664, // + 0x8A3A, 0x9066, // + 0x8A3B, 0x9290, // + 0x8A3C, 0x8FD8, // + 0x8A41, 0xE665, // + 0x8A46, 0xE668, // + 0x8A48, 0xE669, // + 0x8A50, 0x8DBC, // + 0x8A51, 0x91C0, // + 0x8A52, 0xE667, // + 0x8A54, 0x8FD9, // + 0x8A55, 0x955D, // + 0x8A5B, 0xE666, // + 0x8A5E, 0x8E8C, // + 0x8A60, 0x8972, // + 0x8A62, 0xE66D, // + 0x8A63, 0x8C77, // + 0x8A66, 0x8E8E, // + 0x8A69, 0x8E8D, // + 0x8A6B, 0x986C, // + 0x8A6C, 0xE66C, // + 0x8A6D, 0xE66B, // + 0x8A6E, 0x9146, // + 0x8A70, 0x8B6C, // + 0x8A71, 0x9862, // + 0x8A72, 0x8A59, // + 0x8A73, 0x8FDA, // + 0x8A7C, 0xE66A, // + 0x8A82, 0xE66F, // + 0x8A84, 0xE670, // + 0x8A85, 0xE66E, // + 0x8A87, 0x8CD6, // + 0x8A89, 0x975F, // + 0x8A8C, 0x8E8F, // + 0x8A8D, 0x9446, // + 0x8A91, 0xE673, // + 0x8A93, 0x90BE, // + 0x8A95, 0x9261, // + 0x8A98, 0x9755, // + 0x8A9A, 0xE676, // + 0x8A9E, 0x8CEA, // + 0x8AA0, 0x90BD, // + 0x8AA1, 0xE672, // + 0x8AA3, 0xE677, // + 0x8AA4, 0x8CEB, // + 0x8AA5, 0xE674, // + 0x8AA6, 0xE675, // + 0x8AA8, 0xE671, // + 0x8AAC, 0x90E0, // + 0x8AAD, 0x93C7, // + 0x8AB0, 0x924E, // + 0x8AB2, 0x89DB, // + 0x8AB9, 0x94EE, // + 0x8ABC, 0x8B62, // + 0x8ABF, 0x92B2, // + 0x8AC2, 0xE67A, // + 0x8AC4, 0xE678, // + 0x8AC7, 0x926B, // + 0x8ACB, 0x90BF, // + 0x8ACC, 0x8AD0, // + 0x8ACD, 0xE679, // + 0x8ACF, 0x907A, // + 0x8AD2, 0x97C8, // + 0x8AD6, 0x985F, // + 0x8ADA, 0xE67B, // + 0x8ADB, 0xE687, // + 0x8ADC, 0x92B3, // + 0x8ADE, 0xE686, // + 0x8AE0, 0xE683, // + 0x8AE1, 0xE68B, // + 0x8AE2, 0xE684, // + 0x8AE4, 0xE680, // + 0x8AE6, 0x92FA, // + 0x8AE7, 0xE67E, // + 0x8AEB, 0xE67C, // + 0x8AED, 0x9740, // + 0x8AEE, 0x8E90, // + 0x8AF1, 0xE681, // + 0x8AF3, 0xE67D, // + 0x8AF7, 0xE685, // + 0x8AF8, 0x8F94, // + 0x8AFA, 0x8CBF, // + 0x8AFE, 0x91F8, // + 0x8B00, 0x9664, // + 0x8B01, 0x8979, // + 0x8B02, 0x88E0, // + 0x8B04, 0x93A3, // + 0x8B07, 0xE689, // + 0x8B0C, 0xE688, // + 0x8B0E, 0x93E4, // + 0x8B10, 0xE68D, // + 0x8B14, 0xE682, // + 0x8B16, 0xE68C, // + 0x8B17, 0xE68E, // + 0x8B19, 0x8CAA, // + 0x8B1A, 0xE68A, // + 0x8B1B, 0x8D75, // + 0x8B1D, 0x8ED3, // + 0x8B20, 0xE68F, // + 0x8B21, 0x9777, // + 0x8B26, 0xE692, // + 0x8B28, 0xE695, // + 0x8B2B, 0xE693, // + 0x8B2C, 0x9554, // + 0x8B33, 0xE690, // + 0x8B39, 0x8BDE, // + 0x8B3E, 0xE694, // + 0x8B41, 0xE696, // + 0x8B49, 0xE69A, // + 0x8B4C, 0xE697, // + 0x8B4E, 0xE699, // + 0x8B4F, 0xE698, // + 0x8B56, 0xE69B, // + 0x8B58, 0x8EAF, // + 0x8B5A, 0xE69D, // + 0x8B5B, 0xE69C, // + 0x8B5C, 0x9588, // + 0x8B5F, 0xE69F, // + 0x8B66, 0x8C78, // + 0x8B6B, 0xE69E, // + 0x8B6C, 0xE6A0, // + 0x8B6F, 0xE6A1, // + 0x8B70, 0x8B63, // + 0x8B71, 0xE3BF, // + 0x8B72, 0x8FF7, // + 0x8B74, 0xE6A2, // + 0x8B77, 0x8CEC, // + 0x8B7D, 0xE6A3, // + 0x8B80, 0xE6A4, // + 0x8B83, 0x8E5D, // + 0x8B8A, 0x9DCC, // + 0x8B8C, 0xE6A5, // + 0x8B8E, 0xE6A6, // + 0x8B90, 0x8F51, // + 0x8B92, 0xE6A7, // + 0x8B93, 0xE6A8, // + 0x8B96, 0xE6A9, // + 0x8B99, 0xE6AA, // + 0x8B9A, 0xE6AB, // + 0x8C37, 0x924A, // + 0x8C3A, 0xE6AC, // + 0x8C3F, 0xE6AE, // + 0x8C41, 0xE6AD, // + 0x8C46, 0x93A4, // + 0x8C48, 0xE6AF, // + 0x8C4A, 0x964C, // + 0x8C4C, 0xE6B0, // + 0x8C4E, 0xE6B1, // + 0x8C50, 0xE6B2, // + 0x8C55, 0xE6B3, // + 0x8C5A, 0x93D8, // + 0x8C61, 0x8FDB, // + 0x8C62, 0xE6B4, // + 0x8C6A, 0x8D8B, // + 0x8C6B, 0x98AC, // + 0x8C6C, 0xE6B5, // + 0x8C78, 0xE6B6, // + 0x8C79, 0x955E, // + 0x8C7A, 0xE6B7, // + 0x8C7C, 0xE6BF, // + 0x8C82, 0xE6B8, // + 0x8C85, 0xE6BA, // + 0x8C89, 0xE6B9, // + 0x8C8A, 0xE6BB, // + 0x8C8C, 0x9665, // + 0x8C8D, 0xE6BC, // + 0x8C8E, 0xE6BD, // + 0x8C94, 0xE6BE, // + 0x8C98, 0xE6C0, // + 0x8C9D, 0x8A4C, // + 0x8C9E, 0x92E5, // + 0x8CA0, 0x9589, // + 0x8CA1, 0x8DE0, // + 0x8CA2, 0x8D76, // + 0x8CA7, 0x956E, // + 0x8CA8, 0x89DD, // + 0x8CA9, 0x94CC, // + 0x8CAA, 0xE6C3, // + 0x8CAB, 0x8AD1, // + 0x8CAC, 0x90D3, // + 0x8CAD, 0xE6C2, // + 0x8CAE, 0xE6C7, // + 0x8CAF, 0x9299, // + 0x8CB0, 0x96E1, // + 0x8CB2, 0xE6C5, // + 0x8CB3, 0xE6C6, // + 0x8CB4, 0x8B4D, // + 0x8CB6, 0xE6C8, // + 0x8CB7, 0x9483, // + 0x8CB8, 0x91DD, // + 0x8CBB, 0x94EF, // + 0x8CBC, 0x935C, // + 0x8CBD, 0xE6C4, // + 0x8CBF, 0x9666, // + 0x8CC0, 0x89EA, // + 0x8CC1, 0xE6CA, // + 0x8CC2, 0x9847, // + 0x8CC3, 0x92C0, // + 0x8CC4, 0x9864, // + 0x8CC7, 0x8E91, // + 0x8CC8, 0xE6C9, // + 0x8CCA, 0x91AF, // + 0x8CCD, 0xE6DA, // + 0x8CCE, 0x9147, // + 0x8CD1, 0x93F6, // + 0x8CD3, 0x956F, // + 0x8CDA, 0xE6CD, // + 0x8CDB, 0x8E5E, // + 0x8CDC, 0x8E92, // + 0x8CDE, 0x8FDC, // + 0x8CE0, 0x9485, // + 0x8CE2, 0x8CAB, // + 0x8CE3, 0xE6CC, // + 0x8CE4, 0xE6CB, // + 0x8CE6, 0x958A, // + 0x8CEA, 0x8EBF, // + 0x8CED, 0x9371, // + 0x8CFA, 0xE6CF, // + 0x8CFB, 0xE6D0, // + 0x8CFC, 0x8D77, // + 0x8CFD, 0xE6CE, // + 0x8D04, 0xE6D1, // + 0x8D05, 0xE6D2, // + 0x8D07, 0xE6D4, // + 0x8D08, 0x91A1, // + 0x8D0A, 0xE6D3, // + 0x8D0B, 0x8AE4, // + 0x8D0D, 0xE6D6, // + 0x8D0F, 0xE6D5, // + 0x8D10, 0xE6D7, // + 0x8D13, 0xE6D9, // + 0x8D14, 0xE6DB, // + 0x8D16, 0xE6DC, // + 0x8D64, 0x90D4, // + 0x8D66, 0x8ECD, // + 0x8D67, 0xE6DD, // + 0x8D6B, 0x8A71, // + 0x8D6D, 0xE6DE, // + 0x8D70, 0x9196, // + 0x8D71, 0xE6DF, // + 0x8D73, 0xE6E0, // + 0x8D74, 0x958B, // + 0x8D77, 0x8B4E, // + 0x8D81, 0xE6E1, // + 0x8D85, 0x92B4, // + 0x8D8A, 0x897A, // + 0x8D99, 0xE6E2, // + 0x8DA3, 0x8EEF, // + 0x8DA8, 0x9096, // + 0x8DB3, 0x91AB, // + 0x8DBA, 0xE6E5, // + 0x8DBE, 0xE6E4, // + 0x8DC2, 0xE6E3, // + 0x8DCB, 0xE6EB, // + 0x8DCC, 0xE6E9, // + 0x8DCF, 0xE6E6, // + 0x8DD6, 0xE6E8, // + 0x8DDA, 0xE6E7, // + 0x8DDB, 0xE6EA, // + 0x8DDD, 0x8B97, // + 0x8DDF, 0xE6EE, // + 0x8DE1, 0x90D5, // + 0x8DE3, 0xE6EF, // + 0x8DE8, 0x8CD7, // + 0x8DEA, 0xE6EC, // + 0x8DEB, 0xE6ED, // + 0x8DEF, 0x9848, // + 0x8DF3, 0x92B5, // + 0x8DF5, 0x9148, // + 0x8DFC, 0xE6F0, // + 0x8DFF, 0xE6F3, // + 0x8E08, 0xE6F1, // + 0x8E09, 0xE6F2, // + 0x8E0A, 0x9778, // + 0x8E0F, 0x93A5, // + 0x8E10, 0xE6F6, // + 0x8E1D, 0xE6F4, // + 0x8E1E, 0xE6F5, // + 0x8E1F, 0xE6F7, // + 0x8E2A, 0xE748, // + 0x8E30, 0xE6FA, // + 0x8E34, 0xE6FB, // + 0x8E35, 0xE6F9, // + 0x8E42, 0xE6F8, // + 0x8E44, 0x92FB, // + 0x8E47, 0xE740, // + 0x8E48, 0xE744, // + 0x8E49, 0xE741, // + 0x8E4A, 0xE6FC, // + 0x8E4C, 0xE742, // + 0x8E50, 0xE743, // + 0x8E55, 0xE74A, // + 0x8E59, 0xE745, // + 0x8E5F, 0x90D6, // + 0x8E60, 0xE747, // + 0x8E63, 0xE749, // + 0x8E64, 0xE746, // + 0x8E72, 0xE74C, // + 0x8E74, 0x8F52, // + 0x8E76, 0xE74B, // + 0x8E7C, 0xE74D, // + 0x8E81, 0xE74E, // + 0x8E84, 0xE751, // + 0x8E85, 0xE750, // + 0x8E87, 0xE74F, // + 0x8E8A, 0xE753, // + 0x8E8B, 0xE752, // + 0x8E8D, 0x96F4, // + 0x8E91, 0xE755, // + 0x8E93, 0xE754, // + 0x8E94, 0xE756, // + 0x8E99, 0xE757, // + 0x8EA1, 0xE759, // + 0x8EAA, 0xE758, // + 0x8EAB, 0x9067, // + 0x8EAC, 0xE75A, // + 0x8EAF, 0x8BEB, // + 0x8EB1, 0xE75D, // + 0x8EBE, 0xE75E, // + 0x8EC5, 0xE75F, // + 0x8EC6, 0xE75C, // + 0x8EC8, 0xE760, // + 0x8ECA, 0x8ED4, // + 0x8ECB, 0xE761, // + 0x8ECC, 0x8B4F, // + 0x8ECD, 0x8C52, // + 0x8ED2, 0x8CAC, // + 0x8EDB, 0xE762, // + 0x8EDF, 0x93EE, // + 0x8EE2, 0x935D, // + 0x8EE3, 0xE763, // + 0x8EEB, 0xE766, // + 0x8EF8, 0x8EB2, // + 0x8EFB, 0xE765, // + 0x8EFC, 0xE764, // + 0x8EFD, 0x8C79, // + 0x8EFE, 0xE767, // + 0x8F03, 0x8A72, // + 0x8F05, 0xE769, // + 0x8F09, 0x8DDA, // + 0x8F0A, 0xE768, // + 0x8F0C, 0xE771, // + 0x8F12, 0xE76B, // + 0x8F13, 0xE76D, // + 0x8F14, 0x95E3, // + 0x8F15, 0xE76A, // + 0x8F19, 0xE76C, // + 0x8F1B, 0xE770, // + 0x8F1C, 0xE76E, // + 0x8F1D, 0x8B50, // + 0x8F1F, 0xE76F, // + 0x8F26, 0xE772, // + 0x8F29, 0x9479, // + 0x8F2A, 0x97D6, // + 0x8F2F, 0x8F53, // + 0x8F33, 0xE773, // + 0x8F38, 0x9741, // + 0x8F39, 0xE775, // + 0x8F3B, 0xE774, // + 0x8F3E, 0xE778, // + 0x8F3F, 0x9760, // + 0x8F42, 0xE777, // + 0x8F44, 0x8A8D, // + 0x8F45, 0xE776, // + 0x8F46, 0xE77B, // + 0x8F49, 0xE77A, // + 0x8F4C, 0xE779, // + 0x8F4D, 0x9351, // + 0x8F4E, 0xE77C, // + 0x8F57, 0xE77D, // + 0x8F5C, 0xE77E, // + 0x8F5F, 0x8D8C, // + 0x8F61, 0x8C44, // + 0x8F62, 0xE780, // + 0x8F63, 0xE781, // + 0x8F64, 0xE782, // + 0x8F9B, 0x9068, // + 0x8F9C, 0xE783, // + 0x8F9E, 0x8EAB, // + 0x8F9F, 0xE784, // + 0x8FA3, 0xE785, // + 0x8FA7, 0x999F, // + 0x8FA8, 0x999E, // + 0x8FAD, 0xE786, // + 0x8FAE, 0xE390, // + 0x8FAF, 0xE787, // + 0x8FB0, 0x9243, // + 0x8FB1, 0x904A, // + 0x8FB2, 0x945F, // + 0x8FB7, 0xE788, // + 0x8FBA, 0x95D3, // + 0x8FBB, 0x92D2, // + 0x8FBC, 0x8D9E, // + 0x8FBF, 0x9248, // + 0x8FC2, 0x8949, // + 0x8FC4, 0x9698, // + 0x8FC5, 0x9076, // + 0x8FCE, 0x8C7D, // + 0x8FD1, 0x8BDF, // + 0x8FD4, 0x95D4, // + 0x8FDA, 0xE789, // + 0x8FE2, 0xE78B, // + 0x8FE5, 0xE78A, // + 0x8FE6, 0x89DE, // + 0x8FE9, 0x93F4, // + 0x8FEA, 0xE78C, // + 0x8FEB, 0x9497, // + 0x8FED, 0x9352, // + 0x8FEF, 0xE78D, // + 0x8FF0, 0x8F71, // + 0x8FF4, 0xE78F, // + 0x8FF7, 0x96C0, // + 0x8FF8, 0xE79E, // + 0x8FF9, 0xE791, // + 0x8FFA, 0xE792, // + 0x8FFD, 0x92C7, // + 0x9000, 0x91DE, // + 0x9001, 0x9197, // + 0x9003, 0x93A6, // + 0x9005, 0xE790, // + 0x9006, 0x8B74, // + 0x900B, 0xE799, // + 0x900D, 0xE796, // + 0x900E, 0xE7A3, // + 0x900F, 0x93A7, // + 0x9010, 0x9280, // + 0x9011, 0xE793, // + 0x9013, 0x92FC, // + 0x9014, 0x9372, // + 0x9015, 0xE794, // + 0x9016, 0xE798, // + 0x9017, 0x9080, // + 0x9019, 0x9487, // + 0x901A, 0x92CA, // + 0x901D, 0x90C0, // + 0x901E, 0xE797, // + 0x901F, 0x91AC, // + 0x9020, 0x91A2, // + 0x9021, 0xE795, // + 0x9022, 0x88A7, // + 0x9023, 0x9841, // + 0x9027, 0xE79A, // + 0x902E, 0x91DF, // + 0x9031, 0x8F54, // + 0x9032, 0x9069, // + 0x9035, 0xE79C, // + 0x9036, 0xE79B, // + 0x9038, 0x88ED, // + 0x9039, 0xE79D, // + 0x903C, 0x954E, // + 0x903E, 0xE7A5, // + 0x9041, 0x93D9, // + 0x9042, 0x908B, // + 0x9045, 0x9278, // + 0x9047, 0x8BF6, // + 0x9049, 0xE7A4, // + 0x904A, 0x9756, // + 0x904B, 0x895E, // + 0x904D, 0x95D5, // + 0x904E, 0x89DF, // + 0x904F, 0xE79F, // + 0x9050, 0xE7A0, // + 0x9051, 0xE7A1, // + 0x9052, 0xE7A2, // + 0x9053, 0x93B9, // + 0x9054, 0x9242, // + 0x9055, 0x88E1, // + 0x9056, 0xE7A6, // + 0x9058, 0xE7A7, // + 0x9059, 0xEAA1, // + 0x905C, 0x91BB, // + 0x905E, 0xE7A8, // + 0x9060, 0x8993, // + 0x9061, 0x916B, // + 0x9063, 0x8CAD, // + 0x9065, 0x9779, // + 0x9068, 0xE7A9, // + 0x9069, 0x934B, // + 0x906D, 0x9198, // + 0x906E, 0x8ED5, // + 0x906F, 0xE7AA, // + 0x9072, 0xE7AD, // + 0x9075, 0x8F85, // + 0x9076, 0xE7AB, // + 0x9077, 0x914A, // + 0x9078, 0x9149, // + 0x907A, 0x88E2, // + 0x907C, 0x97C9, // + 0x907D, 0xE7AF, // + 0x907F, 0x94F0, // + 0x9080, 0xE7B1, // + 0x9081, 0xE7B0, // + 0x9082, 0xE7AE, // + 0x9083, 0xE284, // + 0x9084, 0x8AD2, // + 0x9087, 0xE78E, // + 0x9089, 0xE7B3, // + 0x908A, 0xE7B2, // + 0x908F, 0xE7B4, // + 0x9091, 0x9757, // + 0x90A3, 0x93DF, // + 0x90A6, 0x964D, // + 0x90A8, 0xE7B5, // + 0x90AA, 0x8ED7, // + 0x90AF, 0xE7B6, // + 0x90B1, 0xE7B7, // + 0x90B5, 0xE7B8, // + 0x90B8, 0x9340, // + 0x90C1, 0x88E8, // + 0x90CA, 0x8D78, // + 0x90CE, 0x9859, // + 0x90DB, 0xE7BC, // + 0x90E1, 0x8C53, // + 0x90E2, 0xE7B9, // + 0x90E4, 0xE7BA, // + 0x90E8, 0x9594, // + 0x90ED, 0x8A73, // + 0x90F5, 0x9758, // + 0x90F7, 0x8BBD, // + 0x90FD, 0x9373, // + 0x9102, 0xE7BD, // + 0x9112, 0xE7BE, // + 0x9119, 0xE7BF, // + 0x912D, 0x9341, // + 0x9130, 0xE7C1, // + 0x9132, 0xE7C0, // + 0x9149, 0x93D1, // + 0x914A, 0xE7C2, // + 0x914B, 0x8F55, // + 0x914C, 0x8EDE, // + 0x914D, 0x947A, // + 0x914E, 0x9291, // + 0x9152, 0x8EF0, // + 0x9154, 0x908C, // + 0x9156, 0xE7C3, // + 0x9158, 0xE7C4, // + 0x9162, 0x907C, // + 0x9163, 0xE7C5, // + 0x9165, 0xE7C6, // + 0x9169, 0xE7C7, // + 0x916A, 0x978F, // + 0x916C, 0x8F56, // + 0x9172, 0xE7C9, // + 0x9173, 0xE7C8, // + 0x9175, 0x8D79, // + 0x9177, 0x8D93, // + 0x9178, 0x8E5F, // + 0x9182, 0xE7CC, // + 0x9187, 0x8F86, // + 0x9189, 0xE7CB, // + 0x918B, 0xE7CA, // + 0x918D, 0x91E7, // + 0x9190, 0x8CED, // + 0x9192, 0x90C1, // + 0x9197, 0x94AE, // + 0x919C, 0x8F58, // + 0x91A2, 0xE7CD, // + 0x91A4, 0x8FDD, // + 0x91AA, 0xE7D0, // + 0x91AB, 0xE7CE, // + 0x91AF, 0xE7CF, // + 0x91B4, 0xE7D2, // + 0x91B5, 0xE7D1, // + 0x91B8, 0x8FF8, // + 0x91BA, 0xE7D3, // + 0x91C0, 0xE7D4, // + 0x91C1, 0xE7D5, // + 0x91C6, 0x94CE, // + 0x91C7, 0x8DD1, // + 0x91C8, 0x8EDF, // + 0x91C9, 0xE7D6, // + 0x91CB, 0xE7D7, // + 0x91CC, 0x97A2, // + 0x91CD, 0x8F64, // + 0x91CE, 0x96EC, // + 0x91CF, 0x97CA, // + 0x91D0, 0xE7D8, // + 0x91D1, 0x8BE0, // + 0x91D6, 0xE7D9, // + 0x91D8, 0x9342, // + 0x91DB, 0xE7DC, // + 0x91DC, 0x8A98, // + 0x91DD, 0x906A, // + 0x91DF, 0xE7DA, // + 0x91E1, 0xE7DB, // + 0x91E3, 0x92DE, // + 0x91E6, 0x9674, // + 0x91E7, 0x8BFA, // + 0x91F5, 0xE7DE, // + 0x91F6, 0xE7DF, // + 0x91FC, 0xE7DD, // + 0x91FF, 0xE7E1, // + 0x920D, 0x93DD, // + 0x920E, 0x8A62, // + 0x9211, 0xE7E5, // + 0x9214, 0xE7E2, // + 0x9215, 0xE7E4, // + 0x921E, 0xE7E0, // + 0x9229, 0xE86E, // + 0x922C, 0xE7E3, // + 0x9234, 0x97E9, // + 0x9237, 0x8CD8, // + 0x923F, 0xE7ED, // + 0x9244, 0x9353, // + 0x9245, 0xE7E8, // + 0x9248, 0xE7EB, // + 0x9249, 0xE7E9, // + 0x924B, 0xE7EE, // + 0x9250, 0xE7EF, // + 0x9257, 0xE7E7, // + 0x925A, 0xE7F4, // + 0x925B, 0x8994, // + 0x925E, 0xE7E6, // + 0x9262, 0x94AB, // + 0x9264, 0xE7EA, // + 0x9266, 0x8FDE, // + 0x9271, 0x8D7A, // + 0x927E, 0x9667, // + 0x9280, 0x8BE2, // + 0x9283, 0x8F65, // + 0x9285, 0x93BA, // + 0x9291, 0x914C, // + 0x9293, 0xE7F2, // + 0x9295, 0xE7EC, // + 0x9296, 0xE7F1, // + 0x9298, 0x96C1, // + 0x929A, 0x92B6, // + 0x929B, 0xE7F3, // + 0x929C, 0xE7F0, // + 0x92AD, 0x914B, // + 0x92B7, 0xE7F7, // + 0x92B9, 0xE7F6, // + 0x92CF, 0xE7F5, // + 0x92D2, 0x964E, // + 0x92E4, 0x8F9B, // + 0x92E9, 0xE7F8, // + 0x92EA, 0x95DD, // + 0x92ED, 0x8973, // + 0x92F2, 0x9565, // + 0x92F3, 0x9292, // + 0x92F8, 0x8B98, // + 0x92FA, 0xE7FA, // + 0x92FC, 0x8D7C, // + 0x9306, 0x8E4B, // + 0x930F, 0xE7F9, // + 0x9310, 0x908D, // + 0x9318, 0x908E, // + 0x9319, 0xE840, // + 0x931A, 0xE842, // + 0x9320, 0x8FF9, // + 0x9322, 0xE841, // + 0x9323, 0xE843, // + 0x9326, 0x8BD1, // + 0x9328, 0x9564, // + 0x932B, 0x8EE0, // + 0x932C, 0x9842, // + 0x932E, 0xE7FC, // + 0x932F, 0x8DF6, // + 0x9332, 0x985E, // + 0x9335, 0xE845, // + 0x933A, 0xE844, // + 0x933B, 0xE846, // + 0x9344, 0xE7FB, // + 0x934B, 0x93E7, // + 0x934D, 0x9374, // + 0x9354, 0x92D5, // + 0x9356, 0xE84B, // + 0x935B, 0x9262, // + 0x935C, 0xE847, // + 0x9360, 0xE848, // + 0x936C, 0x8C4C, // + 0x936E, 0xE84A, // + 0x9375, 0x8CAE, // + 0x937C, 0xE849, // + 0x937E, 0x8FDF, // + 0x938C, 0x8A99, // + 0x9394, 0xE84F, // + 0x9396, 0x8DBD, // + 0x9397, 0x9199, // + 0x939A, 0x92C8, // + 0x93A7, 0x8A5A, // + 0x93AC, 0xE84D, // + 0x93AD, 0xE84E, // + 0x93AE, 0x92C1, // + 0x93B0, 0xE84C, // + 0x93B9, 0xE850, // + 0x93C3, 0xE856, // + 0x93C8, 0xE859, // + 0x93D0, 0xE858, // + 0x93D1, 0x934C, // + 0x93D6, 0xE851, // + 0x93D7, 0xE852, // + 0x93D8, 0xE855, // + 0x93DD, 0xE857, // + 0x93E1, 0x8BBE, // + 0x93E4, 0xE85A, // + 0x93E5, 0xE854, // + 0x93E8, 0xE853, // + 0x9403, 0xE85E, // + 0x9407, 0xE85F, // + 0x9410, 0xE860, // + 0x9413, 0xE85D, // + 0x9414, 0xE85C, // + 0x9418, 0x8FE0, // + 0x9419, 0x93A8, // + 0x9421, 0xE864, // + 0x942B, 0xE862, // + 0x9435, 0xE863, // + 0x9436, 0xE861, // + 0x9438, 0x91F6, // + 0x943A, 0xE865, // + 0x9441, 0xE866, // + 0x9444, 0xE868, // + 0x9451, 0x8AD3, // + 0x9452, 0xE867, // + 0x9453, 0x96F8, // + 0x945A, 0xE873, // + 0x945B, 0xE869, // + 0x945E, 0xE86C, // + 0x9460, 0xE86A, // + 0x9462, 0xE86B, // + 0x946A, 0xE86D, // + 0x9470, 0xE86F, // + 0x9475, 0xE870, // + 0x9477, 0xE871, // + 0x947C, 0xE874, // + 0x947D, 0xE872, // + 0x947E, 0xE875, // + 0x947F, 0xE877, // + 0x9481, 0xE876, // + 0x9577, 0x92B7, // + 0x9580, 0x96E5, // + 0x9582, 0xE878, // + 0x9583, 0x914D, // + 0x9587, 0xE879, // + 0x9589, 0x95C2, // + 0x958A, 0xE87A, // + 0x958B, 0x8A4A, // + 0x9591, 0x8AD5, // + 0x9593, 0x8AD4, // + 0x9594, 0xE87B, // + 0x9596, 0xE87C, // + 0x9598, 0xE87D, // + 0x9599, 0xE87E, // + 0x95A0, 0xE880, // + 0x95A2, 0x8AD6, // + 0x95A3, 0x8A74, // + 0x95A4, 0x8D7D, // + 0x95A5, 0x94B4, // + 0x95A7, 0xE882, // + 0x95A8, 0xE881, // + 0x95AD, 0xE883, // + 0x95B2, 0x897B, // + 0x95B9, 0xE886, // + 0x95BB, 0xE885, // + 0x95BC, 0xE884, // + 0x95BE, 0xE887, // + 0x95C3, 0xE88A, // + 0x95C7, 0x88C5, // + 0x95CA, 0xE888, // + 0x95CC, 0xE88C, // + 0x95CD, 0xE88B, // + 0x95D4, 0xE88E, // + 0x95D5, 0xE88D, // + 0x95D6, 0xE88F, // + 0x95D8, 0x93AC, // + 0x95DC, 0xE890, // + 0x95E1, 0xE891, // + 0x95E2, 0xE893, // + 0x95E5, 0xE892, // + 0x961C, 0x958C, // + 0x9621, 0xE894, // + 0x9628, 0xE895, // + 0x962A, 0x8DE3, // + 0x962E, 0xE896, // + 0x962F, 0xE897, // + 0x9632, 0x9668, // + 0x963B, 0x916A, // + 0x963F, 0x88A2, // + 0x9640, 0x91C9, // + 0x9642, 0xE898, // + 0x9644, 0x958D, // + 0x964B, 0xE89B, // + 0x964C, 0xE899, // + 0x964D, 0x8D7E, // + 0x964F, 0xE89A, // + 0x9650, 0x8CC0, // + 0x965B, 0x95C3, // + 0x965C, 0xE89D, // + 0x965D, 0xE89F, // + 0x965E, 0xE89E, // + 0x965F, 0xE8A0, // + 0x9662, 0x8940, // + 0x9663, 0x9077, // + 0x9664, 0x8F9C, // + 0x9665, 0x8AD7, // + 0x9666, 0xE8A1, // + 0x966A, 0x9486, // + 0x966C, 0xE8A3, // + 0x9670, 0x8941, // + 0x9672, 0xE8A2, // + 0x9673, 0x92C2, // + 0x9675, 0x97CB, // + 0x9676, 0x93A9, // + 0x9677, 0xE89C, // + 0x9678, 0x97A4, // + 0x967A, 0x8CAF, // + 0x967D, 0x977A, // + 0x9685, 0x8BF7, // + 0x9686, 0x97B2, // + 0x9688, 0x8C47, // + 0x968A, 0x91E0, // + 0x968B, 0xE440, // + 0x968D, 0xE8A4, // + 0x968E, 0x8A4B, // + 0x968F, 0x908F, // + 0x9694, 0x8A75, // + 0x9695, 0xE8A6, // + 0x9697, 0xE8A7, // + 0x9698, 0xE8A5, // + 0x9699, 0x8C84, // + 0x969B, 0x8DDB, // + 0x969C, 0x8FE1, // + 0x96A0, 0x8942, // + 0x96A3, 0x97D7, // + 0x96A7, 0xE8A9, // + 0x96A8, 0xE7AC, // + 0x96AA, 0xE8A8, // + 0x96B0, 0xE8AC, // + 0x96B1, 0xE8AA, // + 0x96B2, 0xE8AB, // + 0x96B4, 0xE8AD, // + 0x96B6, 0xE8AE, // + 0x96B7, 0x97EA, // + 0x96B8, 0xE8AF, // + 0x96B9, 0xE8B0, // + 0x96BB, 0x90C7, // + 0x96BC, 0x94B9, // + 0x96C0, 0x909D, // + 0x96C1, 0x8AE5, // + 0x96C4, 0x9759, // + 0x96C5, 0x89EB, // + 0x96C6, 0x8F57, // + 0x96C7, 0x8CD9, // + 0x96C9, 0xE8B3, // + 0x96CB, 0xE8B2, // + 0x96CC, 0x8E93, // + 0x96CD, 0xE8B4, // + 0x96CE, 0xE8B1, // + 0x96D1, 0x8E47, // + 0x96D5, 0xE8B8, // + 0x96D6, 0xE5AB, // + 0x96D9, 0x99D4, // + 0x96DB, 0x9097, // + 0x96DC, 0xE8B6, // + 0x96E2, 0x97A3, // + 0x96E3, 0x93EF, // + 0x96E8, 0x894A, // + 0x96EA, 0x90E1, // + 0x96EB, 0x8EB4, // + 0x96F0, 0x95B5, // + 0x96F2, 0x895F, // + 0x96F6, 0x97EB, // + 0x96F7, 0x978B, // + 0x96F9, 0xE8B9, // + 0x96FB, 0x9364, // + 0x9700, 0x8EF9, // + 0x9704, 0xE8BA, // + 0x9706, 0xE8BB, // + 0x9707, 0x906B, // + 0x9708, 0xE8BC, // + 0x970A, 0x97EC, // + 0x970D, 0xE8B7, // + 0x970E, 0xE8BE, // + 0x970F, 0xE8C0, // + 0x9711, 0xE8BF, // + 0x9713, 0xE8BD, // + 0x9716, 0xE8C1, // + 0x9719, 0xE8C2, // + 0x971C, 0x919A, // + 0x971E, 0x89E0, // + 0x9724, 0xE8C3, // + 0x9727, 0x96B6, // + 0x972A, 0xE8C4, // + 0x9730, 0xE8C5, // + 0x9732, 0x9849, // + 0x9738, 0x9E50, // + 0x9739, 0xE8C6, // + 0x973D, 0xE8C7, // + 0x973E, 0xE8C8, // + 0x9742, 0xE8CC, // + 0x9744, 0xE8C9, // + 0x9746, 0xE8CA, // + 0x9748, 0xE8CB, // + 0x9749, 0xE8CD, // + 0x9752, 0x90C2, // + 0x9756, 0x96F5, // + 0x9759, 0x90C3, // + 0x975C, 0xE8CE, // + 0x975E, 0x94F1, // + 0x9760, 0xE8CF, // + 0x9761, 0xEA72, // + 0x9762, 0x96CA, // + 0x9764, 0xE8D0, // + 0x9766, 0xE8D1, // + 0x9768, 0xE8D2, // + 0x9769, 0x8A76, // + 0x976B, 0xE8D4, // + 0x976D, 0x9078, // + 0x9771, 0xE8D5, // + 0x9774, 0x8C43, // + 0x9779, 0xE8D6, // + 0x977A, 0xE8DA, // + 0x977C, 0xE8D8, // + 0x9781, 0xE8D9, // + 0x9784, 0x8A93, // + 0x9785, 0xE8D7, // + 0x9786, 0xE8DB, // + 0x978B, 0xE8DC, // + 0x978D, 0x88C6, // + 0x978F, 0xE8DD, // + 0x9790, 0xE8DE, // + 0x9798, 0x8FE2, // + 0x979C, 0xE8DF, // + 0x97A0, 0x8B66, // + 0x97A3, 0xE8E2, // + 0x97A6, 0xE8E1, // + 0x97A8, 0xE8E0, // + 0x97AB, 0xE691, // + 0x97AD, 0x95DA, // + 0x97B3, 0xE8E3, // + 0x97B4, 0xE8E4, // + 0x97C3, 0xE8E5, // + 0x97C6, 0xE8E6, // + 0x97C8, 0xE8E7, // + 0x97CB, 0xE8E8, // + 0x97D3, 0x8AD8, // + 0x97DC, 0xE8E9, // + 0x97ED, 0xE8EA, // + 0x97EE, 0x9442, // + 0x97F2, 0xE8EC, // + 0x97F3, 0x89B9, // + 0x97F5, 0xE8EF, // + 0x97F6, 0xE8EE, // + 0x97FB, 0x8943, // + 0x97FF, 0x8BBF, // + 0x9801, 0x95C5, // + 0x9802, 0x92B8, // + 0x9803, 0x8DA0, // + 0x9805, 0x8D80, // + 0x9806, 0x8F87, // + 0x9808, 0x907B, // + 0x980C, 0xE8F1, // + 0x980F, 0xE8F0, // + 0x9810, 0x9761, // + 0x9811, 0x8AE6, // + 0x9812, 0x94D0, // + 0x9813, 0x93DA, // + 0x9817, 0x909C, // + 0x9818, 0x97CC, // + 0x981A, 0x8C7A, // + 0x9821, 0xE8F4, // + 0x9824, 0xE8F3, // + 0x982C, 0x966A, // + 0x982D, 0x93AA, // + 0x9834, 0x896F, // + 0x9837, 0xE8F5, // + 0x9838, 0xE8F2, // + 0x983B, 0x9570, // + 0x983C, 0x978A, // + 0x983D, 0xE8F6, // + 0x9846, 0xE8F7, // + 0x984B, 0xE8F9, // + 0x984C, 0x91E8, // + 0x984D, 0x8A7A, // + 0x984E, 0x8A7B, // + 0x984F, 0xE8F8, // + 0x9854, 0x8AE7, // + 0x9855, 0x8CB0, // + 0x9858, 0x8AE8, // + 0x985B, 0x935E, // + 0x985E, 0x97DE, // + 0x9867, 0x8CDA, // + 0x986B, 0xE8FA, // + 0x986F, 0xE8FB, // + 0x9870, 0xE8FC, // + 0x9871, 0xE940, // + 0x9873, 0xE942, // + 0x9874, 0xE941, // + 0x98A8, 0x9597, // + 0x98AA, 0xE943, // + 0x98AF, 0xE944, // + 0x98B1, 0xE945, // + 0x98B6, 0xE946, // + 0x98C3, 0xE948, // + 0x98C4, 0xE947, // + 0x98C6, 0xE949, // + 0x98DB, 0x94F2, // + 0x98DC, 0xE3CA, // + 0x98DF, 0x9048, // + 0x98E2, 0x8B51, // + 0x98E9, 0xE94A, // + 0x98EB, 0xE94B, // + 0x98ED, 0x99AA, // + 0x98EE, 0x9F5A, // + 0x98EF, 0x94D1, // + 0x98F2, 0x88F9, // + 0x98F4, 0x88B9, // + 0x98FC, 0x8E94, // + 0x98FD, 0x964F, // + 0x98FE, 0x8FFC, // + 0x9903, 0xE94C, // + 0x9905, 0x96DD, // + 0x9909, 0xE94D, // + 0x990A, 0x977B, // + 0x990C, 0x8961, // + 0x9910, 0x8E60, // + 0x9912, 0xE94E, // + 0x9913, 0x89EC, // + 0x9914, 0xE94F, // + 0x9918, 0xE950, // + 0x991D, 0xE952, // + 0x991E, 0xE953, // + 0x9920, 0xE955, // + 0x9921, 0xE951, // + 0x9924, 0xE954, // + 0x9928, 0x8AD9, // + 0x992C, 0xE956, // + 0x992E, 0xE957, // + 0x993D, 0xE958, // + 0x993E, 0xE959, // + 0x9942, 0xE95A, // + 0x9945, 0xE95C, // + 0x994B, 0xE95E, // + 0x994C, 0xE961, // + 0x9950, 0xE95D, // + 0x9951, 0xE95F, // + 0x9952, 0xE960, // + 0x9955, 0xE962, // + 0x9957, 0x8BC0, // + 0x9996, 0x8EF1, // + 0x9997, 0xE963, // + 0x9998, 0xE964, // + 0x9999, 0x8D81, // + 0x99A5, 0xE965, // + 0x99A8, 0x8A5D, // + 0x99AC, 0x946E, // + 0x99AD, 0xE966, // + 0x99AE, 0xE967, // + 0x99B3, 0x9279, // + 0x99B4, 0x93E9, // + 0x99BC, 0xE968, // + 0x99C1, 0x949D, // + 0x99C4, 0x91CA, // + 0x99C5, 0x8977, // + 0x99C6, 0x8BEC, // + 0x99C8, 0x8BED, // + 0x99D0, 0x9293, // + 0x99D1, 0xE96D, // + 0x99D2, 0x8BEE, // + 0x99D5, 0x89ED, // + 0x99D8, 0xE96C, // + 0x99DB, 0xE96A, // + 0x99DD, 0xE96B, // + 0x99DF, 0xE969, // + 0x99E2, 0xE977, // + 0x99ED, 0xE96E, // + 0x99EE, 0xE96F, // + 0x99F1, 0xE970, // + 0x99F2, 0xE971, // + 0x99F8, 0xE973, // + 0x99FB, 0xE972, // + 0x99FF, 0x8F78, // + 0x9A01, 0xE974, // + 0x9A05, 0xE976, // + 0x9A0E, 0x8B52, // + 0x9A0F, 0xE975, // + 0x9A12, 0x919B, // + 0x9A13, 0x8CB1, // + 0x9A19, 0xE978, // + 0x9A28, 0x91CB, // + 0x9A2B, 0xE979, // + 0x9A30, 0x93AB, // + 0x9A37, 0xE97A, // + 0x9A3E, 0xE980, // + 0x9A40, 0xE97D, // + 0x9A42, 0xE97C, // + 0x9A43, 0xE97E, // + 0x9A45, 0xE97B, // + 0x9A4D, 0xE982, // + 0x9A55, 0xE981, // + 0x9A57, 0xE984, // + 0x9A5A, 0x8BC1, // + 0x9A5B, 0xE983, // + 0x9A5F, 0xE985, // + 0x9A62, 0xE986, // + 0x9A64, 0xE988, // + 0x9A65, 0xE987, // + 0x9A69, 0xE989, // + 0x9A6A, 0xE98B, // + 0x9A6B, 0xE98A, // + 0x9AA8, 0x8D9C, // + 0x9AAD, 0xE98C, // + 0x9AB0, 0xE98D, // + 0x9ABC, 0xE98E, // + 0x9AC0, 0xE98F, // + 0x9AC4, 0x9091, // + 0x9ACF, 0xE990, // + 0x9AD1, 0xE991, // + 0x9AD3, 0xE992, // + 0x9AD4, 0xE993, // + 0x9AD8, 0x8D82, // + 0x9ADE, 0xE994, // + 0x9ADF, 0xE995, // + 0x9AE2, 0xE996, // + 0x9AE3, 0xE997, // + 0x9AE6, 0xE998, // + 0x9AEA, 0x94AF, // + 0x9AEB, 0xE99A, // + 0x9AED, 0x9545, // + 0x9AEE, 0xE99B, // + 0x9AEF, 0xE999, // + 0x9AF1, 0xE99D, // + 0x9AF4, 0xE99C, // + 0x9AF7, 0xE99E, // + 0x9AFB, 0xE99F, // + 0x9B06, 0xE9A0, // + 0x9B18, 0xE9A1, // + 0x9B1A, 0xE9A2, // + 0x9B1F, 0xE9A3, // + 0x9B22, 0xE9A4, // + 0x9B23, 0xE9A5, // + 0x9B25, 0xE9A6, // + 0x9B27, 0xE9A7, // + 0x9B28, 0xE9A8, // + 0x9B29, 0xE9A9, // + 0x9B2A, 0xE9AA, // + 0x9B2E, 0xE9AB, // + 0x9B2F, 0xE9AC, // + 0x9B31, 0x9F54, // + 0x9B32, 0xE9AD, // + 0x9B3B, 0xE2F6, // + 0x9B3C, 0x8B53, // + 0x9B41, 0x8A40, // + 0x9B42, 0x8DB0, // + 0x9B43, 0xE9AF, // + 0x9B44, 0xE9AE, // + 0x9B45, 0x96A3, // + 0x9B4D, 0xE9B1, // + 0x9B4E, 0xE9B2, // + 0x9B4F, 0xE9B0, // + 0x9B51, 0xE9B3, // + 0x9B54, 0x9682, // + 0x9B58, 0xE9B4, // + 0x9B5A, 0x8B9B, // + 0x9B6F, 0x9844, // + 0x9B74, 0xE9B5, // + 0x9B83, 0xE9B7, // + 0x9B8E, 0x88BC, // + 0x9B91, 0xE9B8, // + 0x9B92, 0x95A9, // + 0x9B93, 0xE9B6, // + 0x9B96, 0xE9B9, // + 0x9B97, 0xE9BA, // + 0x9B9F, 0xE9BB, // + 0x9BA0, 0xE9BC, // + 0x9BA8, 0xE9BD, // + 0x9BAA, 0x968E, // + 0x9BAB, 0x8E4C, // + 0x9BAD, 0x8DF8, // + 0x9BAE, 0x914E, // + 0x9BB4, 0xE9BE, // + 0x9BB9, 0xE9C1, // + 0x9BC0, 0xE9BF, // + 0x9BC6, 0xE9C2, // + 0x9BC9, 0x8CEF, // + 0x9BCA, 0xE9C0, // + 0x9BCF, 0xE9C3, // + 0x9BD1, 0xE9C4, // + 0x9BD2, 0xE9C5, // + 0x9BD4, 0xE9C9, // + 0x9BD6, 0x8E49, // + 0x9BDB, 0x91E2, // + 0x9BE1, 0xE9CA, // + 0x9BE2, 0xE9C7, // + 0x9BE3, 0xE9C6, // + 0x9BE4, 0xE9C8, // + 0x9BE8, 0x8C7E, // + 0x9BF0, 0xE9CE, // + 0x9BF1, 0xE9CD, // + 0x9BF2, 0xE9CC, // + 0x9BF5, 0x88B1, // + 0x9C04, 0xE9D8, // + 0x9C06, 0xE9D4, // + 0x9C08, 0xE9D5, // + 0x9C09, 0xE9D1, // + 0x9C0A, 0xE9D7, // + 0x9C0C, 0xE9D3, // + 0x9C0D, 0x8A82, // + 0x9C10, 0x986B, // + 0x9C12, 0xE9D6, // + 0x9C13, 0xE9D2, // + 0x9C14, 0xE9D0, // + 0x9C15, 0xE9CF, // + 0x9C1B, 0xE9DA, // + 0x9C21, 0xE9DD, // + 0x9C24, 0xE9DC, // + 0x9C25, 0xE9DB, // + 0x9C2D, 0x9568, // + 0x9C2E, 0xE9D9, // + 0x9C2F, 0x88F1, // + 0x9C30, 0xE9DE, // + 0x9C32, 0xE9E0, // + 0x9C39, 0x8A8F, // + 0x9C3A, 0xE9CB, // + 0x9C3B, 0x8956, // + 0x9C3E, 0xE9E2, // + 0x9C46, 0xE9E1, // + 0x9C47, 0xE9DF, // + 0x9C48, 0x924C, // + 0x9C52, 0x9690, // + 0x9C57, 0x97D8, // + 0x9C5A, 0xE9E3, // + 0x9C60, 0xE9E4, // + 0x9C67, 0xE9E5, // + 0x9C76, 0xE9E6, // + 0x9C78, 0xE9E7, // + 0x9CE5, 0x92B9, // + 0x9CE7, 0xE9E8, // + 0x9CE9, 0x94B5, // + 0x9CEB, 0xE9ED, // + 0x9CEC, 0xE9E9, // + 0x9CF0, 0xE9EA, // + 0x9CF3, 0x9650, // + 0x9CF4, 0x96C2, // + 0x9CF6, 0x93CE, // + 0x9D03, 0xE9EE, // + 0x9D06, 0xE9EF, // + 0x9D07, 0x93BC, // + 0x9D08, 0xE9EC, // + 0x9D09, 0xE9EB, // + 0x9D0E, 0x89A8, // + 0x9D12, 0xE9F7, // + 0x9D15, 0xE9F6, // + 0x9D1B, 0x8995, // + 0x9D1F, 0xE9F4, // + 0x9D23, 0xE9F3, // + 0x9D26, 0xE9F1, // + 0x9D28, 0x8A9B, // + 0x9D2A, 0xE9F0, // + 0x9D2B, 0x8EB0, // + 0x9D2C, 0x89A7, // + 0x9D3B, 0x8D83, // + 0x9D3E, 0xE9FA, // + 0x9D3F, 0xE9F9, // + 0x9D41, 0xE9F8, // + 0x9D44, 0xE9F5, // + 0x9D46, 0xE9FB, // + 0x9D48, 0xE9FC, // + 0x9D50, 0xEA44, // + 0x9D51, 0xEA43, // + 0x9D59, 0xEA45, // + 0x9D5C, 0x894C, // + 0x9D5D, 0xEA40, // + 0x9D5E, 0xEA41, // + 0x9D60, 0x8D94, // + 0x9D61, 0x96B7, // + 0x9D64, 0xEA42, // + 0x9D6C, 0x9651, // + 0x9D6F, 0xEA4A, // + 0x9D72, 0xEA46, // + 0x9D7A, 0xEA4B, // + 0x9D87, 0xEA48, // + 0x9D89, 0xEA47, // + 0x9D8F, 0x8C7B, // + 0x9D9A, 0xEA4C, // + 0x9DA4, 0xEA4D, // + 0x9DA9, 0xEA4E, // + 0x9DAB, 0xEA49, // + 0x9DAF, 0xE9F2, // + 0x9DB2, 0xEA4F, // + 0x9DB4, 0x92DF, // + 0x9DB8, 0xEA53, // + 0x9DBA, 0xEA54, // + 0x9DBB, 0xEA52, // + 0x9DC1, 0xEA51, // + 0x9DC2, 0xEA57, // + 0x9DC4, 0xEA50, // + 0x9DC6, 0xEA55, // + 0x9DCF, 0xEA56, // + 0x9DD3, 0xEA59, // + 0x9DD9, 0xEA58, // + 0x9DED, 0xEA5C, // + 0x9DEF, 0xEA5D, // + 0x9DF2, 0x9868, // + 0x9DF8, 0xEA5A, // + 0x9DF9, 0x91E9, // + 0x9DFA, 0x8DEB, // + 0x9DFD, 0xEA5E, // + 0x9E1A, 0xEA5F, // + 0x9E1B, 0xEA60, // + 0x9E1E, 0xEA61, // + 0x9E75, 0xEA62, // + 0x9E78, 0x8CB2, // + 0x9E79, 0xEA63, // + 0x9E7D, 0xEA64, // + 0x9E7F, 0x8EAD, // + 0x9E81, 0xEA65, // + 0x9E88, 0xEA66, // + 0x9E8B, 0xEA67, // + 0x9E8C, 0xEA68, // + 0x9E91, 0xEA6B, // + 0x9E92, 0xEA69, // + 0x9E95, 0xEA6A, // + 0x9E97, 0x97ED, // + 0x9E9D, 0xEA6C, // + 0x9E9F, 0x97D9, // + 0x9EA5, 0xEA6D, // + 0x9EA6, 0x949E, // + 0x9EA9, 0xEA6E, // + 0x9EAA, 0xEA70, // + 0x9EAD, 0xEA71, // + 0x9EB8, 0xEA6F, // + 0x9EB9, 0x8D8D, // + 0x9EBA, 0x96CB, // + 0x9EBB, 0x9683, // + 0x9EBC, 0x9BF5, // + 0x9EBE, 0x9F80, // + 0x9EBF, 0x969B, // + 0x9EC4, 0x89A9, // + 0x9ECC, 0xEA73, // + 0x9ECD, 0x8B6F, // + 0x9ECE, 0xEA74, // + 0x9ECF, 0xEA75, // + 0x9ED0, 0xEA76, // + 0x9ED2, 0x8D95, // + 0x9ED4, 0xEA77, // + 0x9ED8, 0xE0D2, // + 0x9ED9, 0x96D9, // + 0x9EDB, 0x91E1, // + 0x9EDC, 0xEA78, // + 0x9EDD, 0xEA7A, // + 0x9EDE, 0xEA79, // + 0x9EE0, 0xEA7B, // + 0x9EE5, 0xEA7C, // + 0x9EE8, 0xEA7D, // + 0x9EEF, 0xEA7E, // + 0x9EF4, 0xEA80, // + 0x9EF6, 0xEA81, // + 0x9EF7, 0xEA82, // + 0x9EF9, 0xEA83, // + 0x9EFB, 0xEA84, // + 0x9EFC, 0xEA85, // + 0x9EFD, 0xEA86, // + 0x9F07, 0xEA87, // + 0x9F08, 0xEA88, // + 0x9F0E, 0x9343, // + 0x9F13, 0x8CDB, // + 0x9F15, 0xEA8A, // + 0x9F20, 0x916C, // + 0x9F21, 0xEA8B, // + 0x9F2C, 0xEA8C, // + 0x9F3B, 0x9540, // + 0x9F3E, 0xEA8D, // + 0x9F4A, 0xEA8E, // + 0x9F4B, 0xE256, // + 0x9F4E, 0xE6D8, // + 0x9F4F, 0xE8EB, // + 0x9F52, 0xEA8F, // + 0x9F54, 0xEA90, // + 0x9F5F, 0xEA92, // + 0x9F60, 0xEA93, // + 0x9F61, 0xEA94, // + 0x9F62, 0x97EE, // + 0x9F63, 0xEA91, // + 0x9F66, 0xEA95, // + 0x9F67, 0xEA96, // + 0x9F6A, 0xEA98, // + 0x9F6C, 0xEA97, // + 0x9F72, 0xEA9A, // + 0x9F76, 0xEA9B, // + 0x9F77, 0xEA99, // + 0x9F8D, 0x97B4, // + 0x9F95, 0xEA9C, // + 0x9F9C, 0xEA9D, // + 0x9F9D, 0xE273, // + 0x9FA0, 0xEA9E, // + 0xFF01, 0x8149, // FULLWIDTH EXCLAMATION MARK + 0xFF03, 0x8194, // FULLWIDTH NUMBER SIGN + 0xFF04, 0x8190, // FULLWIDTH DOLLAR SIGN + 0xFF05, 0x8193, // FULLWIDTH PERCENT SIGN + 0xFF06, 0x8195, // FULLWIDTH AMPERSAND + 0xFF07, 0x81AD, // FULLWIDTH APOSTROPHE + 0xFF08, 0x8169, // FULLWIDTH LEFT PARENTHESIS + 0xFF09, 0x816A, // FULLWIDTH RIGHT PARENTHESIS + 0xFF0A, 0x8196, // FULLWIDTH ASTERISK + 0xFF0B, 0x817B, // FULLWIDTH PLUS SIGN + 0xFF0C, 0x8143, // FULLWIDTH COMMA + 0xFF0E, 0x8144, // FULLWIDTH FULL STOP + 0xFF0F, 0x815E, // FULLWIDTH SOLIDUS + 0xFF10, 0x824F, // FULLWIDTH DIGIT ZERO + 0xFF11, 0x8250, // FULLWIDTH DIGIT ONE + 0xFF12, 0x8251, // FULLWIDTH DIGIT TWO + 0xFF13, 0x8252, // FULLWIDTH DIGIT THREE + 0xFF14, 0x8253, // FULLWIDTH DIGIT FOUR + 0xFF15, 0x8254, // FULLWIDTH DIGIT FIVE + 0xFF16, 0x8255, // FULLWIDTH DIGIT SIX + 0xFF17, 0x8256, // FULLWIDTH DIGIT SEVEN + 0xFF18, 0x8257, // FULLWIDTH DIGIT EIGHT + 0xFF19, 0x8258, // FULLWIDTH DIGIT NINE + 0xFF1A, 0x8146, // FULLWIDTH COLON + 0xFF1B, 0x8147, // FULLWIDTH SEMICOLON + 0xFF1C, 0x8183, // FULLWIDTH LESS-THAN SIGN + 0xFF1D, 0x8181, // FULLWIDTH EQUALS SIGN + 0xFF1E, 0x8184, // FULLWIDTH GREATER-THAN SIGN + 0xFF1F, 0x8148, // FULLWIDTH QUESTION MARK + 0xFF20, 0x8197, // FULLWIDTH COMMERCIAL AT + 0xFF21, 0x8260, // FULLWIDTH LATIN CAPITAL LETTER A + 0xFF22, 0x8261, // FULLWIDTH LATIN CAPITAL LETTER B + 0xFF23, 0x8262, // FULLWIDTH LATIN CAPITAL LETTER C + 0xFF24, 0x8263, // FULLWIDTH LATIN CAPITAL LETTER D + 0xFF25, 0x8264, // FULLWIDTH LATIN CAPITAL LETTER E + 0xFF26, 0x8265, // FULLWIDTH LATIN CAPITAL LETTER F + 0xFF27, 0x8266, // FULLWIDTH LATIN CAPITAL LETTER G + 0xFF28, 0x8267, // FULLWIDTH LATIN CAPITAL LETTER H + 0xFF29, 0x8268, // FULLWIDTH LATIN CAPITAL LETTER I + 0xFF2A, 0x8269, // FULLWIDTH LATIN CAPITAL LETTER J + 0xFF2B, 0x826A, // FULLWIDTH LATIN CAPITAL LETTER K + 0xFF2C, 0x826B, // FULLWIDTH LATIN CAPITAL LETTER L + 0xFF2D, 0x826C, // FULLWIDTH LATIN CAPITAL LETTER M + 0xFF2E, 0x826D, // FULLWIDTH LATIN CAPITAL LETTER N + 0xFF2F, 0x826E, // FULLWIDTH LATIN CAPITAL LETTER O + 0xFF30, 0x826F, // FULLWIDTH LATIN CAPITAL LETTER P + 0xFF31, 0x8270, // FULLWIDTH LATIN CAPITAL LETTER Q + 0xFF32, 0x8271, // FULLWIDTH LATIN CAPITAL LETTER R + 0xFF33, 0x8272, // FULLWIDTH LATIN CAPITAL LETTER S + 0xFF34, 0x8273, // FULLWIDTH LATIN CAPITAL LETTER T + 0xFF35, 0x8274, // FULLWIDTH LATIN CAPITAL LETTER U + 0xFF36, 0x8275, // FULLWIDTH LATIN CAPITAL LETTER V + 0xFF37, 0x8276, // FULLWIDTH LATIN CAPITAL LETTER W + 0xFF38, 0x8277, // FULLWIDTH LATIN CAPITAL LETTER X + 0xFF39, 0x8278, // FULLWIDTH LATIN CAPITAL LETTER Y + 0xFF3A, 0x8279, // FULLWIDTH LATIN CAPITAL LETTER Z + 0xFF3B, 0x816D, // FULLWIDTH LEFT SQUARE BRACKET + 0xFF3D, 0x816E, // FULLWIDTH RIGHT SQUARE BRACKET + 0xFF3E, 0x814F, // FULLWIDTH CIRCUMFLEX ACCENT + 0xFF3F, 0x8151, // FULLWIDTH LOW LINE + 0xFF40, 0x814D, // FULLWIDTH GRAVE ACCENT + 0xFF41, 0x8281, // FULLWIDTH LATIN SMALL LETTER A + 0xFF42, 0x8282, // FULLWIDTH LATIN SMALL LETTER B + 0xFF43, 0x8283, // FULLWIDTH LATIN SMALL LETTER C + 0xFF44, 0x8284, // FULLWIDTH LATIN SMALL LETTER D + 0xFF45, 0x8285, // FULLWIDTH LATIN SMALL LETTER E + 0xFF46, 0x8286, // FULLWIDTH LATIN SMALL LETTER F + 0xFF47, 0x8287, // FULLWIDTH LATIN SMALL LETTER G + 0xFF48, 0x8288, // FULLWIDTH LATIN SMALL LETTER H + 0xFF49, 0x8289, // FULLWIDTH LATIN SMALL LETTER I + 0xFF4A, 0x828A, // FULLWIDTH LATIN SMALL LETTER J + 0xFF4B, 0x828B, // FULLWIDTH LATIN SMALL LETTER K + 0xFF4C, 0x828C, // FULLWIDTH LATIN SMALL LETTER L + 0xFF4D, 0x828D, // FULLWIDTH LATIN SMALL LETTER M + 0xFF4E, 0x828E, // FULLWIDTH LATIN SMALL LETTER N + 0xFF4F, 0x828F, // FULLWIDTH LATIN SMALL LETTER O + 0xFF50, 0x8290, // FULLWIDTH LATIN SMALL LETTER P + 0xFF51, 0x8291, // FULLWIDTH LATIN SMALL LETTER Q + 0xFF52, 0x8292, // FULLWIDTH LATIN SMALL LETTER R + 0xFF53, 0x8293, // FULLWIDTH LATIN SMALL LETTER S + 0xFF54, 0x8294, // FULLWIDTH LATIN SMALL LETTER T + 0xFF55, 0x8295, // FULLWIDTH LATIN SMALL LETTER U + 0xFF56, 0x8296, // FULLWIDTH LATIN SMALL LETTER V + 0xFF57, 0x8297, // FULLWIDTH LATIN SMALL LETTER W + 0xFF58, 0x8298, // FULLWIDTH LATIN SMALL LETTER X + 0xFF59, 0x8299, // FULLWIDTH LATIN SMALL LETTER Y + 0xFF5A, 0x829A, // FULLWIDTH LATIN SMALL LETTER Z + 0xFF5B, 0x816F, // FULLWIDTH LEFT CURLY BRACKET + 0xFF5C, 0x8162, // FULLWIDTH VERTICAL LINE + 0xFF5D, 0x8170, // FULLWIDTH RIGHT CURLY BRACKET + 0xFFE3, 0x8150, // FULLWIDTH MACRON + 0xFFE5, 0x818F // FULLWIDTH YEN SIGN }; \ No newline at end of file diff --git a/backend/svg.c b/backend/svg.c index e7d203f2..85dc7cf8 100644 --- a/backend/svg.c +++ b/backend/svg.c @@ -2,7 +2,7 @@ /* libzint - the open source barcode library - Copyright (C) 2009 Robin Stuart + Copyright (C) 2009-2016 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -28,7 +28,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ #include #include @@ -38,577 +38,575 @@ #define SSET "0123456789ABCDEF" -int svg_plot(struct zint_symbol *symbol) -{ - int i, block_width, latch, r, this_row; - float textpos, large_bar_height, preset_height, row_height, row_posn = 0.0; - FILE *fsvg; - int error_number = 0; - int textoffset, xoffset, yoffset, textdone, main_width; - char textpart[10], addon[6]; - int large_bar_count, comp_offset; - float addon_text_posn; - float scaler = symbol->scale; - float default_text_posn; - int plot_text = 1; - const char *locale = NULL; +int svg_plot(struct zint_symbol *symbol) { + int i, block_width, latch, r, this_row; + float textpos, large_bar_height, preset_height, row_height, row_posn = 0.0; + FILE *fsvg; + int error_number = 0; + int textoffset, xoffset, yoffset, textdone, main_width; + char textpart[10], addon[6]; + int large_bar_count, comp_offset; + float addon_text_posn; + float scaler = symbol->scale; + float default_text_posn; + int plot_text = 1; + const char *locale = NULL; - row_height=0; - textdone = 0; - main_width = symbol->width; - strcpy(addon, ""); - comp_offset = 0; - addon_text_posn = 0.0; + row_height = 0; + textdone = 0; + main_width = symbol->width; + strcpy(addon, ""); + comp_offset = 0; + addon_text_posn = 0.0; - if((symbol->output_options & BARCODE_STDOUT) != 0) { - fsvg = stdout; - } else { - fsvg = fopen(symbol->outfile, "w"); - } - if(fsvg == NULL) { - strcpy(symbol->errtxt, "Could not open output file"); - return ZINT_ERROR_FILE_ACCESS; - } + if ((symbol->output_options & BARCODE_STDOUT) != 0) { + fsvg = stdout; + } else { + fsvg = fopen(symbol->outfile, "w"); + } + if (fsvg == NULL) { + strcpy(symbol->errtxt, "Could not open output file"); + return ZINT_ERROR_FILE_ACCESS; + } - /* sort out colour options */ - to_upper((unsigned char*)symbol->fgcolour); - to_upper((unsigned char*)symbol->bgcolour); + /* sort out colour options */ + to_upper((unsigned char*) symbol->fgcolour); + to_upper((unsigned char*) symbol->bgcolour); - if(strlen(symbol->fgcolour) != 6) { - strcpy(symbol->errtxt, "Malformed foreground colour target"); - return ZINT_ERROR_INVALID_OPTION; - } - if(strlen(symbol->bgcolour) != 6) { - strcpy(symbol->errtxt, "Malformed background colour target"); - return ZINT_ERROR_INVALID_OPTION; - } - error_number = is_sane(SSET, (unsigned char*)symbol->fgcolour, strlen(symbol->fgcolour)); - if (error_number == ZINT_ERROR_INVALID_DATA) { - strcpy(symbol->errtxt, "Malformed foreground colour target"); - return ZINT_ERROR_INVALID_OPTION; - } - error_number = is_sane(SSET, (unsigned char*)symbol->bgcolour, strlen(symbol->bgcolour)); - if (error_number == ZINT_ERROR_INVALID_DATA) { - strcpy(symbol->errtxt, "Malformed background colour target"); - return ZINT_ERROR_INVALID_OPTION; - } - locale = setlocale(LC_ALL, "C"); - - if (symbol->height == 0) { - symbol->height = 50; - } + if (strlen(symbol->fgcolour) != 6) { + strcpy(symbol->errtxt, "Malformed foreground colour target"); + return ZINT_ERROR_INVALID_OPTION; + } + if (strlen(symbol->bgcolour) != 6) { + strcpy(symbol->errtxt, "Malformed background colour target"); + return ZINT_ERROR_INVALID_OPTION; + } + error_number = is_sane(SSET, (unsigned char*) symbol->fgcolour, strlen(symbol->fgcolour)); + if (error_number == ZINT_ERROR_INVALID_DATA) { + strcpy(symbol->errtxt, "Malformed foreground colour target"); + return ZINT_ERROR_INVALID_OPTION; + } + error_number = is_sane(SSET, (unsigned char*) symbol->bgcolour, strlen(symbol->bgcolour)); + if (error_number == ZINT_ERROR_INVALID_DATA) { + strcpy(symbol->errtxt, "Malformed background colour target"); + return ZINT_ERROR_INVALID_OPTION; + } + locale = setlocale(LC_ALL, "C"); - large_bar_count = 0; - preset_height = 0.0; - for(i = 0; i < symbol->rows; i++) { - preset_height += symbol->row_height[i]; - if(symbol->row_height[i] == 0) { - large_bar_count++; - } - } - large_bar_height = (symbol->height - preset_height) / large_bar_count; + if (symbol->height == 0) { + symbol->height = 50; + } - if (large_bar_count == 0) { - symbol->height = preset_height; - } + large_bar_count = 0; + preset_height = 0.0; + for (i = 0; i < symbol->rows; i++) { + preset_height += symbol->row_height[i]; + if (symbol->row_height[i] == 0) { + large_bar_count++; + } + } + large_bar_height = (symbol->height - preset_height) / large_bar_count; - while(!(module_is_set(symbol, symbol->rows - 1, comp_offset))) { - comp_offset++; - } + if (large_bar_count == 0) { + symbol->height = preset_height; + } - /* Certain symbols need whitespace otherwise characters get chopped off the sides */ - if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC)) - || (symbol->symbology == BARCODE_ISBNX)) { - switch(ustrlen(symbol->text)) { - case 13: /* EAN 13 */ - case 16: - case 19: - if(symbol->whitespace_width == 0) { - symbol->whitespace_width = 10; - } - main_width = 96 + comp_offset; - break; - default: - main_width = 68 + comp_offset; - } - } + while (!(module_is_set(symbol, symbol->rows - 1, comp_offset))) { + comp_offset++; + } - if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) { - if(symbol->whitespace_width == 0) { - symbol->whitespace_width = 10; - main_width = 96 + comp_offset; - } - } + /* Certain symbols need whitespace otherwise characters get chopped off the sides */ + if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC)) + || (symbol->symbology == BARCODE_ISBNX)) { + switch (ustrlen(symbol->text)) { + case 13: /* EAN 13 */ + case 16: + case 19: + if (symbol->whitespace_width == 0) { + symbol->whitespace_width = 10; + } + main_width = 96 + comp_offset; + break; + default: + main_width = 68 + comp_offset; + } + } - if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) { - if(symbol->whitespace_width == 0) { - symbol->whitespace_width = 10; - main_width = 51 + comp_offset; - } - } + if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) { + if (symbol->whitespace_width == 0) { + symbol->whitespace_width = 10; + main_width = 96 + comp_offset; + } + } - latch = 0; - r = 0; - /* Isolate add-on text */ - if(is_extendable(symbol->symbology)) { - for(i = 0; i < ustrlen(symbol->text); i++) { - if (latch == 1) { - addon[r] = symbol->text[i]; - r++; - } - if (symbol->text[i] == '+') { - latch = 1; - } - } - } - addon[r] = '\0'; + if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) { + if (symbol->whitespace_width == 0) { + symbol->whitespace_width = 10; + main_width = 51 + comp_offset; + } + } - if((symbol->show_hrt == 0) || (ustrlen(symbol->text) == 0)) { - plot_text = 0; - } - if(plot_text) { - textoffset = 9; - } else { - textoffset = 0; - } - xoffset = symbol->border_width + symbol->whitespace_width; - yoffset = symbol->border_width; + latch = 0; + r = 0; + /* Isolate add-on text */ + if (is_extendable(symbol->symbology)) { + for (i = 0; i < ustrlen(symbol->text); i++) { + if (latch == 1) { + addon[r] = symbol->text[i]; + r++; + } + if (symbol->text[i] == '+') { + latch = 1; + } + } + } + addon[r] = '\0'; - /* Start writing the header */ - fprintf(fsvg, "\n"); - fprintf(fsvg, "\n"); - if(symbol->symbology != BARCODE_MAXICODE) { - fprintf(fsvg, "width + xoffset + xoffset) * scaler), roundup((symbol->height + textoffset + yoffset + yoffset) * scaler)); - } else { - fprintf(fsvg, "\n"); - if(ustrlen(symbol->text) != 0) { - fprintf(fsvg, " %s\n", symbol->text); - } else { - fprintf(fsvg, " Zint Generated Symbol\n"); - } - fprintf(fsvg, " \n"); - fprintf(fsvg, "\n \n", symbol->fgcolour); + if ((symbol->show_hrt == 0) || (ustrlen(symbol->text) == 0)) { + plot_text = 0; + } + if (plot_text) { + textoffset = 9; + } else { + textoffset = 0; + } + xoffset = symbol->border_width + symbol->whitespace_width; + yoffset = symbol->border_width; - if(symbol->symbology != BARCODE_MAXICODE) { - fprintf(fsvg, " \n", roundup((symbol->width + xoffset + xoffset) * scaler), roundup((symbol->height + textoffset + yoffset + yoffset) * scaler), symbol->bgcolour); - } else { - fprintf(fsvg, " \n", roundup((74.0 + xoffset + xoffset) * scaler), roundup((72.0 + yoffset + yoffset) * scaler), symbol->bgcolour); - } + /* Start writing the header */ + fprintf(fsvg, "\n"); + fprintf(fsvg, "\n"); + if (symbol->symbology != BARCODE_MAXICODE) { + fprintf(fsvg, "width + xoffset + xoffset) * scaler), roundup((symbol->height + textoffset + yoffset + yoffset) * scaler)); + } else { + fprintf(fsvg, "\n"); + if (ustrlen(symbol->text) != 0) { + fprintf(fsvg, " %s\n", symbol->text); + } else { + fprintf(fsvg, " Zint Generated Symbol\n"); + } + fprintf(fsvg, " \n"); + fprintf(fsvg, "\n \n", symbol->fgcolour); - if(((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { - default_text_posn = (symbol->height + textoffset + symbol->border_width + symbol->border_width) * scaler; - } else { - default_text_posn = (symbol->height + textoffset + symbol->border_width) * scaler; - } + if (symbol->symbology != BARCODE_MAXICODE) { + fprintf(fsvg, " \n", roundup((symbol->width + xoffset + xoffset) * scaler), roundup((symbol->height + textoffset + yoffset + yoffset) * scaler), symbol->bgcolour); + } else { + fprintf(fsvg, " \n", roundup((74.0 + xoffset + xoffset) * scaler), roundup((72.0 + yoffset + yoffset) * scaler), symbol->bgcolour); + } - if(symbol->symbology == BARCODE_MAXICODE) { - /* Maxicode uses hexagons */ - float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy, mx, my; + if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + default_text_posn = (symbol->height + textoffset + symbol->border_width + symbol->border_width) * scaler; + } else { + default_text_posn = (symbol->height + textoffset + symbol->border_width) * scaler; + } + + if (symbol->symbology == BARCODE_MAXICODE) { + /* Maxicode uses hexagons */ + float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy, mx, my; - textoffset = 0.0; - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { - fprintf(fsvg, " \n", 0.0, 0.0, (74.0 + xoffset + xoffset) * scaler, symbol->border_width * scaler); - fprintf(fsvg, " \n", 0.0, (72.0 + symbol->border_width) * scaler, (74.0 + xoffset + xoffset) * scaler, symbol->border_width * scaler); - } - if((symbol->output_options & BARCODE_BOX) != 0) { - /* side bars */ - fprintf(fsvg, " \n", 0.0, 0.0, symbol->border_width * scaler, (72.0 + (2 * symbol->border_width)) * scaler); - fprintf(fsvg, " \n", (74.0 + xoffset + xoffset - symbol->border_width) * scaler, 0.0, symbol->border_width * scaler, (72.0 + (2 * symbol->border_width)) * scaler); - } - fprintf(fsvg, " \n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 10.85 * scaler, symbol->fgcolour); - fprintf(fsvg, " \n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 8.97 * scaler, symbol->bgcolour); - fprintf(fsvg, " \n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 7.10 * scaler, symbol->fgcolour); - fprintf(fsvg, " \n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 5.22 * scaler, symbol->bgcolour); - fprintf(fsvg, " \n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 3.31 * scaler, symbol->fgcolour); - fprintf(fsvg, " \n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 1.43 * scaler, symbol->bgcolour); - for(r = 0; r < symbol->rows; r++) { - for(i = 0; i < symbol->width; i++) { - if(module_is_set(symbol, r, i)) { - /* Dump a hexagon */ - my = r * 2.135 + 1.43; - ay = my + 1.0 + yoffset; - by = my + 0.5 + yoffset; - cy = my - 0.5 + yoffset; - dy = my - 1.0 + yoffset; - ey = my - 0.5 + yoffset; - fy = my + 0.5 + yoffset; - if(r & 1) { - mx = (2.46 * i) + 1.23 + 1.23; - } else { - mx = (2.46 * i) + 1.23; - } - ax = mx + xoffset; - bx = mx + 0.86 + xoffset; - cx = mx + 0.86 + xoffset; - dx = mx + xoffset; - ex = mx - 0.86 + xoffset; - fx = mx - 0.86 + xoffset; - fprintf(fsvg, " \n", ax * scaler, ay * scaler, bx * scaler, by * scaler, cx * scaler, cy * scaler, dx * scaler, dy * scaler, ex * scaler, ey * scaler, fx * scaler, fy * scaler); - } - } - } - } + textoffset = 0.0; + if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + fprintf(fsvg, " \n", 0.0, 0.0, (74.0 + xoffset + xoffset) * scaler, symbol->border_width * scaler); + fprintf(fsvg, " \n", 0.0, (72.0 + symbol->border_width) * scaler, (74.0 + xoffset + xoffset) * scaler, symbol->border_width * scaler); + } + if ((symbol->output_options & BARCODE_BOX) != 0) { + /* side bars */ + fprintf(fsvg, " \n", 0.0, 0.0, symbol->border_width * scaler, (72.0 + (2 * symbol->border_width)) * scaler); + fprintf(fsvg, " \n", (74.0 + xoffset + xoffset - symbol->border_width) * scaler, 0.0, symbol->border_width * scaler, (72.0 + (2 * symbol->border_width)) * scaler); + } + fprintf(fsvg, " \n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 10.85 * scaler, symbol->fgcolour); + fprintf(fsvg, " \n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 8.97 * scaler, symbol->bgcolour); + fprintf(fsvg, " \n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 7.10 * scaler, symbol->fgcolour); + fprintf(fsvg, " \n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 5.22 * scaler, symbol->bgcolour); + fprintf(fsvg, " \n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 3.31 * scaler, symbol->fgcolour); + fprintf(fsvg, " \n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 1.43 * scaler, symbol->bgcolour); + for (r = 0; r < symbol->rows; r++) { + for (i = 0; i < symbol->width; i++) { + if (module_is_set(symbol, r, i)) { + /* Dump a hexagon */ + my = r * 2.135 + 1.43; + ay = my + 1.0 + yoffset; + by = my + 0.5 + yoffset; + cy = my - 0.5 + yoffset; + dy = my - 1.0 + yoffset; + ey = my - 0.5 + yoffset; + fy = my + 0.5 + yoffset; + if (r & 1) { + mx = (2.46 * i) + 1.23 + 1.23; + } else { + mx = (2.46 * i) + 1.23; + } + ax = mx + xoffset; + bx = mx + 0.86 + xoffset; + cx = mx + 0.86 + xoffset; + dx = mx + xoffset; + ex = mx - 0.86 + xoffset; + fx = mx - 0.86 + xoffset; + fprintf(fsvg, " \n", ax * scaler, ay * scaler, bx * scaler, by * scaler, cx * scaler, cy * scaler, dx * scaler, dy * scaler, ex * scaler, ey * scaler, fx * scaler, fy * scaler); + } + } + } + } - if(symbol->symbology != BARCODE_MAXICODE) { - /* everything else uses rectangles (or squares) */ - /* Works from the bottom of the symbol up */ - int addon_latch = 0; + if (symbol->symbology != BARCODE_MAXICODE) { + /* everything else uses rectangles (or squares) */ + /* Works from the bottom of the symbol up */ + int addon_latch = 0; - for(r = 0; r < symbol->rows; r++) { - this_row = r; - if(symbol->row_height[this_row] == 0) { - row_height = large_bar_height; - } else { - row_height = symbol->row_height[this_row]; - } - row_posn = 0; - for(i = 0; i < r; i++) { - if(symbol->row_height[i] == 0) { - row_posn += large_bar_height; - } else { - row_posn += symbol->row_height[i]; - } - } - row_posn += yoffset; + for (r = 0; r < symbol->rows; r++) { + this_row = r; + if (symbol->row_height[this_row] == 0) { + row_height = large_bar_height; + } else { + row_height = symbol->row_height[this_row]; + } + row_posn = 0; + for (i = 0; i < r; i++) { + if (symbol->row_height[i] == 0) { + row_posn += large_bar_height; + } else { + row_posn += symbol->row_height[i]; + } + } + row_posn += yoffset; - i = 0; - if(module_is_set(symbol, this_row, 0)) { - latch = 1; - } else { - latch = 0; - } + i = 0; + if (module_is_set(symbol, this_row, 0)) { + latch = 1; + } else { + latch = 0; + } - do { - block_width = 0; - do { - block_width++; - } while (module_is_set(symbol, this_row, i + block_width) == module_is_set(symbol, this_row, i)); - if((addon_latch == 0) && (r == (symbol->rows - 1)) && (i > main_width)) { - addon_text_posn = (row_posn + 8.0) * scaler; - addon_latch = 1; - } - if(latch == 1) { - /* a bar */ - if(addon_latch == 0) { - fprintf(fsvg, " \n", (i + xoffset) * scaler, row_posn * scaler, block_width * scaler, row_height * scaler); - } else { - fprintf(fsvg, " \n", (i + xoffset) * scaler, (row_posn + 10.0) * scaler, block_width * scaler, (row_height - 5.0) * scaler); - } - latch = 0; - } else { - /* a space */ - latch = 1; - } - i += block_width; + do { + block_width = 0; + do { + block_width++; + } while (module_is_set(symbol, this_row, i + block_width) == module_is_set(symbol, this_row, i)); + if ((addon_latch == 0) && (r == (symbol->rows - 1)) && (i > main_width)) { + addon_text_posn = (row_posn + 8.0) * scaler; + addon_latch = 1; + } + if (latch == 1) { + /* a bar */ + if (addon_latch == 0) { + fprintf(fsvg, " \n", (i + xoffset) * scaler, row_posn * scaler, block_width * scaler, row_height * scaler); + } else { + fprintf(fsvg, " \n", (i + xoffset) * scaler, (row_posn + 10.0) * scaler, block_width * scaler, (row_height - 5.0) * scaler); + } + latch = 0; + } else { + /* a space */ + latch = 1; + } + i += block_width; - } while (i < symbol->width); - } - } - /* That's done the actual data area, everything else is human-friendly */ + } while (i < symbol->width); + } + } + /* That's done the actual data area, everything else is human-friendly */ - xoffset += comp_offset; - row_posn = (row_posn + large_bar_height) * scaler; + xoffset += comp_offset; + row_posn = (row_posn + large_bar_height) * scaler; - if(plot_text) { - if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC)) || - (symbol->symbology == BARCODE_ISBNX)) { - /* guard bar extensions and text formatting for EAN8 and EAN13 */ - switch(ustrlen(symbol->text)) { - case 8: /* EAN-8 */ - case 11: - case 14: - fprintf(fsvg, " \n", (0 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (2 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (32 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (34 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (64 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (66 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - for(i = 0; i < 4; i++) { - textpart[i] = symbol->text[i]; - } - textpart[4] = '\0'; - textpos = 17; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", textpart); - fprintf(fsvg, " \n"); - for(i = 0; i < 4; i++) { - textpart[i] = symbol->text[i + 4]; - } - textpart[4] = '\0'; - textpos = 50; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", textpart); - fprintf(fsvg, " \n"); - textdone = 1; - switch(strlen(addon)) { - case 2: - textpos = xoffset + 86; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", addon); - fprintf(fsvg, " \n"); - break; - case 5: - textpos = xoffset + 100; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", addon); - fprintf(fsvg, " \n"); - break; - } + if (plot_text) { + if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC)) || + (symbol->symbology == BARCODE_ISBNX)) { + /* guard bar extensions and text formatting for EAN8 and EAN13 */ + switch (ustrlen(symbol->text)) { + case 8: /* EAN-8 */ + case 11: + case 14: + fprintf(fsvg, " \n", (0 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (2 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (32 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (34 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (64 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (66 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + for (i = 0; i < 4; i++) { + textpart[i] = symbol->text[i]; + } + textpart[4] = '\0'; + textpos = 17; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", textpart); + fprintf(fsvg, " \n"); + for (i = 0; i < 4; i++) { + textpart[i] = symbol->text[i + 4]; + } + textpart[4] = '\0'; + textpos = 50; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", textpart); + fprintf(fsvg, " \n"); + textdone = 1; + switch (strlen(addon)) { + case 2: + textpos = xoffset + 86; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", addon); + fprintf(fsvg, " \n"); + break; + case 5: + textpos = xoffset + 100; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", addon); + fprintf(fsvg, " \n"); + break; + } - break; - case 13: /* EAN 13 */ - case 16: - case 19: - fprintf(fsvg, " \n", (0 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (2 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (46 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (48 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (92 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (94 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - textpart[0] = symbol->text[0]; - textpart[1] = '\0'; - textpos = -7; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", textpart); - fprintf(fsvg, " \n"); - for(i = 0; i < 6; i++) { - textpart[i] = symbol->text[i + 1]; - } - textpart[6] = '\0'; - textpos = 24; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", textpart); - fprintf(fsvg, " \n"); - for(i = 0; i < 6; i++) { - textpart[i] = symbol->text[i + 7]; - } - textpart[6] = '\0'; - textpos = 71; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", textpart); - fprintf(fsvg, " \n"); - textdone = 1; - switch(strlen(addon)) { - case 2: - textpos = xoffset + 114; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", addon); - fprintf(fsvg, " \n"); - break; - case 5: - textpos = xoffset + 128; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", addon); - fprintf(fsvg, " \n"); - break; - } - break; + break; + case 13: /* EAN 13 */ + case 16: + case 19: + fprintf(fsvg, " \n", (0 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (2 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (46 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (48 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (92 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (94 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + textpart[0] = symbol->text[0]; + textpart[1] = '\0'; + textpos = -7; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", textpart); + fprintf(fsvg, " \n"); + for (i = 0; i < 6; i++) { + textpart[i] = symbol->text[i + 1]; + } + textpart[6] = '\0'; + textpos = 24; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", textpart); + fprintf(fsvg, " \n"); + for (i = 0; i < 6; i++) { + textpart[i] = symbol->text[i + 7]; + } + textpart[6] = '\0'; + textpos = 71; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", textpart); + fprintf(fsvg, " \n"); + textdone = 1; + switch (strlen(addon)) { + case 2: + textpos = xoffset + 114; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", addon); + fprintf(fsvg, " \n"); + break; + case 5: + textpos = xoffset + 128; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", addon); + fprintf(fsvg, " \n"); + break; + } + break; - } - } + } + } - if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) { - /* guard bar extensions and text formatting for UPCA */ - latch = 1; + if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) { + /* guard bar extensions and text formatting for UPCA */ + latch = 1; - i = 0 + comp_offset; - do { - block_width = 0; - do { - block_width++; - } while (module_is_set(symbol, symbol->rows - 1, i + block_width) == module_is_set(symbol, symbol->rows - 1, i)); - if(latch == 1) { - /* a bar */ - fprintf(fsvg, " \n", (i + xoffset - comp_offset) * scaler, row_posn, block_width * scaler, 5.0 * scaler); - latch = 0; - } else { - /* a space */ - latch = 1; - } - i += block_width; - } while (i < 11 + comp_offset); - fprintf(fsvg, " \n", (46 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (48 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - latch = 1; - i = 85 + comp_offset; - do { - block_width = 0; - do { - block_width++; - } while (module_is_set(symbol, symbol->rows - 1, i + block_width) == module_is_set(symbol, symbol->rows - 1, i)); - if(latch == 1) { - /* a bar */ - fprintf(fsvg, " \n", (i + xoffset - comp_offset) * scaler, row_posn, block_width * scaler, 5.0 * scaler); - latch = 0; - } else { - /* a space */ - latch = 1; - } - i += block_width; - } while (i < 96 + comp_offset); - textpart[0] = symbol->text[0]; - textpart[1] = '\0'; - textpos = -5; - fprintf(fsvg, " \n", 8.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", textpart); - fprintf(fsvg, " \n"); - for(i = 0; i < 5; i++) { - textpart[i] = symbol->text[i + 1]; - } - textpart[5] = '\0'; - textpos = 27; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", textpart); - fprintf(fsvg, " \n"); - for(i = 0; i < 5; i++) { - textpart[i] = symbol->text[i + 6]; - } - textpart[6] = '\0'; - textpos = 68; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", textpart); - fprintf(fsvg, " \n"); - textpart[0] = symbol->text[11]; - textpart[1] = '\0'; - textpos = 100; - fprintf(fsvg, " \n", 8.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", textpart); - fprintf(fsvg, " \n"); - textdone = 1; - switch(strlen(addon)) { - case 2: - textpos = xoffset + 116; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", addon); - fprintf(fsvg, " \n"); - break; - case 5: - textpos = xoffset + 130; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", addon); - fprintf(fsvg, " \n"); - break; - } + i = 0 + comp_offset; + do { + block_width = 0; + do { + block_width++; + } while (module_is_set(symbol, symbol->rows - 1, i + block_width) == module_is_set(symbol, symbol->rows - 1, i)); + if (latch == 1) { + /* a bar */ + fprintf(fsvg, " \n", (i + xoffset - comp_offset) * scaler, row_posn, block_width * scaler, 5.0 * scaler); + latch = 0; + } else { + /* a space */ + latch = 1; + } + i += block_width; + } while (i < 11 + comp_offset); + fprintf(fsvg, " \n", (46 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (48 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + latch = 1; + i = 85 + comp_offset; + do { + block_width = 0; + do { + block_width++; + } while (module_is_set(symbol, symbol->rows - 1, i + block_width) == module_is_set(symbol, symbol->rows - 1, i)); + if (latch == 1) { + /* a bar */ + fprintf(fsvg, " \n", (i + xoffset - comp_offset) * scaler, row_posn, block_width * scaler, 5.0 * scaler); + latch = 0; + } else { + /* a space */ + latch = 1; + } + i += block_width; + } while (i < 96 + comp_offset); + textpart[0] = symbol->text[0]; + textpart[1] = '\0'; + textpos = -5; + fprintf(fsvg, " \n", 8.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", textpart); + fprintf(fsvg, " \n"); + for (i = 0; i < 5; i++) { + textpart[i] = symbol->text[i + 1]; + } + textpart[5] = '\0'; + textpos = 27; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", textpart); + fprintf(fsvg, " \n"); + for (i = 0; i < 5; i++) { + textpart[i] = symbol->text[i + 6]; + } + textpart[6] = '\0'; + textpos = 68; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", textpart); + fprintf(fsvg, " \n"); + textpart[0] = symbol->text[11]; + textpart[1] = '\0'; + textpos = 100; + fprintf(fsvg, " \n", 8.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", textpart); + fprintf(fsvg, " \n"); + textdone = 1; + switch (strlen(addon)) { + case 2: + textpos = xoffset + 116; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", addon); + fprintf(fsvg, " \n"); + break; + case 5: + textpos = xoffset + 130; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", addon); + fprintf(fsvg, " \n"); + break; + } - } + } - if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) { - /* guard bar extensions and text formatting for UPCE */ - fprintf(fsvg, " \n", (0 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (2 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (46 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (48 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - fprintf(fsvg, " \n", (50 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); - textpart[0] = symbol->text[0]; - textpart[1] = '\0'; - textpos = -5; - fprintf(fsvg, " \n", 8.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", textpart); - fprintf(fsvg, " \n"); - for(i = 0; i < 6; i++) { - textpart[i] = symbol->text[i + 1]; - } - textpart[6] = '\0'; - textpos = 24; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", textpart); - fprintf(fsvg, " \n"); - textpart[0] = symbol->text[7]; - textpart[1] = '\0'; - textpos = 55; - fprintf(fsvg, " \n", 8.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", textpart); - fprintf(fsvg, " \n"); - textdone = 1; - switch(strlen(addon)) { - case 2: - textpos = xoffset + 70; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", addon); - fprintf(fsvg, " \n"); - break; - case 5: - textpos = xoffset + 84; - fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", addon); - fprintf(fsvg, " \n"); - break; - } + if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) { + /* guard bar extensions and text formatting for UPCE */ + fprintf(fsvg, " \n", (0 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (2 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (46 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (48 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + fprintf(fsvg, " \n", (50 + xoffset) * scaler, row_posn, scaler, 5.0 * scaler); + textpart[0] = symbol->text[0]; + textpart[1] = '\0'; + textpos = -5; + fprintf(fsvg, " \n", 8.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", textpart); + fprintf(fsvg, " \n"); + for (i = 0; i < 6; i++) { + textpart[i] = symbol->text[i + 1]; + } + textpart[6] = '\0'; + textpos = 24; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", textpart); + fprintf(fsvg, " \n"); + textpart[0] = symbol->text[7]; + textpart[1] = '\0'; + textpos = 55; + fprintf(fsvg, " \n", 8.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", textpart); + fprintf(fsvg, " \n"); + textdone = 1; + switch (strlen(addon)) { + case 2: + textpos = xoffset + 70; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", addon); + fprintf(fsvg, " \n"); + break; + case 5: + textpos = xoffset + 84; + fprintf(fsvg, " \n", 11.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", addon); + fprintf(fsvg, " \n"); + break; + } - } - } /* if (plot_text) */ + } + } /* if (plot_text) */ - xoffset -= comp_offset; + xoffset -= comp_offset; - switch(symbol->symbology) { - case BARCODE_MAXICODE: - /* Do nothing! (It's already been done) */ - break; - default: - if((symbol->output_options & BARCODE_BIND) != 0) { - if((symbol->rows > 1) && (is_stackable(symbol->symbology) == 1)) { - /* row binding */ - for(r = 1; r < symbol->rows; r++) { - fprintf(fsvg, " \n", xoffset * scaler, ((r * row_height) + yoffset - 1) * scaler, symbol->width * scaler, 2.0 * scaler); - } - } - } - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { - fprintf(fsvg, " \n", 0.0, 0.0, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler); - fprintf(fsvg, " \n", 0.0, (symbol->height + symbol->border_width) * scaler, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler); - } - if((symbol->output_options & BARCODE_BOX) != 0) { - /* side bars */ - fprintf(fsvg, " \n", 0.0, 0.0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler); - fprintf(fsvg, " \n", (symbol->width + xoffset + xoffset - symbol->border_width) * scaler, 0.0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler); - } - break; - } + switch (symbol->symbology) { + case BARCODE_MAXICODE: + /* Do nothing! (It's already been done) */ + break; + default: + if ((symbol->output_options & BARCODE_BIND) != 0) { + if ((symbol->rows > 1) && (is_stackable(symbol->symbology) == 1)) { + /* row binding */ + for (r = 1; r < symbol->rows; r++) { + fprintf(fsvg, " \n", xoffset * scaler, ((r * row_height) + yoffset - 1) * scaler, symbol->width * scaler, 2.0 * scaler); + } + } + } + if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + fprintf(fsvg, " \n", 0.0, 0.0, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler); + fprintf(fsvg, " \n", 0.0, (symbol->height + symbol->border_width) * scaler, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler); + } + if ((symbol->output_options & BARCODE_BOX) != 0) { + /* side bars */ + fprintf(fsvg, " \n", 0.0, 0.0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler); + fprintf(fsvg, " \n", (symbol->width + xoffset + xoffset - symbol->border_width) * scaler, 0.0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler); + } + break; + } - /* Put the human readable text at the bottom */ - if(plot_text && (textdone == 0)) { - textpos = symbol->width / 2.0; - fprintf(fsvg, " \n", 8.0 * scaler, symbol->fgcolour); - fprintf(fsvg, " %s\n", symbol->text); - fprintf(fsvg, " \n"); - } - fprintf(fsvg, " \n"); - fprintf(fsvg, "\n"); + /* Put the human readable text at the bottom */ + if (plot_text && (textdone == 0)) { + textpos = symbol->width / 2.0; + fprintf(fsvg, " \n", 8.0 * scaler, symbol->fgcolour); + fprintf(fsvg, " %s\n", symbol->text); + fprintf(fsvg, " \n"); + } + fprintf(fsvg, " \n"); + fprintf(fsvg, "\n"); - if(symbol->output_options & BARCODE_STDOUT) { - fflush(fsvg); - } else { - fclose(fsvg); - } + if (symbol->output_options & BARCODE_STDOUT) { + fflush(fsvg); + } else { + fclose(fsvg); + } - if (locale) - setlocale(LC_ALL, locale); + if (locale) + setlocale(LC_ALL, locale); - return error_number; + return error_number; } - diff --git a/backend/telepen.c b/backend/telepen.c index 68ab4494..02b2b0ca 100644 --- a/backend/telepen.c +++ b/backend/telepen.c @@ -2,7 +2,7 @@ /* libzint - the open source barcode library - Copyright (C) 2008 Robin Stuart + Copyright (C) 2008-2016 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -28,7 +28,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ #define SODIUM "0123456789X" @@ -37,132 +37,131 @@ #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"}; - -int telepen(struct zint_symbol *symbol, unsigned char source[], int src_len) -{ - unsigned int i, count, check_digit; - int error_number; - char dest[512]; /*14 + 30 * 14 + 14 + 14 + 1 ~ 512 */ - - error_number = 0; +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" +}; - count = 0; +int telepen(struct zint_symbol *symbol, unsigned char source[], int src_len) { + unsigned int i, count, check_digit; + int error_number; + char dest[512]; /*14 + 30 * 14 + 14 + 14 + 1 ~ 512 */ - if(src_len > 30) { - strcpy(symbol->errtxt, "Input too long"); - return ZINT_ERROR_TOO_LONG; - } - /* Start character */ - strcpy(dest, TeleTable['_']); + error_number = 0; - for(i = 0; i < src_len; i++) { - if(source[i] > 126) { - /* Cannot encode extended ASCII */ - strcpy(symbol->errtxt, "Invalid characters in input data"); - return ZINT_ERROR_INVALID_DATA; - } - concat(dest, TeleTable[source[i]]); - count += source[i]; - } + count = 0; - check_digit = 127 - (count % 127); - if(check_digit == 127) { check_digit = 0; } - concat(dest, TeleTable[check_digit]); + if (src_len > 30) { + strcpy(symbol->errtxt, "Input too long"); + return ZINT_ERROR_TOO_LONG; + } + /* Start character */ + strcpy(dest, TeleTable['_']); - /* Stop character */ - concat(dest, TeleTable['z']); - - expand(symbol, dest); - for(i = 0; i < src_len; i++) { - if(source[i] == '\0') { - symbol->text[i] = ' '; - } else { - symbol->text[i] = source[i]; - } - } - symbol->text[src_len] = '\0'; - return error_number; + for (i = 0; i < src_len; i++) { + if (source[i] > 126) { + /* Cannot encode extended ASCII */ + strcpy(symbol->errtxt, "Invalid characters in input data"); + return ZINT_ERROR_INVALID_DATA; + } + concat(dest, TeleTable[source[i]]); + count += source[i]; + } + + check_digit = 127 - (count % 127); + if (check_digit == 127) { + check_digit = 0; + } + concat(dest, TeleTable[check_digit]); + + /* Stop character */ + concat(dest, TeleTable['z']); + + expand(symbol, dest); + for (i = 0; i < src_len; i++) { + if (source[i] == '\0') { + symbol->text[i] = ' '; + } else { + symbol->text[i] = source[i]; + } + } + symbol->text[src_len] = '\0'; + return error_number; } -int telepen_num(struct zint_symbol *symbol, unsigned char source[], int src_len) -{ - unsigned int i, count, check_digit, glyph; - int error_number, temp_length = src_len; - char dest[1024]; /* 14 + 60 * 14 + 14 + 14 + 1 ~ 1024 */ - unsigned char temp[64]; - - error_number = 0; - count = 0; +int telepen_num(struct zint_symbol *symbol, unsigned char source[], int src_len) { + unsigned int i, count, check_digit, glyph; + int error_number, temp_length = src_len; + char dest[1024]; /* 14 + 60 * 14 + 14 + 14 + 1 ~ 1024 */ + unsigned char temp[64]; - if(temp_length > 60) { - strcpy(symbol->errtxt, "Input too long"); - return ZINT_ERROR_TOO_LONG; - } - ustrcpy(temp, source); - to_upper(temp); - error_number = is_sane(NEON, temp, temp_length); - if(error_number == ZINT_ERROR_INVALID_DATA) { - strcpy(symbol->errtxt, "Invalid characters in data"); - return error_number; - } - - /* Add a leading zero if required */ - if (temp_length & 1) - { - memmove(temp + 1, temp, temp_length); - temp[0] = '0'; + error_number = 0; + count = 0; - temp[++temp_length] = '\0'; - } + if (temp_length > 60) { + strcpy(symbol->errtxt, "Input too long"); + return ZINT_ERROR_TOO_LONG; + } + ustrcpy(temp, source); + to_upper(temp); + error_number = is_sane(NEON, temp, temp_length); + if (error_number == ZINT_ERROR_INVALID_DATA) { + strcpy(symbol->errtxt, "Invalid characters in data"); + return error_number; + } - /* Start character */ - strcpy(dest, TeleTable['_']); + /* Add a leading zero if required */ + if (temp_length & 1) { + memmove(temp + 1, temp, temp_length); + temp[0] = '0'; - for (i = 0; i < temp_length; i += 2) - { - if(temp[i] == 'X') { - strcpy(symbol->errtxt, "Invalid position of X in Telepen data"); - return ZINT_ERROR_INVALID_DATA; - } - - if(temp[i + 1] == 'X') { - glyph = ctoi(temp[i]) + 17; - count += glyph; - } else { - glyph = (10 * ctoi(temp[i])) + ctoi(temp[i + 1]); - glyph += 27; - count += glyph; - } - concat(dest, TeleTable[glyph]); - } + temp[++temp_length] = '\0'; + } - check_digit = 127 - (count % 127); - if(check_digit == 127) { check_digit = 0; } - concat(dest, TeleTable[check_digit]); + /* Start character */ + strcpy(dest, TeleTable['_']); - /* Stop character */ - concat(dest, TeleTable['z']); - - expand(symbol, dest); - ustrcpy(symbol->text, temp); - return error_number; + for (i = 0; i < temp_length; i += 2) { + if (temp[i] == 'X') { + strcpy(symbol->errtxt, "Invalid position of X in Telepen data"); + return ZINT_ERROR_INVALID_DATA; + } + + if (temp[i + 1] == 'X') { + glyph = ctoi(temp[i]) + 17; + count += glyph; + } else { + glyph = (10 * ctoi(temp[i])) + ctoi(temp[i + 1]); + glyph += 27; + count += glyph; + } + concat(dest, TeleTable[glyph]); + } + + check_digit = 127 - (count % 127); + if (check_digit == 127) { + check_digit = 0; + } + concat(dest, TeleTable[check_digit]); + + /* Stop character */ + concat(dest, TeleTable['z']); + + expand(symbol, dest); + ustrcpy(symbol->text, temp); + return error_number; } - diff --git a/backend/upcean.c b/backend/upcean.c index c71f5c17..fd163d28 100644 --- a/backend/upcean.c +++ b/backend/upcean.c @@ -1,20 +1,20 @@ /* upcean.c - Handles UPC, EAN and ISBN libzint - the open source barcode library - Copyright (C) 2008 Robin Stuart + Copyright (C) 2008-2016 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + documentation and/or other materials provided with the distribution. 3. Neither the name of the project nor the names of its contributors may be used to endorse or promote products derived from this software - without specific prior written permission. + without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -25,9 +25,9 @@ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ #define SODIUM "0123456789+" #define EAN2 102 @@ -40,768 +40,795 @@ /* UPC and EAN tables checked against EN 797:1996 */ -static const char *UPCParity0[10] = {"BBBAAA", "BBABAA", "BBAABA", "BBAAAB", "BABBAA", "BAABBA", "BAAABB", - "BABABA", "BABAAB", "BAABAB"}; /* Number set for UPC-E symbol (EN Table 4) */ -static const char *UPCParity1[10] = {"AAABBB", "AABABB", "AABBAB", "AABBBA", "ABAABB", "ABBAAB", "ABBBAA", - "ABABAB", "ABABBA", "ABBABA"}; /* Not covered by BS EN 797:1995 */ -static const char *EAN2Parity[4] = {"AA", "AB", "BA", "BB"}; /* Number sets for 2-digit add-on (EN Table 6) */ -static const char *EAN5Parity[10] = {"BBAAA", "BABAA", "BAABA", "BAAAB", "ABBAA", "AABBA", "AAABB", "ABABA", - "ABAAB", "AABAB"}; /* Number set for 5-digit add-on (EN Table 7) */ -static const char *EAN13Parity[10] = {"AAAAA", "ABABB", "ABBAB", "ABBBA", "BAABB", "BBAAB", "BBBAA", "BABAB", - "BABBA", "BBABA"}; /* Left hand of the EAN-13 symbol (EN Table 3) */ -static const char *EANsetA[10] = {"3211", "2221", "2122", "1411", "1132", "1231", "1114", "1312", "1213", - "3112"}; /* Representation set A and C (EN Table 1) */ -static const char *EANsetB[10] = {"1123", "1222", "2212", "1141", "2311", "1321", "4111", "2131", "3121", - "2113"}; /* Representation set B (EN Table 1) */ +static const char *UPCParity0[10] = { + /* Number set for UPC-E symbol (EN Table 4) */ + "BBBAAA", "BBABAA", "BBAABA", "BBAAAB", "BABBAA", "BAABBA", "BAAABB", + "BABABA", "BABAAB", "BAABAB" +}; -char upc_check(char source[]) -{ /* Calculate the correct check digit for a UPC barcode */ - unsigned int i, count, check_digit; +static const char *UPCParity1[10] = { + /* Not covered by BS EN 797:1995 */ + "AAABBB", "AABABB", "AABBAB", "AABBBA", "ABAABB", "ABBAAB", "ABBBAA", + "ABABAB", "ABABBA", "ABBABA" +}; - count = 0; +static const char *EAN2Parity[4] = { + /* Number sets for 2-digit add-on (EN Table 6) */ + "AA", "AB", "BA", "BB" +}; - for (i = 0; i < strlen(source); i++) { - count += ctoi(source[i]); +static const char *EAN5Parity[10] = { + /* Number set for 5-digit add-on (EN Table 7) */ + "BBAAA", "BABAA", "BAABA", "BAAAB", "ABBAA", "AABBA", "AAABB", "ABABA", + "ABAAB", "AABAB" +}; - if (!(i & 1)) { - count += 2 * (ctoi(source[i])); - } - } +static const char *EAN13Parity[10] = { + /* Left hand of the EAN-13 symbol (EN Table 3) */ + "AAAAA", "ABABB", "ABBAB", "ABBBA", "BAABB", "BBAAB", "BBBAA", "BABAB", + "BABBA", "BBABA" +}; - check_digit = 10 - (count%10); - if (check_digit == 10) { check_digit = 0; } - return itoc(check_digit); +static const char *EANsetA[10] = { + /* Representation set A and C (EN Table 1) */ + "3211", "2221", "2122", "1411", "1132", "1231", "1114", "1312", "1213","3112" +}; + +static const char *EANsetB[10] = { + /* Representation set B (EN Table 1) */ + "1123", "1222", "2212", "1141", "2311", "1321", "4111", "2131", "3121", "2113" +}; + +/* Calculate the correct check digit for a UPC barcode */ +char upc_check(char source[]) { + unsigned int i, count, check_digit; + + count = 0; + + for (i = 0; i < strlen(source); i++) { + count += ctoi(source[i]); + + if (!(i & 1)) { + count += 2 * (ctoi(source[i])); + } + } + + check_digit = 10 - (count % 10); + if (check_digit == 10) { + check_digit = 0; + } + return itoc(check_digit); } -void upca_draw(char source[], char dest[]) -{ /* UPC A is usually used for 12 digit numbers, but this function takes a source of any length */ - unsigned int i, half_way; +/* UPC A is usually used for 12 digit numbers, but this function takes a source of any length */ +void upca_draw(char source[], char dest[]) { + unsigned int i, half_way; - half_way = strlen(source) / 2; + half_way = strlen(source) / 2; - /* start character */ - concat (dest, "111"); + /* start character */ + concat(dest, "111"); - for(i = 0; i <= strlen(source); i++) - { - if (i == half_way) - { - /* middle character - separates manufacturer no. from product no. */ - /* also inverts right hand characters */ - concat(dest, "11111"); - } + for (i = 0; i <= strlen(source); i++) { + if (i == half_way) { + /* middle character - separates manufacturer no. from product no. */ + /* also inverts right hand characters */ + concat(dest, "11111"); + } - lookup(NEON, EANsetA, source[i], dest); - } + lookup(NEON, EANsetA, source[i], dest); + } - /* stop character */ - concat (dest, "111"); + /* stop character */ + concat(dest, "111"); } -void upca(struct zint_symbol *symbol, unsigned char source[], char dest[]) -{ /* Make a UPC A barcode when we haven't been given the check digit */ - int length; - char gtin[15]; +/* Make a UPC A barcode when we haven't been given the check digit */ +void upca(struct zint_symbol *symbol, unsigned char source[], char dest[]) { + int length; + char gtin[15]; - strcpy(gtin, (char*)source); - length = strlen(gtin); - gtin[length] = upc_check(gtin); - gtin[length + 1] = '\0'; - upca_draw(gtin, dest); - ustrcpy(symbol->text, (unsigned char*)gtin); + strcpy(gtin, (char*) source); + length = strlen(gtin); + gtin[length] = upc_check(gtin); + gtin[length + 1] = '\0'; + upca_draw(gtin, dest); + ustrcpy(symbol->text, (unsigned char*) gtin); } -void upce(struct zint_symbol *symbol, unsigned char source[], char dest[]) -{ /* UPC E is a zero-compressed version of UPC A */ - unsigned int i, num_system; - char emode, equivalent[12], check_digit, parity[8], temp[8]; - char hrt[9]; +/* UPC E is a zero-compressed version of UPC A */ +void upce(struct zint_symbol *symbol, unsigned char source[], char dest[]) { + unsigned int i, num_system; + char emode, equivalent[12], check_digit, parity[8], temp[8]; + char hrt[9]; - /* Two number systems can be used - system 0 and system 1 */ - if(ustrlen(source) == 7) { - switch(source[0]) { - case '0': num_system = 0; break; - case '1': num_system = 1; break; - default: num_system = 0; source[0] = '0'; break; - } - strcpy(temp, (char*)source); - strcpy(hrt, (char*)source); - for(i = 1; i <= 7; i++) { - source[i - 1] = temp[i]; - } - } - else { - num_system = 0; - hrt[0] = '0'; - hrt[1] = '\0'; - concat(hrt, (char*)source); - } + /* Two number systems can be used - system 0 and system 1 */ + if (ustrlen(source) == 7) { + switch (source[0]) { + case '0': num_system = 0; + break; + case '1': num_system = 1; + break; + default: num_system = 0; + source[0] = '0'; + break; + } + strcpy(temp, (char*) source); + strcpy(hrt, (char*) source); + for (i = 1; i <= 7; i++) { + source[i - 1] = temp[i]; + } + } else { + num_system = 0; + hrt[0] = '0'; + hrt[1] = '\0'; + concat(hrt, (char*) source); + } - /* Expand the zero-compressed UPCE code to make a UPCA equivalent (EN Table 5) */ - emode = source[5]; - for(i = 0; i < 11; i++) { - equivalent[i] = '0'; - } - if(num_system == 1) { equivalent[0] = temp[0]; } - equivalent[1] = source[0]; - equivalent[2] = source[1]; - equivalent[11] = '\0'; + /* Expand the zero-compressed UPCE code to make a UPCA equivalent (EN Table 5) */ + emode = source[5]; + for (i = 0; i < 11; i++) { + equivalent[i] = '0'; + } + if (num_system == 1) { + equivalent[0] = temp[0]; + } + equivalent[1] = source[0]; + equivalent[2] = source[1]; + equivalent[11] = '\0'; - switch(emode) - { - case '0': - case '1': - case '2': - equivalent[3] = emode; - equivalent[8] = source[2]; - equivalent[9] = source[3]; - equivalent[10] = source[4]; - break; - case '3': - equivalent[3] = source[2]; - equivalent[9] = source[3]; - equivalent[10] = source[4]; - if(((source[2] == '0') || (source[2] == '1')) || (source[2] == '2')) { - /* Note 1 - "X3 shall not be equal to 0, 1 or 2" */ - strcpy(symbol->errtxt, "Invalid UPC-E data"); - } - break; - case '4': - equivalent[3] = source[2]; - equivalent[4] = source[3]; - equivalent[10] = source[4]; - if(source[3] == '0') { - /* Note 2 - "X4 shall not be equal to 0" */ - strcpy(symbol->errtxt, "Invalid UPC-E data"); - } - break; - case '5': - case '6': - case '7': - case '8': - case '9': - equivalent[3] = source[2]; - equivalent[4] = source[3]; - equivalent[5] = source[4]; - equivalent[10] = emode; - if(source[4] == '0') { - /* Note 3 - "X5 shall not be equal to 0" */ - strcpy(symbol->errtxt, "Invalid UPC-E data"); - } - break; - } + switch (emode) { + case '0': + case '1': + case '2': + equivalent[3] = emode; + equivalent[8] = source[2]; + equivalent[9] = source[3]; + equivalent[10] = source[4]; + break; + case '3': + equivalent[3] = source[2]; + equivalent[9] = source[3]; + equivalent[10] = source[4]; + if (((source[2] == '0') || (source[2] == '1')) || (source[2] == '2')) { + /* Note 1 - "X3 shall not be equal to 0, 1 or 2" */ + strcpy(symbol->errtxt, "Invalid UPC-E data"); + } + break; + case '4': + equivalent[3] = source[2]; + equivalent[4] = source[3]; + equivalent[10] = source[4]; + if (source[3] == '0') { + /* Note 2 - "X4 shall not be equal to 0" */ + strcpy(symbol->errtxt, "Invalid UPC-E data"); + } + break; + case '5': + case '6': + case '7': + case '8': + case '9': + equivalent[3] = source[2]; + equivalent[4] = source[3]; + equivalent[5] = source[4]; + equivalent[10] = emode; + if (source[4] == '0') { + /* Note 3 - "X5 shall not be equal to 0" */ + strcpy(symbol->errtxt, "Invalid UPC-E data"); + } + break; + } - /* Get the check digit from the expanded UPCA code */ + /* Get the check digit from the expanded UPCA code */ - check_digit = upc_check(equivalent); + check_digit = upc_check(equivalent); - /* Use the number system and check digit information to choose a parity scheme */ - if(num_system == 1) { - strcpy(parity, UPCParity1[ctoi(check_digit)]); - } else { - strcpy(parity, UPCParity0[ctoi(check_digit)]); - } + /* Use the number system and check digit information to choose a parity scheme */ + if (num_system == 1) { + strcpy(parity, UPCParity1[ctoi(check_digit)]); + } else { + strcpy(parity, UPCParity0[ctoi(check_digit)]); + } - /* Take all this information and make the barcode pattern */ + /* Take all this information and make the barcode pattern */ - /* start character */ - concat (dest, "111"); + /* start character */ + concat(dest, "111"); - for(i = 0; i <= ustrlen(source); i++) { - switch(parity[i]) { - case 'A': lookup(NEON, EANsetA, source[i], dest); break; - case 'B': lookup(NEON, EANsetB, source[i], dest); break; - } - } + for (i = 0; i <= ustrlen(source); i++) { + switch (parity[i]) { + case 'A': lookup(NEON, EANsetA, source[i], dest); + break; + case 'B': lookup(NEON, EANsetB, source[i], dest); + break; + } + } - /* stop character */ - concat (dest, "111111"); - - hrt[7] = check_digit; - hrt[8] = '\0'; - ustrcpy(symbol->text, (unsigned char*)hrt); + /* stop character */ + concat(dest, "111111"); + + hrt[7] = check_digit; + hrt[8] = '\0'; + ustrcpy(symbol->text, (unsigned char*) hrt); } +/* EAN-2 and EAN-5 add-on codes */ +void add_on(unsigned char source[], char dest[], int mode) { + char parity[6]; + unsigned int i, code_type; -void add_on(unsigned char source[], char dest[], int mode) -{ /* EAN-2 and EAN-5 add-on codes */ - char parity[6]; - unsigned int i, code_type; + /* If an add-on then append with space */ + if (mode != 0) { + concat(dest, "9"); + } - /* If an add-on then append with space */ - if (mode != 0) - { - concat(dest, "9"); - } + /* Start character */ + concat(dest, "112"); - /* Start character */ - concat (dest, "112"); + /* Determine EAN2 or EAN5 add-on */ + if (ustrlen(source) == 2) { + code_type = EAN2; + } else { + code_type = EAN5; + } - /* Determine EAN2 or EAN5 add-on */ - if(ustrlen(source) == 2) - { - code_type = EAN2; - } - else - { - code_type = EAN5; - } + /* Calculate parity for EAN2 */ + if (code_type == EAN2) { + int code_value, parity_bit; - /* Calculate parity for EAN2 */ - if(code_type == EAN2) - { - int code_value, parity_bit; + code_value = (10 * ctoi(source[0])) + ctoi(source[1]); + parity_bit = code_value % 4; + strcpy(parity, EAN2Parity[parity_bit]); + } - code_value = (10 * ctoi(source[0])) + ctoi(source[1]); - parity_bit = code_value%4; - strcpy(parity, EAN2Parity[parity_bit]); - } + if (code_type == EAN5) { + int values[6], parity_sum, parity_bit; - if(code_type == EAN5) - { - int values[6], parity_sum, parity_bit; + for (i = 0; i < 6; i++) { + values[i] = ctoi(source[i]); + } - for(i = 0; i < 6; i++) - { - values[i] = ctoi(source[i]); - } + parity_sum = (3 * (values[0] + values[2] + values[4])); + parity_sum += (9 * (values[1] + values[3])); - parity_sum = (3 * (values[0] + values[2] + values[4])); - parity_sum += (9 * (values[1] + values[3])); + parity_bit = parity_sum % 10; + strcpy(parity, EAN5Parity[parity_bit]); + } - parity_bit = parity_sum%10; - strcpy(parity, EAN5Parity[parity_bit]); - } + for (i = 0; i < ustrlen(source); i++) { + switch (parity[i]) { + case 'A': lookup(NEON, EANsetA, source[i], dest); + break; + case 'B': lookup(NEON, EANsetB, source[i], dest); + break; + } - for(i = 0; i < ustrlen(source); i++) - { - switch(parity[i]) { - case 'A': lookup(NEON, EANsetA, source[i], dest); break; - case 'B': lookup(NEON, EANsetB, source[i], dest); break; - } - - /* Glyph separator */ - if(i != (ustrlen(source) - 1)) - { - concat (dest, "11"); - } - } + /* Glyph separator */ + if (i != (ustrlen(source) - 1)) { + concat(dest, "11"); + } + } } - /* ************************ EAN-13 ****************** */ +/* Calculate the correct check digit for a EAN-13 barcode */ +char ean_check(char source[]) { + int i; + unsigned int h, count, check_digit; -char ean_check(char source[]) -{ /* Calculate the correct check digit for a EAN-13 barcode */ - int i; - unsigned int h, count, check_digit; + count = 0; - count = 0; + h = strlen(source); + for (i = h - 1; i >= 0; i--) { + count += ctoi(source[i]); - h = strlen(source); - for (i = h - 1; i >= 0; i--) { - count += ctoi(source[i]); - - if (i & 1) { - count += 2 * ctoi(source[i]); - } - } - check_digit = 10 - (count%10); - if (check_digit == 10) { check_digit = 0; } - return itoc(check_digit); + if (i & 1) { + count += 2 * ctoi(source[i]); + } + } + check_digit = 10 - (count % 10); + if (check_digit == 10) { + check_digit = 0; + } + return itoc(check_digit); } -void ean13(struct zint_symbol *symbol, unsigned char source[], char dest[]) -{ - unsigned int length, i, half_way; - char parity[6]; - char gtin[15]; +void ean13(struct zint_symbol *symbol, unsigned char source[], char dest[]) { + unsigned int length, i, half_way; + char parity[6]; + char gtin[15]; - strcpy(parity, ""); - strcpy(gtin, (char*)source); - - /* Add the appropriate check digit */ - length = strlen(gtin); - gtin[length] = ean_check(gtin); - gtin[length + 1] = '\0'; + strcpy(parity, ""); + strcpy(gtin, (char*) source); - /* Get parity for first half of the symbol */ - lookup(SODIUM, EAN13Parity, gtin[0], parity); + /* Add the appropriate check digit */ + length = strlen(gtin); + gtin[length] = ean_check(gtin); + gtin[length + 1] = '\0'; - /* Now get on with the cipher */ - half_way = 7; + /* Get parity for first half of the symbol */ + lookup(SODIUM, EAN13Parity, gtin[0], parity); - /* start character */ - concat (dest, "111"); - length = strlen(gtin); - for(i = 1; i <= length; i++) - { - if (i == half_way) - { - /* middle character - separates manufacturer no. from product no. */ - /* also inverses right hand characters */ - concat (dest, "11111"); - } + /* Now get on with the cipher */ + half_way = 7; - if(((i > 1) && (i < 7)) && (parity[i - 2] == 'B')) - { - lookup(NEON, EANsetB, gtin[i], dest); - } - else - { - lookup(NEON, EANsetA, gtin[i], dest); - } - } + /* start character */ + concat(dest, "111"); + length = strlen(gtin); + for (i = 1; i <= length; i++) { + if (i == half_way) { + /* middle character - separates manufacturer no. from product no. */ + /* also inverses right hand characters */ + concat(dest, "11111"); + } - /* stop character */ - concat (dest, "111"); - - ustrcpy(symbol->text, (unsigned char*)gtin); + if (((i > 1) && (i < 7)) && (parity[i - 2] == 'B')) { + lookup(NEON, EANsetB, gtin[i], dest); + } else { + lookup(NEON, EANsetA, gtin[i], dest); + } + } + + /* stop character */ + concat(dest, "111"); + + ustrcpy(symbol->text, (unsigned char*) gtin); } -void ean8(struct zint_symbol *symbol, unsigned char source[], char dest[]) -{ /* Make an EAN-8 barcode when we haven't been given the check digit */ - /* EAN-8 is basically the same as UPC-A but with fewer digits */ - int length; - char gtin[10]; +/* Make an EAN-8 barcode when we haven't been given the check digit */ +void ean8(struct zint_symbol *symbol, unsigned char source[], char dest[]) { + /* EAN-8 is basically the same as UPC-A but with fewer digits */ + int length; + char gtin[10]; - strcpy(gtin, (char*)source); - length = strlen(gtin); - gtin[length] = upc_check(gtin); - gtin[length + 1] = '\0'; - upca_draw(gtin, dest); - ustrcpy(symbol->text, (unsigned char*)gtin); + strcpy(gtin, (char*) source); + length = strlen(gtin); + gtin[length] = upc_check(gtin); + gtin[length + 1] = '\0'; + upca_draw(gtin, dest); + ustrcpy(symbol->text, (unsigned char*) gtin); } -char isbn13_check(unsigned char source[]) /* For ISBN(13) only */ -{ - unsigned int i, weight, sum, check, h; +/* For ISBN(13) only */ +char isbn13_check(unsigned char source[]) { + unsigned int i, weight, sum, check, h; - sum = 0; - weight = 1; - h = ustrlen(source) - 1; + sum = 0; + weight = 1; + h = ustrlen(source) - 1; - for(i = 0; i < h; i++) - { - sum += ctoi(source[i]) * weight; - if(weight == 1) weight = 3; else weight = 1; - } + for (i = 0; i < h; i++) { + sum += ctoi(source[i]) * weight; + if (weight == 1) weight = 3; + else weight = 1; + } - check = sum % 10; - check = 10 - check; - if(check == 10) check = 0; - return itoc(check); + check = sum % 10; + check = 10 - check; + if (check == 10) check = 0; + return itoc(check); } -char isbn_check(unsigned char source[]) /* For ISBN(10) and SBN only */ -{ - unsigned int i, weight, sum, check, h; - char check_char; +/* For ISBN(10) and SBN only */ +char isbn_check(unsigned char source[]) { + unsigned int i, weight, sum, check, h; + char check_char; - sum = 0; - weight = 1; - h = ustrlen(source) - 1; + sum = 0; + weight = 1; + h = ustrlen(source) - 1; - for(i = 0; i < h; i++) - { - sum += ctoi(source[i]) * weight; - weight++; - } + for (i = 0; i < h; i++) { + sum += ctoi(source[i]) * weight; + weight++; + } - check = sum % 11; - check_char = itoc(check); - if(check == 10) { check_char = 'X'; } - return check_char; + check = sum % 11; + check_char = itoc(check); + if (check == 10) { + check_char = 'X'; + } + return check_char; } -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, error_number; - char check_digit; - - to_upper(source); - error_number = is_sane("0123456789X", source, src_len); - if(error_number == ZINT_ERROR_INVALID_DATA) { - strcpy(symbol->errtxt, "Invalid characters in input"); - return error_number; - } +/* 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[]) { + int i, error_number; + char check_digit; - /* Input must be 9, 10 or 13 characters */ - if(((src_len < 9) || (src_len > 13)) || ((src_len > 10) && (src_len < 13))) - { - strcpy(symbol->errtxt, "Input wrong length"); - return ZINT_ERROR_TOO_LONG; - } + to_upper(source); + error_number = is_sane("0123456789X", source, src_len); + if (error_number == ZINT_ERROR_INVALID_DATA) { + strcpy(symbol->errtxt, "Invalid characters in input"); + return error_number; + } - if(src_len == 13) /* Using 13 character ISBN */ - { - if(!(((source[0] == '9') && (source[1] == '7')) && - ((source[2] == '8') || (source[2] == '9')))) - { - strcpy(symbol->errtxt, "Invalid ISBN"); - return ZINT_ERROR_INVALID_DATA; - } + /* Input must be 9, 10 or 13 characters */ + if (((src_len < 9) || (src_len > 13)) || ((src_len > 10) && (src_len < 13))) { + strcpy(symbol->errtxt, "Input wrong length"); + return ZINT_ERROR_TOO_LONG; + } - check_digit = isbn13_check(source); - if (source[src_len - 1] != check_digit) - { - strcpy(symbol->errtxt, "Incorrect ISBN check"); - return ZINT_ERROR_INVALID_CHECK; - } - source[12] = '\0'; + if (src_len == 13) /* Using 13 character ISBN */ { + if (!(((source[0] == '9') && (source[1] == '7')) && + ((source[2] == '8') || (source[2] == '9')))) { + strcpy(symbol->errtxt, "Invalid ISBN"); + return ZINT_ERROR_INVALID_DATA; + } - ean13(symbol, source, dest); - } + check_digit = isbn13_check(source); + if (source[src_len - 1] != check_digit) { + strcpy(symbol->errtxt, "Incorrect ISBN check"); + return ZINT_ERROR_INVALID_CHECK; + } + source[12] = '\0'; - if(src_len == 10) /* Using 10 digit ISBN */ - { - check_digit = isbn_check(source); - if(check_digit != source[src_len - 1]) - { - strcpy(symbol->errtxt, "Incorrect ISBN check"); - return ZINT_ERROR_INVALID_CHECK; - } - for(i = 13; i > 0; i--) - { - source[i] = source[i - 3]; - } - source[0] = '9'; - source[1] = '7'; - source[2] = '8'; - source[12] = '\0'; + ean13(symbol, source, dest); + } - ean13(symbol, source, dest); - } + if (src_len == 10) /* Using 10 digit ISBN */ { + check_digit = isbn_check(source); + if (check_digit != source[src_len - 1]) { + strcpy(symbol->errtxt, "Incorrect ISBN check"); + return ZINT_ERROR_INVALID_CHECK; + } + for (i = 13; i > 0; i--) { + source[i] = source[i - 3]; + } + source[0] = '9'; + source[1] = '7'; + source[2] = '8'; + source[12] = '\0'; - if(src_len == 9) /* Using 9 digit SBN */ - { - /* Add leading zero */ - for(i = 10; i > 0; i--) - { - source[i] = source[i - 1]; - } - source[0] = '0'; + ean13(symbol, source, dest); + } - /* Verify check digit */ - check_digit = isbn_check(source); - if(check_digit != source[ustrlen(source) - 1]) - { - strcpy(symbol->errtxt, "Incorrect SBN check"); - return ZINT_ERROR_INVALID_CHECK; - } + if (src_len == 9) /* Using 9 digit SBN */ { + /* Add leading zero */ + for (i = 10; i > 0; i--) { + source[i] = source[i - 1]; + } + source[0] = '0'; - /* Convert to EAN-13 number */ - for(i = 13; i > 0; i--) - { - source[i] = source[i - 3]; - } - source[0] = '9'; - source[1] = '7'; - source[2] = '8'; - source[12] = '\0'; + /* Verify check digit */ + check_digit = isbn_check(source); + if (check_digit != source[ustrlen(source) - 1]) { + strcpy(symbol->errtxt, "Incorrect SBN check"); + return ZINT_ERROR_INVALID_CHECK; + } - ean13(symbol, source, dest); - } - - return 0; + /* Convert to EAN-13 number */ + for (i = 13; i > 0; i--) { + source[i] = source[i - 3]; + } + source[0] = '9'; + source[1] = '7'; + source[2] = '8'; + source[12] = '\0'; + + ean13(symbol, source, dest); + } + + return 0; } +/* Add leading zeroes to EAN and UPC strings */ void ean_leading_zeroes(struct zint_symbol *symbol, unsigned char source[], unsigned char local_source[]) { - /* 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, h; - - h = ustrlen(source); - for(i = 0; i < h; i++) { - if(source[i] == '+') { - with_addon = 1; - } else { - if(with_addon == 0) { - first_len++; - } else { - second_len++; - } - } - } - - ustrcpy(first_part, (unsigned char *)""); - ustrcpy(second_part, (unsigned char *)""); - ustrcpy(zfirst_part, (unsigned char *)""); - ustrcpy(zsecond_part, (unsigned char *)""); - - /* 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(second_len <= 5) { zsecond_len = 5; } - if(second_len <= 2) { zsecond_len = 2; } - if(second_len == 0) { zsecond_len = 0; } - switch(symbol->symbology) { - case BARCODE_EANX: - case BARCODE_EANX_CC: - if(first_len <= 12) { zfirst_len = 12; } - if(first_len <= 7) { zfirst_len = 7; } - if(second_len == 0) { - if(first_len <= 5) { zfirst_len = 5; } - if(first_len <= 2) { zfirst_len = 2; } - } - break; - case BARCODE_UPCA: - case BARCODE_UPCA_CC: - zfirst_len = 11; - break; - case BARCODE_UPCE: - case BARCODE_UPCE_CC: - if(first_len == 7) { zfirst_len = 7; } - if(first_len <= 6) { zfirst_len = 6; } - break; - case BARCODE_ISBNX: - if(first_len <= 9) { zfirst_len = 9; } - break; - } + 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, h; - - /* Add leading zeroes */ - for(i = 0; i < (zfirst_len - first_len); i++) { - uconcat(zfirst_part, (unsigned char *)"0"); - } - uconcat(zfirst_part, first_part); - for(i = 0; i < (zsecond_len - second_len); i++) { - uconcat(zsecond_part, (unsigned char *)"0"); - } - uconcat(zsecond_part, second_part); - - /* Copy adjusted data back to local_source */ - uconcat(local_source, zfirst_part); - if(zsecond_len != 0) { - uconcat(local_source, (unsigned char *)"+"); - uconcat(local_source, zsecond_part); - } + h = ustrlen(source); + for (i = 0; i < h; i++) { + if (source[i] == '+') { + with_addon = 1; + } else { + if (with_addon == 0) { + first_len++; + } else { + second_len++; + } + } + } + + ustrcpy(first_part, (unsigned char *) ""); + ustrcpy(second_part, (unsigned char *) ""); + ustrcpy(zfirst_part, (unsigned char *) ""); + ustrcpy(zsecond_part, (unsigned char *) ""); + + /* 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 (second_len <= 5) { + zsecond_len = 5; + } + if (second_len <= 2) { + zsecond_len = 2; + } + if (second_len == 0) { + zsecond_len = 0; + } + switch (symbol->symbology) { + case BARCODE_EANX: + case BARCODE_EANX_CC: + if (first_len <= 12) { + zfirst_len = 12; + } + if (first_len <= 7) { + zfirst_len = 7; + } + if (second_len == 0) { + if (first_len <= 5) { + zfirst_len = 5; + } + if (first_len <= 2) { + zfirst_len = 2; + } + } + break; + case BARCODE_UPCA: + case BARCODE_UPCA_CC: + zfirst_len = 11; + break; + case BARCODE_UPCE: + case BARCODE_UPCE_CC: + if (first_len == 7) { + zfirst_len = 7; + } + if (first_len <= 6) { + zfirst_len = 6; + } + break; + case BARCODE_ISBNX: + if (first_len <= 9) { + zfirst_len = 9; + } + break; + } + + + /* Add leading zeroes */ + for (i = 0; i < (zfirst_len - first_len); i++) { + uconcat(zfirst_part, (unsigned char *) "0"); + } + uconcat(zfirst_part, first_part); + for (i = 0; i < (zsecond_len - second_len); i++) { + uconcat(zsecond_part, (unsigned char *) "0"); + } + uconcat(zsecond_part, second_part); + + /* Copy adjusted data back to local_source */ + uconcat(local_source, zfirst_part); + if (zsecond_len != 0) { + uconcat(local_source, (unsigned char *) "+"); + uconcat(local_source, zsecond_part); + } } -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] = { 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; - - - with_addon = FALSE; - latch = FALSE; - writer = 0; - - if(src_len > 19) { - strcpy(symbol->errtxt, "Input too long"); - return ZINT_ERROR_TOO_LONG; - } - if(symbol->symbology != BARCODE_ISBNX) { - /* ISBN has it's own checking routine */ - error_number = is_sane("0123456789+", source, src_len); - if(error_number == ZINT_ERROR_INVALID_DATA) { - strcpy(symbol->errtxt, "Invalid characters in data"); - return error_number; - } - } else { - error_number = is_sane("0123456789Xx", source, src_len); - if(error_number == ZINT_ERROR_INVALID_DATA) { - strcpy(symbol->errtxt, "Invalid characters in input"); - return error_number; - } - } +/* splits string to parts before and after '+' parts */ +int eanx(struct zint_symbol *symbol, unsigned char source[], int src_len) { + 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; - /* Add leading zeroes */ - ustrcpy(local_source, (unsigned char *)""); - if(symbol->symbology == BARCODE_ISBNX) { - to_upper(local_source); - } - - ean_leading_zeroes(symbol, source, local_source); - - for(reader = 0; reader <= ustrlen(local_source); reader++) - { - if(source[reader] == '+') { with_addon = TRUE; } - } + with_addon = FALSE; + latch = FALSE; + writer = 0; - reader = 0; - if(with_addon) { - do { - if(local_source[reader] == '+') { - first_part[writer] = '\0'; - latch = TRUE; - reader++; - writer = 0; - } + if (src_len > 19) { + strcpy(symbol->errtxt, "Input too long"); + return ZINT_ERROR_TOO_LONG; + } + if (symbol->symbology != BARCODE_ISBNX) { + /* ISBN has it's own checking routine */ + error_number = is_sane("0123456789+", source, src_len); + if (error_number == ZINT_ERROR_INVALID_DATA) { + strcpy(symbol->errtxt, "Invalid characters in data"); + return error_number; + } + } else { + error_number = is_sane("0123456789Xx", source, src_len); + if (error_number == ZINT_ERROR_INVALID_DATA) { + strcpy(symbol->errtxt, "Invalid characters in input"); + return error_number; + } + } - if(latch) { - second_part[writer] = local_source[reader]; - reader++; - writer++; - } else { - first_part[writer] = local_source[reader]; - reader++; - writer++; - } - } while (reader <= ustrlen(local_source)); - } else { - strcpy((char*)first_part, (char*)local_source); - } + /* Add leading zeroes */ + ustrcpy(local_source, (unsigned char *) ""); + if (symbol->symbology == BARCODE_ISBNX) { + to_upper(local_source); + } + + ean_leading_zeroes(symbol, source, local_source); + + for (reader = 0; reader <= ustrlen(local_source); reader++) { + if (source[reader] == '+') { + with_addon = TRUE; + } + } + + reader = 0; + if (with_addon) { + do { + if (local_source[reader] == '+') { + first_part[writer] = '\0'; + latch = TRUE; + reader++; + writer = 0; + } + + if (latch) { + second_part[writer] = local_source[reader]; + reader++; + writer++; + } else { + first_part[writer] = local_source[reader]; + reader++; + writer++; + } + } while (reader <= ustrlen(local_source)); + } else { + strcpy((char*) first_part, (char*) local_source); + } + + switch (symbol->symbology) { + case BARCODE_EANX: + switch (ustrlen(first_part)) { + case 2: add_on(first_part, (char*) dest, 0); + ustrcpy(symbol->text, first_part); + break; + case 5: add_on(first_part, (char*) dest, 0); + ustrcpy(symbol->text, first_part); + break; + case 7: ean8(symbol, first_part, (char*) dest); + break; + case 12: ean13(symbol, first_part, (char*) dest); + break; + default: strcpy(symbol->errtxt, "Invalid length input"); + return ZINT_ERROR_TOO_LONG; + } + break; + case BARCODE_EANX_CC: + switch (ustrlen(first_part)) { /* Adds vertical separator bars according to ISO/IEC 24723 section 11.4 */ + case 7: set_module(symbol, symbol->rows, 1); + set_module(symbol, symbol->rows, 67); + set_module(symbol, symbol->rows + 1, 0); + set_module(symbol, symbol->rows + 1, 68); + set_module(symbol, symbol->rows + 2, 1); + set_module(symbol, symbol->rows + 1, 67); + symbol->row_height[symbol->rows] = 2; + symbol->row_height[symbol->rows + 1] = 2; + symbol->row_height[symbol->rows + 2] = 2; + symbol->rows += 3; + ean8(symbol, first_part, (char*) dest); + break; + case 12:set_module(symbol, symbol->rows, 1); + set_module(symbol, symbol->rows, 95); + set_module(symbol, symbol->rows + 1, 0); + set_module(symbol, symbol->rows + 1, 96); + set_module(symbol, symbol->rows + 2, 1); + set_module(symbol, symbol->rows + 2, 95); + symbol->row_height[symbol->rows] = 2; + symbol->row_height[symbol->rows + 1] = 2; + symbol->row_height[symbol->rows + 2] = 2; + symbol->rows += 3; + ean13(symbol, first_part, (char*) dest); + break; + default: strcpy(symbol->errtxt, "Invalid length EAN input"); + return ZINT_ERROR_TOO_LONG; + } + break; + case BARCODE_UPCA: + if (ustrlen(first_part) == 11) { + upca(symbol, first_part, (char*) dest); + } else { + strcpy(symbol->errtxt, "Input wrong length"); + return ZINT_ERROR_TOO_LONG; + } + break; + case BARCODE_UPCA_CC: + if (ustrlen(first_part) == 11) { + set_module(symbol, symbol->rows, 1); + set_module(symbol, symbol->rows, 95); + set_module(symbol, symbol->rows + 1, 0); + set_module(symbol, symbol->rows + 1, 96); + set_module(symbol, symbol->rows + 2, 1); + set_module(symbol, symbol->rows + 2, 95); + symbol->row_height[symbol->rows] = 2; + symbol->row_height[symbol->rows + 1] = 2; + symbol->row_height[symbol->rows + 2] = 2; + symbol->rows += 3; + upca(symbol, first_part, (char*) dest); + } else { + strcpy(symbol->errtxt, "UPCA input wrong length"); + return ZINT_ERROR_TOO_LONG; + } + break; + case BARCODE_UPCE: + if ((ustrlen(first_part) >= 6) && (ustrlen(first_part) <= 7)) { + upce(symbol, first_part, (char*) dest); + } else { + strcpy(symbol->errtxt, "Input wrong length"); + return ZINT_ERROR_TOO_LONG; + } + break; + case BARCODE_UPCE_CC: + if ((ustrlen(first_part) >= 6) && (ustrlen(first_part) <= 7)) { + set_module(symbol, symbol->rows, 1); + set_module(symbol, symbol->rows, 51); + set_module(symbol, symbol->rows + 1, 0); + set_module(symbol, symbol->rows + 1, 52); + set_module(symbol, symbol->rows + 2, 1); + set_module(symbol, symbol->rows + 2, 51); + symbol->row_height[symbol->rows] = 2; + symbol->row_height[symbol->rows + 1] = 2; + symbol->row_height[symbol->rows + 2] = 2; + symbol->rows += 3; + upce(symbol, first_part, (char*) dest); + } else { + strcpy(symbol->errtxt, "UPCE input wrong length"); + return ZINT_ERROR_TOO_LONG; + } + break; + case BARCODE_ISBNX: + error_number = isbn(symbol, first_part, ustrlen(first_part), (char*) dest); + if (error_number > 4) { + return error_number; + } + break; + } + switch (ustrlen(second_part)) { + case 0: break; + case 2: + add_on(second_part, (char*) dest, 1); + uconcat(symbol->text, (unsigned char*) "+"); + uconcat(symbol->text, second_part); + break; + case 5: + add_on(second_part, (char*) dest, 1); + uconcat(symbol->text, (unsigned char*) "+"); + uconcat(symbol->text, second_part); + break; + default: + strcpy(symbol->errtxt, "Invalid length input"); + return ZINT_ERROR_TOO_LONG; + } + + expand(symbol, (char*) dest); + + switch (symbol->symbology) { + case BARCODE_EANX_CC: + case BARCODE_UPCA_CC: + case BARCODE_UPCE_CC: + /* shift the symbol to the right one space to allow for separator bars */ + for (i = (symbol->width + 1); i >= 1; i--) { + if (module_is_set(symbol, symbol->rows - 1, i - 1)) { + set_module(symbol, symbol->rows - 1, i); + } else { + unset_module(symbol, symbol->rows - 1, i); + } + } + unset_module(symbol, symbol->rows - 1, 0); + symbol->width += 2; + break; + } - switch(symbol->symbology) - { - case BARCODE_EANX: - switch(ustrlen(first_part)) - { - case 2: add_on(first_part, (char*)dest, 0); ustrcpy(symbol->text, first_part); break; - case 5: add_on(first_part, (char*)dest, 0); ustrcpy(symbol->text, first_part); break; - case 7: ean8(symbol, first_part, (char*)dest); break; - case 12: ean13(symbol, first_part, (char*)dest); break; - default: strcpy(symbol->errtxt, "Invalid length input"); return ZINT_ERROR_TOO_LONG; - } - break; - case BARCODE_EANX_CC: - switch(ustrlen(first_part)) - { /* Adds vertical separator bars according to ISO/IEC 24723 section 11.4 */ - case 7: set_module(symbol, symbol->rows, 1); - set_module(symbol, symbol->rows, 67); - set_module(symbol, symbol->rows + 1, 0); - set_module(symbol, symbol->rows + 1, 68); - set_module(symbol, symbol->rows + 2, 1); - set_module(symbol, symbol->rows + 1, 67); - symbol->row_height[symbol->rows] = 2; - symbol->row_height[symbol->rows + 1] = 2; - symbol->row_height[symbol->rows + 2] = 2; - symbol->rows += 3; - ean8(symbol, first_part, (char*)dest); break; - case 12:set_module(symbol, symbol->rows, 1); - set_module(symbol, symbol->rows, 95); - set_module(symbol, symbol->rows + 1, 0); - set_module(symbol, symbol->rows + 1, 96); - set_module(symbol, symbol->rows + 2, 1); - set_module(symbol, symbol->rows + 2, 95); - symbol->row_height[symbol->rows] = 2; - symbol->row_height[symbol->rows + 1] = 2; - symbol->row_height[symbol->rows + 2] = 2; - symbol->rows += 3; - ean13(symbol, first_part, (char*)dest); break; - default: strcpy(symbol->errtxt, "Invalid length EAN input"); return ZINT_ERROR_TOO_LONG; - } - break; - case BARCODE_UPCA: - if(ustrlen(first_part) == 11) { - upca(symbol, first_part, (char*)dest); - } else { - strcpy(symbol->errtxt, "Input wrong length"); - return ZINT_ERROR_TOO_LONG; - } - break; - case BARCODE_UPCA_CC: - if(ustrlen(first_part) == 11) { - set_module(symbol, symbol->rows, 1); - set_module(symbol, symbol->rows, 95); - set_module(symbol, symbol->rows + 1, 0); - set_module(symbol, symbol->rows + 1, 96); - set_module(symbol, symbol->rows + 2, 1); - set_module(symbol, symbol->rows + 2, 95); - symbol->row_height[symbol->rows] = 2; - symbol->row_height[symbol->rows + 1] = 2; - symbol->row_height[symbol->rows + 2] = 2; - symbol->rows += 3; - upca(symbol, first_part, (char*)dest); - } else { - strcpy(symbol->errtxt, "UPCA input wrong length"); - return ZINT_ERROR_TOO_LONG; - } - break; - case BARCODE_UPCE: - if((ustrlen(first_part) >= 6) && (ustrlen(first_part) <= 7)) { - upce(symbol, first_part, (char*)dest); - } else { - strcpy(symbol->errtxt, "Input wrong length"); - return ZINT_ERROR_TOO_LONG; - } - break; - case BARCODE_UPCE_CC: - if((ustrlen(first_part) >= 6) && (ustrlen(first_part) <= 7)) { - set_module(symbol, symbol->rows, 1); - set_module(symbol, symbol->rows, 51); - set_module(symbol, symbol->rows + 1, 0); - set_module(symbol, symbol->rows + 1, 52); - set_module(symbol, symbol->rows + 2, 1); - set_module(symbol, symbol->rows + 2, 51); - symbol->row_height[symbol->rows] = 2; - symbol->row_height[symbol->rows + 1] = 2; - symbol->row_height[symbol->rows + 2] = 2; - symbol->rows += 3; - upce(symbol, first_part, (char*)dest); - } else { - strcpy(symbol->errtxt, "UPCE input wrong length"); - return ZINT_ERROR_TOO_LONG; - } - break; - case BARCODE_ISBNX: - error_number = isbn(symbol, first_part, ustrlen(first_part), (char*)dest); - if(error_number > 4) { - return error_number; - } - break; - } - switch(ustrlen(second_part)) - { - case 0: break; - case 2: - add_on(second_part, (char*)dest, 1); - uconcat(symbol->text, (unsigned char*)"+"); - uconcat(symbol->text, second_part); - break; - case 5: - add_on(second_part, (char*)dest, 1); - uconcat(symbol->text, (unsigned char*)"+"); - uconcat(symbol->text, second_part); - break; - default: - strcpy(symbol->errtxt, "Invalid length input"); - return ZINT_ERROR_TOO_LONG; - } - - expand(symbol, (char*)dest); - - switch(symbol->symbology) { - case BARCODE_EANX_CC: - case BARCODE_UPCA_CC: - case BARCODE_UPCE_CC: - /* shift the symbol to the right one space to allow for separator bars */ - for(i = (symbol->width + 1); i >= 1; i--) { - if(module_is_set(symbol, symbol->rows - 1, i - 1)) { - set_module(symbol, symbol->rows - 1, i); - } else { - unset_module(symbol, symbol->rows - 1, i); - } - } - unset_module(symbol, symbol->rows - 1, 0); - symbol->width += 2; - break; - } - - - if((symbol->errtxt[0] == 'w') && (error_number == 0)) { - error_number = 1; /* flag UPC-E warnings */ - } - return error_number; + if ((symbol->errtxt[0] == 'w') && (error_number == 0)) { + error_number = 1; /* flag UPC-E warnings */ + } + return error_number; } - - - - diff --git a/backend/zint.h b/backend/zint.h index 6aec3659..7ea19673 100644 --- a/backend/zint.h +++ b/backend/zint.h @@ -1,7 +1,7 @@ /* zint.h - definitions for libzint libzint - the open source barcode library - Copyright (C) 2009 Robin Stuart + Copyright (C) 2009-2016 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -27,7 +27,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ #ifndef ZINT_H #define ZINT_H @@ -36,67 +36,67 @@ extern "C" { #endif /* __cplusplus */ -struct zint_render_line { - float x, y, length, width; - struct zint_render_line *next; /* Pointer to next line */ -}; + struct zint_render_line { + float x, y, length, width; + struct zint_render_line *next; /* Pointer to next line */ + }; -struct zint_render_string { - float x, y, fsize; - float width; /* Suggested string width, may be 0 if none recommended */ - int length; - unsigned char *text; - struct zint_render_string *next; /* Pointer to next character */ -}; + struct zint_render_string { + float x, y, fsize; + float width; /* Suggested string width, may be 0 if none recommended */ + int length; + unsigned char *text; + struct zint_render_string *next; /* Pointer to next character */ + }; -struct zint_render_ring { - float x, y, radius, line_width; - struct zint_render_ring *next; /* Pointer to next ring */ -}; + struct zint_render_ring { + float x, y, radius, line_width; + struct zint_render_ring *next; /* Pointer to next ring */ + }; -struct zint_render_hexagon { - float x, y; - struct zint_render_hexagon *next; /* Pointer to next hexagon */ -}; + struct zint_render_hexagon { + float x, y; + struct zint_render_hexagon *next; /* Pointer to next hexagon */ + }; -struct zint_render { - float width, height; - struct zint_render_line *lines; /* Pointer to first line */ - struct zint_render_string *strings; /* Pointer to first string */ - struct zint_render_ring *rings; /* Pointer to first ring */ - struct zint_render_hexagon *hexagons; /* Pointer to first hexagon */ -}; + struct zint_render { + float width, height; + struct zint_render_line *lines; /* Pointer to first line */ + struct zint_render_string *strings; /* Pointer to first string */ + struct zint_render_ring *rings; /* Pointer to first ring */ + struct zint_render_hexagon *hexagons; /* Pointer to first hexagon */ + }; -struct zint_symbol { - int symbology; - int height; - int whitespace_width; - int border_width; - int output_options; - char fgcolour[10]; - char bgcolour[10]; - char outfile[256]; - float scale; - int option_1; - int option_2; - int option_3; - int show_hrt; - int input_mode; - unsigned char text[128]; - int rows; - int width; - char primary[128]; - unsigned char encoded_data[178][143]; - int row_height[178]; /* Largest symbol is 177x177 QR Code */ - char errtxt[100]; - char *bitmap; - int bitmap_width; - int bitmap_height; - struct zint_render *rendered; -}; + struct zint_symbol { + int symbology; + int height; + int whitespace_width; + int border_width; + int output_options; + char fgcolour[10]; + char bgcolour[10]; + char outfile[256]; + float scale; + int option_1; + int option_2; + int option_3; + int show_hrt; + int input_mode; + unsigned char text[128]; + int rows; + int width; + char primary[128]; + unsigned char encoded_data[178][143]; + int row_height[178]; /* Largest symbol is 177x177 QR Code */ + char errtxt[100]; + char *bitmap; + int bitmap_width; + int bitmap_height; + struct zint_render *rendered; + }; -/* Tbarcode 7 codes */ + /* Tbarcode 7 codes */ #define BARCODE_CODE11 1 #define BARCODE_C25MATRIX 2 #define BARCODE_C25INTER 3 @@ -153,7 +153,7 @@ struct zint_symbol { #define BARCODE_ONECODE 85 #define BARCODE_PLESSEY 86 -/* Tbarcode 8 codes */ + /* Tbarcode 8 codes */ #define BARCODE_TELEPEN_NUM 87 #define BARCODE_ITF14 89 #define BARCODE_KIX 90 @@ -161,7 +161,7 @@ struct zint_symbol { #define BARCODE_DAFT 93 #define BARCODE_MICROQR 97 -/* Tbarcode 9 codes */ + /* Tbarcode 9 codes */ #define BARCODE_HIBC_128 98 #define BARCODE_HIBC_39 99 #define BARCODE_HIBC_DM 102 @@ -171,7 +171,7 @@ struct zint_symbol { #define BARCODE_HIBC_BLOCKF 110 #define BARCODE_HIBC_AZTEC 112 -/* Zint specific */ + /* Zint specific */ #define BARCODE_AZRUNE 128 #define BARCODE_CODE32 129 #define BARCODE_EANX_CC 130 @@ -213,34 +213,34 @@ struct zint_symbol { #define ZINT_ERROR_MEMORY 11 #if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(_MSC_VER) -# if defined (DLL_EXPORT) || defined(PIC) || defined(_USRDLL) -# define ZINT_EXTERN __declspec(dllexport) -# elif defined(ZINT_DLL) -# define ZINT_EXTERN __declspec(dllimport) -# else -# define ZINT_EXTERN extern -# endif +#if defined (DLL_EXPORT) || defined(PIC) || defined(_USRDLL) +#define ZINT_EXTERN __declspec(dllexport) +#elif defined(ZINT_DLL) +#define ZINT_EXTERN __declspec(dllimport) #else -# define ZINT_EXTERN extern +#define ZINT_EXTERN extern +#endif +#else +#define ZINT_EXTERN extern #endif -ZINT_EXTERN struct zint_symbol *ZBarcode_Create(void); -ZINT_EXTERN void ZBarcode_Clear(struct zint_symbol *symbol); -ZINT_EXTERN void ZBarcode_Delete(struct zint_symbol *symbol); + ZINT_EXTERN struct zint_symbol *ZBarcode_Create(void); + ZINT_EXTERN void ZBarcode_Clear(struct zint_symbol *symbol); + ZINT_EXTERN void ZBarcode_Delete(struct zint_symbol *symbol); -ZINT_EXTERN int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *input, int length); -ZINT_EXTERN int ZBarcode_Encode_File(struct zint_symbol *symbol, char *filename); -ZINT_EXTERN int ZBarcode_Print(struct zint_symbol *symbol, int rotate_angle); -ZINT_EXTERN int ZBarcode_Encode_and_Print(struct zint_symbol *symbol, unsigned char *input, int length, int rotate_angle); -ZINT_EXTERN int ZBarcode_Encode_File_and_Print(struct zint_symbol *symbol, char *filename, int rotate_angle); + ZINT_EXTERN int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *input, int length); + ZINT_EXTERN int ZBarcode_Encode_File(struct zint_symbol *symbol, char *filename); + ZINT_EXTERN int ZBarcode_Print(struct zint_symbol *symbol, int rotate_angle); + ZINT_EXTERN int ZBarcode_Encode_and_Print(struct zint_symbol *symbol, unsigned char *input, int length, int rotate_angle); + ZINT_EXTERN int ZBarcode_Encode_File_and_Print(struct zint_symbol *symbol, char *filename, int rotate_angle); -ZINT_EXTERN int ZBarcode_Render(struct zint_symbol *symbol, float width, float height); + ZINT_EXTERN int ZBarcode_Render(struct zint_symbol *symbol, float width, float height); -ZINT_EXTERN int ZBarcode_Buffer(struct zint_symbol *symbol, int rotate_angle); -ZINT_EXTERN int ZBarcode_Encode_and_Buffer(struct zint_symbol *symbol, unsigned char *input, int length, int rotate_angle); -ZINT_EXTERN int ZBarcode_Encode_File_and_Buffer(struct zint_symbol *symbol, char *filename, int rotate_angle); + ZINT_EXTERN int ZBarcode_Buffer(struct zint_symbol *symbol, int rotate_angle); + ZINT_EXTERN int ZBarcode_Encode_and_Buffer(struct zint_symbol *symbol, unsigned char *input, int length, int rotate_angle); + ZINT_EXTERN int ZBarcode_Encode_File_and_Buffer(struct zint_symbol *symbol, char *filename, int rotate_angle); -ZINT_EXTERN int ZBarcode_ValidID(int symbol_id); + ZINT_EXTERN int ZBarcode_ValidID(int symbol_id); #ifdef __cplusplus }