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:
Andrew John Hughes 2009-01-06 22:44:05 +00:00
parent 5e5debf66a
commit c10bf728da
32 changed files with 5129 additions and 4669 deletions

View File

@ -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>
PR target/38300

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,7 @@
2008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
2008-11-12 Jakub Jelinek <jakub@redhat.com>
PR libgcj/33764
@ -7,6 +11,12 @@
* configure: 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>
PR java/37893

View File

@ -2,7 +2,7 @@ Installation Instructions
*************************
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
unlimited permission to copy, distribute and modify it.
@ -73,9 +73,9 @@ The simplest way to compile this package is:
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
@ -100,6 +100,20 @@ architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
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
==================
@ -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
`--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
==========================
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
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
type, such as `sun4', or a canonical name which has the form:
@ -171,9 +207,9 @@ eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
@ -201,11 +237,19 @@ an Autoconf bug. Until the bug is fixed you can use this workaround:
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`configure' recognizes the following options to control how it
operates.
`--help'
`-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'
`-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
`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 --help' for more details.

View File

@ -3,11 +3,11 @@
% Load plain if necessary, i.e., if running under initex.
\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,
% 2007 Free Software Foundation, Inc.
% 2007, 2008 Free Software Foundation, Inc.
%
% 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
@ -97,6 +97,9 @@
\let\ptexslash=\/
\let\ptexstar=\*
\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
% starts a new line in the output.
@ -460,7 +463,7 @@
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\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.,
% @end itemize @c foo
@ -485,7 +488,7 @@
% 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,
% 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
% that a pair of braces would be stripped.
%
@ -542,12 +545,12 @@
% used to check whether the current environment is the one expected.
%
% 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
% special case.)
% At runtime, environments start with this:
% At run-time, environments start with this:
\def\startenvironment#1{\begingroup\def\thisenv{#1}}
% initialize
\let\thisenv\empty
@ -565,7 +568,7 @@
\fi
}
% Evironment mismatch, #1 expected:
% Environment mismatch, #1 expected:
\def\badenverr{%
\errhelp = \EMsimple
\errmessage{This command can appear only \inenvironment\temp,
@ -649,8 +652,8 @@
\def\jmacro{j}
\def\dotless#1{%
\def\temp{#1}%
\ifx\temp\imacro \ptexi
\else\ifx\temp\jmacro \j
\ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
\else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
\else \errmessage{@dotless can be used only with i or j}%
\fi\fi
}
@ -916,15 +919,20 @@ where each line of input produces a line of output.}
\temp
}
% @include file insert text of that file as input.
% @include FILE -- \input text of FILE.
%
\def\include{\parseargusing\filenamecatcodes\includezzz}
\def\includezzz#1{%
\pushthisfilestack
\def\thisfile{#1}%
{%
\makevalueexpandable
\def\temp{\input #1 }%
\makevalueexpandable % we want to expand any @value in FILE.
\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
}\temp
\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
}
\def\pushthisfilestack{%
@ -1114,6 +1124,16 @@ where each line of input produces a line of output.}
\mathunderscore
\let\\ = \mathbackslash
\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
}
\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
\gdef\mathactive{%
\let^ = \ptexhat
\let< = \ptexless
\let> = \ptexgtr
\let+ = \ptexplus
\let' = \ptexquoteright
}
}
% @bullet and @minus need the same treatment as @math, just above.
% Some math mode symbols.
\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.
% 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.JPG \ifeof 1
\openin 1 #1.pdf \ifeof 1
\openin 1 #1.PDF \ifeof 1
\errhelp = \nopdfimagehelp
\errmessage{Could not find image file #1 for pdf}%
\else \gdef\pdfimgext{PDF}%
\fi
\else \gdef\pdfimgext{pdf}%
\fi
\else \gdef\pdfimgext{JPG}%
@ -1377,7 +1404,7 @@ output) for that.)}
\closein 1
\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.)
\ifnum\pdftexversion < 14
\immediate\pdfimage
@ -1607,6 +1634,10 @@ output) for that.)}
\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
\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.
% So we set up a \sf.
\newfam\sffam
@ -2004,8 +2035,6 @@ end
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
\def\authorrm{\secrm}
\def\authortt{\sectt}
\def\titleecsize{2074}
% Chapter (and unnumbered) fonts (17.28pt).
@ -2137,8 +2166,6 @@ end
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
\def\authorrm{\secrm}
\def\authortt{\sectt}
\def\titleecsize{2074}
% Chapter fonts (14.4pt).
@ -2270,7 +2297,7 @@ end
\def\curfontsize{title}%
\def\lsize{chap}\def\lllsize{subsec}%
\resetmathfonts \setleading{25pt}}
\def\titlefont#1{{\titlefonts\rm #1}}
\def\titlefont#1{{\titlefonts\rmisbold #1}}
\def\chapfonts{%
\let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
\let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
@ -2376,7 +2403,7 @@ end
\let\i=\smartitalic
\let\slanted=\smartslanted
\let\var=\smartslanted
\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
\let\dfn=\smartslanted
\let\emph=\smartitalic
@ -2416,7 +2443,7 @@ end
{\tt \rawbackslash \plainfrenchspacing #1}%
\null
}
\def\samp#1{`\tclose{#1}'\null}
\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
\setfont\keyrm\rmshape{8}{1000}{OT1}
\font\keysy=cmsy9
\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
@ -2425,7 +2452,7 @@ end
\hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
\kern-0.4pt\hrule}%
\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:
%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
\def\ctrl #1{{\tt \rawbackslash \hat}#1}
@ -2469,11 +2496,11 @@ end
{
\catcode`\-=\active \catcode`\_=\active
\catcode`\'=\active \catcode`\`=\active
\global\let'=\rq \global\let`=\lq % default definitions
%
\global\def\code{\begingroup
\catcode\rquoteChar=\active \catcode\lquoteChar=\active
\let'\codequoteright \let`\codequoteleft
%
\setupmarkupstyle{code}%
% The following should really be moved into \setupmarkupstyle handlers.
\catcode\dashChar=\active \catcode\underChar=\active
\ifallowcodebreaks
\let-\codedash
@ -2552,14 +2579,21 @@ end
\def\xkey{\key}
\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
\ifx\one\xkey\ifx\threex\three \key{#2}%
\else{\tclose{\kbdfont\look}}\fi
\else{\tclose{\kbdfont\look}}\fi}
\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
\let\indicateurl=\code
\let\env=\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)
% 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
@ -2621,7 +2655,7 @@ end
%
\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'',
% 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\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{%
% 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
% quotes to documents typeset with CM, where we lose kerning), so
% hopefully nobody will notice/care.
@ -2851,12 +2912,9 @@ end
\let\subtitlerm=\tenrm
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
\let\tt=\authortt}
\parseargdef\title{%
\checkenv\titlepage
\leftline{\titlefonts\rm #1}
\leftline{\titlefonts\rmisbold #1}
% print a rule at the page bottom also.
\finishedtitlepagefalse
\vskip4pt \hrule height 4pt width \hsize \vskip4pt
@ -2877,7 +2935,7 @@ end
\else
\checkenv\titlepage
\ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
{\authorfont \leftline{#1}}%
{\secfonts\rmisbold \leftline{#1}}%
\fi
}
@ -3847,11 +3905,11 @@ end
\def\dosynindex#1#2#3{%
% Only do \closeout if we haven't already done it, else we'll end up
% 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
% Acorn RISC OS is a mere 16 files.
\expandafter\closeout\csname#2indfile\endcsname
\expandafter\let\csname\donesynindex#2\endcsname = 1
\expandafter\let\csname donesynindex#2\endcsname = 1
\fi
% redefine \fooindfile:
\expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
@ -4009,6 +4067,7 @@ end
\definedummyword\guilsinglright
\definedummyword\expansion
\definedummyword\minus
\definedummyword\ogonek
\definedummyword\pounds
\definedummyword\point
\definedummyword\print
@ -4052,6 +4111,7 @@ end
\definedummyword\v
\definedummyword\H
\definedummyword\dotaccent
\definedummyword\ogonek
\definedummyword\ringaccent
\definedummyword\tieaccent
\definedummyword\ubaraccent
@ -4432,7 +4492,7 @@ end
%
% A straightforward implementation would start like this:
% \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---
% ``-'' 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
% if justification is not attempted. Hence \raggedright.
\def\majorheading{%
{\advance\chapheadingskip by 10pt \chapbreak }%
\parsearg\chapheadingzzz
@ -5044,7 +5103,7 @@ end
\def\chapheadingzzz#1{%
{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
\parindent=0pt\raggedright
\rm #1\hfill}}%
\rmisbold #1\hfill}}%
\bigskip \par\penalty 200\relax
\suppressfirstparagraphindent
}
@ -5163,7 +5222,7 @@ end
\domark
%
{%
\chapfonts \rm
\chapfonts \rmisbold
%
% Have to define \lastsection before calling \donoderef, because the
% xref code eventually uses it. On the other hand, it has to be called
@ -5225,7 +5284,7 @@ end
\def\unnchfopen #1{%
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
\parindent=0pt\raggedright
\rm #1\hfill}}\bigskip \par\nobreak
\rmisbold #1\hfill}}\bigskip \par\nobreak
}
\def\chfopen #1#2{\chapoddpage {\chapfonts
\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
@ -5234,7 +5293,7 @@ end
\def\centerchfopen #1{%
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
\parindent=0pt
\hfill {\rm #1}\hfill}}\bigskip \par\nobreak
\hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
}
\def\CHAPFopen{%
\global\let\chapmacro=\chfopen
@ -5267,7 +5326,7 @@ end
\def\sectionheading#1#2#3#4{%
{%
% Switch to the right set of fonts.
\csname #2fonts\endcsname \rm
\csname #2fonts\endcsname \rmisbold
%
\def\sectionlevel{#2}%
\def\temptype{#3}%
@ -5650,16 +5709,120 @@ end
\message{environments,}
% @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{}.
%
% 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.
%
\def\point{$\star$}
\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\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\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
% The @error{} command.
% Adapted from the TeXbook's \boxit.
@ -5689,6 +5852,7 @@ end
% But \@ or @@ will get a plain tex @ character.
\envdef\tex{%
\setupmarkupstyle{tex}%
\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
\catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
@ -5698,6 +5862,8 @@ end
\catcode `\|=\other
\catcode `\<=\other
\catcode `\>=\other
\catcode`\`=\other
\catcode`\'=\other
\escapechar=`\\
%
\let\b=\ptexb
@ -5717,6 +5883,7 @@ end
\let\/=\ptexslash
\let\*=\ptexstar
\let\t=\ptext
\expandafter \let\csname top\endcsname=\ptextop % outer
\let\frenchspacing=\plainfrenchspacing
%
\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
@ -5898,7 +6065,7 @@ end
%
\maketwodispenvs {lisp}{example}{%
\nonfillstart
\tt\quoteexpand
\tt\setupmarkupstyle{example}%
\let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
\gobble % eat return
}
@ -5941,7 +6108,7 @@ end
% we're doing normal filling. So, when using \aboveenvbreak and
% \afterenvbreak, temporarily make \parskip 0.
%
\envdef\quotation{%
\def\quotationstart{%
{\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
\parindent=0pt
%
@ -5956,6 +6123,17 @@ end
\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
% doing normal filling.
%
@ -5991,18 +6169,16 @@ end
\do\ \do\\\do\{\do\}\do\$\do\&%
\do\#\do\^\do\^^K\do\_\do\^^A\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
\def\uncatcodespecials{%
\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.
%
% Eight spaces for a tab
@ -6014,7 +6190,7 @@ end
\def\setupverb{%
\tt % easiest (and conventionally used) font for verbatim
\def\par{\leavevmode\endgraf}%
\catcode`\`=\active
\setupmarkupstyle{verb}%
\tabeightspaces
% Respect line breaks,
% print special symbols as themselves, and
@ -6029,33 +6205,6 @@ end
\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
%
\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
\catcode`\^^I=\active
@ -6069,13 +6218,6 @@ end
\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
% start the verbatim environment.
@ -6085,9 +6227,8 @@ end
% Easiest (and conventionally used) font for verbatim
\tt
\def\par{\leavevmode\egroup\box0\endgraf}%
\catcode`\`=\active
\tabexpand
\quoteexpand
\setupmarkupstyle{verbatim}%
% Respect line breaks,
% print special symbols as themselves, and
% make each space count
@ -6147,6 +6288,7 @@ end
{%
\makevalueexpandable
\setupverbatim
\indexnofonts % Allow `@@' and other weird things in file names.
\input #1
\afterenvbreak
}%
@ -6246,7 +6388,7 @@ end
\def\Edefun{\endgraf\medbreak}
% \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{%
\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
% want a way to get ttsl. Let's try @var for that.
\let\var=\ttslanted
\def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
#1%
\sl\hyphenchar\font=45
}
@ -6953,19 +7095,21 @@ end
%
% Make link in pdf output.
\ifpdf
\leavevmode
\getfilename{#4}%
{\indexnofonts
\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.
{\activebackslashdouble \xdef\pdfxrefdest{#1}%
\backslashparens\pdfxrefdest}%
%
\ifnum\filenamelength>0
\leavevmode
\startlink attr{/Border [0 0 0]}%
\ifnum\filenamelength>0
goto file{\the\filename.pdf} name{\pdfxrefdest}%
\else
\startlink attr{/Border [0 0 0]}%
goto name{\pdfmkpgn{\pdfxrefdest}}%
\fi
}%
@ -7317,7 +7461,7 @@ end
% 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
% 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.
% 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.
\ifvmode
\imagevmodetrue
\nobreak\bigskip
\nobreak\medskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
\nobreak\vskip\parskip
\nobreak
\line\bgroup
\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.
\ifpdf
\dopdfimage{#1}{#2}{#3}%
@ -7440,7 +7588,7 @@ end
\epsfbox{#1.eps}%
\fi
%
\ifimagevmode \egroup \bigbreak \fi % space after the image
\ifimagevmode \medskip \fi % space after the standalone image
\endgroup}
@ -7712,10 +7860,9 @@ end
\message{localization,}
% @documentlanguage is usually given very early, just after
% @setfilename. If done too late, it may not override everything
% properly. Single argument is the language (de) or locale (de_DE)
% abbreviation. It would be nice if we could set up a hyphenation file.
% For single-language documents, @documentlanguage is usually given very
% early, just after @documentencoding. Single argument is the language
% (de) or locale (de_DE) abbreviation.
%
{
\catcode`\_ = \active
@ -7728,10 +7875,11 @@ end
\ifeof 1
\documentlanguagetrywithoutunderscore{#1_\finish}%
\else
\globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex
\fi
\closein 1
\endgroup
\endgroup % end raw TeX
\endgroup}
}
%
@ -7750,9 +7898,36 @@ end
}
%
\newhelp\nolanghelp{The given language definition file cannot be found or
is empty. Maybe you need to install it? In the current directory
should work if nowhere else does.}
is empty. Maybe you need to install it? Putting it in the current
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.
%
\def\setnonasciicharscatcode#1{%
@ -7841,7 +8016,7 @@ should work if nowhere else does.}
\gdef^^a8{\"{}}
\gdef^^a9{\copyright}
\gdef^^aa{\ordf}
\gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}}
\gdef^^ab{\guillemetleft}
\gdef^^ac{$\lnot$}
\gdef^^ad{\-}
\gdef^^ae{\registeredsymbol}
@ -7860,7 +8035,7 @@ should work if nowhere else does.}
\gdef^^b9{$^1$}
\gdef^^ba{\ordm}
%
\gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}}
\gdef^^bb{\guilletright}
\gdef^^bc{$1\over4$}
\gdef^^bd{$1\over2$}
\gdef^^be{$3\over4$}
@ -7953,7 +8128,7 @@ should work if nowhere else does.}
% Latin2 (ISO-8859-2) character definitions.
\def\lattwochardefs{%
\gdef^^a0{~}
\gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}}
\gdef^^a1{\ogonek{A}}
\gdef^^a2{\u{}}
\gdef^^a3{\L}
\gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
@ -7970,8 +8145,8 @@ should work if nowhere else does.}
\gdef^^af{\dotaccent Z}
%
\gdef^^b0{\textdegree}
\gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}}
\gdef^^b2{\missingcharmsg{OGONEK}}
\gdef^^b1{\ogonek{a}}
\gdef^^b2{\ogonek{ }}
\gdef^^b3{\l}
\gdef^^b4{\'{}}
\gdef^^b5{\v l}
@ -7996,7 +8171,7 @@ should work if nowhere else does.}
\gdef^^c7{\cedilla C}
\gdef^^c8{\v C}
\gdef^^c9{\'E}
\gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}}
\gdef^^ca{\ogonek{E}}
\gdef^^cb{\"E}
\gdef^^cc{\v E}
\gdef^^cd{\'I}
@ -8030,7 +8205,7 @@ should work if nowhere else does.}
\gdef^^e7{\cedilla c}
\gdef^^e8{\v c}
\gdef^^e9{\'e}
\gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}}
\gdef^^ea{\ogonek{e}}
\gdef^^eb{\"e}
\gdef^^ec{\v e}
\gdef^^ed{\'\i}
@ -8259,10 +8434,14 @@ should work if nowhere else does.}
\DeclareUnicodeCharacter{0101}{\=a}
\DeclareUnicodeCharacter{0102}{\u{A}}
\DeclareUnicodeCharacter{0103}{\u{a}}
\DeclareUnicodeCharacter{0104}{\ogonek{A}}
\DeclareUnicodeCharacter{0105}{\ogonek{a}}
\DeclareUnicodeCharacter{0106}{\'C}
\DeclareUnicodeCharacter{0107}{\'c}
\DeclareUnicodeCharacter{0108}{\^C}
\DeclareUnicodeCharacter{0109}{\^c}
\DeclareUnicodeCharacter{0118}{\ogonek{E}}
\DeclareUnicodeCharacter{0119}{\ogonek{e}}
\DeclareUnicodeCharacter{010A}{\dotaccent{C}}
\DeclareUnicodeCharacter{010B}{\dotaccent{c}}
\DeclareUnicodeCharacter{010C}{\v{C}}
@ -8410,6 +8589,8 @@ should work if nowhere else does.}
\DeclareUnicodeCharacter{0233}{\=y}
\DeclareUnicodeCharacter{0237}{\dotless{j}}
\DeclareUnicodeCharacter{02DB}{\ogonek{ }}
\DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
\DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
\DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
@ -8912,6 +9093,8 @@ should work if nowhere else does.}
@let>=@normalgreater
@let+=@normalplus
@let$=@normaldollar %$ font-lock fix
@markupsetuplqdefault
@markupsetuprqdefault
@unsepspaces
}
@ -8946,6 +9129,14 @@ should work if nowhere else does.}
@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 eval: (add-hook 'write-file-hooks 'time-stamp)

View File

@ -97,7 +97,8 @@ public class SecretKeyGeneratorImpl
{
keySize >>>= 3; // Use bytes.
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;
this.random = random;
init = true;

View File

@ -68,17 +68,17 @@ public class Bindings
/**
* Global variables.
*/
final LinkedList variables;
final LinkedList<Map<QName,Object>> variables;
/**
* Parameter value stack.
*/
final LinkedList parameters;
final LinkedList<Map<QName,Object>> parameters;
/**
* Argument (with-param) value stack.
*/
final LinkedList withParameters;
final LinkedList<Map<QName,Object>> withParameters;
/**
* Only search globals.
@ -88,9 +88,9 @@ public class Bindings
Bindings(Stylesheet stylesheet)
{
this.stylesheet = stylesheet;
variables = new LinkedList();
parameters = new LinkedList();
withParameters = new LinkedList();
variables = new LinkedList<Map<QName,Object>>();
parameters = new LinkedList<Map<QName,Object>>();
withParameters = new LinkedList<Map<QName,Object>>();
for (int i = 0; i < 3; i++)
{
push(i);
@ -114,13 +114,13 @@ public class Bindings
switch (type)
{
case VARIABLE:
variables.addFirst(new HashMap());
variables.addFirst(new HashMap<QName,Object>());
break;
case PARAM:
parameters.addFirst(new HashMap());
parameters.addFirst(new HashMap<QName,Object>());
break;
case WITH_PARAM:
withParameters.addFirst(new HashMap());
withParameters.addFirst(new HashMap<QName,Object>());
break;
}
}
@ -145,11 +145,11 @@ public class Bindings
{
if (global)
{
Map ctx1 = (Map) variables.getLast();
Map ctx2 = (Map) parameters.getLast();
Map<QName,Object> ctx1 = variables.getLast();
Map<QName,Object> ctx2 = parameters.getLast();
return (ctx1.containsKey(name) || ctx2.containsKey(name));
}
Iterator i = null;
Iterator<Map<QName,Object>> i = null;
switch (type)
{
case VARIABLE:
@ -159,14 +159,14 @@ public class Bindings
i = parameters.iterator();
break;
case WITH_PARAM:
Map ctx = (Map) withParameters.getFirst();
Map<QName,Object> ctx = withParameters.getFirst();
return ctx.containsKey(name);
}
if (i != null)
{
while (i.hasNext())
{
Map ctx = (Map) i.next();
Map<QName,Object> ctx = i.next();
if (ctx.containsKey(name))
{
return true;
@ -180,11 +180,11 @@ public class Bindings
{
if (global)
{
Map ctx = (Map) variables.getLast();
Map<QName,Object> ctx = variables.getLast();
Object ret = ctx.get(name);
if (ret == null)
{
ctx = (Map) parameters.getLast();
ctx = parameters.getLast();
ret = ctx.get(name);
}
return ret;
@ -195,24 +195,26 @@ public class Bindings
//if (parameters.size() > 1 && containsKey(name, PARAM))
// check that template defines parameter
{
Map cwp = (Map) withParameters.getFirst();
Map<QName,Object> cwp = withParameters.getFirst();
ret = cwp.get(name);
//System.err.println("\twith-param: ret="+ret);
}
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);
}
//System.err.println("\tvariable: ret="+ret);
}
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);
}
//System.err.println("\tparam: ret="+ret);
@ -239,15 +241,15 @@ public class Bindings
switch (type)
{
case VARIABLE:
Map vctx = (Map) variables.getFirst();
Map<QName,Object> vctx = variables.getFirst();
vctx.put(name, value);
break;
case PARAM:
Map pctx = (Map) parameters.getFirst();
Map<QName,Object> pctx = parameters.getFirst();
pctx.put(name, value);
break;
case WITH_PARAM:
Map wctx = (Map) withParameters.getFirst();
Map<QName,Object> wctx = withParameters.getFirst();
wctx.put(name, value);
break;
}
@ -263,10 +265,10 @@ public class Bindings
{
CPStringBuilder buf = new CPStringBuilder();
boolean next = false;
Collection seen = new HashSet();
Map wctx = (Map) withParameters.getFirst();
Collection<QName> seen = new HashSet<QName>();
Map<QName,Object> wctx = withParameters.getFirst();
buf.append('(');
for (Iterator i = wctx.entrySet().iterator(); i.hasNext(); )
for (Map.Entry<QName,Object> entry : wctx.entrySet())
{
if (next)
{
@ -276,8 +278,7 @@ public class Bindings
{
next = true;
}
Map.Entry entry = (Map.Entry) i.next();
Object key = entry.getKey();
QName key = entry.getKey();
if (!seen.contains(key))
{
buf.append(key);
@ -290,10 +291,9 @@ public class Bindings
next = false;
seen.clear();
buf.append('{');
for (Iterator i = variables.iterator(); i.hasNext(); )
for (Map<QName,Object> ctx : variables)
{
Map ctx = (Map) i.next();
for (Iterator j = ctx.entrySet().iterator(); j.hasNext(); )
for (Map.Entry<QName,Object> entry : ctx.entrySet())
{
if (next)
{
@ -303,8 +303,7 @@ public class Bindings
{
next = true;
}
Map.Entry entry = (Map.Entry) j.next();
Object key = entry.getKey();
QName key = entry.getKey();
if (!seen.contains(key))
{
buf.append(key);
@ -318,10 +317,9 @@ public class Bindings
next = false;
seen.clear();
buf.append('[');
for (Iterator i = parameters.iterator(); i.hasNext(); )
for (Map<QName,Object> ctx : parameters)
{
Map ctx = (Map) i.next();
for (Iterator j = ctx.entrySet().iterator(); j.hasNext(); )
for (Map.Entry<QName,Object> entry : ctx.entrySet())
{
if (next)
{
@ -331,8 +329,7 @@ public class Bindings
{
next = true;
}
Map.Entry entry = (Map.Entry) j.next();
Object key = entry.getKey();
QName key = entry.getKey();
if (!seen.contains(key))
{
buf.append(key);

View File

@ -337,8 +337,58 @@ public final class String
* @throws Error if the decoding fails
* @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
{
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)
throw new StringIndexOutOfBoundsException("offset: " + offset);
@ -350,7 +400,7 @@ public final class String
+ (offset + count));
try
{
CharsetDecoder csd = Charset.forName(encoding).newDecoder();
CharsetDecoder csd = encoding.newDecoder();
csd.onMalformedInput(CodingErrorAction.REPLACE);
csd.onUnmappableCharacter(CodingErrorAction.REPLACE);
CharBuffer cbuf = csd.decode(ByteBuffer.wrap(data, offset, count));
@ -366,15 +416,11 @@ public final class String
this.offset = 0;
this.count = value.length;
}
} catch(CharacterCodingException e){
throw new UnsupportedEncodingException("Encoding: "+encoding+
" not found.");
} catch(IllegalCharsetNameException e){
throw new UnsupportedEncodingException("Encoding: "+encoding+
" not found.");
} catch(UnsupportedCharsetException e){
throw new UnsupportedEncodingException("Encoding: "+encoding+
" not found.");
}
catch(CharacterCodingException e)
{
// This shouldn't ever happen.
throw (InternalError) new InternalError().initCause(e);
}
}
@ -401,6 +447,26 @@ public final class String
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
* 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
* @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
{
CharsetEncoder cse = Charset.forName(enc).newEncoder();
CharsetEncoder cse = enc.newEncoder();
cse.onMalformedInput(CodingErrorAction.REPLACE);
cse.onUnmappableCharacter(CodingErrorAction.REPLACE);
ByteBuffer bbuf = cse.encode(CharBuffer.wrap(value, offset, count));
@ -742,16 +827,6 @@ public final class String
bbuf.get(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)
{
// This shouldn't ever happen.

View File

@ -38,13 +38,17 @@ exception statement from your version. */
package java.text;
import gnu.java.lang.CPStringBuilder;
import gnu.java.text.FormatCharacterIterator;
import java.io.InvalidObjectException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Vector;
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
// class.
Class formatClass;
Class<?> formatClass;
// Formatter type.
String type;
@ -95,12 +99,7 @@ public class MessageFormat extends Format
else if (style.equals("percent"))
format = NumberFormat.getPercentInstance(loc);
else if (style.equals("integer"))
{
NumberFormat nf = NumberFormat.getNumberInstance(loc);
nf.setMaximumFractionDigits(0);
nf.setGroupingUsed(false);
format = nf;
}
format = NumberFormat.getIntegerInstance(loc);
else
{
format = NumberFormat.getNumberInstance(loc);
@ -165,6 +164,7 @@ public class MessageFormat extends Format
public static final MessageFormat.Field ARGUMENT = new MessageFormat.Field("argument");
// For deserialization
@SuppressWarnings("unused")
private Field()
{
super("");
@ -194,7 +194,7 @@ public class MessageFormat extends Format
// Helper that returns the text up to the next format opener. The
// text is put into BUFFER. Returns index of character after end of
// 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();
buffer.setLength(0);
@ -234,7 +234,7 @@ public class MessageFormat extends Format
// This helper retrieves a single part of a format element. Returns
// the index of the terminating character.
private static int scanFormatElement(String pat, int index,
StringBuilder buffer, char term)
CPStringBuilder buffer, char term)
{
int max = pat.length();
buffer.setLength(0);
@ -281,11 +281,11 @@ public class MessageFormat extends Format
// This is used to parse a format element and whatever non-format
// text might trail it.
private static int scanFormat(String pat, int index, StringBuilder buffer,
Vector elts, Locale locale)
private static int scanFormat(String pat, int index, CPStringBuilder buffer,
List<MessageFormatElement> elts, Locale locale)
{
MessageFormatElement mfe = new MessageFormatElement ();
elts.addElement(mfe);
elts.add(mfe);
int max = pat.length();
@ -342,17 +342,16 @@ public class MessageFormat extends Format
{
pattern = newPattern;
StringBuilder tempBuffer = new StringBuilder ();
CPStringBuilder tempBuffer = new CPStringBuilder ();
int index = scanString (newPattern, 0, tempBuffer);
leader = tempBuffer.toString();
Vector elts = new Vector ();
List<MessageFormatElement> elts = new ArrayList<MessageFormatElement>();
while (index < newPattern.length())
index = scanFormat (newPattern, index, tempBuffer, elts, locale);
elements = new MessageFormatElement[elts.size()];
elts.copyInto(elements);
elements = elts.toArray(new MessageFormatElement[elts.size()]);
}
/**
@ -494,7 +493,8 @@ public class MessageFormat extends Format
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();
hash_argument.put (MessageFormat.Field.ARGUMENT,
@ -613,7 +613,7 @@ public class MessageFormat extends Format
}
index += leader.length();
Vector results = new Vector (elements.length, 1);
ArrayList<Object> results = new ArrayList<Object>(elements.length);
// Now check each format.
for (int i = 0; i < elements.length; ++i)
{
@ -681,15 +681,18 @@ public class MessageFormat extends Format
}
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();
}
Object[] r = new Object[results.size()];
results.copyInto(r);
return r;
return results.toArray(new Object[results.size()]);
}
public Object[] parse (String sourceStr) throws ParseException

View File

@ -177,6 +177,7 @@ public abstract class NumberFormat extends Format implements Cloneable
* This constructor is only used by the deserializer. Without it,
* it would fail to construct a valid object.
*/
@SuppressWarnings("unused")
private Field()
{
super("");

View File

@ -151,13 +151,13 @@ public class RuleBasedCollator extends Collator
*/
static final class CollationElement
{
String key;
int primary;
short secondary;
short tertiary;
short equality;
boolean ignore;
String expansion;
final String key;
final int primary;
final short secondary;
final short tertiary;
final short equality;
final boolean ignore;
final String expansion;
CollationElement(String key, int primary, short secondary, short tertiary,
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)})
* 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 GREATERS = 1;
@ -194,29 +194,39 @@ public class RuleBasedCollator extends Collator
static final int RESET = 4;
static final int INVERSE_SECONDARY = 5;
int comparisonType;
String textElement;
int hashText;
int offset;
boolean ignore;
final int comparisonType;
final String textElement;
final int hashText;
final int offset;
final boolean ignore;
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;
/**
* This is the table of collation element values
*/
private Object[] ce_table;
private CollationElement[] ce_table;
/**
* Quick-prefix finder.
*/
HashMap prefix_tree;
HashMap<String,CollationElement> prefix_tree;
/**
* 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.
* @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
{
int insertion_point = -1;
@ -324,8 +335,8 @@ public class RuleBasedCollator extends Collator
while (j < main.size())
{
CollationSorter rule1 = (CollationSorter) patch.get(i);
CollationSorter rule2 = (CollationSorter) main.get(j);
CollationSorter rule1 = patch.get(i);
CollationSorter rule2 = main.get(j);
if (rule1.textElement.equals(rule2.textElement))
main.remove(j);
@ -337,7 +348,7 @@ public class RuleBasedCollator extends Collator
// Find the insertion point... O(N)
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);
if (length > max_length)
@ -363,9 +374,7 @@ public class RuleBasedCollator extends Collator
* sequence. The rest of the subsequence must be appended
* to the end of the sequence.
*/
CollationSorter sorter = (CollationSorter) patch.get(0);
CollationSorter expansionPrefix =
(CollationSorter) main.get(insertion_point-1);
CollationSorter sorter = patch.get(0);
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
* 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)
throws ParseException
{
@ -508,7 +517,7 @@ main_parse_loop:
* indicated by the text element.
*/
String subrules = rules.substring(i);
ArrayList sorted_rules = new ArrayList();
ArrayList<CollationSorter> sorted_rules = new ArrayList<CollationSorter>();
int idx;
// Parse the subrules but do not iterate through all
@ -533,16 +542,12 @@ main_parse_loop:
break main_parse_loop;
}
CollationSorter sorter = new CollationSorter();
String textElement = sb.toString();
if (operator == CollationSorter.GREATERP)
ignoreChars = false;
sorter.comparisonType = operator;
sorter.textElement = sb.toString();
sorter.hashText = sorter.textElement.hashCode();
sorter.offset = base_offset+rules.length();
sorter.ignore = ignoreChars;
CollationSorter sorter = new CollationSorter(operator, textElement,
base_offset + rules.length(),
ignoreChars);
sb.setLength(0);
v.add(sorter);
@ -551,7 +556,6 @@ main_parse_loop:
if (operator >= 0)
{
CollationSorter sorter = new CollationSorter();
int pos = rules.length() + base_offset;
if ((sb.length() != 0 && nextIsModifier)
@ -561,11 +565,8 @@ main_parse_loop:
if (operator == CollationSorter.GREATERP)
ignoreChars = false;
sorter.comparisonType = operator;
sorter.textElement = sb.toString();
sorter.hashText = sorter.textElement.hashCode();
sorter.offset = base_offset+pos;
sorter.ignore = ignoreChars;
CollationSorter sorter = new CollationSorter(operator, sb.toString(),
base_offset+pos, ignoreChars);
v.add(sorter);
}
@ -593,10 +594,10 @@ main_parse_loop:
* @throws ParseException if something turned wrong during the parsing. To get details
* decode the message.
*/
private ArrayList parseString(String rules)
private ArrayList<CollationSorter> parseString(String rules)
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
// positive integer). But we do not care.
@ -612,7 +613,7 @@ main_parse_loop:
* @param parsedElements Parsed instructions stored in a ArrayList.
* @throws ParseException if the order of the instructions are not valid.
*/
private void buildCollationVector(ArrayList parsedElements)
private void buildCollationVector(ArrayList<CollationSorter> parsedElements)
throws ParseException
{
int primary_seq = 0;
@ -624,14 +625,13 @@ main_parse_loop:
final boolean DECREASING = false;
final boolean INCREASING = true;
boolean secondaryType = INCREASING;
ArrayList v = new ArrayList();
ArrayList<CollationElement> v = new ArrayList<CollationElement>();
// elts is completely sorted.
element_loop:
for (int i = 0; i < parsedElements.size(); i++)
{
CollationSorter elt = (CollationSorter) parsedElements.get(i);
boolean ignoreChar = false;
CollationSorter elt = parsedElements.get(i);
switch (elt.comparisonType)
{
@ -686,7 +686,7 @@ element_loop:
this.inverseAccentComparison = inverseComparisons;
ce_table = v.toArray();
ce_table = v.toArray(new CollationElement[v.size()]);
last_primary_value = primary_seq+1;
last_tertiary_value = last_tertiary_seq+1;
@ -699,11 +699,11 @@ element_loop:
*/
private void buildPrefixAccess()
{
prefix_tree = new HashMap();
prefix_tree = new HashMap<String,CollationElement>();
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);
}
@ -941,7 +941,7 @@ element_loop:
public CollationKey getCollationKey(String source)
{
CollationElementIterator cei = getCollationElementIterator(source);
ArrayList vect = new ArrayList();
ArrayList<Integer> vect = new ArrayList<Integer>();
int ord = cei.next();
cei.reset(); //set to start of string
@ -969,16 +969,16 @@ element_loop:
break;
}
vect.add(new Integer(ord));
vect.add(Integer.valueOf(ord));
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];
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 + 1] = (byte) ((j & 0x00FF0000) >> 16);
key [i * 4 + 2] = (byte) ((j & 0x0000FF00) >> 8);

View File

@ -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.
*
* @see CompiledField
* @serial Ignored.
*/
private transient ArrayList tokens;
private transient ArrayList<Object> tokens;
/**
* The localised data used in formatting,
@ -235,8 +235,8 @@ public class SimpleDateFormat extends DateFormat
*/
private static final long serialVersionUID = 4774881970558875024L;
// This string is specified in the Java class libraries.
private static final String standardChars = "GyMdkHmsSEDFwWahKzZ";
// This string is specified in the root of the CLDR.
private static final String standardChars = "GyMdkHmsSEDFwWahKzYeugAZvcL";
/**
* 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
* 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.
@ -274,7 +274,7 @@ public class SimpleDateFormat extends DateFormat
set2DigitYearStart(defaultCenturyStart);
// Set up items normally taken care of by the constructor.
tokens = new ArrayList();
tokens = new ArrayList<Object>();
try
{
compileFormat(pattern);
@ -416,7 +416,7 @@ public class SimpleDateFormat extends DateFormat
Locale locale = Locale.getDefault();
calendar = new GregorianCalendar(locale);
computeCenturyStart();
tokens = new ArrayList();
tokens = new ArrayList<Object>();
formatData = new DateFormatSymbols(locale);
pattern = (formatData.dateFormats[DEFAULT] + ' '
+ formatData.timeFormats[DEFAULT]);
@ -454,7 +454,7 @@ public class SimpleDateFormat extends DateFormat
super();
calendar = new GregorianCalendar(locale);
computeCenturyStart();
tokens = new ArrayList();
tokens = new ArrayList<Object>();
formatData = new DateFormatSymbols(locale);
compileFormat(pattern);
this.pattern = pattern;
@ -479,7 +479,7 @@ public class SimpleDateFormat extends DateFormat
super();
calendar = new GregorianCalendar();
computeCenturyStart ();
tokens = new ArrayList();
tokens = new ArrayList<Object>();
if (formatData == null)
throw new NullPointerException("formatData");
this.formatData = formatData;
@ -524,7 +524,7 @@ public class SimpleDateFormat extends DateFormat
*/
public void applyPattern(String pattern)
{
tokens = new ArrayList();
tokens.clear();
compileFormat(pattern);
this.pattern = pattern;
}
@ -697,11 +697,10 @@ public class SimpleDateFormat extends DateFormat
private void formatWithAttribute(Date date, FormatBuffer buffer, FieldPosition pos)
{
String temp;
AttributedCharacterIterator.Attribute attribute;
calendar.setTime(date);
// go through vector, filling in fields where applicable, else toString
Iterator iter = tokens.iterator();
Iterator<Object> iter = tokens.iterator();
while (iter.hasNext())
{
Object o = iter.next();
@ -910,7 +909,6 @@ public class SimpleDateFormat extends DateFormat
char ch = pattern.charAt(fmt_index);
if (ch == '\'')
{
int index = pos.getIndex();
if (fmt_index < fmt_max - 1
&& pattern.charAt(fmt_index + 1) == '\'')
{

View File

@ -176,9 +176,6 @@ Java_gnu_java_awt_peer_gtk_FreetypeGlyphVector_getKerning
{
FT_Face ft_face;
FT_Vector kern;
jclass cls;
jmethodID method;
jvalue values[2];
PangoFcFont *font;
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 );
if (glyph->format == FT_GLYPH_FORMAT_OUTLINE)
{
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 );
pango_fc_font_unlock_face( font );

View File

@ -70,7 +70,7 @@ private:
public:
virtual void getGlyphs(JArray< jint > *, JArray< jint > *, JArray< jlong > *);
private:
::java::awt::geom::Point2D * getKerning(jint, jint, jlong);
void getKerning(jint, jint, jlong, JArray< jfloat > *);
JArray< jdouble > * getMetricsNative(jint, jlong);
::java::awt::geom::GeneralPath * getGlyphOutlineNative(jint, jlong);
public:

View File

@ -15,6 +15,10 @@ extern "Java"
{
namespace java
{
namespace lang
{
class CPStringBuilder;
}
namespace text
{
class FormatCharacterIterator;
@ -38,9 +42,9 @@ extern "Java"
class java::text::MessageFormat : public ::java::text::Format
{
static jint scanString(::java::lang::String *, jint, ::java::lang::StringBuilder *);
static jint scanFormatElement(::java::lang::String *, jint, ::java::lang::StringBuilder *, jchar);
static jint scanFormat(::java::lang::String *, jint, ::java::lang::StringBuilder *, ::java::util::Vector *, ::java::util::Locale *);
static jint scanString(::java::lang::String *, jint, ::gnu::java::lang::CPStringBuilder *);
static jint scanFormatElement(::java::lang::String *, jint, ::gnu::java::lang::CPStringBuilder *, jchar);
static jint scanFormat(::java::lang::String *, jint, ::gnu::java::lang::CPStringBuilder *, ::java::util::List *, ::java::util::Locale *);
public:
virtual void applyPattern(::java::lang::String *);
virtual ::java::lang::Object * clone();

View File

@ -21,8 +21,9 @@ extern "Java"
class java::text::RuleBasedCollator$CollationSorter : public ::java::lang::Object
{
RuleBasedCollator$CollationSorter(jint, ::java::lang::String *, jint, jboolean);
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 GREATERS = 1;
static const jint GREATERT = 2;

View File

@ -54,7 +54,7 @@ public:
virtual jint hashCode();
private:
::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
::java::util::HashMap * prefix_tree;
private:

View File

@ -80,7 +80,7 @@ private:
jint serialVersionOnStream;
static const jlong serialVersionUID = 4774881970558875024LL;
static ::java::lang::String * standardChars;
static const jint RFC822_TIMEZONE_FIELD = 18;
static const jint RFC822_TIMEZONE_FIELD = 23;
public:
static ::java::lang::Class class$;
};