mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-14 05:14:12 +08:00
Merge GNU Classpath libgcj-snapshot-20090102.
2009-01-06 Andrew John Hughes <gnu_andrew@member.fsf.org> Import GNU Classpath (libgcj-snapshot-20090102). * libjava/classpath/lib/java/text/RuleBasedCollator$CollationSorter.class, * libjava/classpath/lib/java/text/MessageFormat$MessageFormatElement.class, * libjava/classpath/lib/java/text/MessageFormat.class, * libjava/classpath/lib/java/text/SimpleDateFormat.class, * libjava/classpath/lib/java/text/NumberFormat.class, * libjava/classpath/lib/java/text/RuleBasedCollator$CollationElement.class, * libjava/classpath/lib/java/text/MessageFormat$Field.class, * libjava/classpath/lib/java/text/RuleBasedCollator.class, * libjava/classpath/lib/java/text/NumberFormat$Field.class, * libjava/classpath/lib/gnu/xml/transform/Bindings.class, * libjava/classpath/lib/gnu/java/locale/LocaleData.class, * libjava/classpath/lib/gnu/java/awt/peer/gtk/FreetypeGlyphVector.class, * libjava/classpath/lib/gnu/javax/crypto/jce/key/SecretKeyGeneratorImpl.class, * libjava/gnu/java/awt/peer/gtk/FreetypeGlyphVector.h, * libjava/java/text/MessageFormat.h, * libjava/java/text/RuleBasedCollator$CollationSorter.h, * libjava/java/text/RuleBasedCollator.h, * libjava/java/text/SimpleDateFormat.h: Regenerated. 2009-01-02 Andrew John Hughes <gnu_andrew@member.fsf.org> * ChangeLog-2008: New file. 2009-01-02 Andrew John Hughes <gnu_andrew@member.fsf.org> * java/text/MessageFormat.java: (setLocale(Locale)): Integer format should use NumberFormat.getIntegerInstance. libjava/classpath/ChangeLog-2008 2008-12-31 Andrew John Hughes <gnu_andrew@member.fsf.org> * java/text/MessageFormat.java: (parse(String,ParsePosition)): Emulate behaviour of Vector's setSize() which was being implicitly relied on. 2008-12-31 Andrew John Hughes <gnu_andrew@member.fsf.org> * java/text/SimpleDateFormat.java: Remove superfluous empty line introduced in last commit. 2008-12-31 Andrew John Hughes <gnu_andrew@member.fsf.org> * java/text/MessageFormat.java: Convert variables to use generic types, use CPStringBuilder in place of StringBuilder. (Field()): Suppress warning due to only being used by deserialization. (scanFormat(String,int,CPStringBuilder,List,Locale)): Use ArrayList instead of Vector as no synchronisation needed. (parse(String,ParsePosition)): Likewise. * java/text/NumberFormat.java: (Field()): Suppress warning due to only being used by deserialization. * java/text/RuleBasedCollator.java: Convert variables to use generic types. (CollationElement): Make fields final. (CollationSorter): Likewise. (CollationSorter(int,String,int,boolean)): New constructor. * java/text/SimpleDateFormat.java, Convert variables to use generic types. (applyPattern(String)): Clear list rather than creating a new instance. 2008-12-30 Andrew John Hughes <gnu_andrew@member.fsf.org> * java/text/SimpleDateFormat.java: (standardChars): Use standard characters from CLDR. (RFC822_TIMEZONE_FIELD): Fixed to match new standard characters. 2008-12-22 Andrew John Hughes <gnu_andrew@member.fsf.org> * java/lang/String.java: (byte[],int,int,String): Call new Charset method. (stringToCharset(String)): Private method added to handle exception conversion. (byte[],int,int,Charset): Implemented. (byte[], Charset): Likewise. (getBytes(String)): Call new Charset method. (getBytes(Charset)): Implemented. 2008-12-18 Andrew John Hughes <gnu_andrew@member.fsf.org> * native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c: Include '\0' in the string. 2008-12-09 Andrew John Hughes <gnu_andrew@member.fsf.org> PR classpath/38473: * native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c: (Java_gnu_java_awt_peer_gtk_FreetypeGlyphVector_getGlyphOutlineNative): Check that the glyph is an outline before calling FT_Outline_Decompose. 2008-11-16 Andrew John Hughes <gnu_andrew@member.fsf.org> * gnu/xml/transform/Bindings.java: Add generics to collections. 2008-11-16 Andrew John Hughes <gnu_andrew@member.fsf.org> * gnu/javax/crypto/jce/key/SecretKeyGeneratorImpl.java: (init(int,SecureRandom)): Improve exception message. 2008-11-06 Mark Wielaard <mark@klomp.org> * native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c (getKerning): Removed unused cls, method, values. 2008-11-05 Andrew Haley <aph@redhat.com> * gnu/java/awt/peer/gtk/FreetypeGlyphVector.java (getKerning): Return result in a float[], not a Point2D. (performDefaultLayout): Call getKerning with a float[]. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c (getKerning): Return result in a float[], not a Point2D. 2008-11-05 Andrew Haley <aph@redhat.com> * tools/Makefile.am (UPDATE_TOOLS_ZIP, CREATE_TOOLS_ZIP): Exclude .svn direcories. 2008-10-23 David Edelsohn <edelsohn@gnu.org> * native/fdlibm/fdlibm.h: Undef hz. 2008-10-20 Andrew John Hughes <gnu_andrew@member.fsf.org> * m4/ac_prog_antlr.m4: Remove redundant checks. * tools/Makefile.am: Use gjdoc_gendir when calling antlr. 2008-10-17 Robert Lougher <rob.lougher@gmail.com> * native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c (Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector): Release 'fonts'. 2008-10-16 Tom Tromey <tromey@redhat.com> * tools/gnu/classpath/tools/jar/WorkSet.java (initSet): Use foreach. Change argument type. (WorkSet): Change argument type. * tools/gnu/classpath/tools/jar/Indexer.java (indexJarFile): Use foreach. * tools/gnu/classpath/tools/jar/Creator.java (writeCommandLineEntries): Use foreach. (getAllEntries): Likewise. 2008-10-15 Andrew John Hughes <gnu_andrew@member.fsf.org> * configure.ac: Remove superfluous AC_PROG_JAVA call. From-SVN: r143139
This commit is contained in:
parent
5e5debf66a
commit
c10bf728da
@ -1,3 +1,27 @@
|
|||||||
|
2009-01-06 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
|
Import GNU Classpath (libgcj-snapshot-20090102).
|
||||||
|
|
||||||
|
* libjava/classpath/lib/java/text/RuleBasedCollator$CollationSorter.class,
|
||||||
|
* libjava/classpath/lib/java/text/MessageFormat$MessageFormatElement.class,
|
||||||
|
* libjava/classpath/lib/java/text/MessageFormat.class,
|
||||||
|
* libjava/classpath/lib/java/text/SimpleDateFormat.class,
|
||||||
|
* libjava/classpath/lib/java/text/NumberFormat.class,
|
||||||
|
* libjava/classpath/lib/java/text/RuleBasedCollator$CollationElement.class,
|
||||||
|
* libjava/classpath/lib/java/text/MessageFormat$Field.class,
|
||||||
|
* libjava/classpath/lib/java/text/RuleBasedCollator.class,
|
||||||
|
* libjava/classpath/lib/java/text/NumberFormat$Field.class,
|
||||||
|
* libjava/classpath/lib/gnu/xml/transform/Bindings.class,
|
||||||
|
* libjava/classpath/lib/gnu/java/locale/LocaleData.class,
|
||||||
|
* libjava/classpath/lib/gnu/java/awt/peer/gtk/FreetypeGlyphVector.class,
|
||||||
|
* libjava/classpath/lib/gnu/javax/crypto/jce/key/SecretKeyGeneratorImpl.class,
|
||||||
|
* libjava/gnu/java/awt/peer/gtk/FreetypeGlyphVector.h,
|
||||||
|
* libjava/java/text/MessageFormat.h,
|
||||||
|
* libjava/java/text/RuleBasedCollator$CollationSorter.h,
|
||||||
|
* libjava/java/text/RuleBasedCollator.h,
|
||||||
|
* libjava/java/text/SimpleDateFormat.h:
|
||||||
|
Regenerated.
|
||||||
|
|
||||||
2008-12-21 Andrew Pinski <pinskia@gmail.com>
|
2008-12-21 Andrew Pinski <pinskia@gmail.com>
|
||||||
|
|
||||||
PR target/38300
|
PR target/38300
|
||||||
|
File diff suppressed because it is too large
Load Diff
4443
libjava/classpath/ChangeLog-2008
Normal file
4443
libjava/classpath/ChangeLog-2008
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,7 @@
|
|||||||
|
2008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||||
|
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2008-11-12 Jakub Jelinek <jakub@redhat.com>
|
2008-11-12 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR libgcj/33764
|
PR libgcj/33764
|
||||||
@ -7,6 +11,12 @@
|
|||||||
* configure: Regenerated.
|
* configure: Regenerated.
|
||||||
* tools/Makefile.in: Regenerated.
|
* tools/Makefile.in: Regenerated.
|
||||||
|
|
||||||
|
2008-11-10 Andrew Haley <aph@redhat.com>
|
||||||
|
|
||||||
|
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
|
||||||
|
(Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector):
|
||||||
|
Remove bogus gdk_threads_leave ();
|
||||||
|
|
||||||
2008-10-23 Jakub Jelinek <jakub@redhat.com>
|
2008-10-23 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR java/37893
|
PR java/37893
|
||||||
|
@ -2,15 +2,15 @@ Installation Instructions
|
|||||||
*************************
|
*************************
|
||||||
|
|
||||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||||
2006, 2007 Free Software Foundation, Inc.
|
2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is free documentation; the Free Software Foundation gives
|
This file is free documentation; the Free Software Foundation gives
|
||||||
unlimited permission to copy, distribute and modify it.
|
unlimited permission to copy, distribute and modify it.
|
||||||
|
|
||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Briefly, the shell commands `./configure; make; make install' should
|
Briefly, the shell commands `./configure; make; make install' should
|
||||||
configure, build, and install this package. The following
|
configure, build, and install this package. The following
|
||||||
more-detailed instructions are generic; see the `README' file for
|
more-detailed instructions are generic; see the `README' file for
|
||||||
instructions specific to this package.
|
instructions specific to this package.
|
||||||
@ -73,9 +73,9 @@ The simplest way to compile this package is:
|
|||||||
Compilers and Options
|
Compilers and Options
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Some systems require unusual options for compilation or linking that the
|
Some systems require unusual options for compilation or linking that
|
||||||
`configure' script does not know about. Run `./configure --help' for
|
the `configure' script does not know about. Run `./configure --help'
|
||||||
details on some of the pertinent environment variables.
|
for details on some of the pertinent environment variables.
|
||||||
|
|
||||||
You can give `configure' initial values for configuration parameters
|
You can give `configure' initial values for configuration parameters
|
||||||
by setting variables in the command line or in the environment. Here
|
by setting variables in the command line or in the environment. Here
|
||||||
@ -88,7 +88,7 @@ is an example:
|
|||||||
Compiling For Multiple Architectures
|
Compiling For Multiple Architectures
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
You can compile the package for more than one kind of computer at the
|
You can compile the package for more than one kind of computer at the
|
||||||
same time, by placing the object files for each architecture in their
|
same time, by placing the object files for each architecture in their
|
||||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||||
directory where you want the object files and executables to go and run
|
directory where you want the object files and executables to go and run
|
||||||
@ -100,10 +100,24 @@ architecture at a time in the source code directory. After you have
|
|||||||
installed the package for one architecture, use `make distclean' before
|
installed the package for one architecture, use `make distclean' before
|
||||||
reconfiguring for another architecture.
|
reconfiguring for another architecture.
|
||||||
|
|
||||||
|
On MacOS X 10.5 and later systems, you can create libraries and
|
||||||
|
executables that work on multiple system types--known as "fat" or
|
||||||
|
"universal" binaries--by specifying multiple `-arch' options to the
|
||||||
|
compiler but only a single `-arch' option to the preprocessor. Like
|
||||||
|
this:
|
||||||
|
|
||||||
|
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||||
|
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||||
|
CPP="gcc -E" CXXCPP="g++ -E"
|
||||||
|
|
||||||
|
This is not guaranteed to produce working output in all cases, you
|
||||||
|
may have to build one architecture at a time and combine the results
|
||||||
|
using the `lipo' tool if you have problems.
|
||||||
|
|
||||||
Installation Names
|
Installation Names
|
||||||
==================
|
==================
|
||||||
|
|
||||||
By default, `make install' installs the package's commands under
|
By default, `make install' installs the package's commands under
|
||||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||||
can specify an installation prefix other than `/usr/local' by giving
|
can specify an installation prefix other than `/usr/local' by giving
|
||||||
`configure' the option `--prefix=PREFIX'.
|
`configure' the option `--prefix=PREFIX'.
|
||||||
@ -126,7 +140,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
|||||||
Optional Features
|
Optional Features
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Some packages pay attention to `--enable-FEATURE' options to
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
`configure', where FEATURE indicates an optional part of the package.
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
is something like `gnu-as' or `x' (for the X Window System). The
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
@ -138,14 +152,36 @@ find the X include and library files automatically, but if it doesn't,
|
|||||||
you can use the `configure' options `--x-includes=DIR' and
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
`--x-libraries=DIR' to specify their locations.
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Particular systems
|
||||||
|
==================
|
||||||
|
|
||||||
|
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||||
|
CC is not installed, it is recommended to use the following options in
|
||||||
|
order to use an ANSI C compiler:
|
||||||
|
|
||||||
|
./configure CC="cc -Ae"
|
||||||
|
|
||||||
|
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||||
|
|
||||||
|
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||||
|
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||||
|
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||||
|
to try
|
||||||
|
|
||||||
|
./configure CC="cc"
|
||||||
|
|
||||||
|
and if that doesn't work, try
|
||||||
|
|
||||||
|
./configure CC="cc -nodtk"
|
||||||
|
|
||||||
Specifying the System Type
|
Specifying the System Type
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
There may be some features `configure' cannot figure out automatically,
|
There may be some features `configure' cannot figure out
|
||||||
but needs to determine by the type of machine the package will run on.
|
automatically, but needs to determine by the type of machine the package
|
||||||
Usually, assuming the package is built to be run on the _same_
|
will run on. Usually, assuming the package is built to be run on the
|
||||||
architectures, `configure' can figure that out, but if it prints a
|
_same_ architectures, `configure' can figure that out, but if it prints
|
||||||
message saying it cannot guess the machine type, give it the
|
a message saying it cannot guess the machine type, give it the
|
||||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
type, such as `sun4', or a canonical name which has the form:
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
@ -171,9 +207,9 @@ eventually be run) with `--host=TYPE'.
|
|||||||
Sharing Defaults
|
Sharing Defaults
|
||||||
================
|
================
|
||||||
|
|
||||||
If you want to set default values for `configure' scripts to share, you
|
If you want to set default values for `configure' scripts to share,
|
||||||
can create a site shell script called `config.site' that gives default
|
you can create a site shell script called `config.site' that gives
|
||||||
values for variables like `CC', `cache_file', and `prefix'.
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
`CONFIG_SITE' environment variable to the location of the site script.
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
@ -182,7 +218,7 @@ A warning: not all `configure' scripts look for a site script.
|
|||||||
Defining Variables
|
Defining Variables
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Variables not defined in a site shell script can be set in the
|
Variables not defined in a site shell script can be set in the
|
||||||
environment passed to `configure'. However, some packages may run
|
environment passed to `configure'. However, some packages may run
|
||||||
configure again during the build, and the customized values of these
|
configure again during the build, and the customized values of these
|
||||||
variables may be lost. In order to avoid this problem, you should set
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
@ -201,11 +237,19 @@ an Autoconf bug. Until the bug is fixed you can use this workaround:
|
|||||||
`configure' Invocation
|
`configure' Invocation
|
||||||
======================
|
======================
|
||||||
|
|
||||||
`configure' recognizes the following options to control how it operates.
|
`configure' recognizes the following options to control how it
|
||||||
|
operates.
|
||||||
|
|
||||||
`--help'
|
`--help'
|
||||||
`-h'
|
`-h'
|
||||||
Print a summary of the options to `configure', and exit.
|
Print a summary of all of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--help=short'
|
||||||
|
`--help=recursive'
|
||||||
|
Print a summary of the options unique to this package's
|
||||||
|
`configure', and exit. The `short' variant lists options used
|
||||||
|
only in the top level, while the `recursive' variant lists options
|
||||||
|
also present in any nested packages.
|
||||||
|
|
||||||
`--version'
|
`--version'
|
||||||
`-V'
|
`-V'
|
||||||
@ -232,6 +276,16 @@ an Autoconf bug. Until the bug is fixed you can use this workaround:
|
|||||||
Look for the package's source code in directory DIR. Usually
|
Look for the package's source code in directory DIR. Usually
|
||||||
`configure' can determine that directory automatically.
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`--prefix=DIR'
|
||||||
|
Use DIR as the installation prefix. *Note Installation Names::
|
||||||
|
for more details, including other options available for fine-tuning
|
||||||
|
the installation locations.
|
||||||
|
|
||||||
|
`--no-create'
|
||||||
|
`-n'
|
||||||
|
Run the configure checks, but stop before creating any output
|
||||||
|
files.
|
||||||
|
|
||||||
`configure' also accepts some other, not widely useful, options. Run
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
`configure --help' for more details.
|
`configure --help' for more details.
|
||||||
|
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
% Load plain if necessary, i.e., if running under initex.
|
% Load plain if necessary, i.e., if running under initex.
|
||||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||||
%
|
%
|
||||||
\def\texinfoversion{2007-12-02.17}
|
\def\texinfoversion{2008-11-17.21}
|
||||||
%
|
%
|
||||||
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 2007,
|
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
|
||||||
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||||
% 2007 Free Software Foundation, Inc.
|
% 2007, 2008 Free Software Foundation, Inc.
|
||||||
%
|
%
|
||||||
% This texinfo.tex file is free software: you can redistribute it and/or
|
% This texinfo.tex file is free software: you can redistribute it and/or
|
||||||
% modify it under the terms of the GNU General Public License as
|
% modify it under the terms of the GNU General Public License as
|
||||||
@ -97,6 +97,9 @@
|
|||||||
\let\ptexslash=\/
|
\let\ptexslash=\/
|
||||||
\let\ptexstar=\*
|
\let\ptexstar=\*
|
||||||
\let\ptext=\t
|
\let\ptext=\t
|
||||||
|
\let\ptextop=\top
|
||||||
|
{\catcode`\'=\active
|
||||||
|
\global\let\ptexquoteright'}% Math-mode def from plain.tex.
|
||||||
|
|
||||||
% If this character appears in an error message or help string, it
|
% If this character appears in an error message or help string, it
|
||||||
% starts a new line in the output.
|
% starts a new line in the output.
|
||||||
@ -460,7 +463,7 @@
|
|||||||
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
|
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
|
||||||
\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
|
\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
|
||||||
|
|
||||||
% Each occurence of `\^^M' or `<space>\^^M' is replaced by a single space.
|
% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
|
||||||
%
|
%
|
||||||
% \argremovec might leave us with trailing space, e.g.,
|
% \argremovec might leave us with trailing space, e.g.,
|
||||||
% @end itemize @c foo
|
% @end itemize @c foo
|
||||||
@ -485,7 +488,7 @@
|
|||||||
% to get _exactly_ the rest of the line, we had to prevent such situation.
|
% to get _exactly_ the rest of the line, we had to prevent such situation.
|
||||||
% We prepended an \empty token at the very beginning and we expand it now,
|
% We prepended an \empty token at the very beginning and we expand it now,
|
||||||
% just before passing the control to \argtorun.
|
% just before passing the control to \argtorun.
|
||||||
% (Similarily, we have to think about #3 of \argcheckspacesY above: it is
|
% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
|
||||||
% either the null string, or it ends with \^^M---thus there is no danger
|
% either the null string, or it ends with \^^M---thus there is no danger
|
||||||
% that a pair of braces would be stripped.
|
% that a pair of braces would be stripped.
|
||||||
%
|
%
|
||||||
@ -542,12 +545,12 @@
|
|||||||
% used to check whether the current environment is the one expected.
|
% used to check whether the current environment is the one expected.
|
||||||
%
|
%
|
||||||
% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
|
% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
|
||||||
% are not treated as enviroments; they don't open a group. (The
|
% are not treated as environments; they don't open a group. (The
|
||||||
% implementation of @end takes care not to call \endgroup in this
|
% implementation of @end takes care not to call \endgroup in this
|
||||||
% special case.)
|
% special case.)
|
||||||
|
|
||||||
|
|
||||||
% At runtime, environments start with this:
|
% At run-time, environments start with this:
|
||||||
\def\startenvironment#1{\begingroup\def\thisenv{#1}}
|
\def\startenvironment#1{\begingroup\def\thisenv{#1}}
|
||||||
% initialize
|
% initialize
|
||||||
\let\thisenv\empty
|
\let\thisenv\empty
|
||||||
@ -565,7 +568,7 @@
|
|||||||
\fi
|
\fi
|
||||||
}
|
}
|
||||||
|
|
||||||
% Evironment mismatch, #1 expected:
|
% Environment mismatch, #1 expected:
|
||||||
\def\badenverr{%
|
\def\badenverr{%
|
||||||
\errhelp = \EMsimple
|
\errhelp = \EMsimple
|
||||||
\errmessage{This command can appear only \inenvironment\temp,
|
\errmessage{This command can appear only \inenvironment\temp,
|
||||||
@ -649,8 +652,8 @@
|
|||||||
\def\jmacro{j}
|
\def\jmacro{j}
|
||||||
\def\dotless#1{%
|
\def\dotless#1{%
|
||||||
\def\temp{#1}%
|
\def\temp{#1}%
|
||||||
\ifx\temp\imacro \ptexi
|
\ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
|
||||||
\else\ifx\temp\jmacro \j
|
\else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
|
||||||
\else \errmessage{@dotless can be used only with i or j}%
|
\else \errmessage{@dotless can be used only with i or j}%
|
||||||
\fi\fi
|
\fi\fi
|
||||||
}
|
}
|
||||||
@ -916,15 +919,20 @@ where each line of input produces a line of output.}
|
|||||||
\temp
|
\temp
|
||||||
}
|
}
|
||||||
|
|
||||||
% @include file insert text of that file as input.
|
% @include FILE -- \input text of FILE.
|
||||||
%
|
%
|
||||||
\def\include{\parseargusing\filenamecatcodes\includezzz}
|
\def\include{\parseargusing\filenamecatcodes\includezzz}
|
||||||
\def\includezzz#1{%
|
\def\includezzz#1{%
|
||||||
\pushthisfilestack
|
\pushthisfilestack
|
||||||
\def\thisfile{#1}%
|
\def\thisfile{#1}%
|
||||||
{%
|
{%
|
||||||
\makevalueexpandable
|
\makevalueexpandable % we want to expand any @value in FILE.
|
||||||
\def\temp{\input #1 }%
|
\turnoffactive % and allow special characters in the expansion
|
||||||
|
\indexnofonts % Allow `@@' and other weird things in file names.
|
||||||
|
\edef\temp{\noexpand\input #1 }%
|
||||||
|
%
|
||||||
|
% This trickery is to read FILE outside of a group, in case it makes
|
||||||
|
% definitions, etc.
|
||||||
\expandafter
|
\expandafter
|
||||||
}\temp
|
}\temp
|
||||||
\popthisfilestack
|
\popthisfilestack
|
||||||
@ -939,6 +947,8 @@ where each line of input produces a line of output.}
|
|||||||
\catcode`>=\other
|
\catcode`>=\other
|
||||||
\catcode`+=\other
|
\catcode`+=\other
|
||||||
\catcode`-=\other
|
\catcode`-=\other
|
||||||
|
\catcode`\`=\other
|
||||||
|
\catcode`\'=\other
|
||||||
}
|
}
|
||||||
|
|
||||||
\def\pushthisfilestack{%
|
\def\pushthisfilestack{%
|
||||||
@ -1114,6 +1124,16 @@ where each line of input produces a line of output.}
|
|||||||
\mathunderscore
|
\mathunderscore
|
||||||
\let\\ = \mathbackslash
|
\let\\ = \mathbackslash
|
||||||
\mathactive
|
\mathactive
|
||||||
|
% make the texinfo accent commands work in math mode
|
||||||
|
\let\"=\ddot
|
||||||
|
\let\'=\acute
|
||||||
|
\let\==\bar
|
||||||
|
\let\^=\hat
|
||||||
|
\let\`=\grave
|
||||||
|
\let\u=\breve
|
||||||
|
\let\v=\check
|
||||||
|
\let\~=\tilde
|
||||||
|
\let\dotaccent=\dot
|
||||||
$\finishmath
|
$\finishmath
|
||||||
}
|
}
|
||||||
\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
|
\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
|
||||||
@ -1127,17 +1147,21 @@ where each line of input produces a line of output.}
|
|||||||
\catcode`< = \active
|
\catcode`< = \active
|
||||||
\catcode`> = \active
|
\catcode`> = \active
|
||||||
\catcode`+ = \active
|
\catcode`+ = \active
|
||||||
|
\catcode`' = \active
|
||||||
\gdef\mathactive{%
|
\gdef\mathactive{%
|
||||||
\let^ = \ptexhat
|
\let^ = \ptexhat
|
||||||
\let< = \ptexless
|
\let< = \ptexless
|
||||||
\let> = \ptexgtr
|
\let> = \ptexgtr
|
||||||
\let+ = \ptexplus
|
\let+ = \ptexplus
|
||||||
|
\let' = \ptexquoteright
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
% @bullet and @minus need the same treatment as @math, just above.
|
% Some math mode symbols.
|
||||||
\def\bullet{$\ptexbullet$}
|
\def\bullet{$\ptexbullet$}
|
||||||
\def\minus{$-$}
|
\def\geq{\ifmmode \ge\else $\ge$\fi}
|
||||||
|
\def\leq{\ifmmode \le\else $\le$\fi}
|
||||||
|
\def\minus{\ifmmode -\else $-$\fi}
|
||||||
|
|
||||||
% @dots{} outputs an ellipsis using the current font.
|
% @dots{} outputs an ellipsis using the current font.
|
||||||
% We do .5em per period so that it has the same spacing in the cm
|
% We do .5em per period so that it has the same spacing in the cm
|
||||||
@ -1362,8 +1386,11 @@ output) for that.)}
|
|||||||
\openin 1 #1.jpeg \ifeof 1
|
\openin 1 #1.jpeg \ifeof 1
|
||||||
\openin 1 #1.JPG \ifeof 1
|
\openin 1 #1.JPG \ifeof 1
|
||||||
\openin 1 #1.pdf \ifeof 1
|
\openin 1 #1.pdf \ifeof 1
|
||||||
\errhelp = \nopdfimagehelp
|
\openin 1 #1.PDF \ifeof 1
|
||||||
\errmessage{Could not find image file #1 for pdf}%
|
\errhelp = \nopdfimagehelp
|
||||||
|
\errmessage{Could not find image file #1 for pdf}%
|
||||||
|
\else \gdef\pdfimgext{PDF}%
|
||||||
|
\fi
|
||||||
\else \gdef\pdfimgext{pdf}%
|
\else \gdef\pdfimgext{pdf}%
|
||||||
\fi
|
\fi
|
||||||
\else \gdef\pdfimgext{JPG}%
|
\else \gdef\pdfimgext{JPG}%
|
||||||
@ -1377,7 +1404,7 @@ output) for that.)}
|
|||||||
\closein 1
|
\closein 1
|
||||||
\endgroup
|
\endgroup
|
||||||
%
|
%
|
||||||
% without \immediate, pdftex seg faults when the same image is
|
% without \immediate, ancient pdftex seg faults when the same image is
|
||||||
% included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
|
% included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
|
||||||
\ifnum\pdftexversion < 14
|
\ifnum\pdftexversion < 14
|
||||||
\immediate\pdfimage
|
\immediate\pdfimage
|
||||||
@ -1607,6 +1634,10 @@ output) for that.)}
|
|||||||
\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
|
\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
|
||||||
\def\tt{\fam=\ttfam \setfontstyle{tt}}
|
\def\tt{\fam=\ttfam \setfontstyle{tt}}
|
||||||
|
|
||||||
|
% Unfortunately, we have to override this for titles and the like, since
|
||||||
|
% in those cases "rm" is bold. Sigh.
|
||||||
|
\def\rmisbold{\rm\def\curfontstyle{bf}}
|
||||||
|
|
||||||
% Texinfo sort of supports the sans serif font style, which plain TeX does not.
|
% Texinfo sort of supports the sans serif font style, which plain TeX does not.
|
||||||
% So we set up a \sf.
|
% So we set up a \sf.
|
||||||
\newfam\sffam
|
\newfam\sffam
|
||||||
@ -2004,8 +2035,6 @@ end
|
|||||||
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
|
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
|
||||||
\font\titlei=cmmi12 scaled \magstep3
|
\font\titlei=cmmi12 scaled \magstep3
|
||||||
\font\titlesy=cmsy10 scaled \magstep4
|
\font\titlesy=cmsy10 scaled \magstep4
|
||||||
\def\authorrm{\secrm}
|
|
||||||
\def\authortt{\sectt}
|
|
||||||
\def\titleecsize{2074}
|
\def\titleecsize{2074}
|
||||||
|
|
||||||
% Chapter (and unnumbered) fonts (17.28pt).
|
% Chapter (and unnumbered) fonts (17.28pt).
|
||||||
@ -2137,8 +2166,6 @@ end
|
|||||||
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
|
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
|
||||||
\font\titlei=cmmi12 scaled \magstep3
|
\font\titlei=cmmi12 scaled \magstep3
|
||||||
\font\titlesy=cmsy10 scaled \magstep4
|
\font\titlesy=cmsy10 scaled \magstep4
|
||||||
\def\authorrm{\secrm}
|
|
||||||
\def\authortt{\sectt}
|
|
||||||
\def\titleecsize{2074}
|
\def\titleecsize{2074}
|
||||||
|
|
||||||
% Chapter fonts (14.4pt).
|
% Chapter fonts (14.4pt).
|
||||||
@ -2270,7 +2297,7 @@ end
|
|||||||
\def\curfontsize{title}%
|
\def\curfontsize{title}%
|
||||||
\def\lsize{chap}\def\lllsize{subsec}%
|
\def\lsize{chap}\def\lllsize{subsec}%
|
||||||
\resetmathfonts \setleading{25pt}}
|
\resetmathfonts \setleading{25pt}}
|
||||||
\def\titlefont#1{{\titlefonts\rm #1}}
|
\def\titlefont#1{{\titlefonts\rmisbold #1}}
|
||||||
\def\chapfonts{%
|
\def\chapfonts{%
|
||||||
\let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
|
\let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
|
||||||
\let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
|
\let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
|
||||||
@ -2376,7 +2403,7 @@ end
|
|||||||
|
|
||||||
\let\i=\smartitalic
|
\let\i=\smartitalic
|
||||||
\let\slanted=\smartslanted
|
\let\slanted=\smartslanted
|
||||||
\let\var=\smartslanted
|
\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
|
||||||
\let\dfn=\smartslanted
|
\let\dfn=\smartslanted
|
||||||
\let\emph=\smartitalic
|
\let\emph=\smartitalic
|
||||||
|
|
||||||
@ -2416,7 +2443,7 @@ end
|
|||||||
{\tt \rawbackslash \plainfrenchspacing #1}%
|
{\tt \rawbackslash \plainfrenchspacing #1}%
|
||||||
\null
|
\null
|
||||||
}
|
}
|
||||||
\def\samp#1{`\tclose{#1}'\null}
|
\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
|
||||||
\setfont\keyrm\rmshape{8}{1000}{OT1}
|
\setfont\keyrm\rmshape{8}{1000}{OT1}
|
||||||
\font\keysy=cmsy9
|
\font\keysy=cmsy9
|
||||||
\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
|
\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
|
||||||
@ -2425,7 +2452,7 @@ end
|
|||||||
\hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
|
\hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
|
||||||
\kern-0.4pt\hrule}%
|
\kern-0.4pt\hrule}%
|
||||||
\kern-.06em\raise0.4pt\hbox{\angleright}}}}
|
\kern-.06em\raise0.4pt\hbox{\angleright}}}}
|
||||||
\def\key #1{{\nohyphenation \uppercase{#1}}\null}
|
\def\key #1{{\setupmarkupstyle{key}\nohyphenation \uppercase{#1}}\null}
|
||||||
% The old definition, with no lozenge:
|
% The old definition, with no lozenge:
|
||||||
%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
|
%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
|
||||||
\def\ctrl #1{{\tt \rawbackslash \hat}#1}
|
\def\ctrl #1{{\tt \rawbackslash \hat}#1}
|
||||||
@ -2469,11 +2496,11 @@ end
|
|||||||
{
|
{
|
||||||
\catcode`\-=\active \catcode`\_=\active
|
\catcode`\-=\active \catcode`\_=\active
|
||||||
\catcode`\'=\active \catcode`\`=\active
|
\catcode`\'=\active \catcode`\`=\active
|
||||||
|
\global\let'=\rq \global\let`=\lq % default definitions
|
||||||
%
|
%
|
||||||
\global\def\code{\begingroup
|
\global\def\code{\begingroup
|
||||||
\catcode\rquoteChar=\active \catcode\lquoteChar=\active
|
\setupmarkupstyle{code}%
|
||||||
\let'\codequoteright \let`\codequoteleft
|
% The following should really be moved into \setupmarkupstyle handlers.
|
||||||
%
|
|
||||||
\catcode\dashChar=\active \catcode\underChar=\active
|
\catcode\dashChar=\active \catcode\underChar=\active
|
||||||
\ifallowcodebreaks
|
\ifallowcodebreaks
|
||||||
\let-\codedash
|
\let-\codedash
|
||||||
@ -2552,14 +2579,21 @@ end
|
|||||||
\def\xkey{\key}
|
\def\xkey{\key}
|
||||||
\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
|
\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
|
||||||
\ifx\one\xkey\ifx\threex\three \key{#2}%
|
\ifx\one\xkey\ifx\threex\three \key{#2}%
|
||||||
\else{\tclose{\kbdfont\look}}\fi
|
\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
|
||||||
\else{\tclose{\kbdfont\look}}\fi}
|
\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
|
||||||
|
|
||||||
% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
|
% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
|
||||||
\let\indicateurl=\code
|
\let\indicateurl=\code
|
||||||
\let\env=\code
|
\let\env=\code
|
||||||
\let\command=\code
|
\let\command=\code
|
||||||
|
|
||||||
|
% @clicksequence{File @click{} Open ...}
|
||||||
|
\def\clicksequence#1{\begingroup #1\endgroup}
|
||||||
|
|
||||||
|
% @clickstyle @arrow (by default)
|
||||||
|
\parseargdef\clickstyle{\def\click{#1}}
|
||||||
|
\def\click{\arrow}
|
||||||
|
|
||||||
% @uref (abbreviation for `urlref') takes an optional (comma-separated)
|
% @uref (abbreviation for `urlref') takes an optional (comma-separated)
|
||||||
% second argument specifying the text to display and an optional third
|
% second argument specifying the text to display and an optional third
|
||||||
% arg as text to display instead of (rather than in addition to) the url
|
% arg as text to display instead of (rather than in addition to) the url
|
||||||
@ -2621,7 +2655,7 @@ end
|
|||||||
%
|
%
|
||||||
\def\dmn#1{\thinspace #1}
|
\def\dmn#1{\thinspace #1}
|
||||||
|
|
||||||
\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
|
\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
|
||||||
|
|
||||||
% @l was never documented to mean ``switch to the Lisp font'',
|
% @l was never documented to mean ``switch to the Lisp font'',
|
||||||
% and it is not used as such in any manual I can find. We need it for
|
% and it is not used as such in any manual I can find. We need it for
|
||||||
@ -2722,8 +2756,35 @@ end
|
|||||||
\def\quotedblbase{{\ecfont \char"12}}
|
\def\quotedblbase{{\ecfont \char"12}}
|
||||||
\def\quotesinglbase{{\ecfont \char"0D}}
|
\def\quotesinglbase{{\ecfont \char"0D}}
|
||||||
%
|
%
|
||||||
|
% This positioning is not perfect (see the ogonek LaTeX package), but
|
||||||
|
% we have the precomposed glyphs for the most common cases. We put the
|
||||||
|
% tests to use those glyphs in the single \ogonek macro so we have fewer
|
||||||
|
% dummy definitions to worry about for index entries, etc.
|
||||||
|
%
|
||||||
|
% ogonek is also used with other letters in Lithuanian (IOU), but using
|
||||||
|
% the precomposed glyphs for those is not so easy since they aren't in
|
||||||
|
% the same EC font.
|
||||||
|
\def\ogonek#1{{%
|
||||||
|
\def\temp{#1}%
|
||||||
|
\ifx\temp\macrocharA\Aogonek
|
||||||
|
\else\ifx\temp\macrochara\aogonek
|
||||||
|
\else\ifx\temp\macrocharE\Eogonek
|
||||||
|
\else\ifx\temp\macrochare\eogonek
|
||||||
|
\else
|
||||||
|
\ecfont \setbox0=\hbox{#1}%
|
||||||
|
\ifdim\ht0=1ex\accent"0C #1%
|
||||||
|
\else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
|
||||||
|
\fi
|
||||||
|
\fi\fi\fi\fi
|
||||||
|
}%
|
||||||
|
}
|
||||||
|
\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
|
||||||
|
\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
|
||||||
|
\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
|
||||||
|
\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
|
||||||
|
%
|
||||||
\def\ecfont{%
|
\def\ecfont{%
|
||||||
% We can't distinguish serif/sanserif and italic/slanted, but this
|
% We can't distinguish serif/sans and italic/slanted, but this
|
||||||
% is used for crude hacks anyway (like adding French and German
|
% is used for crude hacks anyway (like adding French and German
|
||||||
% quotes to documents typeset with CM, where we lose kerning), so
|
% quotes to documents typeset with CM, where we lose kerning), so
|
||||||
% hopefully nobody will notice/care.
|
% hopefully nobody will notice/care.
|
||||||
@ -2851,12 +2912,9 @@ end
|
|||||||
\let\subtitlerm=\tenrm
|
\let\subtitlerm=\tenrm
|
||||||
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
|
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
|
||||||
|
|
||||||
\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
|
|
||||||
\let\tt=\authortt}
|
|
||||||
|
|
||||||
\parseargdef\title{%
|
\parseargdef\title{%
|
||||||
\checkenv\titlepage
|
\checkenv\titlepage
|
||||||
\leftline{\titlefonts\rm #1}
|
\leftline{\titlefonts\rmisbold #1}
|
||||||
% print a rule at the page bottom also.
|
% print a rule at the page bottom also.
|
||||||
\finishedtitlepagefalse
|
\finishedtitlepagefalse
|
||||||
\vskip4pt \hrule height 4pt width \hsize \vskip4pt
|
\vskip4pt \hrule height 4pt width \hsize \vskip4pt
|
||||||
@ -2877,7 +2935,7 @@ end
|
|||||||
\else
|
\else
|
||||||
\checkenv\titlepage
|
\checkenv\titlepage
|
||||||
\ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
|
\ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
|
||||||
{\authorfont \leftline{#1}}%
|
{\secfonts\rmisbold \leftline{#1}}%
|
||||||
\fi
|
\fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3847,11 +3905,11 @@ end
|
|||||||
\def\dosynindex#1#2#3{%
|
\def\dosynindex#1#2#3{%
|
||||||
% Only do \closeout if we haven't already done it, else we'll end up
|
% Only do \closeout if we haven't already done it, else we'll end up
|
||||||
% closing the target index.
|
% closing the target index.
|
||||||
\expandafter \ifx\csname donesynindex#2\endcsname \undefined
|
\expandafter \ifx\csname donesynindex#2\endcsname \relax
|
||||||
% The \closeout helps reduce unnecessary open files; the limit on the
|
% The \closeout helps reduce unnecessary open files; the limit on the
|
||||||
% Acorn RISC OS is a mere 16 files.
|
% Acorn RISC OS is a mere 16 files.
|
||||||
\expandafter\closeout\csname#2indfile\endcsname
|
\expandafter\closeout\csname#2indfile\endcsname
|
||||||
\expandafter\let\csname\donesynindex#2\endcsname = 1
|
\expandafter\let\csname donesynindex#2\endcsname = 1
|
||||||
\fi
|
\fi
|
||||||
% redefine \fooindfile:
|
% redefine \fooindfile:
|
||||||
\expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
|
\expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
|
||||||
@ -4009,6 +4067,7 @@ end
|
|||||||
\definedummyword\guilsinglright
|
\definedummyword\guilsinglright
|
||||||
\definedummyword\expansion
|
\definedummyword\expansion
|
||||||
\definedummyword\minus
|
\definedummyword\minus
|
||||||
|
\definedummyword\ogonek
|
||||||
\definedummyword\pounds
|
\definedummyword\pounds
|
||||||
\definedummyword\point
|
\definedummyword\point
|
||||||
\definedummyword\print
|
\definedummyword\print
|
||||||
@ -4052,6 +4111,7 @@ end
|
|||||||
\definedummyword\v
|
\definedummyword\v
|
||||||
\definedummyword\H
|
\definedummyword\H
|
||||||
\definedummyword\dotaccent
|
\definedummyword\dotaccent
|
||||||
|
\definedummyword\ogonek
|
||||||
\definedummyword\ringaccent
|
\definedummyword\ringaccent
|
||||||
\definedummyword\tieaccent
|
\definedummyword\tieaccent
|
||||||
\definedummyword\ubaraccent
|
\definedummyword\ubaraccent
|
||||||
@ -4432,7 +4492,7 @@ end
|
|||||||
%
|
%
|
||||||
% A straightforward implementation would start like this:
|
% A straightforward implementation would start like this:
|
||||||
% \def\entry#1#2{...
|
% \def\entry#1#2{...
|
||||||
% But this frozes the catcodes in the argument, and can cause problems to
|
% But this freezes the catcodes in the argument, and can cause problems to
|
||||||
% @code, which sets - active. This problem was fixed by a kludge---
|
% @code, which sets - active. This problem was fixed by a kludge---
|
||||||
% ``-'' was active throughout whole index, but this isn't really right.
|
% ``-'' was active throughout whole index, but this isn't really right.
|
||||||
%
|
%
|
||||||
@ -5034,7 +5094,6 @@ end
|
|||||||
% 3) Likewise, headings look best if no \parindent is used, and
|
% 3) Likewise, headings look best if no \parindent is used, and
|
||||||
% if justification is not attempted. Hence \raggedright.
|
% if justification is not attempted. Hence \raggedright.
|
||||||
|
|
||||||
|
|
||||||
\def\majorheading{%
|
\def\majorheading{%
|
||||||
{\advance\chapheadingskip by 10pt \chapbreak }%
|
{\advance\chapheadingskip by 10pt \chapbreak }%
|
||||||
\parsearg\chapheadingzzz
|
\parsearg\chapheadingzzz
|
||||||
@ -5044,7 +5103,7 @@ end
|
|||||||
\def\chapheadingzzz#1{%
|
\def\chapheadingzzz#1{%
|
||||||
{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
|
{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
|
||||||
\parindent=0pt\raggedright
|
\parindent=0pt\raggedright
|
||||||
\rm #1\hfill}}%
|
\rmisbold #1\hfill}}%
|
||||||
\bigskip \par\penalty 200\relax
|
\bigskip \par\penalty 200\relax
|
||||||
\suppressfirstparagraphindent
|
\suppressfirstparagraphindent
|
||||||
}
|
}
|
||||||
@ -5163,7 +5222,7 @@ end
|
|||||||
\domark
|
\domark
|
||||||
%
|
%
|
||||||
{%
|
{%
|
||||||
\chapfonts \rm
|
\chapfonts \rmisbold
|
||||||
%
|
%
|
||||||
% Have to define \lastsection before calling \donoderef, because the
|
% Have to define \lastsection before calling \donoderef, because the
|
||||||
% xref code eventually uses it. On the other hand, it has to be called
|
% xref code eventually uses it. On the other hand, it has to be called
|
||||||
@ -5225,7 +5284,7 @@ end
|
|||||||
\def\unnchfopen #1{%
|
\def\unnchfopen #1{%
|
||||||
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
|
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
|
||||||
\parindent=0pt\raggedright
|
\parindent=0pt\raggedright
|
||||||
\rm #1\hfill}}\bigskip \par\nobreak
|
\rmisbold #1\hfill}}\bigskip \par\nobreak
|
||||||
}
|
}
|
||||||
\def\chfopen #1#2{\chapoddpage {\chapfonts
|
\def\chfopen #1#2{\chapoddpage {\chapfonts
|
||||||
\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
|
\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
|
||||||
@ -5234,7 +5293,7 @@ end
|
|||||||
\def\centerchfopen #1{%
|
\def\centerchfopen #1{%
|
||||||
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
|
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
|
||||||
\parindent=0pt
|
\parindent=0pt
|
||||||
\hfill {\rm #1}\hfill}}\bigskip \par\nobreak
|
\hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
|
||||||
}
|
}
|
||||||
\def\CHAPFopen{%
|
\def\CHAPFopen{%
|
||||||
\global\let\chapmacro=\chfopen
|
\global\let\chapmacro=\chfopen
|
||||||
@ -5267,7 +5326,7 @@ end
|
|||||||
\def\sectionheading#1#2#3#4{%
|
\def\sectionheading#1#2#3#4{%
|
||||||
{%
|
{%
|
||||||
% Switch to the right set of fonts.
|
% Switch to the right set of fonts.
|
||||||
\csname #2fonts\endcsname \rm
|
\csname #2fonts\endcsname \rmisbold
|
||||||
%
|
%
|
||||||
\def\sectionlevel{#2}%
|
\def\sectionlevel{#2}%
|
||||||
\def\temptype{#3}%
|
\def\temptype{#3}%
|
||||||
@ -5650,16 +5709,120 @@ end
|
|||||||
\message{environments,}
|
\message{environments,}
|
||||||
% @foo ... @end foo.
|
% @foo ... @end foo.
|
||||||
|
|
||||||
|
% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
|
||||||
|
% define and register \INITMACRO to be called on markup style changes.
|
||||||
|
% \INITMACRO can check \currentmarkupstyle for the innermost
|
||||||
|
% style and the set of \ifmarkupSTYLE switches for all styles
|
||||||
|
% currently in effect.
|
||||||
|
\newif\ifmarkupvar
|
||||||
|
\newif\ifmarkupsamp
|
||||||
|
\newif\ifmarkupkey
|
||||||
|
%\newif\ifmarkupfile % @file == @samp.
|
||||||
|
%\newif\ifmarkupoption % @option == @samp.
|
||||||
|
\newif\ifmarkupcode
|
||||||
|
\newif\ifmarkupkbd
|
||||||
|
%\newif\ifmarkupenv % @env == @code.
|
||||||
|
%\newif\ifmarkupcommand % @command == @code.
|
||||||
|
\newif\ifmarkuptex % @tex (and part of @math, for now).
|
||||||
|
\newif\ifmarkupexample
|
||||||
|
\newif\ifmarkupverb
|
||||||
|
\newif\ifmarkupverbatim
|
||||||
|
|
||||||
|
\let\currentmarkupstyle\empty
|
||||||
|
|
||||||
|
\def\setupmarkupstyle#1{%
|
||||||
|
\csname markup#1true\endcsname
|
||||||
|
\def\currentmarkupstyle{#1}%
|
||||||
|
\markupstylesetup
|
||||||
|
}
|
||||||
|
|
||||||
|
\let\markupstylesetup\empty
|
||||||
|
|
||||||
|
\def\defmarkupstylesetup#1{%
|
||||||
|
\expandafter\def\expandafter\markupstylesetup
|
||||||
|
\expandafter{\markupstylesetup #1}%
|
||||||
|
\def#1%
|
||||||
|
}
|
||||||
|
|
||||||
|
% Markup style setup for left and right quotes.
|
||||||
|
\defmarkupstylesetup\markupsetuplq{%
|
||||||
|
\expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname
|
||||||
|
\ifx\temp\relax \markupsetuplqdefault \else \temp \fi
|
||||||
|
}
|
||||||
|
|
||||||
|
\defmarkupstylesetup\markupsetuprq{%
|
||||||
|
\expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname
|
||||||
|
\ifx\temp\relax \markupsetuprqdefault \else \temp \fi
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
\catcode`\'=\active
|
||||||
|
\catcode`\`=\active
|
||||||
|
|
||||||
|
\gdef\markupsetuplqdefault{\let`\lq}
|
||||||
|
\gdef\markupsetuprqdefault{\let'\rq}
|
||||||
|
|
||||||
|
\gdef\markupsetcodequoteleft{\let`\codequoteleft}
|
||||||
|
\gdef\markupsetcodequoteright{\let'\codequoteright}
|
||||||
|
|
||||||
|
\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
|
||||||
|
}
|
||||||
|
|
||||||
|
\let\markupsetuplqcode \markupsetcodequoteleft
|
||||||
|
\let\markupsetuprqcode \markupsetcodequoteright
|
||||||
|
\let\markupsetuplqexample \markupsetcodequoteleft
|
||||||
|
\let\markupsetuprqexample \markupsetcodequoteright
|
||||||
|
\let\markupsetuplqverb \markupsetcodequoteleft
|
||||||
|
\let\markupsetuprqverb \markupsetcodequoteright
|
||||||
|
\let\markupsetuplqverbatim \markupsetcodequoteleft
|
||||||
|
\let\markupsetuprqverbatim \markupsetcodequoteright
|
||||||
|
|
||||||
|
\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
|
||||||
|
\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
|
||||||
|
|
||||||
|
% Allow an option to not replace quotes with a regular directed right
|
||||||
|
% quote/apostrophe (char 0x27), but instead use the undirected quote
|
||||||
|
% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
|
||||||
|
% the default, but it works for pasting with more pdf viewers (at least
|
||||||
|
% evince), the lilypond developers report. xpdf does work with the
|
||||||
|
% regular 0x27.
|
||||||
|
%
|
||||||
|
\def\codequoteright{%
|
||||||
|
\expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
|
||||||
|
\expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
|
||||||
|
'%
|
||||||
|
\else \char'15 \fi
|
||||||
|
\else \char'15 \fi
|
||||||
|
}
|
||||||
|
%
|
||||||
|
% and a similar option for the left quote char vs. a grave accent.
|
||||||
|
% Modern fonts display ASCII 0x60 as a grave accent, so some people like
|
||||||
|
% the code environments to do likewise.
|
||||||
|
%
|
||||||
|
\def\codequoteleft{%
|
||||||
|
\expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
|
||||||
|
\expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
|
||||||
|
% [Knuth] pp. 380,381,391
|
||||||
|
% \relax disables Spanish ligatures ?` and !` of \tt font.
|
||||||
|
\relax`%
|
||||||
|
\else \char'22 \fi
|
||||||
|
\else \char'22 \fi
|
||||||
|
}
|
||||||
|
|
||||||
|
% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
|
||||||
|
\def\noligaturesquoteleft{\relax\lq}
|
||||||
|
|
||||||
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
|
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
|
||||||
%
|
%
|
||||||
% Since these characters are used in examples, it should be an even number of
|
% Since these characters are used in examples, they should be an even number of
|
||||||
% \tt widths. Each \tt character is 1en, so two makes it 1em.
|
% \tt widths. Each \tt character is 1en, so two makes it 1em.
|
||||||
%
|
%
|
||||||
\def\point{$\star$}
|
\def\point{$\star$}
|
||||||
\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
|
\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
|
||||||
\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
|
\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
|
||||||
|
\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
|
||||||
\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
|
\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
|
||||||
\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
|
\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
|
||||||
|
|
||||||
% The @error{} command.
|
% The @error{} command.
|
||||||
% Adapted from the TeXbook's \boxit.
|
% Adapted from the TeXbook's \boxit.
|
||||||
@ -5689,6 +5852,7 @@ end
|
|||||||
% But \@ or @@ will get a plain tex @ character.
|
% But \@ or @@ will get a plain tex @ character.
|
||||||
|
|
||||||
\envdef\tex{%
|
\envdef\tex{%
|
||||||
|
\setupmarkupstyle{tex}%
|
||||||
\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
|
\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
|
||||||
\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
|
\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
|
||||||
\catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
|
\catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
|
||||||
@ -5698,6 +5862,8 @@ end
|
|||||||
\catcode `\|=\other
|
\catcode `\|=\other
|
||||||
\catcode `\<=\other
|
\catcode `\<=\other
|
||||||
\catcode `\>=\other
|
\catcode `\>=\other
|
||||||
|
\catcode`\`=\other
|
||||||
|
\catcode`\'=\other
|
||||||
\escapechar=`\\
|
\escapechar=`\\
|
||||||
%
|
%
|
||||||
\let\b=\ptexb
|
\let\b=\ptexb
|
||||||
@ -5717,6 +5883,7 @@ end
|
|||||||
\let\/=\ptexslash
|
\let\/=\ptexslash
|
||||||
\let\*=\ptexstar
|
\let\*=\ptexstar
|
||||||
\let\t=\ptext
|
\let\t=\ptext
|
||||||
|
\expandafter \let\csname top\endcsname=\ptextop % outer
|
||||||
\let\frenchspacing=\plainfrenchspacing
|
\let\frenchspacing=\plainfrenchspacing
|
||||||
%
|
%
|
||||||
\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
|
\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
|
||||||
@ -5898,7 +6065,7 @@ end
|
|||||||
%
|
%
|
||||||
\maketwodispenvs {lisp}{example}{%
|
\maketwodispenvs {lisp}{example}{%
|
||||||
\nonfillstart
|
\nonfillstart
|
||||||
\tt\quoteexpand
|
\tt\setupmarkupstyle{example}%
|
||||||
\let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
|
\let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
|
||||||
\gobble % eat return
|
\gobble % eat return
|
||||||
}
|
}
|
||||||
@ -5941,7 +6108,7 @@ end
|
|||||||
% we're doing normal filling. So, when using \aboveenvbreak and
|
% we're doing normal filling. So, when using \aboveenvbreak and
|
||||||
% \afterenvbreak, temporarily make \parskip 0.
|
% \afterenvbreak, temporarily make \parskip 0.
|
||||||
%
|
%
|
||||||
\envdef\quotation{%
|
\def\quotationstart{%
|
||||||
{\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
|
{\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
|
||||||
\parindent=0pt
|
\parindent=0pt
|
||||||
%
|
%
|
||||||
@ -5956,6 +6123,17 @@ end
|
|||||||
\parsearg\quotationlabel
|
\parsearg\quotationlabel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\envdef\quotation{%
|
||||||
|
\setnormaldispenv
|
||||||
|
\quotationstart
|
||||||
|
}
|
||||||
|
|
||||||
|
\envdef\smallquotation{%
|
||||||
|
\setsmalldispenv
|
||||||
|
\quotationstart
|
||||||
|
}
|
||||||
|
\let\Esmallquotation = \Equotation
|
||||||
|
|
||||||
% We have retained a nonzero parskip for the environment, since we're
|
% We have retained a nonzero parskip for the environment, since we're
|
||||||
% doing normal filling.
|
% doing normal filling.
|
||||||
%
|
%
|
||||||
@ -5991,18 +6169,16 @@ end
|
|||||||
\do\ \do\\\do\{\do\}\do\$\do\&%
|
\do\ \do\\\do\{\do\}\do\$\do\&%
|
||||||
\do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
|
\do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
|
||||||
\do\<\do\>\do\|\do\@\do+\do\"%
|
\do\<\do\>\do\|\do\@\do+\do\"%
|
||||||
|
% Don't do the quotes -- if we do, @set txicodequoteundirected and
|
||||||
|
% @set txicodequotebacktick will not have effect on @verb and
|
||||||
|
% @verbatim, and ?` and !` ligatures won't get disabled.
|
||||||
|
%\do\`\do\'%
|
||||||
}
|
}
|
||||||
%
|
%
|
||||||
% [Knuth] p. 380
|
% [Knuth] p. 380
|
||||||
\def\uncatcodespecials{%
|
\def\uncatcodespecials{%
|
||||||
\def\do##1{\catcode`##1=\other}\dospecials}
|
\def\do##1{\catcode`##1=\other}\dospecials}
|
||||||
%
|
%
|
||||||
% [Knuth] pp. 380,381,391
|
|
||||||
% Disable Spanish ligatures ?` and !` of \tt font
|
|
||||||
\begingroup
|
|
||||||
\catcode`\`=\active\gdef`{\relax\lq}
|
|
||||||
\endgroup
|
|
||||||
%
|
|
||||||
% Setup for the @verb command.
|
% Setup for the @verb command.
|
||||||
%
|
%
|
||||||
% Eight spaces for a tab
|
% Eight spaces for a tab
|
||||||
@ -6014,7 +6190,7 @@ end
|
|||||||
\def\setupverb{%
|
\def\setupverb{%
|
||||||
\tt % easiest (and conventionally used) font for verbatim
|
\tt % easiest (and conventionally used) font for verbatim
|
||||||
\def\par{\leavevmode\endgraf}%
|
\def\par{\leavevmode\endgraf}%
|
||||||
\catcode`\`=\active
|
\setupmarkupstyle{verb}%
|
||||||
\tabeightspaces
|
\tabeightspaces
|
||||||
% Respect line breaks,
|
% Respect line breaks,
|
||||||
% print special symbols as themselves, and
|
% print special symbols as themselves, and
|
||||||
@ -6029,33 +6205,6 @@ end
|
|||||||
\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
|
\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
|
||||||
%
|
%
|
||||||
\def\starttabbox{\setbox0=\hbox\bgroup}
|
\def\starttabbox{\setbox0=\hbox\bgroup}
|
||||||
|
|
||||||
% Allow an option to not replace quotes with a regular directed right
|
|
||||||
% quote/apostrophe (char 0x27), but instead use the undirected quote
|
|
||||||
% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
|
|
||||||
% the default, but it works for pasting with more pdf viewers (at least
|
|
||||||
% evince), the lilypond developers report. xpdf does work with the
|
|
||||||
% regular 0x27.
|
|
||||||
%
|
|
||||||
\def\codequoteright{%
|
|
||||||
\expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
|
|
||||||
\expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
|
|
||||||
'%
|
|
||||||
\else \char'15 \fi
|
|
||||||
\else \char'15 \fi
|
|
||||||
}
|
|
||||||
%
|
|
||||||
% and a similar option for the left quote char vs. a grave accent.
|
|
||||||
% Modern fonts display ASCII 0x60 as a grave accent, so some people like
|
|
||||||
% the code environments to do likewise.
|
|
||||||
%
|
|
||||||
\def\codequoteleft{%
|
|
||||||
\expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
|
|
||||||
\expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
|
|
||||||
`%
|
|
||||||
\else \char'22 \fi
|
|
||||||
\else \char'22 \fi
|
|
||||||
}
|
|
||||||
%
|
%
|
||||||
\begingroup
|
\begingroup
|
||||||
\catcode`\^^I=\active
|
\catcode`\^^I=\active
|
||||||
@ -6069,13 +6218,6 @@ end
|
|||||||
\wd0=\dimen0 \box0 \starttabbox
|
\wd0=\dimen0 \box0 \starttabbox
|
||||||
}%
|
}%
|
||||||
}
|
}
|
||||||
\catcode`\'=\active
|
|
||||||
\gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}%
|
|
||||||
%
|
|
||||||
\catcode`\`=\active
|
|
||||||
\gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}%
|
|
||||||
%
|
|
||||||
\gdef\quoteexpand{\rquoteexpand \lquoteexpand}%
|
|
||||||
\endgroup
|
\endgroup
|
||||||
|
|
||||||
% start the verbatim environment.
|
% start the verbatim environment.
|
||||||
@ -6085,9 +6227,8 @@ end
|
|||||||
% Easiest (and conventionally used) font for verbatim
|
% Easiest (and conventionally used) font for verbatim
|
||||||
\tt
|
\tt
|
||||||
\def\par{\leavevmode\egroup\box0\endgraf}%
|
\def\par{\leavevmode\egroup\box0\endgraf}%
|
||||||
\catcode`\`=\active
|
|
||||||
\tabexpand
|
\tabexpand
|
||||||
\quoteexpand
|
\setupmarkupstyle{verbatim}%
|
||||||
% Respect line breaks,
|
% Respect line breaks,
|
||||||
% print special symbols as themselves, and
|
% print special symbols as themselves, and
|
||||||
% make each space count
|
% make each space count
|
||||||
@ -6147,6 +6288,7 @@ end
|
|||||||
{%
|
{%
|
||||||
\makevalueexpandable
|
\makevalueexpandable
|
||||||
\setupverbatim
|
\setupverbatim
|
||||||
|
\indexnofonts % Allow `@@' and other weird things in file names.
|
||||||
\input #1
|
\input #1
|
||||||
\afterenvbreak
|
\afterenvbreak
|
||||||
}%
|
}%
|
||||||
@ -6246,7 +6388,7 @@ end
|
|||||||
\def\Edefun{\endgraf\medbreak}
|
\def\Edefun{\endgraf\medbreak}
|
||||||
|
|
||||||
% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
|
% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
|
||||||
% the only thing remainnig is to define \deffnheader.
|
% the only thing remaining is to define \deffnheader.
|
||||||
%
|
%
|
||||||
\def\makedefun#1{%
|
\def\makedefun#1{%
|
||||||
\expandafter\let\csname E#1\endcsname = \Edefun
|
\expandafter\let\csname E#1\endcsname = \Edefun
|
||||||
@ -6425,7 +6567,7 @@ end
|
|||||||
%
|
%
|
||||||
% On the other hand, if an argument has two dashes (for instance), we
|
% On the other hand, if an argument has two dashes (for instance), we
|
||||||
% want a way to get ttsl. Let's try @var for that.
|
% want a way to get ttsl. Let's try @var for that.
|
||||||
\let\var=\ttslanted
|
\def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
|
||||||
#1%
|
#1%
|
||||||
\sl\hyphenchar\font=45
|
\sl\hyphenchar\font=45
|
||||||
}
|
}
|
||||||
@ -6953,20 +7095,22 @@ end
|
|||||||
%
|
%
|
||||||
% Make link in pdf output.
|
% Make link in pdf output.
|
||||||
\ifpdf
|
\ifpdf
|
||||||
\leavevmode
|
|
||||||
\getfilename{#4}%
|
|
||||||
{\indexnofonts
|
{\indexnofonts
|
||||||
\turnoffactive
|
\turnoffactive
|
||||||
|
% This expands tokens, so do it after making catcode changes, so _
|
||||||
|
% etc. don't get their TeX definitions.
|
||||||
|
\getfilename{#4}%
|
||||||
|
%
|
||||||
% See comments at \activebackslashdouble.
|
% See comments at \activebackslashdouble.
|
||||||
{\activebackslashdouble \xdef\pdfxrefdest{#1}%
|
{\activebackslashdouble \xdef\pdfxrefdest{#1}%
|
||||||
\backslashparens\pdfxrefdest}%
|
\backslashparens\pdfxrefdest}%
|
||||||
%
|
%
|
||||||
|
\leavevmode
|
||||||
|
\startlink attr{/Border [0 0 0]}%
|
||||||
\ifnum\filenamelength>0
|
\ifnum\filenamelength>0
|
||||||
\startlink attr{/Border [0 0 0]}%
|
goto file{\the\filename.pdf} name{\pdfxrefdest}%
|
||||||
goto file{\the\filename.pdf} name{\pdfxrefdest}%
|
|
||||||
\else
|
\else
|
||||||
\startlink attr{/Border [0 0 0]}%
|
goto name{\pdfmkpgn{\pdfxrefdest}}%
|
||||||
goto name{\pdfmkpgn{\pdfxrefdest}}%
|
|
||||||
\fi
|
\fi
|
||||||
}%
|
}%
|
||||||
\setcolor{\linkcolor}%
|
\setcolor{\linkcolor}%
|
||||||
@ -7317,7 +7461,7 @@ end
|
|||||||
% In case a @footnote appears in a vbox, save the footnote text and create
|
% In case a @footnote appears in a vbox, save the footnote text and create
|
||||||
% the real \insert just after the vbox finished. Otherwise, the insertion
|
% the real \insert just after the vbox finished. Otherwise, the insertion
|
||||||
% would be lost.
|
% would be lost.
|
||||||
% Similarily, if a @footnote appears inside an alignment, save the footnote
|
% Similarly, if a @footnote appears inside an alignment, save the footnote
|
||||||
% text to a box and make the \insert when a row of the table is finished.
|
% text to a box and make the \insert when a row of the table is finished.
|
||||||
% And the same can be done for other insert classes. --kasal, 16nov03.
|
% And the same can be done for other insert classes. --kasal, 16nov03.
|
||||||
|
|
||||||
@ -7421,15 +7565,19 @@ end
|
|||||||
% If the image is by itself, center it.
|
% If the image is by itself, center it.
|
||||||
\ifvmode
|
\ifvmode
|
||||||
\imagevmodetrue
|
\imagevmodetrue
|
||||||
\nobreak\bigskip
|
\nobreak\medskip
|
||||||
% Usually we'll have text after the image which will insert
|
% Usually we'll have text after the image which will insert
|
||||||
% \parskip glue, so insert it here too to equalize the space
|
% \parskip glue, so insert it here too to equalize the space
|
||||||
% above and below.
|
% above and below.
|
||||||
\nobreak\vskip\parskip
|
\nobreak\vskip\parskip
|
||||||
\nobreak
|
\nobreak
|
||||||
\line\bgroup
|
|
||||||
\fi
|
\fi
|
||||||
%
|
%
|
||||||
|
% Leave vertical mode so that indentation from an enclosing
|
||||||
|
% environment such as @quotation is respected. On the other hand, if
|
||||||
|
% it's at the top level, we don't want the normal paragraph indentation.
|
||||||
|
\noindent
|
||||||
|
%
|
||||||
% Output the image.
|
% Output the image.
|
||||||
\ifpdf
|
\ifpdf
|
||||||
\dopdfimage{#1}{#2}{#3}%
|
\dopdfimage{#1}{#2}{#3}%
|
||||||
@ -7440,7 +7588,7 @@ end
|
|||||||
\epsfbox{#1.eps}%
|
\epsfbox{#1.eps}%
|
||||||
\fi
|
\fi
|
||||||
%
|
%
|
||||||
\ifimagevmode \egroup \bigbreak \fi % space after the image
|
\ifimagevmode \medskip \fi % space after the standalone image
|
||||||
\endgroup}
|
\endgroup}
|
||||||
|
|
||||||
|
|
||||||
@ -7712,10 +7860,9 @@ end
|
|||||||
|
|
||||||
\message{localization,}
|
\message{localization,}
|
||||||
|
|
||||||
% @documentlanguage is usually given very early, just after
|
% For single-language documents, @documentlanguage is usually given very
|
||||||
% @setfilename. If done too late, it may not override everything
|
% early, just after @documentencoding. Single argument is the language
|
||||||
% properly. Single argument is the language (de) or locale (de_DE)
|
% (de) or locale (de_DE) abbreviation.
|
||||||
% abbreviation. It would be nice if we could set up a hyphenation file.
|
|
||||||
%
|
%
|
||||||
{
|
{
|
||||||
\catcode`\_ = \active
|
\catcode`\_ = \active
|
||||||
@ -7728,10 +7875,11 @@ end
|
|||||||
\ifeof 1
|
\ifeof 1
|
||||||
\documentlanguagetrywithoutunderscore{#1_\finish}%
|
\documentlanguagetrywithoutunderscore{#1_\finish}%
|
||||||
\else
|
\else
|
||||||
|
\globaldefs = 1 % everything in the txi-LL files needs to persist
|
||||||
\input txi-#1.tex
|
\input txi-#1.tex
|
||||||
\fi
|
\fi
|
||||||
\closein 1
|
\closein 1
|
||||||
\endgroup
|
\endgroup % end raw TeX
|
||||||
\endgroup}
|
\endgroup}
|
||||||
}
|
}
|
||||||
%
|
%
|
||||||
@ -7750,9 +7898,36 @@ end
|
|||||||
}
|
}
|
||||||
%
|
%
|
||||||
\newhelp\nolanghelp{The given language definition file cannot be found or
|
\newhelp\nolanghelp{The given language definition file cannot be found or
|
||||||
is empty. Maybe you need to install it? In the current directory
|
is empty. Maybe you need to install it? Putting it in the current
|
||||||
should work if nowhere else does.}
|
directory should work if nowhere else does.}
|
||||||
|
|
||||||
|
% This macro is called from txi-??.tex files; the first argument is the
|
||||||
|
% \language name to set (without the "\lang@" prefix), the second and
|
||||||
|
% third args are \{left,right}hyphenmin.
|
||||||
|
%
|
||||||
|
% The language names to pass are determined when the format is built.
|
||||||
|
% See the etex.log file created at that time, e.g.,
|
||||||
|
% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
|
||||||
|
%
|
||||||
|
% With TeX Live 2008, etex now includes hyphenation patterns for all
|
||||||
|
% available languages. This means we can support hyphenation in
|
||||||
|
% Texinfo, at least to some extent. (This still doesn't solve the
|
||||||
|
% accented characters problem.)
|
||||||
|
%
|
||||||
|
\catcode`@=11
|
||||||
|
\def\txisetlanguage#1#2#3{%
|
||||||
|
% do not set the language if the name is undefined in the current TeX.
|
||||||
|
\expandafter\ifx\csname lang@#1\endcsname \relax
|
||||||
|
\message{no patterns for #1}%
|
||||||
|
\else
|
||||||
|
\global\language = \csname lang@#1\endcsname
|
||||||
|
\fi
|
||||||
|
% but there is no harm in adjusting the hyphenmin values regardless.
|
||||||
|
\global\lefthyphenmin = #2\relax
|
||||||
|
\global\righthyphenmin = #3\relax
|
||||||
|
}
|
||||||
|
|
||||||
|
% Helpers for encodings.
|
||||||
% Set the catcode of characters 128 through 255 to the specified number.
|
% Set the catcode of characters 128 through 255 to the specified number.
|
||||||
%
|
%
|
||||||
\def\setnonasciicharscatcode#1{%
|
\def\setnonasciicharscatcode#1{%
|
||||||
@ -7841,7 +8016,7 @@ should work if nowhere else does.}
|
|||||||
\gdef^^a8{\"{}}
|
\gdef^^a8{\"{}}
|
||||||
\gdef^^a9{\copyright}
|
\gdef^^a9{\copyright}
|
||||||
\gdef^^aa{\ordf}
|
\gdef^^aa{\ordf}
|
||||||
\gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}}
|
\gdef^^ab{\guillemetleft}
|
||||||
\gdef^^ac{$\lnot$}
|
\gdef^^ac{$\lnot$}
|
||||||
\gdef^^ad{\-}
|
\gdef^^ad{\-}
|
||||||
\gdef^^ae{\registeredsymbol}
|
\gdef^^ae{\registeredsymbol}
|
||||||
@ -7860,7 +8035,7 @@ should work if nowhere else does.}
|
|||||||
\gdef^^b9{$^1$}
|
\gdef^^b9{$^1$}
|
||||||
\gdef^^ba{\ordm}
|
\gdef^^ba{\ordm}
|
||||||
%
|
%
|
||||||
\gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}}
|
\gdef^^bb{\guilletright}
|
||||||
\gdef^^bc{$1\over4$}
|
\gdef^^bc{$1\over4$}
|
||||||
\gdef^^bd{$1\over2$}
|
\gdef^^bd{$1\over2$}
|
||||||
\gdef^^be{$3\over4$}
|
\gdef^^be{$3\over4$}
|
||||||
@ -7953,7 +8128,7 @@ should work if nowhere else does.}
|
|||||||
% Latin2 (ISO-8859-2) character definitions.
|
% Latin2 (ISO-8859-2) character definitions.
|
||||||
\def\lattwochardefs{%
|
\def\lattwochardefs{%
|
||||||
\gdef^^a0{~}
|
\gdef^^a0{~}
|
||||||
\gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}}
|
\gdef^^a1{\ogonek{A}}
|
||||||
\gdef^^a2{\u{}}
|
\gdef^^a2{\u{}}
|
||||||
\gdef^^a3{\L}
|
\gdef^^a3{\L}
|
||||||
\gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
|
\gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
|
||||||
@ -7970,8 +8145,8 @@ should work if nowhere else does.}
|
|||||||
\gdef^^af{\dotaccent Z}
|
\gdef^^af{\dotaccent Z}
|
||||||
%
|
%
|
||||||
\gdef^^b0{\textdegree}
|
\gdef^^b0{\textdegree}
|
||||||
\gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}}
|
\gdef^^b1{\ogonek{a}}
|
||||||
\gdef^^b2{\missingcharmsg{OGONEK}}
|
\gdef^^b2{\ogonek{ }}
|
||||||
\gdef^^b3{\l}
|
\gdef^^b3{\l}
|
||||||
\gdef^^b4{\'{}}
|
\gdef^^b4{\'{}}
|
||||||
\gdef^^b5{\v l}
|
\gdef^^b5{\v l}
|
||||||
@ -7996,7 +8171,7 @@ should work if nowhere else does.}
|
|||||||
\gdef^^c7{\cedilla C}
|
\gdef^^c7{\cedilla C}
|
||||||
\gdef^^c8{\v C}
|
\gdef^^c8{\v C}
|
||||||
\gdef^^c9{\'E}
|
\gdef^^c9{\'E}
|
||||||
\gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}}
|
\gdef^^ca{\ogonek{E}}
|
||||||
\gdef^^cb{\"E}
|
\gdef^^cb{\"E}
|
||||||
\gdef^^cc{\v E}
|
\gdef^^cc{\v E}
|
||||||
\gdef^^cd{\'I}
|
\gdef^^cd{\'I}
|
||||||
@ -8030,7 +8205,7 @@ should work if nowhere else does.}
|
|||||||
\gdef^^e7{\cedilla c}
|
\gdef^^e7{\cedilla c}
|
||||||
\gdef^^e8{\v c}
|
\gdef^^e8{\v c}
|
||||||
\gdef^^e9{\'e}
|
\gdef^^e9{\'e}
|
||||||
\gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}}
|
\gdef^^ea{\ogonek{e}}
|
||||||
\gdef^^eb{\"e}
|
\gdef^^eb{\"e}
|
||||||
\gdef^^ec{\v e}
|
\gdef^^ec{\v e}
|
||||||
\gdef^^ed{\'\i}
|
\gdef^^ed{\'\i}
|
||||||
@ -8259,10 +8434,14 @@ should work if nowhere else does.}
|
|||||||
\DeclareUnicodeCharacter{0101}{\=a}
|
\DeclareUnicodeCharacter{0101}{\=a}
|
||||||
\DeclareUnicodeCharacter{0102}{\u{A}}
|
\DeclareUnicodeCharacter{0102}{\u{A}}
|
||||||
\DeclareUnicodeCharacter{0103}{\u{a}}
|
\DeclareUnicodeCharacter{0103}{\u{a}}
|
||||||
|
\DeclareUnicodeCharacter{0104}{\ogonek{A}}
|
||||||
|
\DeclareUnicodeCharacter{0105}{\ogonek{a}}
|
||||||
\DeclareUnicodeCharacter{0106}{\'C}
|
\DeclareUnicodeCharacter{0106}{\'C}
|
||||||
\DeclareUnicodeCharacter{0107}{\'c}
|
\DeclareUnicodeCharacter{0107}{\'c}
|
||||||
\DeclareUnicodeCharacter{0108}{\^C}
|
\DeclareUnicodeCharacter{0108}{\^C}
|
||||||
\DeclareUnicodeCharacter{0109}{\^c}
|
\DeclareUnicodeCharacter{0109}{\^c}
|
||||||
|
\DeclareUnicodeCharacter{0118}{\ogonek{E}}
|
||||||
|
\DeclareUnicodeCharacter{0119}{\ogonek{e}}
|
||||||
\DeclareUnicodeCharacter{010A}{\dotaccent{C}}
|
\DeclareUnicodeCharacter{010A}{\dotaccent{C}}
|
||||||
\DeclareUnicodeCharacter{010B}{\dotaccent{c}}
|
\DeclareUnicodeCharacter{010B}{\dotaccent{c}}
|
||||||
\DeclareUnicodeCharacter{010C}{\v{C}}
|
\DeclareUnicodeCharacter{010C}{\v{C}}
|
||||||
@ -8410,6 +8589,8 @@ should work if nowhere else does.}
|
|||||||
\DeclareUnicodeCharacter{0233}{\=y}
|
\DeclareUnicodeCharacter{0233}{\=y}
|
||||||
\DeclareUnicodeCharacter{0237}{\dotless{j}}
|
\DeclareUnicodeCharacter{0237}{\dotless{j}}
|
||||||
|
|
||||||
|
\DeclareUnicodeCharacter{02DB}{\ogonek{ }}
|
||||||
|
|
||||||
\DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
|
\DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
|
||||||
\DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
|
\DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
|
||||||
\DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
|
\DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
|
||||||
@ -8912,6 +9093,8 @@ should work if nowhere else does.}
|
|||||||
@let>=@normalgreater
|
@let>=@normalgreater
|
||||||
@let+=@normalplus
|
@let+=@normalplus
|
||||||
@let$=@normaldollar %$ font-lock fix
|
@let$=@normaldollar %$ font-lock fix
|
||||||
|
@markupsetuplqdefault
|
||||||
|
@markupsetuprqdefault
|
||||||
@unsepspaces
|
@unsepspaces
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8946,7 +9129,15 @@ should work if nowhere else does.}
|
|||||||
@catcode`@# = @other
|
@catcode`@# = @other
|
||||||
@catcode`@% = @other
|
@catcode`@% = @other
|
||||||
|
|
||||||
|
@c Finally, make ` and ' active, so that txicodequoteundirected and
|
||||||
|
@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
|
||||||
|
@c don't make ` and ' active, @code will not get them as active chars.
|
||||||
|
@c Do this last of all since we use ` in the previous @catcode assignments.
|
||||||
|
@catcode`@'=@active
|
||||||
|
@catcode`@`=@active
|
||||||
|
@markupsetuplqdefault
|
||||||
|
@markupsetuprqdefault
|
||||||
|
|
||||||
@c Local variables:
|
@c Local variables:
|
||||||
@c eval: (add-hook 'write-file-hooks 'time-stamp)
|
@c eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
@c page-delimiter: "^\\\\message"
|
@c page-delimiter: "^\\\\message"
|
||||||
|
@ -97,7 +97,8 @@ public class SecretKeyGeneratorImpl
|
|||||||
{
|
{
|
||||||
keySize >>>= 3; // Use bytes.
|
keySize >>>= 3; // Use bytes.
|
||||||
if (! keySizes.contains(Integer.valueOf(keySize)))
|
if (! keySizes.contains(Integer.valueOf(keySize)))
|
||||||
throw new InvalidParameterException("unsupported key size: " + keySize);
|
throw new InvalidParameterException("unsupported key size: " + keySize
|
||||||
|
+ ", valid sizes are: " + keySizes);
|
||||||
currentKeySize = keySize;
|
currentKeySize = keySize;
|
||||||
this.random = random;
|
this.random = random;
|
||||||
init = true;
|
init = true;
|
||||||
|
@ -68,17 +68,17 @@ public class Bindings
|
|||||||
/**
|
/**
|
||||||
* Global variables.
|
* Global variables.
|
||||||
*/
|
*/
|
||||||
final LinkedList variables;
|
final LinkedList<Map<QName,Object>> variables;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameter value stack.
|
* Parameter value stack.
|
||||||
*/
|
*/
|
||||||
final LinkedList parameters;
|
final LinkedList<Map<QName,Object>> parameters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Argument (with-param) value stack.
|
* Argument (with-param) value stack.
|
||||||
*/
|
*/
|
||||||
final LinkedList withParameters;
|
final LinkedList<Map<QName,Object>> withParameters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Only search globals.
|
* Only search globals.
|
||||||
@ -88,9 +88,9 @@ public class Bindings
|
|||||||
Bindings(Stylesheet stylesheet)
|
Bindings(Stylesheet stylesheet)
|
||||||
{
|
{
|
||||||
this.stylesheet = stylesheet;
|
this.stylesheet = stylesheet;
|
||||||
variables = new LinkedList();
|
variables = new LinkedList<Map<QName,Object>>();
|
||||||
parameters = new LinkedList();
|
parameters = new LinkedList<Map<QName,Object>>();
|
||||||
withParameters = new LinkedList();
|
withParameters = new LinkedList<Map<QName,Object>>();
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
push(i);
|
push(i);
|
||||||
@ -114,13 +114,13 @@ public class Bindings
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case VARIABLE:
|
case VARIABLE:
|
||||||
variables.addFirst(new HashMap());
|
variables.addFirst(new HashMap<QName,Object>());
|
||||||
break;
|
break;
|
||||||
case PARAM:
|
case PARAM:
|
||||||
parameters.addFirst(new HashMap());
|
parameters.addFirst(new HashMap<QName,Object>());
|
||||||
break;
|
break;
|
||||||
case WITH_PARAM:
|
case WITH_PARAM:
|
||||||
withParameters.addFirst(new HashMap());
|
withParameters.addFirst(new HashMap<QName,Object>());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,11 +145,11 @@ public class Bindings
|
|||||||
{
|
{
|
||||||
if (global)
|
if (global)
|
||||||
{
|
{
|
||||||
Map ctx1 = (Map) variables.getLast();
|
Map<QName,Object> ctx1 = variables.getLast();
|
||||||
Map ctx2 = (Map) parameters.getLast();
|
Map<QName,Object> ctx2 = parameters.getLast();
|
||||||
return (ctx1.containsKey(name) || ctx2.containsKey(name));
|
return (ctx1.containsKey(name) || ctx2.containsKey(name));
|
||||||
}
|
}
|
||||||
Iterator i = null;
|
Iterator<Map<QName,Object>> i = null;
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case VARIABLE:
|
case VARIABLE:
|
||||||
@ -159,14 +159,14 @@ public class Bindings
|
|||||||
i = parameters.iterator();
|
i = parameters.iterator();
|
||||||
break;
|
break;
|
||||||
case WITH_PARAM:
|
case WITH_PARAM:
|
||||||
Map ctx = (Map) withParameters.getFirst();
|
Map<QName,Object> ctx = withParameters.getFirst();
|
||||||
return ctx.containsKey(name);
|
return ctx.containsKey(name);
|
||||||
}
|
}
|
||||||
if (i != null)
|
if (i != null)
|
||||||
{
|
{
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
Map ctx = (Map) i.next();
|
Map<QName,Object> ctx = i.next();
|
||||||
if (ctx.containsKey(name))
|
if (ctx.containsKey(name))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@ -180,11 +180,11 @@ public class Bindings
|
|||||||
{
|
{
|
||||||
if (global)
|
if (global)
|
||||||
{
|
{
|
||||||
Map ctx = (Map) variables.getLast();
|
Map<QName,Object> ctx = variables.getLast();
|
||||||
Object ret = ctx.get(name);
|
Object ret = ctx.get(name);
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
{
|
{
|
||||||
ctx = (Map) parameters.getLast();
|
ctx = parameters.getLast();
|
||||||
ret = ctx.get(name);
|
ret = ctx.get(name);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@ -195,24 +195,26 @@ public class Bindings
|
|||||||
//if (parameters.size() > 1 && containsKey(name, PARAM))
|
//if (parameters.size() > 1 && containsKey(name, PARAM))
|
||||||
// check that template defines parameter
|
// check that template defines parameter
|
||||||
{
|
{
|
||||||
Map cwp = (Map) withParameters.getFirst();
|
Map<QName,Object> cwp = withParameters.getFirst();
|
||||||
ret = cwp.get(name);
|
ret = cwp.get(name);
|
||||||
//System.err.println("\twith-param: ret="+ret);
|
//System.err.println("\twith-param: ret="+ret);
|
||||||
}
|
}
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
{
|
{
|
||||||
for (Iterator i = variables.iterator(); i.hasNext() && ret == null; )
|
for (Iterator<Map<QName,Object>> i = variables.iterator();
|
||||||
|
i.hasNext() && ret == null; )
|
||||||
{
|
{
|
||||||
Map vctx = (Map) i.next();
|
Map<QName,Object> vctx = i.next();
|
||||||
ret = vctx.get(name);
|
ret = vctx.get(name);
|
||||||
}
|
}
|
||||||
//System.err.println("\tvariable: ret="+ret);
|
//System.err.println("\tvariable: ret="+ret);
|
||||||
}
|
}
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
{
|
{
|
||||||
for (Iterator i = parameters.iterator(); i.hasNext() && ret == null; )
|
for (Iterator<Map<QName,Object>> i = parameters.iterator();
|
||||||
|
i.hasNext() && ret == null; )
|
||||||
{
|
{
|
||||||
Map pctx = (Map) i.next();
|
Map<QName,Object> pctx = i.next();
|
||||||
ret = pctx.get(name);
|
ret = pctx.get(name);
|
||||||
}
|
}
|
||||||
//System.err.println("\tparam: ret="+ret);
|
//System.err.println("\tparam: ret="+ret);
|
||||||
@ -239,15 +241,15 @@ public class Bindings
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case VARIABLE:
|
case VARIABLE:
|
||||||
Map vctx = (Map) variables.getFirst();
|
Map<QName,Object> vctx = variables.getFirst();
|
||||||
vctx.put(name, value);
|
vctx.put(name, value);
|
||||||
break;
|
break;
|
||||||
case PARAM:
|
case PARAM:
|
||||||
Map pctx = (Map) parameters.getFirst();
|
Map<QName,Object> pctx = parameters.getFirst();
|
||||||
pctx.put(name, value);
|
pctx.put(name, value);
|
||||||
break;
|
break;
|
||||||
case WITH_PARAM:
|
case WITH_PARAM:
|
||||||
Map wctx = (Map) withParameters.getFirst();
|
Map<QName,Object> wctx = withParameters.getFirst();
|
||||||
wctx.put(name, value);
|
wctx.put(name, value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -263,10 +265,10 @@ public class Bindings
|
|||||||
{
|
{
|
||||||
CPStringBuilder buf = new CPStringBuilder();
|
CPStringBuilder buf = new CPStringBuilder();
|
||||||
boolean next = false;
|
boolean next = false;
|
||||||
Collection seen = new HashSet();
|
Collection<QName> seen = new HashSet<QName>();
|
||||||
Map wctx = (Map) withParameters.getFirst();
|
Map<QName,Object> wctx = withParameters.getFirst();
|
||||||
buf.append('(');
|
buf.append('(');
|
||||||
for (Iterator i = wctx.entrySet().iterator(); i.hasNext(); )
|
for (Map.Entry<QName,Object> entry : wctx.entrySet())
|
||||||
{
|
{
|
||||||
if (next)
|
if (next)
|
||||||
{
|
{
|
||||||
@ -276,8 +278,7 @@ public class Bindings
|
|||||||
{
|
{
|
||||||
next = true;
|
next = true;
|
||||||
}
|
}
|
||||||
Map.Entry entry = (Map.Entry) i.next();
|
QName key = entry.getKey();
|
||||||
Object key = entry.getKey();
|
|
||||||
if (!seen.contains(key))
|
if (!seen.contains(key))
|
||||||
{
|
{
|
||||||
buf.append(key);
|
buf.append(key);
|
||||||
@ -290,10 +291,9 @@ public class Bindings
|
|||||||
next = false;
|
next = false;
|
||||||
seen.clear();
|
seen.clear();
|
||||||
buf.append('{');
|
buf.append('{');
|
||||||
for (Iterator i = variables.iterator(); i.hasNext(); )
|
for (Map<QName,Object> ctx : variables)
|
||||||
{
|
{
|
||||||
Map ctx = (Map) i.next();
|
for (Map.Entry<QName,Object> entry : ctx.entrySet())
|
||||||
for (Iterator j = ctx.entrySet().iterator(); j.hasNext(); )
|
|
||||||
{
|
{
|
||||||
if (next)
|
if (next)
|
||||||
{
|
{
|
||||||
@ -303,8 +303,7 @@ public class Bindings
|
|||||||
{
|
{
|
||||||
next = true;
|
next = true;
|
||||||
}
|
}
|
||||||
Map.Entry entry = (Map.Entry) j.next();
|
QName key = entry.getKey();
|
||||||
Object key = entry.getKey();
|
|
||||||
if (!seen.contains(key))
|
if (!seen.contains(key))
|
||||||
{
|
{
|
||||||
buf.append(key);
|
buf.append(key);
|
||||||
@ -318,10 +317,9 @@ public class Bindings
|
|||||||
next = false;
|
next = false;
|
||||||
seen.clear();
|
seen.clear();
|
||||||
buf.append('[');
|
buf.append('[');
|
||||||
for (Iterator i = parameters.iterator(); i.hasNext(); )
|
for (Map<QName,Object> ctx : parameters)
|
||||||
{
|
{
|
||||||
Map ctx = (Map) i.next();
|
for (Map.Entry<QName,Object> entry : ctx.entrySet())
|
||||||
for (Iterator j = ctx.entrySet().iterator(); j.hasNext(); )
|
|
||||||
{
|
{
|
||||||
if (next)
|
if (next)
|
||||||
{
|
{
|
||||||
@ -331,8 +329,7 @@ public class Bindings
|
|||||||
{
|
{
|
||||||
next = true;
|
next = true;
|
||||||
}
|
}
|
||||||
Map.Entry entry = (Map.Entry) j.next();
|
QName key = entry.getKey();
|
||||||
Object key = entry.getKey();
|
|
||||||
if (!seen.contains(key))
|
if (!seen.contains(key))
|
||||||
{
|
{
|
||||||
buf.append(key);
|
buf.append(key);
|
||||||
|
@ -337,8 +337,58 @@ public final class String
|
|||||||
* @throws Error if the decoding fails
|
* @throws Error if the decoding fails
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
public String(byte[] data, int offset, int count, String encoding)
|
public String(byte[] data, int offset, int count, final String encoding)
|
||||||
throws UnsupportedEncodingException
|
throws UnsupportedEncodingException
|
||||||
|
{
|
||||||
|
this(data, offset, count, stringToCharset(encoding));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrapper method to convert exceptions resulting from
|
||||||
|
* the selection of a {@link java.nio.charset.Charset} based on
|
||||||
|
* a String.
|
||||||
|
*
|
||||||
|
* @throws UnsupportedEncodingException if encoding is not found
|
||||||
|
*/
|
||||||
|
private static final Charset stringToCharset(final String encoding)
|
||||||
|
throws UnsupportedEncodingException
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return Charset.forName(encoding);
|
||||||
|
}
|
||||||
|
catch(IllegalCharsetNameException e)
|
||||||
|
{
|
||||||
|
throw new UnsupportedEncodingException("Encoding: "+encoding+
|
||||||
|
" not found.");
|
||||||
|
}
|
||||||
|
catch(UnsupportedCharsetException e)
|
||||||
|
{
|
||||||
|
throw new UnsupportedEncodingException("Encoding: "+encoding+
|
||||||
|
" not found.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new String using the portion of the byte array starting at the
|
||||||
|
* offset and ending at offset + count. Uses the specified encoding type
|
||||||
|
* to decode the byte array, so the resulting string may be longer or
|
||||||
|
* shorter than the byte array. For more decoding control, use
|
||||||
|
* {@link java.nio.charset.CharsetDecoder}, and for valid character sets,
|
||||||
|
* see {@link java.nio.charset.Charset}. Malformed input and unmappable
|
||||||
|
* character sequences are replaced with the default replacement string
|
||||||
|
* provided by the {@link java.nio.charset.Charset}.
|
||||||
|
*
|
||||||
|
* @param data byte array to copy
|
||||||
|
* @param offset the offset to start at
|
||||||
|
* @param count the number of bytes in the array to use
|
||||||
|
* @param encoding the encoding to use
|
||||||
|
* @throws NullPointerException if data or encoding is null
|
||||||
|
* @throws IndexOutOfBoundsException if offset or count is incorrect
|
||||||
|
* (while unspecified, this is a StringIndexOutOfBoundsException)
|
||||||
|
* @since 1.6
|
||||||
|
*/
|
||||||
|
public String(byte[] data, int offset, int count, Charset encoding)
|
||||||
{
|
{
|
||||||
if (offset < 0)
|
if (offset < 0)
|
||||||
throw new StringIndexOutOfBoundsException("offset: " + offset);
|
throw new StringIndexOutOfBoundsException("offset: " + offset);
|
||||||
@ -350,7 +400,7 @@ public final class String
|
|||||||
+ (offset + count));
|
+ (offset + count));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CharsetDecoder csd = Charset.forName(encoding).newDecoder();
|
CharsetDecoder csd = encoding.newDecoder();
|
||||||
csd.onMalformedInput(CodingErrorAction.REPLACE);
|
csd.onMalformedInput(CodingErrorAction.REPLACE);
|
||||||
csd.onUnmappableCharacter(CodingErrorAction.REPLACE);
|
csd.onUnmappableCharacter(CodingErrorAction.REPLACE);
|
||||||
CharBuffer cbuf = csd.decode(ByteBuffer.wrap(data, offset, count));
|
CharBuffer cbuf = csd.decode(ByteBuffer.wrap(data, offset, count));
|
||||||
@ -366,16 +416,12 @@ public final class String
|
|||||||
this.offset = 0;
|
this.offset = 0;
|
||||||
this.count = value.length;
|
this.count = value.length;
|
||||||
}
|
}
|
||||||
} catch(CharacterCodingException e){
|
}
|
||||||
throw new UnsupportedEncodingException("Encoding: "+encoding+
|
catch(CharacterCodingException e)
|
||||||
" not found.");
|
{
|
||||||
} catch(IllegalCharsetNameException e){
|
// This shouldn't ever happen.
|
||||||
throw new UnsupportedEncodingException("Encoding: "+encoding+
|
throw (InternalError) new InternalError().initCause(e);
|
||||||
" not found.");
|
}
|
||||||
} catch(UnsupportedCharsetException e){
|
|
||||||
throw new UnsupportedEncodingException("Encoding: "+encoding+
|
|
||||||
" not found.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -401,6 +447,26 @@ public final class String
|
|||||||
this(data, 0, data.length, encoding);
|
this(data, 0, data.length, encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new String using the byte array. Uses the specified encoding
|
||||||
|
* type to decode the byte array, so the resulting string may be longer or
|
||||||
|
* shorter than the byte array. For more decoding control, use
|
||||||
|
* {@link java.nio.charset.CharsetDecoder}, and for valid character sets,
|
||||||
|
* see {@link java.nio.charset.Charset}. Malformed input and unmappable
|
||||||
|
* character sequences are replaced with the default replacement string
|
||||||
|
* provided by the {@link java.nio.charset.Charset}.
|
||||||
|
*
|
||||||
|
* @param data byte array to copy
|
||||||
|
* @param encoding the name of the encoding to use
|
||||||
|
* @throws NullPointerException if data or encoding is null
|
||||||
|
* @see #String(byte[], int, int, java.nio.Charset)
|
||||||
|
* @since 1.6
|
||||||
|
*/
|
||||||
|
public String(byte[] data, Charset encoding)
|
||||||
|
{
|
||||||
|
this(data, 0, data.length, encoding);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new String using the portion of the byte array starting at the
|
* Creates a new String using the portion of the byte array starting at the
|
||||||
* offset and ending at offset + count. Uses the encoding of the platform's
|
* offset and ending at offset + count. Uses the encoding of the platform's
|
||||||
@ -726,11 +792,30 @@ public final class String
|
|||||||
* @throws UnsupportedEncodingException if encoding is not supported
|
* @throws UnsupportedEncodingException if encoding is not supported
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
public byte[] getBytes(String enc) throws UnsupportedEncodingException
|
public byte[] getBytes(final String enc)
|
||||||
|
throws UnsupportedEncodingException
|
||||||
|
{
|
||||||
|
return getBytes(stringToCharset(enc));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts the Unicode characters in this String to a byte array. Uses the
|
||||||
|
* specified encoding method, so the result may be longer or shorter than
|
||||||
|
* the String. For more encoding control, use
|
||||||
|
* {@link java.nio.charset.CharsetEncoder}, and for valid character sets,
|
||||||
|
* see {@link java.nio.charset.Charset}. Unsupported characters get
|
||||||
|
* replaced by the {@link java.nio.charset.Charset}'s default replacement.
|
||||||
|
*
|
||||||
|
* @param enc encoding name
|
||||||
|
* @return the resulting byte array
|
||||||
|
* @throws NullPointerException if enc is null
|
||||||
|
* @since 1.6
|
||||||
|
*/
|
||||||
|
public byte[] getBytes(Charset enc)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CharsetEncoder cse = Charset.forName(enc).newEncoder();
|
CharsetEncoder cse = enc.newEncoder();
|
||||||
cse.onMalformedInput(CodingErrorAction.REPLACE);
|
cse.onMalformedInput(CodingErrorAction.REPLACE);
|
||||||
cse.onUnmappableCharacter(CodingErrorAction.REPLACE);
|
cse.onUnmappableCharacter(CodingErrorAction.REPLACE);
|
||||||
ByteBuffer bbuf = cse.encode(CharBuffer.wrap(value, offset, count));
|
ByteBuffer bbuf = cse.encode(CharBuffer.wrap(value, offset, count));
|
||||||
@ -742,16 +827,6 @@ public final class String
|
|||||||
bbuf.get(bytes);
|
bbuf.get(bytes);
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
catch(IllegalCharsetNameException e)
|
|
||||||
{
|
|
||||||
throw new UnsupportedEncodingException("Encoding: " + enc
|
|
||||||
+ " not found.");
|
|
||||||
}
|
|
||||||
catch(UnsupportedCharsetException e)
|
|
||||||
{
|
|
||||||
throw new UnsupportedEncodingException("Encoding: " + enc
|
|
||||||
+ " not found.");
|
|
||||||
}
|
|
||||||
catch(CharacterCodingException e)
|
catch(CharacterCodingException e)
|
||||||
{
|
{
|
||||||
// This shouldn't ever happen.
|
// This shouldn't ever happen.
|
||||||
|
@ -38,13 +38,17 @@ exception statement from your version. */
|
|||||||
|
|
||||||
package java.text;
|
package java.text;
|
||||||
|
|
||||||
|
import gnu.java.lang.CPStringBuilder;
|
||||||
|
|
||||||
import gnu.java.text.FormatCharacterIterator;
|
import gnu.java.text.FormatCharacterIterator;
|
||||||
|
|
||||||
import java.io.InvalidObjectException;
|
import java.io.InvalidObjectException;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Vector;
|
|
||||||
|
|
||||||
public class MessageFormat extends Format
|
public class MessageFormat extends Format
|
||||||
{
|
{
|
||||||
@ -69,7 +73,7 @@ public class MessageFormat extends Format
|
|||||||
|
|
||||||
// Argument will be checked to make sure it is an instance of this
|
// Argument will be checked to make sure it is an instance of this
|
||||||
// class.
|
// class.
|
||||||
Class formatClass;
|
Class<?> formatClass;
|
||||||
|
|
||||||
// Formatter type.
|
// Formatter type.
|
||||||
String type;
|
String type;
|
||||||
@ -95,12 +99,7 @@ public class MessageFormat extends Format
|
|||||||
else if (style.equals("percent"))
|
else if (style.equals("percent"))
|
||||||
format = NumberFormat.getPercentInstance(loc);
|
format = NumberFormat.getPercentInstance(loc);
|
||||||
else if (style.equals("integer"))
|
else if (style.equals("integer"))
|
||||||
{
|
format = NumberFormat.getIntegerInstance(loc);
|
||||||
NumberFormat nf = NumberFormat.getNumberInstance(loc);
|
|
||||||
nf.setMaximumFractionDigits(0);
|
|
||||||
nf.setGroupingUsed(false);
|
|
||||||
format = nf;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
format = NumberFormat.getNumberInstance(loc);
|
format = NumberFormat.getNumberInstance(loc);
|
||||||
@ -165,6 +164,7 @@ public class MessageFormat extends Format
|
|||||||
public static final MessageFormat.Field ARGUMENT = new MessageFormat.Field("argument");
|
public static final MessageFormat.Field ARGUMENT = new MessageFormat.Field("argument");
|
||||||
|
|
||||||
// For deserialization
|
// For deserialization
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private Field()
|
private Field()
|
||||||
{
|
{
|
||||||
super("");
|
super("");
|
||||||
@ -194,7 +194,7 @@ public class MessageFormat extends Format
|
|||||||
// Helper that returns the text up to the next format opener. The
|
// Helper that returns the text up to the next format opener. The
|
||||||
// text is put into BUFFER. Returns index of character after end of
|
// text is put into BUFFER. Returns index of character after end of
|
||||||
// string. Throws IllegalArgumentException on error.
|
// string. Throws IllegalArgumentException on error.
|
||||||
private static int scanString(String pat, int index, StringBuilder buffer)
|
private static int scanString(String pat, int index, CPStringBuilder buffer)
|
||||||
{
|
{
|
||||||
int max = pat.length();
|
int max = pat.length();
|
||||||
buffer.setLength(0);
|
buffer.setLength(0);
|
||||||
@ -234,7 +234,7 @@ public class MessageFormat extends Format
|
|||||||
// This helper retrieves a single part of a format element. Returns
|
// This helper retrieves a single part of a format element. Returns
|
||||||
// the index of the terminating character.
|
// the index of the terminating character.
|
||||||
private static int scanFormatElement(String pat, int index,
|
private static int scanFormatElement(String pat, int index,
|
||||||
StringBuilder buffer, char term)
|
CPStringBuilder buffer, char term)
|
||||||
{
|
{
|
||||||
int max = pat.length();
|
int max = pat.length();
|
||||||
buffer.setLength(0);
|
buffer.setLength(0);
|
||||||
@ -281,11 +281,11 @@ public class MessageFormat extends Format
|
|||||||
|
|
||||||
// This is used to parse a format element and whatever non-format
|
// This is used to parse a format element and whatever non-format
|
||||||
// text might trail it.
|
// text might trail it.
|
||||||
private static int scanFormat(String pat, int index, StringBuilder buffer,
|
private static int scanFormat(String pat, int index, CPStringBuilder buffer,
|
||||||
Vector elts, Locale locale)
|
List<MessageFormatElement> elts, Locale locale)
|
||||||
{
|
{
|
||||||
MessageFormatElement mfe = new MessageFormatElement ();
|
MessageFormatElement mfe = new MessageFormatElement ();
|
||||||
elts.addElement(mfe);
|
elts.add(mfe);
|
||||||
|
|
||||||
int max = pat.length();
|
int max = pat.length();
|
||||||
|
|
||||||
@ -342,17 +342,16 @@ public class MessageFormat extends Format
|
|||||||
{
|
{
|
||||||
pattern = newPattern;
|
pattern = newPattern;
|
||||||
|
|
||||||
StringBuilder tempBuffer = new StringBuilder ();
|
CPStringBuilder tempBuffer = new CPStringBuilder ();
|
||||||
|
|
||||||
int index = scanString (newPattern, 0, tempBuffer);
|
int index = scanString (newPattern, 0, tempBuffer);
|
||||||
leader = tempBuffer.toString();
|
leader = tempBuffer.toString();
|
||||||
|
|
||||||
Vector elts = new Vector ();
|
List<MessageFormatElement> elts = new ArrayList<MessageFormatElement>();
|
||||||
while (index < newPattern.length())
|
while (index < newPattern.length())
|
||||||
index = scanFormat (newPattern, index, tempBuffer, elts, locale);
|
index = scanFormat (newPattern, index, tempBuffer, elts, locale);
|
||||||
|
|
||||||
elements = new MessageFormatElement[elts.size()];
|
elements = elts.toArray(new MessageFormatElement[elts.size()]);
|
||||||
elts.copyInto(elements);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -494,7 +493,8 @@ public class MessageFormat extends Format
|
|||||||
|
|
||||||
if (output_iterator != null)
|
if (output_iterator != null)
|
||||||
{
|
{
|
||||||
HashMap hash_argument = new HashMap();
|
HashMap<MessageFormat.Field, Integer> hash_argument =
|
||||||
|
new HashMap<MessageFormat.Field, Integer>();
|
||||||
int position = output_iterator.getEndIndex();
|
int position = output_iterator.getEndIndex();
|
||||||
|
|
||||||
hash_argument.put (MessageFormat.Field.ARGUMENT,
|
hash_argument.put (MessageFormat.Field.ARGUMENT,
|
||||||
@ -613,7 +613,7 @@ public class MessageFormat extends Format
|
|||||||
}
|
}
|
||||||
index += leader.length();
|
index += leader.length();
|
||||||
|
|
||||||
Vector results = new Vector (elements.length, 1);
|
ArrayList<Object> results = new ArrayList<Object>(elements.length);
|
||||||
// Now check each format.
|
// Now check each format.
|
||||||
for (int i = 0; i < elements.length; ++i)
|
for (int i = 0; i < elements.length; ++i)
|
||||||
{
|
{
|
||||||
@ -681,15 +681,18 @@ public class MessageFormat extends Format
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (elements[i].argNumber >= results.size())
|
if (elements[i].argNumber >= results.size())
|
||||||
results.setSize(elements[i].argNumber + 1);
|
{
|
||||||
results.setElementAt(value, elements[i].argNumber);
|
// Emulate padding behaviour of Vector.setSize() with ArrayList
|
||||||
|
results.ensureCapacity(elements[i].argNumber + 1);
|
||||||
|
for (int a = results.size(); a <= elements[i].argNumber; ++a)
|
||||||
|
results.add(a, null);
|
||||||
|
}
|
||||||
|
results.set(elements[i].argNumber, value);
|
||||||
|
|
||||||
index += elements[i].trailer.length();
|
index += elements[i].trailer.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
Object[] r = new Object[results.size()];
|
return results.toArray(new Object[results.size()]);
|
||||||
results.copyInto(r);
|
|
||||||
return r;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object[] parse (String sourceStr) throws ParseException
|
public Object[] parse (String sourceStr) throws ParseException
|
||||||
|
@ -177,6 +177,7 @@ public abstract class NumberFormat extends Format implements Cloneable
|
|||||||
* This constructor is only used by the deserializer. Without it,
|
* This constructor is only used by the deserializer. Without it,
|
||||||
* it would fail to construct a valid object.
|
* it would fail to construct a valid object.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private Field()
|
private Field()
|
||||||
{
|
{
|
||||||
super("");
|
super("");
|
||||||
|
@ -151,13 +151,13 @@ public class RuleBasedCollator extends Collator
|
|||||||
*/
|
*/
|
||||||
static final class CollationElement
|
static final class CollationElement
|
||||||
{
|
{
|
||||||
String key;
|
final String key;
|
||||||
int primary;
|
final int primary;
|
||||||
short secondary;
|
final short secondary;
|
||||||
short tertiary;
|
final short tertiary;
|
||||||
short equality;
|
final short equality;
|
||||||
boolean ignore;
|
final boolean ignore;
|
||||||
String expansion;
|
final String expansion;
|
||||||
|
|
||||||
CollationElement(String key, int primary, short secondary, short tertiary,
|
CollationElement(String key, int primary, short secondary, short tertiary,
|
||||||
short equality, String expansion, boolean ignore)
|
short equality, String expansion, boolean ignore)
|
||||||
@ -185,7 +185,7 @@ public class RuleBasedCollator extends Collator
|
|||||||
* {@link #mergeRules(int,java.lang.String,java.util.ArrayList,java.util.ArrayList)})
|
* {@link #mergeRules(int,java.lang.String,java.util.ArrayList,java.util.ArrayList)})
|
||||||
* as a temporary state while merging two sets of instructions.
|
* as a temporary state while merging two sets of instructions.
|
||||||
*/
|
*/
|
||||||
static final class CollationSorter
|
private static final class CollationSorter
|
||||||
{
|
{
|
||||||
static final int GREATERP = 0;
|
static final int GREATERP = 0;
|
||||||
static final int GREATERS = 1;
|
static final int GREATERS = 1;
|
||||||
@ -194,29 +194,39 @@ public class RuleBasedCollator extends Collator
|
|||||||
static final int RESET = 4;
|
static final int RESET = 4;
|
||||||
static final int INVERSE_SECONDARY = 5;
|
static final int INVERSE_SECONDARY = 5;
|
||||||
|
|
||||||
int comparisonType;
|
final int comparisonType;
|
||||||
String textElement;
|
final String textElement;
|
||||||
int hashText;
|
final int hashText;
|
||||||
int offset;
|
final int offset;
|
||||||
boolean ignore;
|
final boolean ignore;
|
||||||
|
|
||||||
String expansionOrdering;
|
String expansionOrdering;
|
||||||
|
|
||||||
|
private CollationSorter(final int comparisonType, final String textElement,
|
||||||
|
final int offset, final boolean ignore)
|
||||||
|
{
|
||||||
|
this.comparisonType = comparisonType;
|
||||||
|
this.textElement = textElement;
|
||||||
|
this.offset = offset;
|
||||||
|
this.ignore = ignore;
|
||||||
|
hashText = textElement.hashCode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This the the original rule string.
|
* This is the original rule string.
|
||||||
*/
|
*/
|
||||||
private String rules;
|
private String rules;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the table of collation element values
|
* This is the table of collation element values
|
||||||
*/
|
*/
|
||||||
private Object[] ce_table;
|
private CollationElement[] ce_table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Quick-prefix finder.
|
* Quick-prefix finder.
|
||||||
*/
|
*/
|
||||||
HashMap prefix_tree;
|
HashMap<String,CollationElement> prefix_tree;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the value of the last sequence entered into
|
* This is the value of the last sequence entered into
|
||||||
@ -306,7 +316,8 @@ public class RuleBasedCollator extends Collator
|
|||||||
* @param patch Rules to be merged into the repository.
|
* @param patch Rules to be merged into the repository.
|
||||||
* @throws ParseException if it is impossible to find an anchor point for the new rules.
|
* @throws ParseException if it is impossible to find an anchor point for the new rules.
|
||||||
*/
|
*/
|
||||||
private void mergeRules(int offset, String starter, ArrayList main, ArrayList patch)
|
private void mergeRules(int offset, String starter, ArrayList<CollationSorter> main,
|
||||||
|
ArrayList<CollationSorter> patch)
|
||||||
throws ParseException
|
throws ParseException
|
||||||
{
|
{
|
||||||
int insertion_point = -1;
|
int insertion_point = -1;
|
||||||
@ -324,8 +335,8 @@ public class RuleBasedCollator extends Collator
|
|||||||
|
|
||||||
while (j < main.size())
|
while (j < main.size())
|
||||||
{
|
{
|
||||||
CollationSorter rule1 = (CollationSorter) patch.get(i);
|
CollationSorter rule1 = patch.get(i);
|
||||||
CollationSorter rule2 = (CollationSorter) main.get(j);
|
CollationSorter rule2 = main.get(j);
|
||||||
|
|
||||||
if (rule1.textElement.equals(rule2.textElement))
|
if (rule1.textElement.equals(rule2.textElement))
|
||||||
main.remove(j);
|
main.remove(j);
|
||||||
@ -337,7 +348,7 @@ public class RuleBasedCollator extends Collator
|
|||||||
// Find the insertion point... O(N)
|
// Find the insertion point... O(N)
|
||||||
for (int i = 0; i < main.size(); i++)
|
for (int i = 0; i < main.size(); i++)
|
||||||
{
|
{
|
||||||
CollationSorter sorter = (CollationSorter) main.get(i);
|
CollationSorter sorter = main.get(i);
|
||||||
int length = findPrefixLength(starter, sorter.textElement);
|
int length = findPrefixLength(starter, sorter.textElement);
|
||||||
|
|
||||||
if (length > max_length)
|
if (length > max_length)
|
||||||
@ -363,9 +374,7 @@ public class RuleBasedCollator extends Collator
|
|||||||
* sequence. The rest of the subsequence must be appended
|
* sequence. The rest of the subsequence must be appended
|
||||||
* to the end of the sequence.
|
* to the end of the sequence.
|
||||||
*/
|
*/
|
||||||
CollationSorter sorter = (CollationSorter) patch.get(0);
|
CollationSorter sorter = patch.get(0);
|
||||||
CollationSorter expansionPrefix =
|
|
||||||
(CollationSorter) main.get(insertion_point-1);
|
|
||||||
|
|
||||||
sorter.expansionOrdering = starter.substring(max_length); // Skip the first good prefix element
|
sorter.expansionOrdering = starter.substring(max_length); // Skip the first good prefix element
|
||||||
|
|
||||||
@ -398,7 +407,7 @@ public class RuleBasedCollator extends Collator
|
|||||||
* @throws ParseException if something turned wrong during the parsing. To get details
|
* @throws ParseException if something turned wrong during the parsing. To get details
|
||||||
* decode the message.
|
* decode the message.
|
||||||
*/
|
*/
|
||||||
private int subParseString(boolean stop_on_reset, ArrayList v,
|
private int subParseString(boolean stop_on_reset, ArrayList<CollationSorter> v,
|
||||||
int base_offset, String rules)
|
int base_offset, String rules)
|
||||||
throws ParseException
|
throws ParseException
|
||||||
{
|
{
|
||||||
@ -508,7 +517,7 @@ main_parse_loop:
|
|||||||
* indicated by the text element.
|
* indicated by the text element.
|
||||||
*/
|
*/
|
||||||
String subrules = rules.substring(i);
|
String subrules = rules.substring(i);
|
||||||
ArrayList sorted_rules = new ArrayList();
|
ArrayList<CollationSorter> sorted_rules = new ArrayList<CollationSorter>();
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
// Parse the subrules but do not iterate through all
|
// Parse the subrules but do not iterate through all
|
||||||
@ -533,16 +542,12 @@ main_parse_loop:
|
|||||||
break main_parse_loop;
|
break main_parse_loop;
|
||||||
}
|
}
|
||||||
|
|
||||||
CollationSorter sorter = new CollationSorter();
|
String textElement = sb.toString();
|
||||||
|
|
||||||
if (operator == CollationSorter.GREATERP)
|
if (operator == CollationSorter.GREATERP)
|
||||||
ignoreChars = false;
|
ignoreChars = false;
|
||||||
|
CollationSorter sorter = new CollationSorter(operator, textElement,
|
||||||
sorter.comparisonType = operator;
|
base_offset + rules.length(),
|
||||||
sorter.textElement = sb.toString();
|
ignoreChars);
|
||||||
sorter.hashText = sorter.textElement.hashCode();
|
|
||||||
sorter.offset = base_offset+rules.length();
|
|
||||||
sorter.ignore = ignoreChars;
|
|
||||||
sb.setLength(0);
|
sb.setLength(0);
|
||||||
|
|
||||||
v.add(sorter);
|
v.add(sorter);
|
||||||
@ -551,7 +556,6 @@ main_parse_loop:
|
|||||||
|
|
||||||
if (operator >= 0)
|
if (operator >= 0)
|
||||||
{
|
{
|
||||||
CollationSorter sorter = new CollationSorter();
|
|
||||||
int pos = rules.length() + base_offset;
|
int pos = rules.length() + base_offset;
|
||||||
|
|
||||||
if ((sb.length() != 0 && nextIsModifier)
|
if ((sb.length() != 0 && nextIsModifier)
|
||||||
@ -561,11 +565,8 @@ main_parse_loop:
|
|||||||
if (operator == CollationSorter.GREATERP)
|
if (operator == CollationSorter.GREATERP)
|
||||||
ignoreChars = false;
|
ignoreChars = false;
|
||||||
|
|
||||||
sorter.comparisonType = operator;
|
CollationSorter sorter = new CollationSorter(operator, sb.toString(),
|
||||||
sorter.textElement = sb.toString();
|
base_offset+pos, ignoreChars);
|
||||||
sorter.hashText = sorter.textElement.hashCode();
|
|
||||||
sorter.offset = base_offset+pos;
|
|
||||||
sorter.ignore = ignoreChars;
|
|
||||||
v.add(sorter);
|
v.add(sorter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -593,10 +594,10 @@ main_parse_loop:
|
|||||||
* @throws ParseException if something turned wrong during the parsing. To get details
|
* @throws ParseException if something turned wrong during the parsing. To get details
|
||||||
* decode the message.
|
* decode the message.
|
||||||
*/
|
*/
|
||||||
private ArrayList parseString(String rules)
|
private ArrayList<CollationSorter> parseString(String rules)
|
||||||
throws ParseException
|
throws ParseException
|
||||||
{
|
{
|
||||||
ArrayList v = new ArrayList();
|
ArrayList<CollationSorter> v = new ArrayList<CollationSorter>();
|
||||||
|
|
||||||
// result of the first subParseString is not absolute (may be -1 or a
|
// result of the first subParseString is not absolute (may be -1 or a
|
||||||
// positive integer). But we do not care.
|
// positive integer). But we do not care.
|
||||||
@ -612,7 +613,7 @@ main_parse_loop:
|
|||||||
* @param parsedElements Parsed instructions stored in a ArrayList.
|
* @param parsedElements Parsed instructions stored in a ArrayList.
|
||||||
* @throws ParseException if the order of the instructions are not valid.
|
* @throws ParseException if the order of the instructions are not valid.
|
||||||
*/
|
*/
|
||||||
private void buildCollationVector(ArrayList parsedElements)
|
private void buildCollationVector(ArrayList<CollationSorter> parsedElements)
|
||||||
throws ParseException
|
throws ParseException
|
||||||
{
|
{
|
||||||
int primary_seq = 0;
|
int primary_seq = 0;
|
||||||
@ -624,14 +625,13 @@ main_parse_loop:
|
|||||||
final boolean DECREASING = false;
|
final boolean DECREASING = false;
|
||||||
final boolean INCREASING = true;
|
final boolean INCREASING = true;
|
||||||
boolean secondaryType = INCREASING;
|
boolean secondaryType = INCREASING;
|
||||||
ArrayList v = new ArrayList();
|
ArrayList<CollationElement> v = new ArrayList<CollationElement>();
|
||||||
|
|
||||||
// elts is completely sorted.
|
// elts is completely sorted.
|
||||||
element_loop:
|
element_loop:
|
||||||
for (int i = 0; i < parsedElements.size(); i++)
|
for (int i = 0; i < parsedElements.size(); i++)
|
||||||
{
|
{
|
||||||
CollationSorter elt = (CollationSorter) parsedElements.get(i);
|
CollationSorter elt = parsedElements.get(i);
|
||||||
boolean ignoreChar = false;
|
|
||||||
|
|
||||||
switch (elt.comparisonType)
|
switch (elt.comparisonType)
|
||||||
{
|
{
|
||||||
@ -686,7 +686,7 @@ element_loop:
|
|||||||
|
|
||||||
this.inverseAccentComparison = inverseComparisons;
|
this.inverseAccentComparison = inverseComparisons;
|
||||||
|
|
||||||
ce_table = v.toArray();
|
ce_table = v.toArray(new CollationElement[v.size()]);
|
||||||
|
|
||||||
last_primary_value = primary_seq+1;
|
last_primary_value = primary_seq+1;
|
||||||
last_tertiary_value = last_tertiary_seq+1;
|
last_tertiary_value = last_tertiary_seq+1;
|
||||||
@ -699,11 +699,11 @@ element_loop:
|
|||||||
*/
|
*/
|
||||||
private void buildPrefixAccess()
|
private void buildPrefixAccess()
|
||||||
{
|
{
|
||||||
prefix_tree = new HashMap();
|
prefix_tree = new HashMap<String,CollationElement>();
|
||||||
|
|
||||||
for (int i = 0; i < ce_table.length; i++)
|
for (int i = 0; i < ce_table.length; i++)
|
||||||
{
|
{
|
||||||
CollationElement e = (CollationElement) ce_table[i];
|
CollationElement e = ce_table[i];
|
||||||
|
|
||||||
prefix_tree.put(e.key, e);
|
prefix_tree.put(e.key, e);
|
||||||
}
|
}
|
||||||
@ -941,7 +941,7 @@ element_loop:
|
|||||||
public CollationKey getCollationKey(String source)
|
public CollationKey getCollationKey(String source)
|
||||||
{
|
{
|
||||||
CollationElementIterator cei = getCollationElementIterator(source);
|
CollationElementIterator cei = getCollationElementIterator(source);
|
||||||
ArrayList vect = new ArrayList();
|
ArrayList<Integer> vect = new ArrayList<Integer>();
|
||||||
|
|
||||||
int ord = cei.next();
|
int ord = cei.next();
|
||||||
cei.reset(); //set to start of string
|
cei.reset(); //set to start of string
|
||||||
@ -969,16 +969,16 @@ element_loop:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
vect.add(new Integer(ord));
|
vect.add(Integer.valueOf(ord));
|
||||||
ord = cei.next(); //increment to next key
|
ord = cei.next(); //increment to next key
|
||||||
}
|
}
|
||||||
|
|
||||||
Object[] objarr = vect.toArray();
|
Integer[] objarr = vect.toArray(new Integer[vect.size()]);
|
||||||
byte[] key = new byte[objarr.length * 4];
|
byte[] key = new byte[objarr.length * 4];
|
||||||
|
|
||||||
for (int i = 0; i < objarr.length; i++)
|
for (int i = 0; i < objarr.length; i++)
|
||||||
{
|
{
|
||||||
int j = ((Integer) objarr[i]).intValue();
|
int j = objarr[i].intValue();
|
||||||
key [i * 4] = (byte) ((j & 0xFF000000) >> 24);
|
key [i * 4] = (byte) ((j & 0xFF000000) >> 24);
|
||||||
key [i * 4 + 1] = (byte) ((j & 0x00FF0000) >> 16);
|
key [i * 4 + 1] = (byte) ((j & 0x00FF0000) >> 16);
|
||||||
key [i * 4 + 2] = (byte) ((j & 0x0000FF00) >> 8);
|
key [i * 4 + 2] = (byte) ((j & 0x0000FF00) >> 8);
|
||||||
|
@ -159,13 +159,13 @@ public class SimpleDateFormat extends DateFormat
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of <code>CompiledField</code>s,
|
* A list of <code>CompiledField</code>s and {@code String}s
|
||||||
* representing the compiled version of the pattern.
|
* representing the compiled version of the pattern.
|
||||||
*
|
*
|
||||||
* @see CompiledField
|
* @see CompiledField
|
||||||
* @serial Ignored.
|
* @serial Ignored.
|
||||||
*/
|
*/
|
||||||
private transient ArrayList tokens;
|
private transient ArrayList<Object> tokens;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The localised data used in formatting,
|
* The localised data used in formatting,
|
||||||
@ -235,8 +235,8 @@ public class SimpleDateFormat extends DateFormat
|
|||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 4774881970558875024L;
|
private static final long serialVersionUID = 4774881970558875024L;
|
||||||
|
|
||||||
// This string is specified in the Java class libraries.
|
// This string is specified in the root of the CLDR.
|
||||||
private static final String standardChars = "GyMdkHmsSEDFwWahKzZ";
|
private static final String standardChars = "GyMdkHmsSEDFwWahKzYeugAZvcL";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the position of the RFC822 timezone pattern character
|
* Represents the position of the RFC822 timezone pattern character
|
||||||
@ -244,7 +244,7 @@ public class SimpleDateFormat extends DateFormat
|
|||||||
* U.S. locale, this is 'Z'. The value is the offset of the current
|
* U.S. locale, this is 'Z'. The value is the offset of the current
|
||||||
* time from GMT e.g. -0500 would be five hours prior to GMT.
|
* time from GMT e.g. -0500 would be five hours prior to GMT.
|
||||||
*/
|
*/
|
||||||
private static final int RFC822_TIMEZONE_FIELD = 18;
|
private static final int RFC822_TIMEZONE_FIELD = 23;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the serialized version of this object.
|
* Reads the serialized version of this object.
|
||||||
@ -274,7 +274,7 @@ public class SimpleDateFormat extends DateFormat
|
|||||||
set2DigitYearStart(defaultCenturyStart);
|
set2DigitYearStart(defaultCenturyStart);
|
||||||
|
|
||||||
// Set up items normally taken care of by the constructor.
|
// Set up items normally taken care of by the constructor.
|
||||||
tokens = new ArrayList();
|
tokens = new ArrayList<Object>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
compileFormat(pattern);
|
compileFormat(pattern);
|
||||||
@ -416,7 +416,7 @@ public class SimpleDateFormat extends DateFormat
|
|||||||
Locale locale = Locale.getDefault();
|
Locale locale = Locale.getDefault();
|
||||||
calendar = new GregorianCalendar(locale);
|
calendar = new GregorianCalendar(locale);
|
||||||
computeCenturyStart();
|
computeCenturyStart();
|
||||||
tokens = new ArrayList();
|
tokens = new ArrayList<Object>();
|
||||||
formatData = new DateFormatSymbols(locale);
|
formatData = new DateFormatSymbols(locale);
|
||||||
pattern = (formatData.dateFormats[DEFAULT] + ' '
|
pattern = (formatData.dateFormats[DEFAULT] + ' '
|
||||||
+ formatData.timeFormats[DEFAULT]);
|
+ formatData.timeFormats[DEFAULT]);
|
||||||
@ -454,7 +454,7 @@ public class SimpleDateFormat extends DateFormat
|
|||||||
super();
|
super();
|
||||||
calendar = new GregorianCalendar(locale);
|
calendar = new GregorianCalendar(locale);
|
||||||
computeCenturyStart();
|
computeCenturyStart();
|
||||||
tokens = new ArrayList();
|
tokens = new ArrayList<Object>();
|
||||||
formatData = new DateFormatSymbols(locale);
|
formatData = new DateFormatSymbols(locale);
|
||||||
compileFormat(pattern);
|
compileFormat(pattern);
|
||||||
this.pattern = pattern;
|
this.pattern = pattern;
|
||||||
@ -479,7 +479,7 @@ public class SimpleDateFormat extends DateFormat
|
|||||||
super();
|
super();
|
||||||
calendar = new GregorianCalendar();
|
calendar = new GregorianCalendar();
|
||||||
computeCenturyStart ();
|
computeCenturyStart ();
|
||||||
tokens = new ArrayList();
|
tokens = new ArrayList<Object>();
|
||||||
if (formatData == null)
|
if (formatData == null)
|
||||||
throw new NullPointerException("formatData");
|
throw new NullPointerException("formatData");
|
||||||
this.formatData = formatData;
|
this.formatData = formatData;
|
||||||
@ -524,7 +524,7 @@ public class SimpleDateFormat extends DateFormat
|
|||||||
*/
|
*/
|
||||||
public void applyPattern(String pattern)
|
public void applyPattern(String pattern)
|
||||||
{
|
{
|
||||||
tokens = new ArrayList();
|
tokens.clear();
|
||||||
compileFormat(pattern);
|
compileFormat(pattern);
|
||||||
this.pattern = pattern;
|
this.pattern = pattern;
|
||||||
}
|
}
|
||||||
@ -697,11 +697,10 @@ public class SimpleDateFormat extends DateFormat
|
|||||||
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos)
|
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos)
|
||||||
{
|
{
|
||||||
String temp;
|
String temp;
|
||||||
AttributedCharacterIterator.Attribute attribute;
|
|
||||||
calendar.setTime(date);
|
calendar.setTime(date);
|
||||||
|
|
||||||
// go through vector, filling in fields where applicable, else toString
|
// go through vector, filling in fields where applicable, else toString
|
||||||
Iterator iter = tokens.iterator();
|
Iterator<Object> iter = tokens.iterator();
|
||||||
while (iter.hasNext())
|
while (iter.hasNext())
|
||||||
{
|
{
|
||||||
Object o = iter.next();
|
Object o = iter.next();
|
||||||
@ -910,7 +909,6 @@ public class SimpleDateFormat extends DateFormat
|
|||||||
char ch = pattern.charAt(fmt_index);
|
char ch = pattern.charAt(fmt_index);
|
||||||
if (ch == '\'')
|
if (ch == '\'')
|
||||||
{
|
{
|
||||||
int index = pos.getIndex();
|
|
||||||
if (fmt_index < fmt_max - 1
|
if (fmt_index < fmt_max - 1
|
||||||
&& pattern.charAt(fmt_index + 1) == '\'')
|
&& pattern.charAt(fmt_index + 1) == '\'')
|
||||||
{
|
{
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -176,9 +176,6 @@ Java_gnu_java_awt_peer_gtk_FreetypeGlyphVector_getKerning
|
|||||||
{
|
{
|
||||||
FT_Face ft_face;
|
FT_Face ft_face;
|
||||||
FT_Vector kern;
|
FT_Vector kern;
|
||||||
jclass cls;
|
|
||||||
jmethodID method;
|
|
||||||
jvalue values[2];
|
|
||||||
PangoFcFont *font;
|
PangoFcFont *font;
|
||||||
|
|
||||||
font = JLONG_TO_PTR(PangoFcFont, fnt);
|
font = JLONG_TO_PTR(PangoFcFont, fnt);
|
||||||
@ -388,8 +385,23 @@ Java_gnu_java_awt_peer_gtk_FreetypeGlyphVector_getGlyphOutlineNative
|
|||||||
}
|
}
|
||||||
|
|
||||||
FT_Get_Glyph( ft_face->glyph, &glyph );
|
FT_Get_Glyph( ft_face->glyph, &glyph );
|
||||||
FT_Outline_Decompose (&(((FT_OutlineGlyph)glyph)->outline),
|
if (glyph->format == FT_GLYPH_FORMAT_OUTLINE)
|
||||||
&ftCallbacks, path);
|
{
|
||||||
|
FT_Outline_Decompose (&(((FT_OutlineGlyph)glyph)->outline),
|
||||||
|
&ftCallbacks, path);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char format[5];
|
||||||
|
|
||||||
|
format[0] = (glyph->format & 0xFF000000) >> 24;
|
||||||
|
format[1] = (glyph->format & 0x00FF0000) >> 16;
|
||||||
|
format[2] = (glyph->format & 0x0000FF00) >> 8;
|
||||||
|
format[3] = (glyph->format & 0x000000FF);
|
||||||
|
format[4] = '\0';
|
||||||
|
printf("WARNING: Unable to create outline for font %s %s of format %s\n",
|
||||||
|
ft_face->family_name, ft_face->style_name, format);
|
||||||
|
}
|
||||||
FT_Done_Glyph( glyph );
|
FT_Done_Glyph( glyph );
|
||||||
|
|
||||||
pango_fc_font_unlock_face( font );
|
pango_fc_font_unlock_face( font );
|
||||||
|
@ -70,7 +70,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
virtual void getGlyphs(JArray< jint > *, JArray< jint > *, JArray< jlong > *);
|
virtual void getGlyphs(JArray< jint > *, JArray< jint > *, JArray< jlong > *);
|
||||||
private:
|
private:
|
||||||
::java::awt::geom::Point2D * getKerning(jint, jint, jlong);
|
void getKerning(jint, jint, jlong, JArray< jfloat > *);
|
||||||
JArray< jdouble > * getMetricsNative(jint, jlong);
|
JArray< jdouble > * getMetricsNative(jint, jlong);
|
||||||
::java::awt::geom::GeneralPath * getGlyphOutlineNative(jint, jlong);
|
::java::awt::geom::GeneralPath * getGlyphOutlineNative(jint, jlong);
|
||||||
public:
|
public:
|
||||||
|
@ -15,6 +15,10 @@ extern "Java"
|
|||||||
{
|
{
|
||||||
namespace java
|
namespace java
|
||||||
{
|
{
|
||||||
|
namespace lang
|
||||||
|
{
|
||||||
|
class CPStringBuilder;
|
||||||
|
}
|
||||||
namespace text
|
namespace text
|
||||||
{
|
{
|
||||||
class FormatCharacterIterator;
|
class FormatCharacterIterator;
|
||||||
@ -38,9 +42,9 @@ extern "Java"
|
|||||||
class java::text::MessageFormat : public ::java::text::Format
|
class java::text::MessageFormat : public ::java::text::Format
|
||||||
{
|
{
|
||||||
|
|
||||||
static jint scanString(::java::lang::String *, jint, ::java::lang::StringBuilder *);
|
static jint scanString(::java::lang::String *, jint, ::gnu::java::lang::CPStringBuilder *);
|
||||||
static jint scanFormatElement(::java::lang::String *, jint, ::java::lang::StringBuilder *, jchar);
|
static jint scanFormatElement(::java::lang::String *, jint, ::gnu::java::lang::CPStringBuilder *, jchar);
|
||||||
static jint scanFormat(::java::lang::String *, jint, ::java::lang::StringBuilder *, ::java::util::Vector *, ::java::util::Locale *);
|
static jint scanFormat(::java::lang::String *, jint, ::gnu::java::lang::CPStringBuilder *, ::java::util::List *, ::java::util::Locale *);
|
||||||
public:
|
public:
|
||||||
virtual void applyPattern(::java::lang::String *);
|
virtual void applyPattern(::java::lang::String *);
|
||||||
virtual ::java::lang::Object * clone();
|
virtual ::java::lang::Object * clone();
|
||||||
|
@ -21,8 +21,9 @@ extern "Java"
|
|||||||
class java::text::RuleBasedCollator$CollationSorter : public ::java::lang::Object
|
class java::text::RuleBasedCollator$CollationSorter : public ::java::lang::Object
|
||||||
{
|
{
|
||||||
|
|
||||||
|
RuleBasedCollator$CollationSorter(jint, ::java::lang::String *, jint, jboolean);
|
||||||
public: // actually package-private
|
public: // actually package-private
|
||||||
RuleBasedCollator$CollationSorter();
|
RuleBasedCollator$CollationSorter(jint, ::java::lang::String *, jint, jboolean, ::java::text::RuleBasedCollator$CollationSorter *);
|
||||||
static const jint GREATERP = 0;
|
static const jint GREATERP = 0;
|
||||||
static const jint GREATERS = 1;
|
static const jint GREATERS = 1;
|
||||||
static const jint GREATERT = 2;
|
static const jint GREATERT = 2;
|
||||||
|
@ -54,7 +54,7 @@ public:
|
|||||||
virtual jint hashCode();
|
virtual jint hashCode();
|
||||||
private:
|
private:
|
||||||
::java::lang::String * __attribute__((aligned(__alignof__( ::java::text::Collator)))) rules;
|
::java::lang::String * __attribute__((aligned(__alignof__( ::java::text::Collator)))) rules;
|
||||||
JArray< ::java::lang::Object * > * ce_table;
|
JArray< ::java::text::RuleBasedCollator$CollationElement * > * ce_table;
|
||||||
public: // actually package-private
|
public: // actually package-private
|
||||||
::java::util::HashMap * prefix_tree;
|
::java::util::HashMap * prefix_tree;
|
||||||
private:
|
private:
|
||||||
|
@ -80,7 +80,7 @@ private:
|
|||||||
jint serialVersionOnStream;
|
jint serialVersionOnStream;
|
||||||
static const jlong serialVersionUID = 4774881970558875024LL;
|
static const jlong serialVersionUID = 4774881970558875024LL;
|
||||||
static ::java::lang::String * standardChars;
|
static ::java::lang::String * standardChars;
|
||||||
static const jint RFC822_TIMEZONE_FIELD = 18;
|
static const jint RFC822_TIMEZONE_FIELD = 23;
|
||||||
public:
|
public:
|
||||||
static ::java::lang::Class class$;
|
static ::java::lang::Class class$;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user