2 if test $# -ne 2 ; then
3 echo "Usage: $0 <charmap file> <CHARSET NAME>"
11 echo " * Conversion table for $CHARSETNAME charset "
13 echo " * Conversion tables are generated using $CHARMAP table "
14 echo " * and source/script/gen-8bit-gap.sh script "
16 echo " * This program is free software; you can redistribute it and/or modify "
17 echo " * it under the terms of the GNU General Public License as published by "
18 echo " * the Free Software Foundation; either version 3 of the License, or "
19 echo " * (at your option) any later version. "
21 echo " * This program is distributed in the hope that it will be useful,"
22 echo " * but WITHOUT ANY WARRANTY; without even the implied warranty of "
23 echo " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
24 echo " * GNU General Public License for more details. "
26 echo " * You should have received a copy of the GNU General Public License "
27 echo " * along with this program; if not, see <http://www.gnu.org/licenses/>."
30 echo '#include "includes.h"'
32 echo "static const uint16 to_ucs2[256] = {"
33 cat "$CHARMAP" | @AWK@ -f @srcdir@/script/gen-8bit-gap.awk
36 echo "static const struct charset_gap_table from_idx[] = {"
37 sed -ne 's/^<U\(....\).*/\1/p' \
38 "$CHARMAP" | sort -u | @AWK@ -f @srcdir@/script/gap.awk
39 echo " { 0xffff, 0xffff, 0 }"
42 echo "static const unsigned char from_ucs2[] = {"
43 sed -ne 's/^<U\(....\)>[[:space:]]*.x\(..\).*/\1 \2/p' \
44 "$CHARMAP" | sort -u | @AWK@ -f @srcdir@/script/gaptab.awk
47 echo "SMB_GENERATE_CHARSET_MODULE_8_BIT_GAP($CHARSETNAME)"