texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo update (Mon Oct 8 14:23:01 EDT 2007)


From: Karl Berry
Subject: texinfo update (Mon Oct 8 14:23:01 EDT 2007)
Date: Mon, 08 Oct 2007 14:23:04 -0400

Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.769
retrieving revision 1.770
diff -u -r1.769 -r1.770
--- ChangeLog   3 Oct 2007 19:00:31 -0000       1.769
+++ ChangeLog   8 Oct 2007 18:22:27 -0000       1.770
@@ -1,3 +1,11 @@
+2007-10-08  Bruno Haible  <address@hidden>
+
+       * makeinfo/lang.c (unicode_map): New variable.
+       (cm_search_iso_map): In case of UTF-8 encoding, return a Unicode code
+       point.
+       (add_encoded_char_from_code): New function.
+       (add_encoded_char, cm_accent_generic_no_headers): Use it.
+
 2007-10-03  Karl Berry  <address@hidden>
 
        * doc/texinfo.txi (math): @math{k_{75}} is allowed, despite bare
Index: doc/version.texi
===================================================================
RCS file: /sources/texinfo/texinfo/doc/version.texi,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- doc/version.texi    10 Sep 2007 00:36:29 -0000      1.48
+++ doc/version.texi    8 Oct 2007 18:22:27 -0000       1.49
@@ -1,4 +1,4 @@
address@hidden UPDATED 29 July 2007
address@hidden UPDATED-MONTH July 2007
address@hidden UPDATED 3 October 2007
address@hidden UPDATED-MONTH October 2007
 @set EDITION 4.11
 @set VERSION 4.11
Index: gnulib/lib/.cvsignore
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/lib/.cvsignore,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- gnulib/lib/.cvsignore       26 Jul 2007 21:52:17 -0000      1.9
+++ gnulib/lib/.cvsignore       8 Oct 2007 18:22:27 -0000       1.10
@@ -12,3 +12,4 @@
 unistd.h
 wchar.h
 wctype.h
+malloc.c
Index: gnulib/lib/Makefile.am
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/lib/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- gnulib/lib/Makefile.am      23 Jul 2007 14:23:07 -0000      1.17
+++ gnulib/lib/Makefile.am      8 Oct 2007 18:22:27 -0000       1.18
@@ -257,6 +257,15 @@
 
 ## end   gnulib module localcharset
 
+## begin gnulib module malloc-posix
+
+
+EXTRA_DIST += malloc.c
+
+EXTRA_libgnu_a_SOURCES += malloc.c
+
+## end   gnulib module malloc-posix
+
 ## begin gnulib module malloca
 
 libgnu_a_SOURCES += malloca.c
@@ -358,11 +367,17 @@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
              -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+             -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
+             -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
+             -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
              -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
              -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
              -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+             -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \
              -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
+             -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \
              -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
+             -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \
              -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
              -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
              < $(srcdir)/stdlib_.h; \
Index: gnulib/lib/stdlib_.h
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/lib/stdlib_.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gnulib/lib/stdlib_.h        25 Jun 2007 21:16:32 -0000      1.2
+++ gnulib/lib/stdlib_.h        8 Oct 2007 18:22:27 -0000       1.3
@@ -55,6 +55,51 @@
 #endif
 
 
