]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
new mdnkit release from jpnic
authorDavid Lawrence <source@isc.org>
Wed, 24 Jan 2001 01:05:30 +0000 (01:05 +0000)
committerDavid Lawrence <source@isc.org>
Wed, 24 Jan 2001 01:05:30 +0000 (01:05 +0000)
12 files changed:
contrib/idn/mdnkit/ChangeLog
contrib/idn/mdnkit/Makefile.in
contrib/idn/mdnkit/NEWS
contrib/idn/mdnkit/README
contrib/idn/mdnkit/README.ja
contrib/idn/mdnkit/lib/Makefile.in
contrib/idn/mdnkit/lib/race.c
contrib/idn/mdnkit/tools/mdnconv/mdnconv.c
contrib/idn/mdnkit/tools/mdnconv/util.c
contrib/idn/mdnkit/tools/mdnconv/util.h
contrib/idn/mdnkit/tools/rpm/mdnkit.spec
contrib/idn/mdnkit/tools/runmdn/Makefile.in

index 9a0bb236e4bdfb12ec7f68b1702c034f4640048b..bee2fffd383992c6a1effb330247cf435c6503e8 100644 (file)
@@ -1,3 +1,56 @@
+2001-01-12
+       * Makefile.in: update for 1.2.1.
+       * version 1.2.1 release
+
+2000-12-28
+       * Makefile.in: update for 1.2.1-rc2.
+       * README, README.ja: update for 1.2.1-rc2 release.
+
+2000-12-26
+       * lib/race.c: fix a bug that causes incorrect decoding of RACE-
+       encoded names if they contain any of uppercase characters.
+       * patch/bind8/bind-8.2.3-T6B-patch: removed.
+       * patch/bind8/bind-8.2.3-T9B-patch: created.
+       * DISTFILES: replace bind-8.2.3-T6B-patch with bind-8.2.3-T9B-patch.
+
+2000-12-22
+       * tools/rpm/mdnkit.spec: update for 1.2.1.
+       * patch/bind8/bind-8.2.2-P7-patch, patch/bind8/bind-8.2.3-T6B-patch:
+       add more 8bit-through fixes.  previous versions have problems when
+       domain name string contains some special characters, especially
+       backslash.
+
+2000-12-21
+       * lib/Makefile.in, tools/runmdn/Makefile.in: increment revision
+       number of libraries for the next public release.
+
+2000-12-20
+       * README, README.ja: update for 1.2.1 release.
+       * Makerfile.in: update for 1.2.1-rc1.
+
+2000-12-14
+       * patch/bind9/bind-9.0.0-patch: removed.
+       * patch/bind9/bind-9.0.1-patch: created.
+       * DISTFILES: replace bind-9.0.0-patch with bind-9.0.1-patch.
+       * lib/race.c: fix an encoding (compression) bug, regarding
+       0xff handling.  actually the old behavior was in accordance with
+       the obsolete -00 draft.
+
+2000-12-08
+       * lib/race.c: catch up with draft-ietf-idn-race-03.txt.
+       check an input string severely.
+
+2000-12-07
+       * tools/mdnconv/util.c: remove find_prefix().
+
+2000-12-06
+       * tools/mdnconv/mdnconv.c, tools/mdnconv/util.c, tools/mdnconv/util.h:
+       change ACE decoding strategy.
+
+2000-12-04
+       * tools/runmdn/Makefile.in: add missing brace.lo and lace.lo
+       to the list of object files.
+
 2000-11-27
        * wsock/config/mdnconf.tcl: implement "unwrap all" button.
        * wsock/README.txt, wsock/README_j.txt: add description on "unwrap
index 8d85c8eb51003343b3df12efc2168c398aca33d0..906c8d6c328d1df437969d5b05a003bd51fa0ead 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.31 2000/11/27 01:58:31 ishisone Exp $
+# $Id: Makefile.in,v 1.34 2001/01/12 00:28:08 ishisone Exp $
 # Copyright (c) 2000 Japan Network Information Center.  All rights reserved.
 #  
 # By using this file, you agree to the terms and conditions set forth bellow.
