1      * Summary: set of routines to process strings
2      * Description: type and interfaces needed for the internal string
3      *              handling of the library, especially UTF8 processing.
4      *
5      * Copy: See Copyright for the status of this software.
6      *
7      * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
8
9      /if not defined(XML_STRING_H__)
10      /define XML_STRING_H__
11
12      /include "libxmlrpg/xmlversion"
13      /include "libxmlrpg/xmlTypesC"
14      /include "libxmlrpg/xmlstdarg"
15
16      * xmlChar:
17      *
18      * This is a basic byte in an UTF-8 encoded string.
19      * It's unsigned allowing to pinpoint case where char * are assigned
20      * to xmlChar * (possibly making serialization back impossible).
21
22     d xmlChar         s                   based(######typedef######)
23     d                                     like(xmlCuchar)
24
25      * xmlChar handling
26
27     d xmlStrdup       pr              *   extproc('xmlStrdup')                 xmlChar *
28     d  cur                            *   value options(*string)               const xmlChar *
29
30     d xmlStrndup      pr              *   extproc('xmlStrndup')                xmlChar *
31     d  cur                            *   value options(*string)               const xmlChar *
32     d  len                                value like(xmlCint)
33
34     d xmlCharStrndup  pr              *   extproc('xmlCharStrndup')            xmlChar *
35     d  cur                            *   value options(*string)               const char *
36     d  len                                value like(xmlCint)
37
38     d xmlCharStrdup   pr              *   extproc('xmlCharStrdup')             xmlChar *
39     d  cur                            *   value options(*string)               const char *
40
41     d xmlStrsub       pr              *   extproc('xmlStrsub')                 const xmlChar *
42     d  str                            *   value options(*string)               const xmlChar *
43     d  start                              value like(xmlCint)
44     d  len                                value like(xmlCint)
45
46     d xmlStrchr       pr              *   extproc('xmlStrchr')                 const xmlChar *
47     d  str                            *   value options(*string)               const xmlChar *
48     d  val                                value like(xmlChar)
49
50     d xmlStrstr       pr              *   extproc('xmlStrstr')                 const xmlChar *
51     d  str                            *   value options(*string)               const xmlChar *
52     d  val                            *   value options(*string)               const xmlChar *
53
54     d xmlStrcasestr   pr              *   extproc('xmlStrcasestr')             const xmlChar *
55     d  str                            *   value options(*string)               const xmlChar *
56     d  val                            *   value options(*string)               const xmlChar *
57
58     d xmlStrcmp       pr                  extproc('xmlStrcmp')
59     d                                     like(xmlCint)
60     d  str1                           *   value options(*string)               const xmlChar *
61     d  str2                           *   value options(*string)               const xmlChar *
62
63     d xmlStrncmp      pr                  extproc('xmlStrncmp')
64     d                                     like(xmlCint)
65     d  str1                           *   value options(*string)               const xmlChar *
66     d  str2                           *   value options(*string)               const xmlChar *
67     d  len                                value like(xmlCint)
68
69     d xmlStrcasecmp   pr                  extproc('xmlStrcasecmp')
70     d                                     like(xmlCint)
71     d  str1                           *   value options(*string)               const xmlChar *
72     d  str2                           *   value options(*string)               const xmlChar *
73
74     d xmlStrncasecmp  pr                  extproc('xmlStrncasecmp')
75     d                                     like(xmlCint)
76     d  str1                           *   value options(*string)               const xmlChar *
77     d  str2                           *   value options(*string)               const xmlChar *
78     d  len                                value like(xmlCint)
79
80     d xmlStrEqual     pr                  extproc('xmlStrEqual')
81     d                                     like(xmlCint)
82     d  str1                           *   value options(*string)               const xmlChar *
83     d  str2                           *   value options(*string)               const xmlChar *
84
85     d xmlStrQEqual    pr                  extproc('xmlStrQEqual')
86     d                                     like(xmlCint)
87     d  pref                           *   value options(*string)               const xmlChar *
88     d  name                           *   value options(*string)               const xmlChar *
89     d  stre                           *   value options(*string)               const xmlChar *
90
91     d xmlStrlen       pr                  extproc('xmlStrlen')
92     d                                     like(xmlCint)
93     d  str                            *   value options(*string)               const xmlChar *
94
95     d xmlStrcat       pr              *   extproc('xmlStrcat')                 xmlChar *
96     d  cur                            *   value options(*string)               xmlChar *
97     d  add                            *   value options(*string)               const xmlChar *
98
99     d xmlStrncat      pr              *   extproc('xmlStrncat')                xmlChar *
100     d  cur                            *   value options(*string)               xmlChar *
101     d  add                            *   value options(*string)               const xmlChar *
102     d  len                                value like(xmlCint)
103
104     d xmlStrncatNew   pr              *   extproc('xmlStrncatNew')             xmlChar *
105     d  str1                           *   value options(*string)               const xmlChar *
106     d  str2                           *   value options(*string)               const xmlChar *
107     d  len                                value like(xmlCint)
108
109      * xmlStrPrintf() is a vararg function.
110      * The following prototype supports up to 8 pointer arguments.
111      * Other argument signature can be achieved by defining alternate
112      *   prototypes redirected to the same function.
113
114     d xmlStrPrintf    pr                  extproc('xmlStrPrintf')
115     d                                     like(xmlCint)
116     d  buf                            *   value options(*string)               xmlChar *
117     d  len                                value like(xmlCint)
118     d  msg                            *   value options(*string)               const char *
119     d  arg1                           *   value options(*string: *nopass)
120     d  arg2                           *   value options(*string: *nopass)
121     d  arg3                           *   value options(*string: *nopass)
122     d  arg4                           *   value options(*string: *nopass)
123     d  arg5                           *   value options(*string: *nopass)
124     d  arg6                           *   value options(*string: *nopass)
125     d  arg7                           *   value options(*string: *nopass)
126     d  arg8                           *   value options(*string: *nopass)
127
128     d xmlStrVPrintf   pr                  extproc('xmlStrVPrintf')
129     d                                     like(xmlCint)
130     d  buf                            *   value options(*string)               xmlChar *
131     d  len                                value like(xmlCint)
132     d  msg                            *   value options(*string)               const char *
133     d  ap                                 likeds(xmlVaList)
134
135     d xmlGetUTF8Char  pr                  extproc('xmlGetUTF8Char')
136     d                                     like(xmlCint)
137     d  utf                            *   value options(*string)               const uns. char *
138     d  len                                like(xmlCint)
139
140     d xmlCheckUTF8    pr                  extproc('xmlCheckUTF8')
141     d                                     like(xmlCint)
142     d  utf                            *   value options(*string)               const uns. char *
143
144     d xmlUTF8Strsize  pr                  extproc('xmlUTF8Strsize')
145     d                                     like(xmlCint)
146     d  utf                            *   value options(*string)               const xmlChar *
147     d  len                                value like(xmlCint)
148
149     d xmlUTF8Strndup  pr              *   extproc('xmlUTF8Strndup')            xmlChar *
150     d  utf                            *   value options(*string)               const xmlChar *
151     d  len                                value like(xmlCint)
152
153     d xmlUTF8Strpos   pr              *   extproc('xmlUTF8Strpos')             const xmlChar *
154     d  utf                            *   value options(*string)               const xmlChar *
155     d  pos                                value like(xmlCint)
156
157     d xmlUTF8Strloc   pr                  extproc('xmlUTF8Strloc')
158     d                                     like(xmlCint)
159     d  utf                            *   value options(*string)               const xmlChar *
160     d  utfchar                        *   value options(*string)               const xmlChar *
161
162     d xmlUTF8Strsub   pr              *   extproc('xmlUTF8Strsub')             xmlChar *
163     d  utf                            *   value options(*string)               const xmlChar *
164     d  start                              value like(xmlCint)
165     d  len                                value like(xmlCint)
166
167     d xmlUTF8Strlen   pr                  extproc('xmlUTF8Strlen')
168     d                                     like(xmlCint)
169     d  utf                            *   value options(*string)               const xmlChar *
170
171     d xmlUTF8Size     pr                  extproc('xmlUTF8Size')
172     d                                     like(xmlCint)
173     d  utf                            *   value options(*string)               const xmlChar *
174
175     d xmlUTF8Charcmp  pr                  extproc('xmlUTF8Charcmp')
176     d                                     like(xmlCint)
177     d  utf1                           *   value options(*string)               const xmlChar *
178     d  utf2                           *   value options(*string)               const xmlChar *
179
180      /endif                                                                    XML_STRING_H__
181