+#if @GNULIB_MALLOC_POSIX@
+# if address@hidden@
+#  undef malloc
+#  define malloc rpl_malloc
+extern void * malloc (size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef malloc
+# define malloc(s) \
+    (GL_LINK_WARNING ("malloc is not POSIX compliant everywhere - " \
+                      "use gnulib module malloc-posix for portability"), \
+     malloc (s))
+#endif
+
+
+#if @GNULIB_REALLOC_POSIX@
+# if address@hidden@
+#  undef realloc
+#  define realloc rpl_realloc
+extern void * realloc (void *ptr, size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef realloc
+# define realloc(p,s) \
+    (GL_LINK_WARNING ("realloc is not POSIX compliant everywhere - " \
+                      "use gnulib module realloc-posix for portability"), \
+     realloc (p, s))
+#endif
+
+
+#if @GNULIB_CALLOC_POSIX@
+# if address@hidden@
+#  undef calloc
+#  define calloc rpl_calloc
+extern void * calloc (size_t nmemb, size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef calloc
+# define calloc(n,s) \
+    (GL_LINK_WARNING ("calloc is not POSIX compliant everywhere - " \
+                      "use gnulib module calloc-posix for portability"), \
+     calloc (n, s))
+#endif
+
+
 #if @GNULIB_GETSUBOPT@
 /* Assuming *OPTIONP is a comma separated list of elements of the form
    "token" or "token=value", getsubopt parses the first of these elements.
Index: gnulib/m4/extensions.m4
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/m4/extensions.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gnulib/m4/extensions.m4     15 Oct 2006 21:09:15 -0000      1.1
+++ gnulib/m4/extensions.m4     8 Oct 2007 18:22:27 -0000       1.2
@@ -1,14 +1,14 @@
-# serial 4  -*- Autoconf -*-
+# serial 5  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
 # Autoconf.  Perhaps we can remove this once we can assume Autoconf
-# 2.61 or later everywhere, but since CVS Autoconf mutates rapidly
+# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
 # enough in this area it's likely we'll need to redefine
 # AC_USE_SYSTEM_EXTENSIONS for quite some time.
 
@@ -16,26 +16,48 @@
 # ------------------------
 # Enable extensions on systems that normally disable them,
 # typically due to standards-conformance issues.
+# Remember that #undef in AH_VERBATIM gets replaced with #define by
+# AC_DEFINE.  The goal here is to define all known feature-enabling
+# macros, then, if reports of conflicts are made, disable macros that
+# cause problems on some platforms (such as __EXTENSIONS__).
 AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-[
-  AC_BEFORE([$0], [AC_COMPILE_IFELSE])
-  AC_BEFORE([$0], [AC_RUN_IFELSE])
-
-  AC_REQUIRE([AC_GNU_SOURCE])
-  AC_REQUIRE([AC_AIX])
-  AC_REQUIRE([AC_MINIX])
+[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+
+  AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
+  if test "$MINIX" = yes; then
+    AC_DEFINE([_POSIX_SOURCE], [1],
+      [Define to 1 if you need to in order for `stat' and other
+       things to work.])
+    AC_DEFINE([_POSIX_1_SOURCE], [2],
+      [Define to 2 if the system does not provide POSIX.1 features
+       except with this defined.])
+    AC_DEFINE([_MINIX], [1],
+      [Define to 1 if on MINIX.])
+  fi
 
   AH_VERBATIM([__EXTENSIONS__],
-[/* Enable extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
+[/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
 #endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
+/* Enable extensions on HP NonStop.  */
 #ifndef _TANDEM_SOURCE
 # undef _TANDEM_SOURCE
-#endif])
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+])
   AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
     [ac_cv_safe_to_define___extensions__],
     [AC_COMPILE_IFELSE(
@@ -46,9 +68,11 @@
        [ac_cv_safe_to_define___extensions__=no])])
   test $ac_cv_safe_to_define___extensions__ = yes &&
     AC_DEFINE([__EXTENSIONS__])
+  AC_DEFINE([_ALL_SOURCE])
+  AC_DEFINE([_GNU_SOURCE])
   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
   AC_DEFINE([_TANDEM_SOURCE])
-])
+])# AC_USE_SYSTEM_EXTENSIONS
 
 # gl_USE_SYSTEM_EXTENSIONS
 # ------------------------
Index: gnulib/m4/gnulib-comp.m4
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/m4/gnulib-comp.m4,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- gnulib/m4/gnulib-comp.m4    15 Jul 2007 22:30:27 -0000      1.15
+++ gnulib/m4/gnulib-comp.m4    8 Oct 2007 18:22:27 -0000       1.16
@@ -53,6 +53,8 @@
   gl_FUNC_GETTIMEOFDAY
   gl_INLINE
   gl_LOCALCHARSET
+  gl_FUNC_MALLOC_POSIX
+  gl_STDLIB_MODULE_INDICATOR([malloc-posix])
   gl_MALLOCA
   gl_MBSWIDTH
   gl_FUNC_MEMCPY
@@ -136,6 +138,7 @@
   lib/gettimeofday.c
   lib/localcharset.c
   lib/localcharset.h
+  lib/malloc.c
   lib/malloca.c
   lib/malloca.h
   lib/malloca.valgrind
@@ -204,6 +207,7 @@
   m4/localcharset.m4
   m4/lock.m4
   m4/longlong.m4
