<libroxml  version="3.0.2" />
contact: tristan.lelong@libroxml.net
Macros
roxml_defines.h File Reference

Defines used trhoughout the sources. More...

Go to the source code of this file.

Macros

#define ROXML_PATH_OR   "|"
 
#define ROXML_PATH_AND   "&"
 
#define ROXML_COND_OR   "or"
 
#define ROXML_COND_AND   "and"
 
#define ROXML_OPERATOR_OR   1
 
#define ROXML_OPERATOR_AND   2
 
#define ROXML_OPERATOR_INF   3
 
#define ROXML_OPERATOR_SUP   4
 
#define ROXML_OPERATOR_EINF   5
 
#define ROXML_OPERATOR_ESUP   6
 
#define ROXML_OPERATOR_DIFF   7
 
#define ROXML_OPERATOR_EQU   8
 
#define ROXML_OPERATOR_ADD   9
 
#define ROXML_OPERATOR_SUB   10
 
#define ROXML_OPERATOR_MUL   11
 
#define ROXML_OPERATOR_DIV   12
 
#define ROXML_FUNC_INTCOMP   1
 
#define ROXML_FUNC_STRCOMP   2
 
#define ROXML_FUNC_POS   3
 
#define ROXML_FUNC_FIRST   4
 
#define ROXML_FUNC_LAST   5
 
#define ROXML_FUNC_TEXT   6
 
#define ROXML_FUNC_NODE   7
 
#define ROXML_FUNC_COMMENT   8
 
#define ROXML_FUNC_PI   9
 
#define ROXML_FUNC_XPATH   10
 
#define ROXML_FUNC_NSURI   11
 
#define ROXML_FUNC_LNAME   12
 
#define ROXML_FUNC_POS_STR   "position()"
 
#define ROXML_FUNC_FIRST_STR   "first()"
 
#define ROXML_FUNC_LAST_STR   "last()"
 
#define ROXML_FUNC_NSURI_STR   "namespace-uri()"
 
#define ROXML_FUNC_LNAME_STR   "local-name()"
 
#define ROXML_FUNC_TEXT_STR   "text()"
 
#define ROXML_FUNC_NODE_STR   "node()"
 
#define ROXML_FUNC_COMMENT_STR   "comment()"
 
#define ROXML_FUNC_PI_STR   "processing-instruction()"
 
#define MAX_NAME_LEN   128
 
#define ROXML_BULK_READ   4096
 
#define ROXML_BASE_LEN   512
 
#define ROXML_ID_CHILD   0
 
#define ROXML_ID_DESC_O_SELF   1
 
#define ROXML_ID_SELF   2
 
#define ROXML_ID_PARENT   3
 
#define ROXML_ID_ATTR   4
 
#define ROXML_ID_DESC   5
 
#define ROXML_ID_ANC   6
 
#define ROXML_ID_NEXT_SIBL   7
 
#define ROXML_ID_PREV_SIBL   8
 
#define ROXML_ID_NEXT   9
 
#define ROXML_ID_PREV   10
 
#define ROXML_ID_NS   11
 
#define ROXML_ID_ANC_O_SELF   12
 
#define ROXML_L_CHILD   "child::"
 
#define ROXML_L_DESC_O_SELF   "descendant-or-self::"
 
#define ROXML_L_SELF   "self::"
 
#define ROXML_L_PARENT   "parent::"
 
#define ROXML_L_ATTR   "attribute::"
 
#define ROXML_L_DESC   "descendant::"
 
#define ROXML_L_ANC   "ancestor::"
 
#define ROXML_L_NEXT_SIBL   "following-sibling::"
 
#define ROXML_L_PREV_SIBL   "preceding-sibling::"
 
#define ROXML_L_NEXT   "following::"
 
#define ROXML_L_PREV   "preceding::"
 
#define ROXML_L_NS   "namespace::"
 
#define ROXML_L_ANC_O_SELF   "ancestor-or-self::"
 
#define ROXML_S_CHILD
 
#define ROXML_S_DESC_O_SELF   ""
 
#define ROXML_S_SELF   "."
 
#define ROXML_S_PARENT   ".."
 
