From 53d4ffcc227cd2d3a998718faeeeca0d1431e54b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 28 May 2012 12:13:14 +1000 Subject: s3-iconv: Remove unused script/gen-8bit-gap.sh We decided to rely on a system iconv rather than these modules. Andrew Bartlett --- source3/script/gap.awk | 39 ------------------------------- source3/script/gaptab.awk | 48 --------------------------------------- source3/script/gen-8bit-gap.awk | 18 --------------- source3/script/gen-8bit-gap.sh.in | 48 --------------------------------------- 4 files changed, 153 deletions(-) delete mode 100644 source3/script/gap.awk delete mode 100644 source3/script/gaptab.awk delete mode 100644 source3/script/gen-8bit-gap.awk delete mode 100755 source3/script/gen-8bit-gap.sh.in (limited to 'source3/script') diff --git a/source3/script/gap.awk b/source3/script/gap.awk deleted file mode 100644 index 11680d10f9..0000000000 --- a/source3/script/gap.awk +++ /dev/null @@ -1,39 +0,0 @@ -BEGIN { hv["0"] = 0; hv["1"] = 1; hv["2"] = 2; hv["3"] = 3; - hv["4"] = 4; hv["5"] = 5; hv["6"] = 6; hv["7"] = 7; - hv["8"] = 8; hv["9"] = 9; hv["A"] = 10; hv["B"] = 11; - hv["C"] = 12; hv["D"] = 13; hv["E"] = 14; hv["F"] = 15; - hv["a"] = 10; hv["b"] = 11; hv["c"] = 12; hv["d"] = 13; - hv["e"] = 14; hv["f"] = 15; - - first = 0; last = 0; idx = 0; -} - -function tonum(str) -{ - num=0; - cnt=1; - while (cnt <= length(str)) { - num *= 16; - num += hv[substr(str,cnt,1)]; - ++cnt; - } - return num; -} - -{ - u = tonum($1); - if (u - last > 6) - { - if (last) - { - printf (" { 0x%04x, 0x%04x, %5d },\n", - first, last, idx); - idx -= u - last - 1; - } - first = u; - } - last = u; -} - -END { printf (" { 0x%04x, 0x%04x, %5d },\n", - first, last, idx); } diff --git a/source3/script/gaptab.awk b/source3/script/gaptab.awk deleted file mode 100644 index a309089cd5..0000000000 --- a/source3/script/gaptab.awk +++ /dev/null @@ -1,48 +0,0 @@ -BEGIN { hv["0"] = 0; hv["1"] = 1; hv["2"] = 2; hv["3"] = 3; - hv["4"] = 4; hv["5"] = 5; hv["6"] = 6; hv["7"] = 7; - hv["8"] = 8; hv["9"] = 9; hv["A"] = 10; hv["B"] = 11; - hv["C"] = 12; hv["D"] = 13; hv["E"] = 14; hv["F"] = 15; - hv["a"] = 10; hv["b"] = 11; hv["c"] = 12; hv["d"] = 13; - hv["e"] = 14; hv["f"] = 15; - - first = 0; last = 0; idx = 0; f = 0; -} - -function tonum(str) -{ - num=0; - cnt=1; - while (cnt <= length(str)) { - num *= 16; - num += hv[substr(str,cnt,1)]; - ++cnt; - } - return num; -} - -function fmt(val) -{ - if (f++ % 8 == 0) - { printf ("\n 0x%02x,", val); } - else - { printf (" 0x%02x,", val); } -} - -{ - u = tonum($1); c = tonum($2); - - if (u - last > 6) - { - if (last) { idx += last - first + 1; } - first = u; - } - else - { - for (m = last+1; m < u; m++) { fmt(0); } - } - - fmt(c); - last = u; -} - -END { print "" } diff --git a/source3/script/gen-8bit-gap.awk b/source3/script/gen-8bit-gap.awk deleted file mode 100644 index 59a1a23be0..0000000000 --- a/source3/script/gen-8bit-gap.awk +++ /dev/null @@ -1,18 +0,0 @@ -BEGIN { - for (i=0; i<256; i++) { - tbl[sprintf("%02x",i)] = "0x0000"; - } -} - -/^[[:space:]]*.x([[:xdigit:]][[:xdigit:]])[:space:]*.*$/ { - tbl[substr($2,3,2)]=sprintf("0x%s",substr($1,3,4)); -} - -END { - for(i=0; i<32; i++) { - for(j=0; j<8; j++) { - printf(" %s,", tbl[sprintf("%02x",i*8+j)]); - } - printf "\n" - } -} \ No newline at end of file diff --git a/source3/script/gen-8bit-gap.sh.in b/source3/script/gen-8bit-gap.sh.in deleted file mode 100755 index 0ceaa8128b..0000000000 --- a/source3/script/gen-8bit-gap.sh.in +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -if test $# -ne 2 ; then - echo "Usage: $0 " - 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 3 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, see ." -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/^[[: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 -- cgit