+  m4/malloc.m4
   m4/malloca.m4
   m4/mbrtowc.m4
   m4/mbstate_t.m4
Index: gnulib/m4/lock.m4
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/m4/lock.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gnulib/m4/lock.m4   31 Oct 2006 19:34:00 -0000      1.3
+++ gnulib/m4/lock.m4   8 Oct 2007 18:22:27 -0000       1.4
@@ -1,5 +1,5 @@
-# lock.m4 serial 6 (gettext-0.16)
-dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
+# lock.m4 serial 7 (gettext-0.16.2)
+dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -35,7 +35,12 @@
   AC_BEFORE([$0], [gl_ARGP])dnl
 
   AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems
+  dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
+  dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
+  dnl AC_GNU_SOURCE.
+  m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
+    [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
+    [AC_REQUIRE([AC_GNU_SOURCE])])
   dnl Check for multithreading.
   AC_ARG_ENABLE(threads,
 AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify 
multithreading API])
Index: gnulib/m4/stdlib_h.m4
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/m4/stdlib_h.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gnulib/m4/stdlib_h.m4       25 Jun 2007 21:16:33 -0000      1.2
+++ gnulib/m4/stdlib_h.m4       8 Oct 2007 18:22:27 -0000       1.3
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 2
+# stdlib_h.m4 serial 3
 dnl Copyright (C) 2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -19,11 +19,17 @@
 
 AC_DEFUN([gl_STDLIB_H_DEFAULTS],
 [
-  GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
-  GNULIB_MKDTEMP=0;   AC_SUBST([GNULIB_MKDTEMP])
-  GNULIB_MKSTEMP=0;   AC_SUBST([GNULIB_MKSTEMP])
+  GNULIB_MALLOC_POSIX=0;  AC_SUBST([GNULIB_MALLOC_POSIX])
+  GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
+  GNULIB_CALLOC_POSIX=0;  AC_SUBST([GNULIB_CALLOC_POSIX])
+  GNULIB_GETSUBOPT=0;     AC_SUBST([GNULIB_GETSUBOPT])
+  GNULIB_MKDTEMP=0;       AC_SUBST([GNULIB_MKDTEMP])
+  GNULIB_MKSTEMP=0;       AC_SUBST([GNULIB_MKSTEMP])
   dnl Assume proper GNU behavior unless another module says otherwise.
-  HAVE_GETSUBOPT=1;   AC_SUBST([HAVE_GETSUBOPT])
-  HAVE_MKDTEMP=1;     AC_SUBST([HAVE_MKDTEMP])
-  REPLACE_MKSTEMP=0;  AC_SUBST([REPLACE_MKSTEMP])
+  HAVE_CALLOC_POSIX=1;    AC_SUBST([HAVE_CALLOC_POSIX])
+  HAVE_GETSUBOPT=1;       AC_SUBST([HAVE_GETSUBOPT])
+  HAVE_MALLOC_POSIX=1;    AC_SUBST([HAVE_MALLOC_POSIX])
+  HAVE_MKDTEMP=1;         AC_SUBST([HAVE_MKDTEMP])
+  HAVE_REALLOC_POSIX=1;   AC_SUBST([HAVE_REALLOC_POSIX])
+  REPLACE_MKSTEMP=0;      AC_SUBST([REPLACE_MKSTEMP])
 ])
Index: gnulib/m4/wcwidth.m4
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/m4/wcwidth.m4,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gnulib/m4/wcwidth.m4        15 Jul 2007 22:30:27 -0000      1.7
+++ gnulib/m4/wcwidth.m4        8 Oct 2007 18:22:27 -0000       1.8
@@ -1,4 +1,4 @@
-# wcwidth.m4 serial 11
+# wcwidth.m4 serial 12
 dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,7 @@
   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
 
   dnl Persuade glibc <wchar.h> to declare wcwidth().