#define ROXML_S_ATTR   "@"
 
#define ROXML_DIRECT   0
 
#define ROXML_DESC_ONLY   1
 
#define ROXML_DESC_O_SELF   2
 
#define ROXML_REQTABLE_ID   0
 
#define ROXML_NS_ID   1
 
#define ROXML_XPATH_FIRST_ID   16
 
#define PTR_NONE   -1
 
#define PTR_VOID   0
 
#define PTR_CHAR   2
 
#define PTR_CHAR_STAR   3
 
#define PTR_NODE   4
 
#define PTR_NODE_STAR   5
 
#define PTR_INT   6
 
#define PTR_INT_STAR   7
 
#define PTR_NODE_RESULT   8
 
#define PTR_IS_STAR(a)   ((a)->type % 2)
 
#define ROXML_FILE   0x01
 
#define ROXML_BUFF   0x02
 
#define ROXML_PENDING   0x04
 
#define ROXML_INVALID   0x03
 
#define STATE_NODE_NONE   0
 
#define STATE_NODE_BEG   1
 
#define STATE_NODE_NAME   2
 
#define STATE_NODE_END   3
 
#define STATE_NODE_STRING   4
 
#define STATE_NODE_ARG   5
 
#define STATE_NODE_ARGVAL   6
 
#define STATE_NODE_SEP   7
 
#define STATE_NODE_PI   8
 
#define STATE_NODE_SINGLE   9
 
#define STATE_NODE_ATTR   10
 
#define STATE_NODE_CONTENT   11
 
#define STATE_NODE_COMMENT_BEG   12
 
#define STATE_NODE_COMMENT   14
 
#define STATE_NODE_COMMENT_END   15
 
#define STATE_NODE_CDATA_BEG   16
 
#define STATE_NODE_CDATA   22
 
#define STATE_NODE_CDATA_END   23
 
#define MODE_COMMENT_NONE   0
 
#define MODE_COMMENT_QUOTE   1
 
#define MODE_COMMENT_DQUOTE   2
 
#define STATE_INSIDE_ARG_BEG   0
 
#define STATE_INSIDE_ARG   1
 
#define STATE_INSIDE_VAL_BEG   2
 
#define STATE_INSIDE_VAL   3
 
#define ROXML_WHITE(n)   ((n==' ')||(n=='\t')||(n=='\n')||(n=='\r'))
 

Detailed Description

Defines used trhoughout the sources.

(C) Copyright 2014 Tristan Lelong trist.nosp@m.an.l.nosp@m.elong.nosp@m.@lib.nosp@m.roxml.nosp@m..net

SPDX-Licence-Identifier: LGPL-2.1+ The author added a static linking exception, see License.txt.

Definition in file roxml_defines.h.

Macro Definition Documentation

◆ MAX_NAME_LEN

#define MAX_NAME_LEN   128

constant for namespace lenght

Definition at line 66 of file roxml_defines.h.

◆ MODE_COMMENT_DQUOTE

#define MODE_COMMENT_DQUOTE   2

mode double quoted in state machine

Definition at line 379 of file roxml_defines.h.

◆ MODE_COMMENT_NONE

#define MODE_COMMENT_NONE   0

mode init in state machine

Definition at line 365 of file roxml_defines.h.

◆ MODE_COMMENT_QUOTE

#define MODE_COMMENT_QUOTE   1

mode quoted in state machine

Definition at line 372 of file roxml_defines.h.

◆ PTR_CHAR

#define PTR_CHAR   2

constant for char pointers

Definition at line 155 of file roxml_defines.h.

◆ PTR_CHAR_STAR

#define PTR_CHAR_STAR   3

constant for char table pointers

Definition at line 162 of file roxml_defines.h.

◆ PTR_INT

#define PTR_INT   6

constant for int pointer

Definition at line 183 of file roxml_defines.h.

◆ PTR_INT_STAR

#define PTR_INT_STAR   7

constant for int table pointers

Definition at line 190 of file roxml_defines.h.

◆ PTR_IS_STAR

#define PTR_IS_STAR (   a)    ((a)->type % 2)

macro returning if a memory_cell is a star cell

