You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/03/01 17:44:20 UTC

cvs commit: xml-xerces/c/src/xercesc/util/Platforms/Win32 Version.rc

tng         02/03/01 08:44:20

  Modified:    c/src/xercesc/NLS/EN_US XMLErrList_EN_US.Xml
               c/src/xercesc/dom NodeIDMap.cpp
               c/src/xercesc/idom IDNodeIDMap.cpp
               c/src/xercesc/util XMLExceptMsgs.hpp
               c/src/xercesc/util/MsgLoaders/InMemory CppErrMsgs_EN_US.hpp
               c/src/xercesc/util/MsgLoaders/MsgCatalog XMLMsgCat_EN_US.Msg
               c/src/xercesc/util/Platforms/Win32 Version.rc
  Log:
  NodeIDMap informational message about growing only be printed if debug is on.
  Besides the throw message should be encap in the XMLErrList_EN_US.Xml, not hardcoded in the code.
  
  Revision  Changes    Path
  1.4       +1 -0      xml-xerces/c/src/xercesc/NLS/EN_US/XMLErrList_EN_US.Xml
  
  Index: XMLErrList_EN_US.Xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/NLS/EN_US/XMLErrList_EN_US.Xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLErrList_EN_US.Xml	13 Feb 2002 16:58:34 -0000	1.3
  +++ XMLErrList_EN_US.Xml	1 Mar 2002 16:44:19 -0000	1.4
  @@ -758,6 +758,7 @@
               <Message Id="PD_RecurseUnordered" Text="RecurseUnordered: There is not a complete functional mapping between the particles"/>
               <Message Id="PD_MapAndSum" Text="MapAndSum: There is not a complete functional mapping between the particles"/>
               <Message Id="PD_InvalidContentType" Text="Particle derivation: Invalid content spec node type"/>
  +            <Message Id="NodeIDMap_GrowErr" Text="NodeIDMap overflows and exceeds the largest available size"/>
           </FatalError>
       </MsgDomain>
       <MsgDomain Domain="http://apache.org/xml/messages/XML4JErrors">
  
  
  
  1.2       +23 -20    xml-xerces/c/src/xercesc/dom/NodeIDMap.cpp
  
  Index: NodeIDMap.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/NodeIDMap.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NodeIDMap.cpp	1 Feb 2002 22:21:48 -0000	1.1
  +++ NodeIDMap.cpp	1 Mar 2002 16:44:19 -0000	1.2
  @@ -1,37 +1,37 @@
   /*
    * The Apache Software License, Version 1.1
  - * 
  - * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  + *
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
  - * 
  + *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
  - * 
  + *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  - * 
  + *    notice, this list of conditions and the following disclaimer.
  + *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
    *    the documentation and/or other materials provided with the
    *    distribution.
  - * 
  + *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    if any, must include the following acknowledgment:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
  - * 
  + *
    * 4. The names "Xerces" and "Apache Software Foundation" must
    *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  + *    software without prior written permission. For written
    *    permission, please contact apache\@apache.org.
  - * 
  + *
    * 5. Products derived from this software may not be called "Apache",
    *    nor may "Apache" appear in their name, without prior written
    *    permission of the Apache Software Foundation.
  - * 
  + *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  @@ -45,7 +45,7 @@
    * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    * SUCH DAMAGE.
    * ====================================================================
  - * 
  + *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation, and was
    * originally based on software copyright (c) 1999, International
  @@ -58,6 +58,7 @@
   #include "AttrImpl.hpp"
   #include "NodeIDMap.hpp"
   #include <xercesc/util/XMLString.hpp>
  +#include <xercesc/util/RuntimeException.hpp>
   #include <stdio.h>
   
   static const int gPrimes[] = {997, 9973, 99991, 999983, 0 };  // To do - add a few more.
  @@ -65,7 +66,7 @@
   static const float gMaxFill = 0.8f;   // The maximum fraction of the total
                                       // table entries to consume before exanding.
   
  -NodeIDMap::NodeIDMap(int initialSize) 
  +NodeIDMap::NodeIDMap(int initialSize)
   {
       for (fSizeIndex = 0; gPrimes[fSizeIndex] < initialSize; fSizeIndex++)
       {
  @@ -74,10 +75,10 @@
               // We need a bigger size than the largest available one.
               //   Big trouble.
               fSizeIndex--;
  -            throw "NodeIDMap::NodeIDMap - big trouble.";
  +            ThrowXML(RuntimeException, XMLExcepts::NodeIDMap_GrowErr);
           }
       }
  -    
  +
       fSize = gPrimes[fSizeIndex];
       fNumEntries = 0;
       fMaxEntries = (unsigned long)(float(fSize) * gMaxFill);
  @@ -120,7 +121,7 @@
   
   	//
   	// Loop looking for an empty slot for this ID.
  -	//   Don't even bother checking to see if the ID is already there - 
  +	//   Don't even bother checking to see if the ID is already there -
   	//   the table is only filled by the parser from valid documents, which
   	//   can not have duplicates.  Behavior of invalid docs is not defined.
   	//
  @@ -231,7 +232,9 @@
       //
       //  Figure the new table size.
       //
  +#if defined(XERCES_DEBUG)
       fprintf(stderr, "growing...\n");
  +#endif
       fSizeIndex++;
       fSize = gPrimes[fSizeIndex];
       if (fSize == 0)
  @@ -239,7 +242,7 @@
           // We need to grow bigger than the largest available size.
           //   Big trouble.
           fSizeIndex--;
  -        throw "NodeIDMap::growTable - big trouble.";
  +        ThrowXML(RuntimeException, XMLExcepts::NodeIDMap_GrowErr);
       }
   
       //
  @@ -260,9 +263,9 @@
           if ((oldTable[i] != 0)  &&  (oldTable[i] != (AttrImpl *)-1))
               add(oldTable[i]);
       }
  -    
  +
       delete [] oldTable;
  -    
  +
   };
   
   
  
  
  
  1.2       +7 -4      xml-xerces/c/src/xercesc/idom/IDNodeIDMap.cpp
  
  Index: IDNodeIDMap.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/idom/IDNodeIDMap.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IDNodeIDMap.cpp	1 Feb 2002 22:21:54 -0000	1.1
  +++ IDNodeIDMap.cpp	1 Mar 2002 16:44:19 -0000	1.2
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -55,13 +55,14 @@
    */
   
   /*
  - * $Id: IDNodeIDMap.cpp,v 1.1 2002/02/01 22:21:54 peiyongz Exp $
  + * $Id: IDNodeIDMap.cpp,v 1.2 2002/03/01 16:44:19 tng Exp $
    */
   
   #include "IDAttrImpl.hpp"
   #include "IDDocumentImpl.hpp"
   #include "IDNodeIDMap.hpp"
   #include <xercesc/util/XMLString.hpp>
  +#include <xercesc/util/RuntimeException.hpp>
   #include <stdio.h>
   
   static const int gPrimes[] = {997, 9973, 99991, 999983, 0 };  // To do - add a few more.
  @@ -80,7 +81,7 @@
               // We need a bigger size than the largest available one.
               //   Big trouble.
               fSizeIndex--;
  -            throw "IDNodeIDMap::IDNodeIDMap - big trouble.";
  +            ThrowXML(RuntimeException, XMLExcepts::NodeIDMap_GrowErr);
           }
       }
   
  @@ -238,7 +239,9 @@
       //
       //  Figure the new table size.
       //
  +#if defined(XERCES_DEBUG)
       fprintf(stderr, "growing...\n");
  +#endif
       fSizeIndex++;
       fSize = gPrimes[fSizeIndex];
       if (fSize == 0)
  @@ -246,7 +249,7 @@
           // We need to grow bigger than the largest available size.
           //   Big trouble.
           fSizeIndex--;
  -        throw "IDNodeIDMap::growTable - big trouble.";
  +        ThrowXML(RuntimeException, XMLExcepts::NodeIDMap_GrowErr);
       }
   
       //
  
  
  
  1.2       +4 -3      xml-xerces/c/src/xercesc/util/XMLExceptMsgs.hpp
  
  Index: XMLExceptMsgs.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLExceptMsgs.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLExceptMsgs.hpp	1 Feb 2002 22:22:15 -0000	1.1
  +++ XMLExceptMsgs.hpp	1 Mar 2002 16:44:19 -0000	1.2
  @@ -362,9 +362,10 @@
         , PD_RecurseUnordered                = 351
         , PD_MapAndSum                       = 352
         , PD_InvalidContentType              = 353
  -      , F_HighBounds                       = 354
  -      , E_LowBounds                        = 355
  -      , E_HighBounds                       = 356
  +      , NodeIDMap_GrowErr                  = 354
  +      , F_HighBounds                       = 355
  +      , E_LowBounds                        = 356
  +      , E_HighBounds                       = 357
       };
   
   };
  
  
  
  1.4       +2 -1      xml-xerces/c/src/xercesc/util/MsgLoaders/InMemory/CppErrMsgs_EN_US.hpp
  
  Index: CppErrMsgs_EN_US.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/MsgLoaders/InMemory/CppErrMsgs_EN_US.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CppErrMsgs_EN_US.hpp	13 Feb 2002 16:58:34 -0000	1.3
  +++ CppErrMsgs_EN_US.hpp	1 Mar 2002 16:44:19 -0000	1.4
  @@ -764,8 +764,9 @@
     , { 0x0052,0x0065,0x0063,0x0075,0x0072,0x0073,0x0065,0x0055,0x006E,0x006F,0x0072,0x0064,0x0065,0x0072,0x0065,0x0064,0x003A,0x0020,0x0054,0x0068,0x0065,0x0072,0x0065,0x0020,0x0069,0x0073,0x0020,0x006E,0x006F,0x0074,0x0020,0x0061,0x0020,0x0063,0x006F,0x006D,0x0070,0x006C,0x0065,0x0074,0x0065,0x0020,0x0066,0x0075,0x006E,0x0063,0x0074,0x0069,0x006F,0x006E,0x0061,0x006C,0x0020,0x006D,0x0061,0x0070,0x0070,0x0069,0x006E,0x0067,0x0020,0x0062,0x0065,0x0074,0x0077,0x0065,0x0065,0x006E,0x0020,0x0074,0x0068,0x0065,0x0020,0x0070,0x0061,0x0072,0x0074,0x0069,0x0063,0x006C,0x0065,0x0073,0x00 }
     , { 0x004D,0x0061,0x0070,0x0041,0x006E,0x0064,0x0053,0x0075,0x006D,0x003A,0x0020,0x0054,0x0068,0x0065,0x0072,0x0065,0x0020,0x0069,0x0073,0x0020,0x006E,0x006F,0x0074,0x0020,0x0061,0x0020,0x0063,0x006F,0x006D,0x0070,0x006C,0x0065,0x0074,0x0065,0x0020,0x0066,0x0075,0x006E,0x0063,0x0074,0x0069,0x006F,0x006E,0x0061,0x006C,0x0020,0x006D,0x0061,0x0070,0x0070,0x0069,0x006E,0x0067,0x0020,0x0062,0x0065,0x0074,0x0077,0x0065,0x0065,0x006E,0x0020,0x0074,0x0068,0x0065,0x0020,0x0070,0x0061,0x0072,0x0074,0x0069,0x0063,0x006C,0x0065,0x0073,0x00 }
     , { 0x0050,0x0061,0x0072,0x0074,0x0069,0x0063,0x006C,0x0065,0x0020,0x0064,0x0065,0x0072,0x0069,0x0076,0x0061,0x0074,0x0069,0x006F,0x006E,0x003A,0x0020,0x0049,0x006E,0x0076,0x0061,0x006C,0x0069,0x0064,0x0020,0x0063,0x006F,0x006E,0x0074,0x0065,0x006E,0x0074,0x0020,0x0073,0x0070,0x0065,0x0063,0x0020,0x006E,0x006F,0x0064,0x0065,0x0020,0x0074,0x0079,0x0070,0x0065,0x00 }
  +  , { 0x004E,0x006F,0x0064,0x0065,0x0049,0x0044,0x004D,0x0061,0x0070,0x0020,0x006F,0x0076,0x0065,0x0072,0x0066,0x006C,0x006F,0x0077,0x0073,0x0020,0x0061,0x006E,0x0064,0x0020,0x0065,0x0078,0x0063,0x0065,0x0065,0x0064,0x0073,0x0020,0x0074,0x0068,0x0065,0x0020,0x006C,0x0061,0x0072,0x0067,0x0065,0x0073,0x0074,0x0020,0x0061,0x0076,0x0061,0x0069,0x006C,0x0061,0x0062,0x006C,0x0065,0x0020,0x0073,0x0069,0x007A,0x0065,0x00 }
     , { 0x0046,0x005F,0x0045,0x006E,0x0064,0x00 }
   
   };
  -const unsigned int gXMLExceptArraySize = 357;
  +const unsigned int gXMLExceptArraySize = 358;
   
  
  
  
  1.4       +1 -0      xml-xerces/c/src/xercesc/util/MsgLoaders/MsgCatalog/XMLMsgCat_EN_US.Msg
  
  Index: XMLMsgCat_EN_US.Msg
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/MsgLoaders/MsgCatalog/XMLMsgCat_EN_US.Msg,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLMsgCat_EN_US.Msg	13 Feb 2002 16:58:35 -0000	1.3
  +++ XMLMsgCat_EN_US.Msg	1 Mar 2002 16:44:20 -0000	1.4
  @@ -742,5 +742,6 @@
   351  RecurseUnordered: There is not a complete functional mapping between the particles
   352  MapAndSum: There is not a complete functional mapping between the particles
   353  Particle derivation: Invalid content spec node type
  +354  NodeIDMap overflows and exceeds the largest available size
   
   
  
  
  
  1.5       +1 -0      xml-xerces/c/src/xercesc/util/Platforms/Win32/Version.rc
  
  Index: Version.rc
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Platforms/Win32/Version.rc,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Version.rc	20 Feb 2002 21:41:54 -0000	1.4
  +++ Version.rc	1 Mar 2002 16:44:20 -0000	1.5
  @@ -847,6 +847,7 @@
       8543              L"\x0052\x0065\x0063\x0075\x0072\x0073\x0065\x0055\x006E\x006F\x0072\x0064\x0065\x0072\x0065\x0064\x003A\x0020\x0054\x0068\x0065\x0072\x0065\x0020\x0069\x0073\x0020\x006E\x006F\x0074\x0020\x0061\x0020\x0063\x006F\x006D\x0070\x006C\x0065\x0074\x0065\x0020\x0066\x0075\x006E\x0063\x0074\x0069\x006F\x006E\x0061\x006C\x0020\x006D\x0061\x0070\x0070\x0069\x006E\x0067\x0020\x0062\x0065\x0074\x0077\x0065\x0065\x006E\x0020\x0074\x0068\x0065\x0020\x0070\x0061\x0072\x0074\x0069\x0063\x006C\x0065\x0073\x00"
       8544              L"\x004D\x0061\x0070\x0041\x006E\x0064\x0053\x0075\x006D\x003A\x0020\x0054\x0068\x0065\x0072\x0065\x0020\x0069\x0073\x0020\x006E\x006F\x0074\x0020\x0061\x0020\x0063\x006F\x006D\x0070\x006C\x0065\x0074\x0065\x0020\x0066\x0075\x006E\x0063\x0074\x0069\x006F\x006E\x0061\x006C\x0020\x006D\x0061\x0070\x0070\x0069\x006E\x0067\x0020\x0062\x0065\x0074\x0077\x0065\x0065\x006E\x0020\x0074\x0068\x0065\x0020\x0070\x0061\x0072\x0074\x0069\x0063\x006C\x0065\x0073\x00"
       8545              L"\x0050\x0061\x0072\x0074\x0069\x0063\x006C\x0065\x0020\x0064\x0065\x0072\x0069\x0076\x0061\x0074\x0069\x006F\x006E\x003A\x0020\x0049\x006E\x0076\x0061\x006C\x0069\x0064\x0020\x0063\x006F\x006E\x0074\x0065\x006E\x0074\x0020\x0073\x0070\x0065\x0063\x0020\x006E\x006F\x0064\x0065\x0020\x0074\x0079\x0070\x0065\x00"
  +    8546              L"\x004E\x006F\x0064\x0065\x0049\x0044\x004D\x0061\x0070\x0020\x006F\x0076\x0065\x0072\x0066\x006C\x006F\x0077\x0073\x0020\x0061\x006E\x0064\x0020\x0065\x0078\x0063\x0065\x0065\x0064\x0073\x0020\x0074\x0068\x0065\x0020\x006C\x0061\x0072\x0067\x0065\x0073\x0074\x0020\x0061\x0076\x0061\x0069\x006C\x0061\x0062\x006C\x0065\x0020\x0073\x0069\x007A\x0065\x00"
   END
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org