-  AC_REQUIRE([AC_GNU_SOURCE])
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
Index: makeinfo/lang.c
===================================================================
RCS file: /sources/texinfo/texinfo/makeinfo/lang.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- makeinfo/lang.c     16 Aug 2007 17:42:20 -0000      1.32
+++ makeinfo/lang.c     8 Oct 2007 18:22:27 -0000       1.33
@@ -1,5 +1,5 @@
 /* lang.c -- language-dependent support.
-   $Id: lang.c,v 1.32 2007/08/16 17:42:20 karl Exp $
+   $Id: lang.c,v 1.33 2007/10/08 18:22:27 karl Exp $
 
    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
    Free Software Foundation, Inc.
@@ -486,12 +486,273 @@
   { ISO_8859_15, "iso-8859-15", (iso_map_type *) iso8859_15_map },
   { KOI8_R,      "koi8-r",      (iso_map_type *) koi8_map },
   { KOI8_U,      "koi8-u",      (iso_map_type *) koi8_map },
-  { UTF_8,       "utf-8",       asis_map },  /* fixxme: much more needed */
+  { UTF_8,       "utf-8",       asis_map },  /* specific code for this below */
   { last_encoding_code, NULL, NULL }
 };
 
 
-/* To update this list, download the current language table from
+/* List of HTML entities.  */
+static struct { const char *html; unsigned int unicode; } unicode_map[] = {
+/* Extracted from http://www.w3.org/TR/html401/sgml/entities.html through
+   sed -n -e 's|<!ENTITY \([^ ][^ ]*\) *CDATA "[&]#\([0-9][0-9]*\);".*|  { 
"\1", \2 },|p'
+   | LC_ALL=C sort -k2  */
+  { "AElig",     198 },
+  { "Aacute",    193 },
+  { "Acirc",     194 },
+  { "Agrave",    192 },
+  { "Alpha",     913 },
+  { "Aring",     197 },
+  { "Atilde",    195 },
+  { "Auml",      196 },
+  { "Beta",      914 },
+  { "Ccedil",    199 },
+  { "Chi",       935 },
+  { "Dagger",   8225 },
+  { "Delta",     916 },
+  { "ETH",       208 },
+  { "Eacute",    201 },
+  { "Ecirc",     202 },
+  { "Egrave",    200 },
+  { "Epsilon",   917 },
+  { "Eta",       919 },
+  { "Euml",      203 },
+  { "Gamma",     915 },
+  { "Iacute",    205 },
+  { "Icirc",     206 },
+  { "Igrave",    204 },
+  { "Iota",      921 },
+  { "Iuml",      207 },
+  { "Kappa",     922 },
+  { "Lambda",    923 },
+  { "Mu",        924 },
+  { "Ntilde",    209 },
+  { "Nu",        925 },
+  { "OElig",     338 },
+  { "Oacute",    211 },
+  { "Ocirc",     212 },
+  { "Ograve",    210 },
+  { "Omega",     937 },
+  { "Omicron",   927 },
+  { "Oslash",    216 },
+  { "Otilde",    213 },
+  { "Ouml",      214 },
+  { "Phi",       934 },
+  { "Pi",        928 },
+  { "Prime",    8243 },
+  { "Psi",       936 },
+  { "Rho",       929 },
+  { "Scaron",    352 },
+  { "Sigma",     931 },
+  { "THORN",     222 },
+  { "Tau",       932 },
+  { "Theta",     920 },
+  { "Uacute",    218 },
+  { "Ucirc",     219 },
+  { "Ugrave",    217 },
+  { "Upsilon",   933 },
+  { "Uuml",      220 },
+  { "Xi",        926 },
+  { "Yacute",    221 },
+  { "Yuml",      376 },
+  { "Zeta",      918 },
+  { "aacute",    225 },
+  { "acirc",     226 },
+  { "acute",     180 },
+  { "aelig",     230 },
+  { "agrave",    224 },
+  { "alefsym",  8501 },
+  { "alpha",     945 },
+  { "amp",        38 },
+  { "and",      8743 },
+  { "ang",      8736 },
+  { "aring",     229 },
+  { "asymp",    8776 },
+  { "atilde",    227 },
+  { "auml",      228 },
+  { "bdquo",    8222 },
+  { "beta",      946 },
+  { "brvbar",    166 },
+  { "bull",     8226 },
+  { "cap",      8745 },
+  { "ccedil",    231 },
+  { "cedil",     184 },
+  { "cent",      162 },
+  { "chi",       967 },
+  { "circ",      710 },
+  { "clubs",    9827 },
+  { "cong",     8773 },
+  { "copy",      169 },
+  { "crarr",    8629 },
+  { "cup",      8746 },
+  { "curren",    164 },
+  { "dArr",     8659 },
+  { "dagger",   8224 },
+  { "darr",     8595 },
+  { "deg",       176 },
+  { "delta",     948 },
+  { "diams",    9830 },
+  { "divide",    247 },
+  { "eacute",    233 },
+  { "ecirc",     234 },
+  { "egrave",    232 },
+  { "empty",    8709 },
+  { "emsp",     8195 },
+  { "ensp",     8194 },
+  { "epsilon",   949 },
+  { "equiv",    8801 },
+  { "eta",       951 },
+  { "eth",       240 },
+  { "euml",      235 },
+  { "euro",     8364 },
+  { "exist",    8707 },
+  { "fnof",      402 },
+  { "forall",   8704 },
+  { "frac12",    189 },
+  { "frac14",    188 },
+  { "frac34",    190 },
+  { "frasl",    8260 },
+  { "gamma",     947 },
+  { "ge",       8805 },
+  { "gt",         62 },
+  { "hArr",     8660 },
+  { "harr",     8596 },
+  { "hearts",   9829 },
+  { "hellip",   8230 },
+  { "iacute",    237 },
+  { "icirc",     238 },
+  { "iexcl",     161 },
+  { "igrave",    236 },
+  { "image",    8465 },
+  { "infin",    8734 },
+  { "int",      8747 },
+  { "iota",      953 },
+  { "iquest",    191 },
+  { "isin",     8712 },
+  { "iuml",      239 },
+  { "kappa",     954 },
+  { "lArr",     8656 },
+  { "lambda",    955 },
+  { "lang",     9001 },
+  { "laquo",     171 },
+  { "larr",     8592 },
+  { "lceil",    8968 },
+  { "ldquo",    8220 },
+  { "le",       8804 },
+  { "lfloor",   8970 },
+  { "lowast",   8727 },
+  { "loz",      9674 },
+  { "lrm",      8206 },
+  { "lsaquo",   8249 },
+  { "lsquo",    8216 },
+  { "lt",         60 },
+  { "macr",      175 },
+  { "mdash",    8212 },
+  { "micro",     181 },
+  { "middot",    183 },
+  { "minus",    8722 },
+  { "mu",        956 },
+  { "nabla",    8711 },
+  { "nbsp",      160 },
+  { "ndash",    8211 },
+  { "ne",       8800 },
+  { "ni",       8715 },
+  { "not",       172 },
+  { "notin",    8713 },
+  { "nsub",     8836 },
+  { "ntilde",    241 },
+  { "nu",        957 },
+  { "oacute",    243 },
+  { "ocirc",     244 },
+  { "oelig",     339 },
+  { "ograve",    242 },
+  { "oline",    8254 },
+  { "omega",     969 },
+  { "omicron",   959 },
+  { "oplus",    8853 },
+  { "or",       8744 },
+  { "ordf",      170 },
+  { "ordm",      186 },
+  { "oslash",    248 },
+  { "otilde",    245 },
+  { "otimes",   8855 },
+  { "ouml",      246 },
+  { "para",      182 },
+  { "part",     8706 },
+  { "permil",   8240 },
+  { "perp",     8869 },
+  { "phi",       966 },
+  { "pi",        960 },
+  { "piv",       982 },
+  { "plusmn",    177 },
+  { "pound",     163 },
+  { "prime",    8242 },
+  { "prod",     8719 },
+  { "prop",     8733 },
+  { "psi",       968 },
+  { "quot",       34 },
+  { "rArr",     8658 },
+  { "radic",    8730 },
+  { "rang",     9002 },
+  { "raquo",     187 },
+  { "rarr",     8594 },
+  { "rceil",    8969 },
+  { "rdquo",    8221 },
+  { "real",     8476 },
+  { "reg",       174 },
+  { "rfloor",   8971 },
+  { "rho",       961 },
+  { "rlm",      8207 },
+  { "rsaquo",   8250 },
+  { "rsquo",    8217 },
+  { "sbquo",    8218 },
+  { "scaron",    353 },
+  { "sdot",     8901 },
+  { "sect",      167 },
+  { "shy",       173 },
+  { "sigma",     963 },
+  { "sigmaf",    962 },
+  { "sim",      8764 },
+  { "spades",   9824 },
+  { "sub",      8834 },
+  { "sube",     8838 },
+  { "sum",      8721 },
+  { "sup",      8835 },
+  { "sup1",      185 },
+  { "sup2",      178 },
+  { "sup3",      179 },
+  { "supe",     8839 },
+  { "szlig",     223 },
+  { "tau",       964 },
+  { "there4",   8756 },
+  { "theta",     952 },
+  { "thetasym",  977 },
+  { "thinsp",   8201 },
+  { "thorn",     254 },
+  { "tilde",     732 },
+  { "times",     215 },
+  { "trade",    8482 },
+  { "uArr",     8657 },
+  { "uacute",    250 },
+  { "uarr",     8593 },
+  { "ucirc",     251 },
+  { "ugrave",    249 },
+  { "uml",       168 },
+  { "upsih",     978 },
+  { "upsilon",   965 },
+  { "uuml",      252 },
+  { "weierp",   8472 },
+  { "xi",        958 },
+  { "yacute",    253 },
+  { "yen",       165 },
+  { "yuml",      255 },
+  { "zeta",      950 },
+  { "zwj",      8205 },
+  { "zwnj",     8204 }
+};
+ 
+
+
+/* To update this list of language codes, download the current data from
    http://www.loc.gov/standards/iso639-2; specifically,
    http://www.loc.gov/standards/iso639-2/ISO-639-2_values_8bits-8559-1.txt.
    Run cut -d\| -f 3,4 <ISO-639-2_values_8bits-8559-1.txt | sort -u >/tmp/639.2
@@ -1051,20 +1312,48 @@
 static int
 cm_search_iso_map (char *html)
 {
-  int i;
-  iso_map_type *iso = encoding_table[document_encoding_code].isotab;
+  if (document_encoding_code == UTF_8)
+    {
+      /* Binary search in unicode_map.  */
+      size_t low = 0;
+      size_t high = sizeof (unicode_map) / sizeof (unicode_map[0]);
+
+      /* At each loop iteration, low < high; for indices < low the values are
+         smaller than HTML; for indices >= high the values are greater than 
HTML.
+         So, if HTML occurs in the list, it is at  low <= position < high.  */
+      do
+        {
+          size_t mid = low + (high - low) / 2; /* low <= mid < high */
+          int cmp = strcmp (unicode_map[mid].html, html);
 
-  /* If no conversion table for this encoding, quit.  */
-  if (!iso)
-    return -1;
+          if (cmp < 0)
+            low = mid + 1;
+          else if (cmp > 0)
+            high = mid;
+          else /* cmp == 0 */
+            return unicode_map[mid].unicode;
+        }
+      while (low < high);
 