Definition at line 204 of file roxml_defines.h.

◆ PTR_NODE

#define PTR_NODE   4

constant for node pointers

Definition at line 169 of file roxml_defines.h.

◆ PTR_NODE_RESULT

#define PTR_NODE_RESULT   8

constant for node table pointers where node are not to delete

Definition at line 197 of file roxml_defines.h.

◆ PTR_NODE_STAR

#define PTR_NODE_STAR   5

constant for node table pointers

Definition at line 176 of file roxml_defines.h.

◆ PTR_NONE

#define PTR_NONE   -1

constant for void pointers

Definition at line 141 of file roxml_defines.h.

◆ PTR_VOID

#define PTR_VOID   0

constant for void pointers

Definition at line 148 of file roxml_defines.h.

◆ ROXML_BASE_LEN

#define ROXML_BASE_LEN   512

This is the max size for XML objects (node name, attribute name and values...) It is caused by the split of the XML file for parsing: 512 bytes are reserved as security to handle splitting inside an XML object. This is also the len of internal buffers. If a requested buffer is bigger, then a malloc/free will occur and may slow down libroxml.

Definition at line 91 of file roxml_defines.h.

◆ ROXML_BUFF

#define ROXML_BUFF   0x02

constant for buffer document

Definition at line 218 of file roxml_defines.h.

◆ ROXML_BULK_READ

#define ROXML_BULK_READ   4096

This is the internal buffer size for chunk of xml files

Definition at line 76 of file roxml_defines.h.

◆ ROXML_COND_AND

#define ROXML_COND_AND   "and"

Definition at line 22 of file roxml_defines.h.

◆ ROXML_COND_OR

#define ROXML_COND_OR   "or"

Definition at line 21 of file roxml_defines.h.

◆ ROXML_DESC_O_SELF

#define ROXML_DESC_O_SELF   2

Definition at line 130 of file roxml_defines.h.

◆ ROXML_DESC_ONLY

#define ROXML_DESC_ONLY   1

Definition at line 129 of file roxml_defines.h.

◆ ROXML_DIRECT

#define ROXML_DIRECT   0

Definition at line 128 of file roxml_defines.h.

◆ ROXML_FILE

#define ROXML_FILE   0x01

constant for argument node

Definition at line 211 of file roxml_defines.h.

◆ ROXML_FUNC_COMMENT

#define ROXML_FUNC_COMMENT   8

Definition at line 44 of file roxml_defines.h.

◆ ROXML_FUNC_COMMENT_STR

#define ROXML_FUNC_COMMENT_STR   "comment()"

Definition at line 58 of file roxml_defines.h.

◆ ROXML_FUNC_FIRST

#define ROXML_FUNC_FIRST   4

Definition at line 40 of file roxml_defines.h.

◆ ROXML_FUNC_FIRST_STR

#define ROXML_FUNC_FIRST_STR   "first()"

Definition at line 51 of file roxml_defines.h.

◆ ROXML_FUNC_INTCOMP

#define ROXML_FUNC_INTCOMP   1

Definition at line 37 of file roxml_defines.h.

◆ ROXML_FUNC_LAST

#define ROXML_FUNC_LAST   5

Definition at line 41 of file roxml_defines.h.

◆ ROXML_FUNC_LAST_STR

#define ROXML_FUNC_LAST_STR   "last()"

Definition at line 52 of file roxml_defines.h.

◆ ROXML_FUNC_LNAME

#define ROXML_FUNC_LNAME   12

Definition at line 48 of file roxml_defines.h.

◆ ROXML_FUNC_LNAME_STR

#define ROXML_FUNC_LNAME_STR   "local-name()"

Definition at line 54 of file roxml_defines.h.

◆ ROXML_FUNC_NODE

#define ROXML_FUNC_NODE   7

Definition at line 43 of file roxml_defines.h.

◆ ROXML_FUNC_NODE_STR

#define ROXML_FUNC_NODE_STR   "node()"

Definition at line 57 of file roxml_defines.h.

◆ ROXML_FUNC_NSURI

#define ROXML_FUNC_NSURI   11

Definition at line 47 of file roxml_defines.h.

