Commit Diff


commit - 22436e76609122bc60ef6f0433f0b03a7c41bb2c
commit + 030eadbad26a370a331fb85fe1f9ab26f11e4af8
blob - 8029f31163249c3b122c71d3d19de2ae0eac05d2
blob + e5d0a80d439ffc465c75c42323d2a2a3deb79b54
--- de/mud/jta/plugin/Terminal.java
+++ de/mud/jta/plugin/Terminal.java
@@ -6,11 +6,11 @@
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * "The Java Telnet Application" is distributed in the hope that it will be 
+ * "The Java Telnet Application" 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 this software; see the file COPYING.  If not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -19,56 +19,39 @@
 
 package de.mud.jta.plugin;
 
+import de.mud.jta.FilterPlugin;
 import de.mud.jta.Plugin;
+import de.mud.jta.PluginBus;
 import de.mud.jta.PluginConfig;
-import de.mud.jta.FilterPlugin;
 import de.mud.jta.VisualTransferPlugin;
-import de.mud.jta.PluginBus;
-
-import de.mud.terminal.vt320;
-
 import de.mud.jta.event.ConfigurationListener;
-import de.mud.jta.event.OnlineStatusListener;
-import de.mud.jta.event.TerminalTypeListener;
-import de.mud.jta.event.WindowSizeListener;
-import de.mud.jta.event.LocalEchoListener;
 import de.mud.jta.event.FocusStatus;
+import de.mud.jta.event.LocalEchoListener;
+import de.mud.jta.event.OnlineStatusListener;
 import de.mud.jta.event.ReturnFocusListener;
-import de.mud.jta.event.AppletListener;
 import de.mud.jta.event.SoundRequest;
 import de.mud.jta.event.TelnetCommandRequest;
+import de.mud.jta.event.TerminalTypeListener;
+import de.mud.jta.event.WindowSizeListener;
+import de.mud.terminal.vt320;
+import de.mud.terminal.VDU;
 
-import java.awt.Component;
-import java.awt.Panel;
-import java.awt.BorderLayout;
-import java.awt.Menu;
-import java.awt.MenuItem;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Color;
-import java.awt.Scrollbar;
-import java.awt.Cursor;
-
-import java.awt.event.ActionListener;
-import java.awt.event.ActionEvent;
-import java.awt.event.FocusListener;
-import java.awt.event.FocusEvent;
-
+import java.awt.*;
 import java.awt.datatransfer.Clipboard;
-import java.awt.datatransfer.StringSelection;
 import java.awt.datatransfer.ClipboardOwner;
-import java.awt.datatransfer.Transferable;
 import java.awt.datatransfer.DataFlavor;
-
+import java.awt.datatransfer.StringSelection;
+import java.awt.datatransfer.Transferable;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
 import java.io.IOException;
-import java.io.InputStream;
-
-import java.net.URL;
 import java.net.MalformedURLException;
-
-import java.util.Properties;
-import java.util.Hashtable;
+import java.net.URL;
 import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
 
 /**
  * The terminal plugin represents the actual terminal where the
@@ -80,16 +63,16 @@ import java.util.Enumeration;
  * @version $Id$
  * @author Matthias L. Jugel, Marcus Meißner
  */
