diff --git a/Makefile.in b/Makefile.in index 312ce22..1762821 100644 --- a/Makefile.in +++ b/Makefile.in @@ -101,6 +101,7 @@ all: Makefile configure config.h $(TARGETS) clean: $(RM) $(OBJS) $(TARGETS) + $(RM) mxmldoc-static libmxml.a $(RM) *.bck *.bak $(RM) config.cache config.log config.status $(RM) -r autom4te*.cache @@ -330,8 +331,9 @@ mxml.xml: mxmldoc-static mxml.h $(PUBLIBOBJS:.o=.c) valgrind: mxmldoc-static $(RM) valgrind.xml - valgrind --leak-check=yes ./mxmldoc-static valgrind.xml mxml.h \ - $(PUBLIBOBJS:.o=.c) >valgrind.html 2>valgrind.out + valgrind --tool=memcheck --leak-check=yes ./mxmldoc-static \ + valgrind.xml mxml.h $(PUBLIBOBJS:.o=.c) \ + >valgrind.html 2>valgrind.out # diff --git a/doc/advanced.html b/doc/advanced.html index 259455e..79ae5d2 100644 --- a/doc/advanced.html +++ b/doc/advanced.html @@ -300,6 +300,7 @@ allocated custom data for the node and a pointer to a destructor function which will free the custom data when the node is deleted.

+

The save callback receives the node pointer and returns an allocated string containing the custom data value. The following save callback could be used for our ISO date/time type:

@@ -457,6 +458,7 @@ to return all elements or attributes in the index. Passing NULL for both the element name and attribute value is equivalent to calling mxmlIndexEnum.

+

When you are done using the index, delete it using the mxmlIndexDelete() function:

diff --git a/doc/index.html b/doc/index.html deleted file mode 100644 index 4b3f169..0000000 --- a/doc/index.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - Mini-XML Home Page - - - - -

Back to Home Page ]

- -

Mini-XML Home Page

- -

Current Release: v1.3, December 21, 2003
-[ Download Source (.tar.gz 82k) -| Download Linux RPM (.i386.rpm 76k) -| Change Log | Documentation | Rate/Make Comments ]

- -

Introduction

- -