@@ -61,11 +61,14 @@ VPATH = @srcdir@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 
+PERL = perl
+MKTARPKG = ../util/mktarpkg
+
 SUBDIRS = include lib dnsproxy man tools
 
-CUR_VERSION  = 1.2
-PREV_VERSION = 1.1
-PREV_TAG = REL_1_1
+CUR_VERSION  = 1.2.1
+PREV_VERSION = 1.2
+PREV_TAG = REL_1_2
 
 DISTFILE = mdnkit-$(CUR_VERSION)-src
 PATCHFILE = mdnkit-$(PREV_VERSION)-$(CUR_VERSION)-src-patch
@@ -80,7 +83,7 @@ clean:
        for d in $(SUBDIRS); do (cd $$d; $(MAKE) clean); done
 
 dist:
-       cd $(srcdir); mktarpkg --gzip=9 $(DISTFILE)
+       cd $(srcdir); $(PERL) $(MKTARPKG) --gzip=9 $(DISTFILE)
 
 patch:
        cd $(srcdir); mkcvspatch --gzip=9 --header=patch.header \
index 68e13bd36dbba67fe2990f3d98312fa0275f8b06..35c41ff5d3ac74dd316069437be61a85b3c2adb6 100644 (file)
@@ -1,4 +1,24 @@
-; $Id: NEWS,v 1.5 2000/11/21 09:03:23 ishisone Exp $
+; $Id: NEWS,v 1.8 2000/12/28 02:36:29 ishisone Exp $
+
+Major changes in version 1.2.1:
+
+* RACE converter incorporates numeral checks introduced by -03 draft.
+  Also a bug, which produces incorrectly encoded string (actually
+  encoded in the way -00 draft specifies), is fixed.
+
+* The base version of BIND-9 patch has changed from 9.0.0 to 9.0.1.
+
+* The base versions of BIND-8 patch are now 8.2.2-P7 and 8.2.3-T9B.
+
+* runmdn now works again.
+
+* mdnconv is improved so that it can nicely convert ACE-encoded text
+  to other encodings.  It detects ACE portions of the input string and
+  converts only them, leaving non-ACE portions intact.  Previously
+  only RACE had such capability, but now other ACEs also have this
+  capability as long as they have certain prefix/suffix ("bq--" for
+  RACE, for example).
+
 
 Major changes in version 1.2:
 
index ae57a16bdf3f49c436ad0ae9f94f07f3a69512a2..8d5c8ff79acaf1bd8c12fca420d68f3bab8fedc6 100644 (file)
@@ -1,7 +1,7 @@
 
                                mDNkit
-         -- multilingual domain name evaluation kit --
-                            version 1.2
+           -- multilingual domain name evaluation kit --
+                           version 1.2.1
               Japan Network Information Center (JPNIC)
 
 
@@ -283,7 +283,7 @@ the manual of mDNkit's resolver configuration file `mdnres.conf'.
 * Applying patches
 
 This distribution also contains patches for BIND 8.2.2-P7,
-BIND 8.2.3-T6B, BIND 9.0.0 and Squid 2.3.STABLE3.  The top of these
+BIND 8.2.3-T9B, BIND 9.0.1 and Squid 2.3.STABLE3.  The top of these
 patch files describe how to apply the patch and (re)install.
 
 Note that on Solaris, "patch" command that comes with the system
@@ -294,11 +294,11 @@ it.
 
 * Contact information
 
-Please see http//www.nic.ad.jp/jp/research/idn/ for the latest news
+Please see http://www.nic.ad.jp/jp/research/idn/ for the latest news
 about this kit.
 
 Bug reports and comments on this kit should be sent to
 mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively.
 
 
-; $Id: README,v 1.15 2000/11/21 07:54:13 ishisone Exp $
+; $Id: README,v 1.18 2000/12/28 04:09:28 ishisone Exp $
index 9f8201a8058fd543e6f6c6f912a4c902aa6736f6..ba1d375167e6acf78821cdc1612090f1fbcf792f 100644 (file)
@@ -1,7 +1,7 @@
 
                                mDNkit
                   -- Â¿¸À¸ì¥É¥á¥¤¥ó̾ɾ²Á¥­¥Ã¥È --