-  for (i = 0; iso[i].html; i++)
-    {
-      if (strcmp (html, iso[i].html) == 0)
-        return i;
+      return -1;
     }
+  else
+    {
+      int i;
+      iso_map_type *iso = encoding_table[document_encoding_code].isotab;
+
+      /* If no conversion table for this encoding, quit.  */
+      if (!iso)
+        return -1;
 
-  return -1;
+      for (i = 0; iso[i].html; i++)
+        {
+          if (strcmp (html, iso[i].html) == 0)
+            return i;
+        }
+
+      return -1;
+    }
 }
 
 
@@ -1146,6 +1435,39 @@
 }
 
 
+/* Add RC per the current encoding.  */
+
+static void
+add_encoded_char_from_code (int rc)
+{
+  if (document_encoding_code == UTF_8)
+    {
+      if (rc < 0x80)
+        add_char (rc);
+      else if (rc < 0x800)
+        {
+          add_char (0xc0 | (rc >> 6));
+          add_char (0x80 | (rc & 0x3f));
+        }
+      else if (rc < 0x10000)
+        {
+          add_char (0xe0 | (rc >> 12));
+          add_char (0x80 | ((rc >> 6) & 0x3f));
+          add_char (0x80 | (rc & 0x3f));
+        }
+      else
+        {
+          add_char (0xf0 | (rc >> 18));
+          add_char (0x80 | ((rc >> 12) & 0x3f));
+          add_char (0x80 | ((rc >> 6) & 0x3f));
+          add_char (0x80 | (rc & 0x3f));
+        }
+    }
+  else
+    add_char (encoding_table[document_encoding_code].isotab[rc].bytecode);
+}
+
+
 /* If html or xml output, add &HTML_STR; to the output.  If not html and
    the user requested encoded output, add the real 8-bit character
    corresponding to HTML_STR from the translation tables.  Otherwise,
@@ -1164,7 +1486,7 @@
       int rc = cm_search_iso_map (html_str);
       if (rc >= 0)
         /* We found it, add the real character.  */