-public class Terminal extends Plugin 
+public class Terminal extends Plugin
   implements FilterPlugin, VisualTransferPlugin, ClipboardOwner, Runnable {
 
   private final static boolean personalJava = false;
 
   private final static int debug = 0;
-  
+
   /** holds the actual terminal emulation */
   protected vt320 terminal;
-  /** 
+  /**
    * The default encoding is ISO 8859-1 (western).
    * However, as you see the value is set to latin1 which is a value that
    * is not even documented and thus incorrect, but it forces the default
@@ -112,6 +95,20 @@ public class Terminal extends Plugin 
 
   private boolean localecho_overridden = false;
 
+  private Color codeToColor(String code) {
+  if(colors.get(code) != null)
+    return (Color) colors.get(code);
+  else
+    try {
+      if(Color.getColor(code) != null)
+        return Color.getColor(code);
+      else
+        return Color.decode(code);
+    } catch(Exception e) {
+      error("ignoring unknown color code: " + code);
+    }
+    return null;
+  }
   /**
    * Create a new terminal plugin and initialize the terminal emulation.
    */
@@ -133,103 +130,103 @@ public class Terminal extends Plugin 
 
     if(!personalJava) {
 
-    menu = new Menu("Terminal");
-    MenuItem item;
+      menu = new Menu("Terminal");
+      MenuItem item;
 
-    Menu fgm = new Menu("Foreground");
-    Menu bgm = new Menu("Background");
-    Enumeration cols = colors.keys();
-    ActionListener fgl = new ActionListener() {
-      public void actionPerformed(ActionEvent e) {
-        terminal.setForeground((Color)colors.get(e.getActionCommand()));
-	tPanel.repaint();
+      Menu fgm = new Menu("Foreground");
+      Menu bgm = new Menu("Background");
+      Enumeration cols = colors.keys();
+      ActionListener fgl = new ActionListener() {
+        public void actionPerformed(ActionEvent e) {
+          terminal.setForeground((Color) colors.get(e.getActionCommand()));
+          tPanel.repaint();
+        }
+      };
+      ActionListener bgl = new ActionListener() {
+        public void actionPerformed(ActionEvent e) {
+          terminal.setBackground((Color) colors.get(e.getActionCommand()));
+          tPanel.repaint();
+        }
+      };
+      while(cols.hasMoreElements()) {
+        String color = (String) cols.nextElement();
+        fgm.add(item = new MenuItem(color));
+        item.addActionListener(fgl);
+        bgm.add(item = new MenuItem(color));
+        item.addActionListener(bgl);
       }
-    };
-    ActionListener bgl = new ActionListener() {
-      public void actionPerformed(ActionEvent e) {
-        terminal.setBackground((Color)colors.get(e.getActionCommand()));
-	tPanel.repaint();
-      }
-    };
-    while(cols.hasMoreElements()) {
-      String color = (String)cols.nextElement();
-      fgm.add(item = new MenuItem(color));
-      item.addActionListener(fgl);
-      bgm.add(item = new MenuItem(color));
-      item.addActionListener(bgl);
-    }
-    menu.add(fgm);
-    menu.add(bgm);
+      menu.add(fgm);
+      menu.add(bgm);
 
-    menu.add(item = new MenuItem("Smaller Font"));
-    item.addActionListener(new ActionListener() {
-      public void actionPerformed(ActionEvent e) {
-        Font font = terminal.getFont();
-	terminal.setFont(new Font(font.getName(), 
-	                     font.getStyle(), font.getSize()-1));
-	if(tPanel.getParent() != null) {
-	  Component parent = tPanel.getParent();
-	  if(parent instanceof java.awt.Frame) 
-	    ((java.awt.Frame)parent).pack();
-	  tPanel.getParent().doLayout();
-	  tPanel.getParent().validate();
-	}
-      }
-    });
-    menu.add(item = new MenuItem("Larger Font"));
-    item.addActionListener(new ActionListener() {
-      public void actionPerformed(ActionEvent e) {
-        Font font = terminal.getFont();
-	terminal.setFont(new Font(font.getName(), 
-	                     font.getStyle(), font.getSize()+1));
-	if(tPanel.getParent() != null) {
-	  Component parent = tPanel.getParent();
-	  if(parent instanceof java.awt.Frame) 
-	    ((java.awt.Frame)parent).pack();
-	  tPanel.getParent().doLayout();
-	  tPanel.getParent().validate();
-	}
-      }
-    });
-    menu.add(item = new MenuItem("Buffer +50"));
-    item.addActionListener(new ActionListener() {
-      public void actionPerformed(ActionEvent e) {
-        terminal.setBufferSize(terminal.getBufferSize() + 50);
-      }
-    });
-    menu.add(item = new MenuItem("Buffer -50"));
-    item.addActionListener(new ActionListener() {
-      public void actionPerformed(ActionEvent e) {
-        terminal.setBufferSize(terminal.getBufferSize() - 50);
-      }
-    });
-    menu.addSeparator();
-    menu.add(item = new MenuItem("Reset Terminal"));
-    item.addActionListener(new ActionListener() {
-      public void actionPerformed(ActionEvent e) {
-        terminal.reset();
-      }
-    });
-    
+      menu.add(item = new MenuItem("Smaller Font"));
+      item.addActionListener(new ActionListener() {
+        public void actionPerformed(ActionEvent e) {
+          Font font = terminal.getFont();
+          terminal.setFont(new Font(font.getName(),
+                                    font.getStyle(), font.getSize() - 1));
+          if(tPanel.getParent() != null) {
+            Component parent = tPanel.getParent();
+            if(parent instanceof java.awt.Frame)
+              ((java.awt.Frame) parent).pack();
+            tPanel.getParent().doLayout();
+            tPanel.getParent().validate();
+          }
+        }
+      });
+      menu.add(item = new MenuItem("Larger Font"));
+      item.addActionListener(new ActionListener() {
+        public void actionPerformed(ActionEvent e) {
+          Font font = terminal.getFont();
+          terminal.setFont(new Font(font.getName(),
+                                    font.getStyle(), font.getSize() + 1));
+          if(tPanel.getParent() != null) {
+            Component parent = tPanel.getParent();
+            if(parent instanceof java.awt.Frame)
+              ((java.awt.Frame) parent).pack();
+            tPanel.getParent().doLayout();
+            tPanel.getParent().validate();
+          }
+        }
+      });
+      menu.add(item = new MenuItem("Buffer +50"));
+      item.addActionListener(new ActionListener() {
+        public void actionPerformed(ActionEvent e) {
+          terminal.setBufferSize(terminal.getBufferSize() + 50);
+        }
+      });
+      menu.add(item = new MenuItem("Buffer -50"));
+      item.addActionListener(new ActionListener() {
+        public void actionPerformed(ActionEvent e) {
+          terminal.setBufferSize(terminal.getBufferSize() - 50);
+        }
+      });
+      menu.addSeparator();
+      menu.add(item = new MenuItem("Reset Terminal"));
+      item.addActionListener(new ActionListener() {
+        public void actionPerformed(ActionEvent e) {
+          terminal.reset();
+        }
+      });
+
     } // !personalJava
 
     // create the terminal emulation
     terminal = new vt320() {
       public void write(byte[] b) {
         try {
-	  Terminal.this.write(b);
-	} catch(IOException e) {
-	  reader = null;
-	}
+          Terminal.this.write(b);
+        } catch(IOException e) {
+          reader = null;
+        }
       }
 
       // provide audio feedback if that is configured
       public void beep() {
-	if(audioBeep != null) bus.broadcast(audioBeep);
+        if(audioBeep != null) bus.broadcast(audioBeep);
       }
 
       public void sendTelnetCommand(byte cmd) {
-	bus.broadcast(new TelnetCommandRequest(cmd));
+        bus.broadcast(new TelnetCommandRequest(cmd));
       }
     };
 
@@ -240,6 +237,7 @@ public class Terminal extends Plugin 
       public void update(java.awt.Graphics g) {
         paint(g);
       }
+
       // we don't want to print the container, just the terminal contents
       public void print(java.awt.Graphics g) {
         terminal.print(g);
@@ -250,14 +248,15 @@ public class Terminal extends Plugin 
     terminal.addFocusListener(new FocusListener() {
       public void focusGained(FocusEvent evt) {
         if(debug > 0)
-	  System.err.println("Terminal: focus gained");
-	terminal.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
+          System.err.println("Terminal: focus gained");
+        terminal.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
         bus.broadcast(new FocusStatus(Terminal.this, evt));
       }
+
       public void focusLost(FocusEvent evt) {
         if(debug > 0)
-	  System.err.println("Terminal: focus lost");
-	terminal.setCursor(Cursor.getDefaultCursor());
+          System.err.println("Terminal: focus lost");
+        terminal.setCursor(Cursor.getDefaultCursor());
         bus.broadcast(new FocusStatus(Terminal.this, evt));
       }
     });
@@ -265,7 +264,7 @@ public class Terminal extends Plugin 
     // register an online status listener
     bus.registerPluginListener(new OnlineStatusListener() {
       public void online() {
-        if(debug > 0) System.err.println("Terminal: online "+reader);
+        if(debug > 0) System.err.println("Terminal: online " + reader);
         if(reader == null) {
           reader = new Thread(Terminal.this);
           reader.start();
@@ -293,8 +292,8 @@ public class Terminal extends Plugin 
 
     bus.registerPluginListener(new LocalEchoListener() {
       public void setLocalEcho(boolean echo) {
-	if (!localecho_overridden)
-	    terminal.setLocalEcho(echo);
+        if(!localecho_overridden)
+          terminal.setLocalEcho(echo);
       }
     });
 
@@ -323,10 +322,12 @@ public class Terminal extends Plugin 
       try {
         terminal.setColorPrinting(Boolean.valueOf(tmp).booleanValue());
       } catch(Exception e) {
-        error("Terminal.color.print: must be either true or false, not "+tmp);
+        error("Terminal.color.print: must be either true or false, not " + tmp);
       }
- 
+
+    System.err.print("colorSet: ");
     if((tmp = cfg.getProperty("Terminal", id, "colorSet")) != null) {
+      System.err.println(tmp);
       Properties colorSet = new Properties();
 
       try {
@@ -335,27 +336,32 @@ public class Terminal extends Plugin 
         try {
           colorSet.load(new URL(tmp).openStream());
         } catch(Exception ue) {
-	  error("cannot find colorSet: "+tmp);
-	  error("resource access failed: "+e);
-          error("URL access failed: "+ue);
-	  colorSet = null;
+          error("cannot find colorSet: " + tmp);
+          error("resource access failed: " + e);
+          error("URL access failed: " + ue);
+          colorSet = null;
         }
       }
 
       if(colorSet != null) {
         Color set[] = terminal.getColorSet();
-        for(int i = 0; i < 8; i++)
-          if((tmp = colorSet.getProperty("color"+i)) != null)
-	    if(colors.get(tmp) != null)
-	      set[i] = (Color)colors.get(tmp);
-	    else try {
-	      if(Color.getColor(tmp) != null) 
-	        set[i] = Color.getColor(tmp);
-              else
-	        set[i] = Color.decode(tmp);
-	    } catch(Exception e) {
-	      error("ignoring unknown color code: "+tmp);
-	    }
+        Color color = null;
+        for(int i = 0; i < 8; i++) {
+          if((tmp = colorSet.getProperty("color" + i)) != null &&
+             (color = codeToColor(tmp)) != null) {
+            set[i] = color;
+          }
+        }
+        // special color for bold
+        if((tmp = colorSet.getProperty("bold")) != null &&
+          (color = codeToColor(tmp)) != null) {
+          set[vt320.COLOR_BOLD] = color;
+        }
+        // special color for invert
+        if((tmp = colorSet.getProperty("invert")) != null &&
+          (color = codeToColor(tmp)) != null) {
+          set[vt320.COLOR_INVERT] = color;
+        }
         terminal.setColorSet(set);
       }
     }
@@ -363,18 +369,18 @@ public class Terminal extends Plugin 
     String cFG = cfg.getProperty("Terminal", id, "cursor.foreground");
     String cBG = cfg.getProperty("Terminal", id, "cursor.background");
     if(cFG != null || cBG != null)
-     try {
-       Color fg = (cFG == null ? 
-         terminal.getBackground() :
-         (Color.getColor(cFG) != null ? Color.getColor(cFG):Color.decode(cFG)));
-       Color bg = (cBG == null ?
-         terminal.getForeground() :
-         (Color.getColor(cBG) != null ? Color.getColor(cBG):Color.decode(cBG)));
-       terminal.setCursorColors(fg, bg);
-     } catch(Exception e) {
-       error("ignoring unknown cursor color code: "+tmp);
-     }
- 
+      try {
+        Color fg = (cFG == null ?
+          terminal.getBackground() :
+          (Color.getColor(cFG) != null ? Color.getColor(cFG):Color.decode(cFG)));
+        Color bg = (cBG == null ?
+          terminal.getForeground() :
+          (Color.getColor(cBG) != null ? Color.getColor(cBG):Color.decode(cBG)));
+        terminal.setCursorColors(fg, bg);
+      } catch(Exception e) {
+        error("ignoring unknown cursor color code: " + tmp);
+      }
+
     if((tmp = cfg.getProperty("Terminal", id, "border")) != null) {
       String size = tmp;
       boolean raised = false;
@@ -387,9 +393,9 @@ public class Terminal extends Plugin 
       terminal.setLocalEcho(Boolean.valueOf(tmp).booleanValue());
       localecho_overridden = true;
     }
- 
-    if((tmp = cfg.getProperty("Terminal", id, "scrollBar")) != null && 
-       !personalJava) {
+
+    if((tmp = cfg.getProperty("Terminal", id, "scrollBar")) != null &&
+      !personalJava) {
       String direction = tmp;
       if(!direction.equals("none")) {
         if(!direction.equals("East") && !direction.equals("West"))
@@ -406,28 +412,29 @@ public class Terminal extends Plugin 
     if((tmp = cfg.getProperty("Terminal", id, "answerback")) != null)
       terminal.setAnswerBack(tmp);
 
-    if((tmp = cfg.getProperty("Terminal", id, "buffer")) != null) 
+    if((tmp = cfg.getProperty("Terminal", id, "buffer")) != null)
       terminal.setBufferSize(Integer.parseInt(tmp));
 
-    if((tmp = cfg.getProperty("Terminal", id, "size")) != null) try {
-      int idx = tmp.indexOf(',');
-      int width = Integer.parseInt(tmp.substring(1, idx).trim());
-      int height = Integer.parseInt(tmp.substring(idx+1,tmp.length()-1).trim());
-      terminal.setScreenSize(width, height);
-    } catch(Exception e) {
-      error("screen size is wrong: "+tmp);
-      error("error: "+e);
-    }
+    if((tmp = cfg.getProperty("Terminal", id, "size")) != null)
+      try {
+        int idx = tmp.indexOf(',');
+        int width = Integer.parseInt(tmp.substring(1, idx).trim());
+        int height = Integer.parseInt(tmp.substring(idx + 1, tmp.length() - 1).trim());
+        terminal.setScreenSize(width, height);
+      } catch(Exception e) {
+        error("screen size is wrong: " + tmp);
+        error("error: " + e);
+      }
 
     if((tmp = cfg.getProperty("Terminal", id, "resize")) != null)
       if(tmp.equals("font"))
-	terminal.setResizeStrategy(terminal.RESIZE_FONT);
+        terminal.setResizeStrategy(terminal.RESIZE_FONT);
       else if(tmp.equals("screen"))
         terminal.setResizeStrategy(terminal.RESIZE_SCREEN);
-      else 
+      else
         terminal.setResizeStrategy(terminal.RESIZE_NONE);
-        
-	
+
+
     if((tmp = cfg.getProperty("Terminal", id, "font")) != null) {
       String font = tmp;
       int style = Font.PLAIN, fsize = 12;
@@ -452,17 +459,17 @@ public class Terminal extends Plugin 
         keyCodes.load(getClass().getResourceAsStream(tmp));
       } catch(Exception e) {
         try {
-        keyCodes.load(new URL(tmp).openStream());
+          keyCodes.load(new URL(tmp).openStream());
         } catch(Exception ue) {
-          error("cannot find keyCodes: "+tmp);
-	  error("resource access failed: "+e);
-          error("URL access failed: "+ue);
-	  keyCodes = null;
+          error("cannot find keyCodes: " + tmp);
+          error("resource access failed: " + e);
+          error("URL access failed: " + ue);
+          keyCodes = null;
         }
       }
 
       // set the key codes if we got the properties
-      if(keyCodes != null) 
+      if(keyCodes != null)
         terminal.setKeyCodes(keyCodes);
     }
 
@@ -477,7 +484,7 @@ public class Terminal extends Plugin 
       try {
         audioBeep = new SoundRequest(new URL(tmp));
       } catch(MalformedURLException e) {
-        error("incorrect URL for audio ping: "+e);
+        error("incorrect URL for audio ping: " + e);
       }
 
     tPanel.setBackground(terminal.getBackground());
@@ -489,22 +496,23 @@ public class Terminal extends Plugin 
   public void run() {
     byte[] t, b = new byte[256];
     int n = 0;
-    while(n >= 0) try {
-      n = read(b);
-      if(debug > 0 && n > 0) 
-        System.err.println("Terminal: \""+(new String(b, 0, n, encoding))+"\"");
-      if(n > 0) terminal.putString(new String(b, 0, n, encoding));
-      tPanel.repaint();
-    } catch(IOException e) {
-      reader = null;
-      break;
-    }
+    while(n >= 0)
+      try {
+        n = read(b);
+        if(debug > 0 && n > 0)
+          System.err.println("Terminal: \"" + (new String(b, 0, n, encoding)) + "\"");
+        if(n > 0) terminal.putString(new String(b, 0, n, encoding));
+        tPanel.repaint();
+      } catch(IOException e) {
+        reader = null;
+        break;
+      }
   }
 
   protected FilterPlugin source;
 
   public void setFilterSource(FilterPlugin source) {
-    if(debug > 0) System.err.println("Terminal: connected to: "+source);
+    if(debug > 0) System.err.println("Terminal: connected to: " + source);
     this.source = source;
   }
 
@@ -539,14 +547,14 @@ public class Terminal extends Plugin 
       /*
       InputStream is =
         (InputStream)t.getTransferData(DataFlavor.plainTextFlavor);
-      if(debug > 0) 
+      if(debug > 0)
         System.out.println("Clipboard: available: "+is.available());
       byte buffer[] = new byte[is.available()];
       is.read(buffer);
       is.close();
       */
-      byte buffer[] = 
-        ((String)t.getTransferData(DataFlavor.stringFlavor)).getBytes();
+      byte buffer[] =
+        ((String) t.getTransferData(DataFlavor.stringFlavor)).getBytes();
       try {
         write(buffer);
       } catch(IOException e) {
blob - 5b0f4604bbe78075494943c8a2fcbcb034446c90
blob + 131f408a229d5bc1d48dd9d6e889efd505c816ed
--- de/mud/terminal/VDU.java
+++ de/mud/terminal/VDU.java
@@ -6,11 +6,11 @@
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * "The Java Telnet Application" is distributed in the hope that it will be 
+ * "The Java Telnet Application" 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 this software; see the file COPYING.  If not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -19,40 +19,16 @@
 
 package de.mud.terminal;
 
-import java.awt.Component;
-import java.awt.Graphics;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.Point;
-import java.awt.Insets;
-import java.awt.Event;
-import java.awt.Label;
-import java.awt.Frame;
-import java.awt.Rectangle;
-import java.awt.Scrollbar;
-import java.awt.Image;
-
-/*
-import java.awt.Graphics;
-import java.awt.print.Printable;
-import java.awt.print.PrinterJob;
-import java.awt.print.PrinterException;
-import java.awt.print.PageFormat;
-*/
-
-import java.awt.AWTEvent;
-import java.awt.AWTEventMulticaster;
-import java.awt.event.KeyListener;
-import java.awt.event.KeyEvent;
-import java.awt.event.AdjustmentListener;
+import java.awt.*;
 import java.awt.event.AdjustmentEvent;
+import java.awt.event.AdjustmentListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
 import java.awt.event.MouseListener;
 import java.awt.event.MouseMotionListener;
-import java.awt.event.MouseEvent;
-import java.awt.event.FocusListener;
-import java.awt.event.FocusEvent;
 
 /**
  * Video Display Unit emulation. This class implements all necessary
@@ -70,7 +46,7 @@ import java.awt.event.FocusEvent;
  * @version $Id$
  * @author  Matthias L. Jugel, Marcus Meißner
  */
-public class VDU extends Component 
+public class VDU extends Component
   implements MouseListener, MouseMotionListener {
   /** The current version id tag */
   public final static String ID = "$Id$";
@@ -79,12 +55,12 @@ public class VDU extends Component 
   public final static int debug = 0;
 
   /** lightweight component definitions */
-  private final static long VDU_EVENTS = AWTEvent.KEY_EVENT_MASK 
-                                       | AWTEvent.FOCUS_EVENT_MASK
-                                       | AWTEvent.ACTION_EVENT_MASK
-                                       | AWTEvent.MOUSE_MOTION_EVENT_MASK
-                                       | AWTEvent.MOUSE_EVENT_MASK;
-  
+  private final static long VDU_EVENTS = AWTEvent.KEY_EVENT_MASK
+    | AWTEvent.FOCUS_EVENT_MASK
+    | AWTEvent.ACTION_EVENT_MASK
+    | AWTEvent.MOUSE_MOTION_EVENT_MASK
+    | AWTEvent.MOUSE_EVENT_MASK;
+
   private Dimension size;                             /* rows and columns */
   private Insets insets;                            /* size of the border */
   private boolean raised;            /* indicator if the border is raised */
@@ -111,11 +87,11 @@ public class VDU extends Component 
   private String selection;                 /* contains the selected text */
 
   private Scrollbar scrollBar;
-  private SoftFont  sf = new SoftFont();
+  private SoftFont sf = new SoftFont();
 
   private boolean update[];        /* contains the lines that need update */
   private boolean colorPrinting = false;	/* print display in color */
-  
+
   private Image backingStore = null;
 
   /**
@@ -125,35 +101,43 @@ public class VDU extends Component 
    * @return the new brighter color
    */
 
-  private double max(double f1,double f2) { return (f1<f2)?f2:f1; }
-  private double min(double f1,double f2) { return (f1<f2)?f1:f2; }
+  private double max(double f1, double f2) {
+    return (f1 < f2)?f2:f1;
+  }
+
+  private double min(double f1, double f2) {
+    return (f1 < f2)?f1:f2;
+  }
+
   private Color brighten(Color clr) {
     int r,g,b;
 
-    r = (int)min(clr.getRed()  * 1.2 , 255.0);
-    g = (int)min(clr.getGreen()* 1.2 , 255.0);
-    b = (int)min(clr.getBlue() * 1.2 , 255.0);
-    return new Color(r,g,b);
+    r = (int) min(clr.getRed() * 1.2, 255.0);
+    g = (int) min(clr.getGreen() * 1.2, 255.0);
+    b = (int) min(clr.getBlue() * 1.2, 255.0);
+    return new Color(r, g, b);
   }
 
   private Color darken(Color clr) {
     int r,g,b;
 
-    r = (int)max(clr.getRed()   * 0.8 , 0.0);
-    g = (int)max(clr.getGreen() * 0.8 , 0.0);
-    b = (int)max(clr.getBlue()  * 0.8 , 0.0);
-    return new Color(r,g,b);
+    r = (int) max(clr.getRed() * 0.8, 0.0);
+    g = (int) max(clr.getGreen() * 0.8, 0.0);
+    b = (int) max(clr.getBlue() * 0.8, 0.0);
+    return new Color(r, g, b);
   }
 
   /** A list of colors used for representation of the display */
-  private Color color[] = { Color.black,
-                            Color.red,
-                            Color.green,
-                            Color.yellow,
-                            Color.blue,
-                            Color.magenta,
-                            Color.cyan,
-                            Color.white,
+  private Color color[] = {Color.black,
+                           Color.red,
+                           Color.green,
+                           Color.yellow,
+                           Color.blue,
+                           Color.magenta,
+                           Color.cyan,
+                           Color.white,
+                           null, // bold color
+                           null, // inverted color
   };
 
   public final static int COLOR_0 = 0;
@@ -164,42 +148,44 @@ public class VDU extends Component 
   public final static int COLOR_5 = 5;
   public final static int COLOR_6 = 6;
   public final static int COLOR_7 = 7;
+  public final static int COLOR_BOLD = 8;
+  public final static int COLOR_INVERT = 9;
 
   /* definitions of standards for the display unit */
-  final static int COLOR_FG_STD  = 7;
-  final static int COLOR_BG_STD  = 0;
-  public final static int COLOR         = 0xff0;
-  public final static int COLOR_FG      = 0xf0;
-  public final static int COLOR_BG      = 0xf00;
+  final static int COLOR_FG_STD = 7;
+  final static int COLOR_BG_STD = 0;
+  public final static int COLOR = 0xff0;
+  public final static int COLOR_FG = 0xf0;
+  public final static int COLOR_BG = 0xf00;
 
   /** User defineable cursor colors */
   private Color cursorColorFG = null;
   private Color cursorColorBG = null;
 
   /** Scroll up when inserting a line. */
-  public final static boolean SCROLL_UP   = false;
+  public final static boolean SCROLL_UP = false;
   /** Scroll down when inserting a line. */
   public final static boolean SCROLL_DOWN = true;
 
   /** Do nothing when the component is resized. */
-  public final static int RESIZE_NONE  = 0;
+  public final static int RESIZE_NONE = 0;
   /** Resize the width and height of the character screen. */
-  public final static int RESIZE_SCREEN  = 1;
+  public final static int RESIZE_SCREEN = 1;
   /** Resize the font to the new screen size. */
-  public final static int RESIZE_FONT  = 2;
-  
-  /** Make character normal. */ 
-  public final static int NORMAL  = 0x00;
-  /** Make character bold. */ 
-  public final static int BOLD    = 0x01;
-  /** Underline character. */ 
-  public final static int UNDERLINE  = 0x02;
-  /** Invert character. */ 
-  public final static int INVERT  = 0x04;
-  /** Lower intensity character. */ 
-  public final static int LOW  = 0x08;
+  public final static int RESIZE_FONT = 2;
 
-  /** 
+  /** Make character normal. */
+  public final static int NORMAL = 0x00;
+  /** Make character bold. */
+  public final static int BOLD = 0x01;
+  /** Underline character. */
+  public final static int UNDERLINE = 0x02;
+  /** Invert character. */
+  public final static int INVERT = 0x04;
+  /** Lower intensity character. */
+  public final static int LOW = 0x08;
+
+  /**
    * Create a new video display unit with the passed width and height in
    * characters using a special font and font size. These features can
    * be set independently using the appropriate properties.
@@ -210,7 +196,7 @@ public class VDU extends Component 
   public VDU(int width, int height, Font font) {
     // lightweight component handling
     enableEvents(VDU_EVENTS);
-    
+
     // set the normal font to use
     setFont(font);
     // set the standard resize strategy
@@ -231,7 +217,7 @@ public class VDU extends Component 
 
     selection = null;
   }
-  
+
   /**
    * Create a display unit with specific size, Font is "Monospaced", size 12.
    * @param width the length of the character lines
@@ -257,7 +243,7 @@ public class VDU extends Component 
   }
 
   public void setColorSet(Color[] colorset) {
-    System.arraycopy(colorset, 0, color, 0, 8);
+    System.arraycopy(colorset, 0, color, 0, 10);
     update[0] = true;
     redraw();
   }
@@ -296,7 +282,7 @@ public class VDU extends Component 
    * @see #insertChar
    * @see #deleteChar
    * @see #redraw
-   */  
+   */
 
   public void putChar(int c, int l, char ch, int attributes) {
     c = checkBounds(c, 0, size.width - 1);
@@ -349,10 +335,10 @@ public class VDU extends Component 
   public void insertChar(int c, int l, char ch, int attributes) {
     c = checkBounds(c, 0, size.width - 1);
     l = checkBounds(l, 0, size.height - 1);
-    System.arraycopy(charArray[screenBase + l], c, 
-         charArray[screenBase + l], c + 1, size.width - c - 1);
-    System.arraycopy(charAttributes[screenBase + l], c, 
-         charAttributes[screenBase + l], c + 1, size.width - c - 1);
+    System.arraycopy(charArray[screenBase + l], c,
+                     charArray[screenBase + l], c + 1, size.width - c - 1);
+    System.arraycopy(charAttributes[screenBase + l], c,
+                     charAttributes[screenBase + l], c + 1, size.width - c - 1);
     putChar(c, l, ch, attributes);
   }
 
@@ -371,15 +357,15 @@ public class VDU extends Component 
     l = checkBounds(l, 0, size.height - 1);
     if(c < size.width - 1) {
       System.arraycopy(charArray[screenBase + l], c + 1,
-           charArray[screenBase + l], c, size.width - c - 1);
+                       charArray[screenBase + l], c, size.width - c - 1);
       System.arraycopy(charAttributes[screenBase + l], c + 1,
-           charAttributes[screenBase + l], c, size.width - c - 1);
+                       charAttributes[screenBase + l], c, size.width - c - 1);
     }
-    putChar(size.width - 1, l, (char)0);
+    putChar(size.width - 1, l, (char) 0);
   }
 
   /**
-   * Put a String at a specific position. Any characters previously on that 
+   * Put a String at a specific position. Any characters previously on that
    * position will be overwritten. You need to call redraw() for screen update.
    * @param c x-coordinate (column)
    * @param l y-coordinate (line)
@@ -392,14 +378,14 @@ public class VDU extends Component 
    * @see #insertLine
    * @see #deleteLine
    * @see #redraw
-   */  
+   */
   public void putString(int c, int l, String s) {
     putString(c, l, s, NORMAL);
   }
-  
+
   /**
    * Put a String at a specific position giving all characters the same
-   * attributes. Any characters previously on that position will be 
+   * attributes. Any characters previously on that position will be
    * overwritten. You need to call redraw() to update the screen.
    * @param c x-coordinate (column)
    * @param l y-coordinate (line)
@@ -441,7 +427,7 @@ public class VDU extends Component 
    */
   public void insertLine(int l, int n) {
     insertLine(l, n, SCROLL_UP);
-  }  
+  }
 
   /**
    * Insert a blank line at a specific position. Scroll text according to
@@ -456,7 +442,7 @@ public class VDU extends Component 
    */
   public void insertLine(int l, boolean scrollDown) {
     insertLine(l, 1, scrollDown);
-  }  
+  }
 
   /**
    * Insert blank lines at a specific position.
@@ -478,128 +464,129 @@ public class VDU extends Component 
     int offset = 0;
     int oldBase = screenBase;
 
-    if (l > bottomMargin) /* We do not scroll below bottom margin (below the scrolling region). */
-	return;
-    int top = (l < topMargin ? 
-               0 : (l > bottomMargin ?
-                    (bottomMargin + 1 < size.height ?
-                     bottomMargin + 1 : size.height - 1) : topMargin));
+    if(l > bottomMargin) /* We do not scroll below bottom margin (below the scrolling region). */
+      return;
+    int top = (l < topMargin ?
+      0 : (l > bottomMargin ?
+      (bottomMargin + 1 < size.height ?
+      bottomMargin + 1 : size.height - 1) : topMargin));
     int bottom = (l > bottomMargin ?
-                  size.height - 1 : (l < topMargin ? 
-                                     (topMargin > 0 ?
-                                      topMargin - 1 : 0) : bottomMargin));
+      size.height - 1 : (l < topMargin ?
+      (topMargin > 0 ?
+      topMargin - 1 : 0) : bottomMargin));
 
     // System.out.println("l is "+l+", top is "+top+", bottom is "+bottom+", bottomargin is "+bottomMargin+", topMargin is "+topMargin);
-    
+
     if(scrollDown) {
       if(n > (bottom - top)) n = (bottom - top);
       cbuf = new char[bottom - l - (n - 1)][size.width];
       abuf = new int[bottom - l - (n - 1)][size.width];
-      
+
       System.arraycopy(charArray, oldBase + l, cbuf, 0, bottom - l - (n - 1));
-      System.arraycopy(charAttributes, oldBase + l, 
-		       abuf, 0, bottom - l - (n - 1));
-      System.arraycopy(cbuf, 0, charArray, oldBase + l + n, 
-		       bottom - l - (n - 1));
-      System.arraycopy(abuf, 0, charAttributes, oldBase + l + n, 
-		       bottom - l - (n - 1));
+      System.arraycopy(charAttributes, oldBase + l,
+                       abuf, 0, bottom - l - (n - 1));
+      System.arraycopy(cbuf, 0, charArray, oldBase + l + n,
+                       bottom - l - (n - 1));
+      System.arraycopy(abuf, 0, charAttributes, oldBase + l + n,
+                       bottom - l - (n - 1));
       cbuf = charArray;
       abuf = charAttributes;
-    } else try {
-      if(n > (bottom - top) + 1) n = (bottom - top) + 1;
-      if(bufSize < maxBufSize) {
-        if(bufSize + n > maxBufSize) {
-          offset = n - (maxBufSize - bufSize);
-          bufSize = maxBufSize;
-          screenBase = maxBufSize - size.height - 1;
-          windowBase = screenBase;
+    } else
+      try {
+        if(n > (bottom - top) + 1) n = (bottom - top) + 1;
+        if(bufSize < maxBufSize) {
+          if(bufSize + n > maxBufSize) {
+            offset = n - (maxBufSize - bufSize);
+            bufSize = maxBufSize;
+            screenBase = maxBufSize - size.height - 1;
+            windowBase = screenBase;
+          } else {
+            screenBase += n;
+            windowBase += n;
+            bufSize += n;
+          }
+          cbuf = new char[bufSize][size.width];
+          abuf = new int[bufSize][size.width];
         } else {
-          screenBase += n;
-          windowBase += n;
-          bufSize += n;
+          offset = n;
+          cbuf = charArray;
+          abuf = charAttributes;
         }
-        cbuf = new char[bufSize][size.width];
-        abuf = new int[bufSize][size.width];
-      } else {
-        offset = n;
-        cbuf = charArray;
-        abuf = charAttributes;
+        // copy anything from the top of the buffer (+offset) to the new top
+        // up to the screenBase.
+        if(oldBase > 0) {
+          System.arraycopy(charArray, offset,
+                           cbuf, 0,
+                           oldBase - offset);
+          System.arraycopy(charAttributes, offset,
+                           abuf, 0,
+                           oldBase - offset);
+        }
+        // copy anything from the top of the screen (screenBase) up to the
+        // topMargin to the new screen
+        if(top > 0) {
+          System.arraycopy(charArray, oldBase,
+                           cbuf, screenBase,
+                           top);
+          System.arraycopy(charAttributes, oldBase,
+                           abuf, screenBase,
+                           top);
+        }
+        // copy anything from the topMargin up to the amount of lines inserted
+        // to the gap left over between scrollback buffer and screenBase
+        if(oldBase > 0) {
+          System.arraycopy(charArray, oldBase + top,
+                           cbuf, oldBase - offset,
+                           n);
+          System.arraycopy(charAttributes, oldBase + top,
+                           abuf, oldBase - offset,
+                           n);
+        }
+        // copy anything from topMargin + n up to the line linserted to the
+        // topMargin
+        System.arraycopy(charArray, oldBase + top + n,
+                         cbuf, screenBase + top,
+                         l - top - (n - 1));
+        System.arraycopy(charAttributes, oldBase + top + n,
+                         abuf, screenBase + top,
+                         l - top - (n - 1));
+        //
+        // copy the all lines next to the inserted to the new buffer
+        if(l < size.height - 1) {
+          System.arraycopy(charArray, oldBase + l + 1,
+                           cbuf, screenBase + l + 1,
+                           (size.height - 1) - l);
+          System.arraycopy(charAttributes, oldBase + l + 1,
+                           abuf, screenBase + l + 1,
+                           (size.height - 1) - l);
+        }
+      } catch(ArrayIndexOutOfBoundsException e) {
+        // this should not happen anymore, but I will leave the code
+        // here in case something happens anyway. That code above is
+        // so complex I always have a hard time understanding what
+        // I did, even though there are comments
+        System.err.println("*** Error while scrolling up:");
+        System.err.println("--- BEGIN STACK TRACE ---");
+        e.printStackTrace();
+        System.err.println("--- END STACK TRACE ---");
+        System.err.println("bufSize=" + bufSize + ", maxBufSize=" + maxBufSize);
+        System.err.println("top=" + top + ", bottom=" + bottom);
+        System.err.println("n=" + n + ", l=" + l);
+        System.err.println("screenBase=" + screenBase + ", windowBase=" + windowBase);
+        System.err.println("oldBase=" + oldBase);
+        System.err.println("size.width=" + size.width + ", size.height=" + size.height);
+        System.err.println("abuf.length=" + abuf.length + ", cbuf.length=" + cbuf.length);
+        System.err.println("*** done dumping debug information");
       }
-      // copy anything from the top of the buffer (+offset) to the new top
-      // up to the screenBase.
-      if(oldBase > 0) {
-        System.arraycopy(charArray, offset, 
-                         cbuf, 0, 
-                         oldBase - offset);
-        System.arraycopy(charAttributes, offset, 
-                         abuf, 0, 
-                         oldBase - offset);
-      }
-      // copy anything from the top of the screen (screenBase) up to the
-      // topMargin to the new screen
-      if(top > 0) {
-        System.arraycopy(charArray, oldBase, 
-                         cbuf, screenBase, 
-                         top);
-        System.arraycopy(charAttributes, oldBase, 
-                         abuf, screenBase, 
-                         top);
-      }
-      // copy anything from the topMargin up to the amount of lines inserted
-      // to the gap left over between scrollback buffer and screenBase
-      if(oldBase > 0) {
-	System.arraycopy(charArray, oldBase + top, 
-			 cbuf, oldBase - offset,
-			 n);
-	System.arraycopy(charAttributes, oldBase + top, 
-			 abuf, oldBase - offset,
-			 n);
-      }
-      // copy anything from topMargin + n up to the line linserted to the
-      // topMargin
-      System.arraycopy(charArray, oldBase + top + n,
-                       cbuf, screenBase + top,
-                       l - top - (n - 1));
-      System.arraycopy(charAttributes, oldBase + top + n,
-                       abuf, screenBase + top,
-                       l - top - (n - 1));
-      //
-      // copy the all lines next to the inserted to the new buffer
-      if(l < size.height - 1) {
-        System.arraycopy(charArray, oldBase + l + 1,
-                         cbuf, screenBase + l + 1,
-                         (size.height - 1) - l);
-        System.arraycopy(charAttributes, oldBase + l + 1,
-                         abuf, screenBase + l + 1,
-                         (size.height - 1) - l);
-      }
-    } catch(ArrayIndexOutOfBoundsException e) {
-      // this should not happen anymore, but I will leave the code
-      // here in case something happens anyway. That code above is
-      // so complex I always have a hard time understanding what
-      // I did, even though there are comments
-      System.err.println("*** Error while scrolling up:");
-      System.err.println("--- BEGIN STACK TRACE ---");
-      e.printStackTrace();
-      System.err.println("--- END STACK TRACE ---");
-      System.err.println("bufSize="+bufSize+", maxBufSize="+maxBufSize);
-      System.err.println("top="+top+", bottom="+bottom);
-      System.err.println("n="+n+", l="+l);
-      System.err.println("screenBase="+screenBase+", windowBase="+windowBase);
-      System.err.println("oldBase="+oldBase);
-      System.err.println("size.width="+size.width+", size.height="+size.height);
-      System.err.println("abuf.length="+abuf.length+", cbuf.length="+cbuf.length);
-      System.err.println("*** done dumping debug information");
-    }
-    
+
     for(int i = 0; i < n; i++) {
-      cbuf[(screenBase + l) + (scrollDown ? i : -i) ] = new char[size.width];
-      abuf[(screenBase + l) + (scrollDown ? i : -i) ] = new int[size.width];
+      cbuf[(screenBase + l) + (scrollDown ? i : -i)] = new char[size.width];
+      abuf[(screenBase + l) + (scrollDown ? i : -i)] = new int[size.width];
     }
 
     charArray = cbuf;
     charAttributes = abuf;
-    
+
     if(scrollDown)
       markLine(l, bottom - l + 1);
     else
@@ -608,10 +595,10 @@ public class VDU extends Component 
     if(scrollBar != null)
       scrollBar.setValues(windowBase, size.height, 0, bufSize);
   }
-  
+
   /**
-   * Delete a line at a specific position. Subsequent lines will be scrolled 
-   * up to fill the space and a blank line is inserted at the end of the 
+   * Delete a line at a specific position. Subsequent lines will be scrolled
+   * up to fill the space and a blank line is inserted at the end of the
    * screen.
    * @param l the y-coordinate to insert the line
    * @see #deleteLine
@@ -619,12 +606,12 @@ public class VDU extends Component 
   public void deleteLine(int l) {
     l = checkBounds(l, 0, size.height - 1);
 
-    int bottom = (l>bottomMargin?size.height-1:
-		  (l<topMargin?topMargin:bottomMargin+1));
+    int bottom = (l > bottomMargin?size.height - 1:
+      (l < topMargin?topMargin:bottomMargin + 1));
     System.arraycopy(charArray, screenBase + l + 1,
-                     charArray, screenBase + l, bottom - l -1 );
+                     charArray, screenBase + l, bottom - l - 1);
     System.arraycopy(charAttributes, screenBase + l + 1,
-                     charAttributes, screenBase + l, bottom - l -1);
+                     charAttributes, screenBase + l, bottom - l - 1);
     charArray[screenBase + bottom - 1] = new char[size.width];
     charAttributes[screenBase + bottom - 1] = new int[size.width];
     markLine(l, bottom - l);
@@ -650,9 +637,8 @@ public class VDU extends Component 
     char cbuf[] = new char[w];
     int abuf[] = new int[w];
 
-    for(int i = 0; i < w ; i++) abuf[i] = curAttr;
-    for(int i = 0; i < h && l + i < size.height; i++)
-    {
+    for(int i = 0; i < w; i++) abuf[i] = curAttr;
+    for(int i = 0; i < h && l + i < size.height; i++) {
       System.arraycopy(cbuf, 0, charArray[screenBase + l + i], c, w);
       System.arraycopy(abuf, 0, charAttributes[screenBase + l + i], c, w);
     }
@@ -677,8 +663,7 @@ public class VDU extends Component 
     char cbuf[] = new char[w];
     int abuf[] = new int[w];
 
-    for(int i = 0; i < h && l + i < size.height; i++)
-    {
+    for(int i = 0; i < h && l + i < size.height; i++) {
       System.arraycopy(cbuf, 0, charArray[screenBase + l + i], c, w);
       System.arraycopy(abuf, 0, charAttributes[screenBase + l + i], c, w);
     }
@@ -701,8 +686,8 @@ public class VDU extends Component 
   }
 
   public void showCursor(boolean doshow) {
-    if (doshow != showcursor)
-	markLine(cursorY,1);
+    if(doshow != showcursor)
+      markLine(cursorY, 1);
     showcursor = doshow;
   }
 
@@ -724,8 +709,7 @@ public class VDU extends Component 
     if(l > bottomMargin) {
       topMargin = bottomMargin;
       bottomMargin = l;
-    }
-    else
+    } else
       topMargin = l;
     if(topMargin < 0) topMargin = 0;
     if(bottomMargin > size.height - 1) bottomMargin = size.height - 1;
@@ -748,8 +732,7 @@ public class VDU extends Component 
     if(l < topMargin) {
       bottomMargin = topMargin;
       topMargin = l;
-    }
-    else
+    } else
       bottomMargin = l;
     if(topMargin < 0) topMargin = 0;
     if(bottomMargin > size.height - 1) bottomMargin = size.height - 1;
@@ -761,7 +744,7 @@ public class VDU extends Component 
   public int getBottomMargin() {
     return bottomMargin;
   }
-    
+
   /**
    * Set scrollback buffer size.
    * @param amount new size of the buffer
@@ -784,7 +767,7 @@ public class VDU extends Component 
       windowBase = screenBase;
     }
     maxBufSize = amount;
- 
+
     update[0] = true;
     redraw();
   }
@@ -812,7 +795,8 @@ public class VDU extends Component 
    * @see getBufferSize
    */
   public void setWindowBase(int line) {
-    if(line > screenBase) line = screenBase;
+    if(line > screenBase)
+      line = screenBase;
     else if(line < 0) line = 0;
     windowBase = line;
     update[0] = true;
@@ -842,9 +826,9 @@ public class VDU extends Component 
     if(update != null) update[0] = true;
     redraw();
   }
-      
+
   /**
-   * Change the size of the screen. This will include adjustment of the 
+   * Change the size of the screen. This will include adjustment of the
    * scrollback buffer.
    * @param columns width of the screen
    * @param columns height of the screen
@@ -855,11 +839,11 @@ public class VDU extends Component 
     int bsize = bufSize;
 
     if(width < 1 || height < 1) return;
-    
+
     if(debug > 0)
-      System.err.println("VDU: screen size ["+width+","+height+"]");
+      System.err.println("VDU: screen size [" + width + "," + height + "]");
 
-    if(height > maxBufSize) 
+    if(height > maxBufSize)
       maxBufSize = height;
 
     if(height > bufSize) {
@@ -868,22 +852,22 @@ public class VDU extends Component 
       windowBase = 0;
     }
 
-    if(windowBase+height >= bufSize)
-      windowBase = bufSize-height;
+    if(windowBase + height >= bufSize)
+      windowBase = bufSize - height;
 
-    if(screenBase+height >= bufSize)
-      screenBase = bufSize-height;
+    if(screenBase + height >= bufSize)
+      screenBase = bufSize - height;
 
 
     cbuf = new char[bufSize][width];
     abuf = new int[bufSize][width];
-    
+
     if(charArray != null && charAttributes != null)
       for(int i = 0; i < bsize && i < bufSize; i++) {
-        System.arraycopy(charArray[i], 0, cbuf[i], 0, 
-             width < size.width ? width : size.width);
-        System.arraycopy(charAttributes[i], 0, abuf[i], 0, 
-             width < size.width ? width : size.width);
+        System.arraycopy(charArray[i], 0, cbuf[i], 0,
+                         width < size.width ? width : size.width);
+        System.arraycopy(charAttributes[i], 0, abuf[i], 0,
+                         width < size.width ? width : size.width);
       }
     charArray = cbuf;
     charAttributes = abuf;
@@ -914,16 +898,20 @@ public class VDU extends Component 
   public void setResizeStrategy(int strategy) {
     resizeStrategy = strategy;
   }
-  
+
   /**
    * Get amount of rows on the screen.
    */
-  public int getRows() { return size.height; }
+  public int getRows() {
+    return size.height;
+  }
 
   /**
    * Get amount of columns on the screen.
    */
-  public int getColumns() { return size.width; }
+  public int getColumns() {
+    return size.width;
+  }
 
   /**
    * Set the border thickness and the border type.
@@ -931,9 +919,11 @@ public class VDU extends Component 
    * @param raised a boolean indicating a raised or embossed border
    */
   public void setBorder(int thickness, boolean raised) {
-    if(thickness == 0) insets = null;
-    else insets = new Insets(thickness+1, thickness+1, 
-                             thickness+1, thickness+1);
+    if(thickness == 0)
+      insets = null;
+    else
+      insets = new Insets(thickness + 1, thickness + 1,
+                          thickness + 1, thickness + 1);
     this.raised = raised;
   }
 
@@ -964,7 +954,7 @@ public class VDU extends Component 
     for(int i = 0; (i < n) && (l + i < size.height); i++)
       update[l + i + 1] = true;
   }
-  
+
   /**
    * Redraw marked lines.
    * @see #markLine
@@ -990,29 +980,29 @@ public class VDU extends Component 
 
     g.setFont(normalFont);
 
-   
-   /* for debug only
-    if (update[0]) {
-        System.err.println("Redrawing all");
-    } else {
-	for (int l = 1; l < size.height+1; l++) {
-	    if (update[l]) {
-	    	for (int c = 0; c < size.height-l;c++) {
-		    if (!update[c+l]) {
-			System.err.println("Redrawing "+(l-1)+" - "+(l+c-2));
-			l=l+c;
-			break;
-		    }
-		}
-	    }
-	}
-    }
-    */
 
+    /* for debug only
+     if (update[0]) {
+         System.err.println("Redrawing all");
+     } else {
+     for (int l = 1; l < size.height+1; l++) {
+         if (update[l]) {
+             for (int c = 0; c < size.height-l;c++) {
+             if (!update[c+l]) {
+             System.err.println("Redrawing "+(l-1)+" - "+(l+c-2));
+             l=l+c;
+             break;
+             }
+         }
+         }
+     }
+     }
+     */
+
     for(int l = 0; l < size.height; l++) {
       if(!update[0] && !update[l + 1]) continue;
       update[l + 1] = false;
-      if(debug > 2) System.err.println("redraw(): line "+l);
+      if(debug > 2) System.err.println("redraw(): line " + l);
       for(int c = 0; c < size.width; c++) {
         int addr = 0;
         int currAttr = charAttributes[windowBase + l][c];
@@ -1021,90 +1011,114 @@ public class VDU extends Component 
         bg = darken(getBackground());
 
         if((currAttr & COLOR_FG) != 0)
-          fg = darken(color[((currAttr & COLOR_FG) >> 4)-1]);
+          fg = darken(color[((currAttr & COLOR_FG) >> 4) - 1]);
         if((currAttr & COLOR_BG) != 0)
-          bg = darken(darken(color[((currAttr & COLOR_BG) >> 8)-1]));
+          bg = darken(darken(color[((currAttr & COLOR_BG) >> 8) - 1]));
 
-        if((currAttr & BOLD) != 0)
+        if((currAttr & BOLD) != 0) {
+          g.setFont(normalFont.deriveFont(Font.BOLD));
+          if(null != color[COLOR_BOLD]) {
+            fg = color[COLOR_BOLD];
+          }
+          /*
           if(fg.equals(Color.black)) {
             fg = Color.gray;
           } else {
-	    fg = brighten(fg);
-	    // bg = bg.brighter(); -- make some programs ugly
-	  }
+            fg = brighten(fg);
+            // bg = bg.brighter(); -- make some programs ugly
+          }
+          */
+        } else {
+          g.setFont(normalFont);
+        }
 
-        if((currAttr & LOW) != 0) { fg = darken(fg); }
-        if((currAttr & INVERT) != 0) { Color swapc = bg; bg=fg;fg=swapc; }
+        if((currAttr & LOW) != 0) {
+          fg = darken(fg);
+        }
+        if((currAttr & INVERT) != 0) {
+          if(null == color[COLOR_INVERT]) {
+            Color swapc = bg;
+            bg = fg;
+            fg = swapc;
+          } else {
+            if(null == color[COLOR_BOLD]) {
+              fg = bg;
+            } else {
+              fg = color[COLOR_BOLD];
+            }
+            bg = color[COLOR_INVERT];
+          }
+        }
 
-        if (sf.inSoftFont(charArray[windowBase + l][c])) {
-          g.setColor(bg);	
-          g.fillRect(c * charWidth + xoffset, l * charHeight + yoffset, 
+        if(sf.inSoftFont(charArray[windowBase + l][c])) {
+          g.setColor(bg);
+          g.fillRect(c * charWidth + xoffset, l * charHeight + yoffset,
                      charWidth, charHeight);
-          g.setColor(fg);	
-          sf.drawChar(g,charArray[windowBase + l][c],xoffset+c*charWidth,
-                      l*charHeight+yoffset, charWidth, charHeight);
+          g.setColor(fg);
+          sf.drawChar(g, charArray[windowBase + l][c], xoffset + c * charWidth,
+                      l * charHeight + yoffset, charWidth, charHeight);
           if((currAttr & UNDERLINE) != 0)
             g.drawLine(c * charWidth + xoffset,
-                       (l+1) * charHeight - charDescent / 2 + yoffset,
-                       c * charWidth + charWidth + xoffset, 
-                       (l+1) * charHeight - charDescent / 2 + yoffset);
+                       (l + 1) * charHeight - charDescent / 2 + yoffset,
+                       c * charWidth + charWidth + xoffset,
+                       (l + 1) * charHeight - charDescent / 2 + yoffset);
           continue;
         }
-      
+
         // determine the maximum of characters we can print in one go
-        while((c + addr < size.width) && 
-              ( (charArray[windowBase + l][c + addr] < ' ')		||
-	      	(charAttributes[windowBase + l][c + addr] == currAttr)
-	      )	&&
-              !sf.inSoftFont(charArray[windowBase + l ][c+addr])
-        ) {
+        while((c + addr < size.width) &&
+          ((charArray[windowBase + l][c + addr] < ' ') ||
+          (charAttributes[windowBase + l][c + addr] == currAttr)
+          ) &&
+          !sf.inSoftFont(charArray[windowBase + l][c + addr])
+          ) {
           if(charArray[windowBase + l][c + addr] < ' ') {
             charArray[windowBase + l][c + addr] = ' ';
-	    charAttributes[windowBase + l][c + addr] = 0;
-	    continue;
-	  }
+            charAttributes[windowBase + l][c + addr] = 0;
+            continue;
+          }
           addr++;
         }
-      
+
         // clear the part of the screen we want to change (fill rectangle)
         g.setColor(bg);
         g.fillRect(c * charWidth + xoffset, l * charHeight + yoffset,
                    addr * charWidth, charHeight);
 
         g.setColor(fg);
-      
+
         // draw the characters
-        g.drawChars(charArray[windowBase + l], c, addr, 
-                    c * charWidth + xoffset, 
-                    (l+1) * charHeight - charDescent + yoffset);
+        g.drawChars(charArray[windowBase + l], c, addr,
+                    c * charWidth + xoffset,
+                    (l + 1) * charHeight - charDescent + yoffset);
 
         if((currAttr & UNDERLINE) != 0)
           g.drawLine(c * charWidth + xoffset,
-                     (l+1) * charHeight - charDescent / 2 + yoffset,
-                     c * charWidth + addr * charWidth + xoffset, 
-                     (l+1) * charHeight - charDescent / 2 + yoffset);
-        
+                     (l + 1) * charHeight - charDescent / 2 + yoffset,
+                     c * charWidth + addr * charWidth + xoffset,
+                     (l + 1) * charHeight - charDescent / 2 + yoffset);
+
         c += addr - 1;
       }
 
       // selection code, highlites line or part of it when it was
       // selected previously
       if(l >= selectStartLine && l <= selectEndLine) {
-	int selectStartColumn = (l == selectStartLine ? selectBegin.x : 0);
-	int selectEndColumn = 
-	  (l == selectEndLine ? 
-	    (l == selectStartLine ? selectEnd.x - selectStartColumn : 
-	                            selectEnd.x) : size.width);
-	if(selectStartColumn != selectEndColumn) {
-	  if(debug > 0) 
-	    System.err.println("select("+selectStartColumn+"-"
-	                                +selectEndColumn+")");
+        int selectStartColumn = (l == selectStartLine ? selectBegin.x : 0);
+        int selectEndColumn =
+          (l == selectEndLine ?
+          (l == selectStartLine ? selectEnd.x - selectStartColumn :
+          selectEnd.x) : size.width);
+        if(selectStartColumn != selectEndColumn) {
+          if(debug > 0)
+            System.err.println("select(" + selectStartColumn + "-"
+                               + selectEndColumn + ")");
           g.setXORMode(bg);
-	  g.fillRect(selectStartColumn * charWidth + xoffset,
-	             l * charHeight + yoffset,
-		     selectEndColumn * charWidth,
-		     charHeight);
-	  g.setPaintMode();
+          g.fillRect(selectStartColumn * charWidth + xoffset,
+                     l * charHeight + yoffset,
+                     selectEndColumn * charWidth,
+                     charHeight);
+          g.setPaintMode();
         }
       }
 
@@ -1112,12 +1126,12 @@ public class VDU extends Component 
 
     // draw cursor
     if(showcursor && (
-       screenBase + cursorY >= windowBase && 
-       screenBase + cursorY < windowBase + size.height)
+      screenBase + cursorY >= windowBase &&
+      screenBase + cursorY < windowBase + size.height)
     ) {
       g.setColor(cursorColorFG);
       g.setXORMode(cursorColorBG);
-      g.fillRect( cursorX * charWidth + xoffset, 
+      g.fillRect(cursorX * charWidth + xoffset,
                  (cursorY + screenBase - windowBase) * charHeight + yoffset,
                  charWidth, charHeight);
       g.setPaintMode();
@@ -1127,10 +1141,11 @@ public class VDU extends Component 
     // draw border
     if(insets != null) {
       g.setColor(getBackground());
-      xoffset--; yoffset--;
+      xoffset--;
+      yoffset--;
       for(int i = insets.top - 1; i >= 0; i--)
         g.draw3DRect(xoffset - i, yoffset - i,
-                     charWidth * size.width + 1 + i * 2, 
+                     charWidth * size.width + 1 + i * 2,
                      charHeight * size.height + 1 + i * 2,
                      raised);
     }
@@ -1159,7 +1174,7 @@ public class VDU extends Component 
     }
 
     if(debug > 1)
-      System.err.println("Clip region: "+g.getClipBounds());
+      System.err.println("Clip region: " + g.getClipBounds());
 
     g.drawImage(backingStore, 0, 0, this);
   }
@@ -1176,7 +1191,7 @@ public class VDU extends Component 
 
   /**
    * Set default for printing black&amp;white or colorized as displayed on
-   * screen. 
+   * screen.
    * @param name colorPrint true = print in full color, default b&amp;w only
    */
   public void setColorPrinting(boolean colorPrint) {
@@ -1193,15 +1208,17 @@ public class VDU extends Component 
       setForeground(Color.black);
       setBackground(Color.white);
       colorSave = color;
-      color = new Color[] { Color.black, 
-                            Color.black, 
-			    Color.black,
-			    Color.black,
-			    Color.black,
-			    Color.black,
-			    Color.black,
-			    Color.white
-			  };
+      color = new Color[]{Color.black,
+                          Color.black,
+                          Color.black,
+                          Color.black,
+                          Color.black,
+                          Color.black,
+                          Color.black,
+                          Color.white,
+                          null,
+                          null,
+      };
     }
 
     redraw(g);
@@ -1224,11 +1241,10 @@ public class VDU extends Component 
    * @param the mouse point to be converted
    * @return Character cell coordinate of passed point
    */
-  public Point mouseGetPos(Point evtpt)
-  {
+  public Point mouseGetPos(Point evtpt) {
     Point mousepos;
 
-    mousepos = new Point(0,0);
+    mousepos = new Point(0, 0);
 
     int xoffset = (super.getSize().width - size.width * charWidth) / 2;
     int yoffset = (super.getSize().height - size.height * charHeight) / 2;
@@ -1249,34 +1265,37 @@ public class VDU extends Component 
    * @param fg foreground color or null
    * @param bg background color or null
    */
-  public void setCursorColors(Color fg, Color bg)
-  {
-    if (fg == null) cursorColorFG = color[COLOR_FG_STD];
-    else cursorColorFG = fg;
-    if (bg == null) cursorColorBG = color[COLOR_BG_STD];
-    else cursorColorBG = bg;
+  public void setCursorColors(Color fg, Color bg) {
+    if(fg == null)
+      cursorColorFG = color[COLOR_FG_STD];
+    else
+      cursorColorFG = fg;
+    if(bg == null)
+      cursorColorBG = color[COLOR_BG_STD];
+    else
+      cursorColorBG = bg;
     repaint();
   }
-          
+
   /**
    * Reshape character display according to resize strategy.
    * @see #setResizeStrategy
    */
   public void setBounds(int x, int y, int w, int h) {
     if(debug > 0)
-      System.err.println("VDU: setBounds("+x+","+y+","+w+","+h+")");
+      System.err.println("VDU: setBounds(" + x + "," + y + "," + w + "," + h + ")");
 
     super.setBounds(x, y, w, h);
 
     int xborder = 0, yborder = 0;
-    
+
     if(insets != null) {
       w -= (xborder = insets.left + insets.right);
       h -= (yborder = insets.top + insets.bottom);
     }
 
     if(debug > 0)
-      System.err.println("VDU: looking for better match for "+normalFont);
+      System.err.println("VDU: looking for better match for " + normalFont);
 
     Font tmpFont = normalFont;
     String fontName = tmpFont.getName();
@@ -1286,55 +1305,55 @@ public class VDU extends Component 
       charWidth = fm.charWidth('@');
       charHeight = fm.getHeight();
     }
-    
+
     switch(resizeStrategy) {
-    case RESIZE_SCREEN:
-      setScreenSize(w / charWidth, size.height = h / charHeight);
-      break;
-    case RESIZE_FONT:
-      int height = h / size.height;
-      int width = w / size.width;
-      
-      fm = getFontMetrics(normalFont = new Font(fontName, fontStyle,
-                                                charHeight));
-      
-      // adapt current font size (from small up to best fit)
-      if(fm.getHeight() < height || fm.charWidth('@') < width)
-        do {
-          fm = getFontMetrics(normalFont = new Font(fontName, fontStyle,
-	                                            ++charHeight));
-        } while(fm.getHeight() < height || fm.charWidth('@') < width); 
-      
-      // now check if we got a font that is too large
-      if(fm.getHeight() > height || fm.charWidth('@') > width)
-        do {
-          fm = getFontMetrics(normalFont = new Font(fontName, fontStyle,
-	                                            --charHeight));
-        } while(charHeight > 1 && 
-                (fm.getHeight() > height || 
-                 fm.charWidth('@') > width));
-      
-      if(charHeight <= 1) {
-        System.err.println("VDU: error during resize, resetting");
-        normalFont = tmpFont;
-        System.err.println("VDU: disabling font/screen resize");
-        resizeStrategy = RESIZE_NONE;
-      }
+      case RESIZE_SCREEN:
+        setScreenSize(w / charWidth, size.height = h / charHeight);
+        break;
+      case RESIZE_FONT:
+        int height = h / size.height;
+        int width = w / size.width;
 
-      setFont(normalFont);
-      fm = getFontMetrics(normalFont);
-      charWidth = fm.charWidth('@');
-      charHeight = fm.getHeight();
-      charDescent = fm.getDescent();
-      break;
-    case RESIZE_NONE:
-    default:
-      break;
+        fm = getFontMetrics(normalFont = new Font(fontName, fontStyle,
+                                                  charHeight));
+
+        // adapt current font size (from small up to best fit)
+        if(fm.getHeight() < height || fm.charWidth('@') < width)
+          do {
+            fm = getFontMetrics(normalFont = new Font(fontName, fontStyle,
+                                                      ++charHeight));
+          } while(fm.getHeight() < height || fm.charWidth('@') < width);
+
+        // now check if we got a font that is too large
+        if(fm.getHeight() > height || fm.charWidth('@') > width)
+          do {
+            fm = getFontMetrics(normalFont = new Font(fontName, fontStyle,
+                                                      --charHeight));
+          } while(charHeight > 1 &&
+            (fm.getHeight() > height ||
+            fm.charWidth('@') > width));
+
+        if(charHeight <= 1) {
+          System.err.println("VDU: error during resize, resetting");
+          normalFont = tmpFont;
+          System.err.println("VDU: disabling font/screen resize");
+          resizeStrategy = RESIZE_NONE;
+        }
+
+        setFont(normalFont);
+        fm = getFontMetrics(normalFont);
+        charWidth = fm.charWidth('@');
+        charHeight = fm.getHeight();
+        charDescent = fm.getDescent();
+        break;
+      case RESIZE_NONE:
+      default:
+        break;
     }
     if(debug > 0) {
-      System.err.println("VDU: charWidth="+charWidth+", "+
-                              "charHeight="+charHeight+", "+
-                              "charDescent="+charDescent);
+      System.err.println("VDU: charWidth=" + charWidth + ", " +
+                         "charHeight=" + charHeight + ", " +
+                         "charDescent=" + charDescent);
     }
 
     // delete the double buffer image and mark all lines
@@ -1353,7 +1372,7 @@ public class VDU extends Component 
       xborder = insets.left + insets.right;
       yborder = insets.top + insets.bottom;
     }
-    return new Dimension(size.width * charWidth + xborder, 
+    return new Dimension(size.width * charWidth + xborder,
                          size.height * charHeight + yborder);
   }
 
@@ -1376,8 +1395,8 @@ public class VDU extends Component 
   }
 
   public void clearSelection() {
-    selectBegin = new Point(0,0);
-    selectEnd = new Point(0,0); 
+    selectBegin = new Point(0, 0);
+    selectEnd = new Point(0, 0);
     selection = null;
   }
 
@@ -1395,8 +1414,8 @@ public class VDU extends Component 
 
   public void mouseDragged(MouseEvent evt) {
     if(buttonCheck(evt.getModifiers(), MouseEvent.BUTTON1_MASK) ||
-       // Windows NT/95 etc: returns 0, which is a bug
-       evt.getModifiers() == 0) {
+      // Windows NT/95 etc: returns 0, which is a bug
+      evt.getModifiers() == 0) {
       int xoffset = (super.getSize().width - size.width * charWidth) / 2;
       int yoffset = (super.getSize().height - size.height * charHeight) / 2;
       int x = (evt.getX() - xoffset) / charWidth;
@@ -1410,12 +1429,12 @@ public class VDU extends Component 
         selectEnd.x = x;
         selectEnd.y = y;
       }
-      
+
       if(oldx != x || oldy != y) {
-	update[0] = true;
-	if(debug > 0)
-	  System.err.println("select(["+selectBegin.x+","+selectBegin.y+"],"+
-	                            "["+selectEnd.x+","+selectEnd.y+"])");
+        update[0] = true;
+        if(debug > 0)
+          System.err.println("select([" + selectBegin.x + "," + selectBegin.y + "]," +
+                             "[" + selectEnd.x + "," + selectEnd.y + "])");
         redraw();
       }
     }
@@ -1462,10 +1481,10 @@ public class VDU extends Component 
       int xoffset = (super.getSize().width - size.width * charWidth) / 2;
       int yoffset = (super.getSize().height - size.height * charHeight) / 2;
       mouseDragged(evt);
-  
+
       if(selectBegin.x == selectEnd.x &&
-         selectBegin.y == selectEnd.y) {
-	update[0] = true;
+        selectBegin.y == selectEnd.y) {
+        update[0] = true;
         redraw();
         return;
       }
@@ -1474,21 +1493,21 @@ public class VDU extends Component 
       if(selectEnd.x < 0) selectEnd.x = 0;
       if(selectEnd.y < 0) selectEnd.y = 0;
       if(selectEnd.y >= charArray.length)
-        selectEnd.y = charArray.length-1;
+        selectEnd.y = charArray.length - 1;
       if(selectEnd.x > charArray[0].length)
         selectEnd.x = charArray[0].length;
 
       for(int l = selectBegin.y; l <= selectEnd.y; l++) {
         int start, end;
-	start = (l == selectBegin.y ? start = selectBegin.x : 0);
-	end = (l == selectEnd.y ? end = selectEnd.x : charArray[l].length );
-	// Trim all spaces from end of line, like xterm does.
-	selection += ("-" + (new String(charArray[l])).substring(start,end)).trim().substring(1);
-	if(end == charArray[l].length)
-	  selection += "\n";
+        start = (l == selectBegin.y ? start = selectBegin.x : 0);
+        end = (l == selectEnd.y ? end = selectEnd.x : charArray[l].length);
+        // Trim all spaces from end of line, like xterm does.
+        selection += ("-" + (new String(charArray[l])).substring(start, end)).trim().substring(1);
+        if(end == charArray[l].length)
+          selection += "\n";
       }
     }
-  } 
+  }
 
   // lightweight component event handling
 
@@ -1514,14 +1533,14 @@ public class VDU extends Component 
   }
 
   private MouseMotionListener mouseMotionListener;
- 
+
   /**
    * Add a mouse motion listener to the VDU. This is the implementation for
    * the lightweight event handling.
    * @param listener the mouse motion listener
    */
   public void addMouseMotionListener(MouseMotionListener listener) {
-    mouseMotionListener = AWTEventMulticaster.add(mouseMotionListener,listener);
+    mouseMotionListener = AWTEventMulticaster.add(mouseMotionListener, listener);
     enableEvents(AWTEvent.MOUSE_EVENT_MASK);
   }
 
@@ -1531,12 +1550,12 @@ public class VDU extends Component 
    * @param listener the mouse motion listener to remove
    */
   public void removeMouseMotionListener(MouseMotionListener listener) {
-    mouseMotionListener = 
+    mouseMotionListener =
       AWTEventMulticaster.remove(mouseMotionListener, listener);
   }
 
   /**
-   * Process mouse events for this component. It will call the 
+   * Process mouse events for this component. It will call the
    * methods (mouseClicked() etc) in the added mouse listeners.
    * @param evt the dispatched mouse event
    */
@@ -1545,36 +1564,43 @@ public class VDU extends Component 
     if(mouseListener != null)
       switch(evt.getID()) {
         case MouseEvent.MOUSE_CLICKED:
-          mouseListener.mouseClicked(evt); break;
+          mouseListener.mouseClicked(evt);
+          break;
         case MouseEvent.MOUSE_ENTERED:
-          mouseListener.mouseEntered(evt); break;
+          mouseListener.mouseEntered(evt);
+          break;
         case MouseEvent.MOUSE_EXITED:
-          mouseListener.mouseExited(evt); break;
+          mouseListener.mouseExited(evt);
+          break;
         case MouseEvent.MOUSE_PRESSED:
-          mouseListener.mousePressed(evt); break;
+          mouseListener.mousePressed(evt);
+          break;
         case MouseEvent.MOUSE_RELEASED:
-          mouseListener.mouseReleased(evt); break;
+          mouseListener.mouseReleased(evt);
+          break;
       }
-     super.processMouseEvent(evt);
-   }
+    super.processMouseEvent(evt);
+  }
 
   /**
-   * Process mouse motion events for this component. It will call the 
+   * Process mouse motion events for this component. It will call the
    * methods (mouseDragged() etc) in the added mouse motion listeners.
    * @param evt the dispatched mouse event
    */
-   public void processMouseMotionEvent(MouseEvent evt) {
+  public void processMouseMotionEvent(MouseEvent evt) {
     // handle mouse motion events
     if(mouseMotionListener != null)
       switch(evt.getID()) {
         case MouseEvent.MOUSE_DRAGGED:
-          mouseMotionListener.mouseDragged(evt); break;
+          mouseMotionListener.mouseDragged(evt);
+          break;
         case MouseEvent.MOUSE_MOVED:
-          mouseMotionListener.mouseMoved(evt); break;
+          mouseMotionListener.mouseMoved(evt);
+          break;
       }
     super.processMouseMotionEvent(evt);
   }
-    
+
   private KeyListener keyListener;
 
   /**
@@ -1602,14 +1628,17 @@ public class VDU extends Component 
    * @param evt the dispatched key event
    */
   public void processKeyEvent(KeyEvent evt) {
-    if(keyListener != null) 
+    if(keyListener != null)
       switch(evt.getID()) {
         case KeyEvent.KEY_PRESSED:
-	  keyListener.keyPressed(evt); break;
+          keyListener.keyPressed(evt);
+          break;
         case KeyEvent.KEY_RELEASED:
-	  keyListener.keyReleased(evt); break;
+          keyListener.keyReleased(evt);
+          break;
         case KeyEvent.KEY_TYPED:
-	  keyListener.keyTyped(evt); break;
+          keyListener.keyTyped(evt);
+          break;
       }
     // consume TAB keys if they originate from our component
     if(evt.getKeyCode() == KeyEvent.VK_TAB && evt.getSource() == this)
@@ -1631,9 +1660,11 @@ public class VDU extends Component 
     if(focusListener != null)
       switch(evt.getID()) {
         case FocusEvent.FOCUS_GAINED:
-	  focusListener.focusGained(evt); break;
-	case FocusEvent.FOCUS_LOST:
-	  focusListener.focusLost(evt); break;
+          focusListener.focusGained(evt);
+          break;
+        case FocusEvent.FOCUS_LOST:
+          focusListener.focusLost(evt);
+          break;
       }
     super.processFocusEvent(evt);
   }
blob - 5e59df002d1b446409ec595fc4954298134feb12
blob + 6bd89130c41a34209b511e14f35bd718a1ef2bb6
--- doc/plugins/Terminal.html
+++ doc/plugins/Terminal.html
@@ -1,621 +1,566 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
 <html>
 <head>
-   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-   <meta name="Author" content="Matthias L. Jugel, Marcus Meissner">
-   <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD Caldera Systems OpenLinux [en] (X11; U; Linux 2.4.13-ac7 i686) [Netscape]">
-   <meta name="Description" content="Java Telnet Applet is a fully features Telnet and Terminal Emulation implementation for Java.">
-   <meta name="Keywords" content="java telnet applet application bbs terminal emulation">
-   <title>The Java Telnet Application/Applet v2.0: Script Plugin</title>
+    
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    
+  <meta name="Author" content="Matthias L. Jugel, Marcus Meissner">
+    
+  <meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD Caldera Systems OpenLinux [en] (X11; U; Linux 2.4.13-ac7 i686) [Netscape]">
+    
+  <meta name="Description" content="Java Telnet Applet is a fully features Telnet and Terminal Emulation implementation for Java.">
+    
+  <meta name="Keywords" content="java telnet applet application bbs terminal emulation">
+  <title>The Java Telnet Application/Applet v2.0: Script Plugin</title>
 </head>
-<body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000">
-&nbsp;
-<center><table BORDER=0 CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" HEIGHT="20%" BGCOLOR="#000000" NOSAVE >
-<tr NOSAVE>
-<td ALIGN=RIGHT VALIGN=BOTTOM NOSAVE>
-<table BORDER=0 CELLPADDING=5 COLS=5 WIDTH="100%" HEIGHT="100%" BGCOLOR="#FFFFFF" NOSAVE >
-<tr NOSAVE>
-<td ALIGN=RIGHT VALIGN=BOTTOM COLSPAN="5" NOSAVE>
-<div ALIGN=right>
-<h1>
-<font face="Arial,Helvetica"><font color="#000099">The Java<sup><font size=-2>tm</font></sup>
-Telnet Application/Applet: Terminal Plugin</font></font></h1></div>
-<i>&copy; 1996-2000 <a href="mailto:leo@mud.de">Matthias L. Jugel </a>and
-<a href="mailto:marcus@mud.de">Marcus
-Mei&szlig;ner</a></i>
-<p><b>Version 2.0 / Java 2 and 1.1.x</b>
-<br>Available under <a href="../../license/COPYING">GNU General Public
-License</a></td>
-</tr>
-
-<tr ALIGN=CENTER VALIGN=CENTER NOSAVE>
-<td NOSAVE><b><font face="Arial,Helvetica"><a href="../../index.html">Homepage</a></font></b></td>
-
-<td><b><font face="Arial,Helvetica"><a href="../../html/index.html">Applet
+  <body text="#000000" bgcolor="#ffffff" link="#0000ef" vlink="#51188e" alink="#ff0000">
+ &nbsp; 
+<center>
+<table border="0" cellspacing="0" cellpadding="5" cols="1" width="100%" height="20%" bgcolor="#000000" nosave="">
+ <tbody>
+    <tr nosave="">
+ <td align="Right" valign="Bottom" nosave=""> 
+      <table border="0" cellpadding="5" cols="5" width="100%" height="100%" bgcolor="#ffffff" nosave="">
+ <tbody>
+          <tr nosave="">
+ <td align="Right" valign="Bottom" colspan="5" nosave=""> 
+            <div align="Right"> 
+            <h1> <font face="Arial,Helvetica"><font color="#000099">The Java<sup><font size="-2">
+tm</font></sup> Telnet Application/Applet: Terminal Plugin</font></font></h1>
+            </div>
+ <i>&copy; 1996-2000 <a href="mailto:leo@mud.de">Matthias L. Jugel </a>and 
+            <a href="mailto:marcus@mud.de">Marcus Mei&szlig;ner</a></i> 
+            <p><b>Version 2.0 / Java 2 and 1.1.x</b> <br>
+Available under <a href="../../license/COPYING">GNU General Public License</a></p>
+            </td>
+ </tr>
+  <tr align="Center" valign="CENTER" nosave="">
+ <td nosave=""><b><font face="Arial,Helvetica"><a href="../../index.html">
+Homepage</a></font></b></td>
+  <td><b><font face="Arial,Helvetica"><a href="../../html/index.html">Applet 
 Test</a></font></b></td>
-
-<td><b><font face="Arial,Helvetica"><a href="../../html/download.html">Download</a></font></b></td>
-
-<td><b><i><font face="Arial,Helvetica"><a href="../index.html">Documentation</a></font></i></b></td>
-
-<td><b><font face="Arial,Helvetica"><a href="../../html/users.html">Users
+  <td><b><font face="Arial,Helvetica"><a href="../../html/download.html">
+Download</a></font></b></td>
+  <td><b><i><font face="Arial,Helvetica"><a href="../index.html">Documentation</a></font></i></b></td>
+  <td><b><font face="Arial,Helvetica"><a href="../../html/users.html">Users 
 / Opinions</a></font></b></td>
-</tr>
+ </tr>
+ 
+        </tbody>
+      </table>
+ </td>
+ </tr>
+ 
+  </tbody>
 </table>
-</td>
-</tr>
-</table></center>
-
-<table BORDER=0 CELLSPACING=5 CELLPADDING=5 COLS=2 WIDTH="100%" NOSAVE >
-<tr NOSAVE>
-<td ALIGN=LEFT VALIGN=TOP WIDTH="70%" BGCOLOR="#FFFFFF" NOSAVE>
-<center>
-<h2>
-<font color="#CC0000">Terminal (ANSI/vt320) Plugin</font></h2></center>
-The terminal plugin is a visual software component that acts as the front
-end. It displays the data that is transmitted by the remote host and translates
-keystrokes to be sent to the remote host. It implements an <b>ANSI</b>,
-<b>vt320/vt220/vt100</b>
-and <b>SCOANSI</b> compliant terminal.
-<p>Most of the features of the terminal emulation can be configured using
-the properties explained below. Additionally it provides a plugin menu
-that can be operated if a menu bar is available.
-<p>You can configure the plugin using the following properties:
-<br>&nbsp;
-<center><table BORDER=0 CELLSPACING=3 CELLPADDING=3 COLS=2 WIDTH="100%" BGCOLOR="#CCCCCC" NOSAVE >
-<tr ALIGN=CENTER VALIGN=CENTER BGCOLOR="#000000" NOSAVE>
-<td NOSAVE><b><font face="Arial,Helvetica"><font color="#FFFFFF">Property</font></font></b></td>
-
-<td><b><font face="Arial,Helvetica"><font color="#FFFFFF">Documentation</font></font></b></td>
-</tr>
-
-<tr NOSAVE>
-<td COLSPAN="2" BGCOLOR="#999999" NOSAVE>
-<center><b><font face="Arial,Helvetica"><font color="#FFFFFF">General Properties</font></font></b></center>
-</td>
-</tr>
-
-<tr NOSAVE>
-<td NOSAVE><tt>Terminal.foreground</tt></td>
-
-<td>Set the foreground color of the terminal. You can use 24 but hexadecimal
-values:
-<br><b><tt>#ffffff</tt></b> is white and <b><tt>#000000</tt></b> is black.
-This is just like the encoding you use in HTML.</td>
-</tr>
-
-<tr NOSAVE>
-<td NOSAVE><tt>Terminal.background</tt></td>
-
-<td>Set the background color of the terminal. You can use 24 but hexadecimal
-values:
-<br><b><tt>#ffffff</tt></b> is white and <b><tt>#000000</tt></b> is black.
-This is just like the encoding you use in HTML.</td>
-</tr>
-
-<tr NOSAVE>
-<td><tt>Terminal.cursor.foreground</tt></td>
-
-<td ALIGN=LEFT VALIGN=TOP NOSAVE>Set the cursor foreground color. If unset
-this is the inverted current foreground.</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.cursor.background</tt></td>
-
-<td>Set the cursor background color. If unset this is the inverted current
+</center>
+  
+<table border="0" cellspacing="5" cellpadding="5" cols="2" width="100%" nosave="">
+ <tbody>
+    <tr nosave="">
+ <td align="Left" valign="Top" width="70%" bgcolor="#ffffff" nosave=""> 
+      <center> 
+      <h2> <font color="#cc0000">Terminal (ANSI/vt320) Plugin</font></h2>
+      </center>
+ The terminal plugin is a visual software component that acts as the front 
+end. It displays the data that is transmitted by the remote host and translates 
+keystrokes to be sent to the remote host. It implements an <b>ANSI</b>, <b>
+vt320/vt220/vt100</b> and <b>SCOANSI</b> compliant terminal. 
+      <p>Most of the features of the terminal emulation can be configured
+using the properties explained below. Additionally it provides a plugin menu 
+that can be operated if a menu bar is available. </p>
+      <p>You can configure the plugin using the following properties: <br>
+&nbsp; </p>
+      <center>
+      <table border="0" cellspacing="3" cellpadding="3" cols="2" width="100%" bgcolor="#cccccc" nosave="">
+ <tbody>
+          <tr align="Center" valign="CENTER" bgcolor="#000000" nosave="">
+ <td nosave=""><b><font face="Arial,Helvetica"><font color="#ffffff">Property</font></font></b></td>
+  <td><b><font face="Arial,Helvetica"><font color="#ffffff">Documentation</font></font></b></td>
+ </tr>
+  <tr nosave="">
+ <td colspan="2" bgcolor="#999999" nosave=""> 
+            <center><b><font face="Arial,Helvetica"><font color="#ffffff">
+General Properties</font></font></b></center>
+ </td>
+ </tr>
+  <tr nosave="">
+ <td nosave=""><tt>Terminal.foreground</tt></td>
+  <td>Set the foreground color of the terminal. You can use 24 but hexadecimal 
+values: <br>
+            <b><tt>#ffffff</tt></b> is white and <b><tt>#000000</tt></b>
+is black. This is just like the encoding you use in HTML.</td>
+ </tr>
+  <tr nosave="">
+ <td nosave=""><tt>Terminal.background</tt></td>
+  <td>Set the background color of the terminal. You can use 24 but hexadecimal 
+values: <br>
+            <b><tt>#ffffff</tt></b> is white and <b><tt>#000000</tt></b>
+is black. This is just like the encoding you use in HTML.</td>
+ </tr>
+  <tr nosave="">
+ <td><tt>Terminal.cursor.foreground</tt></td>
+  <td align="Left" valign="Top" nosave="">Set the cursor foreground color.
+If unset this is the inverted current foreground.</td>
+ </tr>
+  <tr>
+ <td><tt>Terminal.cursor.background</tt></td>
+  <td>Set the cursor background color. If unset this is the inverted current 
 background.</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.localecho</tt></td>
-
-<td>While both SSH and Telnet client part detect localechostate automatically,
-it can be overridden using this option. This is only recommended if you
-really need it.
-<br>Set to <b>true</b> for always localecho and <b>false</b> for never.</td>
-</tr>
-
-<tr>
-<td><tt>&nbsp;Terminal.print.color</tt></td>
-
-<td>Set to <b><tt>true</tt></b> to print the terminal in full color. The
-default setting <b><tt>false</tt></b> will force the Terminal to print
-black &amp; white only.</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.colorSet</tt></td>
-
-<td>Use this property to define a complete color set for the terminal.
-A color set contains eight colors as defined by the ANSI standard.
-<p>The colorset should be in a file that is referenced by this property
-as either a file name relative to the jar file or a complete URL.
-<p>The default value is <i>/de/mud/terminal/colorSet.conf</i>.
-<p>The file contains a line for each color:
-<p><tt>color0 = color</tt>
-<br><tt>color1 = color</tt>
-<br><tt>...</tt>
-<br><tt>color7 = color</tt>
-<p><tt>color</tt> can be either a name or a number similar to the foreground
-and background above.</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.border</tt></td>
-
-<td>Declare the size of the border that will sourround the terminal.</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.borderRaised</tt></td>
-
-<td>This property has no effect if <tt>Terminal.border</tt> is not set
-or zero. It may be set to "<b><tt>true</tt></b>" or "<b><tt>false</tt></b>".</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.scrollBar</tt></td>
-
-<td>Adds a scroll bar to the terminal using the direction set in the property.
-Possible directions are "<b><tt>East</tt></b>" and "<b><tt>West</tt></b>".
+ </tr>
+  <tr>
+ <td><tt>Terminal.localecho</tt></td>
+  <td>While both SSH and Telnet client part detect localechostate automatically, 
+it can be overridden using this option. This is only recommended if you really
+need it. <br>
+Set to <b>true</b> for always localecho and <b>false</b> for never.</td>
+ </tr>
+  <tr>
+ <td><tt>&nbsp;Terminal.print.color</tt></td>
+  <td>Set to <b><tt>true</tt></b> to print the terminal in full color. The 
+default setting <b><tt>false</tt></b> will force the Terminal to print black
+&amp; white only.</td>
+ </tr>
+  <tr>
+ <td><tt>Terminal.colorSet</tt></td>
+  <td>Use this property to define a complete color set for the terminal. A
+color set contains eight colors as defined by the ANSI standard. 
+            <p>The colorset should be in a file that is referenced by this
+property as either a file name relative to the jar file or a complete URL. 
+            </p>
+            <p>The default value is <i>/de/mud/terminal/colorSet.conf</i>
+. </p>
+            <p>The file contains a line for each color: </p>
+            <p><tt>color0 = color</tt> <br>
+            <tt>color1 = color</tt> <br>
+            <tt>...</tt> <br>
+            <tt>color7 = color<br>
+bold = color<br>
+invert = color<br>
+            </tt> </p>
+            <p><tt>color</tt> can be either a name or a number similar to
+the foreground and background above. The keywords bold and invert will set
+a color instead of the actual attribute for display. Bold text will be displayed
+using the color and inverted text will show up with a background color that
+is set.</p>
+            </td>
+ </tr>
+  <tr>
+ <td><tt>Terminal.border</tt></td>
+  <td>Declare the size of the border that will sourround the terminal.</td>
+ </tr>
+  <tr>
+ <td><tt>Terminal.borderRaised</tt></td>
+  <td>This property has no effect if <tt>Terminal.border</tt> is not set or
+zero. It may be set to "<b><tt>true</tt></b>" or "<b><tt>false</tt></b>".</td>
+ </tr>
+  <tr>
+ <td><tt>Terminal.scrollBar</tt></td>
+  <td>Adds a scroll bar to the terminal using the direction set in the property. 
+Possible directions are "<b><tt>East</tt></b>" and "<b><tt>West</tt></b>". 
 Using a "<b><tt>none</tt></b>" removes the scrollbar completely.</td>
-</tr>
-
-<tr NOSAVE>
-<td><tt>Terminal.beep</tt></td>
-
-<td ALIGN=LEFT VALIGN=TOP NOSAVE>If this property points to a fully qualified
-URL of a sound file this will be played in case of a terminal <b>bell</b>
-signal. This works for applets only.
-<br>Note: Some browsers (Netscape 4, IE 5.5 or earlier) sometimes can only
-play .au files here. In IE the sound needs to be on the same server as
-the applet or you get a security exception.</td>
-</tr>
-
-<tr NOSAVE>
-<td COLSPAN="2" BGCOLOR="#999999" NOSAVE>
-<center><b><font face="Arial,Helvetica"><font color="#FFFFFF">Terminal
-Emulation Properties</font></font></b></center>
-</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.id</tt></td>
-
-<td>Used to identify the type of the terminal. This is the string that
-is sent to the remote host. Default is "<b>vt320</b>" but you may use any
-string, like "<tt>vt100</tt>", "<tt>vt220</tt>" or "<tt>xterm</tt>" if
-it suits you.
-<p>If you change it to <b>scoansi</b>, it will change the linedrawing characters
-to match the <b>scoansi</b> ones.</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.answerback</tt></td>
-
-<td>The string the terminal sents back when it gets an 'ENQ' code. You
-can set it to anything you want or what your local environment requires.
-(The default is just a pointer to this config option.)</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.buffer</tt></td>
-
-<td>This sets the size of the scroll back buffer the terminal uses. The
-buffer is allocated dynamically until it reaches this size. You cannot
-set the scrollback buffer to a value smaller than the amount of lines on
-the screen.</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.size</tt></td>
-
-<td>Set the size of the terminal in terms of rows and lines. The value
-has to be given in the following format:
-<blockquote><b><tt>[</tt></b>width<b><tt>,</tt></b><i>height</i><b><tt>]</tt></b></blockquote>
-Whitespaces are allowed within the brackets and just before and after the
+ </tr>
+  <tr nosave="">
+ <td><tt>Terminal.beep</tt></td>
+  <td align="Left" valign="Top" nosave="">If this property points to a fully
+qualified URL of a sound file this will be played in case of a terminal <b>
+bell</b> signal. This works for applets only. <br>
+Note: Some browsers (Netscape 4, IE 5.5 or earlier) sometimes can only play
+.au files here. In IE the sound needs to be on the same server as the applet
+or you get a security exception.</td>
+ </tr>
+  <tr nosave="">
+ <td colspan="2" bgcolor="#999999" nosave=""> 
+            <center><b><font face="Arial,Helvetica"><font color="#ffffff">
+Terminal Emulation Properties</font></font></b></center>
+ </td>
+ </tr>
+  <tr>
+ <td><tt>Terminal.id</tt></td>
+  <td>Used to identify the type of the terminal. This is the string that is
+sent to the remote host. Default is "<b>vt320</b>" but you may use any string,
+like "<tt>vt100</tt>", "<tt>vt220</tt>" or "<tt>xterm</tt>" if it suits you. 
+            <p>If you change it to <b>scoansi</b>, it will change the linedrawing
+characters to match the <b>scoansi</b> ones.</p>
+            </td>
+ </tr>
+  <tr>
+ <td><tt>Terminal.answerback</tt></td>
+  <td>The string the terminal sents back when it gets an 'ENQ' code. You can
+set it to anything you want or what your local environment requires. (The
+default is just a pointer to this config option.)</td>
+ </tr>
+  <tr>
+ <td><tt>Terminal.buffer</tt></td>
+  <td>This sets the size of the scroll back buffer the terminal uses. The 
+buffer is allocated dynamically until it reaches this size. You cannot set
+the scrollback buffer to a value smaller than the amount of lines on the
+screen.</td>
+ </tr>
+  <tr>
+ <td><tt>Terminal.size</tt></td>
+  <td>Set the size of the terminal in terms of rows and lines. The value has
+to be given in the following format: 
+            <blockquote><b><tt>[</tt></b>width<b><tt>,</tt></b><i>height</i><b><tt>
+]</tt></b></blockquote>
+ Whitespaces are allowed within the brackets and just before and after the 
 comma. The standard is "<b><tt>[80,24]</tt></b>"</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.resize</tt></td>
-
-<td>This property defines the method that is applied when the terminal
-window is resized. It may be either "<b><tt>font</tt></b>" - to resize
-the font to match the window size or "<b><tt>screen</tt></b>" - to change
-the amount of lines and columns displayed or "<b><tt>none</tt></b>" - to
-do nothing.</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.font</tt></td>
-
-<td>Tells the terminal which font to use for the display of characters.
-This is usually "<b><tt>Monospaced</tt></b>" as any other font name might
+ </tr>
+  <tr>
+ <td><tt>Terminal.resize</tt></td>
+  <td>This property defines the method that is applied when the terminal window
+is resized. It may be either "<b><tt>font</tt></b>" - to resize the font
+to match the window size or "<b><tt>screen</tt></b>" - to change the amount
+of lines and columns displayed or "<b><tt>none</tt></b>" - to do nothing.</td>
+ </tr>
+  <tr>
+ <td><tt>Terminal.font</tt></td>
+  <td>Tells the terminal which font to use for the display of characters. 
+This is usually "<b><tt>Monospaced</tt></b>" as any other font name might 
 not be available on the client host.</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.fontStyle</tt></td>
-
-<td>The font style to be used when looking up the font. The font style
-may be "<b><tt>plain</tt></b>", "<b><tt>bold</tt></b>" or "<b><tt>italic</tt></b>".
-The default is "<tt>plain</tt>".</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.fontSize</tt></td>
-
-<td>The size of the font to be used. If you use automatic font resize this
+ </tr>
+  <tr>
+ <td><tt>Terminal.fontStyle</tt></td>
+  <td>The font style to be used when looking up the font. The font style may
+be "<b><tt>plain</tt></b>", "<b><tt>bold</tt></b>" or "<b><tt>italic</tt></b>
+". The default is "<tt>plain</tt>".</td>
+ </tr>
+  <tr>
+ <td><tt>Terminal.fontSize</tt></td>
+  <td>The size of the font to be used. If you use automatic font resize this 
 will be used as the initial font size.</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.keyCodes</tt></td>
-
-<td>This should be set to the URL of a property file that contains the
-key codes&nbsp; you would like to use. The file is first tried using the
-resource loading mechanism, which looks in the CLASSPATH and then as a
-URL. Have a look at the file format for the <a href="#KEYCODES">key codes
-definition</a>.</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.VMS</tt></td>
-
-<td>Set this property to "<b><tt>true</tt></b>" if you are connecting to
+ </tr>
+  <tr>
+ <td><tt>Terminal.keyCodes</tt></td>
+  <td>This should be set to the URL of a property file that contains the key
+codes&nbsp; you would like to use. The file is first tried using the resource
+loading mechanism, which looks in the CLASSPATH and then as a URL. Have a
+look at the file format for the <a href="#KEYCODES">key codes definition</a>
+.</td>
+ </tr>
+  <tr>
+ <td><tt>Terminal.VMS</tt></td>
+  <td>Set this property to "<b><tt>true</tt></b>" if you are connecting to 
 a VMS system.</td>
-</tr>
-
-<tr>
-<td><tt>Terminal.IBM</tt></td>
-
-<td>Set this to "<b><tt>true</tt></b>" if you would like to use PC ANSI
+ </tr>
+  <tr>
+ <td><tt>Terminal.IBM</tt></td>
+  <td>Set this to "<b><tt>true</tt></b>" if you would like to use PC ANSI 
 graphics characters as used by some BBS's.</td>
-</tr>
-
-<tr>
-<td>Terminal.encoding</td>
-
-<td>Use this property if you have real UNICODE fonts installed on your
-system or at least fonts that include the characters you would like to
-display. The default setting it <b>ISO8859_1</b> but it may be used to
-make the terminal aware of special characters like in the japanese (i.e.
-<b>SJIS</b>)
-or chinese region.</td>
-</tr>
-</table></center>
-
-<h3>
-<a NAME="KEYCODES"></a><font color="#CC0000">Definition of Key Codes</font></h3>
-<font color="#000000">The definition of key codes should only be done if
-your application uses a very different keyboard layout than the standard
-vt320. The definition of almost all special keys is possible and follows
-rules described below:</font>
-<blockquote><tt><font color="#000000"># here is the rule</font></tt>
-<br><tt><font color="#000000">[<b>SCA</b>]</font></tt><font color="#000000"><i>KEY</i><b><tt>=</tt></b><i>STRING</i></font></blockquote>
-<font color="#000000">The characters enclosed in <tt>[</tt> and <tt>]</tt>
-are optional and only one of the characters '<b><tt>S</tt></b>' (Shift),
-'<b><tt>C</tt></b>' (Control) or '<b><tt>A</tt></b>' (Alt) may appear before
-the <i>KEY</i>, which is a textual representation (F1, PGUP etc) of the
-key you would like to redefine.</font>
-<p><font color="#000000">The new <i>STRING</i> you define to be sent when
-pressing the key should come after the equal sign (<b><tt>=</tt></b>).
-Hash marks (<tt>#</tt>) in the file declare a line as comment and will
-be ignored. Some examples explain the syntax:</font>
-<br>&nbsp;
-<dt>
-<font color="#000000">Send the string "test" when pressing the <tt>F1</tt>
-key:</font></dt>
-
-<dd>
-<tt><font color="#000000">F1 = test</font></tt></dd>
-
-<dt>
-<font color="#000000">On pressing <tt>Control + PGUP</tt> send the string
-"pgup pressed":</font></dt>
-
-<dd>
-<tt><font color="#000000">CPGUP = pgup pressed</font></tt></dd>
-
-<dt>
-<font color="#000000">Redefine the key <tt>Alt + F12</tt> to send an escape
-character:</font></dt>
-
-<dd>
-<tt><font color="#000000">AF12 = \\e</font></tt></dd>
-
-<br>&nbsp;
-<p>&nbsp;
-<br>&nbsp;
-<br>&nbsp;
-<br>&nbsp;
-<br>&nbsp;
-<br>&nbsp;
-<br>&nbsp;
-<p><font color="#000000">As you can see the string you can define may contain
-special characters which may be escaped using the backslash (\). Allowed
-special characters follow in the table below:</font>
-<p><font color="#CC0000"><font size=-1>(<b>Important</b>: for some of the
-escape codes you need two backslashes as these are our own definitions
-and not known by the Java Property mechanism)</font></font>
-<br>&nbsp;
-<center><table BORDER=0 CELLSPACING=3 CELLPADDING=3 COLS=2 BGCOLOR="#CCCCCC" NOSAVE >
-<tr ALIGN=CENTER VALIGN=CENTER BGCOLOR="#000000" NOSAVE>
-<td><b><font face="Arial,Helvetica"><font color="#FFFFFF">Special Character</font></font></b></td>
-
-<td NOSAVE><b><font face="Arial,Helvetica"><font color="#FFFFFF">Explanation</font></font></b></td>
-</tr>
-
-<tr NOSAVE>
-<td ALIGN=CENTER VALIGN=CENTER NOSAVE><tt>\\b</tt></td>
-
-<td><i>Backspace</i>, this character is usually sent by the <tt>&lt;-</tt>key
-(not the cursor left key!).</td>
-</tr>
-
-<tr NOSAVE>
-<td ALIGN=CENTER VALIGN=CENTER NOSAVE><tt>\\e</tt></td>
-
-<td><i>Escape</i>, this character is usually sent by the <tt>Esc</tt> key.</td>
-</tr>
-
-<tr NOSAVE>
-<td ALIGN=CENTER VALIGN=CENTER NOSAVE><tt>\n</tt>
-<br><tt><font color="#CC0000"><font size=-1>(only one backslash)</font></font></tt></td>
-
-<td><i>Newline</i>, this character will move the cursor to a new line.
-On UNIX systems it is equivalent to carriage return + newline. Usually
-the <tt>Enter</tt> key send this character.</td>
-</tr>
-
-<tr NOSAVE>
-<td ALIGN=CENTER VALIGN=CENTER NOSAVE><tt>\r</tt>
-<br><tt><font color="#CC0000"><font size=-1>(only one backslash)</font></font></tt></td>
-
-<td NOSAVE><i>Carriage Return</i>, this key moves the cursor to the beginning
-of the line. In conjunction with <i>Newline</i> it moves the cursor to
-the beginning of a new line.</td>
-</tr>
-
-<tr NOSAVE>
-<td ALIGN=CENTER VALIGN=CENTER NOSAVE><tt>\t</tt>
-<br><tt><font color="#CC0000"><font size=-1>(only one backslash)</font></font></tt></td>
-
-<td><i>Tabulator</i>, the tab character is sent by the <tt>->|</tt> key
-and moves the cursor to the next tab stop defined by the terminal.</td>
-</tr>
-
-<tr NOSAVE>
-<td ALIGN=CENTER VALIGN=CENTER NOSAVE><tt>\\v</tt></td>
-
-<td><i>Vertical Tabulator</i>, sends a vertical tabulator character.</td>
-</tr>
-
-<tr NOSAVE>
-<td ALIGN=CENTER VALIGN=CENTER NOSAVE><tt>\\a</tt></td>
-
-<td><i>Bell</i>, sends a terminal bell character which should make the
-terminal sound its bell, but the implementation is a silent one ;-)</td>
-</tr>
-
-<tr NOSAVE>
-<td ALIGN=CENTER VALIGN=CENTER NOSAVE><tt>\\</tt><i>number</i></td>
-
-<td>Inserts the character that is defined by this <i>number</i> in the
-ISO Latin1 character set. The <i>number</i> should be a decimal value.</td>
-</tr>
-</table></center>
-
-<p><font color="#000000">The following table explains which key may be
-redefined. As explained above each of the keys may be prefixed by a character
-defining the redefinition that occures if it is pressed in conjunction
-with the shift, control or alt keys.</font>
-<br>&nbsp;
-<center><table BORDER=0 CELLSPACING=3 CELLPADDING=3 COLS=2 WIDTH="100%" BGCOLOR="#CCCCCC" NOSAVE >
-<tr ALIGN=CENTER VALIGN=CENTER BGCOLOR="#000000" NOSAVE>
-<td><b><font face="Arial,Helvetica"><font color="#FFFFFF">Key Representation</font></font></b></td>
-
-<td NOSAVE><b><font face="Arial,Helvetica"><font color="#FFFFFF">Remarks</font></font></b></td>
-</tr>
-
-<tr>
-<td>
-<center><tt>F1 - F20</tt></center>
-</td>
-
-<td>The function key, F1, F2 ... up to F20.</td>
-</tr>
-
-<tr>
-<td>
-<center><tt>PGUP</tt></center>
-</td>
-
-<td>The Page Up key.</td>
-</tr>
-
-<tr>
-<td>
-<center><tt>PGDOWN</tt></center>
-</td>
-
-<td>The Page Down key.</td>
-</tr>
-
-<tr>
-<td>
-<center><tt>END</tt></center>
-</td>
-
-<td>The End key.</td>
-</tr>
-
-<tr>
-<td>
-<center><tt>HOME</tt></center>
-</td>
-
-<td>The Home (Pos 1) key.</td>
-</tr>
-
-<tr>
-<td>
-<center><tt>INSERT</tt></center>
-</td>
-
-<td>The Insert key.</td>
-</tr>
-
-<tr>
-<td>
-<center><tt>REMOVE</tt></center>
-</td>
-
-<td>The Remove key.</td>
-</tr>
-
-<tr>
-<td>
-<center><tt>UP</tt></center>
-</td>
-
-<td>The Cursor Up key.</td>
-</tr>
-
-<tr>
-<td>
-<center><tt>DOWN</tt></center>
-</td>
-
-<td>The Cursor Down key.</td>
-</tr>
-
-<tr>
-<td>
-<center><tt>LEFT</tt></center>
-</td>
-
-<td>The Cursor Left key.</td>
-</tr>
-
-<tr>
-<td>
-<center><tt>RIGHT</tt></center>
-</td>
-
-<td>The Cursor right key.</td>
-</tr>
-
-<tr>
-<td>
-<center>NUMPAD0 - NUMPAD9</center>
-</td>
-
-<td>The numbered Numpad keys.</td>
-</tr>
-
-<tr>
-<td>
-<center>ESCAPE</center>
-</td>
-
-<td>The ESCAPE key.</td>
-</tr>
-
-<tr>
-<td>
-<center>BACKSPACE</center>
-</td>
-
-<td>The backspace key.</td>
-</tr>
-
-<tr>
-<td>
-<center>TAB</center>
-</td>
-
-<td>The tabulator key.</td>
-</tr>
-</table></center>
-</td>
-
-<td ALIGN=LEFT VALIGN=TOP BGCOLOR="#CCCCCC" NOSAVE><font color="#CC0000">Additional
-Programmer Documentation is available:</font>
-<br>&nbsp;
-<center><table BORDER=0 CELLSPACING=3 CELLPADDING=3 COLS=1 WIDTH="100%" NOSAVE >
-<tr NOSAVE>
-<td BGCOLOR="#FFFFFF" NOSAVE><b><font face="Arial,Helvetica"><font color="#000000"><a href="../source/de/mud/jta/plugin/Terminal.html">de.mud.jta.plugin.Terminal</a></font></font></b></td>
-</tr>
-
-<tr>
-<td>This is the programmer documentation for the plugin. Use it as an example
+ </tr>
+  <tr>
+ <td>Terminal.encoding</td>
+  <td>Use this property if you have real UNICODE fonts installed on your system
+or at least fonts that include the characters you would like to display.
+The default setting it <b>ISO8859_1</b> but it may be used to make the terminal
+aware of special characters like in the japanese (i.e. <b>SJIS</b>) or chinese
+region.</td>
+ </tr>
+ 
+          </tbody>
+        </table>
+        </center>
+  
+        <h3> <a name="KEYCODES"></a><font color="#cc0000">Definition of Key
+Codes</font></h3>
+ <font color="#000000">The definition of key codes should only be done if 
+your application uses a very different keyboard layout than the standard vt320.
+The definition of almost all special keys is possible and follows rules described
+below:</font> 
+        <blockquote><tt><font color="#000000"># here is the rule</font></tt>
+ <br>
+          <tt><font color="#000000">[<b>SCA</b>]</font></tt><font color="#000000"><i>
+KEY</i><b><tt>=</tt></b><i>STRING</i></font></blockquote>
+ <font color="#000000">The characters enclosed in <tt>[</tt> and <tt>]</tt>
+ are optional and only one of the characters '<b><tt>S</tt></b>' (Shift), 
+'<b><tt>C</tt></b>' (Control) or '<b><tt>A</tt></b>' (Alt) may appear before 
+the <i>KEY</i>, which is a textual representation (F1, PGUP etc) of the key
+you would like to redefine.</font> 
+          <p><font color="#000000">The new <i>STRING</i> you define to be
+sent when pressing the key should come after the equal sign (<b><tt>=</tt></b>
+). Hash marks (<tt>#</tt>) in the file declare a line as comment and will 
+be ignored. Some examples explain the syntax:</font> <br>
+&nbsp; </p>
+          <dt> <font color="#000000">Send the string "test" when pressing
+the <tt>F1</tt> key:</font></dt>
+  <dd> <tt><font color="#000000">F1 = test</font></tt></dd>
+  <dt> <font color="#000000">On pressing <tt>Control + PGUP</tt> send the
+string "pgup pressed":</font></dt>
+  <dd> <tt><font color="#000000">CPGUP = pgup pressed</font></tt></dd>
+  <dt> <font color="#000000">Redefine the key <tt>Alt + F12</tt> to send
+an escape character:</font></dt>
+  <dd> <tt><font color="#000000">AF12 = \\e</font></tt></dd>
+  <br>
+&nbsp; 
+                      <p>&nbsp; <br>
+&nbsp; <br>
+&nbsp; <br>
+&nbsp; <br>
+&nbsp; <br>
+&nbsp; <br>
+&nbsp; </p>
+                      <p><font color="#000000">As you can see the string
+you can define may contain special characters which may be escaped using
+the backslash (\). Allowed special characters follow in the table below:</font>
+ </p>
+                      <p><font color="#cc0000"><font size="-1">(<b>Important</b>
+: for some of the escape codes you need two backslashes as these are our
+own definitions and not known by the Java Property mechanism)</font></font>
+ <br>
+&nbsp; </p>
+                      <center>
+                      <table border="0" cellspacing="3" cellpadding="3" cols="2" bgcolor="#cccccc" nosave="">
+ <tbody>
+                          <tr align="Center" valign="CENTER" bgcolor="#000000" nosave="">
+ <td><b><font face="Arial,Helvetica"><font color="#ffffff">Special Character</font></font></b></td>
+  <td nosave=""><b><font face="Arial,Helvetica"><font color="#ffffff">Explanation</font></font></b></td>
+ </tr>
+  <tr nosave="">
+ <td align="Center" valign="CENTER" nosave=""><tt>\\b</tt></td>
+  <td><i>Backspace</i>, this character is usually sent by the <tt>&lt;-</tt>
+key (not the cursor left key!).</td>
+ </tr>
+  <tr nosave="">
+ <td align="Center" valign="CENTER" nosave=""><tt>\\e</tt></td>
+  <td><i>Escape</i>, this character is usually sent by the <tt>Esc</tt> key.</td>
+ </tr>
+  <tr nosave="">
+ <td align="Center" valign="CENTER" nosave=""><tt>\n</tt> <br>
+                            <tt><font color="#cc0000"><font size="-1">(only
+one backslash)</font></font></tt></td>
+  <td><i>Newline</i>, this character will move the cursor to a new line. On
+UNIX systems it is equivalent to carriage return + newline. Usually the <tt>
+Enter</tt> key send this character.</td>
+ </tr>
+  <tr nosave="">
+ <td align="Center" valign="CENTER" nosave=""><tt>\r</tt> <br>
+                            <tt><font color="#cc0000"><font size="-1">(only
+one backslash)</font></font></tt></td>
+  <td nosave=""><i>Carriage Return</i>, this key moves the cursor to the
+beginning of the line. In conjunction with <i>Newline</i> it moves the cursor
+to the beginning of a new line.</td>
+ </tr>
+  <tr nosave="">
+ <td align="Center" valign="CENTER" nosave=""><tt>\t</tt> <br>
+                            <tt><font color="#cc0000"><font size="-1">(only
+one backslash)</font></font></tt></td>
+  <td><i>Tabulator</i>, the tab character is sent by the <tt>-&gt;|</tt>
+key and moves the cursor to the next tab stop defined by the terminal.</td>
+ </tr>
+  <tr nosave="">
+ <td align="Center" valign="CENTER" nosave=""><tt>\\v</tt></td>
+  <td><i>Vertical Tabulator</i>, sends a vertical tabulator character.</td>
+ </tr>
+  <tr nosave="">
+ <td align="Center" valign="CENTER" nosave=""><tt>\\a</tt></td>
+  <td><i>Bell</i>, sends a terminal bell character which should make the terminal
+sound its bell, but the implementation is a silent one ;-)</td>
+ </tr>
+  <tr nosave="">
+ <td align="Center" valign="CENTER" nosave=""><tt>\\</tt><i>number</i></td>
+  <td>Inserts the character that is defined by this <i>number</i> in the ISO
+Latin1 character set. The <i>number</i> should be a decimal value.</td>
+ </tr>
+ 
+                        </tbody>
+                      </table>
+                      </center>
+  
+                      <p><font color="#000000">The following table explains
+which key may be redefined. As explained above each of the keys may be prefixed
+by a character defining the redefinition that occures if it is pressed in
+conjunction with the shift, control or alt keys.</font> <br>
+&nbsp; </p>
+                      <center>
+                      <table border="0" cellspacing="3" cellpadding="3" cols="2" width="100%" bgcolor="#cccccc" nosave="">
+ <tbody>
+                          <tr align="Center" valign="CENTER" bgcolor="#000000" nosave="">
+ <td><b><font face="Arial,Helvetica"><font color="#ffffff">Key Representation</font></font></b></td>
+  <td nosave=""><b><font face="Arial,Helvetica"><font color="#ffffff">Remarks</font></font></b></td>
+ </tr>
+  <tr>
+ <td> 
+                            <center><tt>F1 - F20</tt></center>
+ </td>
+  <td>The function key, F1, F2 ... up to F20.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center><tt>PGUP</tt></center>
+ </td>
+  <td>The Page Up key.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center><tt>PGDOWN</tt></center>
+ </td>
+  <td>The Page Down key.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center><tt>END</tt></center>
+ </td>
+  <td>The End key.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center><tt>HOME</tt></center>
+ </td>
+  <td>The Home (Pos 1) key.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center><tt>INSERT</tt></center>
+ </td>
+  <td>The Insert key.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center><tt>REMOVE</tt></center>
+ </td>
+  <td>The Remove key.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center><tt>UP</tt></center>
+ </td>
+  <td>The Cursor Up key.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center><tt>DOWN</tt></center>
+ </td>
+  <td>The Cursor Down key.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center><tt>LEFT</tt></center>
+ </td>
+  <td>The Cursor Left key.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center><tt>RIGHT</tt></center>
+ </td>
+  <td>The Cursor right key.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center>NUMPAD0 - NUMPAD9</center>
+ </td>
+  <td>The numbered Numpad keys.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center>ESCAPE</center>
+ </td>
+  <td>The ESCAPE key.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center>BACKSPACE</center>
+ </td>
+  <td>The backspace key.</td>
+ </tr>
+  <tr>
+ <td> 
+                            <center>TAB</center>
+ </td>
+  <td>The tabulator key.</td>
+ </tr>
+ 
+                        </tbody>
+                      </table>
+                      </center>
+ </td>
+  <td align="Left" valign="Top" bgcolor="#cccccc" nosave=""><font color="#cc0000">
+Additional Programmer Documentation is available:</font> <br>
+&nbsp; 
+                      <center>
+                      <table border="0" cellspacing="3" cellpadding="3" cols="1" width="100%" nosave="">
+ <tbody>
+                          <tr nosave="">
+ <td bgcolor="#ffffff" nosave=""><b><font face="Arial,Helvetica"><font color="#000000"><a href="../source/de/mud/jta/plugin/Terminal.html">
+de.mud.jta.plugin.Terminal</a></font></font></b></td>
+ </tr>
+  <tr>
+ <td>This is the programmer documentation for the plugin. Use it as an example 
 if you want to write your own back end plugins.</td>
-</tr>
-
-<tr NOSAVE>
-<td BGCOLOR="#FFFFFF" NOSAVE><b><font face="Arial,Helvetica"><a href="../source/de/mud/jta/event/package-summary.html">de.mud.jta.event</a></font></b></td>
-</tr>
-
-<tr>
-<td>This plugins uses some of the events and listeners described here.</td>
-</tr>
-
-<tr NOSAVE>
-<td BGCOLOR="#FFFFFF" NOSAVE><b><font face="Arial,Helvetica"><a href="../source/de/mud/terminal/package-summary.html">de.mud.terminal</a></font></b></td>
-</tr>
-
-<tr>
-<td>Have a look here for the underlying terminal emulation package.</td>
-</tr>
-</table></center>
-
-<p><font color="#CC0000">If you produced <a href="#KEYCODES">keyCode definition</a>
-files you'd like to share with others <a href="mailto:jta@mud.de">send
-them to us</a> and we will publish them here.</font>
-<br>&nbsp;
-<br>&nbsp;
-<table BORDER=0 CELLSPACING=3 CELLPADDING=3 COLS=1 WIDTH="100%" NOSAVE >
-<tr NOSAVE>
-<td BGCOLOR="#FFFFFF" NOSAVE><b><font face="Arial,Helvetica"><a href="keyCodes.at386">AT
-386 Terminal</a></font></b></td>
-</tr>
-
-<tr NOSAVE>
-<td NOSAVE>A key code definition file for an AT-386 Terminal. It should
+ </tr>
+  <tr nosave="">
+ <td bgcolor="#ffffff" nosave=""><b><font face="Arial,Helvetica"><a href="../source/de/mud/jta/event/package-summary.html">
+de.mud.jta.event</a></font></b></td>
+ </tr>
+  <tr>
+ <td>This plugins uses some of the events and listeners described here.</td>
+ </tr>
+  <tr nosave="">
+ <td bgcolor="#ffffff" nosave=""><b><font face="Arial,Helvetica"><a href="../source/de/mud/terminal/package-summary.html">
+de.mud.terminal</a></font></b></td>
+ </tr>
+  <tr>
+ <td>Have a look here for the underlying terminal emulation package.</td>
+ </tr>
+ 
+                        </tbody>
+                      </table>
+                      </center>
+  
+                      <p><font color="#cc0000">If you produced <a href="#KEYCODES">
+keyCode definition</a> files you'd like to share with others <a href="mailto:jta@mud.de">
+send them to us</a> and we will publish them here.</font> <br>
+&nbsp; <br>
+&nbsp; 
+                      <table border="0" cellspacing="3" cellpadding="3" cols="1" width="100%" nosave="">
+ <tbody>
+                          <tr nosave="">
+ <td bgcolor="#ffffff" nosave=""><b><font face="Arial,Helvetica"><a href="keyCodes.at386">
+AT 386 Terminal</a></font></b></td>
+ </tr>
+  <tr nosave="">
+ <td nosave="">A key code definition file for an AT-386 Terminal. It should 
 work with ANSI and most version of UNIX. More info is in the file.</td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-
-<center><table BORDER=0 CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
-<tr NOSAVE>
-<td NOSAVE>
-<table BORDER=0 CELLSPACING=3 CELLPADDING=5 COLS=2 WIDTH="100%" HEIGHT="100%" BGCOLOR="#FFFFFF" NOSAVE >
-<tr NOSAVE>
-<td NOSAVE>Copyright 1996-2000 <a href="mailto:leo@mud.de">Matthias L.
+ </tr>
+ 
+                        </tbody>
+                      </table>
+ </p>
+                      </td>
+ </tr>
+ 
+                  </tbody>
+                </table>
+  
+                <center>
+                <table border="0" cellspacing="0" cellpadding="5" cols="1" width="100%" bgcolor="#000000" nosave="">
+ <tbody>
+                    <tr nosave="">
+ <td nosave=""> 
+                      <table border="0" cellspacing="3" cellpadding="5" cols="2" width="100%" height="100%" bgcolor="#ffffff" nosave="">
+ <tbody>
+                          <tr nosave="">
+ <td nosave="">Copyright 1996-2000 <a href="mailto:leo@mud.de">Matthias L. 
 Jugel</a>, <a href="mailto:marcus@mud.de">Marcus Mei&szlig;ner</a></td>
-
-<td>
-<div align=right><b><i>Get the <a href="http://www.mud.de/se/jta">latest
-version here</a>!</i></b></div>
-</td>
-</tr>
-
-<tr NOSAVE>
-<td COLSPAN="2" NOSAVE>
-<div align=right>$Id: Terminal.html,v 1.9 2000/03/19 10:51:48 marcus Exp
-$</div>
-</td>
-</tr>
-</table>
-</td>
-</tr>
-</table></center>
-
-</body>
-</html>
+  <td> 
+                            <div align="Right"><b><i>Get the <a href="http://www.mud.de/se/jta">
+latest version here</a>!</i></b></div>
+ </td>
+ </tr>
+  <tr nosave="">
+ <td colspan="2" nosave=""> 
+                            <div align="Right">$Id: Terminal.html,v 1.9 2000/03/19
+10:51:48 marcus Exp $</div>
+ </td>
+ </tr>
+ 
+                        </tbody>
+                      </table>
+ </td>
+ </tr>
+ 
+                  </tbody>
+                </table>
+                </center>
+  
+                </body>
+                </html>