-                           ¥Ð¡¼¥¸¥ç¥ó 1.2
+                          ¥Ð¡¼¥¸¥ç¥ó 1.2.1
        (¼Ò) ÆüËܥͥåȥ¥¯¥¤¥ó¥Õ¥©¥á¡¼¥·¥ç¥ó¥»¥ó¥¿¡¼ (JPNIC)
 
 
@@ -278,7 +278,7 @@ configure 
 
 * ¥Ñ¥Ã¥Á¤ÎÅö¤ÆÊý
 
-¤³¤ÎÇÛÉÛ¥­¥Ã¥È¤Ë¤Ï¡¢bind-8.2.2-P7¡¢bind-8.2.3-T6B¡¢bind-9.0.0¡¢¤ª¤è¤Ó 
+¤³¤ÎÇÛÉÛ¥­¥Ã¥È¤Ë¤Ï¡¢bind-8.2.2-P7¡¢bind-8.2.3-T9B¡¢bind-9.0.1¡¢¤ª¤è¤Ó 
 squid-2.3-STABLE3 ¤ËÂФ¹¤ë¥Ñ¥Ã¥Á¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£¥Ñ¥Ã¥Á¤ÎÅö¤ÆÊý¤Ï¡¢¥Ñ¥Ã
 ¥Á¥Õ¥¡¥¤¥ë¤ÎÀèÆ¬¤Ë½ñ¤«¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¤½¤Á¤é¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
 
@@ -297,4 +297,4 @@ http://www.nic.ad.jp/jp/research/idn/ 
 mdnkit-bugs@nic.ad.jp ¤ª¤è¤Ó idn-cmt@nic.ad.jp ¤Ø¤ª´ê¤¤¤·¤Þ¤¹¡£
 
 
-; $Id: README.ja,v 1.18 2000/11/21 07:54:13 ishisone Exp $
+; $Id: README.ja,v 1.20 2000/12/28 04:09:28 ishisone Exp $
index 9ede1350be35c170e88bc7988a935704aea57693..f90777d54223dd5b04b806b0411e3e2f6d6e0aa1 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.23 2000/11/21 02:29:52 ishisone Exp $
+# $Id: Makefile.in,v 1.24 2000/12/21 01:57:30 ishisone Exp $
 # Copyright (c) 2000 Japan Network Information Center.  All rights reserved.
 #  
 # By using this file, you agree to the terms and conditions set forth bellow.
@@ -56,7 +56,7 @@
 #    jurisdiction and venue of Tokyo District Court of Japan.
 
 LIB_CURRENT = 4
-LIB_REVISION = 0
+LIB_REVISION = 1
 
 .SUFFIXES: .lo
 