-        add_char (encoding_table[document_encoding_code].isotab[rc].bytecode);
+        add_encoded_char_from_code (rc);
       else
         { /* We didn't find it, that seems bad.  */
           warning (_("invalid encoded character `%s'"), html_str);
@@ -1268,13 +1590,13 @@
 
           rc = cm_search_iso_map (buffer);
           if (rc >= 0)
-            /* A little bit tricky ;-)
-               Here we replace the character which has
-               been inserted in read_command with
-               the value we have found in converting table
-               Does there exist a better way to do this?  kama. */
-            output_paragraph[end - 1]
-              = encoding_table[document_encoding_code].isotab[rc].bytecode;
+            {
+              /* Here we replace the character which has
+                 been inserted in read_command with
+                 the value we have found in the conversion table.  */
+              output_paragraph_offset--;
+              add_encoded_char_from_code (rc);
+            }
           else
             { /* If we didn't find a translation for this character,
                  put the single instead. E.g., &Xuml; does not exist so X&uml;
Index: util/defs.in
===================================================================
RCS file: /sources/texinfo/texinfo/util/defs.in,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- util/defs.in        18 Sep 2007 00:49:25 -0000      1.12
+++ util/defs.in        8 Oct 2007 18:22:27 -0000       1.13
@@ -65,12 +65,19 @@
 # Make sure we override the user shell.
 SHELL='@SHELL@'
 export SHELL
-test -z "$TEXI2DVI" && TEXI2DVI=`cd $srcdir && pwd`/texi2dvi
 
-echo $PATH
+srcdir_abs=`cd $srcdir && pwd`
+test -z "$TEXI2DVI" && TEXI2DVI=$srcdir_abs/texi2dvi
+
+# be sure we use texi2dvi and texindex from our own directory, not
+# whatever happens to be in the path.
+echo "defs: prepending $srcdir_abs to PATH for testing."
+PATH=$srcdir_abs:$PATH
+
 # Some shells forget to export modified environment variables.
 # (See note about `export' in the Autoconf manual.)
 export PATH
+
 # User can override various tools used.
 test -z "$PERL" && PERL='@PERL@'
 
@@ -198,7 +205,6 @@
     set x --debug --verbose ${1+"$@"}
     shift
   fi
-  type texi2dvi
   texi2dvi ${1+"$@"} 2>stderr >stdout || exitcode=$?
   cat stderr
   cat stdout
Index: util/dir-example
===================================================================
RCS file: /sources/texinfo/texinfo/util/dir-example,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- util/dir-example    12 Jul 2007 22:34:23 -0000      1.73
+++ util/dir-example    8 Oct 2007 18:22:27 -0000       1.74
@@ -10,7 +10,7 @@
 If you have dir entries for Texinfo manuals you'd like to be added here,
   please send them to address@hidden
 
-$Id: dir-example,v 1.73 2007/07/12 22:34:23 karl Exp $
+$Id: dir-example,v 1.74 2007/10/08 18:22:27 karl Exp $
 
 File: dir,     Node: Top,      This is the top of the INFO tree.
 
@@ -213,7 +213,7 @@
 
 GNU organization
 * Maintain: (maintain).         GNU maintainer guidelines.
-* Standards: (standards).       GNU coding standards.
+* Standards: (standards).        GNU coding standards.
 * Tasks: (tasks).               GNU task list.
 
 GNU music project
P ChangeLog
P doc/version.texi
P gnulib/lib/.cvsignore
P gnulib/lib/Makefile.am
P gnulib/lib/stdlib_.h
U gnulib/m4/.cvsignore
P gnulib/m4/extensions.m4
P gnulib/m4/gnulib-comp.m4
P gnulib/m4/lock.m4
P gnulib/m4/stdlib_h.m4
P gnulib/m4/wcwidth.m4
P makeinfo/lang.c
P util/defs.in
P util/dir-example




reply via email to

[Prev in Thread] Current Thread [Next in Thread]