[e-cvs] cvs commit: e/src/jsrc/org/erights/e/ui/jed BrickLayer.java EAction.java EDismissListener.java EItemListener.java EMenuBar.java ETextChangedListener.java EditGroup.java JedMain.java

markm@eros.cs.jhu.edu markm@eros.cs.jhu.edu
Thu, 6 Sep 2001 05:55:59 -0400


markm       01/09/06 05:55:57

  Modified:    src/jsrc/net/captp/jcomm CapTPReplacer.java
                        CapTPResolver.java DelayedRedirector.java
                        Far3Desc.java FarHandler.java ImportDesc.java
                        IncomingDesc.java Introducer.java LocatorUnum.java
                        LookupHandler.java NewFarDesc.java
                        NewRemotePromiseDesc.java NonceLocator.java
                        ObjectID.java ObjectRefDesc.java Promise3Desc.java
                        ProxyConnection.java ProxyMgr.java Redirector.java
                        RemoteHandler.java RemotePromiseHandler.java
                        Sturdifier.java SturdyRef.java
               src/jsrc/net/captp/tables AnswersTable.java CommTable.java
                        ExportsTable.java ImportsTable.java
                        NearGiftTable.java PromiseGiftTable.java
                        QuestionsTable.java SwissTable.java Vine.java
               src/jsrc/net/ertp Assay.java
                        InsufficientERightsException.java Issuer.java
                        Purse.java
               src/jsrc/net/vattp/data ConnectionAttemptFailed.java
                        ConnectionsMgr.java DES.java DataCommThunk.java
                        DataConnection.java DataPath.java Decrypt3DES.java
                        EARL.java Encrypt3DES.java ListenThread.java
                        Msg.java MsgHandler.java NetAddr.java
                        NetConfig.java NewConnectionReactor.java
                        RecvThread.java SendThread.java
                        StartUpProtocol.java StreamMessage.java
                        Suspend.java TripleDESKeyConstructor.java
                        UserThread.java VatIdentity.java
                        VatLocationLookup.java
               src/jsrc/net/vattp/security ESecureRandom.java
                        MicroTime.java Native.java
                        SecureRandomCrewSeedIt.java TimerJitterEntropy.java
               src/jsrc/net/vattp/tunnel HTTPClient.java
                        HTTPConnectionHandler.java HTTPInputStream.java
                        HTTPMsgID.java HTTPServeMain.java
                        HTTPSocketCtl.java TCPConnectionListener.java
               src/jsrc/net/vattp/vls VatLocationServer.java
               src/jsrc/org/apache/oro/text/regex CharStringPointer.java
                        MalformedPatternException.java MatchResult.java
                        OpCode.java Pattern.java PatternCompiler.java
                        PatternMatcher.java PatternMatcherInput.java
                        Perl5Compiler.java Perl5Debug.java
                        Perl5MatchResult.java Perl5Matcher.java
                        Perl5Pattern.java Perl5Repetition.java
                        Perl5Substitution.java StringSubstitution.java
                        Substitution.java Util.java
               src/jsrc/org/capml/dom Element.java Node.java Text.java
               src/jsrc/org/capml/quasi QuasiContent.java
                        QuasiContentExprHole.java QuasiContentList.java
                        QuasiContentPattHole.java QuasiElement.java
                        QuasiText.java XMLQuasiParser.java
               src/jsrc/org/erights/build EYaccFixer.java
               src/jsrc/org/erights/e/develop/assertion Assertion.java
                        AssertionFailed.java
               src/jsrc/org/erights/e/develop/exception ExceptionMgr.java
                        ExceptionNoticer.java NestedError.java
                        NestedException.java NestedIOException.java
                        NestedThrowable.java PrintStreamWriter.java
                        ThrowableSugar.java
               src/jsrc/org/erights/e/develop/format ETimeFormat.java
                        StringHelper.java
               src/jsrc/org/erights/e/develop/trace Trace.java
                        TraceBuffer.java TraceCaller.java
                        TraceConstants.java TraceController.java
                        TraceDateToString.java TraceErrorWatcher.java
                        TraceExceptionNoticer.java
                        TraceLevelTranslator.java TraceLog.java
                        TraceLogDescriptor.java TraceMessage.java
                        TraceMessageAcceptor.java
                        TraceMessageStringifier.java
                        TraceSubsystemMediator.java
                        TraceTxtVersionNamer.java TraceVersionNamer.java
               src/jsrc/org/erights/e/elang/evm AssignExpr.java
                        CallExpr.java CatchExpr.java CdrPattern.java
                        DefineExpr.java EExpr.java EImpl.java EMeta.java
                        EMethod.java ENode.java EScript.java
                        EscapeExpr.java Evaluator.java FinalPattern.java
                        FinallyExpr.java HideExpr.java IfExpr.java
                        IgnorePattern.java ListPattern.java
                        LiteralExpr.java MatchBindExpr.java Matcher.java
                        MetaExpr.java NounExpr.java ObjectExpr.java
                        Pattern.java QuasiLiteralExpr.java
                        QuasiLiteralPatt.java QuasiPatternExpr.java
                        QuasiPatternPatt.java ScopeExpr.java SendExpr.java
                        SeqExpr.java SlotExpr.java StaticScope.java
                        SuchThatPattern.java VarPattern.java
               src/jsrc/org/erights/e/elang/interp Help.java
                        InteractiveInterp.java Interp.java InterpLoop.java
                        Interpreter.java LazyEvalSlot.java LoaderScope.java
                        Loop.java PackageScope.java ProtocolDesc.java
                        ResourceUriGetter.java ScopeSetup.java
                        URLGetter.java UnsafeLoaderScope.java
               src/jsrc/org/erights/e/elang/scope MutableScope.java
                        Scope.java ScopeImpl.java
                        UndefinedVariableException.java
               src/jsrc/org/erights/e/elang/syntax Assoc.java EBuilder.java
                        ELexer.java EParser.java FileFeeder.java
                        HilbertHotel.java LineFeeder.java Literal.java
                        MsgPatt.java PrettyFeeder.java QuasiFeeder.java
                        QuasiPart.java SyntaxException.java URI.java
               src/jsrc/org/erights/e/elang/visitors
                        AlphaRenameVisitor.java CopyVisitor.java
                        ETreeVisitor.java RenameVisitor.java
                        SubstVisitor.java
               src/jsrc/org/erights/e/elib/base Callable.java
                        ClassDesc.java Ejection.java Ejector.java
                        MessageDesc.java MethodNode.java
                        NonBlockingInputStream.java ParamDesc.java
                        ParseNode.java Script.java SourceSpan.java
                        TextWriter.java Thunk.java TypeDesc.java
                        UnQuote.java
               src/jsrc/org/erights/e/elib/deflect Deflector.java
                        EventualDeflector.java ImmediateDeflector.java
               src/jsrc/org/erights/e/elib/eio TextReader.java
               src/jsrc/org/erights/e/elib/prim CallThunk.java
                        ConstructorNode.java E.java InstanceMethodNode.java
                        JavaMemberNode.java ListenerDeflector.java
                        Message.java MirandaMethods.java
                        OverloaderNode.java PendingEvent.java Queue.java
                        Runner.java RunnerThread.java ScriptMaker.java
                        ShutDownVatException.java StaticMaker.java
                        StaticMethodNode.java SugarMethodNode.java
                        SynchQueue.java Thrower.java VTable.java
                        VarGetterNode.java VarSetterNode.java WeakPtr.java
                        WeakPtrThread.java
               src/jsrc/org/erights/e/elib/prim/tests ERunDemo.java
               src/jsrc/org/erights/e/elib/quasi FirstCharSplitter.java
                        Identifiers.java IncompleteQuasiException.java
                        MatchMaker.java QuasiExprParser.java
                        QuasiPatternParser.java SimpleQuasiParser.java
                        Substituter.java ValueMaker.java
               src/jsrc/org/erights/e/elib/ref BufferingRef.java
                        DeviceRef.java DisconnectedRef.java FarRef.java
                        LocalResolver.java NearRef.java
                        OneArgFuncAdapter.java Proxy.java ProxyHandler.java
                        ProxyResolver.java Ref.java RemotePromise.java
                        Resolver.java ResultResolver.java SlotRef.java
                        StemCell.java SwitchableRef.java Switcher.java
                        UnconnectedRef.java ViciousCycleException.java
                        WhenBrokenReactor.java WhenResolvedReactor.java
               src/jsrc/org/erights/e/elib/sealing Amplifiable.java
                        Brand.java SealedBox.java Sealer.java Unsealer.java
                        UnsealingException.java
               src/jsrc/org/erights/e/elib/serial PassByConstruction.java
                        PassByConstructionGuard.java PassByProxy.java
                        PassByProxyGuard.java PersistenceReplacer.java
                        PersistenceResolver.java Persistent.java
                        RemoteCall.java RemoteDelivery.java Serializer.java
                        Unserializer.java
               src/jsrc/org/erights/e/elib/slot FinalSlot.java
                        FinalSlotMaker.java NullOkMaker.java
                        RuinedSlot.java SettableSlot.java
                        SettableSlotMaker.java SimpleSlot.java
                        SimpleSlotMaker.java Slot.java SlotDefiner.java
                        SlotGuard.java ValueGuard.java VoidMaker.java
               src/jsrc/org/erights/e/elib/tables ArrayedList.java
                        AssocFunc.java AtomicTwine.java Column.java
                        CompFunc.java CompositeTwine.java ConstList.java
                        ConstListImpl.java ConstMap.java ConstMapImpl.java
                        ConstSubclassSet.java CycleBreaker.java EList.java
                        EMap.java EmptyTwine.java EqualityKeyColumn.java
                        Equalizer.java FlexList.java FlexListImpl.java
                        FlexMap.java FlexMapImpl.java
                        IdentityKeyColumn.java IdentityMap.java
                        IndirectCompFunc.java IntColumn.java IntTable.java
                        KeyColumn.java LocatedTwine.java
                        NotSettledException.java ROList.java ROMap.java
                        RefColumn.java SamenessKeyColumn.java
                        ScalarColumn.java Selfless.java ShareCount.java
                        SimpleCompFunc.java SimpleTwine.java Twine.java
                        VoidColumn.java WeakKey.java WeakKeyMap.java
                        WeakValue.java WeakValueMap.java
               src/jsrc/org/erights/e/elib/tests TestELib.java
                        TestMultiQ.java
               src/jsrc/org/erights/e/elib/util
                        AlreadyDefinedException.java
                        ArityMismatchException.java ClassCache.java
                        ConditionLock.java DeadManSwitch.java
                        DynamicCollection.java
                        DynamicCollectionEnumeration.java
                        HexStringUtils.java IdentityFunc.java Once.java
                        OneArgFunc.java TwineException.java
               src/jsrc/org/erights/e/extern/file ConsoleInputHandler.java
                        ConsoleMaker.java ConsoleThread.java
               src/jsrc/org/erights/e/extern/timer Clock.java
                        TickReactor.java Timeout.java Timer.java
                        TimerQEntry.java TimerThread.java TimerWatcher.java
               src/jsrc/org/erights/e/meta/java/awt ComponentSugar.java
                        ContainerSugar.java
               src/jsrc/org/erights/e/meta/java/awt/event
                        ActionListenerDeflector.java
                        FocusListenerDeflector.java
                        KeyListenerDeflector.java
                        MouseListenerDeflector.java WindowEventSugar.java
                        WindowListenerDeflector.java
               src/jsrc/org/erights/e/meta/java/io BufferedReaderSugar.java
                        FileGetter.java FileSugar.java
                        InputStreamSugar.java ReadOnlyFile.java
                        ReaderSugar.java
               src/jsrc/org/erights/e/meta/java/lang ArrayGuardSugar.java
                        BooleanSugar.java Bufferer.java ByteGuardSugar.java
                        CharacterSugar.java ClassGuardSugar.java
                        DoubleGuardSugar.java DoubleSugar.java
                        FloatGuardSugar.java IntegerGuardSugar.java
                        InterfaceGuardSugar.java LongGuardSugar.java
                        ProcessSugar.java RunnableDeflector.java
                        ShortGuardSugar.java StringBufferSugar.java
                        StringGuardSugar.java VoidGuardSugar.java
               src/jsrc/org/erights/e/meta/java/math
                        BigIntegerGuardSugar.java BigIntegerMakerSugar.java
                        BigIntegerSugar.java
               src/jsrc/org/erights/e/meta/java/net URLSugar.java
               src/jsrc/org/erights/e/meta/java/util DictionarySugar.java
                        EnumerationDeflector.java EnumerationSugar.java
                        VectorSugar.java
               src/jsrc/org/erights/e/meta/javax/swing/event
                        ListSelectionListenerDeflector.java
               src/jsrc/org/erights/e/meta/net/vattp/data
                        MsgHandlerDeflector.java
                        NewConnectionReactorDeflector.java
               src/jsrc/org/erights/e/meta/org/erights/e/elang/visitors
                        ETreeVisitorDeflector.java
               src/jsrc/org/erights/e/meta/org/erights/e/elib/base
                        ThunkDeflector.java TypeDescGuardSugar.java
               src/jsrc/org/erights/e/meta/org/erights/e/elib/ref
                        RefGuardSugar.java
               src/jsrc/org/erights/e/meta/org/erights/e/elib/slot
                        SlotDeflector.java SlotGuardDeflector.java
                        SlotGuardGuardSugar.java ValueGuardDeflector.java
                        ValueGuardGuardSugar.java
               src/jsrc/org/erights/e/meta/org/erights/e/elib/tables
                        AssocFuncDeflector.java EListGuardSugar.java
               src/jsrc/org/erights/e/meta/org/erights/e/elib/util
                        OneArgFuncDeflector.java
               src/jsrc/org/erights/e/meta/org/erights/e/extern/timer
                        TickReactorDeflector.java
               src/jsrc/org/erights/e/ui/elmer EInterpAdapter.java
                        ElmerMain.java
               src/jsrc/org/erights/e/ui/jed BrickLayer.java EAction.java
                        EDismissListener.java EItemListener.java
                        EMenuBar.java ETextChangedListener.java
                        EditGroup.java JedMain.java
  Log:
  just formatting and import cleanups

Revision  Changes    Path
1.3       +21 -21    e/src/jsrc/net/captp/jcomm/CapTPReplacer.java

Index: CapTPReplacer.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/CapTPReplacer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CapTPReplacer.java	2001/08/29 00:20:15	1.2
+++ CapTPReplacer.java	2001/09/06 09:55:38	1.3
@@ -26,39 +26,39 @@
 import org.erights.e.elib.util.OneArgFunc;
 
 /**
- * Used to specialize the Serializer for encoding a reference over a CapTP 
+ * Used to specialize the Serializer for encoding a reference over a CapTP
  * connection.
  * <p>
- * When our run method returns an {@link ObjectRefDesc}, the corresponding 
- * decoded object is not simply this ObjectRefDesc.  It is this ObjectRefDesc 
- * as dereferenced by {@link CapTPResolver}. 
+ * When our run method returns an {@link ObjectRefDesc}, the corresponding
+ * decoded object is not simply this ObjectRefDesc.  It is this ObjectRefDesc
+ * as dereferenced by {@link CapTPResolver}.
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 /*package*/ class CapTPReplacer implements OneArgFunc {
-    
-    /** 
-     * The connection over which we are communicating 
+
+    /**
+     * The connection over which we are communicating
      */
     private ProxyConnection myConn;
 
     /**
-     * 
+     *
      */
     /*package*/ CapTPReplacer(ProxyConnection conn) {
         myConn = conn;
     }
-    
+
     /**
-     * Replace any proxiable object (an implementer of PassByProxy, a Far 
-     * reference, a Promise, or a Broken reference) with an appropriate 
-     * over-the-wire representation, or if it's not a proxiable object, make 
+     * Replace any proxiable object (an implementer of PassByProxy, a Far
+     * reference, a Promise, or a Broken reference) with an appropriate
+     * over-the-wire representation, or if it's not a proxiable object, make
      * sure we're actually permitted to pass it by construction.
      */
     public Object run(Object ref) {
         ref = Ref.resolution(ref);
-        
-        //the following sequence of tests are cribbed from Ref.isPBC, except 
+
+        //the following sequence of tests are cribbed from Ref.isPBC, except
         //that we don't guard it with an isNear test, so as to include broken
         //references.
         if (null == ref) {
@@ -71,21 +71,21 @@
         }
         if (clazz.isArray()) {
             //Because we try to pretend that arrays are PassByCopy lists,
-            //we just pass arrays by copy.  This is XXX a potential security 
-            //bug or at least a possible semantic confusion, since arrays are 
-            //not actually immutable.  After passing, the original and passed 
-            //copy may diverge, whereas in an eventual send within a vat, 
-            //they wouldn't diverge. 
+            //we just pass arrays by copy.  This is XXX a potential security
+            //bug or at least a possible semantic confusion, since arrays are
+            //not actually immutable.  After passing, the original and passed
+            //copy may diverge, whereas in an eventual send within a vat,
+            //they wouldn't diverge.
             return ref;
         }
         if (PassByConstruction.HONORARY.has(clazz)) {
             return ref;
         }
         //end PCB testing
-        
+
         if (Ref.isEventual(ref)) {
             return myConn.makeEventualDesc(Ref.toRef(ref));
-        } 
+        }
         if (Ref.isNear(ref)) {
             if (Ref.isPassByProxy(ref)) {
                 return myConn.makeImportingDesc(ref);



1.3       +7 -7      e/src/jsrc/net/captp/jcomm/CapTPResolver.java

Index: CapTPResolver.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/CapTPResolver.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CapTPResolver.java	2001/08/29 00:20:15	1.2
+++ CapTPResolver.java	2001/09/06 09:55:38	1.3
@@ -31,22 +31,22 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 /*package*/ class CapTPResolver implements OneArgFunc {
-    
-    /** 
-     * The connection over which we are communicating 
+
+    /**
+     * The connection over which we are communicating
      */
     private ProxyConnection myConn;
 
-    
+
     /**
-     * 
+     *
      */
     /*package*/ CapTPResolver(ProxyConnection conn) {
         myConn = conn;
     }
-    
+
     /**
-     * Replace ObjectRefDescs in the input stream with the object reference 
+     * Replace ObjectRefDescs in the input stream with the object reference
      * they {@link ObjectRefDesc#dereference(ProxyConnection)} to.
      */
     public Object run(Object ref) {



1.7       +46 -46    e/src/jsrc/net/captp/jcomm/DelayedRedirector.java

Index: DelayedRedirector.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/DelayedRedirector.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DelayedRedirector.java	2001/08/29 00:20:15	1.6
+++ DelayedRedirector.java	2001/09/06 09:55:38	1.7
@@ -18,102 +18,102 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 import org.erights.e.elib.prim.E;
-import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.ref.ProxyResolver;
+import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.ref.Resolver;
-import org.erights.e.elib.util.DeadManSwitch;
-import org.erights.e.elib.util.OneArgFunc;
 import org.erights.e.elib.sealing.Brand;
 import org.erights.e.elib.sealing.SealedBox;
 import org.erights.e.elib.sealing.Unsealer;
 import org.erights.e.elib.serial.PassByProxy;
+import org.erights.e.elib.util.DeadManSwitch;
+import org.erights.e.elib.util.OneArgFunc;
 
 /**
- * Wraps a ProxyResolver for a RemotePromise in a way suitable for inclusion 
- * as an argument in the first whenMoreResolved message, in order to preserve 
- * reference-full-order. 
+ * Wraps a ProxyResolver for a RemotePromise in a way suitable for inclusion
+ * as an argument in the first whenMoreResolved message, in order to preserve
+ * reference-full-order.
  *
  * @author Mark S. Miller
  */
-/*package*/ class DelayedRedirector 
+/*package*/ class DelayedRedirector
 implements DeadManSwitch, OneArgFunc, PassByProxy {
-    
+
     /**
      *
      */
     private ProxyResolver myOptResolver;
-    
+
     /**
      *
      */
     /*package*/ DelayedRedirector(ProxyResolver resolver) {
         myOptResolver = resolver;
     }
-    
+
     /**
-     * On the first response, send a second whenMoreResolved on the original 
-     * RemotePromise, and then resolve the ProxyResolver to a Promise that 
-     * will be resolved by the answer to this second whenMoreResolved. 
+     * On the first response, send a second whenMoreResolved on the original
+     * RemotePromise, and then resolve the ProxyResolver to a Promise that
+     * will be resolved by the answer to this second whenMoreResolved.
      * <p>
-     * This ensures that all messages have drained out of the previous path 
-     * before enabling the new path.  Once I've done my one-time-job, I 
-     * become inoperative. 
+     * This ensures that all messages have drained out of the previous path
+     * before enabling the new path.  Once I've done my one-time-job, I
+     * become inoperative.
      * <p>
-     * The argument of this first response is ignored (thanks Dean!).  The 
-     * argument of the second response is used as the true resolution of my 
+     * The argument of this first response is ignored (thanks Dean!).  The
+     * argument of the second response is used as the true resolution of my
      * RemotePromise.
      */
     public Object run(Object target) {
         if (null == myOptResolver) {
-            //If my RemotePromise is already resolved, then ignore further 
+            //If my RemotePromise is already resolved, then ignore further
             //resolution attempts
             return null;
         }
-        
-        RemotePromiseHandler rvh = 
+
+        RemotePromiseHandler rvh =
             (RemotePromiseHandler)myOptResolver.optHandler();
         if (rvh.isFresh()) {
-            //If no messages have yet been sent over my RemotePromise, then 
-            //there's no message ordering issue, so resolve to target 
-            //immediately. 
+            //If no messages have yet been sent over my RemotePromise, then
+            //there's no message ordering issue, so resolve to target
+            //immediately.
             myOptResolver.resolve(target);
             return null;
         }
-        
+
         ProxyConnection conn = rvh.myConn;
         Unsealer unsealer = conn.getUnsealer();
         Brand brand = unsealer.brand();
         SealedBox optTargetBox = Ref.optMeta(target, brand);
-        RemoteHandler optTargetHandler = 
+        RemoteHandler optTargetHandler =
             (RemoteHandler)unsealer.unseal(optTargetBox, RemoteHandler.class);
         if (null != optTargetHandler && conn == optTargetHandler.myConn) {
-            
-            //If the new target is a remote reference into the same vat that 
-            //my RemotePromise is into, then messages to be sent over target 
-            //will only arrive after messages previously sent on this 
-            //RemotePromise, so again there's no message ordering issue, and 
+
+            //If the new target is a remote reference into the same vat that
+            //my RemotePromise is into, then messages to be sent over target
+            //will only arrive after messages previously sent on this
+            //RemotePromise, so again there's no message ordering issue, and
             //we can resolve to target immediately.
-            
+
             myOptResolver.resolve(target);
             return null;
         }
-        
-        //If we fall through the above special cases, then we're in the 
-        //general case, where we do need to deal with the message ordering 
-        //issue.  In this case, ignore the run/1 argument, send a last 
-        //whenMoreResolved/1 message over the RemotePromise with a simple 
-        //redirector as argument, and then resolve to a promise whose 
-        //resolver is held by that redirector. 
+
+        //If we fall through the above special cases, then we're in the
+        //general case, where we do need to deal with the message ordering
+        //issue.  In this case, ignore the run/1 argument, send a last
+        //whenMoreResolved/1 message over the RemotePromise with a simple
+        //redirector as argument, and then resolve to a promise whose
+        //resolver is held by that redirector.
         //
-        //This will locally buffer messages until all previous messages have 
-        //been drained out, and will then resolve to the argument of the 
-        //second run/1 message (thereby delivering all buffered messages as 
-        //well). 
-        
+        //This will locally buffer messages until all previous messages have
+        //been drained out, and will then resolve to the argument of the
+        //second run/1 message (thereby delivering all buffered messages as
+        //well).
+
         Object[] pair = Ref.promise();
         Redirector rdr = new Redirector((Resolver)pair[1]);
         E.sendOnly(myOptResolver.getProxy(), "whenMoreResolved", rdr);
@@ -121,7 +121,7 @@
         myOptResolver = null;
         return null;
     }
-    
+
     /**
      * Smash the ProxyResolver with the arg.
      */



1.5       +4 -3      e/src/jsrc/net/captp/jcomm/Far3Desc.java

Index: Far3Desc.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/Far3Desc.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Far3Desc.java	2001/08/20 21:17:49	1.4
+++ Far3Desc.java	2001/09/06 09:55:38	1.5
@@ -19,11 +19,12 @@
 Contributor(s): ______________________________________.
 */
 
-import java.math.BigInteger;
 import net.captp.tables.Vine;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.tables.ConstList;
 
+import java.math.BigInteger;
+
 /**
  * The encoding of FarRef over the wire to someone other than the vat
  * it points into. <p>
@@ -34,9 +35,9 @@
  * @author Mark Miller
  */
 /*package*/ class Far3Desc implements ObjectRefDesc {
-    
+
     static private final long serialVersionUID = 1183670781832213637L;
-    
+
     private ConstList mySearchPath;
     private String myHostID;
     private BigInteger myNonce;



1.4       +4 -4      e/src/jsrc/net/captp/jcomm/FarHandler.java

Index: FarHandler.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/FarHandler.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FarHandler.java	2001/05/03 08:58:44	1.3
+++ FarHandler.java	2001/09/06 09:55:38	1.4
@@ -22,13 +22,13 @@
 import java.math.BigInteger;
 
 /**
- * A resolved reference that's still remote is necessarily a reference to a 
- * PassByProxy object. 
+ * A resolved reference that's still remote is necessarily a reference to a
+ * PassByProxy object.
  *
  * @author Mark S. Miller
  */
 /*package*/ class FarHandler extends RemoteHandler {
-    
+
     /*package*/ BigInteger mySwissHash;
 
     /**
@@ -36,7 +36,7 @@
      *
      * @param connection The ProxyConnection to communicate via
      * @param pos The Imports or Questions map pos of the object
-     * @param swissHash The identity (within the connection's remote vat) of 
+     * @param swissHash The identity (within the connection's remote vat) of
      *                  the object this FarRef designates.
      */
     /*package*/ FarHandler(ProxyConnection conn,



1.5       +4 -4      e/src/jsrc/net/captp/jcomm/ImportDesc.java

Index: ImportDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/ImportDesc.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ImportDesc.java	2001/08/20 21:17:49	1.4
+++ ImportDesc.java	2001/09/06 09:55:38	1.5
@@ -32,11 +32,11 @@
  * @author Mark Miller
  */
 /*package*/ class ImportDesc implements ObjectRefDesc {
-    
+
     static private final long serialVersionUID = 5581130955096436339L;
-    
+
     private int myImportPos;
-    
+
     /**
      *
      */
@@ -60,7 +60,7 @@
     public Object dereference(ProxyConnection conn) {
         validate();
         Ref result = conn.getImport(myImportPos);
-                                              
+
         if (Trace.captp.debug && Trace.ON) {
             Trace.captp.debugm("" + conn + "." + this.toString());
         }



1.5       +2 -2      e/src/jsrc/net/captp/jcomm/IncomingDesc.java

Index: IncomingDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/IncomingDesc.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- IncomingDesc.java	2001/08/20 21:17:49	1.4
+++ IncomingDesc.java	2001/09/06 09:55:38	1.5
@@ -33,9 +33,9 @@
  * @author Mark Miller
  */
 /*package*/ class IncomingDesc implements ObjectRefDesc {
-    
+
     static private final long serialVersionUID = 7071220903919564143L;
-    
+
     private int myIncomingPos;
 
     /**



1.12      +52 -51    e/src/jsrc/net/captp/jcomm/Introducer.java

Index: Introducer.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/Introducer.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Introducer.java	2001/08/17 03:11:32	1.11
+++ Introducer.java	2001/09/06 09:55:38	1.12
@@ -1,27 +1,23 @@
 package net.captp.jcomm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.UnknownHostException;
-import java.security.KeyPair;
 import net.captp.tables.SwissTable;
 import net.vattp.data.EARL;
 import net.vattp.data.NetConfig;
@@ -35,37 +31,42 @@
 import org.erights.e.elib.tables.ConstMap;
 import org.erights.e.extern.timer.Timer;
 
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.UnknownHostException;
+import java.security.KeyPair;
+
 /**
- * This object is in the E-language programmer's top level namespace as the 
+ * This object is in the E-language programmer's top level namespace as the
  * representative of the CapTP system.
  *
- * An Introducer may already have an identity assigned, in which case it's 
- * identified, or not, in which case it's unidentified.  Introducers start 
+ * An Introducer may already have an identity assigned, in which case it's
+ * identified, or not, in which case it's unidentified.  Introducers start
  * off unidentified, but once identified, always identified.
  *
- * An Introducer may be on-the-air or off-the-air.  If an unidentified 
- * Introducer goes on-the-air, it will first (privately) generate an identity 
- * to identify itself.  Since only an identified Introducer may be 
- * on-the-air, we have three states altogether.  For now, an on-the-air 
- * Introducer doesn't yet have a way to go back off-the-air, but we expect to 
- * add such an operation. 
+ * An Introducer may be on-the-air or off-the-air.  If an unidentified
+ * Introducer goes on-the-air, it will first (privately) generate an identity
+ * to identify itself.  Since only an identified Introducer may be
+ * on-the-air, we have three states altogether.  For now, an on-the-air
+ * Introducer doesn't yet have a way to go back off-the-air, but we expect to
+ * add such an operation.
  *
  * @author Mark S. Miller, markm@caplet.com
  */
 public class Introducer implements PassByProxy, Persistent {
-    
+
     /** Changes by going on-the-air */
     NetConfig myNetConfig;
     ESecureRandom myEntropy;
     Timer myPersistentTimer;
-    
+
     /** if identified */
     KeyPair myOptVatIdentity = null;
     /** if identified */
     SwissTable myOptSwissTable = null;
     /** if on-the-air */
     LocatorUnum myOptLocatorUnum = null;
-    
+
     /**
      *
      */
@@ -107,23 +108,23 @@
         }
         myNetConfig = newNetConfig;
     }
-    
+
     /**
-     * Is this Introducer's identity (and therefore, this vat's identity) 
-     * already determined? 
+     * Is this Introducer's identity (and therefore, this vat's identity)
+     * already determined?
      */
     public boolean hasIdentity() {
         return null != myOptVatIdentity;
     }
 
     /**
-     * If no identity has yet been determined, generate a new one, and return 
+     * If no identity has yet been determined, generate a new one, and return
      * its public/private key pair.
      * <p>
-     * This pair conveys the authority to claim to be this vat, so guard it 
+     * This pair conveys the authority to claim to be this vat, so guard it
      * well.
-     * 
-     * @exception SecurityException if an identity has already been 
+     *
+     * @exception SecurityException if an identity has already been
      * determined.
      */
     public KeyPair newVatIdentity() {
@@ -136,16 +137,16 @@
     }
 
     /**
-     * If no identity has yet been determined, become identified as the 
+     * If no identity has yet been determined, become identified as the
      * identity represented by this key pair.
      * <p>
-     * To implement identity-persistence, the birth incarnation of a vat 
-     * should do a newVatIdentity and remember the resulting key pair.  
-     * Reincarnations of the "same" vat should then do a setVatIdentity with 
-     * the saved identity, in order to be the reincarnation of the previous 
-     * vat. 
-     * 
-     * @exception SecurityException if an identity has already been 
+     * To implement identity-persistence, the birth incarnation of a vat
+     * should do a newVatIdentity and remember the resulting key pair.
+     * Reincarnations of the "same" vat should then do a setVatIdentity with
+     * the saved identity, in order to be the reincarnation of the previous
+     * vat.
+     *
+     * @exception SecurityException if an identity has already been
      * determined.
      */
     public void setVatIdentity(KeyPair identity) {
@@ -153,7 +154,7 @@
             throw new SecurityException("Already identified");
         }
         myOptVatIdentity = identity;
-        //XXX since we're not using it to generate a key pair, is there 
+        //XXX since we're not using it to generate a key pair, is there
         //anything else we need to do so myEntropy will be ready?
         myOptSwissTable = new SwissTable(myEntropy);
     }
@@ -167,9 +168,9 @@
         }
         return myOptSwissTable;
     }
-    
+
     /**
-     * The fingerprint of the public key of this Introducers identity (and 
+     * The fingerprint of the public key of this Introducers identity (and
      * therefore, this vat's identity). <p>
      *
      * An identity must have already been determined.
@@ -191,24 +192,24 @@
     /**
      * Become able to communicate.  <p>
      *
-     * Change NetConfig according to the listen addresses we actually 
+     * Change NetConfig according to the listen addresses we actually
      * acquired.  Return the list of negotiable protocols. <p>
      *
-     * If not yet identified, this will privately generate a new vat 
-     * identity, but not reveal it through any public protocol.  Therefore, 
-     * applications that wish to do their own identity-persistence must first 
+     * If not yet identified, this will privately generate a new vat
+     * identity, but not reveal it through any public protocol.  Therefore,
+     * applications that wish to do their own identity-persistence must first
      * call either newVatIdentity() or setVatIdentity(..).
      */
-    public ConstList onTheAir() 
+    public ConstList onTheAir()
     throws UnknownHostException, IOException {
         if (isOnTheAir()) {
             return negotiable();
         }
-        
+
         if (! hasIdentity()) {
             newVatIdentity();
         }
-        
+
         /* Turn on the comm system... */
         ProxyMgr proxyMgr = new ProxyMgr(myOptVatIdentity,
                                          myNetConfig,
@@ -230,7 +231,7 @@
     }
 
     /**
-     * Same as sturdyFromURI, but named get/1 so the introducer can be used 
+     * Same as sturdyFromURI, but named get/1 so the introducer can be used
      * as a URIGetter.
      */
     public SturdyRef get(String uriBody) throws MalformedURLException {



1.9       +32 -31    e/src/jsrc/net/captp/jcomm/LocatorUnum.java

Index: LocatorUnum.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/LocatorUnum.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- LocatorUnum.java	2001/08/29 00:20:15	1.8
+++ LocatorUnum.java	2001/09/06 09:55:38	1.9
@@ -21,51 +21,52 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
-import java.math.BigInteger;
 import net.captp.tables.SwissTable;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.serial.Persistent;
 import org.erights.e.elib.tables.ConstList;
 
+import java.io.IOException;
+import java.math.BigInteger;
+
 /**
- * Each instance of this class represents a presence of the pervasive 
+ * Each instance of this class represents a presence of the pervasive
  * LocatorUnum service.
  * <p>
- * For Una in general: To hold a reference to any presence of the Unum is 
- * conceptually to hold a reference to the Unum as a whole.  Therefore, a 
- * reference to the Unum may as well always be a reference to a local 
- * presence of the Unum. Since it can be, and since this would provide better 
- * service, we specify that all references to an Unum will be local. 
+ * For Una in general: To hold a reference to any presence of the Unum is
+ * conceptually to hold a reference to the Unum as a whole.  Therefore, a
+ * reference to the Unum may as well always be a reference to a local
+ * presence of the Unum. Since it can be, and since this would provide better
+ * service, we specify that all references to an Unum will be local.
  * <p>
- * Therefore, an encoded reference to a presence of Unum that's local to the 
- * sending side will be decoded as a reference to a presence of the same Unum 
- * local to the receiving side. Therefore, a fulfilled reference to an Unum is 
- * always 
- * <a href="http://www.erights.org/elib/concurrency/refmech.html">Near</a>, 
+ * Therefore, an encoded reference to a presence of Unum that's local to the
+ * sending side will be decoded as a reference to a presence of the same Unum
+ * local to the receiving side. Therefore, a fulfilled reference to an Unum is
+ * always
+ * <a href="http://www.erights.org/elib/concurrency/refmech.html">Near</a>,
  * and therefore a reference to an Unum is always eventually Near or Broken.
  * <p>
- * The LocatorUnum is the only Unum built in to E itself, and the only Unum 
- * currently supported.  It represents the pervasive vatID/swissNumber lookup 
- * service built jointly out of all vats and VLSes.  It is used only by 
- * SturdyRefs to establish their authority to perform a lookup, and to enable 
+ * The LocatorUnum is the only Unum built in to E itself, and the only Unum
+ * currently supported.  It represents the pervasive vatID/swissNumber lookup
+ * service built jointly out of all vats and VLSes.  It is used only by
+ * SturdyRefs to establish their authority to perform a lookup, and to enable
  * SturdyRefs to maintain this authority as they are copied between vats.
  *
  * @author Mark S. Miller
  */
 public class LocatorUnum implements Persistent {
-    
+
     /**
      * XXX Need to recover a valid value somehow on revival
      */
     private transient SwissTable mySwissTable;
-    
+
     /**
      * XXX Need to recover a valid value somehow on revival
      */
     private transient ProxyMgr myProxyMgr;
-    
+
     /**
      *
      */
@@ -73,31 +74,31 @@
         mySwissTable = swissTable;
         myProxyMgr = proxyMgr;
     }
-    
+
     /**
      * The basic operation underlying 'SturdyRef.getGrip()'. This is where
-     * a reference to a remote object actually gets the various underlying 
+     * a reference to a remote object actually gets the various underlying
      * comm systems connected so that we can send messages.
      *
      * @param searchPath A list of places to try to find the vat
-     * @param vatID The vat from which the object reference should be 
-     *              obtained 
+     * @param vatID The vat from which the object reference should be
+     *              obtained
      * @param swissNum The SwissNumber of the desired object
-     * @param optFarVine Optional object for holding onto a Remote reference 
-     *                   via whoever we got it from long enough to fetch our 
-     *                   own Remote reference via this lookup.  
+     * @param optFarVine Optional object for holding onto a Remote reference
+     *                   via whoever we got it from long enough to fetch our
+     *                   own Remote reference via this lookup.
      */
     public Object getGrip(ConstList searchPath,
-                          String vatID, 
+                          String vatID,
                           BigInteger swissNum,
                           Object optFarVine)
     throws IOException, IndexOutOfBoundsException {
         if (Trace.captp.debug && Trace.ON) {
             Trace.captp.debugm
-                ("" + this + ".getGrip(" + searchPath + ", " + vatID + 
+                ("" + this + ".getGrip(" + searchPath + ", " + vatID +
                  ", " + swissNum + ", " + optFarVine + ")");
         }
-        ProxyConnection optProxyConn = 
+        ProxyConnection optProxyConn =
             myProxyMgr.getOrMakeProxyConnection(searchPath, vatID);
 
         if (optProxyConn == null) {
@@ -108,7 +109,7 @@
         Object remoteNonceLocator = optProxyConn.getRemoteNonceLocator();
         return E.send(remoteNonceLocator,
                       "lookupSwiss",
-                      swissNum, 
+                      swissNum,
                       optFarVine);
     }
 }



1.3       +1 -1      e/src/jsrc/net/captp/jcomm/LookupHandler.java

Index: LookupHandler.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/LookupHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LookupHandler.java	2001/08/13 01:47:02	1.2
+++ LookupHandler.java	2001/09/06 09:55:38	1.3
@@ -21,7 +21,7 @@
 
 
 /**
- * A handler for the special remote reference at position zero to the other 
+ * A handler for the special remote reference at position zero to the other
  * side's NonceLocator
  *
  * @author Mark S. Miller



1.6       +8 -7      e/src/jsrc/net/captp/jcomm/NewFarDesc.java

Index: NewFarDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/NewFarDesc.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- NewFarDesc.java	2001/08/20 21:17:49	1.5
+++ NewFarDesc.java	2001/09/06 09:55:38	1.6
@@ -19,10 +19,11 @@
 Contributor(s): ______________________________________.
 */
 
-import java.math.BigInteger;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.ref.Ref;
 
+import java.math.BigInteger;
+
 /**
  * The first-time encoding of an exported pass-by-proxy object over
  * the wire, to be imported as a new Far reference. <p>
@@ -35,12 +36,12 @@
  * @author Mark Miller
  */
 /*package*/ class NewFarDesc implements ObjectRefDesc {
-    
+
     static private final long serialVersionUID = 2229110355967576618L;
-    
+
     private int myImportPos;
     private BigInteger mySwissHash;
-    
+
     /**
      *
      */
@@ -52,7 +53,7 @@
         if (null == mySwissHash || mySwissHash.signum() <= 0) {
             throw new RuntimeException("swissHash must be positive: " +
                                        mySwissHash);
-        }            
+        }
     }
 
     /**
@@ -65,13 +66,13 @@
     }
 
     /**
-     * What the other side exported, we dereference as the "new" Far 
+     * What the other side exported, we dereference as the "new" Far
      * reference we will now import.
      */
     public Object dereference(ProxyConnection conn) {
         validate();
         Ref result = conn.newFarRef(myImportPos, mySwissHash);
-                                              
+
         if (Trace.captp.debug && Trace.ON) {
             Trace.captp.debugm("" + conn + "." + this.toString());
         }



1.3       +8 -7      e/src/jsrc/net/captp/jcomm/NewRemotePromiseDesc.java

Index: NewRemotePromiseDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/NewRemotePromiseDesc.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- NewRemotePromiseDesc.java	2001/08/21 14:28:14	1.2
+++ NewRemotePromiseDesc.java	2001/09/06 09:55:38	1.3
@@ -20,6 +20,7 @@
 */
 
 import org.erights.e.develop.trace.Trace;
+
 import java.math.BigInteger;
 
 /**
@@ -28,15 +29,15 @@
  *
  * This is a separate class because the first time we export we also
  * need to hook up the redirector, whereas the rest of the time we
- * can just use ImportDesc(importPos). 
+ * can just use ImportDesc(importPos).
  *
  * @author Chip Morningstar
  * @author Mark Miller
  */
 /*package*/ class NewRemotePromiseDesc implements ObjectRefDesc {
-    
+
     static private final long serialVersionUID = -6186892267621515701L;
-    
+
     private int myImportPos;
     private int myRdrPos;
     private BigInteger myRdrBase;
@@ -56,7 +57,7 @@
         if (null == myRdrBase || myRdrBase.signum() <= 0) {
             throw new RuntimeException("rdrBase must be positive: " +
                                        myRdrBase);
-        }            
+        }
     }
 
     /**
@@ -76,9 +77,9 @@
     public Object dereference(ProxyConnection conn) {
 
         Object result = conn.newRemotePromise(myImportPos,
-                                              myRdrPos, 
+                                              myRdrPos,
                                               myRdrBase);
-                                              
+
         if (Trace.captp.debug && Trace.ON) {
             Trace.captp.debugm("ProxyConnection " + conn +
                                " deref " + toString());
@@ -90,7 +91,7 @@
      *
      */
     public String toString() {
-        return "NewRemotePromiseDesc(" + myImportPos + ", " + 
+        return "NewRemotePromiseDesc(" + myImportPos + ", " +
                                      myRdrPos + ", " +
                                      myRdrBase + ")";
     }



1.7       +34 -33    e/src/jsrc/net/captp/jcomm/NonceLocator.java

Index: NonceLocator.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/NonceLocator.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- NonceLocator.java	2001/08/29 00:20:15	1.6
+++ NonceLocator.java	2001/09/06 09:55:38	1.7
@@ -21,51 +21,52 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
-import java.math.BigInteger;
-import net.captp.tables.PromiseGiftTable;
 import net.captp.tables.NearGiftTable;
+import net.captp.tables.PromiseGiftTable;
 import net.captp.tables.SwissTable;
 import net.captp.tables.Vine;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.meta.java.math.BigIntegerSugar;
 
+import java.io.IOException;
+import java.math.BigInteger;
+
 /**
  * Made magically available at incoming position 0.
  * <p>
- * Used to resolve 3-vat live Granovetter introductions, and to log tracing 
+ * Used to resolve 3-vat live Granovetter introductions, and to log tracing
  * info sent from the other vat.
  *
  * @author Mark S. Miller
  */
 public class NonceLocator {
-    
+
     /**
      *
      */
     private PromiseGiftTable myPGifts;
-    
+
     /**
      *
      */
     private NearGiftTable myNGifts;
-    
+
     /**
      *
      */
     private String myOwnID;
-    
+
     /**
      *
      */
     private ProxyMgr myProxyMgr;
-    
+
     /**
      *
      */
     private SwissTable mySwissTable;
-    
+
     /**
      *
      */
@@ -81,7 +82,7 @@
         myProxyMgr = proxyMgr;
         mySwissTable = swissTable;
     }
-    
+
     /**
      *
      */
@@ -91,7 +92,7 @@
     {
         return myPGifts.provideFor(gift, recipID, nonce);
     }
-    
+
     /**
      *
      */
@@ -103,7 +104,7 @@
         if (! Ref.isNear(gift)) {
             throw new RuntimeException("not Near: " + gift);
         }
-        //If gift isn't Selfish, this will throw an exception, 
+        //If gift isn't Selfish, this will throw an exception,
         //which is as it should be.
         BigInteger giftSwiss = mySwissTable.getIdentity(gift);
         BigInteger giftHash = BigIntegerSugar.cryptoHash(giftSwiss);
@@ -112,14 +113,14 @@
         }
         return myNGifts.provideFor(gift, recipID, nonce, swissHash);
     }
-    
+
     /**
      *
-     * @param donorID The vatID of the vat (Alice, the gift giver) that 
+     * @param donorID The vatID of the vat (Alice, the gift giver) that
      *                provided the gift we're picking up.
-     * @param nonce Identifies (together with myOwnID) the gift in the 
+     * @param nonce Identifies (together with myOwnID) the gift in the
      *              donor's table.
-     * @param optFarVine Justs hold onto it until the request is done, to 
+     * @param optFarVine Justs hold onto it until the request is done, to
      *                   prevent it from being gced.
      */
     public Object acceptFrom(String donorID,
@@ -133,17 +134,17 @@
         PromiseGiftTable donorTable = optDonorConn.getPromiseGiftTable();
         return donorTable.acceptFor(myOwnID, nonce);
     }
-    
+
     /**
      *
-     * @param donorID The vatID of the vat (Alice, the gift giver) that 
+     * @param donorID The vatID of the vat (Alice, the gift giver) that
      *                provided the gift we're picking up.
-     * @param nonce Identifies (together with myOwnID) the gift in the 
+     * @param nonce Identifies (together with myOwnID) the gift in the
      *              donor's table.
-     * @param swissHash The gift should only be returned if it has this 
-     *                  identity.  Otherwise the recipient should get a 
-     *                  DisconnectedRef.  This isn't yet fully implemented. 
-     * @param optFarVine Justs hold onto it until the request is done, to 
+     * @param swissHash The gift should only be returned if it has this
+     *                  identity.  Otherwise the recipient should get a
+     *                  DisconnectedRef.  This isn't yet fully implemented.
+     * @param optFarVine Justs hold onto it until the request is done, to
      *                   prevent it from being gced.
      */
     public Object acceptFrom(String donorID,
@@ -158,40 +159,40 @@
         NearGiftTable donorTable = optDonorConn.getNearGiftTable();
         Object result = donorTable.acceptFor(myOwnID, nonce, swissHash);
         if (! Ref.isNear(result)) {
-            throw new RuntimeException("internal: non-near gift for " + 
+            throw new RuntimeException("internal: non-near gift for " +
                                        swissHash);
         }
-        //If result isn't Selfish, this will throw an exception, 
+        //If result isn't Selfish, this will throw an exception,
         //which is as it should be.
         BigInteger id = mySwissTable.getIdentity(result);
         BigInteger idHash = BigIntegerSugar.cryptoHash(id);
         if (! swissHash.equals(idHash)) {
-            throw new RuntimeException("internal: hash mismatch: " + 
+            throw new RuntimeException("internal: hash mismatch: " +
                                        swissHash);
         }
         return result;
     }
-    
+
     /**
      * Do nothing, letting the argument become garbage. <p>
      *
-     * The purpose of the message is to ensure that the argument isn't 
+     * The purpose of the message is to ensure that the argument isn't
      * garbage until the message is delivered.
      */
     public void ignore(Object optFarVine) {}
-    
+
     /**
      *
      */
     public Object lookupSwiss(BigInteger swissNum, Object optFarVine) {
         return mySwissTable.lookupSwiss(swissNum);
     }
-    
+
     /**
      * Enables our counterparty to log a message to our tracing system.
      * <p>
-     * These messages are tagged with the vatID of our counterparty.  They 
-     * are logged at debug level, and currently to the "captp" subsystem.  
+     * These messages are tagged with the vatID of our counterparty.  They
+     * are logged at debug level, and currently to the "captp" subsystem.
      * These should probably instead have their own subsystem.
      */
     public void traceRemote(String message) {



1.5       +10 -9     e/src/jsrc/net/captp/jcomm/ObjectID.java

Index: ObjectID.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/ObjectID.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ObjectID.java	2001/08/20 21:17:49	1.4
+++ ObjectID.java	2001/09/06 09:55:38	1.5
@@ -19,28 +19,29 @@
 Contributor(s): ______________________________________.
 */
 
-import java.math.BigInteger;
-import org.erights.e.elib.serial.Persistent;
 import org.erights.e.elib.serial.PassByConstruction;
+import org.erights.e.elib.serial.Persistent;
 import org.erights.e.meta.java.math.BigIntegerSugar;
 
+import java.math.BigInteger;
+
 /**
- * A pairing of a VatID and a SwissHash, uniquely identifying a Selfish 
+ * A pairing of a VatID and a SwissHash, uniquely identifying a Selfish
  * object without providing access to the object. <p>
  *
  * @author Chip Morningstar
  * @author Mark Miller
  */
 public class ObjectID implements Persistent, PassByConstruction {
-    
+
     static private final long serialVersionUID = 2221338666124259513L;
-    
+
     /** The vat this ID is relative to (i.e., the vat that created this ID). */
     private String myVatID;
 
     /** The object's identity, relative to that vat */
     private BigInteger mySwissHash;
-    
+
     /**
      * Construct an object identifier given the SwissHash directly
      */
@@ -61,7 +62,7 @@
             return false;
         }
     }
-    
+
     /**
      *
      */
@@ -82,12 +83,12 @@
     public BigInteger getSwissHash() {
         return mySwissHash;
     }
-    
+
     /**
      *
      */
     public String toString() {
-        return (myVatID.substring(0,4) + "/##" + 
+        return (myVatID.substring(0,4) + "/##" +
                 BigIntegerSugar.toString64(mySwissHash).substring(0,4));
     }
 }



1.6       +1 -1      e/src/jsrc/net/captp/jcomm/ObjectRefDesc.java

Index: ObjectRefDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/ObjectRefDesc.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ObjectRefDesc.java	2001/08/20 21:17:49	1.5
+++ ObjectRefDesc.java	2001/09/06 09:55:38	1.6
@@ -37,7 +37,7 @@
  * @author Mark Miller
  */
 /*package*/ interface ObjectRefDesc extends PassByConstruction {
-    
+
     /**
      * Return an appropriate object (eg, a Proxy) matching this
      * description.



1.3       +5 -4      e/src/jsrc/net/captp/jcomm/Promise3Desc.java

Index: Promise3Desc.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/Promise3Desc.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Promise3Desc.java	2001/08/21 14:28:14	1.2
+++ Promise3Desc.java	2001/09/06 09:55:38	1.3
@@ -19,11 +19,12 @@
 Contributor(s): ______________________________________.
 */
 
-import java.math.BigInteger;
 import net.captp.tables.Vine;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.tables.ConstList;
 
+import java.math.BigInteger;
+
 /**
  * The encoding of a RemotePromise over the wire to someone other than the
  * vat it points into.
@@ -32,9 +33,9 @@
  * @author Mark Miller
  */
 /*package*/ class Promise3Desc implements ObjectRefDesc {
-    
+
     static private final long serialVersionUID = -3922505236390332859L;
-    
+
     private ConstList mySearchPath;
     private String myHostID;
     private BigInteger myNonce;
@@ -59,7 +60,7 @@
     /**
      * What the other side imported (from somebody other than
      * ourselves), we dereference as a RemotePromise to the same
-     * arrowhead. 
+     * arrowhead.
      */
     public Object dereference(ProxyConnection conn) {
         if (Trace.captp.debug && Trace.ON) {



1.25      +123 -122  e/src/jsrc/net/captp/jcomm/ProxyConnection.java

Index: ProxyConnection.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/ProxyConnection.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- ProxyConnection.java	2001/08/24 19:02:37	1.24
+++ ProxyConnection.java	2001/09/06 09:55:38	1.25
@@ -19,16 +19,11 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OptionalDataException;
-import java.math.BigInteger;
 import net.captp.tables.AnswersTable;
 import net.captp.tables.ExportsTable;
-import net.captp.tables.PromiseGiftTable;
 import net.captp.tables.ImportsTable;
 import net.captp.tables.NearGiftTable;
+import net.captp.tables.PromiseGiftTable;
 import net.captp.tables.QuestionsTable;
 import net.captp.tables.SwissTable;
 import net.vattp.data.DataConnection;
@@ -40,9 +35,9 @@
 import org.erights.e.develop.exception.ThrowableSugar;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.prim.E;
+import org.erights.e.elib.ref.ProxyResolver;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.ref.Resolver;
-import org.erights.e.elib.ref.ProxyResolver;
 import org.erights.e.elib.sealing.Brand;
 import org.erights.e.elib.sealing.SealedBox;
 import org.erights.e.elib.sealing.Sealer;
@@ -53,8 +48,14 @@
 import org.erights.e.elib.util.OneArgFunc;
 import org.erights.e.meta.java.math.BigIntegerSugar;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OptionalDataException;
+import java.math.BigInteger;
+
 /**
- * Object which manages a CapTP protocol connection to a remote 
+ * Object which manages a CapTP protocol connection to a remote
  * vat and which will receive incoming CapTP protocol messages.<p>
  *
  * The processMessage(byte[] message, DataConnection) method will be
@@ -62,7 +63,7 @@
  *
  * ProxyConnection manages four tables for 2-vat interactions:
  * <UL>
- *   <LI>Questions: Handlers for remote objects we requested </LI> 
+ *   <LI>Questions: Handlers for remote objects we requested </LI>
  *   <LI>Imports: Handlers for remote objects exported to us unsolicited </LI>
  *   <LI>Answers: Answers for remote Questions </LI>
  *   <LI>Exports: local objects matching remote Imports </LI>
@@ -71,7 +72,7 @@
  * The four tables can be arranged into a matrix: <pre>
  *
  *                     |   we generate pos   | remote generates pos
- *                     |                     | 
+ *                     |                     |
  * --------------------+---------------------+----------------------
  * outgoing remote ref |                     |
  *     we have handler |       Questions     |       Imports
@@ -82,7 +83,7 @@
  *  remote has handler |          +          |          -
  * --------------------+---------------------+----------------------
  * </pre>
- * 
+ *
  * When referencing an object or handler by pos number alone
  * (independent of what table it should be looked up in), we
  * distinguish the table by the sign of pos: Questions and Answers
@@ -101,37 +102,37 @@
  */
 /*package*/ class ProxyConnection implements MsgHandler {
 
-    /** 
+    /**
      * Queue delivery of message, no answer expected. <p>
      *
      * Start counting at 8 since the previous version of the protocol
-     * (0.8.9) stopped at 7. 
+     * (0.8.9) stopped at 7.
      */
     static private final byte DELIVER_ONLY_OP = 8;
 
-    /** 
+    /**
      * Queue delivery of message, resolve answer to the outcome.
      * <p>
      * DELIVER_OP as 9 had a different argument order
      */
     static private final byte DELIVER_OP = 13;
 
-    /** 
-     * An import on the other has gone away dropping some number of 
-     * wireCounts.  Clean up the export table. 
+    /**
+     * An import on the other has gone away dropping some number of
+     * wireCounts.  Clean up the export table.
      */
     static private final byte GC_EXPORT_OP = 10;
 
-    /** 
+    /**
      * A question on the other has gone away.  Clean up the answer table.
      */
     static private final byte GC_ANSWER_OP = 11;
-    
+
     /**
      * Please shut down the connection if you have no messages pending.
      */
     static private final byte SHUTDOWN_OP = 12;
-    
+
 
 
     /** The ProxyMgr for our vat */
@@ -144,9 +145,9 @@
     private DataConnection myDataConnection;
 
     /**
-     * Number of things (XXX what's a "thing"?) which are currently holding 
+     * Number of things (XXX what's a "thing"?) which are currently holding
      * the connection open
-     */ 
+     */
     private int myUseCount;
 
     /** Number of messages sent on this connection */
@@ -158,35 +159,35 @@
     /** Flag indicating we are in the midst of shutting down the connection */
     private boolean myShuttingDownFlag;
 
-    /** 
+    /**
      * If the connection died, anybody who talks to us will get this. <p>
      *
      * This should be null exactly when the connection is still alive.
      */
     private Throwable myOptProblem;
 
-    /** 
-     * Resolver of the promise used to buffer lookup requests made in midst 
+    /**
+     * Resolver of the promise used to buffer lookup requests made in midst
      * of connection shutdown.
-     */ 
+     */
     private Resolver myOptBufferedLookups;
-    
+
     /** Generates new swiss numbers */
     private ESecureRandom myEntropy;
 
     /**
-     * The Questions table: these are handlers this end created and is 
-     * expecting the other end to hook up to the relevent objects themselves 
+     * The Questions table: these are handlers this end created and is
+     * expecting the other end to hook up to the relevent objects themselves
      * (e.g., results of sendAll()s).
      */
     private QuestionsTable myQuestions;
 
-    /** 
+    /**
      * The Answers table: this is the counterpart to the Questions table
      * at the other end of the connection. <p>
      *
      * Messages sent through a handler in the questions table will be
-     * delivered to the corresponding answer. 
+     * delivered to the corresponding answer.
      */
     private AnswersTable myAnswers;
 
@@ -204,23 +205,23 @@
      *
      * These are objects that have been exported from this end (i.e.,
      * mentioned by us in the parameters of a message). The other end
-     * installs them in the same spot in its Imports table. 
+     * installs them in the same spot in its Imports table.
      */
     private ExportsTable myExports;
-    
+
     /**
      * At incoming position 0, for bringing about 3-vat introductions
-     * using nonces. 
+     * using nonces.
      */
     private NonceLocator myLocalNonceLocator;
-    
+
     /**
      * A remote reference to the other side's myLocalNonceLocator, at
      * outgoing position 0, for bringing about 3-vat introductions
-     * using nonces. 
+     * using nonces.
      */
     private Object myRemoteNonceLocator;
-    
+
     /**
      * For bringing about 3-vat introductions of unresolved references
      * using nonces.
@@ -229,7 +230,7 @@
 
     /**
      * For bringing about 3-vat introductions of Near references using
-     * nonces. 
+     * nonces.
      */
     private NearGiftTable myNGifts;
 
@@ -262,17 +263,17 @@
         myAnswers = new AnswersTable();
         myImports = new ImportsTable();
         myExports = new ExportsTable();
-        
+
         //XXX for now
         LookupHandler lookupHandler = new LookupHandler(this);
         myRemoteNonceLocator = lookupHandler.myResolver.getProxy();
 
         myPGifts = new PromiseGiftTable(myRemoteNonceLocator);
         myNGifts = new NearGiftTable();
-        myLocalNonceLocator = new NonceLocator(myPGifts, 
-                                               myNGifts, 
-                                               dataConn.getRemoteVatID(), 
-                                               proxyMgr, 
+        myLocalNonceLocator = new NonceLocator(myPGifts,
+                                               myNGifts,
+                                               dataConn.getRemoteVatID(),
+                                               proxyMgr,
                                                proxyMgr.getSwissTable());
 
         if (Trace.captp.debug && Trace.ON) {
@@ -283,24 +284,24 @@
                                    "/%" + dataConn.getLocalVatID());
         }
     }
-    
+
     /**
      *
      */
     /*package*/ PromiseGiftTable getPromiseGiftTable() { return myPGifts; }
-    
+
     /**
      *
      */
     /*package*/ NearGiftTable getNearGiftTable() { return myNGifts; }
-    
+
     /**
      *
      */
     /*package*/ Object getRemoteNonceLocator() {
         return myRemoteNonceLocator;
     }
-    
+
     /**
      *
      */
@@ -310,7 +311,7 @@
      *
      */
     /*package*/ Unsealer getUnsealer() { return myProxyMgr.myUnsealer; }
-    
+
     /**
      * Return our identity.
      */
@@ -324,14 +325,14 @@
     /*package*/ String remoteVatID() {
         return myDataConnection.getRemoteVatID();
     }
-    
+
     /**
      *
      */
     /*package*/ ConstList remoteSearchPath() {
         return myDataConnection.getRemoteSearchPath();
     }
-    
+
     /**
      *
      */
@@ -342,16 +343,16 @@
         myQuestions.put(-pos, result);
         return result;
     }
-    
+
     /**
-     * Drop this index in our own Questions table, and in the other vat's 
+     * Drop this index in our own Questions table, and in the other vat's
      * Answers table.
      */
     /*package*/ void dropQuestion(int pos) {
         myQuestions.free(-pos);
         sendGCAnswerOp(pos);
     }
-    
+
 
     /************************ Desc Creation *********************/
 
@@ -364,13 +365,13 @@
         BigInteger hash = BigIntegerSugar.cryptoHash(id);
         return new NewFarDesc(myExports.newFarPos(obj), hash);
     }
-    
+
     /**
      *
      */
     /*package*/ NewRemotePromiseDesc newRemotePromiseDesc(Object promise) {
         int importPos = myExports.bind(promise);
-        
+
         BigInteger rdrBase = myEntropy.nextSwiss();
         BigInteger rdrNum  = BigIntegerSugar.cryptoHash(rdrBase);
         BigInteger rdrHash = BigIntegerSugar.cryptoHash(rdrNum);
@@ -381,16 +382,16 @@
         myQuestions.put(-rdrPos, rdrResolver);
         Object farRdr = rdrResolver.getProxy();
         E.sendOnly(promise, "whenMoreResolved", farRdr);
-        
+
         return new NewRemotePromiseDesc(importPos, rdrPos, rdrBase);
     }
-    
+
     /**
-     * Returns a NewFarDesc, NewRemotePromiseDesc, or an ImportDesc for 
-     * exporting obj, which is assumed to be suitable for being in our 
-     * exports table. 
+     * Returns a NewFarDesc, NewRemotePromiseDesc, or an ImportDesc for
+     * exporting obj, which is assumed to be suitable for being in our
+     * exports table.
      * <p>
-     * obj is assumes to be a Near reference to a PassByProxy object (actual 
+     * obj is assumes to be a Near reference to a PassByProxy object (actual
      * or HONORARY), or eventual.
      */
     /*package*/ ObjectRefDesc makeImportingDesc(Object obj) {
@@ -407,16 +408,16 @@
             throw new RuntimeException("internal: Not exportable");
         }
     }
-    
+
     /**
-     * Figure out what kind of eventual reference 'ref' is, and return an 
+     * Figure out what kind of eventual reference 'ref' is, and return an
      * appropriate descriptor for encoding it over the wire.
      */
     /*package*/ ObjectRefDesc makeEventualDesc(Ref ref) {
         Unsealer unsealer = getUnsealer();
         Brand brand = unsealer.brand();
         SealedBox optBox = ref.optMeta(brand);
-        RemoteHandler optHandler = 
+        RemoteHandler optHandler =
             (RemoteHandler)unsealer.unseal(optBox, RemoteHandler.class);
         if (null == optHandler) {
             //a local promise
@@ -430,14 +431,14 @@
             }
         }
     }
-        
 
+
     /************************ Desc Messages *********************/
 
     /**
      * Dereferencing of a NewFarDesc. <p>
      *
-     * On entry, importPos may be free, or may be allocated to an entry with 
+     * On entry, importPos may be free, or may be allocated to an entry with
      * a zero wireCount.  (XXX we don't currently check the wirecount.)
      * In the latter case, the entry is overwritten.
      *
@@ -457,22 +458,22 @@
     /**
      * Dereferencing of a NewRemotePromiseDesc. <p>
      *
-     * On entry, importPos may be free, or may be allocated to an entry with 
+     * On entry, importPos may be free, or may be allocated to an entry with
      * a zero wireCount.  In the latter case, the entry is overwritten.
      *
-     * @param importPos The import position at which the new RemotePromise 
+     * @param importPos The import position at which the new RemotePromise
      *                  should be created.
-     * @param rdrPos The answers position at which the Redirector of that 
+     * @param rdrPos The answers position at which the Redirector of that
      *               new RemotePromise is made available.
-     * @param rdrBase The sameness identity of that Redirector must be the 
+     * @param rdrBase The sameness identity of that Redirector must be the
      *               cryptohash of rdrBase.
      * @return The newly created RemotePromise.
      */
-    /*package*/ Ref newRemotePromise(int importPos, 
+    /*package*/ Ref newRemotePromise(int importPos,
                                      int rdrPos,
                                      BigInteger rdrBase)
     {
-        RemotePromiseHandler handler = 
+        RemotePromiseHandler handler =
             new RemotePromiseHandler(this, importPos);
         ProxyResolver resolver = handler.myResolver;
         myImports.put(importPos, resolver);
@@ -481,19 +482,19 @@
         myProxyMgr.getSwissTable().registerNewSwiss(rdr, rdrBase);
         return resolver.getProxy();
     }
-    
+
     /**
      * Dereferencing of an ImportDesc. <p>
      *
-     * On entry, importPos must be allocated, but may be allocated to an 
+     * On entry, importPos must be allocated, but may be allocated to an
      * entry with a zero wireCount. <p>
      *
-     * Return an imported Proxy, or its resolution, and, if it still has 
-     * a handler (ie, it isn't resolved) increment its wire count. 
+     * Return an imported Proxy, or its resolution, and, if it still has
+     * a handler (ie, it isn't resolved) increment its wire count.
      *
      * @param importPos The position of the import in the Imports table
-     * @return Whatever the resolution is of the Proxy in the appropriate 
-     *         table at importPos 
+     * @return Whatever the resolution is of the Proxy in the appropriate
+     *         table at importPos
      */
     /*package*/ Ref getImport(int importPos) {
         ProxyResolver pr = myImports.getProxyResolver(importPos);
@@ -503,13 +504,13 @@
         }
         return pr.getProxy();
     }
-    
+
     /**
      * Dereferencing of an IncomingDesc
      *
      * Return an Exports or Answers table entry.
      *
-     * @param incomingPos A positive pos refer to the Exports table, a 
+     * @param incomingPos A positive pos refer to the Exports table, a
      *                    negative one to the Answers table.
      * @return Whatever object was in the appropriate table at
      *         incomingPos.
@@ -523,14 +524,14 @@
             return myLocalNonceLocator;
         }
     }
-    
+
     /**
      * Dereferencing of a Promise3Desc
      *
      * @param searchPath hints to find the vat identified by vatID
-     * @param vatID The fingerprint of the public key of the vat hosting the 
+     * @param vatID The fingerprint of the public key of the vat hosting the
      *              object to be looked up.
-     * @param nonce Identifies the object in that vat's appropriate 
+     * @param nonce Identifies the object in that vat's appropriate
      *              gift table.
      * @param optFarVine Hold on to this until the object has been retrieved.
      * @return A promise for the looked up object.
@@ -547,14 +548,14 @@
      * Dereferencing of a Far3Desc
      *
      * @param searchPath hints to find the vat identified by vatID
-     * @param vatID The fingerprint of the public key of the vat hosting the 
+     * @param vatID The fingerprint of the public key of the vat hosting the
      *              object to be looked up.
-     * @param nonce Identifies the object in that vat's appropriate 
+     * @param nonce Identifies the object in that vat's appropriate
      *              gift table.
-     * @param swissHash Identity of object being looked up.  getLookup 
-     *                  returns a resolved reference with that identity. If 
-     *                  it can't return a FarRef with that identity, then it 
-     *                  returns a DisconnectedRef with that identity. 
+     * @param swissHash Identity of object being looked up.  getLookup
+     *                  returns a resolved reference with that identity. If
+     *                  it can't return a FarRef with that identity, then it
+     *                  returns a DisconnectedRef with that identity.
      * @param optFarVine Hold on to this until the object has been retrieved.
      * @return A promise for the looked up object.
      */
@@ -569,7 +570,7 @@
 
 
     /***************************** receiving ************************/
-    
+
 
     /**
      * Process an incoming message from the DataConnection.
@@ -634,7 +635,7 @@
                 String verb = ((String)uns.readUTF()).intern();
                 try {
                     Object[] args = (Object[])uns.readObject();
-                    
+
                     execDeliverOnlyOp(recipPos, verb, args);
                 } catch (Throwable problem) {
                     whyNoDeliverOnlyOp(recipPos, verb, problem);
@@ -648,7 +649,7 @@
                 String verb = ((String)uns.readUTF()).intern();
                 try {
                     Object[] args = (Object[])uns.readObject();
-                    
+
                     execDeliverOp(answerPos, rdr,
                                   recipPos, verb, args);
                 } catch (Throwable problem) {
@@ -660,19 +661,19 @@
             case GC_EXPORT_OP: {
                 int exportPos = uns.readInt();
                 int wireCount = uns.readInt();
-                    
+
                 execGCExportOp(exportPos, wireCount);
                 break;
             }
             case GC_ANSWER_OP: {
                 int answerPos = uns.readInt();
-                    
+
                 execGCAnswerOp(answerPos);
                 break;
             }
             case SHUTDOWN_OP: {
                 int receivedCount = uns.readInt();
-                    
+
                 execShutdownOp(receivedCount);
                 break;
             }
@@ -681,7 +682,7 @@
             }
         }
     }
-        
+
     /**
      * Pretty print the args of a message send, for debugging purposes.
      */
@@ -704,13 +705,13 @@
     {
         if (Trace.captp.debug && Trace.ON) {
             Trace.captp.debugm(
-                "exec DeliverOnlyOp(" + recipPos + ", " + verb + ", " + 
+                "exec DeliverOnlyOp(" + recipPos + ", " + verb + ", " +
                                     argsString(args) + ")");
         }
         Object recip = getIncoming(recipPos);
         E.sendAllOnly(recip, verb, args);
     }
-    
+
     /**
      *
      */
@@ -730,7 +731,7 @@
             E.sendOnly(myRemoteNonceLocator, "traceRemote", msg);
         }
     }
-    
+
     /**
      *
      */
@@ -740,7 +741,7 @@
         if (Trace.captp.debug && Trace.ON) {
             Trace.captp.debugm(
                 "exec DeliverOp(" + answerPos + ", " + rdr + ",\n  " +
-                                recipPos + ", " + verb + ", " + 
+                                recipPos + ", " + verb + ", " +
                                 argsString(args) + ")");
         }
         Object recip = getIncoming(recipPos);
@@ -748,7 +749,7 @@
         myAnswers.put(-answerPos, answer, true);
         E.sendOnly(answer, "whenMoreResolved", rdr);
     }
-    
+
     /**
      *
      */
@@ -765,9 +766,9 @@
         myAnswers.put(-answerPos, problem, true);
         E.sendOnly(problem, "whenMoreResolved", rdr);
     }
-    
+
     /**
-     * 
+     *
      */
     private void execGCExportOp(int exportPos, int wireCount) {
         if (Trace.captp.debug && Trace.ON) {
@@ -776,9 +777,9 @@
         }
         myExports.decr(exportPos, wireCount);
     }
-    
+
     /**
-     * 
+     *
      */
     private void execGCAnswerOp(int answerPos) {
         if (Trace.captp.debug && Trace.ON) {
@@ -787,7 +788,7 @@
         }
         myAnswers.free(-answerPos);
     }
-    
+
     /**
      * Receive a shutdown message from the other end. If we don't have any
      * messages in flight, we shutdown the connection.
@@ -805,7 +806,7 @@
 
 
     /************************** sending ************************/
-    
+
     /**
      *
      */
@@ -832,7 +833,7 @@
         myDataConnection.sendMsg(msg);
     }
 
-    
+
     /**
      *
      */
@@ -842,7 +843,7 @@
     {
         if (Trace.captp.debug && Trace.ON) {
             Trace.captp.debugm(
-                "send DeliverOnlyOp(" + recipPos + ", " + verb + ", " + 
+                "send DeliverOnlyOp(" + recipPos + ", " + verb + ", " +
                                     argsString(args) + ")");
         }
         if (null != myOptProblem) {
@@ -860,7 +861,7 @@
             throw ExceptionMgr.asSafe(problem);
         }
     }
-    
+
     /**
      *
      */
@@ -873,7 +874,7 @@
         if (Trace.captp.debug && Trace.ON) {
             Trace.captp.debugm(
                 "send DeliverOp(" + answerPos + ", " + rdr + ",\n  " +
-                                recipPos + ", " + verb + ", " + 
+                                recipPos + ", " + verb + ", " +
                                 argsString(args) + ")");
         }
         if (null != myOptProblem) {
@@ -893,9 +894,9 @@
             throw ExceptionMgr.asSafe(problem);
         }
     }
-    
+
     /**
-     * 
+     *
      */
     /*package*/ void sendGCExportOp(int exportPos, int wireCount) {
         if (Trace.captp.debug && Trace.ON) {
@@ -916,9 +917,9 @@
             throw ExceptionMgr.asSafe(problem);
         }
     }
-    
+
     /**
-     * 
+     *
      */
     private void sendGCAnswerOp(int answerPos) {
         if (Trace.captp.debug && Trace.ON) {
@@ -938,7 +939,7 @@
             throw ExceptionMgr.asSafe(problem);
         }
     }
-    
+
     /**
      *
      */
@@ -963,14 +964,14 @@
 
 
     /**************** lookup, gc, & shutdown *****************/
-    
+
     /**
      *
      */
     /*package*/ void submitLookups(Resolver bufferedLookups) {
         throw new RuntimeException("XXX submitLookups not yet implemented");
     }
-    
+
     /**
      * Decrement the use count. If it reaches 0, we have no references active
      * over this connection and the connection can (and should) be shut down.
@@ -1018,7 +1019,7 @@
                 Trace.captp.debugm("shutdown " + this, problem);
             }
         } else {
-            //at warning level because lost connections should be traced by 
+            //at warning level because lost connections should be traced by
             //default.
             if (Trace.captp.warning && Trace.ON) {
                 Trace.captp.warningm("lost " + this, problem);
@@ -1026,14 +1027,14 @@
         }
         if (null == myOptProblem) { /* If this is the first time we've died... */
             myOptProblem = problem;
-            
+
             myQuestions.smash(problem);
             myAnswers.smash(problem);
             myImports.smash(problem);
             myExports.smash(problem);
             myPGifts.smash(problem);
             myNGifts.smash(problem);
-            
+
             myQuestions= null;
             myAnswers= null;
             myImports= null;
@@ -1043,7 +1044,7 @@
 
             if (deliberate) {
                 //transfer buffered lookups to a newly spawned connection
-                myProxyMgr.connectionDead(myDataConnection, 
+                myProxyMgr.connectionDead(myDataConnection,
                                           myOptBufferedLookups);
             } else {
                 //XXX smash buffered lookups



1.12      +21 -20    e/src/jsrc/net/captp/jcomm/ProxyMgr.java

Index: ProxyMgr.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/ProxyMgr.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ProxyMgr.java	2001/08/17 03:11:32	1.11
+++ ProxyMgr.java	2001/09/06 09:55:38	1.12
@@ -19,9 +19,6 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
-import java.net.UnknownHostException;
-import java.security.KeyPair;
 import net.captp.tables.SwissTable;
 import net.vattp.data.ConnectionsMgr;
 import net.vattp.data.DataConnection;
@@ -38,6 +35,10 @@
 import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.tables.FlexMap;
 
+import java.io.IOException;
+import java.net.UnknownHostException;
+import java.security.KeyPair;
+
 /**
  * Manage the interface between this vat and other vats. <p>
  *
@@ -46,19 +47,19 @@
  * the low-level comm system.
  */
 public class ProxyMgr implements NewConnectionReactor {
-    
+
     /** Registration table to use for map between ObjectIDs and objs */
     private SwissTable mySwissTable;
-    
+
     /** map from DataConnections to ProxyConnections */
     private FlexMap myProxyConnections = null;
 
     /** The connections manager to talk to */
     private ConnectionsMgr myConnMgr = null;
-    
+
     /** makes new unguessable numbers */
     private ESecureRandom myEntropy;
-    
+
     /** for self recognition */
     /*package*/ Sealer mySealer;
     /*package*/ Unsealer myUnsealer;
@@ -66,9 +67,9 @@
     /**
      * Constructor
      *
-     * @param vat The identity of the vat we are managing remote references 
+     * @param vat The identity of the vat we are managing remote references
      *            into.
-     * @param netConfig Where to listen, register, and tell other to look for 
+     * @param netConfig Where to listen, register, and tell other to look for
      *                  me.
      * @param swissTable Associates swissNumbers with references.
      * @param entropy Provides new unguessable numbers.
@@ -78,7 +79,7 @@
                     SwissTable swissTable,
                     ESecureRandom entropy)
     throws UnknownHostException, IOException {
-        
+
         myConnMgr = new ConnectionsMgr(identityKeys, netConfig);
 
         myConnMgr.addNewConnectionReactor(this);
@@ -87,11 +88,11 @@
         myProxyConnections = FlexMap.fromTypes(DataConnection.class,
                                                ProxyConnection.class);
         myEntropy = entropy;
-        
+
         Object[] pair = Brand.pair("captp");
         mySealer = (Sealer)pair[0];
         myUnsealer = (Unsealer)pair[1];
-        
+
         if (Trace.captp.debug && Trace.ON) {
             Trace.captp.debugm("Create ProxyMgr " + this +
                                " connMgr=" + myConnMgr);
@@ -135,12 +136,12 @@
      */
     void connectionDead(DataConnection connection, Resolver optBufferedLookups) {
         myProxyConnections.removeKey(connection, true);
-        if (null == optBufferedLookups) { 
+        if (null == optBufferedLookups) {
             return;
         }
         /* Get back into it, then */
         try {
-            ProxyConnection proxyConn = 
+            ProxyConnection proxyConn =
                 getOrMakeProxyConnection(connection.getRemoteSearchPath(),
                                          connection.getRemoteVatID());
             proxyConn.submitLookups(optBufferedLookups);
@@ -151,12 +152,12 @@
             throw ExceptionMgr.asSafe(problem);
         }
     }
-    
+
     /**
      *
      */
     /*package*/ SwissTable getSwissTable() { return mySwissTable; }
-    
+
     /**
      * Notice that a new (inbound) data connection has appeared.
      *
@@ -179,14 +180,14 @@
     }
 
     /**
-     * If I've got a live ProxyConnection for that vatID, return it, else 
+     * If I've got a live ProxyConnection for that vatID, return it, else
      * null. <p>
      *
      * This does *not* initiate a connection attempt.
      */
     /*package*/ ProxyConnection optProxyConnection(String vatID)
     throws IOException {
-        DataConnection optDataConn = 
+        DataConnection optDataConn =
             myConnMgr.optConnection(vatID);
         if (null == optDataConn) {
             return null;
@@ -196,13 +197,13 @@
     }
 
     /**
-     * If vatID is me, return null, else get or make a live ProxyConnection 
+     * If vatID is me, return null, else get or make a live ProxyConnection
      * for vatID. <p>
      */
     /*package*/ ProxyConnection getOrMakeProxyConnection(ConstList searchPath,
                                                          String vatID)
     throws IOException {
-        DataConnection optDataConn = 
+        DataConnection optDataConn =
             myConnMgr.getConnection(vatID, searchPath);
         if (null == optDataConn) {
             return null;



1.8       +7 -7      e/src/jsrc/net/captp/jcomm/Redirector.java

Index: Redirector.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/Redirector.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Redirector.java	2001/08/29 00:20:15	1.7
+++ Redirector.java	2001/09/06 09:55:38	1.8
@@ -18,7 +18,7 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 import org.erights.e.elib.ref.Resolver;
@@ -27,28 +27,28 @@
 import org.erights.e.elib.util.OneArgFunc;
 
 /**
- * Wraps a Resolver in a way suitable for inclusion as an argument in a 
+ * Wraps a Resolver in a way suitable for inclusion as an argument in a
  * whenMoreResolved message. <p>
  *
  * Turns the first response such an argument may get into a resolution of the
- * Resolver, and then become inoperative. <p> 
+ * Resolver, and then become inoperative. <p>
  *
  * @author Mark S. Miller
  */
 /*package*/ class Redirector implements DeadManSwitch, OneArgFunc, PassByProxy {
-    
+
     /**
      *
      */
     private Resolver myOptResolver;
-    
+
     /**
      *
      */
     /*package*/ Redirector(Resolver resolver) {
         myOptResolver = resolver;
     }
-    
+
     /**
      * Resolve the Resolver to the arg.
      */
@@ -59,7 +59,7 @@
         }
         return null;
     }
-    
+
     /**
      * Smash the Resolver with the arg.
      */



1.13      +46 -46    e/src/jsrc/net/captp/jcomm/RemoteHandler.java

Index: RemoteHandler.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/RemoteHandler.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- RemoteHandler.java	2001/08/22 14:26:14	1.12
+++ RemoteHandler.java	2001/09/06 09:55:38	1.13
@@ -20,9 +20,9 @@
 */
 
 import org.erights.e.elib.prim.E;
+import org.erights.e.elib.ref.ProxyHandler;
 import org.erights.e.elib.ref.ProxyResolver;
 import org.erights.e.elib.ref.Ref;
-import org.erights.e.elib.ref.ProxyHandler;
 import org.erights.e.elib.sealing.Brand;
 import org.erights.e.elib.sealing.SealedBox;
 import org.erights.e.elib.sealing.Sealer;
@@ -31,51 +31,51 @@
 /**
  * Handles the tail-ends of remote references. <p>
  *
- * There is a 3x2 taxonomy of RemoteHandlers.  The first distinction is 
- * between a) handlers in the Imports table (or "imported handlers"), for 
- * which the position is positive, b) handlers in the questions table (or 
- * "question handlers"), for which the position is negative, and c) the 
- * handler of the other side's NonceLocator, for which the position is zero. 
- * <p> 
+ * There is a 3x2 taxonomy of RemoteHandlers.  The first distinction is
+ * between a) handlers in the Imports table (or "imported handlers"), for
+ * which the position is positive, b) handlers in the questions table (or
+ * "question handlers"), for which the position is negative, and c) the
+ * handler of the other side's NonceLocator, for which the position is zero.
+ * <p>
  *
- * The second distinction is between handlers for resolved remote references, 
- * represented by the concrete subclass FarHandler, and handlers for 
- * remote references that aren't yet resolved, represented by the concrete 
- * subclass RemotePromiseHandler.  As a special case, the handler at zero for 
- * the other side's NonceLocator is a RemotePromiseHandler, since shutdown 
- * attempts may cause it to be retargeted at a newly incarnated NonceLocator 
- * from the other side, which may have a new identity. 
+ * The second distinction is between handlers for resolved remote references,
+ * represented by the concrete subclass FarHandler, and handlers for
+ * remote references that aren't yet resolved, represented by the concrete
+ * subclass RemotePromiseHandler.  As a special case, the handler at zero for
+ * the other side's NonceLocator is a RemotePromiseHandler, since shutdown
+ * attempts may cause it to be retargeted at a newly incarnated NonceLocator
+ * from the other side, which may have a new identity.
  *
  * @author Mark S. Miller
  */
 /*package*/ abstract class RemoteHandler implements ProxyHandler {
-    
-    /** 
+
+    /**
      * Connection to the vat I point into
      */
     /*package*/ ProxyConnection myConn;
 
-    /** 
+    /**
      * My outgoing position. <p>
      *
      * If < 0, in the Questions table.
-     * If == 0, the special RemotePromiseHandler for the other side's 
+     * If == 0, the special RemotePromiseHandler for the other side's
      * NonceLocator.
      * If > 0, in the Imports table.
      */
     /*package*/ int myPos;
-    
+
     /**
-     * Only relevant if myPos > 0.  A count for all wire references that we 
+     * Only relevant if myPos > 0.  A count for all wire references that we
      * haven't yet accounted for to the other side.
      */
     /*package*/ int myWireCount;
-    
+
     /**
      * The Resolver of out Proxy, which also revives the Proxy on demand.
      */
     /*package*/ ProxyResolver myResolver;
-    
+
     /**
      *
      */
@@ -84,8 +84,8 @@
     /**
      * @param connection The ProxyConnection to communicate via
      * @param pos The Imports or Questions map pos of the object
-     * @param optIdentity null, or the sameness identity of the far 
-     *                    reference. 
+     * @param optIdentity null, or the sameness identity of the far
+     *                    reference.
      */
     /*package*/ RemoteHandler(ProxyConnection connection,
                               int pos,
@@ -97,33 +97,33 @@
         myResolver = new ProxyResolver(this, optIdentity);
         myBreakageReactors = FlexList.make();
     }
-    
+
     /**
-     * Handles this special case separately, so subclasses can override 
+     * Handles this special case separately, so subclasses can override
      * separately, and returns whether the case was specially handled.
      * <p>
      * The default implementation up here currently just returns false.
      */
     /*package*/ boolean handleWhenMoreResolved(Object reactor) {
-        //when we do three vats, we should check if reactor is a remote 
-        //reference to yet a third vat, in which case we should shorten 
+        //when we do three vats, we should check if reactor is a remote
+        //reference to yet a third vat, in which case we should shorten
         //rather than forward.
         return false; //XXX for now
     }
-    
+
     /**
-     * Handles this special case separately, so subclasses can override 
+     * Handles this special case separately, so subclasses can override
      * separately.
      * <p>
-     * The default implementation up here stores the reactor in 
+     * The default implementation up here stores the reactor in
      * myBreakageReactors.
      */
     /*package*/ boolean handleWhenBroken(Object reactor) {
         myBreakageReactors.push(reactor);
         return true;
     }
-    
 
+
     /**
      * How should my ref respond to an optMeta request?
      */
@@ -134,17 +134,17 @@
         }
         return sealer.seal(this);
     }
-    
+
     /**
-     * 
+     *
      */
     public void handleSendAllOnly(String verb, Object[] args) {
         if (1 == args.length) {
-            if ("whenMoreResolved".equals(verb) && 
+            if ("whenMoreResolved".equals(verb) &&
                 handleWhenMoreResolved(args[0])) {
 
                 return;
-                
+
             } else if ("whenBroken".equals(verb) &&
                        handleWhenBroken(args[0])) {
                 return;
@@ -152,17 +152,17 @@
         }
         myConn.sendDeliverOnlyOp(myPos, verb, args);
     }
-    
+
     /**
-     * 
+     *
      */
     public Ref handleSendAll(String verb, Object[] args) {
         if (1 == args.length) {
             if ("whenMoreResolved".equals(verb) &&
                 handleWhenMoreResolved(args[0])) {
-                    
+
                 return E.send(null, "yourself");
-                
+
             } else if ("whenBroken".equals(verb) &&
                        handleWhenBroken(args[0])) {
                 return E.send(null, "yourself");
@@ -177,9 +177,9 @@
                              args);
         return pr.getProxy();
     }
-    
+
     /**
-     * 
+     *
      */
     public void handleResolution(Object newTarget) {
         int len = myBreakageReactors.size();
@@ -190,9 +190,9 @@
         //XXX should we allow throws to propogate?
         reactToGC();
     }
-    
+
     /**
-     * 
+     *
      */
     public void reactToGC() {
         if (myPos > 0) {
@@ -202,12 +202,12 @@
             myConn.dropQuestion(myPos);
         }
     }
-    
+
     /**
      *
      */
     /*package*/ int getPos() { return myPos; }
-    
+
     /**
      *
      */



1.2       +4 -4      e/src/jsrc/net/captp/jcomm/RemotePromiseHandler.java

Index: RemotePromiseHandler.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/RemotePromiseHandler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RemotePromiseHandler.java	2001/08/20 21:17:49	1.1
+++ RemotePromiseHandler.java	2001/09/06 09:55:38	1.2
@@ -27,7 +27,7 @@
  * @author Mark S. Miller
  */
 /*package*/ class RemotePromiseHandler extends RemoteHandler {
-    
+
     /**
      * Flag to remember whether any E-level messages have been sent over me.
      */
@@ -42,7 +42,7 @@
     /*package*/ RemotePromiseHandler(ProxyConnection connection, int pos) {
         super(connection, pos, null);
     }
-    
+
     /**
      * Override to also clear myFreshFlag
      */
@@ -50,7 +50,7 @@
         myFreshFlag = false;
         super.handleSendAllOnly(verb, args);
     }
-    
+
     /**
      * Override to also clear myFreshFlag
      */
@@ -58,7 +58,7 @@
         myFreshFlag = false;
         return super.handleSendAll(verb, args);
     }
-    
+
     /**
      * Have no E-level messages yet been sent over me?
      */



1.10      +60 -59    e/src/jsrc/net/captp/jcomm/Sturdifier.java

Index: Sturdifier.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/Sturdifier.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Sturdifier.java	2001/08/20 05:07:43	1.9
+++ Sturdifier.java	2001/09/06 09:55:38	1.10
@@ -1,40 +1,41 @@
 package net.captp.jcomm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
-import java.math.BigInteger;
 import net.captp.tables.SwissTable;
 import net.captp.tables.Vine;
 import net.vattp.data.NetConfig;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.extern.timer.Timer;
 
+import java.io.IOException;
+import java.math.BigInteger;
+
 /**
- * Enables one to make SturdyRefs for an object, even if one is in a 
+ * Enables one to make SturdyRefs for an object, even if one is in a
  * distributed confinement box.
  *
  * @author Mark S. Miller, markm@caplet.com
  */
 public class Sturdifier {
-    
+
     private Introducer myIntroducer;
     private Timer myPersistentTimer;
 
@@ -47,16 +48,16 @@
     }
 
     /**
-     * Given an obj-swissNum association, arrange for the object to last 
-     * until an expiration time (so that the weak association will last till 
-     * then as well) and make a SturdyRef that uses this arrangement to 
+     * Given an obj-swissNum association, arrange for the object to last
+     * until an expiration time (so that the weak association will last till
+     * then as well) and make a SturdyRef that uses this arrangement to
      * designate the object across time and space.
      *
      * @param obj The object for which a SturdyRef is desired
-     * @param swissNum The swissNum already associated with this object 
+     * @param swissNum The swissNum already associated with this object
      *                 (presumably because of an action taken by our caller).
      * @param optExpirationDate The date after which the SturdyRef will not
-     *                          longer be guaranteed to be valid.  If 
+     *                          longer be guaranteed to be valid.  If
      *                          Long.MAX_VALUE, then it's always valid.
      * @return A new SturdyRef for the indicated object
      */
@@ -65,19 +66,19 @@
                                  long optExpirationDate)
     {
         /*
-         * We don't bother checking for Long.MAX_VALUE == optExpirationDate, 
-         * which is technically a XXX bug: these registrations will expire 
-         * before the year 300,000,000.  Assuming no processes stay live that 
-         * long, I think it's safe to assume that a future upgrade of E will 
-         * rescue such persistent state before then.  Let's call this the 
+         * We don't bother checking for Long.MAX_VALUE == optExpirationDate,
+         * which is technically a XXX bug: these registrations will expire
+         * before the year 300,000,000.  Assuming no processes stay live that
+         * long, I think it's safe to assume that a future upgrade of E will
+         * rescue such persistent state before then.  Let's call this the
          * "Y Three Hundred M problem".
          *
-         * We don't bother capturing the Timeout returned by whenAlarm 
-         * below, as this API provides no mean for cancelling these 
+         * We don't bother capturing the Timeout returned by whenAlarm
+         * below, as this API provides no mean for cancelling these
          * registrations.
          */
         myPersistentTimer.whenAlarm(optExpirationDate, new Vine(obj));
-        
+
         NetConfig netConfig = myIntroducer.getNetConfig();
         LocatorUnum locatorUnum = myIntroducer.getLocatorUnum();
         return new SturdyRef(locatorUnum,
@@ -86,7 +87,7 @@
                              swissNum,
                              optExpirationDate);
     }
-    
+
     /**
      * Produce a perpetual SturdyRef for an object. <p>
      *
@@ -98,17 +99,17 @@
     public SturdyRef run(Object obj) {
         return run(obj, Long.MAX_VALUE);
     }
-    
+
     /**
      * Produce a SturdyRef for an object.
      * <p>
-     * The SturdyRef will designate the object across time and space, at 
-     * least until the expiration time, so long as the hosting vat (this vat) 
+     * The SturdyRef will designate the object across time and space, at
+     * least until the expiration time, so long as the hosting vat (this vat)
      * is accessible.
      *
      * @param obj The object for which a SturdyRef is desired
      * @param optExpirationDate The date after which the SturdyRef will not
-     *                          longer be guaranteed to be valid.  If 
+     *                          longer be guaranteed to be valid.  If
      *                          Long.MAX_VALUE, then it's always valid.
      * @return A new SturdyRef for the indicated object
      */
@@ -124,63 +125,63 @@
     public Object[] incarnate(Object obj) {
         return incarnate(obj, Long.MAX_VALUE);
     }
-    
+
     /**
-     * Produce a SturdyRef, and a swissBase so in a later incarnation of this 
-     * vat a newly created object can be made to be the reincarnation of this 
-     * one (from the perspective of those holding the SturdyRef). 
+     * Produce a SturdyRef, and a swissBase so in a later incarnation of this
+     * vat a newly created object can be made to be the reincarnation of this
+     * one (from the perspective of those holding the SturdyRef).
      * <p>
-     * An object is that which object references to it designate.  From one 
-     * vat incarnation to another, the only intervat references which survive 
-     * are SturdyRefs.  When doing identity-persistence (as opposed to object 
-     * persistence), the application creates the first SturdyRef to a 
-     * persistent object using incarnate(..), and makes sure to store the 
-     * swissBase somewhere for use during this vat's next incarnation.  
-     * (In identity-persistence, where this precious information is stored is 
+     * An object is that which object references to it designate.  From one
+     * vat incarnation to another, the only intervat references which survive
+     * are SturdyRefs.  When doing identity-persistence (as opposed to object
+     * persistence), the application creates the first SturdyRef to a
+     * persistent object using incarnate(..), and makes sure to store the
+     * swissBase somewhere for use during this vat's next incarnation.
+     * (In identity-persistence, where this precious information is stored is
      * up to the app.)
      * <p>
-     * On the next incarnation of the vat, the app creates a fresh object to 
-     * serve as the reincarnation of the original object, and calls 
-     * reincarnate(..) so the old SturdyRef will now designate the new 
-     * object. 
+     * On the next incarnation of the vat, the app creates a fresh object to
+     * serve as the reincarnation of the original object, and calls
+     * reincarnate(..) so the old SturdyRef will now designate the new
+     * object.
      *
      * @param obj The object for which a SturdyRef is desired
      * @param optExpirationDate The date after which the SturdyRef will not
-     *                          longer be guaranteed to be valid.  If 
+     *                          longer be guaranteed to be valid.  If
      *                          Long.MAX_VALUE, then it's always valid.
-     * @return A pair of a new SturdyRef for 'obj', and a swissBase for 
+     * @return A pair of a new SturdyRef for 'obj', and a swissBase for
      *         reincarnating the identity assigned to 'obj'.
      */
     public Object[] incarnate(Object obj, long optExpirationDate) {
         SwissTable swissTable = myIntroducer.getSwissTable();
         BigInteger swissBase = swissTable.nextSwiss();
         BigInteger swissNum = swissTable.registerNewSwiss(obj, swissBase);
-        
+
         SturdyRef sr = makeSturdy(obj, swissNum, optExpirationDate);
         Object[] result = { sr, swissBase };
         return result;
     }
-    
+
     /**
      * optExpirationDate defaults to forever
      */
     public SturdyRef reincarnate(Object obj, BigInteger swissBase) {
         return reincarnate(obj, swissBase, Long.MAX_VALUE);
     }
-    
+
     /**
-     * Cause 'obj' to be the object designated by 'swissHash cryptoHash()' in 
+     * Cause 'obj' to be the object designated by 'swissHash cryptoHash()' in
      * this vat.
      * <p>
-     * Used by an identity-persistent app (as opposed to an object-persistent 
-     * app) to cause old SturdyRefs that were given out by a previous 
-     * incarnation of this vat to continue to function.  It's polite for an 
-     * identity-peristent app to use an expiration date that's at least as 
-     * big as the ones used in previous incarnations.  To do otherwise is to 
+     * Used by an identity-persistent app (as opposed to an object-persistent
+     * app) to cause old SturdyRefs that were given out by a previous
+     * incarnation of this vat to continue to function.  It's polite for an
+     * identity-peristent app to use an expiration date that's at least as
+     * big as the ones used in previous incarnations.  To do otherwise is to
      * not honor the previously implied obligation.
      *
      */
-    public SturdyRef reincarnate(Object obj, 
+    public SturdyRef reincarnate(Object obj,
                                  BigInteger swissBase,
                                  long optExpirationDate)
     {
@@ -188,7 +189,7 @@
         BigInteger swissNum = swissTable.registerNewSwiss(obj, swissBase);
         return makeSturdy(obj, swissNum, optExpirationDate);
     }
-        
+
 
     /**
      *



1.12      +9 -9      e/src/jsrc/net/captp/jcomm/SturdyRef.java

Index: SturdyRef.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/SturdyRef.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- SturdyRef.java	2001/08/22 14:26:14	1.11
+++ SturdyRef.java	2001/09/06 09:55:38	1.12
@@ -19,20 +19,20 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
-import java.math.BigInteger;
 import net.vattp.data.EARL;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.serial.Persistent;
 import org.erights.e.elib.tables.ConstList;
 
+import java.io.IOException;
+import java.math.BigInteger;
+
 /**
  * An object reference that be checkpointed and/or externalized and which can
  * survive network partitions.
  */
 public final class SturdyRef implements Persistent {
-    
+
     /** The LocatorUnum that links us to the outside world. */
     private LocatorUnum myLocatorUnum;
 
@@ -44,7 +44,7 @@
 
     /** Bound to an object in the vat identified by myHostID */
     private BigInteger mySwissNum;
-    
+
     /** How long is the object obligated to stay around? */
     private long myExpiration;
 
@@ -72,11 +72,11 @@
      * Test if this SturdyRef and another designate the same object. <p>
      *
      * @param other SturdyRef against which we are to be tested for equality
-     * @return 0.0 iff this and other designate the same object.  Otherwise 
+     * @return 0.0 iff this and other designate the same object.  Otherwise
      *             NaN.
      */
     public double compareTo(SturdyRef other) {
-        if (myHostID.equals(other.myHostID) && 
+        if (myHostID.equals(other.myHostID) &&
             mySwissNum.equals(other.mySwissNum))
         {
             return 0.0;
@@ -125,11 +125,11 @@
     }
 
     /**
-     * Return a (live) reference to the object which this SturdyRef 
+     * Return a (live) reference to the object which this SturdyRef
      * designates.  The result may be either a direct or eventual reference.
      */
     public Object getGrip() throws IOException {
-        return myLocatorUnum.getGrip(mySearchPath, 
+        return myLocatorUnum.getGrip(mySearchPath,
                                      myHostID,
                                      mySwissNum,
                                      null);



1.3       +3 -3      e/src/jsrc/net/captp/tables/AnswersTable.java

Index: AnswersTable.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/tables/AnswersTable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AnswersTable.java	2001/08/29 00:20:15	1.2
+++ AnswersTable.java	2001/09/06 09:55:39	1.3
@@ -18,7 +18,7 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 import org.erights.e.elib.prim.E;
@@ -27,12 +27,12 @@
  *
  */
 public class AnswersTable extends CommTable {
-    
+
     /**
      *
      */
     public AnswersTable() {}
-    
+
     /**
      *
      */



1.6       +49 -48    e/src/jsrc/net/captp/tables/CommTable.java

Index: CommTable.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/tables/CommTable.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CommTable.java	2001/08/29 00:20:15	1.5
+++ CommTable.java	2001/09/06 09:55:39	1.6
@@ -18,52 +18,53 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
-import java.lang.reflect.Array;
-import java.io.IOException;
 import org.erights.e.elib.base.TextWriter;
 
+import java.io.IOException;
+import java.lang.reflect.Array;
+
 /**
- * Just some common mechanism made available to the CommTable 
- * implementations. <p> 
+ * Just some common mechanism made available to the CommTable
+ * implementations. <p>
  *
- * CommTables are defined in terms of indices 
- * (always positive), not position.  At a higher level, positions use 
- * positive or negative to encode choice of table (questions vs imports, 
- * answers vs exports).  This can be a bit confusing because CommTable 
- * internally uses negated indices for free list entries, and these two uses 
+ * CommTables are defined in terms of indices
+ * (always positive), not position.  At a higher level, positions use
+ * positive or negative to encode choice of table (questions vs imports,
+ * answers vs exports).  This can be a bit confusing because CommTable
+ * internally uses negated indices for free list entries, and these two uses
  * of negation are completely independent.
  *
- * The rest of CapTP depends on the tables, but for the 
- * sake of unit testing, each table stands alone to the greatest reasonable 
- * degree.  Since AnswersTable adds almost nothing to CommTable, you can unit 
- * test CommTable by testing AnswersTable.  
+ * The rest of CapTP depends on the tables, but for the
+ * sake of unit testing, each table stands alone to the greatest reasonable
+ * degree.  Since AnswersTable adds almost nothing to CommTable, you can unit
+ * test CommTable by testing AnswersTable.
  *
  * @author Mark Miller, markm@caplet.com
  */
 public abstract class CommTable {
-    
+
     /**
      * Used to indicate the absence of any other object
      */
     static /*package*/ final Object ThePumpkin = new Object();
-    
+
     /** Default initial capacity */
     static private final int INIT_CAPACITY = 16;
     static private final int GROWTH_FACTOR = 2;
-    
+
     /**
      * How many allocated entries do I have?
      */
     /*package*/ int mySize;
-    
+
     /**
      * What is the size of my parallel arrays?
      */
     /*package*/ int myCapacity;
-    
+
     /**
      * Keeps track of the allocation of my indices. <p>
      *
@@ -74,19 +75,19 @@
      * If next == 0, we're at the end of the list.
      */
     /*package*/ int[] myFreeList;
-    
+
     /**
      * Let first = -myFreeHead;
      * If first >= 1, it's the index of the first free entry in myFreeList.
      * If first == 0, the list is empty.
      */
     /*package*/ int myFreeHead;
-    
+
     /**
      * The actual contents of the table.
      */
     /*package*/ Object[] myStuff;
-    
+
     /**
      * Starts will all inidices free.
      */
@@ -108,7 +109,7 @@
             myStuff[i] = ThePumpkin;
         }
     }
-    
+
     /**
      * Drop all state and make sure nothing ever works again.
      */
@@ -119,12 +120,12 @@
         myFreeHead = 1;
         myStuff = null;
     }
-    
+
     /**
      * How many allocated entries?
      */
     public int size() { return mySize; }
-    
+
     /**
      * Is this index free?  If it's past the end, yes.
      * If it's before the beginning, it's not valid, so no.
@@ -147,7 +148,7 @@
             throw new IllegalArgumentException("not free: " + index);
         }
     }
-    
+
     /**
      * Complain if not allocated
      */
@@ -156,7 +157,7 @@
             throw new IllegalArgumentException("not alloced: " + index);
         }
     }
-    
+
     /**
      * What the next capacity big enough to represent index?
      */
@@ -166,13 +167,13 @@
         }
         int result = myCapacity;
         while (index >= result) {
-            //XXX it's stupid to have an iterative algorithm.  How do I 
+            //XXX it's stupid to have an iterative algorithm.  How do I
             //calculate the smallest power of 2 > index?
             result += GROWTH_FACTOR;
         }
         return result;
     }
-    
+
     /**
      * Returns array or a copy of array sized to capacity.
      */
@@ -186,7 +187,7 @@
         System.arraycopy(array, 0, result, 0, len);
         return result;
     }
-    
+
     /**
      * Become big enough to hold index.  <p>
      *
@@ -208,12 +209,12 @@
         //overwrite the last entry
         myFreeList[myCapacity-1] = myFreeHead;
         myFreeHead = -oldCapacity;
-    }            
+    }
 
     /**
      * Deallocates an allocated index. <p>
      *
-     * Subclasses may override and send-super in order to clear their 
+     * Subclasses may override and send-super in order to clear their
      * parallel arrays.
      */
     public void free(int index) {
@@ -223,7 +224,7 @@
         myStuff[index] = ThePumpkin;
         mySize--;
     }
-    
+
     /**
      * Increment index's allocation count. <p>
      *
@@ -233,7 +234,7 @@
         mustBeAlloced(index);
         myFreeList[index]++;
     }
-    
+
     /**
      * Decrement index's allocation count delta, and free it if it reaches zero. <p>
      *
@@ -252,15 +253,15 @@
             return false;
         }
     }
-    
+
     /**
      * Allocate a particular index. <p>
      *
      * On entry, index must be free. <p>
      *
-     * Since the free list is singly linked, we can't generally do this in 
-     * constant time.  However, by far the typical case is for the requested 
-     * index to be the same as the one that zero-argument alloc would have 
+     * Since the free list is singly linked, we can't generally do this in
+     * constant time.  However, by far the typical case is for the requested
+     * index to be the same as the one that zero-argument alloc would have
      * allocated, so we need merely assure that this case is constant time.
      */
     private void alloc(int index) {
@@ -287,8 +288,8 @@
         }
         throw new RuntimeException("internal: broken free list");
     }
-    
-    
+
+
     /**
      * Gets the object at the allocated index.
      */
@@ -300,14 +301,14 @@
         }
         return result;
     }
-    
+
     /**
      *
      */
     public void put(int index, Object value) {
         put(index, value, false);
     }
-    
+
     /**
      *
      */
@@ -319,14 +320,14 @@
             throw new IllegalArgumentException("not alloced: " + index);
         } else {
             myStuff[index] = value;
-        } 
+        }
     }
-    
+
     /**
      * Allocates a free index, put value there, and returns that index. <p>
      *
-     * Subclasses may override and send-super to initialize their parallel 
-     * arrays. 
+     * Subclasses may override and send-super to initialize their parallel
+     * arrays.
      */
     public int bind(Object value) {
         if (myFreeHead == 0) {
@@ -340,9 +341,9 @@
         mySize++;
         return result;
     }
-    
+
     /**
-     * 
+     *
      */
     public void printOn(TextWriter out) throws IOException {
         if (myFreeList == null) {



1.7       +10 -10    e/src/jsrc/net/captp/tables/ExportsTable.java

Index: ExportsTable.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/tables/ExportsTable.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ExportsTable.java	2001/08/29 00:20:15	1.6
+++ ExportsTable.java	2001/09/06 09:55:39	1.7
@@ -18,7 +18,7 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 import org.erights.e.elib.prim.E;
@@ -34,14 +34,14 @@
      * Gets the index for a near export.
      */
     private IntTable myPBPMap;
-    
+
     /**
      *
      */
     public ExportsTable() {
         myPBPMap = new IntTable();
     }
-    
+
     /**
      *
      */
@@ -54,7 +54,7 @@
         super.smash(problem);
         myPBPMap = null;
     }
-    
+
     /**
      * Frees the index, including its entry, if any, in the pbp map.
      */
@@ -62,22 +62,22 @@
         myPBPMap.removeKey(myStuff[index]);
         super.free(index);
     }
-    
+
     /**
-     * 
+     *
      */
     public int indexFor(Object obj) {
         return myPBPMap.getInt(obj, -1);
     }
-    
+
     /**
-     * Allocates and returns the index of a newly exported local 
+     * Allocates and returns the index of a newly exported local
      * PassByProxy object.
      *
      * @param pbp The local PassByProxy object to be exported
      *
-     * @return The index of the FarRef to be created-imported on the 
-     * other end. 
+     * @return The index of the FarRef to be created-imported on the
+     * other end.
      */
     public int newFarPos(Object pbp) {
         pbp = PassByProxyGuard.THE_ONE.coerce(pbp, null);



1.4       +6 -6      e/src/jsrc/net/captp/tables/ImportsTable.java

Index: ImportsTable.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/tables/ImportsTable.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ImportsTable.java	2001/08/29 00:20:15	1.3
+++ ImportsTable.java	2001/09/06 09:55:39	1.4
@@ -18,18 +18,18 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
-import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.ref.ProxyHandler;
 import org.erights.e.elib.ref.ProxyResolver;
+import org.erights.e.elib.ref.Ref;
 
 /**
  *
  */
 public class ImportsTable extends CommTable {
-    
+
     /**
      *
      */
@@ -47,21 +47,21 @@
         }
         super.smash(problem);
     }
-    
+
     /**
      *
      */
     public ProxyResolver getProxyResolver(int index) {
         return (ProxyResolver)get(index);
     }
-    
+
     /**
      *
      */
     public Ref getProxy(int index) {
         return getProxyResolver(index).getProxy();
     }
-    
+
     /**
      *
      */



1.5       +45 -45    e/src/jsrc/net/captp/tables/NearGiftTable.java

Index: NearGiftTable.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/tables/NearGiftTable.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NearGiftTable.java	2001/08/29 00:20:15	1.4
+++ NearGiftTable.java	2001/09/06 09:55:39	1.5
@@ -21,80 +21,80 @@
 Contributor(s): ______________________________________.
 */
 
-import java.math.BigInteger;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.WeakPtr;
 import org.erights.e.elib.tables.FlexMap;
 
+import java.math.BigInteger;
+
 /**
- * Rendezvous point for 3-vat live Granovetter introductions of Resolved 
+ * Rendezvous point for 3-vat live Granovetter introductions of Resolved
  * remote references (FarRefs). <p>
  *
- * Where we normally speak of Alice giving Bob a reference to Carol, we here 
- * speak of the Donor (VatA) giving to the Recipient (VatB) a reference to 
- * the Gift (Carol) residing on the Host (VatC).  There is one NearGiftTable in 
- * the Host per Donor.  The Donor associates the gift with a Nonce, the 
- * Recipient's ID, and the SwissHash of the gift.  She then tells the Nonce 
- * and swissHash to the Recipient.  The Recipient asks the Host "What gift 
- * has Donor (identified by DonorID) deposited for me at this Nonce and 
- * swissHash?". <p> 
+ * Where we normally speak of Alice giving Bob a reference to Carol, we here
+ * speak of the Donor (VatA) giving to the Recipient (VatB) a reference to
+ * the Gift (Carol) residing on the Host (VatC).  There is one NearGiftTable in
+ * the Host per Donor.  The Donor associates the gift with a Nonce, the
+ * Recipient's ID, and the SwissHash of the gift.  She then tells the Nonce
+ * and swissHash to the Recipient.  The Recipient asks the Host "What gift
+ * has Donor (identified by DonorID) deposited for me at this Nonce and
+ * swissHash?". <p>
  *
- * A Nonce is a use-once unique number.  It only needs to be "impossible" to 
- * collide under benevolent assumptions; it doesn't need to be unguessable, 
- * so perhaps a 64 bit number could have been used instead.  For now, we just 
+ * A Nonce is a use-once unique number.  It only needs to be "impossible" to
+ * collide under benevolent assumptions; it doesn't need to be unguessable,
+ * so perhaps a 64 bit number could have been used instead.  For now, we just
  * use our normal unguessable numbers (given by 'entropy nextSwiss()'). <p>
  *
- * When the donor registers the gift, the swissHash should be verified (by 
- * the NearGiftTable's 
- * immediate client, the NonceLocator) to correspond to the gift, which 
- * should be Near.  The key under which the gift is stored is the triple 
- * [recipient ID, nonce, swissHash].  The corresponding loopup must match on 
+ * When the donor registers the gift, the swissHash should be verified (by
+ * the NearGiftTable's
+ * immediate client, the NonceLocator) to correspond to the gift, which
+ * should be Near.  The key under which the gift is stored is the triple
+ * [recipient ID, nonce, swissHash].  The corresponding loopup must match on
  * all three, and must be satisfied immediately.  To <a href=
  * "http://www.erights.org/elib/distrib/captp/WormholeOp.html">Allow
- * services with Near arguments</a> the recipient's Far reference must be 
- * made to correspond to a local Near reference, or it must become a 
- * DisconnectedRef.  In order to guarantee that the loopup can be satisfied 
- * immediately, we must ensure that the corresponding registration arrives 
- * first.  For this, we expect to use the unimplemented Wormhole technique, 
- * documented at the above URL.  Until then, the first case must be avoided.  
+ * services with Near arguments</a> the recipient's Far reference must be
+ * made to correspond to a local Near reference, or it must become a
+ * DisconnectedRef.  In order to guarantee that the loopup can be satisfied
+ * immediately, we must ensure that the corresponding registration arrives
+ * first.  For this, we expect to use the unimplemented Wormhole technique,
+ * documented at the above URL.  Until then, the first case must be avoided.
  * This avoidance results in the <a href=
  * "http://www.erights.org/elib/equality/same-ref.html#lost-resolution">Lost
  * Resolution</a> bug. <p>
  *
- * An interesting complexity: A partition could prevent the operation from 
- * completing, in which case the Recipient cannot be left hanging, and the 
+ * An interesting complexity: A partition could prevent the operation from
+ * completing, in which case the Recipient cannot be left hanging, and the
  * association must be cleaned up. <p>
  *
  * @author Mark S. Miller.
  */
 public class NearGiftTable {
-    
+
     /**
      * Maps from [recipID, Nonce, swissHash] to gift
      */
     private FlexMap myStuff;
-    
+
     /**
-     * @param nonceLocatorPromise A RemotePromise for the Donor's 
-     *                            NonceLocator. The ignore(vine) message is 
-     *                            sent to it, so that it can ignore it. 
+     * @param nonceLocatorPromise A RemotePromise for the Donor's
+     *                            NonceLocator. The ignore(vine) message is
+     *                            sent to it, so that it can ignore it.
      */
     public NearGiftTable() {
         myStuff = FlexMap.fromTypes(Object[].class, Object.class);
     }
-    
+
     /**
      * Disable this table.
      */
     public void smash(Throwable problem) {
         myStuff = null;
     }
-    
+
     /**
-     * Make the gift available to the recipient so long as the Vine is held 
+     * Make the gift available to the recipient so long as the Vine is held
      * onto (isn't garbage).
      */
-    public Vine provideFor(Object gift, 
+    public Vine provideFor(Object gift,
                            String recipID,
                            BigInteger nonce,
                            BigInteger swissHash)
@@ -102,21 +102,21 @@
         Object[] keyTriple = { recipID, nonce, swissHash };
         Vine result = new Vine(null);
         myStuff.put(keyTriple, gift);
-        //XXX do we need to hold onto the weakPtr in order for it to be 
+        //XXX do we need to hold onto the weakPtr in order for it to be
         //finalized?  If so, then we must.
         WeakPtr weakPtr = WeakPtr.make(result, this, "drop", keyTriple);
         return result;
     }
-    
+
     /**
      * Lookup the gift. <p>
      *
-     * Note that this message is named "acceptFor" whereas the corresponding 
-     * NonceLocator message is names "acceptFrom".  In acceptFor, the 
-     * recipient is explicit and the donor implicit.  In acceptFrom, the 
+     * Note that this message is named "acceptFor" whereas the corresponding
+     * NonceLocator message is names "acceptFrom".  In acceptFor, the
+     * recipient is explicit and the donor implicit.  In acceptFrom, the
      * donor is explicit and the recipient implicit.
      *
-     * @param recipID The vatID of the vat (Bob, the gift recipient) that the 
+     * @param recipID The vatID of the vat (Bob, the gift recipient) that the
      *                gift is being picked up for.
      * @param nonce Identifies (together with the recipID) the gift.
      */
@@ -130,14 +130,14 @@
         myStuff.removeKey(keyTriple);
         return result;
     }
-    
+
     /**
      * Automagically called when the vine is dropped.  <p>
      *
-     * The Donor is able to call this as well, which isn't appropriate, but 
+     * The Donor is able to call this as well, which isn't appropriate, but
      * isn't dangerous, so what the hell.
      */
-    public void drop(String recipID, 
+    public void drop(String recipID,
                      BigInteger nonce,
                      BigInteger swissHash)
     {



1.3       +39 -38    e/src/jsrc/net/captp/tables/PromiseGiftTable.java

Index: PromiseGiftTable.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/tables/PromiseGiftTable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PromiseGiftTable.java	2001/08/29 00:20:15	1.2
+++ PromiseGiftTable.java	2001/09/06 09:55:39	1.3
@@ -21,64 +21,65 @@
 Contributor(s): ______________________________________.
 */
 
-import java.math.BigInteger;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.WeakPtr;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.ref.Resolver;
 import org.erights.e.elib.tables.FlexMap;
 
+import java.math.BigInteger;
+
 /**
- * Rendezvous point for 3-vat live Granovetter introductions of Unresolved 
+ * Rendezvous point for 3-vat live Granovetter introductions of Unresolved
  * remote references (RemotePromises). <p>
  *
- * Where we normally speak of Alice giving Bob a reference to Carol, we here 
- * speak of the Donor (VatA) giving to the Recipient (VatB) a reference to 
- * the Gift (Carol) residing on the Host (VatC).  There is one 
- * PromiseGiftTable in the Host per Donor.  The Donor associates the gift 
- * with a Nonce and the Recipient's ID, and she tells the Nonce to the 
- * Recipient.  The Recipient asks the Host "What gift has Donor (identified 
- * by DonorID) deposited for me at this Nonce?". 
+ * Where we normally speak of Alice giving Bob a reference to Carol, we here
+ * speak of the Donor (VatA) giving to the Recipient (VatB) a reference to
+ * the Gift (Carol) residing on the Host (VatC).  There is one
+ * PromiseGiftTable in the Host per Donor.  The Donor associates the gift
+ * with a Nonce and the Recipient's ID, and she tells the Nonce to the
+ * Recipient.  The Recipient asks the Host "What gift has Donor (identified
+ * by DonorID) deposited for me at this Nonce?".
  * <p>
- * A Nonce is a use once unique number.  It only needs to be "impossible" to 
- * collide under benevolent assumptions; it doesn't need to be unguessable, 
- * so perhaps a 64 bit number could have been used instead.  For now, we just 
- * use our normal unguessable numbers (given by 'entropy nextSwiss()'). <p> 
+ * A Nonce is a use once unique number.  It only needs to be "impossible" to
+ * collide under benevolent assumptions; it doesn't need to be unguessable,
+ * so perhaps a 64 bit number could have been used instead.  For now, we just
+ * use our normal unguessable numbers (given by 'entropy nextSwiss()'). <p>
  *
- * Two interesting complexities: 1) The Recipient's lookup request may arrive 
- * at the Host before the Donors donation request does.  2) A partition could 
- * prevent the operation from completing, in which case the Recipient cannot 
+ * Two interesting complexities: 1) The Recipient's lookup request may arrive
+ * at the Host before the Donors donation request does.  2) A partition could
+ * prevent the operation from completing, in which case the Recipient cannot
  * be left hanging, and the association must be cleaned up. <p>
  *
- * For 3-vat live Granovetter introductions of Resolved remote references 
+ * For 3-vat live Granovetter introductions of Resolved remote references
  * (FarRefs), see the NearGiftTable.
  *
  * @author Mark S. Miller.
  */
 public class PromiseGiftTable {
-    
+
     /**
      * Maps from [recipID, Nonce] to [referent, optResolver]
      */
     private FlexMap myStuff;
-    
+
     /**
      * A RemotePromise for the Donor's NonceLocator.
      */
     private Object myNonceLocatorPromise;
 
     /**
-     * @param nonceLocatorPromise A RemotePromise for the Donor's 
-     *                            NonceLocator. The ignore(vine) message is 
-     *                            sent to it, so that it can ignore it. 
+     * @param nonceLocatorPromise A RemotePromise for the Donor's
+     *                            NonceLocator. The ignore(vine) message is
+     *                            sent to it, so that it can ignore it.
      */
     public PromiseGiftTable(Object nonceLocatorPromise) {
         myStuff = FlexMap.fromTypes(Object[].class, Object[].class);
         myNonceLocatorPromise = nonceLocatorPromise;
     }
-    
+
     /**
-     * Smash all untaken promises for undonated gifts, and then disable this 
+     * Smash all untaken promises for undonated gifts, and then disable this
      * table.
      */
     public void smash(Throwable problem) {
@@ -91,12 +92,12 @@
         }
         myStuff = null;
     }
-    
+
     /**
-     * Make the gift available to the recipient so long as the Vine is held 
+     * Make the gift available to the recipient so long as the Vine is held
      * onto (isn't garbage).
      */
-    public Vine provideFor(Object gift, 
+    public Vine provideFor(Object gift,
                            String recipID,
                            BigInteger nonce)
     {
@@ -108,7 +109,7 @@
             optValuePair[0] = gift;
             optValuePair[1] = null;
             myStuff.put(keyPair, optValuePair);
-            //XXX do we need to hold onto the weakPtr in order for it to be 
+            //XXX do we need to hold onto the weakPtr in order for it to be
             //finalized?  If so, then we must.
             WeakPtr weakPtr = WeakPtr.make(result, this, "drop", keyPair);
         } else {
@@ -119,20 +120,20 @@
         }
         return result;
     }
-    
+
     /**
      * Lookup the gift. <p>
      *
-     * If absent, return a promise for what will be given, and sends an 
-     * ignore(vine) to the nonceLocatorPromise.  The promise is good as long 
+     * If absent, return a promise for what will be given, and sends an
+     * ignore(vine) to the nonceLocatorPromise.  The promise is good as long
      * as the vine is held. <p>
      *
-     * Note that this message is named "acceptFor" whereas the corresponding 
-     * NonceLocator message is names "acceptFrom".  In acceptFor, the 
-     * recipient is explicit and the donor implicit.  In acceptFrom, the 
+     * Note that this message is named "acceptFor" whereas the corresponding
+     * NonceLocator message is names "acceptFrom".  In acceptFor, the
+     * recipient is explicit and the donor implicit.  In acceptFrom, the
      * donor is explicit and the recipient implicit.
      *
-     * @param recipID The vatID of the vat (Bob, the gift recipient) that the 
+     * @param recipID The vatID of the vat (Bob, the gift recipient) that the
      *                gift is being picked up for.
      * @param nonce Identifies (together with the recipID) the gift.
      */
@@ -144,7 +145,7 @@
             optValuePair = Ref.promise();
             myStuff.put(keyPair, optValuePair);
             Vine vine = new Vine(null);
-            //XXX do we need to hold onto the weakPtr in order for it to be 
+            //XXX do we need to hold onto the weakPtr in order for it to be
             //finalized?  If so, then we must.
             WeakPtr weakPtr = WeakPtr.make(vine, this, "drop", keyPair);
             E.sendOnly(myNonceLocatorPromise, "ignore", vine);
@@ -154,10 +155,10 @@
         }
         return optValuePair[0];
     }
-    
+
     /**
      * Automagically called when the vine is dropped.  <p>
-     * The Donor is able to call this as well, which isn't appropriate, but 
+     * The Donor is able to call this as well, which isn't appropriate, but
      * isn't dangerous, so what the hell.
      */
     public void drop(String recipID, BigInteger nonce) {



1.4       +7 -7      e/src/jsrc/net/captp/tables/QuestionsTable.java

Index: QuestionsTable.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/tables/QuestionsTable.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- QuestionsTable.java	2001/08/29 00:20:15	1.3
+++ QuestionsTable.java	2001/09/06 09:55:39	1.4
@@ -18,23 +18,23 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
-import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.ref.ProxyHandler;
 import org.erights.e.elib.ref.ProxyResolver;
+import org.erights.e.elib.ref.Ref;
 
 /**
  *
  */
 public class QuestionsTable extends CommTable {
-    
+
     /**
      *
      */
     public QuestionsTable() {}
-    
+
     /**
      *
      */
@@ -47,21 +47,21 @@
         }
         super.smash(problem);
     }
-    
+
     /**
      *
      */
     public ProxyResolver getProxyResolver(int index) {
         return (ProxyResolver)get(index);
     }
-    
+
     /**
      *
      */
     public Ref getProxy(int index) {
         return getProxyResolver(index).getProxy();
     }
-    
+
     /**
      *
      */



1.8       +66 -65    e/src/jsrc/net/captp/tables/SwissTable.java

Index: SwissTable.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/tables/SwissTable.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- SwissTable.java	2001/08/29 00:20:15	1.7
+++ SwissTable.java	2001/09/06 09:55:39	1.8
@@ -18,10 +18,9 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
-import java.math.BigInteger;
 import net.vattp.security.ESecureRandom;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.serial.Persistent;
@@ -31,53 +30,55 @@
 import org.erights.e.elib.util.OneArgFunc;
 import org.erights.e.meta.java.math.BigIntegerSugar;
 
+import java.math.BigInteger;
+
 /**
  * A weak-value table mapping from SwissNumbers to references. <p>
  *
- * There are two cases: 1) NEAR references to Selfish objects. 2) Everything 
- * else.  For case #1, a backwards weak-key table is also maintained, such 
- * that multiple registrations of a NEAR Selfish object will always yield the 
- * same SwissNumber.  This SwissNumber can then be (and is) used remotely to 
- * represent the sameness identity of resolved references to this Selfish 
+ * There are two cases: 1) NEAR references to Selfish objects. 2) Everything
+ * else.  For case #1, a backwards weak-key table is also maintained, such
+ * that multiple registrations of a NEAR Selfish object will always yield the
+ * same SwissNumber.  This SwissNumber can then be (and is) used remotely to
+ * represent the sameness identity of resolved references to this Selfish
  * object.  Case #1 is used for both live and sturdy references. <p>
  *
- * Case #2 is used only for sturdy references.  The table only maps from 
- * SwissNumbers to references, not vice versa, so each registration assigns a 
+ * Case #2 is used only for sturdy references.  The table only maps from
+ * SwissNumbers to references, not vice versa, so each registration assigns a
  * new SwissNumber.
  *
- * Although the SwissTable as a whole persists, only those associations for 
+ * Although the SwissTable as a whole persists, only those associations for
  * persistent objects persist with it.
  *
- * Since the SwissTable only holds its associations weakly, the Sturdifier 
- * must use other means to keep the object around.  But so long as it sticks 
+ * Since the SwissTable only holds its associations weakly, the Sturdifier
+ * must use other means to keep the object around.  But so long as it sticks
  * around, it will always have the identity registered in this table.
- * 
+ *
  * @author Mark Miller
  */
 public class SwissTable implements Persistent {
-    
+
     /**
      * Maps from NEAR Selfish objects to SwissNumbers.
      */
     private WeakKeyMap mySelfishToSwiss;
-    
+
     /**
      * Maps from SwissNumber to anything. <p>
      *
      * Note: can't handle null values.
      */
     private WeakValueMap mySwissToRef;
-    
+
     /**
      * Provides new unguessable SwissNumbers.
      */
     private ESecureRandom myEntropy;
-    
+
     /**
      * OneArgFuncs that handle lookup faulting.
      */
     private FlexMap mySwissDBs;
-    
+
     /**
      *
      */
@@ -87,25 +88,25 @@
         myEntropy = entropy;
         mySwissDBs = FlexMap.fromTypes(OneArgFunc.class, Void.TYPE);
     }
-    
+
     /**
      * Lookup an object by SwissNumber.  <p>
      *
-     * If not found, throw an IndexOutOfBoundsException. This is necessary 
-     * since null is a valid return value.  (By decree, the SwissNumber 0 
+     * If not found, throw an IndexOutOfBoundsException. This is necessary
+     * since null is a valid return value.  (By decree, the SwissNumber 0
      * designates null.)
      */
     public Object lookupSwiss(BigInteger swissNum)
     throws IndexOutOfBoundsException {
         if (swissNum.signum() == 0) {
-            //Since Weak*Maps can't handle nulls, we handle it ourselves.  
+            //Since Weak*Maps can't handle nulls, we handle it ourselves.
             return null;
         }
         Object optResult = mySwissToRef.get(swissNum, null);
         if (null != optResult) {
             return optResult;
         }
-        //Since we handle null ourselves, we know that a null optResult means 
+        //Since we handle null ourselves, we know that a null optResult means
         //a lookup miss.
         BigInteger swissHash = BigIntegerSugar.cryptoHash(swissNum);
         OneArgFunc[] dbs = (OneArgFunc[])mySwissDBs.getKeys(OneArgFunc.class);
@@ -116,31 +117,31 @@
         //try one more time
         return mySwissToRef.get(swissNum);
     }
-    
+
     /**
-     * A SwissDB is able to supplement the SwissTable's internal mySwissToRef 
+     * A SwissDB is able to supplement the SwissTable's internal mySwissToRef
      * table with further storage that gets faulted on demand.  <p>
-     * 
-     * When the SwissTable's lookupSwiss fails to find the swissNum in the 
-     * internal table, it invokes each of its registered swissDBs with a hash 
-     * of the swissNumber being looked up.  This is known as a swissHash, and 
-     * represents the identity of the object without providing any authority 
-     * to access the object.  A swissDB which has stored a representation of 
-     * the object elsewhere should then register the object using 
-     * registerIdentity or registerSwiss, both of which require the swissBase 
-     * -- the archash of the swissNumber being looked up.  In other words, 
+     *
+     * When the SwissTable's lookupSwiss fails to find the swissNum in the
+     * internal table, it invokes each of its registered swissDBs with a hash
+     * of the swissNumber being looked up.  This is known as a swissHash, and
+     * represents the identity of the object without providing any authority
+     * to access the object.  A swissDB which has stored a representation of
+     * the object elsewhere should then register the object using
+     * registerIdentity or registerSwiss, both of which require the swissBase
+     * -- the archash of the swissNumber being looked up.  In other words,
      * <pre>
      *     swissBase cryptoHash() -> swissNum
      *     swissNum crytoHash()   -> swissHash
      * </pre><p>
      *
-     * If an already registered swissDB is re-registered, an exception is 
+     * If an already registered swissDB is re-registered, an exception is
      * thrown.
      */
     public void addFaultHandler(OneArgFunc swissDB) {
         mySwissDBs.put(swissDB, null, true);
     }
-    
+
     /**
      * Removes a registered (by addFaultHandler) swissDB.  <p>
      *
@@ -149,16 +150,16 @@
     public void removeFaultHandler(OneArgFunc swissDB) {
         mySwissDBs.removeKey(swissDB);
     }
-    
+
     /**
-     * Returns the SwissNumber which represents the identity of this near 
+     * Returns the SwissNumber which represents the identity of this near
      * Selfish object in this vat. <p>
      *
      * If not 'Ref isSelfish(obj)", then this will throw an Exception.
-     * 
-     * This returns the unique SwissNumber which represents the designated 
-     * near selfish object's unique identity within this vat.  If the object 
-     * wasn't yet associated with a SwissNumber, it will be now. 
+     *
+     * This returns the unique SwissNumber which represents the designated
+     * near selfish object's unique identity within this vat.  If the object
+     * wasn't yet associated with a SwissNumber, it will be now.
      */
     public BigInteger getIdentity(Object obj) {
         obj = Ref.resolution(obj);
@@ -173,12 +174,12 @@
         }
         return result;
     }
-    
+
     /**
      * Returns a SwissNumber with which this ref can be looked up. <p>
      *
-     * This method always assigns and returns a new unique SwissNumber, even 
-     * for NEAR Selfish objects that already have one, with one exception.  
+     * This method always assigns and returns a new unique SwissNumber, even
+     * for NEAR Selfish objects that already have one, with one exception.
      * The swissNumber for null is always 0.
      */
     public BigInteger getNewSwiss(Object ref) {
@@ -193,20 +194,20 @@
         mySwissToRef.put(result, ref);
         return result;
     }
-    
+
     /**
      * Registers obj to have the identity 'swissBase cryptoHash()'. <p>
      *
-     * The cryptoHash of a SwissBase is a SwissNumber, so we also say that 
-     * the archash of a SwissNumber is a SwissBase.  (Of course, our security 
-     * rests on the assumption that the archash is infeasible to compute.)  
-     * Since an unconfined client of an object can often get its SwissNumber, 
-     * something more is needed to establish authority to associate an object 
-     * with a SwissNumber.  For this "something more", we use knowledge of 
+     * The cryptoHash of a SwissBase is a SwissNumber, so we also say that
+     * the archash of a SwissNumber is a SwissBase.  (Of course, our security
+     * rests on the assumption that the archash is infeasible to compute.)
+     * Since an unconfined client of an object can often get its SwissNumber,
+     * something more is needed to establish authority to associate an object
+     * with a SwissNumber.  For this "something more", we use knowledge of
      * the archash of the number. <p>
      *
-     * The object is given the new identity 'swissBase cryptoHash()', 
-     * assuming this doesn't conflict with any existing registrations.  If it 
+     * The object is given the new identity 'swissBase cryptoHash()',
+     * assuming this doesn't conflict with any existing registrations.  If it
      * does, an exception is thrown.
      */
     public BigInteger registerIdentity(Object obj, BigInteger swissBase) {
@@ -231,20 +232,20 @@
         mySwissToRef.put(result, obj);
         return result;
     }
-    
+
     /**
      * Registers ref at 'swissBase cryptoHash()'. <p>
      *
-     * registerNewSwiss() is to registerIdentity() as getNewSwiss() is to 
-     * getIdentity().  'swissBase cryptoHash()' must not already be 
-     * registered, or an exception will be thrown.  If ref is null, an 
-     * exception is thrown (since we assume its infeasible to find the 
+     * registerNewSwiss() is to registerIdentity() as getNewSwiss() is to
+     * getIdentity().  'swissBase cryptoHash()' must not already be
+     * registered, or an exception will be thrown.  If ref is null, an
+     * exception is thrown (since we assume its infeasible to find the
      * archash of zero).
      */
     public BigInteger registerNewSwiss(Object ref, BigInteger swissBase) {
         ref = Ref.resolution(ref);
         if (null == ref) {
-            throw new RuntimeException("May not re-register null: " + 
+            throw new RuntimeException("May not re-register null: " +
                                        swissBase);
         }
         BigInteger result = BigIntegerSugar.cryptoHash(swissBase);
@@ -255,13 +256,13 @@
         mySwissToRef.put(result, ref);
         return result;
     }
-    
+
     /**
-     * A convenience method typically used to obtain new SwissBases 
+     * A convenience method typically used to obtain new SwissBases
      * (archashes of SwissNumbers).
-     * 
-     * Since a client of SwissTable can obtain such entropy from the 
-     * SwissTable anyway, by registering objects, there's no loss of security 
+     *
+     * Since a client of SwissTable can obtain such entropy from the
+     * SwissTable anyway, by registering objects, there's no loss of security
      * in providing this convenience method.
      */
     public BigInteger nextSwiss() {



1.7       +7 -7      e/src/jsrc/net/captp/tables/Vine.java

Index: Vine.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/tables/Vine.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Vine.java	2001/07/22 05:29:55	1.6
+++ Vine.java	2001/09/06 09:55:39	1.7
@@ -24,18 +24,18 @@
 
 
 /**
- * An object to hold onto a remote reference so it will be held onto until we 
+ * An object to hold onto a remote reference so it will be held onto until we
  * grab the the next "vine". <p>
  *
  * Part of the 3-party live introduction mechanism.
  */
 public class Vine implements PassByProxy, Runnable {
-    
-    /** 
+
+    /**
      * The remote reference we hold onto. <p>
      *
-     * All we do is hold onto it. Really. 
-     */ 
+     * All we do is hold onto it. Really.
+     */
     private Object myRemote;
 
     /**
@@ -47,11 +47,11 @@
         }
         myRemote = remote;
     }
-    
+
     /**
      * When asked to run(), we do nothing; really. <p>
      *
-     * This way we can be scheduled to hold on to myRemote until we're run() 
+     * This way we can be scheduled to hold on to myRemote until we're run()
      * and dropped.
      */
     public void run() {}



1.4       +12 -12    e/src/jsrc/net/ertp/Assay.java

Index: Assay.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/ertp/Assay.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Assay.java	2001/08/29 00:20:16	1.3
+++ Assay.java	2001/09/06 09:55:39	1.4
@@ -18,7 +18,7 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 import org.erights.e.elib.sealing.UnsealingException;
@@ -33,11 +33,11 @@
  * to evaluate the acceptability to Bob of erights offered by Alice,
  * even if the escrow agent has no prior knowledge of the Issuer or
  * kinds of erights involved (like "dollars") Bob express his desire
- * using an Assay. <p> 
+ * using an Assay. <p>
  *
  * So an Assay must do more than just express desired erights.  It
  * must test whether a provided Purse contains adequate erights from
- * which to derive the desired erights.  Since the desired erights may 
+ * which to derive the desired erights.  Since the desired erights may
  * be exclusive erights, this test must also trasfer them to a Purse
  * where they may be safely kept, such as a Purse held by the escrow
  * agent.  Otherwise a successful test would give no assurance. <p>
@@ -53,16 +53,16 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public interface Assay {
-    
+
     /**
-     * The Issuer that "stands behind" this Assay.  The returned Issuer must 
+     * The Issuer that "stands behind" this Assay.  The returned Issuer must
      * be one that will vouch for this Assay.  Typically, this will be
      * the Issuer that issued this Assay.
      */
     Issuer getIssuer();
-    
+
     /**
-     * If src and dest are both of this Issuer and src contains adequate 
+     * If src and dest are both of this Issuer and src contains adequate
      * erights to fund the transfer, transfer the erights described by
      * this Assay into dest. <p>
      *
@@ -100,16 +100,16 @@
      * src. <p>
      *
      * @exception UnsealingException Thrown if src or dest isn't
-     * acceptable to the same Issuer as this Assay. 
+     * acceptable to the same Issuer as this Assay.
      * @exception InsufficientERightsException Thrown if src doesn't
      * contain adequate erights to fund the transfer.
      */
-    void transfer(Purse src, Purse dest) 
+    void transfer(Purse src, Purse dest)
          throws UnsealingException, InsufficientERightsException;
-    
+
     /**
-     * Return -1.0, 0.0, 1.0, or NaN as the erights represented by this Assay 
-     * is a strict subset, interchangeable with, a strict superset, or 
+     * Return -1.0, 0.0, 1.0, or NaN as the erights represented by this Assay
+     * is a strict subset, interchangeable with, a strict superset, or
      * incomparable with the erights of other.
      *
      * @exception UnsealingException if other isn't issued by the same Issuer.



1.4       +2 -2      e/src/jsrc/net/ertp/InsufficientERightsException.java

Index: InsufficientERightsException.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/ertp/InsufficientERightsException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InsufficientERightsException.java	2001/08/29 00:20:16	1.3
+++ InsufficientERightsException.java	2001/09/06 09:55:39	1.4
@@ -18,11 +18,11 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 /**
- * Thrown when an operation fails because one of the parties provided less 
+ * Thrown when an operation fails because one of the parties provided less
  * erights than were needed.  The banking notion of "Insufficient
  * Funds" generalized to arbitrary erights.
  *



1.5       +1 -1      e/src/jsrc/net/ertp/Issuer.java

Index: Issuer.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/ertp/Issuer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Issuer.java	2001/08/29 00:20:16	1.4
+++ Issuer.java	2001/09/06 09:55:39	1.5
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
-import org.erights.e.elib.sealing.UnsealingException;
 import net.captp.jcomm.SturdyRef;
+import org.erights.e.elib.sealing.UnsealingException;
 
 /**
  * The generic customer interface to an issuing authority.  An issuing



1.5       +6 -6      e/src/jsrc/net/ertp/Purse.java

Index: Purse.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/ertp/Purse.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Purse.java	2001/08/29 00:20:16	1.4
+++ Purse.java	2001/09/06 09:55:39	1.5
@@ -18,7 +18,7 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 import org.erights.e.elib.sealing.UnsealingException;
@@ -29,24 +29,24 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public interface Purse {
-    
+
     /**
      * The Issuer of the erights that can be held in this Purse.
      */
     Issuer getIssuer();
-    
+
     /**
-     * An Assay describing the erights <em>currently</em> contained in this 
+     * An Assay describing the erights <em>currently</em> contained in this
      * Purse.
      */
     Assay getAssay();
-    
+
     /**
      * If src is a Purse acceptable to the Issuer of this Purse,
      * transfer all of its erights into this Purse, and return an
      * Assay describing how much was transfered into this Purse (as
      * opposed to how much was lost from src).  Otherwise, throw
-     * an UnsealingException  
+     * an UnsealingException
      */
     Assay depositAll(Purse src) throws UnsealingException;
 }



1.2       +9 -9      e/src/jsrc/net/vattp/data/ConnectionAttemptFailed.java

Index: ConnectionAttemptFailed.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/ConnectionAttemptFailed.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ConnectionAttemptFailed.java	2000/12/21 22:15:18	1.1
+++ ConnectionAttemptFailed.java	2001/09/06 09:55:39	1.2
@@ -1,20 +1,20 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.7       +18 -17    e/src/jsrc/net/vattp/data/ConnectionsMgr.java

Index: ConnectionsMgr.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/ConnectionsMgr.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ConnectionsMgr.java	2001/08/17 03:11:32	1.6
+++ ConnectionsMgr.java	2001/09/06 09:55:39	1.7
@@ -20,20 +20,21 @@
 */
 // Copyright 1998, Electric Communities, all rights reserved worldwide.
 
+import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.trace.Trace;
+import org.erights.e.elib.prim.E;
+import org.erights.e.elib.prim.Runner;
+import org.erights.e.elib.ref.Ref;
+import org.erights.e.elib.ref.Resolver;
+import org.erights.e.elib.tables.ConstList;
+
 import java.io.IOException;
-import java.net.Socket;
 import java.net.InetAddress;
+import java.net.Socket;
 import java.net.UnknownHostException;
 import java.security.KeyPair;
 import java.util.Enumeration;
 import java.util.Hashtable;
-import org.erights.e.develop.trace.Trace;
-import org.erights.e.develop.assertion.Assertion;
-import org.erights.e.elib.prim.E;
-import org.erights.e.elib.prim.Runner;
-import org.erights.e.elib.ref.Resolver;
-import org.erights.e.elib.ref.Ref;
-import org.erights.e.elib.tables.ConstList;
 
 /**
  * Manage the connections between this vat and other vats.
@@ -129,14 +130,14 @@
      *
      * @param identityKeys is the KeyPair which defines the identity of this
      * vat.
-     * @param netConfig holds the configuration parameters for configuring 
+     * @param netConfig holds the configuration parameters for configuring
      * how we interact with the network.
      */
     public ConnectionsMgr(KeyPair identityKeys, NetConfig netConfig)
     throws UnknownHostException, IOException {
         this(identityKeys, netConfig, Runner.currentRunner());
     }
-    
+
     /*
      * Make a ConnectionsMgr.
      *
@@ -148,7 +149,7 @@
      *
      * @param identityKeys is the KeyPair which defines the identity of this
      * vat.
-     * @param netConfig holds the configuration parameters for configuring 
+     * @param netConfig holds the configuration parameters for configuring
      * how we interact with the network.
      * @param runner is the Runner to use to synchronize the connections.
      */
@@ -458,9 +459,9 @@
         myIdentifiedConnections.put(vatID, dc);
         return dc;
     }
-    
+
     /**
-     * Like getConnection((vatID, searchList), but if there isn't a working 
+     * Like getConnection((vatID, searchList), but if there isn't a working
      * live one, will return null rather than creating one.
      */
     public DataConnection optConnection(String vatID) {
@@ -610,14 +611,14 @@
      * expected to connect up MsgHandlers for all the messages
      * processed by higher layers in the protocol.  Note that a
      * maximum of one NewConnectionReactor may be registered. <p>
-     * 
+     *
      * This notification is for all DataConnections, whether the
      * connection was initiated from this end or from the other end.
      *
      * @param reactor is an object which implements
      * NewConnectionReactor.
      * @exception IOException is thrown if there is already a reactor
-     * registered. 
+     * registered.
      */
     public void addNewConnectionReactor(NewConnectionReactor reactor)
     throws IOException {
@@ -716,9 +717,9 @@
         }
         return ret;
     }
-    
+
     /**
-     * Returns the VatTP configuration parameters as they exist after 
+     * Returns the VatTP configuration parameters as they exist after
      * allocating a listen port.
      */
     public NetConfig getNetConfig() { return myNetConfig; }



1.5       +5 -3      e/src/jsrc/net/vattp/data/DES.java

Index: DES.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/DES.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DES.java	2001/08/25 19:54:01	1.4
+++ DES.java	2001/09/06 09:55:39	1.5
@@ -1,7 +1,10 @@
 package net.vattp.data;
-// $Id: DES.java,v 1.4 2001/08/25 19:54:01 markm Exp $
+// $Id: DES.java,v 1.5 2001/09/06 09:55:39 markm Exp $
 //
 // $Log: DES.java,v $
+// Revision 1.5  2001/09/06 09:55:39  markm
+// just formatting and import cleanups
+//
 // Revision 1.4  2001/08/25 19:54:01  markm
 // integrated Bill's VatTP changes
 //
@@ -94,7 +97,6 @@
  * on behalf of the Cryptix Development Team.  All rights reserved.
  */
 
-import java.io.PrintWriter;
 import java.security.InvalidKeyException;
 
 /**
@@ -130,7 +132,7 @@
  * <a href="http://www.systemics.com/docs/cryptix/">Cryptix Development Team</a>.
  * <br>All rights reserved.
  *
- * <p><b>$Revision: 1.4 $</b>
+ * <p><b>$Revision: 1.5 $</b>
  * @author  Systemics Ltd
  * @author  Geoffrey Keating (this Java implementation)
  * @author  Eric Young



1.3       +14 -13    e/src/jsrc/net/vattp/data/DataCommThunk.java

Index: DataCommThunk.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/DataCommThunk.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DataCommThunk.java	2001/02/20 05:33:43	1.2
+++ DataCommThunk.java	2001/09/06 09:55:39	1.3
@@ -1,28 +1,29 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.net.Socket;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.base.Thunk;
 
+import java.net.Socket;
+
 /**
  * This class is used by SendThread, RecvThread and ListenThread
  * to schedule calls to classes inside the vat
@@ -164,7 +165,7 @@
      * @param conn the DataPath object to invoke.
      * @param The byte array which is the message.
      */
-    /*package*/ DataCommThunk(DataPath conn, RecvThread recv, 
+    /*package*/ DataCommThunk(DataPath conn, RecvThread recv,
                               NetAddr remoteNetAddr,
                               NetAddr localNetAddr) {
         myDataPath = conn;
@@ -188,14 +189,14 @@
                 myDataPath.shutDownFinished(myMessage, myException);
                 return null;
             case SEND_FINISHED:
-                myDataPath.sendFinished(myWrittenCount, 
+                myDataPath.sendFinished(myWrittenCount,
                         myWrittenLength, myContinuation);
                 return null;
             case NEW_INCOMING_MSG:
                 myDataPath.newIncomingMsg(myMessage);
                 return null;
             case ACCEPT_RECEIVER:
-                myDataPath.acceptReceiver(myRecvThread, 
+                myDataPath.acceptReceiver(myRecvThread,
                         myRemoteNetAddr, myLocalNetAddr);
                 return null;
             case NOTICE_PROBLEM_CM:



1.4       +118 -117  e/src/jsrc/net/vattp/data/DataConnection.java

Index: DataConnection.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/DataConnection.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DataConnection.java	2001/08/17 03:11:32	1.3
+++ DataConnection.java	2001/09/06 09:55:39	1.4
@@ -1,44 +1,45 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 // Copyright 1998, Electric Communities, all rights reserved worldwide.
 
+import net.vattp.security.ESecureRandom;
+import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.trace.Trace;
+import org.erights.e.elib.prim.Runner;
+import org.erights.e.elib.tables.ConstList;
+import org.erights.e.elib.util.ConditionLock;
+import org.erights.e.elib.util.DynamicCollection;
+import org.erights.e.elib.util.DynamicCollectionEnumeration;
+import org.erights.e.elib.util.HexStringUtils;
+
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
-import java.net.NoRouteToHostException;
 import java.net.ConnectException;
+import java.net.NoRouteToHostException;
 import java.net.SocketException;
 import java.net.UnknownHostException;
 import java.security.KeyPair;
 import java.util.Hashtable;
 import java.util.Vector;
-import org.erights.e.elib.prim.Runner;
-import net.vattp.security.ESecureRandom;
-import org.erights.e.develop.trace.Trace;
-import org.erights.e.elib.tables.ConstList;
-import org.erights.e.elib.util.ConditionLock;
-import org.erights.e.elib.util.DynamicCollection;
-import org.erights.e.elib.util.DynamicCollectionEnumeration;
-import org.erights.e.elib.util.HexStringUtils;
-import org.erights.e.develop.assertion.Assertion;
 
 /**
  * Allow sending and receiving data to a single remote vat.
@@ -53,65 +54,65 @@
 
     /** The ConnectionsMgr we report status changes to. */
     private ConnectionsMgr myConnMgr;
-    
+
     /** The DataPath object we are using.  During crossed connection
      * resolution, the outbound path. */
     private /*nullOK*/ DataPath myDataPath;
-    
-    /** During crossed connection resolution, the incoming DataPath. 
+
+    /** During crossed connection resolution, the incoming DataPath.
      * Otherwise null. */
     private /*nullOK*/ DataPath myIncomingDataPath;
-    
+
     /** Array of MsgHandlers indexed by message type */
     private MsgHandler[] myMsgHandlers = new MsgHandler[Msg.HIGH_MSG_TYPE+1];
-    
+
     /** An enumeration of the places to search for the remote vat */
     private DynamicCollectionEnumeration mySiteSearch;
-    
+
     /** A Hashtable of the InetAddresses tried which failed due to host
      *  related problems.  They are not to be tried again in this attempt
      *  to connect to the vat.  The key is InetAddress,
      *  data is InetAddress. */
     private Hashtable myAddressesTried;
-    
-    
+
+
     /** The first place to look for the remote vat when resuming the
      * connection.  This value is "" when there is no better guesses
      * than come from a VLS lookup. */
     private String myFirstAddressToTry = "";
-    
+
     /** The places to search for the remote vat as a semicolon separated
      * list. */
     private String myFlattenedRemoteSearchPath;
-    
+
     /** The location the current DataPath are (to) (have been) speaking
         to. */
     private String myRemoteAddr;
-    
+
     /** The InetAddress of the remote end, or null if no connection has been
         made */
     private NetAddr myRemoteNetAddr = null;
-    
+
     /** The InetAddress of the local end, or null if no connection has been
         made */
     private NetAddr myLocalNetAddr = null;
-    
+
     /** The VatID of the other end of the connectiion. May be null. */
     private String myRemoteVatID;
-    
+
     /** The runner to have the SendThread and RecvThread synchronize on
      * when calling methods in this object.
      */
     private Runner myRunner;
-        
+
     /** The key pair which defines the identity of this vat */
     private KeyPair myIdentityKeys;
-    
+
     private String myLocalVatID;
 
     /** The semicolon separated search path for this vat */
     private String myLocalFlattenedSearchPath;
-    
+
     /** The reason shutDownConnection has been called */
     private Throwable myShutdownReason = null;
 
@@ -124,54 +125,54 @@
     static /*package*/ final byte DEAD       = 7;
     /** The current state of this DataConnection */
     private byte myState;
-    
+
     /** Place to queue outgoing messages while myState != RUNNING */
     private Vector myPendingOutput = null;
-    
+
         /** Place to accumulate the results of our search attempts */
     private Vector myProblemAccumulator;
-   
-    
+
+
     /** Whether we are initiating the connection or responding to a remotely
      * initiated connection. */
     private boolean myIsIncoming;
-    
-    
+
+
     /** The suspend ID to present to the other end for a resume, or null for
      * a new connection */
     private byte[] /*nullOK*/ myOutgoingSuspendID;
-    
+
     /** The suspend ID we asked the other end to present to resume the
      * connection, or null if the connection is not suspended. */
     private byte[] /*nullOK*/ myLocalSuspendID;
-    
-    // The following field is used by RecvThread and SendThread. 
+
+    // The following field is used by RecvThread and SendThread.
     // When the connection shuts down, the IVs are updated
     // so the connection can be resumed from suspension.  The authentication
     // keys, and protocol versions are set when the connection
     // is first established.
-    
+
     /** The protocol versions and authorization parameters */
     private AuthSecrets myProtocolParms;
-    
 
+
     // The following fields contain performance counters
-    
+
     /** The total bytes of messages received over this DataConnection */
-    /*package*/ long bytesReceived          = 0; 
-    
+    /*package*/ long bytesReceived          = 0;
+
     /** The total number of messages received over this DataConnection */
     /*package*/ long messagesReceived       = 0;
-    
+
     /** The size of the largest message received over this DataConnection */
     /*package*/ int maxReceivedMessageSize  = 0;
-    
+
     /** The total bytes of messages sent over this DataConnection */
     /*package*/ long bytesSent              = 0;
-    
+
     /** The total number of messages sent over this DataConnection */
     /*package*/ long messagesSent           = 0;
- 
+
     /** The size of the largest message sent over this DataConnection */
     /*package*/ int maxSentMessageSize      = 0;
 
@@ -221,17 +222,17 @@
         myLocalFlattenedSearchPath = localFlattenedSearchPath;
         myState = STARTING;
         //Save to resume the connection
-        myFlattenedRemoteSearchPath = flattenedRemoteSearchPath; 
+        myFlattenedRemoteSearchPath = flattenedRemoteSearchPath;
         //Make a list of locations to try for the new connection
             // myFirstAddressToTry will always be "" here.
-        DynamicCollection searchCollection 
+        DynamicCollection searchCollection
                     = new DynamicCollection(
                         EARL.parseSearchPath(myFlattenedRemoteSearchPath));
         mySiteSearch = searchCollection.elems();
         myAddressesTried = new Hashtable(1);
 
         // Make a place to keep the search results
-        myProblemAccumulator  = new Vector(1,1);        
+        myProblemAccumulator  = new Vector(1,1);
         // Start the search for the remote ID.
         tryNextAddress();
         if (Trace.comm.usage && Trace.ON) {
@@ -273,7 +274,7 @@
                                String remoteVatID,
                                DataPath path,
                                String localFlattenedSearchPath,
-                               boolean isIncoming) 
+                               boolean isIncoming)
     throws IOException {
         myConnMgr = connMgr;
         myIsIncoming = isIncoming;
@@ -284,13 +285,13 @@
         myLocalFlattenedSearchPath = localFlattenedSearchPath;
         myState = STARTING;
         // Make a place to keep the search results
-        myProblemAccumulator  = new Vector(1,1);        
+        myProblemAccumulator  = new Vector(1,1);
         connectPath(path, remoteVatID, isIncoming);
         if (Trace.comm.event && Trace.ON) {
             Trace.comm.eventm("DataConnection constructor done " + this);
         }
     }
-    
+
     /**
      *
      */
@@ -318,22 +319,22 @@
      * <br>     LIVES_DUP - This connection is a duplicate, discard it.
      * <br>     LIVES_NOTIFY - Notify the other end of a duplicate connection.
      *                         The other end must decide which connection to keep.
-     */   
-    /*package*/ int connectPath(DataPath incomingPath, 
-                    String remoteVatID, boolean isIncoming) 
+     */
+    /*package*/ int connectPath(DataPath incomingPath,
+                    String remoteVatID, boolean isIncoming)
                 throws IOException {
         int ret;    // Our return value
-        
+
         Assertion.test(remoteVatID.equals(myRemoteVatID), "Wrong DataConnection\n  "
                 + this + "\n  " + incomingPath + "\n  " + remoteVatID);
         if (null == myDataPath) {
             myDataPath = incomingPath;
-            myFlattenedRemoteSearchPath 
+            myFlattenedRemoteSearchPath
                     = myDataPath.connectConnection(this, myProtocolParms);
             if (SUSPENDED == myState) myState = RESUMING;
             return ConnectionsMgr.LIVES_CONTINUE;  //New path is only one
         }
-        
+
         // We must decide which connection to keep
         int outState = myDataPath.getStartupState();
         if (!isIncoming) {
@@ -341,8 +342,8 @@
         } else if (StartUpProtocol.ST_OUTGOING_EXPECT_GOTOO == outState) {
             ret = ConnectionsMgr.LIVES_DUP;    //Outgoing is too far along.
         } else if (StartUpProtocol.ST_EXPECT_MESSAGE == outState) {
-            if (Trace.comm.debug && Trace.ON) { 
-                Trace.comm.debugm("Killing incoming\n  " + incomingPath 
+            if (Trace.comm.debug && Trace.ON) {
+                Trace.comm.debugm("Killing incoming\n  " + incomingPath
                                 + "\n  in favor of\n  " + myDataPath);
             }
             ret = ConnectionsMgr.LIVES_DUP;    //Outgoing is too far along.
@@ -350,22 +351,22 @@
             // The far end is in charge
             ret = ConnectionsMgr.LIVES_NOTIFY;
             myIncomingDataPath = incomingPath;
-            myFlattenedRemoteSearchPath 
+            myFlattenedRemoteSearchPath
                     = myIncomingDataPath.connectConnection(this, myProtocolParms);
        } else {
             // We must decide.  Outbound not EXPECT_GOTO or EXPECT_MESSAGE,
             // That means we keep the incoming and stop the outgoing.
-            if (Trace.comm.debug && Trace.ON) { 
-                Trace.comm.debugm("Killing outgoing\n  " + myDataPath 
+            if (Trace.comm.debug && Trace.ON) {
+                Trace.comm.debugm("Killing outgoing\n  " + myDataPath
                                 + "\n  in favor of\n  " + incomingPath);
             }
             myDataPath.stopStartUpProtocol();
             myDataPath = incomingPath;
-            myFlattenedRemoteSearchPath 
+            myFlattenedRemoteSearchPath
                     = myDataPath.connectConnection(this, myProtocolParms);
             ret = ConnectionsMgr.LIVES_CONTINUE;
         }
-        if (Trace.comm.debug && Trace.ON) { 
+        if (Trace.comm.debug && Trace.ON) {
             Trace.comm.debugm("Returning "+ ret + " for " + incomingPath);
         }
         return ret;
@@ -433,7 +434,7 @@
 
     /**
      * Get the vatID of the local end.
-     * 
+     *
      * @return the vatID of the local identity as a string.
      */
     public String getLocalVatID() {
@@ -470,7 +471,7 @@
 
     /**
      * Get the vatID of the remote end.
-     * 
+     *
      * @return the vatID of the remote end as a string.
      */
     public String getRemoteVatID() {
@@ -540,7 +541,7 @@
      */
     /*package*/ boolean isChoiceIncoming() throws IOException {
         DataConnection incoming = null;
-        
+
         if (null == myIncomingDataPath) {
             if (Trace.comm.debug && Trace.ON) {
                 Trace.comm.debugm("Returning false, no incoming");
@@ -625,13 +626,13 @@
         if (Trace.comm.verbose && Trace.ON) {
             Trace.comm.verbosem(HexStringUtils.byteArrayToReadableHexString(message));
         }
-        
+
         bytesReceived += message.length;
         messagesReceived++;
         if (maxReceivedMessageSize < message.length) {
             maxReceivedMessageSize = message.length;
         }
-        
+
         int msgType = message[0] & 0xff;
         if (msgType <= Msg.HIGH_MSG_TYPE) {
             MsgHandler handler = myMsgHandlers[msgType];
@@ -676,7 +677,7 @@
             case SUSPENDED:
                 break;
             default:
-                Trace.comm.errorm("Unhandled internal state=" + myState, 
+                Trace.comm.errorm("Unhandled internal state=" + myState,
                                   problem);
                 break;
         }
@@ -685,7 +686,7 @@
     /**
      * Check if a connection should be resumed.
      *
-     * @param suspendID The secret that the other side must know to resume a 
+     * @param suspendID The secret that the other side must know to resume a
      * connection or null if this is a new connection.
      * @return true if the connection should be completed.
      *      <p>false if the connection should be abandoned.
@@ -707,7 +708,7 @@
      * Record why this try failed.  When the path is shutdown, the next
      * location in the search order will be tried.
      *
-     * @param msg A String or Throwable describing the reason for 
+     * @param msg A String or Throwable describing the reason for
      *      abandoning this try.
      */
     /*package*/ void recordConnectionFailure(Object msg) {
@@ -737,7 +738,7 @@
      * of msgType is received from the remote vat.  It will be called with
      * connectionDead when this connection dies.
      *
-     * @exception IOException is thrown if 
+     * @exception IOException is thrown if
      * there is already a different handler registered for this message type.
      *
      * @see Msg
@@ -751,16 +752,16 @@
             Trace.comm.errorm("Caller doesn't hold vat lock", new Throwable());
         }
         if (Trace.comm.event && Trace.ON) {
-            Trace.comm.eventm("registerMsgHandler="+ msgType +"(" 
+            Trace.comm.eventm("registerMsgHandler="+ msgType +"("
                     + handler +") on " + this);
         }
         Assertion.test(msgType > 0 || msgType <= Msg.HIGH_MSG_TYPE,
             "msgType=" + msgType + " out of range (1 .. " + Msg.HIGH_MSG_TYPE
             + ")");
-        Assertion.test( STARTING == myState || RESUMING == myState, 
+        Assertion.test( STARTING == myState || RESUMING == myState,
             "Called after the NewConnectionReactor returns\n  handler="
                     + handler + "\n  myState=" + myState);
-        if (null != myMsgHandlers[msgType] 
+        if (null != myMsgHandlers[msgType]
                     && myMsgHandlers[msgType] != handler) {
             throw new IOException(myMsgHandlers[msgType]
                     + " already registered for msgType=" + msgType);
@@ -774,7 +775,7 @@
      * @param length The size of the message passed to TCP.
      * @param continuation The notification passed to sendMessage.
      */
-    /*package*/ void sendFinished(int count, int length, 
+    /*package*/ void sendFinished(int count, int length,
                 StreamMessage /*NullOK*/ msg) {
         bytesSent += length;
         messagesSent += count;
@@ -811,7 +812,7 @@
         }
         if (message.length > Msg.MAX_OUTBOUND_MSG_LENGTH) {
             throw new IOException("Outbound message length=" + message.length
-                                  + " greater than limit=" 
+                                  + " greater than limit="
                                   + Msg.MAX_OUTBOUND_MSG_LENGTH);
         }
         if (Trace.comm.debug && Trace.ON) Trace.comm.debugm("enqueueing to "
@@ -858,13 +859,13 @@
             Trace.comm.errorm("Caller doesn't hold vat lock", new Throwable());
         }
         if (Trace.comm.event && Trace.ON) {
-            Trace.comm.eventm("sendMsg, Notify=" + notification + " Runner=" 
+            Trace.comm.eventm("sendMsg, Notify=" + notification + " Runner="
                     + placeToRun + " on " + this + "\n"
                     + HexStringUtils.byteArrayToReadableHexString(message));
         }
         if (message.length > Msg.MAX_OUTBOUND_MSG_LENGTH) {
             throw new IOException("Outbound message length=" + message.length
-                                  + " greater than limit=" 
+                                  + " greater than limit="
                                   + Msg.MAX_OUTBOUND_MSG_LENGTH);
         }
         if (Trace.comm.debug && Trace.ON) Trace.comm.debugm("enqueueing to "
@@ -879,7 +880,7 @@
     }
 
     /**
-     * Causes a clean shutdown of the connection.  All messages sent 
+     * Causes a clean shutdown of the connection.  All messages sent
      * previously will be sent.  When the shut down is complete, the
      * connectionDead method will be called on all registered MsgHandlers.
      */
@@ -889,7 +890,7 @@
     }
 
     /**
-     * Causes a clean shutdown of the connection.  All messages sent 
+     * Causes a clean shutdown of the connection.  All messages sent
      * previously will be sent.  When the shut down is complete, the
      * connectionDead method will be called on all registered MsgHandlers.
      *
@@ -925,7 +926,7 @@
             }
         } else if (SUSPENDING == myState) {
             myConnMgr.connectionSuspended(this, myRemoteVatID);
-            myState = SUSPENDED; 
+            myState = SUSPENDED;
             if (Trace.comm.usage && Trace.ON) {
                 Trace.comm.usagem("connection suspended " + this);
             }
@@ -934,7 +935,7 @@
             }
         } else {
             Throwable rr = (reason instanceof ConnectionShutDownException
-                            && null != myShutdownReason) 
+                            && null != myShutdownReason)
                     ? myShutdownReason
                     : reason;
             if (Trace.comm.usage && Trace.ON) {
@@ -945,7 +946,7 @@
                         + "\n" + rr);
                 } else {
                     Trace.comm.usagem(
-                        "Connection died " + myRemoteAddr + "|" 
+                        "Connection died " + myRemoteAddr + "|"
                         + myRemoteVatID + "\n" + rr);
                 }
             }
@@ -963,16 +964,16 @@
         myIsIncoming = false;
         myState = RESUMING;
         //Make a list of locations to try for the new connection
-        String path = (myFirstAddressToTry.equals("") 
+        String path = (myFirstAddressToTry.equals("")
                     ? myFlattenedRemoteSearchPath
                     : myFirstAddressToTry + ";" + myFlattenedRemoteSearchPath);
-        DynamicCollection searchCollection 
+        DynamicCollection searchCollection
             = new DynamicCollection(EARL.parseSearchPath(path));
         mySiteSearch = searchCollection.elems();
         myAddressesTried = new Hashtable(1);
 
         // Make a place to keep the search results
-        myProblemAccumulator  = new Vector(1,1);        
+        myProblemAccumulator  = new Vector(1,1);
         // Start the search for the remote ID.
         tryNextAddress();
     }
@@ -989,7 +990,7 @@
      * @param remotePort is the remote port number we tried to connect to,
      *          or 0 if this is an inbound connection (or the port number
      *          is unavailable for some other reason).  This port number
-     *          will be used if we need to resume the connection later.     
+     *          will be used if we need to resume the connection later.
      * @param authParms is the AuthSecrets object which contains the
      *          protocol versions and authorization parameters for the connection.
      */
@@ -999,13 +1000,13 @@
                 NetAddr remoteNetAddr,
                 NetAddr localNetAddr,
                 int remotePort,
-                AuthSecrets authParms) 
+                AuthSecrets authParms)
             throws IOException {
-        Assertion.test(myRemoteVatID.equals(remoteVatID), 
+        Assertion.test(myRemoteVatID.equals(remoteVatID),
                       "DataPath's remote vatID=", remoteVatID,
                       " not equal my remote vatID=", myRemoteVatID);
         myProtocolParms = authParms;
-        //it's safe to not check optInetAddress() for null, since 
+        //it's safe to not check optInetAddress() for null, since
         //remoteNetAddr must explicitly have one
         myRemoteAddr = remoteNetAddr.optInetAddress().getHostAddress() + ":"
                         + remoteNetAddr.getPort();
@@ -1024,25 +1025,25 @@
             myIncomingDataPath = null;
         }
         if (remotePort > 0) {   // We know where to retry to resume later
-            //it's safe to not check optInetAddress() for null, since 
+            //it's safe to not check optInetAddress() for null, since
             //remoteNetAddr must explicitly have one
-            myFirstAddressToTry 
+            myFirstAddressToTry
                     = remoteNetAddr.optInetAddress().getHostAddress()
                         + ":" + remotePort;
         }
         if (RESUMING == myState) {
             if (Trace.comm.debug && Trace.ON) {
-                Trace.comm.debugm("\nResume successfull after:\n" 
+                Trace.comm.debugm("\nResume successfull after:\n"
                                   + makeConnectionStatusReport());
             }
         } else {
             new Suspend(this);  // Object to handle SUSPEND messages
             if (Trace.comm.debug && Trace.ON) {
-                Trace.comm.debugm("\nStartup successfull after:\n" 
+                Trace.comm.debugm("\nStartup successfull after:\n"
                                   + makeConnectionStatusReport());
             }
         }
-        myConnMgr.startupSuccessful(this, 
+        myConnMgr.startupSuccessful(this,
                     myRemoteVatID, RESUMING == myState);
         myState = RUNNING;
         if (null != myShutdownReason) { // Someone has asked to shut down
@@ -1060,7 +1061,7 @@
 
     /**
      * Suspend the connection.  Note that this method is NOT part of the
-     * published API.  It is public to enable testing of the 
+     * published API.  It is public to enable testing of the
      * suspend/resume logic.  (Popular demand could cause it to remain
      * public.)
      *
@@ -1075,7 +1076,7 @@
         }
         if (RUNNING != myState) {
             throw new IOException(
-                    "Attempt to suspend a non-running connection, state=" 
+                    "Attempt to suspend a non-running connection, state="
                     + myState);
         }
         myLocalSuspendID = new byte[20];
@@ -1105,9 +1106,9 @@
      *
      */
      public String toString() {
-        return super.toString() + "\n  to " + myRemoteAddr + "|" 
-                    + myRemoteVatID 
-                    + "\n  searchpath=" + myFlattenedRemoteSearchPath 
+        return super.toString() + "\n  to " + myRemoteAddr + "|"
+                    + myRemoteVatID
+                    + "\n  searchpath=" + myFlattenedRemoteSearchPath
                     + " state=" + myState;
      }
 
@@ -1118,11 +1119,11 @@
     private void tryNextAddress () {
         if (null != mySiteSearch && mySiteSearch.hasMoreElements()) {
             myRemoteAddr = (String) mySiteSearch.nextElement();
-            
+
             //Build a DataPath to try the connection.
             myDataPath = new DataPath(null,  // No ConnectionsMgr.
-                                      this, 
-                                      myRemoteVatID, 
+                                      this,
+                                      myRemoteVatID,
                                       myRemoteAddr,
                                       myAddressesTried,
                                       myIdentityKeys,
@@ -1134,7 +1135,7 @@
         } else {
             String report = makeConnectionStatusReport();
             if (Trace.comm.usage && Trace.ON) {
-                Trace.comm.usagem(toString() 
+                Trace.comm.usagem(toString()
                         + "\nConnection attempt failed, search path exhausted\n"
                         + report);
             }
@@ -1151,7 +1152,7 @@
      *
      * @param handler is the object currently registered as the handler.
      *
-     * @exception IOException is thrown if the handler passed is not the 
+     * @exception IOException is thrown if the handler passed is not the
      * handler registered for this message type.
      *
      * @see Msg
@@ -1164,7 +1165,7 @@
             Trace.comm.errorm("Caller doesn't hold vat lock", new Throwable());
         }
         if (Trace.comm.event && Trace.ON) {
-            Trace.comm.eventm("unRegisterMsgHandler="+ msgType +"(" 
+            Trace.comm.eventm("unRegisterMsgHandler="+ msgType +"("
                     + handler +") on " + this);
         }
         if (msgType <= 0 || msgType > Msg.HIGH_MSG_TYPE) {



1.4       +119 -119  e/src/jsrc/net/vattp/data/DataPath.java

Index: DataPath.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/DataPath.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DataPath.java	2001/08/20 05:07:43	1.3
+++ DataPath.java	2001/09/06 09:55:39	1.4
@@ -1,48 +1,48 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 // Copyright 1998, Electric Communities, all rights reserved worldwide.
 
-import java.io.IOException;
-import java.net.Socket;
-import java.security.KeyPair;
-import java.util.Hashtable;
-
-import org.erights.e.elib.prim.SynchQueue;
-import org.erights.e.elib.prim.Runner;
 import net.vattp.security.ESecureRandom;
-import org.erights.e.extern.timer.Clock;
-import org.erights.e.extern.timer.TickReactor;
-import org.erights.e.extern.timer.Timer;
+import org.erights.e.develop.assertion.Assertion;
 import org.erights.e.develop.trace.Trace;
+import org.erights.e.elib.prim.Runner;
+import org.erights.e.elib.prim.SynchQueue;
 import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.util.ConditionLock;
 import org.erights.e.elib.util.HexStringUtils;
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.extern.timer.Clock;
+import org.erights.e.extern.timer.TickReactor;
+import org.erights.e.extern.timer.Timer;
 
+import java.io.IOException;
+import java.net.Socket;
+import java.security.KeyPair;
+import java.util.Hashtable;
+
 /**
  * Manage the physical connection to a single remote vat.
  *
  * <p>The important method(s) are acceptReceiver(), shartupSuccessful(),
  * shutDownPath(),
- * shutDownFinished(), sendMsg, sendFinished() 
+ * shutDownFinished(), sendMsg, sendFinished()
  * registerMsgHandler(), and unRegisterMsgHandler().
  *
  * <p>The valid message types are defined in class Msg.  We implement
@@ -52,14 +52,14 @@
  * @author Bill Frantz
  */
 /*package*/ class DataPath implements MsgHandler, TickReactor {
-    
+
     /** enqueued to effectively close the SynchQueue */
     static /*package*/ final Object theShutDownToken = new Integer(0);
-    
+
     /** The pong message to send when a ping message is received.  It
      * is constant, so we only need one of them. */
     static private final byte[] thePongMsg = {Msg.PONG};
-    
+
     /** The ping message to send when a when no messages have been
      * received within . */
     static private final byte[] thePingMsg = {Msg.PING};
@@ -67,69 +67,69 @@
     /** The DataConnection we report status changes to. It is connected late
      * in the startup protocol for an incoming connection */
     private DataConnection /*nullOK*/ myDataConnection;
-    
-    /** The ConnectionsMgr we report the remote identity to for an 
+
+    /** The ConnectionsMgr we report the remote identity to for an
      * incoming connection.  Null for outgoing connections unless they are
      * connectToVatAt connections. */
     private ConnectionsMgr /*nullOK*/ myConnMgr;
-    
+
     /** Array of MsgHandlers indexed by message type */
     private MsgHandler[] myMsgHandlers = new MsgHandler[Msg.HIGH_MSG_TYPE+1];
-    
+
     /** SynchQueue for queueing outbound messages.  This is initialized
      * during construction, and set to null in shutDownPath. */
     private SynchQueue myWriter;
-    
+
     /** The RecvThread receiving messages for this DataConnection */
     private RecvThread myRecvThread;
-    
+
     /** The SendThread we use for output.  We keep this reference
      * so we can do a mySendThread.stop() if the ping timeout pops. */
     private SendThread mySendThread;
-    
+
     /** The time we last received a part of an inbound message or sent
      * a part of an outbound message.  Used to ensure
      * that the connection is still connected, timeout the start up
      * protocol etc.  Initialized to object creation time to avoid
      * invalid timeouts. */
     private long lastNetActivity = System.currentTimeMillis();
-    
+
     /** The time we last sent a ping, or zero if we have received a
      * message which canceled the ping timeout. */
     private long timePingSent = 0;
-    
+
     /** The Clock object we are using to timeout messages */
     private Clock myClock;
-    
+
     /** The location the current Send/Recv Threads are (to) (have been) speaking
         to. */
     private String myRemoteAddr;
-    
+
     /** The InetAddress of the remote end, or null if no connection has been
         made */
     private NetAddr myRemoteNetAddr = null;
-    
+
     /** The InetAddress of the local end, or null if no connection has been
         made */
     private NetAddr myLocalNetAddr = null;
-    
+
     /** The port number we are trying to connect to, or 0 for an inbound
      * DataPath.  This port will be used to modify the search path after a
      * successful connection, so when the connection is resumed, the first
      * address tried will be the IP:port we successfully connected to. */
     private int myRemotePortNumber = 0;
-    
+
     /** The VatID of the other end of the connectiion. May be null. */
     private String myRemoteVatID;
-    
+
     /** The runner to have the SendThread and RecvThread synchronize on
      * when calling methods in this object.
      */
     private Runner myRunner;
-        
+
     /** The key pair which defines the identity of this vat */
     private KeyPair myIdentityKeys;
-    
+
     /** The local vatID.  The hash of the local vat's public key */
     private String myLocalVatID;
 
@@ -141,11 +141,11 @@
      * startup protocol so we have a search path to use to resume the
      * connection after it has been suspended. */
     private String mySavedFlattenedSearchPath;
-    
+
     /** While connecting, the StartUpProtocol object.  Otherwise null */
     private StartUpProtocol myStartUpProtocol;
-    
-    
+
+
 //The following fields are used only to create the StartUpProtocol object.
 
     /** Whether we are initiating the connection or responding to a remotely
@@ -158,22 +158,22 @@
 
 
     // The following fields contain performance counters
-    
+
     /** The total bytes of messages received over this DataPath */
-    /*package*/ long bytesReceived          = 0; 
-    
+    /*package*/ long bytesReceived          = 0;
+
     /** The total number of messages received over this DataPath */
     /*package*/ long messagesReceived       = 0;
-    
+
     /** The size of the largest message received over this DataPath */
     /*package*/ int maxReceivedMessageSize  = 0;
-    
+
     /** The total bytes of messages sent over this DataPath */
     /*package*/ long bytesSent              = 0;
-    
+
     /** The total number of messages sent over this DataPath */
     /*package*/ long messagesSent           = 0;
- 
+
     /** The size of the largest message sent over this DataPath */
     /*package*/ int maxSentMessageSize      = 0;
 
@@ -212,16 +212,16 @@
 
         myConnMgr = connMgr;
         myIsIncoming = true;
-        SynchQueue reader = 
-            commonConstructionSetup(identityKeys, 
+        SynchQueue reader =
+            commonConstructionSetup(identityKeys,
                                     localVatID, null, //no suspendID, incoming
                                     runner, localFlattenedSearchPath, vls);
-        
+
         myRemoteAddr = tcpConnection.getInetAddress().getHostAddress();
-        
+
         //Build a SendThread to handle the messages
         mySendThread = new SendThread(tcpConnection, this, reader, myRunner);
-        
+
         if (Trace.comm.debug && Trace.ON) {
             Trace.comm.debugm("DataPath constructor done " + this);
         }
@@ -238,7 +238,7 @@
      *
      * @param remoteVatID the vatID of the remote vat
      *
-     * @param remoteAddr is the dotted IP address or DNS name and port number 
+     * @param remoteAddr is the dotted IP address or DNS name and port number
      * of the place to try for the remote vat.
      *
      * @param addressesTried is a Hashtable of the InetAddresses already
@@ -252,7 +252,7 @@
      * @param runner is the Runner whose thread we use to synchronize calls
      * into the DataPath object from the SendThread and ReceiveThread
      *
-     * @param outgoingSuspendID Is the Suspend ID we are to send to the 
+     * @param outgoingSuspendID Is the Suspend ID we are to send to the
      * remote vat for resuming a connection, or null for a new connection.
      *
      * @param macKey is the key used for message authentication for resume,
@@ -289,34 +289,34 @@
         } else {
             myProtocolParms = protocolParms;
         }
-        SynchQueue reader = 
-            commonConstructionSetup(identityKeys, 
+        SynchQueue reader =
+            commonConstructionSetup(identityKeys,
                                     localVatID,
                                     outgoingSuspendID,
                                     runner,
-                                    localFlattenedSearchPath, 
+                                    localFlattenedSearchPath,
                                     //no VLS for outgoing connections
-                                    null); 
-        
+                                    null);
+
         myRemoteAddr = remoteAddr;
         // Get the port number from the address
         int colon = remoteAddr.indexOf(':');
         if (colon >= 0) {
-            myRemotePortNumber 
+            myRemotePortNumber
                     = Integer.parseInt(remoteAddr.substring(colon + 1));
         }
-        
+
         //Build the SendThread and RecvThread for this address
-        
+
         //Build a SendThread to handle the messages
-        mySendThread = new SendThread(remoteAddr, this, reader, myRunner, 
+        mySendThread = new SendThread(remoteAddr, this, reader, myRunner,
                                       addressesTried);
-        
+
         if (Trace.comm.debug && Trace.ON) {
             Trace.comm.debugm("DataPath constructor done " + this);
         }
     }
-    
+
     /**
      *
      */
@@ -331,14 +331,14 @@
      * @param remoteNetAddr is the remote end's address.
      * @param localNetAddr is the local end's address.
      */
-    /*package*/ void acceptReceiver(RecvThread receiver, 
-                                    NetAddr remoteNetAddr, 
+    /*package*/ void acceptReceiver(RecvThread receiver,
+                                    NetAddr remoteNetAddr,
                                     NetAddr localNetAddr)
     {
         myRecvThread = receiver;
         myRemoteNetAddr = remoteNetAddr;
         myLocalNetAddr = localNetAddr;
-        //it's safe to not check optInetAddress() for null, since 
+        //it's safe to not check optInetAddress() for null, since
         //remoteNetAddr must explicitly have one
         myRemoteAddr = remoteNetAddr.optInetAddress().getHostAddress() + ":"
                         + remoteNetAddr.getPort();
@@ -353,7 +353,7 @@
      *
      * @param reason The reason for abandoning the attempt.
      */
-    /*package*/ void cantResume(String reason) 
+    /*package*/ void cantResume(String reason)
                 throws IOException {
         shutDownPath();
         String msg = myRemoteAddr + ": " + reason;
@@ -371,7 +371,7 @@
      *          methods which are "in vat".
      * @param locatFlattenedSearchPath is the search path for this vat as a
      *          String, the elements separated by semicolons.
-     * @param vls is the object which gives VLS look functionality, or null 
+     * @param vls is the object which gives VLS look functionality, or null
      *          if this vat doesn't support that functionality or if this
      *          is an outgoing connection.
      * @return is the SynchQueue object for reading the output queue.
@@ -392,7 +392,7 @@
         // Make a queue for outbound messages on the new connection.
         //XXX should provide a type parameter
         SynchQueue reader = myWriter = new SynchQueue();
-        
+
         //Register to handle the PING and PONG messages.
         try {
             registerMsgHandler(Msg.PING, this);
@@ -404,14 +404,14 @@
         //Start a keep-alive ticker running.
         myClock = Timer.theTimer().every(Msg.TICK_RATE, this);
         myClock.start();
-        
+
         // Make a startup protocol
-        myStartUpProtocol = new StartUpProtocol(this, 
-                                                myIsIncoming, 
-                                                myRemoteVatID, 
+        myStartUpProtocol = new StartUpProtocol(this,
+                                                myIsIncoming,
+                                                myRemoteVatID,
                                                 myIdentityKeys,
                                                 myLocalVatID,
-                                                suspendID, 
+                                                suspendID,
                                                 myLocalFlattenedSearchPath,
                                                 vls);
         return reader;
@@ -463,7 +463,7 @@
      * Notify the connectToVatAt caller that he has tried to connect to self
      */
     /*package*/void connectToSelf() {
-        Assertion.test(null == myDataConnection, 
+        Assertion.test(null == myDataConnection,
                 "Remote end should not be identitifed");
         try {
             shutDownPath();
@@ -478,7 +478,7 @@
      *
      * @param reason The reason for abandoning the attempt.
      */
-    /*package*/ void duplicatePath(String reason, boolean isIdentified) 
+    /*package*/ void duplicatePath(String reason, boolean isIdentified)
                 throws IOException {
         shutDownPath();
         String msg = myRemoteAddr + ": " + reason;
@@ -551,16 +551,16 @@
      * @param remoteVatID the VatID of the remote vat.
      * @param remoteSearchPath the search path to use to find the remote vat
      *        in array form.
-     * @return the code received from 
+     * @return the code received from
             ConnectionsMgr.newIncomingConnectionIdentified
      */
     /*package*/ int identifyIncoming(String localVatID,
-                                     String remoteVatID, 
+                                     String remoteVatID,
                                      String remoteSearchPath)
-         throws IOException 
+         throws IOException
     {
         myRemoteVatID = remoteVatID;
-        
+
         //Save the search path to give to the DataConnection when startup
         //is finished.  It will need the search path to resume a suspended
         //connection.
@@ -572,14 +572,14 @@
     }
 
     /**
-     * Identify the remote vat's vatID for an outgoing "to WHOEVER" 
+     * Identify the remote vat's vatID for an outgoing "to WHOEVER"
      * connection.  Called by the StartUpProtocol.
      *
      * @param remoteVatID is the VatID of the remote vat.
      * @param remoteSearchPath is the search path to use to find the remote vat
      *        in array form.
      * @return an object the type of which determines what to do next.  If
-     *        the object is a String, then the startup protocol should 
+     *        the object is a String, then the startup protocol should
      *        terminate the connection attempt.  If the object is a byte
      *        array, then there is a suspended connection to the remote
      *        vat and the array is the suspendID.  If the object is null,
@@ -587,12 +587,12 @@
      *        should proceed.
      */
     /*package*/ Object identifyOutgoing(String localVatID,
-                                        String remoteVatID, 
-                                        String remoteFlattenedSearchPath) 
-         throws IOException 
+                                        String remoteVatID,
+                                        String remoteFlattenedSearchPath)
+         throws IOException
     {
         myRemoteVatID = remoteVatID;
-        
+
         //Save the search path to give to the DataConnection when startup
         //is finished.  It will need the search path to resume a suspended
         //connection.
@@ -628,17 +628,17 @@
         if (Trace.comm.verbose && Trace.ON) {
             Trace.comm.verbosem(HexStringUtils.byteArrayToReadableHexString(message));
         }
-        
+
         //Help the random number generator
         ESecureRandom.provideEntropy(message, 1);
-        
+
         lastNetActivity = System.currentTimeMillis();
         bytesReceived += message.length;
         messagesReceived++;
         if (maxReceivedMessageSize < message.length) {
             maxReceivedMessageSize = message.length;
         }
-        
+
         if (null == myMsgHandlers) {
             myDataConnection.newIncomingMsg(message);
             return;
@@ -712,7 +712,7 @@
                     } else if ( (now - timePingSent) > (2*Msg.PING_TIMEOUT) ) {
                         if (null != myClock) {
                             Trace.comm.errorm("Shutdown timeout " + this);
-                            Exception reason 
+                            Exception reason
                                     = new IOException("Shutdown Timeout");
                             //XXX Thread.stop() has been deprecated
                             mySendThread.stop(reason);
@@ -770,8 +770,8 @@
      * defined in the definition class Msg.  It is an error to register more
      * than one handler for a message type.
      * It is a fatal error if the msgType is out of range.
-     * It is a fatal error to register a handler after the 
-     * reactToNewConnection method of the object registered with the 
+     * It is a fatal error to register a handler after the
+     * reactToNewConnection method of the object registered with the
      * ConnectionsMgr has returned.
      *
      * @param handler is an object which implements the MsgHandler interface.
@@ -779,7 +779,7 @@
      * of msgType is received from the remote vat.  It will be called with
      * connectionDead when this connection dies.
      *
-     * @exception IOException is thrown if 
+     * @exception IOException is thrown if
      * there is already a handler registered for this message type.
      *
      * @see Msg
@@ -790,7 +790,7 @@
     /*package*/ void registerMsgHandler (int msgType, MsgHandler handler)
                         throws IOException {
         if (Trace.comm.debug && Trace.ON) {
-            Trace.comm.debugm("registerMsgHandler="+ msgType +"(" 
+            Trace.comm.debugm("registerMsgHandler="+ msgType +"("
                     + handler +") on " + this);
         }
         Assertion.test(msgType > 0 || msgType <= Msg.HIGH_MSG_TYPE,
@@ -806,7 +806,7 @@
     /**
      * Check if a connection should be resumed.
      *
-     * @param suspendID The secret that the other side must know to resume a 
+     * @param suspendID The secret that the other side must know to resume a
      * connection or null if this is a new connection.
      * @return true if the connection should be completed.
      *      <p>false if the connection should be abandoned.
@@ -821,7 +821,7 @@
      * @param length The size of the message passed to TCP.
      * @param continuation The notification passed to sendMessage.
      */
-    /*package*/ void sendFinished(int count, int length, 
+    /*package*/ void sendFinished(int count, int length,
                 StreamMessage /*NullOK*/ msg) {
         bytesSent += length;
         messagesSent += count;
@@ -832,19 +832,19 @@
     }
 
     /**
-     * Set the initial sequences to be used with a connection.  Called by 
+     * Set the initial sequences to be used with a connection.  Called by
      * StartUpProtocol when they are calculated.
      *
      * @param dhSecret is the Diffie Hellman shared secret.
-     * @param sendSequence is the first sequence number to be used to send 
+     * @param sendSequence is the first sequence number to be used to send
      *          data to the remote vat.
-     * @param recvSequence is the first sequence number to be used to 
+     * @param recvSequence is the first sequence number to be used to
      *          receive data from the remote vat.
      */
     /*package*/ void setAuthorizationSecrets(byte[] dhSecret,
                                       byte[] sendSequence, byte[] recvSequence) {
         myProtocolParms.myDHSecret = dhSecret;
-        myProtocolParms.myOutgoingSequence = sendSequence;        
+        myProtocolParms.myOutgoingSequence = sendSequence;
         myProtocolParms.myIncomingSequence = recvSequence;
     }
 
@@ -852,7 +852,7 @@
      * shutDownFinished called when all queued messages have been sent and
      * the socket closed.
      *
-     * @param sendSequence is the next sequence number to use on the send 
+     * @param sendSequence is the next sequence number to use on the send
      *          path after resume.
      * @param reason is a Throwable which describes why the shutdown.
      */
@@ -899,7 +899,7 @@
         // Enqueue a shutdown to have the SendThread send the queued messages
         // and then shutdown.  SendThread will call shutdownFinished when the
         // shutdown process is finished.
-        
+
         if (null != myWriter) enqueue(theShutDownToken); //Shutdown if not already shutting down
         myWriter = null;
         lastNetActivity = System.currentTimeMillis(); //Shutdown timeout
@@ -918,13 +918,13 @@
      * been successfully made.  The StartUpProtocol object has unregistered
      * its MsgHandlers and is ready to become garbage.
      *
-     * @param eMsgProtocolVersion the version of the E message protocl 
+     * @param eMsgProtocolVersion the version of the E message protocl
      *        selected.
      * @param protocolSuite the type of authentication selected.
      */
     /*package*/ void startupSuccessful(
                 String eMsgProtocolVersion,
-                String protocolSuite) 
+                String protocolSuite)
             throws IOException {
 
         if (null != protocolSuite) {
@@ -938,20 +938,20 @@
         //and placed them in myProtocolParms.  The send thread can use them.
         enqueue(myProtocolParms);
         myStartUpProtocol = null;   // Done with startup
-        
+
         //Reregister as the handler for the ping and pong messages.
         myDataConnection.registerMsgHandler(Msg.PING, this);
         myDataConnection.registerMsgHandler(Msg.PONG, this);
-        
+
         if (Trace.comm.usage && Trace.ON) {
             Trace.comm.usagem("Link to " + myRemoteVatID
                     + " uses CommProtocol " + myProtocolParms.myProtocolSuite
-                    + ", Emsg protocol=" 
+                    + ", Emsg protocol="
                     + myProtocolParms.myEProtocolVersion);
         }
-        
-        myDataConnection.startupSuccessful(this, myRemoteVatID, 
-                        myRemoteNetAddr, myLocalNetAddr, 
+
+        myDataConnection.startupSuccessful(this, myRemoteVatID,
+                        myRemoteNetAddr, myLocalNetAddr,
                         myRemotePortNumber, myProtocolParms);
         myMsgHandlers = null;   // Done handling messages
     }
@@ -972,7 +972,7 @@
      *
      */
     public String toString() {
-        return super.toString() + "|" + myRemoteAddr + "|" 
+        return super.toString() + "|" + myRemoteAddr + "|"
                     + myRemoteVatID + ", startupState=" + getStartupState();
     }
 
@@ -1009,7 +1009,7 @@
      *
      * @param handler is the object currently registered as the handler.
      *
-     * @exception IOException is thrown if the handler passed is not the 
+     * @exception IOException is thrown if the handler passed is not the
      * handler registered for this message type.
      *
      * @see Msg
@@ -1019,7 +1019,7 @@
     /*package*/ void unRegisterMsgHandler (int msgType, MsgHandler handler)
                         throws IOException {
         if (Trace.comm.debug && Trace.ON) {
-            Trace.comm.debugm("unRegisterMsgHandler="+ msgType +"(" 
+            Trace.comm.debugm("unRegisterMsgHandler="+ msgType +"("
                     + handler +") on " + this);
         }
         if (msgType <= 0 || msgType > Msg.HIGH_MSG_TYPE) {



1.4       +11 -11    e/src/jsrc/net/vattp/data/Decrypt3DES.java

Index: Decrypt3DES.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/Decrypt3DES.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Decrypt3DES.java	2001/08/25 19:54:01	1.3
+++ Decrypt3DES.java	2001/09/06 09:55:39	1.4
@@ -1,18 +1,18 @@
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -20,10 +20,10 @@
 package net.vattp.data;
 
 //import cryptix.provider.cipher.DES;
-import org.erights.e.develop.exception.NestedException;
-import org.erights.e.develop.trace.Trace;
 import net.vattp.security.MicroTime;
 import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.exception.NestedException;
+import org.erights.e.develop.trace.Trace;
 
 /**
  * Implementation of triple DES-EDE decryption in Cypher Block Chaining mode.



1.3       +48 -47    e/src/jsrc/net/vattp/data/EARL.java

Index: EARL.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/EARL.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- EARL.java	2001/07/24 11:52:15	1.2
+++ EARL.java	2001/09/06 09:55:39	1.3
@@ -1,67 +1,68 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 // Copyright 1998, Electric Communities, all rights reserved worldwide.
 
-import java.io.IOException;
-import java.math.BigInteger;
-import java.net.MalformedURLException;
-import java.text.ParseException;
 import org.erights.e.develop.format.ETimeFormat;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.tables.ConstList;
-import org.erights.e.meta.java.math.BigIntegerSugar;
 import org.erights.e.meta.java.math.BigIntegerMakerSugar;
+import org.erights.e.meta.java.math.BigIntegerSugar;
 
+import java.io.IOException;
+import java.math.BigInteger;
+import java.net.MalformedURLException;
+import java.text.ParseException;
+
 /**
  * A parsed URI designating an E object.  Created by parsing of a
  * human-readible reference to an E-object.  The human
  * readable form is: <pre>
- *     "cap://searchpath/vatID/swissStr[/expirationDate]".  
+ *     "cap://searchpath/vatID/swissStr[/expirationDate]".
  * </pre>
  * where <ul>
- *   <li><p>The "searchpath" is a semicolon-separated list of network 
- *      addresses to search to locate the vat designated by the "vatID".  At 
+ *   <li><p>The "searchpath" is a semicolon-separated list of network
+ *      addresses to search to locate the vat designated by the "vatID".  At
  *      these addresses may be found either vats or VLSes.</p>
- *      <p>Each network address is expected to be of the form parsed by 
+ *      <p>Each network address is expected to be of the form parsed by
  *      {@link NetAddr#NetAddr(String)}.</p></li>
- *   <li><p>The "vatID", which is the identity of a vat -- a public key 
- *      fingerprint encoded in base 64.  A vatID designates any vat that 
- *      authenticates using the corresponding private key.  It is generally 
- *      assumed that there is only one such live vat at any moment, but this 
- *      assumption is unenforceable.</p></li> 
+ *   <li><p>The "vatID", which is the identity of a vat -- a public key
+ *      fingerprint encoded in base 64.  A vatID designates any vat that
+ *      authenticates using the corresponding private key.  It is generally
+ *      assumed that there is only one such live vat at any moment, but this
+ *      assumption is unenforceable.</p></li>
  *   <li><p>The "swissStr" is the Swiss number of the object within that
- *      vat.  It is an unguessable secret number, encoded in base 64, whose 
- *      knowledge demonstrates authority to invoke the object it 
- *      designates.</p></li> 
+ *      vat.  It is an unguessable secret number, encoded in base 64, whose
+ *      knowledge demonstrates authority to invoke the object it
+ *      designates.</p></li>
  *   <li><p>"expirationDate" is the optional registration expiration date.
- *      as the difference, measured in milliseconds, between the expiration 
- *      time and midnight, January 1, 1970 UTC (known as the epoch).  If the 
- *      expiration date is omitted or is equal to Long.MAX_VALUE 
- *      milliseconds since the epoch, then the expiration is assumed to be 
+ *      as the difference, measured in milliseconds, between the expiration
+ *      time and midnight, January 1, 1970 UTC (known as the epoch).  If the
+ *      expiration date is omitted or is equal to Long.MAX_VALUE
+ *      milliseconds since the epoch, then the expiration is assumed to be
  *      infinite.</p>
- *      <p>The format of this date field is according to 
+ *      <p>The format of this date field is according to
  *      {@link org.erights.e.develop.format.ETimeFormat#formatTime(long)}</p></li>
  * </ul>
- * <p>Note that base 64 is supported by 
+ * <p>Note that base 64 is supported by
  *    {@link BigIntegerSugar#toString64(BigInteger)} and
  *    {@link BigIntegerMakerSugar#fromString64(String)}.</p>
  *
@@ -69,7 +70,7 @@
  * @author Mark Miller (changed the date format and some comments)
  */
 public class EARL {
-    
+
     private String myURI;
     private ConstList mySearchPath;
     private String myVatID;
@@ -79,17 +80,17 @@
     /**
      * Construct an EARL given the components of the URI.
      *
-     * @param searchPath The search path, a list of domain names and/or IP 
-     *   addresses. 
+     * @param searchPath The search path, a list of domain names and/or IP
+     *   addresses.
      * @param vatID is the vatID for the object, a base-36 encoded
      *   public key fingerprint.
      * @param swissNum is the swissNumber for the object.
      * @param expiration is the registration expiration date.  It is
-     *   the difference, measured in milliseconds, between the expiration 
-     *   time and midnight, January 1, 1970 UTC (the epoch).  A value equal 
-     *   to Long.MAX_VALUE will also be treated as infinite expiration. 
+     *   the difference, measured in milliseconds, between the expiration
+     *   time and midnight, January 1, 1970 UTC (the epoch).  A value equal
+     *   to Long.MAX_VALUE will also be treated as infinite expiration.
      */
-    public EARL(ConstList searchPath, 
+    public EARL(ConstList searchPath,
                 String vatID,
                 BigInteger swissNum,
                 long expiration)
@@ -109,7 +110,7 @@
      * Construct an EARL given the URI string.
      *
      * @param uri is an URI of the form: <pre>
-     *     "cap://searchpath/vatID/swissStr[/expirationDate]".  
+     *     "cap://searchpath/vatID/swissStr[/expirationDate]".
      * </pre>
      * See the class comment for an explanation of the fields of this format.
      */
@@ -119,13 +120,13 @@
     }
 
     /**
-     * Return the expiration date string for this EARL.  Infinite expiration 
+     * Return the expiration date string for this EARL.  Infinite expiration
      * is indicated as Long.MAX_VALUE.
      */
     public long expiration() {
         return myExpiration;
     }
-    
+
     /**
      *
      */
@@ -134,7 +135,7 @@
         if (path == null || path.size() == 0) {
             return ret; // could be reasonable to throw an exception here...
         }
-        
+
         int i = 0;
         while (i < path.size() - 1) {
             ret += path.get(i++) + ";" ;
@@ -160,7 +161,7 @@
     /**
      * Parse a URI into its constituent elements, saving them as our own.
      * <p>
-     * Modified by MarkM so that it strips off any number of leading "cap:" 
+     * Modified by MarkM so that it strips off any number of leading "cap:"
      * prefixes, including zero, enabling it to accept URI bodies as well.
      *
      * @param uri The URI string to be parsed.
@@ -188,7 +189,7 @@
         }
         String path = rest.substring(0, i);
         rest = rest.substring(i+1);
-        mySearchPath = parseSearchPath(path); 
+        mySearchPath = parseSearchPath(path);
 
         i = rest.indexOf('/');
         if (i<1) {
@@ -278,9 +279,9 @@
     public String toString() {
         return myURI;
     }
-    
+
     /**
-     * Since this corresponds to an E URI expression, print with angle 
+     * Since this corresponds to an E URI expression, print with angle
      * brackets.
      */
     public void printOn(TextWriter out) throws IOException {



1.4       +11 -11    e/src/jsrc/net/vattp/data/Encrypt3DES.java

Index: Encrypt3DES.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/Encrypt3DES.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Encrypt3DES.java	2001/08/25 19:54:01	1.3
+++ Encrypt3DES.java	2001/09/06 09:55:39	1.4
@@ -1,28 +1,28 @@
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 package net.vattp.data;
 
 //import cryptix.provider.cipher.DES;
-import org.erights.e.develop.exception.NestedException;
-import org.erights.e.develop.trace.Trace;
 import net.vattp.security.MicroTime;
 import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.exception.NestedException;
+import org.erights.e.develop.trace.Trace;
 
 /**
  * Implementation of triple DES-EDE encryption in Cypher Block Chaining mode.



1.3       +22 -21    e/src/jsrc/net/vattp/data/ListenThread.java

Index: ListenThread.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/ListenThread.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ListenThread.java	2001/02/20 05:33:43	1.2
+++ ListenThread.java	2001/09/06 09:55:39	1.3
@@ -1,31 +1,32 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 //  Copyright 1998 Electric Communities. All rights reserved worldwide.
 
-import org.erights.e.elib.prim.Runner;
 import org.erights.e.develop.trace.Trace;
+import org.erights.e.elib.prim.Runner;
+
 import java.io.IOException;
+import java.net.InetAddress;
 import java.net.ServerSocket;
 import java.net.Socket;
-import java.net.InetAddress;
 import java.net.UnknownHostException;
 
 /**
@@ -35,24 +36,24 @@
  * @author Bill Frantz
  * Based on work by Chip Morningstar, 25-March-1997 which is
  * based on earlier work by Eric Messick and Gordie Freedman
- * modified by MarkM to resolve the listenAddress during construction rather 
- *          than in the new thread, so it can be synchronously added to the 
+ * modified by MarkM to resolve the listenAddress during construction rather
+ *          than in the new thread, so it can be synchronously added to the
  *          ConnectionMgr's searchPath.
  */
 
-/*package*/ class ListenThread extends Thread { 
+/*package*/ class ListenThread extends Thread {
 
     private boolean myTerminateFlag = false;
     private UserThread myUserThread;
     private InetAddress myOptIP = null;
     private ServerSocket myListenServerSocket;
-    
+
     /** The ConnectionsMgr to report new Sockets to */
     private ConnectionsMgr myConnMgr;
-    
+
     /** A runner for synchronization when calling the ConnectionsMgr */
     private Runner myRunner;
-    
+
     /** An object to synchronize communication with the user thread */
     private Object myUserThreadLock = new Object();
     private boolean mySuspended = false;
@@ -66,7 +67,7 @@
      *  interesting events (new connections and errors) that happen while
      *  listening.
      */
-    /*package*/ ListenThread(String optLocalAddress, 
+    /*package*/ ListenThread(String optLocalAddress,
                              ConnectionsMgr connMgr,
                              Runner runner)
     throws UnknownHostException, IOException {
@@ -90,7 +91,7 @@
     /**
      * Call a method in the ConnectionsMgr
      *
-     * @param thunk a Thunk that will perform the call.  The thunk will 
+     * @param thunk a Thunk that will perform the call.  The thunk will
      * be called after the Vat lock is obtained.
      */
     private void callMgr(DataCommThunk thunk) {
@@ -114,7 +115,7 @@
     }
 
     /**
-     * The address on which this thread is listening, or null if there was a 
+     * The address on which this thread is listening, or null if there was a
      * problem
      */
     /*package*/ NetAddr listenAddress() {
@@ -184,7 +185,7 @@
      */
     private void setupNewConnection(Socket clientSocket) {
         callMgr(new DataCommThunk(myConnMgr, clientSocket));
-        
+
     }
 
     /**



1.3       +25 -25    e/src/jsrc/net/vattp/data/Msg.java

Index: Msg.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/Msg.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Msg.java	2001/03/05 01:53:06	1.2
+++ Msg.java	2001/09/06 09:55:39	1.3
@@ -1,20 +1,20 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -29,7 +29,7 @@
  * @author Bill Frantz
  */
 public class Msg {
-    
+
     /** The protocol versions this implementations supports. */
     static /*package*/ final String[] Version = {"E0", "E0"};
 
@@ -38,7 +38,7 @@
 
     // Value zero is not defined as an error check to make sure callers
     // actually assign something to the first byte of the message.
-    
+
     /** Supported versions of the E protocol.  */
     static /*package*/ final byte PROTOCOL_VERSION  = 1;
 
@@ -61,7 +61,7 @@
 
     /** E level message to an object at the remote end */
     public      static final byte E_MSG             = 7;
-    
+
     /** RMI Comm message to a stream at the other end */
     public      static final byte TUNNEL_MSG        = 8;
 
@@ -71,38 +71,38 @@
 
     /** Highest message type allocated (used to allocate arrays) */
     static /*package*/ final byte HIGH_MSG_TYPE     = 8;
-    
-    
-    
+
+
+
     /** Maximum length message permitted on a connection.  This limit is
      * enforced by the DataConnection object.*/
     static public final int MAX_OUTBOUND_MSG_LENGTH = 1024*1024;
-    
+
     /** Maximum length message we will receive.  This length is set longer
      * than MAX_OUTBOUND_MSG_LENGTH to allow for MAC overhead etc.  This
      * limit is enforced by the RecvThread. */
-    static /*package*/ final int MAX_INBOUND_MSG_LENGTH  
+    static /*package*/ final int MAX_INBOUND_MSG_LENGTH
                                     =  MAX_OUTBOUND_MSG_LENGTH + 256;
-                                    
-    
+
+
     /**
-     * A fudge factor with which to multiply the timeouts for purposes of 
+     * A fudge factor with which to multiply the timeouts for purposes of
      * debugging.
      */
     //static private final long TIME_FUDGE = 1;  //the normal value
     static private final long TIME_FUDGE = 60;  //debug value
-    
-    /** The tick rate for the connection keep alive clock.  Used in 
+
+    /** The tick rate for the connection keep alive clock.  Used in
      * conjunction with PING_SENDTIME and PING_TIMEOUT to ensure that the
      * connection is still in good working order. In milliseconds.*/
     static /*package*/ final long TICK_RATE = 15*1000*TIME_FUDGE;
-    
+
     /** The timeout for no messages received.  When this timeout is exceeded,
      * we send a ping message.  In milliseconds.*/
     static /*package*/ final long PING_SENDTIME = 20*1000*TIME_FUDGE;
-    
+
     /** The timeout for a ping.  If we don't receive a message within this
-     * time after we have sent a ping, we declare the connection down.  
+     * time after we have sent a ping, we declare the connection down.
      * In milliseconds.*/
     static /*package*/ final long PING_TIMEOUT = 20*1000*TIME_FUDGE;
     private Msg() {}    // This class is only static final values.



1.2       +9 -9      e/src/jsrc/net/vattp/data/MsgHandler.java

Index: MsgHandler.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/MsgHandler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MsgHandler.java	2000/12/21 22:15:18	1.1
+++ MsgHandler.java	2001/09/06 09:55:39	1.2
@@ -1,20 +1,20 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.3       +13 -13    e/src/jsrc/net/vattp/data/NetAddr.java

Index: NetAddr.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/NetAddr.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- NetAddr.java	2001/07/24 11:52:15	1.2
+++ NetAddr.java	2001/09/06 09:55:39	1.3
@@ -1,20 +1,20 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -44,7 +44,7 @@
      * may be both of these separated by a slash, in which case only the
      * part after the slash is significant.  If the significant part
      * of the hostname is absent, then the port is associated with all
-     * local IP addresses. 
+     * local IP addresses.
      * <p>
      * Examples: <pre>
      *   "the-earth.communities.com/205.162.51.187:4568"
@@ -55,9 +55,9 @@
      *   ""
      *   null
      * </pre>
-     * 
+     *
      * @param optAddr is the network address.
-     * @exception UnknownHostException is thrown if the host name can not 
+     * @exception UnknownHostException is thrown if the host name can not
      *                                 be resolved.
      */
     public NetAddr(String optAddr) throws UnknownHostException {
@@ -147,7 +147,7 @@
 
     /**
      * Produce a printable representation of this.
-     * 
+     *
      * @return A nicely formatted string representing this address.
      */
     public String toString() {



1.5       +29 -28    e/src/jsrc/net/vattp/data/NetConfig.java

Index: NetConfig.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/NetConfig.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NetConfig.java	2001/08/29 00:20:16	1.4
+++ NetConfig.java	2001/09/06 09:55:39	1.5
@@ -21,7 +21,6 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.prim.StaticMaker;
 import org.erights.e.elib.serial.PassByConstruction;
@@ -30,6 +29,8 @@
 import org.erights.e.elib.tables.ConstMap;
 import org.erights.e.elib.tables.Selfless;
 
+import java.io.IOException;
+
 /**
  * Configuration parameters for initializing or re-initializing a
  * ConnectionsMgr
@@ -37,13 +38,13 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class NetConfig implements PassByConstruction, Persistent, Selfless {
-    
+
     static private final long serialVersionUID = 7141557786514460621L;
 
     /**
      *
      */
-    static public final StaticMaker NetConfigMaker 
+    static public final StaticMaker NetConfigMaker
         = StaticMaker.make(NetConfig.class);
 
     /**
@@ -61,25 +62,25 @@
      * our socket. <p>
      */
     private String myOptListenAddr;
-    
+
     /**
-     * Make a NetConfig initialized from configuration propoerties (as might 
+     * Make a NetConfig initialized from configuration propoerties (as might
      * be provided by eprops.txt or "-D" on the command line). <p>
      * <ul>
-     *   <li>e.VLSPath is an optional semicolon-separated list of TCP/IP 
-     *       addresses of VLSs this vat should register with.  Defaults 
-     *       to "" -- the null list.  Doesn't actually mean anything until 
-     *       the VLS is revived. 
-     *   <li>e.SearchPath is an optional semicolon-separated list of TCP/IP 
-     *       addresses for others to look for me.  Defaults to the VLSPath.  
-     *       Once a vat knows its own ListenAddress, this should be added to 
-     *       the front of the list. 
-     *   <li>e.ListenAddress is the optional TCP/IP address at which this vat 
-     *       should create the socket it listens to.  If an IP address isn't 
-     *       given, the socket defaults to listening on all IP addresses of 
-     *       this host.  If an IP address is given, it must be one of the IP 
-     *       addresses of this host.  If the TCP port isn't given, it 
-     *       defaults to 0.  A TCP port of 0 instructs the OS to pick any 
+     *   <li>e.VLSPath is an optional semicolon-separated list of TCP/IP
+     *       addresses of VLSs this vat should register with.  Defaults
+     *       to "" -- the null list.  Doesn't actually mean anything until
+     *       the VLS is revived.
+     *   <li>e.SearchPath is an optional semicolon-separated list of TCP/IP
+     *       addresses for others to look for me.  Defaults to the VLSPath.
+     *       Once a vat knows its own ListenAddress, this should be added to
+     *       the front of the list.
+     *   <li>e.ListenAddress is the optional TCP/IP address at which this vat
+     *       should create the socket it listens to.  If an IP address isn't
+     *       given, the socket defaults to listening on all IP addresses of
+     *       this host.  If an IP address is given, it must be one of the IP
+     *       addresses of this host.  If the TCP port isn't given, it
+     *       defaults to 0.  A TCP port of 0 instructs the OS to pick any
      *       free TCP port.
      * </ul>
      */
@@ -90,17 +91,17 @@
                                                           flattenedVLSPath);
         ConstList searchPath = EARL.parseSearchPath(flattenedSearchPath);
         String optListenAddr = (String)optProps.get("e.ListenAddress", null);
-        
+
         return new NetConfig(vlsPath, searchPath, optListenAddr);
     }
-    
+
     /**
      *
      */
     public NetConfig() {
         this(ConstList.EmptyList, ConstList.EmptyList, null);
     }
-    
+
     /**
      *
      */
@@ -133,7 +134,7 @@
      * Where others should look for me.  This path is used in
      * network designators I export (remote live refs, sturdy refs,
      * URIs) that designate objects I host. <p>
-     * 
+     *
      * Usually the same as myVLSPath + myself, but may have further
      * difference because of NAT (Network Address Translation -- a
      * common bad firewall technique).  Configuration
@@ -144,17 +145,17 @@
     /**
      * If we're on the air, this must be the TCP/IP address of
      * our socket.  (XXX in what format?)  <p>
-     * 
+     *
      * If we're not yet on the air and this isn't null, it says what
      * socket address is preferred -- nothing more.  Configuration
      * parameter read as a JavaBeans property.
      */
     public String getOptListenAddr() { return myOptListenAddr; }
-    
+
     /**
      * Used to make a post-onTheAir NetConfig from a pre-onTheAir one. <p>
-     * 
-     * Return a NetConfig like this one, but with listenAddr instead of 
+     *
+     * Return a NetConfig like this one, but with listenAddr instead of
      * myOptListenAddr, and with listenPath prepended onto mySearchPath.
      */
     public NetConfig withListenAddr(String listenAddr, ConstList listenPath) {
@@ -162,7 +163,7 @@
                              listenPath.add(mySearchPath),
                              listenAddr);
     }
-    
+
     /**
      *
      */



1.2       +10 -10    e/src/jsrc/net/vattp/data/NewConnectionReactor.java

Index: NewConnectionReactor.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/NewConnectionReactor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NewConnectionReactor.java	2000/12/21 22:15:18	1.1
+++ NewConnectionReactor.java	2001/09/06 09:55:39	1.2
@@ -1,20 +1,20 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -25,7 +25,7 @@
  * @author Bill Frantz
  */
 public interface NewConnectionReactor {
-    
+
     /**
      * React to the arrival of a new connection.  If the object implementing
      * NewConnectionReactor is registered through addNewConnectionReactor



1.5       +53 -53    e/src/jsrc/net/vattp/data/RecvThread.java

Index: RecvThread.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/RecvThread.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RecvThread.java	2001/08/25 19:54:01	1.4
+++ RecvThread.java	2001/09/06 09:55:39	1.5
@@ -5,39 +5,39 @@
 resident of the US. Modified code has been commented with:
      // daffE -> E
 
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 // Copyright 1998 Electric Communities. All rights reserved worldwide.
 
-import org.erights.e.elib.prim.Runner;
-import org.erights.e.develop.trace.Trace;
+import net.vattp.security.MicroTime;
 import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.trace.Trace;
+import org.erights.e.elib.prim.Runner;
 import org.erights.e.elib.util.HexStringUtils;
-import net.vattp.security.MicroTime;
-import java.io.OutputStream;
+
+import java.io.ByteArrayInputStream;
 import java.io.EOFException;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.ByteArrayInputStream;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
-import java.util.Vector;
 import java.util.Enumeration;
+import java.util.Vector;
 
 /**
  * A thread to read bytes from an TCP InputStream and pass them to a
@@ -58,15 +58,15 @@
     // of the encryption used (8 for 3DES).  AES implementation take warning.
     //                                             0   1   2
     static private final int[] theHeaderLengths = {4, 24, 32};
-    
+
     /** Notify DataPath every NOTIFY_EVERY bytes of receive progress */
     static private final int NOTIFY_EVERY = 10000;
-    
+
     private InputStream myInputStream;
     private DataPath myDataPath;
     private boolean myTerminateFlag;
     private int myBufferLength;
-    
+
     /** The runner we will synchronize with when calling the DataPath*/
     private Runner myRunner;
 
@@ -78,7 +78,7 @@
     private Vector myMessagesToPass = new Vector();
 
     // The following field is for message transformation.  It is skeleton
-    // support for future HTTP tunnelling.   It could also be used to 
+    // support for future HTTP tunnelling.   It could also be used to
     // implement a dynamic table dependent compressiong scheme.
     private MsgTransformer myTransform = null;
     private boolean myIsStandardCBC = false;
@@ -99,7 +99,7 @@
     // Spam for total timing
     // only used if tracing
     private long myTotalTime = 0;
-    
+
     /**
        Construct a new RecvThread.
 
@@ -110,8 +110,8 @@
         buffer of this length is allocated for each read, so it
         shouldn't be too big.
       */
-    public RecvThread(InputStream inputStream, 
-                      DataPath connection, 
+    public RecvThread(InputStream inputStream,
+                      DataPath connection,
                       String remoteAddr,
                       Runner runner) {
         super("RecvThread-" + remoteAddr);
@@ -123,7 +123,7 @@
     /**
      * Call a method in our ConnectionsMgr
      *
-     * @param thunk a Thunk that will perform the call.  The thunk will 
+     * @param thunk a Thunk that will perform the call.  The thunk will
      * be called after the Vat lock is obtained.
      */
     private void callDataPath(DataCommThunk thunk) {
@@ -134,12 +134,12 @@
             if (t instanceof VirtualMachineError) throw (VirtualMachineError)t;
             if (t instanceof ThreadDeath) throw (ThreadDeath)t;
             if (t instanceof LinkageError) throw (LinkageError)t;
-            //XXX if it's not one of these, shouldn't we at least trace it, 
+            //XXX if it's not one of these, shouldn't we at least trace it,
             //and perhaps rethrow it?
         }
     }
     /**
-     * Change the authorization protocol being used to receive messages on 
+     * Change the authorization protocol being used to receive messages on
      * the connection.  This routine must be called when the RecvThread is
      * synchronized with the Vat thread.  This assertion is checked by
      * setting myChangeProtocolIsOk just before calling into the Vat with
@@ -147,7 +147,7 @@
      * This routine will throw an Assertion failure if that boolean is
      * not true.
      *
-     * @param protocolParms is the parameter bundle for the protocol suite to 
+     * @param protocolParms is the parameter bundle for the protocol suite to
      * use.  This routine must, of course, support the selected
      * suite.
      */
@@ -159,7 +159,7 @@
         Assertion.test(myChangeProtocolIsOk,
             "Must only be called while caller is processing an input message");
         // For calculating the header length
-        int headerLengthIndex = HEADER_INVALID; 
+        int headerLengthIndex = HEADER_INVALID;
 
         if (StartUpProtocol.PROTO_NONE.equals(protocolParms.myProtocolSuite)) {
             myIsAggragating = false;
@@ -173,9 +173,9 @@
             MessageDigest md5 = setSHA1(protocolParms);
             headerLengthIndex = HEADER_VLEN_SHA1;
             mySequence = null;
-            byte[] raw_3des_key = 
+            byte[] raw_3des_key =
               TripleDESKeyConstructor.make(protocolParms.myDHSecret);
-            myTransform = 
+            myTransform =
               new Decrypt3DES(raw_3des_key, protocolParms.myIncomingSequence);
         // end daffE -> E
         // begin improved E protocol
@@ -185,9 +185,9 @@
             MessageDigest md5 = setSHA1(protocolParms);
             headerLengthIndex = HEADER_VLEN_HMAC;
             mySequence = new byte[4];  // Assume initialized to zero
-            byte[] raw_3des_key = 
+            byte[] raw_3des_key =
               TripleDESKeyConstructor.make(protocolParms.myDHSecret);
-            myTransform = 
+            myTransform =
               new Decrypt3DES(raw_3des_key, protocolParms.myIncomingSequence);
             myTransform.init();
             myIsStandardCBC = true;
@@ -243,7 +243,7 @@
             return mySHA1.digest(myMACKey);     // The MAC key again
         }
     }
-    
+
     private void fillArray(byte[] b, int off, int len) throws IOException {
         int offset = off;
         while (offset < off + len) {
@@ -257,7 +257,7 @@
             callDataPath(new DataCommThunk(myDataPath)); //progress notify
         }
     }
-    
+
     /**
      * Get the current message sequence number
      */
@@ -268,22 +268,22 @@
             return mySequence;
         }
     }
-    
-    private void increment(byte[] value) { 
+
+    private void increment(byte[] value) {
         for (int i=value.length-1; i>=0; i--) {
             byte v = (value[i] += 1);
             if (0 != v) break;
         }
     }
-    
-    
+
+
     /**
      * isEqual - Compare two byte arrays.
      *
      * @param a is the first input array.
      * @param b is the second input array.
      * @return is true if the two arrays contain all the same bytes,
-     *         else false. 
+     *         else false.
      */
     static private boolean isEqual(byte[] a, byte[] b) {
         int len = a.length;
@@ -293,8 +293,8 @@
         }
         return true;
     }
-    
-    
+
+
     /**
      * xor - Exclusive OR two byte arrays.
      *
@@ -307,8 +307,8 @@
             a[i] ^= b[i];
         }
     }
-    
-    
+
+
     /**
      * replicate - Copy a single byte to all elements of a byte array.
      *
@@ -320,17 +320,17 @@
             a[i] = v;
         }
     }
+
 
-    
     /**
      * Calculate the MD5 hash of some data with a specific padding.
      * <p>
      * The padding allows different values to be obtained from the same data
-     * by varing the padding value.  We use it to get the different 
+     * by varing the padding value.  We use it to get the different
      * authentication values from the same Diffie Hellman shared secret.
      *
-     * @param pad The int (treated as a byte) to be used to pad the MD5 
-     *            calculation. 
+     * @param pad The int (treated as a byte) to be used to pad the MD5
+     *            calculation.
      * @param data The data to be hashed.
      * @param md5 The message digest object to be used.
      *
@@ -422,8 +422,8 @@
         if (null != mySequence) {
             int seqLen = mySequence.length;
             byte[] theirSequence = new byte[seqLen];
-            System.arraycopy(myHeader, nextItemOffset, 
-                             theirSequence, 0, 
+            System.arraycopy(myHeader, nextItemOffset,
+                             theirSequence, 0,
                              seqLen);
             if (!isEqual(mySequence, theirSequence)) {
                 if (Trace.comm.error) {
@@ -481,12 +481,12 @@
                 authTime += MicroTime.queryTimer() - startTime;
             }
         }
-        
+
         if (Trace.comm.verbose && Trace.ON) {
             Trace.comm.verbosem("Full message: "
                 + HexStringUtils.byteArrayToReadableHexString(message));
         }
-        
+
         myMessagesToPass.removeAllElements();
         if (myIsAggragating) {
             if (Trace.comm.timing && Trace.ON) startTime = MicroTime.queryTimer();
@@ -608,7 +608,7 @@
                              "incoming packet data");
             }
             myChangeProtocolIsOk = true;
-            
+
             //XXX should make embargo work again
             if (msg[0] == Msg.E_MSG) {
                 myDataPath.embargoLock().waitTillOff();
@@ -649,7 +649,7 @@
                Suicide is not an error (here). */
             if (!myTerminateFlag) {
                 if (t instanceof IOException) {
-                    Trace.comm.usagem("IOException", t); 
+                    Trace.comm.usagem("IOException", t);
                 } else {
                     Trace.comm.errorm("Error", t);
                 }
@@ -687,7 +687,7 @@
         System.arraycopy(md5Hash(0x33,macParms.myDHSecret,md5), 0, macKey, 32, 16);
         System.arraycopy(md5Hash(0x44,macParms.myDHSecret,md5), 0, macKey, 48, 16);
         myMACKey = macParms.myMacKey = macKey;
-        
+
         //Set up to do the MAC calculation
         myIsDoingMac = true;
         myMAC = new byte[20];



1.5       +20 -20    e/src/jsrc/net/vattp/data/SendThread.java

Index: SendThread.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/SendThread.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SendThread.java	2001/08/25 19:54:01	1.4
+++ SendThread.java	2001/09/06 09:55:39	1.5
@@ -5,30 +5,30 @@
 resident of the US. Modified code has been commented with:
      // daffE -> E
 
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
+import net.vattp.security.MicroTime;
+import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.exception.NestedIOException;
+import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.prim.Runner;
 import org.erights.e.elib.prim.SynchQueue;
-import org.erights.e.develop.trace.Trace;
-import org.erights.e.develop.assertion.Assertion;
 import org.erights.e.elib.util.HexStringUtils;
-import net.vattp.security.MicroTime;
-import org.erights.e.develop.exception.NestedIOException;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -71,18 +71,18 @@
  *        length we must support.
  * <p>
  *  The MAC is always calculated over the aggragated data.  N.B. the
- *  message building logic prepends a 4 byte message length field to each 
+ *  message building logic prepends a 4 byte message length field to each
  *  message, so the MAC includes the message length(s).
  * <p>
  *  pad is padding to make the actual packet length a multiple of the
  *  basic block size.
  * <p>
- *  The whole packet is authenticated with the authentication algorthm and 
+ *  The whole packet is authenticated with the authentication algorthm and
  *  mode specified when authentication is turned on.
  * @author Bill Frantz
  */
 /*package*/ class SendThread extends Thread {
-    
+
     /** Notify DataPath every NOTIFY_EVERY bytes of send progress */
     static private final int NOTIFY_EVERY = 10000;
 
@@ -93,7 +93,7 @@
     private DataPath myDataPath;
     private SynchQueue myReader;
     private Runner myRunner;    // For synchronizing into-vat calls
-    
+
     /** A Hashtable of the InetAddresses tried which failed due to host
      *  related problems.  They are not to be tried again in this attempt
      *  to connect to the vat.  The key is InetAddress,
@@ -109,7 +109,7 @@
     private Object myNotifications = null; // null, StreamMessage, or Vector
 
     // The following field is for message transformation.  It is skeleton
-    // support for future HTTP tunnelling.   It could also be used to 
+    // support for future HTTP tunnelling.   It could also be used to
     // implement a dynamic table dependent compressiong scheme.
     private MsgTransformer myTransform = null;
     private boolean myIsStandardCBC = false;
@@ -173,7 +173,7 @@
                            SynchQueue reader, Runner runner) {
         super("SendThread-" + socket.getInetAddress().getHostAddress());
         mySocket = socket;
-        myRemoteAddr = mySocket.getInetAddress().getHostAddress(); 
+        myRemoteAddr = mySocket.getInetAddress().getHostAddress();
         myDataPath = path;
         myReader = reader;
         myRunner = runner;
@@ -261,7 +261,7 @@
                 myMACKey = c.myMacKey;
                 myMacLen = 20;
                 byte[] raw_3des_key = TripleDESKeyConstructor.make(c.myDHSecret);
-                myTransform = 
+                myTransform =
                     new Encrypt3DES(raw_3des_key, c.myOutgoingSequence, false);
                 mySequence = null;
                 setSHA1();



1.3       +24 -28    e/src/jsrc/net/vattp/data/StartUpProtocol.java

Index: StartUpProtocol.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/StartUpProtocol.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- StartUpProtocol.java	2001/08/25 19:54:01	1.2
+++ StartUpProtocol.java	2001/09/06 09:55:39	1.3
@@ -5,57 +5,53 @@
 resident of the US. Modified code has been commented with:
      // daffE -> E
 
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 //  Copyright 1998 Electric Communities. All rights reserved worldwide.
 
-import java.io.IOException;
-import java.io.EOFException;
+import net.vattp.security.ESecureRandom;
+import net.vattp.security.MicroTime;
+import org.erights.e.develop.exception.ThrowableSugar;
+import org.erights.e.develop.trace.Trace;
+import org.erights.e.elib.tables.ConstList;
+import org.erights.e.elib.util.HexStringUtils;
+import sun.security.provider.DSAPublicKey;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
+import java.io.EOFException;
+import java.io.IOException;
 import java.math.BigInteger;
-import java.security.interfaces.DSAPrivateKey;
 import java.security.InvalidKeyException;
+import java.security.KeyPair;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
-import java.security.KeyPair;
-import java.security.PublicKey;
 import java.security.PrivateKey;
+import java.security.PublicKey;
 import java.security.Signature;
 import java.security.SignatureException;
+import java.security.interfaces.DSAPrivateKey;
 import java.util.Vector;
-import org.erights.e.develop.exception.ThrowableSugar;
-import net.vattp.security.ESecureRandom;
-import org.erights.e.develop.trace.Trace;
-import org.erights.e.elib.tables.ConstList;
-import org.erights.e.elib.util.HexStringUtils;
-import net.vattp.security.MicroTime;
 
 
-//This hack should be revisited with new Java releases.  We should not
-// need to use a sun. class to convert a public key as byte array to
-// a PublicKey object.
-import sun.security.provider.DSAPublicKey;
-
 
-
 /**
  * This class is used by DataConnection to perform the startup
  * protocol.
@@ -106,7 +102,7 @@
     static private final byte TOK_ERR_PROTOCOL       = -2;
     static private final byte TOK_ERR_WRONG_ID       = -3;
     static private final byte TOK_ERR_INTERNAL       = -4;
- 
+
      /*
      * Values for supported protocol suites:
      */
@@ -613,7 +609,7 @@
         if (myStop) {
             startupError(TOK_DUP, "Stopped connection");
             return;
-        } 
+        }
         if (token != TOK_IWANT) { /* IWANT <id> */
             startupError(TOK_ERR_PROTOCOL, "Expected " + tokName(TOK_IWANT)
                          + " got " + formatStartupPacket(packet));



1.2       +10 -10    e/src/jsrc/net/vattp/data/StreamMessage.java

Index: StreamMessage.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/StreamMessage.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StreamMessage.java	2000/12/21 22:15:18	1.1
+++ StreamMessage.java	2001/09/06 09:55:39	1.2
@@ -1,20 +1,20 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -30,7 +30,7 @@
     /*package*/byte[] myMessage;
     /*package*/Runnable myNotification;
     /*package*/Runner myPlaceToRun;
-    
+
     /*package*/StreamMessage(byte[] message, Runnable notification,
                              Runner placeToRun) {
         myMessage = message;



1.2       +14 -13    e/src/jsrc/net/vattp/data/Suspend.java

Index: Suspend.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/Suspend.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Suspend.java	2000/12/21 22:15:18	1.1
+++ Suspend.java	2001/09/06 09:55:39	1.2
@@ -1,37 +1,38 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 // Copyright 1998, Electric Communities, all rights reserved worldwide.
 
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
 import org.erights.e.develop.assertion.Assertion;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.util.HexStringUtils;
 
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+
 /**
  * Class to handle the suspension and shutdown messages.
  * @author Bill Frantz
  */
- 
+
 /*package*/ class Suspend implements MsgHandler {
     /**
      * Constuct an object to handle the SUSPEND message (which also acts as



1.3       +6 -5      e/src/jsrc/net/vattp/data/TripleDESKeyConstructor.java

Index: TripleDESKeyConstructor.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/TripleDESKeyConstructor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TripleDESKeyConstructor.java	2001/08/25 19:54:02	1.2
+++ TripleDESKeyConstructor.java	2001/09/06 09:55:39	1.3
@@ -15,6 +15,7 @@
 */
 
 import org.erights.e.develop.trace.Trace;
+
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 
@@ -25,23 +26,23 @@
 class TripleDESKeyConstructor
 {
     static private final String DIGEST_ALGORITHM_NAME = "MD5";
-    
+
     static private final int DES_KEY_LENGTH = 8;
     static private final int TRIPLE_DES_KEY_LENGTH = 3 * DES_KEY_LENGTH;
 
     static private final int KEY_PAD_LENGTH = 16;
-    
+
     /**
      * Constructs a 3DES key from a Diffie-Hellman secret.
-     * 
+     *
      * The individual keys are calculated from a Diffie-Hellman secret
-     * using MD5 and a 16 byte pad consisting of a single byte repeated 
+     * using MD5 and a 16 byte pad consisting of a single byte repeated
      * 16 times as follows:
      *
      * 3DESKey1 is the first 8 bytes of md5((16,pad)(n,dhSecret)) with 0x55 for the pad.
      * 3DESKey2 is the second 8 bytes of md5((16,pad)(n,dhSecret)) with 0x55 for the pad.
      * 3DESKey3 is the first 8 bytes of md5((16,pad)(n,dhSecret)) with 0xaa for the pad.
-     * 
+     *
      * @param dhSecret  the Diffie-Hellman secret
      * @return  a byte[] containing the constructed key.
      * @see cryptix.provider.key.RawKey



1.2       +9 -9      e/src/jsrc/net/vattp/data/UserThread.java

Index: UserThread.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/UserThread.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UserThread.java	2000/12/21 22:15:18	1.1
+++ UserThread.java	2001/09/06 09:55:39	1.2
@@ -1,20 +1,20 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.5       +8 -11     e/src/jsrc/net/vattp/data/VatIdentity.java

Index: VatIdentity.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/VatIdentity.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- VatIdentity.java	2001/08/17 03:11:32	1.4
+++ VatIdentity.java	2001/09/06 09:55:39	1.5
@@ -20,24 +20,21 @@
 */
 // Copyright 1998, Electric Communities, all rights reserved worldwide.
 
-import java.io.IOException;
-import java.io.ObjectInputStream;
+import net.vattp.security.ESecureRandom;
+import org.erights.e.develop.trace.Trace;
+import org.erights.e.meta.java.math.BigIntegerSugar;
+
 import java.math.BigInteger;
 import java.security.KeyPair;
 import java.security.KeyPairGenerator;
 import java.security.NoSuchAlgorithmException;
 import java.security.PublicKey;
-import java.security.PrivateKey;
-import org.erights.e.develop.trace.Trace;
-import org.erights.e.elib.serial.Persistent;
-import org.erights.e.meta.java.math.BigIntegerSugar;
-import net.vattp.security.ESecureRandom;
 
 
 /**
- * Useful functions for manipulating the public key pair representing a vat's 
+ * Useful functions for manipulating the public key pair representing a vat's
  * identity.
- * 
+ *
  * @author Bill Frantz
  * @author Mark S. Miller
  */
@@ -46,7 +43,7 @@
     /** VatID to use for connecting to unknown vats at a specific IP
      * address */
     static /*package*/ String WHOEVER = "0";
-    
+
     /** prevent instantiation */
     private VatIdentity() {}
 
@@ -68,7 +65,7 @@
         gen.initialize(1024, entropy);
         return gen.generateKeyPair();
     }
-    
+
     /**
      * Calculate the vatID from a public key.
      *



1.2       +10 -10    e/src/jsrc/net/vattp/data/VatLocationLookup.java

Index: VatLocationLookup.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/VatLocationLookup.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- VatLocationLookup.java	2000/12/21 22:15:18	1.1
+++ VatLocationLookup.java	2001/09/06 09:55:39	1.2
@@ -1,20 +1,20 @@
 package net.vattp.data;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -22,7 +22,7 @@
 /**
  * Interface for implementating the Vat Location Server Lookup
  * function.
- * 
+ *
  * @author Bill Frantz
  */
 public interface VatLocationLookup {



1.4       +30 -29    e/src/jsrc/net/vattp/security/ESecureRandom.java

Index: ESecureRandom.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/security/ESecureRandom.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ESecureRandom.java	2001/08/25 19:54:02	1.3
+++ ESecureRandom.java	2001/09/06 09:55:40	1.4
@@ -1,29 +1,30 @@
 package net.vattp.security;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.trace.Trace;
+
 import java.math.BigInteger;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.security.SecureRandom;
-import org.erights.e.develop.trace.Trace;
 
 
 /**
@@ -45,7 +46,7 @@
  * @author Bill Frantz
  */
 public class ESecureRandom extends SecureRandom {
-    
+
     //Constants
 
     static private final int SWISSDATA_SIZE = 20;
@@ -54,7 +55,7 @@
         thread */
     static private TimerJitterEntropy theTimeJitterEntropy
                 = new TimerJitterEntropy("TimerJitterEntropy");
-                
+
     /** The instance of this singleton class */
     static private ESecureRandom theESecureRandom = null;
 
@@ -76,14 +77,14 @@
     static private final int MIN_ENTROPY = 160;     //Bits
 
     //State
-    private transient byte[] myEntropyPool 
+    private transient byte[] myEntropyPool
             = new byte[MAX_ENTROPY/8]; //Where we keep acculminated entropy
     private transient int myPoolCursor = 0;    //Next place in the pool
     private int myAvailableEntropy = 0; // Bits of entropy introduced into pool
 
     private MessageDigest myMD = null;  //Distilling function
     private long myDigestNumber = 0;    //Increment for each use of myMD
-    
+
     /** The amount of entropy in the buffer we keep before adding it to the
      * pool.  This pool protects against the State Compromise Extension
      * Attack David Wagner identified as a weakness in the previous design.
@@ -143,7 +144,7 @@
     /**
      * Return the singular instance of a SecureRandomCrew.  Creates it
      * (using the thread yeald seeding) if necessary.
-     * 
+     *
      * @param innerRandom nullOK an EntropyHolder to keep entropy in the vat.
      */
     static public ESecureRandom getESecureRandom() {
@@ -153,7 +154,7 @@
     /**
      * Return the singular instance of a SecureRandomCrew.  Creates it
      * (using the thread yeald seeding) if necessary.
-     * 
+     *
      * @param innerRandom nullOK an EntropyHolder to keep entropy in the vat.
      */
     static public ESecureRandom getESecureRandom(byte[] /*nilok*/ entropy,
@@ -163,7 +164,7 @@
         if (null == entropy) {
             // One bit from MicroTime.queryTimer()
             byte[] dummySeed = new byte[1];
-            provideEntropy(dummySeed, 1);   
+            provideEntropy(dummySeed, 1);
         } else {
             provideEntropy(entropy, bitEstimate);
         }
@@ -199,8 +200,8 @@
             long waitSeedTime = 0;
             int seedLength = 0;
             while (myAvailableEntropy < MIN_ENTROPY) { // Wait for seeding
-                long startTime = Trace.entropy.event 
-                               ? System.currentTimeMillis() 
+                long startTime = Trace.entropy.event
+                               ? System.currentTimeMillis()
                                : 0;
                 TimerJitterEntropy tje = theTimeJitterEntropy;
                 while (null != tje && !tje.isStarted() && tje.isAlive()) {
@@ -266,10 +267,10 @@
       *
       * @param entropy a byte array containing the entropy.
       * @param bitEstimate an estimate of the amount of entropy in
-      *        entropy in bits. 
+      *        entropy in bits.
       *
       * @exception IllegalArgumentException entropy estimate is less
-      *            than 1 bit. 
+      *            than 1 bit.
       * @exception IllegalArgumentException entropy estimate is greater than 8
       *            bits for every byte of the seed.
       */
@@ -348,7 +349,7 @@
 
         provideEntropy(seed,1);
         if (Trace.entropy.verbose && Trace.ON) {
-            Trace.entropy.verbosem("setMouseSeed: x=" + x 
+            Trace.entropy.verbosem("setMouseSeed: x=" + x
                                    + " y=" + y
                                    + " type=" + type);
         }
@@ -399,33 +400,33 @@
         }
         myBufferedEntropy += entropy;
         byte[] hashBlock = new byte[HASH_SIZE];
-        
+
         while (true) {
             myMD.update(myEntropyBuffer);
             myMD.update(long2bytes(MicroTime.queryTimer())); // Stir in the time
-            System.arraycopy(myEntropyPool, myPoolCursor, 
+            System.arraycopy(myEntropyPool, myPoolCursor,
                              hashBlock, 0, HASH_SIZE); // current pool block
             myMD.update(hashBlock);
             myEntropyBuffer = myMD.digest(seed);
         if (myBufferedEntropy < 80) break;
-            
+
             // We have enough to update the main pool
             myAvailableEntropy += 80;
             myBufferedEntropy -= 80;
-            System.arraycopy(myEntropyBuffer, 0, 
+            System.arraycopy(myEntropyBuffer, 0,
                              myEntropyPool, myPoolCursor, HASH_SIZE);
             myPoolCursor += HASH_SIZE;
             if (myEntropyPool.length == myPoolCursor) myPoolCursor = 0;
         }
-        
+
         //myAvailableEntropy += entropy;
         if (myAvailableEntropy > 4*myEntropyPool.length) {
             myAvailableEntropy = 4*myEntropyPool.length; //Never more than 1/2 full
         }
     }
-    
+
     /**
-     * MSM: Added this method, so this object acts as a capability for making 
+     * MSM: Added this method, so this object acts as a capability for making
      * new unguessable BigIntegers that have new entropy.
      */
     public BigInteger nextSwiss() {



1.3       +13 -13    e/src/jsrc/net/vattp/security/MicroTime.java

Index: MicroTime.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/security/MicroTime.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MicroTime.java	2001/03/20 03:18:23	1.2
+++ MicroTime.java	2001/09/06 09:55:40	1.3
@@ -1,20 +1,20 @@
 package net.vattp.security;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -25,14 +25,14 @@
 import org.erights.e.elib.util.ClassCache;
 
 /**
- * Wraps the microsecond timer aspect of Native, but works in a degenerate 
- * fashion, using pure Java's System.currentTimeMillis()*1000, if native 
+ * Wraps the microsecond timer aspect of Native, but works in a degenerate
+ * fashion, using pure Java's System.currentTimeMillis()*1000, if native
  * code is unavailable.
- * 
+ *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class MicroTime {
-    
+
     static private Object nativeStatics = null;
 
     static  {



1.3       +12 -11    e/src/jsrc/net/vattp/security/Native.java

Index: Native.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/security/Native.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Native.java	2001/02/20 05:33:43	1.2
+++ Native.java	2001/09/06 09:55:40	1.3
@@ -1,32 +1,33 @@
 package net.vattp.security;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.text.DecimalFormat;
 import org.erights.e.develop.exception.PrintStreamWriter;
+
+import java.text.DecimalFormat;
 //import org.erights.e.elib.util.URLLaunchThread;
 
 /**
  * A class to hold all the miscellaneous system-dependent utilities
  * Microcosm might need.
- * 
+ *
  * @author Walendo
  */
 /*package*/ class Native {



1.3       +9 -9      e/src/jsrc/net/vattp/security/SecureRandomCrewSeedIt.java

Index: SecureRandomCrewSeedIt.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/security/SecureRandomCrewSeedIt.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SecureRandomCrewSeedIt.java	2001/02/20 05:33:43	1.2
+++ SecureRandomCrewSeedIt.java	2001/09/06 09:55:40	1.3
@@ -1,20 +1,20 @@
 package net.vattp.security;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.4       +11 -13    e/src/jsrc/net/vattp/security/TimerJitterEntropy.java

Index: TimerJitterEntropy.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/security/TimerJitterEntropy.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TimerJitterEntropy.java	2001/08/25 19:54:02	1.3
+++ TimerJitterEntropy.java	2001/09/06 09:55:40	1.4
@@ -1,29 +1,27 @@
 package net.vattp.security;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
 import org.erights.e.develop.trace.Trace;
 
-import java.security.SecureRandom;
 
-
 /**
  * Use clock phase differences between 2 PC clocks to generate entropy.
  *
@@ -48,7 +46,7 @@
 
     public TimerJitterEntropy(String name) {
         super(name);
-        if ("x86".equals(System.getProperty("os.arch")) 
+        if ("x86".equals(System.getProperty("os.arch"))
                 && MicroTime.isHiRes()) {
             setDaemon(true);
             setPriority(Thread.MAX_PRIORITY);
@@ -71,7 +69,7 @@
         long entropy = 0;
 
         int delay = 50;
-        
+
         if (! theIsStarted) {
             return;
         }



1.2       +10 -10    e/src/jsrc/net/vattp/tunnel/HTTPClient.java

Index: HTTPClient.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/tunnel/HTTPClient.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HTTPClient.java	2000/12/21 22:15:18	1.1
+++ HTTPClient.java	2001/09/06 09:55:40	1.2
@@ -31,7 +31,7 @@
  */
 
 public class HTTPClient {
-    
+
     /** Incoming TCP sockets.  The connectionIDs are negative.  The data
      *  is HTTPSocketCtl. */
     private Vector myInTCP = new Vector(1);
@@ -39,7 +39,7 @@
     /** Outgoing TCP sockets.  The connectionIDs are positive.  The data
      *  is HTTPSocketCtl. */
     private Vector myOutTCP = new Vector(1);
-    
+
     private byte[] mySessionID;
 
     private ByteArrayOutputStream myResponses = new ByteArrayOutputStream();
@@ -53,7 +53,7 @@
      * Close a TCP connection.
      *
      * @param connectionID is the connectionID to close.  If it is positive,
-     *          then the connection was built as an outgoing connection. 
+     *          then the connection was built as an outgoing connection.
      *          If it is negative, then it was built as an incoming one.
      *          The value zero is invalid.
      */
@@ -65,9 +65,9 @@
             msg[1] = connectionID;
             queueMsg(msg);
         }
-        
+
         ctl.close();
-        
+
         if (connectionID > 0) {
             myOutTCP.setElementAt(null, connectionID);
         } else {
@@ -83,7 +83,7 @@
     }
 
     /**
-     * Returns the messages to be returned to the client as part of an 
+     * Returns the messages to be returned to the client as part of an
      * HTTP_Session message.  These messages will include any incoming data
      * on the established TCP connections.
      *
@@ -138,7 +138,7 @@
     }
 
     /**
-     * Queue a data message to be returned to the client as part of an 
+     * Queue a data message to be returned to the client as part of an
      * HTTP_Session message.
      *
      * @param message is the message to queue.
@@ -176,14 +176,14 @@
      */
     /*package*/ void queueMsg(byte[] message) {
         // Add the message to the responses.
-        myResponses.write(message, 0, message.length); 
+        myResponses.write(message, 0, message.length);
     }
 
     /**
      * Send data to a TCP connection.
      *
      * @param connection ID is the ID of the connection.  If it is positive,
-     *          then the connection was built as an outgoing connection. 
+     *          then the connection was built as an outgoing connection.
      *          If it is negative, then it was built as an incoming one.
      *          The value zero is invalid.
      * @param data is the byte array to send.
@@ -203,7 +203,7 @@
      * Set send limit for a particular connection.
      *
      * @param connection ID is the ID of the connection.  If it is positive,
-     *          then the connection was built as an outgoing connection. 
+     *          then the connection was built as an outgoing connection.
      *          If it is negative, then it was built as an incoming one.
      *          The value zero is invalid.
      * @param limit is the new send limit.



1.3       +34 -33    e/src/jsrc/net/vattp/tunnel/HTTPConnectionHandler.java

Index: HTTPConnectionHandler.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/tunnel/HTTPConnectionHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- HTTPConnectionHandler.java	2001/05/01 08:42:03	1.2
+++ HTTPConnectionHandler.java	2001/09/06 09:55:40	1.3
@@ -19,6 +19,9 @@
 Contributor(s): ______________________________________.
 */
 
+import net.vattp.security.ESecureRandom;
+import org.erights.e.develop.trace.Trace;
+
 import java.io.ByteArrayOutputStream;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
@@ -27,8 +30,6 @@
 import java.math.BigInteger;
 import java.net.Socket;
 import java.util.Hashtable;
-import org.erights.e.develop.trace.Trace;
-import net.vattp.security.ESecureRandom;
 
 /**
  * Class to handle the suspension and shutdown messages.
@@ -36,25 +37,25 @@
  */
 
 public class HTTPConnectionHandler extends Thread {
-        
+
     static private final char[] CRLF = {0x0d, 0x0a};
     static private final String lenHead = "content-length:"; //lower case
-    
+
         /** map of logged on clients.  Key is vatID, data is
          *  HTTPClient.  Note that an entry in this map implies
          *  an entry in the sessions map and vicea versa. */
     private Hashtable myVats;
-        
-        /** map of sessions to logged on clients.  Key is sessionID, 
+
+        /** map of sessions to logged on clients.  Key is sessionID,
          *  data is HTTPClient.  Note that an entry in this map implies
          *  an entry in the vats map and vicea versa. */
     private Hashtable mySessions;
-        
+
     private Socket mySocket;
     private HTTPInputStream myIn;
     private ByteArrayOutputStream myOut = new ByteArrayOutputStream();
     private String myTcpListenAddress;
-    
+
     /*package*/ HTTPConnectionHandler(Socket socket, Hashtable vats,
                     Hashtable sessions, String listenAddress) {
         mySocket = socket;
@@ -67,7 +68,7 @@
     private void clientError(String msg) {
         flushInput();
         PrintWriter writer = new PrintWriter(myOut);
-        
+
         writer.write("HTTP/1.0 400 Bad Request - " + msg);
         writer.write(CRLF);
         writer.close();
@@ -79,23 +80,23 @@
     }
     private void doLogon(DataInputStream in) throws IOException {
         String vatID = in.readUTF();
-        
+
         int serverLen = in.readUnsignedShort();
         byte[] serverNonce = new byte[serverLen];
         in.readFully(serverNonce);
-        
+
         int clientLen = in.readUnsignedShort();
         byte[] clientNonce = new byte[clientLen];
         in.readFully(clientNonce);
-        
+
         int clientKeyLen = in.readUnsignedShort();
         byte[] clientKey = new byte[clientKeyLen];
         in.readFully(clientKey);
-        
+
         int clientSigLen = in.readUnsignedShort();
         byte[] clientSignature = new byte[clientSigLen];
         in.readFully(clientSignature);
-        
+
         Object ob = myVats.get(vatID);
         if (null != ob) {
             //xxx
@@ -106,21 +107,21 @@
 
         BigInteger sessionID = entropy.nextSwiss();
         byte[] sid = sessionID.toByteArray();
-        
+
         HTTPClient client = new HTTPClient(sid);
         myVats.put(vatID, client);
         mySessions.put(sessionID, client);
-        
+
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         DataOutputStream os = new DataOutputStream(baos);
         os.write(HTTPMsgID.HTTP_LoggedOn);
         os.writeShort(sid.length);
         os.write(sid);
         os.writeUTF(myTcpListenAddress);
-        
+
         returnResponse(baos.toByteArray());
     }
-    
+
     /**
      *
      */
@@ -130,14 +131,14 @@
         byte[] sID = new byte[len];
         in.readFully(sID);
         BigInteger sessionID = new BigInteger(1, sID);
-        
+
         // Look up the session ID in the active sessions map
         HTTPClient client = (HTTPClient)mySessions.get(sessionID);
         if (null == client) {
             sendHTTPError("Invalid session ID", sID);
             return; // We're out of here
         }
-        
+
         // Read the session message data segments and process them
         while (true) {
             int subType = in.read();
@@ -183,7 +184,7 @@
                     break;
             }
         }
-        
+
         returnResponse(client.flushQueuedMsgs());
     }
     private void flushInput() {
@@ -217,21 +218,21 @@
     public void run() {
         try {
             myIn = new HTTPInputStream(mySocket.getInputStream());
-            
+
             //Ensure that this is a POST message
-            if ('P' != myIn.read() || 'O' != myIn.read() 
+            if ('P' != myIn.read() || 'O' != myIn.read()
                     || 'S' != myIn.read() || 'T' != myIn.read()) {
                 clientError("Not a POST request");
                 return;
             }
-            
+
             //Chomp thru the headers and get the content length
-            DataInputStream in 
+            DataInputStream in
                     = new DataInputStream(myIn);
-            
+
             int contentLength = -1;
-            
-            for (String header = in.readLine(); 
+
+            for (String header = in.readLine();
                         !header.equals("");
                         header = in.readLine()) {
                 if (header.toLowerCase().startsWith(lenHead)) {
@@ -252,15 +253,15 @@
                 clientError("No Content-length: header");
                 return;
             }
-            
+
             //Now that we have the content length, and are positioned
             //at the end of the headers, we can read the content.
             //We read each submessage of the HTTP_Session message
             //into byte arrays so we can ensure we get all of them
             //before committing to processing any of them.
-            
+
             myIn.setSize(contentLength);
-            
+
             while (true) {
                 int msgType = in.read();
             if (-1 == msgType) break;   // End of the stream
@@ -268,7 +269,7 @@
                     case HTTPMsgID.HTTP_Logon:
                         doLogon(in);
                         break;
-                    case HTTPMsgID.HTTP_Session: 
+                    case HTTPMsgID.HTTP_Session:
                         doSession(in);
                         break;
                     case HTTPMsgID.HTTP_Shutdown:
@@ -280,7 +281,7 @@
                     // The following two msgs are invalid from the client
                     case HTTPMsgID.HTTP_LoggedOn:
                     case HTTPMsgID.HTTP_SetServerNonce:
-                    default: 
+                    default:
                         //xxx
                         break;
                 }



1.2       +1 -2      e/src/jsrc/net/vattp/tunnel/HTTPInputStream.java

Index: HTTPInputStream.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/tunnel/HTTPInputStream.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HTTPInputStream.java	2000/12/21 22:15:18	1.1
+++ HTTPInputStream.java	2001/09/06 09:55:40	1.2
@@ -19,9 +19,8 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.InputStream;
-//import java.io.InputStreamReader;
 import java.io.IOException;
+import java.io.InputStream;
 
 
 /**



1.2       +1 -1      e/src/jsrc/net/vattp/tunnel/HTTPMsgID.java

Index: HTTPMsgID.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/tunnel/HTTPMsgID.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HTTPMsgID.java	2000/12/21 22:15:18	1.1
+++ HTTPMsgID.java	2001/09/06 09:55:40	1.2
@@ -40,6 +40,6 @@
     static public final byte HTTP_InvalidID          = 0x14;
     static public final byte HTTP_ConnectionFailed   = 0x15;
     static public final byte HTTP_ConnectionComplete = 0x16;
-    
+
     private HTTPMsgID() {}  // Don't build one
 }



1.2       +11 -11    e/src/jsrc/net/vattp/tunnel/HTTPServeMain.java

Index: HTTPServeMain.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/tunnel/HTTPServeMain.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HTTPServeMain.java	2000/12/21 22:15:18	1.1
+++ HTTPServeMain.java	2001/09/06 09:55:40	1.2
@@ -19,13 +19,13 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.trace.Trace;
+
 import java.io.IOException;
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.util.Hashtable;
 
-import org.erights.e.develop.trace.Trace;
-
 /**
  * Class to handle the suspension and shutdown messages.
  * @author Bill Frantz
@@ -36,17 +36,17 @@
     static public void main(String[] args) {
         int httpPort;
         int listenPort;
-        
+
         /** map of logged on clients.  Key is vatID, data is
          *  HTTPClient.  Note that an entry in this map implies
          *  an entry in the sessions map and vicea versa. */
         Hashtable vats = new Hashtable(1);
-        
-        /** map of sessions to logged on clients.  Key is sessionID, 
+
+        /** map of sessions to logged on clients.  Key is sessionID,
          *  data is HTTPClient.  Note that an entry in this map implies
          *  an entry in the vats map and vicea versa. */
         Hashtable sessions = new Hashtable(1);
-        
+
         if (args.length<2) {
             System.err.println("Requires httpPort listenPort");
             System.exit(1);
@@ -63,12 +63,12 @@
                     "listenPort must be between 1 and 2**16-1");
             }
         } catch (Exception e) {
-            System.err.println("Exception " + e 
+            System.err.println("Exception " + e
                     + "parsing httpPort and listenPort");
             System.exit(1);
             return;
         }
-        
+
         ServerSocket http;
         try {
             http = new ServerSocket(httpPort);
@@ -85,15 +85,15 @@
             System.exit(1);
             return;
         }
-        
+
         TCPConnectionListener tcpListener
                 = new TCPConnectionListener(listen, vats);
         String tcpListenAddress = listen.getInetAddress().getHostName()
                 + ':' + listen.getLocalPort();
-        
+
         try {
             while (true) {
-                
+
                 Socket httpSocket = http.accept();
                 new HTTPConnectionHandler(httpSocket, vats, sessions,
                                     tcpListenAddress);



1.3       +16 -16    e/src/jsrc/net/vattp/tunnel/HTTPSocketCtl.java

Index: HTTPSocketCtl.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/tunnel/HTTPSocketCtl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- HTTPSocketCtl.java	2001/08/20 05:07:44	1.2
+++ HTTPSocketCtl.java	2001/09/06 09:55:40	1.3
@@ -19,16 +19,16 @@
 Contributor(s): ______________________________________.
 */
 
+import net.vattp.data.NetAddr;
+import org.erights.e.elib.prim.SynchQueue;
+
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
-import java.io.InputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.Socket;
 
-import net.vattp.data.NetAddr;
-import org.erights.e.elib.prim.SynchQueue;
-
 /**
  * The class which controls an individual TCP socket.
  *
@@ -36,22 +36,22 @@
  */
 
 public class HTTPSocketCtl extends Thread {
-    
+
     static private final int SENDLIMIT = 512;
-    
+
     private HTTPClient myClient;
     private byte myConnectionID;
     private String myHostPort;
-        
+
     private Socket mySocket;
     private InputStream myInputStream;
     private OutputStream myOutputStream;
     private int myMySendLimit;
-    
+
     private boolean isNeedingSendLimitUpdate = false;
     private int myHisSendLimit = SENDLIMIT;
     private SynchQueue myOutputQueue = new SynchQueue();
-        
+
     /*package*/ HTTPSocketCtl(String hostPort, HTTPClient client,
                 byte connectionID) {
         myClient = client;
@@ -67,7 +67,7 @@
     /**
      * Get the value for the send limit to be sent to the client or null
      *
-     *@return is a two byte array with the value of the send limit if it 
+     *@return is a two byte array with the value of the send limit if it
      *          should be updated, or null if there is no change.
      */
     /*package*/ synchronized byte[] getHisSendLimit() {
@@ -106,11 +106,11 @@
         }
         return null;
     }
-    private byte[] makeSessionMsg(byte msgID, String reason) 
+    private byte[] makeSessionMsg(byte msgID, String reason)
                 throws IOException {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         DataOutputStream ds = new DataOutputStream(baos);
-        
+
         ds.writeByte(msgID);
         ds.writeByte(myConnectionID);
         ds.writeUTF(reason);
@@ -122,10 +122,10 @@
             // Build the outgoing connection
             try {
                 NetAddr address = new NetAddr(myHostPort);
-                //it's safe to not check optInetAddress() for null, since 
+                //it's safe to not check optInetAddress() for null, since
                 //address must explicitly have one
                 //XXX is this true?
-                mySocket = new Socket(address.optInetAddress(), 
+                mySocket = new Socket(address.optInetAddress(),
                                       address.getPort());
             } catch(IOException e2) {
                 try {
@@ -142,9 +142,9 @@
             msg[1] = myConnectionID;
             myClient.queueMsg(msg);
         }
-        
+
         isNeedingSendLimitUpdate = true;
-        
+
         //Wait for data and send it
         while (true) {
             Object qe = myOutputQueue.dequeue();



1.2       +1 -1      e/src/jsrc/net/vattp/tunnel/TCPConnectionListener.java

Index: TCPConnectionListener.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/tunnel/TCPConnectionListener.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TCPConnectionListener.java	2000/12/21 22:15:18	1.1
+++ TCPConnectionListener.java	2001/09/06 09:55:40	1.2
@@ -34,7 +34,7 @@
     /** map of logged on clients.  Key is vatID, data is HTTPClient */
     private Hashtable myVats;
     private ServerSocket myListen;
-    
+
     /*package*/ TCPConnectionListener(ServerSocket listen, Hashtable vats) {
         myListen = listen;
         myVats = vats;



1.6       +12 -12    e/src/jsrc/net/vattp/vls/VatLocationServer.java

Index: VatLocationServer.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/vls/VatLocationServer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- VatLocationServer.java	2001/08/25 19:54:02	1.5
+++ VatLocationServer.java	2001/09/06 09:55:40	1.6
@@ -26,15 +26,15 @@
 /**
  * A vat location server, which maintains a collection of the locations of
  * E vats which it can lookup on demand. <p>
- * 
- * These registrations have a finite lifetime which we also manage here.  In 
- * order to better decouple issues during this stage of development, this 
+ *
+ * These registrations have a finite lifetime which we also manage here.  In
+ * order to better decouple issues during this stage of development, this
  * version is no longer persistent. <p>
- * 
- * XXX The VLS must be registered under swiss number 0 so it can respond, as 
+ *
+ * XXX The VLS must be registered under swiss number 0 so it can respond, as
  * an E object, to registrations (and unregistrations?). <p>
  *
- * XXX The VLS must be registered by setVatLocationLookup to listen on port 0 
+ * XXX The VLS must be registered by setVatLocationLookup to listen on port 0
  * for location queries.
  *
  * @author Eris Messick
@@ -43,7 +43,7 @@
  * @author Mark Miller
  */
 class VatLocationServer implements VatLocationLookup {
-    
+
     /** Collection of current registrations */
     private FlexMap myRegistrations;
 
@@ -53,11 +53,11 @@
     /* Reregistration must occur before the registration times out.  It's
        currently set to 60 minutes. */
     // 60000 ms. == 1 min
-    static private final int MINUTE = 60000; 
+    static private final int MINUTE = 60000;
     // 60 ticks == 1 hour
-    static private final int REG_DURATION = 60 * MINUTE; 
+    static private final int REG_DURATION = 60 * MINUTE;
     // commit every 5 minutes
-    // static private final int COMMIT_INTERVAL = 5 * MINUTE; 
+    // static private final int COMMIT_INTERVAL = 5 * MINUTE;
 
     /**
      * Construct a vat location server. <p>
@@ -71,7 +71,7 @@
     }
 
     static private final String[] NO_LOCATIONS = {};
-    
+
     /**
      * XXX Will currently only return either a zero or a one element array.
      */
@@ -94,7 +94,7 @@
     public void put(String vatID, String searchPath) {
         myRegistrations.put(vatID, searchPath);
         Object[] args = { vatID };
-        myTimer.whenPast(myTimer.now() + REG_DURATION, 
+        myTimer.whenPast(myTimer.now() + REG_DURATION,
                          myRegistrations,
                          "remove",
                          args);



1.3       +28 -28    e/src/jsrc/org/apache/oro/text/regex/CharStringPointer.java

Index: CharStringPointer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/CharStringPointer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CharStringPointer.java	2001/03/11 04:32:58	1.2
+++ CharStringPointer.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,7 +53,7 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
@@ -61,90 +61,90 @@
  * The CharStringPointer class is used to facilitate traversal of a char[]
  * in the manner pointer traversals of strings are performed in C/C++.
  * It is expected that the compiler will inline all the functions.
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: CharStringPointer.java,v 1.2 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: CharStringPointer.java,v 1.3 2001/09/06 09:55:41 markm Exp $
+
 */
 final class CharStringPointer {
     static final char _END_OF_STRING = Character.MAX_VALUE;
     int _offset;
     char[] _array;
-    
+
     CharStringPointer(char[] charArray, int offset) {
         _array  = charArray;
         _offset = offset;
     }
-    
+
     CharStringPointer(char[] charArray) {
         this(charArray, 0);
     }
-    
+
     char _getValue()  {
         return _getValue(_offset);
     }
-    
+
     char _getValue(int offset) {
         if(offset < _array.length && offset >= 0)
             return _array[offset];
         return _END_OF_STRING;
     }
-    
+
     char _getValueRelative(int offset) {
         return _getValue(_offset + offset);
     }
-    
+
     int _getLength() { return _array.length; }
-    
+
     int _getOffset() { return _offset; }
-    
+
     void _setOffset(int offset) { _offset = offset; }
-    
+
     boolean _isAtEnd() {
         return (_offset >= _array.length);
     }
-    
+
     char _increment(int inc) {
         _offset+=inc;
         if(_isAtEnd()) {
             _offset = _array.length;
             return _END_OF_STRING;
         }
-        
+
         return _array[_offset];
     }
-    
+
     char _increment() { return _increment(1); }
-    
+
     char _decrement(int inc) {
-        _offset-=inc; 
+        _offset-=inc;
         if(_offset < 0)
             _offset = 0;
-        
+
         return _array[_offset];
     }
-    
+
     char _decrement() { return _decrement(1); }
-    
+
     char _postIncrement() {
         char ret;
         ret = _getValue();
         _increment();
         return ret;
     }
-    
+
     char _postDecrement() {
         char ret;
         ret = _getValue();
         _decrement();
         return ret;
     }
-    
-    
+
+
     String _toString(int offset) {
         return new String(_array, offset, _array.length - offset);
     }
-    
+
     public String toString() {
         return _toString(0);
     }



1.3       +10 -10    e/src/jsrc/org/apache/oro/text/regex/MalformedPatternException.java

Index: MalformedPatternException.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/MalformedPatternException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MalformedPatternException.java	2001/03/11 04:32:58	1.2
+++ MalformedPatternException.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,12 +53,12 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
-import java.lang.*;
 
+
 /**
  * A class used to signify the occurrence of a syntax error in a
  * regular expression that is being compiled.  The class is not
@@ -68,21 +68,21 @@
  * for any purpose.  This does not preclude users and third party
  * implementors of the interfaces of this package from subclassing it
  * for their own purposes.
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: MalformedPatternException.java,v 1.2 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: MalformedPatternException.java,v 1.3 2001/09/06 09:55:41 markm Exp $
+
  * @see PatternCompiler
  */
 public class MalformedPatternException extends Exception {
-    
+
     /**
      * Simply calls the corresponding constructor of its superclass.
      */
     public MalformedPatternException() {
         super();
     }
-    
+
     /**
      * Simply calls the corresponding constructor of its superclass.
      * <p>



1.3       +24 -24    e/src/jsrc/org/apache/oro/text/regex/MatchResult.java

Index: MatchResult.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/MatchResult.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MatchResult.java	2001/03/11 04:32:58	1.2
+++ MatchResult.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,7 +53,7 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
@@ -71,7 +71,7 @@
  * or by the {@link #toString()} method which is
  * defined to return the same thing.  It is also possible to obtain
  * the beginning and ending offsets of a match relative to the input
- * producing the match by using the 
+ * producing the match by using the
  * {@link #beginOffset(int)} and {@link #endOffset(int)} methods.  The
  * {@link #begin(int)} and {@link #end(int)} are useful in some
  * circumstances and return the begin and end offsets of the subgroups
@@ -101,11 +101,11 @@
  * input   = new PatternMatcherInput(someStringInput);
  *
  * while(matcher.contains(input, pattern)) {
- *   result = matcher.getMatch();  
+ *   result = matcher.getMatch();
  *   // Perform whatever processing on the result you want.
  *   // Here we just print out all its elements to show how its
  *   // methods are used.
- * 
+ *
  *   System.out.println("Match: " + result.toString());
  *   System.out.println("Length: " + result.length());
  *   groups = result.groups();
@@ -122,10 +122,10 @@
  *   }
  * }
  * </pre></blockquote>
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: MatchResult.java,v 1.2 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: MatchResult.java,v 1.3 2001/09/06 09:55:41 markm Exp $
+
  * @see PatternMatcher
  */
 
@@ -140,7 +140,7 @@
      * int length = -1; // Use -1 to indicate group doesn't exist
      * MatchResult result;
      * String subgroup;
-     * 
+     *
      * // Initialization of result omitted
      *
      * subgroup = result.group(1);
@@ -160,8 +160,8 @@
      * @return The length of the match.
      */
     public int length();
-    
-    
+
+
     /**
      * @return The number of groups contained in the result.  This number
      *         includes the 0th group.  In other words, the result refers
@@ -169,7 +169,7 @@
      *         itself.
      */
     public int groups();
-    
+
     /**
      * Returns the contents of the parenthesized subgroups of a match,
      * counting parentheses from left to right and starting from 1.
@@ -189,8 +189,8 @@
      *         of length 0.
      */
     public String group(int group);
-    
-    
+
+
     /**
      * @param group The pattern subgroup.
      * @return The offset into group 0 of the first token in the indicated
@@ -201,8 +201,8 @@
      *         use the offset to index an array or String.
      */
     public int begin(int group);
-    
-    
+
+
     /**
      * @param group The pattern subgroup.
      * @return Returns one plus the offset into group 0 of the last token in
@@ -211,8 +211,8 @@
      *         string will return its start offset.
      */
     public int end(int group);
-    
-    
+
+
     /**
      * Returns an offset marking the beginning of the pattern match
      * relative to the beginning of the input from which the match
@@ -224,8 +224,8 @@
      *         not exist, returns -1.
      */
     public int beginOffset(int group);
-    
-    
+
+
     /**
      * Returns an offset marking the end of the pattern match
      * relative to the beginning of the input from which the match was
@@ -238,8 +238,8 @@
      *         string will return its start offset.
      */
     public int endOffset(int group);
-    
-    
+
+
     /**
      * Returns the same as group(0).
      *



1.3       +31 -31    e/src/jsrc/org/apache/oro/text/regex/OpCode.java

Index: OpCode.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/OpCode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- OpCode.java	2001/03/11 04:32:58	1.2
+++ OpCode.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,22 +53,22 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
 /**
  * The OpCode class should not be instantiated.  It is a holder of various
- * constants and static methods pertaining to the manipulation of the 
+ * constants and static methods pertaining to the manipulation of the
  * op-codes used in a compiled regular expression.
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: OpCode.java,v 1.2 2001/03/11 04:32:58 markm Exp $
+ @version $Id: OpCode.java,v 1.3 2001/09/06 09:55:41 markm Exp $
 */
 final class OpCode {
-    
+
     private OpCode() { }
-    
+
     // Names, values, and descriptions of operators correspond to those of
     // Perl regex bytecodes and for compatibility purposes are drawn from
     // regcomp.h in the Perl source tree by Larry Wall.
@@ -108,74 +108,74 @@
         _UNLESSM = 32,  // no       Fails if the following matches.
         _SUCCEED = 33,  // no       Return from a subroutine, basically.
         _WHILEM  = 34;  // no       Do curly processing and see if rest matches.
-    
+
     // Lengths of the various operands.
     static final int _operandLength[] = {
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0
     };
-    
+
     static final char _opType[] = {
         _END, _BOL, _BOL, _BOL, _EOL, _EOL, _EOL, _ANY, _ANY, _ANYOF, _CURLY,
         _CURLY, _BRANCH, _BACK, _EXACTLY, _NOTHING, _STAR, _PLUS, _ALNUM,
         _NALNUM, _BOUND, _NBOUND, _SPACE, _NSPACE, _DIGIT, _NDIGIT, _REF,
         _OPEN, _CLOSE, _MINMOD, _BOL, _BRANCH, _BRANCH, _END, _WHILEM
     };
-    
+
     static final char _opLengthVaries[] = {
         _BRANCH, _BACK, _STAR, _PLUS, _CURLY, _CURLYX, _REF, _WHILEM
     };
-    
+
     static final char _opLengthOne[] = {
         _ANY, _SANY, _ANYOF, _ALNUM, _NALNUM, _SPACE, _NSPACE, _DIGIT, _NDIGIT
     };
-    
+
     static final int  _NULL_OFFSET  = -1;
     static final char _NULL_POINTER =  0;
-    
+
     static final int _getNextOffset(char[] program, int offset) {
-        return ((int)program[offset + 1]); 
+        return ((int)program[offset + 1]);
     }
-    
+
     static final char _getArg1(char[] program, int offset) {
-        return program[offset + 2]; 
+        return program[offset + 2];
     }
-    
+
     static final char _getArg2(char[] program, int offset) {
-        return program[offset + 3]; 
+        return program[offset + 3];
     }
-    
+
     static final int _getOperand(int offset) {
         return (offset + 2);
     }
-    
+
     static final boolean _isInArray(char ch, char[] array, int start) {
         while(start < array.length)
             if(ch == array[start++])
                 return true;
         return false;
     }
-    
+
     static final int _getNextOperator(int offset) { return (offset + 2); }
     static final int _getPrevOperator(int offset) { return (offset - 2); }
-    
+
     static final int _getNext(char[] program, int offset) {
         int offs;
-        
+
         if(program == null)
             return _NULL_OFFSET;
-        
-        
+
+
         offs = _getNextOffset(program, offset);
         if(offs == _NULL_POINTER)
             return _NULL_OFFSET;
-        
+
         if(program[offset] == OpCode._BACK)
             return (offset - offs);
-        
+
         return (offset + offs);
     }
-    
+
     // doesn't really belong in this class, but we want Perl5Matcher not to
     // depend on Perl5Compiler
     static final boolean _isWordCharacter(char token) {
@@ -183,6 +183,6 @@
                 (token >= 'A' && token <= 'Z') ||
                 (token >= '0' && token <= '9') ||
                 (token == '_'));
-    }        
+    }
 }
 



1.3       +13 -13    e/src/jsrc/org/apache/oro/text/regex/Pattern.java

Index: Pattern.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/Pattern.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Pattern.java	2001/03/11 04:32:58	1.2
+++ Pattern.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,7 +53,7 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
@@ -68,30 +68,30 @@
  * to be interchangeable among differing PatternCompiler and PatternMatcher
  * implementations.  The documentation accompanying a specific implementation
  * will define what other classes a Pattern can interact with.
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: Pattern.java,v 1.2 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: Pattern.java,v 1.3 2001/09/06 09:55:41 markm Exp $
+
  * @see PatternCompiler
  * @see PatternMatcher
  */
 public interface Pattern {
-    
+
     /**
      * This method returns the string representation of the pattern.  Its
      * purpose is to allow a pattern to be reconstructed after compilation.
-     * In other words, when you compile a pattern, the resulting data 
+     * In other words, when you compile a pattern, the resulting data
      * structures bear no relation to the string defining the pattern.
-     * It is often useful to be able to access the string defining a pattern 
+     * It is often useful to be able to access the string defining a pattern
      * after it has been compiled.
      * <p>
      * @return The original string representation of the regular expression
      *         pattern.
      */
     public String getPattern();
-    
-    
-    
+
+
+
     /**
      * This method returns an integer containing the compilation options used
      * to compile this pattern.



1.3       +16 -16    e/src/jsrc/org/apache/oro/text/regex/PatternCompiler.java

Index: PatternCompiler.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/PatternCompiler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PatternCompiler.java	2001/03/11 04:32:58	1.2
+++ PatternCompiler.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,14 +53,14 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
 /**
  * The PatternCompiler interface defines the operations a regular
  * expression compiler must implement.  However, the types of
- * regular expressions recognized by a compiler and the Pattern 
+ * regular expressions recognized by a compiler and the Pattern
  * implementations produced as a result of compilation are not
  * restricted.
  * <p>
@@ -85,8 +85,8 @@
  *   System.out.println(e.getMessage());
  *   System.exit(1);
  * }
- * 
  *
+ *
  * if(matcher.matches(input, pattern))
  *    System.out.println(input + " is a number");
  * else
@@ -98,10 +98,10 @@
  * variations of the compile() methods that take extra options affecting
  * the compilation of a pattern.  However, the PatternCompiler method
  * implementations should provide the default behavior of the class.
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: PatternCompiler.java,v 1.2 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: PatternCompiler.java,v 1.3 2001/09/06 09:55:41 markm Exp $
+
  * @see Pattern
  * @see PatternMatcher
  * @see MalformedPatternException
@@ -118,8 +118,8 @@
      *  if some other error in the expression is encountered.
      */
     public Pattern compile(String pattern) throws MalformedPatternException;
-    
-    
+
+
     /**
      * Compiles a regular expression into a data structure that can be
      * used by a PatternMatcher implementation to perform pattern matching.
@@ -139,8 +139,8 @@
      */
     public Pattern compile(String pattern, int options)
         throws MalformedPatternException;
-    
-    
+
+
     /**
      * Compiles a regular expression into a data structure that can be used
      * by a PatternMatcher implementation to perform pattern matching.
@@ -152,8 +152,8 @@
      *  if some other error in the expression is encountered.
      */
     public Pattern compile(char[] pattern) throws MalformedPatternException;
-    
-    
+
+
     /**
      * Compiles a regular expression into a data structure that can be
      * used by a PatternMatcher implementation to perform pattern matching.
@@ -173,6 +173,6 @@
      */
     public Pattern compile(char[] pattern, int options)
         throws MalformedPatternException;
-    
+
 }
 



1.2       +12 -12    e/src/jsrc/org/apache/oro/text/regex/PatternMatcher.java

Index: PatternMatcher.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/PatternMatcher.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PatternMatcher.java	2000/08/03 16:00:41	1.1
+++ PatternMatcher.java	2001/09/06 09:55:41	1.2
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,13 +53,13 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
 /**
  * The PatternMatcher interface defines the operations a regular
- * expression matcher must implement.  However, the types of the Pattern 
+ * expression matcher must implement.  However, the types of the Pattern
  * implementations recognized by a matcher are not restricted.  Typically
  * PatternMatcher instances will only recognize a specific type of Pattern.
  * For example, the Perl5Matcher only recognizes Perl5Pattern instances.
@@ -76,7 +76,7 @@
  * should be careful not to mismatch classes.
 
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: PatternMatcher.java,v 1.1 2000/08/03 16:00:41 markm Exp $
+ @version $Id: PatternMatcher.java,v 1.2 2001/09/06 09:55:41 markm Exp $
 
  * @see Pattern
  * @see PatternCompiler
@@ -197,11 +197,11 @@
   /**
    * Determines if a string contains a pattern.  If the pattern is
    * matched by some substring of the input, a MatchResult instance
-   * representing the <b> first </b> such match is made acessible via 
+   * representing the <b> first </b> such match is made acessible via
    * {@link #getMatch()}.  If you want to access
    * subsequent matches you should either use a PatternMatcherInput object
    * or use the offset information in the MatchResult to create a substring
-   * representing the remaining input.  Using the MatchResult offset 
+   * representing the remaining input.  Using the MatchResult offset
    * information is the recommended method of obtaining the parts of the
    * string preceeding the match and following the match.
    * <p>
@@ -214,11 +214,11 @@
   /**
    * Determines if a string (represented as a char[]) contains a pattern.
    * If the pattern is matched by some substring of the input, a MatchResult
-   * instance representing the <b>first</b> such match is made acessible via 
+   * instance representing the <b>first</b> such match is made acessible via
    * {@link #getMatch()}.  If you want to access
    * subsequent matches you should either use a PatternMatcherInput object
    * or use the offset information in the MatchResult to create a substring
-   * representing the remaining input.  Using the MatchResult offset 
+   * representing the remaining input.  Using the MatchResult offset
    * information is the recommended method of obtaining the parts of the
    * string preceeding the match and following the match.
    * <p>
@@ -232,7 +232,7 @@
    * Determines if the contents of a PatternMatcherInput, starting from the
    * current offset of the input contains a pattern.
    * If a pattern match is found, a MatchResult
-   * instance representing the <b>first</b> such match is made acessible via 
+   * instance representing the <b>first</b> such match is made acessible via
    * {@link #getMatch()}.  The current offset of the
    * PatternMatcherInput is set to the offset corresponding to the end
    * of the match, so that a subsequent call to this method will continue
@@ -267,7 +267,7 @@
    * input   = new PatternMatcherInput(someStringInput);
    *
    * while(matcher.contains(input, pattern)) {
-   *   result = matcher.getMatch();  
+   *   result = matcher.getMatch();
    *   // Perform whatever processing on the result you want.
    * }
    *



1.3       +49 -49    e/src/jsrc/org/apache/oro/text/regex/PatternMatcherInput.java

Index: PatternMatcherInput.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/PatternMatcherInput.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PatternMatcherInput.java	2001/03/11 04:32:58	1.2
+++ PatternMatcherInput.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,7 +53,7 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
@@ -93,7 +93,7 @@
  * input   = new PatternMatcherInput(someStringInput);
  *
  * while(matcher.contains(input, pattern)) {
- *   result = matcher.getMatch();  
+ *   result = matcher.getMatch();
  *   // Perform whatever processing on the result you want.
  * }
  * // Suppose we want to start searching from the beginning again with
@@ -111,10 +111,10 @@
  * </pre></blockquote>
  *
  *
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: PatternMatcherInput.java,v 1.2 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: PatternMatcherInput.java,v 1.3 2001/09/06 09:55:41 markm Exp $
+
  * @see PatternMatcher
  */
 public final class PatternMatcherInput {
@@ -122,7 +122,7 @@
     char[] _originalCharInput, _originalBuffer, _toLowerBuffer;
     int _beginOffset, _endOffset, _currentOffset;
     int _matchBeginOffset = -1, _matchEndOffset = -1;
-    
+
     /**
      * Creates a PatternMatcherInput object, associating a region of a String
      * as input to be used for pattern matching by PatternMatcher objects.
@@ -140,7 +140,7 @@
     public PatternMatcherInput(String input, int begin, int length) {
         setInput(input, begin, length);
     }
-    
+
     /**
      * Like calling
      * <blockquote><pre>
@@ -152,8 +152,8 @@
     public PatternMatcherInput(String input) {
         this(input, 0, input.length());
     }
-    
-    
+
+
     /**
      * Creates a PatternMatcherInput object, associating a region of a string
      * (represented as a char[]) as input
@@ -171,8 +171,8 @@
      */
     public PatternMatcherInput(char[] input, int begin, int length) {
         setInput(input, begin, length);
-    } 
-    
+    }
+
     /**
      * Like calling:
      * <blockquote><pre>
@@ -184,8 +184,8 @@
     public PatternMatcherInput(char[] input) {
         this(input, 0, input.length);
     }
-    
-    
+
+
     /**
      * @return The length of the region to be considered input for pattern
      *         matching purposes.  Essentially this is then end offset minus
@@ -195,8 +195,8 @@
         return (_endOffset - _beginOffset);
         //return _originalBuffer.length;
     }
-    
-    
+
+
     /**
      * Associates a region of a String as input
      * to be used for pattern matching by PatternMatcher objects.
@@ -218,7 +218,7 @@
         setBeginOffset(begin);
         setEndOffset(_beginOffset + length);
     }
-    
+
     /**
      * This method is identical to calling:
      * <blockquote><pre>
@@ -230,8 +230,8 @@
     public void setInput(String input) {
         setInput(input, 0, input.length());
     }
-    
-    
+
+
     /**
      * Associates a region of a string (represented as a char[]) as input
      * to be used for pattern matching by PatternMatcher objects.
@@ -254,8 +254,8 @@
         setBeginOffset(begin);
         setEndOffset(_beginOffset + length);
     }
-    
-    
+
+
     /**
      * This method is identical to calling:
      * <blockquote><pre>
@@ -267,8 +267,8 @@
     public void setInput(char[] input) {
         setInput(input, 0, input.length);
     }
-    
-    
+
+
     /**
      * Returns the character at a particular offset relative to the begin
      * offset of the input.
@@ -282,7 +282,7 @@
     public char charAt(int offset) {
         return _originalBuffer[_beginOffset + offset];
     }
-    
+
     /**
      * Returns a new string that is a substring of the PatternMatcherInput
      * instance. The substring begins at the specified beginOffset relative
@@ -301,7 +301,7 @@
         return new String(_originalBuffer, _beginOffset+beginOffset,
                           endOffset - beginOffset);
     }
-    
+
     /**
      * Returns a new string that is a substring of the PatternMatcherInput
      * instance. The substring begins at the specified beginOffset relative
@@ -318,8 +318,8 @@
         beginOffset+=_beginOffset;
         return new String(_originalBuffer, beginOffset, _endOffset - beginOffset);
     }
-    
-    
+
+
     /**
      * Retrieves the original input used to initialize the PatternMatcherInput
      * instance.  If a String was used, the String instance will be returned.
@@ -335,7 +335,7 @@
             return _originalCharInput;
         return _originalStringInput;
     }
-    
+
     /**
      * Retrieves the char[] buffer to be used used as input by PatternMatcher
      * implementations to look for matches.  This array should be treated
@@ -345,7 +345,7 @@
      *         implementations.
      */
     public char[] getBuffer() { return _originalBuffer;  }
-    
+
     /**
      * Returns whether or not the end of the input has been reached.
      * <p>
@@ -353,15 +353,15 @@
      *         end offset.
      */
     public boolean endOfInput(){ return (_currentOffset >= _endOffset); }
-    
-    
+
+
     /**
      * @return The offset of the input that should be considered the start
      *         of the region to be considered as input by PatternMatcher
      *         methods.
      */
     public int getBeginOffset()   { return _beginOffset; }
-    
+
     /**
      * @return The offset of the input that should be considered the end
      *         of the region to be considered as input by PatternMatcher
@@ -369,14 +369,14 @@
      *         that is part of the input region.
      */
     public int getEndOffset()     { return _endOffset;  }
-    
+
     /**
      * @return The offset of the input that should be considered the current
      *         offset where PatternMatcher methods should start looking for
      *         matches.
      */
     public int getCurrentOffset() { return _currentOffset; }
-    
+
     /**
      * Sets the offset of the input that should be considered the start
      * of the region to be considered as input by PatternMatcher
@@ -386,7 +386,7 @@
      * @param offset  The offset to use as the beginning of the input.
      */
     public void setBeginOffset(int offset)   { _beginOffset = offset; }
-    
+
     /**
      * Sets the offset of the input that should be considered the end
      * of the region to be considered as input by PatternMatcher
@@ -396,7 +396,7 @@
      * @param offset  The offset to use as the end of the input.
      */
     public void setEndOffset(int offset)     { _endOffset = offset; }
-    
+
     /**
      * Sets the offset of the input that should be considered the current
      * offset where PatternMatcher methods should start looking for
@@ -411,7 +411,7 @@
         _currentOffset    = offset;
         setMatchOffsets(-1, -1);
     }
-    
+
     /**
      * Returns the string representation of the input, where the input is
      * considered to start from the begin offset and end at the end offset.
@@ -421,8 +421,8 @@
     public String toString() {
         return new String(_originalBuffer, _beginOffset, length());
     }
-    
-    
+
+
     /**
      * A convenience method returning the part of the input occurring before
      * the last match found by a call to a Perl5Matcher
@@ -434,8 +434,8 @@
         return new String(_originalBuffer, _beginOffset,
                           _matchBeginOffset - _beginOffset);
     }
-    
-    
+
+
     /**
      * A convenience method returning the part of the input occurring after
      * the last match found by a call to a Perl5Matcher
@@ -447,8 +447,8 @@
         return new String(_originalBuffer, _matchEndOffset,
                           _endOffset - _matchEndOffset);
     }
-    
-    
+
+
     /**
      * A convenience method returning the part of the input corresponding
      * to the last match found by a call to a Perl5Matcher
@@ -463,8 +463,8 @@
         return new String(_originalBuffer, _matchBeginOffset,
                           _matchEndOffset - _matchBeginOffset);
     }
-    
-    
+
+
     /**
      * This method is intended for use by PatternMatcher implementations.
      * It is necessary to record the location of the previous match so that
@@ -485,7 +485,7 @@
         _matchBeginOffset    = matchBeginOffset;
         _matchEndOffset      = matchEndOffset;
     }
-    
+
     /**
      * Returns the offset marking the beginning of the match found by
      * contains().
@@ -493,7 +493,7 @@
      * @return The begin offset of a contains() match.
      */
     public int getMatchBeginOffset()    { return _matchBeginOffset; }
-    
+
     /**
      * Returns the offset marking the end of the match found by contains().
      * <p>



1.3       +295 -295  e/src/jsrc/org/apache/oro/text/regex/Perl5Compiler.java

Index: Perl5Compiler.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/Perl5Compiler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Perl5Compiler.java	2001/03/11 04:32:58	1.2
+++ Perl5Compiler.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,7 +53,7 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
@@ -61,12 +61,12 @@
  * The Perl5Compiler class is used to create compiled regular expressions
  * conforming to the Perl5 regular expression syntax.  It generates
  * Perl5Pattern instances upon compilation to be used in conjunction
- * with a Perl5Matcher instance.  Please see the user's guide for more 
+ * with a Perl5Matcher instance.  Please see the user's guide for more
  * information about Perl5 regular expressions.
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: Perl5Compiler.java,v 1.2 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: Perl5Compiler.java,v 1.3 2001/09/06 09:55:41 markm Exp $
+
  * @see PatternCompiler
  * @see MalformedPatternException
  * @see Perl5Pattern
@@ -76,7 +76,7 @@
 public final class Perl5Compiler implements PatternCompiler {
     private static final int __WORSTCASE = 0, __NONNULL = 0x1, __SIMPLE = 0x2,
         __SPSTART = 0x4, __TRYAGAIN = 0x8;
-    
+
     private static final char
         __CASE_INSENSITIVE = 0x0001,
         __GLOBAL           = 0x0002,
@@ -85,24 +85,24 @@
         __SINGLELINE       = 0x0010,
         __EXTENDED         = 0x0020,
         __READ_ONLY        = 0x8000;
-    
+
     private static final String __META_CHARS = "^$.[()|?+*\\";
     private static final String __HEX_DIGIT =
         "0123456789abcdef0123456789ABCDEFx";
     private CharStringPointer __input;
     private boolean __sawBackreference;
     private char[] __modifierFlags = { 0 };
-    
+
     // IMPORTANT: __numParentheses starts out equal to 1 during compilation.
     // It is always one greater than the number of parentheses encountered
     // so far in the regex.  That is because it refers to the number of groups
     // to save, and the entire match is always saved (group 0)
     private int __numParentheses, __programSize, __cost;
-    
+
     // When doing the second pass and actually generating code, __programSize
     // keeps track of the current offset.
     private char[] __program;
-    
+
     /**
      * The default mask for the {@link #compile compile} methods.
      * It is equal to 0.
@@ -119,13 +119,13 @@
      * in Perl5Matcher.
      */
     public static final int DEFAULT_MASK          = 0;
-    
+
     /**
      * A mask passed as an option to the {@link #compile compile} methods
      * to indicate a compiled regular expression should be case insensitive.
      */
     public static final int CASE_INSENSITIVE_MASK = __CASE_INSENSITIVE;
-    
+
     /**
      * A mask passed as an option to the  {@link #compile compile} methods
      * to indicate a compiled regular expression should treat input as having
@@ -140,7 +140,7 @@
      * used together.
      */
     public static final int MULTILINE_MASK        = __MULTILINE;
-    
+
     /**
      * A mask passed as an option to the {@link #compile compile} methods
      * to indicate a compiled regular expression should treat input as being
@@ -157,11 +157,11 @@
      * used together.
      */
     public static final int SINGLELINE_MASK       = __SINGLELINE;
-    
+
     /**
      * A mask passed as an option to the {@link #compile compile} methods
      * to indicate a compiled regular expression should be treated as a Perl5
-     * extended pattern (i.e., a pattern using the <b>/x</b> modifier).  This 
+     * extended pattern (i.e., a pattern using the <b>/x</b> modifier).  This
      * option tells the compiler to ignore whitespace that is not backslashed or
      * within a character class.  It also tells the compiler to treat the
      * <b>#</b> character as a metacharacter introducing a comment as in
@@ -173,7 +173,7 @@
      * make sense to use it in Java.
      */
     public static final int EXTENDED_MASK         = __EXTENDED;
-    
+
     /**
      * A mask passed as an option to the {@link #compile compile} methods
      * to indicate that the resulting Perl5Pattern should be treated as a
@@ -187,7 +187,7 @@
      * using different Perl5Matcher instances.
      */
     public static final int READ_ONLY_MASK        = __READ_ONLY;
-    
+
     /**
      * Given a character string, returns a Perl5 expression that interprets
      * each character of the original string literally.  In other words, all
@@ -205,17 +205,17 @@
     public static final String quotemeta(char[] expression) {
         int ch;
         StringBuffer buffer;
-        
+
         buffer = new StringBuffer(2*expression.length);
         for(ch = 0; ch < expression.length; ch++) {
             if(!OpCode._isWordCharacter(expression[ch]))
                 buffer.append('\\');
             buffer.append(expression[ch]);
         }
-        
+
         return buffer.toString();
     }
-    
+
     /**
      * Given a character string, returns a Perl5 expression that interprets
      * each character of the original string literally.  In other words, all
@@ -233,47 +233,47 @@
     public static final String quotemeta(String expression) {
         return quotemeta(expression.toCharArray());
     }
-    
+
     private static boolean __isSimpleRepetitionOp(char ch) {
         return (ch == '*' || ch == '+' || ch == '?');
     }
-    
+
     private static boolean __isComplexRepetitionOp(char[] ch, int offset) {
         if(offset < ch.length && offset >= 0)
             return (ch[offset] == '*' || ch[offset] == '+' || ch[offset] == '?'
                     || (ch[offset] == '{' && __parseRepetition(ch, offset)));
         return false;
     }
-    
+
     // determines if {\d+,\d*} is the next part of the string
     private static boolean __parseRepetition(char[] str, int offset) {
         if(str[offset] != '{')
             return false;
         ++offset;
-        
+
         if(offset >= str.length || !Character.isDigit(str[offset]))
             return false;
-        
+
         while(offset < str.length && Character.isDigit(str[offset]))
             ++offset;
-        
+
         if(offset < str.length && str[offset] == ',')
             ++offset;
-        
+
         while(offset < str.length && Character.isDigit(str[offset]))
             ++offset;
-        
+
         if(offset >= str.length || str[offset] != '}')
             return false;
-        
+
         return true;
     }
-    
+
     private static int __parseHex(char[] str, int offset, int maxLength,
                                   int[] scanned)
     {
         int val = 0, index;
-        
+
         scanned[0] = 0;
         while(offset < str.length && maxLength-- > 0 &&
               (index = __HEX_DIGIT.indexOf(str[offset])) != -1) {
@@ -282,17 +282,17 @@
             ++offset;
             ++scanned[0];
         }
-        
+
         return val;
     }
-    
+
     private static int __parseOctal(char[] str, int offset, int maxLength,
                                     int[] scanned)
     {
         int val = 0, index;
-        
+
         scanned[0] = 0;
-        while(offset < str.length && 
+        while(offset < str.length &&
               maxLength > 0 && str[offset] >= '0' && str[offset] <= '7') {
             val <<= 3;
             val |= (str[offset] - '0');
@@ -300,10 +300,10 @@
             ++offset;
             ++scanned[0];
         }
-        
+
         return val;
     }
-    
+
     private static void __setModifierFlag(char[] flags, char ch) {
         switch(ch) {
         case 'i' : flags[0] |= __CASE_INSENSITIVE; return;
@@ -314,42 +314,42 @@
         case 'x' : flags[0] |= __EXTENDED; return;
         }
     }
-    
+
     // Emit a specific character code.
     private void __emitCode(char code) {
-        
+
         if(__program != null)
             __program[__programSize] = code;
-        
+
         ++__programSize;
     }
-    
-    
+
+
     // Emit an operator with no arguments.
     // Return an offset into the __program array as a pointer to node.
     private int __emitNode(char operator) {
         int offset;
-        
+
         offset = __programSize;
-        
+
         if(__program == null)
             __programSize+=2;
         else {
             __program[__programSize++] = operator;
             __program[__programSize++] = OpCode._NULL_POINTER;
         }
-        
+
         return offset;
     }
-    
-    
+
+
     // Emit an operator with arguments.
     // Return an offset into the __programarray as a pointer to node.
     private int __emitArgNode(char operator, char arg) {
         int offset;
-        
+
         offset = __programSize;
-        
+
         if(__program== null)
             __programSize+=3;
         else {
@@ -357,83 +357,83 @@
             __program[__programSize++] = OpCode._NULL_POINTER;
             __program[__programSize++] = arg;
         }
-        
+
         return offset;
     }
-    
-    
+
+
     // Insert an operator at a given offset.
     private void __programInsertOperator(char operator, int operand) {
         int src, dest, offset;
-        
+
         offset = (OpCode._opType[operator] == OpCode._CURLY ? 2 : 0);
-        
-        
+
+
         if(__program== null) {
             __programSize+=(2 + offset);
             return;
         }
-        
+
         src = __programSize;
         __programSize+=(2 + offset);
         dest = __programSize;
-        
+
         while(src > operand) {
             --src;
             --dest;
             __program[dest] = __program[src];
         }
-        
+
         __program[operand++] = operator;
         __program[operand++] = OpCode._NULL_POINTER;
-        
+
         while(offset-- > 0)
             __program[operand++] = OpCode._NULL_POINTER;
-        
+
     }
-    
-    
-    
+
+
+
     private void __programAddTail(int current, int value) {
         int scan, temp, offset;
-        
+
         if(__program== null || current == OpCode._NULL_OFFSET)
             return;
-        
+
         scan = current;
-        
+
         while(true) {
             temp = OpCode._getNext(__program, scan);
             if(temp == OpCode._NULL_OFFSET)
                 break;
             scan = temp;
         }
-        
+
         if(__program[scan] == OpCode._BACK)
             offset = scan - value;
         else
             offset = value - scan;
-        
+
         __program[scan + 1] = (char)offset;
     }
-    
-    
+
+
     private void __programAddOperatorTail(int current, int value) {
         if(__program== null || current == OpCode._NULL_OFFSET ||
            OpCode._opType[__program[current]] != OpCode._BRANCH)
             return;
         __programAddTail(OpCode._getNextOperator(current), value);
     }
-    
-    
+
+
     private char __getNextChar() {
         char ret, value;
-        
+
         ret = __input._postIncrement();
-        
+
         while(true) {
             value = __input._getValue();
-            
+
             if(value == '(' && __input._getValueRelative(1) == '?' &&
                __input._getValueRelative(2) == '#') {
                 // Skip comments
@@ -442,7 +442,7 @@
                 __input._increment();
                 continue;
             }
-            
+
             if((__modifierFlags[0] & __EXTENDED) != 0) {
                 if(Character.isWhitespace(value)) {
                     __input._increment();
@@ -454,29 +454,29 @@
                     continue;
                 }
             }
-            
+
             // System.err.println("next: " + ret + " last: " + __input._getValue()); // debug
-            
-            
+
+
             return ret;
         }
-        
+
     }
-    
-    
+
+
     private int __parseAlternation(int[] retFlags)
-        throws MalformedPatternException 
+        throws MalformedPatternException
     {
         int chain, offset, latest;
         int flags = 0;
         char value;
-        
+
         retFlags[0] = __WORSTCASE;
-        
+
         offset = __emitNode(OpCode._BRANCH);
-        
+
         chain  = OpCode._NULL_OFFSET;
-        
+
         if(__input._getOffset() == 0) {
             __input._setOffset(-1);
             __getNextChar();
@@ -484,14 +484,14 @@
             __input._decrement();
             __getNextChar();
         }
-        
+
         value = __input._getValue();
-        
+
         while(value != CharStringPointer._END_OF_STRING &&
               value != '|' && value != ')') {
             flags &= ~__TRYAGAIN;
             latest = __parseBranch(retFlags);
-            
+
             if(latest == OpCode._NULL_OFFSET) {
                 if((flags & __TRYAGAIN) != 0){
                     value = __input._getValue();
@@ -499,9 +499,9 @@
                 }
                 return OpCode._NULL_OFFSET;
             }
-            
+
             retFlags[0] |= (flags & __NONNULL);
-            
+
             if(chain == OpCode._NULL_OFFSET)
                 retFlags[0] |= (flags & __SPSTART);
             else {
@@ -511,30 +511,30 @@
             chain = latest;
             value = __input._getValue();
         }
-        
+
         // If loop was never entered.
         if(chain == OpCode._NULL_OFFSET)
             __emitNode(OpCode._NOTHING);
-        
+
         return offset;
     }
-    
-    
+
+
     private int __parseAtom(int[] retFlags) throws MalformedPatternException {
         boolean doDefault;
         char value;
         int offset, flags[] = { 0 };
-        
-        
+
+
         retFlags[0] = __WORSTCASE;
         doDefault = false;
         offset = OpCode._NULL_OFFSET;
-        
+
     tryAgain:
         while(true) {
-            
+
             value = __input._getValue();
-            
+
             switch(value) {
             case '^' :
                 __getNextChar();
@@ -547,7 +547,7 @@
                 else
                     offset = __emitNode(OpCode._BOL);
                 break tryAgain;
-                
+
             case '$':
                 __getNextChar();
                 // The order here is important in order to support /ms.
@@ -559,7 +559,7 @@
                 else
                     offset = __emitNode(OpCode._EOL);
                 break tryAgain;
-                
+
             case '.':
                 __getNextChar();
                 // The order here is important in order to support /ms.
@@ -571,13 +571,13 @@
                 ++__cost;
                 retFlags[0] |= (__NONNULL | __SIMPLE);
                 break tryAgain;
-                
+
             case '[':
                 __input._increment();
                 offset = __parseCharacterClass();
                 retFlags[0] |= (__NONNULL | __SIMPLE);
                 break tryAgain;
-                
+
             case '(':
                 __getNextChar();
                 offset = __parseExpression(true, flags);
@@ -588,28 +588,28 @@
                 }
                 retFlags[0] |= (flags[0] & (__NONNULL | __SPSTART));
                 break tryAgain;
-                
+
             case '|':
             case ')':
                 if((flags[0] & __TRYAGAIN) != 0) {
                     retFlags[0] |= __TRYAGAIN;
                     return OpCode._NULL_OFFSET;
                 }
-                
+
                 throw new MalformedPatternException("Error in expression at " +
                                                     __input._toString(__input._getOffset()));
                 //break tryAgain;
-                
+
             case '?':
             case '+':
             case '*':
                 throw new MalformedPatternException(
                                                     "?+* follows nothing in expression");
                 //break tryAgain;
-                
+
             case '\\':
                 value = __input._increment();
-                
+
                 switch(value) {
                 case 'A' :
                     offset = __emitNode(OpCode._SBOL);
@@ -674,16 +674,16 @@
                 case '8': case '9':
                     int num;
                     StringBuffer buffer = new StringBuffer(10);
-                    
+
                     num = 0;
                     value = __input._getValueRelative(num);
-                    
+
                     while(Character.isDigit(value)) {
                         buffer.append(value);
                         ++num;
                         value = __input._getValueRelative(num);
                     }
-                    
+
                     try {
                         num = Integer.parseInt(buffer.toString());
                     } catch(NumberFormatException e) {
@@ -691,7 +691,7 @@
                                                             "Unexpected number format exception.  Please report this bug." +
                                                             "NumberFormatException message: " + e.getMessage());
                     }
-                    
+
                     if(num > 9 && num >= __numParentheses) {
                         doDefault = true;
                         break tryAgain;
@@ -703,11 +703,11 @@
                         __sawBackreference = true;
                         offset = __emitArgNode(OpCode._REF, (char)num);
                         retFlags[0] |= __NONNULL;
-                        
+
                         value = __input._getValue();
                         while(Character.isDigit(value))
                             value = __input._increment();
-                        
+
                         __input._decrement();
                         __getNextChar();
                     }
@@ -723,7 +723,7 @@
                     break tryAgain;
                 }
                 break tryAgain;
-                
+
             case '#':
                 // skip over comments
                 if((__modifierFlags[0] & __EXTENDED) != 0) {
@@ -739,32 +739,32 @@
                 break tryAgain;
             }// end master switch
         } // end tryAgain
-        
-        
+
+
         if(doDefault) {
             char ender;
             int length, pOffset, maxOffset, lastOffset, numLength[];
-            
+
             offset = __emitNode(OpCode._EXACTLY);
             // Not sure that it's ok to use 0 to mark end.
             //__emitCode((char)0);
             __emitCode((char)CharStringPointer._END_OF_STRING);
-            
+
         forLoop:
             for(length = 0, pOffset = __input._getOffset() - 1,
                     maxOffset = __input._getLength();
                 length < 127 && pOffset < maxOffset; ++length) {
-                
+
                 lastOffset = pOffset;
                 value = __input._getValue(pOffset);
-                
+
                 switch(value) {
                 case '^': case '$': case '.': case '[': case '(': case ')':
                 case '|':
                     break forLoop;
                 case '\\':
                     value = __input._getValue(++pOffset);
-                    
+
                     switch(value) {
                     case 'A': case 'G': case 'Z': case 'w': case 'W': case 'b':
                     case 'B': case 's': case 'S': case 'd': case 'D':
@@ -810,24 +810,24 @@
                     case '6': case '7': case '8': case '9':
                         boolean doOctal = false;
                         value = __input._getValue(pOffset);
-                        
+
                         if(value == '0')
                             doOctal = true;
                         value = __input._getValue(pOffset + 1);
-                        
+
                         if(Character.isDigit(value)) {
                             int num;
                             StringBuffer buffer = new StringBuffer(10);
-                            
+
                             num = pOffset;
                             value = __input._getValue(num);
-                            
+
                             while(Character.isDigit(value)){
                                 buffer.append(value);
                                 ++num;
                                 value = __input._getValue(num);
                             }
-                            
+
                             try {
                                 num = Integer.parseInt(buffer.toString());
                             } catch(NumberFormatException e) {
@@ -835,11 +835,11 @@
                                                                     "Unexpected number format exception.  Please report this bug." +
                                                                     "NumberFormatException message: " + e.getMessage());
                             }
-                            
+
                             if(!doOctal)
                                 doOctal = (num >= __numParentheses);
                         }
-                        
+
                         if(doOctal) {
                             numLength = new int[1];
                             ender = (char)__parseOctal(__input._array, pOffset, 3, numLength);
@@ -849,7 +849,7 @@
                             break forLoop;
                         }
                         break;
-                        
+
                     case CharStringPointer._END_OF_STRING:
                     case '\0':
                         if(pOffset >= maxOffset)
@@ -861,7 +861,7 @@
                         break;
                     } // end backslash switch
                     break;
-                    
+
                 case '#':
                     if((__modifierFlags[0] & __EXTENDED) != 0) {
                         while(pOffset < maxOffset && __input._getValue(pOffset) != '\n')
@@ -878,13 +878,13 @@
                 default:
                     ender = __input._getValue(pOffset++);
                     break;
-                    
+
                 }   // end master switch
-                
+
                 if((__modifierFlags[0] & __CASE_INSENSITIVE) != 0 &&
                    Character.isUpperCase(ender))
                     ender = Character.toLowerCase(ender);
-                
+
                 if(pOffset < maxOffset && __isComplexRepetitionOp(__input._array, pOffset)) {
                     if(length > 0)
                         pOffset = lastOffset;
@@ -894,16 +894,16 @@
                     }
                     break;
                 }
-                
+
                 __emitCode(ender);
-                
-                
+
+
             } // end for loop
-            
-            
+
+
             __input._setOffset(pOffset - 1);
             __getNextChar();
-            
+
             if(length < 0)
                 throw new MalformedPatternException(
                                                     "Unexpected compilation failure.  Please report this bug!");
@@ -916,11 +916,11 @@
             //__emitCode('\0'); // debug
             __emitCode(CharStringPointer._END_OF_STRING);
         }
-        
+
         return offset;
     }
-    
-    
+
+
     // Set the bits in a character class.  Only recognizes ascii.
     private void __setCharacterClassBits(char[] bits, int offset, char deflt,
                                          char ch)
@@ -928,22 +928,22 @@
         if(__program== null || ch >= 256)
             return;
         ch &= 0xffff;
-        
+
         if(deflt == 0) {
             bits[offset + (ch >> 4)] |= (1 << (ch & 0xf));
         } else {
             bits[offset + (ch >> 4)] &= ~(1 << (ch & 0xf));
         }
     }
-    
-    
+
+
     private int __parseCharacterClass() throws MalformedPatternException {
         boolean range = false, skipTest;
         char clss, deflt, lastclss = Character.MAX_VALUE;
         int offset, bits, numLength[] = { 0 };
-        
+
         offset = __emitNode(OpCode._ANYOF);
-        
+
         if(__input._getValue() == '^') {
             ++__cost;
             __input._increment();
@@ -951,18 +951,18 @@
         } else {
             deflt = 0xffff;
         }
-        
+
         bits = __programSize;
         for(clss = 0; clss < 16; clss++)
             __emitCode(deflt);
-        
+
         clss = __input._getValue();
-        
+
         if(clss == ']' || clss == '-')
             skipTest = true;
         else
             skipTest = false;
-        
+
         while((!__input._isAtEnd() && (clss = __input._getValue()) != ']')
               || skipTest) {
             // It sucks, but we have to make this assignment every time
@@ -970,7 +970,7 @@
             __input._increment();
             if(clss == '\\') {
                 clss = __input._postIncrement();
-                
+
                 switch(clss){
                 case 'w':
                     for(clss = 0; clss < 256; clss++)
@@ -1048,7 +1048,7 @@
                     break;
                 }
             }
-            
+
             if(range) {
                 if(lastclss > clss)
                     throw new MalformedPatternException(
@@ -1056,7 +1056,7 @@
                 range = false;
             } else {
                 lastclss = clss;
-                
+
                 if(__input._getValue() == '-' &&
                    __input._getOffset() + 1 < __input._getLength() &&
                    __input._getValueRelative(1) != ']') {
@@ -1065,66 +1065,66 @@
                     continue;
                 }
             }
-            
+
             while(lastclss <= clss) {
                 __setCharacterClassBits(__program, bits, deflt, lastclss);
                 if((__modifierFlags[0] & __CASE_INSENSITIVE) != 0 &&
                    Character.isUpperCase(lastclss))
                     __setCharacterClassBits(__program, bits, deflt,
                                             Character.toLowerCase(lastclss));
-                
+
                 ++lastclss;
             }
-            
+
             lastclss = clss;
         }
-        
+
         if(__input._getValue() != ']')
             throw new MalformedPatternException("Unmatched [] in expression.");
-        
+
         __getNextChar();
-        
+
         return offset;
     }
-    
-    
+
+
     private int __parseBranch(int[] retFlags) throws MalformedPatternException {
         boolean nestCheck = false, handleRepetition = false;
         int offset, next, min, max, flags[] = { 0 };
         char operator, value;
-        
+
         min = 0;
         max = Character.MAX_VALUE;
         offset = __parseAtom(flags);
-        
+
         if(offset == OpCode._NULL_OFFSET) {
             if((flags[0] & __TRYAGAIN) != 0)
                 retFlags[0] |= __TRYAGAIN;
             return OpCode._NULL_OFFSET;
         }
-        
+
         operator = __input._getValue();
-        
+
         if(operator == '(' && __input._getValueRelative(1) == '?' &&
            __input._getValueRelative(2) == '#') {
             while(operator != CharStringPointer._END_OF_STRING && operator != ')')
                 operator = __input._increment();
-            
+
             if(operator != CharStringPointer._END_OF_STRING) {
                 __getNextChar();
                 operator = __input._getValue();
             }
         }
-        
+
         if(operator == '{' &&
            __parseRepetition(__input._array, __input._getOffset())) {
             int maxOffset, pos;
-            
+
             next = __input._getOffset() + 1;
             pos = maxOffset = __input._getLength();
-            
+
             value = __input._getValue(next);
-            
+
             while(Character.isDigit(value) || value == ',') {
                 if(value == ',') {
                     if(pos != maxOffset)
@@ -1135,24 +1135,24 @@
                 ++next;
                 value = __input._getValue(next);
             }
-            
+
             if(value == '}') {
                 int num;
                 StringBuffer buffer = new StringBuffer(10);
-                
+
                 if(pos == maxOffset)
                     pos = next;
                 __input._increment();
-                
+
                 num = __input._getOffset();
                 value = __input._getValue(num);
-                
+
                 while(Character.isDigit(value)) {
                     buffer.append(value);
                     ++num;
                     value = __input._getValue(num);
                 }
-                
+
                 try {
                     min = Integer.parseInt(buffer.toString());
                 } catch(NumberFormatException e) {
@@ -1160,24 +1160,24 @@
                                                         "Unexpected number format exception.  Please report this bug." +
                                                         "NumberFormatException message: " + e.getMessage());
                 }
-                
+
                 value = __input._getValue(pos);
                 if(value == ',')
                     ++pos;
                 else
                     pos = __input._getOffset();
-                
+
                 num = pos;
                 buffer = new StringBuffer(10);
-                
+
                 value = __input._getValue(num);
-                
+
                 while(Character.isDigit(value)){
                     buffer.append(value);
                     ++num;
                     value = __input._getValue(num);
                 }
-                
+
                 try {
                     if(num != pos)
                         max = Integer.parseInt(buffer.toString());
@@ -1186,34 +1186,34 @@
                                                         "Unexpected number format exception.  Please report this bug." +
                                                         "NumberFormatException message: " + e.getMessage());
                 }
-                
+
                 //System.err.println("min: " + min + " max: " + max); //debug
-                
+
                 if(max == 0 && __input._getValue(pos) != '0')
                     max = Character.MAX_VALUE;
                 __input._setOffset(next);
                 __getNextChar();
-                
+
                 //System.err.println("min: " + min + " max: " + max); //debug
-                
+
                 nestCheck = true;
                 handleRepetition = true;
             }
         }
-        
+
         if(!nestCheck) {
             handleRepetition = false;
-            
+
             if(!__isSimpleRepetitionOp(operator)) {
                 retFlags[0] = flags[0];
                 return offset;
             }
-            
+
             __getNextChar();
-            
+
             retFlags[0] = ((operator != '+') ?
                            (__WORSTCASE | __SPSTART) : (__WORSTCASE | __NONNULL));
-            
+
             if(operator == '*' && ((flags[0] & __SIMPLE) != 0)) {
                 __programInsertOperator(OpCode._STAR, offset);
                 __cost+=4;
@@ -1232,9 +1232,9 @@
                 handleRepetition = true;
             }
         }
-        
+
         if(handleRepetition) {
-            
+
             // handle repetition
             if((flags[0] & __SIMPLE) != 0){
                 __cost+= ((2 + __cost) / 2);
@@ -1245,52 +1245,52 @@
                 __programInsertOperator(OpCode._CURLYX, offset);
                 __programAddTail(offset, __emitNode(OpCode._NOTHING));
             }
-            
+
             if(min > 0)
                 retFlags[0] = (__WORSTCASE | __NONNULL);
-            
+
             if(max != 0 && max < min)
                 throw new MalformedPatternException(
                                                     "Invalid interval {" + min + "," + max + "}");
-            
+
             if(__program!= null) {
                 __program[offset + 2] = (char)min;
                 __program[offset + 3] = (char)max;
             }
         }
-        
-        
+
+
         if(__input._getValue() == '?') {
             __getNextChar();
             __programInsertOperator(OpCode._MINMOD, offset);
             __programAddTail(offset, offset + 2);
         }
-        
+
         if(__isComplexRepetitionOp(__input._array, __input._getOffset()))
             throw new MalformedPatternException(
                                                 "Nested repetitions *?+ in expression");
-        
+
         return offset;
     }
-    
-    
+
+
     private int __parseExpression(boolean isParenthesized, int[] hintFlags)
         throws MalformedPatternException {
         char value, paren;
         int nodeOffset = OpCode._NULL_OFFSET, parenthesisNum = 0, br, ender;
         int[] flags = { 0 };
         String modifiers = "iogmsx";
-        
-        
+
+
         // Initially we assume expression doesn't match null string.
         hintFlags[0] = __NONNULL;
-        
+
         if (isParenthesized) {
             paren = 1;
             if(__input._getValue() == '?') {
                 __input._increment();
                 paren = value = __input._postIncrement();
-                
+
                 switch(value) {
                 case ':' :
                 case '=' :
@@ -1325,39 +1325,39 @@
                 ++__numParentheses;
                 nodeOffset = __emitArgNode(OpCode._OPEN, (char)parenthesisNum);
             }
-        } else 
+        } else
             paren = 0;
-        
+
         br = __parseAlternation(flags);
-        
+
         if(br == OpCode._NULL_OFFSET)
             return OpCode._NULL_OFFSET;
-        
+
         if(nodeOffset != OpCode._NULL_OFFSET)
             __programAddTail(nodeOffset, br);
         else
             nodeOffset = br;
-        
+
         if((flags[0] & __NONNULL) == 0)
             hintFlags[0] &= ~__NONNULL;
-        
+
         hintFlags[0] |= (flags[0] & __SPSTART);
-        
+
         while(__input._getValue() == '|') {
             __getNextChar();
             br = __parseAlternation(flags);
-            
+
             if(br == OpCode._NULL_OFFSET)
                 return OpCode._NULL_OFFSET;
-            
+
             __programAddTail(nodeOffset, br);
-            
+
             if((flags[0] & __NONNULL) == 0)
                 hintFlags[0] &= ~__NONNULL;
-            
+
             hintFlags[0] |= (flags[0] & __SPSTART);
         }
-        
+
         switch(paren) {
         case ':' :
             ender = __emitNode(OpCode._NOTHING);
@@ -1375,13 +1375,13 @@
             ender = __emitNode(OpCode._END);
             break;
         }
-        
+
         __programAddTail(nodeOffset, ender);
-        
+
         for(br = nodeOffset; br != OpCode._NULL_OFFSET;
             br = OpCode._getNext(__program, br))
             __programAddOperatorTail(br, ender);
-        
+
         if(paren == '=') {
             __programInsertOperator(OpCode._IFMATCH, nodeOffset);
             __programAddTail(nodeOffset, __emitNode(OpCode._NOTHING));
@@ -1389,10 +1389,10 @@
             __programInsertOperator(OpCode._UNLESSM, nodeOffset);
             __programAddTail(nodeOffset, __emitNode(OpCode._NOTHING));
         }
-        
+
         if(paren != 0 && (__input._isAtEnd() || __getNextChar() != ')')) {
             throw new MalformedPatternException("Unmatched parentheses.");
-        } else if(paren == 0 && !__input._isAtEnd()) { 
+        } else if(paren == 0 && !__input._isAtEnd()) {
             if(__input._getValue() == ')')
                 throw new MalformedPatternException("Unmatched parentheses.");
             else
@@ -1400,12 +1400,12 @@
                 throw new MalformedPatternException(
                                                     "Unreached characters at end of expression.  Please report this bug!");
         }
-        
-        
+
+
         return nodeOffset;
     }
-    
-    
+
+
     /**
      * Compiles a Perl5 regular expression into a Perl5Pattern instance that
      * can be used by a Perl5Matcher object to perform pattern matching.
@@ -1438,16 +1438,16 @@
         int caseInsensitive, scan;
         Perl5Pattern regexp;
         String mustString, startString;
-        
+
         int first;
         boolean sawOpen = false, sawPlus = false;
-        
+
         StringBuffer lastLongest, longest;
         int length, minLength = 0, curBack, back, backmost;
-        
-        
+
+
         __input = new CharStringPointer(pattern);
-        
+
         caseInsensitive    = options & __CASE_INSENSITIVE;
         __modifierFlags[0] = (char)options;
         __sawBackreference = false;
@@ -1455,43 +1455,43 @@
         __programSize      = 0;
         __cost             = 0;
         __program= null;
-        
+
         __emitCode((char)0);
         if(__parseExpression(false, flags) == OpCode._NULL_OFFSET) {
             //System.err.println("null -- Size: " + __programSize); // debug
             // return null;
             throw new MalformedPatternException("Unknown compilation error.");
         }
-        
+
         //System.err.println("First Pass Size: " + __programSize); //debug
-        
+
         if(__programSize >= Character.MAX_VALUE - 1)
             throw new MalformedPatternException("Expression is too large.");
-        
-        
+
+
         __program= new char[__programSize];
         regexp = new Perl5Pattern();
-        
+
         regexp._program    = __program;
         regexp._expression = new String(pattern);
-        
+
         __input._setOffset(0);
-        
+
         __numParentheses   = 1;
         __programSize      = 0;
         __cost             = 0;
-        
+
         __emitCode((char)0);
         if(__parseExpression(false, flags) == OpCode._NULL_OFFSET) {
-            //System.err.println("null -- Size: " + __programSize); //debug 
+            //System.err.println("null -- Size: " + __programSize); //debug
             //return null;
             throw new MalformedPatternException("Unknown compilation error.");
         }
-        
+
         //System.err.println("Second Pass Size: " + __programSize); //debug
-        
+
         caseInsensitive = __modifierFlags[0] & __CASE_INSENSITIVE;
-        
+
         regexp._isExpensive      = (__cost >= 10);
         regexp._startClassOffset = OpCode._NULL_OFFSET;
         regexp._anchor           = 0;
@@ -1501,41 +1501,41 @@
         regexp._mustString       = null;
         mustString               = null;
         startString              = null;
-        
+
         scan = 1;
         if(__program[OpCode._getNext(__program, scan)] == OpCode._END){
             boolean doItAgain;  // bad variables names!
             char op;
-            
+
             first = scan = OpCode._getNextOperator(scan);
             op = __program[first];
-            
+
             while((op == OpCode._OPEN && (sawOpen = true)) ||
                   (op == OpCode._BRANCH &&
                    __program[OpCode._getNext(__program, first)] != OpCode._BRANCH) ||
                   op == OpCode._PLUS || op == OpCode._MINMOD ||
-                  (OpCode._opType[op] == OpCode._CURLY && 
+                  (OpCode._opType[op] == OpCode._CURLY &&
                    OpCode._getArg1(__program, first) > 0)) {
                 if(op == OpCode._PLUS)
                     sawPlus = true;
                 else
                     first+=OpCode._operandLength[op];
-                
+
                 first = OpCode._getNextOperator(first);
                 op = __program[first];
             }
-            
+
             doItAgain = true;
-            
+
             while(doItAgain) {
                 doItAgain = false;
                 op = __program[first];
-                
+
                 if(op == OpCode._EXACTLY) {
                     startString =
                         new String(__program, OpCode._getOperand(first + 1),
                                    __program[OpCode._getOperand(first)]);
-                    
+
                 } else if(OpCode._isInArray(op, OpCode._opLengthOne, 2))
                     regexp._startClassOffset = first;
                 else if(op == OpCode._BOUND || op == OpCode._NBOUND)
@@ -1546,7 +1546,7 @@
                     doItAgain = true;
                     continue;
                 } else if(op == OpCode._STAR &&
-                          OpCode._opType[__program[OpCode._getNextOperator(first)]] == 
+                          OpCode._opType[__program[OpCode._getNextOperator(first)]] ==
                           OpCode._ANY && (regexp._anchor & Perl5Pattern._OPT_ANCH) != 0)
                     {
                         regexp._anchor = Perl5Pattern._OPT_ANCH | Perl5Pattern._OPT_IMPLICIT;
@@ -1555,11 +1555,11 @@
                         continue;
                     }
             } // end while do it again
-            
+
             if(sawPlus && (!sawOpen || !__sawBackreference))
                 regexp._anchor |= Perl5Pattern._OPT_SKIP;
-            
-            
+
+
             //length = OpCode._getNextOperator(first); //debug
             // System.err.println("first: " + first + "nextoper: " + length);
             //System.err.print("first " + (int)op + " next "); // debug
@@ -1568,7 +1568,7 @@
             //else  //debug
             //System.err.print("out of range"); //debug
             //System.err.println(" offset " + (int)(first - scan)); // debug
-            
+
             lastLongest   = new StringBuffer();
             longest   = new StringBuffer();
             length    = 0;
@@ -1576,9 +1576,9 @@
             curBack   = 0;
             back   = 0;
             backmost   = 0;
-            
+
             while(scan > 0 && (op = __program[scan]) != OpCode._END) {
-                
+
                 if(op == OpCode._BRANCH) {
                     if(__program[OpCode._getNext(__program, scan)] == OpCode._BRANCH) {
                         curBack = -30000;
@@ -1588,25 +1588,25 @@
                         scan = OpCode._getNextOperator(scan);
                     continue;
                 }
-                
+
                 if(op == OpCode._UNLESSM) {
                     curBack = -30000;
                     scan = OpCode._getNext(__program, scan);
                     continue;
                 }
-                
+
                 if(op == OpCode._EXACTLY) {
                     int temp;
-                    
+
                     first = scan;
-                    while(__program[(temp = OpCode._getNext(__program, scan))] == 
+                    while(__program[(temp = OpCode._getNext(__program, scan))] ==
                           OpCode._CLOSE)
                         scan = temp;
-                    
+
                     minLength += __program[OpCode._getOperand(first)];
-                    
+
                     temp = __program[OpCode._getOperand(first)];
-                    
+
                     if(curBack - back == length) {
                         lastLongest.append(new String(__program, OpCode._getOperand(first) + 1,
                                                       temp));
@@ -1626,15 +1626,15 @@
                 } else if(OpCode._isInArray(op, OpCode._opLengthVaries, 0)) {
                     curBack = -30000;
                     length = 0;
-                    
+
                     if(lastLongest.length() > longest.length()) {
                         longest = lastLongest;
                         backmost = back;
                     }
-                    
+
                     lastLongest = new StringBuffer();
-                    
-                    if(op == OpCode._PLUS && 
+
+                    if(op == OpCode._PLUS &&
                        OpCode._isInArray(__program[OpCode._getNextOperator(scan)],
                                          OpCode._opLengthOne, 0))
                         ++minLength;
@@ -1652,10 +1652,10 @@
                     }
                     lastLongest = new StringBuffer();
                 }
-                
+
                 scan = OpCode._getNext(__program, scan);
             } // end while
-            
+
             if(lastLongest.length() +
                ((OpCode._opType[__program[first]] == OpCode._EOL) ? 1 : 0) >
                longest.length()) {
@@ -1663,40 +1663,40 @@
                 backmost = back;
             } else
                 lastLongest = new StringBuffer();
-            
+
             if(longest.length() > 0 && startString == null) {
                 mustString = longest.toString();
                 if(backmost < 0)
                     backmost = -1;
                 regexp._back = backmost;
-                
+
                 /*
-                  
-                  if(longest.length() > 
+
+                  if(longest.length() >
                   (((caseInsensitive & __CASE_INSENSITIVE) != 0 ||
                   OpCode._opType[__program[first]] == OpCode._EOL)
                   ? 1 : 0))
-                */          
+                */
             } else
                 longest = null;
         } // end if
-        
-        
+
+
         regexp._isCaseInsensitive = ((caseInsensitive & __CASE_INSENSITIVE) != 0);
         regexp._numParentheses  = __numParentheses - 1;
         regexp._minLength       = minLength;
-        
+
         if(mustString != null) {
             regexp._mustString = mustString.toCharArray();
             regexp._mustUtility = 100;
         }
-        
+
         if(startString != null)
             regexp._startString = startString.toCharArray();
-        
+
         return regexp;
     }
-    
+
     /**
      * Same as calling <b>compile(pattern, Perl5Compiler.DEFAULT_MASK);</b>
      * <p>
@@ -1710,8 +1710,8 @@
     public Pattern compile(char[] pattern) throws MalformedPatternException {
         return compile(pattern, DEFAULT_MASK);
     }
-    
-    
+
+
     /**
      * Same as calling <b>compile(pattern, Perl5Compiler.DEFAULT_MASK);</b>
      * <p>
@@ -1725,8 +1725,8 @@
     public Pattern compile(String pattern) throws MalformedPatternException {
         return compile(pattern.toCharArray(), DEFAULT_MASK);
     }
-    
-    
+
+
     /**
      * Compiles a Perl5 regular expression into a Perl5Pattern instance that
      * can be used by a Perl5Matcher object to perform pattern matching.
@@ -1757,6 +1757,6 @@
         throws MalformedPatternException {
         return compile(pattern.toCharArray(), options);
     }
-    
+
 }
 



1.3       +27 -27    e/src/jsrc/org/apache/oro/text/regex/Perl5Debug.java

Index: Perl5Debug.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/Perl5Debug.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Perl5Debug.java	2001/03/11 04:32:58	1.2
+++ Perl5Debug.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,7 +53,7 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
@@ -66,20 +66,20 @@
  * not in terms of actual data structures.  The Perl5Debug class allows
  * the bytecode program contained by a Perl5Pattern to be printed out for
  * comparison with the program generated by Perl5 with the -r option.
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: Perl5Debug.java,v 1.2 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: Perl5Debug.java,v 1.3 2001/09/06 09:55:41 markm Exp $
+
  * @see Perl5Pattern
  */
 public final class Perl5Debug {
-    
+
     /**
      * A dummy constructor to prevent instantiation of Perl5Debug.
      */
     private Perl5Debug() { }
-    
-    
+
+
     /**
      * This method prints to a String the bytecode program contained in a
      * Perl5Pattern._  The program byte codes are identical to those
@@ -96,35 +96,35 @@
      * @return A string representation of the bytecode program defining the
      *         regular expression.
      */
-    
-    
+
+
     public static String printProgram(Perl5Pattern regexp) {
         StringBuffer buffer;
         char operator = OpCode._OPEN, prog[];
         int offset, next;
-        
+
         prog = regexp._program;
         offset = 1;
         buffer = new StringBuffer();
-        
+
         while(operator != OpCode._END) {
             operator = prog[offset];
             buffer.append(offset);
             _printOperator(prog, offset, buffer);
-            
+
             next = OpCode._getNext(prog, offset);
             offset+=OpCode._operandLength[operator];
-            
+
             buffer.append("(" + next + ")");
-            
+
             offset+=2;
-            
+
             if(operator == OpCode._ANYOF) {
                 offset += 16;
             } else if(operator == OpCode._EXACTLY) {
                 ++offset;
                 buffer.append(" <");
-                
+
                 //while(prog[offset] != '0')
                 while(prog[offset] != CharStringPointer._END_OF_STRING) {
                     //while(prog[offset] != 0 &&
@@ -135,10 +135,10 @@
                 buffer.append(">");
                 ++offset;
             }
-            
+
             buffer.append('\n');
         }
-        
+
         // Can print some other stuff here.
         if(regexp._startString != null)
             buffer.append("start `" + new String(regexp._startString) + "' ");
@@ -157,16 +157,16 @@
             buffer.append("must have \""+ new String(regexp._mustString) +
                           "\" back " + regexp._back + " ");
         buffer.append("minlen " + regexp._minLength + '\n');
-        
+
         return buffer.toString();
     }
-    
-    
+
+
     static void _printOperator(char[] program, int offset, StringBuffer buffer) {
         String str = null;
-        
+
         buffer.append(":");
-        
+
         switch(program[offset]) {
         case OpCode._BOL   : str = "BOL"; break;
         case OpCode._MBOL  : str = "MBOL"; break;
@@ -236,7 +236,7 @@
             buffer.append("Operator is unrecognized.  Faulty expression code!");
             break;
         }
-        
+
         if(str != null)
             buffer.append(str);
     }



1.3       +30 -30    e/src/jsrc/org/apache/oro/text/regex/Perl5MatchResult.java

Index: Perl5MatchResult.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/Perl5MatchResult.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Perl5MatchResult.java	2001/03/11 04:32:58	1.2
+++ Perl5MatchResult.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,16 +53,16 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
 /**
  * A class used to store and access the results of a Perl5Pattern match.
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: Perl5MatchResult.java,v 1.2 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: Perl5MatchResult.java,v 1.3 2001/09/06 09:55:41 markm Exp $
+
  * @see PatternMatcher
  * @see Perl5Matcher
  */
@@ -76,11 +76,11 @@
      * text stream.
      */
     int _matchBeginOffset;
-    
-    
+
+
     /**
      * Arrays containing the beginning and end offsets of the pattern
-     * groups matched within the actual matched pattern contained in the 
+     * groups matched within the actual matched pattern contained in the
      * variable <code>match</code>.
      * Pattern matching methods that do not match subgroups, will only contain
      * entries for group 0, which always refers to the entire pattern.
@@ -94,14 +94,14 @@
      * begin and end offsets.
      */
     int[] _beginGroupOffset, _endGroupOffset;
-    
-    
+
+
     /**
      * The entire string that matched the pattern.
      */
     String _match;
-    
-    
+
+
     /**
      * Constructs a MatchResult able to store match information for
      * a number of subpattern groups.
@@ -115,16 +115,16 @@
         _beginGroupOffset = new int[groups];
         _endGroupOffset   = new int[groups];
     }
-    
-    
+
+
     /**
      * @return The length of the match.
      */
     public int length(){
         return _match.length();
     }
-    
-    
+
+
     /**
      * @return The number of groups contained in the result.  This number
      *         includes the 0th group.  In other words, the result refers
@@ -134,7 +134,7 @@
     public int groups(){
         return _beginGroupOffset.length;
     }
-    
+
     /**
      * @param group The pattern subgroup to return.
      * @return A string containing the indicated pattern subgroup.  Group
@@ -145,12 +145,12 @@
      */
     public String group(int group){
         int begin, end, length;
-        
+
         if(group < _beginGroupOffset.length){
             begin  = _beginGroupOffset[group];
             end    = _endGroupOffset[group];
             length = _match.length();
-            
+
             if(begin >= 0 && end >= 0) {
                 if(begin < length && end <= length && end > begin)
                     return _match.substring(begin, end);
@@ -158,10 +158,10 @@
                     return "";
             }
         }
-        
+
         return null;
     }
-    
+
     /**
      * @param group The pattern subgroup.
      * @return The offset into group 0 of the first token in the indicated
@@ -178,10 +178,10 @@
                 //return _beginGroupOffset[group];
                 return begin;
         }
-        
+
         return -1;
     }
-    
+
     /**
      * @param group The pattern subgroup.
      * @return Returns one plus the offset into group 0 of the last token in
@@ -201,7 +201,7 @@
         }
         return -1;
     }
-    
+
     /**
      * Returns an offset marking the beginning of the pattern match
      * relative to the beginning of the input.
@@ -223,9 +223,9 @@
         }
         return -1;
     }
-    
+
     /**
-     * Returns an offset marking the end of the pattern match 
+     * Returns an offset marking the end of the pattern match
      * relative to the beginning of the input.
      * <p>
      * @param group The pattern subgroup.
@@ -246,8 +246,8 @@
         }
         return -1;
     }
-    
-    
+
+
     /**
      * The same as group(0).
      *



1.4       +320 -320  e/src/jsrc/org/apache/oro/text/regex/Perl5Matcher.java

Index: Perl5Matcher.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/Perl5Matcher.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Perl5Matcher.java	2001/03/11 04:32:58	1.3
+++ Perl5Matcher.java	2001/09/06 09:55:41	1.4
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,43 +53,43 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
-import java.util.*;
+import java.util.Stack;
 
 /**
  * The Perl5Matcher class is used to match regular expressions
  * (conforming to the Perl5 regular expression syntax) generated by
  * Perl5Compiler.
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: Perl5Matcher.java,v 1.3 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: Perl5Matcher.java,v 1.4 2001/09/06 09:55:41 markm Exp $
+
  * @see PatternMatcher
  * @see Perl5Compiler
  */
 public final class Perl5Matcher implements PatternMatcher {
     private static final char __EOS = Character.MAX_VALUE;
     private static final int __INITIAL_NUM_OFFSETS = 20;
-    
+
     private boolean __multiline = false, __lastSuccess = false;
     private char __previousChar, __input[], __originalInput[];
     private Perl5Repetition __currentRep;
     private int __numParentheses, __bol, __eol, __currentOffset, __endOffset;
-    
+
     private char[] __program;
     private int __expSize, __inputOffset, __lastParen;
     private int[] __beginMatchOffsets, __endMatchOffsets;
     private Stack __stack = new Stack();
     private Perl5MatchResult __lastMatchResult = null;
-    
+
     private static boolean
         __compare(char[] s1, int s1Offs, char[] s2, int s2Offs, int n)
     {
         int cnt;
-        
+
         for(cnt = 0; cnt < n; cnt++, s1Offs++, s2Offs++) {
             if(s1Offs >= s1.length)
                 return false;
@@ -98,96 +98,96 @@
             if(s1[s1Offs] != s2[s2Offs])
                 return false;
         }
-        
+
         return true;
     }
-    
+
     private static int __findFirst(char[] input, int current, int endOffset,
                                    char[] mustString)
     {
         int count, saveCurrent;
         char ch;
-        
-        
+
+
         if(input.length == 0)
             return endOffset;
-        
+
         ch = mustString[0];
         // Find the offset of the first character of the must string
         while(current < endOffset) {
             if(ch == input[current]){
                 saveCurrent = current;
                 count = 0;
-                
+
                 while(current < endOffset && count < mustString.length) {
                     if(mustString[count] != input[current])
                         break;
                     ++count;
                     ++current;
                 }
-                
+
                 current = saveCurrent;
-                
+
                 if(count >= mustString.length)
                     break;
             }
             ++current;
         }
-        
+
         return current;
     }
-    
-    
+
+
     private void __pushState(int parenFloor) {
         int[] state;
         int stateEntries, paren;
-        
+
         stateEntries = 3*(__expSize - parenFloor);
         if(stateEntries <= 0)
             state = new int[3];
         else
             state = new int[stateEntries + 3];
-        
+
         state[0] = __expSize;
         state[1] = __lastParen;
         state[2] = __inputOffset;
-        
+
         for(paren = __expSize; paren > parenFloor; paren-=3, stateEntries-=3) {
             state[stateEntries]     = __endMatchOffsets[paren];
             state[stateEntries + 1] = __beginMatchOffsets[paren];
             state[stateEntries + 2] = paren;
         }
-        
+
         __stack.push(state);
     }
-    
-    
+
+
     private void __popState() {
         int[] state;
         int entry, paren;
-        
+
         state = (int[])__stack.pop();
-        
+
         __expSize     = state[0];
         __lastParen   = state[1];
         __inputOffset = state[2];
-        
+
         for(entry = 3; entry < state.length; entry+=3) {
             paren = state[entry + 2];
             __beginMatchOffsets[paren] = state[entry + 1];
-            
+
             if(paren <= __lastParen)
                 __endMatchOffsets[paren] = state[entry];
         }
-        
+
         for(paren = __lastParen + 1; paren <= __numParentheses; paren++) {
             if(paren > __expSize)
                 __beginMatchOffsets[paren] = OpCode._NULL_OFFSET;
             __endMatchOffsets[paren] = OpCode._NULL_OFFSET;
         }
     }
-    
-    
+
+
     // Initialize globals needed before calling __tryExpression for first time
     private void __initInterpreterGlobals(Perl5Pattern expression, char[] input,
                                           int beginOffset, int endOffset) {
@@ -198,7 +198,7 @@
         __currentRep._lastRepetition = null;
         __program                    = expression._program;
         __stack.setSize(0);
-        
+
         if(beginOffset == 0)
             __previousChar = '\n';
         else {
@@ -206,70 +206,70 @@
             if(!__multiline && __previousChar == '\n')
                 __previousChar = '\0';
         }
-        
+
         __numParentheses    = expression._numParentheses;
         __currentOffset     = beginOffset;
-        
+
         __bol = beginOffset;
         __eol = endOffset;
-        
+
         // Ok, here we're using endOffset as a temporary variable.
         endOffset = __numParentheses + 1;
         if(__beginMatchOffsets == null || endOffset > __beginMatchOffsets.length) {
             if(endOffset < __INITIAL_NUM_OFFSETS)
                 endOffset = __INITIAL_NUM_OFFSETS;
             __beginMatchOffsets = new int[endOffset];
-            __endMatchOffsets   = new int[endOffset];      
+            __endMatchOffsets   = new int[endOffset];
         }
     }
-    
+
     // Set the match result information.  Only call this if we successfully
     // matched.
     private void __setLastMatchResult() {
         int offs;
-        
+
         //endOffset+=dontTry;
-        
+
         __lastMatchResult = new Perl5MatchResult(__numParentheses + 1);
-        
+
         // This can happen when using Perl5StreamInput
         if(__endMatchOffsets[0] > __originalInput.length)
             throw new ArrayIndexOutOfBoundsException();
-        
+
         __lastMatchResult._match =
             new String(__originalInput, __beginMatchOffsets[0],
                        __endMatchOffsets[0] - __beginMatchOffsets[0]);
-        
+
         __lastMatchResult._matchBeginOffset = __beginMatchOffsets[0];
-        
+
         while(__numParentheses >= 0) {
             offs = __beginMatchOffsets[__numParentheses];
-            
+
             if(offs >= 0)
                 __lastMatchResult._beginGroupOffset[__numParentheses]
                     = offs - __lastMatchResult._matchBeginOffset;
             else
                 __lastMatchResult._beginGroupOffset[__numParentheses] =
                     OpCode._NULL_OFFSET;
-            
+
             offs = __endMatchOffsets[__numParentheses];
-            
+
             if(offs >= 0)
                 __lastMatchResult._endGroupOffset[__numParentheses]
                     = offs - __lastMatchResult._matchBeginOffset;
             else
                 __lastMatchResult._endGroupOffset[__numParentheses] =
                     OpCode._NULL_OFFSET;
-            
+
             --__numParentheses;
         }
-        
+
         // Free up for garbage collection
         __originalInput = null;
     }
-    
-    
-    
+
+
+
     // Expects to receive a valid regular expression program.  No checking
     // is done to ensure validity.
     // __originalInput must be set before calling this method for
@@ -280,22 +280,22 @@
         boolean success;
         int minLength = 0, dontTry = 0, offset;
         char ch, mustString[];
-        
+
         __initInterpreterGlobals(expression, input, beginOffset, endOffset);
-        
+
         success = false;
         mustString = expression._mustString;
-        
+
     _mainLoop:
         while(true) {
-            
+
             if(mustString != null &&
                ((expression._anchor & Perl5Pattern._OPT_ANCH) == 0 ||
                 (__multiline && expression._back >= 0))) {
-                
+
                 __currentOffset =
                     __findFirst(__input, __currentOffset, endOffset, mustString);
-                
+
                 if(__currentOffset >= endOffset) {
                     if((expression._options & Perl5Compiler.READ_ONLY_MASK) == 0)
                         expression._mustUtility++;
@@ -319,21 +319,21 @@
                     minLength = mustString.length;
                 }
             }
-            
+
             if((expression._anchor & Perl5Pattern._OPT_ANCH) != 0) {
                 if(__tryExpression(expression, beginOffset)) {
                     success = true;
                     break _mainLoop;
                 } else if(__multiline ||
                           (expression._anchor & Perl5Pattern._OPT_IMPLICIT) != 0) {
-                    
+
                     if(minLength > 0)
                         dontTry = minLength - 1;
                     endOffset-=dontTry;
-                    
+
                     if(__currentOffset > beginOffset)
                         --__currentOffset;
-                    
+
                     while(__currentOffset < endOffset) {
                         if(__input[__currentOffset++] == '\n') {
                             if(__currentOffset < endOffset &&
@@ -344,16 +344,16 @@
                         }
                     }
                 }
-                
+
                 break _mainLoop;
             }
-            
-            
+
+
             if(expression._startString != null) {
                 mustString = expression._startString;
                 if((expression._anchor & Perl5Pattern._OPT_SKIP) != 0) {
                     ch = mustString[0];
-                    
+
                     while(__currentOffset < endOffset) {
                         if(ch == __input[__currentOffset]) {
                             if(__tryExpression(expression, __currentOffset)){
@@ -368,7 +368,7 @@
                         ++__currentOffset;
                     }
                 } else {
-                    
+
                     while((__currentOffset =
                            __findFirst(__input, __currentOffset, endOffset, mustString))
                           < endOffset){
@@ -379,26 +379,26 @@
                         ++__currentOffset;
                     }
                 }
-                
+
                 break _mainLoop;
             }
-            
+
             if((offset = expression._startClassOffset) != OpCode._NULL_OFFSET) {
                 boolean doEvery, tmp;
-                
+
                 doEvery = ((expression._anchor & Perl5Pattern._OPT_SKIP) == 0);
-                
+
                 if(minLength > 0)
                     dontTry = minLength - 1;
                 endOffset -= dontTry;
                 tmp = true;
-                
+
                 switch(__program[offset]) {
                 case OpCode._ANYOF:
                     offset = OpCode._getOperand(offset);
                     while(__currentOffset < endOffset) {
                         ch = __input[__currentOffset];
-                        
+
                         if(ch < 256 &&
                            (__program[offset + (ch >> 4)] & (1 << (ch & 0xf))) == 0) {
                             if(tmp && __tryExpression(expression, __currentOffset)) {
@@ -410,21 +410,21 @@
                             tmp = true;
                         ++__currentOffset;
                     }
-                    
+
                     break;
-                    
+
                 case OpCode._BOUND:
                     if(minLength > 0) {
                         ++dontTry;
                         --endOffset;
                     }
-                    
+
                     if(__currentOffset != beginOffset) {
                         ch = __input[__currentOffset - 1];
                         tmp = OpCode._isWordCharacter(ch);
                     } else
                         tmp = OpCode._isWordCharacter(__previousChar);
-                    
+
                     while(__currentOffset < endOffset) {
                         ch = __input[__currentOffset];
                         if(tmp != OpCode._isWordCharacter(ch)){
@@ -436,26 +436,26 @@
                         }
                         ++__currentOffset;
                     }
-                    
-                    if((minLength > 0 || tmp) && 
+
+                    if((minLength > 0 || tmp) &&
                        __tryExpression(expression, __currentOffset)) {
                         success = true;
                         break _mainLoop;
                     }
                     break;
-                    
+
                 case OpCode._NBOUND:
                     if(minLength > 0) {
                         ++dontTry;
                         --endOffset;
                     }
-                    
+
                     if(__currentOffset != beginOffset) {
                         ch = __input[__currentOffset - 1];
                         tmp = OpCode._isWordCharacter(ch);
                     } else
                         tmp = OpCode._isWordCharacter(__previousChar);
-                    
+
                     while(__currentOffset < endOffset) {
                         ch = __input[__currentOffset];
                         if(tmp != OpCode._isWordCharacter(ch))
@@ -464,17 +464,17 @@
                             success = true;
                             break _mainLoop;
                         }
-                        
+
                         ++__currentOffset;
                     }
-                    
+
                     if((minLength > 0 || !tmp) &&
                        __tryExpression(expression, __currentOffset)) {
                         success = true;
                         break _mainLoop;
                     }
                     break;
-                    
+
                 case OpCode._ALNUM:
                     while(__currentOffset < endOffset) {
                         ch = __input[__currentOffset];
@@ -489,7 +489,7 @@
                         ++__currentOffset;
                     }
                     break;
-                    
+
                 case OpCode._NALNUM:
                     while(__currentOffset < endOffset) {
                         ch = __input[__currentOffset];
@@ -504,7 +504,7 @@
                         ++__currentOffset;
                     }
                     break;
-                    
+
                 case OpCode._SPACE:
                     while(__currentOffset < endOffset) {
                         if(Character.isWhitespace(__input[__currentOffset])) {
@@ -518,7 +518,7 @@
                         ++__currentOffset;
                     }
                     break;
-                    
+
                 case OpCode._NSPACE:
                     while(__currentOffset < endOffset) {
                         if(!Character.isWhitespace(__input[__currentOffset])) {
@@ -532,7 +532,7 @@
                         ++__currentOffset;
                     }
                     break;
-                    
+
                 case OpCode._DIGIT:
                     while(__currentOffset < endOffset) {
                         if(Character.isDigit(__input[__currentOffset])) {
@@ -546,8 +546,8 @@
                         ++__currentOffset;
                     }
                     break;
-                    
-                    
+
+
                 case OpCode._NDIGIT:
                     while(__currentOffset < endOffset) {
                         if(!Character.isDigit(__input[__currentOffset])) {
@@ -562,85 +562,85 @@
                     }
                     break;
                 } // end switch
-                
+
             } else {
                 if(minLength > 0)
                     dontTry = minLength - 1;
                 endOffset-=dontTry;
-                
+
                 do {
                     if(__tryExpression(expression, __currentOffset)) {
                         success = true;
                         break _mainLoop;
                     }
                 } while(__currentOffset++ < endOffset);
-                
+
             }
-            
-            
+
+
             break _mainLoop;
         } // end while
-        
+
         __lastSuccess = success;
         __lastMatchResult = null;
-        
+
         return success;
     }
-    
-    
+
+
     private boolean __tryExpression(Perl5Pattern expression, int offset) {
         int count;
-        
+
         __inputOffset = offset;
         __lastParen   = 0;
         __expSize     = 0;
-        
+
         if(__numParentheses > 0) {
             for(count=0; count <= __numParentheses; count++) {
                 __beginMatchOffsets[count] = OpCode._NULL_OFFSET;
                 __endMatchOffsets[count]   = OpCode._NULL_OFFSET;
             }
         }
-        
+
         if(__match(1)){
             __beginMatchOffsets[0] = offset;
             __endMatchOffsets[0]   = __inputOffset;
             return true;
         }
-        
+
         return false;
     }
-    
-    
+
+
     private int __repeat(int offset, int max) {
         int scan, eol, operand, ret;
         char ch;
-        
+
         scan = __inputOffset;
         eol  = __eol;
-        
+
         if(max != Character.MAX_VALUE && max < eol - scan)
             eol = scan + max;
-        
+
         operand = OpCode._getOperand(offset);
-        
+
         switch(__program[offset]) {
-            
+
         case OpCode._ANY:
             while(scan < eol && __input[scan] != '\n')
                 ++scan;
             break;
-            
+
         case OpCode._SANY:
             scan = eol;
             break;
-            
+
         case OpCode._EXACTLY:
             ++operand;
             while(scan < eol && __program[operand] == __input[scan])
                 ++scan;
             break;
-            
+
         case OpCode._ANYOF:
             if(scan < eol && (ch = __input[scan]) < 256) {
                 while((__program[operand + (ch >> 4)] & (1 << (ch & 0xf))) == 0) {
@@ -651,158 +651,158 @@
                 }
             }
             break;
-            
+
         case OpCode._ALNUM:
             while(scan < eol && OpCode._isWordCharacter(__input[scan]))
                 ++scan;
             break;
-            
+
         case OpCode._NALNUM:
             while(scan < eol && !OpCode._isWordCharacter(__input[scan]))
                 ++scan;
             break;
-            
+
         case OpCode._SPACE:
             while(scan < eol && Character.isWhitespace(__input[scan]))
                 ++scan;
             break;
-            
+
         case OpCode._NSPACE:
             while(scan < eol && !Character.isWhitespace(__input[scan]))
                 ++scan;
             break;
-            
+
         case OpCode._DIGIT:
             while(scan < eol && Character.isDigit(__input[scan]))
                 ++scan;
             break;
-            
+
         case OpCode._NDIGIT:
             while(scan < eol && !Character.isDigit(__input[scan]))
                 ++scan;
             break;
-            
+
         default:
             break;
-            
+
         }
-        
+
         ret = scan - __inputOffset;
         __inputOffset = scan;
-        
+
         return ret;
     }
-    
-    
+
+
     private boolean __match(int offset) {
         char nextChar, op;
         int scan, next, input, maxScan, current, line, arg;
         boolean inputRemains = true, minMod = false;
         Perl5Repetition rep;
-        
-        
+
+
         input    = __inputOffset;
         inputRemains = (input < __endOffset);
         nextChar = (inputRemains ? __input[input] : __EOS);
-        
+
         scan     = offset;
         maxScan  = __program.length;
-        
+
         while(scan < maxScan /*&& scan > 0*/){
             next = OpCode._getNext(__program, scan);
-            
+
             switch(op = __program[scan]) {
-                
+
             case OpCode._BOL:
                 if(input == __bol ? __previousChar == '\n' :
-                   (__multiline && (inputRemains || input < __eol) && 
+                   (__multiline && (inputRemains || input < __eol) &&
                     __input[input - 1] == '\n'))
                     break;
                 return false;
-                
+
             case OpCode._MBOL:
                 if(input == __bol ? __previousChar == '\n' :
                    ((inputRemains || input < __eol) && __input[input - 1] == '\n'))
                     break;
                 return false;
-                
+
             case OpCode._SBOL:
                 if(input == __bol && __previousChar == '\n')
                     break;
                 return false;
-                
+
             case OpCode._GBOL:
                 if(input == __bol)
                     break;
                 return true;
-                
+
             case OpCode._EOL :
                 if((inputRemains || input < __eol) && nextChar != '\n')
                     return false;
                 if(!__multiline && __eol - input > 1)
                     return false;
                 break;
-                
+
             case OpCode._MEOL:
                 if((inputRemains || input < __eol) && nextChar != '\n')
                     return false;
                 break;
-                
+
             case OpCode._SEOL:
                 if((inputRemains || input < __eol) && nextChar != '\n')
                     return false;
                 if(__eol - input > 1)
                     return false;
                 break;
-                
+
             case OpCode._SANY:
                 if(!inputRemains && input >= __eol)
                     return false;
                 inputRemains = (++input < __endOffset);
                 nextChar = (inputRemains ? __input[input] : __EOS);
                 break;
-                
+
             case OpCode._ANY:
                 if((!inputRemains && input >= __eol) || nextChar == '\n')
                     return false;
                 inputRemains = (++input < __endOffset);
                 nextChar = (inputRemains ? __input[input] : __EOS);
                 break;
-                
+
             case OpCode._EXACTLY:
                 current = OpCode._getOperand(scan);
                 line = __program[current++];
-                
+
                 if(__program[current] != nextChar)
                     return false;
                 if(__eol - input < line)
                     return false;
-                
+
                 if(line > 1 && !__compare(__program, current, __input, input, line))
                     return false;
-                
+
                 input+=line;
                 inputRemains = (input < __endOffset);
                 nextChar = (inputRemains ? __input[input] : __EOS);
                 break;
-                
+
             case OpCode._ANYOF:
                 current = OpCode._getOperand(scan);
-                
+
                 if(nextChar == __EOS && inputRemains)
                     nextChar = __input[input];
-                
+
                 if(nextChar >= 256 || (__program[current + (nextChar >> 4)] &
                                        (1 << (nextChar & 0xf))) != 0)
                     return false;
-                
+
                 if(!inputRemains && input >= __eol)
                     return false;
-                
+
                 inputRemains = (++input < __endOffset);
                 nextChar = (inputRemains ? __input[input] : __EOS);
                 break;
-                
+
             case OpCode._ALNUM:
                 if(!inputRemains)
                     return false;
@@ -811,7 +811,7 @@
                 inputRemains = (++input < __endOffset);
                 nextChar = (inputRemains ? __input[input] : __EOS);
                 break;
-                
+
             case OpCode._NALNUM:
                 if(!inputRemains && input >= __eol)
                     return false;
@@ -820,23 +820,23 @@
                 inputRemains = (++input < __endOffset);
                 nextChar = (inputRemains ? __input[input] : __EOS);
                 break;
-                
-                
+
+
             case OpCode._NBOUND:
             case OpCode._BOUND:
                 boolean a, b;
-                
+
                 if(input == __bol)
                     a = OpCode._isWordCharacter(__previousChar);
                 else
                     a = OpCode._isWordCharacter(__input[input - 1]);
-                
+
                 b = OpCode._isWordCharacter(nextChar);
-                
+
                 if((a == b) == (__program[scan] == OpCode._BOUND))
                     return false;
                 break;
-                
+
             case OpCode._SPACE:
                 if(!inputRemains && input >= __eol)
                     return false;
@@ -845,8 +845,8 @@
                 inputRemains = (++input < __endOffset);
                 nextChar = (inputRemains ? __input[input] : __EOS);
                 break;
-                
-                
+
+
             case OpCode._NSPACE:
                 if(!inputRemains)
                     return false;
@@ -855,14 +855,14 @@
                 inputRemains = (++input < __endOffset);
                 nextChar = (inputRemains ? __input[input] : __EOS);
                 break;
-                
+
             case OpCode._DIGIT:
                 if(!Character.isDigit(nextChar))
                     return false;
                 inputRemains = (++input < __endOffset);
                 nextChar = (inputRemains ? __input[input] : __EOS);
                 break;
-                
+
             case OpCode._NDIGIT:
                 if(!inputRemains && input >= __eol)
                     return false;
@@ -871,63 +871,63 @@
                 inputRemains = (++input < __endOffset);
                 nextChar = (inputRemains ? __input[input] : __EOS);
                 break;
-                
+
             case OpCode._REF:
                 arg = OpCode._getArg1(__program, scan);
                 current = __beginMatchOffsets[arg];
-                
+
                 if(current == OpCode._NULL_OFFSET)
                     return false;
-                
+
                 if(__endMatchOffsets[arg] == OpCode._NULL_OFFSET)
                     return false;
-                
+
                 if(current == __endMatchOffsets[arg])
                     break;
-                
+
                 if(__input[current] != nextChar)
                     return false;
-                
+
                 line = __endMatchOffsets[arg] - current;
-                
+
                 if(input + line > __eol)
                     return false;
-                
+
                 if(line > 1 && !__compare(__input, current, __input, input, line))
                     return false;
-                
+
                 input+=line;
                 inputRemains = (input < __endOffset);
                 nextChar     = (inputRemains ? __input[input] : __EOS);
                 break;
-                
+
             case OpCode._NOTHING:
                 break;
-                
+
             case OpCode._BACK:
                 break;
-                
+
             case OpCode._OPEN:
                 arg = OpCode._getArg1(__program, scan);
                 __beginMatchOffsets[arg] = input;
-                
+
                 if(arg > __expSize)
                     __expSize = arg;
                 break;
-                
+
             case OpCode._CLOSE:
                 arg = OpCode._getArg1(__program, scan);
                 __endMatchOffsets[arg] = input;
-                
+
                 if(arg > __lastParen)
                     __lastParen = arg;
                 break;
-                
+
             case OpCode._CURLYX:
                 rep = new Perl5Repetition();
                 rep._lastRepetition = __currentRep;
                 __currentRep = rep;
-                
+
                 rep._parenFloor = __lastParen;
                 rep._numInstances = -1;
                 rep._min    = OpCode._getArg1(__program, scan);
@@ -940,20 +940,20 @@
                 // not work right.
                 rep._lastLocation = -1;
                 __inputOffset = input;
-                
+
                 // use minMod as temporary
                 minMod = __match(OpCode._getPrevOperator(next));
-                
+
                 // leave scope call not pertinent?
                 __currentRep = rep._lastRepetition;
                 return minMod;
-                
+
             case OpCode._WHILEM:
                 rep = __currentRep;
-                
+
                 arg = rep._numInstances + 1;
                 __inputOffset = input;
-                
+
                 if(input == rep._lastLocation) {
                     __currentRep = rep._lastRepetition;
                     line = __currentRep._numInstances;
@@ -963,7 +963,7 @@
                     __currentRep = rep;
                     return false;
                 }
-                
+
                 if(arg < rep._min) {
                     rep._numInstances = arg;
                     rep._lastLocation = input;
@@ -972,7 +972,7 @@
                     rep._numInstances = arg - 1;
                     return false;
                 }
-                
+
                 if(rep._minMod) {
                     __currentRep = rep._lastRepetition;
                     line = __currentRep._numInstances;
@@ -980,21 +980,21 @@
                         return true;
                     __currentRep._numInstances = line;
                     __currentRep = rep;
-                    
+
                     if(arg >= rep._max)
                         return false;
-                    
+
                     __inputOffset = input;
                     rep._numInstances = arg;
                     rep._lastLocation = input;
-                    
+
                     if(__match(rep._scan))
                         return true;
-                    
+
                     rep._numInstances = arg - 1;
                     return false;
                 }
-                
+
                 if(arg < rep._max) {
                     __pushState(rep._parenFloor);
                     rep._numInstances = arg;
@@ -1004,50 +1004,50 @@
                     __popState();
                     __inputOffset = input;
                 }
-                
+
                 __currentRep = rep._lastRepetition;
                 line = __currentRep._numInstances;
                 if(__match(rep._next))
                     return true;
-                
+
                 rep._numInstances = line;
                 __currentRep = rep;
                 rep._numInstances = arg - 1;
                 return false;
-                
+
             case OpCode._BRANCH:
                 if(__program[next] != OpCode._BRANCH)
                     next = OpCode._getNextOperator(scan);
                 else {
                     int lastParen;
-                    
+
                     lastParen = __lastParen;
-                    
+
                     do {
-                        
+
                         __inputOffset = input;
-                        
+
                         if(__match(OpCode._getNextOperator(scan)))
                             return true;
-                        
+
                         for(arg = __lastParen; arg > lastParen; --arg)
                             //__endMatchOffsets[arg] = 0;
                             __endMatchOffsets[arg] = OpCode._NULL_OFFSET;
                         __lastParen = arg;
-                        
+
                         scan = OpCode._getNext(__program, scan);
                     } while(scan != OpCode._NULL_OFFSET &&
                             __program[scan] == OpCode._BRANCH);
                     return false;
                 }
-                
+
                 break;
-                
+
             case OpCode._MINMOD:
                 minMod = true;
                 break;
-                
-                
+
+
             case OpCode._CURLY:
             case OpCode._STAR:
             case OpCode._PLUS:
@@ -1064,7 +1064,7 @@
                     arg  = Character.MAX_VALUE;
                     scan = OpCode._getNextOperator(scan);
                 }
-                
+
                 if(__program[next] == OpCode._EXACTLY) {
                     nextChar = __program[OpCode._getOperand(next) + 1];
                     current  = 0;
@@ -1073,14 +1073,14 @@
                     current  = -1000;
                 }
                 __inputOffset = input;
-                
+
                 if(minMod) {
                     minMod = false;
-                    
+
                     if(line > 0 && __repeat(scan, line) < line)
                         return false;
-                    
-                    
+
+
                     while(arg >= line || (arg == Character.MAX_VALUE && line > 0)) {
                         // there may be a bug here with respect to
                         // __inputOffset >= __input.length, but it seems to be right for
@@ -1091,23 +1091,23 @@
                             if(__match(next))
                                 return true;
                         }
-                        
+
                         __inputOffset = input + line;
-                        
+
                         if(__repeat(scan, 1) != 0) {
                             ++line;
                             __inputOffset = input + line;
                         } else
                             return false;
                     }
-                    
+
                 } else {
                     arg = __repeat(scan, arg);
-                    
+
                     if(line < arg && OpCode._opType[__program[next]] == OpCode._EOL &&
                        (!__multiline || __program[next] == OpCode._SEOL))
                         line = arg;
-                    
+
                     while(arg >= line) {
                         // there may be a bug here with respect to
                         // __inputOffset >= __input.length, but it seems to be right for
@@ -1118,14 +1118,14 @@
                             if(__match(next))
                                 return true;
                         }
-                        
+
                         --arg;
                         __inputOffset = input + arg;
                     }
                 }
-                
+
                 return false;
-                
+
             case OpCode._SUCCEED:
             case OpCode._END:
                 __inputOffset = input;
@@ -1134,41 +1134,41 @@
                 if(__inputOffset == __lastMatchInputEndOffset)
                     return false;
                 return true;
-                
+
             case OpCode._IFMATCH:
                 __inputOffset = input;
                 scan = OpCode._getNextOperator(scan);
                 if(!__match(scan))
                     return false;
                 break;
-                
+
             case OpCode._UNLESSM:
                 __inputOffset = input;
                 scan = OpCode._getNextOperator(scan);
                 if(__match(scan))
                     return false;
                 break;
-                
-                
+
+
             default:
                 // todo: Need to throw an exception here.
-                
+
             } // end switch
-            
+
             //scan = (next > 0 ? next : 0);
             scan = next;
         } // end while scan
-        
-        
-        
+
+
+
         return false;
     }
-    
-    
+
+
     /**
      * Set whether or not subsequent calls to {@link #matches matches()}
      * or {@link #contains contains()} should treat the input as
-     * consisting of multiple lines.  The default behavior is for 
+     * consisting of multiple lines.  The default behavior is for
      * input to be treated as consisting of multiple lines.  This method
      * should only be called if the Perl5Pattern used for a match was
      * compiled without either of the Perl5Compiler.MULTILINE_MASK or
@@ -1179,21 +1179,21 @@
      * {@link Perl5Compiler} for more details.
      * <p>
      * @param multiline  If set to true treats the input as consisting of
-     *        multiple lines with respect to the <b>^</b> and <b>$</b> 
+     *        multiple lines with respect to the <b>^</b> and <b>$</b>
      *        metacharacters.  If set to false treats the input as consisting
-     *        of a single line with respect to the <b>^</b> and <b>$</b> 
+     *        of a single line with respect to the <b>^</b> and <b>$</b>
      *        metacharacters.
      */
     public void setMultiline(boolean multiline) { __multiline = multiline; }
-    
-    
+
+
     /**
      * @return True if the matcher is treating input as consisting of multiple
      *         lines with respect to the <b>^</b> and <b>$</b> metacharacters,
      *         false otherwise.
      */
     public boolean isMultiline() { return __multiline; }
-    
+
     char[] _toLower(char[] input) {
         int current;
         char[] inp;
@@ -1206,16 +1206,16 @@
         inp = new char[input.length];
         System.arraycopy(input, 0, inp, 0, input.length);
         input = inp;
-        
+
         // todo: Need to inline toLowerCase()
         for(current = 0; current < input.length; current++)
             if(Character.isUpperCase(input[current]))
                 input[current] = Character.toLowerCase(input[current]);
-        
+
         return input;
     }
-    
-    
+
+
     /**
      * Determines if a prefix of a string (represented as a char[])
      * matches a given pattern, starting from a given offset into the string.
@@ -1233,21 +1233,21 @@
      */
     public boolean matchesPrefix(char[] input, Pattern pattern, int offset) {
         Perl5Pattern expression;
-        
+
         expression = (Perl5Pattern)pattern;
         __originalInput = input;
         if(expression._isCaseInsensitive)
             input = _toLower(input);
-        
+
         __initInterpreterGlobals(expression, input, offset, input.length);
-        
+
         __lastSuccess = __tryExpression(expression, offset);
         __lastMatchResult = null;
-        
+
         return __lastSuccess;
     }
-    
-    
+
+
     /**
      * Determines if a prefix of a string (represented as a char[])
      * matches a given pattern.
@@ -1265,8 +1265,8 @@
     public boolean matchesPrefix(char[] input, Pattern pattern) {
         return matchesPrefix(input, pattern, 0);
     }
-    
-    
+
+
     /**
      * Determines if a prefix of a string matches a given pattern.
      * If a prefix of the string matches the pattern, a MatchResult instance
@@ -1283,7 +1283,7 @@
     public boolean matchesPrefix(String input, Pattern pattern) {
         return matchesPrefix(input.toCharArray(), pattern, 0);
     }
-    
+
     /**
      * Determines if a prefix of a PatternMatcherInput instance
      * matches a given pattern.  If there is a match, a MatchResult instance
@@ -1306,9 +1306,9 @@
     public boolean matchesPrefix(PatternMatcherInput input, Pattern pattern) {
         char[] inp;
         Perl5Pattern expression;
-        
+
         expression = (Perl5Pattern)pattern;
-        
+
         __originalInput = input._originalBuffer;
         if(expression._isCaseInsensitive) {
             if(input._toLowerBuffer == null)
@@ -1316,19 +1316,19 @@
             inp = input._toLowerBuffer;
         } else
             inp = __originalInput;
-        
+
         __initInterpreterGlobals(expression, inp, input._currentOffset,
                                  input._endOffset);
         __lastSuccess = __tryExpression(expression, input._currentOffset);
         __lastMatchResult = null;
-        
+
         return __lastSuccess;
     }
-    
-    
-    
+
+
+
     /**
-     * Determines if a string (represented as a char[]) exactly 
+     * Determines if a string (represented as a char[]) exactly
      * matches a given pattern.  If
      * there is an exact match, a MatchResult instance
      * representing the match is made accesible via
@@ -1367,12 +1367,12 @@
      */
     public boolean matches(char[] input, Pattern pattern) {
         Perl5Pattern expression;
-        
+
         expression = (Perl5Pattern)pattern;
         __originalInput = input;
         if(expression._isCaseInsensitive)
             input = _toLower(input);
-        /*    
+        /*
               if(__interpret(expression, input, 0, input.length)) {
               if(__lastMatchResult.beginOffset(0) == 0 &&
               __lastMatchResult.endOffset(0) == input.length)
@@ -1383,11 +1383,11 @@
         __lastSuccess = (__tryExpression(expression, 0) &&
                          __endMatchOffsets[0] == input.length);
         __lastMatchResult = null;
-        
+
         return __lastSuccess;
     }
-    
-    
+
+
     /**
      * Determines if a string exactly matches a given pattern.  If
      * there is an exact match, a MatchResult instance
@@ -1428,8 +1428,8 @@
     public boolean matches(String input, Pattern pattern) {
         return matches(input.toCharArray(), pattern);
     }
-    
-    
+
+
     /**
      * Determines if the contents of a PatternMatcherInput instance
      * exactly matches a given pattern.  If
@@ -1443,7 +1443,7 @@
      * will be tested for an exact match.
      * <p>
      * The pattern must be a Perl5Pattern instance, otherwise a
-     * ClassCastException will be thrown.  You are not required to, and 
+     * ClassCastException will be thrown.  You are not required to, and
      * indeed should NOT try to (for performance reasons), catch a
      * ClassCastException because it will never be thrown as long as you use
      * a Perl5Pattern as the pattern parameter.
@@ -1477,9 +1477,9 @@
     public boolean matches(PatternMatcherInput input, Pattern pattern) {
         char[] inp;
         Perl5Pattern expression;
-        
+
         expression = (Perl5Pattern)pattern;
-        
+
         __originalInput = input._originalBuffer;
         if(expression._isCaseInsensitive) {
             if(input._toLowerBuffer == null)
@@ -1487,19 +1487,19 @@
             inp = input._toLowerBuffer;
         } else
             inp = __originalInput;
-        
+
         /*
           if(__interpret(expression, inp, input._beginOffset,
           input._endOffset)) {
           // debug
-          
+
           //System.err.println("contains: " + getMatch());
-          //System.err.println(__lastMatchResult.beginOffset(0) + "-" + 
+          //System.err.println(__lastMatchResult.beginOffset(0) + "-" +
           //__lastMatchResult.endOffset(0));
-          //System.err.println(input._beginOffset + "-" + 
+          //System.err.println(input._beginOffset + "-" +
           //input._endOffset);
-          
-          if(__lastMatchResult.beginOffset(0) == input._beginOffset && 
+
+          if(__lastMatchResult.beginOffset(0) == input._beginOffset &&
           __lastMatchResult.endOffset(0) == input._endOffset)
           return true;
           // Handle special case.
@@ -1507,12 +1507,12 @@
           return true;
           }
         */
-        
+
         __initInterpreterGlobals(expression, inp, input._beginOffset,
                                  input._endOffset);
-        
+
         __lastMatchResult = null;
-        
+
         if(__tryExpression(expression, input._beginOffset)) {
             if(__endMatchOffsets[0] == input._endOffset ||
                input.length() == 0 || input._beginOffset == input._endOffset) {
@@ -1520,27 +1520,27 @@
                 return true;
             }
         }
-        
+
         __lastSuccess = false;
-        
+
         return false;
     }
-    
-    
-    
+
+
+
     /**
      * Determines if a string contains a pattern.  If the pattern is
      * matched by some substring of the input, a MatchResult instance
-     * representing the <b> first </b> such match is made acessible via 
+     * representing the <b> first </b> such match is made acessible via
      * {@link #getMatch()}.  If you want to access
      * subsequent matches you should either use a PatternMatcherInput object
      * or use the offset information in the MatchResult to create a substring
-     * representing the remaining input.  Using the MatchResult offset 
+     * representing the remaining input.  Using the MatchResult offset
      * information is the recommended method of obtaining the parts of the
      * string preceeding the match and following the match.
      * <p>
      * The pattern must be a Perl5Pattern instance, otherwise a
-     * ClassCastException will be thrown.  You are not required to, and 
+     * ClassCastException will be thrown.  You are not required to, and
      * indeed should NOT try to (for performance reasons), catch a
      * ClassCastException because it will never be thrown as long as you use
      * a Perl5Pattern as the pattern parameter.
@@ -1555,35 +1555,35 @@
         /*
           char[] inp;
           Perl5Pattern expression;
-          
+
           expression = (Perl5Pattern)pattern;
-          
+
           __originalInput = inp = input.toCharArray();
-          
+
           if(expression._isCaseInsensitive)
           //_toLower(inp, false);
           inp = _toLower(inp, false);
-          
+
           return __interpret(expression, inp, 0, inp.length);
         */
         return contains(input.toCharArray(), pattern);
     }
-    
-    
+
+
     /**
      * Determines if a string (represented as a char[]) contains a pattern.
      * If the pattern is
      * matched by some substring of the input, a MatchResult instance
-     * representing the <b> first </b> such match is made acessible via 
+     * representing the <b> first </b> such match is made acessible via
      * {@link #getMatch()}.  If you want to access
      * subsequent matches you should either use a PatternMatcherInput object
      * or use the offset information in the MatchResult to create a substring
-     * representing the remaining input.  Using the MatchResult offset 
+     * representing the remaining input.  Using the MatchResult offset
      * information is the recommended method of obtaining the parts of the
      * string preceeding the match and following the match.
      * <p>
      * The pattern must be a Perl5Pattern instance, otherwise a
-     * ClassCastException will be thrown.  You are not required to, and 
+     * ClassCastException will be thrown.  You are not required to, and
      * indeed should NOT try to (for performance reasons), catch a
      * ClassCastException because it will never be thrown as long as you use
      * a Perl5Pattern as the pattern parameter.
@@ -1596,25 +1596,25 @@
      */
     public boolean contains(char[] input, Pattern pattern) {
         Perl5Pattern expression;
-        
+
         expression = (Perl5Pattern)pattern;
-        
+
         __originalInput = input;
-        
+
         if(expression._isCaseInsensitive)
             input = _toLower(input);
-        
+
         return __interpret(expression, input, 0, input.length);
     }
-    
-    
+
+
     private static final int __DEFAULT_LAST_MATCH_END_OFFSET = -100;
     private int __lastMatchInputEndOffset = __DEFAULT_LAST_MATCH_END_OFFSET;
     /**
      * Determines if the contents of a PatternMatcherInput, starting from the
      * current offset of the input contains a pattern.
      * If a pattern match is found, a MatchResult
-     * instance representing the <b>first</b> such match is made acessible via 
+     * instance representing the <b>first</b> such match is made acessible via
      * {@link #getMatch()}.  The current offset of the
      * PatternMatcherInput is set to the offset corresponding to the end
      * of the match, so that a subsequent call to this method will continue
@@ -1633,7 +1633,7 @@
      * method for more details.
      * <p>
      * The pattern must be a Perl5Pattern instance, otherwise a
-     * ClassCastException will be thrown.  You are not required to, and 
+     * ClassCastException will be thrown.  You are not required to, and
      * indeed should NOT try to (for performance reasons), catch a
      * ClassCastException because it will never be thrown as long as you use
      * a Perl5Pattern as the pattern parameter.
@@ -1660,7 +1660,7 @@
      * input   = new PatternMatcherInput(someStringInput);
      *
      * while(matcher.contains(input, pattern)) {
-     *   result = matcher.getMatch();  
+     *   result = matcher.getMatch();
      *   // Perform whatever processing on the result you want.
      * }
      *
@@ -1676,8 +1676,8 @@
         char[] inp;
         Perl5Pattern expression;
         boolean matchFound;
-        
-        
+
+
         //if(input.length() > 0) {
         // We want to allow a null string to match at the end of the input
         // which is why we don't check endOfInput.  Not sure if this is a
@@ -1685,13 +1685,13 @@
         if(input._currentOffset > input._endOffset)
             return false;
         //}
-        /* else 
+        /* else
            if(input._endOfInput())
            return false;
         */
         expression = (Perl5Pattern)pattern;
         __originalInput = input._originalBuffer;
-        
+
         // Todo:
         // Really should only reduce to lowercase that part of the
         // input that is necessary, instead of the whole thing.
@@ -1704,26 +1704,26 @@
             inp = input._toLowerBuffer;
         } else
             inp = __originalInput;
-        
+
         __lastMatchInputEndOffset = input.getMatchEndOffset();
-        
+
         matchFound =
             __interpret(expression, inp, input._currentOffset, input._endOffset);
-        
+
         if(matchFound) {
             input.setCurrentOffset(__endMatchOffsets[0]);
             input.setMatchOffsets(__beginMatchOffsets[0], __endMatchOffsets[0]);
         } else {
             input.setCurrentOffset(input._endOffset + 1);
         }
-        
+
         // Restore so it doesn't interfere with other unrelated matches.
         __lastMatchInputEndOffset = __DEFAULT_LAST_MATCH_END_OFFSET;
-        
+
         return matchFound;
     }
-    
-    
+
+
     /**
      * Fetches the last match found by a call to a matches() or contains()
      * method.  If you plan on modifying the original search input, you
@@ -1737,17 +1737,17 @@
      * @return A MatchResult instance containing the pattern match found
      *         by the last call to any one of the matches() or contains()
      *         methods.  If no match was found by the last call, returns
-     *         null. 
+     *         null.
      */
-    public MatchResult getMatch() { 
+    public MatchResult getMatch() {
         if(!__lastSuccess)
             return null;
-        
+
         if(__lastMatchResult == null)
             __setLastMatchResult();
-        
+
         return __lastMatchResult;
     }
-    
+
 }
 



1.2       +6 -6      e/src/jsrc/org/apache/oro/text/regex/Perl5Pattern.java

Index: Perl5Pattern.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/Perl5Pattern.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Perl5Pattern.java	2000/08/03 16:00:42	1.1
+++ Perl5Pattern.java	2001/09/06 09:55:41	1.2
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,11 +53,11 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
-import java.io.*;
+import java.io.Serializable;
 
 /**
  * An implementation of the Pattern interface for Perl5 regular expressions.
@@ -73,7 +73,7 @@
  * saved to disk if desired.
 
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: Perl5Pattern.java,v 1.1 2000/08/03 16:00:42 markm Exp $
+ @version $Id: Perl5Pattern.java,v 1.2 2001/09/06 09:55:41 markm Exp $
 
  * @see Perl5Compiler
  * @see Perl5Matcher



1.3       +5 -5      e/src/jsrc/org/apache/oro/text/regex/Perl5Repetition.java

Index: Perl5Repetition.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/Perl5Repetition.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Perl5Repetition.java	2001/03/11 04:32:58	1.2
+++ Perl5Repetition.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,7 +53,7 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
@@ -63,7 +63,7 @@
  * compilation for JDK 1.0.2.
 
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: Perl5Repetition.java,v 1.2 2001/03/11 04:32:58 markm Exp $
+ @version $Id: Perl5Repetition.java,v 1.3 2001/09/06 09:55:41 markm Exp $
 
  * @see Perl5Matcher
  */



1.3       +51 -51    e/src/jsrc/org/apache/oro/text/regex/Perl5Substitution.java

Index: Perl5Substitution.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/Perl5Substitution.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Perl5Substitution.java	2001/03/11 04:32:58	1.2
+++ Perl5Substitution.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,7 +53,7 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
@@ -82,7 +82,7 @@
  *  matching pattern."  An input of <b>b123:</b> after substitution
  * would yield a result of <b>a123-</b>.  But there's a little more
  * to be aware of.  If you set the <b>numInterpolations</b> parameter to
- * <b>INTERPOLATE_ALL</b>, then every time a match is found, the 
+ * <b>INTERPOLATE_ALL</b>, then every time a match is found, the
  * interpolation variables are computed relative to that match.
  * But if <b>numInterpolations</b> is set to some positive integer, then
  * only the interpolation variables for the first <b>numInterpolations</b>
@@ -96,7 +96,7 @@
  * {@link Util#substitute Util.substitute})
  * of <b> SUBSTITUTE_ALL</b>, then your result  will be:
  * <pre><b>Tank a123- 85  Tank a256- 32  Tank a78- 22</b></pre>
- * But if you set <b> numInterpolations </b> to 2 and keep 
+ * But if you set <b> numInterpolations </b> to 2 and keep
  * <b> numSubs </b> with a value of <b>SUBSTITUTE_ALL</b>, your result is:
  * <pre><b>Tank a123- 85  Tank a256- 32  Tank a256- 22</b></pre>
  * Notice how the last substitution uses the same value for <b>$1</b>
@@ -110,10 +110,10 @@
  * of the last sample input would be:
  * <pre><b>Tank a$2- 85  Tank a$2- 32  Tank a$2- 22</b></pre>
  * Also, <b>$0</b> is always interpreted literally.
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: Perl5Substitution.java,v 1.2 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: Perl5Substitution.java,v 1.3 2001/09/06 09:55:41 markm Exp $
+
  * @see Substitution
  * @see Util
  * @see Util#substitute
@@ -127,38 +127,38 @@
      * recent pattern match.
      */
     public static final int INTERPOLATE_ALL = 0;
-    
+
     /**
-     * A constant used when creating a Perl5Substitution indicating that 
-     * interpolation variables should be interpreted literally, effectively 
+     * A constant used when creating a Perl5Substitution indicating that
+     * interpolation variables should be interpreted literally, effectively
      * disabling interpolation.
      */
     public static final int INTERPOLATE_NONE = -1;
-    
+
     int _numInterpolations;
     Vector _substitutions;
     transient String _lastInterpolation;
-    
+
     static Vector _parseSubs(String sub) {
         boolean saveDigits, storedInterpolation;
         int current;
         char[] str;
         Vector subs;
         StringBuffer numBuffer, strBuffer;
-        
+
         subs = new Vector(5);
         numBuffer = new StringBuffer(5);
         strBuffer = new StringBuffer(10);
-        
+
         str = sub.toCharArray();
         current = 0;
         saveDigits = false;
         storedInterpolation = false;
-        
+
         while(current < str.length) {
             if(saveDigits && Character.isDigit(str[current])) {
                 numBuffer.append(str[current]);
-                
+
                 if(strBuffer.length() > 0) {
                     subs.addElement(strBuffer.toString());
                     strBuffer.setLength(0);
@@ -171,11 +171,11 @@
                     } catch(NumberFormatException e) {
                         subs.addElement(numBuffer.toString());
                     }
-                    
+
                     numBuffer.setLength(0);
                     saveDigits = false;
                 }
-                
+
                 if(str[current] == '$' &&
                    current + 1 < str.length && str[current + 1] != '0' &&
                    Character.isDigit(str[current + 1]))
@@ -183,11 +183,11 @@
                 else
                     strBuffer.append(str[current]);
             }
-            
+
             ++current;
         } // end while
-        
-        
+
+
         if(saveDigits) {
             try {
                 subs.addElement(new Integer(numBuffer.toString()));
@@ -197,37 +197,37 @@
             }
         } else if(strBuffer.length() > 0)
             subs.addElement(strBuffer.toString());
-        
+
         return (storedInterpolation ? subs : null);
     }
-    
-    
+
+
     String _finalInterpolatedSub(MatchResult result) {
         StringBuffer buffer = new StringBuffer(10);
         _calcSub(buffer, result);
         return buffer.toString();
     }
-    
+
     void _calcSub(StringBuffer buffer, MatchResult result) {
         int size, element, value;
         Object obj;
         Integer integer;
         String group;
-        
+
         size = _substitutions.size();
-        
+
         for(element=0; element < size; element++) {
             obj = _substitutions.elementAt(element);
-            
+
             if(obj instanceof String)
                 buffer.append(obj);
             else {
                 integer = (Integer)obj;
                 value = integer.intValue();
-                
+
                 if(value > 0 && value < result.groups()) {
                     group = result.group(value);
-                    
+
                     if(group != null)
                         buffer.append(group);
                 } else {
@@ -237,8 +237,8 @@
             }
         }
     }
-    
-    
+
+
     /**
      * Default constructor initializing substitution to a zero length
      * String and the number of interpolations to
@@ -247,7 +247,7 @@
     public Perl5Substitution() {
         this("", INTERPOLATE_ALL);
     }
-    
+
     /**
      * Creates a Perl5Substitution using the specified substitution
      * and setting the number of interpolations to
@@ -258,13 +258,13 @@
     public Perl5Substitution(String substitution) {
         this(substitution, INTERPOLATE_ALL);
     }
-    
+
     /**
      * Creates a Perl5Substitution using the specified substitution
      * and setting the number of interpolations to the specified value.
      * <p>
      * @param substitution The string to use as a substitution.
-     * @param numInterpolations 
+     * @param numInterpolations
      *            If set to <b>INTERPOLATE_NONE</b>, interpolation variables are
      *            interpreted literally and not as references to the saved
      *            parenthesized groups of a pattern match.  If set to
@@ -280,8 +280,8 @@
     public Perl5Substitution(String substitution, int numInterpolations) {
         setSubstitution(substitution, numInterpolations);
     }
-    
-    
+
+
     /**
      * Sets the substitution represented by this Perl5Substitution, also
      * setting the number of interpolations to
@@ -295,8 +295,8 @@
     public void setSubstitution(String substitution) {
         setSubstitution(substitution, INTERPOLATE_ALL);
     }
-    
-    
+
+
     /**
      * Sets the substitution represented by this Perl5Substitution, also
      * setting the number of interpolations to the specified value.
@@ -305,7 +305,7 @@
      * Perl5Substitution and reuse it by using this method when appropriate.
      * <p>
      * @param substitution The string to use as a substitution.
-     * @param numInterpolations 
+     * @param numInterpolations
      *            If set to <b>INTERPOLATE_NONE</b>, interpolation variables are
      *            interpreted literally and not as references to the saved
      *            parenthesized groups of a pattern match.  If set to
@@ -321,26 +321,26 @@
     public void setSubstitution(String substitution, int numInterpolations) {
         super.setSubstitution(substitution);
         _numInterpolations = numInterpolations;
-        
-        if(numInterpolations != INTERPOLATE_NONE && 
+
+        if(numInterpolations != INTERPOLATE_NONE &&
            substitution.indexOf('$') != -1)
             _substitutions = _parseSubs(substitution);
         else
             _substitutions = null;
         _lastInterpolation = null;
     }
-    
-    
+
+
     /**
      * Appends the substitution to a buffer containing the original input
      * with substitutions applied for the pattern matches found so far.
-     * See 
+     * See
      * {@link Substitution#appendSubstitution Substitution.appendSubstition()}
      * for more details regarding the expected behavior of this method.
      * <p>
      * @param appendBuffer The buffer containing the new string resulting
      * from performing substitutions on the original input.
-     * @param match The current match causing a substitution to be made. 
+     * @param match The current match causing a substitution to be made.
      * @param substitutionCount  The number of substitutions that have been
      *  performed so far by Util.substitute.
      * @param originalInput The original input upon which the substitutions are
@@ -349,7 +349,7 @@
      * @param pattern The Pattern used to find the current match.
      */
     public void appendSubstitution(StringBuffer appendBuffer, MatchResult match,
-                                   int substitutionCount, String originalInput, 
+                                   int substitutionCount, String originalInput,
                                    PatternMatcher matcher, Pattern pattern)
     {
         if(_substitutions == null) {
@@ -357,7 +357,7 @@
                                      originalInput, matcher, pattern);
             return;
         }
-        
+
         if(_numInterpolations < 1 || substitutionCount < _numInterpolations)
             _calcSub(appendBuffer, match);
         else {
@@ -366,6 +366,6 @@
             appendBuffer.append(_lastInterpolation);
         }
     }
-    
+
 }
 



1.3       +18 -18    e/src/jsrc/org/apache/oro/text/regex/StringSubstitution.java

Index: StringSubstitution.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/StringSubstitution.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- StringSubstitution.java	2001/03/11 04:32:58	1.2
+++ StringSubstitution.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,7 +53,7 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
@@ -61,10 +61,10 @@
  * StringSubstitution implements a Substitution consisting of a simple
  * literal string.  This class is intended for use with
  * {@link Util#substitute Util.substitute}.
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: StringSubstitution.java,v 1.2 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: StringSubstitution.java,v 1.3 2001/09/06 09:55:41 markm Exp $
+
  * @see Substitution
  * @see Util
  * @see Util#substitute
@@ -74,7 +74,7 @@
 public class StringSubstitution implements Substitution {
     int _subLength;
     String _substitution;
-    
+
     /**
      * Default constructor initializing substitution to a zero length
      * String.
@@ -82,7 +82,7 @@
     public StringSubstitution() {
         this("");
     }
-    
+
     /**
      * Creates a StringSubstitution representing the given string.
      * <p>
@@ -91,8 +91,8 @@
     public StringSubstitution(String substitution) {
         setSubstitution(substitution);
     }
-    
-    
+
+
     /**
      * Sets the substitution represented by this StringSubstitution.  You
      * should use this method in order to avoid repeatedly allocating new
@@ -105,31 +105,31 @@
         _substitution = substitution;
         _subLength = substitution.length();
     }
-    
+
     /**
      * Returns the string substitution represented by this object.
      * <p>
      * @return The string substitution represented by this object.
      */
     public String getSubstitution() { return _substitution; }
-    
+
     /**
      * Returns the same value as {@link #getSubstitution()}.
      * <p>
      * @return The string substitution represented by this object.
      */
     public String toString() { return getSubstitution(); }
-    
+
     /**
      * Appends the substitution to a buffer containing the original input
      * with substitutions applied for the pattern matches found so far.
-     * See 
+     * See
      * {@link Substitution#appendSubstitution Substitution.appendSubstition()}
      * for more details regarding the expected behavior of this method.
      * <p>
      * @param appendBuffer The buffer containing the new string resulting
      * from performing substitutions on the original input.
-     * @param match The current match causing a substitution to be made. 
+     * @param match The current match causing a substitution to be made.
      * @param substitutionCount  The number of substitutions that have been
      *  performed so far by Util.substitute.
      * @param originalInput The original input upon which the substitutions are
@@ -140,11 +140,11 @@
     public void appendSubstitution(StringBuffer appendBuffer,
                                    MatchResult match,
                                    int substitutionCount,
-                                   String originalInput, 
+                                   String originalInput,
                                    PatternMatcher matcher,
                                    Pattern pattern)
     {
-        if(_subLength == 0) 
+        if(_subLength == 0)
             return;
         appendBuffer.append(_substitution);
     }



1.3       +10 -10    e/src/jsrc/org/apache/oro/text/regex/Substitution.java

Index: Substitution.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/Substitution.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Substitution.java	2001/03/11 04:32:58	1.2
+++ Substitution.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,7 +53,7 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
 
@@ -63,12 +63,12 @@
  * {@link Util#substitute Util.substitute} method.  Two standard
  * implementations are provided,
  * {@link StringSubstitution} and {@link Perl5Substitution}.  To
- * achieve custom control over the behavior of substitutions, you can 
+ * achieve custom control over the behavior of substitutions, you can
  * create your own implementations.  A common use for customization is
  * to make a substitution a function of a match.
 
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: Substitution.java,v 1.2 2001/03/11 04:32:58 markm Exp $
+ @version $Id: Substitution.java,v 1.3 2001/09/06 09:55:41 markm Exp $
 
  * @see Util
  * @see Util#substitute
@@ -88,7 +88,7 @@
    * For performance reasons, rather than provide a getSubstitution method
    * that returns a String used by Util.substitute, we have opted to pass
    * a StringBuffer argument from Util.substitute to which the Substitution
-   * must append data.  The contract that an appendSubstitution 
+   * must append data.  The contract that an appendSubstitution
    * implementation must abide by is that the appendBuffer may only be
    * appended to.  appendSubstitution() may not alter the appendBuffer in
    * any way other than appending to it.
@@ -96,7 +96,7 @@
    * This method is invoked by Util.substitute every time it finds a match.
    * After finding a match, Util.substitute appends to the appendBuffer
    * all of the original input occuring between the end of the last match
-   * and the beginning of the current match.  Then it invokes 
+   * and the beginning of the current match.  Then it invokes
    * appendSubstitution(), passing the appendBuffer, current match, and
    * other information as arguments.  The substitutionCount keeps track
    * of how many substitutions have been performed so far by an invocation
@@ -106,7 +106,7 @@
    * <p>
    * @param appendBuffer The buffer containing the new string resulting
    * from performing substitutions on the original input.
-   * @param match The current match causing a substitution to be made. 
+   * @param match The current match causing a substitution to be made.
    * @param substitutionCount  The number of substitutions that have been
    *  performed so far by Util.substitute.
    * @param originalInput The original input upon which the substitutions are
@@ -115,6 +115,6 @@
    * @param pattern The Pattern used to find the current match.
    */
   public void appendSubstitution(StringBuffer appendBuffer, MatchResult match,
-                                 int substitutionCount, String originalInput, 
+                                 int substitutionCount, String originalInput,
                                  PatternMatcher matcher, Pattern pattern);
 }



1.3       +34 -34    e/src/jsrc/org/apache/oro/text/regex/Util.java

Index: Util.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/apache/oro/text/regex/Util.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Util.java	2001/03/11 04:32:58	1.2
+++ Util.java	2001/09/06 09:55:41	1.3
@@ -25,13 +25,13 @@
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
  *
- * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" 
+ * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
  *    must not be used to endorse or promote products derived from this
  *    software without prior written permission. For written
  *    permission, please contact apache@apache.org.
  *
- * 5. Products derived from this software may not be called "Apache" 
- *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their 
+ * 5. Products derived from this software may not be called "Apache"
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
  *    name, without prior written permission of the Apache Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -53,10 +53,10 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- * Portions of this software are based upon software originally written 
+ * Portions of this software are based upon software originally written
  * by Daniel F. Savarese. We appreciate his contributions.
  */
-import java.util.*;
+import java.util.Vector;
 
 /**
  * The Util class is a holder for useful static utility methods that can
@@ -83,43 +83,43 @@
  *          are retrieved, which is more efficient than storing them all in a
  *          Vector and then accessing them.
  * </ol>
- 
+
  @author <a href="mailto:dfs@savarese.org">Daniel F. Savarese</a>
- @version $Id: Util.java,v 1.2 2001/03/11 04:32:58 markm Exp $
- 
+ @version $Id: Util.java,v 1.3 2001/09/06 09:55:41 markm Exp $
+
  * @see Pattern
  * @see PatternMatcher
  */
 public final class Util {
     /**
      * A constant passed to the {@link #substitute substitute()}
-     * methods indicating that all occurrences of a pattern should be 
+     * methods indicating that all occurrences of a pattern should be
      * substituted.
      */
     public static final int SUBSTITUTE_ALL = -1;
-    
+
     /**
      * A constant passed to the {@link #split split()} methods
      * indicating that all occurrences of a pattern should be used to
      * split a string.
      */
     public static final int SPLIT_ALL = 0;
-    
+
     /**
      * The default destructor for the Util class.  It is made private
      * to prevent the instantiation of the class.
      */
     private Util() { }
-    
+
     /**
      * Splits up a <code>String</code> instance into strings contained in a
      * <code>Vector</code> of size not greater than a specified limit.  The
-     * string is split with a regular expression as the delimiter. 
+     * string is split with a regular expression as the delimiter.
      * The <b>limit</b> parameter essentially says to split the
      * string only on at most the first <b>limit - 1</b> number of pattern
      * occurences.
      * <p>
-     * This method is inspired by the Perl split() function and behaves 
+     * This method is inspired by the Perl split() function and behaves
      * identically to it when used in conjunction with the Perl5Matcher and
      * Perl5Pattern classes except for the following difference:
      * <ul><p>
@@ -142,7 +142,7 @@
      * @param input  The <code>String</code> to split.
      * @param limit  The limit on the size of the returned <code>Vector</code>.
      *               Values <= 0 produce the same behavior as using the
-     *               <b>SPLIT_ALL</b> constant which causes the limit to be 
+     *               <b>SPLIT_ALL</b> constant which causes the limit to be
      *               ignored and splits to be performed on all occurrences of
      *               the pattern.  You should use the <b>SPLIT_ALL</b> constant
      *               to achieve this behavior instead of relying on the default
@@ -158,13 +158,13 @@
                                String input, int limit)
     {
         int beginOffset;
-        Vector results = new Vector(20); 
+        Vector results = new Vector(20);
         MatchResult currentResult;
         PatternMatcherInput pinput;
-        
+
         pinput = new PatternMatcherInput(input);
         beginOffset = 0;
-        
+
         while(--limit != 0 && matcher.contains(pinput, pattern)) {
             currentResult = matcher.getMatch();
             results.addElement(input.substring(beginOffset,
@@ -172,15 +172,15 @@
             beginOffset = currentResult.endOffset(0);
         }
         results.addElement(input.substring(beginOffset, input.length()));
-        
+
         return results;
     }
-    
-    
+
+
     /**
      * Splits up a <code>String</code> instance into a <code>Vector</code>
      * of all its substrings using a regular expression as the delimiter.
-     * This method is inspired by the Perl split() function and behaves 
+     * This method is inspired by the Perl split() function and behaves
      * identically to it when used in conjunction with the Perl5Matcher and
      * Perl5Pattern classes except for the following difference:
      * <p>
@@ -189,7 +189,7 @@
      * method creates additional list elements from each of the matching
      * subgroups in the pattern.  In other words:
      * <ul><p><code>split("/([,-])/", "8-12,15,18")</code></ul>
-     * <p> produces the Vector containing: 
+     * <p> produces the Vector containing:
      * <ul><p><code> { "8", "-", "12", ",", "15", ",", "18" } </code> </ul>
      * <p> The OROMatcher split method does not follow this behavior.  The
      * following Vector would be produced by OROMatcher:
@@ -215,12 +215,12 @@
     {
         return split(matcher, pattern, input, SPLIT_ALL);
     }
-    
-    
+
+
     /**
      * Searches a string for a pattern and replaces the first occurrences
      * of the pattern with a Substitution up to the number of
-     * substitutions specified by the <b>numSubs</b> parameter.  A 
+     * substitutions specified by the <b>numSubs</b> parameter.  A
      * <b>numSubs</b> value of <b>SUBSTITUTE_ALL</b> will cause all occurrences
      * of the pattern to be replaced.
      * <p>
@@ -245,10 +245,10 @@
         MatchResult currentResult;
         PatternMatcherInput pinput;
         StringBuffer buffer = new StringBuffer(input.length());
-        
+
         pinput = new PatternMatcherInput(input);
         beginOffset = subCount = 0;
-        
+
         // Must be != 0 because SUBSTITUTE_ALL is represented by -1.
         // Do NOT change to numSubs > 0.
         while(numSubs != 0 && matcher.contains(pinput, pattern)) {
@@ -261,17 +261,17 @@
                                    input, matcher, pattern);
             beginOffset = currentResult.endOffset(0);
         }
-        
-        // No substitutions performed.  There's no point in duplicating 
+
+        // No substitutions performed.  There's no point in duplicating
         // the string as would happen if this check were omitted.
         if(subCount == 0)
             return input;
-        
+
         buffer.append(input.substring(beginOffset, input.length()));
-        
+
         return buffer.toString();
     }
-    
+
     /**
      * Searches a string for a pattern and substitutes only the first
      * occurence of the pattern.
@@ -296,6 +296,6 @@
     {
         return substitute(matcher, pattern, sub, input, 1);
     }
-    
+
 }
 



1.3       +33 -32    e/src/jsrc/org/capml/dom/Element.java

Index: Element.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/capml/dom/Element.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Element.java	2001/03/20 03:18:23	1.2
+++ Element.java	2001/09/06 09:55:41	1.3
@@ -10,40 +10,41 @@
  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  * details.
- * 
+ *
  * This is a substantial revision by ERights.org of the file as
  * released by the w3c, as is allowed by the license.  See the package
  * comment.
  */
 
-import java.io.IOException;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.StaticMaker;
 import org.erights.e.elib.tables.ConstList;
 
+import java.io.IOException;
+
 /**
  * Represents everything in a Minimal-XML document from a start tag to
  * an end tag, inclusive. <p>
- * 
+ *
  * This is a substantial revision by ERights.org of the file as
  * released by the w3c, as is allowed by the license.  See the package
  * comment. The original class comment: <p>
- * 
+ *
  * <blockquote>
- *  The <code>Element</code> interface represents an element in an HTML or XML 
- * document. Elements may have attributes associated with them; since the 
- * <code>Element</code> interface inherits from <code>Node</code> , the 
- * generic <code>Node</code> interface attribute <code>attributes</code> may 
- * be used to retrieve the set of all attributes for an element. There are 
- * methods on the <code>Element</code> interface to retrieve either an 
- * <code>Attr</code> object by name or an attribute value by name. In XML, 
- * where an attribute value may contain entity references, an 
- * <code>Attr</code> object should be retrieved to examine the possibly 
- * fairly complex sub-tree representing the attribute value. On the other 
- * hand, in HTML, where all attributes have simple string values, methods to 
- * directly access an attribute value can safely be used as a convenience. In 
- * DOM Level 2, the method <code>normalize</code> is inherited from the 
+ *  The <code>Element</code> interface represents an element in an HTML or XML
+ * document. Elements may have attributes associated with them; since the
+ * <code>Element</code> interface inherits from <code>Node</code> , the
+ * generic <code>Node</code> interface attribute <code>attributes</code> may
+ * be used to retrieve the set of all attributes for an element. There are
+ * methods on the <code>Element</code> interface to retrieve either an
+ * <code>Attr</code> object by name or an attribute value by name. In XML,
+ * where an attribute value may contain entity references, an
+ * <code>Attr</code> object should be retrieved to examine the possibly
+ * fairly complex sub-tree representing the attribute value. On the other
+ * hand, in HTML, where all attributes have simple string values, methods to
+ * directly access an attribute value can safely be used as a convenience. In
+ * DOM Level 2, the method <code>normalize</code> is inherited from the
  * <code>Node</code> interface where it was moved.
  * </blockquote>
  */
@@ -51,7 +52,7 @@
 
     static public final StaticMaker ElementMaker
         = StaticMaker.make(Element.class);
-    
+
     /**
      * @serial the name after the &lt;
      */
@@ -85,17 +86,17 @@
     public short getNodeType() { return ELEMENT_NODE; }
 
     /**
-     *  The name of the element. For example, in: 
+     *  The name of the element. For example, in:
      * <pre>
-     * &lt;elementExample id="demo"&gt; 
-     *         ... 
+     * &lt;elementExample id="demo"&gt;
+     *         ...
      * &lt;/elementExample&gt; ,</pre>
-     *  <code>tagName</code> has 
-     * the value <code>"elementExample"</code> . Note that this is 
-     * case-preserving in XML, as are all of the operations of the DOM. The 
-     * HTML DOM returns the <code>tagName</code> of an HTML element in the 
-     * canonical uppercase form, regardless of the case in the  source HTML 
-     * document. 
+     *  <code>tagName</code> has
+     * the value <code>"elementExample"</code> . Note that this is
+     * case-preserving in XML, as are all of the operations of the DOM. The
+     * HTML DOM returns the <code>tagName</code> of an HTML element in the
+     * canonical uppercase form, regardless of the case in the  source HTML
+     * document.
      */
     public String getTagName() { return myTagName; }
 
@@ -105,25 +106,25 @@
     public ConstList getChildNodes() { return myChildren; }
 
     /**
-     * Does 'visitor visit&lt;TagName&gt;(children...)', where the first letter of 
+     * Does 'visitor visit&lt;TagName&gt;(children...)', where the first letter of
      * tagName is upperCased. <p>
      *
-     * For example, if the tag name is "foo", then the visitor will be called 
+     * For example, if the tag name is "foo", then the visitor will be called
      * as 'visitor visitFoo(children...)'
      */
     public Object welcome(Object visitor) {
         return E.call(visitor, verb(), myChildren);
     }
-    
+
     /**
      * Turns the tagName "foo" into the verb "visitFoo".
      */
     private String verb() {
-        return "visit" + 
+        return "visit" +
                Character.toUpperCase(myTagName.charAt(0)) +
                myTagName.substring(1);
     }
-    
+
     /**
      *
      */



1.4       +50 -49    e/src/jsrc/org/capml/dom/Node.java

Index: Node.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/capml/dom/Node.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Node.java	2001/08/25 19:54:02	1.3
+++ Node.java	2001/09/06 09:55:41	1.4
@@ -10,48 +10,49 @@
  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  * details.
- * 
+ *
  * This is a substantial revision by ERights.org of the file as
  * released by the w3c, as is allowed by the license.  See the package
  * comment.
  */
 
-import java.io.IOException;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.serial.PassByConstruction;
 import org.erights.e.elib.serial.Persistent;
+import org.erights.e.elib.tables.AssocFunc;
 import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.tables.Selfless;
-import org.erights.e.elib.tables.AssocFunc;
+
+import java.io.IOException;
 
 /**
  * The document tree is a tree of <code>Node</code>s -- the supertype
  * of the individual types of nodes. <p>
- * 
+ *
  * This is a substantial revision by ERights.org of the file as
  * released by the w3c, as is allowed by the license.  See the package
  * comment. The original comment: <p>
- * 
+ *
  * <blockquote>
- *  The <code>Node</code> interface is the primary datatype for the entire 
- * Document Object Model. It represents a single node in the document tree. 
- * While all objects implementing the <code>Node</code> interface expose 
- * methods for dealing with children, not all objects implementing the 
- * <code>Node</code> interface may have children. For example, 
- * <code>Text</code> nodes may not have children, and adding children to such 
+ *  The <code>Node</code> interface is the primary datatype for the entire
+ * Document Object Model. It represents a single node in the document tree.
+ * While all objects implementing the <code>Node</code> interface expose
+ * methods for dealing with children, not all objects implementing the
+ * <code>Node</code> interface may have children. For example,
+ * <code>Text</code> nodes may not have children, and adding children to such
  * nodes results in a <code>DOMException</code> being raised.
- * <p> The attributes <code>nodeName</code> , <code>nodeValue</code> and 
- * <code>attributes</code> are included as a mechanism to get at node 
- * information without casting down to the specific derived interface. In 
- * cases where there is no obvious mapping of these attributes for a specific 
- * <code>nodeType</code> (e.g., <code>nodeValue</code> for an 
- * <code>Element</code> or <code>attributes</code> for a <code>Comment</code> 
- * ), this returns <code>null</code> . Note that the specialized interfaces 
- * may contain additional and more convenient mechanisms to get and set the 
- * relevant information. 
+ * <p> The attributes <code>nodeName</code> , <code>nodeValue</code> and
+ * <code>attributes</code> are included as a mechanism to get at node
+ * information without casting down to the specific derived interface. In
+ * cases where there is no obvious mapping of these attributes for a specific
+ * <code>nodeType</code> (e.g., <code>nodeValue</code> for an
+ * <code>Element</code> or <code>attributes</code> for a <code>Comment</code>
+ * ), this returns <code>null</code> . Note that the specialized interfaces
+ * may contain additional and more convenient mechanisms to get and set the
+ * relevant information.
  * </blockquote>
  */
-public abstract class Node 
+public abstract class Node
 implements PassByConstruction, Persistent, Selfless {
 
     // NodeType
@@ -74,53 +75,53 @@
     /*package*/ Node() {}
 
     /**
-     *  A code representing the type of the underlying object, as defined 
+     *  A code representing the type of the underlying object, as defined
      * above.
      */
     public abstract short getNodeType();
 
     /**
      * Modified to return an ConstList of Nodes rather than a
-     * NodeList. The original documantation: <p> 
-     * 
-     *  A <code>NodeList</code> that contains all children of this node. If 
-     * there are no children, this is a <code>NodeList</code> containing no 
-     * nodes. The content of the returned <code>NodeList</code> is "live" in 
-     * the sense that, for instance, changes to the children of the node 
-     * object that it was created from are immediately reflected in the nodes 
-     * returned by the <code>NodeList</code> accessors; it is not a static 
-     * snapshot of the content of the node. This is true for every 
-     * <code>NodeList</code> , including the ones returned by the 
+     * NodeList. The original documantation: <p>
+     *
+     *  A <code>NodeList</code> that contains all children of this node. If
+     * there are no children, this is a <code>NodeList</code> containing no
+     * nodes. The content of the returned <code>NodeList</code> is "live" in
+     * the sense that, for instance, changes to the children of the node
+     * object that it was created from are immediately reflected in the nodes
+     * returned by the <code>NodeList</code> accessors; it is not a static
+     * snapshot of the content of the node. This is true for every
+     * <code>NodeList</code> , including the ones returned by the
      * <code>getElementsByTagName</code> method.
      */
     public abstract ConstList getChildNodes();
-    
+
     /**
      * A node iterates its children
      */
     public void iterate(AssocFunc body) {
         getChildNodes().iterate(body);
     }
-    
+
     /**
-     * The classic visitor pattern from the patterns literature, except that 
-     * we don't dispatch on the type of the node, but, for Elements, on a 
+     * The classic visitor pattern from the patterns literature, except that
+     * we don't dispatch on the type of the node, but, for Elements, on a
      * verb generated from the tag name. <p>
-     * 
-     * In order to call the visitor with generated names, we call the visitor 
+     *
+     * In order to call the visitor with generated names, we call the visitor
      * with E.call().
      */
     public abstract Object welcome(Object visitor);
-    
+
     /**
-     *  Tests whether the DOM implementation implements a specific feature and 
+     *  Tests whether the DOM implementation implements a specific feature and
      * that feature is supported by this node.
-     * @param feature  The name of the feature to test. This is the same name 
-     *   which can be passed to the method <code>hasFeature</code> on 
+     * @param feature  The name of the feature to test. This is the same name
+     *   which can be passed to the method <code>hasFeature</code> on
      *   <code>DOMImplementation</code> .
-     * @param version  This is the version number of the feature to test. In 
-     *   Level 2, version 1, this is the string "2.0". If the version is not 
-     *   specified, supporting any version of the feature will cause the 
+     * @param version  This is the version number of the feature to test. In
+     *   Level 2, version 1, this is the string "2.0". If the version is not
+     *   specified, supporting any version of the feature will cause the
      *   method to return <code>true</code> .
      * @return  Returns <code>true</code> if the specified feature is supported
      *    on this node, <code>false</code> otherwise.
@@ -129,19 +130,19 @@
     public boolean supports(String feature, String version) {
         return false;
     }
-    
+
     /**
      * Prints as "sml`...`", where pretty printed XML appears between
-     * the backquotes 
+     * the backquotes
      */
     public void printOn(TextWriter out) throws IOException {
         out.print("sml`");
         prettyPrintOn(out.indent());
         out.print("`");
     }
-        
+
     /**
-     * Prints pretty printed XML 
+     * Prints pretty printed XML
      */
     public abstract void prettyPrintOn(TextWriter out) throws IOException;
 



1.3       +44 -43    e/src/jsrc/org/capml/dom/Text.java

Index: Text.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/capml/dom/Text.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Text.java	2001/03/20 03:18:23	1.2
+++ Text.java	2001/09/06 09:55:41	1.3
@@ -10,64 +10,65 @@
  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  * details.
- * 
+ *
  * This is a substantial revision by ERights.org of the file as
  * released by the w3c, as is allowed by the license.  See the package
  * comment. <p>
  */
 
-import java.io.IOException;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.StaticMaker;
 import org.erights.e.elib.tables.ConstList;
 
+import java.io.IOException;
+
 /**
  * This represents text that appears between a start-tag and end-tag,
  * after all escapes and whitespace have been processed. <p>
- * 
+ *
  * This is a substantial revision by ERights.org of the file as
  * released by the w3c, as is allowed by the license.  See the package
  * comment. For this dom, the only kind of character-data is text, so we
  * folded together the original superclass CharacterData into its
  * subclass Text.  <p>
- * 
+ *
  * Original comment from CharacterData: <p>
- * 
+ *
  * <blockquote>
- *  The <code>CharacterData</code> interface extends Node with a set of 
- * attributes and methods for accessing character data in the DOM.  For 
- * clarity this set is defined here rather than on each object that uses 
- * these attributes and methods. No DOM objects correspond directly to 
- * <code>CharacterData</code> , though <code>Text</code> and others do 
- * inherit the interface from it. All <code>offsets</code> in this interface 
+ *  The <code>CharacterData</code> interface extends Node with a set of
+ * attributes and methods for accessing character data in the DOM.  For
+ * clarity this set is defined here rather than on each object that uses
+ * these attributes and methods. No DOM objects correspond directly to
+ * <code>CharacterData</code> , though <code>Text</code> and others do
+ * inherit the interface from it. All <code>offsets</code> in this interface
  * start from 0.
- * <p> As explained in the <code>DOMString</code> interface, text strings in 
- * the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units.  In 
- * the following, the term  16-bit units is used whenever necessary to 
+ * <p> As explained in the <code>DOMString</code> interface, text strings in
+ * the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units.  In
+ * the following, the term  16-bit units is used whenever necessary to
  * indicate that indexing on CharacterData is done in 16-bit units. <p>
  * </blockquote>
  *
  * Original comment of Text: <p>
- * 
+ *
  * <blockquote>
- *  The <code>Text</code> interface inherits from <code>CharacterData</code> 
- * and represents the textual content (termed  character  data in XML) of an 
- * <code>Element</code> or <code>Attr</code> .  If there is no markup inside 
- * an element's content, the text is contained in a single object 
- * implementing the <code>Text</code> interface that is the only child of the 
- * element. If there is markup, it is parsed into the  information items 
- * (elements,  comments, etc.) and <code>Text</code>  nodes that form the 
+ *  The <code>Text</code> interface inherits from <code>CharacterData</code>
+ * and represents the textual content (termed  character  data in XML) of an
+ * <code>Element</code> or <code>Attr</code> .  If there is no markup inside
+ * an element's content, the text is contained in a single object
+ * implementing the <code>Text</code> interface that is the only child of the
+ * element. If there is markup, it is parsed into the  information items
+ * (elements,  comments, etc.) and <code>Text</code>  nodes that form the
  * list of children of the element.
- * <p> When a document is first made available via the DOM, there is  only one 
- * <code>Text</code> node for each block of text. Users may create  adjacent 
- * <code>Text</code> nodes that represent the  contents of a given element 
- * without any intervening markup, but should be aware that there is no way 
- * to represent the separations between these nodes in XML or HTML, so they 
- * will not (in general) persist between DOM editing sessions. The 
- * <code>normalize()</code> method on <code>Element</code> merges any such 
- * adjacent <code>Text</code> objects into a single node for each block of 
- * text. 
+ * <p> When a document is first made available via the DOM, there is  only one
+ * <code>Text</code> node for each block of text. Users may create  adjacent
+ * <code>Text</code> nodes that represent the  contents of a given element
+ * without any intervening markup, but should be aware that there is no way
+ * to represent the separations between these nodes in XML or HTML, so they
+ * will not (in general) persist between DOM editing sessions. The
+ * <code>normalize()</code> method on <code>Element</code> merges any such
+ * adjacent <code>Text</code> objects into a single node for each block of
+ * text.
  * </blockquote>
  */
 public class Text extends Node {
@@ -106,38 +107,38 @@
     public ConstList getChildNodes() { return ConstList.EmptyList; }
 
     /**
-     *  The character data of the node that implements this interface. The DOM 
-     * implementation may not put arbitrary limits on the amount of data that 
-     * may be stored in a  <code>CharacterData</code> node. However, 
-     * implementation limits may  mean that the entirety of a node's data may 
-     * not fit into a single <code>DOMString</code> . In such cases, the user 
-     * may call <code>substringData</code> to retrieve the data in 
+     *  The character data of the node that implements this interface. The DOM
+     * implementation may not put arbitrary limits on the amount of data that
+     * may be stored in a  <code>CharacterData</code> node. However,
+     * implementation limits may  mean that the entirety of a node's data may
+     * not fit into a single <code>DOMString</code> . In such cases, the user
+     * may call <code>substringData</code> to retrieve the data in
      * appropriately sized pieces.
      * @exception DOMException
      *    NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
      * @exception DOMException
-     *    DOMSTRING_SIZE_ERR: Raised when it would return more characters 
-     *   than fit in a <code>DOMString</code> variable on the implementation 
+     *    DOMSTRING_SIZE_ERR: Raised when it would return more characters
+     *   than fit in a <code>DOMString</code> variable on the implementation
      *   platform.
      */
     public String getData() { return myData; }
 
     /**
      * Does 'visitor viewText(myData)'. <p>
-     * 
-     * Called "view" rather than "visit" to keep it distinct from 
+     *
+     * Called "view" rather than "visit" to keep it distinct from
      * Element-tag-based visitation.
      */
     public Object welcome(Object visitor) {
         return E.call(visitor, "viewText", myData);
     }
-    
+
     /**
      *
      */
     public void prettyPrintOn(TextWriter out) throws IOException {
         //XXX Have to escape things again
         out.print(myData);
-    }        
+    }
 }
 



1.5       +52 -51    e/src/jsrc/org/capml/quasi/QuasiContent.java

Index: QuasiContent.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/capml/quasi/QuasiContent.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- QuasiContent.java	2001/08/29 00:20:16	1.4
+++ QuasiContent.java	2001/09/06 09:55:41	1.5
@@ -21,10 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.capml.dom.Node;
 import org.capml.dom.Text;
-import org.erights.e.elib.util.AlreadyDefinedException;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.quasi.MatchMaker;
 import org.erights.e.elib.serial.PassByConstruction;
@@ -32,29 +30,32 @@
 import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.tables.Selfless;
+import org.erights.e.elib.util.AlreadyDefinedException;
 
+import java.io.IOException;
+
 /**
  * Represents a quasi-literal list of dom Nodes.  <p>
- * 
- * We define "Content" to be either a concrete Node, or a ConstList of 
+ *
+ * We define "Content" to be either a concrete Node, or a ConstList of
  * concrete Nodes.  The latter we also define as a "ContentList".
- * As a ValueMaker, a QuasiContent will evaluate to a ContentList.  As a 
- * MatchMaker, it will match against Content, and either succeed, extracting 
+ * As a ValueMaker, a QuasiContent will evaluate to a ContentList.  As a
+ * MatchMaker, it will match against Content, and either succeed, extracting
  * values, or fail.  The Minimal-XML quasi-parser produces a QuasiContent.
- * 
+ *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public abstract class QuasiContent
 implements PassByConstruction, Persistent, Selfless, MatchMaker {
-    
+
     /**
-     * Coerce 'content', which must be Content (as defined in the class 
+     * Coerce 'content', which must be Content (as defined in the class
      * comment) or a String into a ContentList (as also defined there).  <p>
      *
-     * If 'content' is a Node, a singleton list containing that Node is 
-     * returned.  If it's a String, a singleton list of a Text on that String 
-     * is returned.  Otherwise, content must be a ConstList of Nodes, and is 
-     * returned. 
+     * If 'content' is a Node, a singleton list containing that Node is
+     * returned.  If it's a String, a singleton list of a Text on that String
+     * is returned.  Otherwise, content must be a ConstList of Nodes, and is
+     * returned.
      */
     static /*package*/ ConstList toContentList(Object content) {
         if (content instanceof Node) {
@@ -67,11 +68,11 @@
             return (ConstList)content;
         }
     }
-    
+
     /**
-     * If content represents a single Node, return it.  If it's a String, 
-     * return the corresponding Text.  Otherwise return 
-     * null.  If content isn't valid Content, it's ok to throw an exception 
+     * If content represents a single Node, return it.  If it's a String,
+     * return the corresponding Text.  Otherwise return
+     * null.  If content isn't valid Content, it's ok to throw an exception
      * instead of returning null.
      */
     static /*package*/ Node optTheOne(Object content) {
@@ -88,15 +89,15 @@
             }
         }
     }
-    
+
     /**
-     * Coerce 'content', which must be Content (as defined in the class 
+     * Coerce 'content', which must be Content (as defined in the class
      * comment) or a String into a Content (as also defined there).  <p>
      *
-     * If 'content' is a Node, it's 
-     * returned.  If it's a String, a Text on that String 
-     * is returned.  Otherwise, it must be a ConstList of Nodes.  If it's a 
-     * singleton list, it's one member is returned.  Otherwise the list is 
+     * If 'content' is a Node, it's
+     * returned.  If it's a String, a Text on that String
+     * is returned.  Otherwise, it must be a ConstList of Nodes.  If it's a
+     * singleton list, it's one member is returned.  Otherwise the list is
      * returned.
      */
     static /*package*/ Object toContent(Object content) {
@@ -107,9 +108,9 @@
             return result;
         }
     }
-    
+
     /**
-     * A convenience for placing @-hole matches into bindings.  XXX Note that 
+     * A convenience for placing @-hole matches into bindings.  XXX Note that
      * it will not detect multiple store of null to the same index.
      */
     static /*package*/ void bind(FlexList bindings, int index, Object value) {
@@ -122,26 +123,26 @@
     }
 
     /**
-     * As a ValueMaker, given a list of args, use each arg to fill in the 
-     * corresponding $-hole, and return the resulting concrete Content -- 
+     * As a ValueMaker, given a list of args, use each arg to fill in the
+     * corresponding $-hole, and return the resulting concrete Content --
      * either a Node or a ConstList of Nodes.  <p>
-     * 
-     * The args and return value must be concrete (not quasi).  If it's 
-     * filling in an Element tagName, the arg must be a String.  Otherwise it 
+     *
+     * The args and return value must be concrete (not quasi).  If it's
+     * filling in an Element tagName, the arg must be a String.  Otherwise it
      * may be either a String or Content.
      */
     public abstract Object substitute(Object[] args);
-        
+
     /**
-     * As a MatchMaker, while using the args to fill in the $-holes, pattern 
-     * match against the specimen, which must be Content or String, and 
-     * return the list of values extracted by @-holes. <p> 
+     * As a MatchMaker, while using the args to fill in the $-holes, pattern
+     * match against the specimen, which must be Content or String, and
+     * return the list of values extracted by @-holes. <p>
      *
      * If the match fails, return null.
-     * The args, specimen, and return value must be concrete.  The args must 
-     * follow the same rules as the args to substitute().  The specimen may be 
-     * either Content or String.  The returned list of values extracted by 
-     * @-holes are Strings, if they were extracted by a tagName @-hole, or a 
+     * The args, specimen, and return value must be concrete.  The args must
+     * follow the same rules as the args to substitute().  The specimen may be
+     * either Content or String.  The returned list of values extracted by
+     * @-holes are Strings, if they were extracted by a tagName @-hole, or a
      * Content, if they were extracted by an @-hole in content position.
      */
     public ConstList matchBind(Object[] args, Object specimen) {
@@ -152,19 +153,19 @@
             return null;
         }
     }
-    
+
     /**
-     * As a MatchMaker, while using the args to fill in the $-holes, pattern 
-     * match against the specimen, which must be Content, and put the values 
-     ( extracted by the @-holes into 'bindings'. <p> 
+     * As a MatchMaker, while using the args to fill in the $-holes, pattern
+     * match against the specimen, which must be Content, and put the values
+     ( extracted by the @-holes into 'bindings'. <p>
      *
      * Returns whether the match succeeded.
-     * The args, specimen, and the values put into bindings must be 
-     * concrete.  The args must follow the same rules as the args to 
-     * substitute().  The specimen may be either Content or String.  The 
-     * values extracted by @-holes are Strings, if they were extracted by a 
-     * tagName @-hole, or a Content, if they were extracted by an @-hole in 
-     * content position. 
+     * The args, specimen, and the values put into bindings must be
+     * concrete.  The args must follow the same rules as the args to
+     * substitute().  The specimen may be either Content or String.  The
+     * values extracted by @-holes are Strings, if they were extracted by a
+     * tagName @-hole, or a Content, if they were extracted by an @-hole in
+     * content position.
      */
     public abstract boolean matchBind(Object[] args,
                                       Object specimen,
@@ -172,16 +173,16 @@
 
     /**
      * Prints as "sml`...`", where pretty printed quasi-XML appears between
-     * the backquotes 
+     * the backquotes
      */
     public void printOn(TextWriter out) throws IOException {
         out.print("sml`");
         prettyPrintOn(out.indent());
         out.print("`");
     }
-        
+
     /**
-     * Prints pretty printed quasi-XML 
+     * Prints pretty printed quasi-XML
      */
     public abstract void prettyPrintOn(TextWriter out) throws IOException;
 }



1.5       +15 -14    e/src/jsrc/org/capml/quasi/QuasiContentExprHole.java

Index: QuasiContentExprHole.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/capml/quasi/QuasiContentExprHole.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- QuasiContentExprHole.java	2001/08/29 00:20:16	1.4
+++ QuasiContentExprHole.java	2001/09/06 09:55:41	1.5
@@ -21,56 +21,57 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
-import java.math.BigInteger;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.prim.StaticMaker;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+import java.math.BigInteger;
+
 /**
  * Represents a $-hole in Content position in a quasi-literal XML tree. <p>
- * 
- * This $-hole must be filled in with concrete Content, as defined in the 
+ *
+ * This $-hole must be filled in with concrete Content, as defined in the
  * QuasiContent class comment.
- * 
+ *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class QuasiContentExprHole extends QuasiContent {
-    
+
     static public final StaticMaker QuasiContentExprHoleMaker
         = StaticMaker.make(QuasiContentExprHole.class);
-    
+
     private int myIndex;
-    
+
     /**
      *
      */
     public QuasiContentExprHole(int index) {
         myIndex = index;
     }
-    
+
     /**
      * Uses 'QuasiContentExprHoleMaker new(myIndex)'
      */
     public Object[] getCanonicalState() {
-        Object[] result = { QuasiContentExprHoleMaker, 
+        Object[] result = { QuasiContentExprHoleMaker,
                             "new",
                             BigInteger.valueOf(myIndex) };
         return result;
     }
-    
+
     /**
      * args[myIndex] must be Content -- the equivalent ContentList is returned.
      */
     public Object substitute(Object[] args) {
         return toContent(args[myIndex]);
     }
-        
+
     /**
      * Is args[myIndex] equivalent to specimen?
-     * 
-     * Since a $-hole doesn't contain any @-holes, 'bindings' is ignored and 
+     *
+     * Since a $-hole doesn't contain any @-holes, 'bindings' is ignored and
      * a boolean is simply returned.
      */
     public boolean matchBind(Object[] args,



1.6       +22 -21    e/src/jsrc/org/capml/quasi/QuasiContentList.java

Index: QuasiContentList.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/capml/quasi/QuasiContentList.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- QuasiContentList.java	2001/08/29 00:20:16	1.5
+++ QuasiContentList.java	2001/09/06 09:55:41	1.6
@@ -21,41 +21,42 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.capml.dom.Node;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.prim.StaticMaker;
 import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 /**
- * Represents a list of QuasiContents, none of which are themselves actually 
- * a QuasiContentList, but which may nevertheless represent a list of Nodes. 
+ * Represents a list of QuasiContents, none of which are themselves actually
+ * a QuasiContentList, but which may nevertheless represent a list of Nodes.
  * <p>
- * 
- * When matching a QuasiContentList against a ContentList, we could get fancy 
- * and do all sorts of backtracking.  However, for Elements for now we choose 
- * to define a simple rule: All but the last QuasiContent in the 
- * QuasiContentList has to match pairwise with their corresponding Node.  The 
+ *
+ * When matching a QuasiContentList against a ContentList, we could get fancy
+ * and do all sorts of backtracking.  However, for Elements for now we choose
+ * to define a simple rule: All but the last QuasiContent in the
+ * QuasiContentList has to match pairwise with their corresponding Node.  The
  * last QuasiContent is then matched against the list of remaining Nodes. <p>
  *
- * Unfortunately, Text cannot be handled so simply.  Nevertheless, since our 
+ * Unfortunately, Text cannot be handled so simply.  Nevertheless, since our
  * only need right now is the compiler, we XXX ignore this issue for now.
- * 
+ *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class QuasiContentList extends QuasiContent {
-    
+
     static public final StaticMaker QuasiContentListMaker
         = StaticMaker.make(QuasiContentList.class);
-    
+
     /**
-     * 
+     *
      */
     private ConstList myQuasis;
 
     /**
-     * 
+     *
      */
     public QuasiContentList(ConstList quasis) {
         myQuasis = quasis;
@@ -68,10 +69,10 @@
         Object[] result = { QuasiContentListMaker, "new", myQuasis };
         return result;
     }
-    
+
     /**
      * Appends together the substitutions of my quasis.  <p>
-     * 
+     *
      * Should merge adjacent Texts, but XXX doesn't do so yet.
      */
     public Object substitute(Object[] args) {
@@ -83,9 +84,9 @@
         }
         return toContent(result.snapshot());
     }
-        
+
     /**
-     * 
+     *
      */
     public boolean matchBind(Object[] args,
                              Object specimen,
@@ -94,7 +95,7 @@
         int len = myQuasis.size();
         ConstList others = toContentList(specimen);
         if (len > others.size()) {
-            //With our current simple rule (see class comment) there aren't 
+            //With our current simple rule (see class comment) there aren't
             //enough nodes to match against.
             return false;
         }
@@ -102,14 +103,14 @@
             QuasiContent quasi = (QuasiContent)myQuasis.get(i);
             Node other = (Node)others.get(i);
             if (! quasi.matchBind(args, other, bindings)) {
-                //with our simple rule, we fail on the first nested failure.  
+                //with our simple rule, we fail on the first nested failure.
                 //We will eventually realize this is silly
                 return false;
             }
         }
         QuasiContent quasi = (QuasiContent)myQuasis.get(len -1);
         ConstList rest = others.run(len -1, others.size());
-        return quasi.matchBind(args, rest, bindings);            
+        return quasi.matchBind(args, rest, bindings);
     }
 
     /**



1.5       +18 -17    e/src/jsrc/org/capml/quasi/QuasiContentPattHole.java

Index: QuasiContentPattHole.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/capml/quasi/QuasiContentPattHole.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- QuasiContentPattHole.java	2001/08/29 00:20:16	1.4
+++ QuasiContentPattHole.java	2001/09/06 09:55:41	1.5
@@ -21,58 +21,59 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
-import java.math.BigInteger;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.prim.StaticMaker;
 import org.erights.e.elib.quasi.IncompleteQuasiException;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+import java.math.BigInteger;
+
 /**
  * Represents a @-hole in Content position in a quasi-literal XML tree. <p>
- * 
- * This @-hole will match against any specimen, and put it in the bindings at 
+ *
+ * This @-hole will match against any specimen, and put it in the bindings at
  * the hole's index.
- * 
+ *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class QuasiContentPattHole extends QuasiContent {
-    
+
     static public final StaticMaker QuasiContentPattHoleMaker
         = StaticMaker.make(QuasiContentPattHole.class);
-    
+
     private int myIndex;
-    
+
     /**
      *
      */
     public QuasiContentPattHole(int index) {
         myIndex = index;
     }
-    
+
     /**
      * Uses 'QuasiContentPattHoleMaker new(myIndex)'
      */
     public Object[] getCanonicalState() {
-        Object[] result = { QuasiContentPattHoleMaker, 
+        Object[] result = { QuasiContentPattHoleMaker,
                             "new",
                             BigInteger.valueOf(myIndex) };
         return result;
     }
-    
+
     /**
-     * If it's got @-holes, it's incomplete as a ValueMaker, so throw 
-     * IncompleteQuasiException 
+     * If it's got @-holes, it's incomplete as a ValueMaker, so throw
+     * IncompleteQuasiException
      */
     public Object substitute(Object[] args) {
         throw new IncompleteQuasiException
             ("can't have @-holes in a ValueMaker");
     }
-        
+
     /**
      * puts specimen into bindings[myIndex] and succeed. <p>
-     * 
-     * Specimen must be Content or String.  The equivalent Content is placed 
+     *
+     * Specimen must be Content or String.  The equivalent Content is placed
      * into bindings.
      */
     public boolean matchBind(Object[] args,
@@ -80,7 +81,7 @@
                              FlexList bindings)
     {
         bind(bindings, myIndex, toContent(specimen));
-        return true;        
+        return true;
     }
 
     /**



1.6       +23 -22    e/src/jsrc/org/capml/quasi/QuasiElement.java

Index: QuasiElement.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/capml/quasi/QuasiElement.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- QuasiElement.java	2001/08/29 00:20:16	1.5
+++ QuasiElement.java	2001/09/06 09:55:41	1.6
@@ -21,7 +21,6 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.capml.dom.Element;
 import org.capml.dom.Node;
 import org.erights.e.elib.base.TextWriter;
@@ -30,44 +29,46 @@
 import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 /**
  * Represents an Element in a quasi-literal XML tree. <p>
  *
- * A Minimal-XML Element has only a tagName and children.  The children are a 
- * list of Nodes, which we define as a ContentList, which we define as a kind 
- * of Content (see the QuasiContent class comment).  Therefore, since the same 
- * QuasiElement must match against Elements with different numbers of 
- * children, we use a QuasiContent to represent the children of a 
+ * A Minimal-XML Element has only a tagName and children.  The children are a
+ * list of Nodes, which we define as a ContentList, which we define as a kind
+ * of Content (see the QuasiContent class comment).  Therefore, since the same
+ * QuasiElement must match against Elements with different numbers of
+ * children, we use a QuasiContent to represent the children of a
  * QuasiElement. <p>
  *
- * The tagName is either all hole or all literal.  If it's literal, it must 
- * be a well formed tagName identifier String (not checked).  If it's a hole, 
+ * The tagName is either all hole or all literal.  If it's literal, it must
+ * be a well formed tagName identifier String (not checked).  If it's a hole,
  * the corresponding arg or specimen must be such an identifier.
- * 
+ *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class QuasiElement extends QuasiContent {
-    
+
     static public final StaticMaker QuasiElementMaker
         = StaticMaker.make(QuasiElement.class);
-    
+
     /**
-     * 
+     *
      */
     private Object myTagName;
 
     /**
-     * 
+     *
      */
     private QuasiContent myChildren;
 
     /**
      * @param tagName If it's a String then this is the literal tag name.
      * If it's a non-negative Integer, then it's a $-hole with that index.
-     * If it's a negative Integer, then it's a @-hole whose 1's complement 
+     * If it's a negative Integer, then it's a @-hole whose 1's complement
      * (~) is the index.
-     * @param myChildren represent the quasi-literal XML between the start 
-     * tag and the end tag. 
+     * @param myChildren represent the quasi-literal XML between the start
+     * tag and the end tag.
      */
     public QuasiElement(Object tagName, QuasiContent children) {
         myTagName = tagName;
@@ -81,7 +82,7 @@
         Object[] result = { QuasiElementMaker, "new", myTagName, myChildren };
         return result;
     }
-    
+
     /**
      * Fill in all my $-holes from args, and return the resulting Element.
      */
@@ -101,9 +102,9 @@
         ConstList children = toContentList(myChildren.substitute(args));
         return new Element(tagName, children);
     }
-        
+
     /**
-     * 
+     *
      */
     public boolean matchBind(Object[] args,
                              Object specimen,
@@ -117,7 +118,7 @@
         Element otherEl = (Element)other;
         String otherTagName = otherEl.getTagName();
         ConstList otherChildren = otherEl.getChildNodes();
-        
+
         //check the tags
         if (myTagName instanceof String) {
             if (! myTagName.equals(otherTagName)) {
@@ -137,7 +138,7 @@
                 bind(bindings, index, otherTagName);
             }
         }
-        
+
         //tags are fine, so we're happy if our children are happy.
         return myChildren.matchBind(args, otherChildren, bindings);
     }
@@ -160,7 +161,7 @@
                 startTag = "@{" + index + "}";
             }
         }
-        
+
         out.print("<", startTag, ">");
         myChildren.prettyPrintOn(out.indent());
         out.println();



1.6       +13 -12    e/src/jsrc/org/capml/quasi/QuasiText.java

Index: QuasiText.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/capml/quasi/QuasiText.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- QuasiText.java	2001/08/29 00:20:16	1.5
+++ QuasiText.java	2001/09/06 09:55:42	1.6
@@ -21,35 +21,36 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.capml.dom.Node;
 import org.capml.dom.Text;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.prim.StaticMaker;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 /**
  * Represents contiguous literal text with a quasi-literal XML tree. <p>
  *
  * As a ValueMaker, it simply evaluates to the corresponding Text object.
  * As a MatchMaker, it checks that the specimen is the corresponding Text.
- * 
+ *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class QuasiText extends QuasiContent {
-    
+
     static public final StaticMaker QuasiTextMaker
         = StaticMaker.make(QuasiText.class);
-    
+
     private String myData;
-    
+
     /**
      *
      */
     public QuasiText(String data) {
         myData = data;
     }
-    
+
     /**
      * Uses 'QuasiTextMaker new(myIndex)'
      */
@@ -57,17 +58,17 @@
         Object[] result = { QuasiTextMaker, "new", myData };
         return result;
     }
-    
+
     /**
-     * Since a QuasiText contains no holes, args is ignored and it simply 
+     * Since a QuasiText contains no holes, args is ignored and it simply
      * returns the corresponding Text.
      */
     public Object substitute(Object[] args) {
         return new Text(myData);
     }
-        
+
     /**
-     * Since I contain no holes, args and bindings are ignored, and I simply 
+     * Since I contain no holes, args and bindings are ignored, and I simply
      * see if specimen is content representing the same Text.
      *
      * XXX Open issue: who merges adjacent Text nodes?
@@ -82,11 +83,11 @@
             return false;
         }
         //and only if they have the same String data
-        return myData.equals(((Text)other).getData());            
+        return myData.equals(((Text)other).getData());
     }
 
     /**
-     * 
+     *
      */
     public void prettyPrintOn(TextWriter out) throws IOException {
         //XXX Have to escape things again



1.9       +38 -38    e/src/jsrc/org/capml/quasi/XMLQuasiParser.java

Index: XMLQuasiParser.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/capml/quasi/XMLQuasiParser.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- XMLQuasiParser.java	2001/08/29 00:20:16	1.8
+++ XMLQuasiParser.java	2001/09/06 09:55:42	1.9
@@ -27,12 +27,12 @@
 import org.erights.e.elib.tables.Twine;
 
 /**
- * An StaticMaker on this class is bound to "xml__quasiParser" in the 
- * universal namespace, enabling sml`...` expressions in E containing 
+ * An StaticMaker on this class is bound to "xml__quasiParser" in the
+ * universal namespace, enabling sml`...` expressions in E containing
  * quasi-literal Minimal-XML (which used to be known as SML). <p>
  *
  * Each parse is actually performed by an instance of this class.
- * 
+ *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public final class XMLQuasiParser {
@@ -42,26 +42,26 @@
      */
     static public final StaticMaker XMLQuasiParserMaker =
         StaticMaker.make(XMLQuasiParser.class);
-    
+
     /**
-     * Caches previous simple parses (as is used for quasi-parsing) 
+     * Caches previous simple parses (as is used for quasi-parsing)
      */
     static private IdentityCacheTable OurCache
         = new IdentityCacheTable(QuasiContent.class, 100);
 
     /**
-     * Given a string representing a template, written in post-extraction 
-     * quasi-literal XML syntax, return a ValueMaker which will substitute 
-     * arguments into the template in order to construct a concrete XML 
+     * Given a string representing a template, written in post-extraction
+     * quasi-literal XML syntax, return a ValueMaker which will substitute
+     * arguments into the template in order to construct a concrete XML
      * content (list of Nodes), based on that template.
      */
     static public QuasiContent valueMaker(Twine template) {
         return matchMaker(template);
     }
-    
+
     /**
-     * Given a string representing a pattern, written in post-extraction 
-     * quasi-literal XML syntax, return a MatchMaker which will matchBind 
+     * Given a string representing a pattern, written in post-extraction
+     * quasi-literal XML syntax, return a MatchMaker which will matchBind
      * against concrete XML trees that match that pattern.
      */
     static public QuasiContent matchMaker(Twine pattern) {
@@ -72,28 +72,28 @@
         }
         return result;
     }
-    
+
     /**
      * The entire source as a single char array for speed.
      */
     private char[] mySource;
-    
+
     /**
      * The position of the *next* character
      */
     private int myPos;
-    
+
     /**
-     * Should eventually provide source filename and pos mappings for 
+     * Should eventually provide source filename and pos mappings for
      * debugging info.
      */
     private XMLQuasiParser(char[] source) {
         mySource = source;
         myPos = 0;
     }
-    
+
     /**
-     * 
+     *
      */
     private QuasiContent parse() {
         QuasiContent result = quasiContent();
@@ -103,7 +103,7 @@
         }
         return result;
     }
-    
+
     /**
      *
      */
@@ -111,9 +111,9 @@
         throw new RuntimeException("syntax error: " + err +
                                    " at " + myPos);
     }
-    
+
     /**
-     * If there's any text in textBuf, make a QuasiText out of it, push it 
+     * If there's any text in textBuf, make a QuasiText out of it, push it
      * on qcList, and reset textBuf.
      */
     static private void gatherText(FlexList qcList,
@@ -124,7 +124,7 @@
             textBuf.setLength(0);
         }
     }
-    
+
     /**
      *
      */
@@ -138,8 +138,8 @@
             return new QuasiContentList(qcList.snapshot());
         }
     }
-        
-    
+
+
     /**
      * Top of recursive descent parser.  Gets a list of content until it runs
      * into an unmatched outer endTag or the end of the source.
@@ -147,21 +147,21 @@
     private QuasiContent quasiContent() {
         FlexList qcList = FlexList.fromType(QuasiContent.class);
         StringBuffer textBuf = new StringBuffer();
-        
-        //This while loop has two characters of head room, which matches well 
-        //our cases.  Once we fall out of this one, we need a separate 
+
+        //This while loop has two characters of head room, which matches well
+        //our cases.  Once we fall out of this one, we need a separate
         //dispatch on the last character.
         while (myPos +1 < mySource.length) {
             char c1 = mySource[myPos];
             char c2 = mySource[myPos+1];
-            
+
             if ('<' == c1) {
                 if ('/' == c2) {
-                    //We have an unmatched outer end tag, so we leave it 
+                    //We have an unmatched outer end tag, so we leave it
                     //be and return what we've got
                     return gatherContent(qcList, textBuf);
                 } else {
-                    //We apparently have a start tag, so eat a QuasiElement 
+                    //We apparently have a start tag, so eat a QuasiElement
                     //and continue
                     gatherText(qcList, textBuf);
                     qcList.push(quasiElement());
@@ -217,7 +217,7 @@
         }
         return gatherContent(qcList, textBuf);
     }
-    
+
     /**
      * Eat digits followed by terminator.  Return the resulting int.
      */
@@ -242,7 +242,7 @@
         syntaxError("ended without '" + terminator + "'");
         return 0; //keep compiler happy
     }
-    
+
     /**
      * Either c is the next char and we eat it, or we die.
      */
@@ -257,7 +257,7 @@
             syntaxError("expected '" + c + "' but got '" + other + "'");
         }
     }
-    
+
     /**
      *
      */
@@ -267,7 +267,7 @@
         endTag(startTag);
         return new QuasiElement(startTag, children);
     }
-    
+
     /**
      *
      */
@@ -280,7 +280,7 @@
             myPos++;
         }
     }
-    
+
     /**
      *
      */
@@ -307,7 +307,7 @@
         expect('>');
         return result;
     }
-    
+
     /**
      *
      */
@@ -315,7 +315,7 @@
         StringBuffer result = new StringBuffer();
         while (myPos < mySource.length) {
             char c1 = mySource[myPos];
-            if (Character.isWhitespace(c1) || "<>&/$@".indexOf(c1) != -1) { 
+            if (Character.isWhitespace(c1) || "<>&/$@".indexOf(c1) != -1) {
                 if (result.length() == 0) {
                     syntaxError("identifier expected");
                 } else {
@@ -327,7 +327,7 @@
         }
         return result.toString();
     }
-    
+
     /**
      *
      */
@@ -343,5 +343,5 @@
         }
         skipWS();
         expect('>');
-    }    
+    }
 }



1.24      +23 -22    e/src/jsrc/org/erights/build/EYaccFixer.java

Index: EYaccFixer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/build/EYaccFixer.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- EYaccFixer.java	2001/07/14 12:57:22	1.23
+++ EYaccFixer.java	2001/09/06 09:55:43	1.24
@@ -1,11 +1,5 @@
 package org.erights.build;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.io.ObjectOutput;
-import java.io.OutputStream;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.quasi.MatchMaker;
 import org.erights.e.elib.quasi.SimpleQuasiParser;
@@ -14,11 +8,18 @@
 import org.erights.e.elib.tables.Twine;
 import org.erights.e.meta.java.io.FileSugar;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutput;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+
 
 /**
  * Post-processes the output of byacc/Java (Berkeley Yacc for Java) so
  * that it is valid Java. <p>
- * 
+ *
  * The problem with byacc/Java's output is simply that it's too
  * large.  Specifically, Java turns the table initializers into
  * bytecodes to perform the initialization.  These bytecodes exceed
@@ -27,30 +28,30 @@
  * into a file to be included as a resource in the e.jar file, and
  * changes the table initializations to initialize these tables by
  * unserializing these resources.
- * 
+ *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class EYaccFixer {
-    
-    static /*package*/ final SimpleQuasiParser QParser = 
+
+    static /*package*/ final SimpleQuasiParser QParser =
         SimpleQuasiParser.THE_ONE;
-    
-    static private final MatchMaker ParseQPatt = 
+
+    static private final MatchMaker ParseQPatt =
     QParser.matchMaker(Twine.fromString(
         "@{0}\n" +
         "final static short yytable[] = {@{1}};\n" +
         "final static short yycheck[] = {@{2}};\n" +
         "@{3}int yyparse()@{4}"
     ));
-    
-    static private final String rName 
+
+    static private final String rName
         = "org/erights/e/elang/syntax/ParserTables.data";
-        
-    static private final ValueMaker ParseQExpr = 
+
+    static private final ValueMaker ParseQExpr =
     QParser.valueMaker(Twine.fromString(
         "// Fixed by EYaccFixer to meet jvm size limits\n" +
         "${0}\n\n" +
-        "//These two tables are not statically initialized, but rather\n" + 
+        "//These two tables are not statically initialized, but rather\n" +
         "//initialized on first use, so that a failure to initialize them\n" +
         "//can successfully report the problem.\n" +
         "static private short[] yytable = null;\n" +
@@ -80,9 +81,9 @@
         "}\n\n" +
         "${3}int yyparse() ${4}"
     ));
-    
+
     /**
-     * Used to make sure that the tables read in to the transformed parser 
+     * Used to make sure that the tables read in to the transformed parser
      * are the same as the tables extracted from the pre-transformed
      * parser.  Ideally, this should be a hash function that's good at
      * detecting errors, like a CRC.  But for now we just do something crude.
@@ -97,9 +98,9 @@
         }
         return result;
     }
-        
+
     static private final Object[] NO_ARGS = {};
-    
+
     static private short[] eatMyShorts(String numbers) {
         FlexList result = FlexList.fromType(Short.TYPE, 1000);
         int len = numbers.length();
@@ -123,7 +124,7 @@
         }
         return (short[])result.getArray(Short.TYPE);
     }
-    
+
     /**
      *
      */



1.9       +26 -26    e/src/jsrc/org/erights/e/develop/assertion/Assertion.java

Index: Assertion.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/assertion/Assertion.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Assertion.java	2000/09/20 01:26:07	1.8
+++ Assertion.java	2001/09/06 09:55:43	1.9
@@ -1,20 +1,20 @@
 package org.erights.e.develop.assertion;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -29,7 +29,7 @@
 
    The 'unassert' program will remove any invocation of ANY method
    of this class.  If you add a new non-private method, it MUST be
-   one which can be removed without changing the semantics of the 
+   one which can be removed without changing the semantics of the
    invoking program.
 
    There has been talk of adding an "assertNoException" assertion that
@@ -44,10 +44,10 @@
    DANGER                                                       DANGER
 */
 
-/** 
+/**
  * This class provides assertions you can add to your program.  If the
  * assertions fail, unchecked exceptions of class AssertionFailed are
- * thrown. 
+ * thrown.
  * <p>
  * Note:  an assertion that is true (does not throw) nevertheless
  * incurs the overhead of the method invocation.
@@ -56,15 +56,15 @@
  * that rewrites the class file, as described in
  * Ways to Strip Assertions (XXX File stripping.html not found).
  * That page also describes some 'gotchas' to beware when using
- * assertions. 
+ * assertions.
  * @see AssertionFailed
  */
 public class Assertion
 {
   static private final String prefix = "Internal program error: ";
 
-  /* 
-   * This variable is used to discourage a java compiler from inlining 
+  /*
+   * This variable is used to discourage a java compiler from inlining
    * an assertion.  An inlined assertion would prevent the unasserter
    * from working.
    * I can't offhand think of a way to *prevent* inlining.
@@ -80,7 +80,7 @@
   static public void fail() throws AssertionFailed {
     if (preventInlining) fail();
     throw new AssertionFailed(prefix + "'Unreachable' code was reached.");
-  }  
+  }
 
   /**
    * If this method is executed, it throws an AssertionFailed with the
@@ -90,7 +90,7 @@
     if (preventInlining) fail(explanation);
     throw new AssertionFailed(prefix + explanation);
   }
-  
+
   /**
    * If the argument is false, throws an AssertionFailed with the message
    * "Internal program error: Assertion failed."
@@ -101,7 +101,7 @@
     }
     if (preventInlining) test(!mustBeTrue);
   }
-  
+
   /**
    * If the argument is false, throws an AssertionFailed with the
    * given explanation arguments, concatenated as strings and prefixed
@@ -118,7 +118,7 @@
     }
     if (preventInlining) test(!mustBeTrue);
   }
-  
+
   /**
    * If the argument is false, throws an AssertionFailed with the
    * given explanation arguments, concatenated as strings and prefixed
@@ -136,7 +136,7 @@
     }
     if (preventInlining) test(!mustBeTrue);
   }
-  
+
   /**
    * If the argument is false, throws an AssertionFailed with the
    * given explanation arguments, concatenated as strings and prefixed
@@ -156,7 +156,7 @@
     }
     if (preventInlining) test(!mustBeTrue);
   }
-  
+
   /**
    * If the argument is false, throws an AssertionFailed with the
    * given explanation arguments, concatenated as strings and prefixed
@@ -176,7 +176,7 @@
     }
     if (preventInlining) test(!mustBeTrue);
   }
-  
+
   /**
    * If the argument is false, throws an AssertionFailed with the
    * given explanation arguments, concatenated as strings and prefixed
@@ -198,7 +198,7 @@
     }
     if (preventInlining) test(!mustBeTrue);
   }
-  
+
   /**
    * If the argument is false, throws an AssertionFailed with the
    * given explanation arguments, concatenated as strings and prefixed
@@ -220,7 +220,7 @@
     }
     if (preventInlining) test(!mustBeTrue);
   }
-  
+
   /**
    * If the argument is false, throws an AssertionFailed with the
    * given explanation arguments, concatenated as strings and prefixed
@@ -244,7 +244,7 @@
     }
     if (preventInlining) test(!mustBeTrue);
   }
-  
+
   /**
    * If the argument is false, throws an AssertionFailed with the
    * given explanation, prefixed by "Internal program error: ".
@@ -255,5 +255,5 @@
       throw new AssertionFailed(prefix + explanation);
     }
     if (preventInlining) test(!mustBeTrue, explanation);
-  }  
+  }
 }



1.4       +11 -11    e/src/jsrc/org/erights/e/develop/assertion/AssertionFailed.java

Index: AssertionFailed.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/assertion/AssertionFailed.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AssertionFailed.java	1999/05/09 00:33:23	1.3
+++ AssertionFailed.java	2001/09/06 09:55:43	1.4
@@ -1,20 +1,20 @@
 package org.erights.e.develop.assertion;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -30,8 +30,8 @@
 public class AssertionFailed extends Error {
   public AssertionFailed() {
     super();
-  }  
+  }
   public AssertionFailed (String msg) {
     super(msg);
-  }  
+  }
 }



1.6       +14 -14    e/src/jsrc/org/erights/e/develop/exception/ExceptionMgr.java

Index: ExceptionMgr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/exception/ExceptionMgr.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ExceptionMgr.java	2001/04/01 08:13:40	1.5
+++ ExceptionMgr.java	2001/09/06 09:55:43	1.6
@@ -1,20 +1,20 @@
 package org.erights.e.develop.exception;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -24,12 +24,12 @@
  *
  */
 public class ExceptionMgr {
-    
+
     /**
      *
      */
     static private ExceptionNoticer OurNoticer = null;
-    
+
     /**
      * Returns th as a RuntimeException. <p>
      *
@@ -37,8 +37,8 @@
      *
      *     throw ExceptionMgr.asSafe(th);
      * </pre>
-     * without having to declare any new "throws" cases.  The caller does the 
-     * "throw" rather than this construct so that the Java compiler will have 
+     * without having to declare any new "throws" cases.  The caller does the
+     * "throw" rather than this construct so that the Java compiler will have
      * better control flow information. <p>
      *
      * Equivalent to 'ThrowableSugar.backtrace(th, "");'
@@ -49,7 +49,7 @@
         }
         throw new NestedException("", th);
     }
-    
+
     /**
      *
      */



1.6       +10 -10    e/src/jsrc/org/erights/e/develop/exception/ExceptionNoticer.java

Index: ExceptionNoticer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/exception/ExceptionNoticer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ExceptionNoticer.java	1999/10/30 05:36:13	1.5
+++ ExceptionNoticer.java	2001/09/06 09:55:43	1.6
@@ -1,20 +1,20 @@
 package org.erights.e.develop.exception;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -24,7 +24,7 @@
  *
  * @see org.erights.e.develop.exception.ExceptionMgr
  */
-public interface ExceptionNoticer 
+public interface ExceptionNoticer
 {
     /**
      * Notification of a reported exception.



1.5       +12 -12    e/src/jsrc/org/erights/e/develop/exception/NestedError.java

Index: NestedError.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/exception/NestedError.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NestedError.java	1999/10/30 05:36:13	1.4
+++ NestedError.java	2001/09/06 09:55:43	1.5
@@ -1,20 +1,20 @@
 package org.erights.e.develop.exception;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -25,14 +25,14 @@
 public class NestedError extends Error implements NestedThrowable
 {
     private Throwable myContainedThrowable;
-    
+
     /**
      *
      */
     public NestedError(String msg) {
         super(msg);
     }
-    
+
     /**
      *
      */
@@ -40,7 +40,7 @@
         super(msg);
         myContainedThrowable = t;
     }
-    
+
     /**
      *
      */



1.6       +12 -12    e/src/jsrc/org/erights/e/develop/exception/NestedException.java

Index: NestedException.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/exception/NestedException.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- NestedException.java	2000/02/07 20:09:11	1.5
+++ NestedException.java	2001/09/06 09:55:43	1.6
@@ -1,20 +1,20 @@
 package org.erights.e.develop.exception;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -24,9 +24,9 @@
  */
 public class NestedException
 extends RuntimeException implements NestedThrowable {
-    
+
     private Throwable myContainedThrowable;
-    
+
     /**
      * public only for use by E.backtrace
      */
@@ -34,7 +34,7 @@
         super(msg);
         myContainedThrowable = t;
     }
-    
+
     /**
      *
      */



1.5       +12 -12    e/src/jsrc/org/erights/e/develop/exception/NestedIOException.java

Index: NestedIOException.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/exception/NestedIOException.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NestedIOException.java	1999/10/30 05:36:13	1.4
+++ NestedIOException.java	2001/09/06 09:55:43	1.5
@@ -1,20 +1,20 @@
 package org.erights.e.develop.exception;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -25,14 +25,14 @@
  */
 public class NestedIOException extends IOException implements NestedThrowable {
     private Throwable myContainedThrowable;
-    
+
     /**
      *
      */
     public NestedIOException(String msg) {
         super(msg);
     }
-    
+
     /**
      *
      */
@@ -40,7 +40,7 @@
         super(msg);
         myContainedThrowable = t;
     }
-    
+
     /**
      *
      */



1.5       +10 -10    e/src/jsrc/org/erights/e/develop/exception/NestedThrowable.java

Index: NestedThrowable.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/exception/NestedThrowable.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NestedThrowable.java	1999/10/30 05:36:13	1.4
+++ NestedThrowable.java	2001/09/06 09:55:43	1.5
@@ -1,20 +1,20 @@
 package org.erights.e.develop.exception;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -23,7 +23,7 @@
  *
  */
 public interface NestedThrowable {
-    
+
     /**
      *
      */



1.6       +25 -25    e/src/jsrc/org/erights/e/develop/exception/PrintStreamWriter.java

Index: PrintStreamWriter.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/exception/PrintStreamWriter.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PrintStreamWriter.java	2001/02/02 06:28:26	1.5
+++ PrintStreamWriter.java	2001/09/06 09:55:43	1.6
@@ -1,20 +1,20 @@
 package org.erights.e.develop.exception;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -31,36 +31,36 @@
  * This class shouldn't need to exist, but System.out and System.err
  * are both PrintStreams, and PrintStream is deprecated in favor of
  * PrintWriter.  XXX How should one obtain a Writer or PrintWriter to
- * stdout and stderr?  As long as we're at it, we also provide a static 
- * method for accessing System.in as a non-buffering BufferedReader (so that 
+ * stdout and stderr?  As long as we're at it, we also provide a static
+ * method for accessing System.in as a non-buffering BufferedReader (so that
  * readline() is available).
  *
- * Note that there is no reason to use this class as a type in a type 
- * declaration.  No one should ever see any instances of it.  Only its static 
+ * Note that there is no reason to use this class as a type in a type
+ * declaration.  No one should ever see any instances of it.  Only its static
  * methods are externally useful.
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public final class PrintStreamWriter extends Writer {
-    
+
     static private PrintStream lastOutStream = null;
     static private PrintWriter lastOutWriter = null;
-    
+
     static private PrintStream lastErrStream = null;
     static private PrintWriter lastErrWriter = null;
-    
+
     static private InputStream lastInStream = null;
     static private BufferedReader lastInReader = null;
-    
+
     /**
      * Wrap the PrintStream in an adaptor so it seems to be a PrintWriter.
      */
     static public PrintWriter make(PrintStream ps) {
         return new PrintWriter(new PrintStreamWriter(ps));
     }
-    
+
     /**
-     * System.out as a PrintWriter.  It's a function rather than a variable in 
+     * System.out as a PrintWriter.  It's a function rather than a variable in
      * case System.out gets changed.
      */
     static public PrintWriter out() {
@@ -70,9 +70,9 @@
         }
         return lastOutWriter;
     }
-    
+
     /**
-     * System.err as a PrintWriter.  It's a function rather than a variable in 
+     * System.err as a PrintWriter.  It's a function rather than a variable in
      * case System.err gets changed.
      */
     static public PrintWriter err() {
@@ -82,14 +82,14 @@
         }
         return lastErrWriter;
     }
-    
+
     /**
      *
      */
     static public BufferedReader in() {
         if (System.in != lastInStream) {
             lastInStream = System.in;
-            lastInReader 
+            lastInReader
                 = new BufferedReader(new InputStreamReader(lastInStream), 1);
         }
         return lastInReader;
@@ -106,11 +106,11 @@
     public void close() {
         myPS.close();
     }
-    
+
     public void flush() {
         myPS.flush();
     }
-    
+
     public void write(char[] cbuf, int off, int len) {
         myPS.print(new String(cbuf, off, len));
     }



1.10      +2 -1      e/src/jsrc/org/erights/e/develop/exception/ThrowableSugar.java

Index: ThrowableSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/exception/ThrowableSugar.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ThrowableSugar.java	2001/09/04 10:52:17	1.9
+++ ThrowableSugar.java	2001/09/06 09:55:43	1.10
@@ -19,13 +19,14 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.format.StringHelper;
+
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.io.Writer;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.UndeclaredThrowableException;
-import org.erights.e.develop.format.StringHelper;
 
 /**
  * A sweetener defining extra messages that may be e-sent to a Throwable



1.3       +24 -24    e/src/jsrc/org/erights/e/develop/format/ETimeFormat.java

Index: ETimeFormat.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/format/ETimeFormat.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ETimeFormat.java	2001/07/26 15:28:07	1.2
+++ ETimeFormat.java	2001/09/06 09:55:43	1.3
@@ -1,20 +1,20 @@
 package org.erights.e.develop.format;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -22,12 +22,12 @@
 import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.TimeZone;
 import java.util.Date;
+import java.util.TimeZone;
 
 /**
- * Just converts back and forth between milliseconds since the epoch 
- * (standard binary time representation) and ISO8601/UTC (standard 
+ * Just converts back and forth between milliseconds since the epoch
+ * (standard binary time representation) and ISO8601/UTC (standard
  * sortable textual respresentation) but enhanced to represent milliseconds.
  * <p>
  * @see <a href="http://www.w3.org/TR/1998/NOTE-datetime-19980827">w3c's
@@ -38,24 +38,24 @@
  * @author Mark S. Miller
  */
 public class ETimeFormat {
-    
-    static private final DateFormat SortableFormat = 
+
+    static private final DateFormat SortableFormat =
         new SimpleDateFormat("yyyy-MM-dd!HH:mm:ss.SSS%");
-        
+
     static {
         TimeZone utc = TimeZone.getTimeZone("UTC");
         SortableFormat.setTimeZone(utc);
     }
-    
+
     /**
-     * Shows millis since epoch as a sortable absolute date/time string that 
+     * Shows millis since epoch as a sortable absolute date/time string that
      * can be included in a single URI field (no "#"s or "/"s).
      * <p>
-     * The format must also be independent of Locale, the default current 
-     * TimeZone, or the current time. In the terminology of <a 
-     * href="http://www.w3.org/TR/1998/NOTE-datetime-19980827">ISO601</a>, 
-     * the actual format is "YYYY-MM-DDThh:mm:ss.sssTZD", where the value of 
-     * TZD (timezone) is "Z", indicating UTC (Universal Standard Time, which 
+     * The format must also be independent of Locale, the default current
+     * TimeZone, or the current time. In the terminology of <a
+     * href="http://www.w3.org/TR/1998/NOTE-datetime-19980827">ISO601</a>,
+     * the actual format is "YYYY-MM-DDThh:mm:ss.sssTZD", where the value of
+     * TZD (timezone) is "Z", indicating UTC (Universal Standard Time, which
      * is just another name for GMT).
      * <p>
      * It would be good if the format returned could also be used
@@ -70,9 +70,9 @@
         String formatted = SortableFormat.format(new Date(millis));
         return formatted.replace('!','T').replace('%','Z');
     }
-    
+
     /**
-     * Given a sortableTime string in the format returned by millisToDate, 
+     * Given a sortableTime string in the format returned by millisToDate,
      * return the corresponding number of seconds since the epoch.
      */
     static public long parseTime(String sortableTime) throws ParseException {



1.2       +20 -20    e/src/jsrc/org/erights/e/develop/format/StringHelper.java

Index: StringHelper.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/format/StringHelper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StringHelper.java	2001/02/02 20:17:33	1.1
+++ StringHelper.java	2001/09/06 09:55:43	1.2
@@ -1,37 +1,37 @@
 package org.erights.e.develop.format;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
 /**
- * Like the old StringSugar, except it's only a convenience for ELib 
- * programmers, not for E language programmers.  E language programmers never 
- * see Java Strings directly, they only see Twine.  Twine has some similar 
+ * Like the old StringSugar, except it's only a convenience for ELib
+ * programmers, not for E language programmers.  E language programmers never
+ * see Java Strings directly, they only see Twine.  Twine has some similar
  * methods built on these.
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public final class StringHelper {
-    
+
     /** prevent instantiation */
     private StringHelper() {}
-    
+
     /**
      * reps repitions of self
      */
@@ -48,7 +48,7 @@
      *
      * @see String#replace
      */
-    static public String replaceAll(String self, 
+    static public String replaceAll(String self,
                                     String oldStr,
                                     String newStr)
     {
@@ -66,9 +66,9 @@
         buf.append(self.substring(p1));
         return buf.toString();
     }
-    
+
     /**
-     * Each crlf is turned into an lf to deal with MSWindows, and then each 
+     * Each crlf is turned into an lf to deal with MSWindows, and then each
      * remaining cr is turned into an lf to deal with Mac.
      */
     static public String canonical(String self) {
@@ -78,9 +78,9 @@
             return replaceAll(self, "\r\n", "\n").replace('\r', '\n');
         }
     }
-    
+
     /**
-     * Returns a string that, when interpreted as a literal, represents the 
+     * Returns a string that, when interpreted as a literal, represents the
      * original string.
      */
     static public String quote(String self) {
@@ -112,5 +112,5 @@
         }
         buf.append('\"');
         return buf.toString();
-    }        
+    }
 }



1.14      +25 -25    e/src/jsrc/org/erights/e/develop/trace/Trace.java

Index: Trace.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/Trace.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Trace.java	2001/01/15 06:03:53	1.13
+++ Trace.java	2001/09/06 09:55:43	1.14
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -41,22 +41,22 @@
  */
 
 final public class Trace implements TraceConstants {
-    /** 
+    /**
      * Set this to false to compile out all tracing. This also has
      * to be set in TraceDummies.java
      */
     static public final boolean ON = true;
 
-    /** 
+    /**
      * Error messages report on some internal error.  They don't
      * necessarily lead to the system stopping, but they might.  Error
-     * messages are always logged. 
+     * messages are always logged.
      */
     public boolean error;
 
     /**
      * Warning messages are not as serious as errors, but they're
-     * signs of something odd. 
+     * signs of something odd.
      */
     public boolean warning;
 
@@ -66,7 +66,7 @@
      * as "can you tell me when someone connects."   They should appear
      * only occasionally, much less often than once per second.  This is
      * probably the level used for the on-disk log in the shipped
-     * version. 
+     * version.
      */
     public boolean world;
 
@@ -77,7 +77,7 @@
      * for a lump of coal. Kyra spoke.")  They are also used to collect
      * higher-level usability information.  This is the level probably
      * used for the transient log in the shipped version; during
-     * development, we can set the on-disk log to this level. 
+     * development, we can set the on-disk log to this level.
      */
     public boolean usage;
 
@@ -87,19 +87,19 @@
      * and debug is fuzzy, especially since debug is already used for
      * many messages of this type.  However, it can be used to log
      * specific user gestures for usability testing, and to log information for
-     * testers.  
+     * testers.
      */
     public boolean event;
 
     /**
      * Debug messages provide more detail for people who want to delve
-     * into what's going on, probably to figure out a bug.   
+     * into what's going on, probably to figure out a bug.
      */
     public boolean debug;
 
     /**
      * Verbose messages provide even more detail than debug.  They're
-     * probably mainly used when first getting the code to work.  
+     * probably mainly used when first getting the code to work.
      */
     public boolean verbose;
 
@@ -111,7 +111,7 @@
     public boolean timing;
 
     /**
-     *  Predefined subsystems. (tr) 
+     *  Predefined subsystems. (tr)
      */
     /** comm systems */
     static public Trace comm = new Trace("comm");
@@ -134,7 +134,7 @@
 
 
     /**
-     * This is the mediator that actually disposes of a message. 
+     * This is the mediator that actually disposes of a message.
      * Multiple Trace objects may share the same mediator.
      */
     /*package*/ TraceSubsystemMediator myMediator;
@@ -179,7 +179,7 @@
      * @param post string to append to an element.
      */
     static public String arrayToString(Object a[], String name, String
-                               pre, String sep, String post) { 
+                               pre, String sep, String post) {
         int i = 0;
         String s = name + "[";
         while (i < a.length) {
@@ -288,7 +288,7 @@
     }
 
     /**
-     * Return the current stack trace as a string.  
+     * Return the current stack trace as a string.
      * @ Deprecated in favor of StackFrameData.getStackTrace().
      */
     static public String getStackTrace () {
@@ -356,7 +356,7 @@
         traceMessage.subsystem = mySubsystem;
         myMediator.accept(traceMessage);
 
-        // MARKM: Uncomment this if you want the error behavior back. 
+        // MARKM: Uncomment this if you want the error behavior back.
         /*
         if (level == ERROR && !noNotify) {
             notifyOptional();
@@ -421,7 +421,7 @@
     public void timingm(String message, Object o) {
         if (timing) recordTraceMessageXyzzY(message, TIMING, o, false);
     }
-    /** 
+    /**
      * Invoking this method causes this class to be loaded, which
      * causes all the static trace objects to be defined.  In
      * particular, Trace.trace becomes defined.  That's convenient, in that
@@ -475,7 +475,7 @@
      * Record the Throwable along with a trace message.
      * The trace message is reported at the WARNING level.
      * This is precisely equivalent to warningm(msg, t)
-     */                                   
+     */
     public void warningReportException(Throwable t, String msg) {
         if (warning) recordTraceMessageXyzzY(msg, WARNING, t, false);
     }



1.11      +34 -33    e/src/jsrc/org/erights/e/develop/trace/TraceBuffer.java

Index: TraceBuffer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceBuffer.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- TraceBuffer.java	2000/11/07 06:41:07	1.10
+++ TraceBuffer.java	2001/09/06 09:55:43	1.11
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -24,14 +24,15 @@
  *  Copyright (c) 1997 by Electric Communities.  All Rights Reserved.
  */
 
-import java.util.Date;
-import java.io.PrintWriter;
+import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.exception.PrintStreamWriter;
+
 import java.io.File;
 import java.io.FileNotFoundException;
-import java.io.IOException;
 import java.io.FileOutputStream;
-import org.erights.e.develop.assertion.Assertion;
-import org.erights.e.develop.exception.PrintStreamWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Date;
 
 /**
  * Class that controls storing of TraceMessages in core, for later
@@ -61,10 +62,10 @@
         // initialization of TraceController.  Until that
         // initialization is done, Trace should not be loaded.
         // Therefore, nothing in this constructor should directly or
-        // indirectly use a tracing function. 
+        // indirectly use a tracing function.
 
         // Doing this message initialization this way is pretty icky,
-        // but we can't actually *post* this message because 
+        // but we can't actually *post* this message because
         // the trace system doesn't fully exist yet.
         TraceMessage message = unpostedTraceMessage("Transient buffer begins.",
                                                     WORLD);
@@ -86,17 +87,17 @@
         while (currentSize > maxSize) {
             start = start.next;
             currentSize--;
-        } 
+        }
 
     }
     // Note:  pretty much duplicates TraceLog.changeSize.
     /*package*/ synchronized void changeSize(String value) {
         int newSize;
         if (value.equalsIgnoreCase(DEFAULT_NAME)) {
-            newSize = STARTING_TRACE_BUFFER_SIZE; 
+            newSize = STARTING_TRACE_BUFFER_SIZE;
         } else if (value.equalsIgnoreCase(UNLIMITED_NAME)) {
-            newSize = Integer.MAX_VALUE; 
-        } else try { 
+            newSize = Integer.MAX_VALUE;
+        } else try {
             newSize = Integer.parseInt(value);
         } catch (NumberFormatException e) {
             Trace.trace.errorm(
@@ -111,7 +112,7 @@
                 + "Ignoring.");
             newSize = maxSize;
         }
-              
+
         maxSize = newSize;
         while (currentSize > maxSize) {
             start = start.next;
@@ -121,18 +122,18 @@
 
     /**
      * Dump the buffer to a file.  This is a quasi-temporary function.
-     * It would be better (probably) if the buffer were dumped to a 
+     * It would be better (probably) if the buffer were dumped to a
      * window, which could then be dumped to a file.  TraceDisplay.java
-     * is an early attempt at that, but foundered on lack of time and 
+     * is an early attempt at that, but foundered on lack of time and
      * dependencies on classes that aren't built until long after trace.
      */
     /*package*/ synchronized void dump(String destination) {
         PrintWriter stream;
 
-        // outputDestination is destination, except when 
+        // outputDestination is destination, except when
         // destination is "-", signifying stdout.  In that
-        // case, it's "standard output".  Why not just pass in 
-        // "standard output"?  Because the user elsewhere uses 
+        // case, it's "standard output".  Why not just pass in
+        // "standard output"?  Because the user elsewhere uses
         // "-" to mean standard output, and might choose to use
         // it again here.  She will be unhappy if a file named
         // "-" is created.
@@ -166,7 +167,7 @@
                              outputDestination);
 
        TraceMessageStringifier stringifier = new TraceMessageStringifier();
-       
+
        TraceMessage current = start;
        // The begin/end lines make the dump easier to see when it and the log are
        // going to the same place (typically stdout).
@@ -175,13 +176,13 @@
            String output = stringifier.toString(current);
            stream.println(output);
            current = current.next;
-       }    
+       }
        if (stream.checkError()) {
-           Trace.trace.errorm("Could not dump trace buffer to " + 
+           Trace.trace.errorm("Could not dump trace buffer to " +
                                 outputDestination);
        }
        stream.println("======================= END TRACE BUFFER DUMP =======================");
-       if (stream != PrintStreamWriter.out()) { 
+       if (stream != PrintStreamWriter.out()) {
            stream.close();
        }
     }
@@ -194,7 +195,7 @@
 
        // We want to demarcate the dumped trace in the new log, but
        // not have the message end up in this log, which could be
-       // confusing. 
+       // confusing.
 
        TraceMessage traceMessage = unpostedTraceMessage("======================= BEGIN INTERNAL TRACE BUFFER DUMP =======================",
                                                         ERROR);
@@ -204,12 +205,12 @@
        while (current != null) {
            acceptor.accept(current);
            current = current.next;
-       }    
+       }
        traceMessage = unpostedTraceMessage("======================= END INTERNAL TRACE BUFFER DUMP =======================",
                                            ERROR);
        acceptor.accept(traceMessage);
     }
-    // Note:  because messages are never thrown away, 
+    // Note:  because messages are never thrown away,
     // except by GC, it is safe for this not to be synchronized.
     /*package*/ TraceMessage getFirstMessage() {
         Assertion.test(start != null);



1.4       +26 -26    e/src/jsrc/org/erights/e/develop/trace/TraceCaller.java

Index: TraceCaller.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceCaller.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TraceCaller.java	2001/03/11 04:32:59	1.3
+++ TraceCaller.java	2001/09/06 09:55:43	1.4
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -25,14 +25,14 @@
  *  Copyright (c) 1997 by Electric Communities.  All Rights Reserved.
  */
 
-import java.io.PrintWriter;
 import java.io.CharArrayWriter;
+import java.io.PrintWriter;
 
-/** 
+/**
  * This class finds the user method that posted a trace message and
  * provides accessors to useful information.
  * <p>
- * DANGER: it is HIGHLY dependent on the particular way the 
+ * DANGER: it is HIGHLY dependent on the particular way the
  * implementation prints stack traces. The installation tests
  * ($ROOT/Install) help you check if your VM does
  * things differently. If you change this code, please update the
@@ -69,11 +69,11 @@
 
     /** The file that method is in.  The full pathname is not available. */
     public String fileName = "file?";
-  
+
     /** The line number the trace call is on. */
     public String lineNumber = "line?";
 
-    /** 
+    /**
      * Collect an earlier frame's data based on data in the Exception.
      * If aboveCount is 0, the data from the frame that created the
      * exception is collected. If 1, the data is from the frame above
@@ -84,7 +84,7 @@
      */
     public TraceCaller(Exception exception) {
         String dump = getStackDump(exception);
-        if (TraceController.debugTraceCaller) { 
+        if (TraceController.debugTraceCaller) {
             System.err.println(dump);
         }
         parse(dump);
@@ -93,7 +93,7 @@
     /**
      * String dump is a stack dump as retrieved with getStackDump.
      * Construct the frame data as in previous constructor. This is
-     * used for testing (which is why it's public). 
+     * used for testing (which is why it's public).
      */
     public TraceCaller(String dump) {
         parse(dump);
@@ -106,9 +106,9 @@
         // I could make this static, but then I'd have to worry
         // about multiple threads.
         CharArrayWriter charSink = new CharArrayWriter(400);
-        
+
         PrintWriter writer = new PrintWriter(charSink);
-        
+
         exception.printStackTrace(writer);
         return charSink.toString();
     }
@@ -129,8 +129,8 @@
             // question marks.
         }
     }
-        
 
+
     /*
      * Find the boundaries of the line corresponding to the
      * stack frame we care about in stackDump. Return as a Line object.
@@ -184,7 +184,7 @@
         // Look for immediate duplicate of the targetMethod. In the
         // 1.2.2 Classic VM, the frame for the TraceMessage
         // constructor is mislabelled as another instance of the
-        // targetMethod. 
+        // targetMethod.
         possibleDuplicate = stackDump.indexOf(targetMethod, line.pastEnd+1);
         if (   possibleDuplicate != -1 &&
                stackDump.lastIndexOf('\n', possibleDuplicate) ==line.pastEnd) {
@@ -193,7 +193,7 @@
 
         advance(stackDump, line);
         advance(stackDump, line);
-            
+
         return line;
     }
 
@@ -262,7 +262,7 @@
         if (colon == -1 || colon >= line.pastEnd)
             colon = stackDump.indexOf(',', openParen);
         quitIf(colon == -1 || colon >= line.pastEnd);
-        
+
         int closeParen = stackDump.indexOf(')', colon);
         // XXXX Hack for Metrowerks and Microsoft VM -bs
         if (closeParen == -1 || closeParen >= line.pastEnd)
@@ -284,12 +284,12 @@
         //
         // So, now that the line looks reasonably sane, start picking
         // out components.
-        
+
         methodName = stackDump.substring(start, openParen); // fully qualified.
 
         /* Fetch fully qualified classname. */
         int classMethodDot = methodName.lastIndexOf(".");
-        // no longer used... 
+        // no longer used...
         // className = methodName.substring(0, classMethodDot);
 
         /* Strip methodname down to last element of classname + method. */
@@ -297,7 +297,7 @@
         methodName = methodName.substring(classDot + 1);
 
         if (colon > 0) {
-            // normal bytecodes.  
+            // normal bytecodes.
             fileName = stackDump.substring(openParen + 1, colon);
 
             // A jit might leave the linenumber as "Compiled Code".
@@ -320,5 +320,5 @@
 
     public String toString() {
         return fileName + ":" + methodName + ":" + lineNumber;
-    } 
+    }
 }



1.7       +15 -15    e/src/jsrc/org/erights/e/develop/trace/TraceConstants.java

Index: TraceConstants.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceConstants.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TraceConstants.java	2000/09/20 01:26:08	1.6
+++ TraceConstants.java	2001/09/06 09:55:43	1.7
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -29,13 +29,13 @@
 
 interface TraceConstants {
     String version = "Trace version 1.2 of September 02000";
-    
+
     /** This identifies the TraceMessageAcceptor used for the on-disk log. */
     int LOG = 0;
-    /** 
+    /**
      * This identifies the TraceMessageAcceptor used for the in-core trace and
      * its associated window.
-     */ 
+     */
     int TRACE = 1;
 
     /** The number of different types of TraceMessageAcceptors. */
@@ -43,10 +43,10 @@
 
     String acceptorNames[] = { "log", "trace" };
 
-    /** 
+    /**
      * The different trace thresholds.  See the Trace class for
      * documentation.  There is space between the levels for
-     * expansion.  If you add or delete a level, you must change 
+     * expansion.  If you add or delete a level, you must change
      * Trace.java to add new methods and variables.  (Don't forget the
      * fooReportException deprecated methods.)
      */
@@ -61,7 +61,7 @@
 
     int MAX_THRESHOLD=ERROR;
 
-    /** 
+    /**
      * As a late addition, there's a "timing" boolean that can be
      * set orthogonally from the thresholds.  The above values are
      * overloaded: thresholds, but also identifiers for the original message



1.8       +40 -39    e/src/jsrc/org/erights/e/develop/trace/TraceController.java

Index: TraceController.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceController.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TraceController.java	2000/09/20 01:26:08	1.7
+++ TraceController.java	2001/09/06 09:55:43	1.8
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -25,10 +25,11 @@
  */
 
 
+import org.erights.e.develop.assertion.Assertion;
+
+import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Properties;
-import java.util.Enumeration;
-import org.erights.e.develop.assertion.Assertion;
 
 /**
  * The single trace controller manages all the trace classes.  Most
@@ -61,8 +62,8 @@
     /** Set if stack parsing is to be debugged. */
     static boolean debugTraceCaller = false;
 
-    /** 
-     * A temporary window into the in-core trace buffer.  Null if no 
+    /**
+     * A temporary window into the in-core trace buffer.  Null if no
      * window.
      */
     // Commented out because the display can't be compiled this early.
@@ -77,14 +78,14 @@
     /** Have we already been initialized? */
     static private boolean myStarted = false;
 
-    /** 
+    /**
      * The complete list of acceptors, for use by mediators.  The fact
      * that there's a fixed set of acceptors that can't be changed
      * without recompiling is probably the major rigidity of the code.
      *
      * There are currently two acceptors:  on-disk logs and in-core
      * buffers.  The in-core buffer has two "variants": the buffer
-     * proper and a GUI window into the buffer. 
+     * proper and a GUI window into the buffer.
      */
     static private TraceMessageAcceptor myAcceptors[][];
 
@@ -151,9 +152,9 @@
         if (showIt) {
             Trace.trace.eventm("Request to display the trace buffer.");
             if (myDisplay.isAcceptingMessages()) {
-                Trace.trace.usagem("Request to display the trace " + 
+                Trace.trace.usagem("Request to display the trace " +
                                      "buffer, but it's already being displayed.");
-            } else { 
+            } else {
                 myDisplay.pleaseDisplay(myBuffer.getFirstMessage());
             }
         } else {
@@ -172,14 +173,14 @@
      */
     static private void changeOneDefault(int acceptorIndex, int newThreshold) {
         myDefaultThresholds[acceptorIndex] = newThreshold;
-        
+
         Trace.trace.eventm("The new default threshold for " +
                           acceptorNames[acceptorIndex] + " is " +
                           TraceLevelTranslator.terse(newThreshold));
 
         Enumeration e = myTraceMediators.elements();
         while (e.hasMoreElements()) {
-            TraceSubsystemMediator mediator = 
+            TraceSubsystemMediator mediator =
                 (TraceSubsystemMediator) e.nextElement();
             if (mediator.deferToDefaultThreshold[acceptorIndex]) {
                 mediator.setOneThreshold(acceptorIndex, newThreshold,
@@ -187,8 +188,8 @@
             }
         }
     }
-    
-    /** 
+
+    /**
      * Change a specific TraceMessageMediator to have its own
      * trace priority threshold OR change it to resume tracking
      * the default.
@@ -200,7 +201,7 @@
         if (value.equalsIgnoreCase(DEFAULT_NAME)) {
             // set back to default threshold, whatever that is.
             findOrCreateMediator(subsystem).setOneThreshold(
-                acceptorIndex, 
+                acceptorIndex,
                 myDefaultThresholds[acceptorIndex],
                 FROM_DEFAULT);
         } else {
@@ -234,7 +235,7 @@
      * before "publishing" it.
      *
      * @param aTraceErrorWatcher the object to be informed of an error.
-     * 
+     *
      * @param add true if the object is to be added, false if it's to
      * be removed.  It's not an error to add without first removing, or
      * to remove without first adding, but it does provoke a warning.
@@ -244,14 +245,14 @@
     {
         if (add) {
             Trace.trace.usagem("Adding an object that watches for errors.");
-            if (myTraceErrorWatcher != null) { 
-                Trace.trace.warningm("Overriding previous TraceErrorWatcher", 
+            if (myTraceErrorWatcher != null) {
+                Trace.trace.warningm("Overriding previous TraceErrorWatcher",
                                      myTraceErrorWatcher);
             }
             myTraceErrorWatcher = aTraceErrorWatcher;
         } else {
             Trace.trace.usagem("No object will watch for errors.");
-            if (myTraceErrorWatcher == null) { 
+            if (myTraceErrorWatcher == null) {
                 Trace.trace.warningm("TraceErrorWatcher has already been removed");
             } else if (myTraceErrorWatcher != aTraceErrorWatcher) {
                 Trace.trace.warningm("A TraceErrorWatcher was removed by someone other than itself.");
@@ -280,9 +281,9 @@
         }
         return mediator;
     }
-    
-    /** 
-     * Invoke this to tell the TraceController that a display is 
+
+    /**
+     * Invoke this to tell the TraceController that a display is
      * ready to use.
      */
     static public void mayUseUI() {
@@ -343,7 +344,7 @@
      * Does return.
      * <p>
      * It is a (non-fatal) error if no object has registered as a
-     * TraceErrorWatcher. 
+     * TraceErrorWatcher.
      */
     static public void notifyOptional() {
         if (myTraceErrorWatcher != null) {
@@ -373,7 +374,7 @@
         }
     }
 
-    /** 
+    /**
      * If the given Key names a tracing property, process its value.
      * It is not an error for the key to have nothing to do with
      * tracing; in that case, it's ignored.
@@ -407,7 +408,7 @@
                 logProp = true;
                 afterUnderbar = originalKey.substring(9);
             }
-            
+
             if (bufferProp) {
                 if (afterUnderbar.equalsIgnoreCase(DEFAULT_NAME)) {
                     changeOneDefault(TRACE, TraceLevelTranslator.toInt(value));
@@ -448,7 +449,7 @@
         } catch (IllegalArgumentException e) {
             Trace.trace.shred(e, "The exception has already been logged.");
         }
-        
+
         // Other properties are ignored, because this method may be
         // called from setProperties, which is given a whole mess of
         // properties, some irrelevant to Trace.
@@ -487,7 +488,7 @@
      * governed by the default thresholds.)
      * <p>
      * Note: This routine may be called before the user interface is
-     * available.  This allows on-disk logging to be useful in the 
+     * available.  This allows on-disk logging to be useful in the
      * case the system fails before the UI is initialized.
      *
      * @param p the initial set of properties provided by the user.
@@ -498,8 +499,8 @@
             Trace.trace.errorm("The tracing system is being started for the second time.\n"+
                                "Ignoring the second start.", -1);
             return;
-        }       
-                     
+        }
+
         myStarted = true;
         Trace.trace.usagem("Tracing system being started.");
 
@@ -507,9 +508,9 @@
         if (!p.containsKey("TraceLog_write")) {
             p.put("TraceLog_write", "true");
         }
-        
-        if (!p.containsKey("TraceLog_name") && 
-            !p.containsKey("TraceLog_dir") && 
+
+        if (!p.containsKey("TraceLog_name") &&
+            !p.containsKey("TraceLog_dir") &&
             !p.containsKey("TraceLog_tag")) {
             //Trace.trace.usagem("TEMPORARY: TraceLog set to standard " +
             //                   "output for backwards compatibility.");



1.4       +16 -15    e/src/jsrc/org/erights/e/develop/trace/TraceDateToString.java

Index: TraceDateToString.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceDateToString.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TraceDateToString.java	2001/07/26 15:28:07	1.3
+++ TraceDateToString.java	2001/09/06 09:55:43	1.4
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -24,10 +24,11 @@
  */
 
 
-import java.util.Date;
 import org.erights.e.develop.format.ETimeFormat;
+
+import java.util.Date;
 
-/** 
+/**
  * Convert java.util.Dates into suitable Strings for the Trace system.
  * <p>
  * Note that times are printed in local time rather than GMT. People
@@ -42,14 +43,14 @@
  * bottlenecks in this code.
  * <p>
  * Changed to use ISO8601 according to {@link ETimeFormat}.
- * 
+ *
  * @author Brian Marick
  * @author Mark Miller (modified to use ISO8601)
  */
 class TraceDateToString {
 
-    /** 
-     * XXX should fix the tracing package to use 'long millis' instead of 
+    /**
+     * XXX should fix the tracing package to use 'long millis' instead of
      * 'Date date'
      */
     /*package*/ final static String dateTimeString (Date date) {
@@ -58,7 +59,7 @@
 
     /**
      * This must return one that can be used within a filename, so
-     * convert ":"s to "_"s. 
+     * convert ":"s to "_"s.
      */
     /*package*/ final static String terseCompleteDateString(Date date) {
         return ETimeFormat.formatTime(date.getTime()).replace(':','_');



1.5       +9 -9      e/src/jsrc/org/erights/e/develop/trace/TraceErrorWatcher.java

Index: TraceErrorWatcher.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceErrorWatcher.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TraceErrorWatcher.java	1999/05/13 22:33:16	1.4
+++ TraceErrorWatcher.java	2001/09/06 09:55:43	1.5
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.7       +12 -12    e/src/jsrc/org/erights/e/develop/trace/TraceExceptionNoticer.java

Index: TraceExceptionNoticer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceExceptionNoticer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TraceExceptionNoticer.java	2000/02/07 20:09:21	1.6
+++ TraceExceptionNoticer.java	2001/09/06 09:55:43	1.7
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -34,21 +34,21 @@
  * Class for exception handling of trace.
  */
 class TraceExceptionNoticer implements ExceptionNoticer {
-    
+
     /**
      *
      */
     TraceExceptionNoticer() {
         ExceptionMgr.setExceptionNoticer(this);
     }
-    
+
     /**
      *
      */
     public void noticeReportedException(String msg, Throwable t) {
         Trace.eruntime.errorm(msg, t);
     }
-    
+
     /**
      *
      */



1.6       +12 -12    e/src/jsrc/org/erights/e/develop/trace/TraceLevelTranslator.java

Index: TraceLevelTranslator.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceLevelTranslator.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TraceLevelTranslator.java	2000/02/08 01:18:41	1.5
+++ TraceLevelTranslator.java	2001/09/06 09:55:43	1.6
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -31,7 +31,7 @@
  */
 class TraceLevelTranslator implements TraceConstants{
 
-    /** 
+    /**
      * Convert tracing thresholds into three-character synonyms.
      * Used when printing trace messages, so it does return the
      * "TIM" tag to denote a timing message.
@@ -55,7 +55,7 @@
                 retval = "EVN";
                 break;
             case DEBUG:
-                retval = "DBG"; 
+                retval = "DBG";
                 break;
             case VERBOSE:
                 retval = "VRB";
@@ -70,7 +70,7 @@
         }
         return retval;
     }
-    /** 
+    /**
      * Convert a string into one of the numeric trace levels.  Because
      * this method is used only to identify priority thresholds, it
      * does not return the TIMING pseudo-level.  (See TraceConstants.java.)



1.9       +52 -51    e/src/jsrc/org/erights/e/develop/trace/TraceLog.java

Index: TraceLog.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceLog.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- TraceLog.java	2000/11/07 06:41:07	1.8
+++ TraceLog.java	2001/09/06 09:55:43	1.9
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -24,14 +24,15 @@
  *  Copyright (c) 1997 by Electric Communities.  All Rights Reserved.
  */
 
-import java.util.Vector;
-import java.util.Enumeration;
 import org.erights.e.develop.assertion.Assertion;
 import org.erights.e.develop.exception.PrintStreamWriter;
 
+import java.util.Enumeration;
+import java.util.Vector;
+
 /**
  * This class manages dumping of messages to the semi-permanent
- * on-disk log. 
+ * on-disk log.
  */
 class TraceLog implements TraceMessageAcceptor, TraceConstants {
     /**
@@ -40,7 +41,7 @@
      */
     private int myBackupAction = STARTING_LOG_BACKUP_ACTION;
 
-    /** 
+    /**
      * Determine whether a log file should be written at all.
      */
     private boolean myWrite = STARTING_LOG_WRITE;
@@ -54,7 +55,7 @@
     /** Number of characters in the current log file. */
     private long  myCurrentSize;
 
-    /** 
+    /**
      * The log to which messages are currently flowing.  Initially
      * null, but all messages will normally be queued until
      * it's pointed at a log file or stdout.  Messages will be
@@ -66,7 +67,7 @@
      * The user can change the characteristics of this log descriptor,
      * then redirect the log to it.  Characteristics are changed via
      * properties like "TraceLog_tag".  Redirection is done via
-     * "TraceLog_reopen".  
+     * "TraceLog_reopen".
      */
     private TraceLogDescriptor myPending = new TraceLogDescriptor();
 
@@ -83,18 +84,18 @@
     /** This variable is used to count accurately the size of the log.
         Note that I don't try to catch a SecurityException if one occurs.
         We'll have other, bigger, problems if that happens. */
-    static private int lineSeparatorLength = 
+    static private int lineSeparatorLength =
         System.getProperty("line.separator").length();
 
 // QUEUE MANAGEMENT
 
     /**
      * Messages are queued here before the Log is initialized and
-     * while switching to a new logfile.  
+     * while switching to a new logfile.
      */
     private Vector queuedMessages;
 
-    /** 
+    /**
      * Construct the trace log.  Queue messages until setup is
      * complete.
      */
@@ -103,7 +104,7 @@
         // initialization of TraceController.  Until that
         // initialization is done, Trace should not be loaded.
         // Therefore, nothing in this constructor should directly or
-        // indirectly use a tracing function. 
+        // indirectly use a tracing function.
         startQueuing();
     }
 
@@ -123,7 +124,7 @@
         }
     }
 
-    /** that we will 
+    /** that we will
      * Take a message and log it.  The queue of pending messages
      * maintained before setup is complete is bypassed, because this
      * is the method used to drain that queue.
@@ -135,7 +136,7 @@
         myCurrent.stream.println(output);
         // Note: there's little point in checking for an
         // output error.  We can't put the trace in the log,
-        // and there's little chance the user would see it 
+        // and there's little chance the user would see it
         // in the trace buffer.  So we ignore it, with regret.
 
         myCurrentSize += output.length() + lineSeparatorLength;
@@ -162,7 +163,7 @@
             Trace.trace.shred(e, "Exception has already been logged.");
 
             myCurrent = TraceLogDescriptor.stdout;
-            try { 
+            try {
                 myCurrent.startUsing(IRRELEVANT);
             } catch (Exception ignore) {
                 Assertion.fail("Exceptions shouldn't happen opening stdout.");
@@ -182,7 +183,7 @@
      * Change how a full logfile handles its backup files. "one" or
      * "1" means that there will be at most one backup file, which will
      * be overwritten if needed.  "many" means a new backup file with
-     * a new name should be created each time the base file fills up. 
+     * a new name should be created each time the base file fills up.
      * Has effect when the next log file fills up.
      */
     /*package*/ synchronized void changeBackupFileHandling(String newBehavior) {
@@ -217,7 +218,7 @@
     }
 
     /**
-     * Change the new maximum allowable size for a logfile. 
+     * Change the new maximum allowable size for a logfile.
      * Has effect on the current logfile.  Note that the trace system
      * does not prevent the log from exceeding this size; it only opens
      * a new log file as soon as it does.
@@ -226,10 +227,10 @@
     /*package*/ synchronized void changeSize(String value) {
         long newSize;
         if (value.equalsIgnoreCase(DEFAULT_NAME)) {
-            newSize = STARTING_LOG_SIZE_THRESHOLD; 
+            newSize = STARTING_LOG_SIZE_THRESHOLD;
         } else if (value.equalsIgnoreCase(UNLIMITED_NAME)) {
             newSize = Long.MAX_VALUE;
-        } else try { 
+        } else try {
             newSize = Long.parseLong(value);
         } catch (NumberFormatException e) {
             Trace.trace.errorm(
@@ -244,7 +245,7 @@
                 + "Try " + SMALLEST_LOG_SIZE_THRESHOLD + ".");
             newSize = myMaxSize;
         }
-              
+
         myMaxSize = newSize;
         if (myCurrentSize > myMaxSize) {
             handleFullLog();  // note that it's OK if log is to stdout.
@@ -285,7 +286,7 @@
     /*package*/ synchronized void changeWrite(String value) {
         Assertion.test(value != null);
         if (value.equalsIgnoreCase("true")) {
-            if (myWrite) { 
+            if (myWrite) {
                 Trace.trace.warningm("Log writing enabled twice in a row.");
             } else {
                 myWrite = true;
@@ -294,7 +295,7 @@
                 if (mySetupComplete) {
                     Trace.trace.debugm("Log will be opened.");
                     beginLogging();
-                } 
+                }
                 // else
                     // do nothing - setupIsComplete() will handle this case.
             }
@@ -306,10 +307,10 @@
                 Trace.trace.eventm("Logging disabled.");
                 drainQueue(); // either write messages or discard them
                 myWrite = false;
-                if (mySetupComplete) { 
+                if (mySetupComplete) {
                     myCurrent.stopUsing();
                     myCurrent = null;
-                } else { 
+                } else {
                     Assertion.test(myCurrent == null);
                 }
             }
@@ -326,7 +327,7 @@
      * whether queuing is in progress.
      */
     private final void drainQueue() {
-        if (Trace.trace != null) { 
+        if (Trace.trace != null) {
             Trace.trace.debugm("Draining queue; write = " + myWrite +
                                ", isQueuing = " + isQueuing());
         }
@@ -336,7 +337,7 @@
                 TraceMessage message = (TraceMessage)e.nextElement();
                 acceptBypassingQueue(message);
             }
-        } 
+        }
         /*
         else if (isQueuing()) {
             if (Trace.trace != null && Trace.trace.debug && Trace.ON) {
@@ -376,7 +377,7 @@
             Trace.trace.shred(e, "Exception has already been logged.");
             myCurrent = TraceLogDescriptor.stdout;
             myCurrentSize = 0;
-            try { 
+            try {
                 myCurrent.startUsing(IRRELEVANT);
             } catch (Exception ignore) {
                 Assertion.fail("No exceptions when opening stdout.");
@@ -395,7 +396,7 @@
     */
 
 // MISC
-    /** 
+    /**
      * Call when the logfile fills up.  Reopens the same log file.
      * <P>
      * Standard output can never fill up, so this routine is a no-op
@@ -417,7 +418,7 @@
      * Call to switch to a log when another - with a different name -
      * is currently being used.
      * If the pending log cannot be opened, the current log continues
-     * to be used.  
+     * to be used.
      * <p>
      * Before the old log is closed, a USAGE message is logged,
      * directing the reader to the new log.  Trace messages may be
@@ -468,9 +469,9 @@
      * those queued messages, depending on what the user wants.
      * <p>
      * Queuing also happens transitorily while logs are being
-     * switched. 
+     * switched.
      */
-    private final boolean isAcceptingMessages() { 
+    private final boolean isAcceptingMessages() {
         return myWrite || isQueuing();
     }
     private final boolean isQueuing() {
@@ -486,18 +487,18 @@
      * <p>
      * It's called before setup is complete and writing is not
      * enabled.  The behavior is the same as TraceLog_write [the preferred
-     * interface]. 
+     * interface].
      * <p>
      * It's called before setup is complete and writing is
      * enabled.  The effect is that of calling TraceLog_write twice (a
-     * warning). 
+     * warning).
      * <p>
      * It's called after setup is complete and writing is not
      * enabled. The behavior is the same as calling TraceLog_write [again,
      * the preferred interface, because you're not "reopening"
-     * anything]. 
+     * anything].
      * <p>
-     * It's called after setup is complete and writing is 
+     * It's called after setup is complete and writing is
      * enabled.  This is the way it's supposed to be used.  The
      * current log is closed and the pending log is opened.
      */
@@ -506,7 +507,7 @@
             changeWrite("true");
         } else if (myPending.alike(myCurrent)) {
             shutdownAndSwap();
-        } else { 
+        } else {
             hotSwap();
         }
     }
@@ -532,7 +533,7 @@
      * The old file must be closed before it can be renamed to a
      * backup version.  (This is either a Windows or java.io
      * restriction.)  If the pending log cannot be opened, standard
-     * output is used. 
+     * output is used.
      * <p>
      * Before the old log is closed, a USAGE message is logged,
      * directing the reader to the new log.  Trace messages may be
@@ -540,19 +541,19 @@
      * before the method returns.
      * <p>
      * This routine can be called to backup a full logfile, or to
-     * explicitly reopen the same logfile (via TraceLog_reopen=true). 
+     * explicitly reopen the same logfile (via TraceLog_reopen=true).
      */
     private void shutdownAndSwap() {
         Assertion.test(myCurrent != null);
         Assertion.test(myCurrent.stream != null);
         Assertion.test(!isQueuing());
 
-        // In the old log, say what will happen.  Can't log it 
+        // In the old log, say what will happen.  Can't log it
         // while it's happening, because that all goes to the
         // new log.
         myCurrent.describeFutureBackupAction(myBackupAction);
 
-        // Stash old log name.  This is used if reopening fails and 
+        // Stash old log name.  This is used if reopening fails and
         // further logging is blurted to stdout.
         String lastLog = myCurrent.printName();
 
@@ -566,7 +567,7 @@
             Trace.trace.shred(e, "Exception has already been logged.");
             myCurrent = TraceLogDescriptor.stdout;
             myCurrentSize = 0;
-            try { 
+            try {
                 myCurrent.startUsing(IRRELEVANT);
             } catch (Exception ignore) {
                 Assertion.fail("No exceptions when opening stdout.");
@@ -575,7 +576,7 @@
             Trace.trace.worldm("Previous log was " + lastLog + ".");
             return;
         }
- 
+
         myCurrent = myPending;
         myCurrentSize = 0;
         Trace.trace.usagem("Logging continues on " +
@@ -584,7 +585,7 @@
         myPending = (TraceLogDescriptor) myCurrent.diverge();
         drainQueue();
     }
-    /** 
+    /**
      * Redirect trace messages to a queue.  Used while switching to a
      * new log file, or before setup is complete.
      * <p>
@@ -595,6 +596,6 @@
         // because it's called from the constructor.
         if (! isQueuing()) {
             queuedMessages = new Vector();
-        } 
+        }
     }
 }



1.11      +48 -47    e/src/jsrc/org/erights/e/develop/trace/TraceLogDescriptor.java

Index: TraceLogDescriptor.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceLogDescriptor.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- TraceLogDescriptor.java	2000/11/07 06:41:07	1.10
+++ TraceLogDescriptor.java	2001/09/06 09:55:43	1.11
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -24,19 +24,20 @@
  *  Copyright (c) 1997 by Electric Communities.  All Rights Reserved.
  */
 
+import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.exception.PrintStreamWriter;
+
 import java.io.File;
-import java.io.PrintWriter;
-import java.io.FileOutputStream;
 import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.PrintWriter;
 import java.util.Date;
-import org.erights.e.develop.assertion.Assertion;
-import org.erights.e.develop.exception.PrintStreamWriter;
 
 /**
  * This class describes the file system interface to a log file.
  * The standard format is <tag>.<date>.txt.  The standard backup
- * filename format is then <tag>.<date>.<sequence>.txt. 
+ * filename format is then <tag>.<date>.<sequence>.txt.
  * <p>
  * The entire format may be overridden, the tag may be changed, or the
  * class can be instructed to use PrintStreamWriter.out().
@@ -45,7 +46,7 @@
  * includes renaming old versions.
  */
 class TraceLogDescriptor implements Cloneable, TraceConstants {
-    
+
     /**
      * The date this trace system was initialized; used as part of the
      * standard name format.
@@ -56,14 +57,14 @@
     private File dir = STARTING_LOG_DIR;
 
     /**
-     * The 'tag' is the first component of the log filename.  
+     * The 'tag' is the first component of the log filename.
      */
     private String tag = STARTING_LOG_TAG;
 
     /** Determine whether PrintStreamWriter.out() is used instead of a file. */
     private boolean useStdout = false;
 
-    /** 
+    /**
      * True if the user overrode the standard tag.date.txt format.
      */
     private boolean usePersonalFormat = false;
@@ -73,10 +74,10 @@
 
     /** The stream open to the log.  Clients print to this. */
     public PrintWriter stream;
+
 
-    
-    /** 
-     * This log descriptor always represents standard output. 
+    /**
+     * This log descriptor always represents standard output.
      * It should never be modified.  It starts out "not in use".
      */
     static /*package*/ TraceLogDescriptor stdout;
@@ -86,9 +87,9 @@
         stdout.usePersonalFormat = false;
         stdout.useStdout = true;
     }
-        
 
-    /** 
+
+    /**
      * Return the file to use as a backup.
      * Stdout is never backed up, so useStdout should be false.
      * @param clashAction determines which name the backup file will
@@ -102,7 +103,7 @@
             return TraceVersionNamer.factory(file).nextAvailableVersion();
         } else if (clashAction == OVERWRITE) {
             return TraceVersionNamer.factory(file).firstVersion();
-        } else { 
+        } else {
             Assertion.fail("Bad clashAction " + clashAction);
             return null;
         }
@@ -128,7 +129,7 @@
         }
     }
 
-    /** 
+    /**
      * Say what renameToBackupFile will try to do when it's called
      * by startUsing. This is used
      * when the log file will be closed before the renaming is done.
@@ -136,7 +137,7 @@
      */
     /*package*/ void describeFutureBackupAction(int clashAction) {
         if (useStdout) return;  // No backup file.
-        
+
         File nextFile = desiredLogFile();
         if (!nextFile.exists()) return;         // no backup.
 
@@ -144,8 +145,8 @@
 
         Trace.trace.usagem("The file will be backed up as " + backupFile);
     }
-    
-    /** 
+
+    /**
      * Given the current state of this object's fields, construct the
      * file the user wants.  It is a program error to call this
      * routine if the user wants PrintStreamWriter.out(), not a file.
@@ -174,11 +175,11 @@
         return printName().equals(other.printName());
     }
 
-    /*package*/ boolean inUse() { 
+    /*package*/ boolean inUse() {
         return stream != null;
     }
-    
-    /** 
+
+    /**
      * Return a name of this descriptor, suitable for printing.
      * PrintStreamWriter.out() is named "standard output".  Real files are named
      * by their canonical pathname (surrounded by single quotes).
@@ -195,26 +196,26 @@
             try {
                 canonical = desiredLogFile().getCanonicalPath();
             } catch (IOException e) {
-                // The canonical path was undiscoverable.  Punt by 
+                // The canonical path was undiscoverable.  Punt by
                 // returning the absolute pathname.
                 canonical = desiredLogFile().getAbsolutePath();
             }
             if (canonical == null) {
                 // Quoth the java language spec:
-                // "The canonical form of a pathname of a nonexistent 
+                // "The canonical form of a pathname of a nonexistent
                 // file may not be defined."
                 // What happens in that case is ALSO not defined.  Null
                 // seems like a possibility.
                 canonical = desiredLogFile().getAbsolutePath();
             }
-             
+
             return "'" + canonical + "'";
         }
     }
-    
+
 // UTILITIES
 
-    /** 
+    /**
      * Attempt to rename this file to a backup file with a version number.
      * Returns true iff the rename succeeds.  The name of the backup
      * file is constructed by a TraceVersionName, using the current
@@ -243,7 +244,7 @@
             if (backupFile.exists()) {  // clashAction == OVERWRITE
                 if (!backupFile.delete()) {
                     Trace.trace.warningm("The previous version of " +
-                                     file + " could not be put in backup " + 
+                                     file + " could not be put in backup " +
                                      "file " + backupFile + " because the " +
                                      " existing file could not be deleted.");
                     return false;
@@ -253,7 +254,7 @@
             }
         } catch (SecurityException e) {
             Trace.trace.warningm("The previous version of " +
-                                 file + " could not be put in backup " + 
+                                 file + " could not be put in backup " +
                                  "file " + backupFile + " because the " +
                                  " existing file could not be deleted.");
             return false;
@@ -267,7 +268,7 @@
                                      backupFile);
             }
             return renamed;
-        } catch (SecurityException e) { 
+        } catch (SecurityException e) {
             Trace.trace.warningm(file +
                                  " could not be renamed to backup " +
                                  backupFile +
@@ -302,7 +303,7 @@
      * not using the default extension.  It does not affect the directory
      * the file is placed in.
      */
-    /*package*/ void setName(String value) { 
+    /*package*/ void setName(String value) {
         Assertion.test(value != null);
         if (value.equals("-")) {
             useStdout = true;
@@ -319,7 +320,7 @@
 
     /**
      * The tag is the initial part of the standard filename.
-     * Setting this implies that the date should be included in 
+     * Setting this implies that the date should be included in
      * the filename.
      */
     /*package*/ void setTag(String value) {
@@ -332,14 +333,14 @@
 
     /**
      * Enables this LogDescriptor for use.  Most obvious effect is
-     * that 'stream' is initialized.  
+     * that 'stream' is initialized.
      *
      * @param clashAction determines what to do if the target logfile
      * already exists.  The two options are ADD (to add a new backup file)
      * or OVERWRITE (to overwrite an existing one).
      * IRRELEVANT should be used when
      * the destination is <em>known</em> to be standard output, which never
-     * clashes. 
+     * clashes.
      *
      * @exception Exception is thrown if a logfile could not be
      * opened.  The contents of the exception are irrelevant, as this
@@ -357,7 +358,7 @@
         Assertion.test(clashAction == ADD || clashAction == OVERWRITE);
 
         File nextFile = desiredLogFile();
-        Trace.trace.eventm("Logging has been directed to '" + 
+        Trace.trace.eventm("Logging has been directed to '" +
                           nextFile + "'.");
 
         if (nextFile.exists()) {
@@ -377,17 +378,17 @@
             stream = new PrintWriter(new FileOutputStream(nextFile), true);
         } catch (SecurityException e) {
             Trace.trace.errorm(
-                "Security exception when opening new trace file '" + 
+                "Security exception when opening new trace file '" +
                 nextFile + "'.");
             throw e;
         } catch (FileNotFoundException e) {
             Trace.trace.errorm(
-                "Could not open new trace file '" + 
+                "Could not open new trace file '" +
                 nextFile + "'.");
             throw e;
         } catch (IOException e) {
             Trace.trace.errorm(
-                "Unknown error when opening new trace file '" + 
+                "Unknown error when opening new trace file '" +
                 nextFile + "'.");
             throw e;
         }
@@ -398,7 +399,7 @@
      * that 'stream' is now null.  Behind the scenes, any open file is
      * closed.
      * You can alternate stopUsing() and
-     * startUsing() an arbitrary number of times.  
+     * startUsing() an arbitrary number of times.
      */
     /*package*/ void stopUsing() {
         Assertion.test(inUse());



1.6       +13 -13    e/src/jsrc/org/erights/e/develop/trace/TraceMessage.java

Index: TraceMessage.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceMessage.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TraceMessage.java	2000/09/20 01:26:08	1.5
+++ TraceMessage.java	2001/09/06 09:55:43	1.6
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -27,7 +27,7 @@
 //import org.erights.e.develop.assertion.*;
 import java.util.Date;
 
-/** 
+/**
  * This class describes a trace message.  Its final destination could
  * be an on disk log (called "the log"), or an in-core buffer (called
  * "the buffer") to be retained until the user asks for it.
@@ -35,14 +35,14 @@
 class TraceMessage {
 
     // DANGER                                                   DANGER
-    // If you add new data members, please note that TraceBuffer.java 
+    // If you add new data members, please note that TraceBuffer.java
     // constructs its own private TraceMessages (in unpostedTraceMessage).
     // That code may also need to be updated.
     // DANGER                                                   DANGER
 
     /** The subsystem is the larger body of code the message applies to. */
     public String subsystem;
-    
+
     /**
      * The Date at which the method was sent (approximately).  The Date
      * is not attached to the message until the message leaves the vat.
@@ -82,7 +82,7 @@
     }
 
     /**
-     * Default string representation displays all fields. 
+     * Default string representation displays all fields.
      */
     public String toString() {
         return new TraceMessageStringifier().toString(this);



1.6       +15 -15    e/src/jsrc/org/erights/e/develop/trace/TraceMessageAcceptor.java

Index: TraceMessageAcceptor.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceMessageAcceptor.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TraceMessageAcceptor.java	2000/02/07 20:09:22	1.5
+++ TraceMessageAcceptor.java	2001/09/06 09:55:43	1.6
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -29,7 +29,7 @@
 /**
  * This interface represents objects that accept messages and do
  * something useful with them. A TraceMessageAcceptor lives in two
- * main states: prior to its starting environment being set up, and 
+ * main states: prior to its starting environment being set up, and
  * after that environment is set up.  A TraceMessageAcceptor <i>may</i>
  * choose to accept messages prior to the completion of setup, but it
  * may not make them available to a user.
@@ -37,7 +37,7 @@
 
 interface TraceMessageAcceptor
 {
-    /** 
+    /**
      * Accept a message and do whatever is appropriate to make it
      * visible to a user, either now or later.
      * <p>
@@ -50,14 +50,14 @@
      * by another thread.
      */
     void accept(TraceMessage message);
-     
-    /** 
+
+    /**
      * After this call, the TraceMessageAcceptor must obey settings from
-     * the environment.  Before this call, it must defer taking any 
+     * the environment.  Before this call, it must defer taking any
      * visible action, because it can't yet know what action is appropriate.
      * Note that the message acceptor may (is encouraged to) accept messages
      * before setup is complete, because some of those trace messages might
-     * be useful.  
+     * be useful.
      * <p>
      * It is an error to call this method more than once.
      */



1.12      +16 -15    e/src/jsrc/org/erights/e/develop/trace/TraceMessageStringifier.java

Index: TraceMessageStringifier.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceMessageStringifier.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- TraceMessageStringifier.java	2001/07/24 11:52:16	1.11
+++ TraceMessageStringifier.java	2001/09/06 09:55:43	1.12
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -26,10 +26,11 @@
 
 //import org.erights.e.develop.assertion.*;
 //import ec.e.run.TraceMessage;
-import java.io.StringWriter;
-import java.io.PrintWriter;
 import org.erights.e.develop.exception.ExceptionMgr;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
 
 /**
  * This class is used to convert a trace message into a string.  It
@@ -92,7 +93,7 @@
     /*package*/ void showTime(boolean value) {
         myShowTime = value;
     }
-    /** 
+    /**
      * Convert the given message into a string, obeying 'show'
      * controls set earlier.
      */
@@ -100,10 +101,10 @@
         buffer.setLength(0);
         buffer.append("=== ");
         //MSM: XXX should merge these flags now that we've merged their meaning
-        if (myShowDate || myShowTime) { 
+        if (myShowDate || myShowTime) {
             buffer.append(TraceDateToString.dateTimeString(message.date));
             buffer.append(' ');
-        } 
+        }
         if (myShowLocation) {
             if (TraceController.debugTraceCaller) {
                 System.err.println("****************************************");
@@ -122,7 +123,7 @@
         if (myShowLevel) {
             buffer.append(TraceLevelTranslator.terse(message.level));
         }
-        
+
         // Experimenting with multi-line output.
         if (myShowDate || myShowTime || myShowLocation) {
             buffer.append(lineSeparator);



1.8       +13 -12    e/src/jsrc/org/erights/e/develop/trace/TraceSubsystemMediator.java

Index: TraceSubsystemMediator.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceSubsystemMediator.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TraceSubsystemMediator.java	2000/09/20 01:26:08	1.7
+++ TraceSubsystemMediator.java	2001/09/06 09:55:43	1.8
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -24,10 +24,11 @@
  *  Copyright (c) 1997 by Electric Communities.  All Rights Reserved.
  */
 
-import java.util.Vector;
-import java.util.Enumeration;
-import java.util.Date;
 import org.erights.e.develop.assertion.Assertion;
+
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.Vector;
 
 /**
  * This class mediates between the Trace objects that send messages



1.5       +12 -12    e/src/jsrc/org/erights/e/develop/trace/TraceTxtVersionNamer.java

Index: TraceTxtVersionNamer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceTxtVersionNamer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TraceTxtVersionNamer.java	2000/02/08 01:18:43	1.4
+++ TraceTxtVersionNamer.java	2001/09/06 09:55:43	1.5
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -33,7 +33,7 @@
  */
 
 class TraceTxtVersionNamer extends TraceVersionNamer
-        implements TraceConstants { 
+        implements TraceConstants {
 
     /** The length of the ".txt" extension, for convenience. */
     static private final int extlen = LOG_EXTENSION.length();
@@ -53,11 +53,11 @@
                 filename.substring(0, filename.length() - extlen).
                          substring(myBasename.length());
 
-        try { 
+        try {
             return Integer.parseInt(possibleSeqString);
         } catch (NumberFormatException e) {
             Trace.trace.shred(e, filename + " is not a backup file.");
-            return -1; 
+            return -1;
         }
     }
     /*package*/ boolean mightHaveSeq(String filename) {



1.8       +24 -23    e/src/jsrc/org/erights/e/develop/trace/TraceVersionNamer.java

Index: TraceVersionNamer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceVersionNamer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TraceVersionNamer.java	2000/02/08 01:18:43	1.7
+++ TraceVersionNamer.java	2001/09/06 09:55:43	1.8
@@ -1,20 +1,20 @@
 package org.erights.e.develop.trace;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -24,11 +24,12 @@
  *  Copyright (c) 1997 by Electric Communities.  All Rights Reserved.
  */
 
-import java.io.File;
-import java.io.PrintWriter;
 import org.erights.e.develop.assertion.Assertion;
 import org.erights.e.develop.exception.PrintStreamWriter;
 
+import java.io.File;
+import java.io.PrintWriter;
+
 /**
  * This class and its subclasses know how to construct backup version
  * Files for given Files.
@@ -36,7 +37,7 @@
  * This class constructs backup names by appending sequence numbers to
  * the original name.
  */
-class TraceVersionNamer implements TraceConstants { 
+class TraceVersionNamer implements TraceConstants {
     /** The file for which a version number is being created. */
     /*package*/ File myFile;
 
@@ -46,16 +47,16 @@
     /** A directory that contains the given file. */
     /*package*/ String myDir;
 
-    /** 
+    /**
      * The basename is that part of the file that precedes a sequence
-     * number. 
+     * number.
      */
     /*package*/ String myBasename;
 
     /**
      * Create a TraceVersionNamer from the given file.  The file
      * object must have a directory and name component.  It may be absolute
-     * or relative.  
+     * or relative.
      */
     TraceVersionNamer(File aFile) {
         myFile = aFile;
@@ -64,10 +65,10 @@
 
         myDir = myFile.getParent();
         Assertion.test(myDir != null);
-        
+
         myBasename = fetchBasename();
         Trace.trace.debugm("Finding next version of " +
-                          myFile + "(" + 
+                          myFile + "(" +
                           myDir + " " + myName +
                           " " + myBasename + ")");
     }
@@ -87,9 +88,9 @@
             return new TraceVersionNamer(file);
         }
     }
-    /** 
+    /**
      * The basename of a backup version, including any trailing '.'
-     * separating the basename from the sequence number. 
+     * separating the basename from the sequence number.
      */
     /*package*/ String fetchBasename() {
         return myName + ".";
@@ -112,11 +113,11 @@
     /*package*/ int getSeq(String filename) {
         String possibleSeqString = filename.substring(myBasename.length());
 
-        try { 
+        try {
             return Integer.parseInt(possibleSeqString);
         } catch (NumberFormatException e) {
             Trace.trace.shred(e, filename + " is not a backup file.");
-            return -1; 
+            return -1;
         }
     }
     static public void main(String[] args) {
@@ -135,7 +136,7 @@
         out.println(v.nextAvailableVersion());
         out.println(v.firstVersion());
     }
-    /** 
+    /**
      * True iff the filename is of a format that <em>could</em>
      * be a backup version of the original file.  It remains to be
      * determined whether it truly contains a sequence number.
@@ -164,7 +165,7 @@
             // It's safe to assume that there are no clashing names.
             return firstVersion();
         }
-                                       
+
         for (int i = 0; i < files.length; i++) {
             if (mightHaveSeq(files[i])) {
                 int possibleSeq = getSeq(files[i]);



1.25      +14 -14    e/src/jsrc/org/erights/e/elang/evm/AssignExpr.java

Index: AssignExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/AssignExpr.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- AssignExpr.java	2001/03/11 11:21:52	1.24
+++ AssignExpr.java	2001/09/06 09:55:44	1.25
@@ -1,32 +1,32 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.tables.FlexMap;
 
+import java.io.IOException;
+
 /**
  * BNF: varName ":=" eExpr <p>
  *
@@ -36,8 +36,8 @@
  *      (&varName) setValue(eExpr); eExpr
  *
  * <p></pre>
- * except that eExpr is only evaluated once.  Therefore, the value returned 
- * is the value of eExpr, rather than the value stored in the slot (since 
+ * except that eExpr is only evaluated once.  Therefore, the value returned
+ * is the value of eExpr, rather than the value stored in the slot (since
  * setValue may do arbitrary coercions).
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
@@ -102,7 +102,7 @@
         return myNoun.matchBind(args, other.myNoun, bindings)
           && myRValue.matchBind(args, other.myRValue, bindings);
     }
-    
+
     /**
      *
      */



1.28      +14 -13    e/src/jsrc/org/erights/e/elang/evm/CallExpr.java

Index: CallExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/CallExpr.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- CallExpr.java	2001/04/01 08:13:40	1.27
+++ CallExpr.java	2001/09/06 09:55:44	1.28
@@ -1,25 +1,24 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.develop.exception.ExceptionMgr;
 import org.erights.e.develop.exception.ThrowableSugar;
 import org.erights.e.elang.scope.Scope;
@@ -29,11 +28,13 @@
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 /**
  * BNF: eExpr verb(args... ) <p>
  *
- * A synchronous message call.  Tells the expression's value to perform the 
- * request now, and to pass an outcome (return a result, throw an exception, 
+ * A synchronous message call.  Tells the expression's value to perform the
+ * request now, and to pass an outcome (return a result, throw an exception,
  * non-local escape) synchronously back to the caller.
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
@@ -44,7 +45,7 @@
      *
      */
     private EExpr myRecipient;
-    
+
     /**
      *
      */



1.14      +20 -20    e/src/jsrc/org/erights/e/elang/evm/CatchExpr.java

Index: CatchExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/CatchExpr.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- CatchExpr.java	2001/04/01 08:13:40	1.13
+++ CatchExpr.java	2001/09/06 09:55:44	1.14
@@ -1,41 +1,41 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.develop.exception.ExceptionMgr;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 
 /**
  * BNF: "try" block "catch" pattern block <p>
  *
  * Evaluates the try-block, but should it throw an Exception (not a
  * Throwable!) bind pattern to the
- * Exception and evaluate the catch-block.  The value of the catch expression 
- * is the value of the try-block, or the value of the catch-block if the 
+ * Exception and evaluate the catch-block.  The value of the catch expression
+ * is the value of the try-block, or the value of the catch-block if the
  * try-block threw an Exception. <p>
  *
  * @see org.erights.e.elang.evm.FinallyExpr
@@ -88,13 +88,13 @@
             try {
                 catchScope = myPattern.testMatch(catchScope, ex, null);
             } catch (Exception ex2) {
-                //Subtle but important semantic point: Not only do we rethrow 
-                //the original problem if the catch-pattern fails to match, 
-                //we also throw the original problem if the match attempt 
-                //throws an Exception, since the original problem is 
-                //assumed to be a more important diagnostic than the new 
-                //Exception.  However, if the match attempt throws a 
-                //non-Exception, that propogates out rather than the original 
+                //Subtle but important semantic point: Not only do we rethrow
+                //the original problem if the catch-pattern fails to match,
+                //we also throw the original problem if the match attempt
+                //throws an Exception, since the original problem is
+                //assumed to be a more important diagnostic than the new
+                //Exception.  However, if the match attempt throws a
+                //non-Exception, that propogates out rather than the original
                 //problem.
                 throw ExceptionMgr.asSafe(ex);
             }



1.13      +22 -22    e/src/jsrc/org/erights/e/elang/evm/CdrPattern.java

Index: CdrPattern.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/CdrPattern.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- CdrPattern.java	2001/07/14 12:57:22	1.12
+++ CdrPattern.java	2001/09/06 09:55:44	1.13
@@ -1,29 +1,27 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.Thrower;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.ConstList;
@@ -31,13 +29,15 @@
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.util.OneArgFunc;
 
+import java.io.IOException;
+
 /**
  * BNF: listPattern "+" pattern
  *
- * This tries to match a list that's at 
- * least listPattern long by matching each sub-pattern against the 
- * corresponding listPattern elements, and matching rest-pattern against a 
- * list of the rest of the elements. 
+ * This tries to match a list that's at
+ * least listPattern long by matching each sub-pattern against the
+ * corresponding listPattern elements, and matching rest-pattern against a
+ * list of the rest of the elements.
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
@@ -106,7 +106,7 @@
         //XXX should really coerce to a list here
         specimen = Ref.resolution(specimen);
         if (specimen == null) {
-            throw Thrower.toEject(optEjector, 
+            throw Thrower.toEject(optEjector,
                                   "null doesn't match a list pattern");
         }
 
@@ -116,16 +116,16 @@
         } else if (specimen.getClass().isArray()) {
             list = ConstList.fromArray(specimen);
         } else {
-            throw Thrower.toEject(optEjector, 
+            throw Thrower.toEject(optEjector,
                                   "must be a list");
         }
-        
+
         Pattern[] start = myStart.subPatterns();
-        
+
         int len = list.size();
         if (len < start.length) {
-            throw Thrower.toEject(optEjector, 
-                                  "a " + len + 
+            throw Thrower.toEject(optEjector,
+                                  "a " + len +
                                   " size list doesn't match a >= " +
                                   start.length + " size list pattern");
         }
@@ -137,7 +137,7 @@
         EList rest = list.run(start.length, list.size());
         return myRest.testMatch(scope, rest, optEjector);
     }
-    
+
     /**
      *
      */



1.27      +23 -23    e/src/jsrc/org/erights/e/elang/evm/DefineExpr.java

Index: DefineExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/DefineExpr.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- DefineExpr.java	2001/03/11 11:21:52	1.26
+++ DefineExpr.java	2001/09/06 09:55:44	1.27
@@ -1,32 +1,32 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 
 /**
  * BNF: "def" pattern ":=" eExpr <p>
@@ -35,14 +35,14 @@
  * current environment.  'pattern' must not yet have a binding in this
  * layer. <p>
  *
- * For a DefineExpr to be well formed, none of the variables defined by 
- * pattern (ie, pattern.staticScope().namesOut()) may be used by eExpr (ie, 
- * eExpr.staticScope().namesUsed()), and vice versa.  By imposing this 
- * restriction in the kernel language, the kernel language may evaluate these 
- * two in the wrong order (right to left) without violating the left to right 
- * scoping rule.  Therefore, the kernel language remains a valid subset of 
- * the user language, in that all kernel programs are valid user programs 
- * with the same meaning.  A user-level def-expression that violates the 
+ * For a DefineExpr to be well formed, none of the variables defined by
+ * pattern (ie, pattern.staticScope().namesOut()) may be used by eExpr (ie,
+ * eExpr.staticScope().namesUsed()), and vice versa.  By imposing this
+ * restriction in the kernel language, the kernel language may evaluate these
+ * two in the wrong order (right to left) without violating the left to right
+ * scoping rule.  Therefore, the kernel language remains a valid subset of
+ * the user language, in that all kernel programs are valid user programs
+ * with the same meaning.  A user-level def-expression that violates the
  * above rules is expanded into a kernel-level one that satisfies it.
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
@@ -53,7 +53,7 @@
     private EExpr myRValue;
 
     /**
-     * If the resulting DefineExpr isn't well formed (see class comment), 
+     * If the resulting DefineExpr isn't well formed (see class comment),
      * this throws a (XXX to be defined) exception.
      */
     public DefineExpr(Pattern pattern, EExpr rValue) {
@@ -75,7 +75,7 @@
             throw new RuntimeException("kernel def shadow not allowed");
         }
     }
-    
+
     /**
      *
      */
@@ -85,7 +85,7 @@
 
     /**
      *
-     */    
+     */
     /*package*/ StaticScope computeStaticScope() {
         return myPattern.staticScope().add(myRValue.staticScope());
     }
@@ -94,7 +94,7 @@
      *
      */
     /*package*/ Object subEval(Scope[] pov, boolean onlyFlag) {
-        //because of the well-formedness rule, we may evaluate in the wrong 
+        //because of the well-formedness rule, we may evaluate in the wrong
         //order without effect.
         Object result = myRValue.subEval(pov, false);
         pov[0] = myPattern.testMatch(pov[0], result, null);



1.26      +12 -11    e/src/jsrc/org/erights/e/elang/evm/EExpr.java

Index: EExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/EExpr.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- EExpr.java	2001/03/11 11:21:52	1.25
+++ EExpr.java	2001/09/06 09:55:44	1.26
@@ -1,20 +1,20 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -25,6 +25,7 @@
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.tables.ConstMap;
+
 import java.io.IOException;
 
 
@@ -59,7 +60,7 @@
         SubstVisitor visitor = new SubstVisitor(args);
         return visitor.xformEExpr(this);
     }
-    
+
     /**
      * When staticScope() is first requested on a given node, it calls
      * computeStaticScope() to do the actual computation, which is
@@ -69,7 +70,7 @@
 
     /**
      * Used to evaluate this expression to a value in scope pov[0],
-     * and to place the successor scope in pov[0]. 
+     * and to place the successor scope in pov[0].
      */
     public Object eval(Scope[] pov) {
         Scope scope = pov[0];



1.23      +3 -4      e/src/jsrc/org/erights/e/elang/evm/EImpl.java

Index: EImpl.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/EImpl.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- EImpl.java	2001/04/16 08:10:32	1.22
+++ EImpl.java	2001/09/06 09:55:44	1.23
@@ -22,17 +22,16 @@
 import org.erights.e.elang.interp.ProtocolDesc;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elib.base.Callable;
+import org.erights.e.elib.base.MessageDesc;
 import org.erights.e.elib.base.MethodNode;
 import org.erights.e.elib.base.Script;
 import org.erights.e.elib.base.TypeDesc;
-import org.erights.e.elib.base.MessageDesc;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.VTable;
-import org.erights.e.elib.tables.ConstList;
-import org.erights.e.elib.tables.FlexList;
-
 import org.erights.e.elib.sealing.Brand;
 import org.erights.e.elib.sealing.SealedBox;
+import org.erights.e.elib.tables.ConstList;
+import org.erights.e.elib.tables.FlexList;
 
 /**
  * What an object expression evaluates to.



1.4       +9 -8      e/src/jsrc/org/erights/e/elang/evm/EMeta.java

Index: EMeta.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/EMeta.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- EMeta.java	2000/11/14 11:15:32	1.3
+++ EMeta.java	2001/09/06 09:55:44	1.4
@@ -1,10 +1,11 @@
 package org.erights.e.elang.evm;
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elib.base.Script;
 import org.erights.e.elib.base.TextWriter;
 
+import java.io.IOException;
+
 
 /**
  * Gives meta-level access to the object it wraps (its subject).
@@ -12,38 +13,38 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class EMeta {
-    
+
     private Object mySubject;
-    
+
     /**
-     * This must only be invoked by carefully reviewed TCB code, as the 
+     * This must only be invoked by carefully reviewed TCB code, as the
      * resulting EMeta object breaks the encapsulation of the subject.
      */
     /*package*/ EMeta(Object subject) {
         mySubject = subject;
     }
-    
+
     /**
      *
      */
     public void printOn(TextWriter out) throws IOException {
         out.print("<meta ", mySubject, ">");
     }
-    
+
     /**
      *
      */
     public Object getSubject() {
         return mySubject;
     }
-    
+
     /**
      *
      */
     public Scope getScope() {
         return ((EImpl)mySubject).myScope;
     }
-    
+
     /**
      *
      */



1.12      +20 -19    e/src/jsrc/org/erights/e/elang/evm/EMethod.java

Index: EMethod.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/EMethod.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- EMethod.java	2001/04/01 08:13:40	1.11
+++ EMethod.java	2001/09/06 09:55:44	1.12
@@ -1,36 +1,37 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.develop.exception.ExceptionMgr;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
-import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.base.MethodNode;
+import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.slot.ValueGuard;
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.tables.FlexMap;
 
+import java.io.IOException;
+
 
 /**
  * BNF: <docComment> "to" verb "(" patterns ")" "{" expr "}" <p>
@@ -49,13 +50,13 @@
     private Pattern[] myPatterns;
     private EExpr myReturnGuard;
     private EExpr myBody;
-    
+
     /**
      * The constructor interns the verb
      */
     public EMethod(String docComment,
-                   String verb, 
-                   Pattern[] patterns, 
+                   String verb,
+                   Pattern[] patterns,
                    EExpr returnGuard,
                    EExpr body)
     {
@@ -100,8 +101,8 @@
     public Object execute(Object self, String aVerb, Object[] args) {
         if (arity() != args.length
             || (myVerb != aVerb && ! myVerb.equals(aVerb)) ) {
-                
-            throw ExceptionMgr.asSafe(new NoSuchMethodException(aVerb + "/" 
+
+            throw ExceptionMgr.asSafe(new NoSuchMethodException(aVerb + "/"
                                                                 + args.length));
         }
         Scope[] pov = ((EImpl)self).scope().sprout().newPov();
@@ -110,9 +111,9 @@
         }
         Object vg = myReturnGuard.subEval(pov, false);
         ValueGuard valueGuard = (ValueGuard)E.as(vg, ValueGuard.class);
-        
+
         //XXX onlyFlag should be true if myReturnGuard == e`void`
-        Object result = myBody.subEval(pov, false); 
+        Object result = myBody.subEval(pov, false);
         return valueGuard.coerce(result, null);
     }
 
@@ -166,7 +167,7 @@
      *
      */
     public Pattern[] patterns() { return myPatterns; }
-    
+
     /**
      *
      */



1.5       +5 -5      e/src/jsrc/org/erights/e/elang/evm/ENode.java

Index: ENode.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/ENode.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ENode.java	2001/08/29 00:20:16	1.4
+++ ENode.java	2001/09/06 09:55:44	1.5
@@ -18,7 +18,7 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 import org.erights.e.elang.visitors.ETreeVisitor;
@@ -41,21 +41,21 @@
      * the visitor by asking it to visitFooNode(myBar, myBaz).  What
      * this visit request returns it what welcome should return.  The
      * starting point for this pattern is the "Visitor" pattern from
-     * the "Design Patterns" book.  
+     * the "Design Patterns" book.
      */
     Object welcome(ETreeVisitor visitor);
-    
+
     /**
      * The returns a static scope analysis of a subtree that doesn't
      * depend on the enclosing context.
      */
     StaticScope staticScope();
-    
+
     /**
      * kludge: Mirrors ParseNode
      */
     SourceSpan optSource();
-    
+
     /**
      * kludge: Mirrors ParseNode
      */



1.9       +19 -19    e/src/jsrc/org/erights/e/elang/evm/EScript.java

Index: EScript.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/EScript.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- EScript.java	2001/03/11 11:21:52	1.8
+++ EScript.java	2001/09/06 09:55:44	1.9
@@ -1,46 +1,46 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
 import org.erights.e.elang.visitors.ETreeVisitor;
-import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.base.ParseNode;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.ConstList;
+import org.erights.e.elib.tables.FlexList;
+
+import java.io.IOException;
 
 /**
  * <pre>
  * BNF: script ::= "{" method* matcher? "}" ("meta" script)?
  *      |      ::= matcher ("meta" script)?
  * </pre>
- * where '?' means 'optional' and '*' means 'zero or more'.  In the first 
- * form, the optMethods instance variable will point to an array, even if 
- * it's empty.  In the second form, optMethods() is null.  At least one of 
+ * where '?' means 'optional' and '*' means 'zero or more'.  In the first
+ * form, the optMethods instance variable will point to an array, even if
+ * it's empty.  In the second form, optMethods() is null.  At least one of
  * optMethods() or optMatcher() must not be null.
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class EScript extends ParseNode implements ENode {
-    
+
     /*package*/ EMethod[] myOptMethods;
     private Matcher myOptMatcher;
 
@@ -57,17 +57,17 @@
         myOptMethods = optMethods;
         myOptMatcher = optMatcher;
     }
-    
+
     /**
      *
      */
     public ConstList optMethods() { return ConstList.fromArray(myOptMethods); }
-    
+
     /**
      *
      */
     public Matcher optMatcher() { return myOptMatcher; }
-    
+
     /**
      *
      */



1.23      +12 -12    e/src/jsrc/org/erights/e/elang/evm/EscapeExpr.java

Index: EscapeExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/EscapeExpr.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- EscapeExpr.java	2001/03/11 21:48:19	1.22
+++ EscapeExpr.java	2001/09/06 09:55:44	1.23
@@ -1,33 +1,33 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.Ejector;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 
 /**
  * BNF: "escape" pattern "{" expr "}" <p>
@@ -55,7 +55,7 @@
         myExitPatt = exitPatt;
         myRValue = rValue;
     }
-    
+
     /**
      *
      */



1.9       +19 -19    e/src/jsrc/org/erights/e/elang/evm/Evaluator.java

Index: Evaluator.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/Evaluator.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Evaluator.java	2001/08/29 00:20:16	1.8
+++ Evaluator.java	2001/09/06 09:55:44	1.9
@@ -28,17 +28,17 @@
  * "http://www.erights.org/elang/kernel/index.html"
  * >Kernel-E</a> expressions and patterns explicitly, so that this
  * evaluation can happen, for example, remotely. <p>
- * 
+ *
  * Evaluators also support the E syntactic sugar<p><pre>
  *     meta eval(evaluator, expr)
- * 
+ *
  * and
- * 
+ *
  *     meta <- eval(evaluator, expr)
  * </pre>
  * as a convenience for evaluating the expression in the lexical scope
  * of the caller. <p>
- * 
+ *
  * E is an expression/pattern language.  This means that execution
  * proceeds by evaluating expressions in a lexical scope, and matching
  * patterns in a lexical scope against a specimen (an arbitrary value
@@ -48,15 +48,15 @@
  * the specimen match?" -- but also bindings of values (typically)
  * extracted from the specimen to variables named in the pattern.
  * Indeed, this is the only form of variable definition in E. <p>
- * 
+ *
  * An E program is an fully ordered left-to-right tree of expressions
- * and patterns, with a set of nested <a 
+ * and patterns, with a set of nested <a
  * href="http://www.erights.org/elang/blocks/ifExpr.html"
  * >scope boxes</a> statically imposed on this tree by particular
  * types of expressions and patterns.  When a pattern defines a
  * variable, this name is in scope left to right from the point of
  * definition until the end of its containing scope box. <p>
- * 
+ *
  * Putting it all together, a node (an expression or pattern) has two
  * scope-based interfaces to the outside world: <p>
  * <ul>
@@ -66,7 +66,7 @@
  * the <a href=
  * "http://www.erights.org/javadoc/org/erights/e/elang/evm/VarPattern.html#NonShadowable"
  * >NonShadowable</a> elements of the universalScope.</p></li>
- * 
+ *
  * <li><p><i>bindingsOut</i> are those variables defined by the node that
  * are still in scope following the node, and that may be needed by
  * code to the right of the node within the same enclosing scope box.
@@ -92,7 +92,7 @@
  * compilation purposes we chose not to.  However, when transforming
  * for use with an Evaluator, all the in and out variables must be so
  * transformed. <p>
- * 
+ *
  * The syntactic sugar <p><pre>
  *     meta eval(evaluator, expr)
  * </pre>
@@ -108,9 +108,9 @@
  *     ... x ... x := 4 ... y ...
  *     ... meta eval(visualizingEvaluator, x ** y =~ pow :final) ...
  *     ... pow ...
- * 
+ *
  * expands to
- * 
+ *
  *     def x__Slot :final := settable makeSlot(3)
  *     def y :final := 7
  *     ... x__Slot ... (x__Slot setValue(4)) ... y ...
@@ -125,7 +125,7 @@
  * evaluates to is statically seen as unneeded, the "true" above would
  * instead be "false".  If pow were not defined as final, it would
  * be transformed into the final variable pow__Slot. <p>
- * 
+ *
  * Similarly
  * <p><pre>
  *     meta <- eval(evaluator, expr)
@@ -135,9 +135,9 @@
  * example <p><pre>
  *     meta <- eval(remoteEvaluator, def powOverThere(x) { x**2 })
  *     def y := powOverThere <- (3)
- * 
+ *
  * expands to
- * 
+ *
  *     def [powOverThere, powOverThere__Resolver] := PromiseMaker()
  *     remoteEvaluator <- eval(e`def powOverThere(x) { x**2 }`,
  *                             [] asMap(),
@@ -151,7 +151,7 @@
  * to an object on VatB, who would then obtain a reference directly
  * connected to VatC.  If VatA then goes off-line, VatB would still be
  * able to use powOverThere on VatC. <p>
- * 
+ *
  * With the eventual form, the expression evaluates in the current
  * lexical scope, just as if it were being implicitly evaluated, but
  * it evaluates at a later time in its own turn, and potentially in
@@ -161,8 +161,8 @@
  * "true".  Because of the delay, any Ejectors from the containing
  * context will already be used up, so the expression cannot perform a
  * non-local escape to an escape clause that has already exited
- * (ie, Ejectors are dynamic-extent continuations).  <p> 
- * 
+ * (ie, Ejectors are dynamic-extent continuations).  <p>
+ *
  * If the evaluation is remote, then all bindings
  * in and out will be as transformed by passage through the Pluribus.
  * The non-obvious implication of this is that any use or assignment
@@ -185,7 +185,7 @@
      * evalToSingleton() when you want to avoid this ambiguity.
      * (Note: This ambiguity will often be desired.  The "meta <-
      * eval(...)" purposely produces this ambiguity.) <p>
-     * 
+     *
      * @param eExpr The expression to be evaluated.
      * <p>
      * @param bindingsIn Provides bindings for those variables
@@ -231,7 +231,7 @@
      * Matches pattern against specimen, either failing or producing
      * bindings. Unlike eval(), no syntactic sugar is currently
      * defined for matchBind().
-     * 
+     *
      * @param pattern The pattern to be matched against the specimen.
      * <p>
      * @param bindingsIn Provides bindings for those variables



1.8       +29 -28    e/src/jsrc/org/erights/e/elang/evm/FinalPattern.java

Index: FinalPattern.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/FinalPattern.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FinalPattern.java	2001/07/14 12:57:22	1.7
+++ FinalPattern.java	2001/09/06 09:55:44	1.8
@@ -1,25 +1,24 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.interp.ScopeSetup;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
@@ -28,29 +27,31 @@
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.slot.ValueGuard;
 import org.erights.e.elib.tables.ConstMap;
-import org.erights.e.elib.tables.FlexMap;
 import org.erights.e.elib.tables.FlexList;
+import org.erights.e.elib.tables.FlexMap;
 import org.erights.e.elib.util.OneArgFunc;
 
+import java.io.IOException;
+
 
 /**
  * BNF: Identifier ':' expr <p>
  *
- * The identifier on the left is the defining occurrence of a variable 
- * name.  The expression on the right is a "value guard expression".  The 
- * object it evaluates to will be treated as a ValueGuard, and asked to make a 
+ * The identifier on the left is the defining occurrence of a variable
+ * name.  The expression on the right is a "value guard expression".  The
+ * object it evaluates to will be treated as a ValueGuard, and asked to make a
  * value initialized from a specimen, as if: <p><pre>
  *
  *      def value := valueGuard coerce(specimen, XXX)
  *
- * <p></pre>This value is then defined as the value for a variable of this name 
+ * <p></pre>This value is then defined as the value for a variable of this name
  * in the scope starting immediately after this name. <p>
  *
- * But wait!  That scope includes the value guard expression?!?  As with the 
- * def-expression, this circularity is indeed allowed and correct in the 
- * user-level language, but the kernel-level language (ie, the parse node 
- * FinalPattern) imposes a well-formedness criterea that allows us to 
- * evaluate in the wrong order without effect.  A circular user-level 
+ * But wait!  That scope includes the value guard expression?!?  As with the
+ * def-expression, this circularity is indeed allowed and correct in the
+ * user-level language, but the kernel-level language (ie, the parse node
+ * FinalPattern) imposes a well-formedness criterea that allows us to
+ * evaluate in the wrong order without effect.  A circular user-level
  * FinalPattern will also be statically rejected <p>
  *
  * @see org.erights.e.elang.evm.DefineExpr
@@ -58,9 +59,9 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class FinalPattern extends Pattern {
-    
+
     /**
-     * A set of all the variable names that may not be shadowed (ie, 
+     * A set of all the variable names that may not be shadowed (ie,
      * redefined)
      */
     static public final ConstMap NonShadowable
@@ -68,12 +69,12 @@
 
     private String myVarName;
     private EExpr myValueGuardExpr;
-    
+
     /**
-     * If 'varName' would shadow a non-shadowable, throw a (XXX to be 
+     * If 'varName' would shadow a non-shadowable, throw a (XXX to be
      * defined) exception instead.  <p>
-     * 
-     * If the FinalPattern would not be well-formed, throw a (XXX to be 
+     *
+     * If the FinalPattern would not be well-formed, throw a (XXX to be
      * defined) exception instead.  <p>
      */
     public FinalPattern(String varName, EExpr valueGuardExpr) {
@@ -142,7 +143,7 @@
                              other.myValueGuardExpr,
                              bindings));
     }
-    /** 
+    /**
      * A FinalPattern will never return null for this.  It is named
      * 'optName' because it is polymorphic with IgnorePattern
      */
@@ -169,7 +170,7 @@
                                 OneArgFunc optEjector)
     {
         Scope[] pov = scope.newPov();
-        //Because of the well-formedness criterea, we may safely evaluate 
+        //Because of the well-formedness criterea, we may safely evaluate
         //this in the wrong order
         Object sg = myValueGuardExpr.subEval(pov, false);
         ValueGuard valueGuard = (ValueGuard)E.as(sg, ValueGuard.class);



1.12      +20 -20    e/src/jsrc/org/erights/e/elang/evm/FinallyExpr.java

Index: FinallyExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/FinallyExpr.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- FinallyExpr.java	2001/03/11 21:48:19	1.11
+++ FinallyExpr.java	2001/09/06 09:55:44	1.12
@@ -1,46 +1,46 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 
 /**
  * BNF: "try" block "finally" block <p>
  *
- * Evaluates the try-clause, but exiting to the enclosing context also 
- * evaluate the finally-clause.  If the finally-clause exits normally 
- * (evaluates to a value), then the exit of the FinallyExpr as a whole is the 
- * exit of the try-clause.  In other words, if the try-clause evaluates to a 
- * value, then the FinallyExpr evaluates to that same value.  If the 
- * try-clause throws or escapes, then the FinallyExpr as a whole likewise 
+ * Evaluates the try-clause, but exiting to the enclosing context also
+ * evaluate the finally-clause.  If the finally-clause exits normally
+ * (evaluates to a value), then the exit of the FinallyExpr as a whole is the
+ * exit of the try-clause.  In other words, if the try-clause evaluates to a
+ * value, then the FinallyExpr evaluates to that same value.  If the
+ * try-clause throws or escapes, then the FinallyExpr as a whole likewise
  * throws or escapes. <p>
  *
- * On the other hand, if the finally-clause does a non-local exit (throws or 
- * escapes) then the FinallyExpr as a whole exits in that way.  A non-local 
+ * On the other hand, if the finally-clause does a non-local exit (throws or
+ * escapes) then the FinallyExpr as a whole exits in that way.  A non-local
  * finally-clause exit replaces the try-clause exit as the means of exiting.
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
@@ -71,7 +71,7 @@
     /*package*/ StaticScope computeStaticScope() {
         StaticScope attemptScope = myAttempt.staticScope();
         StaticScope finallyScope = myUnwinder.staticScope();
-        
+
         return attemptScope.hide().add(finallyScope).hide();
     }
 



1.20      +11 -11    e/src/jsrc/org/erights/e/elang/evm/HideExpr.java

Index: HideExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/HideExpr.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- HideExpr.java	2001/03/11 11:21:52	1.19
+++ HideExpr.java	2001/09/06 09:55:44	1.20
@@ -1,31 +1,31 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
+
+import java.io.IOException;
 
 
 /**



1.21      +12 -12    e/src/jsrc/org/erights/e/elang/evm/IfExpr.java

Index: IfExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/IfExpr.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- IfExpr.java	2001/03/11 11:21:52	1.20
+++ IfExpr.java	2001/09/06 09:55:44	1.21
@@ -1,36 +1,36 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 
 /**
  * BNF: "if" "(" cond-expr ")" "{" then-expr "}" "else" "{" else-expr "}" <p>
- * 
+ *
  * Implements the "if" expression.  If the cond-expr evaluates to
  * true, the then-expr is evaluated in a child of the scope
  * produced by the cond-expr.  Otherwise, the else-expr is



1.9       +12 -12    e/src/jsrc/org/erights/e/elang/evm/IgnorePattern.java

Index: IgnorePattern.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/IgnorePattern.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- IgnorePattern.java	2001/03/11 21:48:19	1.8
+++ IgnorePattern.java	2001/09/06 09:55:44	1.9
@@ -1,33 +1,33 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.util.OneArgFunc;
 
+import java.io.IOException;
+
 /**
  * BNF: "_" <p>
  *
@@ -41,7 +41,7 @@
      *
      */
     public IgnorePattern() {}
-    
+
     /**
      *
      */



1.11      +19 -19    e/src/jsrc/org/erights/e/elang/evm/ListPattern.java

Index: ListPattern.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/ListPattern.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ListPattern.java	2001/07/14 12:57:22	1.10
+++ ListPattern.java	2001/09/06 09:55:44	1.11
@@ -1,29 +1,27 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.Thrower;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.ConstList;
@@ -31,10 +29,12 @@
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.util.OneArgFunc;
 
+import java.io.IOException;
+
 /**
  * BNF: "[" sub-patterns "]"
  *
- * The list only matches of it has exactly as many elements as there are 
+ * The list only matches of it has exactly as many elements as there are
  * sub-patterns, and each subpattern matches its corresponding element.
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
@@ -103,7 +103,7 @@
         //XXX should really coerce to a list here
         specimen = Ref.resolution(specimen);
         if (specimen == null) {
-            throw Thrower.toEject(optEjector, 
+            throw Thrower.toEject(optEjector,
                                   "null doesn't match a list pattern");
         }
 
@@ -113,14 +113,14 @@
         } else if (specimen.getClass().isArray()) {
             list = ConstList.fromArray(specimen);
         } else {
-            throw Thrower.toEject(optEjector, 
+            throw Thrower.toEject(optEjector,
                                   "must be a list");
         }
-        
+
         int len = list.size();
         if (len != mySubs.length) {
-            throw Thrower.toEject(optEjector, 
-                                  "a " + len + 
+            throw Thrower.toEject(optEjector,
+                                  "a " + len +
                                   " size list doesn't match a " +
                                   mySubs.length + " size list pattern");
         }
@@ -131,12 +131,12 @@
         }
         return scope;
     }
-    
+
     /**
      *
      */
     /*package*/ Pattern[] subPatterns() { return mySubs; }
-    
+
     /**
      *
      */



1.20      +18 -18    e/src/jsrc/org/erights/e/elang/evm/LiteralExpr.java

Index: LiteralExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/LiteralExpr.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- LiteralExpr.java	2001/03/11 11:21:52	1.19
+++ LiteralExpr.java	2001/09/06 09:55:44	1.20
@@ -1,33 +1,33 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
-import java.math.BigInteger;
 import org.erights.e.develop.format.StringHelper;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+import java.math.BigInteger;
+
 
 /**
  * BNF: literal <p>
@@ -37,7 +37,7 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class LiteralExpr extends EExpr {
-    
+
     private Object myValue;
 
     /**
@@ -46,7 +46,7 @@
     public LiteralExpr(Object value) {
         myValue = value;
     }
-    
+
     /**
      *
      */
@@ -100,16 +100,16 @@
         if (myValue instanceof Character) {
             String str = StringHelper.quote(myValue.toString());
             return "\'" + str.substring(1, str.length()-1) + "\'";
-            
+
         } else if (myValue instanceof String) {
             return StringHelper.quote((String)myValue);
-            
+
         } else if (myValue instanceof BigInteger) {
             return myValue.toString();
-            
+
         } else if (myValue instanceof Double) {
             return myValue.toString();
-            
+
         } else {
             return "<unknown literal " + myValue + ">";
         }



1.25      +11 -11    e/src/jsrc/org/erights/e/elang/evm/MatchBindExpr.java

Index: MatchBindExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/MatchBindExpr.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- MatchBindExpr.java	2001/03/11 11:21:52	1.24
+++ MatchBindExpr.java	2001/09/06 09:55:44	1.25
@@ -1,31 +1,31 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
+
+import java.io.IOException;
 
 
 /**



1.8       +16 -16    e/src/jsrc/org/erights/e/elang/evm/Matcher.java

Index: Matcher.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/Matcher.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Matcher.java	2001/03/11 11:21:52	1.7
+++ Matcher.java	2001/09/06 09:55:44	1.8
@@ -1,36 +1,36 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
-import java.math.BigInteger;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.ParseNode;
 import org.erights.e.elib.base.Script;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.base.TypeDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+import java.math.BigInteger;
+
 
 /**
  * BNF: "match" pattern "{" expr "}"
@@ -43,7 +43,7 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class Matcher extends ParseNode implements Script, ENode {
-    
+
     static private final Object[] NO_ARGS = {};
 
     private StaticScope myOptStaticScope = null;
@@ -58,7 +58,7 @@
         myPattern = pattern;
         myBody = body;
     }
-    
+
     /**
      *
      */
@@ -70,7 +70,7 @@
      *
      */
     public Pattern pattern() { return myPattern; }
-    
+
     /**
      *
      */
@@ -134,7 +134,7 @@
      *
      */
     public void protocol(Object self, FlexList mTypes) {
-        TypeDesc oType 
+        TypeDesc oType
           = (TypeDesc)execute(self, "getAllegedType", NO_ARGS);
         Object[] rest = (Object[])oType.getMessageTypes().getValues();
         mTypes.append(ConstList.fromArray(rest));



1.8       +4 -3      e/src/jsrc/org/erights/e/elang/evm/MetaExpr.java

Index: MetaExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/MetaExpr.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- MetaExpr.java	2001/07/14 12:57:22	1.7
+++ MetaExpr.java	2001/09/06 09:55:44	1.8
@@ -1,12 +1,13 @@
 package org.erights.e.elang.evm;
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 
 /**
  * BNF: "meta(Identifier)" <p>
@@ -22,11 +23,11 @@
      *
      */
     public MetaExpr(NounExpr noun) {
-        //XXX Security Bug!: We must statically ensure that noun names an 
+        //XXX Security Bug!: We must statically ensure that noun names an
         //*enclosing* object expression
         myNoun = noun;
     }
-    
+
     /**
      *
      */



1.23      +15 -15    e/src/jsrc/org/erights/e/elang/evm/NounExpr.java

Index: NounExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/NounExpr.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- NounExpr.java	2001/03/11 11:21:52	1.22
+++ NounExpr.java	2001/09/06 09:55:44	1.23
@@ -1,33 +1,33 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
-import org.erights.e.elib.tables.FlexMap;
+import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
-import org.erights.e.elang.scope.Scope;
 import org.erights.e.elib.tables.FlexList;
+import org.erights.e.elib.tables.FlexMap;
 
+import java.io.IOException;
+
 
 /**
  * BNF: varName <p>
@@ -42,14 +42,14 @@
      *
      */
     private String myName;
-    
+
     /**
      *
      */
     public NounExpr(String name) {
         myName = name;
     }
-    
+
     /**
      *
      */



1.34      +17 -17    e/src/jsrc/org/erights/e/elang/evm/ObjectExpr.java

Index: ObjectExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/ObjectExpr.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- ObjectExpr.java	2001/04/13 08:08:34	1.33
+++ ObjectExpr.java	2001/09/06 09:55:44	1.34
@@ -1,29 +1,27 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.MirandaMethods;
 import org.erights.e.elib.prim.SugarMethodNode;
 import org.erights.e.elib.prim.VTable;
@@ -32,6 +30,8 @@
 import org.erights.e.elib.tables.ConstMap;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 /**
  * BNF: "def" litString "{" method* [ matcher ] "}" <p>
  *
@@ -50,11 +50,11 @@
     private String myOptFQN;
     private NounExpr[] myAuditors;
     private EScript myEScript;
-    
+
     private VTable myOptVtableCache = null;
 
     /**
-     * 
+     *
      */
     public ObjectExpr(String docComment,
                       String optFQN,
@@ -69,7 +69,7 @@
         myAuditors = auditors;
         myEScript = eScript;
     }
-    
+
     /**
      *
      */
@@ -138,7 +138,7 @@
      *
      */
     public String optFQN() { return myOptFQN; }
-    
+
     /**
      *
      */
@@ -167,13 +167,13 @@
      *
      */
     public EScript eScript() { return myEScript; }
-    
+
     /**
      *
      */
     public VTable vTable() {
         if (myOptVtableCache == null) {
-            myOptVtableCache = new VTable(optName(), 
+            myOptVtableCache = new VTable(optName(),
                                           myEScript.optMatcher());
             EMethod[] optMeths = myEScript.myOptMethods;
             if (optMeths != null) {



1.25      +19 -19    e/src/jsrc/org/erights/e/elang/evm/Pattern.java

Index: Pattern.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/Pattern.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- Pattern.java	2001/03/11 21:48:19	1.24
+++ Pattern.java	2001/09/06 09:55:44	1.25
@@ -1,33 +1,33 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.SubstVisitor;
 import org.erights.e.elib.base.Ejector;
-import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.base.ParseNode;
-import org.erights.e.elib.prim.E;
+import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.util.OneArgFunc;
 
+import java.io.IOException;
+
 
 /**
  * A Pattern 1) "evaluates" in a pov, 2) matches some specimen
@@ -38,7 +38,7 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public abstract class Pattern extends ParseNode implements ENode {
-    
+
     private StaticScope myOptStaticScope = null;
 
     /**
@@ -62,13 +62,13 @@
         SubstVisitor visitor = new SubstVisitor(args);
         return visitor.xformPattern(this);
     }
-    
+
     /**
      * Like testMatch(), except it side effects pov[0] in place
      * rather than returning the new Scope, and it must produce a
      * successor scope on failure as well.  On failure, the successor
      * scope contains broken bindings for all names exported by this
-     * pattern. 
+     * pattern.
      */
     /*package*/ boolean matches(Scope[] pov, Object specimen) {
         Scope after = null;
@@ -89,7 +89,7 @@
 
     /**
      * If this pattern matches the specimen, return the resulting
-     * scope (containing the resulting bindings).  Otherwise report the 
+     * scope (containing the resulting bindings).  Otherwise report the
      * reason why not according to optEjector.
      */
     /*package*/ abstract Scope testMatch(Scope scope,
@@ -115,10 +115,10 @@
     }
 
     /**
-     * If this pattern is the binding occurence of a name, and it would bind 
+     * If this pattern is the binding occurence of a name, and it would bind
      * the name to a coercion of the specimen as a whole, return the name. <p>
-     * 
-     * Else return null.  The purpose is to support the extraction of fully 
+     *
+     * Else return null.  The purpose is to support the extraction of fully
      * qualified names for object-definition expressions
      */
     public abstract String optName();



1.19      +14 -14    e/src/jsrc/org/erights/e/elang/evm/QuasiLiteralExpr.java

Index: QuasiLiteralExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/QuasiLiteralExpr.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- QuasiLiteralExpr.java	2001/03/11 11:21:52	1.18
+++ QuasiLiteralExpr.java	2001/09/06 09:55:44	1.19
@@ -1,31 +1,31 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.quasi.IncompleteQuasiException;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 
 /**
  * BNF: '$' '{' <number> '}' <p>
@@ -46,7 +46,7 @@
     public QuasiLiteralExpr(int index) {
         myIndex = index;
     }
-    
+
     /**
      *
      */
@@ -59,7 +59,7 @@
      */
     /*package*/ StaticScope computeStaticScope() {
         return StaticScope.EmptyScope;
-        //XXX this becomes incorrect if a scope-significant tree gets plugged 
+        //XXX this becomes incorrect if a scope-significant tree gets plugged
         //in here
     }
 
@@ -75,7 +75,7 @@
      *
      */
     public int index() { return myIndex; }
-    
+
     static private final Object[] NO_ARGS = {};
 
     /**



1.9       +17 -17    e/src/jsrc/org/erights/e/elang/evm/QuasiLiteralPatt.java

Index: QuasiLiteralPatt.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/QuasiLiteralPatt.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- QuasiLiteralPatt.java	2001/03/11 21:48:19	1.8
+++ QuasiLiteralPatt.java	2001/09/06 09:55:44	1.9
@@ -1,33 +1,33 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.quasi.IncompleteQuasiException;
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.util.OneArgFunc;
 
+import java.io.IOException;
+
 /**
  * BNF: '$' '{' <number> '}' <p>
  *
@@ -47,7 +47,7 @@
     public QuasiLiteralPatt(int index) {
         myIndex = index;
     }
-    
+
     /**
      *
      */
@@ -60,13 +60,13 @@
      */
     /*package*/ StaticScope computeStaticScope() {
         return StaticScope.EmptyScope;
-        //XXX this becomes incorrect if a scope-significant tree gets plugged 
+        //XXX this becomes incorrect if a scope-significant tree gets plugged
         //in here
     }
 
     /**
-     * throws a IncompleteQuasiException, rather than reporting a problem 
-     * according to optEjector 
+     * throws a IncompleteQuasiException, rather than reporting a problem
+     * according to optEjector
      */
     /*package*/ Scope testMatch(Scope scope,
                                 Object specimen,
@@ -75,7 +75,7 @@
         throw new IncompleteQuasiException
           ("Can't evaluate programs that still contain bare \"$\"s");
     }
-    
+
     /**
      *
      */
@@ -88,7 +88,7 @@
      *
      */
     public int index() { return myIndex; }
-    
+
     static private final Object[] NO_ARGS = {};
 
     /**



1.20      +13 -12    e/src/jsrc/org/erights/e/elang/evm/QuasiPatternExpr.java

Index: QuasiPatternExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/QuasiPatternExpr.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- QuasiPatternExpr.java	2001/03/11 11:21:52	1.19
+++ QuasiPatternExpr.java	2001/09/06 09:55:44	1.20
@@ -1,24 +1,23 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
@@ -26,12 +25,14 @@
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.util.AlreadyDefinedException;
 
+import java.io.IOException;
+
 /**
  * BNF: '@' '{' <number> '}' <p>
  *
  * Not part of a valid E program, but a part of an E parse tree
  * acting as a MatchMaker (as a pattern to be matched against an E
- * program). 
+ * program).
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
@@ -58,7 +59,7 @@
      */
     /*package*/ StaticScope computeStaticScope() {
         return StaticScope.EmptyScope;
-        //XXX this becomes incorrect if a scope-significant tree gets matched 
+        //XXX this becomes incorrect if a scope-significant tree gets matched
         //with here
     }
 



1.9       +14 -13    e/src/jsrc/org/erights/e/elang/evm/QuasiPatternPatt.java

Index: QuasiPatternPatt.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/QuasiPatternPatt.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- QuasiPatternPatt.java	2001/03/11 21:48:19	1.8
+++ QuasiPatternPatt.java	2001/09/06 09:55:44	1.9
@@ -1,24 +1,23 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
@@ -27,13 +26,15 @@
 import org.erights.e.elib.util.AlreadyDefinedException;
 import org.erights.e.elib.util.OneArgFunc;
 
+import java.io.IOException;
+
 
 /**
  * BNF: '@' '{' <number> '}' <p>
  *
  * Not part of a valid E program, but a part of an E parse tree
  * acting as a MatchMaker (as a pattern to be matched against an E
- * pattern). 
+ * pattern).
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
@@ -60,7 +61,7 @@
      */
     /*package*/ StaticScope computeStaticScope() {
         return StaticScope.EmptyScope;
-        //XXX this becomes incorrect if a scope-significant tree gets matched 
+        //XXX this becomes incorrect if a scope-significant tree gets matched
         //with here
     }
 
@@ -74,7 +75,7 @@
         throw new IncompleteQuasiException
           ("Can't evaluate programs that still contain bare \"@\"s");
     }
-    
+
     /**
      *
      */



1.19      +12 -12    e/src/jsrc/org/erights/e/elang/evm/ScopeExpr.java

Index: ScopeExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/ScopeExpr.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ScopeExpr.java	2001/03/11 11:21:52	1.18
+++ ScopeExpr.java	2001/09/06 09:55:44	1.19
@@ -1,32 +1,32 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 
 /**
  * BNF: "meta scope" <p>
@@ -40,7 +40,7 @@
      *
      */
     public ScopeExpr() {}
-    
+
     /**
      *
      */



1.20      +12 -11    e/src/jsrc/org/erights/e/elang/evm/SendExpr.java

Index: SendExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/SendExpr.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- SendExpr.java	2001/03/11 11:21:52	1.19
+++ SendExpr.java	2001/09/06 09:55:44	1.20
@@ -1,25 +1,24 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
@@ -27,6 +26,8 @@
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 
+import java.io.IOException;
+
 
 /**
  * BNF: eExpr "<-" request <p>
@@ -42,7 +43,7 @@
      *
      */
     private EExpr myRecipient;
-    
+
     /**
      *
      */



1.7       +11 -11    e/src/jsrc/org/erights/e/elang/evm/SeqExpr.java

Index: SeqExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/SeqExpr.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SeqExpr.java	2001/03/11 11:21:52	1.6
+++ SeqExpr.java	2001/09/06 09:55:44	1.7
@@ -1,31 +1,31 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
+
+import java.io.IOException;
 
 
 /**



1.22      +13 -13    e/src/jsrc/org/erights/e/elang/evm/SlotExpr.java

Index: SlotExpr.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/SlotExpr.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- SlotExpr.java	2001/03/11 11:21:52	1.21
+++ SlotExpr.java	2001/09/06 09:55:44	1.22
@@ -1,33 +1,33 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
-import org.erights.e.elib.tables.FlexMap;
 import org.erights.e.elib.tables.FlexList;
+import org.erights.e.elib.tables.FlexMap;
 
+import java.io.IOException;
+
 
 /**
  * BNF: "&" varName <p>
@@ -46,7 +46,7 @@
     public SlotExpr(NounExpr noun) {
         myNoun = noun;
     }
-    
+
     /**
      *
      */



1.14      +20 -19    e/src/jsrc/org/erights/e/elang/evm/StaticScope.java

Index: StaticScope.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/StaticScope.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- StaticScope.java	2001/02/02 06:28:26	1.13
+++ StaticScope.java	2001/09/06 09:55:44	1.14
@@ -1,28 +1,29 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.tables.ConstMap;
 import org.erights.e.elib.tables.FlexMap;
 
+import java.io.IOException;
+
 /**
  *
  */
@@ -30,10 +31,10 @@
 
     //XXX should really use an identity map, and nouns (variable
     //names) should be interned.
-    static public final ConstMap 
+    static public final ConstMap
         EmptyMap = FlexMap.fromTypes(String.class, Void.class).snapshot();
 
-    static public final StaticScope 
+    static public final StaticScope
         EmptyScope = new StaticScope(EmptyMap, EmptyMap, false, EmptyMap);
 
     private ConstMap myNamesRead;
@@ -84,15 +85,15 @@
     }
 
     /**
-     * What variable names defined by the expression are in scope to the 
-     * right of the expression? 
+     * What variable names defined by the expression are in scope to the
+     * right of the expression?
      */
     public ConstMap namesOut() {
         return myNamesOut;
     }
 
     /**
-     * What are the names of variables read by this expression to refer to 
+     * What are the names of variables read by this expression to refer to
      * variables defined outside this expression?
      */
     public ConstMap namesRead() {
@@ -108,9 +109,9 @@
     }
 
     /**
-     * Union of namesRead() and namesSet().  What are the names of variables 
-     * used by this expression to refer to variables defined outside this 
-     * expression? 
+     * Union of namesRead() and namesSet().  What are the names of variables
+     * used by this expression to refer to variables defined outside this
+     * expression?
      */
     public ConstMap namesUsed() {
         return myNamesRead.or(myNamesSet);
@@ -120,7 +121,7 @@
      *
      */
     public void printOn(TextWriter out) throws IOException {
-        out.print("<", myNamesSet, " := ", 
+        out.print("<", myNamesSet, " := ",
                  myNamesRead, " =~ ", myNamesOut, ">");
     }
 }



1.11      +14 -14    e/src/jsrc/org/erights/e/elang/evm/SuchThatPattern.java

Index: SuchThatPattern.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/SuchThatPattern.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- SuchThatPattern.java	2001/07/14 12:57:22	1.10
+++ SuchThatPattern.java	2001/09/06 09:55:44	1.11
@@ -1,38 +1,38 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.Thrower;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.util.OneArgFunc;
 
+import java.io.IOException;
+
 /**
  * BNF: pattern "?" expr <p>
  *
- * Matches if the sub pattern matches and the expression evaluates to true. 
+ * Matches if the sub pattern matches and the expression evaluates to true.
  * <p>
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
@@ -107,11 +107,11 @@
         if (myTest.evalBool(pov)) {
             return pov[0];
         } else {
-            throw Thrower.toEject(optEjector, 
+            throw Thrower.toEject(optEjector,
                                   "such-that expression was false");
         }
     }
-    
+
     /**
      *
      */



1.8       +29 -28    e/src/jsrc/org/erights/e/elang/evm/VarPattern.java

Index: VarPattern.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/VarPattern.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- VarPattern.java	2001/07/14 12:57:22	1.7
+++ VarPattern.java	2001/09/06 09:55:44	1.8
@@ -1,25 +1,24 @@
 package org.erights.e.elang.evm;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.interp.ScopeSetup;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.visitors.ETreeVisitor;
@@ -29,29 +28,31 @@
 import org.erights.e.elib.slot.Slot;
 import org.erights.e.elib.slot.SlotGuard;
 import org.erights.e.elib.tables.ConstMap;
-import org.erights.e.elib.tables.FlexMap;
 import org.erights.e.elib.tables.FlexList;
+import org.erights.e.elib.tables.FlexMap;
 import org.erights.e.elib.util.OneArgFunc;
 
+import java.io.IOException;
+
 
 /**
  * BNF: 'var' Identifier ':' expr <p>
  *
- * The identifier on the left is the defining occurrence of a variable 
- * name.  The expression on the right is a "slot guard expression".  The 
- * object it evaluates to will be treated as a SlotGuard, and asked to make a 
+ * The identifier on the left is the defining occurrence of a variable
+ * name.  The expression on the right is a "slot guard expression".  The
+ * object it evaluates to will be treated as a SlotGuard, and asked to make a
  * slot initialized from a specimen, as if: <p><pre>
  *
  *      def slot := slotGuard makeSlot(specimen, XXX)
  *
- * <p></pre>This slot is then defined as the slot for a variable of this name 
+ * <p></pre>This slot is then defined as the slot for a variable of this name
  * in the scope starting immediately after this name. <p>
  *
- * But wait!  That scope includes the slot guard expression?!?  As with the 
- * def-expression, this circularity is indeed allowed and correct in the 
- * user-level language, but the kernel-level language (ie, the parse node 
- * VarPattern) imposes a well-formedness criterea that allows us to 
- * evaluate in the wrong order without effect.  A circular user-level 
+ * But wait!  That scope includes the slot guard expression?!?  As with the
+ * def-expression, this circularity is indeed allowed and correct in the
+ * user-level language, but the kernel-level language (ie, the parse node
+ * VarPattern) imposes a well-formedness criterea that allows us to
+ * evaluate in the wrong order without effect.  A circular user-level
  * VarPattern is also statically rejected. <p>
  *
  * @see org.erights.e.elang.evm.DefineExpr
@@ -59,9 +60,9 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class VarPattern extends Pattern {
-    
+
     /**
-     * A set of all the variable names that may not be shadowed (ie, 
+     * A set of all the variable names that may not be shadowed (ie,
      * redefined)
      */
     static public final ConstMap NonShadowable
@@ -69,12 +70,12 @@
 
     private String myVarName;
     private EExpr mySlotGuardExpr;
-    
+
     /**
-     * If 'varName' would shadow a non-shadowable, throw a (XXX to be 
+     * If 'varName' would shadow a non-shadowable, throw a (XXX to be
      * defined) exception instead.  <p>
-     * 
-     * If the VarPattern would not be well-formed, throw a (XXX to be 
+     *
+     * If the VarPattern would not be well-formed, throw a (XXX to be
      * defined) exception instead.  <p>
      */
     public VarPattern(String varName, EExpr slotGuardExpr) {
@@ -143,7 +144,7 @@
                              other.mySlotGuardExpr,
                              bindings));
     }
-    /** 
+    /**
      * A VarPattern will never return null for this.  It is named
      * 'optName' because it is polymorphic with IgnorePattern
      */
@@ -170,7 +171,7 @@
                                 OneArgFunc optEjector)
     {
         Scope[] pov = scope.newPov();
-        //Because of the well-formedness criterea, we may safely evaluate 
+        //Because of the well-formedness criterea, we may safely evaluate
         //this in the wrong order
         Object sg = mySlotGuardExpr.subEval(pov, false);
         SlotGuard slotGuard = (SlotGuard)E.as(sg, SlotGuard.class);



1.16      +21 -20    e/src/jsrc/org/erights/e/elang/interp/Help.java

Index: Help.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/Help.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Help.java	2001/02/02 06:28:27	1.15
+++ Help.java	2001/09/06 09:55:45	1.16
@@ -1,34 +1,35 @@
 package org.erights.e.elang.interp;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
-import java.io.StringWriter;
 import org.erights.e.develop.format.StringHelper;
-import org.erights.e.elib.base.UnQuote;
+import org.erights.e.elib.base.MessageDesc;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.base.TypeDesc;
-import org.erights.e.elib.base.MessageDesc;
+import org.erights.e.elib.base.UnQuote;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.ConstMap;
 
+import java.io.IOException;
+import java.io.StringWriter;
+
 
 /**
  * Implements the E help command
@@ -36,15 +37,15 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class Help {
-    
+
     /**
      *
      */
     public Help() {}
 
     /**
-     * Return name prefixed by "a " or "an " according to a simple (and 
-     * therefore inadequate) heuristic.  But good enough for cheezy uses.  
+     * Return name prefixed by "a " or "an " according to a simple (and
+     * therefore inadequate) heuristic.  But good enough for cheezy uses.
      * Note that this routine is not expected to internationalize well.
      */
     static private String aan(String name) {
@@ -64,10 +65,10 @@
         StringBuffer buf = strWriter.getBuffer();
         return new UnQuote(StringHelper.canonical(buf.toString()));
     }
-    
+
     /**
-     * XXX This should probably be moved to 
-     * TypeDesc.printHelpOn() 
+     * XXX This should probably be moved to
+     * TypeDesc.printHelpOn()
      */
     public void run(Object subject, TextWriter out) throws IOException {
         subject = Ref.resolution(subject);
@@ -77,7 +78,7 @@
             out.println(aan(subject.getClass().getName()));
         }
         if (Ref.isNear(subject)) {
-            TypeDesc type 
+            TypeDesc type
               = (TypeDesc)E.call(subject, "getAllegedType");
             ConstMap mTypeMap = type.getMessageTypes().sortKeys();
             MessageDesc[] mTypes



1.5       +8 -9      e/src/jsrc/org/erights/e/elang/interp/InteractiveInterp.java

Index: InteractiveInterp.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/InteractiveInterp.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- InteractiveInterp.java	2001/09/02 22:36:51	1.4
+++ InteractiveInterp.java	2001/09/06 09:55:45	1.5
@@ -19,13 +19,6 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Properties;
-import javax.swing.UnsupportedLookAndFeelException;
 import org.erights.e.develop.exception.ExceptionMgr;
 import org.erights.e.develop.exception.PrintStreamWriter;
 import org.erights.e.develop.exception.ThrowableSugar;
@@ -37,9 +30,7 @@
 import org.erights.e.elang.syntax.FileFeeder;
 import org.erights.e.elang.syntax.LineFeeder;
 import org.erights.e.elang.syntax.NeedMoreException;
-import org.erights.e.elang.syntax.SyntaxException;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.Runner;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.ref.Resolver;
@@ -49,6 +40,14 @@
 import org.erights.e.elib.util.AlreadyDefinedException;
 import org.erights.e.meta.java.io.FileGetter;
 import org.erights.e.meta.java.io.FileSugar;
+
+import javax.swing.*;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Properties;
 
 
 /**



1.67      +9 -13     e/src/jsrc/org/erights/e/elang/interp/Interp.java

Index: Interp.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/Interp.java,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- Interp.java	2001/09/03 18:20:18	1.66
+++ Interp.java	2001/09/06 09:55:45	1.67
@@ -19,16 +19,6 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Properties;
-import javax.swing.LookAndFeel;
-import javax.swing.UIManager;
-import javax.swing.UnsupportedLookAndFeelException;
 import org.erights.e.develop.exception.ExceptionMgr;
 import org.erights.e.develop.exception.PrintStreamWriter;
 import org.erights.e.develop.exception.ThrowableSugar;
@@ -40,9 +30,7 @@
 import org.erights.e.elang.syntax.EParser;
 import org.erights.e.elang.syntax.FileFeeder;
 import org.erights.e.elang.syntax.LineFeeder;
-import org.erights.e.elang.syntax.SyntaxException;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.Runner;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.ref.Resolver;
@@ -51,9 +39,17 @@
 import org.erights.e.elib.tables.Twine;
 import org.erights.e.elib.util.AlreadyDefinedException;
 import org.erights.e.elib.util.ClassCache;
-import org.erights.e.elib.util.TwineException;
 import org.erights.e.meta.java.io.FileGetter;
 import org.erights.e.meta.java.io.FileSugar;
+
+import javax.swing.*;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Properties;
 
 
 /**



1.2       +5 -5      e/src/jsrc/org/erights/e/elang/interp/InterpLoop.java

Index: InterpLoop.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/InterpLoop.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InterpLoop.java	2001/08/05 07:01:24	1.1
+++ InterpLoop.java	2001/09/06 09:55:45	1.2
@@ -29,9 +29,9 @@
  * @author <a href="mailto:tstanley@cocoon.com">Terry Stanley</a>
  */
 public interface InterpLoop {
-    
+
     /**
-     * Changes the lexer to read lines from this source text rather than 
+     * Changes the lexer to read lines from this source text rather than
      * wherever it was initially reading from.
      */
     void setSource(Twine newSource);
@@ -39,9 +39,9 @@
     /**
      * Interpret until we're finished.  <p>
      *
-     * Return null if program succeeded.  Otherwise, return the problem with 
-     * which it failed.  A NeedMoreException, though, throws straight 
-     * through. 
+     * Return null if program succeeded.  Otherwise, return the problem with
+     * which it failed.  A NeedMoreException, though, throws straight
+     * through.
      */
     Throwable interpret();
 }



1.4       +20 -20    e/src/jsrc/org/erights/e/elang/interp/Interpreter.java

Index: Interpreter.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/Interpreter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Interpreter.java	2001/08/13 01:47:03	1.3
+++ Interpreter.java	2001/09/06 09:55:45	1.4
@@ -24,12 +24,12 @@
 import org.erights.e.elib.tables.ConstMap;
 
 /**
- * Defines the protocol of the object known as "interp" in the privileged 
+ * Defines the protocol of the object known as "interp" in the privileged
  * scope.
  * <p>
- * This is the interpreted program's interface to the read-eval-print loop 
- * that's driving its evaluation.  The spawner of an interpreter will 
- * normally control that interpreter through a different interface, the 
+ * This is the interpreted program's interface to the read-eval-print loop
+ * that's driving its evaluation.  The spawner of an interpreter will
+ * normally control that interpreter through a different interface, the
  * InterpLoop.
  *
  * @see InterpLoop
@@ -37,9 +37,9 @@
  * @author <a href="mailto:tstanley@cocoon.com">Terry Stanley</a>
  */
 public interface Interpreter {
-    
+
     /**
-     * Should an input expression be echoed as expanded to Kernel-E as well 
+     * Should an input expression be echoed as expanded to Kernel-E as well
      * as evaluated?
      * <p>
      * If so, the expanded form will be shown in a "# expand: ..." block
@@ -47,22 +47,22 @@
     boolean getExpand();
 
     /**
-     * Should problem reports show their Java stack trace as well as their E 
+     * Should problem reports show their Java stack trace as well as their E
      * stack trace?
      * <p>
-     * This switch only makes sense while we're interpreting parse trees, 
-     * rather than compiling E to jvm byte codes.  While we're interpreting, 
-     * the Java stack trace tends to large and uninformative.  Once we're 
-     * compiling, the Java stack trace should be all there is, and should do 
+     * This switch only makes sense while we're interpreting parse trees,
+     * rather than compiling E to jvm byte codes.  While we're interpreting,
+     * the Java stack trace tends to large and uninformative.  Once we're
+     * compiling, the Java stack trace should be all there is, and should do
      * both jobs well.  So, at that time, this flag will be ignored.
      */
     boolean getVerbose();
-    
+
     /**
      * Is this a read-eval-print loop for an interactive command line?
      * <p>
-     * If so, then the top scope should be mutable, each outcome should be 
-     * reported, prompts should be generated, and evaluation should continue 
+     * If so, then the top scope should be mutable, each outcome should be
+     * reported, prompts should be generated, and evaluation should continue
      * after errors.
      * <p>
      * "interactive" is an immutable property, since it's too hard to change.
@@ -75,7 +75,7 @@
     ConstList getArgs();
 
     /**
-     * A map from String (property names) to Strings (property values) that's 
+     * A map from String (property names) to Strings (property values) that's
      * assumed to reflect System.getProperties() and the eprops.txt file.
      */
     ConstMap getProps();
@@ -115,17 +115,17 @@
      * Allows an E interpreter that has been block(ed)AtTop to continue
      */
     void continueAtTop();
-    
+
     /**
      * Causes the E interpreter to exit the next time it's between top-level
      * expression evaluations.
      * <p>
-     * If optProblem is null, then this is a successful (even if premature) 
-     * exit.  Otherwise, it's an exceptional exit complaining of the 
-     * problem.  For the main interpreter, a normal exit exits with exitCode 
+     * If optProblem is null, then this is a successful (even if premature)
+     * exit.  Otherwise, it's an exceptional exit complaining of the
+     * problem.  For the main interpreter, a normal exit exits with exitCode
      * 0.  An exceptional exit complains and exits with exitCode -1.
      * <p>
-     * If block(ed)AtTop, an exitAtTop will happen immediately, rather than 
+     * If block(ed)AtTop, an exitAtTop will happen immediately, rather than
      * waiting for a continueAtTop.
      */
     void exitAtTop(Throwable optProblem);



1.2       +8 -7      e/src/jsrc/org/erights/e/elang/interp/LazyEvalSlot.java

Index: LazyEvalSlot.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/LazyEvalSlot.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LazyEvalSlot.java	2001/03/14 13:04:17	1.1
+++ LazyEvalSlot.java	2001/09/06 09:55:45	1.2
@@ -19,7 +19,6 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elang.evm.EExpr;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.syntax.EParser;
@@ -28,6 +27,8 @@
 import org.erights.e.elib.slot.Slot;
 import org.erights.e.elib.tables.Twine;
 
+import java.io.IOException;
+
 /**
  * Exists to allow delaying the work of really importing during
  * ScopeSetup, while also allowing the imported things to be in the
@@ -53,11 +54,11 @@
     private Object myOptValue;
 
     /**
-     * @param scope The scope in which to evaluate the source text.  It's 
-     * declared as an Object rather than Scope so that it can be a promise 
-     * for a Scope.  This promise must become fulfilled before the first 
+     * @param scope The scope in which to evaluate the source text.  It's
+     * declared as an Object rather than Scope so that it can be a promise
+     * for a Scope.  This promise must become fulfilled before the first
      * getValue() happens.
-     * @param source The source text to be evaluated in the promised scope at 
+     * @param source The source text to be evaluated in the promised scope at
      * the time of the first getValue().
      */
     /*package*/ LazyEvalSlot(Object scope, Twine source) {
@@ -69,8 +70,8 @@
     /**
      * Returns the result of evaluating my source text in my scope. <p>
      *
-     * This evaluation only happens the first time, after which the value is 
-     * cached and returned for later requests.  If the value isn't confined, 
+     * This evaluation only happens the first time, after which the value is
+     * cached and returned for later requests.  If the value isn't confined,
      * this has security implications, so be careful how you use this class!
      */
     public Object getValue() {



1.33      +19 -18    e/src/jsrc/org/erights/e/elang/interp/LoaderScope.java

Index: LoaderScope.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/LoaderScope.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- LoaderScope.java	2001/07/14 12:57:22	1.32
+++ LoaderScope.java	2001/09/06 09:55:45	1.33
@@ -18,8 +18,6 @@
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
-import java.net.URL;
 import org.erights.e.develop.exception.ThrowableSugar;
 import org.erights.e.elang.evm.EExpr;
 import org.erights.e.elang.scope.Scope;
@@ -41,6 +39,9 @@
 import org.erights.e.elib.util.ClassCache;
 import org.erights.e.meta.java.net.URLSugar;
 
+import java.io.IOException;
+import java.net.URL;
+
 /**
  * Provides access to the java fully-qualified class namespace as a scope
  *
@@ -54,12 +55,12 @@
     private ClassLoader myOptLoader;
 
     /**
-     * The values in the slots are either EStaticWrappers on Class objects 
-     * (for safe classes), PackageScopes (for packages), or whatever value a 
+     * The values in the slots are either EStaticWrappers on Class objects
+     * (for safe classes), PackageScopes (for packages), or whatever value a
      * .emaker file evaluated to, when interpreted in the universalScope.
      */
     private FlexMap myLocals;
-    
+
     /**
      *
      */
@@ -75,7 +76,7 @@
     /*package*/ LoaderScope(Scope univScope) {
         this(univScope, null);
     }
-    
+
     /** returns null if not found */
     private URL optResource(String rName) {
         if (myOptLoader == null) {
@@ -116,12 +117,12 @@
         return StaticMaker.make(clazz);
     }
 
-    /** 
-     * Gets the value at fqName, and indicate whether it is itself confined. 
+    /**
+     * Gets the value at fqName, and indicate whether it is itself confined.
      * <p>
      *
-     * If not found, throws an exception.  Sets isConfinedPtr[0] according to 
-     * whether the result is itself confined (transitively immutable & 
+     * If not found, throws an exception.  Sets isConfinedPtr[0] according to
+     * whether the result is itself confined (transitively immutable &
      * non-authority granting, or safe to treat as such).
      */
     private Object getValue(String fqName, boolean[] isConfinedPtr) {
@@ -143,7 +144,7 @@
         if (null != eSource) {
             EExpr eExpr = (EExpr)EParser.run(eSource);
             Scope univ = myUnivScope.sprout();
-            //XXX Once we have the :confined auditor, we should detect 
+            //XXX Once we have the :confined auditor, we should detect
             //whether this object passes this auditor.
             isConfinedPtr[0] = false;
             return eExpr.eval(univ.newPov());
@@ -157,14 +158,14 @@
     public Slot getLocalSlot(String fqName) {
         Slot result = (Slot)myLocals.get(fqName, null);
         if (null != result) {
-            //XXX Once we detect that an emaker is confined and cache it for 
+            //XXX Once we detect that an emaker is confined and cache it for
             // longer, we need to also somehow check if a later ESource is
             // available, and, if so, use it and (perhaps?) upgrade
             // old instances.  Since we don't yet test emaker confinement, so
-            // we can't yet cache them for longer than it takes to resolve a 
-            // cycle (one top-level import: request), this isn't yet an 
-            // issue. 
-            //XXX Since we found it, it must either be there to resolve a 
+            // we can't yet cache them for longer than it takes to resolve a
+            // cycle (one top-level import: request), this isn't yet an
+            // issue.
+            //XXX Since we found it, it must either be there to resolve a
             // cycle, or it is itself confined.
             return result;
         }
@@ -175,14 +176,14 @@
         result = FinalSlotMaker.THE_ONE.makeSlot(ref, null);
         myLocals.put(fqName, result, true);
         Object value;
-        //start with it set to false, so we'll also remove fqName if getValue 
+        //start with it set to false, so we'll also remove fqName if getValue
         //throws
         boolean[] keep = { false };
         try {
             value = getValue(fqName, keep);
         } finally {
             if (!keep[0]) {
-                //keep[0] says that the stored association is itself 
+                //keep[0] says that the stored association is itself
                 //confined.  If not, remove it.
                 myLocals.removeKey(fqName, true);
             }



1.5       +9 -9      e/src/jsrc/org/erights/e/elang/interp/Loop.java

Index: Loop.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/Loop.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Loop.java	2001/08/29 00:20:16	1.4
+++ Loop.java	2001/09/06 09:55:45	1.5
@@ -18,34 +18,34 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 /**
  * An StaticMaker on this class is the function names "loop" in the
  * universalScope.  <p>
  *
- * This wrapper is used as the E language's primitive looping construct.  
- * When called as a one-argument function, it just repeatedly calls its 
+ * This wrapper is used as the E language's primitive looping construct.
+ * When called as a one-argument function, it just repeatedly calls its
  * argument as a zero-argument function.
  *
  * @author Mark S. Miller.
  */
 public class Loop {
-    
+
     /**
      *
      */
     static public final Loop THE_ONE = new Loop();
-    
-    /** 
+
+    /**
      *
      */
     private Loop() {}
-    
+
     /**
-     * Since the value is never used, we use type Runnable rather than Thunk. 
-     * But this shouldn't matter to E language programmers.  An E language 
+     * Since the value is never used, we use type Runnable rather than Thunk.
+     * But this shouldn't matter to E language programmers.  An E language
      * thunk will do fine.
      */
     public void run(Runnable aThunk) {



1.19      +19 -18    e/src/jsrc/org/erights/e/elang/interp/PackageScope.java

Index: PackageScope.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/PackageScope.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- PackageScope.java	2001/02/02 06:28:27	1.18
+++ PackageScope.java	2001/09/06 09:55:45	1.19
@@ -1,24 +1,23 @@
 package org.erights.e.elang.interp;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.scope.ScopeImpl;
 import org.erights.e.elib.base.Printable;
@@ -28,6 +27,8 @@
 import org.erights.e.elib.tables.ConstMap;
 import org.erights.e.elib.util.AlreadyDefinedException;
 
+import java.io.IOException;
+
 /**
  * Provides access to the java fully-qualified class namespace as a scope
  *
@@ -36,7 +37,7 @@
 /*package*/ class PackageScope extends Scope implements Printable {
 
     static private final Scope[] NO_SCOPES = {};
-    
+
     private Scope mySubstrate;
     private String myProtocol;
     private String myPrefix;
@@ -56,14 +57,14 @@
         //chop off just the "*" (leave the terminal ".")
         myPrefix = fqName.substring(0, fqName.length() - "*".length());
     }
-    
+
     /**
      *
      */
     public Scope snapshot() {
         return new ScopeImpl(NO_SCOPES, locals());
     }
-    
+
     /**
      *
      */
@@ -71,7 +72,7 @@
         return new UnQuote(myPrefix + "<qualified names>\n" +
                 "    evaluate to the package or statics-wrapper");
     }
-    
+
     /**
      *
      */
@@ -80,28 +81,28 @@
     {
         throw new RuntimeException("Package scopes cannot be extended");
     }
-    
+
     /**
      *
      */
     public Slot getLocalSlot(String name) {
         return mySubstrate.getLocalSlot(myPrefix + name);
     }
-    
+
     /**
      *
      */
     public ConstMap locals() {
         throw new RuntimeException("XXX locals() not yet implemented");
     }
-    
+
     /**
      *
      */
     public Scope[] parents() {
         return NO_SCOPES;
     }
-    
+
     /**
      *
      */



1.10      +3 -3      e/src/jsrc/org/erights/e/elang/interp/ProtocolDesc.java

Index: ProtocolDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/ProtocolDesc.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ProtocolDesc.java	2001/08/29 00:20:16	1.9
+++ ProtocolDesc.java	2001/09/06 09:55:45	1.10
@@ -42,7 +42,7 @@
  * instance of an audited type.
  */
 public class ProtocolDesc extends TypeDesc {
-    
+
     static public final StaticMaker ProtocolDescMaker =
         StaticMaker.make(ProtocolDesc.class);
 
@@ -85,8 +85,8 @@
         if (null == optBox) {
             throw Thrower.toEject(optEjector, "unrecognized brand");
         }
-        //if optBox isn't null but fails to unseal, that's a thrown exception 
-        //rather than a coercion failure, so this correctly does not involve 
+        //if optBox isn't null but fails to unseal, that's a thrown exception
+        //rather than a coercion failure, so this correctly does not involve
         //optEjector.
         try {
             return myUnsealer.unseal(optBox);



1.3       +3 -3      e/src/jsrc/org/erights/e/elang/interp/ResourceUriGetter.java

Index: ResourceUriGetter.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/ResourceUriGetter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ResourceUriGetter.java	2001/08/29 00:20:16	1.2
+++ ResourceUriGetter.java	2001/09/06 09:55:45	1.3
@@ -18,7 +18,7 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 import java.net.URL;
@@ -27,10 +27,10 @@
  * Bound to resource__uriGetter in the universal scope
  */
 public class ResourceUriGetter {
-    
+
     /** prevent instantiation */
     private ResourceUriGetter() {}
-    
+
     /**
      * &lt;resource:...> expands to resource__uriGetter get(...)
      */



1.64      +17 -18    e/src/jsrc/org/erights/e/elang/interp/ScopeSetup.java

Index: ScopeSetup.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/ScopeSetup.java,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- ScopeSetup.java	2001/08/24 17:14:02	1.63
+++ ScopeSetup.java	2001/09/06 09:55:45	1.64
@@ -19,7 +19,6 @@
 Contributor(s): ______________________________________.
 */
 
-import java.math.BigInteger;
 import org.capml.quasi.XMLQuasiParser;
 import org.erights.e.elang.scope.MutableScope;
 import org.erights.e.elang.scope.Scope;
@@ -165,16 +164,16 @@
 
             { "promiseAllFulfilled", univ,
               "<import:org.erights.e.elang.interp.promiseAllFulfilled>" },
-            
+
             /*
-             * Like the above, these are not shadowable and in the universal 
+             * Like the above, these are not shadowable and in the universal
              * scope, but are not implicitly used by the E expansion.
              */
-            
+
             { "help",           new Help() },
             { "require",        univ,
               "<import:org.erights.e.elang.interp.require>" },
-                                
+
             { "nullOk",         NullOkMaker.THE_ONE },
             { "near",           univ,
               "<import:org.erights.e.elib.slot.near>" },
@@ -183,7 +182,7 @@
                               "XXX PassByCopy auditor not yet implemented")) },
             { "confined",       new RuinedSlot(new RuntimeException(
                               "XXX confined auditor not yet implemented")) },
-                                    
+
             { "OrderedSpaceMaker", univ,
               "<import:org.erights.e.elang.coord.OrderedSpaceMaker>" },
 
@@ -204,7 +203,7 @@
             { "TextWriter",     ClassDesc.make(TextWriter.class) },
 
             { "import__uriGetter",   importer },
-            { "resource__uriGetter", 
+            { "resource__uriGetter",
                                 StaticMaker.make(ResourceUriGetter.class) },
             { "simple__quasiParser", SimpleQuasiParser.THE_ONE },
             { "rx__quasiParser",     univ,
@@ -225,9 +224,9 @@
 
     /**
      * Returns a fresh instantiation of the privileged scope.  <p>
-     * 
-     * This scope contains the root magic powers, so should only be given to 
-     * fully trusted entities. 
+     *
+     * This scope contains the root magic powers, so should only be given to
+     * fully trusted entities.
      */
     static public Scope privileged(boolean interactive,
                                    TextWriter stdout,
@@ -242,9 +241,9 @@
                           props,
                           interp);
     }
-    
+
     /**
-     * If the interp isn't resolved yet, the props must be provided 
+     * If the interp isn't resolved yet, the props must be provided
      * explicitly.
      */
     static public Scope privileged(boolean interactive,
@@ -256,10 +255,10 @@
         Scope univ = universal();
 
         // XXX need some decent way to handle magic powers.
-        StaticMaker entropyMaker = 
+        StaticMaker entropyMaker =
             StaticMaker.make(getClass("net.vattp.security.ESecureRandom"));
         Object optEntropy = E.call(entropyMaker, "getESecureRandom");
-        StaticMaker timerMaker = 
+        StaticMaker timerMaker =
             StaticMaker.make(getClass("org.erights.e.extern.timer.Timer"));
         Object optTimer = E.call(timerMaker, "theTimer");
         //XXX pretend we have separate persistent & transient timers
@@ -274,7 +273,7 @@
         } else {
             //We're distributed.  Obtain the powers.
             StaticMaker introducerMaker = StaticMaker.make(optIntroducerClass);
-        
+
             Object[] pair = (Object[])E.call(introducerMaker,
                                              "newPair",
                                              props,
@@ -287,7 +286,7 @@
         Object[] promise = Ref.promise();
         Ref privScope = (Ref)promise[0];
         Resolver privResolver = (Resolver)promise[1];
-        
+
         Object[][] privPairs = {
             { "file__uriGetter",    StaticMaker.make(FileGetter.class) },
             { "fileURL__uriGetter", new URLGetter("file") },
@@ -296,7 +295,7 @@
             { "gopher__uriGetter",  new URLGetter("gopher") },
             { "news__uriGetter",    new URLGetter("news") },
             { "cap__uriGetter",     optIntroducer },
-            
+
             { "unsafe__uriGetter",  new UnsafeLoaderScope() },
             { "awt__uriGetter",     privScope,
               "<unsafe:java.awt.*>" },
@@ -305,7 +304,7 @@
             { "JPanel__quasiParser", privScope,
               "<import:org.erights.ex.swing.JPanelQParserMaker> " +
               "new(awt__uriGetter, swing__uriGetter)" },
-              
+
             { "CommandMaker",       privScope,
               "<import:org.erights.e.elib.extern.CommandMakerAuthor>(" +
                   "<unsafe:java.lang.Runtime> getRuntime())" },



1.6       +10 -10    e/src/jsrc/org/erights/e/elang/interp/URLGetter.java

Index: URLGetter.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/URLGetter.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- URLGetter.java	2001/03/20 03:18:23	1.5
+++ URLGetter.java	2001/09/06 09:55:45	1.6
@@ -1,25 +1,25 @@
 package org.erights.e.elang.interp;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.net.URL;
 import java.net.MalformedURLException;
+import java.net.URL;
 
 /**
  * An instance of this exists for each of the standard URL protocol,



1.6       +5 -4      e/src/jsrc/org/erights/e/elang/interp/UnsafeLoaderScope.java

Index: UnsafeLoaderScope.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/UnsafeLoaderScope.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- UnsafeLoaderScope.java	2001/07/14 12:57:22	1.5
+++ UnsafeLoaderScope.java	2001/09/06 09:55:45	1.6
@@ -18,7 +18,6 @@
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
 import org.erights.e.elang.scope.Scope;
 import org.erights.e.elang.scope.ScopeImpl;
 import org.erights.e.elib.base.Printable;
@@ -35,6 +34,8 @@
 import org.erights.e.elib.util.AlreadyDefinedException;
 import org.erights.e.elib.util.ClassCache;
 
+import java.io.IOException;
+
 /**
  * Provides access to the java fully-qualified class namespace as a scope
  *
@@ -47,11 +48,11 @@
     private ClassLoader myOptLoader;
 
     /**
-     * The values in the slots are either ESTaticWrappers around Class 
+     * The values in the slots are either ESTaticWrappers around Class
      * objects (for classes), PackageScopes (for packages).
      */
     private FlexMap myLocals;
-    
+
     /**
      *
      */
@@ -66,7 +67,7 @@
     /*package*/ UnsafeLoaderScope() {
         this(null);
     }
-    
+
     /** null if not found */
     private StaticMaker getStaticMaker(String fqName) {
         Class clazz = null;



1.22      +9 -9      e/src/jsrc/org/erights/e/elang/scope/MutableScope.java

Index: MutableScope.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/scope/MutableScope.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- MutableScope.java	2001/07/14 12:57:22	1.21
+++ MutableScope.java	2001/09/06 09:55:45	1.22
@@ -1,20 +1,20 @@
 package org.erights.e.elang.scope;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.42      +29 -30    e/src/jsrc/org/erights/e/elang/scope/Scope.java

Index: Scope.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/scope/Scope.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- Scope.java	2001/07/14 12:57:22	1.41
+++ Scope.java	2001/09/06 09:55:45	1.42
@@ -1,32 +1,28 @@
 package org.erights.e.elang.scope;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
-import java.io.StringWriter;
 import org.erights.e.develop.format.StringHelper;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.base.UnQuote;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.slot.FinalSlotMaker;
-import org.erights.e.elib.slot.Slot;
 import org.erights.e.elib.slot.RuinedSlot;
 import org.erights.e.elib.slot.Slot;
 import org.erights.e.elib.tables.ConstList;
@@ -34,19 +30,22 @@
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.tables.FlexMap;
 import org.erights.e.elib.util.AlreadyDefinedException;
+
+import java.io.IOException;
+import java.io.StringWriter;
 
-/** 
+/**
  * A ConstMap (sort of) from names (strings) to slots.
  * Scopes inherit from each other in a DAG, so they can
  * be used to model nesting lexical environments.  The associations in
  * the most leafward part of a Scope are called "locals". <p>
  *
- * @author <a href="mailto:markm@erights.org">Mark S. Miller</a> 
+ * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public abstract class Scope {
-    
+
     /**
-     * 
+     *
      */
     public abstract Scope snapshot();
 
@@ -71,7 +70,7 @@
             String[] keys = (String[])ruins.getKeys(String.class);
             for (int i = 0; i < keys.length; i++) {
                 String name = keys[i];
-                AlreadyDefinedException problem = 
+                AlreadyDefinedException problem =
                     new AlreadyDefinedException(name + " ambiguous");
                 ruinTable.put(name, new RuinedSlot(problem));
             }
@@ -82,7 +81,7 @@
     /**
      * The default implementation here just works in terms of
      * bindSlot(). <p>
-     * 
+     *
      * An interactive top-level Scope (a MutableScope) adds a
      * 'name' => 'slot' binding to itself if necessary.
      */
@@ -94,7 +93,7 @@
 
     /**
      * Returns a string showing the bindings in this scope in a
-     * pleasant human readable format 
+     * pleasant human readable format
      */
     public UnQuote bindings() throws IOException {
         StringWriter buf = new StringWriter();
@@ -116,16 +115,16 @@
      * A normal Scope returns a Scope just like this one, except for a
      * new local binding 'name' to 'slot'.  <p>
      *
-     * If this scope already has a local for 'name', bindSlot() normally 
-     * throws AlreadyDefinedException.  But an interactive top-level Scope (a 
-     * MutableScope) adds a 'name' => 'slot' binding to itself if necessary.  
+     * If this scope already has a local for 'name', bindSlot() normally
+     * throws AlreadyDefinedException.  But an interactive top-level Scope (a
+     * MutableScope) adds a 'name' => 'slot' binding to itself if necessary.
      * If there already is a local named 'name', bindSlot() replaces it.
      */
     public abstract Scope bindSlot(String name, Slot slot)
     throws AlreadyDefinedException;
 
     /**
-     * Return a scope derived from this scope in which each name (key) in 
+     * Return a scope derived from this scope in which each name (key) in
      * names is bound to a reference broken by problem
      */
     public Scope brokenBindings(ConstMap names, Object problem) {
@@ -162,12 +161,12 @@
         Slot slot = getSlot(name);
         if (null == slot) {
             throw new UndefinedVariableException(name + " not defined");
-            
+
         } else {
             //If slot is a RuinedSlot, its getValue() throws the
             //required exception.
-            //If slot is a SlotRef, its getValue() returns a synchronously 
-            //resolving promise for the value of the promised slot 
+            //If slot is a SlotRef, its getValue() returns a synchronously
+            //resolving promise for the value of the promised slot
             return slot.getValue();
         }
     }
@@ -175,8 +174,8 @@
     /**
      * If there is no association for 'name', getLocalSlot() returns null. <p>
      *
-     * XXX This should be protected, but Java's peculiar "protected" rules 
-     * prevent that.  It shouldn't be dangerous to make this public, but it 
+     * XXX This should be protected, but Java's peculiar "protected" rules
+     * prevent that.  It shouldn't be dangerous to make this public, but it
      * bears examination.
      *
      * @returns nullOk;
@@ -233,7 +232,7 @@
 
     /**
      * The default put() is defined in the obvious fashion in
-     * terms of getSlot().setValue(newValue).  <p> 
+     * terms of getSlot().setValue(newValue).  <p>
      */
     public void put(String name, Object newValue) {
         Slot slot = getSlot(name);



1.15      +10 -10    e/src/jsrc/org/erights/e/elang/scope/ScopeImpl.java

Index: ScopeImpl.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/scope/ScopeImpl.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- ScopeImpl.java	2000/11/14 11:15:33	1.14
+++ ScopeImpl.java	2001/09/06 09:55:45	1.15
@@ -1,20 +1,20 @@
 package org.erights.e.elang.scope;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -41,7 +41,7 @@
     public ScopeImpl(Scope[] parents) {
         this(parents, ConstMap.EmptyMap);
     }
-    
+
     /**
      *
      */



1.5       +9 -9      e/src/jsrc/org/erights/e/elang/scope/UndefinedVariableException.java

Index: UndefinedVariableException.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/scope/UndefinedVariableException.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- UndefinedVariableException.java	2000/11/14 11:15:33	1.4
+++ UndefinedVariableException.java	2001/09/06 09:55:45	1.5
@@ -1,20 +1,20 @@
 package org.erights.e.elang.scope;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.6       +9 -9      e/src/jsrc/org/erights/e/elang/syntax/Assoc.java

Index: Assoc.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/Assoc.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Assoc.java	2000/12/25 06:23:36	1.5
+++ Assoc.java	2001/09/06 09:55:46	1.6
@@ -1,20 +1,20 @@
 package org.erights.e.elang.syntax;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.75      +119 -119  e/src/jsrc/org/erights/e/elang/syntax/EBuilder.java

Index: EBuilder.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/EBuilder.java,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- EBuilder.java	2001/09/03 18:20:18	1.74
+++ EBuilder.java	2001/09/06 09:55:46	1.75
@@ -1,20 +1,20 @@
 package org.erights.e.elang.syntax;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -26,13 +26,13 @@
 import org.erights.e.elang.evm.DefineExpr;
 import org.erights.e.elang.evm.EExpr;
 import org.erights.e.elang.evm.EMethod;
-import org.erights.e.elang.evm.EscapeExpr;
 import org.erights.e.elang.evm.EScript;
-import org.erights.e.elang.evm.FinallyExpr;
+import org.erights.e.elang.evm.EscapeExpr;
 import org.erights.e.elang.evm.FinalPattern;
+import org.erights.e.elang.evm.FinallyExpr;
+import org.erights.e.elang.evm.HideExpr;
 import org.erights.e.elang.evm.IfExpr;
 import org.erights.e.elang.evm.IgnorePattern;
-import org.erights.e.elang.evm.HideExpr;
 import org.erights.e.elang.evm.ListPattern;
 import org.erights.e.elang.evm.LiteralExpr;
 import org.erights.e.elang.evm.MatchBindExpr;
@@ -82,7 +82,7 @@
     static /*package*/ final EExpr TWINEMAKER   = noun("TwineMaker");
     static /*package*/ final EExpr SSPANMAKER   = noun("SourceSpanMaker");
     static /*package*/ final EExpr REF          = noun("Ref");
-    
+
     static /*package*/ final EExpr PROTMAKER    = noun("ProtocolDescMaker");
     static /*package*/ final EExpr MSGMAKER     = noun("MessageDescMaker");
     static /*package*/ final EExpr PARAMMAKER   = noun("ParamDescMaker");
@@ -93,26 +93,26 @@
     static /*package*/ final EExpr ANY          = noun("any");
     static /*package*/ final EExpr VOID         = noun("void");
 
-    static /*package*/ final EExpr 
+    static /*package*/ final EExpr
     PROMISE_ALL_FULFILLED                       = noun("promiseAllFulfilled");
-    
-    
-    static /*package*/ final EExpr 
+
+
+    static /*package*/ final EExpr
     ORDEREDSPACEMAKER                           = noun("OrderedSpaceMaker");
-    
-    
 
+
+
     private HilbertHotel myHilbert = new HilbertHotel();
-    
+
     private ConstMap myProps;
-    
+
     /**
      *
      */
     public EBuilder(ConstMap props) {
         myProps = props;
     }
-    
+
     /**
      *
      */
@@ -124,7 +124,7 @@
     /*package*/ void reserved(String s) {
         syntaxError("reserved: " + s);
     }
-    
+
     /**
      *
      */
@@ -134,14 +134,14 @@
             syntaxError("The optional " + propName +
                         " feature in eprops.txt is currently off.");
         }
-    }        
+    }
 
     /**
      *
      */
     /*package*/ EExpr assAsr(Object lValue, Object rValue) {
-        
-        return update(lValue, "shiftLeft", 
+
+        return update(lValue, "shiftLeft",
                       list(call(rValue, "negate", list())));
     }
 
@@ -149,10 +149,10 @@
      *
      */
     /*package*/ EExpr assign(Object lValue, Object rValue) {
-        
+
         EExpr lval = (EExpr)lValue;
         EExpr rval = (EExpr)rValue;
-        
+
         /*
          *  x ":=" z
          */
@@ -165,7 +165,7 @@
             EExpr recip = ce.recipient();
             String verb = ce.verb();
             EExpr[] args = ce.args();
-            
+
             /*
              *  x get(y) := z         expands to  x put(y, z)
              *  x get(y1, y2) := z    expands to  x put(y1, y2, z)
@@ -180,10 +180,10 @@
             String newVerb = null;
             if (verb.equals("get")) {
                 newVerb = "put";
-                
+
             } else if (verb.startsWith("get")) {
                 newVerb = "set" + verb.substring("get".length());
-                
+
             } else if (verb.equals("run")) {
                 newVerb = "setRun";
             }
@@ -205,7 +205,7 @@
      * lValue verb= rnValue => lValue := lValue verb(rnValue)
      */
     /*package*/ EExpr update(Object lValue, Object verb, Object rnValue) {
-        
+
         if (lValue instanceof NounExpr) {
             /*
              *  x "verb=" z expands to x := x verb(z)
@@ -255,7 +255,7 @@
      * changed into 'Name' using the standard JavaBeans rule:
      * 'toUpperCase' is applied to the name[0]. <p>
      *
-     * As a result of the assignment conversion rules, 
+     * As a result of the assignment conversion rules,
      * 'a.name(x) := y' is trasformed into 'a setName(x, y)'
      */
     /*package*/ EExpr property(Object recipientExpr,
@@ -292,7 +292,7 @@
         } else if (1 == exprs.length) {
             if ("run" == vrb) {
                 pocket("meta-object");
-                //XXX Security Bug!: We must statically ensure that noun 
+                //XXX Security Bug!: We must statically ensure that noun
                 //names an *enclosing* object expression
                 return new MetaExpr((NounExpr)exprs[0]);
             }
@@ -331,7 +331,7 @@
      *      }
      */
     /*package*/ EExpr classExpr(Object classHead, Object mBody) {
-        
+
         Object[] audits = (Object[])((EList)classHead).get(0);
         Object patts =              ((EList)classHead).get(1);
         Pattern[] patterns = (Pattern[])typedArray(patts, Pattern.class);
@@ -357,8 +357,8 @@
         String makerN = newTemp("maker");
         EExpr passThru = define(finalPattern(selfN),
                                 call(noun(makerN), "adopt", args));
-        MethodNode constructor = method(methHead("new", params, returnGuard), 
-                                        passThru); 
+        MethodNode constructor = method(methHead("new", params, returnGuard),
+                                        passThru);
 
         EExpr disp = object(audits,
                             eScript(list(adoptor, constructor), null));
@@ -384,9 +384,9 @@
         StaticScope leftScope = ((EExpr)left).staticScope();
         StaticScope rightScope = ((EExpr)right).staticScope();
         StaticScope fullScope = leftScope.add(rightScope);
-        String[] names 
+        String[] names
             = (String[])fullScope.namesOut().getKeys(String.class);
-            
+
         return matchBind(hide(ifx(left,
                                   ifx(right,
                                       slotsTuple(names)))),
@@ -418,11 +418,11 @@
         String[] leftOnlyNames  = (String[])leftOnly.getKeys(String.class);
         String[] rightOnlyNames = (String[])rightOnly.getKeys(String.class);
         return matchBind(hide(ifx(left,
-                                  sequence(matchBind(NULL, 
+                                  sequence(matchBind(NULL,
                                                slotsPattern(rightOnlyNames)),
-                                           slotsTuple(names)),        
+                                           slotsTuple(names)),
                               ifx(right,
-                                  sequence(matchBind(NULL, 
+                                  sequence(matchBind(NULL,
                                                slotsPattern(leftOnlyNames)),
                                            slotsTuple(names)),
                                   NULL))),
@@ -430,8 +430,8 @@
     }
 
     /**
-     * Expand a left-pattern and an rValue that might cause a circularity 
-     * into a sequence of expressions without this circularity, except that 
+     * Expand a left-pattern and an rValue that might cause a circularity
+     * into a sequence of expressions without this circularity, except that
      * the place for the expression itself has a null as a placeholder.
      */
     /*package*/ EExpr[] antiCycle(FlexMap conflicts) {
@@ -439,7 +439,7 @@
         if (numVars <= 0) {
             return null;
         }
-        //must expand the circularity away 
+        //must expand the circularity away
         /*
          * <pre><p>
          *
@@ -463,13 +463,13 @@
              */
             Pattern[] pair = { slotDefiner(newName), finalPattern(newNameR) };
             result[i] = define(listPattern(pair),
-                               call(REF, 
-                                    "slotPromise", 
+                               call(REF,
+                                    "slotPromise",
                                     list()));
             /*
              * newNameR resolve(&oldName)
              */
-            result[numVars+1 + i] = call(noun(newNameR), 
+            result[numVars+1 + i] = call(noun(newNameR),
                                          "resolve",
                                          list(slotExpr(oldName)));
         }
@@ -498,7 +498,7 @@
         rVal = renamer.xformEExpr(rVal);
         NounExpr resNoun = (NounExpr)parts[parts.length -1];
         Pattern resPatt = finalPattern(resNoun.name());
-        parts[numVars] = new DefineExpr(resPatt, 
+        parts[numVars] = new DefineExpr(resPatt,
                                         new DefineExpr(patt, rVal));
         return sequence(parts);
     }
@@ -509,7 +509,7 @@
     /*package*/ Pattern finalPattern(Object name) {
         return finalPattern(name, ANY);
     }
-    
+
     /**
      *
      */
@@ -518,7 +518,7 @@
         EExpr vge = (EExpr)valueGuardExpr;
         return new FinalPattern(varName, vge);
     }
-    
+
     /**
      *
      */
@@ -551,7 +551,7 @@
 
     /**
      * A forward declaration. <p>
-     * 
+     *
      * "def name" expands to <pre>
      *     (def [name, name__Resolver] := PromiseMaker(); name__Resolver)
      * </pre>
@@ -566,9 +566,9 @@
         return sequence(define(listPattern(list(finalPattern(name),
                                                 finalPattern(nameR))),
                                call(REF, "promise", list())),
-                        noun(nameR));        
+                        noun(nameR));
     }
-    
+
     /**
      * Binds (resolves) a forward declaration. <p>
      *
@@ -586,7 +586,7 @@
                                       list(noun(temp))),
                                  TRUE));
     }
-    
+
     /**
      * Binds (resolves) a forward declaration. <p>
      *
@@ -606,7 +606,7 @@
                                       list(noun(temp))),
                                  TRUE));
     }
-    
+
     /**
      *
      */
@@ -625,7 +625,7 @@
     /*package*/ Matcher delegatex(Object bodyExpr) {
         String verb = newTemp("verb");
         String args = newTemp("args");
-        
+
         return matcher(listPattern(list(finalPattern(verb),
                                          finalPattern(args))),
                        call(EE, "call",
@@ -663,29 +663,29 @@
      */
     /*package*/ EExpr forx(Object assoc, Object collExpr, Object mBody) {
         EExpr bodyExpr = (EExpr)mBody;
-        
+
         String kTemp = newTemp("key");
         String vTemp = newTemp("value");
-        
+
         Assoc patterns = (Assoc)assoc;
         Pattern key = (Pattern)patterns.key();
         Pattern value = (Pattern)patterns.value();
-        
+
         MsgPatt mpatt = methHead("run",
                                  list(finalPattern(kTemp),
                                       finalPattern(vTemp)),
                                  ANY);
-        
+
         EExpr body = ifx(condAnd(matchBind(noun(kTemp), key),
                                  matchBind(noun(vTemp), value)),
-                         escape(finalPattern("continue"), 
+                         escape(finalPattern("continue"),
                                 sequence(bodyExpr, NULL)));
-        
+
         EExpr closure = object("For loop body",
                                null,
                                list(),
                                methScript(mpatt, body));
-        
+
         return escape(finalPattern("break"),
                       call(collExpr, "iterate", list(closure)));
     }
@@ -792,7 +792,7 @@
     /*package*/ FlexList list(Object a, Object b) {
         return with(list(a), b);
     }
-    
+
     /**
      *
      */
@@ -907,9 +907,9 @@
     }
 
     /**
-     * Given an array of names, return a tuple pattern that will bind all 
-     * these names to slots when matched with an array of slots with the same 
-     * shape. <p> 
+     * Given an array of names, return a tuple pattern that will bind all
+     * these names to slots when matched with an array of slots with the same
+     * shape. <p>
      */
     private Pattern slotsPattern(Object[] names) {
         Pattern[] slotPatts = new Pattern[names.length];
@@ -920,7 +920,7 @@
     }
 
     /**
-     * Given an array of names, return an expression that will make a tuple 
+     * Given an array of names, return an expression that will make a tuple
      * from the slots of the variables of these names
      */
     private EExpr slotsTuple(Object[] names) {
@@ -932,14 +932,14 @@
     }
 
     /**
-     * generate 'unique' temporary variable names for transformations.  
-     * Suffix must be odd to make room for the new guests at the Hilbert 
+     * generate 'unique' temporary variable names for transformations.
+     * Suffix must be odd to make room for the new guests at the Hilbert
      * Hotel.  See hilbert().
      */
     /*package*/ String newTemp(String baseName) {
         return myHilbert.newTemp(baseName);
     }
-    
+
     /**
      *
      */
@@ -960,23 +960,23 @@
     static /*package*/ NounExpr noun(Object name) {
         return new NounExpr((String)name);
     }
-    
+
     /**
      *
      */
     /*package*/ EScript eScript(Object optMethods, Object optMatcher) {
-        return new EScript((EMethod[])typedArray(optMethods, 
+        return new EScript((EMethod[])typedArray(optMethods,
                                                  EMethod.class),
                            (Matcher)optMatcher);
     }
-    
+
     /**
      * For defining an eScript that consists of exactly one method
      */
     /*package*/ EScript methScript(Object msgPatt, Object bodyExpr) {
         return eScript(list(method(msgPatt, bodyExpr)), null);
     }
-    
+
     /**
      * For defining an eScript that consists of exactly one method
      */
@@ -986,7 +986,7 @@
     {
         return object(audits, methScript(msgPatt, bodyExpr));
     }
-    
+
     /**
      *
      */
@@ -1001,17 +1001,17 @@
      */
     /*package*/ EExpr object(Object audits, Object script) {
         Object[] auditPair = (Object[])audits;
-        return object("Needs a docComment", 
+        return object("Needs a docComment",
                       auditPair[0],
                       auditPair[1],
                       (EScript)script);
     }
-        
+
     /**
-     * An optOName may be null (meaning anonymous), a String, a 
-     * LiteralString/LiteralTwine (a literal string as an FQN) or a 
-     * Pattern representing both the variable to be initialized and the 
-     * name part of a FQN. 
+     * An optOName may be null (meaning anonymous), a String, a
+     * LiteralString/LiteralTwine (a literal string as an FQN) or a
+     * Pattern representing both the variable to be initialized and the
+     * name part of a FQN.
      */
     /*package*/ EExpr object(String docComment,
                              Object optOName,
@@ -1021,26 +1021,26 @@
         if (null == optOName || optOName instanceof String) {
             //base case
             return new ObjectExpr(docComment,
-                                  (String)optOName, 
-                                  (NounExpr[])typedArray(auditors, 
+                                  (String)optOName,
+                                  (NounExpr[])typedArray(auditors,
                                                          NounExpr.class),
                                   eScript);
         } else if (optOName instanceof Literal) {
             return object(docComment,
-                          ((Literal)optOName).value(), 
+                          ((Literal)optOName).value(),
                           auditors,
                           eScript);
-                          
+
         } else if (optOName instanceof IgnorePattern) {
             return object(docComment, null, auditors, eScript);
-            
+
         } else {
             Pattern pattern = (Pattern)optOName;
             String optName = pattern.optName();
             if (null != optName) {
                 optName = "*$" + optName + "__Class";
             }
-            return define(pattern, 
+            return define(pattern,
                           object(docComment, optName, auditors, eScript));
         }
     }
@@ -1161,7 +1161,7 @@
         LiteralExpr template = new LiteralExpr(str);
         EExpr matchMaker = call(syntax, "matchMaker", list(template));
         EExpr matcher = call(matchMaker,
-                             "matchBind", 
+                             "matchBind",
                              list(tuple(exprs), noun(tempName)));
         Pattern binds = listPattern(patts);
         EExpr mb = new MatchBindExpr(matcher, binds);
@@ -1274,10 +1274,10 @@
                                                  Matcher.class);
         String tempName = newTemp("specimen");
         EExpr defTemp = define(finalPattern(tempName), specimen);
-        return hide(sequence(defTemp, 
+        return hide(sequence(defTemp,
                              matchExpr(mtchrs, tempName, null)));
     }
-    
+
     /**
      *
      */
@@ -1287,13 +1287,13 @@
     {
         NounExpr specimen = new NounExpr(varName);
         EExpr result;
-        
+
         if (optOtherwise == null) {
             EExpr str = new LiteralExpr("no match: ");
             EExpr[] addArgs = { specimen };
             EExpr[] runArgs = { call(str, "add", addArgs) };
             result = call(THROW, "run", runArgs);
-            
+
         } else {
             result = optOtherwise;
         }
@@ -1303,8 +1303,8 @@
                          result);
         }
         return result;
-    }        
-    
+    }
+
     /**
      *
      */
@@ -1386,7 +1386,7 @@
                 protocol = "file";
                 body = c + ":" + body;
             }
-        }            
+        }
         return call(noun(protocol + "__uriGetter"),
                     "get",
                     list(new LiteralExpr(body)));
@@ -1407,7 +1407,7 @@
                                    "add",
                                    list(uriBodyExpr));
             }
-        }            
+        }
         return call(noun(protocol + "__uriGetter"),
                     "get",
                     list(uriBodyExpr));
@@ -1429,11 +1429,11 @@
      *  }
      */
     /*package*/ EExpr whilex(Object condExpr, Object bodyExpr) {
-        
+
         EExpr body = ifx(condExpr,
                          escape(finalPattern("continue"), bodyExpr),
                          call(noun("break"), "run", list()));
-        
+
         return escape(finalPattern("break"),
                       call(LOOP, "run", list(thunk(body))));
     }
@@ -1473,7 +1473,7 @@
         String resolution = newTemp("resolution");
         EExpr resExpr = noun(resolution);
         Pattern resPatt = finalPattern(resolution);
-        
+
         EExpr cond = ifx(call(REF, "isBroken", list(resExpr)),
                          call(THROW,
                               "run",
@@ -1503,10 +1503,10 @@
      *     body2
      * }
      * </pre>
-     * eExprs and patts must have the same arity, which must be >=1.  If it's 
+     * eExprs and patts must have the same arity, which must be >=1.  If it's
      * exactly 1, the we use the above base case.  Otherwise we expand to
      * <pre>
-     * when (promiseAllFulfilled([eExprs,...]) -> 
+     * when (promiseAllFulfilled([eExprs,...]) ->
              auds([patts,...]) :resultGuard {
      *     body1
      * } catch patt2 {
@@ -1514,7 +1514,7 @@
      * }
      * </pre>
      * which then expands according to the base case explained in
-     * {@link #whenBase} 
+     * {@link #whenBase}
      */
     private EExpr whenList(EExpr[] eExprs,
                            Object[] auds,
@@ -1532,13 +1532,13 @@
             throw new RuntimeException
                 ("must have same number of expressions and patterns");
         }
-        
+
         EExpr eExpr;
         Pattern patt1;
         if (len == 1) {
             eExpr = eExprs[0];
             patt1 = patts[0];
-            
+
         } else {
             eExpr = call(PROMISE_ALL_FULFILLED,
                          "run",
@@ -1556,7 +1556,7 @@
 
 
     /**
-     * 
+     *
      */
     /*package*/ EExpr when(Object headList,
                            Object bodyExpr,
@@ -1575,13 +1575,13 @@
             auds =              (Object[])heads.get(1);
             patts = (Pattern[])typedArray(heads.get(2), Pattern.class);
             resultGuard =          (EExpr)heads.get(3);
-            
+
         } else if (heads.size() == 3) {
             reserved("alternate when syntax");
         } else {
             throw new RuntimeException("internal: unrecognized when arity");
         }
-        
+
         return whenList(eExprs,
                         auds,
                         patts,
@@ -1597,7 +1597,7 @@
         result.push(next);
         return result;
     }
-    
+
     /**
      *
      */
@@ -1609,7 +1609,7 @@
         }
         return result;
     }
-    
+
     /**
      *
      */
@@ -1622,7 +1622,7 @@
                      auditors,
                      mTypes);
     }
-    
+
     /**
      *
      */
@@ -1636,19 +1636,19 @@
                          NULL,
                          auditors,
                          mTypes);
-                         
+
         } else if (optOName instanceof String) {
             return oType(docComment,
                          new LiteralExpr(optOName),
                          auditors,
                          mTypes);
-                         
+
         } else if (optOName instanceof Literal) {
             return oType(docComment,
                          ((Literal)optOName).value(),
                          auditors,
                          mTypes);
-                         
+
         } else if (optOName instanceof LiteralExpr) {
             //base case
             return call(PROTMAKER,
@@ -1657,10 +1657,10 @@
                              (LiteralExpr)optOName,
                              tuple(auditors),
                              tuple(mTypes)));
-                             
+
         } else if (optOName instanceof IgnorePattern) {
             return oType(docComment, null, auditors, mTypes);
-            
+
         } else {
             Pattern pattern = (Pattern)optOName;
             String optName = pattern.optName();
@@ -1671,7 +1671,7 @@
                           oType(docComment, optName, auditors, mTypes));
         }
     }
-    
+
     /**
      *
      */
@@ -1686,7 +1686,7 @@
                          tuple(pTypes),
                          optRetType));
     }
-    
+
     /**
      *
      */



1.48      +4 -4      e/src/jsrc/org/erights/e/elang/syntax/ELexer.java

Index: ELexer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/ELexer.java,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- ELexer.java	2001/09/04 10:52:17	1.47
+++ ELexer.java	2001/09/06 09:55:46	1.48
@@ -19,14 +19,14 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.exception.PrintStreamWriter;
+import org.erights.e.elib.base.TextWriter;
+import org.erights.e.elib.tables.Twine;
+
 import java.io.BufferedReader;
 import java.io.FileReader;
 import java.io.IOException;
-import java.io.Reader;
 import java.math.BigInteger;
-import org.erights.e.develop.exception.PrintStreamWriter;
-import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.tables.Twine;
 
 /**
  * Breaks textually input into a stream of tokens according to the E



1.87      +13 -13    e/src/jsrc/org/erights/e/elang/syntax/EParser.java

Index: EParser.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/EParser.java,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- EParser.java	2001/09/04 10:52:18	1.86
+++ EParser.java	2001/09/06 09:55:46	1.87
@@ -12,13 +12,8 @@
 //#line 30 "e.y"
 package org.erights.e.elang.syntax;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInput;
-import java.io.ObjectInputStream;
 import org.erights.build.EYaccFixer;
 import org.erights.e.develop.exception.ThrowableSugar;
-import org.erights.e.elang.evm.EExpr;
 import org.erights.e.elang.evm.ENode;
 import org.erights.e.elang.interp.Interp;
 import org.erights.e.elib.base.Ejector;
@@ -27,6 +22,11 @@
 import org.erights.e.elib.tables.IdentityCacheTable;
 import org.erights.e.elib.tables.IntTable;
 import org.erights.e.elib.tables.Twine;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInput;
+import java.io.ObjectInputStream;
 //#line 28 "EParser.java"
 
 
@@ -1108,7 +1108,7 @@
 static public final StaticMaker EParserMaker =
     StaticMaker.make(EParser.class);
 
-/** 
+/**
  * caches previous simple parses (as is used for quasi-parsing)
  */
 static private IdentityCacheTable OurCache =
@@ -1117,7 +1117,7 @@
 /**
  *
  */
-static private final ConstMap DefaultProps = 
+static private final ConstMap DefaultProps =
   ConstMap.fromProperties(System.getProperties());
 
 
@@ -1125,7 +1125,7 @@
 /** contains all the tokens after yylval */
 private ELexer myLexer;
 
-/** 
+/**
  * Do we escape after parsing only one expression, or do we parse the
  * entire input?
  */
@@ -1227,7 +1227,7 @@
 
 /**
  * If the input is empty, returns the null expression e`null`, rather
- * than null. 
+ * than null.
  */
 public ENode parse() {
     ENode result = optParse();
@@ -1288,7 +1288,7 @@
     int ttype = ((Token)yylval).tokenType();
     if (EParser.EOFTOK == ttype && "syntax error".equals(s)) {
         myLexer.needMore("Unexpected EOF");
-        
+
     } else {
         syntaxError(s);
     }
@@ -1539,7 +1539,7 @@
 /**
  * These are the tokens that may appear at the end of a line, in which
  * case the next line is a (to be indented) continuation of the
- * expression. 
+ * expression.
  * <p>
  * Note that &gt; isn't on the list because of its role in closing a
  * calculated URI expression.
@@ -1637,7 +1637,7 @@
 //###############################################################
 // method: yyparse : parse input and execute indicated items
 //###############################################################
-int yyparse() 
+int yyparse()
 {
 int yyn;       //next next thing to do
 int yym;       //
@@ -1653,7 +1653,7 @@
   while (true) //until parsing is done, either correctly, or w/error
     {
     doaction=true;
-    if (yydebug) debug("loop"); 
+    if (yydebug) debug("loop");
     //#### NEXT ACTION (from reduction table)
     for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])
       {



1.7       +4 -3      e/src/jsrc/org/erights/e/elang/syntax/FileFeeder.java

Index: FileFeeder.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/FileFeeder.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- FileFeeder.java	2001/09/04 10:52:18	1.6
+++ FileFeeder.java	2001/09/06 09:55:46	1.7
@@ -19,12 +19,13 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.BufferedReader;
-import java.io.IOException;
+import org.erights.e.develop.format.StringHelper;
 import org.erights.e.elib.base.SourceSpan;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.tables.Twine;
-import org.erights.e.develop.format.StringHelper;
+
+import java.io.BufferedReader;
+import java.io.IOException;
 
 /**
  * A FileFeeder reads its input from a Reader which it assumes starts at the



1.5       +24 -24    e/src/jsrc/org/erights/e/elang/syntax/HilbertHotel.java

Index: HilbertHotel.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/HilbertHotel.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- HilbertHotel.java	2001/08/29 00:20:16	1.4
+++ HilbertHotel.java	2001/09/06 09:55:46	1.5
@@ -18,50 +18,50 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 
 /**
- * Both generates temporary variable names, and deterministically transforms 
- * valid names into names guaranteed not to conflict with generated names.  
+ * Both generates temporary variable names, and deterministically transforms
+ * valid names into names guaranteed not to conflict with generated names.
  * Since generated names are valid names, how can it do both?
  *
- * It is said that Hilbert, when teaching students about infinity, would 
+ * It is said that Hilbert, when teaching students about infinity, would
  * tell a tale that has become known as the Hilbert Hotel. <p>
  *
- * Let's say you drive up to a hotel that says "Aleph-null rooms, no 
- * vacancies".  You walk in and say "I'd like a room".  The manager says 
- * "Can't you read?  No vacancies."  You say, "No problem, take the 
- * person in room 0 and put him in room 1.  Take the person in room 1 and 
+ * Let's say you drive up to a hotel that says "Aleph-null rooms, no
+ * vacancies".  You walk in and say "I'd like a room".  The manager says
+ * "Can't you read?  No vacancies."  You say, "No problem, take the
+ * person in room 0 and put him in room 1.  Take the person in room 1 and
  * put him in room 2.  Etc...  Then, put me in room 0. <p>
  *
- * Later, a bus with an aleph-null number of passengers drive up.  The 
- * driver walks in and asks for a room for each of his passengers.  
- * "What?"  "No problem.  Move the person in room number 1 to room number 
- * 2, the person in number 2 to number 4, number 3 to number 6, etc.  Now 
+ * Later, a bus with an aleph-null number of passengers drive up.  The
+ * driver walks in and asks for a room for each of his passengers.
+ * "What?"  "No problem.  Move the person in room number 1 to room number
+ * 2, the person in number 2 to number 4, number 3 to number 6, etc.  Now
  * give my passengers the odd numbered rooms." <p>
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class HilbertHotel {
 
-    /** 
-     * generated temp variable count 
+    /**
+     * generated temp variable count
      */
     private int myTempCount = 0;
-    
+
     public HilbertHotel() {}
 
     /**
-     * generate 'unique' temporary variable names for transformations.  
-     * Suffix will be odd to make room for the new guests at the Hilbert 
+     * generate 'unique' temporary variable names for transformations.
+     * Suffix will be odd to make room for the new guests at the Hilbert
      * Hotel.  See rename().
      */
     public String newTemp(String name) {
         return baseName(name) + "_" + (myTempCount++ * 2 + 1);
     }
-    
+
     /**
      * If 'name' ends in "-"<digits>, return the index of "-".  Otherwise,
      * return -1.  This is the format of a temp name.
@@ -79,9 +79,9 @@
         }
         return i;
     }
-    
+
     /**
-     * If 'name' could have been generated by 'newTemp(base)', return 
+     * If 'name' could have been generated by 'newTemp(base)', return
      * 'base'.  Otherwise, return 'name'.  This is our sort-of demangler.
      */
     static public String baseName(String name) {
@@ -94,14 +94,14 @@
     }
 
     /**
-     * Even if given an ident that could have been generated by newTemp() or 
-     * rename(), rename() will return names guaranteed not to conflict with 
+     * Even if given an ident that could have been generated by newTemp() or
+     * rename(), rename() will return names guaranteed not to conflict with
      * each other. <p>
      *
-     * The argument to rename() is the room assignment before the bus 
+     * The argument to rename() is the room assignment before the bus
      * drives up.  rename() returns the resulting assignment.
      *
-     * Since this transformation is deterministic, rename() is a static 
+     * Since this transformation is deterministic, rename() is a static
      * method.
      */
     static public String rename(String name) {



1.3       +2 -1      e/src/jsrc/org/erights/e/elang/syntax/LineFeeder.java

Index: LineFeeder.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/LineFeeder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LineFeeder.java	2001/09/02 22:36:51	1.2
+++ LineFeeder.java	2001/09/06 09:55:46	1.3
@@ -19,8 +19,9 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elib.tables.Twine;
+
+import java.io.IOException;
 
 /**
  * Where the lexer gets its input from, one line of Twine at a time.  <p>



1.8       +9 -9      e/src/jsrc/org/erights/e/elang/syntax/Literal.java

Index: Literal.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/Literal.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Literal.java	2001/03/11 11:21:53	1.7
+++ Literal.java	2001/09/06 09:55:46	1.8
@@ -1,20 +1,20 @@
 package org.erights.e.elang.syntax;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.7       +11 -11    e/src/jsrc/org/erights/e/elang/syntax/MsgPatt.java

Index: MsgPatt.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/MsgPatt.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- MsgPatt.java	2000/11/14 11:15:33	1.6
+++ MsgPatt.java	2001/09/06 09:55:46	1.7
@@ -1,20 +1,20 @@
 package org.erights.e.elang.syntax;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -42,8 +42,8 @@
         myPatterns    = patterns;
         myReturnGuard = returnGuard;
     }
-    
-    
+
+
     public Pattern[] patterns()    { return myPatterns; }
     public String    verb()        { return myVerb; }
     public EExpr     returnGuard() { return myReturnGuard; }



1.2       +1 -3      e/src/jsrc/org/erights/e/elang/syntax/PrettyFeeder.java

Index: PrettyFeeder.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/PrettyFeeder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PrettyFeeder.java	2001/09/02 22:36:51	1.1
+++ PrettyFeeder.java	2001/09/06 09:55:46	1.2
@@ -21,10 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
-import org.erights.e.elib.tables.Twine;
 import org.erights.e.elib.tables.FlexList;
-import org.erights.e.elib.tables.ConstList;
-import org.erights.e.develop.format.StringHelper;
+import org.erights.e.elib.tables.Twine;
 
 import java.io.IOException;
 



1.3       +2 -1      e/src/jsrc/org/erights/e/elang/syntax/QuasiFeeder.java

Index: QuasiFeeder.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/QuasiFeeder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- QuasiFeeder.java	2001/09/02 22:36:51	1.2
+++ QuasiFeeder.java	2001/09/06 09:55:46	1.3
@@ -19,8 +19,9 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elib.tables.Twine;
+
+import java.io.IOException;
 
 /**
  * Like LineFeeder, but collapses @@ to @ and $$ to $.  For use as input to



1.12      +9 -9      e/src/jsrc/org/erights/e/elang/syntax/QuasiPart.java

Index: QuasiPart.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/QuasiPart.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- QuasiPart.java	2001/02/02 06:28:28	1.11
+++ QuasiPart.java	2001/09/06 09:55:46	1.12
@@ -1,20 +1,20 @@
 package org.erights.e.elang.syntax;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.17      +4 -5      e/src/jsrc/org/erights/e/elang/syntax/SyntaxException.java

Index: SyntaxException.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/SyntaxException.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- SyntaxException.java	2001/09/04 10:52:18	1.16
+++ SyntaxException.java	2001/09/06 09:55:46	1.17
@@ -19,14 +19,13 @@
 Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
-import java.io.StringWriter;
-import org.erights.e.develop.exception.ExceptionMgr;
+import org.erights.e.develop.format.StringHelper;
+import org.erights.e.elib.base.Printable;
 import org.erights.e.elib.base.SourceSpan;
 import org.erights.e.elib.base.TextWriter;
-import org.erights.e.elib.base.Printable;
-import org.erights.e.develop.format.StringHelper;
 import org.erights.e.elib.tables.Twine;
+
+import java.io.IOException;
 
 /**
  * Thrown if there's a grammatical error in the input.



1.13      +17 -17    e/src/jsrc/org/erights/e/elang/syntax/URI.java

Index: URI.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/URI.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- URI.java	2001/02/03 18:32:06	1.12
+++ URI.java	2001/09/06 09:55:46	1.13
@@ -1,20 +1,20 @@
 package org.erights.e.elang.syntax;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -53,12 +53,12 @@
             URICs[allowed.charAt(i)] = true;
         }
     }
-        
+
     private String myProtocol;
     private String myOptBody;
 
     /**
-     * 
+     *
      */
     private URI(Twine tok, int tokenType) {
         super(tok, tokenType);
@@ -66,7 +66,7 @@
         int i = token.indexOf(':');
         if (token.charAt(0) != '<') {
             throw new Error("internal: URI must begin with a '<'");
-        }            
+        }
         if (i == -1) {
             throw new Error("internal: URI must have a ':'");
         }
@@ -86,13 +86,13 @@
     }
 
     /**
-     * 
+     *
      */
     static public URI make(Twine tok, int tokenType) {
         tok = tok.replaceAll("\\","/").replaceAll("|",":");
         return new URI(tok, tokenType);
     }
-    
+
     /**
      * According to <a href=
      * "http://www.ics.uci.edu/pub/ietf/uri/rfc2396.txt"
@@ -104,7 +104,7 @@
      * In addition, by special dispensation, we allow '\\', which we
      * normalize to '/', and '|', which we normalize to ':', and '#'
      * which is the fragment indicator. <p>
-     * 
+     *
      * org.erights.e.elang.evm.FileGetter also does these
      * normalizations dynamically.
      */
@@ -116,13 +116,13 @@
      * E's syntax for URI token expressions does not recognize URIs whose
      * body begins with a '=' or a ':', since E's recognition of ":="
      * as assignment takes priority, and E reserves "::" for future
-     * definition. 
+     * definition.
      */
     static public boolean isURICStart(char c) {
         return c < 128 && URICs[c] && c != '=' && c != ':';
     }
 
-    /** 
+    /**
      * The Identifier between the &lt; and the colon.
      *
      * @see org.erights.e.elang.syntax.Identifier



1.11      +50 -50    e/src/jsrc/org/erights/e/elang/visitors/AlphaRenameVisitor.java

Index: AlphaRenameVisitor.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/visitors/AlphaRenameVisitor.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- AlphaRenameVisitor.java	2001/08/29 00:20:16	1.10
+++ AlphaRenameVisitor.java	2001/09/06 09:55:47	1.11
@@ -18,7 +18,7 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 import org.erights.e.elang.evm.CatchExpr;
@@ -31,39 +31,39 @@
 
 
 /**
- * Like RenameVisitor, but does an 'alpha-renaming'.  An alpha renaming gives 
- * each distinct variable a unique name.  Since we are not in control of 
- * top-level names, we rename exactly variables defined in nested scope 
- * boxes.  We use a HilbertHotel to generate new names and to transform old 
- * ones.  In order to deal with the hilbert problem in the hilbert way, we 
- * will transform top-level names according to the hilbert rename().  Since 
- * AlphaRenameVisitor needs to treat the expression top level  
- * specially, that's represented by a null 'myOptRenamings'.  Assuming that 
- * top-level names should avoid being of form that rename might relocate (ie, 
- * the form of name generated by newTemp()), then, by turning *all* non 
- * top-level names into this form, these won't conflict with such well formed 
- * top-level names.  This is a bit of a kludge.  Perhaps we should treat 
+ * Like RenameVisitor, but does an 'alpha-renaming'.  An alpha renaming gives
+ * each distinct variable a unique name.  Since we are not in control of
+ * top-level names, we rename exactly variables defined in nested scope
+ * boxes.  We use a HilbertHotel to generate new names and to transform old
+ * ones.  In order to deal with the hilbert problem in the hilbert way, we
+ * will transform top-level names according to the hilbert rename().  Since
+ * AlphaRenameVisitor needs to treat the expression top level
+ * specially, that's represented by a null 'myOptRenamings'.  Assuming that
+ * top-level names should avoid being of form that rename might relocate (ie,
+ * the form of name generated by newTemp()), then, by turning *all* non
+ * top-level names into this form, these won't conflict with such well formed
+ * top-level names.  This is a bit of a kludge.  Perhaps we should treat
  * relocated top level names as an error?
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class AlphaRenameVisitor extends CopyVisitor {
-    
+
     private FlexMap myOptRenamings = null;
     private HilbertHotel myHilbert = new HilbertHotel();
-    
+
     /**
      *
      */
     public AlphaRenameVisitor() {}
-    
+
     /**
      *
      */
     private FlexMap fork() {
         return myOptRenamings.diverge(String.class, String.class);
     }
-    
+
     /**
      *
      */
@@ -75,13 +75,13 @@
             return fork();
         }
     }
-    
-    
+
+
     /***************************** Names *************************/
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitNounExpr(String varName) {
         String newName = myHilbert.rename(varName);
@@ -92,7 +92,7 @@
     }
 
     /**
-     * 
+     *
      */
     public Object visitFinalPattern(String varName,
                                     EExpr valueGuardExpr)
@@ -100,9 +100,9 @@
         String newName;
         if (myOptRenamings == null) {
             newName = myHilbert.rename(varName);
-            //besides being impossible, there's no need to place the 
-            //varName -> newName association in myOptRenamings, since all 
-            //references to it will not be shadowed, and will therefore also 
+            //besides being impossible, there's no need to place the
+            //varName -> newName association in myOptRenamings, since all
+            //references to it will not be shadowed, and will therefore also
             //be transformed by myHilbert.rename()
         } else {
             newName = myHilbert.newTemp(varName);
@@ -113,7 +113,7 @@
 
 
     /**
-     * 
+     *
      */
     public Object visitVarPattern(String varName,
                                   EExpr slotGuardExpr)
@@ -121,9 +121,9 @@
         String newName;
         if (myOptRenamings == null) {
             newName = myHilbert.rename(varName);
-            //besides being impossible, there's no need to place the 
-            //varName -> newName association in myOptRenamings, since all 
-            //references to it will not be shadowed, and will therefore also 
+            //besides being impossible, there's no need to place the
+            //varName -> newName association in myOptRenamings, since all
+            //references to it will not be shadowed, and will therefore also
             //be transformed by myHilbert.rename()
         } else {
             newName = myHilbert.newTemp(varName);
@@ -134,10 +134,10 @@
 
 
     /**************************** EExprs **************************/
-    
+
 
     /**
-     * 
+     *
      */
     public Object visitEscapeExpr(Pattern hatch, EExpr body) {
         FlexMap optOriginal = nest();
@@ -147,10 +147,10 @@
             myOptRenamings = optOriginal;
         }
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitHideExpr(EExpr body) {
         FlexMap optOriginal = nest();
@@ -161,9 +161,9 @@
         }
     }
 
-    
+
     /**
-     * 
+     *
      */
     public Object visitIfExpr(EExpr test, EExpr then, EExpr els) {
         FlexMap optOriginal = nest();
@@ -174,14 +174,14 @@
             myOptRenamings = elsMap;
             els = xformEExpr(els);
             return new IfExpr(test, then, els);
-            
+
         } finally {
             myOptRenamings = optOriginal;
         }
     }
 
     /**
-     * 
+     *
      */
     public Object visitCatchExpr(EExpr attempt, Pattern patt, EExpr catcher) {
         FlexMap optOriginal = nest();
@@ -192,15 +192,15 @@
             patt = xformPattern(patt);
             catcher = xformEExpr(catcher);
             return new CatchExpr(attempt, patt, catcher);
-            
+
         } finally {
             myOptRenamings = optOriginal;
         }
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitFinallyExpr(EExpr attempt, EExpr unwinder) {
         FlexMap optOriginal = nest();
@@ -210,20 +210,20 @@
             myOptRenamings = finallyMap;
             unwinder = xformEExpr(unwinder);
             return new FinallyExpr(attempt, unwinder);
-            
+
         } finally {
             myOptRenamings = optOriginal;
         }
     }
+
 
-    
 
 
     /***************************** Other *************************/
-    
-    
+
+
     /**
-     * 
+     *
      */
     public Object visitEMethod(String docComment,
                                String verb,
@@ -233,21 +233,21 @@
     {
         FlexMap optOriginal = nest();
         try {
-            return super.visitEMethod(docComment, 
+            return super.visitEMethod(docComment,
                                       verb,
-                                      patterns, 
+                                      patterns,
                                       returnGuard,
                                       body);
         } finally {
             myOptRenamings = optOriginal;
         }
     }
+
 
-                            
     /**
-     * 
+     *
      */
-    public Object visitMatcher(Pattern patt, 
+    public Object visitMatcher(Pattern patt,
                                EExpr body)
     {
         FlexMap optOriginal = nest();



1.19      +95 -94    e/src/jsrc/org/erights/e/elang/visitors/CopyVisitor.java

Index: CopyVisitor.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/visitors/CopyVisitor.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- CopyVisitor.java	2001/08/29 00:20:16	1.18
+++ CopyVisitor.java	2001/09/06 09:55:47	1.19
@@ -18,84 +18,85 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
-import java.lang.reflect.Array;
 import org.erights.e.elang.evm.AssignExpr;
-import org.erights.e.elang.evm.MetaExpr;
 import org.erights.e.elang.evm.CallExpr;
 import org.erights.e.elang.evm.CatchExpr;
+import org.erights.e.elang.evm.CdrPattern;
 import org.erights.e.elang.evm.DefineExpr;
-import org.erights.e.elang.evm.FinalPattern;
-import org.erights.e.elang.evm.VarPattern;
-import org.erights.e.elang.evm.ObjectExpr;
-import org.erights.e.elang.evm.EscapeExpr;
-import org.erights.e.elang.evm.EScript;
 import org.erights.e.elang.evm.EExpr;
 import org.erights.e.elang.evm.EMethod;
 import org.erights.e.elang.evm.ENode;
+import org.erights.e.elang.evm.EScript;
+import org.erights.e.elang.evm.EscapeExpr;
+import org.erights.e.elang.evm.FinalPattern;
 import org.erights.e.elang.evm.FinallyExpr;
+import org.erights.e.elang.evm.HideExpr;
 import org.erights.e.elang.evm.IfExpr;
 import org.erights.e.elang.evm.IgnorePattern;
-import org.erights.e.elang.evm.HideExpr;
+import org.erights.e.elang.evm.ListPattern;
 import org.erights.e.elang.evm.LiteralExpr;
 import org.erights.e.elang.evm.MatchBindExpr;
 import org.erights.e.elang.evm.Matcher;
+import org.erights.e.elang.evm.MetaExpr;
 import org.erights.e.elang.evm.NounExpr;
+import org.erights.e.elang.evm.ObjectExpr;
 import org.erights.e.elang.evm.Pattern;
-import org.erights.e.elang.evm.SuchThatPattern;
-import org.erights.e.elang.evm.ListPattern;
-import org.erights.e.elang.evm.CdrPattern;
 import org.erights.e.elang.evm.QuasiLiteralExpr;
-import org.erights.e.elang.evm.QuasiPatternExpr;
 import org.erights.e.elang.evm.QuasiLiteralPatt;
+import org.erights.e.elang.evm.QuasiPatternExpr;
 import org.erights.e.elang.evm.QuasiPatternPatt;
 import org.erights.e.elang.evm.ScopeExpr;
 import org.erights.e.elang.evm.SendExpr;
 import org.erights.e.elang.evm.SeqExpr;
 import org.erights.e.elang.evm.SlotExpr;
+import org.erights.e.elang.evm.SuchThatPattern;
+import org.erights.e.elang.evm.VarPattern;
 
+import java.lang.reflect.Array;
+
 
 /**
  *
  */
 public class CopyVisitor implements ETreeVisitor {
-    
+
     private ETreeVisitor myDecorator;
-    
+
     /**
      *
      */
     public CopyVisitor(ETreeVisitor decorator) {
         myDecorator = decorator;
     }
-    
+
     /**
      * Defaults to auto-decoration
      */
     public CopyVisitor() {
         myDecorator = this;
     }
-    
+
     /**
-     * For use from E.  Java/ELib users should use the more strongly typed 
+     * For use from E.  Java/ELib users should use the more strongly typed
      * xform* methods.
      */
     public Object run(Object optENode) {
         if (optENode == null) {
             return null;
-            
+
         } else if (optENode instanceof ENode) {
             ENode eNode = (ENode)optENode;
             ENode result = (ENode)eNode.welcome(myDecorator);
             result.defineSource(eNode.optSource());
             return result;
-            
+
         } else {
             ENode[] eNodes = (ENode[])optENode;
             Class elementClass = eNodes.getClass().getComponentType();
-            ENode[] result = (ENode[])Array.newInstance(elementClass, 
+            ENode[] result = (ENode[])Array.newInstance(elementClass,
                                                         eNodes.length);
             for (int i = 0; i < eNodes.length; i++) {
                 result[i] = (ENode)run(eNodes[i]);
@@ -103,18 +104,18 @@
             return result;
         }
     }
-            
-    
-    
+
+
+
     /**************************** EExprs **************************/
-    
+
     /**
      *
      */
     public EExpr xformEExpr(EExpr optEExpr) {
         return (EExpr)run(optEExpr);
     }
-    
+
 
     /**
      *
@@ -122,29 +123,29 @@
     public EExpr[] xformEExprs(EExpr[] eExprs) {
         return (EExpr[])run(eExprs);
     }
-    
 
+
     /**
-     * 
+     *
      */
     public Object visitAssignExpr(NounExpr noun, EExpr rValue) {
         return new AssignExpr((NounExpr)xformEExpr(noun),
                               xformEExpr(rValue));
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitCallExpr(EExpr recip, String verb, EExpr[] args) {
         return new CallExpr(xformEExpr(recip),
                             verb,
                             xformEExprs(args));
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitDefineExpr(Pattern patt, EExpr rValue) {
         return new DefineExpr(xformPattern(patt),
@@ -153,59 +154,59 @@
 
 
     /**
-     * 
+     *
      */
     public Object visitEscapeExpr(Pattern hatch, EExpr body) {
         return new EscapeExpr(xformPattern(hatch),
                               xformEExpr(body));
     }
 
-    
+
     /**
-     * 
+     *
      */
     public Object visitHideExpr(EExpr body) {
         return new HideExpr(xformEExpr(body));
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitIfExpr(EExpr test, EExpr then, EExpr els) {
         return new IfExpr(xformEExpr(test),
                           xformEExpr(then),
                           xformEExpr(els));
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitLiteralExpr(Object value) {
         return new LiteralExpr(value);
     }
 
-    
+
     /**
-     * 
+     *
      */
     public Object visitMatchBindExpr(EExpr specimen, Pattern patt) {
         return new MatchBindExpr(xformEExpr(specimen),
                                  xformPattern(patt));
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitNounExpr(String varName) {
         return new NounExpr(varName);
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitObjectExpr(String docComment,
                                   String optFQN,
@@ -217,97 +218,97 @@
                               (NounExpr[])xformEExprs(auditors),
                               xformEScript(eScript));
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitQuasiLiteralExpr(int index) {
         return new QuasiLiteralExpr(index);
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitQuasiPatternExpr(int index) {
         return new QuasiPatternExpr(index);
     }
 
-    
+
     /**
-     * 
+     *
      */
     public Object visitScopeExpr() {
         return new ScopeExpr();
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitSendExpr(EExpr recip, String verb, EExpr[] args) {
         return new SendExpr(xformEExpr(recip),
                             verb,
                             xformEExprs(args));
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitSeqExpr(EExpr first, EExpr second) {
         return new SeqExpr(xformEExpr(first),
                            xformEExpr(second));
     }
 
-    
+
     /**
-     * 
+     *
      */
     public Object visitSlotExpr(NounExpr noun) {
         return new SlotExpr((NounExpr)xformEExpr(noun));
     }
 
-    
+
     /**
-     * 
+     *
      */
     public Object visitMetaExpr(NounExpr noun) {
         return new MetaExpr((NounExpr)xformEExpr(noun));
     }
 
-    
+
     /**
-     * 
+     *
      */
     public Object visitCatchExpr(EExpr attempt, Pattern patt, EExpr catcher) {
         return new CatchExpr(xformEExpr(attempt),
                              xformPattern(patt),
                              xformEExpr(catcher));
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitFinallyExpr(EExpr attempt, EExpr unwinder) {
         return new FinallyExpr(xformEExpr(attempt),
                                xformEExpr(unwinder));
     }
+
+
 
-    
-    
 
     /***************************** Patterns *************************/
-    
+
     /**
      *
      */
     public Pattern xformPattern(Pattern optPatt) {
         return (Pattern)run(optPatt);
     }
-    
+
 
 
     /**
@@ -316,10 +317,10 @@
     public Pattern[] xformPatterns(Pattern[] patts) {
         return (Pattern[])run(patts);
     }
-    
-    
+
+
     /**
-     * 
+     *
      */
     public Object visitFinalPattern(String varName,
                                     EExpr valueGuardExpr)
@@ -328,9 +329,9 @@
                                 xformEExpr(valueGuardExpr));
     }
 
-    
+
     /**
-     * 
+     *
      */
     public Object visitVarPattern(String varName,
                                   EExpr slotGuardExpr)
@@ -339,82 +340,82 @@
                               xformEExpr(slotGuardExpr));
     }
 
-    
+
     /**
-     * 
+     *
      */
     public Object visitListPattern(Pattern[] subs) {
         return new ListPattern(xformPatterns(subs));
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitCdrPattern(ListPattern start, Pattern rest) {
         return new CdrPattern((ListPattern)xformPattern(start),
                               xformPattern(rest));
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitIgnorePattern() {
         return new IgnorePattern();
     }
 
-    
+
     /**
-     * 
+     *
      */
     public Object visitSuchThatPattern(Pattern patt, EExpr test) {
         return new SuchThatPattern(xformPattern(patt),
                                    xformEExpr(test));
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitQuasiLiteralPatt(int index) {
         return new QuasiLiteralPatt(index);
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitQuasiPatternPatt(int index) {
         return new QuasiPatternPatt(index);
     }
+
 
-    
-     
 
+
     /***************************** Other *************************/
-    
+
     /**
      *
      */
     public EScript xformEScript(EScript eScript) {
         return (EScript)run(eScript);
     }
-    
+
     /**
      *
      */
     public EMethod xformMethod(EMethod optMeth) {
         return (EMethod)run((EMethod)optMeth);
     }
-    
+
     /**
      *
      */
     public Matcher xformMatcher(Matcher optMatcher) {
         return (Matcher)run(optMatcher);
     }
-    
+
     /**
      *
      */
@@ -424,10 +425,10 @@
         return new EScript((EMethod[])run(optMethods),
                            xformMatcher(optMatcher));
     }
+
 
-        
     /**
-     * 
+     *
      */
     public Object visitEMethod(String docComment,
                                String verb,
@@ -441,10 +442,10 @@
                            xformEExpr(returnGuard),
                            xformEExpr(body));
     }
+
 
-                            
     /**
-     * 
+     *
      */
     public Object visitMatcher(Pattern patt,
                                EExpr body)



1.16      +102 -102  e/src/jsrc/org/erights/e/elang/visitors/ETreeVisitor.java

Index: ETreeVisitor.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/visitors/ETreeVisitor.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ETreeVisitor.java	2001/08/29 00:20:16	1.15
+++ ETreeVisitor.java	2001/09/06 09:55:47	1.16
@@ -18,13 +18,13 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
-import org.erights.e.elang.evm.ListPattern;
 import org.erights.e.elang.evm.EExpr;
-import org.erights.e.elang.evm.EScript;
 import org.erights.e.elang.evm.EMethod;
+import org.erights.e.elang.evm.EScript;
+import org.erights.e.elang.evm.ListPattern;
 import org.erights.e.elang.evm.Matcher;
 import org.erights.e.elang.evm.NounExpr;
 import org.erights.e.elang.evm.Pattern;
@@ -34,155 +34,155 @@
  *
  */
 public interface ETreeVisitor {
-    
-    
+
+
     /**************************** EExprs **************************/
-    
 
+
     /**
      * varName ":=" rValue. <p>
      *
      * Does a setValue on the slot named by varName to the value of rValue
      *
      * @see <a href="{@docroot}/../elang/kernel/AssignExpr.html">The
-     * Kernel-E Assignment Expression</a> 
+     * Kernel-E Assignment Expression</a>
      */
     Object visitAssignExpr(NounExpr noun, EExpr rValue);
-    
+
     /**
      * recip verb "(" args*, ")". <p>
      *
-     * Eval left to right, then synchronously call the verb method of the 
+     * Eval left to right, then synchronously call the verb method of the
      * value of recip with the values of the args.
      *
      * @see <a href="{@docroot}/../elang/kernel/CallExpr.html">The
-     * Kernel-E Call Expression</a> 
+     * Kernel-E Call Expression</a>
      */
     Object visitCallExpr(EExpr recip, String verb, EExpr[] args);
-    
+
     /**
      * "def" patt ":=" rValue. <p>
      *
-     * Match patt against the value of rValue.  Neither patt nor rValue may 
-     * use any variables defined by the other.  This allows their scopes to 
+     * Match patt against the value of rValue.  Neither patt nor rValue may
+     * use any variables defined by the other.  This allows their scopes to
      * be order independent.
      *
      * @see <a href="{@docroot}/../elang/kernel/DefineExpr.html">The
-     * Kernel-E Define Expression</a> 
+     * Kernel-E Define Expression</a>
      */
     Object visitDefineExpr(Pattern patt, EExpr rValue);
 
     /**
      * "escape" hatch "{" body "}". <p>
      *
-     * Bind hatch to an escape hatch.  If the escape hatch's run/1 is called 
-     * during the execution of body, the escape expression will be exited 
-     * early, and the run argument will be the value.  If run/0 is called, 
+     * Bind hatch to an escape hatch.  If the escape hatch's run/1 is called
+     * during the execution of body, the escape expression will be exited
+     * early, and the run argument will be the value.  If run/0 is called,
      * it's as if run(null) were called.
      *
      * @see <a href="{@docroot}/../elang/kernel/EscapeExpr.html">The
-     * Kernel-E Escape Expression</a> 
+     * Kernel-E Escape Expression</a>
      */
     Object visitEscapeExpr(Pattern hatch, EExpr body);
-    
+
     /**
      * "{" body "}". <p>
      *
-     * Evaluate body, but hide all variable names it defines from the 
+     * Evaluate body, but hide all variable names it defines from the
      * surrounding scope.
      *
      * @see <a href="{@docroot}/../elang/kernel/HideExpr.html">The
-     * Kernel-E Hide Expression</a> 
+     * Kernel-E Hide Expression</a>
      */
     Object visitHideExpr(EExpr body);
-    
+
     /**
      * "if" "("test")" "{" then "}" "else" "{" els "}". <p>
      *
-     * Evaluate test to a boolean.  If true, the value is the evaluation of 
+     * Evaluate test to a boolean.  If true, the value is the evaluation of
      * then.  Else the value is the evaluation of els.
      *
      * @see <a href="{@docroot}/../elang/kernel/IfExpr.html">The
-     * Kernel-E If Expression</a> 
+     * Kernel-E If Expression</a>
      */
     Object visitIfExpr(EExpr test, EExpr then, EExpr els);
-    
+
     /**
      * value. <p>
      *
      * This value is the value of the expression.
      *
      * @see <a href="{@docroot}/../elang/kernel/LiteralExpr.html">The
-     * Kernel-E Literal Expression</a> 
+     * Kernel-E Literal Expression</a>
      */
     Object visitLiteralExpr(Object value);
-    
+
     /**
      * specimen "=~" patt. <p>
      *
      * Match patt against the value of specimen.  Say whether it matches.
      *
      * @see <a href="{@docroot}/../elang/kernel/MatchBindExpr.html">The
-     * Kernel-E Match-Bind Expression</a> 
+     * Kernel-E Match-Bind Expression</a>
      */
     Object visitMatchBindExpr(EExpr specimen, Pattern patt);
-    
+
     /**
      * varName. <p>
      *
      * The result of a getValue on the slot named by this varName.
      *
      * @see <a href="{@docroot}/../elang/kernel/NounExpr.html">The
-     * Kernel-E Noun Expression</a> 
+     * Kernel-E Noun Expression</a>
      */
     Object visitNounExpr(String varName);
-    
+
     /**
-     * "/**" synopsys 
+     * "/**" synopsys
      * "* /" "def" string-literal ("::" auditors)? (eScript | matcher) <p>
      *
-     * Define an object that responds to messages according to 
+     * Define an object that responds to messages according to
      * eScript<p>
      *
      * Each auditor must be bound to a "global" final variable, ie, a
-     * read-only variable in the incoming scope for evaluating the overall 
-     * expression.  The value of this variable is read once and its value is 
-     * asked to audit the parse tree of the ObjectExpr it is 
-     * being asked to audit.  Only if all auditors approve of all the audited 
+     * read-only variable in the incoming scope for evaluating the overall
+     * expression.  The value of this variable is read once and its value is
+     * asked to audit the parse tree of the ObjectExpr it is
+     * being asked to audit.  Only if all auditors approve of all the audited
      * subtrees in the expression as a whole does execution continue. <p>
      *
-     * At runtime, given an auditor and an instance of an ObjectExpr audited 
-     * by that auditor, it must be possible to unspoofably ask that auditor 
+     * At runtime, given an auditor and an instance of an ObjectExpr audited
+     * by that auditor, it must be possible to unspoofably ask that auditor
      * whether this is such an instance. <p>
-     * 
+     *
      * XXX currently, when we a matcher should be provided, an eScript
      * with a 'null' for optMethods is provided instead.
      *
      * @see <a href="{@docroot}/../elang/kernel/ObjectExpr.html">The
-     * Kernel-E Object Expression</a> 
+     * Kernel-E Object Expression</a>
      */
     Object visitObjectExpr(String docComment,
                            String optFQN,
                            NounExpr[] auditors,
                            EScript eScript);
-    
+
     /**
      * "$" "{" index "}". <p>
      *
-     * A placeholder in a quasi-parseTree to be filled in, by substitution, 
+     * A placeholder in a quasi-parseTree to be filled in, by substitution,
      * with a real expression.  This is not part of Kernel-E.
      */
     Object visitQuasiLiteralExpr(int index);
-    
+
     /**
      * "@" "{" index "}". <p>
      *
-     * A placeholder in a quasi-pattern-parseTree to capture a corresponding 
-     * expression in a specimen parseTree, and say where to put it in the 
+     * A placeholder in a quasi-pattern-parseTree to capture a corresponding
+     * expression in a specimen parseTree, and say where to put it in the
      * binding vector.  This is not part of Kernel-E.
      */
     Object visitQuasiPatternExpr(int index);
-    
+
     /**
      * "meta" "scope". <p>
      *
@@ -190,36 +190,36 @@
      * This is not part of Kernel-E.
      */
     Object visitScopeExpr();
-    
+
     /**
      * recip "<-" verb "(" args*, ")". <p>
      *
-     * Like call, but asks that recip do the operation <i>eventually</i>, in 
+     * Like call, but asks that recip do the operation <i>eventually</i>, in
      * its own turn.
      *
      * @see <a href="{@docroot}/../elang/kernel/SendExpr.html">The
-     * Kernel-E Send Expression</a> 
+     * Kernel-E Send Expression</a>
      */
     Object visitSendExpr(EExpr recip, String verb, EExpr[] args);
-    
+
     /**
      * first "\n" second. <p>
      *
      * Do first, then evaluate to the result of second.
      *
      * @see <a href="{@docroot}/../elang/kernel/SeqExpr.html">The
-     * Kernel-E Sequence Expression</a> 
+     * Kernel-E Sequence Expression</a>
      */
     Object visitSeqExpr(EExpr first, EExpr second);
-    
+
     /**
      * "&" varName. <p>
      *
      * The value is the slot named by varName.  This is not part of
-     * Kernel-E. 
+     * Kernel-E.
      */
     Object visitSlotExpr(NounExpr noun);
-    
+
     /**
      * "meta" "(" varName ")". <p>
      *
@@ -228,7 +228,7 @@
      * access to that object.  This may disappear.
      */
     Object visitMetaExpr(NounExpr noun);
-    
+
     /**
      * "try" "{" attempt "}" "catch" patt "{" catcher "}". <p>
      *
@@ -238,10 +238,10 @@
      * the evaluation of catcher.  Otherwise rethrow the exception.
      *
      * @see <a href="{@docroot}/../elang/kernel/CatchExpr.html">The
-     * Kernel-E Try-Catch Expression</a> 
+     * Kernel-E Try-Catch Expression</a>
      */
     Object visitCatchExpr(EExpr attempt, Pattern patt, EExpr catcher);
-    
+
     /**
      * "try" "{" attempt "}" "finally" "{" unwinder "}". <p>
      *
@@ -255,102 +255,102 @@
      * Kernel-E Try-Finally Expression</a>
      */
     Object visitFinallyExpr(EExpr attempt, EExpr unwinder);
-    
-    
 
+
+
     /***************************** Patterns *************************/
-    
-    
+
+
     /**
      * varName (":" valueGuardExpr)?. <p>
      *
      * Ask the value of valueGuardExpr to coerce(specimen, XXX), and
-     * define the the value of varName to be the result. 
+     * define the the value of varName to be the result.
      *
      * @see <a href="{@docroot}/../elang/kernel/FinalPattern.html">The
-     * Kernel-E Final Pattern</a> 
+     * Kernel-E Final Pattern</a>
      */
     Object visitFinalPattern(String varName, EExpr valueGuardExpr);
-    
+
     /**
      * var varName (":" slotGuardExpr)?. <p>
      *
      * Ask the value of slotGuardExpr to makeSlot(specimen, XXX), and
-     * define the result to be the slot named by varName. 
+     * define the result to be the slot named by varName.
      *
      * @see <a href="{@docroot}/../elang/kernel/VarPattern.html">The
-     * Kernel-E Var Pattern</a> 
+     * Kernel-E Var Pattern</a>
      */
     Object visitVarPattern(String varName, EExpr slotGuardExpr);
-    
+
     /**
      * "["pattern*, "]". <p>
      *
-     * Is the specimen a list exactly this long, and do each of the 
-     * elements match the corresponding sub-pattern?  
+     * Is the specimen a list exactly this long, and do each of the
+     * elements match the corresponding sub-pattern?
      *
      * @see <a href="{@docroot}/../elang/kernel/ListPattern.html">The
-     * Kernel-E Tuple Pattern</a> 
+     * Kernel-E Tuple Pattern</a>
      */
     Object visitListPattern(Pattern[] subs);
-    
+
     /**
      *  listPattern "+" pattern <p>
      *
-     * Is the specimen a list at least as long, and does each of the first N 
-     * elements match the listPattern's sub-pattern?  Does the right hand 
-     * pattern match a list of the remaining elements? 
+     * Is the specimen a list at least as long, and does each of the first N
+     * elements match the listPattern's sub-pattern?  Does the right hand
+     * pattern match a list of the remaining elements?
      *
      * @see <a href="{@docroot}/../elang/kernel/CdrPattern.html">The
-     * Kernel-E Tuple Pattern</a> 
+     * Kernel-E Tuple Pattern</a>
      */
     Object visitCdrPattern(ListPattern subs, Pattern optRest);
-    
+
     /**
      * "_". <p>
      *
      * Matches anything, binds nothing.
      *
      * @see <a href="{@docroot}/../elang/kernel/IgnorePattern.html">The
-     * Kernel-E Ignore Pattern</a> 
+     * Kernel-E Ignore Pattern</a>
      */
     Object visitIgnorePattern();
-    
+
     /**
      * patt "?" test. <p>
      *
      * Does patt match the specimen?  And does test evaluate to true?
      *
      * @see <a href="{@docroot}/../elang/kernel/SuchThatPattern.html">The
-     * Kernel-E Such-That Pattern</a> 
+     * Kernel-E Such-That Pattern</a>
      */
     Object visitSuchThatPattern(Pattern patt, EExpr test);
-    
+
     /**
      * "$" "{" index "}". <p>
      *
-     * A placeholder in a quasi-parseTree to be filled in, by substitution, 
+     * A placeholder in a quasi-parseTree to be filled in, by substitution,
      * with a real pattern. Not part of Kernel-E.
      */
     Object visitQuasiLiteralPatt(int index);
-    
+
     /**
      * "@" "{" index "}". <p>
      *
-     * A placeholder in a quasi-pattern-parseTree to capture a corresponding 
-     * pattern in a specimen parseTree, and say where to put it in the 
+     * A placeholder in a quasi-pattern-parseTree to capture a corresponding
+     * pattern in a specimen parseTree, and say where to put it in the
      * binding vector.  Not part of Kernel-E.
      */
     Object visitQuasiPatternPatt(int index);
-    
-    
+
+
 
     /***************************** Other *************************/
-    
-    
+
+
     /**
      *    "{" methods* matcher? "}"?
-     * 
+     *
      * XXX currently, when a matcher should have been provided to
      * visitObjectExpr, instead an eScript is provided whose
      * optMethods is null.  This breaks the XML translation, since the
@@ -358,39 +358,39 @@
      * list of methods.
      *
      * @see <a href="{@docroot}/../elang/kernel/EScript.html">The
-     * Kernel-E Script Node</a> 
+     * Kernel-E Script Node</a>
      */
     Object visitEScript(EMethod[] optMethods, Matcher optMatcher);
-                             
+
     /**
      * "##" docComment <br>
      * "to" verb "(" patterns*, ")" ":" returnGuard "{" body "}". <p>
      *
-     * Defines a method for verb and a number of arguments matching the 
-     * number of patterns.  When the containing object is sent such a 
-     * message, the arguments are matched against the patterns, and then the 
-     * body is evaluated. They value of body as coerced by returnGuard is 
+     * Defines a method for verb and a number of arguments matching the
+     * number of patterns.  When the containing object is sent such a
+     * message, the arguments are matched against the patterns, and then the
+     * body is evaluated. They value of body as coerced by returnGuard is
      * finally revealed.
      *
      * @see <a href="{@docroot}/../elang/kernel/EMethod.html">The
-     * Kernel-E Method Node</a> 
+     * Kernel-E Method Node</a>
      */
     Object visitEMethod(String docComment,
                         String verb,
                         Pattern[] patterns,
                         EExpr returnGuard,
                         EExpr body);
-                            
+
     /**
      * "match" pattern "{" body "}". <p>
      *
-     * When the incoming message doesn't fit any of the methods, then a pair 
-     * of the verb and the arguments is matched against patt, then body 
+     * When the incoming message doesn't fit any of the methods, then a pair
+     * of the verb and the arguments is matched against patt, then body
      * is evaluated, and it value revealed.
      *
      * @see <a href="{@docroot}/../elang/kernel/Matcher.html">The
-     * Kernel-E Matcher Node</a> 
+     * Kernel-E Matcher Node</a>
      */
-    Object visitMatcher(Pattern pattern, 
+    Object visitMatcher(Pattern pattern,
                         EExpr body);
 }



1.14      +47 -47    e/src/jsrc/org/erights/e/elang/visitors/RenameVisitor.java

Index: RenameVisitor.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/visitors/RenameVisitor.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- RenameVisitor.java	2001/08/29 00:20:16	1.13
+++ RenameVisitor.java	2001/09/06 09:55:47	1.14
@@ -18,7 +18,7 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 import org.erights.e.elang.evm.CatchExpr;
@@ -30,46 +30,46 @@
 
 
 /**
- * 'renamings' contains a set of oldName => newName pairs.  'rename' 
- * returns a new expression like this one, except that wherever 'oldName' 
- * is used in this expression to refer to a definition of 'oldName' not 
- * provided by this expression, 'newName' is substituted.  It is assumed 
- * that 'newName' cannot conflict with any name already in this 
- * expression, which is safe if 'newName' is a newly generated temporary 
- * name.  In the resulting expression's staticScope's namesUsed, 
+ * 'renamings' contains a set of oldName => newName pairs.  'rename'
+ * returns a new expression like this one, except that wherever 'oldName'
+ * is used in this expression to refer to a definition of 'oldName' not
+ * provided by this expression, 'newName' is substituted.  It is assumed
+ * that 'newName' cannot conflict with any name already in this
+ * expression, which is safe if 'newName' is a newly generated temporary
+ * name.  In the resulting expression's staticScope's namesUsed,
  * 'oldName' should not appear.<p>
  *
- * For each 'oldName' that appears in this expressions's staticScope's 
- * namesOut (and therefore in the result's staticScope's namesOut), that 
- * 'oldName' => 'newName' association is removed from 'renamings'.  
- * Therefore, 'renamings' is left in a valid state to apply to 
+ * For each 'oldName' that appears in this expressions's staticScope's
+ * namesOut (and therefore in the result's staticScope's namesOut), that
+ * 'oldName' => 'newName' association is removed from 'renamings'.
+ * Therefore, 'renamings' is left in a valid state to apply to
  * expressions at the same scope level, but to the right of this one. <p>
  *
- * Note to implementors: The Java Language Specification defines that 
- * argument evaluation order is left to right (as does E).  Therefore, 
- * you may make several calls to 'rename' using the same 'renamings', 
- * confident that the earlier ones will modify the 'renamings' as seen by 
- * the later ones.  Should these methods be translated to a language 
- * without this guarantee (like C++), this ordering will have to be 
+ * Note to implementors: The Java Language Specification defines that
+ * argument evaluation order is left to right (as does E).  Therefore,
+ * you may make several calls to 'rename' using the same 'renamings',
+ * confident that the earlier ones will modify the 'renamings' as seen by
+ * the later ones.  Should these methods be translated to a language
+ * without this guarantee (like C++), this ordering will have to be
  * recoded.
  */
 public class RenameVisitor extends CopyVisitor {
-    
+
     private FlexMap myRenamings;
-    
+
     /**
      *
      */
     public RenameVisitor(FlexMap renamings) {
         myRenamings = renamings;
     }
-    
-    
+
+
     /**************************** EExprs **************************/
-    
 
+
     /**
-     * 
+     *
      */
     public Object visitEscapeExpr(Pattern hatch, EExpr body) {
         FlexMap original = myRenamings.diverge();
@@ -79,10 +79,10 @@
             myRenamings = original;
         }
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitHideExpr(EExpr body) {
         FlexMap original = myRenamings.diverge();
@@ -92,10 +92,10 @@
             myRenamings = original;
         }
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitIfExpr(EExpr test, EExpr then, EExpr els) {
         FlexMap original = myRenamings.diverge();
@@ -105,21 +105,21 @@
             myRenamings = original.diverge();
             els = xformEExpr(els);
             return new IfExpr(test, then, els);
-            
+
         } finally {
             myRenamings = original;
         }
     }
 
     /**
-     * 
+     *
      */
     public Object visitNounExpr(String varName) {
         return super.visitNounExpr((String)myRenamings.get(varName, varName));
     }
 
     /**
-     * 
+     *
      */
     public Object visitCatchExpr(EExpr attempt, Pattern patt, EExpr catcher) {
         FlexMap original = myRenamings.diverge();
@@ -129,15 +129,15 @@
             patt = xformPattern(patt);
             catcher = xformEExpr(catcher);
             return new CatchExpr(attempt, patt, catcher);
-            
+
         } finally {
             myRenamings = original;
         }
     }
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitFinallyExpr(EExpr attempt, EExpr unwinder) {
         FlexMap original = myRenamings.diverge();
@@ -146,19 +146,19 @@
             myRenamings = original.diverge();
             unwinder = xformEExpr(unwinder);
             return new FinallyExpr(attempt, unwinder);
-            
+
         } finally {
             myRenamings = original;
         }
     }
 
-    
 
+
     /***************************** Patterns *************************/
+
 
-    
     /**
-     * 
+     *
      */
     public Object visitFinalPattern(String varName,
                                     EExpr valueGuardExpr)
@@ -169,7 +169,7 @@
 
 
     /**
-     * 
+     *
      */
     public Object visitVarPattern(String varName,
                                   EExpr slotGuardExpr)
@@ -181,10 +181,10 @@
 
 
     /***************************** Other *************************/
-    
-    
+
+
     /**
-     * 
+     *
      */
     public Object visitEMethod(String docComment,
                                String verb,
@@ -194,21 +194,21 @@
     {
         FlexMap original = myRenamings.diverge();
         try {
-            return super.visitEMethod(docComment, 
+            return super.visitEMethod(docComment,
                                       verb,
-                                      patterns, 
+                                      patterns,
                                       returnGuard,
                                       body);
         } finally {
             myRenamings = original;
         }
     }
+
 
-                            
     /**
-     * 
+     *
      */
-    public Object visitMatcher(Pattern patt, 
+    public Object visitMatcher(Pattern patt,
                                EExpr body)
     {
         FlexMap original = myRenamings.diverge();



1.7       +10 -10    e/src/jsrc/org/erights/e/elang/visitors/SubstVisitor.java

Index: SubstVisitor.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/visitors/SubstVisitor.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SubstVisitor.java	2001/08/29 00:20:16	1.6
+++ SubstVisitor.java	2001/09/06 09:55:47	1.7
@@ -18,7 +18,7 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 
@@ -26,33 +26,33 @@
  *
  */
 public class SubstVisitor extends CopyVisitor {
-    
+
     private Object[] myArgs;
-    
+
     /**
      *
      */
     public SubstVisitor(Object[] args) {
         myArgs = args;
     }
-    
-    
+
+
     /**************************** EExprs **************************/
-    
+
 
     /**
-     * 
+     *
      */
     public Object visitQuasiLiteralExpr(int index) {
         return myArgs[index];
     }
-    
+
 
     /**************************** Patterns **************************/
-    
 
+
     /**
-     * 
+     *
      */
     public Object visitQuasiLiteralPatt(int index) {
         return myArgs[index];



1.16      +11 -11    e/src/jsrc/org/erights/e/elib/base/Callable.java

Index: Callable.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/Callable.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Callable.java	2001/04/16 08:10:32	1.15
+++ Callable.java	2001/09/06 09:55:47	1.16
@@ -1,20 +1,20 @@
 package org.erights.e.elib.base;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -32,9 +32,9 @@
      * must ensure this call gets backtrace'd
      */
     Object callAll(String verb, Object[] args);
-    
+
     /**
-     * Returns a description of the type the object alleges to implement.  
+     * Returns a description of the type the object alleges to implement.
      * Should probably be moved to the optMeta.
      */
     TypeDesc getAllegedType();



1.23      +5 -6      e/src/jsrc/org/erights/e/elib/base/ClassDesc.java

Index: ClassDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/ClassDesc.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- ClassDesc.java	2001/09/06 05:49:57	1.22
+++ ClassDesc.java	2001/09/06 09:55:47	1.23
@@ -21,17 +21,11 @@
 Contributor(s): ______________________________________.
 */
 
-import java.math.BigInteger;
-import java.lang.reflect.Array;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
 import org.erights.e.develop.exception.ExceptionMgr;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.JavaMemberNode;
 import org.erights.e.elib.prim.ScriptMaker;
 import org.erights.e.elib.prim.Thrower;
 import org.erights.e.elib.ref.Ref;
-import org.erights.e.elib.slot.ValueGuard;
 import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.tables.ConstMap;
 import org.erights.e.elib.tables.EList;
@@ -41,6 +35,11 @@
 import org.erights.e.elib.util.OneArgFunc;
 import org.erights.e.meta.java.lang.ArrayGuardSugar;
 import org.erights.e.meta.java.lang.InterfaceGuardSugar;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.math.BigInteger;
 
 /**
  * Describes the E-type of instances of a Java class (and its subclasses).



1.6       +9 -9      e/src/jsrc/org/erights/e/elib/base/Ejection.java

Index: Ejection.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/Ejection.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Ejection.java	2000/11/14 11:15:33	1.5
+++ Ejection.java	2001/09/06 09:55:47	1.6
@@ -1,20 +1,20 @@
 package org.erights.e.elib.base;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.13      +14 -14    e/src/jsrc/org/erights/e/elib/base/Ejector.java

Index: Ejector.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/Ejector.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Ejector.java	2001/04/01 08:13:41	1.12
+++ Ejector.java	2001/09/06 09:55:47	1.13
@@ -1,20 +1,20 @@
 package org.erights.e.elib.base;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -26,8 +26,8 @@
 /**
  * An Ejector implements a non-local exit construct that can return a
  * value.  It works with an EscapeExpr to cause an escape
- * to take place.  When used directly from java, a typical pattern is: 
- * <p><pre> 
+ * to take place.  When used directly from java, a typical pattern is:
+ * <p><pre>
  *
  *      Ejector ejector = new Ejector();
  *      //cause ejector to be appropriately accessible from the try
@@ -74,7 +74,7 @@
     /**
      * Having caught a possible Ejection, the catcher asks an Ejector for the
      * result corresponding to that Ejection.  If this Ejection was
-     * indeed thrown by this Ejector, the corresponding result 
+     * indeed thrown by this Ejector, the corresponding result
      * returned.  Otherwise, the Ejection is rethrown.
      */
     public Object result(Throwable t) {
@@ -94,8 +94,8 @@
     }
 
     /**
-     * Non-local exit returning 'result'.  Would normally return void, but to 
-     * minimize on Deflectors, and since we're not returning anything anyway, 
+     * Non-local exit returning 'result'.  Would normally return void, but to
+     * minimize on Deflectors, and since we're not returning anything anyway,
      * we implement OneArgFunc, and so must return Object.
      */
     public Object run(Object result) {



1.7       +11 -10    e/src/jsrc/org/erights/e/elib/base/MessageDesc.java

Index: MessageDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/MessageDesc.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- MessageDesc.java	2001/08/29 00:20:17	1.6
+++ MessageDesc.java	2001/09/06 09:55:47	1.7
@@ -18,32 +18,33 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.StaticMaker;
-import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.serial.Persistent;
+import org.erights.e.elib.tables.ConstList;
 
+import java.io.IOException;
+
 /**
  * Makes a description of a message signature within a type
  * description.
  */
 public class MessageDesc implements Persistent {
-    
+
     /**
      *
      */
-    static public final StaticMaker MessageDescMaker = 
+    static public final StaticMaker MessageDescMaker =
         StaticMaker.make(MessageDesc.class);
-        
+
     private String myDocComment;
     private String myVerb;
     private ConstList myParams;
     private Object myRetType;
-        
+
     static /*package*/ void synopsize(TextWriter out, String str)
     throws IOException {
         out.print("/**");
@@ -61,12 +62,12 @@
         myParams = params;
         myRetType = retType;
     }
-        
+
     public String getDocComment() { return myDocComment; }
     public String getVerb()       { return myVerb; }
     public ConstList getParams()  { return myParams; }
     public Object getReturnType() { return myRetType; }
-        
+
     public void printOn(TextWriter out) throws IOException {
         synopsize(out, myDocComment);
         out.lnPrint("to " + myVerb);
@@ -81,7 +82,7 @@
         //XXX should suppress if myRetType == :void
         out.print(" :", E.call(myRetType, "getName"));
     }
-        
+
     public void printHelpOn(TextWriter out) throws IOException {
         out.lnPrint("to " + myVerb);
         int len = myParams.size();



1.15      +16 -16    e/src/jsrc/org/erights/e/elib/base/MethodNode.java

Index: MethodNode.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/MethodNode.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- MethodNode.java	2001/03/24 16:09:11	1.14
+++ MethodNode.java	2001/09/06 09:55:47	1.15
@@ -1,20 +1,20 @@
 package org.erights.e.elib.base;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -32,7 +32,7 @@
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public abstract class MethodNode extends ParseNode implements Script {
-    
+
     /**
      *
      */
@@ -44,8 +44,8 @@
     public abstract String verb();
 
     /**
-     * Returns null or an interned string containing the parameter type 
-     * signature in canonical form.  Used to allow the invocation of Java 
+     * Returns null or an interned string containing the parameter type
+     * signature in canonical form.  Used to allow the invocation of Java
      * methods that are overloaded by type.
      */
     public abstract String optTypedVerb();
@@ -54,16 +54,16 @@
      * E Polymorphism is based on verb & arity alone.
      */
     public abstract int arity();
-    
+
     /**
-     * If this MethodNode is or consists of JavaMemberNodes, add these 
-     * JavaMemberNodes to map indexed by their optTypedVerb (approximately, 
+     * If this MethodNode is or consists of JavaMemberNodes, add these
+     * JavaMemberNodes to map indexed by their optTypedVerb (approximately,
      * their signature).
      */
     public abstract void addJavaMemberNodesToMap(FlexMap map);
 
     /**
-     * 
+     *
      */
     public void protocol(Object self, FlexList mTypes) {
         mTypes.push(makeMessageType(verb()));



1.5       +10 -10    e/src/jsrc/org/erights/e/elib/base/NonBlockingInputStream.java

Index: NonBlockingInputStream.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/NonBlockingInputStream.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NonBlockingInputStream.java	1999/05/13 22:33:39	1.4
+++ NonBlockingInputStream.java	2001/09/06 09:55:47	1.5
@@ -1,26 +1,26 @@
 package org.erights.e.elib.base;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
 import java.io.FilterInputStream;
-import java.io.InputStream;
 import java.io.IOException;
+import java.io.InputStream;
 
 
 /**



1.7       +9 -8      e/src/jsrc/org/erights/e/elib/base/ParamDesc.java

Index: ParamDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/ParamDesc.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ParamDesc.java	2001/08/29 00:20:17	1.6
+++ ParamDesc.java	2001/09/06 09:55:47	1.7
@@ -18,27 +18,28 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.StaticMaker;
 import org.erights.e.elib.serial.Persistent;
 
+import java.io.IOException;
+
 /**
  * Documents the name and type of a parameter
  */
 public class ParamDesc implements Persistent {
-    
+
     static public final StaticMaker ParamDescMaker =
         StaticMaker.make(ParamDesc.class);
-        
+
     /** @serial Writes "_" for anonymous parameter */
     private String myName;
     /** @serial Any object that acts like an E type */
     private Object myType;
-    
+
     /**
      *
      */
@@ -50,17 +51,17 @@
         }
         myType = type;
     }
-        
+
     /**
      *
      */
     public String getName() { return myName; }
-    
+
     /**
      *
      */
     public Object getType() { return myType; }
-        
+
     /**
      * Prints 'name :type'
      */



1.25      +19 -20    e/src/jsrc/org/erights/e/elib/base/ParseNode.java

Index: ParseNode.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/ParseNode.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- ParseNode.java	2001/08/19 06:35:55	1.24
+++ ParseNode.java	2001/09/06 09:55:47	1.25
@@ -1,32 +1,31 @@
 package org.erights.e.elib.base;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.IOException;
-import java.io.StringWriter;
 import org.erights.e.develop.exception.ThrowableSugar;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.quasi.MatchMaker;
 import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.util.AlreadyDefinedException;
 
+import java.io.IOException;
+
 /**
  * A ParseNode of a program written in "kernel E".  A program written
  * in E is immediately expanded to kernel E, hopefully passing
@@ -38,7 +37,7 @@
 
     /** lowest priority */
     static public final int PR_START = 0;
-    
+
     /** lowest priority expression */
     static public final int PR_EEXPR = 0;
     static public final int PR_ASSIGN = 1;
@@ -47,11 +46,11 @@
     static public final int PR_CALL = 4;
     /** highest priority expression */
     static public final int PR_PRIM = 5;
-    
+
     /** lowest priority pattern */
     static public final int PR_PATTERN = 0;
     static public final int PR_LISTPATT = 1;
-    
+
 
     private SourceSpan myOptSource;
 
@@ -84,12 +83,12 @@
     public void lnPrintOn(TextWriter out) throws IOException {
         lnPrintOn(out, PR_START);
     }
-    
+
     /**
      * Onto out, first print a newline, then spaces to the designated indent
-     * level, then pretty print this parse node.  "subPrintOn" vs "lnPrintOn" 
-     * is much like the conventional disctinction between "print" and 
-     * "println", except that the newlines come first (hence the weird 
+     * level, then pretty print this parse node.  "subPrintOn" vs "lnPrintOn"
+     * is much like the conventional disctinction between "print" and
+     * "println", except that the newlines come first (hence the weird
      * spelling), and the newline is followed by indentation.
      */
     public void lnPrintOn(TextWriter out, int priority) throws IOException {
@@ -213,5 +212,5 @@
             throw ThrowableSugar.backtrace(iox, "in ParseNode.toString()");
         }
         return sb.toString();
-    }        
+    }
 }



1.14      +9 -9      e/src/jsrc/org/erights/e/elib/base/Script.java

Index: Script.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/Script.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Script.java	2000/11/14 11:15:33	1.13
+++ Script.java	2001/09/06 09:55:47	1.14
@@ -1,20 +1,20 @@
 package org.erights.e.elib.base;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.13      +44 -44    e/src/jsrc/org/erights/e/elib/base/SourceSpan.java

Index: SourceSpan.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/SourceSpan.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- SourceSpan.java	2001/08/20 21:17:49	1.12
+++ SourceSpan.java	2001/09/06 09:55:47	1.13
@@ -1,20 +1,20 @@
 package org.erights.e.elib.base;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
@@ -25,7 +25,7 @@
 import org.erights.e.elib.tables.Selfless;
 
 /**
- * A description of where a particular piece of Twine came from, such as a 
+ * A description of where a particular piece of Twine came from, such as a
  * range of source code, suitable for use by a debugger. <p>
  *
  * Woven into a piece of Twine so it remembers where it came from.
@@ -34,15 +34,15 @@
  */
 public class SourceSpan
 implements PassByConstruction, Persistent, Selfless {
-    
+
     static private final long serialVersionUID = -7424472535435659022L;
-    
+
     /**
      *
      */
     static public final StaticMaker SourceSpanMaker =
         StaticMaker.make(SourceSpan.class);
-    
+
     private String myUrl;
     private boolean myIsOneToOne;
     private int myStartLine;
@@ -51,7 +51,7 @@
     private int myEndCol;
 
     /**
-     * 
+     *
      */
     public SourceSpan(String url, boolean isOneToOne,
                       int startLine, int startCol,
@@ -67,14 +67,14 @@
             throw new RuntimeException("oneToOne must be on a line: " + this);
         }
     }
-    
+
     /**
      * 'SourceSpanMaker new(myUrl, myIsOneToOne,
      *                      myStartLine, myStartCol,
      *                      myEndLine, myEndCol)'
      */
     public Object[] getCanonicalState() {
-        Object[] result = { 
+        Object[] result = {
             SourceSpanMaker,
             "new",
             myUrl,
@@ -89,58 +89,58 @@
 
     /**
      * Where might (this version of) the source text be found?
-     * 
-     * Users of SourceSpan should prevent or prepare for the possibility that 
-     * the text retrieved from a remembered Url may no longer be the original 
-     * version.  When possible, version integrity information should be 
-     * included in the Url, like a cryptographic hash of the contents.  
-     * However, such issues are beyond the scope of SourceSpan or Twine by 
+     *
+     * Users of SourceSpan should prevent or prepare for the possibility that
+     * the text retrieved from a remembered Url may no longer be the original
+     * version.  When possible, version integrity information should be
+     * included in the Url, like a cryptographic hash of the contents.
+     * However, such issues are beyond the scope of SourceSpan or Twine by
      * themselves.  To them, the Url is simply a String.
      */
     public String getUrl() { return myUrl; }
-    
+
     /**
-     * Does each character in that Twine map to the corresponding 
+     * Does each character in that Twine map to the corresponding
      * source character position? <p>
-     * 
-     * If so, then startLine must be the same as endLine, 
-     * and the described Twine's size should be 'endCol - startCol + 1'.  
-     * Otherwise, all the characters in the Twine map to all the characters 
-     * described by this SourceSpan. 
+     *
+     * If so, then startLine must be the same as endLine,
+     * and the described Twine's size should be 'endCol - startCol + 1'.
+     * Otherwise, all the characters in the Twine map to all the characters
+     * described by this SourceSpan.
      */
     public boolean isOneToOne() { return myIsOneToOne; }
-    
+
     /**
-     * Line number of beginning of span, in the text unit 
+     * Line number of beginning of span, in the text unit
      * (file?) described by url.  Line numbers are counted starting at 1.
      */
     public int getStartLine() { return myStartLine; }
-    
+
     /**
-     * Position of first character of span within the first 
+     * Position of first character of span within the first
      * line.  Column numbers are couunted starting at 0.
      */
     public int getStartCol() { return myStartCol; }
-    
+
     /**
-     * Line number of line holding the last character of the 
+     * Line number of line holding the last character of the
      * span.  Note, this is inclusive.
      */
     public int getEndLine() { return myEndLine; }
-    
+
     /**
-     * Position of last character of span within this last 
+     * Position of last character of span within this last
      * line.  Note, this is inclusive.
      */
     public int getEndCol() { return myEndCol; }
-    
+
     /**
      * Returns a new SourceSpan that covers the original two.  Either input
      * may be null, as may the output.  If either input is null, the result
      * is null.  If the two don't have the same Url, the result is
      * null.  Finally, the result describes the minimal span that includes
-     * both the originals.  If the originals are both oneToOne and optB 
-     * immediately follows optA on the same line, then the result is also 
+     * both the originals.  If the originals are both oneToOne and optB
+     * immediately follows optA on the same line, then the result is also
      * oneToOne.
      */
     static public SourceSpan optCover(SourceSpan optA, SourceSpan optB) {
@@ -158,12 +158,12 @@
                                   optA.myStartLine, optA.myStartCol,
                                   optB.myEndLine, optB.myEndCol);
         }
-        
+
         int startLine;
         int startCol;
         int endLine;
         int endCol;
-        
+
         if (optA.myStartLine < optB.myStartLine) {
             startLine = optA.myStartLine;
             startCol = optA.myStartCol;
@@ -174,7 +174,7 @@
             startLine = optB.myStartLine;
             startCol = optB.myStartCol;
         }
-        
+
         if (optA.myEndLine < optB.myEndLine) {
             endLine = optB.myEndLine;
             endCol = optB.myEndCol;
@@ -185,7 +185,7 @@
             endLine = optA.myEndLine;
             endCol = optA.myEndCol;
         }
-        
+
         return new SourceSpan(optA.myUrl, false,
                               startLine, startCol,
                               endLine, endCol);



1.30      +38 -37    e/src/jsrc/org/erights/e/elib/base/TextWriter.java

Index: TextWriter.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/TextWriter.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- TextWriter.java	2001/08/19 06:35:55	1.29
+++ TextWriter.java	2001/09/06 09:55:47	1.30
@@ -1,32 +1,33 @@
 package org.erights.e.elib.base;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */
-import java.io.FilterWriter;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.io.Writer;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.tables.CycleBreaker;
 import org.erights.e.elib.tables.Twine;
 
+import java.io.FilterWriter;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+
 /**
  * Wraps an underlying Writer to add these enhancements: <p>
  *
@@ -50,7 +51,7 @@
     private boolean myAutoflush;
     private boolean myCloses;
     private CycleBreaker myCycleBreaker;
-    
+
     /**
      * Returns a pair of a TextWriter and the StringBuffer it writes into.
      */
@@ -64,20 +65,20 @@
 
     /**
      * Initial newline defaults to "\n".  autoflush and closes
-     * default to false. 
+     * default to false.
      */
     public TextWriter(Writer out) {
-        this(out, 
-             "\n", 
-             false, 
-             false, 
+        this(out,
+             "\n",
+             false,
+             false,
              null);
     }
 
     /**
      * Returns a writer that wraps 'out', and writes all strings with
      * "\n" replaced with the 'newline' string. <p>
-     * 
+     *
      * If autoflush, flush()es after outputting each newline.
      */
     public TextWriter(Writer out,
@@ -127,13 +128,13 @@
     public TextWriter indent(String morePrefix) {
         //Since none of the TextWriters do their own buffering, they
         //don't need to flush() to coordinate with each other.
-        return new TextWriter(out, 
-                              myNewline + morePrefix, 
+        return new TextWriter(out,
+                              myNewline + morePrefix,
                               myAutoflush,
                               false,
                               myCycleBreaker);
     }
-    
+
     /**
      * Is this TextWriter in the midst of printing obj?
      */
@@ -148,7 +149,7 @@
         Object obj = Ref.resolution(original);
         if (null == obj) {
             write("null");
-            
+
         } else if (obj instanceof String) {
             write((String)obj);
 
@@ -172,10 +173,10 @@
             }
         }
     }
-    
+
     /**
-     * quote(obj) differs from print(obj) in that the quoted form of the 
-     * object is printed.  Currently, the quoted & non quoted printed forms 
+     * quote(obj) differs from print(obj) in that the quoted form of the
+     * object is printed.  Currently, the quoted & non quoted printed forms
      * differ only for String and Twine.
      */
     public void quote(Object original) throws IOException {
@@ -183,15 +184,15 @@
         if (null != obj) {
             if (obj instanceof String) {
                 obj = Twine.fromString((String)obj).quote();
-            
+
             } else if (obj instanceof Twine) {
                 obj = ((Twine)obj).quote();
             }
         }
         print(obj);
     }
-        
 
+
     /**
      *
      */
@@ -223,7 +224,7 @@
     /**
      *
      */
-    public void print(Object a, Object b, Object c, Object d) 
+    public void print(Object a, Object b, Object c, Object d)
     throws IOException {
         print(a);
         print(b);
@@ -234,7 +235,7 @@
     /**
      *
      */
-    public void print(Object a, Object b, Object c, Object d, Object e) 
+    public void print(Object a, Object b, Object c, Object d, Object e)
     throws IOException {
         print(a);
         print(b);
@@ -246,8 +247,8 @@
     /**
      *
      */
-    public void print(Object a, Object b, Object c, Object d, Object e, 
-                      Object f) 
+    public void print(Object a, Object b, Object c, Object d, Object e,
+                      Object f)
     throws IOException {
         print(a);
         print(b);
@@ -260,8 +261,8 @@
     /**
      *
      */
-    public void print(Object a, Object b, Object c, Object d, Object e, 
-                      Object f, Object g) 
+    public void print(Object a, Object b, Object c, Object d, Object e,
+                      Object f, Object g)
     throws IOException {
         print(a);
         print(b);
@@ -281,7 +282,7 @@
     }
 
     /**
-     * Like PrintWriter.println(), but uses our own newline, and doesn't 
+     * Like PrintWriter.println(), but uses our own newline, and doesn't
      * suppress IOExceptions.
      */
     public void println() throws IOException {
@@ -337,7 +338,7 @@
             off = nl + 1;
         }
     }
-    
+
     /**
      * A TextWriter prints itself on a TextWriter as &lt;TextWriter&gt;.
      */



1.5       +9 -9      e/src/jsrc/org/erights/e/elib/base/Thunk.java

Index: Thunk.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/Thunk.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Thunk.java	2000/12/21 22:38:27	1.4
+++ Thunk.java	2001/09/06 09:55:47	1.5
@@ -1,20 +1,20 @@
 package org.erights.e.elib.base;
 
 /*
-The contents of this file are subject to the Electric Communities E Open 
-Source Code License Version 1.0 (the "License"); you may not use this file 
-except in compliance with the License. You may obtain a copy of the License 
+The contents of this file are subject to the Electric Communities E Open
+Source Code License Version 1.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain a copy of the License
 at http://www.communities.com/EL/.
 
-Software distributed under the License is distributed on an "AS IS" basis, 
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 the specific language governing rights and limitations under the License.
 
-The Original Code is the Distributed E Language Implementation, released 
-July 20, 1998. 
+The Original Code is the Distributed E Language Implementation, released
+July 20, 1998.
 
-The Initial Developer of the Original Code is Electric Communities.  
-Copyright (C) 1998 Electric Communities. All Rights Reserved. 
+The Initial Developer of the Original Code is Electric Communities.
+Copyright (C) 1998 Electric Communities. All Rights Reserved.
 
 Contributor(s): ______________________________________.
 */



1.13      +15 -15    e/src/jsrc/org/erights/e/elib/base/TypeDesc.java

Index: TypeDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/TypeDesc.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- TypeDesc.java	2001/08/29 00:20:17	1.12
+++ TypeDesc.java	2001/09/06 09:55:47	1.13
@@ -18,13 +18,12 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.Thrower;
-import org.erights.e.elib.sealing.SealedBox;
+import org.erights.e.elib.serial.Persistent;
 import org.erights.e.elib.slot.SettableSlotMaker;
 import org.erights.e.elib.slot.Slot;
 import org.erights.e.elib.slot.SlotGuard;
@@ -32,24 +31,25 @@
 import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.tables.ConstMap;
 import org.erights.e.elib.tables.FlexMap;
-import org.erights.e.elib.serial.Persistent;
 import org.erights.e.elib.util.OneArgFunc;
 
+import java.io.IOException;
+
 /**
  * A type description object, as would be created by a
- * typedef expression.  A TypeDesc describes the protocol that objects of 
- * that type respond to, and is used as a ValueGuard/SlotGuard to coerce 
+ * typedef expression.  A TypeDesc describes the protocol that objects of
+ * that type respond to, and is used as a ValueGuard/SlotGuard to coerce
  * provided values into an instance of this type.
- * 
+ *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class TypeDesc implements Persistent, ValueGuard, SlotGuard {
-        
+
     private String myDocComment;
     private String myName;
     private ConstList myAuditors;
     private ConstMap myMTypes;
-        
+
     public TypeDesc(String docComment,
                     String optName,
                     ConstList auditors,
@@ -72,19 +72,19 @@
         }
         myMTypes = map.snapshot();
     }
-    
+
     public String getDocComment()     { return myDocComment; }
     public String getName()           { return myName; }
     public ConstList getAuditors()    { return myAuditors; }
     public ConstMap getMessageTypes() { return myMTypes; }
-        
+
     /**
      * Prints getName()
      */
     public void printOn(TextWriter out) throws IOException {
         out.print(getName());
     }
-    
+
     /**
      * Prints in the most expansive form accepted by typedef
      */
@@ -106,10 +106,10 @@
         }
         out.lnPrint("}\n");
     }
- 
+
     /**
      * Used in a type's role as a ValueGuard.  <p>
-     * 
+     *
      * XXX unimplemented: A specimen
      * coerces to the contents of the SealedBox that this
      * type's unsealer can unseal.  This is exactly instances
@@ -119,7 +119,7 @@
         throw Thrower.toEject(optEjector,
                               "TypeDesc's coerce() not overridden");
     }
-        
+
     /**
      * Used in a type's role as a SlotGuard.  In SlotGuard
      * position, ":type" is equivalent to ":settable(type)".



1.3       +4 -4      e/src/jsrc/org/erights/e/elib/base/UnQuote.java

Index: UnQuote.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/UnQuote.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- UnQuote.java	2000/11/14 11:15:33	1.2
+++ UnQuote.java	2001/09/06 09:55:47	1.3
@@ -3,22 +3,22 @@
 import java.io.IOException;
 
 /**
- * Wraps a string, and prints/quotes as the string, rather than the quoted 
+ * Wraps a string, and prints/quotes as the string, rather than the quoted
  * form of the string.
  *
  * @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
  */
 public class UnQuote {
-    
+
     private String myStr;
-    
+
     /**
      *
      */
     public UnQuote(String str) {
         myStr = str;
     }
-    
+
     /**
      *
      */



1.8       +48 -47    e/src/jsrc/org/erights/e/elib/deflect/Deflector.java

Index: Deflector.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/deflect/Deflector.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Deflector.java	2001/08/29 00:20:17	1.7
+++ Deflector.java	2001/09/06 09:55:48	1.8
@@ -18,13 +18,9 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.EventListener;
 import org.erights.e.elib.base.Callable;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
@@ -33,71 +29,76 @@
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.tables.Selfless;
 
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.EventListener;
+
 /**
- * Deflectors enable E objects to implement Java interfaces, and thereby to 
+ * Deflectors enable E objects to implement Java interfaces, and thereby to
  * be called by Java callers written without any knowledge of E or ELib. <p>
  *
- * You <i>deflect</i> an object to an interface by calling the static deflect 
- * method below.  We say the result is a <i>deflection</i> of the original 
- * object.  The result is a three layer wrapping: 1) On the outside is the 
- * deflection. This wraps 2) a Deflector, which wraps 3) the deflected 
+ * You <i>deflect</i> an object to an interface by calling the static deflect
+ * method below.  We say the result is a <i>deflection</i> of the original
+ * object.  The result is a three layer wrapping: 1) On the outside is the
+ * deflection. This wraps 2) a Deflector, which wraps 3) the deflected
  * object. <p>
  *
- * The deflection is actually a dynamically generated subclass of 
- * Proxy which implements both the interface being deflected to as well as 
- * Callable.  Deflector itself implements PassByConstruction, Selfless, 
- * and Persistent just in case the deflected object does.  The Deflection of 
- * the object implements whichever of these the deflected object does.  We 
- * say the interface being deflected to is the J-Interface, and we say that 
- * Callable, and whatever subset of PassByConstruction, Selfless, and 
+ * The deflection is actually a dynamically generated subclass of
+ * Proxy which implements both the interface being deflected to as well as
+ * Callable.  Deflector itself implements PassByConstruction, Selfless,
+ * and Persistent just in case the deflected object does.  The Deflection of
+ * the object implements whichever of these the deflected object does.  We
+ * say the interface being deflected to is the J-Interface, and we say that
+ * Callable, and whatever subset of PassByConstruction, Selfless, and
  * Persistent the deflection implements are the E-Interfaces.
  *
- * If the J-Interface has any message definitions in common with the 
- * E-Interfaces, confusion will result.  XXX This case should be 
+ * If the J-Interface has any message definitions in common with the
+ * E-Interfaces, confusion will result.  XXX This case should be
  * automatically detected, preventing such deflections. <p>
  *
  * When a deflection is E-called (as with "E.call(...)"), the call is simply
- * passed through to the deflected object.  To the E programmer (or the ELib 
- * programmer using only ELib mechanisms rather than corresponding Java 
+ * passed through to the deflected object.  To the E programmer (or the ELib
+ * programmer using only ELib mechanisms rather than corresponding Java
  * mechanisms), the deflection is identical to the deflected object. <p>
  *
- * When a deflection is Java-called (as with "."), this is turned into some 
- * kind of corresponding E invocation, but the particulars depend on which 
+ * When a deflection is Java-called (as with "."), this is turned into some
+ * kind of corresponding E invocation, but the particulars depend on which
  * subclass of Deflector is used.  See these subclasses for their policy. <p>
  *
  * @author Mark S. Miller
  */
 public abstract class Deflector
 implements InvocationHandler, PassByConstruction, Selfless, Persistent {
-    
+
     static private final long serialVersionUID = 8164442851196730818L;
-    
+
     /**
      * See the class comment about E-Interfaces
      */
     static private final Class[] EInterfaces = {
-        Callable.class, 
+        Callable.class,
         PassByConstruction.class,
         Selfless.class,
         Persistent.class
     };
-    
+
     /**
      * @serial The wrapped/target/deflected object, turned into a Callable.
      */
     /*package*/ Callable myDeflected;
-    
+
     /**
-     * Deflects target to face by wrapping it in a Deflector, and wrapping 
-     * that in a deflection (a Proxy).  If face is or extends EventListener, 
-     * then we use an EventualDeflector.  Otherwise we use an 
+     * Deflects target to face by wrapping it in a Deflector, and wrapping
+     * that in a deflection (a Proxy).  If face is or extends EventListener,
+     * then we use an EventualDeflector.  Otherwise we use an
      * ImmediateDeflector.  target must be NEAR.
      */
     static public Object deflect(Object target, Class face) {
         if (! Ref.isNear(target)) {
             throw new RuntimeException("can only deflect NEAR objects");
         }
-        
+
         FlexList faceList = FlexList.fromType(Class.class,
                                               1 + EInterfaces.length);
         faceList.push(face);
@@ -109,11 +110,11 @@
             }
         }
         Class[] faces = (Class[])faceList.getArray(Class.class);
-        
+
         if (! (target instanceof Callable)) {
             target = Ref.toRef(target);
         }
-        
+
         InvocationHandler handler;
         if (EventListener.class.isAssignableFrom(face)) {
             handler = new EventualDeflector((Callable)target);
@@ -131,12 +132,12 @@
     public Deflector(Callable target) {
         myDeflected = target;
     }
-    
+
     /**
      * The original deflected target object.
      */
     public Callable getDeflected() { return myDeflected; }
-    
+
     /**
      *
      */
@@ -144,24 +145,24 @@
 
     /**
      * This is the magic method invoked by the Proxy mechanism. <p>
-     * 
-     * If the method is either an Object method or a method declared by one 
-     * of the EInterfaces, then just invoke this method directly on the 
+     *
+     * If the method is either an Object method or a method declared by one
+     * of the EInterfaces, then just invoke this method directly on the
      * deflected target object. <p>
-     * 
-     * Otherwise, we turn it into a callAll() on the deflected target object. 
+     *
+     * Otherwise, we turn it into a callAll() on the deflected target object.
      * <p>
      *
-     * XXX Currently, we 
-     * only use the method's simple name, but that's fine for all objects 
-     * defined in E.  The only practical place this fails is remote 
+     * XXX Currently, we
+     * only use the method's simple name, but that's fine for all objects
+     * defined in E.  The only practical place this fails is remote
      * invocation of overloaded Java methods.
      *
      * @param optArgs may be null, so we replace with an empty list.
      */
     public Object invoke(Object proxy, Method method, Object[] optArgs)
     throws Throwable {
-        
+
         Object[] args = NO_ARGS;
         if (null != optArgs) {
             args = optArgs;
@@ -179,13 +180,13 @@
         if (isEInterface) {
             return method.invoke(myDeflected, args);
         }
-        
+
         String verb = method.getName();
         Object result = innerInvoke(verb, args);
         Class retType = method.getReturnType();
         return E.as(result, retType);
     }
-    
+
     /**
      *
      */



1.8       +22 -23    e/src/jsrc/org/erights/e/elib/deflect/EventualDeflector.java

Index: EventualDeflector.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/deflect/EventualDeflector.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- EventualDeflector.java	2001/08/29 00:20:17	1.7
+++ EventualDeflector.java	2001/09/06 09:55:48	1.8
@@ -18,52 +18,51 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 import org.erights.e.elib.base.Callable;
-import org.erights.e.elib.prim.E;
-import org.erights.e.elib.prim.StaticMaker;
 import org.erights.e.elib.prim.Runner;
+import org.erights.e.elib.prim.StaticMaker;
 
 /**
- * For deflecting objects that implement EventListener, which hopefully 
+ * For deflecting objects that implement EventListener, which hopefully
  * includes all the Listeners in the AWT and Swing frameworks. <p>
  *
- * This object "lives" in the vat it which it is created, which it remembers, 
- * but it can then be J-called outside of this vat.  Such J-calls are turned 
- * into eventual send of a corresponding E-message to the deflected target 
+ * This object "lives" in the vat it which it is created, which it remembers,
+ * but it can then be J-called outside of this vat.  Such J-calls are turned
+ * into eventual send of a corresponding E-message to the deflected target
  * object, queued for delivery on the originating vat. <p>
  *
- * Any E-calls must still come from the hosting vat, since these are simply 
+ * Any E-calls must still come from the hosting vat, since these are simply
  * passed through.<p>
- * 
- * The motivation is to add listeners to various ui widgets, where the 
- * listeners generally get invoked in some ui thread, but the listener 
- * objects are written in E, and therefore exist in some vat.    
+ *
+ * The motivation is to add listeners to various ui widgets, where the
+ * listeners generally get invoked in some ui thread, but the listener
+ * objects are written in E, and therefore exist in some vat.
  *
  * @author Mark S. Miller
  */
 /*package*/ class EventualDeflector extends Deflector {
-    
+
     static private final long serialVersionUID = 7395156154486886043L;
-    
+
     /**
-     * 
+     *
      */
     static private final StaticMaker EventualDeflectorMaker
         = StaticMaker.make(EventualDeflector.class);
 
     /**
-     * Since we don't do anything special, on revival this will be null, 
+     * Since we don't do anything special, on revival this will be null,
      * which will render it inoperative.  <p>
      *
-     * XXX we should either also suppress the checkpointing of myDeflected, 
-     * or (preferred) make deflectors successfully revive. 
+     * XXX we should either also suppress the checkpointing of myDeflected,
+     * or (preferred) make deflectors successfully revive.
      */
     private transient Runner myRunner;
+
 
-    
     /**
      * The current Runner is captured as the Runner of origin.
      */
@@ -71,7 +70,7 @@
         super(target);
         myRunner = Runner.currentRunner();
     }
-    
+
     /**
      * Uses 'EventualDeflectorMaker new(myDeflected)'
      */
@@ -79,7 +78,7 @@
         Object[] result = { EventualDeflectorMaker, "new", myDeflected };
         return result;
     }
-    
+
     /**
      * See the class comment.
      */
@@ -88,8 +87,8 @@
             throw new RuntimeException
                 ("EventualDeflectors do not survive revival");
         }
-        //XXX if we knew whether the method return type is Void.class, we 
-        //could do a sendAllOnly() instead of a sendAll().        
+        //XXX if we knew whether the method return type is Void.class, we
+        //could do a sendAllOnly() instead of a sendAll().
         return myRunner.sendAll(myDeflected, verb, args);
     }
 }



1.6       +8 -8      e/src/jsrc/org/erights/e/elib/deflect/ImmediateDeflector.java

Index: ImmediateDeflector.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/deflect/ImmediateDeflector.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ImmediateDeflector.java	2001/08/29 00:20:17	1.5
+++ ImmediateDeflector.java	2001/09/06 09:55:48	1.6
@@ -18,7 +18,7 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
 import org.erights.e.elib.base.Callable;
@@ -30,22 +30,22 @@
  * @author Mark S. Miller
  */
 /*package*/ class ImmediateDeflector extends Deflector {
-    
+
     static private final long serialVersionUID = 480382409162532751L;
-    
+
     /**
-     * 
+     *
      */
     static private final StaticMaker ImmediateDeflectorMaker
         = StaticMaker.make(ImmediateDeflector.class);
 
     /**
-     * 
+     *
      */
     public ImmediateDeflector(Callable target) {
         super(target);
     }
-    
+
     /**
      * Uses 'ImmediateDeflectorMaker new(myDeflected)'
      */
@@ -53,9 +53,9 @@
         Object[] result = { ImmediateDeflectorMaker, "new", myDeflected };
         return result;
     }
-    
+
     /**
-     * 
+     *
      */
     /*package*/ Object innerInvoke(String verb, Object[] args) {
         return myDeflected.callAll(verb, args);



1.2       +60 -59    e/src/jsrc/org/erights/e/elib/eio/TextReader.java

Index: TextReader.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/eio/TextReader.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TextReader.java	2001/08/31 18:13:14	1.1
+++ TextReader.java	2001/09/06 09:55:48	1.2
@@ -18,82 +18,83 @@
 The Initial Developer of the Original Code is Mark S. Miller.
 Copyright (C) 1999 Mark S. Miller. All Rights Reserved.
 
-Contributor(s): ______________________________________. 
+Contributor(s): ______________________________________.
 */
 
-import java.io.IOException;
-import java.io.Reader;
 import org.erights.e.elib.base.TextWriter;
 import org.erights.e.elib.base.Thunk;
 
+import java.io.IOException;
+import java.io.Reader;
+
 /**
- * A non-blocking {@link Reader} for reading the text that appears in a 
- * shared {@link StringBuffer}. 
+ * A non-blocking {@link Reader} for reading the text that appears in a
+ * shared {@link StringBuffer}.
  * <p>
- * This class in intended to be thread-safe, and to be used both from inside 
- * and outside a vat.  When used in conjunction with {@link 
- * java.io.StringWriter} or our own {@link StringBufferWriter}, the pair is 
- * like a non-blocking variant of {@link java.io.PipedReader}/{@link 
- * java.io.PipedWriter}.  The shar