From ad6ed4d64c760fbe5af494ec27a4b4cf41adb6cc Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 22 Mar 2004 17:15:03 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'bayard'. --- CVSROOT/checkoutlist | 13 - CVSROOT/commitinfo | 15 - CVSROOT/config | 14 - CVSROOT/cvswrappers | 23 - CVSROOT/editinfo | 21 - CVSROOT/loginfo | 26 - CVSROOT/modules | 26 - CVSROOT/notify | 12 - CVSROOT/rcsinfo | 13 - CVSROOT/taginfo | 20 - CVSROOT/verifymsg | 21 - mudclient/project.properties | 11 - mudclient/project.xml | 114 -- .../console/AbstractConsoleAction.java | 12 - .../console/BackgroundConsoleAction.java | 14 - .../console/BeepConsoleAction.java | 12 - .../console/BoldConsoleAction.java | 15 - .../console/ClearScreenConsoleAction.java | 12 - .../org/cyberiantiger/console/Console.java | 62 - .../cyberiantiger/console/ConsoleAction.java | 11 - .../console/ElephantMUDConsoleAction.java | 181 -- .../console/FlashConsoleAction.java | 14 - .../console/ForegroundConsoleAction.java | 14 - .../console/MoveCursorXConsoleAction.java | 18 - .../console/MoveCursorYConsoleAction.java | 18 - .../console/NullConsoleAction.java | 11 - .../console/ResetConsoleAction.java | 15 - .../console/ResizeConsoleAction.java | 16 - .../console/ReverseConsoleAction.java | 14 - .../console/SetCursorXConsoleAction.java | 18 - .../console/SetCursorYConsoleAction.java | 18 - .../console/StringConsoleAction.java | 22 - .../mudclient/ElephantMudClient.java | 127 -- .../cyberiantiger/mudclient/MudClient.java | 64 - .../mudclient/net/MudConnection.java | 178 -- .../mudclient/parser/ANSIParser.java | 224 --- .../mudclient/parser/ElephantMUDParser.java | 67 - .../mudclient/parser/Parser.java | 35 - .../mudclient/ui/ConsoleModel.java | 230 --- .../mudclient/ui/ConsoleModelListener.java | 7 - .../mudclient/ui/ConsoleView.java | 229 --- .../mudclient/ui/ControlWindow.java | 216 --- .../org/cyberiantiger/mudclient/ui/Line.java | 51 - .../mudclient/ui/LineSegment.java | 96 - .../mudclient/ui/MudClientUI.java | 66 - .../telnet/AbstractTelnetOption.java | 102 -- .../telnet/AbstractTelnetSubOption.java | 23 - .../org/cyberiantiger/telnet/BinaryData.java | 7 - .../cyberiantiger/telnet/OptionParser.java | 55 - .../telnet/SimpleTelnetOption.java | 8 - .../telnet/SimpleTelnetSession.java | 125 -- .../telnet/TelnetBufferedInputStream.java | 67 - .../telnet/TelnetInputStream.java | 121 -- .../telnet/TelnetNegotiation.java | 9 - .../cyberiantiger/telnet/TelnetOption.java | 135 -- .../cyberiantiger/telnet/TelnetSession.java | 13 - .../cyberiantiger/telnet/TelnetSocket.java | 50 - .../cyberiantiger/telnet/TelnetSubOption.java | 40 - .../telnet/UnknownTelnetOption.java | 9 - mudclient/xdocs/images/1x1.gif | Bin 807 -> 0 bytes mudclient/xdocs/images/osjava.gif | Bin 395 -> 0 bytes mudclient/xdocs/navigation.xml | 14 - norbert/LICENSE.txt | 31 - norbert/data/bad/robots.txt | 1 - norbert/data/basic/robots.txt | 5 - norbert/data/bbc/robots.txt | 25 - norbert/data/cnn/robots.txt | 133 -- norbert/data/genscape/robots.txt | 5 - norbert/data/ibm/robots.txt | 56 - norbert/data/rfc/robots.txt | 16 - norbert/data/slashdot/robots.txt | 34 - norbert/data/sun/robots.txt | 48 - norbert/data/whitehouse/robots.txt | 1567 ----------------- norbert/project.properties | 11 - norbert/project.xml | 88 - .../java/org/osjava/norbert/AbstractRule.java | 55 - .../java/org/osjava/norbert/AllowedRule.java | 65 - .../org/osjava/norbert/DisallowedRule.java | 63 - .../org/osjava/norbert/NoRobotClient.java | 200 --- norbert/src/java/org/osjava/norbert/Rule.java | 46 - .../java/org/osjava/norbert/RulesEngine.java | 91 - .../org/osjava/norbert/NoRobotClientTest.java | 180 -- norbert/xdocs/HowTo.xml | 37 - norbert/xdocs/News.xml | 16 - norbert/xdocs/images/1x1.gif | Bin 807 -> 0 bytes norbert/xdocs/images/core-logo.jpg | Bin 2047 -> 0 bytes norbert/xdocs/images/initials.jpg | Bin 2047 -> 0 bytes norbert/xdocs/images/osjava.gif | Bin 395 -> 0 bytes norbert/xdocs/navigation.xml | 21 - runsql/example/config/CmdLine.properties | 5 - runsql/example/jndi.properties | 2 - runsql/example/sql/BOOTSTRAP.sql | 4 - runsql/example/sql/CHECK.sql | 1 - runsql/example/sql/QUERY.sql | 1 - runsql/example/sql/SCHEMA.sql | 11 - runsql/project.properties | 6 - runsql/project.xml | 92 - runsql/src/java/org/osjava/runsql/RunSql.java | 67 - scraping-engine/LICENSE.txt | 31 - scraping-engine/TODO | 48 - scraping-engine/project.properties | 9 - scraping-engine/project.xml | 156 -- scraping-engine/run.sh | 1 - scraping-engine/runc.sh | 1 - .../org/osjava/scraping/AbstractConfig.java | 101 -- .../org/osjava/scraping/AbstractPage.java | 109 -- .../org/osjava/scraping/AbstractParser.java | 44 - .../org/osjava/scraping/CheckingParser.java | 54 - .../src/java/org/osjava/scraping/Config.java | 50 - .../org/osjava/scraping/ConfigFactory.java | 40 - .../src/java/org/osjava/scraping/Engine.java | 124 -- .../src/java/org/osjava/scraping/Fetcher.java | 43 - .../osjava/scraping/FetchingException.java | 43 - .../org/osjava/scraping/FetchingFactory.java | 52 - .../src/java/org/osjava/scraping/Header.java | 38 - .../java/org/osjava/scraping/HttpFetcher.java | 65 - .../org/osjava/scraping/HttpsFetcher.java | 84 - .../java/org/osjava/scraping/JdbcStore.java | 93 - .../java/org/osjava/scraping/JndiConfig.java | 66 - .../java/org/osjava/scraping/LoopParser.java | 55 - .../java/org/osjava/scraping/MemoryPage.java | 50 - .../java/org/osjava/scraping/MultiParser.java | 57 - .../java/org/osjava/scraping/MultiResult.java | 86 - .../org/osjava/scraping/NamespaceSession.java | 61 - .../scraping/NotificationException.java | 43 - .../osjava/scraping/NotificationFactory.java | 59 - .../java/org/osjava/scraping/Notifier.java | 42 - .../java/org/osjava/scraping/NullFetcher.java | 40 - .../org/osjava/scraping/NullNotifier.java | 44 - .../java/org/osjava/scraping/NullPage.java | 47 - .../java/org/osjava/scraping/NullParser.java | 43 - .../java/org/osjava/scraping/NullResult.java | 43 - .../java/org/osjava/scraping/NullStore.java | 55 - .../src/java/org/osjava/scraping/Page.java | 46 - .../src/java/org/osjava/scraping/Parser.java | 39 - .../org/osjava/scraping/ParserFactory.java | 47 - .../org/osjava/scraping/ParsingException.java | 43 - .../java/org/osjava/scraping/QuartzJob.java | 55 - .../org/osjava/scraping/QuartzScheduler.java | 129 -- .../src/java/org/osjava/scraping/Result.java | 40 - .../src/java/org/osjava/scraping/Runner.java | 38 - .../java/org/osjava/scraping/Scheduler.java | 38 - .../org/osjava/scraping/SchedulerFactory.java | 58 - .../osjava/scraping/ScrapingException.java | 43 - .../src/java/org/osjava/scraping/Session.java | 45 - .../org/osjava/scraping/SimpleScheduler.java | 43 - .../src/java/org/osjava/scraping/Store.java | 40 - .../org/osjava/scraping/StoreFactory.java | 47 - .../org/osjava/scraping/StoringException.java | 43 - .../org/osjava/scraping/TabularResult.java | 51 - .../scraping/parser/PassThroughParser.java | 51 - .../osjava/scraping/util/FactoryUtils.java | 65 - simple-jndi/LICENSE.txt | 31 - simple-jndi/project.properties | 11 - simple-jndi/project.xml | 146 -- .../org/osjava/convert/BooleanConverter.java | 59 - .../src/java/org/osjava/convert/Convert.java | 60 - .../java/org/osjava/convert/Converter.java | 39 - .../org/osjava/convert/NumberConverter.java | 43 - .../java/org/osjava/convert/URLConverter.java | 48 - .../org/osjava/jndi/PropertiesContext.java | 750 -------- .../org/osjava/jndi/PropertiesDataSource.java | 140 -- .../org/osjava/jndi/PropertiesFactory.java | 48 - .../osjava/jndi/util/CustomProperties.java | 151 -- .../org/osjava/jndi/util/XmlProperties.java | 122 -- .../src/java/org/osjava/naming/Jndi.java | 73 - .../src/test/config/GenscapeDS.properties | 5 - .../src/test/config/default.properties | 4 - simple-jndi/src/test/config/java.properties | 5 - simple-jndi/src/test/config/test.properties | 1 - .../src/test/config/thing/db.properties | 5 - .../src/test/config/thing/type/bob.properties | 4 - .../test/config/thing/type/default.properties | 3 - simple-jndi/src/test/jndi.properties | 8 - .../src/test/org/osjava/jndi/LookupTest.java | 142 -- simple-jndi/xdocs/Archives.xml | 14 - simple-jndi/xdocs/Download.xml | 45 - simple-jndi/xdocs/Examples.xml | 80 - simple-jndi/xdocs/FAQ.xml | 26 - simple-jndi/xdocs/Intro.xml | 78 - simple-jndi/xdocs/News.xml | 44 - simple-jndi/xdocs/Tasks.xml | 60 - simple-jndi/xdocs/images/1x1.gif | Bin 807 -> 0 bytes simple-jndi/xdocs/images/core-logo.jpg | Bin 2047 -> 0 bytes simple-jndi/xdocs/images/initials.jpg | Bin 2047 -> 0 bytes simple-jndi/xdocs/images/osjava.gif | Bin 395 -> 0 bytes simple-jndi/xdocs/navigation.xml | 26 - 187 files changed, 11386 deletions(-) delete mode 100644 CVSROOT/checkoutlist delete mode 100644 CVSROOT/commitinfo delete mode 100644 CVSROOT/config delete mode 100644 CVSROOT/cvswrappers delete mode 100644 CVSROOT/editinfo delete mode 100644 CVSROOT/loginfo delete mode 100644 CVSROOT/modules delete mode 100644 CVSROOT/notify delete mode 100644 CVSROOT/rcsinfo delete mode 100644 CVSROOT/taginfo delete mode 100644 CVSROOT/verifymsg delete mode 100644 mudclient/project.properties delete mode 100644 mudclient/project.xml delete mode 100644 mudclient/src/java/org/cyberiantiger/console/AbstractConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/BackgroundConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/BeepConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/BoldConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/ClearScreenConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/Console.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/ConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/ElephantMUDConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/FlashConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/ForegroundConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/MoveCursorXConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/MoveCursorYConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/NullConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/ResetConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/ResizeConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/ReverseConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/SetCursorXConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/SetCursorYConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/console/StringConsoleAction.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/ElephantMudClient.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/MudClient.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/net/MudConnection.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/parser/ANSIParser.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/parser/ElephantMUDParser.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/parser/Parser.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/ui/ConsoleModel.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/ui/ConsoleModelListener.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/ui/ConsoleView.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/ui/ControlWindow.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/ui/Line.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/ui/LineSegment.java delete mode 100644 mudclient/src/java/org/cyberiantiger/mudclient/ui/MudClientUI.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/AbstractTelnetOption.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/AbstractTelnetSubOption.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/BinaryData.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/OptionParser.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/SimpleTelnetOption.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/SimpleTelnetSession.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/TelnetBufferedInputStream.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/TelnetInputStream.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/TelnetNegotiation.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/TelnetOption.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/TelnetSession.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/TelnetSocket.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/TelnetSubOption.java delete mode 100644 mudclient/src/java/org/cyberiantiger/telnet/UnknownTelnetOption.java delete mode 100644 mudclient/xdocs/images/1x1.gif delete mode 100644 mudclient/xdocs/images/osjava.gif delete mode 100644 mudclient/xdocs/navigation.xml delete mode 100644 norbert/LICENSE.txt delete mode 100644 norbert/data/bad/robots.txt delete mode 100644 norbert/data/basic/robots.txt delete mode 100644 norbert/data/bbc/robots.txt delete mode 100644 norbert/data/cnn/robots.txt delete mode 100644 norbert/data/genscape/robots.txt delete mode 100644 norbert/data/ibm/robots.txt delete mode 100644 norbert/data/rfc/robots.txt delete mode 100644 norbert/data/slashdot/robots.txt delete mode 100644 norbert/data/sun/robots.txt delete mode 100644 norbert/data/whitehouse/robots.txt delete mode 100644 norbert/project.properties delete mode 100644 norbert/project.xml delete mode 100644 norbert/src/java/org/osjava/norbert/AbstractRule.java delete mode 100644 norbert/src/java/org/osjava/norbert/AllowedRule.java delete mode 100644 norbert/src/java/org/osjava/norbert/DisallowedRule.java delete mode 100644 norbert/src/java/org/osjava/norbert/NoRobotClient.java delete mode 100644 norbert/src/java/org/osjava/norbert/Rule.java delete mode 100644 norbert/src/java/org/osjava/norbert/RulesEngine.java delete mode 100644 norbert/src/test/org/osjava/norbert/NoRobotClientTest.java delete mode 100644 norbert/xdocs/HowTo.xml delete mode 100644 norbert/xdocs/News.xml delete mode 100644 norbert/xdocs/images/1x1.gif delete mode 100644 norbert/xdocs/images/core-logo.jpg delete mode 100644 norbert/xdocs/images/initials.jpg delete mode 100644 norbert/xdocs/images/osjava.gif delete mode 100644 norbert/xdocs/navigation.xml delete mode 100644 runsql/example/config/CmdLine.properties delete mode 100644 runsql/example/jndi.properties delete mode 100644 runsql/example/sql/BOOTSTRAP.sql delete mode 100644 runsql/example/sql/CHECK.sql delete mode 100644 runsql/example/sql/QUERY.sql delete mode 100644 runsql/example/sql/SCHEMA.sql delete mode 100644 runsql/project.properties delete mode 100644 runsql/project.xml delete mode 100644 runsql/src/java/org/osjava/runsql/RunSql.java delete mode 100644 scraping-engine/LICENSE.txt delete mode 100644 scraping-engine/TODO delete mode 100644 scraping-engine/project.properties delete mode 100644 scraping-engine/project.xml delete mode 100755 scraping-engine/run.sh delete mode 100755 scraping-engine/runc.sh delete mode 100644 scraping-engine/src/java/org/osjava/scraping/AbstractConfig.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/AbstractPage.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/AbstractParser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/CheckingParser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Config.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/ConfigFactory.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Engine.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Fetcher.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/FetchingException.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/FetchingFactory.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Header.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/HttpFetcher.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/HttpsFetcher.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/JdbcStore.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/JndiConfig.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/LoopParser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/MemoryPage.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/MultiParser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/MultiResult.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NamespaceSession.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NotificationException.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NotificationFactory.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Notifier.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NullFetcher.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NullNotifier.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NullPage.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NullParser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NullResult.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/NullStore.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Page.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Parser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/ParserFactory.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/ParsingException.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/QuartzJob.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/QuartzScheduler.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Result.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Runner.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Scheduler.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/SchedulerFactory.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/ScrapingException.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Session.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/SimpleScheduler.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/Store.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/StoreFactory.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/StoringException.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/TabularResult.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/parser/PassThroughParser.java delete mode 100644 scraping-engine/src/java/org/osjava/scraping/util/FactoryUtils.java delete mode 100644 simple-jndi/LICENSE.txt delete mode 100644 simple-jndi/project.properties delete mode 100644 simple-jndi/project.xml delete mode 100644 simple-jndi/src/java/org/osjava/convert/BooleanConverter.java delete mode 100644 simple-jndi/src/java/org/osjava/convert/Convert.java delete mode 100644 simple-jndi/src/java/org/osjava/convert/Converter.java delete mode 100644 simple-jndi/src/java/org/osjava/convert/NumberConverter.java delete mode 100644 simple-jndi/src/java/org/osjava/convert/URLConverter.java delete mode 100644 simple-jndi/src/java/org/osjava/jndi/PropertiesContext.java delete mode 100644 simple-jndi/src/java/org/osjava/jndi/PropertiesDataSource.java delete mode 100644 simple-jndi/src/java/org/osjava/jndi/PropertiesFactory.java delete mode 100644 simple-jndi/src/java/org/osjava/jndi/util/CustomProperties.java delete mode 100644 simple-jndi/src/java/org/osjava/jndi/util/XmlProperties.java delete mode 100644 simple-jndi/src/java/org/osjava/naming/Jndi.java delete mode 100644 simple-jndi/src/test/config/GenscapeDS.properties delete mode 100644 simple-jndi/src/test/config/default.properties delete mode 100644 simple-jndi/src/test/config/java.properties delete mode 100644 simple-jndi/src/test/config/test.properties delete mode 100644 simple-jndi/src/test/config/thing/db.properties delete mode 100644 simple-jndi/src/test/config/thing/type/bob.properties delete mode 100644 simple-jndi/src/test/config/thing/type/default.properties delete mode 100644 simple-jndi/src/test/jndi.properties delete mode 100644 simple-jndi/src/test/org/osjava/jndi/LookupTest.java delete mode 100644 simple-jndi/xdocs/Archives.xml delete mode 100644 simple-jndi/xdocs/Download.xml delete mode 100644 simple-jndi/xdocs/Examples.xml delete mode 100644 simple-jndi/xdocs/FAQ.xml delete mode 100644 simple-jndi/xdocs/Intro.xml delete mode 100644 simple-jndi/xdocs/News.xml delete mode 100644 simple-jndi/xdocs/Tasks.xml delete mode 100644 simple-jndi/xdocs/images/1x1.gif delete mode 100644 simple-jndi/xdocs/images/core-logo.jpg delete mode 100644 simple-jndi/xdocs/images/initials.jpg delete mode 100644 simple-jndi/xdocs/images/osjava.gif delete mode 100644 simple-jndi/xdocs/navigation.xml diff --git a/CVSROOT/checkoutlist b/CVSROOT/checkoutlist deleted file mode 100644 index b04b3501..00000000 --- a/CVSROOT/checkoutlist +++ /dev/null @@ -1,13 +0,0 @@ -# The "checkoutlist" file is used to support additional version controlled -# administrative files in $CVSROOT/CVSROOT, such as template files. -# -# The first entry on a line is a filename which will be checked out from -# the corresponding RCS file in the $CVSROOT/CVSROOT directory. -# The remainder of the line is an error message to use if the file cannot -# be checked out. -# -# File format: -# -# [] -# -# comment lines begin with '#' diff --git a/CVSROOT/commitinfo b/CVSROOT/commitinfo deleted file mode 100644 index b19e7b7a..00000000 --- a/CVSROOT/commitinfo +++ /dev/null @@ -1,15 +0,0 @@ -# The "commitinfo" file is used to control pre-commit checks. -# The filter on the right is invoked with the repository and a list -# of files to check. A non-zero exit of the filter program will -# cause the commit to be aborted. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being committed to, relative -# to the $CVSROOT. For the first match that is found, then the remainder -# of the line is the name of the filter to run. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/config b/CVSROOT/config deleted file mode 100644 index ff43ec00..00000000 --- a/CVSROOT/config +++ /dev/null @@ -1,14 +0,0 @@ -# Set this to "no" if pserver shouldn't check system users/passwords -#SystemAuth=no - -# Put CVS lock files in this directory rather than directly in the repository. -#LockDir=/var/lock/cvs - -# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top -# level of the new working directory when using the `cvs checkout' -# command. -#TopLevelAdmin=no - -# Set `LogHistory' to `all' or `TOFEWGCMAR' to log all transactions to the -# history file, or a subset as needed (ie `TMAR' logs all write operations) -#LogHistory=TOFEWGCMAR diff --git a/CVSROOT/cvswrappers b/CVSROOT/cvswrappers deleted file mode 100644 index 0accaf1b..00000000 --- a/CVSROOT/cvswrappers +++ /dev/null @@ -1,23 +0,0 @@ -# This file affects handling of files based on their names. -# -# The -t/-f options allow one to treat directories of files -# as a single file, or to transform a file in other ways on -# its way in and out of CVS. -# -# The -m option specifies whether CVS attempts to merge files. -# -# The -k option specifies keyword expansion (e.g. -kb for binary). -# -# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers) -# -# wildcard [option value][option value]... -# -# where option is one of -# -f from cvs filter value: path to filter -# -t to cvs filter value: path to filter -# -m update methodology value: MERGE or COPY -# -k expansion mode value: b, o, kkv, &c -# -# and value is a single-quote delimited value. -# For example: -#*.gif -k 'b' diff --git a/CVSROOT/editinfo b/CVSROOT/editinfo deleted file mode 100644 index d78886c1..00000000 --- a/CVSROOT/editinfo +++ /dev/null @@ -1,21 +0,0 @@ -# The "editinfo" file is used to allow verification of logging -# information. It works best when a template (as specified in the -# rcsinfo file) is provided for the logging procedure. Given a -# template with locations for, a bug-id number, a list of people who -# reviewed the code before it can be checked in, and an external -# process to catalog the differences that were code reviewed, the -# following test can be applied to the code: -# -# Making sure that the entered bug-id number is correct. -# Validating that the code that was reviewed is indeed the code being -# checked in (using the bug-id number or a seperate review -# number to identify this particular code set.). -# -# If any of the above test failed, then the commit would be aborted. -# -# Actions such as mailing a copy of the report to each reviewer are -# better handled by an entry in the loginfo file. -# -# One thing that should be noted is the the ALL keyword is not -# supported. There can be only one entry that matches a given -# repository. diff --git a/CVSROOT/loginfo b/CVSROOT/loginfo deleted file mode 100644 index 5a59f0a5..00000000 --- a/CVSROOT/loginfo +++ /dev/null @@ -1,26 +0,0 @@ -# The "loginfo" file controls where "cvs commit" log information -# is sent. The first entry on a line is a regular expression which must match -# the directory that the change is being made to, relative to the -# $CVSROOT. If a match is found, then the remainder of the line is a filter -# program that should expect log information on its standard input. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name ALL appears as a regular expression it is always used -# in addition to the first matching regex or DEFAULT. -# -# You may specify a format string as part of the -# filter. The string is composed of a `%' followed -# by a single format character, or followed by a set of format -# characters surrounded by `{' and `}' as separators. The format -# characters are: -# -# s = file name -# V = old version number (pre-checkin) -# v = new version number (post-checkin) -# -# For example: -#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog -# or -#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog diff --git a/CVSROOT/modules b/CVSROOT/modules deleted file mode 100644 index cb9e9efc..00000000 --- a/CVSROOT/modules +++ /dev/null @@ -1,26 +0,0 @@ -# Three different line formats are valid: -# key -a aliases... -# key [options] directory -# key [options] directory files... -# -# Where "options" are composed of: -# -i prog Run "prog" on "cvs commit" from top-level of module. -# -o prog Run "prog" on "cvs checkout" of module. -# -e prog Run "prog" on "cvs export" of module. -# -t prog Run "prog" on "cvs rtag" of module. -# -u prog Run "prog" on "cvs update" of module. -# -d dir Place module in directory "dir" instead of module name. -# -l Top-level directory only -- do not recurse. -# -# NOTE: If you change any of the "Run" options above, you'll have to -# release and re-checkout any working directories of these modules. -# -# And "directory" is a path to a directory relative to $CVSROOT. -# -# The "-a" option specifies an alias. An alias is interpreted as if -# everything on the right of the "-a" had been typed on the command line. -# -# You can encode a module within a module by using the special '&' -# character to interpose another module into the current module. This -# can be useful for creating a module that consists of many directories -# spread out over the entire source repository. diff --git a/CVSROOT/notify b/CVSROOT/notify deleted file mode 100644 index 34f0bc28..00000000 --- a/CVSROOT/notify +++ /dev/null @@ -1,12 +0,0 @@ -# The "notify" file controls where notifications from watches set by -# "cvs watch add" or "cvs edit" are sent. The first entry on a line is -# a regular expression which is tested against the directory that the -# change is being made to, relative to the $CVSROOT. If it matches, -# then the remainder of the line is a filter program that should contain -# one occurrence of %s for the user to notify, and information on its -# standard input. -# -# "ALL" or "DEFAULT" can be used in place of the regular expression. -# -# For example: -#ALL mail %s -s "CVS notification" diff --git a/CVSROOT/rcsinfo b/CVSROOT/rcsinfo deleted file mode 100644 index 49e59f4d..00000000 --- a/CVSROOT/rcsinfo +++ /dev/null @@ -1,13 +0,0 @@ -# The "rcsinfo" file is used to control templates with which the editor -# is invoked on commit and import. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being made to, relative to the -# $CVSROOT. For the first match that is found, then the remainder of the -# line is the name of the file that contains the template. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/taginfo b/CVSROOT/taginfo deleted file mode 100644 index 274a46dd..00000000 --- a/CVSROOT/taginfo +++ /dev/null @@ -1,20 +0,0 @@ -# The "taginfo" file is used to control pre-tag checks. -# The filter on the right is invoked with the following arguments: -# -# $1 -- tagname -# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d -# $3 -- repository -# $4-> file revision [file revision ...] -# -# A non-zero exit of the filter program will cause the tag to be aborted. -# -# The first entry on a line is a regular expression which is tested -# against the directory that the change is being committed to, relative -# to the $CVSROOT. For the first match that is found, then the remainder -# of the line is the name of the filter to run. -# -# If the repository name does not match any of the regular expressions in this -# file, the "DEFAULT" line is used, if it is specified. -# -# If the name "ALL" appears as a regular expression it is always used -# in addition to the first matching regex or "DEFAULT". diff --git a/CVSROOT/verifymsg b/CVSROOT/verifymsg deleted file mode 100644 index 86f747ce..00000000 --- a/CVSROOT/verifymsg +++ /dev/null @@ -1,21 +0,0 @@ -# The "verifymsg" file is used to allow verification of logging -# information. It works best when a template (as specified in the -# rcsinfo file) is provided for the logging procedure. Given a -# template with locations for, a bug-id number, a list of people who -# reviewed the code before it can be checked in, and an external -# process to catalog the differences that were code reviewed, the -# following test can be applied to the code: -# -# Making sure that the entered bug-id number is correct. -# Validating that the code that was reviewed is indeed the code being -# checked in (using the bug-id number or a seperate review -# number to identify this particular code set.). -# -# If any of the above test failed, then the commit would be aborted. -# -# Actions such as mailing a copy of the report to each reviewer are -# better handled by an entry in the loginfo file. -# -# One thing that should be noted is the the ALL keyword is not -# supported. There can be only one entry that matches a given -# repository. diff --git a/mudclient/project.properties b/mudclient/project.properties deleted file mode 100644 index 34c231c7..00000000 --- a/mudclient/project.properties +++ /dev/null @@ -1,11 +0,0 @@ -maven.repo.remote=http://www.generationjava.com/jars2/,http://www.ibiblio.org/maven/ - -maven.ui.navcol.background=#f4f8d8 -maven.ui.banner.background=#000066 -maven.ui.section.background=#000066 -maven.ui.subsection.background=#000066 -maven.xdoc.date = left -maven.xdoc.version = v${pom.currentVersion} -maven.ui.breadcrumbs.background=#f4f8d8 - -maven.xdoc.poweredby.image=../1x1.gif diff --git a/mudclient/project.xml b/mudclient/project.xml deleted file mode 100644 index 9bb1ed43..00000000 --- a/mudclient/project.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - 3 - mudclient - mudclient - 0.2 - - OSJava - http://www.osjava.org/ - /images/osjava.gif - - 2003 - org.cyberiantiger - /images/1x1.gif - - - mudclient - - - If you want to connect to any mud other than elephant.org you'll - currently have to hack the source code, as there's some elephant specific - code in there. [support of their "external client mode"] - - - A mudclient - - http://www.osjava.org/mudclient/ - http://www.osjava.org:8080/jira/secure/BrowseProject.jspa?id=10011 - www.osjava.org/maven/mudclient - /sites/org/osjava/www/maven/genjava/mudclient/ - /sites/org/osjava/www/maven/builds/ - - - - - - 1.0 - 1.0 - HEAD - - - - - - - - - - - - Antony Riley - antony - antony@cyberiantiger.org - Cyberiantiger.org - - Java Developer - - - - - - - - - - - - - - antony@www.osjava.org - - src/java - src/test - - - - - src/test/config - config - - - src/test - - jndi.properties - - - - - **/*Test.java - - - - - - - - - - - - - - diff --git a/mudclient/src/java/org/cyberiantiger/console/AbstractConsoleAction.java b/mudclient/src/java/org/cyberiantiger/console/AbstractConsoleAction.java deleted file mode 100644 index 72dd5d47..00000000 --- a/mudclient/src/java/org/cyberiantiger/console/AbstractConsoleAction.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.cyberiantiger.console; - -public abstract class AbstractConsoleAction implements ConsoleAction { - - public boolean isEndOfLine() { - return false; - } - - public void appendToBuffer(StringBuffer buffer) { - } - -} diff --git a/mudclient/src/java/org/cyberiantiger/console/BackgroundConsoleAction.java b/mudclient/src/java/org/cyberiantiger/console/BackgroundConsoleAction.java deleted file mode 100644 index aff4d7fb..00000000 --- a/mudclient/src/java/org/cyberiantiger/console/BackgroundConsoleAction.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.cyberiantiger.console; - -public class BackgroundConsoleAction extends AbstractConsoleAction { - - private int color; - - public BackgroundConsoleAction(int color) { - this.color = color; - } - - public void apply(Console con) { - con.setBackground(color); - } -} diff --git a/mudclient/src/java/org/cyberiantiger/console/BeepConsoleAction.java b/mudclient/src/java/org/cyberiantiger/console/BeepConsoleAction.java deleted file mode 100644 index 2c1335fa..00000000 --- a/mudclient/src/java/org/cyberiantiger/console/BeepConsoleAction.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.cyberiantiger.console; - -public class BeepConsoleAction extends AbstractConsoleAction { - - public BeepConsoleAction() { - } - - public void apply(Console con) { - con.beep(); - } - -} diff --git a/mudclient/src/java/org/cyberiantiger/console/BoldConsoleAction.java b/mudclient/src/java/org/cyberiantiger/console/BoldConsoleAction.java deleted file mode 100644 index 4c1d2e71..00000000 --- a/mudclient/src/java/org/cyberiantiger/console/BoldConsoleAction.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.cyberiantiger.console; - -public class BoldConsoleAction extends AbstractConsoleAction { - - private boolean bold; - - public BoldConsoleAction(boolean bold) { - this.bold = bold; - } - - public void apply(Console con) { - con.setBold(bold); - } - -} diff --git a/mudclient/src/java/org/cyberiantiger/console/ClearScreenConsoleAction.java b/mudclient/src/java/org/cyberiantiger/console/ClearScreenConsoleAction.java deleted file mode 100644 index 7cfe732c..00000000 --- a/mudclient/src/java/org/cyberiantiger/console/ClearScreenConsoleAction.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.cyberiantiger.console; - -public class ClearScreenConsoleAction extends AbstractConsoleAction { - - public void apply(Console con) { - con.clearScreen(); - } - - public boolean isEndOfLine() { - return true; - } -} diff --git a/mudclient/src/java/org/cyberiantiger/console/Console.java b/mudclient/src/java/org/cyberiantiger/console/Console.java deleted file mode 100644 index 92452cd0..00000000 --- a/mudclient/src/java/org/cyberiantiger/console/Console.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.cyberiantiger.console; - -public interface Console { - - public static final int BLACK = 0; - public static final int RED = 1; - public static final int YELLOW = 2; - public static final int GREEN = 3; - public static final int CYAN = 4; - public static final int BLUE = 5; - public static final int MAGENTA = 6; - public static final int WHITE = 7; - - public static final int BOLD = 1 << 16; - public static final int FLASH = 1 << 17; - public static final int REVERSE = 1 << 18; - - public static final int DEFAULT = (BLACK<<8) | WHITE; - - public int getBufferSize(); - - public int getWidth(); - - public int getHeight(); - - public void resize(int width, int height); - - public void moveCursorX(int x); - - public void moveCursorY(int x); - - public int getCursorX(); - - public int getCursorY(); - - public void setCursorX(int x); - - public void setCursorY(int y); - - public void drawString(String str); - - public void drawString(char[] chars); - - public void drawString(char[] chars, int offset, int len); - - public void setForeground(int color); - - public void setBackground(int color); - - public void setBold(boolean bold); - - public void setFlash(boolean flash); - - public void setReverse(boolean reverse); - - public void clearScreen(); - - public void addAction(ConsoleAction action); - - public void beep(); - -} diff --git a/mudclient/src/java/org/cyberiantiger/console/ConsoleAction.java b/mudclient/src/java/org/cyberiantiger/console/ConsoleAction.java deleted file mode 100644 index c42e3f79..00000000 --- a/mudclient/src/java/org/cyberiantiger/console/ConsoleAction.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.cyberiantiger.console; - -public interface ConsoleAction { - - public void apply(Console console); - - public boolean isEndOfLine(); - - public void appendToBuffer(StringBuffer buffer); - -} diff --git a/mudclient/src/java/org/cyberiantiger/console/ElephantMUDConsoleAction.java b/mudclient/src/java/org/cyberiantiger/console/ElephantMUDConsoleAction.java deleted file mode 100644 index 8eef8792..00000000 --- a/mudclient/src/java/org/cyberiantiger/console/ElephantMUDConsoleAction.java +++ /dev/null @@ -1,181 +0,0 @@ -package org.cyberiantiger.console; - -import java.util.Map; -import java.util.HashMap; -import java.util.regex.*; -import java.io.*; - -public class ElephantMUDConsoleAction extends AbstractConsoleAction { - - private static Pattern mudMode = Pattern.compile("\\A\\(/(0|\".*\"),(0|\".*\"),(0|\".*\"),(-?\\d+),(-?\\d+),(-?\\d+),/\\)(.*)\\z$",Pattern.DOTALL); - - private static Map pinkFish = new HashMap(); - - public final static int NO_WRAP = 1; - public final static int NO_BLOCK = 2; - public final static int NO_BUFFER = 4; - public final static int IS_INVIS = 8; - public final static int IS_DEAD = 16; - public final static int IS_CHANNEL = 32; - public final static int NO_NEWLINE = 64; - - static { - ConsoleAction tmp; - pinkFish.put("RESET",new ResetConsoleAction()); - pinkFish.put("BOLD",new BoldConsoleAction(true)); - pinkFish.put("FLASH",new FlashConsoleAction(true)); - pinkFish.put("RED",new ForegroundConsoleAction(Console.RED)); - pinkFish.put("YELLOW",tmp=new ForegroundConsoleAction(Console.YELLOW)); - pinkFish.put("ORANGE",tmp); - pinkFish.put("GREEN",new ForegroundConsoleAction(Console.GREEN)); - pinkFish.put("CYAN",new ForegroundConsoleAction(Console.CYAN)); - pinkFish.put("BLUE",new ForegroundConsoleAction(Console.BLUE)); - pinkFish.put("MAGENTA",new ForegroundConsoleAction(Console.MAGENTA)); - pinkFish.put("BLACK",new ForegroundConsoleAction(Console.BLACK)); - pinkFish.put("WHITE",new ForegroundConsoleAction(Console.WHITE)); - pinkFish.put("B_RED",new BackgroundConsoleAction(Console.RED)); - pinkFish.put("B_YELLOW",tmp=new BackgroundConsoleAction(Console.YELLOW)); - pinkFish.put("B_ORANGE",tmp); - pinkFish.put("B_GREEN",new BackgroundConsoleAction(Console.GREEN)); - pinkFish.put("B_CYAN",new BackgroundConsoleAction(Console.CYAN)); - pinkFish.put("B_BLUE",new BackgroundConsoleAction(Console.BLUE)); - pinkFish.put("B_MAGENTA",new BackgroundConsoleAction(Console.MAGENTA)); - pinkFish.put("B_BLACK",new BackgroundConsoleAction(Console.BLACK)); - pinkFish.put("B_WHITE",new BackgroundConsoleAction(Console.WHITE)); - tmp = new NullConsoleAction(); - pinkFish.put("ENDTERM",tmp); - pinkFish.put("TERMSIZE",tmp); - pinkFish.put("TOINPUT",tmp); - pinkFish.put("TOMAIN",tmp); - pinkFish.put("TOSTATUS",tmp); - pinkFish.put("SC",tmp); - pinkFish.put("RC",tmp); - pinkFish.put("CLS",new ClearScreenConsoleAction()); - pinkFish.put("CLEOL",tmp); - pinkFish.put("BELL",new BeepConsoleAction()); - - // The following action(s) are not used by Elephant, but included for - // completeness - pinkFish.put("REVERSE",new ReverseConsoleAction(true)); - } - - private String pClass; - private String sClass; - private String orig; - private int flags; - private int indent; - private int wrapAt; - - private String data; - - public ElephantMUDConsoleAction(String data) { - Matcher m = mudMode.matcher(data); - if(m.matches()) { - String tmp; - tmp = m.group(1); - if(tmp.length()>1) pClass = tmp.substring(1,tmp.length()-1); - tmp = m.group(2); - if(tmp.length()>1) sClass = tmp.substring(1,tmp.length()-1); - tmp = m.group(3); - if(tmp.length()>1) orig = tmp.substring(1,tmp.length()-1); - flags = Integer.parseInt(m.group(4)); - indent = Integer.parseInt(m.group(5)); - wrapAt = Integer.parseInt(m.group(6)); - this.data = m.group(7); - } else { - this.data = data; - } - } - - public ElephantMUDConsoleAction( - String pClass,String sClass,String orig, - int flags, int indent, int wrapAt, String data - ) - { - this.pClass = pClass; - this.sClass = sClass; - this.orig = orig; - this.flags = flags; - this.indent = indent; - this.wrapAt = wrapAt; - this.data = data; - } - - public String getPrimaryClass() { - return pClass; - } - - public String getSecondaryClass() { - return sClass; - } - - public String getOrigin() { - return orig; - } - - public int getFlags() { - return flags; - } - - public int getIndent() { - return indent; - } - - public int getWrapAt() { - return wrapAt; - } - - public String getData() { - return data; - } - - public void apply(Console con) { - int w = con.getWidth(); - int h = con.getHeight(); - String[] lines = data.split("\r?\n"); - - // Check cursor position: If not at 0, newline - if(con.getCursorX() != 0) { - con.setCursorX(0); - con.moveCursorY(1); - } - - for(int i=0;i= 'A' && ch <= 'Z') || - (ch >= 'a' && ch <= 'z') - ) - { - switch(ch) { - case 'm': - StringTokenizer tokenizer = - new StringTokenizer(ansi.toString(),";"); - while(tokenizer.hasMoreTokens()) { - try { - int i = Integer.parseInt(tokenizer.nextToken()); - ConsoleAction action = null; - switch (i) { - case 0: - actions.add(new BoldConsoleAction(false)); - actions.add(new FlashConsoleAction(false)); - actions.add(new ReverseConsoleAction(false)); - break; - case 1: - action=new BoldConsoleAction(true); - break; - case 4: - // Underscore -> Not implemented. - break; - case 5: - action=new FlashConsoleAction(true); - break; - case 7: - action=new ReverseConsoleAction(true); - break; - case 8: - // Conceal -> Not implemented. - break; - case 30: - action=new ForegroundConsoleAction(Console.BLACK); - break; - case 31: - action=new ForegroundConsoleAction(Console.RED); - break; - case 32: - action=new ForegroundConsoleAction(Console.GREEN); - break; - case 33: - action=new ForegroundConsoleAction(Console.YELLOW); - break; - case 34: - action=new ForegroundConsoleAction(Console.BLUE); - break; - case 35: - action=new ForegroundConsoleAction(Console.MAGENTA); - break; - case 36: - action=new ForegroundConsoleAction(Console.CYAN); - break; - case 37: - action=new ForegroundConsoleAction(Console.WHITE); - break; - case 40: - action=new BackgroundConsoleAction(Console.BLACK); - break; - case 41: - action=new BackgroundConsoleAction(Console.RED); - break; - case 42: - action=new BackgroundConsoleAction(Console.GREEN); - break; - case 43: - action=new BackgroundConsoleAction(Console.YELLOW); - break; - case 44: - action=new BackgroundConsoleAction(Console.BLUE); - break; - case 45: - action=new BackgroundConsoleAction(Console.MAGENTA); - break; - case 46: - action=new BackgroundConsoleAction(Console.CYAN); - break; - case 47: - action=new BackgroundConsoleAction(Console.WHITE); - break; - - } - if(action != null) { - actions.add(action); - } - } catch (NumberFormatException nfe) { - } - } - break; - case 'H': - if(ansi.length() == 0){ - actions.add(new ClearScreenConsoleAction()); - } - break; - default: - ansi.append(ch); - System.out.println("Unknown escape string: \""+ansi+"\""); - } - ansi.setLength(0); - state = TEXT; - } else { - ansi.append(ch); - } - break; - } - } - - public void flush(MudClient client) { - Iterator i = actions.iterator(); - while(i.hasNext()) { - ConsoleAction action = (ConsoleAction) i.next(); - client.consoleAction(action); - } - actions.clear(); - client.consoleAction( - new StringConsoleAction(buffer,last_offset,offset-last_offset) - ); - last_offset = offset; - } - - public String getName() { - return "ANSI"; - } - - public boolean changeParser() { - return parserDetect != NONE; - } - - public Parser getNewParser() { - switch(parserDetect) { - case ELECLIENT: - return new ElephantMUDParser(); - default: - return this; - } - } -} diff --git a/mudclient/src/java/org/cyberiantiger/mudclient/parser/ElephantMUDParser.java b/mudclient/src/java/org/cyberiantiger/mudclient/parser/ElephantMUDParser.java deleted file mode 100644 index b4e6c7a9..00000000 --- a/mudclient/src/java/org/cyberiantiger/mudclient/parser/ElephantMUDParser.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.cyberiantiger.mudclient.parser; - -import java.util.*; -import org.cyberiantiger.console.*; -import org.cyberiantiger.mudclient.MudClient; - -public class ElephantMUDParser implements Parser { - - private List actions = new ArrayList(); - private boolean haveEscape = false; - - StringBuffer temp = new StringBuffer(); - - public ElephantMUDParser() { - } - - public void putChar(char ch) { - if(haveEscape) { - if(ch == 'D') { - String text = temp.toString(); - temp.setLength(0); - // XXX: A Hack to get around some messages not being - // done correctly - if(!text.startsWith("(/")) { - int i = text.indexOf("(/"); - actions.add( - new ElephantMUDConsoleAction( - "fail",null,null,0,0,0,text.substring(0,i) - ) - ); - text = text.substring(i); - } - actions.add(new ElephantMUDConsoleAction(text)); - } else { - // The mud isn't sending us stuff in external client mode ! - } - haveEscape = false; - } else { - if(ch == '\033') { - haveEscape = true; - } else { - temp.append(ch); - } - } - } - - public void flush(MudClient client) { - Iterator i = actions.iterator(); - while(i.hasNext()) { - ConsoleAction action = (ConsoleAction) i.next(); - client.consoleAction(action); - } - actions.clear(); - } - - public String getName() { - return "ELECLIENT"; - } - - public boolean changeParser() { - return false; - } - - public Parser getNewParser() { - return this; - } -} diff --git a/mudclient/src/java/org/cyberiantiger/mudclient/parser/Parser.java b/mudclient/src/java/org/cyberiantiger/mudclient/parser/Parser.java deleted file mode 100644 index 840f11c5..00000000 --- a/mudclient/src/java/org/cyberiantiger/mudclient/parser/Parser.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.cyberiantiger.mudclient.parser; - -import org.cyberiantiger.mudclient.MudClient; - - -public interface Parser { - - /** - * Push a character to this parser. - * - * @return The parser to push the next character to, may not always be - * this instance of parser - */ - public void putChar(char ch); - - /** - * Tell this parser to flush it's output to client. - */ - public void flush(MudClient client); - - /** - * Get the name of this parser - */ - public String getName(); - - /** - * Should we change the parser - */ - public boolean changeParser(); - - /** - * Get the new parser in the event that it should be changed. - */ - public Parser getNewParser(); -} diff --git a/mudclient/src/java/org/cyberiantiger/mudclient/ui/ConsoleModel.java b/mudclient/src/java/org/cyberiantiger/mudclient/ui/ConsoleModel.java deleted file mode 100644 index ec89bcfd..00000000 --- a/mudclient/src/java/org/cyberiantiger/mudclient/ui/ConsoleModel.java +++ /dev/null @@ -1,230 +0,0 @@ -package org.cyberiantiger.mudclient.ui; - -import java.util.*; -import java.awt.Toolkit; -import org.cyberiantiger.console.*; - -/** - * A Class to represent a text based console - */ -public class ConsoleModel implements Console { - - // The width of the console - int width; - // The height of the console - int height; - // The lines of buffer that the console uses. - private int bufferSize; - - // The buffer each element represents a line. - List buffer; - // The offset into the buffer, of the first line on the screen - int buffer_offset = 0; - // The X position of the cursor - private int cursor_x = 0; - // The Y position of the cursor - private int cursor_y = 0; - // Current set of attributes - private int attr = DEFAULT; - - public ConsoleModel(int width, int height, int bufferSize) { - this.width = width; - this.height = height; - this.bufferSize = bufferSize; - buffer = new LinkedList(); - } - - public int getBufferSize() { - return buffer_offset; - } - - public int getWidth() { - return width; - } - - public int getHeight() { - return height; - } - - public void resize(int width, int height) { - if(width != this.width || height != this.height) { - this.width = width; - this.height = height; - setCursorX(getCursorX()); - setCursorY(getCursorY()); - } - } - - public void moveCursorX(int x) { - setCursorX(getCursorX()+x); - } - - public void moveCursorY(int y) { - setCursorY(getCursorY()+y); - } - - public int getCursorX() { - return cursor_x; - } - - public int getCursorY() { - return cursor_y; - } - - public void setCursorX(int x) { - if(x > width) { - cursor_x = x % width; - setCursorY(getCursorY()+x/width); - } else if(x < 0) { - cursor_x = 0; - } else { - cursor_x = x; - } - } - - public void setCursorY(int y) { - if(y >= height) { - buffer_offset += y - height + 1; - cursor_y = height - 1; - while(buffer_offset > bufferSize) { - buffer.remove(0); - buffer_offset--; - } - } else if(y<0) { - cursor_y = 0; - } else { - cursor_y = y; - } - } - - public void drawString(String str) { - if(str.length() > 0) { - char[] data = new char[str.length()]; - str.getChars(0,data.length,data,0); - drawString(data,0,data.length); - } - } - - public void drawString(char[] chars) { - drawString(chars,0,chars.length); - } - - public void drawString(char[] chars, int offset, int len) { - if(len > 0) { - Line current = getCurrentLine(); - if(cursor_x + len > width) { - current.overwriteString(cursor_x, attr, chars, offset, width - cursor_x); - offset += width - cursor_x; - len -= width - cursor_x; - setCursorX(0); - setCursorY(cursor_y + 1); - drawString(chars, offset, len); - } else { - current.overwriteString(cursor_x, attr, chars, offset, len); - setCursorX(cursor_x + len); - } - } - } - - public void setForeground(int color) { - attr &= 0xffffff00; - attr |= color; - } - - public void setBackground(int color) { - attr &= 0xffff00ff; - attr |= (color << 8); - } - - public void setBold(boolean bold) { - attr |= BOLD; - if(!bold) { - attr ^= BOLD; - } - } - - public void setFlash(boolean flash) { - attr |= FLASH; - if(!flash) { - attr ^= FLASH; - } - } - - public void setReverse(boolean reverse) { - attr |= REVERSE; - if(!reverse) { - attr ^= REVERSE; - } - } - - public void clearScreen() { - for(int i=0;i= buffer.size()) { - return null; - } else { - return (Line) buffer.get(line); - } - } - - protected Line getCurrentLine() { - if(buffer_offset + cursor_y >= buffer.size()) { - for(int i=buffer.size();i<=buffer_offset + cursor_y;i++) { - buffer.add(null); - } - } - Line ret = (Line) buffer.get(buffer_offset + cursor_y); - if(ret == null) { - ret = new Line(); - buffer.set(buffer_offset + cursor_y, ret); - } - return ret; - } -} diff --git a/mudclient/src/java/org/cyberiantiger/mudclient/ui/ConsoleModelListener.java b/mudclient/src/java/org/cyberiantiger/mudclient/ui/ConsoleModelListener.java deleted file mode 100644 index 4184357a..00000000 --- a/mudclient/src/java/org/cyberiantiger/mudclient/ui/ConsoleModelListener.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.cyberiantiger.mudclient.ui; - -public interface ConsoleModelListener { - - public void consoleChanged(); - -} diff --git a/mudclient/src/java/org/cyberiantiger/mudclient/ui/ConsoleView.java b/mudclient/src/java/org/cyberiantiger/mudclient/ui/ConsoleView.java deleted file mode 100644 index a3fd03c2..00000000 --- a/mudclient/src/java/org/cyberiantiger/mudclient/ui/ConsoleView.java +++ /dev/null @@ -1,229 +0,0 @@ -package org.cyberiantiger.mudclient.ui; - -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; -import org.cyberiantiger.console.*; - -public class ConsoleView extends JComponent implements ConsoleModelListener -{ - - private ConsoleModel model; - private int lineOffset = 0; - - public ConsoleView(ConsoleModel model) { - this.model = model; - model.addView(this); - setOpaque(true); - setFont(new Font("monospaced",Font.PLAIN,14)); - setForeground(Color.white); - setBackground(Color.black); - setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR)); - enableEvents( - AWTEvent.MOUSE_EVENT_MASK | - AWTEvent.MOUSE_MOTION_EVENT_MASK | - AWTEvent.MOUSE_WHEEL_EVENT_MASK | - AWTEvent.COMPONENT_EVENT_MASK); - - } - - public synchronized void paintComponent(Graphics g) { - int width = getWidth(); - int height = getHeight(); - g.setFont(getFont()); - FontMetrics fm = g.getFontMetrics(); - int char_width = fm.charWidth('A'); - int row_height = fm.getHeight(); - { - // Fill the borders, and translate the origin - int w = model.getWidth() * char_width; - int x = (width - w) / 2; - int h = model.getHeight() * row_height; - int y = (height - h) / 2; - g.setColor(getBackground()); - g.fillRect(0,0,width,y); - g.fillRect(0,y+h,width,height-y-h); - g.fillRect(0,y,x,h); - g.fillRect(x+w,y,width-x-w,h); - g.translate(x,y); - } - int text_offset = row_height - fm.getDescent(); - int y = 0; - for(int i=0;i>8) & 7) { - case ConsoleModel.BLACK: - return Color.black; - case ConsoleModel.RED: - return Color.red; - case ConsoleModel.YELLOW: - return Color.yellow; - case ConsoleModel.GREEN: - return Color.green; - case ConsoleModel.CYAN: - return Color.cyan; - case ConsoleModel.BLUE: - return Color.blue; - case ConsoleModel.MAGENTA: - return Color.magenta; - case ConsoleModel.WHITE: - return Color.white; - } - return Color.black; - } - - public Dimension getPreferredSize() { - FontMetrics fm = getFontMetrics(getFont()); - int row_height = fm.getHeight(); - int char_width = fm.charWidth('A'); - return new Dimension( - model.getWidth() * char_width, - model.getHeight() * row_height - ); - - } - - public Dimension getMinimumSize() { - FontMetrics fm = getFontMetrics(getFont()); - int row_height = fm.getHeight(); - int char_width = fm.charWidth('A'); - return new Dimension( - char_width, - row_height - ); - } - - /** - * Write something to our model - */ - public synchronized void consoleAction(ConsoleAction action) { - cancelSelection(); - model.addAction(action); - } - - /** - * Resize our model depending on our size - */ - public synchronized void resizeConsole() { - FontMetrics fm = getFontMetrics(getFont()); - int width = getWidth() / fm.charWidth('A'); - int height = getHeight() / fm.getHeight(); - - if(width < 1) { - width = 1; - } - if(height < 1) { - height = 1; - } - model.addAction(new ResizeConsoleAction(width,height)); - } - - private boolean doing_selection; - private int x_start; - private int y_start; - - private int char_x_start; - private int char_y_start; - private int char_x_end; - private int char_y_end; - - private void startSelection(int x, int y) { - } - - private void continueSelection(int x, int y) { - } - - private void endSelection(int x, int y) { - } - - private void cancelSelection() { - } - - protected void processComponentEvent(ComponentEvent ce) { - super.processComponentEvent(ce); - if(ce.getID() == ComponentEvent.COMPONENT_RESIZED) { - resizeConsole(); - } - } - - protected void processMouseEvent(MouseEvent me) { - super.processMouseEvent(me); - if(me.getID() == MouseEvent.MOUSE_PRESSED) { - startSelection(me.getX(),me.getY()); - } else if(me.getID() == MouseEvent.MOUSE_RELEASED) { - endSelection(me.getX(),me.getY()); - } - } - - protected void processMouseMotionEvent(MouseEvent me) { - super.processMouseMotionEvent(me); - if(me.getID() == MouseEvent.MOUSE_DRAGGED) { - continueSelection(me.getX(),me.getY()); - } - } - - protected void processMouseWhellEvent(MouseWheelEvent mwe) { - System.out.println("Got MouseWheelEvent: "+mwe); - super.processMouseWheelEvent(mwe); - } - - public void consoleChanged() { - repaint(); - } -} diff --git a/mudclient/src/java/org/cyberiantiger/mudclient/ui/ControlWindow.java b/mudclient/src/java/org/cyberiantiger/mudclient/ui/ControlWindow.java deleted file mode 100644 index 89b3e5c8..00000000 --- a/mudclient/src/java/org/cyberiantiger/mudclient/ui/ControlWindow.java +++ /dev/null @@ -1,216 +0,0 @@ -package org.cyberiantiger.mudclient.ui; - -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; -import java.util.*; -import org.cyberiantiger.mudclient.MudClient; -import org.cyberiantiger.mudclient.parser.*; -import org.cyberiantiger.mudclient.net.MudConnection; -import org.cyberiantiger.console.*; - -public class ControlWindow extends JFrame { - - private MudClient client; - - private JMenuBar menuBar; - private JMenu fileMenu; - private JMenu emulationMenu; - private JMenu helpMenu; - private JMenuItem connectMenuItem; - private JMenuItem disconnectMenuItem; - private JMenuItem exitMenuItem; - private JMenuItem ansiMenuItem; - private JMenuItem externalMenuItem; - private JMenuItem helpMenuItem; - private JMenuItem aboutMenuItem; - private JTabbedPane tabbedOutputPane; - private JTextField inputField; - - private MudClientUI defaultOutput; - private Map customOutput = new HashMap(); - private Map views = new HashMap(); - - public ControlWindow(MudClient client) { - super("Elephant Mud Client"); - this.client = client; - initComponents(); - } - - private void initComponents() { - setDefaultCloseOperation(EXIT_ON_CLOSE); - - menuBar = new JMenuBar(); - fileMenu = new JMenu("File"); - emulationMenu = new JMenu("Emulation"); - helpMenu = new JMenu("Help"); - connectMenuItem = new JMenuItem("Connect"); - disconnectMenuItem= new JMenuItem("Disconnect"); - exitMenuItem = new JMenuItem("Exit"); - ansiMenuItem = new JMenuItem("Ansi"); - externalMenuItem = new JMenuItem("External Client"); - helpMenuItem = new JMenuItem("Help"); - aboutMenuItem = new JMenuItem("About"); - - menuBar.add(fileMenu); - menuBar.add(emulationMenu); - menuBar.add(helpMenu); - - fileMenu.add(connectMenuItem); - fileMenu.add(disconnectMenuItem); - fileMenu.add(exitMenuItem); - - emulationMenu.add(ansiMenuItem); - emulationMenu.add(externalMenuItem); - - helpMenu.add(helpMenuItem); - helpMenu.add(aboutMenuItem); - - connectMenuItem.addActionListener( - new ActionListener() { - public void actionPerformed(ActionEvent e) { - client.connect(); - } - }); - disconnectMenuItem.setEnabled(false); - disconnectMenuItem.addActionListener( - new ActionListener() { - public void actionPerformed(ActionEvent e) { - client.disconnect(); - } - }); - exitMenuItem.addActionListener( - new ActionListener() { - public void actionPerformed(ActionEvent e) { - client.exit(); - } - }); - ansiMenuItem.addActionListener( - new ActionListener() { - public void actionPerformed(ActionEvent e) { - client.setParser(new ANSIParser()); - } - }); - externalMenuItem.addActionListener( - new ActionListener() { - public void actionPerformed(ActionEvent e) { - client.setParser(new ElephantMUDParser()); - } - }); - helpMenuItem.setEnabled(false); - aboutMenuItem.setEnabled(false); - setJMenuBar(menuBar); - - getContentPane().setLayout(new BorderLayout()); - tabbedOutputPane = new JTabbedPane( - JTabbedPane.BOTTOM, - JTabbedPane.WRAP_TAB_LAYOUT - ); - getContentPane().add(tabbedOutputPane,BorderLayout.CENTER); - - inputField = new JTextField(); - inputField.setFont(new Font("monospaced",Font.PLAIN,14)); - inputField.addKeyListener( - new KeyListener() { - public void keyPressed(KeyEvent e) {} - public void keyReleased(KeyEvent e) {} - public void keyTyped(KeyEvent e) { - // Hack, should use getKeyCode(), but for some - // reason java swallows it. - if(e.getKeyChar() == '\n') { - client.command( - getSelectedView().getViewID(), - inputField.getText() - ); - inputField.selectAll(); - } - } - }); - - getContentPane().add(inputField,BorderLayout.SOUTH); - - defaultOutput = createView("Main"); - defaultOutput.sendSizeChangeEvents(client); - - pack(); - - enableEvents(AWTEvent.WINDOW_EVENT_MASK); - } - - public MudClientUI createView(String id) { - MudClientUI ui = getView(id); - if(ui != null) { - return ui; - } else { - ui = new MudClientUI(id); - tabbedOutputPane.addTab(id, ui); - views.put(id,ui); - return ui; - } - } - - public void deleteView(String id) { - } - - public MudClientUI getView(String viewId) { - return (MudClientUI) views.get(viewId); - } - - public MudClientUI getSelectedView() { - return (MudClientUI)tabbedOutputPane.getSelectedComponent(); - } - - public void processWindowEvent(WindowEvent we) { - super.processWindowEvent(we); - if(we.getID() == WindowEvent.WINDOW_CLOSING) { - client.exit(); - } - } - - public void consoleAction(ConsoleAction action) { - if(action instanceof ElephantMUDConsoleAction) { - ElephantMUDConsoleAction eAction = - (ElephantMUDConsoleAction) action; - - String tmp = eAction.getPrimaryClass(); - - // First check if there's an existing window to grab this message. - String outputName; - MudClientUI destination; - - if((destination = (MudClientUI)customOutput.get(tmp) ) == null) { - if((outputName = client.getCustomOutputName(tmp)) == null) { - destination = defaultOutput; - } else { - destination = createView(outputName); - java.util.List types = client.getCustomOutputTypes(outputName); - Iterator i = types.iterator(); - while(i.hasNext()) { - customOutput.put(i.next(), destination); - } - } - } - destination.consoleAction(action); - } else { - defaultOutput.consoleAction(action); - } - } - - public void connectionStatusChanged(int newStatus) { - switch(newStatus) { - case MudConnection.CONNECTED: - disconnectMenuItem.setEnabled(true); - connectMenuItem.setEnabled(false); - break; - case MudConnection.CONNECTING: - case MudConnection.DISCONNECTING: - disconnectMenuItem.setEnabled(false); - connectMenuItem.setEnabled(false); - break; - case MudConnection.DISCONNECTED: - disconnectMenuItem.setEnabled(false); - connectMenuItem.setEnabled(true); - break; - } - } -} diff --git a/mudclient/src/java/org/cyberiantiger/mudclient/ui/Line.java b/mudclient/src/java/org/cyberiantiger/mudclient/ui/Line.java deleted file mode 100644 index 1c6237fa..00000000 --- a/mudclient/src/java/org/cyberiantiger/mudclient/ui/Line.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.cyberiantiger.mudclient.ui; - -import java.util.List; -import java.util.ArrayList; - -public class Line { - - public LineSegment first = null; - - public Line() { - } - - public void overwriteString(int offset,int attr,String str) { - LineSegment segment = new LineSegment(str, attr); - overwriteSegment(offset,segment); - } - - public void overwriteString(int offset,int attr,char[] chars,int off,int len) - { - LineSegment segment = new LineSegment(chars,off,len, attr); - overwriteSegment(offset,segment); - } - - public void overwriteSegment(int offset,LineSegment segment) { - if(first == null) { - if(offset != 0) { - first = new LineSegment(offset,ConsoleModel.DEFAULT); - first.next = segment; - } else { - first = segment; - } - } else { - if(offset == 0) { - segment.next = first.deleteChars(segment.len); - first = segment; - } else { - first.overwriteSegment(offset,segment); - } - } - } - - public String toString() { - StringBuffer ret = new StringBuffer(); - LineSegment seg = first; - while(seg != null) { - ret.append(seg.data,seg.offset,seg.len); - seg = seg.next; - } - return ret.toString(); - } -} diff --git a/mudclient/src/java/org/cyberiantiger/mudclient/ui/LineSegment.java b/mudclient/src/java/org/cyberiantiger/mudclient/ui/LineSegment.java deleted file mode 100644 index cc32e3c3..00000000 --- a/mudclient/src/java/org/cyberiantiger/mudclient/ui/LineSegment.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.cyberiantiger.mudclient.ui; - -public class LineSegment { - - public char[] data; - public int offset; - public int len; - public int attr; - public LineSegment next = null; - - // Create a new segment, consisting of len spaces. - public LineSegment(int len,int attr) { - data = new char[len]; - for (int i=0;i len) { - if(next == null) { - next = new LineSegment(offset-len,ConsoleModel.DEFAULT); - next.next = segment; - } else { - next.overwriteSegment(offset-len, segment); - } - } else if(offset == len) { - if(next == null) { - // appends to this segment - this.next = segment; - } else { - // overwrites the next segment, and maybe the one after that. - segment.next = next.deleteChars(segment.len); - this.next = segment; - } - } else { - if(offset + segment.len > len) { - // Carries on, into next segment - segment.next = next.deleteChars(this.len - offset); - this.next = segment; - this.len = offset; - } else if(offset + segment.len == len) { - // Overwrites the latter half of this segment. - this.len = offset; - segment.next = this.next; - this.next = segment; - } else { - // Splits this segment in two. - LineSegment tail = new LineSegment(data,this.offset + offset + segment.len, len - offset - segment.len, this.attr); - tail.next = this.next; - segment.next = tail; - this.next = segment; - } - } - } - - public LineSegment deleteChars(int number) { - if(number > len) { - if(next != null) { - return next.deleteChars(number - len); - } else { - return null; - } - } else if(number == len) { - return next; - } else { - offset += number; - len -= number; - return this; - } - } - - public String toString() { - return new String(data,offset,len); - } -} diff --git a/mudclient/src/java/org/cyberiantiger/mudclient/ui/MudClientUI.java b/mudclient/src/java/org/cyberiantiger/mudclient/ui/MudClientUI.java deleted file mode 100644 index d7a31e24..00000000 --- a/mudclient/src/java/org/cyberiantiger/mudclient/ui/MudClientUI.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.cyberiantiger.mudclient.ui; - -import java.awt.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import javax.swing.*; -import javax.swing.event.*; -import org.cyberiantiger.console.*; -import org.cyberiantiger.mudclient.MudClient; -import org.cyberiantiger.mudclient.net.*; -import org.cyberiantiger.mudclient.parser.*; - -public class MudClientUI extends JPanel implements ConsoleModelListener { - - private ConsoleModel model; - private ConsoleView view; - private JScrollBar scrollBar; - private String viewID; - private MudClient client; - - public MudClientUI(String viewID) { - this.viewID = viewID; - model = new ConsoleModel(80,25,2000); - view = new ConsoleView(model); - scrollBar = new JScrollBar(JScrollBar.VERTICAL); - - model.addView(this); - - scrollBar.addAdjustmentListener( - new AdjustmentListener() { - public void adjustmentValueChanged(AdjustmentEvent ae) { - view.setLineOffset(scrollBar.getValue()); - } - }); - - setLayout(new BorderLayout()); - add(BorderLayout.CENTER,view); - add(BorderLayout.EAST,scrollBar); - } - - public String getViewID() { - return viewID; - } - - public void consoleChanged() { - scrollBar.setBlockIncrement(model.getHeight()); - scrollBar.setValues( - model.getBufferSize(), - model.getHeight(), - 0, - model.getHeight() + model.getBufferSize() - ); - if(client != null) { - client.setWindowSize(model.getWidth(),model.getHeight()); - } - } - - public void consoleAction(ConsoleAction action) { - view.consoleAction(action); - } - - public void sendSizeChangeEvents(MudClient client) { - this.client = client; - } -} diff --git a/mudclient/src/java/org/cyberiantiger/telnet/AbstractTelnetOption.java b/mudclient/src/java/org/cyberiantiger/telnet/AbstractTelnetOption.java deleted file mode 100644 index 502f528c..00000000 --- a/mudclient/src/java/org/cyberiantiger/telnet/AbstractTelnetOption.java +++ /dev/null @@ -1,102 +0,0 @@ -package org.cyberiantiger.telnet; - -public abstract class AbstractTelnetOption implements TelnetOption { - - protected int option; - - public AbstractTelnetOption(int option) { - this.option = option; - } - - public int getOption() { - return option; - } - - public byte[] getBytes() { - return new byte[] { (byte) IAC, (byte) option }; - } - - public String toString() { - return "IAC " + commandToString(option); - } - - protected String commandToString(int command) { - switch(command) { - case SE: return "SE"; - case NOP: return "NOP"; - case DM: return "DM"; - case BRK: return "BRK"; - case IP: return "IP"; - case AO: return "AO"; - case AYT: return "AYT"; - case EC: return "EC"; - case EL: return "EL"; - case GA: return "GA"; - case SB: return "SB"; - case WILL: return "WILL"; - case WONT: return "WONT"; - case DO: return "DO"; - case DONT: return "DONT"; - case IAC: return "IAC"; - default: return "<" + command + ">"; - } - } - - protected String optionToString(int option) { - switch(option) { - case TOPT_BIN: return "TOPT_BIN"; - case TOPT_ECHO: return "TOPT_ECHO"; - case TOPT_RECN: return "TOPT_RECN"; - case TOPT_SUPP: return "TOPT_SUPP"; - case TOPT_APRX: return "TOPT_APRX"; - case TOPT_STAT: return "TOPT_STAT"; - case TOPT_TIM: return "TOPT_TIM"; - case TOPT_REM: return "TOPT_REM"; - case TOPT_OLW: return "TOPT_OLW"; - case TOPT_OPS: return "TOPT_OPS"; - case TOPT_OCRD: return "TOPT_OCRD"; - case TOPT_OHT: return "TOPT_OHT"; - case TOPT_OHTD: return "TOPT_OHTD"; - case TOPT_OFD: return "TOPT_OFD"; - case TOPT_OVT: return "TOPT_OVT"; - case TOPT_OVTD: return "TOPT_OVTD"; - case TOPT_OLD: return "TOPT_OLD"; - case TOPT_EXT: return "TOPT_EXT"; - case TOPT_LOGO: return "TOPT_LOGO"; - case TOPT_BYTE: return "TOPT_BYTE"; - case TOPT_DATA: return "TOPT_DATA"; - case TOPT_SUP: return "TOPT_SUP"; - case TOPT_SUPO: return "TOPT_SUPO"; - case TOPT_SNDL: return "TOPT_SNDL"; - case TOPT_TERM: return "TOPT_TERM"; - case TOPT_EOR: return "TOPT_EOR"; - case TOPT_TACACS: return "TOPT_TACACS"; - case TOPT_OM: return "TOPT_OM"; - case TOPT_TLN: return "TOPT_TLN"; - case TOPT_3270: return "TOPT_3270"; - case TOPT_X_3: return "TOPT_X_3"; - case TOPT_NAWS: return "TOPT_NAWS"; - case TOPT_TS: return "TOPT_TS"; - case TOPT_RFC: return "TOPT_RFC"; - case TOPT_LINE: return "TOPT_LINE"; - case TOPT_XDL: return "TOPT_XDL"; - case TOPT_AUTH: return "TOPT_AUTH"; - case TOPT_ENVIR: return "TOPT_ENVIR"; - case TOPT_TN3270E: return "TOPT_TN3270E"; - case TOPT_XAUTH: return "TOPT_XAUTH"; - case TOPT_CHARSET: return "TOPT_CHARSET"; - case TOPT_RSP: return "TOPT_RSP"; - case TOPT_COMPORT: return "TOPT_COMPORT"; - case TOPT_SLE: return "TOPT_SLE"; - case TOPT_STARTTLS: return "TOPT_STARTTLS"; - case TOPT_KERMIT: return "TOPT_KERMIT"; - case TOPT_SEND_URL: return "TOPT_SEND_URL"; - case TOPT_EXTOP: return "TOPT_EXTOP"; - default: return "<" + option + ">"; - } - } - - protected String dataToString(byte[] data) { - return "\"" + new String(data) + "\""; - } -} diff --git a/mudclient/src/java/org/cyberiantiger/telnet/AbstractTelnetSubOption.java b/mudclient/src/java/org/cyberiantiger/telnet/AbstractTelnetSubOption.java deleted file mode 100644 index eee6300a..00000000 --- a/mudclient/src/java/org/cyberiantiger/telnet/AbstractTelnetSubOption.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyberiantiger.telnet; - -public abstract class AbstractTelnetSubOption extends AbstractTelnetOption { - - protected int suboption; - - public AbstractTelnetSubOption(int option, int suboption) { - super(option); - this.suboption = suboption; - } - - public int getSubOption() { - return suboption; - } - - public byte[] getBytes() { - return new byte[] { (byte) IAC, (byte) option, (byte) suboption }; - } - - public String toString() { - return super.toString() + " " + optionToString(suboption); - } -} diff --git a/mudclient/src/java/org/cyberiantiger/telnet/BinaryData.java b/mudclient/src/java/org/cyberiantiger/telnet/BinaryData.java deleted file mode 100644 index ddfd9355..00000000 --- a/mudclient/src/java/org/cyberiantiger/telnet/BinaryData.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.cyberiantiger.telnet; - -public interface BinaryData { - - public byte[] getBytes(); - -} diff --git a/mudclient/src/java/org/cyberiantiger/telnet/OptionParser.java b/mudclient/src/java/org/cyberiantiger/telnet/OptionParser.java deleted file mode 100644 index 21e093b2..00000000 --- a/mudclient/src/java/org/cyberiantiger/telnet/OptionParser.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.cyberiantiger.telnet; - -import java.io.InputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -/** - * A static class for parsing telnet options, coz it's stateless. - */ -public class OptionParser { - - // No-One can instantiate the class - private OptionParser() {} - - public static TelnetOption parseOption(InputStream in, int option) - throws IOException - { - if(option < 240) { - return new UnknownTelnetOption(option); - } else if(option < 250) { - return new SimpleTelnetOption(option); - } else if(option == TelnetOption.SB) { - int suboption = in.read(); - // Check for end of stream. - if(suboption == -1) return null; - ByteArrayOutputStream out = new ByteArrayOutputStream(40); - while(true) { - int i = in.read(); - // Check for end of stream. - if(i == -1) return null; - if(i == TelnetOption.IAC) { - int j = in.read(); - // Check for end of stream. - if(j == -1) return null; - if(j == TelnetOption.IAC) { - out.write(TelnetOption.IAC); - } else if(j == TelnetOption.SE) { - return new TelnetSubOption(suboption, out.toByteArray()); - } else { - // It's a broken telnet implementation, assume they - // just forgot to double the TelnetOption.IAC. - out.write(TelnetOption.IAC); - out.write(j); - } - } else { - out.write(i); - } - } - } else { - int suboption = in.read(); - if(suboption == -1) return null; - return new TelnetNegotiation(option, suboption); - } - } -} diff --git a/mudclient/src/java/org/cyberiantiger/telnet/SimpleTelnetOption.java b/mudclient/src/java/org/cyberiantiger/telnet/SimpleTelnetOption.java deleted file mode 100644 index a233735b..00000000 --- a/mudclient/src/java/org/cyberiantiger/telnet/SimpleTelnetOption.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.cyberiantiger.telnet; - -public class SimpleTelnetOption extends AbstractTelnetOption { - - public SimpleTelnetOption(int option) { - super(option); - } -} diff --git a/mudclient/src/java/org/cyberiantiger/telnet/SimpleTelnetSession.java b/mudclient/src/java/org/cyberiantiger/telnet/SimpleTelnetSession.java deleted file mode 100644 index 3c285e64..00000000 --- a/mudclient/src/java/org/cyberiantiger/telnet/SimpleTelnetSession.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.cyberiantiger.telnet; - -import java.io.*; - -public abstract class SimpleTelnetSession implements TelnetSession { - - private OutputStream out; - - String term; - int width = 0; - int height = 0; - - boolean nawsOn = false; - boolean termOn = false; - - public SimpleTelnetSession(String term) { - this.term = term; - } - - public void receiveOption(TelnetOption opt) - throws IOException - { - if(opt instanceof TelnetNegotiation) { - TelnetOption reply; - switch(opt.getOption()) { - case TelnetOption.WILL: - switch(((TelnetNegotiation)opt).getSubOption()) { - case TelnetOption.TOPT_ECHO: - serverWillEcho(true); - break; - default: - break; - } - break; - case TelnetOption.WONT: - switch(((TelnetNegotiation)opt).getSubOption()) { - case TelnetOption.TOPT_ECHO: - serverWillEcho(false); - break; - default: - break; - } - break; - case TelnetOption.DO: - switch(((TelnetNegotiation)opt).getSubOption()) { - case TelnetOption.TOPT_TERM: - reply = new TelnetNegotiation( - TelnetOption.WILL, - TelnetOption.TOPT_TERM - ); - out.write(reply.getBytes()); - termOn = true; - break; - case TelnetOption.TOPT_NAWS: - reply = new TelnetNegotiation( - TelnetOption.WILL, - TelnetOption.TOPT_NAWS - ); - out.write(reply.getBytes()); - nawsOn = true; - sendWindowSize(); - break; - default: - // Ignored - break; - } - break; - case TelnetOption.DONT: - break; - } - } else if(opt instanceof TelnetSubOption) { - byte[] data; - data = ((TelnetSubOption)opt).getData(); - switch(((TelnetSubOption)opt).getSubOption()) { - case TelnetOption.TOPT_TERM: - if(data.length == 1 && data[0] == TelnetOption.SEND) { - sendTerminalType(); - } - default: - break; - } - } - } - - public void setOutputStream(OutputStream out) throws IOException { - this.out = out; - } - - public void sendWindowSize() throws IOException { - if(out != null && nawsOn && (width != 0 || height != 0) ) { - TelnetOption opt = new TelnetSubOption( - TelnetOption.TOPT_NAWS, - new byte[] { - ((byte) ((width>>8) & 0xff)), - ((byte) (width & 0xff)), - ((byte) ((height>>8) & 0xff)), - ((byte) (height & 0xff)) - }); - out.write(opt.getBytes()); - } - } - - public void sendTerminalType() throws IOException { - if(out != null && termOn) { - byte[] term = this.term.getBytes(); - byte[] data = new byte[term.length+1]; - data[0] = TelnetOption.IS; - System.arraycopy(term,0,data,1,term.length); - TelnetOption opt = new TelnetSubOption( - TelnetOption.TOPT_TERM, - data); - out.write(opt.getBytes()); - } - } - - public void setWindowSize(int width, int height) throws IOException { - if(this.width != width || this.height != height) { - this.width = width; - this.height = height; - sendWindowSize(); - } - } - - protected abstract void serverWillEcho(boolean echo); -} diff --git a/mudclient/src/java/org/cyberiantiger/telnet/TelnetBufferedInputStream.java b/mudclient/src/java/org/cyberiantiger/telnet/TelnetBufferedInputStream.java deleted file mode 100644 index 8c10be32..00000000 --- a/mudclient/src/java/org/cyberiantiger/telnet/TelnetBufferedInputStream.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.cyberiantiger.telnet; - -import java.io.*; - -/** - * A buffered input stream which will not do a blocking read unless explictely - * told to do so - */ -public class TelnetBufferedInputStream extends FilterInputStream { - - private byte[] buffer = new byte[2048]; - private int off = 0; - private int len = 0; - private boolean allowBlocking = false; - - public TelnetBufferedInputStream(InputStream in) { - super(in); - } - - public int read() throws IOException { - if(allowBlocking && len == 0) { - fillBuffer(); - } - if(len <= 0) { - return -1; - } - len--; - return buffer[off++] & 0xff; - } - - public int read(byte[] b) throws IOException { - return read(b, 0, b.length); - } - - public int read(byte[] b, int bOff, int bLen) throws IOException { - if(allowBlocking && len == 0) { - fillBuffer(); - } - if(len <= 0) { - return -1; - } - if(len > bLen) { - System.arraycopy(buffer,off,b,bOff,bLen); - len -= bLen; - off += bLen; - } else { - System.arraycopy(buffer,off,b,bOff,len); - bLen = len; - len = 0; - } - return bLen; - } - - public void fillBuffer() throws IOException { - if(len != 0) return; - off = 0; - len = in.read(buffer,off,buffer.length - len); - } - - public int available() throws IOException { - return len; - } - - public void setAllowBlocking(boolean allowBlocking) { - this.allowBlocking = allowBlocking; - } -} diff --git a/mudclient/src/java/org/cyberiantiger/telnet/TelnetInputStream.java b/mudclient/src/java/org/cyberiantiger/telnet/TelnetInputStream.java deleted file mode 100644 index e12dd59d..00000000 --- a/mudclient/src/java/org/cyberiantiger/telnet/TelnetInputStream.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.cyberiantiger.telnet; - -import java.io.*; - -public abstract class TelnetInputStream extends FilterInputStream { - - byte[] buffer = new byte[2048]; - int off = 0; - int len = 0; - - boolean inTelnetOpt = false; - int toptVal = -1; - - public TelnetInputStream(InputStream in) { - super(new TelnetBufferedInputStream(in)); - } - - /** - * Fill the buffer in this object. - */ - private void fillBuffer() throws IOException { - if(len != 0) return; - if(in.available() == -1) { - // NO MORE DATA ! - len = -1; - return; - } - off = 0; - if(inTelnetOpt) { - try { - ((TelnetBufferedInputStream)in).setAllowBlocking(true); - if(toptVal == -1) { - int ch = in.read(); - if(ch == -1) { - len = -1; - return; - } else if(ch == TelnetOption.IAC) { - buffer[len++] = (byte) ch; - } else { - TelnetOption opt = OptionParser.parseOption(in,ch); - parseTelnetOption(opt); - } - } else { - TelnetOption opt = OptionParser.parseOption(in,toptVal); - parseTelnetOption(opt); - } - } finally { - inTelnetOpt = false; - ((TelnetBufferedInputStream)in).setAllowBlocking(false); - } - } - if(in.available() == 0) { - ((TelnetBufferedInputStream)in).fillBuffer(); - } - int ch; - while( (ch = in.read()) != -1) { - if(ch == TelnetOption.IAC) { - ch = in.read(); - if(ch != TelnetOption.IAC) { - inTelnetOpt = true; - toptVal = ch; - // Read no more at this point, we have the start of a - // telnet option. - break; - } else { - buffer[len++] = (byte)ch; - } - } else { - buffer[len++] = (byte)ch; - } - } - // Recursive call to ensure we at least have either the end of stream - // or one byte to read when this method exits. - if(len == 0) fillBuffer(); - } - - public int read() throws IOException { - if(len == 0) { - fillBuffer(); - } - if(len == -1) { - return -1; - } - len--; - return buffer[off++] & 0xff; - } - - public int read(byte[] b) throws IOException { - return read(b,0,b.length); - } - - public int read(byte[] b, int bOff, int bLen) throws IOException { - if(len == 0) { - fillBuffer(); - } - if(len == -1) { - return -1; - } - if(len>bLen) { - System.arraycopy(buffer,off,b,bOff,bLen); - len -= bLen; - off += bLen; - } else { - System.arraycopy(buffer,off,b,bOff,len); - bLen = len; - len = 0; - } - return bLen; - } - - public int available() throws IOException { - return len; - } - - public void close() throws IOException { - in.close(); - } - - protected abstract void parseTelnetOption(TelnetOption topt) - throws IOException; -} diff --git a/mudclient/src/java/org/cyberiantiger/telnet/TelnetNegotiation.java b/mudclient/src/java/org/cyberiantiger/telnet/TelnetNegotiation.java deleted file mode 100644 index 927d4b3a..00000000 --- a/mudclient/src/java/org/cyberiantiger/telnet/TelnetNegotiation.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.cyberiantiger.telnet; - -public class TelnetNegotiation extends AbstractTelnetSubOption { - - public TelnetNegotiation(int option, int suboption) { - super(option, suboption); - } - -} diff --git a/mudclient/src/java/org/cyberiantiger/telnet/TelnetOption.java b/mudclient/src/java/org/cyberiantiger/telnet/TelnetOption.java deleted file mode 100644 index f62e62d8..00000000 --- a/mudclient/src/java/org/cyberiantiger/telnet/TelnetOption.java +++ /dev/null @@ -1,135 +0,0 @@ -package org.cyberiantiger.telnet; - -import java.io.IOException; -import java.io.OutputStream; - -public interface TelnetOption extends BinaryData { - - /** - * Top Level Telnet Stuff - */ - public static final int SE = 240; - public static final int NOP = 241; - public static final int DM = 242; - public static final int BRK = 243; - public static final int IP = 244; - public static final int AO = 245; - public static final int AYT = 246; - public static final int EC = 247; - public static final int EL = 248; - public static final int GA = 249; - public static final int SB = 250; - public static final int WILL = 251; - public static final int WONT = 252; - public static final int DO = 253; - public static final int DONT = 254; - public static final int IAC = 255; - - /** - * Telnet Option Types - */ - // TOPT_BIN Binary Transmission 0 Std Rec 856 27 - public static final int TOPT_BIN = 0; - // TOPT_ECHO Echo 1 Std Rec 857 28 - public static final int TOPT_ECHO = 1; - // TOPT_RECN Reconnection 2 Prop Ele ... - public static final int TOPT_RECN = 2; - // TOPT_SUPP Suppress Go Ahead 3 Std Rec 858 29 - public static final int TOPT_SUPP = 3; - // TOPT_APRX Approx Message Size Negotiation 4 Prop Ele ... - public static final int TOPT_APRX = 4; - // TOPT_STAT Status 5 Std Rec 859 30 - public static final int TOPT_STAT = 5; - // TOPT_TIM Timing Mark 6 Std Rec 860 31 - public static final int TOPT_TIM = 6; - // TOPT_REM Remote Controlled Trans and Echo 7 Prop Ele 726 - public static final int TOPT_REM = 7; - // TOPT_OLW Output Line Width 8 Prop Ele ... - public static final int TOPT_OLW = 8; - // TOPT_OPS Output Page Size 9 Prop Ele ... - public static final int TOPT_OPS = 9; - // TOPT_OCRD Output Carriage-Return Disposition 10 Hist Ele 652 * - public static final int TOPT_OCRD = 10; - // TOPT_OHT Output Horizontal Tabstops 11 Hist Ele 653 * - public static final int TOPT_OHT = 11; - // TOPT_OHTD Output Horizontal Tab Disposition 12 Hist Ele 654 * - public static final int TOPT_OHTD = 12; - // TOPT_OFD Output Formfeed Disposition 13 Hist Ele 655 * - public static final int TOPT_OFD = 13; - // TOPT_OVT Output Vertical Tabstops 14 Hist Ele 656 * - public static final int TOPT_OVT = 14; - // TOPT_OVTD Output Vertical Tab Disposition 15 Hist Ele 657 * - public static final int TOPT_OVTD = 15; - // TOPT_OLD Output Linefeed Disposition 16 Hist Ele 658 * - public static final int TOPT_OLD = 16; - // TOPT_EXT Extended ASCII 17 Prop Ele 698 - public static final int TOPT_EXT = 17; - // TOPT_LOGO Logout 18 Prop Ele 727 - public static final int TOPT_LOGO = 18; - // TOPT_BYTE Byte Macro 19 Prop Ele 735 - public static final int TOPT_BYTE = 19; - // TOPT_DATA Data Entry Terminal 20 Prop Ele 1043 - public static final int TOPT_DATA = 20; - // TOPT_SUP SUPDUP 21 Prop Ele 736 - public static final int TOPT_SUP = 21; - // TOPT_SUPO SUPDUP Output 22 Prop Ele 749 - public static final int TOPT_SUPO = 22; - // TOPT_SNDL Send Location 23 Prop Ele 779 - public static final int TOPT_SNDL = 23; - // TOPT_TERM Terminal Type 24 Prop Ele 1091 - public static final int TOPT_TERM = 24; - // TOPT_EOR End of Record 25 Prop Ele 885 - public static final int TOPT_EOR = 25; - // TOPT_TACACS TACACS User Identification 26 Prop Ele 927 - public static final int TOPT_TACACS = 26; - // TOPT_OM Output Marking 27 Prop Ele 933 - public static final int TOPT_OM = 27; - // TOPT_TLN Terminal Location Number 28 Prop Ele 946 - public static final int TOPT_TLN = 28; - // TOPT_3270 Telnet 3270 Regime 29 Prop Ele 1041 - public static final int TOPT_3270 = 29; - // TOPT_X.3 X.3 PAD 30 Prop Ele 1053 - public static final int TOPT_X_3 = 30; - // TOPT_NAWS Negotiate About Window Size 31 Prop Ele 1073 - public static final int TOPT_NAWS = 31; - // TOPT_TS Terminal Speed 32 Prop Ele 1079 - public static final int TOPT_TS = 32; - // TOPT_RFC Remote Flow Control 33 Prop Ele 1372 - public static final int TOPT_RFC = 33; - // TOPT_LINE Linemode 34 Draft Ele 1184 - public static final int TOPT_LINE = 34; - // TOPT_XDL X Display Location 35 Prop Ele 1096 - public static final int TOPT_XDL = 35; - // TOPT_ENVIR Telnet Environment Option 36 Hist Not 1408 - //public static final int TOPT_ENVIR = 36; - // TOPT_AUTH Telnet Authentication Option 37 Exp Ele 1416 - public static final int TOPT_AUTH = 37; - // TOPT_ENVIR Telnet Environment Option 39 Prop Ele 1572 - public static final int TOPT_ENVIR = 39; - // TOPT_TN3270E TN3270 Enhancements 40 Draft Ele 2355 * - public static final int TOPT_TN3270E = 40; - // TOPT_XAUTH Telnet XAUTH 41 Exp - public static final int TOPT_XAUTH = 41; - // TOPT_CHARSET Telnet CHARSET 42 Exp 2066 - public static final int TOPT_CHARSET = 42; - // TOPT_RSP Telnet Remote Serial Port 43 Exp - public static final int TOPT_RSP = 43; - // TOPT_COMPORT Telnet Com Port Control 44 Exp 2217 - public static final int TOPT_COMPORT = 44; - // TOPT_SLE Telnet Suppress Local Echo 45 Exp * - public static final int TOPT_SLE = 45; - // TOPT_STARTTLS Telnet Start TLS 46 Exp * - public static final int TOPT_STARTTLS = 46; - // TOPT_KERMIT Telnet KERMIT 47 Exp * - public static final int TOPT_KERMIT = 47; - // TOPT_SEND-URL Send-URL 48 Exp * - public static final int TOPT_SEND_URL = 48; - // TOPT_EXTOP Extended-Options-List 255 Std Rec 861 32 - public static final int TOPT_EXTOP = 255; - - // First Byte in Subnegotation: IAC SB