[Expat-checkins] expat/doc reference.html,1.29,1.30

Fred L. Drake fdrake@users.sourceforge.net
Wed, 28 Aug 2002 21:54:06 -0700


Update of /cvsroot/expat/expat/doc
In directory usw-pr-cvs1:/tmp/cvs-serv6368/doc

Modified Files:
	reference.html 
Log Message:
Revise the XML_GetFeatureList() function signature so that we maintain the
behavior that all strings returned from Expat are affected by the XML_UNICODE
and XML_UNICODE_WCHAR_T feature-test macros, and ensure that an application
that needs to determine what type of character data is returned can do so
with reasonable ease.


Index: reference.html
===================================================================
RCS file: /cvsroot/expat/expat/doc/reference.html,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- reference.html	26 Aug 2002 20:37:49 -0000	1.29
+++ reference.html	29 Aug 2002 04:54:04 -0000	1.30
@@ -1703,20 +1703,38 @@
 </div>
 
 <pre class="fcndec" id="XML_GetFeatureList">
-const char **
+const XML_Feature *
 XML_GetFeatureList();
 </pre>
+<pre class="signature">
+enum XML_FeatureEnum {
+  XML_FEATURE_END = 0,
+  XML_FEATURE_UNICODE,
+  XML_FEATURE_UNICODE_WCHAR_T,
+  XML_FEATURE_DTD
+};
+
+typedef struct {
+  enum XML_FeatureEnum  feature;
+  XML_Char             *name;
+} XML_Feature;
+</pre>
 <div class="fcndef">
-<p>Returns a list of "feature" identifiers that provide details on how
+<p>Returns a list of "feature" records, providing details on how
 Expat was configured at compile time.  Most applications should not
 need to worry about this, but this information is otherwise not
 available from Expat.  This function allows code that does need to
 check these features to do so at runtime.</p>
 
-<p>The return value is an array of strings, terminated by NULL,
-identifying the feature-test macros Expat was compiled with.  Common
-features which may be found in this list include
-<code>"XML_DTD"</code> and <code>"XML_UNICODE"</code>.</p>
+<p>The return value is an array of <code>XML_Feature</code>,
+terminated by a record with a <code>feature</code> of
+<code>XML_FEATURE_END</code> and <code>name</code> of NULL,
+identifying the feature-test macros Expat was compiled with.  Since
+an application that requires this kind of information needs to
+determine the type of character the <code>name</code> points to,
+records for the <code>XML_UNICODE</code> and
+<code>XML_UNICODE_WCHAR_T</code> features will be located at the
+beginning of the list, if they are present at all.</p>
 </div>
 
 <hr />