diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2006-08-05 15:35:08 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2006-08-05 15:35:08 +0000 |
commit | 3a5a75d447cf2ea044123eba374b3943606f5ec2 (patch) | |
tree | 05f1e96a628f2c22303142c06824fce027260e78 | |
parent | b326aa9cb1476f46c403db651474df371cf44c2f (diff) | |
download | classpath-3a5a75d447cf2ea044123eba374b3943606f5ec2.tar.gz |
2006-08-05 Andrew John Hughes <gnu_andrew@member.fsf.org>
* examples/gnu/classpath/examples/swing/FillRect.java,
* gnu/CORBA/Focused_ORB.java,
* gnu/CORBA/interfaces/gnuSocketFactory.java,
* gnu/classpath/ByteArray.java,
* gnu/classpath/ObjectPool.java,
* gnu/java/awt/peer/ClasspathTextLayoutPeer.java,
* gnu/java/awt/peer/x/fonts.properties,
* gnu/java/security/util/Prime2.java,
* gnu/javax/imageio/gif/GIFStream.java,
* javax/swing/text/html/HTMLTableView.java,
* native/cni/Makefile.am,
* org/omg/CORBA/SendingContext/RunTimeOperations.java,
* org/omg/CORBA/SendingContext/Runtime.java,
* resource/gnu/regexp/MessagesBundle.properties,
* resource/gnu/regexp/MessagesBundle_fr.properties,
* resource/gnu/regexp/MessagesBundle_it.properties,
* tools/appletviewer.in,
* tools/jarsigner.in,
* tools/keytool.in,
* vm/reference/java/lang/management/VMThreadInfo.java:
Removed.
* examples/gnu/classpath/examples/awt/aicas.png,
* examples/gnu/classpath/examples/awt/palme.gif,
* examples/gnu/classpath/examples/java2d/aicas.png,
* examples/gnu/classpath/examples/java2d/palme.gif,
* gnu/java/awt/font/opentype/truetype/doc-files/ZonePathIterator-1.dia,
* gnu/java/awt/font/opentype/truetype/doc-files/ZonePathIterator-1.png,
* java/awt/doc-files/capjoin.png,
* java/awt/geom/doc-files/Area-1.png,
* java/awt/geom/doc-files/Ellipse-1.png,
* java/awt/geom/doc-files/GeneralPath-1.png:
Added.
31 files changed, 35 insertions, 2417 deletions
@@ -1,5 +1,40 @@ 2006-08-05 Andrew John Hughes <gnu_andrew@member.fsf.org> + * examples/gnu/classpath/examples/swing/FillRect.java, + * gnu/CORBA/Focused_ORB.java, + * gnu/CORBA/interfaces/gnuSocketFactory.java, + * gnu/classpath/ByteArray.java, + * gnu/classpath/ObjectPool.java, + * gnu/java/awt/peer/ClasspathTextLayoutPeer.java, + * gnu/java/awt/peer/x/fonts.properties, + * gnu/java/security/util/Prime2.java, + * gnu/javax/imageio/gif/GIFStream.java, + * javax/swing/text/html/HTMLTableView.java, + * native/cni/Makefile.am, + * org/omg/CORBA/SendingContext/RunTimeOperations.java, + * org/omg/CORBA/SendingContext/Runtime.java, + * resource/gnu/regexp/MessagesBundle.properties, + * resource/gnu/regexp/MessagesBundle_fr.properties, + * resource/gnu/regexp/MessagesBundle_it.properties, + * tools/appletviewer.in, + * tools/jarsigner.in, + * tools/keytool.in, + * vm/reference/java/lang/management/VMThreadInfo.java: + Removed. + * examples/gnu/classpath/examples/awt/aicas.png, + * examples/gnu/classpath/examples/awt/palme.gif, + * examples/gnu/classpath/examples/java2d/aicas.png, + * examples/gnu/classpath/examples/java2d/palme.gif, + * gnu/java/awt/font/opentype/truetype/doc-files/ZonePathIterator-1.dia, + * gnu/java/awt/font/opentype/truetype/doc-files/ZonePathIterator-1.png, + * java/awt/doc-files/capjoin.png, + * java/awt/geom/doc-files/Area-1.png, + * java/awt/geom/doc-files/Ellipse-1.png, + * java/awt/geom/doc-files/GeneralPath-1.png: + Added. + +2006-08-05 Andrew John Hughes <gnu_andrew@member.fsf.org> + * configdiag.jnlp: Removed. diff --git a/examples/gnu/classpath/examples/awt/aicas.png b/examples/gnu/classpath/examples/awt/aicas.png Binary files differnew file mode 100644 index 000000000..dcf39654b --- /dev/null +++ b/examples/gnu/classpath/examples/awt/aicas.png diff --git a/examples/gnu/classpath/examples/awt/palme.gif b/examples/gnu/classpath/examples/awt/palme.gif Binary files differnew file mode 100644 index 000000000..694794655 --- /dev/null +++ b/examples/gnu/classpath/examples/awt/palme.gif diff --git a/examples/gnu/classpath/examples/java2d/aicas.png b/examples/gnu/classpath/examples/java2d/aicas.png Binary files differnew file mode 100644 index 000000000..dcf39654b --- /dev/null +++ b/examples/gnu/classpath/examples/java2d/aicas.png diff --git a/examples/gnu/classpath/examples/java2d/palme.gif b/examples/gnu/classpath/examples/java2d/palme.gif Binary files differnew file mode 100644 index 000000000..694794655 --- /dev/null +++ b/examples/gnu/classpath/examples/java2d/palme.gif diff --git a/examples/gnu/classpath/examples/swing/FillRect.java b/examples/gnu/classpath/examples/swing/FillRect.java deleted file mode 100644 index 7c6f140a0..000000000 --- a/examples/gnu/classpath/examples/swing/FillRect.java +++ /dev/null @@ -1,388 +0,0 @@ -/* FillRect.java - demonstrator for classpath/gcj fillrect performance issue - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is part of GNU Classpath examples. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. */ - -package gnu.classpath.examples.swing; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -import javax.swing.JButton; -import javax.swing.JCheckBox; -import javax.swing.JComponent; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.SwingUtilities; - -/** - * @author Norman Hendrich - */ -public class FillRect - extends JPanel - implements ActionListener -{ - - static FillRect fillRectDemo; - - LCDCanvas lcd; - Worker worker; - JLabel label; - JCheckBox translate; - JCheckBox lines; - - int nx = 128; - int ny = 64; - int matrix[][], future[][]; - int generation = 0; - - // 20 msec, or 50 repaints per sec (theoretically) - int sleepMillis = 20; - long lastMillis = System.currentTimeMillis(); - - boolean enableRepaints = true; - - /** - * If true, test translation. - */ - boolean testTranslation = false; - - /** - * If true, paint lines rather than rectangles - */ - boolean paintLines; - - public void actionPerformed(ActionEvent e) - { - if (e.getActionCommand().equals("CLOSE")) - { - System.exit(0); - } - } - - public FillRect() - { - setSize(nx, ny); - createContent(); - } - - public void createContent() - { - setLayout(new BorderLayout()); - - JPanel p = new JPanel(new BorderLayout()); - lcd = new LCDCanvas(); - label = new JLabel(); - label.setText("not running"); - - translate = new JCheckBox("translate"); - translate.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent event) - { - testTranslation = translate.isSelected(); - } - }); - - lines = new JCheckBox("lines"); - lines.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent event) - { - paintLines = lines.isSelected(); - } - }); - - JPanel bottom = new JPanel(); - bottom.add(lines); - bottom.add(translate); - - p.add(lcd, BorderLayout.CENTER); - p.add(bottom, BorderLayout.SOUTH); - p.add(label, BorderLayout.NORTH); - add(p); - } - - public void setSize(int _nx,int _ny ) - { - nx = _nx; - ny = _ny; - matrix = new int[nx][ny]; - future = new int[nx][ny]; - } - - public void initFrameContent() - { - JPanel closePanel = new JPanel(); - JButton closeButton = new JButton("Close"); - closeButton.setActionCommand("CLOSE"); - closeButton.addActionListener(this); - closePanel.add(closeButton); - add(closePanel, BorderLayout.SOUTH); - } - - public void setSleepMillis(int millis) - { - sleepMillis = millis; - } - - public class LCDCanvas extends JPanel - { - private int sx, sy; - private Color activePixel = new Color(30, 30, 40); - private Color passivePixel = new Color(200, 180, 240); - private Color gridPixel = new Color(255, 240, 240); - - public LCDCanvas() - { - super(); - sx = 4 * nx; - sy = 4 * ny; - } - - public void paintComponent(Graphics g) - { - // for buffered drawing - not used atm - // g.drawImage( buffer, 0, 0, null ); - long t1 = System.currentTimeMillis(); - - g.setColor(gridPixel); - g.fillRect(0, 0, sx, sy); - - Color pixelColor = null; - - int dx, dy; - - if (paintLines) - { - for (int ix = 0; ix < nx; ix++) - for (int iy = 0; iy < ny; iy++) - { - if (matrix[ix][iy] != 0) - pixelColor = activePixel; - else - pixelColor = passivePixel; - - dx = 4 * ix; - dy = 4 * iy; - g.setColor(pixelColor); - - if (testTranslation) - { - g.translate(dx, dy); - g.drawLine(0, 0, 5, 5); - g.translate(- dx, - dy); - } - else - g.drawLine(dx, dy, dx + 5, dy + 5); - } - } - else - for (int ix = 0; ix < nx; ix++) - { - for (int iy = 0; iy < ny; iy++) - { - if (matrix[ix][iy] != 0) - pixelColor = activePixel; - else - pixelColor = passivePixel; - - dx = 4 * ix; - dy = 4 * iy; - g.setColor(pixelColor); - - if (testTranslation) - { - g.translate(dx, dy); - g.fillRect(0, 0, 3, 3); - g.translate(- dx, - dy); - } - else - g.fillRect(dx, dy, 3, 3); - } - } - - long t2 = System.currentTimeMillis(); - - label.setText("paintComponent took " + (t2 - t1) + " msec. " + "(" - + (nx * ny + 1) + " " - + (paintLines ? "drawLine" : "fillRect") + " calls)"); - - } - - public Dimension getPreferredSize() - { - return new Dimension(sx,sy); - } - - public Dimension getMinimumSize() - { - return new Dimension(sx,sy); - } - } - - public class Worker extends Thread - { - public void run() - { - boolean running = true; - while(running) - { - iteration(); - - if (enableRepaints) - display(); - - if (sleepMillis > 0) - { - try - { - Thread.sleep( sleepMillis ); - } - catch(InterruptedException ie) - { - running = false; - } - } - } - } - } - - /** - * stupid animation algorithm: show binary representation of current - * iteration. - */ - public void iteration() - { - generation++; - - for (int i = 0; i < nx; i++) - { - long tmp1 = 1L << i; - for (int j = 0; j < ny; j++) - { - // count neighbors - long tmp2 = (1L << j); - - - long tmp3 = generation & tmp1 & tmp2; - if (tmp3 != 0) - matrix[i][j] = 1; - else - matrix[i][j] = 0; - } - } - - if ((generation % 100) == 0) - { - long t = System.currentTimeMillis(); - // System.out.println( - // " generation= " + generation + - // " iterations/sec= " + 100.0*1000/(t-lastMillis) ); - lastMillis = t; - } - } - - public void display() - { - lcd.repaint(); - } - - public static void usage() - { - System.out.println( - "Usage: <java> FillRect2 [-sleep <millis>] [-size <int>] [-nopaint]\n" - + "Example: jamvm FillRect2 -sleep 10 -size 100\n" - ); - System.exit(0); - } - - public static void main(String args[]) - throws Exception - { - fillRectDemo = new FillRect(); - for (int i = 0; i < args.length; i++) - { - if ("-help".equals(args[i])) - { - usage(); - } - if ("-sleep".equals(args[i])) - { - fillRectDemo.setSleepMillis( Integer.parseInt(args[i + 1])); - i++; - } - if ("-size".equals(args[i])) - { - int size = Integer.parseInt(args[i + 1]); - fillRectDemo.setSize(size, size); - i++; - } - if ("-nopaint".equals(args[i])) - { - fillRectDemo.enableRepaints = false; - } - } - - SwingUtilities.invokeLater (new Runnable() - { - public void run() - { - - fillRectDemo.initFrameContent(); - JFrame frame = new JFrame("FillRect performance test"); - frame.getContentPane().add(fillRectDemo); - frame.pack(); - frame.show(); - fillRectDemo.worker = fillRectDemo.new Worker(); - fillRectDemo.worker.start(); - } - }); - } - - /** - * Returns a DemoFactory that creates a SliderDemo. - * - * @return a DemoFactory that creates a SliderDemo - */ - public static DemoFactory createDemoFactory() - { - return new DemoFactory() - { - public JComponent createDemo() - { - fillRectDemo = new FillRect(); - SwingUtilities.invokeLater - (new Runnable() - { - public void run() - { - fillRectDemo.worker = fillRectDemo.new Worker(); - fillRectDemo.worker.start(); - } - }); - return fillRectDemo; - } - }; - } -} diff --git a/gnu/CORBA/Focused_ORB.java b/gnu/CORBA/Focused_ORB.java deleted file mode 100644 index a895ce441..000000000 --- a/gnu/CORBA/Focused_ORB.java +++ /dev/null @@ -1,375 +0,0 @@ -/* Focused_ORB.java -- - Copyright (C) 2005 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.CORBA; - -import gnu.CORBA.Poa.ORB_1_4; - -import org.omg.CORBA.BAD_INV_ORDER; -import org.omg.CORBA.BAD_OPERATION; -import org.omg.CORBA.BAD_PARAM; -import org.omg.CORBA.CompletionStatus; -import org.omg.CORBA.NO_RESOURCES; -import org.omg.CORBA.portable.InvokeHandler; - -import java.applet.Applet; -import java.net.ServerSocket; -import java.util.Iterator; -import java.util.Properties; -import java.util.Random; -import java.util.StringTokenizer; - -/** - * This class implements the ORB that uses a single port or the restricted port - * range for all its objects. It is required to for use together with various - * firewalls that does not allow opening multiple randomly selected ports, as - * the defauld CORBA implementation used to do. The firewal must be configured - * to allow CORBA to work on one fixed port or (for better performance) on a - * small fixed range of ports. This does not restrict the maximal number of the - * connected objects as the objects can share the same port. - * - * The used port or the used port range can be specified via property - * gnu.CORBA.ListenerPort. The value of this property is a single port or range - * of ports, boundary values (inclusive) being separeted by dash (for instance, - * "1245-1250"). - * - * It is possible to instantiate multiple instances of the focused ORBs and - * combine them with the ordinary ORBs. If you instantiate several instances of - * the focused ORBs on the same host, they used port sets should not overlap. - * - * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) - */ -public class Focused_ORB - extends ORB_1_4 -{ - /** - * The name of the fixed port range property. The presence of this property - * indicates that the default focused ORB must be used. - */ - public static final String LISTENER_PORT = "gnu.CORBA.ListenerPort"; - - /** - * The start of the range of the available ports, inclusive. - */ - int m_ports_from = -1; - - /** - * The end of the range of the available ports, inclusive. - */ - int m_ports_to = -1; - - /** - * The requests to port are served in parallel threads. - */ - static final int PARALLEL = 0; - - /** - * The requests to port are served in the same thread. - */ - static final int SEQUENTIAL = 1; - - /** - * The random number generator to get a random port in the valid range. - */ - Random m_random = new Random(); - - /** - * Parse the "gnu.CORBA.ListenerPort" property and initialize the valid port - * set range. - */ - public void setPortRange(String property) - { - int from, to; - try - { - StringTokenizer st = new StringTokenizer(property, " -"); - if (st.countTokens() == 1) - from = to = Integer.parseInt(st.nextToken()); - else - { - from = Integer.parseInt(st.nextToken()); - to = Integer.parseInt(st.nextToken()); - m_random = new Random(); - } - setPortRange(from, to); - } - catch (Exception ex) - { - throw new BAD_PARAM("Unable to parse port range '" + property + "'"); - } - } - - /** - * Set the port range. - * - * @param from - start of the port range, inclusive. - * @param to - end of the port range, inclusive. - */ - public void setPortRange(int from, int to) - { - if (from < 0 || to < 0 || to < from) - throw new BAD_PARAM("Invalid range"); - m_ports_from = from; - m_ports_to = to; - } - - /** - * Get the port from the previously specified usage range. - */ - int getPortFromRange(int attempt) - { - if (m_ports_from == m_ports_to) - return m_ports_from; - else if (m_ports_to - m_ports_from < RANDOM_PORT_ATTEMPTS) - return m_ports_from + (attempt % (m_ports_to - m_ports_from + 1)); - else - return m_random.nextInt(m_ports_to - m_ports_from + 1) + m_ports_from; - } - - /** - * Get the shared port server where the new object can be added. This may - * result reusing the existing server or instantiating a new server. If the - * new server is instantiated and the ORB is already running, the server is - * started. - */ - protected portServer getPortServer(int type) - { - portServer p; - - int n; - if (m_ports_from < m_ports_to) - n = RANDOM_PORT_ATTEMPTS; - else - n = 1; - - Ports: for (int a = 0; a < n; a++) - { - int port = getPortFromRange(a); - for (int i = 0; i < portServers.size(); i++) - { - p = (portServer) portServers.get(i); - if (p.s_port == port) - { - return (portServer) p; - } - } - // The server is not yet instantiated. Instantiate. - try - { - // Check if the port is ok: - ServerSocket s = socketFactory.createServerSocket(port); - s.close(); - - portServer shared; - - switch (type) - { - case PARALLEL: - shared = new portServer(port); - break; - - case SEQUENTIAL: - shared = new sharedPortServer(port); - break; - - default: - throw new InternalError("Invalid server type " + type); - } - - portServers.add(shared); - - if (running) - shared.start(); - - return shared; - } - catch (Exception ex) - { - // Port is taken or probably other problems. - continue Ports; - } - } - throw new NO_RESOURCES("No free port available at " + m_ports_from + "-" - + m_ports_to, Minor.Ports, CompletionStatus.COMPLETED_NO); - } - - /** - * Start the ORBs main working cycle (receive invocation - invoke on the local - * object - send response - wait for another invocation). - * - * The method only returns after calling {@link #shutdown(boolean)}. - */ - public void run() - { - if (m_ports_from < 0 || m_ports_to < 0) - throw new BAD_INV_ORDER("For " + getClass().getName() + " " - + LISTENER_PORT + " property must be set"); - - running = true; - - // Start all port servers. In the current subclass, the portServers - // collection must be already filled in. - Iterator iter = portServers.iterator(); - - while (iter.hasNext()) - { - portServer subserver = (portServer) iter.next(); - - if (!subserver.isAlive()) - { - // Reuse the current thread for the last portServer. - if (!iter.hasNext()) - { - // Discard the iterator. - iter = null; - subserver.run(); - return; - } - else - subserver.start(); - } - } - } - - /** - * Get free port from the allowed range. This method instantiates the port - * server for the returned port. - */ - public int getFreePort() - throws BAD_OPERATION - { - portServer s = getPortServer(PARALLEL); - return s.s_port; - } - - /** - * Connect the given CORBA object to this ORB, explicitly specifying the - * object key and the identity of the thread (and port), where the object must - * be served. The identity is normally the POA. - * - * The new port server will be started only if there is no one already running - * for the same identity. Otherwise, the task of the existing port server will - * be widened, including duty to serve the given object. All objects, - * connected to a single identity by this method, will process they requests - * subsequently in the same thread. The method is used when the expected - * number of the objects is too large to have a single port and thread per - * object. This method is used by POAs, having a single thread policy. - * - * @param object the object, must implement the {@link InvokeHandler}) - * interface. - * @param key the object key, usually used to identify the object from remote - * side. - * @param port the port, where the object must be connected. - * - * @throws BAD_PARAM if the object does not implement the - * {@link InvokeHandler}). - */ - public void connect_1_thread(org.omg.CORBA.Object object, byte[] key, - java.lang.Object identity) - { - sharedPortServer shared = (sharedPortServer) identities.get(identity); - if (shared == null) - { - shared = (sharedPortServer) getPortServer(SEQUENTIAL); - identities.put(identity, shared); - if (running) - { - shared.start(); - } - } - - Connected_objects.cObject ref = connected_objects.add(key, object, - shared.s_port, identity); - IOR ior = createIOR(ref); - prepareObject(object, ior); - } - - /** - * In this type of ORB, the service is started by {@link #getPortServer}. The - * method below is not in use and should return without action. - */ - public void startService(IOR ior) - { - } - - /** - * Set parameters (additionally search for the port range property). - */ - protected void set_parameters(Applet applet, Properties props) - { - super.set_parameters(applet, props); - String lp = applet.getParameter(LISTENER_PORT); - if (lp != null) - setPortRange(lp); - } - - /** - * Set parameters (additionally search for the port range property). - */ - protected void set_parameters(String[] args, Properties props) - { - super.set_parameters(args, props); - String lp = null; - - String lpKey = "-" + LISTENER_PORT; - - if (args != null) - if (args.length >= 2) - { - for (int i = 0; i < args.length - 1; i++) - if (args[i].equals(lpKey)) - lp = args[i + 1]; - } - - if (lp != null) - setPortRange(lp); - - } - - /** - * Additionally set the port range property, when applicable. - */ - protected void useProperties(Properties props) - { - super.useProperties(props); - String lp = props.getProperty(LISTENER_PORT); - if (lp != null) - setPortRange(lp); - } - -} diff --git a/gnu/CORBA/interfaces/gnuSocketFactory.java b/gnu/CORBA/interfaces/gnuSocketFactory.java deleted file mode 100644 index 08057f5fa..000000000 --- a/gnu/CORBA/interfaces/gnuSocketFactory.java +++ /dev/null @@ -1,95 +0,0 @@ -/* gnuSocketFactory.java -- - Copyright (C) 2005 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.CORBA.interfaces; - -import java.io.IOException; -import java.net.ServerSocket; -import java.net.Socket; - -/** - * This class produces sockets for serving and submitting CORBA requests. The - * socket factory can be set using {@link gnuOrb.setSocketFactory()} for - * producting all sockets for that ORB. This is needed for using secure sockets, - * for implementing the desired timeout policies, for HTTP tunnels and in some - * other similar cases. While such functionality is provided by near all - * existing CORBA implementations, no standard mechanism is defined. - * - * The socket factory may need to put additional information to the IORs of the - * objects, released by the ORB. Because of this reason, this interface extends - * IORInterceptorOperations. - * - * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) - */ -public interface gnuSocketFactory -{ - /** - * The name of the ORB property that forces the ORB to use the socket - * factory class, the name of that (String) is the value of this property. - */ - final String PROPERTY = "gnu.CORBA.SocketFactory"; - - /** - * Create a server socket that should serve remote invocations on the given - * port. The ORB may use this socket to serve either one or more objects. - * - * @param port the port, on that the socket should be listening for requests. - * The port policy can be controlled by {@link gnuPortManager}. - * - * @throws IOException if the socket cannot be created on the given port due - * any reasons. The ORB may try to open the socket on another port, calling - * this method with the different parameter. - */ - ServerSocket createServerSocket(int port) - throws IOException; - - /** - * Create a client socket that should send a request to the remote side. When - * returned, the socket should be opened and ready to communicate. - * - * @param port the port, on that the socket should be openend. The port is - * usually part of the internet profile. - * - * @throws IOException if the socket cannot be created on the given port due - * any reasons. The ORB may try to open the socket on another port, calling - * this method with the different parameter. - */ - Socket createClientSocket(String host, int port) - throws IOException; - -} diff --git a/gnu/classpath/ByteArray.java b/gnu/classpath/ByteArray.java deleted file mode 100644 index 6307b8abd..000000000 --- a/gnu/classpath/ByteArray.java +++ /dev/null @@ -1,109 +0,0 @@ -/* ByteArray.java -- wrapper around a byte array, with nice toString output. - Copyright (C) 2005 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.classpath; - -import java.io.PrintWriter; -import java.io.StringWriter; - -public final class ByteArray -{ - private final byte[] value; - - public ByteArray (final byte[] value) - { - this.value = value; - } - - public byte[] getValue () - { - return value; - } - - public String toString () - { - StringWriter str = new StringWriter (); - PrintWriter out = new PrintWriter (str); - int i = 0; - int len = value.length; - while (i < len) - { - out.print (formatInt (i, 16, 8)); - out.print (" "); - int l = Math.min (16, len - i); - String s = toHexString (value, i, l, ' '); - out.print (s); - for (int j = 56 - (56 - s.length ()); j < 56; j++) - out.print (" "); - for (int j = 0; j < l; j++) - { - byte b = value[i+j]; - if ((b & 0xFF) < 0x20 || (b & 0xFF) > 0x7E) - out.print ("."); - else - out.print ((char) (b & 0xFF)); - } - out.println (); - i += 16; - } - return str.toString (); - } - - public static String toHexString (byte[] buf, int off, int len, char sep) - { - StringBuffer str = new StringBuffer(); - for (int i = 0; i < len; i++) - { - str.append (Character.forDigit (buf[i+off] >>> 4 & 0x0F, 16)); - str.append (Character.forDigit (buf[i+off] & 0x0F, 16)); - if (i < len - 1) - str.append(sep); - } - return str.toString(); - } - - public static String formatInt (int value, int radix, int len) - { - String s = Integer.toString (value, radix); - StringBuffer buf = new StringBuffer (); - for (int j = 0; j < len - s.length(); j++) - buf.append ("0"); - buf.append (s); - return buf.toString(); - } -} diff --git a/gnu/classpath/ObjectPool.java b/gnu/classpath/ObjectPool.java deleted file mode 100644 index 4821b1c3a..000000000 --- a/gnu/classpath/ObjectPool.java +++ /dev/null @@ -1,250 +0,0 @@ -/* ObjectPool.java -- A generic object pool. - Copyright (C) 2005 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package gnu.classpath; - -import java.util.HashMap; -import java.util.Stack; - -/** - * A generic object pool that can be used to cache frequently used - * objects. Typical examples are 'throwaway' objects like java.awt.Dimension - * java.awt.Rectangle and java.awt.Point of which are created plenty in - * Swing but that usually have a very short lifecycle. For such objects - * it is much more efficient to hold them in an object pool, because the - * overhead of allocating heap and garbage collecting is avoided. - * <p> - * To use this pool you have to do 3 steps: - * <ol> - * <li>Get a reference to the (singleton) ObjectPool instance.</li> - * <li>Get a reference to an object of the correct type; Do something with it - * </li> - * <li>After use, return the object back to the pool.</li> - * </ol> - * Note that you should never make any assumptions about the state of such - * an object, you are responsible to take care of this before you use the - * object. - * </p><p> - * If a requested object is not available in the pool, then a new instance - * is created. It is therefore only possible to pool objects that have - * a zero-argument default constructor. - * </p><p> - * Example (using a java.awt.Point object): - * <pre> - * ObjectPool pool = ObjectPool.getInstance(); - * Point point = (Point) pool.borrowObject(Point.class); - * doSomething(point); - * pool.returnObject(point); - * </pre> - * - * - * @author Roman Kennke (roman@kennke.org) - */ -public final class ObjectPool -{ - - /** The maximum number of instances that we keep for each type. */ - private static final int MAX_POOL_SIZE = 128; - - /** This flag turns on/off caching (for benchmarking purposes). */ - private static final boolean IS_CACHING = true; - - /** The only instance of ObjectPool. */ - private static ObjectPool instance; - - /** - * The object pool. This maps Class objects (the type of the pooled objects) - * to Collections that contain the pooled instances. If there is no such - * mapping or the mapped COllection is empty, then no instance of the - * requested type is in the pool. - */ - private HashMap pool; - - /** - * Collect some stats in this fields. TODO: Can be removed later. - */ - int created = 0; - int requested = 0; - int returned = 0; - int pooled = 0; - - /** - * Creates a new instance of ObjectPool. This constructor is made private - * because it is an Singleton class. Use {@link #getInstance()} to - * get a reference to an ObjectPool. - */ - private ObjectPool() { - pool = new HashMap(); - } - - /** - * Returns the ObjectPool that is used in this VM. - * - * @return an ObjectPool instance ready for use - */ - public static synchronized ObjectPool getInstance() - { - if (instance == null) - instance = new ObjectPool(); - return instance; - } - - /** - * Return an instance of the specified type. If no such instance is available - * in the pool, then one is created using the zero argument default - * constructor. - * - * @param type the type of the requested object - * - * @return an object of the specified type, or <code>null</code> if there - * is no such object in the pool and an object of this type cannot - * be instantiated, like when the class does not provide a default - * constructor or it is not accessible - */ - public Object borrowObject(Class type) - { - // This is only here for benchmarking purposes. - if (!IS_CACHING) - return createObject(type); - // Counts the requested objects. This is only here for benchmarking - // purposes. - requested++; - if (requested % 10000 == 0) - printStats(); - - - Object object = null; - Stack pooledInstances = null; - synchronized (this) - { - pooledInstances = (Stack) pool.get(type); - } - if (pooledInstances == null) - object = createObject(type); - else - if (pooledInstances.size() == 0) - object = createObject(type); - else - synchronized (this) - { - object = pooledInstances.pop(); - } - return object; - } - - /** - * Returns an instance back into the pool. - * - * @param object the object that is returned into the pool - */ - public void returnObject(Object object) - { - // This is only here for benchmarking purposes. - if (!IS_CACHING) - return; - // Count the returned objects. This is only here for benchmarking purposes. - returned++; - - Class type = object.getClass(); - Stack pooledInstances = null; - synchronized (this) - { - pooledInstances = (Stack) pool.get(type); - } - if (pooledInstances == null) - { - pooledInstances = new Stack(); - } - if (pooledInstances.size() < MAX_POOL_SIZE) - synchronized (this) - { - pool.put(type, pooledInstances); - - // Count the objects that are actually pooled. This is only - // here for benchmarking purposes. - pooled++; - } - - synchronized (this) - { - pooledInstances.push(object); - } - } - - /** - * Creates a new instance of the specified type. - * - * @param type the type of the requested object - * - * @return an instance of that type or <code>null</code> if the object - * cannot be instantiated for some reason - */ - private Object createObject(Class type) - { - // Counts the objects that are created here. This is only here for - // benchmarking purposes. - created++; - - - Object object = null; - try - { - object = type.newInstance(); - } - catch (InstantiationException ex) - { - // We return null if the object cannot be instantiated. - } - catch (IllegalAccessException ex) - { - // We return null if the object cannot be instantiated. - } - return object; - } - - /** - * This method prints out some stats about the object pool. This gives - * an indication on how efficiently the pool is used. - */ - void printStats() - { - System.err.println("Requested Objects: " + requested); - System.err.println("Returned Objects: " + returned); - System.err.println("Created Objects: " + created); - System.err.println("Pooled Objects: " + pooled); - } -} diff --git a/gnu/java/awt/font/opentype/truetype/doc-files/ZonePathIterator-1.dia b/gnu/java/awt/font/opentype/truetype/doc-files/ZonePathIterator-1.dia Binary files differnew file mode 100644 index 000000000..b715ea02c --- /dev/null +++ b/gnu/java/awt/font/opentype/truetype/doc-files/ZonePathIterator-1.dia diff --git a/gnu/java/awt/font/opentype/truetype/doc-files/ZonePathIterator-1.png b/gnu/java/awt/font/opentype/truetype/doc-files/ZonePathIterator-1.png Binary files differnew file mode 100644 index 000000000..81d09d839 --- /dev/null +++ b/gnu/java/awt/font/opentype/truetype/doc-files/ZonePathIterator-1.png diff --git a/gnu/java/awt/peer/ClasspathTextLayoutPeer.java b/gnu/java/awt/peer/ClasspathTextLayoutPeer.java deleted file mode 100644 index 70df2ef74..000000000 --- a/gnu/java/awt/peer/ClasspathTextLayoutPeer.java +++ /dev/null @@ -1,104 +0,0 @@ -/* ClasspathTextLayoutPeer.java - Copyright (C) 2003 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.java.awt.peer; - -import java.awt.Graphics2D; -import java.awt.Shape; -import java.awt.font.TextHitInfo; -import java.awt.font.TextLayout; -import java.awt.geom.AffineTransform; -import java.awt.geom.Rectangle2D; - -/** - * @author Graydon Hoare - */ - -public interface ClasspathTextLayoutPeer -{ - TextHitInfo getStrongCaret (TextHitInfo hit1, - TextHitInfo hit2); - - void draw (Graphics2D g2, float x, float y); - - byte getBaseline (); - - boolean isLeftToRight (); - boolean isVertical (); - - float getAdvance (); - float getAscent (); - float getDescent (); - float getLeading (); - - int getCharacterCount (); - byte getCharacterLevel (int index); - - float[] getBaselineOffsets (); - Shape getBlackBoxBounds (int firstEndpoint, int secondEndpoint); - Rectangle2D getBounds (); - - float[] getCaretInfo (TextHitInfo hit, Rectangle2D bounds); - Shape getCaretShape (TextHitInfo hit, Rectangle2D bounds); - Shape[] getCaretShapes (int offset, Rectangle2D bounds, - TextLayout.CaretPolicy policy); - - Shape getLogicalHighlightShape (int firstEndpoint, int secondEndpoint, - Rectangle2D bounds); - int[] getLogicalRangesForVisualSelection (TextHitInfo firstEndpoint, - TextHitInfo secondEndpoint); - - TextHitInfo getNextLeftHit (int offset, TextLayout.CaretPolicy policy); - TextHitInfo getNextRightHit (int offset, TextLayout.CaretPolicy policy); - TextHitInfo hitTestChar (float x, float y, Rectangle2D bounds); - TextHitInfo getVisualOtherHit (TextHitInfo hit); - - float getVisibleAdvance (); - Shape getOutline (AffineTransform tx); - Shape getVisualHighlightShape (TextHitInfo firstEndpoint, - TextHitInfo secondEndpoint, - Rectangle2D bounds); - - TextLayout getJustifiedLayout (float justificationWidth); - void handleJustify (float justificationWidth); - - Object clone (); - int hashCode (); - boolean equals (ClasspathTextLayoutPeer tl); - String toString (); -} diff --git a/gnu/java/awt/peer/x/fonts.properties b/gnu/java/awt/peer/x/fonts.properties deleted file mode 100644 index 2c8755ceb..000000000 --- a/gnu/java/awt/peer/x/fonts.properties +++ /dev/null @@ -1,25 +0,0 @@ - -serif.plain=-adobe-times-medium-r-normal--%d-*-*-*-p-*-iso8859-1 -serif.bold=-adobe-times-bold-r-normal--%d-*-*-*-p-*-iso8859-1 -serif.italic=-adobe-times-medium-o-normal--%d-*-*-*-p-*-iso8859-1 -serif.bolditalic=-adobe-times-bold-o-normal--%d-*-*-*-p-*-iso8859-1 - -sansserif.plain=-adobe-helvetica-medium-r-normal--%d-*-*-*-p-*-iso8859-1 -sansserif.bold=-adobe-helvetica-bold-r-normal--%d-*-*-*-p-*-iso8859-1 -sansserif.italic=-adobe-helvetica-medium-o-normal--%d-*-*-*-p-*-iso8859-1 -sansserif.bolditalic=-adobe-helvetica-bold-o-normal--%d-*-*-*-p-*-iso8859-1 - -monospaced.plain=-adobe-courier-medium-r-normal--%d-*-*-*-p-*-iso8859-1 -monospaced.bold=-adobe-courier-bold-r-normal--%d-*-*-*-p-*-iso8859-1 -monospaced.italic=-adobe-courier-medium-o-normal--%d-*-*-*-p-*-iso8859-1 -monospaced.bolditalic=-adobe-courier-bold-o-normal--%d-*-*-*-p-*-iso8859-1 - -dialog.plain=-adobe-helvetica-medium-r-normal--%d-*-*-*-p-*-iso8859-1 -dialog.bold=-adobe-helvetica-bold-r-normal--%d-*-*-*-p-*-iso8859-1 -dialog.italic=-adobe-helvetica-medium-o-normal--%d-*-*-*-p-*-iso8859-1 -dialog.bolditalic=-adobe-helvetica-bold-o-normal--%d-*-*-*-p-*-iso8859-1 - -dialoginput.plain=-adobe-helvetica-medium-r-normal--%d-*-*-*-p-*-iso8859-1 -dialoginput.bold=-adobe-helvetica-bold-r-normal--%d-*-*-*-p-*-iso8859-1 -dialoginput.italic=-adobe-helvetica-medium-o-normal--%d-*-*-*-p-*-iso8859-1 -dialoginput.bolditalic=-adobe-helvetica-bold-o-normal--%d-*-*-*-p-*-iso8859-1 diff --git a/gnu/java/security/util/Prime2.java b/gnu/java/security/util/Prime2.java deleted file mode 100644 index 49e4072f6..000000000 --- a/gnu/java/security/util/Prime2.java +++ /dev/null @@ -1,396 +0,0 @@ -/* Prime2.java -- - Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc. - -This file is a part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 -USA - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.java.security.util; - -import gnu.classpath.Configuration; - -import java.lang.ref.WeakReference; -import java.math.BigInteger; -import java.util.Map; -import java.util.WeakHashMap; -import java.util.logging.Logger; - -/** - * <p>A collection of prime number related utilities used in this library.</p> - */ -public class Prime2 -{ - private static final Logger log = Logger.getLogger(Prime2.class.getName()); - private static final int DEFAULT_CERTAINTY = 20; // XXX is this a good value? - - private static final BigInteger ZERO = BigInteger.ZERO; - - private static final BigInteger ONE = BigInteger.ONE; - - private static final BigInteger TWO = BigInteger.valueOf(2L); - - /** - * The first SMALL_PRIME primes: Algorithm P, section 1.3.2, The Art of - * Computer Programming, Donald E. Knuth. - */ - private static final int SMALL_PRIME_COUNT = 1000; - - private static final BigInteger[] SMALL_PRIME = new BigInteger[SMALL_PRIME_COUNT]; - static - { - long time = -System.currentTimeMillis(); - SMALL_PRIME[0] = TWO; - int N = 3; - int J = 0; - int prime; - P2: while (true) - { - SMALL_PRIME[++J] = BigInteger.valueOf(N); - if (J >= 999) - { - break P2; - } - P4: while (true) - { - N += 2; - P6: for (int K = 1; true; K++) - { - prime = SMALL_PRIME[K].intValue(); - if ((N % prime) == 0) - { - continue P4; - } - else if ((N / prime) <= prime) - { - continue P2; - } - } - } - } - time += System.currentTimeMillis(); - if (Configuration.DEBUG) - { - StringBuffer sb; - for (int i = 0; i < (SMALL_PRIME_COUNT / 10); i++) - { - sb = new StringBuffer(); - for (int j = 0; j < 10; j++) - { - sb.append(String.valueOf(SMALL_PRIME[i * 10 + j])).append(" "); - } - log.fine(sb.toString()); - } - } - if (Configuration.DEBUG) - { - log.fine("Generating first " + String.valueOf(SMALL_PRIME_COUNT) - + " primes took: " + String.valueOf(time) + " ms."); - } - } - - private static final Map knownPrimes = new WeakHashMap(); - - // Constructor(s) - // ------------------------------------------------------------------------- - - /** Trivial constructor to enforce Singleton pattern. */ - private Prime2() - { - super(); - } - - // Class methods - // ------------------------------------------------------------------------- - - /** - * <p>Trial division for the first 1000 small primes.</p> - * - * <p>Returns <code>true</code> if at least one small prime, among the first - * 1000 ones, was found to divide the designated number. Retuens <code>false</code> - * otherwise.</p> - * - * @param w the number to test. - * @return <code>true</code> if at least one small prime was found to divide - * the designated number. - */ - public static boolean hasSmallPrimeDivisor(BigInteger w) - { - BigInteger prime; - for (int i = 0; i < SMALL_PRIME_COUNT; i++) - { - prime = SMALL_PRIME[i]; - if (w.mod(prime).equals(ZERO)) - { - if (Configuration.DEBUG) - log.fine(prime.toString(16) + " | " + w.toString(16) + "..."); - return true; - } - } - if (Configuration.DEBUG) - log.fine(w.toString(16) + " has no small prime divisors..."); - return false; - } - - /** - * <p>Java port of Colin Plumb primality test (Euler Criterion) - * implementation for a base of 2 --from bnlib-1.1 release, function - * primeTest() in prime.c. this is his comments.</p> - * - * <p>"Now, check that bn is prime. If it passes to the base 2, it's prime - * beyond all reasonable doubt, and everything else is just gravy, but it - * gives people warm fuzzies to do it.</p> - * - * <p>This starts with verifying Euler's criterion for a base of 2. This is - * the fastest pseudoprimality test that I know of, saving a modular squaring - * over a Fermat test, as well as being stronger. 7/8 of the time, it's as - * strong as a strong pseudoprimality test, too. (The exception being when - * <code>bn == 1 mod 8</code> and <code>2</code> is a quartic residue, i.e. - * <code>bn</code> is of the form <code>a^2 + (8*b)^2</code>.) The precise - * series of tricks used here is not documented anywhere, so here's an - * explanation. Euler's criterion states that if <code>p</code> is prime - * then <code>a^((p-1)/2)</code> is congruent to <code>Jacobi(a,p)</code>, - * modulo <code>p</code>. <code>Jacobi(a, p)</code> is a function which is - * <code>+1</code> if a is a square modulo <code>p</code>, and <code>-1</code> - * if it is not. For <code>a = 2</code>, this is particularly simple. It's - * <code>+1</code> if <code>p == +/-1 (mod 8)</code>, and <code>-1</code> if - * <code>m == +/-3 (mod 8)</code>. If <code>p == 3 (mod 4)</code>, then all - * a strong test does is compute <code>2^((p-1)/2)</code>. and see if it's - * <code>+1</code> or <code>-1</code>. (Euler's criterion says <i>which</i> - * it should be.) If <code>p == 5 (mod 8)</code>, then <code>2^((p-1)/2)</code> - * is <code>-1</code>, so the initial step in a strong test, looking at - * <code>2^((p-1)/4)</code>, is wasted --you're not going to find a - * <code>+/-1</code> before then if it <b>is</b> prime, and it shouldn't - * have either of those values if it isn't. So don't bother.</p> - * - * <p>The remaining case is <code>p == 1 (mod 8)</code>. In this case, we - * expect <code>2^((p-1)/2) == 1 (mod p)</code>, so we expect that the - * square root of this, <code>2^((p-1)/4)</code>, will be <code>+/-1 (mod p) - * </code>. Evaluating this saves us a modular squaring 1/4 of the time. If - * it's <code>-1</code>, a strong pseudoprimality test would call <code>p</code> - * prime as well. Only if the result is <code>+1</code>, indicating that - * <code>2</code> is not only a quadratic residue, but a quartic one as well, - * does a strong pseudoprimality test verify more things than this test does. - * Good enough.</p> - * - * <p>We could back that down another step, looking at <code>2^((p-1)/8)</code> - * if there was a cheap way to determine if <code>2</code> were expected to - * be a quartic residue or not. Dirichlet proved that <code>2</code> is a - * quadratic residue iff <code>p</code> is of the form <code>a^2 + (8*b^2)</code>. - * All primes <code>== 1 (mod 4)</code> can be expressed as <code>a^2 + - * (2*b)^2</code>, but I see no cheap way to evaluate this condition."</p> - * - * @param bn the number to test. - * @return <code>true</code> iff the designated number passes Euler criterion - * as implemented by Colin Plumb in his <i>bnlib</i> version 1.1. - */ - public static boolean passEulerCriterion(final BigInteger bn) - { - BigInteger bn_minus_one = bn.subtract(ONE); - BigInteger e = bn_minus_one; - // l is the 3 least-significant bits of e - int l = e.and(BigInteger.valueOf(7L)).intValue(); - int j = 1; // Where to start in prime array for strong prime tests - BigInteger a; - int k; - - if (l != 0) - { - e = e.shiftRight(1); - a = TWO.modPow(e, bn); - if (l == 6) // bn == 7 mod 8, expect +1 - { - if (a.bitLength() != 1) - { - debugBI("Fails Euler criterion #1", bn); - return false; // Not prime - } - k = 1; - } - else // bn == 3 or 5 mod 8, expect -1 == bn-1 - { - a = a.add(ONE); - if (a.compareTo(bn) != 0) - { - debugBI("Fails Euler criterion #2", bn); - return false; // Not prime - } - k = 1; - if ((l & 4) != 0) // bn == 5 mod 8, make odd for strong tests - { - e = e.shiftRight(1); - k = 2; - } - } - } - else // bn == 1 mod 8, expect 2^((bn-1)/4) == +/-1 mod bn - { - e = e.shiftRight(2); - a = TWO.modPow(e, bn); - if (a.bitLength() == 1) - j = 0; // Re-do strong prime test to base 2 - else - { - a = a.add(ONE); - if (a.compareTo(bn) != 0) - { - debugBI("Fails Euler criterion #3", bn); - return false; // Not prime - } - } - // bnMakeOdd(n) = d * 2^s. Replaces n with d and returns s. - k = e.getLowestSetBit(); - e = e.shiftRight(k); - k += 2; - } - // It's prime! Now go on to confirmation tests - - // Now, e = (bn-1)/2^k is odd. k >= 1, and has a given value with - // probability 2^-k, so its expected value is 2. j = 1 in the usual case - // when the previous test was as good as a strong prime test, but 1/8 of - // the time, j = 0 because the strong prime test to the base 2 needs to - // be re-done. - for (int i = j; i < 7; i++) // try only the first 7 primes - { - a = SMALL_PRIME[i]; - a = a.modPow(e, bn); - if (a.bitLength() == 1) - continue; // Passed this test - - l = k; - while (true) - { -// a = a.add(ONE); -// if (a.compareTo(w) == 0) { // Was result bn-1? - if (a.compareTo(bn_minus_one) == 0) // Was result bn-1? - break; // Prime - - if (--l == 0) // Reached end, not -1? luck? - { - debugBI("Fails Euler criterion #4", bn); - return false; // Failed, not prime - } - // This portion is executed, on average, once -// a = a.subtract(ONE); // Put a back where it was - a = a.modPow(TWO, bn); - if (a.bitLength() == 1) - { - debugBI("Fails Euler criterion #5", bn); - return false; // Failed, not prime - } - } - // It worked (to the base primes[i]) - } - debugBI("Passes Euler criterion", bn); - return true; - } - - public static boolean isProbablePrime(BigInteger w) - { - return isProbablePrime(w, DEFAULT_CERTAINTY); - } - - /** - * Wrapper around {@link BigInteger#isProbablePrime(int)} with few pre-checks. - * - * @param w the integer to test. - * @param certainty the certainty with which to compute the test. - */ - public static boolean isProbablePrime(BigInteger w, int certainty) - { - // Nonnumbers are not prime. - if (w == null) - return false; - - // eliminate trivial cases when w == 0 or 1 - if (w.equals(ZERO) || w.equals(ONE)) - return false; - - // Test if w is a known small prime. - for (int i = 0; i < SMALL_PRIME_COUNT; i++) - if (w.equals(SMALL_PRIME[i])) - { - if (Configuration.DEBUG) - log.fine(w.toString(16) + " is a small prime"); - return true; - } - - // Check if it's already a known prime - WeakReference obj = (WeakReference) knownPrimes.get(w); - if (obj != null && w.equals(obj.get())) - { - if (Configuration.DEBUG) - log.fine("found in known primes"); - return true; - } - - // trial division with first 1000 primes - if (hasSmallPrimeDivisor(w)) - { - if (Configuration.DEBUG) - log.fine(w.toString(16) + " has a small prime divisor. Rejected..."); - return false; - } - -// Euler's criterion. -// if (passEulerCriterion(w)) { -// if (DEBUG && debuglevel > 4) { -// debug(w.toString(16)+" passes Euler's criterion..."); -// } -// } else { -// if (DEBUG && debuglevel > 4) { -// debug(w.toString(16)+" fails Euler's criterion. Rejected..."); -// } -// return false; -// } -// -// if (DEBUG && debuglevel > 4) -// { -// debug(w.toString(16) + " is probable prime. Accepted..."); -// } - - boolean result = w.isProbablePrime(certainty); - if (result && certainty > 0) // store it in the known primes weak hash-map - knownPrimes.put(w, new WeakReference(w)); - - return result; - } - - // helper methods ----------------------------------------------------------- - - private static final void debugBI(String msg, BigInteger bn) - { - if (Configuration.DEBUG) - log.fine("*** " + msg + ": 0x" + bn.toString(16)); - } -} diff --git a/gnu/javax/imageio/gif/GIFStream.java b/gnu/javax/imageio/gif/GIFStream.java deleted file mode 100644 index 630d587b8..000000000 --- a/gnu/javax/imageio/gif/GIFStream.java +++ /dev/null @@ -1,102 +0,0 @@ -/* GIFStream.java -- - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package gnu.javax.imageio.gif; - -import java.io.InputStream; -import java.io.IOException; -import javax.imageio.stream.ImageInputStream; - -/** - * Implements InputStream on an ImageInputStream - * The purpose of this is to avoid IIO dependencies in GIFFile - * (which only uses read() anyway). - */ -public class GIFStream extends InputStream -{ - private ImageInputStream is; - - public GIFStream( ImageInputStream is ) - { - this.is = is; - } - - public int available() - { - return 0; - } - - public void close() throws IOException - { - is.close(); - } - - public void mark(int readlimit) - { - is.mark(); - } - - public boolean markSupported() - { - return true; - } - - public int read() throws IOException - { - return is.read(); - } - - public int read(byte[] b) throws IOException - { - return is.read(b); - } - - public int read(byte[] b, int offset, int length) throws IOException - { - return is.read(b, offset, length); - } - - public void reset() throws IOException - { - is.reset(); - } - - public long skip(long n) throws IOException - { - return is.skipBytes(n); - } -} diff --git a/java/awt/doc-files/capjoin.png b/java/awt/doc-files/capjoin.png Binary files differnew file mode 100644 index 000000000..555dca901 --- /dev/null +++ b/java/awt/doc-files/capjoin.png diff --git a/java/awt/geom/doc-files/Area-1.png b/java/awt/geom/doc-files/Area-1.png Binary files differnew file mode 100644 index 000000000..44650f2d8 --- /dev/null +++ b/java/awt/geom/doc-files/Area-1.png diff --git a/java/awt/geom/doc-files/Ellipse-1.png b/java/awt/geom/doc-files/Ellipse-1.png Binary files differnew file mode 100644 index 000000000..8317db661 --- /dev/null +++ b/java/awt/geom/doc-files/Ellipse-1.png diff --git a/java/awt/geom/doc-files/GeneralPath-1.png b/java/awt/geom/doc-files/GeneralPath-1.png Binary files differnew file mode 100644 index 000000000..d1d75d575 --- /dev/null +++ b/java/awt/geom/doc-files/GeneralPath-1.png diff --git a/javax/swing/text/html/HTMLTableView.java b/javax/swing/text/html/HTMLTableView.java deleted file mode 100644 index cac44d8dc..000000000 --- a/javax/swing/text/html/HTMLTableView.java +++ /dev/null @@ -1,82 +0,0 @@ -/* HTMLTableView.java -- A table view for HTML tables - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package javax.swing.text.html; - -import javax.swing.text.Element; -import javax.swing.text.TableView; -import javax.swing.text.View; -import javax.swing.text.ViewFactory; - -/** - * A conrete implementation of TableView that renders HTML tables. - * - * @author Roman Kennke (kennke@aicas.com) - */ -class HTMLTableView - extends TableView -{ - - /** - * Creates a new HTMLTableView for the specified element. - * - * @param el the element for the table view - */ - public HTMLTableView(Element el) - { - super(el); - } - - /** - * Loads the children of the Table. This completely bypasses the ViewFactory - * and creates instances of TableRow instead. - * - * @param vf ignored - */ - protected void loadChildren(ViewFactory vf) - { - Element el = getElement(); - int numChildren = el.getElementCount(); - View[] rows = new View[numChildren]; - for (int i = 0; i < numChildren; ++i) - { - rows[i] = createTableRow(el.getElement(i)); - } - replace(0, getViewCount(), rows); - } -} diff --git a/native/cni/Makefile.am b/native/cni/Makefile.am deleted file mode 100644 index e69de29bb..000000000 --- a/native/cni/Makefile.am +++ /dev/null diff --git a/org/omg/CORBA/SendingContext/RunTimeOperations.java b/org/omg/CORBA/SendingContext/RunTimeOperations.java deleted file mode 100644 index 492512812..000000000 --- a/org/omg/CORBA/SendingContext/RunTimeOperations.java +++ /dev/null @@ -1,57 +0,0 @@ -/* RunTimeOperations.java -- - Copyright (C) 2005 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package org.omg.CORBA.SendingContext; - - -/** - * Defines the operations, applicable for Sending Context. The sending - * context provides access to information about the originator of a - * GIOP message. For example, when a value type is sent in a GIOP - * Request, the receiver may need to ask the sender about - * the CodeBase for the implementation of the value type. - * - * Unfortunately, no public operations are defined up till 1.4 inclusive. - * - * @since 1.3 - * - * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) - */ -public interface RunTimeOperations -{ -}
\ No newline at end of file diff --git a/org/omg/CORBA/SendingContext/Runtime.java b/org/omg/CORBA/SendingContext/Runtime.java deleted file mode 100644 index f9f86aaa3..000000000 --- a/org/omg/CORBA/SendingContext/Runtime.java +++ /dev/null @@ -1,60 +0,0 @@ -/* Runtime.java -- - Copyright (C) 2005 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package org.omg.CORBA.SendingContext; - -import org.omg.CORBA.Object; -import org.omg.CORBA.portable.IDLEntity; - -import java.io.Serializable; - -/** - * Defines the base class that represents the Sending Context. The sending - * context provides access to information about the originator of a - * GIOP message. For example, when a value type is sent in a GIOP - * Request, the receiver may need to ask the sender about - * the CodeBase for the implementation of the value type. - * - * @since 1.3 - * - * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) - */ -public interface Runtime - extends IDLEntity, Object, RunTimeOperations, Serializable -{ -}
\ No newline at end of file diff --git a/resource/gnu/regexp/MessagesBundle.properties b/resource/gnu/regexp/MessagesBundle.properties deleted file mode 100644 index fb2f27c39..000000000 --- a/resource/gnu/regexp/MessagesBundle.properties +++ /dev/null @@ -1,22 +0,0 @@ -# Localized error messages for gnu.regexp - -# Prefix for REException messages -error.prefix=At position {0} in regular expression pattern: - -# REException (parse error) messages -repeat.assertion=repeated token is zero-width assertion -repeat.chained=attempted to repeat a token that is already repeated -repeat.no.token=quantifier (?*+{}) without preceding token -repeat.empty.token=repeated token may be empty -unmatched.brace=unmatched brace -unmatched.bracket=unmatched bracket -unmatched.paren=unmatched parenthesis -interval.no.end=unexpected end of interval -class.no.end=unexpected end of character class -subexpr.no.end=unexpected end of subexpression -interval.order=an interval''s minimum is greater than its maximum -interval.error=an interval is empty * or contains illegal characters -ends.with.backslash=backslash at end of pattern - -# RESyntax message -syntax.final=Syntax has been declared final and cannot be modified diff --git a/resource/gnu/regexp/MessagesBundle_fr.properties b/resource/gnu/regexp/MessagesBundle_fr.properties deleted file mode 100644 index 99da4e22d..000000000 --- a/resource/gnu/regexp/MessagesBundle_fr.properties +++ /dev/null @@ -1,22 +0,0 @@ -# Localized error messages for gnu.regexp - -# Prefix for REException messages -error.prefix=A l''index {0} dans le modèle d''expression régulière: - -# REException (parse error) messages -repeat.assertion=l''élément répété est de largeur zéro -repeat.chained=tentative de répétition d''un élément déjà répété -repeat.no.token=quantifieur (?*+{}) sans élément précédent -repeat.empty.token=l''élément répété peut être vide -unmatched.brace=accolade inégalée -unmatched.bracket=crochet inégalé -unmatched.paren=parenthèse inégalée -interval.no.end=fin d''interval non attendue -class.no.end=fin de classe de caractères non attendue -subexpr.no.end=fin de sous-expression non attendue -interval.order=l''interval minimum est supérieur à l''interval maximum -interval.error=l''interval est vide ou contient des caractères illégaux -ends.with.backslash=antislash à la fin du modèle - -# RESyntax message -syntax.final=La syntaxe a été déclarée finale et ne peut pas être modifiée diff --git a/resource/gnu/regexp/MessagesBundle_it.properties b/resource/gnu/regexp/MessagesBundle_it.properties deleted file mode 100644 index 7f95c4f92..000000000 --- a/resource/gnu/regexp/MessagesBundle_it.properties +++ /dev/null @@ -1,31 +0,0 @@ -# Localized error messages for gnu.regexp, in Italian. -# $Id: MessagesBundle_it.properties,v 1.1 2004-06-04 21:13:58 saugart Exp $ -# Messaggi italiani per gnu.regexp. -# -# Attenzione: Questa traduzione fu scritto da un italo-americano. -# Per favore correggete l'italiano bestemmiato e mandate i patch -# al listo <classpath at gnu dot org>. -# -# @author Steven Augart <steve at watson dot ibm dot com>, <steve at augart dot com> - -# Prefix for REException messages -error.prefix=Al indice {0} nel modello dell''espressione regulare: - -# REException (parse error) messages -repeat.assertion=l''elemento ripetuto ha larghezza zero -repeat.chained=prova di ripetere un elemento già ripetuto -repeat.no.token=quantificatore (?*+{}) senza elemento precedente -repeat.empty.token=l''elemento ripetuto può essere vuoto -unmatched.brace=parentesi quadra senza corrispondente -unmatched.bracket=graffa senza corrispondente -unmatched.paren=parentesi senza corrispondente -interval.no.end=la fine d''intervallo è imprevista -class.no.end=la fine della classe di caratteri è imprevista -subexpr.no.end=la fine del sub-espressione è imprevista -interval.order=il valore minimo d''intervallo è piú grande del suo valore massimo -interval.error=l''intervallo è vuoto o contiene caratteri impermessibili -# Non so come si dice "backslash" in italiano. -ends.with.backslash=il modello finisce con un backslash (il carattere "\") - -# RESyntax message -syntax.final=La sintassi è dichiarata "final" (finale) e non si può modificarla diff --git a/tools/appletviewer.in b/tools/appletviewer.in deleted file mode 100644 index 81e39ad91..000000000 --- a/tools/appletviewer.in +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -## Copyright (C) 2006 Free Software Foundation, Inc. -## -## This file is a part of GNU Classpath. -## -## GNU Classpath is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or (at -## your option) any later version. -## -## GNU Classpath is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with GNU Classpath; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 -## USA. -## -## Linking this library statically or dynamically with other modules is -## making a combined work based on this library. Thus, the terms and -## conditions of the GNU General Public License cover the whole -## combination. -## -## As a special exception, the copyright holders of this library give you -## permission to link this library with independent modules to produce an -## executable, regardless of the license terms of these independent -## modules, and to copy and distribute the resulting executable under -## terms of your choice, provided that you also meet, for each linked -## independent module, the terms and conditions of the license of that -## module. An independent module is a module which is not derived from -## or based on this library. If you modify this library, you may extend -## this exception to your version of the library, but you are not -## obligated to do so. If you do not wish to do so, delete this -## exception statement from your version. -## -## A simple shell script to launch the GNU Classpath appletviewer tool. -## - -prefix=@prefix@ -tools_dir=@datadir@/@PACKAGE@ -tools_cp=${tools_dir}/tools.zip - -exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.appletviewer.Main $@ diff --git a/tools/jarsigner.in b/tools/jarsigner.in deleted file mode 100644 index 537b7faf0..000000000 --- a/tools/jarsigner.in +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -## Copyright (C) 2006 Free Software Foundation, Inc. -## -## This file is a part of GNU Classpath. -## -## GNU Classpath is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or (at -## your option) any later version. -## -## GNU Classpath is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with GNU Classpath; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 -## USA. -## -## Linking this library statically or dynamically with other modules is -## making a combined work based on this library. Thus, the terms and -## conditions of the GNU General Public License cover the whole -## combination. -## -## As a special exception, the copyright holders of this library give you -## permission to link this library with independent modules to produce an -## executable, regardless of the license terms of these independent -## modules, and to copy and distribute the resulting executable under -## terms of your choice, provided that you also meet, for each linked -## independent module, the terms and conditions of the license of that -## module. An independent module is a module which is not derived from -## or based on this library. If you modify this library, you may extend -## this exception to your version of the library, but you are not -## obligated to do so. If you do not wish to do so, delete this -## exception statement from your version. -## -## -## A simple shell script to launch the GNU Classpath jarsigner tool. -## - -prefix=@prefix@ -tools_dir=@datadir@/@PACKAGE@ -tools_cp=${tools_dir}/tools.zip - -exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.jarsigner.Main $@ diff --git a/tools/keytool.in b/tools/keytool.in deleted file mode 100644 index 613baf7fd..000000000 --- a/tools/keytool.in +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -## Copyright (C) 2006 Free Software Foundation, Inc. -## -## This file is a part of GNU Classpath. -## -## GNU Classpath is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or (at -## your option) any later version. -## -## GNU Classpath is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with GNU Classpath; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 -## USA. -## -## Linking this library statically or dynamically with other modules is -## making a combined work based on this library. Thus, the terms and -## conditions of the GNU General Public License cover the whole -## combination. -## -## As a special exception, the copyright holders of this library give you -## permission to link this library with independent modules to produce an -## executable, regardless of the license terms of these independent -## modules, and to copy and distribute the resulting executable under -## terms of your choice, provided that you also meet, for each linked -## independent module, the terms and conditions of the license of that -## module. An independent module is a module which is not derived from -## or based on this library. If you modify this library, you may extend -## this exception to your version of the library, but you are not -## obligated to do so. If you do not wish to do so, delete this -## exception statement from your version. -## -## -## A simple shell script to launch the GNU Classpath keytool tool. -## - -prefix=@prefix@ -tools_dir=@datadir@/@PACKAGE@ -tools_cp=${tools_dir}/tools.zip - -exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.keytool.Main $@ diff --git a/vm/reference/java/lang/management/VMThreadInfo.java b/vm/reference/java/lang/management/VMThreadInfo.java deleted file mode 100644 index 162fe6794..000000000 --- a/vm/reference/java/lang/management/VMThreadInfo.java +++ /dev/null @@ -1,159 +0,0 @@ -/* VMThreadInfo.java - Information on a thread - Copyright (C) 2006 Free Software Foundation - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package java.lang.management; - -/** - * Provides low-level information about a thread. - * - * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 - * @see java.lang.management.ThreadInfo - */ -final class VMThreadInfo -{ - - /** - * Return the number of times the specified thread - * has been in the {@link java.lang.Thread.State#BLOCKED} - * state. - * - * @param thread the thread to return statistics on. - * @return the number of times the thread has been blocked. - */ - static native long getBlockedCount(Thread thread); - - /** - * Returns the accumulated number of milliseconds the - * specified thread has spent in the - * {@link java.lang.Thread.State#BLOCKED} state. This - * method is only called if thread contention monitoring - * is both supported and enabled. - * - * @param thread the thread to return statistics on. - * @return the accumulated number of milliseconds the - * thread has been blocked for. - */ - static native long getBlockedTime(Thread thread); - - /** - * Returns the monitor lock the specified thread is - * waiting for. This is only called when the thread - * is in the {@link java.lang.Thread.State#BLOCKED} - * state. - * - * @param thread the thread to return statistics on. - * @return the monitor lock the thread is waiting for. - */ - static native Object getLock(Thread thread); - - /** - * Returns the thread which currently owns the monitor - * lock the specified thread is waiting for. This is - * only called when the thread is in the - * {@link java.lang.Thread.State#BLOCKED} state. It - * may return <code>null</code> if the lock is not held - * by another thread. - * - * @param thread the thread to return statistics on. - * @return the thread which owns the monitor lock the - * thread is waiting for, or <code>null</code> - * if it doesn't have an owner. - */ - static native Thread getLockOwner(Thread thread); - - /** - * Return the number of times the specified thread - * has been in the {@link java.lang.Thread.State#WAITING} - * or {@link java.lang.Thread.State#TIMED_WAITING} states. - * - * @param thread the thread to return statistics on. - * @return the number of times the thread has been in - * waiting state. - */ - static native long getWaitedCount(Thread thread); - - /** - * Returns the accumulated number of milliseconds the - * specified thread has spent in either the - * {@link java.lang.Thread.State#WAITING} or - * {@link java.lang.Thread.State#TIMED_WAITING} states. - * This method is only called if thread contention - * monitoring is both supported and enabled. - * - * @param thread the thread to return statistics on. - * @return the accumulated number of milliseconds the - * thread has been in a waiting state for. - */ - static native long getWaitedTime(Thread thread); - - /** - * Returns true if the specified thread is in a native - * method. - * - * @param thread the thread to return statistics on. - * @return true if the thread is in a native method, false - * otherwise. - */ - static native boolean isInNative(Thread thread); - - /** - * Returns true if the specified thread is suspended. - * - * @param thread the thread to return statistics on. - * @return true if the thread is suspended, false otherwise. - */ - static native boolean isSuspended(Thread thread); - - /** - * Returns a stack trace for the specified thread of - * the supplied depth. If the depth is - * <code>Integer.MAX_VALUE</code>, then the returned - * depth is equal to the full stack trace available. - * The depth will be greater than zero, due to - * filtering in methods prior to this call. - * - * @param thread the thread whose stack trace should - * be returned. - * @param maxDepth the maximum depth of the trace. - * This will be greater than zero. - * <code>Integer.MAX_VALUE</code> - * represents the full trace. - */ - static native StackTraceElement[] getStackTrace(Thread thread, - int maxDepth); -} |