Changeset 71 for trunk/include


Ignore:
Timestamp:
May 22, 2001, 7:18:41 PM (24 years ago)
Author:
umoeller
Message:

misc updates

Location:
trunk/include
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/expat/expat.h

    r39 r71  
    101101                    // one of:
    102102                    // -- XML_CQUANT_NONE   --> all fields below are NULL
    103                     // -- XML_CQUANT_OPT,
    104                     // -- XML_CQUANT_REP,
    105                     // -- XML_CQUANT_PLUS
     103                    // -- XML_CQUANT_OPT,   question mark
     104                    // -- XML_CQUANT_REP,   asterisk
     105                    // -- XML_CQUANT_PLUS   plus sign
    106106
    107107    const XML_Char              *name;
     
    626626#define ERROR_XML_FIRST         40000   // first error code used
    627627
    628 typedef enum _XMLERROR
    629 {
    630     ERROR_EXPAT_NONE = 0,
    631     // ERROR_EXPAT_NONE,            // removed to adhere with APIRET V0.9.9 (2001-02-14) [umoeller]
    632     ERROR_EXPAT_NO_MEMORY = ERROR_XML_FIRST,
    633     ERROR_EXPAT_SYNTAX,
    634     ERROR_EXPAT_NO_ELEMENTS,
    635     ERROR_EXPAT_INVALID_TOKEN,
    636     ERROR_EXPAT_UNCLOSED_TOKEN,
    637     ERROR_EXPAT_PARTIAL_CHAR,
    638     ERROR_EXPAT_TAG_MISMATCH,
    639     ERROR_EXPAT_DUPLICATE_ATTRIBUTE,
    640     ERROR_EXPAT_JUNK_AFTER_DOC_ELEMENT,
    641     ERROR_EXPAT_PARAM_ENTITY_REF,
    642     ERROR_EXPAT_UNDEFINED_ENTITY,
    643     ERROR_EXPAT_RECURSIVE_ENTITY_REF,
    644     ERROR_EXPAT_ASYNC_ENTITY,
    645     ERROR_EXPAT_BAD_CHAR_REF,
    646     ERROR_EXPAT_BINARY_ENTITY_REF,
    647     ERROR_EXPAT_ATTRIBUTE_EXTERNAL_ENTITY_REF,
    648     ERROR_EXPAT_MISPLACED_XML_PI,
    649     ERROR_EXPAT_UNKNOWN_ENCODING,
    650     ERROR_EXPAT_INCORRECT_ENCODING,
    651     ERROR_EXPAT_UNCLOSED_CDATA_SECTION,
    652     ERROR_EXPAT_EXTERNAL_ENTITY_HANDLING,
    653     ERROR_EXPAT_NOT_STANDALONE,
    654     ERROR_EXPAT_UNEXPECTED_STATE,
    655 
    656     ERROR_EXPAT_AFTER_LAST      // added V0.9.9 (2001-02-14) [umoeller];
    657                                 // xml.h builds on this
    658 } XMLERROR;
     628typedef unsigned long XMLERROR;     // V0.9.12 (2001-05-20) [umoeller]
     629
     630#define ERROR_EXPAT_NONE                0
     631#define ERROR_EXPAT_NO_MEMORY           (ERROR_XML_FIRST)
     632#define ERROR_EXPAT_SYNTAX              (ERROR_XML_FIRST + 1)
     633#define ERROR_EXPAT_NO_ELEMENTS         (ERROR_XML_FIRST + 2)
     634#define ERROR_EXPAT_INVALID_TOKEN       (ERROR_XML_FIRST + 3)
     635#define ERROR_EXPAT_UNCLOSED_TOKEN      (ERROR_XML_FIRST + 4)
     636#define ERROR_EXPAT_PARTIAL_CHAR        (ERROR_XML_FIRST + 5)
     637#define ERROR_EXPAT_TAG_MISMATCH        (ERROR_XML_FIRST + 6)
     638#define ERROR_EXPAT_DUPLICATE_ATTRIBUTE (ERROR_XML_FIRST + 7)
     639#define ERROR_EXPAT_JUNK_AFTER_DOC_ELEMENT (ERROR_XML_FIRST + 8)
     640#define ERROR_EXPAT_PARAM_ENTITY_REF    (ERROR_XML_FIRST + 10)
     641#define ERROR_EXPAT_UNDEFINED_ENTITY    (ERROR_XML_FIRST + 11)
     642#define ERROR_EXPAT_RECURSIVE_ENTITY_REF (ERROR_XML_FIRST + 12)
     643#define ERROR_EXPAT_ASYNC_ENTITY        (ERROR_XML_FIRST + 13)
     644#define ERROR_EXPAT_BAD_CHAR_REF        (ERROR_XML_FIRST + 14)
     645#define ERROR_EXPAT_BINARY_ENTITY_REF   (ERROR_XML_FIRST + 15)
     646#define ERROR_EXPAT_ATTRIBUTE_EXTERNAL_ENTITY_REF (ERROR_XML_FIRST + 16)
     647#define ERROR_EXPAT_MISPLACED_XML_PI    (ERROR_XML_FIRST + 17)
     648#define ERROR_EXPAT_UNKNOWN_ENCODING    (ERROR_XML_FIRST + 18)
     649#define ERROR_EXPAT_INCORRECT_ENCODING  (ERROR_XML_FIRST + 19)
     650#define ERROR_EXPAT_UNCLOSED_CDATA_SECTION (ERROR_XML_FIRST + 20)
     651#define ERROR_EXPAT_EXTERNAL_ENTITY_HANDLING (ERROR_XML_FIRST + 21)
     652#define ERROR_EXPAT_NOT_STANDALONE      (ERROR_XML_FIRST + 22)
     653#define ERROR_EXPAT_UNEXPECTED_STATE    (ERROR_XML_FIRST + 23)
    659654
    660655/* If XML_Parse or XML_ParseBuffer have returned 0, then XML_GetErrorCode
  • trunk/include/helpers/linklist.h

    r53 r71  
    140140    typedef LSTINIT *PLSTINIT;
    141141
    142     #ifdef __XWPMEMDEBUG__ // setup.h, helpers\memdebug.c
     142    #ifdef __DEBUG_MALLOC_ENABLED__ // setup.h, helpers\memdebug.c
    143143        PLINKLIST XWPENTRY lstCreateDebug(BOOL fItemsFreeable,
    144144                                          const char *file,
     
    194194    typedef LSTINDEXFROMITEM *PLSTINDEXFROMITEM;
    195195
    196     #ifdef __XWPMEMDEBUG__ // setup.h, helpers\memdebug.c
     196    #ifdef __DEBUG_MALLOC_ENABLED__ // setup.h, helpers\memdebug.c
    197197        PLISTNODE XWPENTRY lstAppendItemDebug(PLINKLIST pList,
    198198                                              void* pNewItemData,
  • trunk/include/helpers/memdebug.h

    r14 r71  
    138138            #endif
    139139
     140            #define __DEBUG_MALLOC_ENABLED__
     141
    140142        #endif
    141143    #endif
  • trunk/include/helpers/prfh.h

    r68 r71  
    5252                               PSZ *ppszKeys);
    5353
    54     #ifdef __XWPMEMDEBUG__ // setup.h, helpers\memdebug.c
     54    #ifdef __DEBUG_MALLOC_ENABLED__ // setup.h, helpers\memdebug.c
    5555        PSZ prfhQueryProfileDataDebug(HINI hIni,
    5656                                      const char *pcszApp,
  • trunk/include/helpers/winh.h

    r69 r71  
    543543                                   BOOL fSelectTarget);
    544544
     545    ULONG XWPENTRY winhLboxFindItemFromHandle(HWND hwndListBox,
     546                                              ULONG ulHandle);
     547
    545548    /* ******************************************************************
    546549     *
  • trunk/include/helpers/xml.h

    r64 r71  
    4343     ********************************************************************/
    4444
    45     typedef enum _DOMERROR
    46     {
    47         // validity errors:
     45    // ERROR_XML_FIRST is defined in expat\expat.h;
     46    // the range up to ERROR_XML_FIRST + 24 is used
     47    // by expat
     48
    4849// START MATCHING ERROR MESSAGES (xmlDescribeError)
    49         ERROR_DOM_UNDECLARED_ELEMENT = ERROR_EXPAT_AFTER_LAST,
     50            // validity errors:
     51    #define ERROR_DOM_UNDECLARED_ELEMENT    (ERROR_XML_FIRST + 24)
    5052                // invalidity: element is undeclared
    51         ERROR_DOM_ROOT_ELEMENT_MISNAMED,
    52         ERROR_DOM_INVALID_ROOT_ELEMENT,
    53         ERROR_DOM_INVALID_SUBELEMENT,
     53    #define ERROR_DOM_ROOT_ELEMENT_MISNAMED (ERROR_XML_FIRST + 25)
     54    #define ERROR_DOM_INVALID_ROOT_ELEMENT (ERROR_XML_FIRST + 26)
     55    #define ERROR_DOM_INVALID_SUBELEMENT (ERROR_XML_FIRST + 27)
    5456                // subelement may not appear in its parent element
    55         ERROR_DOM_DUPLICATE_ELEMENT_DECL,
     57    #define ERROR_DOM_DUPLICATE_ELEMENT_DECL (ERROR_XML_FIRST + 28)
    5658                // more than one declaration for an element type
    57         ERROR_DOM_DUPLICATE_ATTRIBUTE_DECL,
     59    #define ERROR_DOM_DUPLICATE_ATTRIBUTE_DECL (ERROR_XML_FIRST + 29)
    5860                // more than one declaration for an attribute type
    59         ERROR_DOM_UNDECLARED_ATTRIBUTE,
    60         ERROR_ELEMENT_CANNOT_HAVE_CONTENT,
     61    #define ERROR_DOM_UNDECLARED_ATTRIBUTE (ERROR_XML_FIRST + 30)
     62    #define ERROR_ELEMENT_CANNOT_HAVE_CONTENT (ERROR_XML_FIRST + 31)
    6163                // element was declared "empty" and contains text anyway,
    6264                // or was declared "children" and contains something other
    6365                // than whitespace
    64         ERROR_DOM_INVALID_ATTRIB_VALUE,
    65         ERROR_DOM_REQUIRED_ATTRIBUTE_MISSING,
    66         ERROR_DOM_SUBELEMENT_IN_EMPTY_ELEMENT,
     66    #define ERROR_DOM_INVALID_ATTRIB_VALUE (ERROR_XML_FIRST + 32)
     67    #define ERROR_DOM_REQUIRED_ATTRIBUTE_MISSING (ERROR_XML_FIRST + 33)
     68    #define ERROR_DOM_SUBELEMENT_IN_EMPTY_ELEMENT (ERROR_XML_FIRST + 34)
    6769// END MATCHING ERROR MESSAGES (xmlDescribeError)
    6870
    6971        // error categories:
    70         ERROR_DOM_PARSING,
    71         ERROR_DOM_VALIDITY,
     72    #define ERROR_DOM_PARSING (ERROR_XML_FIRST + 35)
     73    #define ERROR_DOM_VALIDITY (ERROR_XML_FIRST + 36)
    7274
    7375        // additional DOM errors
    74         ERROR_DOM_NODETYPE_NOT_SUPPORTED,
     76    #define ERROR_DOM_NODETYPE_NOT_SUPPORTED (ERROR_XML_FIRST + 37)
    7577                // invalid node type in xmlCreateDomNode
    76         ERROR_DOM_NO_DOCUMENT,
     78    #define ERROR_DOM_NO_DOCUMENT (ERROR_XML_FIRST + 38)
    7779                // cannot find document node
    78         ERROR_DOM_NO_ELEMENT,
    79         ERROR_DOM_DUPLICATE_DOCTYPE,
    80         ERROR_DOM_DOCTYPE_ROOT_NAMES_MISMATCH,
     80    #define ERROR_DOM_NO_ELEMENT (ERROR_XML_FIRST + 39)
     81    #define ERROR_DOM_DUPLICATE_DOCTYPE (ERROR_XML_FIRST + 40)
     82    #define ERROR_DOM_DOCTYPE_ROOT_NAMES_MISMATCH (ERROR_XML_FIRST + 41)
    8183                // DOCTYPE is given and root element name does not match doctype name
    82         ERROR_DOM_INTEGRITY,
    83         ERROR_DOM_DUPLICATE_ATTRIBUTE,
     84    #define ERROR_DOM_INTEGRITY (ERROR_XML_FIRST + 42)
     85    #define ERROR_DOM_DUPLICATE_ATTRIBUTE (ERROR_XML_FIRST + 43)
    8486
    8587        // @@@todo these
    86         ERROR_DOM_VALIDATE_INVALID_ELEMENT,
    87         ERROR_DOM_ELEMENT_DECL_OUTSIDE_DOCTYPE,
    88         ERROR_DOM_ATTLIST_DECL_OUTSIDE_DOCTYPE
    89     } DOMERROR;
     88    #define ERROR_DOM_VALIDATE_INVALID_ELEMENT (ERROR_XML_FIRST + 44)
     89    #define ERROR_DOM_ELEMENT_DECL_OUTSIDE_DOCTYPE (ERROR_XML_FIRST + 45)
     90    #define ERROR_DOM_ATTLIST_DECL_OUTSIDE_DOCTYPE (ERROR_XML_FIRST + 46)
    9091
    9192    const char* xmlDescribeError(int code);
     
    130131    /*
    131132     *@@ NODEBASE:
    132      *      "content model" node. With the DOM content models,
    133      *      this represents an entry in a DTD or XML schema.
     133     *      root class of all nodes used in the
     134     *      DOM tree.
     135     *
     136     *      The first item is a TREE to make this insertable
     137     *      into string maps via the functions in tree.c.
     138     *
     139     *      A NODEBASE is also the first member of a DOMNODE
     140     *      so this is effectively a simulation of inheritance
     141     *      in plain C... DOMNODE inherits from NODEBASE,
     142     *      and some other types inherit from DOMNODE.
     143     *
     144     *      This contains the node name, which is also used
     145     *      by the DOMNODE's (e.g. for element names).
     146     *      However, only DOMNODE defines the node value
     147     *      string.
    134148     *
    135149     *@@added V0.9.9 (2001-02-14) [umoeller]
     
    138152    typedef struct _NODEBASE
    139153    {
    140         TREE            Tree;
    141 
    142         NODEBASETYPE    ulNodeType;
     154        TREE            Tree;           // tree.c
     155
     156        NODEBASETYPE    ulNodeType;     // class type; this is precious,
     157                                        // all xml* functions make assumptions
     158                                        // from this value
    143159
    144160        XSTRING         strNodeName;
     
    189205     *      Overview of member fields usage:
    190206     +
    191      +      ulNodeType    | strNodeName | strNodeValue | llChildren | llAttributes
     207     +      ulNodeType    | strNodeName | strNodeValue | llChildren | AttributesMap
     208     +      (NODEBASE)    | (NODEBASE)  | (DOMNODE)    | (DOMNODE)  | (DOMNODE)
    192209     +      =======================================================================
    193210     +                    |             |              |            |
     
    409426                    // one of:
    410427                    // -- XML_CQUANT_NONE   --> all fields below are NULL
    411                     // -- XML_CQUANT_OPT,
    412                     // -- XML_CQUANT_REP,
    413                     // -- XML_CQUANT_PLUS
     428                    // -- XML_CQUANT_OPT,   question mark
     429                    // -- XML_CQUANT_REP,   asterisk
     430                    // -- XML_CQUANT_PLUS   plus sign
    414431
    415432        struct _CMELEMENTPARTICLE *pParentParticle;     // or NULL if this is in the
     
    596613    /* ******************************************************************
    597614     *
    598      *   DOM APIs
     615     *   DOM parser APIs
    599616     *
    600617     ********************************************************************/
     
    690707                                   const char *pcszAttribName);
    691708
     709    /* ******************************************************************
     710     *
     711     *   DOM build
     712     *
     713     ********************************************************************/
     714
     715    APIRET xmlCreateDocument(const char *pcszRootElementName,
     716                             PDOMDOCUMENTNODE *ppDocument,
     717                             PDOMNODE *ppRootElement);
     718
     719    APIRET xmlWriteDocument(PDOMDOCUMENTNODE pDocument,
     720                            const char *pcszEncoding,
     721                            const char *pcszDoctype,
     722                            PXSTRING pxstr);
    692723#endif
    693724
Note: See TracChangeset for help on using the changeset viewer.