◆ ROXML_FUNC_NSURI_STR

#define ROXML_FUNC_NSURI_STR   "namespace-uri()"

Definition at line 53 of file roxml_defines.h.

◆ ROXML_FUNC_PI

#define ROXML_FUNC_PI   9

Definition at line 45 of file roxml_defines.h.

◆ ROXML_FUNC_PI_STR

#define ROXML_FUNC_PI_STR   "processing-instruction()"

Definition at line 59 of file roxml_defines.h.

◆ ROXML_FUNC_POS

#define ROXML_FUNC_POS   3

Definition at line 39 of file roxml_defines.h.

◆ ROXML_FUNC_POS_STR

#define ROXML_FUNC_POS_STR   "position()"

Definition at line 50 of file roxml_defines.h.

◆ ROXML_FUNC_STRCOMP

#define ROXML_FUNC_STRCOMP   2

Definition at line 38 of file roxml_defines.h.

◆ ROXML_FUNC_TEXT

#define ROXML_FUNC_TEXT   6

Definition at line 42 of file roxml_defines.h.

◆ ROXML_FUNC_TEXT_STR

#define ROXML_FUNC_TEXT_STR   "text()"

Definition at line 56 of file roxml_defines.h.

◆ ROXML_FUNC_XPATH

#define ROXML_FUNC_XPATH   10

Definition at line 46 of file roxml_defines.h.

◆ ROXML_ID_ANC

#define ROXML_ID_ANC   6

Definition at line 100 of file roxml_defines.h.

◆ ROXML_ID_ANC_O_SELF

#define ROXML_ID_ANC_O_SELF   12

Definition at line 106 of file roxml_defines.h.

◆ ROXML_ID_ATTR

#define ROXML_ID_ATTR   4

Definition at line 98 of file roxml_defines.h.

◆ ROXML_ID_CHILD

#define ROXML_ID_CHILD   0

Definition at line 94 of file roxml_defines.h.

◆ ROXML_ID_DESC

#define ROXML_ID_DESC   5

Definition at line 99 of file roxml_defines.h.

◆ ROXML_ID_DESC_O_SELF

#define ROXML_ID_DESC_O_SELF   1

Definition at line 95 of file roxml_defines.h.

◆ ROXML_ID_NEXT

#define ROXML_ID_NEXT   9

Definition at line 103 of file roxml_defines.h.

◆ ROXML_ID_NEXT_SIBL

#define ROXML_ID_NEXT_SIBL   7

Definition at line 101 of file roxml_defines.h.

◆ ROXML_ID_NS

#define ROXML_ID_NS   11

Definition at line 105 of file roxml_defines.h.

◆ ROXML_ID_PARENT

#define ROXML_ID_PARENT   3

Definition at line 97 of file roxml_defines.h.

◆ ROXML_ID_PREV

#define ROXML_ID_PREV   10

Definition at line 104 of file roxml_defines.h.

◆ ROXML_ID_PREV_SIBL

#define ROXML_ID_PREV_SIBL   8

Definition at line 102 of file roxml_defines.h.

◆ ROXML_ID_SELF

#define ROXML_ID_SELF   2

Definition at line 96 of file roxml_defines.h.

◆ ROXML_INVALID

#define ROXML_INVALID   0x03

constant for invalid node

Definition at line 232 of file roxml_defines.h.

◆ ROXML_L_ANC

#define ROXML_L_ANC   "ancestor::"

Definition at line 114 of file roxml_defines.h.

◆ ROXML_L_ANC_O_SELF

#define ROXML_L_ANC_O_SELF   "ancestor-or-self::"

Definition at line 120 of file roxml_defines.h.

◆ ROXML_L_ATTR

#define ROXML_L_ATTR   "attribute::"

Definition at line 112 of file roxml_defines.h.

◆ ROXML_L_CHILD

#define ROXML_L_CHILD   "child::"

Definition at line 108 of file roxml_defines.h.

◆ ROXML_L_DESC

#define ROXML_L_DESC   "descendant::"

Definition at line 113 of file roxml_defines.h.

◆ ROXML_L_DESC_O_SELF

#define ROXML_L_DESC_O_SELF   "descendant-or-self::"