Mini-XML is a small XML parsing library that you can use to -read XML and XML-like data files in your application without -requiring large non-standard libraries. Mini-XML only requires -an ANSI C compatible compiler (GCC works, as do most vendors' -ANSI C compilers) and a "make" program.

- -

Mini-XML provides the following functionality:

- - - -

Mini-XML doesn't do validation or other types of processing -on the data based upon schema files or other sources of -definition information, nor does it support character entities -other than those required by the XML specification. Also, since -Mini-XML does not support the UTF-16 encoding, it is technically -not a conforming XML consumer/client.

- -

Building Mini-XML

- -

Mini-XML comes with an autoconf-based configure script; just -type the following command to get things going:

- -
-./configure
-
- -

The default install prefix is /usr/local, which can be -overridden using the --prefix option:

- -
-./configure --prefix=/foo
-
- -

Other configure options can be found using the --help -option:

- -
-./configure --help
-
- -

Once you have configured the software, type "make" to do the -build and run the test program to verify that things are -working, as follows:

- -
-make
-
- -

Installing Mini-XML

- -

The "install" target will install Mini-XML in the lib and -include directories:

- -
-make install
-
- -

Once you have installed it, use the "-lmxml" option to link -your application against it.

- -

Documentation

- -

The documentation is currently a work in progress. Aside from -the information that follows, the documentation page provides a -handy reference and is automatically generated using Mini-XML. -You can also look at the testmxml.c and mxmldoc.c source files for examples of -using Mini-XML.

- -

The Basics

- -

Mini-XML provides a single header file which you include:

- -
-#include <mxml.h>
-
- -

Nodes are defined by the mxml_node_t -structure; the type member -defines the node type (element, integer, opaque, real, or text) -which determines which value you want to look at in the value -union. New nodes can be created using the mxmlNewElement(), -mxmlNewInteger(), -mxmlNewOpaque(), -mxmlNewReal(), -and mxmlNewText() -functions. Only elements can have child nodes, and the top node -must be an element, usually "?xml".

- -

Each node has pointers for the node above (parent), below (child), -to the left (prev), and to the right (next) of the current -node. If you have an XML file like the following:

- -
-    <?xml version="1.0"?>
-    <data>
-        <node>val1</node>
-        <node>val2</node>
-        <node>val3</node>
-        <group>
-            <node>val4</node>
-            <node>val5</node>
-            <node>val6</node>
-        </group>
-        <node>val7</node>
-        <node>val8</node>
-        <node>val9</node>
-    </data>
-
- -

the node tree returned by mxmlLoadFile() would look -like the following in memory:

- -
-    ?xml
-      |
-    data
-      |
-    node - node - node - group - node - node - node
-      |      |      |      |       |      |      |
-    val1   val2   val3     |     val7   val8   val9
-                           |
-                         node - node - node
-                           |      |      |
-                         val4   val5   val6
-
- -

where "-" is a pointer to the next node and "|" is a pointer -to the first child node.

- -

Once you are done with the XML data, use the mxmlDelete() -function to recursively free the memory that is used for a -particular node or the entire tree:

- -
-mxmlDelete(tree);
-
- -

Loading and Saving XML Files

- -

You load an XML file using the mxmlLoadFile() -function:

- -
-FILE *fp;
-mxml_node_t *tree;
-
-fp = fopen("filename.xml", "r");
-tree = mxmlLoadFile(NULL, fp, MXML_NO_CALLBACK);
-fclose(fp);
-
- -

The third argument specifies a callback function which -returns the value type of the immediate children for a new -element node: MXML_INTEGER, MXML_OPAQUE, -MXML_REAL, or MXML_TEXT. This function is -called after the element and its attributes have been -read, so you can look at the element name, attributes, and -attribute values to determine the proper value type to return. -The default value type is MXML_TEXT if no callback is used.

- -

Similarly, you save an XML file using the mxmlSaveFile() -function:

- -
-FILE *fp;
-mxml_node_t *tree;
-
-fp = fopen("filename.xml", "w");
-mxmlSaveFile(tree, fp, MXML_NO_CALLBACK);
-fclose(fp);
-
- -

Callback functions for saving are used to optionally insert -whitespace before and after elements in the node tree. Your -function will be called up to four times for each element node -with a pointer to the node and a "where" value of -MXML_WS_BEFORE_OPEN, MXML_WS_AFTER_OPEN, -MXML_WS_BEFORE_CLOSE, or MXML_WS_AFTER_CLOSE. -The callback function should return 0 if no whitespace should be -added and the character to insert (space, tab, newline) -otherwise.

- -

The mxmlLoadString(), -mxmlSaveAllocString(), -and mxmlSaveString() -functions load XML node trees from and save XML node trees to -strings:

- -
-char buffer[8192];
-char *ptr;
-mxml_node_t *tree;
-
-...
-tree = mxmlLoadString(NULL, buffer, MXML_NO_CALLBACK);
-
-...
-mxmlSaveString(tree, buffer, sizeof(buffer), MXML_NO_CALLBACK);
-
-...
-ptr = mxmlSaveAllocString(tree, MXML_NO_CALLBACK);
-
- -

Finding and Iterating Nodes

- -

The mxmlWalkPrev() -and mxmlWalkNext()functions -can be used to iterate through the XML node tree:

- -
-mxml_node_t *node = mxmlWalkPrev(current, tree, MXML_DESCEND);
-
-mxml_node_t *node = mxmlWalkNext(current, tree, MXML_DESCEND);
-
- -

In addition, you can find a named element/node using the mxmlFindElement() -function:

- -
-mxml_node_t *node = mxmlFindElement(tree, tree, "name", "attr",
-                                    "value", MXML_DESCEND);
-
- -

The name, attr, and value -arguments can be passed as NULL to act as wildcards, -e.g.:

- -
-/* Find the first "a" element */
-node = mxmlFindElement(tree, tree, "a", NULL, NULL, MXML_DESCEND);
-
-/* Find the first "a" element with "href" attribute */
-node = mxmlFindElement(tree, tree, "a", "href", NULL, MXML_DESCEND);
-
-/* Find the first "a" element with "href" to a URL */
-node = mxmlFindElement(tree, tree, "a", "href",
-                       "http://www.easysw.com/~mike/mxml/", MXML_DESCEND);
-
-/* Find the first element with a "src" attribute*/
-node = mxmlFindElement(tree, tree, NULL, "src", NULL, MXML_DESCEND);
-
-/* Find the first element with a "src" = "foo.jpg" */
-node = mxmlFindElement(tree, tree, NULL, "src", "foo.jpg", MXML_DESCEND);
-
- -

You can also iterate with the same function:

- -
-mxml_node_t *node;
-
-for (node = mxmlFindElement(tree, tree, "name", NULL, NULL, MXML_DESCEND);
-     node != NULL;
-     node = mxmlFindElement(node, tree, "name", NULL, NULL, MXML_DESCEND))
-{
-  ... do something ...
-}
-
- -

The MXML_DESCEND argument can actually be one of three constants:

- - - -

Getting Help and Reporting Problems

- -

You can email me at "mxml at easysw dot com" to -report problems and/or ask for help. Just don't expect an -instant response, as I get a lot of email...

- -

Legal Stuff

- -

The Mini-XML library is Copyright 2003-2004 by Michael Sweet.

- -

This library is free software; you can redistribute it -and/or modify it under the terms of the GNU Library General -Public License as published by the Free Software Foundation; -either version 2 of the License, or (at your option) any -later version.

- -

This library is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied -warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU Library General Public License for -more details.

- -

You should have received a copy of the GNU Library General -Public License along with this library; if not, write to the -Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA -02139, USA.

- - - diff --git a/doc/intro.html b/doc/intro.html index 2e5b3cc..c3fc6d7 100644 --- a/doc/intro.html +++ b/doc/intro.html @@ -1,7 +1,7 @@ - Mini-XML Programmers Manual, Version 2.1 - + Mini-XML Programmers Manual, Version 2.2 + @@ -9,7 +9,7 @@

Introduction

-

This programmers manual describes Mini-XML version 2.1, a +

This programmers manual describes Mini-XML version 2.2, a small XML parsing library that you can use to read and write XML and XML-like data files in your application without requiring large non-standard libraries. Mini-XML only requires an ANSI C @@ -51,7 +51,7 @@ other than those required by the XML specification.

Legal Stuff

-

The Mini-XML library is copyright 2003-2004 by Michael +

The Mini-XML library is copyright 2003-2005 by Michael Sweet.

This library is free software; you can redistribute it and/or @@ -94,7 +94,7 @@ and removed libxml2.

Thanks to lots of feedback and support from various developers, Mini-XML has evolved since then to provide a more -complete XML implementation and now stands at a whopping 2,713 +complete XML implementation and now stands at a whopping 2,974 lines of code, compared to 103,893 lines of code for libxml2 version 2.6.9. Aside from Gimp-Print, Mini-XML is used for the following projects/software applications:

@@ -104,7 +104,7 @@ following projects/software applications:

  • Common UNIX Printing System
  • -
  • CUPS Driver +
  • CUPS Driver Development Kit
  • ESP Print diff --git a/doc/license.html b/doc/license.html index 873b9f9..8585ed5 100644 --- a/doc/license.html +++ b/doc/license.html @@ -508,5 +508,54 @@ POSSIBILITY OF SUCH DAMAGES.

    END OF TERMS AND CONDITIONS

    +

    How to Apply These Terms to Your New Libraries

    + +

    If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + +

    To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + +

    +one line to give the library's name and an idea of what it does.
    +Copyright (C) year  name of author
    +
    +This library is free software; you can redistribute it and/or
    +modify it under the terms of the GNU Lesser General Public
    +License as published by the Free Software Foundation; either
    +version 2.1 of the License, or (at your option) any later version.
    +
    +This library is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +Lesser General Public License for more details.
    +
    +You should have received a copy of the GNU Lesser General Public
    +License along with this library; if not, write to the Free Software
    +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
    + +

    Also add information on how to contact you by electronic and paper mail. + +

    You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + +

    +Yoyodyne, Inc., hereby disclaims all copyright interest in
    +the library `Frob' (a library for tweaking knobs) written
    +by James Random Hacker.
    +
    +signature of Ty Coon, 1 April 1990
    +Ty Coon, President of Vice
    +
    + +

    That's all there is to it! + diff --git a/doc/makedocs.sh b/doc/makedocs.sh index d07db76..42cb82b 100755 --- a/doc/makedocs.sh +++ b/doc/makedocs.sh @@ -1,10 +1,10 @@ #!/bin/sh # -# "$Id: makedocs.sh,v 1.2 2004/05/21 02:06:04 mike Exp $" +# "$Id$" # # Script to make documentation... # -# Copyright 2003-2004 by Michael Sweet. +# Copyright 2003-2005 by Michael Sweet. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -17,11 +17,11 @@ # GNU General Public License for more details. # -htmldoc --verbose --batch mxml.book -f mxml.pdf +htmldoc --verbose --batch mxml.book --no-embedfonts -f mxml.pdf htmldoc --verbose --batch mxml.book -f mxml.html -htmldoc --verbose --batch mxml.book -f mxml.ps +htmldoc --verbose --batch mxml.book --no-embedfonts -f mxml.ps rm -f mxml.ps.gz gzip -v9 mxml.ps @@ -30,5 +30,5 @@ mkdir mxml.d htmldoc --verbose --batch mxml.book -t htmlsep -d mxml.d # -# End of "$Id: makedocs.sh,v 1.2 2004/05/21 02:06:04 mike Exp $". +# End of "$Id$". # diff --git a/doc/mxml.html b/doc/mxml.html index 1e47204..23ec500 100644 --- a/doc/mxml.html +++ b/doc/mxml.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + -

    Mini-XML Programmers Manual, Version 2.1
    -

    Mini-XML Programmers Manual, Version 2.1


    +
    Mini-XML Programmers Manual, Version 2.2
    +

    Mini-XML Programmers Manual, Version 2.2


    Michael Sweet
    -Copyright 2003-2004
    +Copyright 2003-2005

    Table of Contents

    @@ -78,21 +78,24 @@ Copyright 2003-2004
  • XML Schema
  • A - GNU Library General Public License -
    -
    B - Release Notes +B - Release Notes + C - Library Reference

    Introduction

    -

    This programmers manual describes Mini-XML version 2.1, a small XML +

    This programmers manual describes Mini-XML version 2.2, a small XML parsing library that you can use to read and write XML and XML-like data files in your application without requiring large non-standard libraries. Mini-XML only requires an ANSI C compatible compiler (GCC @@ -211,7 +205,7 @@ Copyright 2003-2004

    Legal Stuff

    -

    The Mini-XML library is copyright 2003-2004 by Michael Sweet.

    +

    The Mini-XML library is copyright 2003-2005 by Michael Sweet.

    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either @@ -239,14 +233,13 @@ libxml2 library with something substantially smaller and libxml2.

    Thanks to lots of feedback and support from various developers, Mini-XML has evolved since then to provide a more complete XML - implementation and now stands at a whopping 2,713 lines of code, + implementation and now stands at a whopping 2,974 lines of code, compared to 103,893 lines of code for libxml2 version 2.6.9. Aside from Gimp-Print, Mini-XML is used for the following projects/software applications:

    @@ -923,6 +916,8 @@ MXML_WS_BEFORE_CLOSE, or MXML_WS_AFTER_CLOSE. The callback contain a void pointer to the allocated custom data for the node and a pointer to a destructor function which will free the custom data when the node is deleted.

    + +

    The save callback receives the node pointer and returns an allocated string containing the custom data value. The following save callback could be used for our ISO date/time type:

    @@ -1044,6 +1039,8 @@ mxmlIndexEnum(), mxmlIndexFind() return all elements or attributes in the index. Passing NULL for both the element name and attribute value is equivalent to calling mxmlIndexEnum.

    + +

    When you are done using the index, delete it using the mxmlIndexDelete() function:

    @@ -1182,8 +1179,8 @@ mxmldoc to generate correct documentation for the code. Single line
     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <xsd:annotation>
         <xsd:documentation xml:lang="en">
    -      Mini-XML 2.0 documentation schema for mxmldoc output.
    -      Copyright 2003-2004 by Michael Sweet.
    +      Mini-XML 2.2 documentation schema for mxmldoc output.
    +      Copyright 2003-2005 by Michael Sweet.
     
           This program is free software; you can redistribute it and/or
           modify it under the terms of the GNU Library General Public
    @@ -1783,9 +1780,66 @@ mxmldoc to generate correct documentation for the code. Single line
      SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
      DAMAGES.

    END OF TERMS AND CONDITIONS

    +

    How to Apply These Terms to Your New Libraries

    +

    If you develop a new library, and you want it to be of the greatest + possible use to the public, we recommend making it free software that + everyone can redistribute and change. You can do so by permitting + redistribution under these terms (or, alternatively, under the terms of + the ordinary General Public License).

    +

    To apply these terms, attach the following notices to the library. It + is safest to attach them to the start of each source file to most + effectively convey the exclusion of warranty; and each file should have + at least the "copyright" line and a pointer to where the full notice is + found.

    +
    +one line to give the library's name and an idea of what it does.
    +Copyright (C) year  name of author
    +
    +This library is free software; you can redistribute it and/or
    +modify it under the terms of the GNU Lesser General Public
    +License as published by the Free Software Foundation; either
    +version 2.1 of the License, or (at your option) any later version.
    +
    +This library is distributed in the hope that it will be useful,
    +but WITHOUT ANY WARRANTY; without even the implied warranty of
    +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +Lesser General Public License for more details.
    +
    +You should have received a copy of the GNU Lesser General Public
    +License along with this library; if not, write to the Free Software
    +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
    +

    Also add information on how to contact you by electronic and paper + mail.

    +

    You should also get your employer (if you work as a programmer) or + your school, if any, to sign a "copyright disclaimer" for the library, + if necessary. Here is a sample; alter the names:

    +
    +Yoyodyne, Inc., hereby disclaims all copyright interest in
    +the library `Frob' (a library for tweaking knobs) written
    +by James Random Hacker.
    +
    +signature of Ty Coon, 1 April 1990
    +Ty Coon, President of Vice
    +
    +

    That's all there is to it!


    B - Release Notes

    -

    Changes in Mini-XML 2.1

    +

    Changes in Mini-XML 2.2

    +
      +
    • Added shared library support (STR #17)
    • +
    • mxmlLoad*() now returns an error when an XML stream contains illegal + control characters (STR #10)
    • +
    • mxmlLoad*() now returns an error when an element contains two + attributes with the same name in conformance with the XML spec (STR + #16)
    • +
    • Added support for CDATA (STR #14, STR #15)
    • +
    • Updated comment and processing instruction handling - no entity + support per XML specification.
    • +
    • Added checking for invalid comment termination ("--->" is not + allowed)
    • +
    +

    Changes in Mini-XML 2.1

    • Added support for custom data nodes (STR #6)
    • Now treat UTF-8 sequences which are longer than necessary as an @@ -1796,7 +1850,7 @@ mxmldoc to generate correct documentation for the code. Single line
    • Added mxmlLoadFd() and mxmlSaveFd() functions.
    • Fixed multi-word UTF-16 handling.
    -

    Changes in Mini-XML 2.0

    +

    Changes in Mini-XML 2.0

    • New programmers manual.
    • Added Visual C++ project files for Microsoft Windows users.
    • @@ -1829,7 +1883,7 @@ mxmldoc to generate correct documentation for the code. Single line destination path and install path. This caused problems when building and installing with MingW.
    -

    Changes in Mini-XML 1.3

    +

    Changes in Mini-XML 1.3

    • Fixes for mxmldoc.
    • Added support for reading standard HTML entity names.
    • @@ -1845,7 +1899,7 @@ mxmldoc to generate correct documentation for the code. Single line
    • The load and save functions now properly handle quoted element and attribute name strings properly, e.g. for !DOCTYPE declarations.
    -

    Changes in Mini-XML 1.2

    +

    Changes in Mini-XML 1.2

    • Added new "set" methods to set the value of a node.
    • Added new formatted text methods mxmlNewTextf() and mxmlSetTextf() @@ -1858,13 +1912,13 @@ mxmldoc to generate correct documentation for the code. Single line
    • Added --with/without-snprintf configure option to control the snprintf() and vsnprintf() function checks.
    -

    Changes in Mini-XML 1.1.2

    +

    Changes in Mini-XML 1.1.2

    • The mxml(3) man page wasn't updated for the string functions.
    • mxmlSaveString() returned the wrong number of characters.
    • mxml_add_char() updated the buffer pointer in the wrong place.
    -

    Changes in Mini-XML 1.1.1

    +

    Changes in Mini-XML 1.1.1

    • The private mxml_add_ch() function did not update the start-of-buffer pointer which could cause a crash when using @@ -1875,7 +1929,7 @@ mxmldoc to generate correct documentation for the code. Single line
    • Added a mxmlSaveAllocString() convenience function for saving an XML node tree to an allocated string.
    -

    Changes in Mini-XML 1.1

    +

    Changes in Mini-XML 1.1

    • The mxmlLoadFile() function now uses dynamically allocated string buffers for element names, attribute names, and attribute values. @@ -1887,7 +1941,7 @@ mxmldoc to generate correct documentation for the code. Single line
    • Add emulation of strdup() if the local platform does not provide the function.
    -

    Changes in Mini-XML 1.0

    +

    Changes in Mini-XML 1.0

    • The mxmldoc program now handles function arguments, structures, unions, enumerations, classes, and typedefs properly.
    • @@ -1895,7 +1949,7 @@ mxmldoc to generate correct documentation for the code. Single line code.
    • Added man pages and packaging files.
    -

    Changes in Mini-XML 0.93

    +

    Changes in Mini-XML 0.93

    • New mxmldoc example program that is also used to create and update code documentation using XML and produce HTML reference pages.
    • @@ -1920,15 +1974,15 @@ mxmldoc to generate correct documentation for the code. Single line
    • mxmlSaveFile() now supports a whitespace callback to provide more human-readable XML output under program control.
    -

    Changes in Mini-XML 0.92

    +

    Changes in Mini-XML 0.92

    • mxmlSaveFile() didn't return a value on success.
    -

    Changes in Mini-XML 0.91

    +

    Changes in Mini-XML 0.91

    • mxmlWalkNext() would go into an infinite loop.
    -

    Changes in Mini-XML 0.9

    +

    Changes in Mini-XML 0.9

    • Initial public release.
    @@ -1941,7 +1995,6 @@ mxmldoc to generate correct documentation for the code. Single line
  • Structures
  • Types
  • Unions
  • -
  • Variables
  • @@ -3154,7 +3207,6 @@ mxmlWalkPrev(
    - -

    mxml_fdbuf_t

    -
    -

    Description

    -

    File descriptor buffer (@private)

    -

    Definition

    -
    -typedef struct mxml_fdbuf_s mxml_fdbuf_t;
    -
    -

    mxml_index_t


    @@ -3480,39 +3496,5 @@ union mxml_value_u realReal number textText fragment - - -

    Variables

    - - - -

    mxml_custom_load_cb

    -
    -

    Definition

    -
    -static mxml_custom_load_cb_t mxml_custom_load_cb = NULL;
    -
    - - -

    mxml_custom_save_cb

    -
    -

    Description

    -

    Local functions...

    -

    Definition

    -
    -static mxml_custom_save_cb_t mxml_custom_save_cb = NULL;
    -
    - - -

    num_callbacks

    -
    -

    Definition

    -
    -static int num_callbacks = 1;
    -
    diff --git a/doc/mxml.man b/doc/mxml.man index 2057d61..ade7b6c 100644 --- a/doc/mxml.man +++ b/doc/mxml.man @@ -1,9 +1,9 @@ .\" -.\" "$Id: mxml.man,v 1.1 2004/05/01 23:41:51 mike Exp $" +.\" "$Id$" .\" .\" mxml man page for mini-XML, a small XML-like file parsing library. .\" -.\" Copyright 2003-2004 by Michael Sweet. +.\" Copyright 2003-2005 by Michael Sweet. .\" .\" This program is free software; you can redistribute it and/or .\" modify it under the terms of the GNU Library General Public @@ -15,7 +15,7 @@ .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" -.TH mxml 3 "mini-XML" "1 May 2004" "Michael Sweet" +.TH mxml 3 "mini-XML" "25 February 2005" "Michael Sweet" .SH NAME mxml \- mini-xml library .SH INCLUDE FILE @@ -175,7 +175,7 @@ is used for a particular node or the entire tree: .SH SEE ALSO mxmldoc(1), Mini-XML Programmers Manual, http://www.easysw.com/~mike/mxml/ .SH COPYRIGHT -Copyright 2003-2004 by Michael Sweet. +Copyright 2003-2005 by Michael Sweet. .\" -.\" End of "$Id: mxml.man,v 1.1 2004/05/01 23:41:51 mike Exp $". +.\" End of "$Id$". .\" diff --git a/doc/mxmldoc.html b/doc/mxmldoc.html index 7213ca3..71fe78d 100644 --- a/doc/mxmldoc.html +++ b/doc/mxmldoc.html @@ -161,8 +161,8 @@ formats.

    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:annotation> <xsd:documentation xml:lang="en"> - Mini-XML 2.0 documentation schema for mxmldoc output. - Copyright 2003-2004 by Michael Sweet. + Mini-XML 2.2 documentation schema for mxmldoc output. + Copyright 2003-2005 by Michael Sweet. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/doc/mxmldoc.man b/doc/mxmldoc.man index 3dbcc90..482d0a6 100644 --- a/doc/mxmldoc.man +++ b/doc/mxmldoc.man @@ -1,9 +1,9 @@ .\" -.\" "$Id: mxmldoc.man,v 1.1 2004/05/01 23:41:51 mike Exp $" +.\" "$Id$" .\" .\" mxmldoc man page for mini-XML, a small XML-like file parsing library. .\" -.\" Copyright 2003-2004 by Michael Sweet. +.\" Copyright 2003-2005 by Michael Sweet. .\" .\" This program is free software; you can redistribute it and/or .\" modify it under the terms of the GNU Library General Public @@ -15,7 +15,7 @@ .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" -.TH mxmldoc 1 "mini-XML" "1 May 2004" "Michael Sweet" +.TH mxmldoc 1 "mini-XML" "25 February 2005" "Michael Sweet" .SH NAME mxmldoc \- mini-xml documentation generator .SH SYNOPSIS @@ -42,7 +42,7 @@ Configuration Management Plan which is available at .SH SEE ALSO mxml(3), Mini-XML Programmers Manual, http://www.easysw.com/~mike/mxml/ .SH COPYRIGHT -Copyright 2003-2004 by Michael Sweet. +Copyright 2003-2005 by Michael Sweet. .\" -.\" End of "$Id: mxmldoc.man,v 1.1 2004/05/01 23:41:51 mike Exp $". +.\" End of "$Id$". .\" diff --git a/doc/mxmldoc.xsd b/doc/mxmldoc.xsd index 7a3df87..b70e91f 100644 --- a/doc/mxmldoc.xsd +++ b/doc/mxmldoc.xsd @@ -1,8 +1,8 @@ - Mini-XML 2.0 documentation schema for mxmldoc output. - Copyright 2003-2004 by Michael Sweet. + Mini-XML 2.2 documentation schema for mxmldoc output. + Copyright 2003-2005 by Michael Sweet. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/doc/reference.html b/doc/reference.html index 1c4ce93..7f4abde 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -17,7 +17,6 @@
  • Structures
  • Types
  • Unions
  • -
  • Variables
  • Enumerations

    @@ -1142,7 +1141,6 @@ mxmlWalkPrev(
    • mxml_attr_s
    • mxml_custom_s
    • -
    • mxml_fdbuf_s
    • mxml_index_s
    • mxml_node_s
    • mxml_text_s
    • @@ -1187,28 +1185,6 @@ struct mxml_custom_s dataPointer to (allocated) custom data

      -

      mxml_fdbuf_s

      -
      -

      Description

      -

      File descriptor buffer (@private)

      -

      Definition

      -
      -struct mxml_fdbuf_s
      -{
      -  end buffer[8192];
      -  unsigned char * current;
      -  int fd;
      -};
      -
      -

      Members

      -

      - - - - - -
      NameDescription
      buffer[8192]Character buffer
      currentCurrent position in buffer
      fdFile descriptor

      -

      mxml_index_s


      Description

      @@ -1312,7 +1288,6 @@ struct mxml_value_s
    • mxml_attr_t
    • mxml_custom_t
    • mxml_element_t
    • -
    • mxml_fdbuf_t
    • mxml_index_t
    • mxml_node_t
    • mxml_text_t
    • @@ -1347,15 +1322,6 @@ typedef struct mxml_custom_s mxml_custom_t; typedef struct mxml_value_s mxml_element_t; -

      mxml_fdbuf_t

      -
      -

      Description

      -

      File descriptor buffer (@private)

      -

      Definition

      -
      -typedef struct mxml_fdbuf_s mxml_fdbuf_t;
      -
      -

      mxml_index_t


      Description

      @@ -1433,32 +1399,5 @@ union mxml_value_u realReal number textText fragment

      - -

      Variables

      - - -

      mxml_custom_load_cb

      -

      Definition

      -
      -static mxml_custom_load_cb_t mxml_custom_load_cb = NULL;
      -
      - -

      mxml_custom_save_cb

      -

      Description

      -

      Local functions...

      -

      Definition

      -
      -static mxml_custom_save_cb_t mxml_custom_save_cb = NULL;
      -
      - -

      num_callbacks

      -

      Definition

      -
      -static int num_callbacks = 1;
      -
      diff --git a/doc/relnotes.html b/doc/relnotes.html index d4d33c3..c88a8ab 100644 --- a/doc/relnotes.html +++ b/doc/relnotes.html @@ -3,6 +3,29 @@

      B - Release Notes

      +

      Changes in Mini-XML 2.2

      + +
        + +
      • Added shared library support (STR #17)
      • + +
      • mxmlLoad*() now returns an error when an XML stream + contains illegal control characters (STR #10)
      • + +
      • mxmlLoad*() now returns an error when an element + contains two attributes with the same name in + conformance with the XML spec (STR #16)
      • + +
      • Added support for CDATA (STR #14, STR #15)
      • + +
      • Updated comment and processing instruction handling - + no entity support per XML specification.
      • + +
      • Added checking for invalid comment termination ("--->" + is not allowed)
      • + +
      +

      Changes in Mini-XML 2.1

        diff --git a/mxml-file.c b/mxml-file.c index a89f474..7af9e53 100644 --- a/mxml-file.c +++ b/mxml-file.c @@ -74,7 +74,7 @@ /* - * File descriptor buffer... + * Structures... */ typedef struct mxml_fdbuf_s /**** File descriptor buffer (@private) ****/ diff --git a/mxml.xml b/mxml.xml index 064df62..0ff03e9 100644 --- a/mxml.xml +++ b/mxml.xml @@ -826,9 +826,6 @@ the walk to the node's children. struct mxml_attr_s An XML element attribute value. - - static mxml_custom_load_cb_t - An XML custom value. @@ -836,10 +833,6 @@ the walk to the node's children. Pointer to (allocated) custom data - - static mxml_custom_save_cb_t - Local functions... - struct mxml_custom_s An XML custom value. @@ -848,25 +841,6 @@ the walk to the node's children. struct mxml_value_s An XML element value. - - File descriptor buffer (@private) - - end - Character buffer - - - unsigned char * - Current position in buffer - - - int - File descriptor - - - - struct mxml_fdbuf_s - File descriptor buffer (@private) - An XML node index. @@ -1015,7 +989,4 @@ the walk to the node's children. Text fragment - - static int - diff --git a/mxmldoc.c b/mxmldoc.c index 4dcfead..8879dab 100644 --- a/mxmldoc.c +++ b/mxmldoc.c @@ -628,6 +628,27 @@ scan_file(const char *filename, /* I - Filename */ fprintf(stderr, " scope = %s\n", scope ? scope : "(null)"); #endif /* DEBUG */ + if (comment->last_child && + strstr(comment->last_child->value.text.string, "@private")) + { + mxmlDelete(type); + type = NULL; + + if (typedefnode) + { + mxmlDelete(typedefnode); + typedefnode = NULL; + } + + mxmlDelete(structclass); + structclass = NULL; + + braces ++; + function = NULL; + variable = NULL; + break; + } + if (type->child->next) { mxmlElementSetAttr(structclass, "name", @@ -1492,6 +1513,19 @@ scan_file(const char *filename, /* I - Filename */ * Variable definition... */ + if (type->child && + !strcmp(type->child->value.text.string, "static") && + !strcmp(tree->value.element.name, "mxmldoc")) + { + /* + * Remove static functions... + */ + + mxmlDelete(type); + type = NULL; + break; + } + mxmlNewText(type, type->child != NULL && type->last_child->value.text.string[0] != '(' && type->last_child->value.text.string[0] != '*', diff --git a/www/articles.php b/www/articles.php index ee51bd9..e333d43 100644 --- a/www/articles.php +++ b/www/articles.php @@ -1,6 +1,6 @@ diff --git a/www/data/software.md5 b/www/data/software.md5 index d813497..a6ce793 100644 --- a/www/data/software.md5 +++ b/www/data/software.md5 @@ -1,3 +1,5 @@ + 2.2 mxml/2.2/mxml-2.2-1.i386.rpm + 2.2 mxml/2.2/mxml-2.2.tar.gz e30ff88b15f74964e20d80c6577a1cb9 2.1 mxml/2.1/mxml-2.1-1.i386.rpm 35f829a907c0319f83a3661591788ed3 2.1 mxml/2.1/mxml-2.1.tar.gz 2d010aa0cfc1058aa48b3c03bc3781ec 2.0 mxml/2.0/mxml-2.0-1.i386.rpm diff --git a/www/docfiles/1BuildingInstallingandPackagingMiniXML.html b/www/docfiles/1BuildingInstallingandPackagingMiniXML.html index a9db10a..1e74a09 100644 --- a/www/docfiles/1BuildingInstallingandPackagingMiniXML.html +++ b/www/docfiles/1BuildingInstallingandPackagingMiniXML.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/2GettingStartedwithMiniXML.html b/www/docfiles/2GettingStartedwithMiniXML.html index 3702534..581bfac 100644 --- a/www/docfiles/2GettingStartedwithMiniXML.html +++ b/www/docfiles/2GettingStartedwithMiniXML.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/3MoreMiniXMLProgrammingTechniques.html b/www/docfiles/3MoreMiniXMLProgrammingTechniques.html index 7ae4587..1b96a0b 100644 --- a/www/docfiles/3MoreMiniXMLProgrammingTechniques.html +++ b/www/docfiles/3MoreMiniXMLProgrammingTechniques.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/4UsingthemxmldocUtility.html b/www/docfiles/4UsingthemxmldocUtility.html index a428c81..d0c6690 100644 --- a/www/docfiles/4UsingthemxmldocUtility.html +++ b/www/docfiles/4UsingthemxmldocUtility.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/AGNULibraryGeneralPublicLicense.html b/www/docfiles/AGNULibraryGeneralPublicLicense.html index da978dd..3330a09 100644 --- a/www/docfiles/AGNULibraryGeneralPublicLicense.html +++ b/www/docfiles/AGNULibraryGeneralPublicLicense.html @@ -1,14 +1,14 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + - + -
        Mini-XML Programmers Manual, Version 2.1
        -

        Mini-XML Programmers Manual, Version 2.1


        +
        Mini-XML Programmers Manual, Version 2.2
        +

        Mini-XML Programmers Manual, Version 2.2


        Michael Sweet
        -Copyright 2003-2004
        +Copyright 2003-2005
        Table of Contents

        diff --git a/www/docfiles/mxmlAdd.html b/www/docfiles/mxmlAdd.html index d02ee4e..ffa6ef5 100644 --- a/www/docfiles/mxmlAdd.html +++ b/www/docfiles/mxmlAdd.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlDelete.html b/www/docfiles/mxmlDelete.html index 1bd6118..47c41fb 100644 --- a/www/docfiles/mxmlDelete.html +++ b/www/docfiles/mxmlDelete.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlElementGetAttr.html b/www/docfiles/mxmlElementGetAttr.html index 57c9a3c..6730878 100644 --- a/www/docfiles/mxmlElementGetAttr.html +++ b/www/docfiles/mxmlElementGetAttr.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlElementSetAttr.html b/www/docfiles/mxmlElementSetAttr.html index 97e21c4..f39823c 100644 --- a/www/docfiles/mxmlElementSetAttr.html +++ b/www/docfiles/mxmlElementSetAttr.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlEntityAddCallback.html b/www/docfiles/mxmlEntityAddCallback.html index 0c7f0fe..4877522 100644 --- a/www/docfiles/mxmlEntityAddCallback.html +++ b/www/docfiles/mxmlEntityAddCallback.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlEntityGetName.html b/www/docfiles/mxmlEntityGetName.html index ab2f208..9f3dd16 100644 --- a/www/docfiles/mxmlEntityGetName.html +++ b/www/docfiles/mxmlEntityGetName.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlEntityGetValue.html b/www/docfiles/mxmlEntityGetValue.html index 0b9ded7..25bf5b4 100644 --- a/www/docfiles/mxmlEntityGetValue.html +++ b/www/docfiles/mxmlEntityGetValue.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlEntityRemoveCallback.html b/www/docfiles/mxmlEntityRemoveCallback.html index ec71e7f..1fab64c 100644 --- a/www/docfiles/mxmlEntityRemoveCallback.html +++ b/www/docfiles/mxmlEntityRemoveCallback.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlFindElement.html b/www/docfiles/mxmlFindElement.html index bdb0a73..679dfcf 100644 --- a/www/docfiles/mxmlFindElement.html +++ b/www/docfiles/mxmlFindElement.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlIndexDelete.html b/www/docfiles/mxmlIndexDelete.html index 9f21e3b..3c4d7a9 100644 --- a/www/docfiles/mxmlIndexDelete.html +++ b/www/docfiles/mxmlIndexDelete.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlIndexEnum.html b/www/docfiles/mxmlIndexEnum.html index 7cff576..7c052f4 100644 --- a/www/docfiles/mxmlIndexEnum.html +++ b/www/docfiles/mxmlIndexEnum.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlIndexFind.html b/www/docfiles/mxmlIndexFind.html index 9ba77e3..ede52f7 100644 --- a/www/docfiles/mxmlIndexFind.html +++ b/www/docfiles/mxmlIndexFind.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlIndexNew.html b/www/docfiles/mxmlIndexNew.html index 0034f42..fdd5ab3 100644 --- a/www/docfiles/mxmlIndexNew.html +++ b/www/docfiles/mxmlIndexNew.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlIndexReset.html b/www/docfiles/mxmlIndexReset.html index b10e994..a3de9f5 100644 --- a/www/docfiles/mxmlIndexReset.html +++ b/www/docfiles/mxmlIndexReset.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlLoadFd.html b/www/docfiles/mxmlLoadFd.html index 62834d0..942e752 100644 --- a/www/docfiles/mxmlLoadFd.html +++ b/www/docfiles/mxmlLoadFd.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlLoadFile.html b/www/docfiles/mxmlLoadFile.html index 8779f85..69a12e5 100644 --- a/www/docfiles/mxmlLoadFile.html +++ b/www/docfiles/mxmlLoadFile.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlLoadString.html b/www/docfiles/mxmlLoadString.html index 1fa1df7..bda7623 100644 --- a/www/docfiles/mxmlLoadString.html +++ b/www/docfiles/mxmlLoadString.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlNewCustom.html b/www/docfiles/mxmlNewCustom.html index ba6ae67..8d8e03b 100644 --- a/www/docfiles/mxmlNewCustom.html +++ b/www/docfiles/mxmlNewCustom.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlNewElement.html b/www/docfiles/mxmlNewElement.html index 1aed180..b9688bb 100644 --- a/www/docfiles/mxmlNewElement.html +++ b/www/docfiles/mxmlNewElement.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlNewInteger.html b/www/docfiles/mxmlNewInteger.html index 334a675..3be33e6 100644 --- a/www/docfiles/mxmlNewInteger.html +++ b/www/docfiles/mxmlNewInteger.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlNewOpaque.html b/www/docfiles/mxmlNewOpaque.html index 1f6e6ec..96fd097 100644 --- a/www/docfiles/mxmlNewOpaque.html +++ b/www/docfiles/mxmlNewOpaque.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlNewReal.html b/www/docfiles/mxmlNewReal.html index e80615f..8111ffc 100644 --- a/www/docfiles/mxmlNewReal.html +++ b/www/docfiles/mxmlNewReal.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlNewText.html b/www/docfiles/mxmlNewText.html index a310e4d..ae09cf6 100644 --- a/www/docfiles/mxmlNewText.html +++ b/www/docfiles/mxmlNewText.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlNewTextf.html b/www/docfiles/mxmlNewTextf.html index 49a3942..872ba9c 100644 --- a/www/docfiles/mxmlNewTextf.html +++ b/www/docfiles/mxmlNewTextf.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlRemove.html b/www/docfiles/mxmlRemove.html index d7392d3..5a03112 100644 --- a/www/docfiles/mxmlRemove.html +++ b/www/docfiles/mxmlRemove.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSaveAllocString.html b/www/docfiles/mxmlSaveAllocString.html index 4316ae1..d193de2 100644 --- a/www/docfiles/mxmlSaveAllocString.html +++ b/www/docfiles/mxmlSaveAllocString.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSaveFd.html b/www/docfiles/mxmlSaveFd.html index a29bdf9..427980e 100644 --- a/www/docfiles/mxmlSaveFd.html +++ b/www/docfiles/mxmlSaveFd.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSaveFile.html b/www/docfiles/mxmlSaveFile.html index 94e1699..3cbe531 100644 --- a/www/docfiles/mxmlSaveFile.html +++ b/www/docfiles/mxmlSaveFile.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSaveString.html b/www/docfiles/mxmlSaveString.html index 33d6f03..fae51b4 100644 --- a/www/docfiles/mxmlSaveString.html +++ b/www/docfiles/mxmlSaveString.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSetCustom.html b/www/docfiles/mxmlSetCustom.html index f58c334..54ad667 100644 --- a/www/docfiles/mxmlSetCustom.html +++ b/www/docfiles/mxmlSetCustom.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSetCustomHandlers.html b/www/docfiles/mxmlSetCustomHandlers.html index 21885d8..450a4b8 100644 --- a/www/docfiles/mxmlSetCustomHandlers.html +++ b/www/docfiles/mxmlSetCustomHandlers.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSetElement.html b/www/docfiles/mxmlSetElement.html index b436f86..d584ebb 100644 --- a/www/docfiles/mxmlSetElement.html +++ b/www/docfiles/mxmlSetElement.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSetErrorCallback.html b/www/docfiles/mxmlSetErrorCallback.html index fd5b44b..85468be 100644 --- a/www/docfiles/mxmlSetErrorCallback.html +++ b/www/docfiles/mxmlSetErrorCallback.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSetInteger.html b/www/docfiles/mxmlSetInteger.html index 8bca6fd..5d119f9 100644 --- a/www/docfiles/mxmlSetInteger.html +++ b/www/docfiles/mxmlSetInteger.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSetOpaque.html b/www/docfiles/mxmlSetOpaque.html index 29d445b..cbafe97 100644 --- a/www/docfiles/mxmlSetOpaque.html +++ b/www/docfiles/mxmlSetOpaque.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSetReal.html b/www/docfiles/mxmlSetReal.html index 35d3d4c..373d876 100644 --- a/www/docfiles/mxmlSetReal.html +++ b/www/docfiles/mxmlSetReal.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSetText.html b/www/docfiles/mxmlSetText.html index 7d27582..d32bb0f 100644 --- a/www/docfiles/mxmlSetText.html +++ b/www/docfiles/mxmlSetText.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlSetTextf.html b/www/docfiles/mxmlSetTextf.html index 2720776..146422b 100644 --- a/www/docfiles/mxmlSetTextf.html +++ b/www/docfiles/mxmlSetTextf.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlWalkNext.html b/www/docfiles/mxmlWalkNext.html index 79d6252..17adcd9 100644 --- a/www/docfiles/mxmlWalkNext.html +++ b/www/docfiles/mxmlWalkNext.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlWalkPrev.html b/www/docfiles/mxmlWalkPrev.html index a21e42a..7cf5081 100644 --- a/www/docfiles/mxmlWalkPrev.html +++ b/www/docfiles/mxmlWalkPrev.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlattrs.html b/www/docfiles/mxmlattrs.html index 11a9b85..421331e 100644 --- a/www/docfiles/mxmlattrs.html +++ b/www/docfiles/mxmlattrs.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlattrt.html b/www/docfiles/mxmlattrt.html index 44a5b43..090fae7 100644 --- a/www/docfiles/mxmlattrt.html +++ b/www/docfiles/mxmlattrt.html @@ -1,9 +1,9 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + diff --git a/www/docfiles/mxmlcustoms.html b/www/docfiles/mxmlcustoms.html index 151c0d0..c2a8c68 100644 --- a/www/docfiles/mxmlcustoms.html +++ b/www/docfiles/mxmlcustoms.html @@ -1,14 +1,14 @@ -Mini-XML Programmers Manual, Version 2.1 +Mini-XML Programmers Manual, Version 2.2 - + - + -
        Mini-XML Programmers Manual, Version 2.1
        -

        Mini-XML Programmers Manual, Version 2.1


        +
        Mini-XML Programmers Manual, Version 2.2
        +

        Mini-XML Programmers Manual, Version 2.2


        Michael Sweet
        -Copyright 2003-2004
        +Copyright 2003-2005

        Table of Contents

        @@ -78,21 +78,24 @@ Copyright 2003-2004
      • XML Schema
      A - GNU Library General Public License -
      -
      B - Release Notes +B - Release Notes + C - Library Reference

      Introduction

      -

      This programmers manual describes Mini-XML version 2.1, a small XML +

      This programmers manual describes Mini-XML version 2.2, a small XML parsing library that you can use to read and write XML and XML-like data files in your application without requiring large non-standard libraries. Mini-XML only requires an ANSI C compatible compiler (GCC @@ -211,7 +205,7 @@ Copyright 2003-2004

      Legal Stuff

      -

      The Mini-XML library is copyright 2003-2004 by Michael Sweet.

      +

      The Mini-XML library is copyright 2003-2005 by Michael Sweet.

      This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either @@ -239,14 +233,13 @@ libxml2 library with something substantially smaller and libxml2.

      Thanks to lots of feedback and support from various developers, Mini-XML has evolved since then to provide a more complete XML - implementation and now stands at a whopping 2,713 lines of code, + implementation and now stands at a whopping 2,974 lines of code, compared to 103,893 lines of code for libxml2 version 2.6.9. Aside from Gimp-Print, Mini-XML is used for the following projects/software applications:

      @@ -923,6 +916,8 @@ MXML_WS_BEFORE_CLOSE, or MXML_WS_AFTER_CLOSE. The callback contain a void pointer to the allocated custom data for the node and a pointer to a destructor function which will free the custom data when the node is deleted.

      + +

      The save callback receives the node pointer and returns an allocated string containing the custom data value. The following save callback could be used for our ISO date/time type:

      @@ -1044,6 +1039,8 @@ mxmlIndexEnum(), mxmlIndexFind() return all elements or attributes in the index. Passing NULL for both the element name and attribute value is equivalent to calling mxmlIndexEnum.

      + +

      When you are done using the index, delete it using the mxmlIndexDelete() function:

      @@ -1182,8 +1179,8 @@ mxmldoc to generate correct documentation for the code. Single line
       <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <xsd:annotation>
           <xsd:documentation xml:lang="en">
      -      Mini-XML 2.0 documentation schema for mxmldoc output.
      -      Copyright 2003-2004 by Michael Sweet.
      +      Mini-XML 2.2 documentation schema for mxmldoc output.
      +      Copyright 2003-2005 by Michael Sweet.
       
             This program is free software; you can redistribute it and/or
             modify it under the terms of the GNU Library General Public
      @@ -1783,9 +1780,66 @@ mxmldoc to generate correct documentation for the code. Single line
        SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
        DAMAGES.

      END OF TERMS AND CONDITIONS

      +

      How to Apply These Terms to Your New Libraries

      +

      If you develop a new library, and you want it to be of the greatest + possible use to the public, we recommend making it free software that + everyone can redistribute and change. You can do so by permitting + redistribution under these terms (or, alternatively, under the terms of + the ordinary General Public License).

      +

      To apply these terms, attach the following notices to the library. It + is safest to attach them to the start of each source file to most + effectively convey the exclusion of warranty; and each file should have + at least the "copyright" line and a pointer to where the full notice is + found.

      +
      +one line to give the library's name and an idea of what it does.
      +Copyright (C) year  name of author
      +
      +This library is free software; you can redistribute it and/or
      +modify it under the terms of the GNU Lesser General Public
      +License as published by the Free Software Foundation; either
      +version 2.1 of the License, or (at your option) any later version.
      +
      +This library is distributed in the hope that it will be useful,
      +but WITHOUT ANY WARRANTY; without even the implied warranty of
      +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      +Lesser General Public License for more details.
      +
      +You should have received a copy of the GNU Lesser General Public
      +License along with this library; if not, write to the Free Software
      +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
      +
      +

      Also add information on how to contact you by electronic and paper + mail.

      +

      You should also get your employer (if you work as a programmer) or + your school, if any, to sign a "copyright disclaimer" for the library, + if necessary. Here is a sample; alter the names:

      +
      +Yoyodyne, Inc., hereby disclaims all copyright interest in
      +the library `Frob' (a library for tweaking knobs) written
      +by James Random Hacker.
      +
      +signature of Ty Coon, 1 April 1990
      +Ty Coon, President of Vice
      +
      +

      That's all there is to it!


      B - Release Notes

      -

      Changes in Mini-XML 2.1

      +

      Changes in Mini-XML 2.2

      +
        +
      • Added shared library support (STR #17)
      • +
      • mxmlLoad*() now returns an error when an XML stream contains illegal + control characters (STR #10)
      • +
      • mxmlLoad*() now returns an error when an element contains two + attributes with the same name in conformance with the XML spec (STR + #16)
      • +
      • Added support for CDATA (STR #14, STR #15)
      • +
      • Updated comment and processing instruction handling - no entity + support per XML specification.
      • +
      • Added checking for invalid comment termination ("--->" is not + allowed)
      • +
      +

      Changes in Mini-XML 2.1

      • Added support for custom data nodes (STR #6)
      • Now treat UTF-8 sequences which are longer than necessary as an @@ -1796,7 +1850,7 @@ mxmldoc to generate correct documentation for the code. Single line
      • Added mxmlLoadFd() and mxmlSaveFd() functions.
      • Fixed multi-word UTF-16 handling.
      -

      Changes in Mini-XML 2.0

      +

      Changes in Mini-XML 2.0

      • New programmers manual.
      • Added Visual C++ project files for Microsoft Windows users.
      • @@ -1829,7 +1883,7 @@ mxmldoc to generate correct documentation for the code. Single line destination path and install path. This caused problems when building and installing with MingW.
      -

      Changes in Mini-XML 1.3

      +

      Changes in Mini-XML 1.3

      • Fixes for mxmldoc.
      • Added support for reading standard HTML entity names.
      • @@ -1845,7 +1899,7 @@ mxmldoc to generate correct documentation for the code. Single line
      • The load and save functions now properly handle quoted element and attribute name strings properly, e.g. for !DOCTYPE declarations.
      -

      Changes in Mini-XML 1.2

      +

      Changes in Mini-XML 1.2

      • Added new "set" methods to set the value of a node.
      • Added new formatted text methods mxmlNewTextf() and mxmlSetTextf() @@ -1858,13 +1912,13 @@ mxmldoc to generate correct documentation for the code. Single line
      • Added --with/without-snprintf configure option to control the snprintf() and vsnprintf() function checks.
      -

      Changes in Mini-XML 1.1.2

      +

      Changes in Mini-XML 1.1.2

      • The mxml(3) man page wasn't updated for the string functions.
      • mxmlSaveString() returned the wrong number of characters.
      • mxml_add_char() updated the buffer pointer in the wrong place.
      -

      Changes in Mini-XML 1.1.1

      +

      Changes in Mini-XML 1.1.1

      • The private mxml_add_ch() function did not update the start-of-buffer pointer which could cause a crash when using @@ -1875,7 +1929,7 @@ mxmldoc to generate correct documentation for the code. Single line
      • Added a mxmlSaveAllocString() convenience function for saving an XML node tree to an allocated string.
      -

      Changes in Mini-XML 1.1

      +

      Changes in Mini-XML 1.1

      • The mxmlLoadFile() function now uses dynamically allocated string buffers for element names, attribute names, and attribute values. @@ -1887,7 +1941,7 @@ mxmldoc to generate correct documentation for the code. Single line
      • Add emulation of strdup() if the local platform does not provide the function.
      -

      Changes in Mini-XML 1.0

      +

      Changes in Mini-XML 1.0

      • The mxmldoc program now handles function arguments, structures, unions, enumerations, classes, and typedefs properly.
      • @@ -1895,7 +1949,7 @@ mxmldoc to generate correct documentation for the code. Single line code.
      • Added man pages and packaging files.
      -

      Changes in Mini-XML 0.93

      +

      Changes in Mini-XML 0.93

      • New mxmldoc example program that is also used to create and update code documentation using XML and produce HTML reference pages.
      • @@ -1920,15 +1974,15 @@ mxmldoc to generate correct documentation for the code. Single line
      • mxmlSaveFile() now supports a whitespace callback to provide more human-readable XML output under program control.
      -

      Changes in Mini-XML 0.92

      +

      Changes in Mini-XML 0.92

      • mxmlSaveFile() didn't return a value on success.
      -

      Changes in Mini-XML 0.91

      +

      Changes in Mini-XML 0.91

      • mxmlWalkNext() would go into an infinite loop.
      -

      Changes in Mini-XML 0.9

      +

      Changes in Mini-XML 0.9

      • Initial public release.
      @@ -1941,7 +1995,6 @@ mxmldoc to generate correct documentation for the code. Single line
    • Structures
    • Types
    • Unions
    • -
    • Variables
    @@ -3154,7 +3207,6 @@ mxmlWalkPrev(
    • mxml_attr_s
    • mxml_custom_s
    • -
    • mxml_fdbuf_s
    • mxml_index_s
    • mxml_node_s
    • mxml_text_s
    • @@ -3205,31 +3257,6 @@ struct mxml_custom_s dataPointer to (allocated) custom data - -

      mxml_fdbuf_s

      -
      -

      Description

      -

      File descriptor buffer (@private)

      -

      Definition

      -
      -struct mxml_fdbuf_s
      -{
      -  end buffer[8192];
      -  unsigned char * current;
      -  int fd;
      -};
      -
      -

      Members

      -

      - - - - - - - -
      NameDescription
      buffer[8192]Character buffer
      currentCurrent position in buffer
      fdFile descriptor
      -

      mxml_index_s


      @@ -3346,7 +3373,6 @@ struct mxml_value_s
    • mxml_attr_t
    • mxml_custom_t
    • mxml_element_t
    • -
    • mxml_fdbuf_t
    • mxml_index_t
    • mxml_node_t
    • mxml_text_t
    • @@ -3384,16 +3410,6 @@ typedef struct mxml_custom_s mxml_custom_t; typedef struct mxml_value_s mxml_element_t; - -

      mxml_fdbuf_t

      -
      -

      Description

      -

      File descriptor buffer (@private)

      -

      Definition

      -
      -typedef struct mxml_fdbuf_s mxml_fdbuf_t;
      -
      -

      mxml_index_t


      @@ -3480,39 +3496,5 @@ union mxml_value_u realReal number textText fragment - - -

      Variables

      - - - -

      mxml_custom_load_cb

      -
      -

      Definition

      -
      -static mxml_custom_load_cb_t mxml_custom_load_cb = NULL;
      -
      - - -

      mxml_custom_save_cb

      -
      -

      Description

      -

      Local functions...

      -

      Definition

      -
      -static mxml_custom_save_cb_t mxml_custom_save_cb = NULL;
      -
      - - -

      num_callbacks

      -
      -

      Definition

      -
      -static int num_callbacks = 1;
      -
      diff --git a/www/mxml.pdf b/www/mxml.pdf index d28ac53..5a591f1 100644 Binary files a/www/mxml.pdf and b/www/mxml.pdf differ diff --git a/www/mxml.ps.gz b/www/mxml.ps.gz index 86e85c2..5685337 100644 Binary files a/www/mxml.ps.gz and b/www/mxml.ps.gz differ diff --git a/www/phplib/html.php b/www/phplib/html.php index fcce190..68b5041 100644 --- a/www/phplib/html.php +++ b/www/phplib/html.php @@ -8,18 +8,20 @@ // // Contents: // -// html_header() - Show the standard page header and navbar... -// html_footer() - Show the standard footer for a page. -// html_start_links() - Start of series of hyperlinks. -// html_end_links() - End of series of hyperlinks. -// html_link() - Show a single hyperlink. -// html_links() - Show an array of links. -// html_start_box() - Start a rounded, shaded box. -// html_end_box() - End a rounded, shaded box. -// html_start_table() - Start a rounded, shaded table. -// html_end_table() - End a rounded, shaded table. -// html_start_row() - Start a table row. -// html_end_row() - End a table row. +// html_header() - Show the standard page header and navbar... +// html_footer() - Show the standard footer for a page. +// html_start_links() - Start of series of hyperlinks. +// html_end_links() - End of series of hyperlinks. +// html_link() - Show a single hyperlink. +// html_links() - Show an array of links. +// html_start_box() - Start a rounded, shaded box. +// html_end_box() - End a rounded, shaded box. +// html_start_table() - Start a rounded, shaded table. +// html_end_table() - End a rounded, shaded table. +// html_start_row() - Start a table row. +// html_end_row() - End a table row. +// html_search_words() - Generate an array of search words. +// html_select_is_published() - Do a for the "is published" field... +// + +function +html_select_is_published($is_published = 1) + // I - Default state +{ + print(""); +} + + ?> diff --git a/www/str.php b/www/str.php index 92628fe..ba81cdf 100644 --- a/www/str.php +++ b/www/str.php @@ -48,9 +48,9 @@ $subsystems = array( ); $versions = array( - "CVS", - "+2.2", - "+2.1.1", + "Trunk", + "+2.2.1", + "2.2", "2.1", "2.0", "2.0rc1", @@ -280,11 +280,11 @@ if ($argc) $scope = (int)$option; break; case 'Q' : // Set search text - $search = $option; + $search = urldecode($option); $i ++; while ($i < $argc) { - $search .= " $argv[$i]"; + $search .= urldecode(" $argv[$i]"); $i ++; } break; @@ -695,59 +695,56 @@ switch ($op) if ($search) { - $search_string = str_replace("'", " ", $search); - $search_string = str_replace("\"", " ", $search_string); - $search_string = str_replace("\\", " ", $search_string); - $search_string = str_replace("%20", " ", $search_string); - $search_string = str_replace("%27", " ", $search_string); - $search_string = str_replace(" ", " ", $search_string); - $search_words = explode(' ', $search_string); + // Convert the search string to an array of words... + $words = html_search_words($search); - // Loop through the array of words, adding them to the + // Loop through the array of words, adding them to the query... $query .= "${prefix}("; $prefix = ""; $next = " OR"; $logic = ""; - reset($search_words); - while ($keyword = current($search_words)) + reset($words); + foreach ($words as $word) { - next($search_words); - $keyword = db_escape(ltrim(rtrim($keyword))); - - if (strcasecmp($keyword, 'or') == 0) - { - $next = ' OR'; - if ($prefix != '') + if ($word == "or") + { + $next = ' OR'; + if ($prefix != '') $prefix = ' OR'; - } - else if (strcasecmp($keyword, 'and') == 0) - { - $next = ' AND'; - if ($prefix != '') + } + else if ($word == "and") + { + $next = ' AND'; + if ($prefix != '') $prefix = ' AND'; - } - else if (strcasecmp($keyword, 'not') == 0) - { - $logic = ' NOT'; - } - else - { - if ($keyword == (int)$keyword) - $idsearch = " OR id = " . (int)$keyword; - else - $idsearch = ""; + } + else if ($word == "not") + $logic = ' NOT'; + else + { + $query .= "$prefix$logic ("; + $subpre = ""; - $query .= "$prefix$logic (summary LIKE \"%$keyword%\"$idsearch" - ." OR subsystem LIKE \"%$keyword%\"" - ." OR str_version LIKE \"%$keyword%\"" - ." OR fix_version LIKE \"%$keyword%\"" - ." OR manager_email LIKE \"%$keyword%\"" - ." OR create_user LIKE \"%$keyword%\")"; - $prefix = $next; - $logic = ''; - } - } + if (ereg("[0-9]+", $word)) + { + $query .= "${subpre}id = $word"; + $subpre = " OR "; + } + + $query .= "${subpre}summary LIKE \"%$word%\""; + $subpre = " OR "; + $query .= "${subpre}subsystem LIKE \"%$word%\""; + $query .= "${subpre}str_version LIKE \"%$word%\""; + $query .= "${subpre}fix_version LIKE \"%$word%\""; + $query .= "${subpre}manager_email LIKE \"%$word%\""; + $query .= "${subpre}create_user LIKE \"%$word%\""; + + $query .= ")"; + $prefix = $next; + $logic = ''; + } + } $query .= ")"; }