diff options
author | Gerald Carter <jerry@samba.org> | 2003-09-09 04:07:32 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-09-09 04:07:32 +0000 |
commit | 4093bf7ff8c8861cf7b941945ede53a8ec5bb6c8 (patch) | |
tree | dd0a9f32d9933e1f75d919b5083e007d7453f9c4 /source3/script/gen-8bit-gap.sh.in | |
parent | 3d7cb49747a9a7f5cdec0ee05c6270ec3604202f (diff) | |
download | samba-4093bf7ff8c8861cf7b941945ede53a8ec5bb6c8.tar.gz samba-4093bf7ff8c8861cf7b941945ede53a8ec5bb6c8.tar.bz2 samba-4093bf7ff8c8861cf7b941945ede53a8ec5bb6c8.zip |
sync 3.0 into HEAD for the last time
(This used to be commit c17a7dc9a190156a069da3e861c18fd3f81224ad)
Diffstat (limited to 'source3/script/gen-8bit-gap.sh.in')
-rwxr-xr-x | source3/script/gen-8bit-gap.sh.in | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/source3/script/gen-8bit-gap.sh.in b/source3/script/gen-8bit-gap.sh.in new file mode 100755 index 0000000000..bcf64a4464 --- /dev/null +++ b/source3/script/gen-8bit-gap.sh.in @@ -0,0 +1,49 @@ +#!/bin/sh +if test $# -ne 2 ; then + echo "Usage: $0 <charmap file> <CHARSET NAME>" + exit 1 +fi + +CHARMAP=$1 +CHARSETNAME=$2 + +echo "/* " +echo " * Conversion table for $CHARSETNAME charset " +echo " * " +echo " * Conversion tables are generated using $CHARMAP table " +echo " * and source/script/gen-8bit-gap.sh script " +echo " * " +echo " * This program is free software; you can redistribute it and/or modify " +echo " * it under the terms of the GNU General Public License as published by " +echo " * the Free Software Foundation; either version 2 of the License, or " +echo " * (at your option) any later version. " +echo " * " +echo " * This program is distributed in the hope that it will be useful," +echo " * but WITHOUT ANY WARRANTY; without even the implied warranty of " +echo " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " +echo " * GNU General Public License for more details. " +echo " * " +echo " * You should have received a copy of the GNU General Public License " +echo " * along with this program; if not, write to the Free Software " +echo " * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. " +echo " */" + +echo '#include "includes.h"' +echo +echo "static const uint16 to_ucs2[256] = {" +cat "$CHARMAP" | @AWK@ -f @srcdir@/script/gen-8bit-gap.awk +echo "};" +echo +echo "static const struct charset_gap_table from_idx[] = {" +sed -ne 's/^<U\(....\).*/\1/p' \ + "$CHARMAP" | sort -u | @AWK@ -f @srcdir@/script/gap.awk +echo " { 0xffff, 0xffff, 0 }" +echo "};" +echo +echo "static const unsigned char from_ucs2[] = {" +sed -ne 's/^<U\(....\)>[[:space:]]*.x\(..\).*/\1 \2/p' \ + "$CHARMAP" | sort -u | @AWK@ -f @srcdir@/script/gaptab.awk +echo "};" +echo +echo "SMB_GENERATE_CHARSET_MODULE_8_BIT_GAP($CHARSETNAME)" +echo |