Definition at line 109 of file roxml_defines.h.

◆ ROXML_L_NEXT

#define ROXML_L_NEXT   "following::"

Definition at line 117 of file roxml_defines.h.

◆ ROXML_L_NEXT_SIBL

#define ROXML_L_NEXT_SIBL   "following-sibling::"

Definition at line 115 of file roxml_defines.h.

◆ ROXML_L_NS

#define ROXML_L_NS   "namespace::"

Definition at line 119 of file roxml_defines.h.

◆ ROXML_L_PARENT

#define ROXML_L_PARENT   "parent::"

Definition at line 111 of file roxml_defines.h.

◆ ROXML_L_PREV

#define ROXML_L_PREV   "preceding::"

Definition at line 118 of file roxml_defines.h.

◆ ROXML_L_PREV_SIBL

#define ROXML_L_PREV_SIBL   "preceding-sibling::"

Definition at line 116 of file roxml_defines.h.

◆ ROXML_L_SELF

#define ROXML_L_SELF   "self::"

Definition at line 110 of file roxml_defines.h.

◆ ROXML_NS_ID

#define ROXML_NS_ID   1

Definition at line 133 of file roxml_defines.h.

◆ ROXML_OPERATOR_ADD

#define ROXML_OPERATOR_ADD   9

Definition at line 32 of file roxml_defines.h.

◆ ROXML_OPERATOR_AND

#define ROXML_OPERATOR_AND   2

Definition at line 25 of file roxml_defines.h.

◆ ROXML_OPERATOR_DIFF

#define ROXML_OPERATOR_DIFF   7

Definition at line 30 of file roxml_defines.h.

◆ ROXML_OPERATOR_DIV

#define ROXML_OPERATOR_DIV   12

Definition at line 35 of file roxml_defines.h.

◆ ROXML_OPERATOR_EINF

#define ROXML_OPERATOR_EINF   5

Definition at line 28 of file roxml_defines.h.

◆ ROXML_OPERATOR_EQU

#define ROXML_OPERATOR_EQU   8

Definition at line 31 of file roxml_defines.h.

◆ ROXML_OPERATOR_ESUP

#define ROXML_OPERATOR_ESUP   6

Definition at line 29 of file roxml_defines.h.

◆ ROXML_OPERATOR_INF

#define ROXML_OPERATOR_INF   3

Definition at line 26 of file roxml_defines.h.

◆ ROXML_OPERATOR_MUL

#define ROXML_OPERATOR_MUL   11

Definition at line 34 of file roxml_defines.h.

◆ ROXML_OPERATOR_OR

#define ROXML_OPERATOR_OR   1

Definition at line 24 of file roxml_defines.h.

◆ ROXML_OPERATOR_SUB

#define ROXML_OPERATOR_SUB   10

Definition at line 33 of file roxml_defines.h.

◆ ROXML_OPERATOR_SUP

#define ROXML_OPERATOR_SUP   4

Definition at line 27 of file roxml_defines.h.

◆ ROXML_PATH_AND

#define ROXML_PATH_AND   "&"

Definition at line 20 of file roxml_defines.h.

◆ ROXML_PATH_OR

#define ROXML_PATH_OR   "|"

Definition at line 19 of file roxml_defines.h.

◆ ROXML_PENDING

#define ROXML_PENDING   0x04

constant for pending node

Definition at line 225 of file roxml_defines.h.

◆ ROXML_REQTABLE_ID

#define ROXML_REQTABLE_ID   0

Definition at line 132 of file roxml_defines.h.

◆ ROXML_S_ATTR

#define ROXML_S_ATTR   "@"

Definition at line 126 of file roxml_defines.h.

◆ ROXML_S_CHILD

#define ROXML_S_CHILD

Definition at line 122 of file roxml_defines.h.

◆ ROXML_S_DESC_O_SELF

#define ROXML_S_DESC_O_SELF   ""

Definition at line 123 of file roxml_defines.h.

◆ ROXML_S_PARENT

#define ROXML_S_PARENT   ".."

Definition at line 125 of file roxml_defines.h.

◆ ROXML_S_SELF