index fbc284239360016e46cd9b46e13d151275db82a1..63a13b48d90988aea4d535f0b93922c308574848 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *rcsid = "$Id: race.c,v 1.14 2000/11/22 01:52:18 ishisone Exp $";
+static char *rcsid = "$Id: race.c,v 1.17 2000/12/26 08:17:01 m-kasahr Exp $";
 #endif
 
 /*
@@ -211,6 +211,14 @@ race_l2u(const char *from, const char *end,
                        return (r);
 
                len = strlen(to);
+
+               /*
+                * RACE doesn't permit encoding a domain name which fits
+                * the host name requirement [STD13].
+                */
+               if (mdn_util_domainspan(to, to + len) == to + len)
+                       return (mdn_invalid_encoding);
+
        } else {
                /*
                 * Not RACE encoded.  Copy verbatim.
@@ -276,13 +284,14 @@ race_decode(const char *from, size_t fromlen, char *to, size_t tolen) {
        unsigned short *buf;
        unsigned short local_buf[RACE_BUF_SIZE];
        size_t len, reslen;
+       char *reversed_from;
        mdn_result_t r;
 
        /*
         * Allocate sufficient buffer.
         */
-       if (fromlen > RACE_BUF_SIZE) {
-               if ((buf = malloc(sizeof(*buf) * fromlen)) == NULL)
+       if (fromlen + 1 > RACE_BUF_SIZE) {
+               if ((buf = malloc(sizeof(*buf) * (fromlen + 1))) == NULL)
                        return (mdn_nomemory);
        } else {
                /* Use local buffer. */
@@ -312,11 +321,21 @@ race_decode(const char *from, size_t fromlen, char *to, size_t tolen) {
                r = mdn_buffer_overflow;
                goto ret;
        }
-       to += reslen;
-       *to = '\0';
-       tolen -= reslen;
+       *(to + reslen) = '\0';
 
-       r = mdn_success;
+       /*
+        * Encode the result, and compare the result with `from', in
+        * order to test whether an input string is encoded correctly.
+        * If `from' was encoded with wrong compression mode, we return
+        * `mdn_invalid_encoding'.
+        */
+       r = race_encode(to, reslen, (char *)buf, fromlen + 1);
+       if (r != mdn_success)
+               goto ret;
+       if (!mdn_util_casematch((char *)buf, from, fromlen)) {
+               r = mdn_invalid_encoding;
+               goto ret;
+       }
 
 ret:
        if (buf != local_buf)
@@ -356,10 +375,24 @@ race_decode_decompress(const char *from, size_t fromlen,
        }
        len = p - buf;
 
+       /*
+        * The number of unused bits MUST be 4 or less, and all the
+        * bits MUST be zero.
+        */
+       if (bitlen >= 5 || (bitbuf & ((1 << bitlen) - 1)) != 0)
+               return (mdn_invalid_encoding);
+
        /*
         * Now 'buf' holds the decoded string.
         */
 
+       /*
+        * RACE doesn't permit an input string with only one octet
+        * (RACE_2OCTET_MODE or a higher octet only).
+        */
+       if (len <= 1)
+               return (mdn_invalid_encoding);
+
        /*
         * Decompress.
         */
@@ -381,6 +414,13 @@ race_decode_decompress(const char *from, size_t fromlen,
                                else
                                        buf[j] = buf[i + 1];
                                i += 2;
+
+                       } else if (buf[i] == 0x99 && c == 0x00) {
+                               /*
+                                * The RACE specification says this is error.
+                                */
+                               return (mdn_invalid_encoding);
+                                
                        } else {
                                buf[j] = c | buf[i++];
                        }
@@ -398,6 +438,7 @@ race_encode(const char *from, size_t fromlen, char *to, size_t tolen) {
        mdn_result_t r;
        size_t len, buflen;
        int compress_mode;
+       int i;
 
        /*
         * Convert to UTF-16.
@@ -428,6 +469,17 @@ race_encode(const char *from, size_t fromlen, char *to, size_t tolen) {
         * Now 'p' contains UTF-16 encoded string.
         */
 
+       /*
+        * Check U+0099. 
+        * RACE doesn't permit U+0099 in an input string.
+        */
+       for (i = 0; i < len; i++) {
+               if (p[i] == 0x0099) {
+                       r = mdn_invalid_encoding;
+                       goto ret;
+               }
+       }
+
        /*
         * Compress, encode in base-32 and output.
         */
@@ -455,14 +507,19 @@ race_compress_encode(const unsigned short *p, size_t len, int compress_mode,
                                break;
                        bitbuf <<= (5 - bitlen);
                        bitlen = 5;
-               } else if (i == 0 || compress_mode == compress_one) {
-                       /* Push 8 bit data into bitbuf. */
-                       bitbuf = (bitbuf << 8) | (p[i] & 0xff);
-                       bitlen += 8;
-               } else if (compress_mode == compress_two) {
+               } else if (i == 0) {
+                       /* Output the first octet (U1 or 0xd8). */
+                       bitbuf = p[0];
+                       bitlen = 8;
+               } else if (compress_mode == compress_none) {
+                       /* Push 16 bit data. */
+                       bitbuf = (bitbuf << 16) | p[i];
+                       bitlen += 16;
+               } else {/* compress_mode == compress_one/compress_two */
                        /* Push 8 or 16 bit data. */
-                       if ((p[i] & 0xff00) == 0) {
-                               /* Upper octet is zero. */
+                       if (compress_mode == compress_two &&
+                           (p[i] & 0xff00) == 0) {
+                               /* Upper octet is zero (and not U1). */
                                bitbuf = (bitbuf << 16) | 0xff00 | p[i];
                                bitlen += 16;
                        } else if ((p[i] & 0xff) == 0xff) {
@@ -471,13 +528,10 @@ race_compress_encode(const unsigned short *p, size_t len, int compress_mode,
                                        (RACE_ESCAPE << 8) | RACE_ESCAPE_2ND;
                                bitlen += 16;
                        } else {
+                               /* Just output lower octet. */
                                bitbuf = (bitbuf << 8) | (p[i] & 0xff);
                                bitlen += 8;
                        }
-               } else {        /* compresss_mode == compress_none */
-                       /* Push 16 bit data. */
-                       bitbuf = (bitbuf << 16) | p[i];
-                       bitlen += 16;
                }
 
                /*
@@ -537,3 +591,5 @@ get_compress_mode(unsigned short *p, size_t len) {
        else
                return (compress_one);
 }
+
+
index 49ad838f1b879105d708b3834ca29b89a5d3e6dc..0263f3593f6a5ce62df6c802306daa7d02be0dba 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *rcsid = "$Id: mdnconv.c,v 1.19 2000/09/13 05:55:55 ishisone Exp $";
+static char *rcsid = "$Id: mdnconv.c,v 1.20 2000/12/06 09:46:34 m-kasahr Exp $";
 #endif
 
 /*
@@ -88,18 +88,6 @@ static char *rcsid = "$Id: mdnconv.c,v 1.19 2000/09/13 05:55:55 ishisone Exp $";
 /* Maxmum number of normalizers */
 #define MAX_NORMALIZER 10
 
-#ifndef MDN_UTF8_ENCODING_NAME
-#define MDN_UTF8_ENCODING_NAME "UTF-8"
-#endif
-
-#ifndef MDN_RACE_ENCODING_NAME
-#define MDN_RACE_ENCODING_NAME "RACE"
-#endif
-
-#ifndef MDN_RACE_PREFIX
-#define MDN_RACE_PREFIX "bq--"
-#endif
-
 int                    line_number;    /* current input file line number */
 int                    flush_every_line = 0; /* pretty obvious */
 mdn_converter_t                conv_in_ctx;    /* input converter */
@@ -282,13 +270,12 @@ convert_file(FILE *fp, char *zld, int auto_zld, int selective) {
        char line1[1024];
        char line2[1024];
        int nl_trimmed;
-       int race_hack;
+       int ace_hack;
 
-       if (strcmp(mdn_converter_localencoding(conv_in_ctx),
-                  MDN_RACE_ENCODING_NAME) == 0)
-               race_hack = 1;
+       if (mdn_converter_isasciicompatible(conv_in_ctx))
+               ace_hack = 1;
        else
-               race_hack = 0;
+               ace_hack = 0;
 
        line_number = 1;
        while (fgets(line1, sizeof(line1), fp) != NULL) {
@@ -308,13 +295,11 @@ convert_file(FILE *fp, char *zld, int auto_zld, int selective) {
                /*
                 * Convert input line to UTF-8.
                 */
-               if (race_hack) {
+               if (ace_hack) {
                        /*
-                        * Find portions encoded in RACE using RACE's prefix
-                        * "bq--", and selectively decode those portions.
+                        * Selectively decode those portions.
                         */
-                       r = selective_decode(MDN_RACE_PREFIX,
-                                            line1, line2, 1024);
+                       r = selective_decode(line1, line2, 1024);
                } else {
                        r = mdn_converter_localtoutf8(conv_in_ctx,
                                                      line1, line2, 1024);
index 47f6fe1d01ee3fbc2cbb767928e372a1228f3413..0c4ac8553361c412b9f7ac43db9e7f484bacf19a 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *rcsid = "$Id: util.c,v 1.7 2000/11/02 00:45:18 ishisone Exp $";
+static char *rcsid = "$Id: util.c,v 1.9 2000/12/07 02:35:12 m-kasahr Exp $";
 #endif
 
 /*
@@ -86,7 +86,6 @@ extern mdn_normalizer_t       norm_ctx;
 
 extern void            errormsg(const char *fmt, ...);
 
-static char            *find_prefix(const char *str, const char *prefix);
 static int             ascii_tolower(int c);
 
 mdn_result_t
@@ -289,56 +288,122 @@ zld_match(const char *s, const char *zld) {
 }
 
 mdn_result_t
-selective_decode(const char *prefix, char *from, char *to, int tolen) {
-       char *p;
+selective_decode(char *from, char *to, int tolen) {
+       char *domain_name;
+       char *ignored_chunk;
        char save;
        int len;
        mdn_result_t r;
 
-       while ((p = find_prefix(from, prefix)) != NULL) {
-               /*
-                * Copy up to the prefix.
-                */
-               len = p - from;
-               if (tolen < len)
-                       return (mdn_buffer_overflow);
-               (void)memcpy(to, from, len);
-               from = p;
-               to += len;
-               tolen -= len;
-
-               /*
-                * Determine the extent.
-                */
-               p += strlen(prefix);
-               while (('a' <= *p && *p <= 'z') ||
-                      ('A' <= *p && *p <= 'Z') ||
-                      ('0' <= *p && *p <= '9') ||
-                      *p == '-' || *p == '.')
-                       p++;
-
-               /*
-                * Convert selected area to UTF-8.
-                */
-               save = *p;
-               *p = '\0';
-               r = mdn_converter_localtoutf8(conv_in_ctx, from, to, tolen);
-               if (r != mdn_success)
-                       return (r);
-               *p = save;
-               from = p;
-               len = strlen(to);
-               to += len;
-               tolen -= len;
-       }
+       /*
+        * While `*from' points to a character in a string which may be
+        * a domain name, `domain_name' refers to the beginning of the
+        * domain name.
+        */
+       domain_name = NULL;
 
        /*
-        * Copy the rest verbatim.
+        * We ignores a chunk maching to the regular expression:
+        *    [\-\.][0-9A-Za-z\-\.]*
+        *
+        * While `*from' points to a character in such a chunk,
+        * `ignored_chunk' refers to the beginning of the chunk.
         */
-       len = strlen(from);
-       if (tolen < len + 1)    /* +1 for NUL */
-               return (mdn_buffer_overflow);
-       (void)strcpy(to, from);
+       ignored_chunk = NULL;
+
+       for (;;) {
+               if (*from == '-') {
+                       /*
+                        * We don't recognize `.-' as a part of domain name.
+                        */
+                       if (domain_name != NULL) {
+                               if (*(from - 1) == '.') {
+                                       ignored_chunk = domain_name;
+                                       domain_name = NULL;
+                               }
+                       } else if (ignored_chunk == NULL) {
+                               ignored_chunk = from;
+                       }
+
+               } else if (*from == '.') {
+                       /*
+                        * We don't recognize `-.' nor `..' as a part of
+                        * domain name.
+                        */
+                       if (domain_name != NULL) {
+                               if (*(from - 1) == '-' || *(from - 1) == '.') {
+                                       ignored_chunk = domain_name;
+                                       domain_name = NULL;
+                               }
+                       } else if (ignored_chunk == NULL) {
+                               ignored_chunk = from;
+                       }
+
+               } else if (('a' <= *from && *from <= 'z') ||
+                          ('A' <= *from && *from <= 'Z') ||
+                          ('0' <= *from && *from <= '9')) {
+                       if (ignored_chunk == NULL && domain_name == NULL)
+                               domain_name = from;
+
+               } else {
+                       if (ignored_chunk != NULL) {
+                               /*
+                                * `from' reaches the end of the ignored chunk.
+                                * Copy the chunk to `to'.
+                                */
+                               len = from - ignored_chunk;
+                               if (tolen < len)
+                                       return (mdn_buffer_overflow);
+                               (void)memcpy(to, ignored_chunk, len);
+                               to += len;
+                               tolen -= len;
+
+                       } else if (domain_name != NULL) {
+                               /*
+                                * `from' reaches the end of the domain name.
+                                * Decode the domain name, and copy the result
+                                * to `to'.
+                                */
+                               save = *from;
+                               *from = '\0';
+                               r = mdn_converter_localtoutf8(conv_in_ctx,
+                                                             domain_name, to,
+                                                             tolen);
+                               *from = save;
+
+                               if (r == mdn_success) {
+                                       len = strlen(to);
+                               } else if (r == mdn_invalid_encoding) {
+                                       len = from - domain_name;
+                                       if (tolen < len)
+                                               return (mdn_buffer_overflow);
+                                       (void)memcpy(to, domain_name, len);
+                               } else {
+                                       return (r);
+                               }
+                               to += len;
+                               tolen -= len;
+
+                       }
+
+                       /*
+                        * Copy a character `*from' to `to'.
+                        */
+                       if (tolen < 1)
+                               return (mdn_buffer_overflow);
+                       *to = *from;
+                       to++;
+                       tolen--;
+
+                       domain_name = NULL;
+                       ignored_chunk = NULL;
+
+                       if (*from == '\0')
+                               break;
+               }
+
+               from++;
+       }
 
        return (mdn_success);
 }
@@ -408,17 +473,3 @@ ascii_tolower(int c) {
        else
                return (c);
 }
-
-static char *
-find_prefix(const char *str, const char *prefix) {
-       int top = ascii_tolower(prefix[0]);
-       size_t plen = strlen(prefix);
-
-       while (*str != '\0') {
-               if ((*str == top || ascii_tolower(*str) == top) &&
-                   mdn_util_casematch(str, prefix, plen))
-                       return ((char *)str);
-               str++;
-       }
-       return (NULL);
-}
index f32c51ea625a5385cced7d7b6e754511488ddb53..bdf2a88773475acd45f389065875e985afdc48fe 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: util.h,v 1.2 2000/08/23 07:01:05 ishisone Exp $ */
+/* $Id: util.h,v 1.3 2000/12/06 09:46:35 m-kasahr Exp $ */
 /*
  * Copyright (c) 2000 Japan Network Information Center.  All rights reserved.
  *  
@@ -63,8 +63,7 @@ extern mdn_result_t   encode_region(const char *region, char *to, int tolen,
                                      const char *zld, int auto_zld);
 extern void            canonical_zld(char *s, const char *zld);
 extern int             zld_match(const char *s, const char *zld);
-extern mdn_result_t    selective_decode(const char *prefix,
-                                        char *from, char *to, int tolen);
+extern mdn_result_t    selective_decode(char *from, char *to, int tolen);
 extern int             initialize_converter(const char *in_code,
                                             const char *out_code,
                                             const char *encoding_alias);
index 592e8b9af7e75635e3747e690c26e1caa51d7e29..06e9a25d54204dfc14829bb2db6408282d4ebdb1 100644 (file)
@@ -1,8 +1,8 @@
 %define name mdnkit
-%define version 1.2
+%define version 1.2.1
 %define disttop %{name}-%{version}-src
 %define bind_version 8.2.2-P7
-%define serial 2000112701
+%define serial 2000122101
 
 Name: %{name}
 Version: %{version}
@@ -16,7 +16,7 @@ Source: %{disttop}.tar.gz
 #NoSource: 10
 #NoSource: 11
 #NoSource: 12
-#Patch0: dnsproxy.patch1
+#Patch0: mdnkit-1.2-runmdn.patch
 BuildRoot: /var/tmp/%{name}-root
 Serial: %{serial}
 Summary: multilingual Domain Name evaluation kit (mDNkit/JPNIC)
@@ -37,12 +37,15 @@ that use MDN library.
 
 %prep
 %setup -n %{disttop}
-#%patch0 -p0 -b .patch1
+#%patch0 -p1 -b .runmdn
 
 %build
 if [ -f /usr/lib/libiconv.a -o -f /usr/lib/libiconv.so ]
 then
-  ICONV="--with-iconv=yes"
+  if [ -f /lib/libc-2.0* ]
+  then
+    ICONV="--with-iconv=yes"
+  fi
 fi
 
 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --sysconfdir=/etc $ICONV
@@ -55,6 +58,7 @@ mkdir -p $RPM_BUILD_ROOT/usr/bin
 mkdir -p $RPM_BUILD_ROOT/usr/sbin
 mkdir -p $RPM_BUILD_ROOT/usr/lib
 mkdir -p $RPM_BUILD_ROOT/usr/include
+mkdir -p $RPM_BUILD_ROOT/var/dnsproxy
 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
 make prefix=$RPM_BUILD_ROOT/usr ETCDIR=$RPM_BUILD_ROOT/etc install
 # make prefix=$RPM_BUILD_ROOT/usr sysconfdir=$RPM_BUILD_ROOT/etc install
@@ -75,6 +79,11 @@ cp -r patch rpm_docs
 rm -fr $RPM_BUILD_ROOT
 
 %changelog
+* Mon Dec  6 2000 MANABE Takashi <manabe@dsl.gr.jp>
+- add brace/lace functions to libmdnresolv(mdnkit-1.2-runmdn.patch)
+- include /var/dnsproxy
+- change files section for compressed man pages
+
 * Mon Nov 27 2000 Makoto Ishisone <ishisone@sra.co.jp>
 - 1.2 release
 
@@ -91,6 +100,7 @@ rm -fr $RPM_BUILD_ROOT
 %files
 %defattr(-, root, root)
 /usr/sbin/dnsproxy
+/var/dnsproxy
 /usr/bin/mdnconv
 /usr/bin/runmdn
 /etc/rc.d/init.d/dnsproxy
@@ -100,10 +110,9 @@ rm -fr $RPM_BUILD_ROOT
 /usr/lib/libmdnresolv.la
 %attr(0644, root, root) %config(noreplace) /etc/dnsproxy.conf
 %attr(0644, root, root) /etc/mdnres.conf.sample
-%attr(0644, root, man) /usr/man/man1/mdnconv.1
-%attr(0644, root, man) /usr/man/man1/runmdn.1
-%attr(0644, root, man) /usr/man/man5/mdnres.conf.5
-%attr(0644, root, man) /usr/man/man8/dnsproxy.8
+%attr(0644, root, man) /usr/man/man1/*
+%attr(0644, root, man) /usr/man/man5/*
+%attr(0644, root, man) /usr/man/man8/*
 %doc rpm_docs/*
 
 %files devel
index 895b4b24fb4919db3fe9f6c09f2dcb440cce95a3..99eecd0d3c3f8d3c274012ffae81e6e641c8e92d 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.12 2000/11/21 02:29:53 ishisone Exp $
+# $Id: Makefile.in,v 1.14 2000/12/21 01:57:31 ishisone Exp $
 # Copyright (c) 2000 Japan Network Information Center.  All rights reserved.
 #  
 # By using this file, you agree to the terms and conditions set forth bellow.
@@ -56,7 +56,7 @@
 #    jurisdiction and venue of Tokyo District Court of Japan.
 
 LIB_CURRENT=4
-LIB_REVISION=0
+LIB_REVISION=1
 
 .SUFFIXES: .lo
 
@@ -91,9 +91,11 @@ SCRIPT  = runmdn
 
 MDNDIR  = ../../lib
 MDNOBJS  = \
+       $(MDNDIR)/brace.lo \
        $(MDNDIR)/converter.lo \
        $(MDNDIR)/debug.lo \
        $(MDNDIR)/dn.lo \
+       $(MDNDIR)/lace.lo \
        $(MDNDIR)/localencoding.lo \
        $(MDNDIR)/log.lo \
        $(MDNDIR)/normalizer.lo \