#define ROXML_S_SELF   "."

Definition at line 124 of file roxml_defines.h.

◆ ROXML_WHITE

#define ROXML_WHITE (   n)    ((n==' ')||(n=='\t')||(n=='\n')||(n=='\r'))

save current document position and recall to node

Definition at line 414 of file roxml_defines.h.

◆ ROXML_XPATH_FIRST_ID

#define ROXML_XPATH_FIRST_ID   16

Definition at line 134 of file roxml_defines.h.

◆ STATE_INSIDE_ARG

#define STATE_INSIDE_ARG   1

inside node state arg name

Definition at line 393 of file roxml_defines.h.

◆ STATE_INSIDE_ARG_BEG

#define STATE_INSIDE_ARG_BEG   0

inside node state begining (attribute declaration)

Definition at line 386 of file roxml_defines.h.

◆ STATE_INSIDE_VAL

#define STATE_INSIDE_VAL   3

inside node state arg value

Definition at line 407 of file roxml_defines.h.

◆ STATE_INSIDE_VAL_BEG

#define STATE_INSIDE_VAL_BEG   2

inside node state arg value

Definition at line 400 of file roxml_defines.h.

◆ STATE_NODE_ARG

#define STATE_NODE_ARG   5

state for the state machine for attribute name reading

Definition at line 274 of file roxml_defines.h.

◆ STATE_NODE_ARGVAL

#define STATE_NODE_ARGVAL   6

state for the state machine for attribute value reading

Definition at line 281 of file roxml_defines.h.

◆ STATE_NODE_ATTR

#define STATE_NODE_ATTR   10

state for the state machine for attribut reading

Definition at line 309 of file roxml_defines.h.

◆ STATE_NODE_BEG

#define STATE_NODE_BEG   1

state for the state machine for begining of a node

Definition at line 246 of file roxml_defines.h.

◆ STATE_NODE_CDATA

#define STATE_NODE_CDATA   22

state for the state machine for separator reading

Definition at line 351 of file roxml_defines.h.

◆ STATE_NODE_CDATA_BEG

#define STATE_NODE_CDATA_BEG   16

state for the state machine for separator reading

Definition at line 344 of file roxml_defines.h.

◆ STATE_NODE_CDATA_END

#define STATE_NODE_CDATA_END   23

state for the state machine for separator reading

Definition at line 358 of file roxml_defines.h.

◆ STATE_NODE_COMMENT

#define STATE_NODE_COMMENT   14

state for the state machine for separator reading

Definition at line 330 of file roxml_defines.h.

◆ STATE_NODE_COMMENT_BEG

#define STATE_NODE_COMMENT_BEG   12

state for the state machine for separator reading

Definition at line 323 of file roxml_defines.h.

◆ STATE_NODE_COMMENT_END

#define STATE_NODE_COMMENT_END   15

state for the state machine for separator reading

Definition at line 337 of file roxml_defines.h.

◆ STATE_NODE_CONTENT

#define STATE_NODE_CONTENT   11

state for the state machine for content read

Definition at line 316 of file roxml_defines.h.

◆ STATE_NODE_END

#define STATE_NODE_END   3

state for the state machine for end of node

Definition at line 260 of file roxml_defines.h.

◆ STATE_NODE_NAME

#define STATE_NODE_NAME   2

state for the state machine for name read

Definition at line 253 of file roxml_defines.h.

◆ STATE_NODE_NONE

#define STATE_NODE_NONE   0

state for the state machine for init

Definition at line 239 of file roxml_defines.h.

◆ STATE_NODE_PI

#define STATE_NODE_PI   8

state for the state machine for separator reading

Definition at line 295 of file roxml_defines.h.

◆ STATE_NODE_SEP

#define STATE_NODE_SEP   7

state for the state machine for separator reading

Definition at line 288 of file roxml_defines.h.

◆ STATE_NODE_SINGLE

#define STATE_NODE_SINGLE   9

state for the state machine for single nodes

Definition at line 302 of file roxml_defines.h.

◆ STATE_NODE_STRING

#define STATE_NODE_STRING   4

state for the state machine for string reading

Definition at line 267 of file roxml_defines.h.