From fdrake@users.sourceforge.net Sat May 4 15:48:02 2002 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Sat May 4 14:48:02 2002 Subject: [Expat-checkins] CVS: expat/tests runtests.c,1.17,1.18 Message-ID: Update of /cvsroot/expat/expat/tests In directory usw-pr-cvs1:/tmp/cvs-serv20182/tests Modified Files: runtests.c Log Message: xml_failure(): Pass the relevant XML_Parser into the function so it is useful when parsing external entities as well as the document entity. All callers have been updated. Index: runtests.c =================================================================== RCS file: /cvsroot/expat/expat/tests/runtests.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** runtests.c 25 Apr 2002 04:04:42 -0000 1.17 --- runtests.c 4 May 2002 21:47:46 -0000 1.18 *************** *** 32,36 **** */ static void ! _xml_failure(const char *file, int line) { char buffer[1024]; --- 32,36 ---- */ static void ! _xml_failure(XML_Parser parser, const char *file, int line) { char buffer[1024]; *************** *** 44,48 **** } ! #define xml_failure() _xml_failure(__FILE__, __LINE__) --- 44,48 ---- } ! #define xml_failure(parser) _xml_failure((parser), __FILE__, __LINE__) *************** *** 59,63 **** fail("Parser did not report error on NUL-byte."); if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) ! xml_failure(); } END_TEST --- 59,63 ---- fail("Parser did not report error on NUL-byte."); if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) ! xml_failure(parser); } END_TEST *************** *** 72,76 **** fail("Parser did not report error on NUL-byte."); if (XML_GetErrorCode(parser) != XML_ERROR_BAD_CHAR_REF) ! xml_failure(); } END_TEST --- 72,76 ---- fail("Parser did not report error on NUL-byte."); if (XML_GetErrorCode(parser) != XML_ERROR_BAD_CHAR_REF) ! xml_failure(parser); } END_TEST *************** *** 82,86 **** if (!XML_Parse(parser, text, strlen(text), 1)) ! xml_failure(); } END_TEST --- 82,86 ---- if (!XML_Parse(parser, text, strlen(text), 1)) ! xml_failure(parser); } END_TEST *************** *** 91,95 **** if (!XML_Parse(parser, text, sizeof(text) - 1, 1)) ! xml_failure(); } END_TEST --- 91,95 ---- if (!XML_Parse(parser, text, sizeof(text) - 1, 1)) ! xml_failure(parser); } END_TEST *************** *** 100,104 **** if (!XML_Parse(parser, text, sizeof(text) - 1, 1)) ! xml_failure(); } END_TEST --- 100,104 ---- if (!XML_Parse(parser, text, sizeof(text) - 1, 1)) ! xml_failure(parser); } END_TEST *************** *** 131,135 **** XML_SetCharacterDataHandler(parser, accumulate_characters); if (!XML_Parse(parser, text, strlen(text), 1)) ! xml_failure(); CharData_CheckXMLChars(&storage, expected); } --- 131,135 ---- XML_SetCharacterDataHandler(parser, accumulate_characters); if (!XML_Parse(parser, text, strlen(text), 1)) ! xml_failure(parser); CharData_CheckXMLChars(&storage, expected); } *************** *** 144,148 **** XML_SetStartElementHandler(parser, accumulate_attribute); if (!XML_Parse(parser, text, strlen(text), 1)) ! xml_failure(); CharData_CheckXMLChars(&storage, expected); } --- 144,148 ---- XML_SetStartElementHandler(parser, accumulate_attribute); if (!XML_Parse(parser, text, strlen(text), 1)) ! xml_failure(parser); CharData_CheckXMLChars(&storage, expected); } *************** *** 221,225 **** } else if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) ! xml_failure(); } } --- 221,225 ---- } else if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) ! xml_failure(parser); } } *************** *** 240,244 **** "\000d\000o\000c\000>"; if (!XML_Parse(parser, text, sizeof(text) - 1, 1)) ! xml_failure(); } END_TEST --- 240,244 ---- "\000d\000o\000c\000>"; if (!XML_Parse(parser, text, sizeof(text) - 1, 1)) ! xml_failure(parser); } END_TEST *************** *** 370,374 **** check_attr_contains_normalized_whitespace); if (!XML_Parse(parser, text, strlen(text), 1)) ! xml_failure(); } END_TEST --- 370,374 ---- check_attr_contains_normalized_whitespace); if (!XML_Parse(parser, text, strlen(text), 1)) ! xml_failure(parser); } END_TEST *************** *** 388,392 **** if (!XML_Parse(parser, text, strlen(text), 1)) { if (XML_GetErrorCode(parser) != XML_ERROR_MISPLACED_XML_PI) ! xml_failure(); } else { --- 388,392 ---- if (!XML_Parse(parser, text, strlen(text), 1)) { if (XML_GetErrorCode(parser) != XML_ERROR_MISPLACED_XML_PI) ! xml_failure(parser); } else { *************** *** 464,468 **** XML_SetElementHandler(parser, triplet_start_checker, triplet_end_checker); if (!XML_Parse(parser, text, strlen(text), 1)) ! xml_failure(); } END_TEST --- 464,468 ---- XML_SetElementHandler(parser, triplet_start_checker, triplet_end_checker); if (!XML_Parse(parser, text, strlen(text), 1)) ! xml_failure(parser); } END_TEST From fdrake@users.sourceforge.net Wed May 8 05:39:03 2002 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed May 8 04:39:03 2002 Subject: [Expat-checkins] CVS: htdocs index.html,1.9,1.10 Message-ID: Update of /cvsroot/expat/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv29093 Modified Files: index.html Log Message: Added link to information about a C++ binding for Expat. Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** index.html 25 Feb 2002 16:40:42 -0000 1.9 --- index.html 8 May 2002 11:26:01 -0000 1.10 *************** *** 74,77 **** --- 74,80 ---- standard documentation for Python
  • + C++ interface to Expat (not updated since Expat 1.2) +
  • The TclXML project includes a Update of /cvsroot/expat/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv22520 Modified Files: syncmail Log Message: Update to the latest version of syncmail. Index: syncmail =================================================================== RCS file: /cvsroot/expat/CVSROOT/syncmail,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** syncmail 27 Jul 2001 14:24:24 -0000 1.4 --- syncmail 9 May 2002 12:11:57 -0000 1.5 *************** *** 1,4 **** #! /usr/bin/python ! # -*- Python -*- """Complicated notification for CVS checkins. --- 1,6 ---- #! /usr/bin/python ! ! # NOTE: Until SourceForge installs a modern version of Python on the cvs ! # servers, this script MUST be compatible with Python 1.5.2. """Complicated notification for CVS checkins. *************** *** 30,34 **** %(PROGRAM)s [options] <%%S> email-addr [email-addr ...] ! Where options is: --cvsroot= --- 32,36 ---- %(PROGRAM)s [options] <%%S> email-addr [email-addr ...] ! Where options are: --cvsroot= *************** *** 36,43 **** variable must exist in the environment. - --help - -h - Print this text. - --context=# -C # --- 38,41 ---- *************** *** 48,52 **** -u ! Produce a unified diff (smaller, but harder to read). <%%S> --- 46,64 ---- -u ! Produce a unified diff (smaller). ! ! --quiet / -q ! Don't print as much status to stdout. ! ! --fromhost=hostname ! -f hostname ! The hostname that email messages appear to be coming from. The From: ! header will of the outgoing message will look like user@hostname. By ! default, hostname is the machine's fully qualified domain name. ! ! --help / -h ! Print this text. ! ! The rest of the command line arguments are: <%%S> *************** *** 59,73 **** email-addrs At least one email address. - """ - import os import sys ! import string import time import getopt ! # Notification command ! MAILCMD = '/bin/mail -s "CVS: %(SUBJECT)s" %(PEOPLE)s 2>&1 > /dev/null' # Diff trimming stuff --- 71,108 ---- email-addrs At least one email address. """ import os import sys ! import re import time + import string import getopt + import smtplib + import pwd + import socket ! try: ! from socket import getfqdn ! except ImportError: ! def getfqdn(): ! # Python 1.5.2 :( ! hostname = socket.gethostname() ! byaddr = socket.gethostbyaddr(socket.gethostbyname(hostname)) ! aliases = byaddr[1] ! aliases.insert(0, byaddr[0]) ! aliases.insert(0, hostname) ! for fqdn in aliases: ! if '.' in fqdn: ! break ! else: ! fqdn = 'localhost.localdomain' ! return fqdn ! ! ! from cStringIO import StringIO ! ! # Which SMTP server to do we connect to? Empty string means localhost. ! MAILHOST = '' ! MAILPORT = 25 # Diff trimming stuff *************** *** 76,86 **** DIFF_TRUNCATE_IF_LARGER = 1000 PROGRAM = sys.argv[0] ! if hasattr(string, "ascii_whitespace"): ! _whitespace = string.ascii_whitespace ! else: ! _whitespace = string.whitespace --- 111,128 ---- DIFF_TRUNCATE_IF_LARGER = 1000 + EMPTYSTRING = '' + SPACE = ' ' + DOT = '.' + COMMASPACE = ', ' + PROGRAM = sys.argv[0] + BINARY_EXPLANATION_LINES = [ + "(This appears to be a binary file; contents omitted.)\n" + ] ! REVCRE = re.compile("^(NONE|[0-9.]+)$") ! NOVERSION = "Couldn't generate diff; no version number found in filespec: %s" ! BACKSLASH = "Couldn't generate diff: backslash in filespec's filename: %s" *************** *** 95,103 **** def calculate_diff(filespec, contextlines): ! try: ! file, oldrev, newrev = string.split(filespec, ',') ! except ValueError: ! # No diff to report ! return '***** Bogus filespec: %s' % filespec if oldrev == 'NONE': try: --- 137,165 ---- def calculate_diff(filespec, contextlines): ! file, oldrev, newrev = string.split(filespec, ',') ! # Make sure we can find a CVS version number ! if not REVCRE.match(oldrev): ! return NOVERSION % filespec ! if not REVCRE.match(newrev): ! return NOVERSION % filespec ! ! if string.find(file, '\\') <> -1: ! # I'm sorry, a file name that contains a backslash is just too much. ! # XXX if someone wants to figure out how to escape the backslashes in ! # a safe way to allow filenames containing backslashes, this is the ! # place to do it. --Zooko 2002-03-17 ! return BACKSLASH % filespec ! ! if string.find(file, "'") <> -1: ! # Those crazy users put single-quotes in their file names! Now we ! # have to escape everything that is meaningful inside double-quotes. ! filestr = string.replace(file, '`', '\`') ! filestr = string.replace(filestr, '"', '\"') ! filestr = string.replace(filestr, '$', '\$') ! # and quote it with double-quotes. ! filestr = '"' + filestr + '"' ! else: ! # quote it with single-quotes. ! filestr = "'" + file + "'" if oldrev == 'NONE': try: *************** *** 105,109 **** fp = open(file) else: ! update_cmd = 'cvs -fn update -r %s -p %s' % (newrev, file) fp = os.popen(update_cmd) lines = fp.readlines() --- 167,171 ---- fp = open(file) else: ! update_cmd = "cvs -fn update -r %s -p %s" % (newrev, filestr) fp = os.popen(update_cmd) lines = fp.readlines() *************** *** 111,126 **** # Is this a binary file? Let's look at the first few # lines to figure it out: - binary = 0 for line in lines[:5]: ! for c in line: if c < ' ' or c > chr(127): ! if c in _whitespace: ! continue ! binary = 1 break - if binary: - lines = [ - "(This appears to be a binary file; contents omitted.)\n" - ] lines.insert(0, '--- NEW FILE: %s ---\n' % file) except IOError, e: --- 173,183 ---- # Is this a binary file? Let's look at the first few # lines to figure it out: for line in lines[:5]: ! for c in string.rstrip(line): ! if c in string.whitespace: ! continue if c < ' ' or c > chr(127): ! lines = BINARY_EXPLANATION_LINES[:] break lines.insert(0, '--- NEW FILE: %s ---\n' % file) except IOError, e: *************** *** 136,141 **** else: difftype = "-u" ! diffcmd = "/usr/bin/cvs -f diff -kk %s --minimal -r %s -r %s '%s'" % ( ! difftype, oldrev, newrev, file) fp = os.popen(diffcmd) lines = fp.readlines() --- 193,198 ---- else: difftype = "-u" ! diffcmd = "/usr/bin/cvs -f diff -kk %s --minimal -r %s -r %s %s" \ ! % (difftype, oldrev, newrev, filestr) fp = os.popen(diffcmd) lines = fp.readlines() *************** *** 153,157 **** ! def blast_mail(mailcmd, filestodiff, contextlines): # cannot wait for child process or that will cause parent to retain cvs # lock for too long. Urg! --- 210,214 ---- ! def blast_mail(subject, people, filestodiff, contextlines, fromhost): # cannot wait for child process or that will cause parent to retain cvs # lock for too long. Urg! *************** *** 160,172 **** # give up the lock you cvs thang! time.sleep(2) ! fp = os.popen(mailcmd, 'w') ! fp.write(sys.stdin.read()) ! fp.write('\n') ! # append the diffs if available ! for file in filestodiff: ! fp.write(calculate_diff(file, contextlines)) ! fp.write('\n') ! fp.close() ! # doesn't matter what code we return, it isn't waited on os._exit(0) --- 217,246 ---- # give up the lock you cvs thang! time.sleep(2) ! # Create the smtp connection to the localhost ! conn = smtplib.SMTP() ! conn.connect(MAILHOST, MAILPORT) ! user = pwd.getpwuid(os.getuid())[0] ! domain = fromhost or getfqdn() ! author = '%s@%s' % (user, domain) ! s = StringIO() ! sys.stdout = s ! try: ! print '''\ ! From: %(author)s ! To: %(people)s ! Subject: %(subject)s ! ''' % {'author' : author, ! 'people' : string.join(people, COMMASPACE), ! 'subject': subject, ! } ! s.write(sys.stdin.read()) ! # append the diffs if available ! print ! for file in filestodiff: ! print calculate_diff(file, contextlines) ! finally: ! sys.stdout = sys.__stdout__ ! resp = conn.sendmail(author, people, s.getvalue()) ! conn.close() os._exit(0) *************** *** 175,186 **** # scan args for options def main(): - contextlines = 2 try: ! opts, args = getopt.getopt(sys.argv[1:], 'hC:cu', ! ['context=', 'cvsroot=', 'help']) except getopt.error, msg: usage(1, msg) # parse the options for opt, arg in opts: if opt in ('-h', '--help'): --- 249,263 ---- # scan args for options def main(): try: ! opts, args = getopt.getopt( ! sys.argv[1:], 'hC:cuqf:', ! ['fromhost=', 'context=', 'cvsroot=', 'help', 'quiet']) except getopt.error, msg: usage(1, msg) # parse the options + contextlines = 2 + verbose = 1 + fromhost = None for opt, arg in opts: if opt in ('-h', '--help'): *************** *** 195,198 **** --- 272,279 ---- elif opt == '-u': contextlines = 0 + elif opt in ('-q', '--quiet'): + verbose = 0 + elif opt in ('-f', '--fromhost'): + fromhost = arg # What follows is the specification containing the files that were *************** *** 202,206 **** if not args: usage(1, 'No CVS module specified') ! SUBJECT = args[0] specs = string.split(args[0]) del args[0] --- 283,287 ---- if not args: usage(1, 'No CVS module specified') ! subject = args[0] specs = string.split(args[0]) del args[0] *************** *** 211,218 **** # Now do the mail command ! PEOPLE = string.join(args) ! mailcmd = MAILCMD % vars() - print 'Mailing %s...' % PEOPLE if specs == ['-', 'Imported', 'sources']: return --- 292,300 ---- # Now do the mail command ! people = args ! ! if verbose: ! print 'Mailing %s...' % string.join(people, COMMASPACE) if specs == ['-', 'Imported', 'sources']: return *************** *** 223,234 **** for s in specs[2:]: prev = L[-1] ! if string.count(prev, ",") < 2: L[-1] = "%s %s" % (prev, s) else: L.append(s) specs = L ! print 'Generating notification message...' ! blast_mail(mailcmd, specs[1:], contextlines) ! print 'Generating notification message... done.' --- 305,319 ---- for s in specs[2:]: prev = L[-1] ! if string.count(prev, ',') < 2: L[-1] = "%s %s" % (prev, s) else: L.append(s) specs = L ! ! if verbose: ! print 'Generating notification message...' ! blast_mail(subject, people, specs[1:], contextlines, fromhost) ! if verbose: ! print 'Generating notification message... done.' From fdrake@users.sourceforge.net Thu May 9 06:15:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 9 05:15:03 2002 Subject: [Expat-checkins] htdocs expat.png,NONE,1.1 Message-ID: Update of /cvsroot/expat/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv23026 Added Files: expat.png Log Message: Lame "logo" for the Expat web page. --- NEW FILE: expat.png --- (This appears to be a binary file; contents omitted.) From fdrake@users.sourceforge.net Thu May 9 06:15:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 9 05:15:03 2002 Subject: [Expat-checkins] htdocs style.css,NONE,1.1 Message-ID: Update of /cvsroot/expat/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv23126 Added Files: style.css Log Message: Simple style sheet for the Expat web page. --- NEW FILE: style.css --- .corner { width: 200px; height: 80px; text-align: center; } .navbar { background-color: rgb(110,139,61); padding-top: 2em; } .banner { background-color: rgb(110,139,61); color: rgb(255,236,176); padding-left: 2em; } .banner h2 { font-size: 200%; } .content { padding: 2em; } From fdrake@users.sourceforge.net Thu May 9 06:25:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 9 05:25:03 2002 Subject: [Expat-checkins] htdocs index.html,1.10,1.11 Message-ID: Update of /cvsroot/expat/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv25515 Modified Files: index.html Log Message: Completely replace the style of the Expat web page, but keep the original content. (I need to write new content, but that is a separate task.) Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** index.html 8 May 2002 11:26:01 -0000 1.10 --- index.html 9 May 2002 12:24:46 -0000 1.11 *************** *** 1,29 **** ! ! ! ! ! ! Expat - XML Parser ! ! ! ! ! ! ! ! ! ! ! ! !
    ! SourceForge Logo 

    Expat XML Parser

    !

    Expat is an XML parser library written in C. It is a stream-oriented parser ! in which an application registers handlers for things the parser might find ! in the XML document (like start tags). An ! introductory article on using Expat is available on xml.com.

    --- 1,22 ---- ! ! ! Sample Page for the Expat Site ! ! ! ! ! ! ! ! ! ! ! !
    !

    Expat is an XML parser library written in C. It is a ! stream-oriented parser in which an application registers handlers for ! things the parser might find in the XML document (like start tags). ! An introductory article on using Expat is available on xml.com.

    *************** *** 93,99 **** !
    ! --- 86,101 ---- !
    ! ! SourceForge
!                  Logo ! !
    ! From fdrake@users.sourceforge.net Thu May 9 06:27:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 9 05:27:02 2002 Subject: [Expat-checkins] htdocs index.html,1.11,1.12 Message-ID: Update of /cvsroot/expat/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv26131 Modified Files: index.html Log Message: Oops, fix the title! Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** index.html 9 May 2002 12:24:46 -0000 1.11 --- index.html 9 May 2002 12:26:45 -0000 1.12 *************** *** 1,5 **** ! Sample Page for the Expat Site --- 1,5 ---- ! The Expat XML Parser *************** *** 8,12 **** !

    Sample Title

    --- 8,12 ---- !

    The Expat XML Parser

    From fdrake@users.sourceforge.net Thu May 9 09:10:05 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 9 08:10:05 2002 Subject: [Expat-checkins] htdocs index.html,1.12,1.13 Message-ID: Update of /cvsroot/expat/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv16450 Modified Files: index.html Log Message: Added a reference to tDOM (Tcl DOM package using Expat). Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** index.html 9 May 2002 12:26:45 -0000 1.12 --- index.html 9 May 2002 15:09:18 -0000 1.13 *************** *** 74,77 **** --- 74,82 ---- >Tcl
    binding for Expat
  • + tDOM is an alternate package providing XML support for Tcl, based in part on + Expat
  • +
  • Objective-C interface to Expat From gstein@users.sourceforge.net Thu May 9 18:11:06 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Thu May 9 17:11:06 2002 Subject: [Expat-checkins] expat buildconf.sh,1.5,1.6 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv17227 Modified Files: buildconf.sh Log Message: Patch from Joe Orton : Allow the environment to specify a different autoconf and autoheader. This is useful when Expat is bundled into another program, which is being configured using something other than the autoconf/autoheader in the path. Index: buildconf.sh =================================================================== RCS file: /cvsroot/expat/expat/buildconf.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** buildconf.sh 7 Dec 2001 10:19:30 -0000 1.5 --- buildconf.sh 10 May 2002 00:10:57 -0000 1.6 *************** *** 36,47 **** # echo "Creating config.h.in ..." ! autoheader echo "Creating configure ..." ### do some work to toss config.cache? ! autoconf # toss this; it gets created by autoconf on some systems ! rm -rf autom4te.cache # exit with the right value, so any calling script can continue --- 36,47 ---- # echo "Creating config.h.in ..." ! ${AUTOHEADER:-autoheader} echo "Creating configure ..." ### do some work to toss config.cache? ! ${AUTOCONF:-autoconf} # toss this; it gets created by autoconf on some systems ! rm -rf autom4te*.cache # exit with the right value, so any calling script can continue From kwaclaw@users.sourceforge.net Fri May 10 10:34:01 2002 From: kwaclaw@users.sourceforge.net (kwaclaw@users.sourceforge.net) Date: Fri May 10 09:34:01 2002 Subject: [Expat-checkins] htdocs index.html,1.13,1.14 Message-ID: Update of /cvsroot/expat/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv608 Modified Files: index.html Log Message: Added link to Expat wrapper for Delphi Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** index.html 9 May 2002 15:09:18 -0000 1.13 --- index.html 10 May 2002 16:32:59 -0000 1.14 *************** *** 89,92 **** --- 89,99 ---- <?PHPBuilder?>
    (broken into lots of tiny pieces)
  • +
  • + SAX2 Wrapper for using Expat in Delphi, + based on + "SAX for Pascal" + interface specs
  • From fdrake@users.sourceforge.net Wed May 15 09:57:04 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed May 15 08:57:04 2002 Subject: [Expat-checkins] expat/lib xmlparse.c,1.31,1.32 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv2993/lib Modified Files: xmlparse.c Log Message: Add casts to suppress a couple of warnings from MSVC with warning level 4. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** xmlparse.c 26 Apr 2002 04:46:24 -0000 1.31 --- xmlparse.c 15 May 2002 15:56:21 -0000 1.32 *************** *** 1560,1564 **** const XML_Char *name; ENTITY *entity; ! XML_Char ch = XmlPredefinedEntityName(enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); --- 1560,1564 ---- const XML_Char *name; ENTITY *entity; ! XML_Char ch = (XML_Char) XmlPredefinedEntityName(enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); *************** *** 3528,3532 **** const XML_Char *name; ENTITY *entity; ! XML_Char ch = XmlPredefinedEntityName(enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar); --- 3528,3532 ---- const XML_Char *name; ENTITY *entity; ! XML_Char ch = (XML_Char) XmlPredefinedEntityName(enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar); From fdrake@users.sourceforge.net Wed May 15 09:58:04 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed May 15 08:58:04 2002 Subject: [Expat-checkins] expat/xmlwf codepage.c,1.9,1.10 Message-ID: Update of /cvsroot/expat/expat/xmlwf In directory usw-pr-cvs1:/tmp/cvs-serv3425/xmlwf Modified Files: codepage.c Log Message: Add casts to suppress a couple of warnings from MSVC with warning level 4. Index: codepage.c =================================================================== RCS file: /cvsroot/expat/expat/xmlwf/codepage.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** codepage.c 21 Sep 2000 21:20:18 -0000 1.9 --- codepage.c 15 May 2002 15:57:22 -0000 1.10 *************** *** 32,36 **** for (i = 0; i < 256; i++) { if (map[i] == -1) { ! char c = i; unsigned short n; if (MultiByteToWideChar(cp, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS, --- 32,36 ---- for (i = 0; i < 256; i++) { if (map[i] == -1) { ! char c = (char)i; unsigned short n; if (MultiByteToWideChar(cp, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS, From fdrake@users.sourceforge.net Thu May 16 21:42:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 16 20:42:03 2002 Subject: [Expat-checkins] expat/lib xmlparse.c,1.32,1.33 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv3224/lib Modified Files: xmlparse.c Log Message: Fix a number of potential memory leaks around REALLOC(). More are lurking. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** xmlparse.c 15 May 2002 15:56:21 -0000 1.32 --- xmlparse.c 17 May 2002 03:41:34 -0000 1.33 *************** *** 1148,1153 **** if (buffer == 0 || nLeftOver > bufferLim - buffer) { /* FIXME avoid integer overflow */ ! buffer = buffer == 0 ? MALLOC(len * 2) : REALLOC(buffer, len * 2); ! /* FIXME storage leak if realloc fails */ if (!buffer) { errorCode = XML_ERROR_NO_MEMORY; --- 1148,1158 ---- if (buffer == 0 || nLeftOver > bufferLim - buffer) { /* FIXME avoid integer overflow */ ! char *temp; ! temp = buffer == 0 ? MALLOC(len * 2) : REALLOC(buffer, len * 2); ! if (temp == NULL) { ! errorCode = XML_ERROR_NO_MEMORY; ! return 0; ! } ! buffer = temp; if (!buffer) { errorCode = XML_ERROR_NO_MEMORY; *************** *** 1666,1675 **** tag->buf + ROUND_UP(tag->rawNameLength, sizeof(XML_Char)) <= tag->bufEnd - sizeof(XML_Char) */ ! if (tag->rawNameLength + (int)(sizeof(XML_Char) - 1) + (int)sizeof(XML_Char) > tag->bufEnd - tag->buf) { int bufSize = tag->rawNameLength * 4; bufSize = ROUND_UP(bufSize, sizeof(XML_Char)); ! tag->buf = REALLOC(tag->buf, bufSize); ! if (!tag->buf) ! return XML_ERROR_NO_MEMORY; tag->bufEnd = tag->buf + bufSize; } --- 1671,1684 ---- tag->buf + ROUND_UP(tag->rawNameLength, sizeof(XML_Char)) <= tag->bufEnd - sizeof(XML_Char) */ ! if (tag->rawNameLength + (int)(sizeof(XML_Char) - 1) ! + (int)sizeof(XML_Char) > tag->bufEnd - tag->buf) { int bufSize = tag->rawNameLength * 4; bufSize = ROUND_UP(bufSize, sizeof(XML_Char)); ! { ! char *temp = REALLOC(tag->buf, bufSize); ! if (temp == NULL) ! return XML_ERROR_NO_MEMORY; ! tag->buf = temp; ! } tag->bufEnd = tag->buf + bufSize; } *************** *** 1697,1703 **** break; bufSize = (tag->bufEnd - tag->buf) << 1; ! tag->buf = REALLOC(tag->buf, bufSize); ! if (!tag->buf) ! return XML_ERROR_NO_MEMORY; tag->bufEnd = tag->buf + bufSize; if (nextPtr) --- 1706,1715 ---- break; bufSize = (tag->bufEnd - tag->buf) << 1; ! { ! char *temp = REALLOC(tag->buf, bufSize); ! if (temp == NULL) ! return XML_ERROR_NO_MEMORY; ! tag->buf = temp; ! } tag->bufEnd = tag->buf + bufSize; if (nextPtr) *************** *** 1960,1967 **** if (n + nDefaultAtts > attsSize) { int oldAttsSize = attsSize; attsSize = n + nDefaultAtts + INIT_ATTS_SIZE; ! atts = REALLOC((void *)atts, attsSize * sizeof(ATTRIBUTE)); ! if (!atts) return XML_ERROR_NO_MEMORY; if (n > oldAttsSize) XmlGetAttributes(enc, attStr, n, atts); --- 1972,1981 ---- if (n + nDefaultAtts > attsSize) { int oldAttsSize = attsSize; + ATTRIBUTE *temp; attsSize = n + nDefaultAtts + INIT_ATTS_SIZE; ! temp = REALLOC((void *)atts, attsSize * sizeof(ATTRIBUTE)); ! if (temp == NULL) return XML_ERROR_NO_MEMORY; + atts = temp; if (n > oldAttsSize) XmlGetAttributes(enc, attStr, n, atts); From fdrake@users.sourceforge.net Fri May 17 08:09:05 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 17 07:09:05 2002 Subject: [Expat-checkins] htdocs index.html,1.14,1.15 Message-ID: Update of /cvsroot/expat/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv13419 Modified Files: index.html Log Message: Added a link to an article with additional C++ wrappers for Expat, by Tim Smith. Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** index.html 10 May 2002 16:32:59 -0000 1.14 --- index.html 17 May 2002 13:42:36 -0000 1.15 *************** *** 67,72 **** standard documentation for Python
  • C++ interface to Expat (not updated since Expat 1.2)
  • The
  • + C++ Wrappers + for the Expat XML Parser, an article by Tim Smith + providing object-oriented wrappers for Expat. The wrappers use + some MFC-biased naming, but look interesting. +
  • C++ interface to Expat (old; not updated since Expat 1.2)
  • The Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv22927 Modified Files: Makefile.in Log Message: Make the uninstall target use the right location for the header file. Index: Makefile.in =================================================================== RCS file: /cvsroot/expat/expat/Makefile.in,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Makefile.in 29 Apr 2002 21:31:18 -0000 1.28 --- Makefile.in 17 May 2002 14:12:25 -0000 1.29 *************** *** 88,92 **** $(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(LIBRARY) ! rm -f $(libdir)/$(APIHEADER) rm -f $(prefix)/man/man1/xmlwf.1 --- 88,92 ---- $(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(LIBRARY) ! rm -f $(includedir)/$(APIHEADER) rm -f $(prefix)/man/man1/xmlwf.1 From fdrake@users.sourceforge.net Fri May 17 08:16:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 17 07:16:02 2002 Subject: [Expat-checkins] expat expat.spec,1.4,1.5 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv24163 Modified Files: expat.spec Log Message: Updated for the 1.95.3 release. Index: expat.spec =================================================================== RCS file: /cvsroot/expat/expat/expat.spec,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** expat.spec 16 Apr 2002 02:12:20 -0000 1.4 --- expat.spec 17 May 2002 14:15:38 -0000 1.5 *************** *** 1,3 **** ! %define version 1.95.2 %define release 1 --- 1,3 ---- ! %define version 1.95.3 %define release 1 *************** *** 36,41 **** --- 36,47 ---- /usr/lib /usr/include + /usr/man/man1/xmlwf.1 %changelog + * Fri May 17 2002 Fred L. Drake, Jr. + [Release 1.95.3-1] + - Updated for the 1.95.3 release. + - Added xmlwf man page to the list of files. + * Wed Jul 25 2001 Fred L. Drake, Jr. [Release 1.95.2-1] From fdrake@users.sourceforge.net Fri May 17 09:10:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 17 08:10:03 2002 Subject: [Expat-checkins] expat/lib xmlparse.c,1.33,1.34 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv7127/lib Modified Files: xmlparse.c Log Message: Be more careful about failed MALLOC() and REALLOC() calls. This avoids a number of potential memory leaks. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** xmlparse.c 17 May 2002 03:41:34 -0000 1.33 --- xmlparse.c 17 May 2002 15:09:34 -0000 1.34 *************** *** 1657,1662 **** return XML_ERROR_NO_MEMORY; tag->buf = MALLOC(INIT_TAG_BUF_SIZE); ! if (!tag->buf) return XML_ERROR_NO_MEMORY; tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE; } --- 1657,1664 ---- return XML_ERROR_NO_MEMORY; tag->buf = MALLOC(INIT_TAG_BUF_SIZE); ! if (!tag->buf) { ! FREE(tag); return XML_ERROR_NO_MEMORY; + } tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE; } *************** *** 2200,2206 **** b = freeBindingList; if (len > b->uriAlloc) { ! b->uri = REALLOC(b->uri, sizeof(XML_Char) * (len + EXPAND_SPARE)); ! if (!b->uri) return 0; b->uriAlloc = len + EXPAND_SPARE; } --- 2202,2210 ---- b = freeBindingList; if (len > b->uriAlloc) { ! XML_Char *temp = REALLOC(b->uri, ! sizeof(XML_Char) * (len + EXPAND_SPARE)); ! if (temp == NULL) return 0; + b->uri = temp; b->uriAlloc = len + EXPAND_SPARE; } *************** *** 3142,3153 **** if (prologState.level >= groupSize) { if (groupSize) { ! groupConnector = REALLOC(groupConnector, groupSize *= 2); ! if (dtd.scaffIndex) ! dtd.scaffIndex = REALLOC(dtd.scaffIndex, groupSize * sizeof(int)); } ! else groupConnector = MALLOC(groupSize = 32); ! if (!groupConnector) ! return XML_ERROR_NO_MEMORY; } groupConnector[prologState.level] = 0; --- 3146,3165 ---- if (prologState.level >= groupSize) { if (groupSize) { ! char *temp = REALLOC(groupConnector, groupSize *= 2); ! if (temp == NULL) ! return XML_ERROR_NO_MEMORY; ! groupConnector = temp; ! if (dtd.scaffIndex) { ! int *temp = REALLOC(dtd.scaffIndex, groupSize * sizeof(int)); ! if (temp == NULL) ! return XML_ERROR_NO_MEMORY; ! dtd.scaffIndex = temp; ! } } ! else { groupConnector = MALLOC(groupSize = 32); ! if (!groupConnector) ! return XML_ERROR_NO_MEMORY; ! } } groupConnector[prologState.level] = 0; *************** *** 3831,3844 **** type->allocDefaultAtts = 8; type->defaultAtts = MALLOC(type->allocDefaultAtts ! * sizeof(DEFAULT_ATTRIBUTE)); } else { ! type->allocDefaultAtts *= 2; ! type->defaultAtts = REALLOC(type->defaultAtts, ! (type->allocDefaultAtts ! * sizeof(DEFAULT_ATTRIBUTE))); } - if (!type->defaultAtts) - return 0; } att = type->defaultAtts + type->nDefaultAtts; --- 3843,3859 ---- type->allocDefaultAtts = 8; type->defaultAtts = MALLOC(type->allocDefaultAtts ! * sizeof(DEFAULT_ATTRIBUTE)); ! if (!type->defaultAtts) ! return 0; } else { ! DEFAULT_ATTRIBUTE *temp; ! int count = type->allocDefaultAtts * 2; ! temp = REALLOC(type->defaultAtts, (count * sizeof(DEFAULT_ATTRIBUTE))); ! if (temp == NULL) ! return 0; ! type->allocDefaultAtts = count; ! type->defaultAtts = temp; } } att = type->defaultAtts + type->nDefaultAtts; *************** *** 4231,4236 **** newE->defaultAtts = (DEFAULT_ATTRIBUTE *) MALLOC(oldE->nDefaultAtts * sizeof(DEFAULT_ATTRIBUTE)); ! if (!newE->defaultAtts) return 0; } if (oldE->idAtt) --- 4246,4253 ---- newE->defaultAtts = (DEFAULT_ATTRIBUTE *) MALLOC(oldE->nDefaultAtts * sizeof(DEFAULT_ATTRIBUTE)); ! if (!newE->defaultAtts) { ! FREE(newE); return 0; + } } if (oldE->idAtt) *************** *** 4661,4676 **** if (dtd.scaffCount >= dtd.scaffSize) { if (dtd.scaffold) { dtd.scaffSize *= 2; - dtd.scaffold = (CONTENT_SCAFFOLD *) - REALLOC(dtd.scaffold, dtd.scaffSize * sizeof(CONTENT_SCAFFOLD)); } else { dtd.scaffSize = 32; - dtd.scaffold = (CONTENT_SCAFFOLD *) - MALLOC(dtd.scaffSize * sizeof(CONTENT_SCAFFOLD)); } ! if (! dtd.scaffold) ! return -1; } next = dtd.scaffCount++; --- 4678,4696 ---- if (dtd.scaffCount >= dtd.scaffSize) { + CONTENT_SCAFFOLD *temp; if (dtd.scaffold) { + temp = (CONTENT_SCAFFOLD *) + REALLOC(dtd.scaffold, dtd.scaffSize * 2 * sizeof(CONTENT_SCAFFOLD)); + if (temp == NULL) + return -1; dtd.scaffSize *= 2; } else { + temp = MALLOC(dtd.scaffSize * sizeof(CONTENT_SCAFFOLD)); + if (temp == NULL) + return -1; dtd.scaffSize = 32; } ! dtd.scaffold = temp; } next = dtd.scaffCount++; From fdrake@users.sourceforge.net Fri May 17 09:22:05 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 17 08:22:05 2002 Subject: [Expat-checkins] expat/lib xmlparse.c,1.34,1.35 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv10784/lib Modified Files: xmlparse.c Log Message: Hopefully the last needed checks for MALLOC() failure in xmlparse.c, this avoids memory faults when the initial allocations fail, returning NULL to the caller instead. This closes SF bug #496505. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** xmlparse.c 17 May 2002 15:09:34 -0000 1.34 --- xmlparse.c 17 May 2002 15:21:53 -0000 1.35 *************** *** 573,577 **** const XML_Memory_Handling_Suite *memsuite, const XML_Char *nameSep) { - XML_Parser parser; static const XML_Char implicitContext[] = { --- 573,576 ---- *************** *** 586,601 **** XML_Memory_Handling_Suite *mtemp; parser = memsuite->malloc_fcn(sizeof(Parser)); ! mtemp = &(((Parser *) parser)->m_mem); ! mtemp->malloc_fcn = memsuite->malloc_fcn; ! mtemp->realloc_fcn = memsuite->realloc_fcn; ! mtemp->free_fcn = memsuite->free_fcn; } else { XML_Memory_Handling_Suite *mtemp; parser = malloc(sizeof(Parser)); ! mtemp = &(((Parser *) parser)->m_mem); ! mtemp->malloc_fcn = malloc; ! mtemp->realloc_fcn = realloc; ! mtemp->free_fcn = free; } --- 585,604 ---- XML_Memory_Handling_Suite *mtemp; parser = memsuite->malloc_fcn(sizeof(Parser)); ! if (parser != NULL) { ! mtemp = &(((Parser *) parser)->m_mem); ! mtemp->malloc_fcn = memsuite->malloc_fcn; ! mtemp->realloc_fcn = memsuite->realloc_fcn; ! mtemp->free_fcn = memsuite->free_fcn; ! } } else { XML_Memory_Handling_Suite *mtemp; parser = malloc(sizeof(Parser)); ! if (parser != NULL) { ! mtemp = &(((Parser *) parser)->m_mem); ! mtemp->malloc_fcn = malloc; ! mtemp->realloc_fcn = realloc; ! mtemp->free_fcn = free; ! } } *************** *** 608,612 **** --- 611,624 ---- attsSize = INIT_ATTS_SIZE; atts = MALLOC(attsSize * sizeof(ATTRIBUTE)); + if (atts == NULL) { + FREE(parser); + return NULL; + } dataBuf = MALLOC(INIT_DATA_BUF_SIZE * sizeof(XML_Char)); + if (dataBuf == NULL) { + FREE(atts); + FREE(parser); + return NULL; + } dataBufEnd = dataBuf + INIT_DATA_BUF_SIZE; freeBindingList = 0; From fdrake@users.sourceforge.net Fri May 17 11:22:04 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 17 10:22:04 2002 Subject: [Expat-checkins] expat/xmlwf xmlwf.c,1.58,1.59 Message-ID: Update of /cvsroot/expat/expat/xmlwf In directory usw-pr-cvs1:/tmp/cvs-serv14549/xmlwf Modified Files: xmlwf.c Log Message: Using "0" instead of "NULL" is insane, and leads to unmaintainable code. Index: xmlwf.c =================================================================== RCS file: /cvsroot/expat/expat/xmlwf/xmlwf.c,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** xmlwf.c 19 Apr 2002 21:41:54 -0000 1.58 --- xmlwf.c 17 May 2002 17:21:51 -0000 1.59 *************** *** 609,614 **** { int i, j; ! const XML_Char *outputDir = 0; ! const XML_Char *encoding = 0; unsigned processFlags = XML_MAP_FILE; int windowsCodePages = 0; --- 609,614 ---- { int i, j; ! const XML_Char *outputDir = NULL; ! const XML_Char *encoding = NULL; unsigned processFlags = XML_MAP_FILE; int windowsCodePages = 0; From fdrake@users.sourceforge.net Fri May 17 12:06:05 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 17 11:06:05 2002 Subject: [Expat-checkins] expat/lib xmltok.c,1.9,1.10 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv27220/lib Modified Files: xmltok.c Log Message: Include a more reasonable definition of the UTF8_INVALID3() macro. It still is not used anywhere, though. ;-( Index: xmltok.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** xmltok.c 26 Apr 2002 05:14:20 -0000 1.9 --- xmltok.c 17 May 2002 18:05:06 -0000 1.10 *************** *** 68,76 **** #define UTF8_INVALID3(p) \ ! ((*p) == 0xED \ ! ? (((p)[1] & 0x20) != 0) \ ! : ((*p) == 0xEF \ ! ? ((p)[1] == 0xBF && ((p)[2] == 0xBF || (p)[2] == 0xBE)) \ ! : 0)) #define UTF8_INVALID4(p) ((*p) == 0xF4 && ((p)[1] & 0x30) != 0) --- 68,74 ---- #define UTF8_INVALID3(p) \ ! ((((*p) && 0xF0) == 0xE0) \ ! && (((p)[1] && 0xC0) == 0x80) \ ! && (((p)[2] && 0xC0) == 0x80)) #define UTF8_INVALID4(p) ((*p) == 0xF4 && ((p)[1] & 0x30) != 0) From fdrake@users.sourceforge.net Fri May 17 12:18:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 17 11:18:02 2002 Subject: [Expat-checkins] expat/lib xmltok.c,1.10,1.11 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv31108/lib Modified Files: xmltok.c Log Message: Minor nit; layout function signatures in a more consistent way. Index: xmltok.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** xmltok.c 17 May 2002 18:05:06 -0000 1.10 --- xmltok.c 17 May 2002 18:17:33 -0000 1.11 *************** *** 74,91 **** #define UTF8_INVALID4(p) ((*p) == 0xF4 && ((p)[1] & 0x30) != 0) ! static ! int isNever(const ENCODING *enc, const char *p) { return 0; } ! static ! int utf8_isName2(const ENCODING *enc, const char *p) { return UTF8_GET_NAMING2(namePages, (const unsigned char *)p); } ! static ! int utf8_isName3(const ENCODING *enc, const char *p) { return UTF8_GET_NAMING3(namePages, (const unsigned char *)p); --- 74,91 ---- #define UTF8_INVALID4(p) ((*p) == 0xF4 && ((p)[1] & 0x30) != 0) ! static int ! isNever(const ENCODING *enc, const char *p) { return 0; } ! static int ! utf8_isName2(const ENCODING *enc, const char *p) { return UTF8_GET_NAMING2(namePages, (const unsigned char *)p); } ! static int ! utf8_isName3(const ENCODING *enc, const char *p) { return UTF8_GET_NAMING3(namePages, (const unsigned char *)p); *************** *** 94,105 **** #define utf8_isName4 isNever ! static ! int utf8_isNmstrt2(const ENCODING *enc, const char *p) { return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p); } ! static ! int utf8_isNmstrt3(const ENCODING *enc, const char *p) { return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p); --- 94,105 ---- #define utf8_isName4 isNever ! static int ! utf8_isNmstrt2(const ENCODING *enc, const char *p) { return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p); } ! static int ! utf8_isNmstrt3(const ENCODING *enc, const char *p) { return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p); *************** *** 110,121 **** #define utf8_isInvalid2 isNever ! static ! int utf8_isInvalid3(const ENCODING *enc, const char *p) { return UTF8_INVALID3((const unsigned char *)p); } ! static ! int utf8_isInvalid4(const ENCODING *enc, const char *p) { return UTF8_INVALID4((const unsigned char *)p); --- 110,121 ---- #define utf8_isInvalid2 isNever ! static int ! utf8_isInvalid3(const ENCODING *enc, const char *p) { return UTF8_INVALID3((const unsigned char *)p); } ! static int ! utf8_isInvalid4(const ENCODING *enc, const char *p) { return UTF8_INVALID4((const unsigned char *)p); *************** *** 190,195 **** #ifdef XML_MIN_SIZE ! static ! int sb_byteType(const ENCODING *enc, const char *p) { return SB_BYTE_TYPE(enc, p); --- 190,195 ---- #ifdef XML_MIN_SIZE ! static int ! sb_byteType(const ENCODING *enc, const char *p) { return SB_BYTE_TYPE(enc, p); *************** *** 204,209 **** #define BYTE_TO_ASCII(enc, p) \ (((const struct normal_encoding *)(enc))->byteToAscii(enc, p)) ! static ! int sb_byteToAscii(const ENCODING *enc, const char *p) { return *p; --- 204,209 ---- #define BYTE_TO_ASCII(enc, p) \ (((const struct normal_encoding *)(enc))->byteToAscii(enc, p)) ! static int ! sb_byteToAscii(const ENCODING *enc, const char *p) { return *p; *************** *** 233,238 **** #define CHAR_MATCHES(enc, p, c) \ (((const struct normal_encoding *)(enc))->charMatches(enc, p, c)) ! static ! int sb_charMatches(const ENCODING *enc, const char *p, int c) { return *p == c; --- 233,238 ---- #define CHAR_MATCHES(enc, p, c) \ (((const struct normal_encoding *)(enc))->charMatches(enc, p, c)) ! static int ! sb_charMatches(const ENCODING *enc, const char *p, int c) { return *p == c; *************** *** 263,270 **** }; ! static ! void utf8_toUtf8(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! char **toP, const char *toLim) { char *to; --- 263,270 ---- }; ! static void ! utf8_toUtf8(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! char **toP, const char *toLim) { char *to; *************** *** 282,289 **** } ! static ! void utf8_toUtf16(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! unsigned short **toP, const unsigned short *toLim) { unsigned short *to = *toP; --- 282,289 ---- } ! static void ! utf8_toUtf16(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! unsigned short **toP, const unsigned short *toLim) { unsigned short *to = *toP; *************** *** 369,376 **** }; ! static ! void latin1_toUtf8(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! char **toP, const char *toLim) { for (;;) { --- 369,376 ---- }; ! static void ! latin1_toUtf8(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! char **toP, const char *toLim) { for (;;) { *************** *** 394,401 **** } ! static ! void latin1_toUtf16(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! unsigned short **toP, const unsigned short *toLim) { while (*fromP != fromLim && *toP != toLim) --- 394,401 ---- } ! static void ! latin1_toUtf16(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! unsigned short **toP, const unsigned short *toLim) { while (*fromP != fromLim && *toP != toLim) *************** *** 427,434 **** }; ! static ! void ascii_toUtf8(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! char **toP, const char *toLim) { while (*fromP != fromLim && *toP != toLim) --- 427,434 ---- }; ! static void ! ascii_toUtf8(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! char **toP, const char *toLim) { while (*fromP != fromLim && *toP != toLim) *************** *** 460,464 **** }; ! static int unicode_byte_type(char hi, char lo) { switch ((unsigned char)hi) { --- 460,465 ---- }; ! static int ! unicode_byte_type(char hi, char lo) { switch ((unsigned char)hi) { *************** *** 479,484 **** #define DEFINE_UTF16_TO_UTF8(E) \ ! static \ ! void E ## toUtf8(const ENCODING *enc, \ const char **fromP, const char *fromLim, \ char **toP, const char *toLim) \ --- 480,485 ---- #define DEFINE_UTF16_TO_UTF8(E) \ ! static void \ ! E ## toUtf8(const ENCODING *enc, \ const char **fromP, const char *fromLim, \ char **toP, const char *toLim) \ *************** *** 542,547 **** #define DEFINE_UTF16_TO_UTF16(E) \ ! static \ ! void E ## toUtf16(const ENCODING *enc, \ const char **fromP, const char *fromLim, \ unsigned short **toP, const unsigned short *toLim) \ --- 543,548 ---- #define DEFINE_UTF16_TO_UTF16(E) \ ! static void \ ! E ## toUtf16(const ENCODING *enc, \ const char **fromP, const char *fromLim, \ unsigned short **toP, const unsigned short *toLim) \ *************** *** 592,621 **** #ifdef XML_MIN_SIZE ! static ! int little2_byteType(const ENCODING *enc, const char *p) { return LITTLE2_BYTE_TYPE(enc, p); } ! static ! int little2_byteToAscii(const ENCODING *enc, const char *p) { return LITTLE2_BYTE_TO_ASCII(enc, p); } ! static ! int little2_charMatches(const ENCODING *enc, const char *p, int c) { return LITTLE2_CHAR_MATCHES(enc, p, c); } ! static ! int little2_isNameMin(const ENCODING *enc, const char *p) { return LITTLE2_IS_NAME_CHAR_MINBPC(enc, p); } ! static ! int little2_isNmstrtMin(const ENCODING *enc, const char *p) { return LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p); --- 593,622 ---- #ifdef XML_MIN_SIZE ! static int ! little2_byteType(const ENCODING *enc, const char *p) { return LITTLE2_BYTE_TYPE(enc, p); } ! static int ! little2_byteToAscii(const ENCODING *enc, const char *p) { return LITTLE2_BYTE_TO_ASCII(enc, p); } ! static int ! little2_charMatches(const ENCODING *enc, const char *p, int c) { return LITTLE2_CHAR_MATCHES(enc, p, c); } ! static int ! little2_isNameMin(const ENCODING *enc, const char *p) { return LITTLE2_IS_NAME_CHAR_MINBPC(enc, p); } ! static int ! little2_isNmstrtMin(const ENCODING *enc, const char *p) { return LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p); *************** *** 731,760 **** #ifdef XML_MIN_SIZE ! static ! int big2_byteType(const ENCODING *enc, const char *p) { return BIG2_BYTE_TYPE(enc, p); } ! static ! int big2_byteToAscii(const ENCODING *enc, const char *p) { return BIG2_BYTE_TO_ASCII(enc, p); } ! static ! int big2_charMatches(const ENCODING *enc, const char *p, int c) { return BIG2_CHAR_MATCHES(enc, p, c); } ! static ! int big2_isNameMin(const ENCODING *enc, const char *p) { return BIG2_IS_NAME_CHAR_MINBPC(enc, p); } ! static ! int big2_isNmstrtMin(const ENCODING *enc, const char *p) { return BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p); --- 732,761 ---- #ifdef XML_MIN_SIZE ! static int ! big2_byteType(const ENCODING *enc, const char *p) { return BIG2_BYTE_TYPE(enc, p); } ! static int ! big2_byteToAscii(const ENCODING *enc, const char *p) { return BIG2_BYTE_TO_ASCII(enc, p); } ! static int ! big2_charMatches(const ENCODING *enc, const char *p, int c) { return BIG2_CHAR_MATCHES(enc, p, c); } ! static int ! big2_isNameMin(const ENCODING *enc, const char *p) { return BIG2_IS_NAME_CHAR_MINBPC(enc, p); } ! static int ! big2_isNmstrtMin(const ENCODING *enc, const char *p) { return BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p); *************** *** 858,863 **** #undef PREFIX ! static ! int streqci(const char *s1, const char *s2) { for (;;) { --- 859,864 ---- #undef PREFIX ! static int ! streqci(const char *s1, const char *s2) { for (;;) { *************** *** 876,888 **** } ! static ! void initUpdatePosition(const ENCODING *enc, const char *ptr, ! const char *end, POSITION *pos) { normal_updatePosition(&utf8_encoding.enc, ptr, end, pos); } ! static ! int toAscii(const ENCODING *enc, const char *ptr, const char *end) { char buf[1]; --- 877,889 ---- } ! static void ! initUpdatePosition(const ENCODING *enc, const char *ptr, ! const char *end, POSITION *pos) { normal_updatePosition(&utf8_encoding.enc, ptr, end, pos); } ! static int ! toAscii(const ENCODING *enc, const char *ptr, const char *end) { char buf[1]; *************** *** 895,900 **** } ! static ! int isSpace(int c) { switch (c) { --- 896,901 ---- } ! static int ! isSpace(int c) { switch (c) { *************** *** 910,921 **** /* Return 1 if there's just optional white space or there's an S followed by name=val. */ ! static ! int parsePseudoAttribute(const ENCODING *enc, ! const char *ptr, ! const char *end, ! const char **namePtr, ! const char **nameEndPtr, ! const char **valPtr, ! const char **nextTokPtr) { int c; --- 911,922 ---- /* Return 1 if there's just optional white space or there's an S followed by name=val. */ ! static int ! parsePseudoAttribute(const ENCODING *enc, ! const char *ptr, ! const char *end, ! const char **namePtr, ! const char **nameEndPtr, ! const char **valPtr, ! const char **nextTokPtr) { int c; *************** *** 1016,1033 **** }; ! static ! int doParseXmlDecl(const ENCODING *(*encodingFinder)(const ENCODING *, ! const char *, ! const char *), ! int isGeneralTextEntity, ! const ENCODING *enc, ! const char *ptr, ! const char *end, ! const char **badPtr, ! const char **versionPtr, ! const char **versionEndPtr, ! const char **encodingName, ! const ENCODING **encoding, ! int *standalone) { const char *val = 0; --- 1017,1034 ---- }; ! static int ! doParseXmlDecl(const ENCODING *(*encodingFinder)(const ENCODING *, ! const char *, ! const char *), ! int isGeneralTextEntity, ! const ENCODING *enc, ! const char *ptr, ! const char *end, ! const char **badPtr, ! const char **versionPtr, ! const char **versionEndPtr, ! const char **encodingName, ! const ENCODING **encoding, ! int *standalone) { const char *val = 0; *************** *** 1108,1113 **** } ! static ! int checkCharRefNumber(int result) { switch (result >> 8) { --- 1109,1114 ---- } ! static int ! checkCharRefNumber(int result) { switch (result >> 8) { *************** *** 1127,1131 **** } ! int XmlUtf8Encode(int c, char *buf) { enum { --- 1128,1133 ---- } ! int ! XmlUtf8Encode(int c, char *buf) { enum { *************** *** 1163,1167 **** } ! int XmlUtf16Encode(int charNum, unsigned short *buf) { if (charNum < 0) --- 1165,1170 ---- } ! int ! XmlUtf16Encode(int charNum, unsigned short *buf) { if (charNum < 0) *************** *** 1188,1198 **** }; ! int XmlSizeOfUnknownEncoding(void) { return sizeof(struct unknown_encoding); } ! static ! int unknown_isName(const ENCODING *enc, const char *p) { int c = ((const struct unknown_encoding *)enc) --- 1191,1202 ---- }; ! int ! XmlSizeOfUnknownEncoding(void) { return sizeof(struct unknown_encoding); } ! static int ! unknown_isName(const ENCODING *enc, const char *p) { int c = ((const struct unknown_encoding *)enc) *************** *** 1203,1208 **** } ! static ! int unknown_isNmstrt(const ENCODING *enc, const char *p) { int c = ((const struct unknown_encoding *)enc) --- 1207,1212 ---- } ! static int ! unknown_isNmstrt(const ENCODING *enc, const char *p) { int c = ((const struct unknown_encoding *)enc) *************** *** 1213,1218 **** } ! static ! int unknown_isInvalid(const ENCODING *enc, const char *p) { int c = ((const struct unknown_encoding *)enc) --- 1217,1222 ---- } ! static int ! unknown_isInvalid(const ENCODING *enc, const char *p) { int c = ((const struct unknown_encoding *)enc) *************** *** 1221,1228 **** } ! static ! void unknown_toUtf8(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! char **toP, const char *toLim) { char buf[XML_UTF8_ENCODE_MAX]; --- 1225,1232 ---- } ! static void ! unknown_toUtf8(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! char **toP, const char *toLim) { char buf[XML_UTF8_ENCODE_MAX]; *************** *** 1256,1263 **** } ! static ! void unknown_toUtf16(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! unsigned short **toP, const unsigned short *toLim) { while (*fromP != fromLim && *toP != toLim) { --- 1260,1267 ---- } ! static void ! unknown_toUtf16(const ENCODING *enc, ! const char **fromP, const char *fromLim, ! unsigned short **toP, const unsigned short *toLim) { while (*fromP != fromLim && *toP != toLim) { *************** *** 1392,1397 **** }; ! static ! int getEncodingIndex(const char *name) { static const char *encodingNames[] = { --- 1396,1401 ---- }; ! static int ! getEncodingIndex(const char *name) { static const char *encodingNames[] = { *************** *** 1427,1437 **** ! static ! int initScan(const ENCODING **encodingTable, ! const INIT_ENCODING *enc, ! int state, ! const char *ptr, ! const char *end, ! const char **nextTokPtr) { const ENCODING **encPtr; --- 1431,1441 ---- ! static int ! initScan(const ENCODING **encodingTable, ! const INIT_ENCODING *enc, ! int state, ! const char *ptr, ! const char *end, ! const char **nextTokPtr) { const ENCODING **encPtr; From fdrake@users.sourceforge.net Fri May 17 12:48:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 17 11:48:02 2002 Subject: [Expat-checkins] expat/lib xmltok.c,1.11,1.12 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv7136/lib Modified Files: xmltok.c Log Message: Using "0" instead of "NULL" is insane, and leads to unmaintainable code. Fix a number of other "code-hygiene" consistency nits. Index: xmltok.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** xmltok.c 17 May 2002 18:17:33 -0000 1.11 --- xmltok.c 17 May 2002 18:47:53 -0000 1.12 *************** *** 1,5 **** ! /* ! Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd ! See the file COPYING for copying permission. */ --- 1,4 ---- ! /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd ! See the file COPYING for copying permission. */ *************** *** 38,45 **** (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1 << ((lo) & 0x1F))) ! /* A 2 byte UTF-8 representation splits the characters 11 bits ! between the bottom 5 and 6 bits of the bytes. ! We need 8 bits to index into pages, 3 bits to add to that index and ! 5 bits to generate the mask. */ #define UTF8_GET_NAMING2(pages, byte) \ (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3) \ --- 37,44 ---- (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1 << ((lo) & 0x1F))) ! /* A 2 byte UTF-8 representation splits the characters 11 bits between ! the bottom 5 and 6 bits of the bytes. We need 8 bits to index into ! pages, 3 bits to add to that index and 5 bits to generate the mask. ! */ #define UTF8_GET_NAMING2(pages, byte) \ (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3) \ *************** *** 48,55 **** & (1 << (((byte)[1]) & 0x1F))) ! /* A 3 byte UTF-8 representation splits the characters 16 bits ! between the bottom 4, 6 and 6 bits of the bytes. ! We need 8 bits to index into pages, 3 bits to add to that index and ! 5 bits to generate the mask. */ #define UTF8_GET_NAMING3(pages, byte) \ (namingBitmap[((pages)[((((byte)[0]) & 0xF) << 4) \ --- 47,55 ---- & (1 << (((byte)[1]) & 0x1F))) ! /* A 3 byte UTF-8 representation splits the characters 16 bits between ! the bottom 4, 6 and 6 bits of the bytes. We need 8 bits to index ! into pages, 3 bits to add to that index and 5 bits to generate the ! mask. ! */ #define UTF8_GET_NAMING3(pages, byte) \ (namingBitmap[((pages)[((((byte)[0]) & 0xF) << 4) \ *************** *** 482,487 **** static void \ E ## toUtf8(const ENCODING *enc, \ ! const char **fromP, const char *fromLim, \ ! char **toP, const char *toLim) \ { \ const char *from; \ --- 482,487 ---- static void \ E ## toUtf8(const ENCODING *enc, \ ! const char **fromP, const char *fromLim, \ ! char **toP, const char *toLim) \ { \ const char *from; \ *************** *** 545,550 **** static void \ E ## toUtf16(const ENCODING *enc, \ ! const char **fromP, const char *fromLim, \ ! unsigned short **toP, const unsigned short *toLim) \ { \ /* Avoid copying first half only of surrogate */ \ --- 545,550 ---- static void \ E ## toUtf16(const ENCODING *enc, \ ! const char **fromP, const char *fromLim, \ ! unsigned short **toP, const unsigned short *toLim) \ { \ /* Avoid copying first half only of surrogate */ \ *************** *** 909,914 **** } ! /* Return 1 if there's just optional white space ! or there's an S followed by name=val. */ static int parsePseudoAttribute(const ENCODING *enc, --- 909,915 ---- } ! /* Return 1 if there's just optional white space or there's an S ! followed by name=val. ! */ static int parsePseudoAttribute(const ENCODING *enc, *************** *** 923,927 **** char open; if (ptr == end) { ! *namePtr = 0; return 1; } --- 924,928 ---- char open; if (ptr == end) { ! *namePtr = NULL; return 1; } *************** *** 934,938 **** } while (isSpace(toAscii(enc, ptr, end))); if (ptr == end) { ! *namePtr = 0; return 1; } --- 935,939 ---- } while (isSpace(toAscii(enc, ptr, end))); if (ptr == end) { ! *namePtr = NULL; return 1; } *************** *** 1032,1038 **** int *standalone) { ! const char *val = 0; ! const char *name = 0; ! const char *nameEnd = 0; ptr += 5 * enc->minBytesPerChar; end -= 2 * enc->minBytesPerChar; --- 1033,1039 ---- int *standalone) { ! const char *val = NULL; ! const char *name = NULL; ! const char *nameEnd = NULL; ptr += 5 * enc->minBytesPerChar; end -= 2 * enc->minBytesPerChar; *************** *** 1408,1412 **** }; int i; ! if (name == 0) return NO_ENC; for (i = 0; i < (int)(sizeof(encodingNames)/sizeof(encodingNames[0])); i++) --- 1409,1413 ---- }; int i; ! if (name == NULL) return NO_ENC; for (i = 0; i < (int)(sizeof(encodingNames)/sizeof(encodingNames[0])); i++) *************** *** 1502,1506 **** and this is an external text entity, don't look for the BOM, ! because it might be a legal data. */ if (state == XML_CONTENT_STATE) { int e = INIT_ENC_INDEX(enc); --- 1503,1508 ---- and this is an external text entity, don't look for the BOM, ! because it might be a legal data. ! */ if (state == XML_CONTENT_STATE) { int e = INIT_ENC_INDEX(enc); *************** *** 1538,1542 **** by assuming UTF-16LE. But we don't, because this would mean when presented just with a single byte, we couldn't reliably determine ! whether we needed further bytes. */ if (state == XML_CONTENT_STATE) break; --- 1540,1545 ---- by assuming UTF-16LE. But we don't, because this would mean when presented just with a single byte, we couldn't reliably determine ! whether we needed further bytes. ! */ if (state == XML_CONTENT_STATE) break; From fdrake@users.sourceforge.net Fri May 17 12:56:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 17 11:56:02 2002 Subject: [Expat-checkins] expat/xmltok .cvsignore,1.1,NONE dllmain.c,1.7,NONE xmltok.c,1.58,NONE xmltok.dsp,1.8,NONE Message-ID: Update of /cvsroot/expat/expat/xmltok In directory usw-pr-cvs1:/tmp/cvs-serv9096 Removed Files: .cvsignore dllmain.c xmltok.c xmltok.dsp Log Message: Remove unused files. --- .cvsignore DELETED --- --- dllmain.c DELETED --- --- xmltok.c DELETED --- --- xmltok.dsp DELETED --- From fdrake@users.sourceforge.net Fri May 17 13:14:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 17 12:14:02 2002 Subject: [Expat-checkins] expat/lib xmltok.h,1.3,1.4 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv14821/lib Modified Files: xmltok.h Log Message: Code hygiene edits. Index: xmltok.h =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xmltok.h 28 Sep 2000 17:53:00 -0000 1.3 --- xmltok.h 17 May 2002 19:12:54 -0000 1.4 *************** *** 1,5 **** ! /* ! Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd ! See the file COPYING for copying permission. */ --- 1,4 ---- ! /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd ! See the file COPYING for copying permission. */ *************** *** 12,28 **** /* The following token may be returned by XmlContentTok */ ! #define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be start of ! illegal ]]> sequence */ ! /* The following tokens may be returned by both XmlPrologTok and XmlContentTok */ ! #define XML_TOK_NONE -4 /* The string to be scanned is empty */ ! #define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan; ! might be part of CRLF sequence */ ! #define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */ ! #define XML_TOK_PARTIAL -1 /* only part of a token */ #define XML_TOK_INVALID 0 /* The following tokens are returned by XmlContentTok; some are also ! returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok */ ! #define XML_TOK_START_TAG_WITH_ATTS 1 #define XML_TOK_START_TAG_NO_ATTS 2 --- 11,29 ---- /* The following token may be returned by XmlContentTok */ ! #define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be ! start of illegal ]]> sequence */ ! /* The following tokens may be returned by both XmlPrologTok and ! XmlContentTok. ! */ ! #define XML_TOK_NONE -4 /* The string to be scanned is empty */ ! #define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan; ! might be part of CRLF sequence */ ! #define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */ ! #define XML_TOK_PARTIAL -1 /* only part of a token */ #define XML_TOK_INVALID 0 /* The following tokens are returned by XmlContentTok; some are also ! returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok. ! */ #define XML_TOK_START_TAG_WITH_ATTS 1 #define XML_TOK_START_TAG_NO_ATTS 2 *************** *** 34,53 **** #define XML_TOK_CDATA_SECT_OPEN 8 #define XML_TOK_ENTITY_REF 9 ! #define XML_TOK_CHAR_REF 10 /* numeric character reference */ ! /* The following tokens may be returned by both XmlPrologTok and XmlContentTok */ ! #define XML_TOK_PI 11 /* processing instruction */ ! #define XML_TOK_XML_DECL 12 /* XML decl or text decl */ #define XML_TOK_COMMENT 13 ! #define XML_TOK_BOM 14 /* Byte order mark */ /* The following tokens are returned only by XmlPrologTok */ #define XML_TOK_PROLOG_S 15 ! #define XML_TOK_DECL_OPEN 16 /* */ #define XML_TOK_NAME 18 #define XML_TOK_NMTOKEN 19 ! #define XML_TOK_POUND_NAME 20 /* #name */ ! #define XML_TOK_OR 21 /* | */ #define XML_TOK_PERCENT 22 #define XML_TOK_OPEN_PAREN 23 --- 35,56 ---- #define XML_TOK_CDATA_SECT_OPEN 8 #define XML_TOK_ENTITY_REF 9 ! #define XML_TOK_CHAR_REF 10 /* numeric character reference */ ! /* The following tokens may be returned by both XmlPrologTok and ! XmlContentTok. ! */ ! #define XML_TOK_PI 11 /* processing instruction */ ! #define XML_TOK_XML_DECL 12 /* XML decl or text decl */ #define XML_TOK_COMMENT 13 ! #define XML_TOK_BOM 14 /* Byte order mark */ /* The following tokens are returned only by XmlPrologTok */ #define XML_TOK_PROLOG_S 15 ! #define XML_TOK_DECL_OPEN 16 /* */ #define XML_TOK_NAME 18 #define XML_TOK_NMTOKEN 19 ! #define XML_TOK_POUND_NAME 20 /* #name */ ! #define XML_TOK_OR 21 /* | */ #define XML_TOK_PERCENT 22 #define XML_TOK_OPEN_PAREN 23 *************** *** 60,71 **** /* The following occur only in element type declarations */ ! #define XML_TOK_NAME_QUESTION 30 /* name? */ ! #define XML_TOK_NAME_ASTERISK 31 /* name* */ ! #define XML_TOK_NAME_PLUS 32 /* name+ */ ! #define XML_TOK_COND_SECT_OPEN 33 /* */ ! #define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */ ! #define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */ ! #define XML_TOK_CLOSE_PAREN_PLUS 37 /* )+ */ #define XML_TOK_COMMA 38 --- 63,74 ---- /* The following occur only in element type declarations */ ! #define XML_TOK_NAME_QUESTION 30 /* name? */ ! #define XML_TOK_NAME_ASTERISK 31 /* name* */ ! #define XML_TOK_NAME_PLUS 32 /* name+ */ ! #define XML_TOK_COND_SECT_OPEN 33 /* */ ! #define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */ ! #define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */ ! #define XML_TOK_CLOSE_PAREN_PLUS 37 /* )+ */ #define XML_TOK_COMMA 38 *************** *** 76,81 **** #define XML_TOK_CDATA_SECT_CLOSE 40 ! /* With namespace processing this is returned by XmlPrologTok ! for a name with a colon. */ #define XML_TOK_PREFIXED_NAME 41 --- 79,85 ---- #define XML_TOK_CDATA_SECT_CLOSE 40 ! /* With namespace processing this is returned by XmlPrologTok for a ! name with a colon. ! */ #define XML_TOK_PREFIXED_NAME 41 *************** *** 162,183 **** }; ! /* ! Scan the string starting at ptr until the end of the next complete token, ! but do not scan past eptr. Return an integer giving the type of token. ! Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set. ! Return XML_TOK_PARTIAL when the string does not contain a complete token; ! nextTokPtr will not be set. ! Return XML_TOK_INVALID when the string does not start a valid token; nextTokPtr ! will be set to point to the character which made the token invalid. ! Otherwise the string starts with a valid token; nextTokPtr will be set to point ! to the character following the end of that token. ! Each data character counts as a single token, but adjacent data characters ! may be returned together. Similarly for characters in the prolog outside ! literals, comments and processing instructions. */ --- 166,188 ---- }; ! /* Scan the string starting at ptr until the end of the next complete ! token, but do not scan past eptr. Return an integer giving the ! type of token. ! Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set. ! Return XML_TOK_PARTIAL when the string does not contain a complete ! token; nextTokPtr will not be set. ! Return XML_TOK_INVALID when the string does not start a valid ! token; nextTokPtr will be set to point to the character which made ! the token invalid. ! Otherwise the string starts with a valid token; nextTokPtr will be ! set to point to the character following the end of that token. ! Each data character counts as a single token, but adjacent data ! characters may be returned together. Similarly for characters in ! the prolog outside literals, comments and processing instructions. */ *************** *** 202,208 **** #endif /* XML_DTD */ ! /* This is used for performing a 2nd-level tokenization on ! the content of a literal that has already been returned by XmlTok. */ ! #define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \ (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr)) --- 207,213 ---- #endif /* XML_DTD */ ! /* This is used for performing a 2nd-level tokenization on the content ! of a literal that has already been returned by XmlTok. ! */ #define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \ (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr)) From gstein@users.sourceforge.net Fri May 17 15:17:04 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Fri May 17 14:17:04 2002 Subject: [Expat-checkins] expat/xmlparse .cvsignore,1.2,NONE xmlparse.cpp,1.1,NONE xmlparse.dsp,1.8,NONE xmlparse.hpp,1.2,NONE Message-ID: Update of /cvsroot/expat/expat/xmlparse In directory usw-pr-cvs1:/tmp/cvs-serv19065 Removed Files: .cvsignore xmlparse.cpp xmlparse.dsp xmlparse.hpp Log Message: These files are unmaintained, so I'm removing them. If somebody wants to restart a C++ Expat, they should use the current sources. Of course, these will always be available in the CVS repository for historical purposes and for recovery. --- .cvsignore DELETED --- --- xmlparse.cpp DELETED --- --- xmlparse.dsp DELETED --- --- xmlparse.hpp DELETED --- From gstein@users.sourceforge.net Fri May 17 15:24:02 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Fri May 17 14:24:02 2002 Subject: [Expat-checkins] expat/lib expat.h,1.17,1.18 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv21024 Modified Files: expat.h Log Message: follow Fred's footsteps and reformat the copyright header. Index: expat.h =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** expat.h 24 Apr 2002 03:36:23 -0000 1.17 --- expat.h 17 May 2002 21:23:35 -0000 1.18 *************** *** 1,5 **** ! /* ! Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd ! See the file COPYING for copying permission. */ --- 1,4 ---- ! /* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd ! See the file COPYING for copying permission. */ From gstein@users.sourceforge.net Fri May 17 15:31:02 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Fri May 17 14:31:02 2002 Subject: [Expat-checkins] expat MANIFEST,1.10,1.11 Makefile.in,1.29,1.30 acconfig.h,1.1,1.2 configure.in,1.27,1.28 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv21322 Modified Files: MANIFEST Makefile.in acconfig.h configure.in Log Message: Various configuration fixes, focused primarily around expat_config.h (which used to be called config.h) * configure.in: - change the header name to expat_config.h to prevent any possible conflict with some other packages 'config.h' - add a prerequisite on autoconf 2.50 or newer - shift some acconfig.h values to AC_DEFINE() values * MANIFEST: - rename config.h.in to expat_config.h.in * Makefile.in: - clean out expat_config.h* instead of config.h* * acconfig.h: - remove the XML_NS, XML_DTD, and XML_CONTEXT_BYTES symbols; they are now defined directly by configure.in - shift the memmove() compatibility to xmlparse.c, its only consumer - remove the @BOTTOM@ part since there are no more values to put at the bottom of expat_config.h.in via acconfig.h * xmlparse.c: - switch from config.h to expat_config.h - insert macro to define memmove() if it isn't available, but bcopy() is available. also, changed one branch to #error rather than insert bogus code. * xmlrole.c: - tweak the copyright header, per Fred-ism - remove the unused RCSId[] variable (no other file has these) - switch from config.h to expat_config.h * xmltok.c: - switch from config.h to expat_config.h Index: MANIFEST =================================================================== RCS file: /cvsroot/expat/expat/MANIFEST,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MANIFEST 16 Apr 2002 03:24:48 -0000 1.10 --- MANIFEST 17 May 2002 21:30:06 -0000 1.11 *************** *** 4,10 **** Makefile.in README - config.h.in configure configure.in conftools/PrintPath conftools/ac_c_bigendian_cross.m4 --- 4,10 ---- Makefile.in README configure configure.in + expat_config.h.in conftools/PrintPath conftools/ac_c_bigendian_cross.m4 Index: Makefile.in =================================================================== RCS file: /cvsroot/expat/expat/Makefile.in,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Makefile.in 17 May 2002 14:12:25 -0000 1.29 --- Makefile.in 17 May 2002 21:30:06 -0000 1.30 *************** *** 67,75 **** distclean: clean ! rm -f config.h config.status config.log config.cache libtool rm -f Makefile extraclean: distclean ! rm -f config.h.in configure rm -f conftools/config.guess conftools/config.sub rm -f conftools/ltconfig conftools/ltmain.sh --- 67,75 ---- distclean: clean ! rm -f expat_config.h config.status config.log config.cache libtool rm -f Makefile extraclean: distclean ! rm -f expat_config.h.in configure rm -f conftools/config.guess conftools/config.sub rm -f conftools/ltconfig conftools/ltmain.sh Index: acconfig.h =================================================================== RCS file: /cvsroot/expat/expat/acconfig.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** acconfig.h 10 Mar 2001 15:41:49 -0000 1.1 --- acconfig.h 17 May 2002 21:30:06 -0000 1.2 *************** *** 6,23 **** #define XML_BYTE_ORDER 12 #endif - - @BOTTOM@ - - #define XML_NS - #define XML_DTD - - #define XML_CONTEXT_BYTES 1024 - - #ifndef HAVE_MEMMOVE - #ifdef HAVE_BCOPY - #define memmove(d,s,l) bcopy((s),(d),(l)) - #else - #define memmove(d,s,l) ;punting on memmove; - #endif - - #endif --- 6,7 ---- Index: configure.in =================================================================== RCS file: /cvsroot/expat/expat/configure.in,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** configure.in 20 Apr 2002 21:14:48 -0000 1.27 --- configure.in 17 May 2002 21:30:06 -0000 1.28 *************** *** 11,14 **** --- 11,17 ---- dnl + dnl Ensure that subversion is configured with autoconf 2.50 or newer + AC_PREREQ(2.50) + AC_INIT(Makefile.in) AC_CONFIG_AUX_DIR(conftools) *************** *** 30,34 **** LIBAGE=1 ! AC_CONFIG_HEADER(config.h) sinclude(conftools/libtool.m4) --- 33,37 ---- LIBAGE=1 ! AC_CONFIG_HEADER(expat_config.h) sinclude(conftools/libtool.m4) *************** *** 87,90 **** --- 90,101 ---- AC_CHECK_FUNCS(memmove bcopy) + + dnl some basic configuration + AC_DEFINE([XML_NS], 1, + [Define to make XML Namespaces functionality available.]) + AC_DEFINE([XML_DTD], 1, + [Define to make parameter entity parsing functionality available.]) + AC_DEFINE([XML_CONTEXT_BYTES], 1024, + [Define to specify how much context to retain around the current parse point.]) AC_OUTPUT(Makefile) From gstein@users.sourceforge.net Fri May 17 15:31:02 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Fri May 17 14:31:02 2002 Subject: [Expat-checkins] expat/lib xmlparse.c,1.35,1.36 xmlrole.c,1.5,1.6 xmltok.c,1.12,1.13 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv21322/lib Modified Files: xmlparse.c xmlrole.c xmltok.c Log Message: Various configuration fixes, focused primarily around expat_config.h (which used to be called config.h) * configure.in: - change the header name to expat_config.h to prevent any possible conflict with some other packages 'config.h' - add a prerequisite on autoconf 2.50 or newer - shift some acconfig.h values to AC_DEFINE() values * MANIFEST: - rename config.h.in to expat_config.h.in * Makefile.in: - clean out expat_config.h* instead of config.h* * acconfig.h: - remove the XML_NS, XML_DTD, and XML_CONTEXT_BYTES symbols; they are now defined directly by configure.in - shift the memmove() compatibility to xmlparse.c, its only consumer - remove the @BOTTOM@ part since there are no more values to put at the bottom of expat_config.h.in via acconfig.h * xmlparse.c: - switch from config.h to expat_config.h - insert macro to define memmove() if it isn't available, but bcopy() is available. also, changed one branch to #error rather than insert bogus code. * xmlrole.c: - tweak the copyright header, per Fred-ism - remove the unused RCSId[] variable (no other file has these) - switch from config.h to expat_config.h * xmltok.c: - switch from config.h to expat_config.h Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** xmlparse.c 17 May 2002 15:21:53 -0000 1.35 --- xmlparse.c 17 May 2002 21:30:07 -0000 1.36 *************** *** 1,5 **** ! /* ! Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd ! See the file COPYING for copying permission. */ --- 1,4 ---- ! /* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd ! See the file COPYING for copying permission. */ *************** *** 10,14 **** # undef XMLPARSEAPI #else ! #include #ifdef __declspec --- 9,13 ---- # undef XMLPARSEAPI #else ! #include #ifdef __declspec *************** *** 74,77 **** --- 73,85 ---- /* Round up n to be a multiple of sz, where sz is a power of 2. */ #define ROUND_UP(n, sz) (((n) + ((sz) - 1)) & ~((sz) - 1)) + + /* Handle the case where memmove() doesn't exist. */ + #ifndef HAVE_MEMMOVE + #ifdef HAVE_BCOPY + #define memmove(d,s,l) bcopy((s),(d),(l)) + #else + #error memmove does not exist on this platform, nor is a substitute available + #endif /* HAVE_BCOPY */ + #endif /* HAVE_MEMMOVE */ #include "xmltok.h" Index: xmlrole.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlrole.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** xmlrole.c 22 Oct 2000 19:20:23 -0000 1.5 --- xmlrole.c 17 May 2002 21:30:07 -0000 1.6 *************** *** 1,14 **** ! /* ! Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd ! See the file COPYING for copying permission. */ - static char RCSId[] - = "$Header$"; - #ifdef COMPILED_FROM_DSP # include "winconfig.h" #else ! # include #endif /* ndef COMPILED_FROM_DSP */ --- 1,10 ---- ! /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd ! See the file COPYING for copying permission. */ #ifdef COMPILED_FROM_DSP # include "winconfig.h" #else ! # include #endif /* ndef COMPILED_FROM_DSP */ Index: xmltok.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** xmltok.c 17 May 2002 18:47:53 -0000 1.12 --- xmltok.c 17 May 2002 21:30:07 -0000 1.13 *************** *** 6,10 **** # include "winconfig.h" #else ! # include #endif /* ndef COMPILED_FROM_DSP */ --- 6,10 ---- # include "winconfig.h" #else ! # include #endif /* ndef COMPILED_FROM_DSP */ From gstein@users.sourceforge.net Fri May 17 15:36:02 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Fri May 17 14:36:02 2002 Subject: [Expat-checkins] expat .cvsignore,1.7,1.8 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv23629 Modified Files: .cvsignore Log Message: ignore the expat_config.h* files rather than config.h* Index: .cvsignore =================================================================== RCS file: /cvsroot/expat/expat/.cvsignore,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** .cvsignore 23 Aug 2001 11:27:26 -0000 1.7 --- .cvsignore 17 May 2002 21:35:12 -0000 1.8 *************** *** 4,9 **** config.log config.status ! config.h.in ! config.h libtool expat.ncb --- 4,9 ---- config.log config.status ! expat_config.h.in ! expat_config.h libtool expat.ncb From gstein@users.sourceforge.net Fri May 17 15:39:02 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Fri May 17 14:39:02 2002 Subject: [Expat-checkins] expat/lib expat.dsp,1.6,1.7 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv24252 Modified Files: expat.dsp Log Message: There is no lib/config.h file... Index: expat.dsp =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.dsp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** expat.dsp 23 Aug 2001 12:35:53 -0000 1.6 --- expat.dsp 17 May 2002 21:38:12 -0000 1.7 *************** *** 126,133 **** # Begin Source File - SOURCE=.\config.h - # End Source File - # Begin Source File - SOURCE=.\expat.h # End Source File --- 126,129 ---- From gstein@users.sourceforge.net Fri May 17 15:39:02 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Fri May 17 14:39:02 2002 Subject: [Expat-checkins] expat Makefile.in,1.30,1.31 buildconf.sh,1.6,1.7 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv24389 Modified Files: Makefile.in buildconf.sh Log Message: A couple more tweaks for config.h -> expat_config.h Index: Makefile.in =================================================================== RCS file: /cvsroot/expat/expat/Makefile.in,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Makefile.in 17 May 2002 21:30:06 -0000 1.30 --- Makefile.in 17 May 2002 21:38:44 -0000 1.31 *************** *** 119,131 **** lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \ ! $(top_builddir)/config.h lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \ ! $(top_builddir)/config.h lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \ lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \ lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \ ! $(top_builddir)/config.h --- 119,131 ---- lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \ ! $(top_builddir)/expat_config.h lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \ ! $(top_builddir)/expat_config.h lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \ lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \ lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \ ! $(top_builddir)/expat_config.h Index: buildconf.sh =================================================================== RCS file: /cvsroot/expat/expat/buildconf.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** buildconf.sh 10 May 2002 00:10:57 -0000 1.6 --- buildconf.sh 17 May 2002 21:38:44 -0000 1.7 *************** *** 33,39 **** # ! # Generate the autoconf header template (config.h.in) and ./configure # ! echo "Creating config.h.in ..." ${AUTOHEADER:-autoheader} --- 33,39 ---- # ! # Generate the autoconf header template (expat_config.h.in) and ./configure # ! echo "Creating expat_config.h.in ..." ${AUTOHEADER:-autoheader} From gstein@users.sourceforge.net Fri May 17 15:43:02 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Fri May 17 14:43:02 2002 Subject: [Expat-checkins] expat/lib winconfig.h,1.1,1.2 xmltok.c,1.13,1.14 xmltok_ns.c,1.2,1.3 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv24667/lib Modified Files: winconfig.h xmltok.c xmltok_ns.c Log Message: Remove acconfig.h altogether by removing XML_BYTE_ORDER. We can simply use the BYTEORDER constant that ac_c_bigendian_cross.m4 generates. * accconfig.h: removed; obsolete. * lib/winconfig.h: - set the BYTEORDER constant, rather than XML_BYTE_ORDER, and leave a note about what we're assuming. * lib/xmltok.c, lib/xmltok_ns.c: - change all XML_BYTE_ORDER references to BYTEORDER, and update the constants from 12, 21 to 1234, 4321 respectively. Index: winconfig.h =================================================================== RCS file: /cvsroot/expat/expat/lib/winconfig.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** winconfig.h 22 Oct 2000 19:20:23 -0000 1.1 --- winconfig.h 17 May 2002 21:42:05 -0000 1.2 *************** *** 6,11 **** ** it under the terms of the MIT/X license (contained in the COPYING file ** with this distribution.) - ** - ** */ --- 6,9 ---- *************** *** 22,27 **** #define XML_NS 1 #define XML_DTD 1 - #define XML_BYTE_ORDER 12 #define XML_CONTEXT_BYTES 1024 #endif /* ndef WINCONFIG_H */ --- 20,27 ---- #define XML_NS 1 #define XML_DTD 1 #define XML_CONTEXT_BYTES 1024 + + /* we will assume all Windows platforms are little endian */ + #define BYTEORDER 1234 #endif /* ndef WINCONFIG_H */ Index: xmltok.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** xmltok.c 17 May 2002 21:30:07 -0000 1.13 --- xmltok.c 17 May 2002 21:42:05 -0000 1.14 *************** *** 658,662 **** static const struct normal_encoding little2_encoding_ns = { { VTABLE, 2, 0, ! #if XML_BYTE_ORDER == 12 1 #else --- 658,662 ---- static const struct normal_encoding little2_encoding_ns = { { VTABLE, 2, 0, ! #if BYTEORDER == 1234 1 #else *************** *** 675,679 **** static const struct normal_encoding little2_encoding = { { VTABLE, 2, 0, ! #if XML_BYTE_ORDER == 12 1 #else --- 675,679 ---- static const struct normal_encoding little2_encoding = { { VTABLE, 2, 0, ! #if BYTEORDER == 1234 1 #else *************** *** 690,694 **** }; ! #if XML_BYTE_ORDER != 21 #ifdef XML_NS --- 690,694 ---- }; ! #if BYTEORDER != 4321 #ifdef XML_NS *************** *** 797,801 **** static const struct normal_encoding big2_encoding_ns = { { VTABLE, 2, 0, ! #if XML_BYTE_ORDER == 21 1 #else --- 797,801 ---- static const struct normal_encoding big2_encoding_ns = { { VTABLE, 2, 0, ! #if BYTEORDER == 4321 1 #else *************** *** 814,818 **** static const struct normal_encoding big2_encoding = { { VTABLE, 2, 0, ! #if XML_BYTE_ORDER == 21 1 #else --- 814,818 ---- static const struct normal_encoding big2_encoding = { { VTABLE, 2, 0, ! #if BYTEORDER == 4321 1 #else *************** *** 829,833 **** }; ! #if XML_BYTE_ORDER != 12 #ifdef XML_NS --- 829,833 ---- }; ! #if BYTEORDER != 1234 #ifdef XML_NS Index: xmltok_ns.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok_ns.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xmltok_ns.c 21 Sep 2000 21:20:18 -0000 1.2 --- xmltok_ns.c 17 May 2002 21:42:05 -0000 1.3 *************** *** 6,12 **** const ENCODING *NS(XmlGetUtf16InternalEncoding)(void) { ! #if XML_BYTE_ORDER == 12 return &ns(internal_little2_encoding).enc; ! #elif XML_BYTE_ORDER == 21 return &ns(internal_big2_encoding).enc; #else --- 6,12 ---- const ENCODING *NS(XmlGetUtf16InternalEncoding)(void) { ! #if BYTEORDER == 1234 return &ns(internal_little2_encoding).enc; ! #elif BYTEORDER == 4321 return &ns(internal_big2_encoding).enc; #else From gstein@users.sourceforge.net Fri May 17 15:43:02 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Fri May 17 14:43:02 2002 Subject: [Expat-checkins] expat acconfig.h,1.2,NONE Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv24667 Removed Files: acconfig.h Log Message: Remove acconfig.h altogether by removing XML_BYTE_ORDER. We can simply use the BYTEORDER constant that ac_c_bigendian_cross.m4 generates. * accconfig.h: removed; obsolete. * lib/winconfig.h: - set the BYTEORDER constant, rather than XML_BYTE_ORDER, and leave a note about what we're assuming. * lib/xmltok.c, lib/xmltok_ns.c: - change all XML_BYTE_ORDER references to BYTEORDER, and update the constants from 12, 21 to 1234, 4321 respectively. --- acconfig.h DELETED --- From gstein@users.sourceforge.net Fri May 17 18:28:01 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Fri May 17 17:28:01 2002 Subject: [Expat-checkins] expat Makefile.in,1.31,1.32 configure.in,1.28,1.29 make-release.sh,1.1,1.2 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv28608 Modified Files: Makefile.in configure.in make-release.sh Log Message: Add some cygwin fixes. * Makefile.in: - from cygwin: add -no-undefined to the library link line * conftools/get-version.sh: (new file) - script to extract the version number from expat.h * configure.in: (some from the cygwin patch) - update the prereq to 2.52 instead of just 2.50 - update the AC_INIT line to 2.52 standards: include the package name, version (with a lot of gunk to get this), and where to send bugs) - update the output file generation to 2.52 standards * make-release.sh: - update to use the new get-version.sh script * lib/expat.h: - from cygwin: add a little define for CYGWIN Index: Makefile.in =================================================================== RCS file: /cvsroot/expat/expat/Makefile.in,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Makefile.in 17 May 2002 21:38:44 -0000 1.31 --- Makefile.in 18 May 2002 00:26:59 -0000 1.32 *************** *** 111,115 **** COMPILE = $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES) LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) ! LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@ LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@ --- 111,115 ---- COMPILE = $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES) LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) ! LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@ LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@ Index: configure.in =================================================================== RCS file: /cvsroot/expat/expat/configure.in,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** configure.in 17 May 2002 21:30:06 -0000 1.28 --- configure.in 18 May 2002 00:26:59 -0000 1.29 *************** *** 11,18 **** dnl ! dnl Ensure that subversion is configured with autoconf 2.50 or newer ! AC_PREREQ(2.50) ! AC_INIT(Makefile.in) AC_CONFIG_AUX_DIR(conftools) --- 11,34 ---- dnl ! dnl Ensure that subversion is configured with autoconf 2.52 or newer ! AC_PREREQ(2.52) ! dnl Get the version number of Expat, using m4's esyscmd() command to run ! dnl the command at m4-generation time. This allows us to create an m4 ! dnl symbol holding the correct version number. AC_INIT() requires the ! dnl version number at m4-time, rather than when ./configure is run, so ! dnl all this must happen as part of m4, not as part of the shell code ! dnl contained in ./configure. ! dnl ! dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an appropriate ! dnl test. I believe this test will work, but I don't have a place with non- ! dnl GNU M4 to test it right now. ! define([expat_version], ifdef([__gnu__], ! [esyscmd(conftools/get-version.sh lib/expat.h)], ! [1.95.x])) ! AC_INIT(expat, expat_version, expat-bugs@lists.sourceforge.net) ! undefine([expat_version]) ! ! AC_CONFIG_SRCDIR(Makefile.in) AC_CONFIG_AUX_DIR(conftools) *************** *** 99,103 **** [Define to specify how much context to retain around the current parse point.]) ! AC_OUTPUT(Makefile) abs_srcdir="`cd $srcdir && pwd`" --- 115,120 ---- [Define to specify how much context to retain around the current parse point.]) ! AC_CONFIG_FILES(Makefile) ! AC_OUTPUT abs_srcdir="`cd $srcdir && pwd`" Index: make-release.sh =================================================================== RCS file: /cvsroot/expat/expat/make-release.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** make-release.sh 23 Aug 2001 13:26:37 -0000 1.1 --- make-release.sh 18 May 2002 00:26:59 -0000 1.2 *************** *** 28,36 **** # figure out the release version ! hdr="$tmpdir/lib/expat.h" ! MAJOR_VERSION="`sed -n -e '/MAJOR_VERSION/s/[^0-9]*//gp' $hdr`" ! MINOR_VERSION="`sed -n -e '/MINOR_VERSION/s/[^0-9]*//gp' $hdr`" ! MICRO_VERSION="`sed -n -e '/MICRO_VERSION/s/[^0-9]*//gp' $hdr`" ! vsn=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION echo "" --- 28,32 ---- # figure out the release version ! vsn="`$tmpdir/conftools/get-version.sh $tmpdir/lib/expat.h`" echo "" From gstein@users.sourceforge.net Fri May 17 18:28:01 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Fri May 17 17:28:01 2002 Subject: [Expat-checkins] expat/conftools get-version.sh,NONE,1.1 Message-ID: Update of /cvsroot/expat/expat/conftools In directory usw-pr-cvs1:/tmp/cvs-serv28608/conftools Added Files: get-version.sh Log Message: Add some cygwin fixes. * Makefile.in: - from cygwin: add -no-undefined to the library link line * conftools/get-version.sh: (new file) - script to extract the version number from expat.h * configure.in: (some from the cygwin patch) - update the prereq to 2.52 instead of just 2.50 - update the AC_INIT line to 2.52 standards: include the package name, version (with a lot of gunk to get this), and where to send bugs) - update the output file generation to 2.52 standards * make-release.sh: - update to use the new get-version.sh script * lib/expat.h: - from cygwin: add a little define for CYGWIN --- NEW FILE: get-version.sh --- #!/bin/sh # # USAGE: get-version.sh path/to/expat.h # # This script will print Expat's version number on stdout. For example: # # $ ./conftools/get-version.sh ./lib/expat.h # 1.95.3 # $ # if test $# = 0; then echo "ERROR: pathname for expat.h was not provided." echo "" echo "USAGE: $0 path/to/expat.h" exit 1 fi if test $# != 1; then echo "ERROR: too many arguments were provided." echo "" echo "USAGE: $0 path/to/expat.h" exit 1 fi hdr="$1" if test ! -r "$hdr"; then echo "ERROR: '$hdr' does not exist, or is not readable." exit 1 fi MAJOR_VERSION="`sed -n -e '/MAJOR_VERSION/s/[^0-9]*//gp' $hdr`" MINOR_VERSION="`sed -n -e '/MINOR_VERSION/s/[^0-9]*//gp' $hdr`" MICRO_VERSION="`sed -n -e '/MICRO_VERSION/s/[^0-9]*//gp' $hdr`" # Determine how to tell echo not to print the trailing \n. This is # similar to Autoconf's @ECHO_C@ and @ECHO_N@; however, we don't # generate this file via autoconf (in fact, get-version.sh is used # to *create* ./configure), so we just do something similar inline. case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ;; *) ECHO_N= ECHO_C='\c' ;; esac echo $ECHO_N "$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$ECHO_C" From gstein@users.sourceforge.net Fri May 17 18:28:02 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Fri May 17 17:28:02 2002 Subject: [Expat-checkins] expat/lib expat.h,1.18,1.19 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv28608/lib Modified Files: expat.h Log Message: Add some cygwin fixes. * Makefile.in: - from cygwin: add -no-undefined to the library link line * conftools/get-version.sh: (new file) - script to extract the version number from expat.h * configure.in: (some from the cygwin patch) - update the prereq to 2.52 instead of just 2.50 - update the AC_INIT line to 2.52 standards: include the package name, version (with a lot of gunk to get this), and where to send bugs) - update the output file generation to 2.52 standards * make-release.sh: - update to use the new get-version.sh script * lib/expat.h: - from cygwin: add a little define for CYGWIN Index: expat.h =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** expat.h 17 May 2002 21:23:35 -0000 1.18 --- expat.h 18 May 2002 00:26:59 -0000 1.19 *************** *** 9,13 **** #ifndef XMLPARSEAPI ! # if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) # define XMLPARSEAPI(type) __declspec(dllimport) type __cdecl # else --- 9,13 ---- #ifndef XMLPARSEAPI ! # if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) # define XMLPARSEAPI(type) __declspec(dllimport) type __cdecl # else From fdrake@users.sourceforge.net Fri May 17 20:40:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 17 19:40:03 2002 Subject: [Expat-checkins] CVSROOT loginfo,1.2,1.3 Message-ID: Update of /cvsroot/expat/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv24591 Modified Files: loginfo Log Message: Switch to unified diffs. Index: loginfo =================================================================== RCS file: /cvsroot/expat/CVSROOT/loginfo,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** loginfo 25 Aug 2000 12:39:51 -0000 1.2 --- loginfo 18 May 2002 02:39:57 -0000 1.3 *************** *** 26,28 **** #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! DEFAULT $CVSROOT/CVSROOT/syncmail %{sVv} expat-checkins@lists.sourceforge.net --- 26,28 ---- #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! DEFAULT $CVSROOT/CVSROOT/syncmail -u %{sVv} expat-checkins@lists.sourceforge.net From kwaclaw@users.sourceforge.net Fri May 17 21:35:03 2002 From: kwaclaw@users.sourceforge.net (kwaclaw@users.sourceforge.net) Date: Fri May 17 20:35:03 2002 Subject: [Expat-checkins] expat/lib expat.h,1.19,1.20 xmlparse.c,1.36,1.37 xmlrole.c,1.6,1.7 xmlrole.h,1.3,1.4 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv1671 Modified Files: expat.h xmlparse.c xmlrole.c xmlrole.h Log Message: Merged in patch # 551599 Index: expat.h =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- expat.h 18 May 2002 00:26:59 -0000 1.19 +++ expat.h 18 May 2002 03:34:44 -0000 1.20 @@ -185,7 +185,7 @@ Added in Expat 1.95.3. */ -XMLPARSEAPI(void) +XMLPARSEAPI(int) XML_ParserReset(XML_Parser parser, const XML_Char *encodingName); /* atts is array of name/value pairs, terminated by 0; Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- xmlparse.c 17 May 2002 21:30:07 -0000 1.36 +++ xmlparse.c 18 May 2002 03:34:44 -0000 1.37 @@ -210,6 +210,7 @@ HASH_TABLE attributeIds; HASH_TABLE prefixes; STRING_POOL pool; + STRING_POOL entityValuePool; int complete; int standalone; #ifdef XML_DTD @@ -244,6 +245,10 @@ static Processor cdataSectionProcessor; #ifdef XML_DTD static Processor ignoreSectionProcessor; +static Processor externalParEntProcessor; +static Processor externalParEntInitProcessor; +static Processor entityValueProcessor; +static Processor entityValueInitProcessor; #endif /* XML_DTD */ static Processor epilogProcessor; static Processor errorProcessor; @@ -355,6 +360,8 @@ const char *ptr, const char *end); +static int parserInit(XML_Parser parser, const XML_Char *encodingName); + #define poolStart(pool) ((pool)->start) #define poolEnd(pool) ((pool)->ptr) #define poolLength(pool) ((pool)->ptr - (pool)->start) @@ -453,9 +460,10 @@ unsigned m_groupSize; int m_hadExternalDoctype; XML_Char m_namespaceSeparator; + XML_Parser m_parentParser; #ifdef XML_DTD + int m_isParamEntity; enum XML_ParamEntityParsing m_paramEntityParsing; - XML_Parser m_parentParser; #endif } Parser; @@ -544,8 +552,9 @@ #define groupSize (((Parser *)parser)->m_groupSize) #define hadExternalDoctype (((Parser *)parser)->m_hadExternalDoctype) #define namespaceSeparator (((Parser *)parser)->m_namespaceSeparator) +#define parentParser (((Parser *)parser)->m_parentParser) #ifdef XML_DTD -#define parentParser (((Parser *)parser)->m_parentParser) +#define isParamEntity (((Parser *)parser)->m_isParamEntity) #define paramEntityParsing (((Parser *)parser)->m_paramEntityParsing) #endif /* XML_DTD */ @@ -639,10 +648,8 @@ poolInit(&tempPool, &(((Parser *) parser)->m_mem)); poolInit(&temp2Pool, &(((Parser *) parser)->m_mem)); - XML_ParserReset(parser, encodingName); - - if (!dtdInit(&dtd, parser) || !atts || !dataBuf - || (encodingName && !protocolEncodingName)) { + if (!parserInit(parser, encodingName) || !atts + || !dataBuf || (encodingName && !protocolEncodingName)) { XML_ParserFree(parser); return 0; } @@ -664,9 +671,8 @@ return parser; } -void XML_ParserReset(XML_Parser parser, const XML_Char *encodingName) +int parserInit(XML_Parser parser, const XML_Char *encodingName) { - processor = prologInitProcessor; XmlPrologStateInit(&prologState); protocolEncodingName = (encodingName @@ -730,12 +736,27 @@ unknownEncodingRelease = 0; unknownEncodingData = 0; unknownEncodingHandlerData = 0; + parentParser = 0; #ifdef XML_DTD - parentParser = 0; + isParamEntity = 0; paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER; + return dtdInit(&dtd, parser); +#else + return 1; #endif } +int XML_ParserReset(XML_Parser parser, const XML_Char *encodingName) +{ + if (parentParser) return 0; +#ifdef XML_DTD + if (dtd.scaffold) dtdDestroy(&dtd, parser); +#endif + poolClear(&tempPool); + poolClear(&temp2Pool); + return parserInit(parser, encodingName); +} + int XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName) { if (!encodingName) @@ -781,6 +802,7 @@ void *oldExternalEntityRefHandlerArg = externalEntityRefHandlerArg; #ifdef XML_DTD int oldParamEntityParsing = paramEntityParsing; + int oldInEntityValue = prologState.inEntityValue; #endif int oldns_triplets = ns_triplets; @@ -830,6 +852,8 @@ ns_triplets = oldns_triplets; #ifdef XML_DTD paramEntityParsing = oldParamEntityParsing; + prologState.inEntityValue = oldInEntityValue; + parentParser = oldParser; if (context) { #endif /* XML_DTD */ if (!dtdCopy(&dtd, oldDtd, parser) || !setContext(parser, context)) { @@ -841,10 +865,10 @@ } else { dtdSwap(&dtd, oldDtd); - parentParser = oldParser; - XmlPrologStateInitExternalEntity(&prologState); - dtd.complete = 1; + isParamEntity = 1; hadExternalDoctype = 1; + XmlPrologStateInitExternalEntity(&prologState); + processor = externalParEntInitProcessor; } #endif /* XML_DTD */ return parser; @@ -884,9 +908,7 @@ poolDestroy(&tempPool); poolDestroy(&temp2Pool); #ifdef XML_DTD - if (parentParser) { - if (hadExternalDoctype) - dtd.complete = 0; + if (isParamEntity) { dtdSwap(&dtd, &((Parser *)parentParser)->m_dtd); } #endif /* XML_DTD */ @@ -1442,10 +1464,18 @@ const char *end, const char **endPtr) { - const char *next; + const char *next = start; /* XmlContentTok doesn't always set the last arg */ int tok = XmlContentTok(encoding, start, end, &next); switch (tok) { case XML_TOK_BOM: + /* if we are at the end of the buffer, this would cause the next stage, + i.e. externalEntityInitProcessor3, to pass control directly to + doContent (by detecting XML_TOK_NONE) without processing any xml text + declaration - causing the error XML_ERROR_MISPLACED_XML_PI in doContent */ + if (next == end && endPtr) { + *endPtr = next; + return XML_ERROR_NONE; + } start = next; break; case XML_TOK_PARTIAL: @@ -1473,7 +1503,7 @@ const char *end, const char **endPtr) { - const char *next; + const char *next = start; /* XmlContentTok doesn't always set the last arg */ int tok = XmlContentTok(encoding, start, end, &next); switch (tok) { case XML_TOK_XML_DECL: @@ -1602,9 +1632,9 @@ entity = (ENTITY *)lookup(&dtd.generalEntities, name, 0); poolDiscard(&dtd.pool); if (!entity) { - if (dtd.complete || dtd.standalone) + if (!hadExternalDoctype || dtd.standalone) return XML_ERROR_UNDEFINED_ENTITY; - if (defaultHandler) + if (defaultHandler) reportDefault(parser, enc, s, next); break; } @@ -1617,7 +1647,7 @@ enum XML_Error result; OPEN_INTERNAL_ENTITY openEntity; if (defaultHandler && !defaultExpandInternalEntities) { - reportDefault(parser, enc, s, next); + reportDefault(parser, enc, s, next); break; } entity->open = 1; @@ -2521,7 +2551,7 @@ encodingName + XmlNameLength(encoding, encodingName)); if (! storedEncName) - return XML_ERROR_NO_MEMORY; + return XML_ERROR_NO_MEMORY; poolFinish(&temp2Pool); } if (version) { @@ -2619,6 +2649,163 @@ return prologProcessor(parser, s, end, nextPtr); } +#ifdef XML_DTD + +static enum XML_Error +externalParEntInitProcessor(XML_Parser parser, + const char *s, + const char *end, + const char **nextPtr) +{ + enum XML_Error result = initializeEncoding(parser); + if (result != XML_ERROR_NONE) + return result; + if (prologState.inEntityValue) { + processor = entityValueInitProcessor; + return entityValueInitProcessor(parser, s, end, nextPtr); + } + else { + processor = externalParEntProcessor; + return externalParEntProcessor(parser, s, end, nextPtr); + } +} + +static enum XML_Error +entityValueInitProcessor(XML_Parser parser, + const char *s, + const char *end, + const char **nextPtr) +{ + const char *start = s; + const char *next = s; + int tok; + + for (;;) { + tok = XmlPrologTok(encoding, start, end, &next); + if (tok <= 0) { + if (nextPtr != 0 && tok != XML_TOK_INVALID) { + *nextPtr = s; + return XML_ERROR_NONE; + } + switch (tok) { + case XML_TOK_INVALID: + return XML_ERROR_INVALID_TOKEN; + case XML_TOK_PARTIAL: + return XML_ERROR_UNCLOSED_TOKEN; + case XML_TOK_PARTIAL_CHAR: + return XML_ERROR_PARTIAL_CHAR; + case XML_TOK_NONE: /* start == end */ + default: + break; + } + return storeEntityValue(parser, encoding, s, end); + } + else if (tok == XML_TOK_XML_DECL) { + enum XML_Error result = processXmlDecl(parser, 0, start, next); + if (result != XML_ERROR_NONE) + return result; + if (nextPtr) *nextPtr = next; + /* stop scanning for text declaration - we found one */ + processor = entityValueProcessor; + return entityValueProcessor(parser, next, end, nextPtr); + } + /* if we are at the end of the buffer, this would cause XmlPrologTok to + return XML_TOK_NONE on the next call, which would then cause the + function to exit with *nextPtr set to s - that is what we want for other + tokens, but not for the BOM - we would rather like to skip it; + then, when this routine is entered the next time, XmlPrologTok will + return XML_TOK_INVALID, since the BOM is still in the buffer */ + else if (tok == XML_TOK_BOM && next == end && nextPtr) { + *nextPtr = next; + return XML_ERROR_NONE; + } + start = next; + } +} + +static enum XML_Error +externalParEntProcessor(XML_Parser parser, + const char *s, + const char *end, + const char **nextPtr) +{ + const char *start = s; + const char *next = s; + int tok; + + for (;;) { + tok = XmlPrologTok(encoding, start, end, &next); + if (tok <= 0) { + if (nextPtr != 0 && tok != XML_TOK_INVALID) { + *nextPtr = s; + return XML_ERROR_NONE; + } + switch (tok) { + case XML_TOK_INVALID: + return XML_ERROR_INVALID_TOKEN; + case XML_TOK_PARTIAL: + return XML_ERROR_UNCLOSED_TOKEN; + case XML_TOK_PARTIAL_CHAR: + return XML_ERROR_PARTIAL_CHAR; + case XML_TOK_NONE: /* start == end */ + default: + break; + } + break; + } + /* this would cause the next stage, i.e. doProlog to be passed XML_TOK_BOM. + However, when parsing an external subset, doProlog will not accept a BOM + as valid, and report a syntax error, so we have to skip the BOM */ + else if (tok == XML_TOK_BOM) { + s = next; + tok = XmlPrologTok(encoding, s, end, &next); + break; + } + else + break; + start = next; + } + processor = prologProcessor; + return doProlog(parser, encoding, s, end, tok, next, nextPtr); +} + +static enum XML_Error +entityValueProcessor(XML_Parser parser, + const char *s, + const char *end, + const char **nextPtr) +{ + const char *start = s; + const char *next = s; + const ENCODING *enc = encoding; + int tok; + + for (;;) { + tok = XmlPrologTok(enc, start, end, &next); + if (tok <= 0) { + if (nextPtr != 0 && tok != XML_TOK_INVALID) { + *nextPtr = s; + return XML_ERROR_NONE; + } + switch (tok) { + case XML_TOK_INVALID: + return XML_ERROR_INVALID_TOKEN; + case XML_TOK_PARTIAL: + return XML_ERROR_UNCLOSED_TOKEN; + case XML_TOK_PARTIAL_CHAR: + return XML_ERROR_PARTIAL_CHAR; + case XML_TOK_NONE: /* start == end */ + default: + break; + } + return storeEntityValue(parser, enc, s, end); + } + start = next; + } +} + +#endif /* XML_DTD */ + static enum XML_Error prologProcessor(XML_Parser parser, const char *s, @@ -2687,11 +2874,10 @@ #ifdef XML_DTD if (enc != encoding) return XML_ERROR_NONE; - if (parentParser) { + if (isParamEntity) { if (XmlTokenRole(&prologState, XML_TOK_NONE, end, end, enc) - == XML_ROLE_ERROR) + == XML_ROLE_ERROR) return XML_ERROR_SYNTAX; - hadExternalDoctype = 0; return XML_ERROR_NONE; } #endif /* XML_DTD */ @@ -2776,8 +2962,7 @@ doctypeSysid, doctypePubid, 0); poolClear(&tempPool); } - if (dtd.complete && hadExternalDoctype) { - dtd.complete = 0; + if (hadExternalDoctype) { #ifdef XML_DTD if (paramEntityParsing && externalEntityRefHandler) { ENTITY *entity = (ENTITY *)lookup(&dtd.paramEntities, @@ -2791,16 +2976,17 @@ return XML_ERROR_EXTERNAL_ENTITY_HANDLING; } #endif /* XML_DTD */ - if (!dtd.complete - && !dtd.standalone + if (!dtd.standalone && notStandaloneHandler && !notStandaloneHandler(handlerArg)) return XML_ERROR_NOT_STANDALONE; } - if (endDoctypeDeclHandler) + dtd.complete = 1; + if (endDoctypeDeclHandler) endDoctypeDeclHandler(handlerArg); break; case XML_ROLE_INSTANCE_START: + dtd.complete = 1; processor = contentProcessor; return contentProcessor(parser, s, end, nextPtr); case XML_ROLE_ATTLIST_ELEMENT_NAME: @@ -2842,11 +3028,9 @@ case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS: declAttributeType = atypeNMTOKENS; break; - case XML_ROLE_ATTRIBUTE_ENUM_VALUE: case XML_ROLE_ATTRIBUTE_NOTATION_VALUE: - if (attlistDeclHandler) - { + if (attlistDeclHandler) { const XML_Char *prefix; if (declAttributeType) { prefix = enumValueSep; @@ -2865,8 +3049,7 @@ break; case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE: case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE: - if (dtd.complete - && !defineAttribute(declElementType, declAttributeId, + if (!defineAttribute(declElementType, declAttributeId, declAttributeIsCdata, declAttributeIsId, 0, parser)) return XML_ERROR_NO_MEMORY; @@ -2901,10 +3084,9 @@ return result; attVal = poolStart(&dtd.pool); poolFinish(&dtd.pool); - if (dtd.complete - /* ID attributes aren't allowed to have a default */ - && !defineAttribute(declElementType, declAttributeId, - declAttributeIsCdata, 0, attVal, parser)) + /* ID attributes aren't allowed to have a default */ + if (!defineAttribute(declElementType, declAttributeId, + declAttributeIsCdata, 0, attVal, parser)) return XML_ERROR_NO_MEMORY; if (attlistDeclHandler && declAttributeType) { if (*declAttributeType == XML_T('(') @@ -2924,7 +3106,7 @@ role == XML_ROLE_FIXED_ATTRIBUTE_VALUE); poolClear(&tempPool); } - break; + break; } case XML_ROLE_ENTITY_VALUE: { @@ -2932,9 +3114,9 @@ s + enc->minBytesPerChar, next - enc->minBytesPerChar); if (declEntity) { - declEntity->textPtr = poolStart(&dtd.pool); - declEntity->textLen = poolLength(&dtd.pool); - poolFinish(&dtd.pool); + declEntity->textPtr = poolStart(&dtd.entityValuePool); + declEntity->textLen = poolLength(&dtd.entityValuePool); + poolFinish(&dtd.entityValuePool); if (entityDeclHandler) { *eventEndPP = s; entityDeclHandler(handlerArg, @@ -2943,10 +3125,10 @@ declEntity->textPtr, declEntity->textLen, curBase, 0, 0, 0); - } + } } else - poolDiscard(&dtd.pool); + poolDiscard(&dtd.entityValuePool); if (result != XML_ERROR_NONE) return result; } @@ -2956,7 +3138,7 @@ doctypeSysid = poolStoreString(&tempPool, enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); - if (! doctypeSysid) + if (!doctypeSysid) return XML_ERROR_NO_MEMORY; poolFinish(&tempPool); } @@ -2975,9 +3157,9 @@ declEntity = (ENTITY *)lookup(&dtd.paramEntities, externalSubsetName, sizeof(ENTITY)); - declEntity->publicId = 0; if (!declEntity) return XML_ERROR_NO_MEMORY; + declEntity->publicId = 0; } /* fall through */ #endif /* XML_DTD */ @@ -2995,13 +3177,14 @@ case XML_ROLE_ENTITY_COMPLETE: if (declEntity && entityDeclHandler) { *eventEndPP = s; - entityDeclHandler(handlerArg, - declEntity->name, - 0,0,0, - declEntity->base, - declEntity->systemId, - declEntity->publicId, - 0); + entityDeclHandler(handlerArg, + declEntity->name, + declEntity->is_param, + 0,0, + declEntity->base, + declEntity->systemId, + declEntity->publicId, + 0); } break; case XML_ROLE_ENTITY_NOTATION_NAME: @@ -3041,35 +3224,8 @@ name = poolStoreString(&dtd.pool, enc, s, next); if (!name) return XML_ERROR_NO_MEMORY; - if (dtd.complete) { - declEntity = (ENTITY *)lookup(&dtd.generalEntities, name, - sizeof(ENTITY)); - if (!declEntity) - return XML_ERROR_NO_MEMORY; - if (declEntity->name != name) { - poolDiscard(&dtd.pool); - declEntity = 0; - } - else { - poolFinish(&dtd.pool); - declEntity->publicId = 0; - declEntity->is_param = 0; - } - } - else { - poolDiscard(&dtd.pool); - declEntity = 0; - } - } - break; - case XML_ROLE_PARAM_ENTITY_NAME: -#ifdef XML_DTD - if (dtd.complete) { - const XML_Char *name = poolStoreString(&dtd.pool, enc, s, next); - if (!name) - return XML_ERROR_NO_MEMORY; - declEntity = (ENTITY *)lookup(&dtd.paramEntities, - name, sizeof(ENTITY)); + declEntity = (ENTITY *)lookup(&dtd.generalEntities, name, + sizeof(ENTITY)); if (!declEntity) return XML_ERROR_NO_MEMORY; if (declEntity->name != name) { @@ -3079,9 +3235,30 @@ else { poolFinish(&dtd.pool); declEntity->publicId = 0; - declEntity->is_param = 1; + declEntity->is_param = 0; } } + break; + case XML_ROLE_PARAM_ENTITY_NAME: +#ifdef XML_DTD + { + const XML_Char *name = poolStoreString(&dtd.pool, enc, s, next); + if (!name) + return XML_ERROR_NO_MEMORY; + declEntity = (ENTITY *)lookup(&dtd.paramEntities, + name, sizeof(ENTITY)); + if (!declEntity) + return XML_ERROR_NO_MEMORY; + if (declEntity->name != name) { + poolDiscard(&dtd.pool); + declEntity = 0; + } + else { + poolFinish(&dtd.pool); + declEntity->publicId = 0; + declEntity->is_param = 1; + } + } #else /* not XML_DTD */ declEntity = 0; #endif /* not XML_DTD */ @@ -3213,8 +3390,12 @@ case XML_ROLE_PARAM_ENTITY_REF: #ifdef XML_DTD case XML_ROLE_INNER_PARAM_ENTITY_REF: - if (paramEntityParsing - && (dtd.complete || role == XML_ROLE_INNER_PARAM_ENTITY_REF)) { + /* PE references in internal subset are + not allowed within declarations */ + if (prologState.documentEntity && + role == XML_ROLE_INNER_PARAM_ENTITY_REF) + return XML_ERROR_PARAM_ENTITY_REF; + if (paramEntityParsing) { const XML_Char *name; ENTITY *entity; name = poolStoreString(&dtd.pool, enc, @@ -3225,8 +3406,9 @@ entity = (ENTITY *)lookup(&dtd.paramEntities, name, 0); poolDiscard(&dtd.pool); if (!entity) { - /* FIXME what to do if !dtd.complete? */ - return XML_ERROR_UNDEFINED_ENTITY; + if (!hadExternalDoctype || dtd.standalone) + return XML_ERROR_UNDEFINED_ENTITY; + break; } if (entity->open) return XML_ERROR_RECURSIVE_ENTITY_REF; @@ -3237,10 +3419,7 @@ return result; break; } - if (role == XML_ROLE_INNER_PARAM_ENTITY_REF) - return XML_ERROR_PARAM_ENTITY_REF; if (externalEntityRefHandler) { - dtd.complete = 0; entity->open = 1; if (!externalEntityRefHandler(externalEntityRefHandlerArg, 0, @@ -3251,30 +3430,28 @@ return XML_ERROR_EXTERNAL_ENTITY_HANDLING; } entity->open = 0; - if (dtd.complete) - break; - } + break; + } } #endif /* XML_DTD */ if (!dtd.standalone && notStandaloneHandler && !notStandaloneHandler(handlerArg)) return XML_ERROR_NOT_STANDALONE; - dtd.complete = 0; if (defaultHandler) - reportDefault(parser, enc, s, next); + reportDefault(parser, enc, s, next); break; /* Element declaration stuff */ case XML_ROLE_ELEMENT_NAME: if (elementDeclHandler) { - declElementType = getElementType(parser, enc, s, next); - if (! declElementType) - return XML_ERROR_NO_MEMORY; - dtd.scaffLevel = 0; - dtd.scaffCount = 0; - dtd.in_eldecl = 1; + declElementType = getElementType(parser, enc, s, next); + if (! declElementType) + return XML_ERROR_NO_MEMORY; + dtd.scaffLevel = 0; + dtd.scaffCount = 0; + dtd.in_eldecl = 1; } break; @@ -3377,7 +3554,8 @@ break; } break; - } + } /* end of big switch */ + if (defaultHandler) { switch (tok) { case XML_TOK_PI: @@ -3396,6 +3574,7 @@ reportDefault(parser, enc, s, next); } } + s = next; tok = XmlPrologTok(enc, s, end, &next); } @@ -3589,7 +3768,7 @@ entity = (ENTITY *)lookup(&dtd.generalEntities, name, 0); poolDiscard(&temp2Pool); if (!entity) { - if (dtd.complete) { + if (dtd.complete || !hadExternalDoctype || dtd.standalone) { if (enc == encoding) eventPtr = ptr; return XML_ERROR_UNDEFINED_ENTITY; @@ -3633,71 +3812,108 @@ /* not reached */ } + static enum XML_Error storeEntityValue(XML_Parser parser, const ENCODING *enc, const char *entityTextPtr, const char *entityTextEnd) { - STRING_POOL *pool = &(dtd.pool); + STRING_POOL *pool = &(dtd.entityValuePool); + enum XML_Error result = XML_ERROR_NONE; +#ifdef XML_DTD + int oldInEntityValue = prologState.inEntityValue; + prologState.inEntityValue = 1; +#endif /* XML_DTD */ + /* never return Null for the value in EntityDeclHandler, since + this would indicate an external entity; therefore we + have to make sure that entityValuePool.start is not null */ + if (!pool->blocks) { + if (!poolGrow(pool)) + return XML_ERROR_NO_MEMORY; + } + for (;;) { const char *next; int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next); switch (tok) { case XML_TOK_PARAM_ENTITY_REF: #ifdef XML_DTD - if (parentParser || enc != encoding) { - enum XML_Error result; + if (isParamEntity || enc != encoding) { const XML_Char *name; ENTITY *entity; name = poolStoreString(&tempPool, enc, entityTextPtr + enc->minBytesPerChar, next - enc->minBytesPerChar); - if (!name) - return XML_ERROR_NO_MEMORY; + if (!name) { + result = XML_ERROR_NO_MEMORY; + goto endEntityValue; + } entity = (ENTITY *)lookup(&dtd.paramEntities, name, 0); poolDiscard(&tempPool); if (!entity) { if (enc == encoding) eventPtr = entityTextPtr; - return XML_ERROR_UNDEFINED_ENTITY; + result = XML_ERROR_UNDEFINED_ENTITY; + goto endEntityValue; } if (entity->open) { if (enc == encoding) eventPtr = entityTextPtr; - return XML_ERROR_RECURSIVE_ENTITY_REF; + result = XML_ERROR_RECURSIVE_ENTITY_REF; + goto endEntityValue; } if (entity->systemId) { - if (enc == encoding) - eventPtr = entityTextPtr; - return XML_ERROR_PARAM_ENTITY_REF; + if (externalEntityRefHandler) { + entity->open = 1; + if (!externalEntityRefHandler(externalEntityRefHandlerArg, + 0, + entity->base, + entity->systemId, + entity->publicId)) { + entity->open = 0; + result = XML_ERROR_EXTERNAL_ENTITY_HANDLING; + goto endEntityValue; + } + entity->open = 0; + } } - entity->open = 1; - result = storeEntityValue(parser, - internalEncoding, - (char *)entity->textPtr, - (char *)(entity->textPtr + entity->textLen)); - entity->open = 0; - if (result) - return result; + else { + entity->open = 1; + result = storeEntityValue(parser, + internalEncoding, + (char *)entity->textPtr, + (char *)(entity->textPtr + entity->textLen)); + entity->open = 0; + if (result) + goto endEntityValue; + } break; } #endif /* XML_DTD */ + /* in the internal subset, PE references are + not allowed within markup declarations */ eventPtr = entityTextPtr; - return XML_ERROR_SYNTAX; + result = XML_ERROR_SYNTAX; + goto endEntityValue; case XML_TOK_NONE: - return XML_ERROR_NONE; + result = XML_ERROR_NONE; + goto endEntityValue; case XML_TOK_ENTITY_REF: case XML_TOK_DATA_CHARS: - if (!poolAppend(pool, enc, entityTextPtr, next)) - return XML_ERROR_NO_MEMORY; + if (!poolAppend(pool, enc, entityTextPtr, next)) { + result = XML_ERROR_NO_MEMORY; + goto endEntityValue; + } break; case XML_TOK_TRAILING_CR: next = entityTextPtr + enc->minBytesPerChar; /* fall through */ case XML_TOK_DATA_NEWLINE: - if (pool->end == pool->ptr && !poolGrow(pool)) - return XML_ERROR_NO_MEMORY; + if (pool->end == pool->ptr && !poolGrow(pool)) { + result = XML_ERROR_NO_MEMORY; + goto endEntityValue; + } *(pool->ptr)++ = 0xA; break; case XML_TOK_CHAR_REF: @@ -3708,17 +3924,21 @@ if (n < 0) { if (enc == encoding) eventPtr = entityTextPtr; - return XML_ERROR_BAD_CHAR_REF; + result = XML_ERROR_BAD_CHAR_REF; + goto endEntityValue; } n = XmlEncode(n, (ICHAR *)buf); if (!n) { if (enc == encoding) eventPtr = entityTextPtr; - return XML_ERROR_BAD_CHAR_REF; + result = XML_ERROR_BAD_CHAR_REF; + goto endEntityValue; } for (i = 0; i < n; i++) { - if (pool->end == pool->ptr && !poolGrow(pool)) - return XML_ERROR_NO_MEMORY; + if (pool->end == pool->ptr && !poolGrow(pool)) { + result = XML_ERROR_NO_MEMORY; + goto endEntityValue; + } *(pool->ptr)++ = buf[i]; } } @@ -3726,19 +3946,26 @@ case XML_TOK_PARTIAL: if (enc == encoding) eventPtr = entityTextPtr; - return XML_ERROR_INVALID_TOKEN; + result = XML_ERROR_INVALID_TOKEN; + goto endEntityValue; case XML_TOK_INVALID: if (enc == encoding) eventPtr = next; - return XML_ERROR_INVALID_TOKEN; + result = XML_ERROR_INVALID_TOKEN; + goto endEntityValue; default: if (enc == encoding) eventPtr = entityTextPtr; - return XML_ERROR_UNEXPECTED_STATE; + result = XML_ERROR_UNEXPECTED_STATE; + goto endEntityValue; } entityTextPtr = next; } - /* not reached */ +endEntityValue: +#ifdef XML_DTD + prologState.inEntityValue = oldInEntityValue; +#endif /* XML_DTD */ + return result; } static void @@ -4129,11 +4356,14 @@ { XML_Memory_Handling_Suite *ms = &((Parser *) parser)->m_mem; poolInit(&(p->pool), ms); +#ifdef XML_DTD + poolInit(&(p->entityValuePool), ms); +#endif /* XML_DTD */ hashTableInit(&(p->generalEntities), ms); hashTableInit(&(p->elementTypes), ms); hashTableInit(&(p->attributeIds), ms); hashTableInit(&(p->prefixes), ms); - p->complete = 1; + p->complete = 0; p->standalone = 0; #ifdef XML_DTD hashTableInit(&(p->paramEntities), ms); @@ -4183,10 +4413,15 @@ hashTableDestroy(&(p->attributeIds)); hashTableDestroy(&(p->prefixes)); poolDestroy(&(p->pool)); - if (p->scaffIndex) - FREE(p->scaffIndex); - if (p->scaffold) - FREE(p->scaffold); +#ifdef XML_DTD + poolDestroy(&(p->entityValuePool)); +#endif /* XML_DTD */ + if (!parentParser) { + if (p->scaffIndex) + FREE(p->scaffIndex); + if (p->scaffold) + FREE(p->scaffold); + } } /* Do a deep copy of the DTD. Return 0 for out of memory; non-zero otherwise. @@ -4808,3 +5043,4 @@ } return ret; } /* End getElementType */ + Index: xmlrole.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlrole.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- xmlrole.c 17 May 2002 21:30:07 -0000 1.6 +++ xmlrole.c 18 May 2002 03:34:44 -0000 1.7 @@ -66,7 +66,7 @@ doctype0, doctype1, doctype2, doctype3, doctype4, doctype5, internalSubset, entity0, entity1, entity2, entity3, entity4, entity5, entity6, - entity7, entity8, entity9, + entity7, entity8, entity9, entity10, notation0, notation1, notation2, notation3, notation4, attlist0, attlist1, attlist2, attlist3, attlist4, attlist5, attlist6, attlist7, attlist8, attlist9, @@ -579,13 +579,30 @@ case XML_TOK_PROLOG_S: return XML_ROLE_NONE; case XML_TOK_LITERAL: - state->handler = declClose; + state->handler = entity10; return XML_ROLE_ENTITY_SYSTEM_ID; } return common(state, tok); } static +int entity10(PROLOG_STATE *state, + int tok, + const char *ptr, + const char *end, + const ENCODING *enc) +{ + switch (tok) { + case XML_TOK_PROLOG_S: + return XML_ROLE_NONE; + case XML_TOK_DECL_CLOSE: + setTopLevel(state); + return XML_ROLE_ENTITY_COMPLETE; + } + return common(state, tok); +} + +static int notation0(PROLOG_STATE *state, int tok, const char *ptr, @@ -1256,6 +1273,7 @@ #ifdef XML_DTD state->documentEntity = 1; state->includeLevel = 0; + state->inEntityValue = 0; #endif /* XML_DTD */ } Index: xmlrole.h =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlrole.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- xmlrole.h 28 Sep 2000 17:53:00 -0000 1.3 +++ xmlrole.h 18 May 2002 03:34:44 -0000 1.4 @@ -82,6 +82,7 @@ #ifdef XML_DTD unsigned includeLevel; int documentEntity; + int inEntityValue; #endif /* XML_DTD */ } PROLOG_STATE; From gstein@users.sourceforge.net Mon May 20 05:07:01 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Mon May 20 04:07:01 2002 Subject: [Expat-checkins] expat/lib expat.h,1.20,1.21 xmlparse.c,1.37,1.38 xmlrole.c,1.7,1.8 xmltok.c,1.14,1.15 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv30129 Modified Files: expat.h xmlparse.c xmlrole.c xmltok.c Log Message: Hard to believe, but there are some preprocessors/compilers out there which don't like spaces between the '#' and the preprocessor command. * expat.h, xmlparse.c, xmlrole.c, xmltok.c: - remove all spaces between the '#' and the cpp command. Index: expat.h =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- expat.h 18 May 2002 03:34:44 -0000 1.20 +++ expat.h 20 May 2002 11:06:40 -0000 1.21 @@ -8,11 +8,11 @@ #include #ifndef XMLPARSEAPI -# if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) -# define XMLPARSEAPI(type) __declspec(dllimport) type __cdecl -# else -# define XMLPARSEAPI(type) type -# endif +#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) +#define XMLPARSEAPI(type) __declspec(dllimport) type __cdecl +#else +#define XMLPARSEAPI(type) type +#endif #endif /* not defined XMLPARSEAPI */ #ifdef __cplusplus @@ -20,23 +20,23 @@ #endif #ifdef XML_UNICODE_WCHAR_T -# define XML_UNICODE +#define XML_UNICODE #endif typedef void *XML_Parser; #ifdef XML_UNICODE /* Information is UTF-16 encoded. */ -# ifdef XML_UNICODE_WCHAR_T +#ifdef XML_UNICODE_WCHAR_T typedef wchar_t XML_Char; typedef wchar_t XML_LChar; -# else +#else typedef unsigned short XML_Char; typedef char XML_LChar; -# endif +#endif /* XML_UNICODE_WCHAR_T */ #else /* Information is UTF-8 encoded. */ typedef char XML_Char; typedef char XML_LChar; -#endif +#endif /* XML_UNICODE */ enum XML_Content_Type { XML_CTYPE_EMPTY = 1, Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- xmlparse.c 18 May 2002 03:34:44 -0000 1.37 +++ xmlparse.c 20 May 2002 11:06:41 -0000 1.38 @@ -3,21 +3,24 @@ */ #ifdef COMPILED_FROM_DSP -# include "winconfig.h" -# define XMLPARSEAPI(type) __declspec(dllexport) type __cdecl -# include "expat.h" -# undef XMLPARSEAPI + +#include "winconfig.h" +#define XMLPARSEAPI(type) __declspec(dllexport) type __cdecl +#include "expat.h" +#undef XMLPARSEAPI + #else + #include #ifdef __declspec -# define XMLPARSEAPI(type) __declspec(dllexport) type __cdecl +#define XMLPARSEAPI(type) __declspec(dllexport) type __cdecl #endif #include "expat.h" #ifdef __declspec -# undef XMLPARSEAPI +#undef XMLPARSEAPI #endif #endif /* ndef COMPILED_FROM_DSP */ @@ -55,13 +58,13 @@ #ifdef XML_UNICODE -# ifdef XML_UNICODE_WCHAR_T -# define XML_T(x) (const wchar_t)x -# define XML_L(x) L ## x -# else -# define XML_T(x) (const unsigned short)x -# define XML_L(x) x -# endif +#ifdef XML_UNICODE_WCHAR_T +#define XML_T(x) (const wchar_t)x +#define XML_L(x) L ## x +#else +#define XML_T(x) (const unsigned short)x +#define XML_L(x) x +#endif #else Index: xmlrole.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlrole.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- xmlrole.c 18 May 2002 03:34:44 -0000 1.7 +++ xmlrole.c 20 May 2002 11:06:41 -0000 1.8 @@ -3,9 +3,9 @@ */ #ifdef COMPILED_FROM_DSP -# include "winconfig.h" +#include "winconfig.h" #else -# include +#include #endif /* ndef COMPILED_FROM_DSP */ #include "xmlrole.h" Index: xmltok.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- xmltok.c 17 May 2002 21:42:05 -0000 1.14 +++ xmltok.c 20 May 2002 11:06:41 -0000 1.15 @@ -3,9 +3,9 @@ */ #ifdef COMPILED_FROM_DSP -# include "winconfig.h" +#include "winconfig.h" #else -# include +#include #endif /* ndef COMPILED_FROM_DSP */ #include "xmltok.h" From gstein@users.sourceforge.net Mon May 20 05:09:03 2002 From: gstein@users.sourceforge.net (gstein@users.sourceforge.net) Date: Mon May 20 04:09:03 2002 Subject: [Expat-checkins] expat/lib winconfig.h,1.2,1.3 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv26340 Modified Files: winconfig.h Log Message: Karl noticed that Expat didn't build on Windows any more. winconfig.h needs to state that memmove() exists. Index: winconfig.h =================================================================== RCS file: /cvsroot/expat/expat/lib/winconfig.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- winconfig.h 17 May 2002 21:42:05 -0000 1.2 +++ winconfig.h 20 May 2002 11:01:29 -0000 1.3 @@ -24,4 +24,7 @@ /* we will assume all Windows platforms are little endian */ #define BYTEORDER 1234 +/* Windows has memmove() available. */ +#define HAVE_MEMMOVE + #endif /* ndef WINCONFIG_H */ From fdrake@users.sourceforge.net Tue May 21 08:46:04 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue May 21 07:46:04 2002 Subject: [Expat-checkins] htdocs index.html,1.15,1.16 Message-ID: Update of /cvsroot/expat/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv7285 Modified Files: index.html Log Message: Another link to C++ wrappers, this time with a SAX interface and multiple parser backends. Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- index.html 17 May 2002 13:42:36 -0000 1.15 +++ index.html 21 May 2002 14:45:18 -0000 1.16 @@ -72,6 +72,10 @@ providing object-oriented wrappers for Expat. The wrappers use some MFC-biased naming, but look interesting.
  • + SAX in C++ -- a SAX interface for C++ programmers, with + implementations based on several parsers, including Expat. +
  • C++ interface to Expat (old; not updated since Expat 1.2)
  • From fdrake@users.sourceforge.net Tue May 21 15:40:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue May 21 14:40:02 2002 Subject: [Expat-checkins] expat/tests chardata.c,1.3,1.4 chardata.h,1.1,1.2 Message-ID: Update of /cvsroot/expat/expat/tests In directory usw-pr-cvs1:/tmp/cvs-serv27699 Modified Files: chardata.c chardata.h Log Message: Remove the use of C99's stdbool.h and the bool type; not all compilers support this (gcc 2.8.1 on IRIX 6.5 bit this time). Index: chardata.c =================================================================== RCS file: /cvsroot/expat/expat/tests/chardata.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- chardata.c 29 Apr 2002 17:10:26 -0000 1.3 +++ chardata.c 21 May 2002 21:39:18 -0000 1.4 @@ -70,7 +70,7 @@ } } -bool +int CharData_CheckString(CharData *storage, const char *expected) { char buffer[1280]; @@ -90,16 +90,16 @@ "wrong number of data characters: got %d, expected %d", count, len); fail(buffer); - return false; + return 0; } if (memcmp(expected, storage->data, len) != 0) { fail("got bad data bytes"); - return false; + return 0; } - return true; + return 1; } -bool +int CharData_CheckXMLChars(CharData *storage, const XML_Char *expected) { char buffer[1024]; @@ -112,11 +112,11 @@ sprintf(buffer, "wrong number of data characters: got %d, expected %d", count, len); fail(buffer); - return false; + return 0; } if (memcmp(expected, storage->data, len * sizeof(storage->data[0])) != 0) { fail("got bad data bytes"); - return false; + return 0; } - return true; + return 1; } Index: chardata.h =================================================================== RCS file: /cvsroot/expat/expat/tests/chardata.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- chardata.h 25 Apr 2002 04:04:42 -0000 1.1 +++ chardata.h 21 May 2002 21:39:18 -0000 1.2 @@ -10,8 +10,6 @@ #include "expat.h" /* need XML_Char */ #endif -#include - typedef struct { int count; /* # of chars, < 0 if not set */ @@ -25,9 +23,9 @@ void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len); -bool CharData_CheckString(CharData *storage, const char *s); +int CharData_CheckString(CharData *storage, const char *s); -bool CharData_CheckXMLChars(CharData *storage, const XML_Char *s); +int CharData_CheckXMLChars(CharData *storage, const XML_Char *s); #endif /* XML_CHARDATA_H */ From fdrake@users.sourceforge.net Tue May 21 21:28:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue May 21 20:28:02 2002 Subject: [Expat-checkins] expat/tests runtests.c,1.18,1.19 Message-ID: Update of /cvsroot/expat/expat/tests In directory usw-pr-cvs1:/tmp/cvs-serv7572 Modified Files: runtests.c Log Message: Fix the regression test for SF bug #477667. This now fails, but accurately tests the reported bug. It should also serve as increased motivation for me to get it fixed before the next release. Index: runtests.c =================================================================== RCS file: /cvsroot/expat/expat/tests/runtests.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- runtests.c 4 May 2002 21:47:46 -0000 1.18 +++ runtests.c 22 May 2002 03:27:17 -0000 1.19 @@ -215,12 +215,14 @@ sprintf(text, "%ccd", i); if (XML_Parse(parser, text, strlen(text), 1)) { sprintf(text, - "expected token error for '%c'(ordinal %d) in UTF-8 text", + "expected token error for '%c' (ordinal %d) in UTF-8 text", i, i); fail(text); } else if (XML_GetErrorCode(parser) != XML_ERROR_INVALID_TOKEN) xml_failure(parser); + /* Reset the parser since we use the same parser repeatedly. */ + XML_ParserReset(parser, NULL); } } END_TEST From fdrake@users.sourceforge.net Tue May 21 22:05:04 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue May 21 21:05:04 2002 Subject: [Expat-checkins] expat/lib expat.h,1.21,1.22 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv14952/lib Modified Files: expat.h Log Message: Bring indentation consistency to the header comments. Index: expat.h =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- expat.h 20 May 2002 11:06:40 -0000 1.21 +++ expat.h 22 May 2002 04:04:39 -0000 1.22 @@ -87,7 +87,6 @@ description of the model argument. It's the caller's responsibility to free model when finished with it. */ - typedef void (*XML_ElementDeclHandler) (void *userData, const XML_Char *name, XML_Content *model); @@ -96,16 +95,14 @@ XML_SetElementDeclHandler(XML_Parser parser, XML_ElementDeclHandler eldecl); -/* - The Attlist declaration handler is called for *each* attribute. So - a single Attlist declaration with multiple attributes declared will - generate multiple calls to this handler. The "default" parameter - may be NULL in the case of the "#IMPLIED" or "#REQUIRED" keyword. - The "isrequired" parameter will be true and the default value will - be NULL in the case of "#REQUIRED". If "isrequired" is true and - default is non-NULL, then this is a "#FIXED" default. - */ - +/* The Attlist declaration handler is called for *each* attribute. So + a single Attlist declaration with multiple attributes declared will + generate multiple calls to this handler. The "default" parameter + may be NULL in the case of the "#IMPLIED" or "#REQUIRED" + keyword. The "isrequired" parameter will be true and the default + value will be NULL in the case of "#REQUIRED". If "isrequired" is + true and default is non-NULL, then this is a "#FIXED" default. +*/ typedef void (*XML_AttlistDeclHandler) (void *userData, const XML_Char *elname, const XML_Char *attname, @@ -117,15 +114,14 @@ XML_SetAttlistDeclHandler(XML_Parser parser, XML_AttlistDeclHandler attdecl); - - /* The XML declaration handler is called for *both* XML declarations and - text declarations. The way to distinguish is that the version parameter - will be null for text declarations. The encoding parameter may be null - for XML declarations. The standalone parameter will be -1, 0, or 1 - indicating respectively that there was no standalone parameter in - the declaration, that it was given as no, or that it was given as yes. - */ - +/* The XML declaration handler is called for *both* XML declarations + and text declarations. The way to distinguish is that the version + parameter will be NULL for text declarations. The encoding + parameter may be NULL for XML declarations. The standalone + parameter will be -1, 0, or 1 indicating respectively that there + was no standalone parameter in the declaration, that it was given + as no, or that it was given as yes. +*/ typedef void (*XML_XmlDeclHandler) (void *userData, const XML_Char *version, const XML_Char *encoding, @@ -143,21 +139,22 @@ } XML_Memory_Handling_Suite; /* Constructs a new parser; encoding is the encoding specified by the -external protocol or null if there is none specified. */ - + external protocol or NULL if there is none specified. +*/ XMLPARSEAPI(XML_Parser) XML_ParserCreate(const XML_Char *encoding); /* Constructs a new parser and namespace processor. Element type -names and attribute names that belong to a namespace will be expanded; -unprefixed attribute names are never expanded; unprefixed element type -names are expanded only if there is a default namespace. The expanded -name is the concatenation of the namespace URI, the namespace -separator character, and the local part of the name. If the namespace -separator is '\0' then the namespace URI and the local part will be -concatenated without any separator. When a namespace is not declared, -the name and prefix will be passed through without expansion. */ - + names and attribute names that belong to a namespace will be + expanded; unprefixed attribute names are never expanded; unprefixed + element type names are expanded only if there is a default + namespace. The expanded name is the concatenation of the namespace + URI, the namespace separator character, and the local part of the + name. If the namespace separator is '\0' then the namespace URI + and the local part will be concatenated without any separator. + When a namespace is not declared, the name and prefix will be + passed through without expansion. +*/ XMLPARSEAPI(XML_Parser) XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator); @@ -171,7 +168,6 @@ All further memory operations used for the created parser will come from the given suite. */ - XMLPARSEAPI(XML_Parser) XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite, @@ -184,13 +180,12 @@ Added in Expat 1.95.3. */ - XMLPARSEAPI(int) XML_ParserReset(XML_Parser parser, const XML_Char *encodingName); /* atts is array of name/value pairs, terminated by 0; - names and values are 0 terminated. */ - + names and values are 0 terminated. +*/ typedef void (*XML_StartElementHandler)(void *userData, const XML_Char *name, const XML_Char **atts); @@ -215,26 +210,26 @@ typedef void (*XML_StartCdataSectionHandler)(void *userData); typedef void (*XML_EndCdataSectionHandler)(void *userData); -/* This is called for any characters in the XML document for -which there is no applicable handler. This includes both -characters that are part of markup which is of a kind that is -not reported (comments, markup declarations), or characters -that are part of a construct which could be reported but -for which no handler has been supplied. The characters are passed -exactly as they were in the XML document except that -they will be encoded in UTF-8. Line boundaries are not normalized. -Note that a byte order mark character is not passed to the default handler. -There are no guarantees about how characters are divided between calls -to the default handler: for example, a comment might be split between -multiple calls. */ - +/* This is called for any characters in the XML document for which + there is no applicable handler. This includes both characters that + are part of markup which is of a kind that is not reported + (comments, markup declarations), or characters that are part of a + construct which could be reported but for which no handler has been + supplied. The characters are passed exactly as they were in the XML + document except that they will be encoded in UTF-8. Line + boundaries are not normalized. Note that a byte order mark + character is not passed to the default handler. There are no + guarantees about how characters are divided between calls to the + default handler: for example, a comment might be split between + multiple calls. +*/ typedef void (*XML_DefaultHandler)(void *userData, const XML_Char *s, int len); /* This is called for the start of the DOCTYPE declaration, before - any DTD or internal subset is parsed. */ - + any DTD or internal subset is parsed. +*/ typedef void (*XML_StartDoctypeDeclHandler)(void *userData, const XML_Char *doctypeName, const XML_Char *sysid, @@ -242,7 +237,9 @@ int has_internal_subset); /* This is called for the start of the DOCTYPE declaration when the -closing > is encountered, but after processing any external subset. */ + closing > is encountered, but after processing any external + subset. +*/ typedef void (*XML_EndDoctypeDeclHandler)(void *userData); /* This is called for entity declarations. The is_parameter_entity @@ -250,17 +247,16 @@ otherwise. For internal entities (), value will - be non-null and systemId, publicID, and notationName will be null. - The value string is NOT null terminated; the length is provided in + be non-NULL and systemId, publicID, and notationName will be NULL. + The value string is NOT nul-terminated; the length is provided in the value_length argument. Since it is legal to have zero-length values, do not use this argument to test for internal entities. - For external entities, value will be null and systemId will be non-null. - The publicId argument will be null unless a public identifier was - provided. The notationName argument will have a non-null value only - for unparsed entity declarations. + For external entities, value will be NULL and systemId will be + non-NULL. The publicId argument will be NULL unless a public + identifier was provided. The notationName argument will have a + non-NULL value only for unparsed entity declarations. */ - typedef void (*XML_EntityDeclHandler) (void *userData, const XML_Char *entityName, int is_parameter_entity, @@ -278,11 +274,12 @@ /* OBSOLETE -- OBSOLETE -- OBSOLETE This handler has been superceded by the EntityDeclHandler above. It is provided here for backward compatibility. -This is called for a declaration of an unparsed (NDATA) -entity. The base argument is whatever was set by XML_SetBase. -The entityName, systemId and notationName arguments will never be null. -The other arguments may be. */ + This is called for a declaration of an unparsed (NDATA) entity. + The base argument is whatever was set by XML_SetBase. The + entityName, systemId and notationName arguments will never be + NULL. The other arguments may be. +*/ typedef void (*XML_UnparsedEntityDeclHandler)(void *userData, const XML_Char *entityName, const XML_Char *base, @@ -290,10 +287,10 @@ const XML_Char *publicId, const XML_Char *notationName); -/* This is called for a declaration of notation. -The base argument is whatever was set by XML_SetBase. -The notationName will never be null. The other arguments can be. */ - +/* This is called for a declaration of notation. The base argument is + whatever was set by XML_SetBase. The notationName will never be + NULL. The other arguments can be. +*/ typedef void (*XML_NotationDeclHandler)(void *userData, const XML_Char *notationName, const XML_Char *base, @@ -301,11 +298,11 @@ const XML_Char *publicId); /* When namespace processing is enabled, these are called once for -each namespace declaration. The call to the start and end element -handlers occur between the calls to the start and end namespace -declaration handlers. For an xmlns attribute, prefix will be null. -For an xmlns="" attribute, uri will be null. */ - + each namespace declaration. The call to the start and end element + handlers occur between the calls to the start and end namespace + declaration handlers. For an xmlns attribute, prefix will be + NULL. For an xmlns="" attribute, uri will be NULL. +*/ typedef void (*XML_StartNamespaceDeclHandler)(void *userData, const XML_Char *prefix, const XML_Char *uri); @@ -314,86 +311,104 @@ const XML_Char *prefix); /* This is called if the document is not standalone (it has an -external subset or a reference to a parameter entity, but does not -have standalone="yes"). If this handler returns 0, then processing -will not continue, and the parser will return a -XML_ERROR_NOT_STANDALONE error. */ - + external subset or a reference to a parameter entity, but does not + have standalone="yes"). If this handler returns 0, then processing + will not continue, and the parser will return a + XML_ERROR_NOT_STANDALONE error. +*/ typedef int (*XML_NotStandaloneHandler)(void *userData); -/* This is called for a reference to an external parsed general entity. -The referenced entity is not automatically parsed. -The application can parse it immediately or later using -XML_ExternalEntityParserCreate. -The parser argument is the parser parsing the entity containing the reference; -it can be passed as the parser argument to XML_ExternalEntityParserCreate. -The systemId argument is the system identifier as specified in the entity -declaration; it will not be null. -The base argument is the system identifier that should be used as the base for -resolving systemId if systemId was relative; this is set by XML_SetBase; -it may be null. -The publicId argument is the public identifier as specified in the entity -declaration, or null if none was specified; the whitespace in the public -identifier will have been normalized as required by the XML spec. -The context argument specifies the parsing context in the format -expected by the context argument to -XML_ExternalEntityParserCreate; context is valid only until the handler -returns, so if the referenced entity is to be parsed later, it must be copied. -The handler should return 0 if processing should not continue because of -a fatal error in the handling of the external entity. -In this case the calling parser will return an -XML_ERROR_EXTERNAL_ENTITY_HANDLING error. -Note that unlike other handlers the first argument is the parser, not -userData. */ +/* This is called for a reference to an external parsed general + entity. The referenced entity is not automatically parsed. The + application can parse it immediately or later using + XML_ExternalEntityParserCreate. + The parser argument is the parser parsing the entity containing the + reference; it can be passed as the parser argument to + XML_ExternalEntityParserCreate. The systemId argument is the + system identifier as specified in the entity declaration; it will + not be NULL. + + The base argument is the system identifier that should be used as + the base for resolving systemId if systemId was relative; this is + set by XML_SetBase; it may be NULL. + + The publicId argument is the public identifier as specified in the + entity declaration, or NULL if none was specified; the whitespace + in the public identifier will have been normalized as required by + the XML spec. + + The context argument specifies the parsing context in the format + expected by the context argument to XML_ExternalEntityParserCreate; + context is valid only until the handler returns, so if the + referenced entity is to be parsed later, it must be copied. + + The handler should return 0 if processing should not continue + because of a fatal error in the handling of the external entity. + In this case the calling parser will return an + XML_ERROR_EXTERNAL_ENTITY_HANDLING error. + + Note that unlike other handlers the first argument is the parser, + not userData. +*/ typedef int (*XML_ExternalEntityRefHandler)(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId); -/* This structure is filled in by the XML_UnknownEncodingHandler -to provide information to the parser about encodings that are unknown -to the parser. -The map[b] member gives information about byte sequences -whose first byte is b. -If map[b] is c where c is >= 0, then b by itself encodes the Unicode scalar -value c. -If map[b] is -1, then the byte sequence is malformed. -If map[b] is -n, where n >= 2, then b is the first byte of an n-byte -sequence that encodes a single Unicode scalar value. -The data member will be passed as the first argument to the convert function. -The convert function is used to convert multibyte sequences; -s will point to a n-byte sequence where map[(unsigned char)*s] == -n. -The convert function must return the Unicode scalar value -represented by this byte sequence or -1 if the byte sequence is malformed. -The convert function may be null if the encoding is a single-byte encoding, -that is if map[b] >= -1 for all bytes b. -When the parser is finished with the encoding, then if release is not null, -it will call release passing it the data member; -once release has been called, the convert function will not be called again. +/* This structure is filled in by the XML_UnknownEncodingHandler to + provide information to the parser about encodings that are unknown + to the parser. -Expat places certain restrictions on the encodings that are supported -using this mechanism. + The map[b] member gives information about byte sequences whose + first byte is b. -1. Every ASCII character that can appear in a well-formed XML document, -other than the characters + If map[b] is c where c is >= 0, then b by itself encodes the + Unicode scalar value c. - $@\^`{}~ + If map[b] is -1, then the byte sequence is malformed. -must be represented by a single byte, and that byte must be the -same byte that represents that character in ASCII. + If map[b] is -n, where n >= 2, then b is the first byte of an + n-byte sequence that encodes a single Unicode scalar value. -2. No character may require more than 4 bytes to encode. + The data member will be passed as the first argument to the convert + function. -3. All characters encoded must have Unicode scalar values <= 0xFFFF, (i.e., -characters that would be encoded by surrogates in UTF-16 are not -allowed). Note that this restriction doesn't apply to the built-in -support for UTF-8 and UTF-16. + The convert function is used to convert multibyte sequences; s will + point to a n-byte sequence where map[(unsigned char)*s] == -n. The + convert function must return the Unicode scalar value represented + by this byte sequence or -1 if the byte sequence is malformed. -4. No Unicode character may be encoded by more than one distinct sequence -of bytes. */ + The convert function may be NULL if the encoding is a single-byte + encoding, that is if map[b] >= -1 for all bytes b. + + When the parser is finished with the encoding, then if release is + not NULL, it will call release passing it the data member; once + release has been called, the convert function will not be called + again. + + Expat places certain restrictions on the encodings that are supported + using this mechanism. + + 1. Every ASCII character that can appear in a well-formed XML document, + other than the characters + + $@\^`{}~ + + must be represented by a single byte, and that byte must be the + same byte that represents that character in ASCII. + + 2. No character may require more than 4 bytes to encode. + 3. All characters encoded must have Unicode scalar values <= + 0xFFFF, (i.e., characters that would be encoded by surrogates in + UTF-16 are not allowed). Note that this restriction doesn't + apply to the built-in support for UTF-8 and UTF-16. + + 4. No Unicode character may be encoded by more than one distinct + sequence of bytes. +*/ typedef struct { int map[256]; void *data; @@ -402,16 +417,20 @@ } XML_Encoding; /* This is called for an encoding that is unknown to the parser. -The encodingHandlerData argument is that which was passed as the -second argument to XML_SetUnknownEncodingHandler. -The name argument gives the name of the encoding as specified in -the encoding declaration. -If the callback can provide information about the encoding, -it must fill in the XML_Encoding structure, and return 1. -Otherwise it must return 0. -If info does not describe a suitable encoding, -then the parser will return an XML_UNKNOWN_ENCODING error. */ + The encodingHandlerData argument is that which was passed as the + second argument to XML_SetUnknownEncodingHandler. + + The name argument gives the name of the encoding as specified in + the encoding declaration. + + If the callback can provide information about the encoding, it must + fill in the XML_Encoding structure, and return 1. Otherwise it + must return 0. + + If info does not describe a suitable encoding, then the parser will + return an XML_UNKNOWN_ENCODING error. +*/ typedef int (*XML_UnknownEncodingHandler)(void *encodingHandlerData, const XML_Char *name, XML_Encoding *info); @@ -452,17 +471,17 @@ XML_EndCdataSectionHandler end); /* This sets the default handler and also inhibits expansion of -internal entities. The entity reference will be passed to the default -handler. */ - + internal entities. The entity reference will be passed to the + default handler. +*/ XMLPARSEAPI(void) XML_SetDefaultHandler(XML_Parser parser, XML_DefaultHandler handler); /* This sets the default handler but does not inhibit expansion of -internal entities. The entity reference will not be passed to the -default handler. */ - + internal entities. The entity reference will not be passed to the + default handler. +*/ XMLPARSEAPI(void) XML_SetDefaultHandlerExpand(XML_Parser parser, XML_DefaultHandler handler); @@ -509,9 +528,10 @@ XML_SetExternalEntityRefHandler(XML_Parser parser, XML_ExternalEntityRefHandler handler); -/* If a non-null value for arg is specified here, then it will be passed -as the first argument to the external entity ref handler instead -of the parser object. */ +/* If a non-NULL value for arg is specified here, then it will be + passed as the first argument to the external entity ref handler + instead of the parser object. +*/ XMLPARSEAPI(void) XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg); @@ -520,17 +540,18 @@ XML_UnknownEncodingHandler handler, void *encodingHandlerData); -/* This can be called within a handler for a start element, end element, -processing instruction or character data. It causes the corresponding -markup to be passed to the default handler. */ +/* This can be called within a handler for a start element, end + element, processing instruction or character data. It causes the + corresponding markup to be passed to the default handler. +*/ XMLPARSEAPI(void) XML_DefaultCurrent(XML_Parser parser); /* If do_nst is non-zero, and namespace processing is in effect, and a name has a prefix (i.e. an explicit namespace qualifier) then - that name is returned as a triplet in a single - string separated by the separator character specified when the parser - was created: URI + sep + local_name + sep + prefix. + that name is returned as a triplet in a single string separated by + the separator character specified when the parser was created: URI + + sep + local_name + sep + prefix. If do_nst is zero, then namespace information is returned in the default manner (URI + sep + local_name) whether or not the names @@ -544,30 +565,31 @@ XMLPARSEAPI(void) XML_SetUserData(XML_Parser parser, void *userData); -/* Returns the last value set by XML_SetUserData or null. */ +/* Returns the last value set by XML_SetUserData or NULL. */ #define XML_GetUserData(parser) (*(void **)(parser)) -/* This is equivalent to supplying an encoding argument -to XML_ParserCreate. It must not be called after XML_Parse -or XML_ParseBuffer. */ - +/* This is equivalent to supplying an encoding argument to + XML_ParserCreate. It must not be called after XML_Parse or + XML_ParseBuffer. +*/ XMLPARSEAPI(int) XML_SetEncoding(XML_Parser parser, const XML_Char *encoding); -/* If this function is called, then the parser will be passed -as the first argument to callbacks instead of userData. -The userData will still be accessible using XML_GetUserData. */ - +/* If this function is called, then the parser will be passed as the + first argument to callbacks instead of userData. The userData will + still be accessible using XML_GetUserData. +*/ XMLPARSEAPI(void) XML_UseParserAsHandlerArg(XML_Parser parser); /* Sets the base to be used for resolving relative URIs in system -identifiers in declarations. Resolving relative identifiers is left -to the application: this value will be passed through as the base -argument to the XML_ExternalEntityRefHandler, XML_NotationDeclHandler -and XML_UnparsedEntityDeclHandler. The base argument will be copied. -Returns zero if out of memory, non-zero otherwise. */ - + identifiers in declarations. Resolving relative identifiers is + left to the application: this value will be passed through as the + base argument to the XML_ExternalEntityRefHandler, + XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base + argument will be copied. Returns zero if out of memory, non-zero + otherwise. +*/ XMLPARSEAPI(int) XML_SetBase(XML_Parser parser, const XML_Char *base); @@ -575,25 +597,26 @@ XML_GetBase(XML_Parser parser); /* Returns the number of the attribute/value pairs passed in last call -to the XML_StartElementHandler that were specified in the start-tag -rather than defaulted. Each attribute/value pair counts as 2; thus -this correspondds to an index into the atts array passed to the -XML_StartElementHandler. */ - + to the XML_StartElementHandler that were specified in the start-tag + rather than defaulted. Each attribute/value pair counts as 2; thus + this correspondds to an index into the atts array passed to the + XML_StartElementHandler. +*/ XMLPARSEAPI(int) XML_GetSpecifiedAttributeCount(XML_Parser parser); /* Returns the index of the ID attribute passed in the last call to -XML_StartElementHandler, or -1 if there is no ID attribute. Each -attribute/value pair counts as 2; thus this correspondds to an index -into the atts array passed to the XML_StartElementHandler. */ - + XML_StartElementHandler, or -1 if there is no ID attribute. Each + attribute/value pair counts as 2; thus this correspondds to an + index into the atts array passed to the XML_StartElementHandler. +*/ XMLPARSEAPI(int) XML_GetIdAttributeIndex(XML_Parser parser); -/* Parses some input. Returns 0 if a fatal error is detected. -The last call to XML_Parse must have isFinal true; -len may be zero for this call (or any other). */ +/* Parses some input. Returns 0 if a fatal error is detected. The + last call to XML_Parse must have isFinal true; len may be zero for + this call (or any other). +*/ XMLPARSEAPI(int) XML_Parse(XML_Parser parser, const char *s, int len, int isFinal); @@ -604,20 +627,21 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal); /* Creates an XML_Parser object that can parse an external general -entity; context is a '\0'-terminated string specifying the parse -context; encoding is a '\0'-terminated string giving the name of the -externally specified encoding, or null if there is no externally -specified encoding. The context string consists of a sequence of -tokens separated by formfeeds (\f); a token consisting of a name -specifies that the general entity of the name is open; a token of the -form prefix=uri specifies the namespace for a particular prefix; a -token of the form =uri specifies the default namespace. This can be -called at any point after the first call to an -ExternalEntityRefHandler so longer as the parser has not yet been -freed. The new parser is completely independent and may safely be -used in a separate thread. The handlers and userData are initialized -from the parser argument. Returns 0 if out of memory. Otherwise -returns a new XML_Parser object. */ + entity; context is a '\0'-terminated string specifying the parse + context; encoding is a '\0'-terminated string giving the name of + the externally specified encoding, or NULL if there is no + externally specified encoding. The context string consists of a + sequence of tokens separated by formfeeds (\f); a token consisting + of a name specifies that the general entity of the name is open; a + token of the form prefix=uri specifies the namespace for a + particular prefix; a token of the form =uri specifies the default + namespace. This can be called at any point after the first call to + an ExternalEntityRefHandler so longer as the parser has not yet + been freed. The new parser is completely independent and may + safely be used in a separate thread. The handlers and userData are + initialized from the parser argument. Returns 0 if out of memory. + Otherwise returns a new XML_Parser object. +*/ XMLPARSEAPI(XML_Parser) XML_ExternalEntityParserCreate(XML_Parser parser, const XML_Char *context, @@ -630,24 +654,26 @@ }; /* Controls parsing of parameter entities (including the external DTD -subset). If parsing of parameter entities is enabled, then references -to external parameter entities (including the external DTD subset) -will be passed to the handler set with -XML_SetExternalEntityRefHandler. The context passed will be 0. -Unlike external general entities, external parameter entities can only -be parsed synchronously. If the external parameter entity is to be -parsed, it must be parsed during the call to the external entity ref -handler: the complete sequence of XML_ExternalEntityParserCreate, -XML_Parse/XML_ParseBuffer and XML_ParserFree calls must be made during -this call. After XML_ExternalEntityParserCreate has been called to -create the parser for the external parameter entity (context must be 0 -for this call), it is illegal to make any calls on the old parser -until XML_ParserFree has been called on the newly created parser. If -the library has been compiled without support for parameter entity -parsing (ie without XML_DTD being defined), then -XML_SetParamEntityParsing will return 0 if parsing of parameter -entities is requested; otherwise it will return non-zero. */ + subset). If parsing of parameter entities is enabled, then + references to external parameter entities (including the external + DTD subset) will be passed to the handler set with + XML_SetExternalEntityRefHandler. The context passed will be 0. + Unlike external general entities, external parameter entities can + only be parsed synchronously. If the external parameter entity is + to be parsed, it must be parsed during the call to the external + entity ref handler: the complete sequence of + XML_ExternalEntityParserCreate, XML_Parse/XML_ParseBuffer and + XML_ParserFree calls must be made during this call. After + XML_ExternalEntityParserCreate has been called to create the parser + for the external parameter entity (context must be 0 for this + call), it is illegal to make any calls on the old parser until + XML_ParserFree has been called on the newly created parser. If the + library has been compiled without support for parameter entity + parsing (ie without XML_DTD being defined), then + XML_SetParamEntityParsing will return 0 if parsing of parameter + entities is requested; otherwise it will return non-zero. +*/ XMLPARSEAPI(int) XML_SetParamEntityParsing(XML_Parser parser, enum XML_ParamEntityParsing parsing); @@ -679,27 +705,28 @@ XML_ERROR_UNEXPECTED_STATE }; -/* If XML_Parse or XML_ParseBuffer have returned 0, then XML_GetErrorCode -returns information about the error. */ - +/* If XML_Parse or XML_ParseBuffer have returned 0, then + XML_GetErrorCode returns information about the error. +*/ XMLPARSEAPI(enum XML_Error) XML_GetErrorCode(XML_Parser parser); -/* These functions return information about the current parse location. -They may be called when XML_Parse or XML_ParseBuffer return 0; -in this case the location is the location of the character at which -the error was detected. -They may also be called from any other callback called to report -some parse event; in this the location is the location of the first -of the sequence of characters that generated the event. */ +/* These functions return information about the current parse + location. They may be called when XML_Parse or XML_ParseBuffer + return 0; in this case the location is the location of the + character at which the error was detected. + They may also be called from any other callback called to report + some parse event; in this the location is the location of the first + of the sequence of characters that generated the event. +*/ XMLPARSEAPI(int) XML_GetCurrentLineNumber(XML_Parser parser); XMLPARSEAPI(int) XML_GetCurrentColumnNumber(XML_Parser parser); XMLPARSEAPI(long) XML_GetCurrentByteIndex(XML_Parser parser); /* Return the number of bytes in the current event. -Returns 0 if the event is in an internal entity. */ - + Returns 0 if the event is in an internal entity. +*/ XMLPARSEAPI(int) XML_GetCurrentByteCount(XML_Parser parser); @@ -707,21 +734,21 @@ the integer pointed to by offset to the offset within this buffer of the current parse position, and sets the integer pointed to by size to the size of this buffer (the number of input bytes). Otherwise - returns a null pointer. Also returns a null pointer if a parse isn't + returns a NULL pointer. Also returns a NULL pointer if a parse isn't active. NOTE: The character pointer returned should not be used outside - the handler that makes the call. */ - + the handler that makes the call. +*/ XMLPARSEAPI(const char *) XML_GetInputContext(XML_Parser parser, int *offset, int *size); /* For backwards compatibility with previous versions. */ -#define XML_GetErrorLineNumber XML_GetCurrentLineNumber +#define XML_GetErrorLineNumber XML_GetCurrentLineNumber #define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber -#define XML_GetErrorByteIndex XML_GetCurrentByteIndex +#define XML_GetErrorByteIndex XML_GetCurrentByteIndex /* Frees memory used by the parser. */ XMLPARSEAPI(void) @@ -742,8 +769,8 @@ } XML_Expat_Version; /* Return an XML_Expat_Version structure containing numeric version - number information for this version of expat */ - + number information for this version of expat. +*/ XMLPARSEAPI(XML_Expat_Version) XML_ExpatVersionInfo(void); @@ -751,8 +778,8 @@ /* Expat follows the GNU/Linux convention of odd number minor version for beta/development releases and even number minor version for stable releases. Micro is bumped with each release, and set to 0 with each - change to major or minor version. */ - + change to major or minor version. +*/ #define XML_MAJOR_VERSION 1 #define XML_MINOR_VERSION 95 #define XML_MICRO_VERSION 3 From fdrake@users.sourceforge.net Tue May 21 22:28:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Tue May 21 21:28:03 2002 Subject: [Expat-checkins] expat/lib xmlparse.c,1.38,1.39 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv19314/lib Modified Files: xmlparse.c Log Message: Code hygiene: Use "NULL" instead of "0" for NULL pointers. Compare pointers == NULL or != NULL instead of using the implicit point-to-int conversion. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- xmlparse.c 20 May 2002 11:06:41 -0000 1.38 +++ xmlparse.c 22 May 2002 04:27:06 -0000 1.39 @@ -625,8 +625,8 @@ if (!parser) return parser; - buffer = 0; - bufferLim = 0; + buffer = NULL; + bufferLim = NULL; attsSize = INIT_ATTS_SIZE; atts = MALLOC(attsSize * sizeof(ATTRIBUTE)); @@ -641,9 +641,9 @@ return NULL; } dataBufEnd = dataBuf + INIT_DATA_BUF_SIZE; - freeBindingList = 0; - inheritedBindings = 0; - freeTagList = 0; + freeBindingList = NULL; + inheritedBindings = NULL; + freeTagList = NULL; namespaceSeparator = '!'; ns = 0; @@ -678,68 +678,68 @@ { processor = prologInitProcessor; XmlPrologStateInit(&prologState); - protocolEncodingName = (encodingName + protocolEncodingName = (encodingName != NULL ? poolCopyString(&tempPool, encodingName) - : 0); - curBase = 0; + : NULL); + curBase = NULL; XmlInitEncoding(&initEncoding, &encoding, 0); - userData = 0; - handlerArg = 0; - startElementHandler = 0; - endElementHandler = 0; - characterDataHandler = 0; - processingInstructionHandler = 0; - commentHandler = 0; - startCdataSectionHandler = 0; - endCdataSectionHandler = 0; - defaultHandler = 0; - startDoctypeDeclHandler = 0; - endDoctypeDeclHandler = 0; - unparsedEntityDeclHandler = 0; - notationDeclHandler = 0; - startNamespaceDeclHandler = 0; - endNamespaceDeclHandler = 0; - notStandaloneHandler = 0; - externalEntityRefHandler = 0; + userData = NULL; + handlerArg = NULL; + startElementHandler = NULL; + endElementHandler = NULL; + characterDataHandler = NULL; + processingInstructionHandler = NULL; + commentHandler = NULL; + startCdataSectionHandler = NULL; + endCdataSectionHandler = NULL; + defaultHandler = NULL; + startDoctypeDeclHandler = NULL; + endDoctypeDeclHandler = NULL; + unparsedEntityDeclHandler = NULL; + notationDeclHandler = NULL; + startNamespaceDeclHandler = NULL; + endNamespaceDeclHandler = NULL; + notStandaloneHandler = NULL; + externalEntityRefHandler = NULL; externalEntityRefHandlerArg = parser; - unknownEncodingHandler = 0; - elementDeclHandler = 0; - attlistDeclHandler = 0; - entityDeclHandler = 0; - xmlDeclHandler = 0; + unknownEncodingHandler = NULL; + elementDeclHandler = NULL; + attlistDeclHandler = NULL; + entityDeclHandler = NULL; + xmlDeclHandler = NULL; bufferPtr = buffer; bufferEnd = buffer; parseEndByteIndex = 0; - parseEndPtr = 0; - declElementType = 0; - declAttributeId = 0; - declEntity = 0; - doctypeName = 0; - doctypeSysid = 0; - doctypePubid = 0; - declAttributeType = 0; - declNotationName = 0; - declNotationPublicId = 0; + parseEndPtr = NULL; + declElementType = NULL; + declAttributeId = NULL; + declEntity = NULL; + doctypeName = NULL; + doctypeSysid = NULL; + doctypePubid = NULL; + declAttributeType = NULL; + declNotationName = NULL; + declNotationPublicId = NULL; declAttributeIsCdata = 0; declAttributeIsId = 0; memset(&position, 0, sizeof(POSITION)); errorCode = XML_ERROR_NONE; - eventPtr = 0; - eventEndPtr = 0; - positionPtr = 0; + eventPtr = NULL; + eventEndPtr = NULL; + positionPtr = NULL; openInternalEntities = 0; defaultExpandInternalEntities = 0; tagLevel = 0; tagStack = 0; nSpecifiedAtts = 0; groupSize = 0; - groupConnector = 0; + groupConnector = NULL; hadExternalDoctype = 0; - unknownEncodingMem = 0; - unknownEncodingRelease = 0; - unknownEncodingData = 0; - unknownEncodingHandlerData = 0; - parentParser = 0; + unknownEncodingMem = NULL; + unknownEncodingRelease = NULL; + unknownEncodingData = NULL; + unknownEncodingHandlerData = NULL; + parentParser = NULL; #ifdef XML_DTD isParamEntity = 0; paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER; @@ -762,8 +762,8 @@ int XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName) { - if (!encodingName) - protocolEncodingName = 0; + if (encodingName == NULL) + protocolEncodingName = NULL; else { protocolEncodingName = poolCopyString(&tempPool, encodingName); if (!protocolEncodingName) @@ -895,10 +895,10 @@ for (;;) { TAG *p; if (tagStack == 0) { - if (freeTagList == 0) + if (freeTagList == NULL) break; tagStack = freeTagList; - freeTagList = 0; + freeTagList = NULL; } p = tagStack; tagStack = tagStack->parent; @@ -956,7 +956,7 @@ curBase = p; } else - curBase = 0; + curBase = NULL; return 1; } @@ -1201,7 +1201,7 @@ buffer = temp; if (!buffer) { errorCode = XML_ERROR_NO_MEMORY; - eventPtr = eventEndPtr = 0; + eventPtr = eventEndPtr = NULL; processor = errorProcessor; return 0; } @@ -1657,8 +1657,8 @@ openEntity.next = openInternalEntities; openInternalEntities = &openEntity; openEntity.entity = entity; - openEntity.internalEventPtr = 0; - openEntity.internalEventEndPtr = 0; + openEntity.internalEventPtr = NULL; + openEntity.internalEventEndPtr = NULL; result = doContent(parser, tagLevel, internalEncoding, @@ -1715,10 +1715,10 @@ } tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE; } - tag->bindings = 0; + tag->bindings = NULL; tag->parent = tagStack; tagStack = tag; - tag->name.localPart = 0; + tag->name.localPart = NULL; tag->rawName = s + enc->minBytesPerChar; tag->rawNameLength = XmlNameLength(enc, tag->rawName); if (nextPtr) { @@ -1779,7 +1779,7 @@ poolClear(&tempPool); } else { - tag->name.str = 0; + tag->name.str = NULL; if (defaultHandler) reportDefault(parser, enc, s, next); } @@ -1796,7 +1796,7 @@ if (startElementHandler || endElementHandler) { const char *rawName = s + enc->minBytesPerChar; enum XML_Error result; - BINDING *bindings = 0; + BINDING *bindings = NULL; TAG_NAME name; name.str = poolStoreString(&tempPool, enc, rawName, rawName + XmlNameLength(enc, rawName)); @@ -1994,7 +1994,7 @@ const char *attStr, TAG_NAME *tagNamePtr, BINDING **bindingsPtr) { - ELEMENT_TYPE *elementType = 0; + ELEMENT_TYPE *elementType = NULL; int nDefaultAtts = 0; const XML_Char **appAtts; /* the attribute list for the application */ int attIndex = 0; @@ -2282,7 +2282,7 @@ b->attId = attId; b->prevPrefixBinding = prefix->binding; if (*uri == XML_T('\0') && prefix == &dtd.defaultPrefix) - prefix->binding = 0; + prefix->binding = NULL; else prefix->binding = b; b->nextTagBinding = *bindingsPtr; @@ -2334,7 +2334,7 @@ eventEndPP = &(openInternalEntities->internalEventEndPtr); } *eventPP = s; - *startPtr = 0; + *startPtr = NULL; for (;;) { const char *next; int tok = XmlCdataSectionTok(enc, s, end, &next); @@ -2452,7 +2452,7 @@ eventEndPP = &(openInternalEntities->internalEventEndPtr); } *eventPP = s; - *startPtr = 0; + *startPtr = NULL; tok = XmlIgnoreSectionTok(enc, s, end, &next); *eventEndPP = next; switch (tok) { @@ -2493,7 +2493,7 @@ #ifdef XML_UNICODE char encodingBuf[128]; if (!protocolEncodingName) - s = 0; + s = NULL; else { int i; for (i = 0; protocolEncodingName[i]; i++) { @@ -2519,12 +2519,12 @@ processXmlDecl(XML_Parser parser, int isGeneralTextEntity, const char *s, const char *next) { - const char *encodingName = 0; - const XML_Char *storedEncName = 0; - const ENCODING *newEncoding = 0; - const char *version = 0; + const char *encodingName = NULL; + const XML_Char *storedEncName = NULL; + const ENCODING *newEncoding = NULL; + const char *version = NULL; const char *versionend; - const XML_Char *storedversion = 0; + const XML_Char *storedversion = NULL; int standalone = -1; if (!(ns ? XmlParseXmlDeclNS @@ -2547,7 +2547,7 @@ #endif /* XML_DTD */ } if (xmlDeclHandler) { - if (encodingName) { + if (encodingName != NULL) { storedEncName = poolStoreString(&temp2Pool, encoding, encodingName, @@ -2569,7 +2569,7 @@ } else if (defaultHandler) reportDefault(parser, encoding, s, next); - if (!protocolEncodingName) { + if (protocolEncodingName == NULL) { if (newEncoding) { if (newEncoding->minBytesPerChar != encoding->minBytesPerChar) { eventPtr = encodingName; @@ -2608,9 +2608,9 @@ int i; for (i = 0; i < 256; i++) info.map[i] = -1; - info.convert = 0; - info.data = 0; - info.release = 0; + info.convert = NULL; + info.data = NULL; + info.release = NULL; if (unknownEncodingHandler(unknownEncodingHandlerData, encodingName, &info)) { ENCODING *enc; @@ -2633,7 +2633,7 @@ return XML_ERROR_NONE; } } - if (info.release) + if (info.release != NULL) info.release(info.data); } return XML_ERROR_UNKNOWN_ENCODING; @@ -2907,15 +2907,15 @@ if (! doctypeName) return XML_ERROR_NO_MEMORY; poolFinish(&tempPool); - doctypeSysid = 0; - doctypePubid = 0; + doctypeSysid = NULL; + doctypePubid = NULL; } break; case XML_ROLE_DOCTYPE_INTERNAL_SUBSET: if (startDoctypeDeclHandler) { startDoctypeDeclHandler(handlerArg, doctypeName, doctypeSysid, doctypePubid, 1); - doctypeName = 0; + doctypeName = NULL; poolClear(&tempPool); } break; @@ -3002,7 +3002,7 @@ if (!declAttributeId) return XML_ERROR_NO_MEMORY; declAttributeIsCdata = 0; - declAttributeType = 0; + declAttributeType = NULL; declAttributeIsId = 0; break; case XML_ROLE_ATTRIBUTE_TYPE_CDATA: @@ -3139,9 +3139,9 @@ case XML_ROLE_DOCTYPE_SYSTEM_ID: if (startDoctypeDeclHandler) { doctypeSysid = poolStoreString(&tempPool, enc, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (!doctypeSysid) + s + enc->minBytesPerChar, + next - enc->minBytesPerChar); + if (doctypeSysid == NULL) return XML_ERROR_NO_MEMORY; poolFinish(&tempPool); } @@ -3162,7 +3162,7 @@ sizeof(ENTITY)); if (!declEntity) return XML_ERROR_NO_MEMORY; - declEntity->publicId = 0; + declEntity->publicId = NULL; } /* fall through */ #endif /* XML_DTD */ @@ -3221,7 +3221,7 @@ { const XML_Char *name; if (XmlPredefinedEntityName(enc, s, next)) { - declEntity = 0; + declEntity = NULL; break; } name = poolStoreString(&dtd.pool, enc, s, next); @@ -3233,11 +3233,11 @@ return XML_ERROR_NO_MEMORY; if (declEntity->name != name) { poolDiscard(&dtd.pool); - declEntity = 0; + declEntity = NULL; } else { poolFinish(&dtd.pool); - declEntity->publicId = 0; + declEntity->publicId = NULL; declEntity->is_param = 0; } } @@ -3263,12 +3263,12 @@ } } #else /* not XML_DTD */ - declEntity = 0; + declEntity = NULL; #endif /* not XML_DTD */ break; case XML_ROLE_NOTATION_NAME: - declNotationPublicId = 0; - declNotationName = 0; + declNotationPublicId = NULL; + declNotationName = NULL; if (notationDeclHandler) { declNotationName = poolStoreString(&tempPool, enc, s, next); if (!declNotationName) @@ -3466,9 +3466,9 @@ if (! content) return XML_ERROR_NO_MEMORY; content->quant = XML_CQUANT_NONE; - content->name = 0; + content->name = NULL; content->numchildren = 0; - content->children = 0; + content->children = NULL; content->type = ((role == XML_ROLE_CONTENT_ANY) ? XML_CTYPE_ANY : XML_CTYPE_EMPTY); @@ -3654,8 +3654,8 @@ openEntity.next = openInternalEntities; openInternalEntities = &openEntity; openEntity.entity = entity; - openEntity.internalEventPtr = 0; - openEntity.internalEventEndPtr = 0; + openEntity.internalEventPtr = NULL; + openEntity.internalEventEndPtr = NULL; s = (char *)entity->textPtr; end = (char *)(entity->textPtr + entity->textLen); tok = XmlPrologTok(internalEncoding, s, end, &next); @@ -4184,10 +4184,10 @@ int j; for (j = 0; j < i; j++) { if (!poolAppendChar(&dtd.pool, name[j])) - return 0; + return NULL; } if (!poolAppendChar(&dtd.pool, XML_T('\0'))) - return 0; + return NULL; id->prefix = (PREFIX *)lookup(&dtd.prefixes, poolStart(&dtd.pool), sizeof(PREFIX)); if (id->prefix->name == poolStart(&dtd.pool)) @@ -4220,7 +4220,7 @@ len--; for (i = 0; i < len; i++) if (!poolAppendChar(&tempPool, dtd.defaultPrefix.binding->uri[i])) - return 0; + return NULL; needSep = 1; } @@ -4246,7 +4246,7 @@ len--; for (i = 0; i < len; i++) if (!poolAppendChar(&tempPool, prefix->binding->uri[i])) - return 0; + return NULL; needSep = 1; } @@ -4371,13 +4371,13 @@ #ifdef XML_DTD hashTableInit(&(p->paramEntities), ms); #endif /* XML_DTD */ - p->defaultPrefix.name = 0; - p->defaultPrefix.binding = 0; + p->defaultPrefix.name = NULL; + p->defaultPrefix.binding = NULL; p->in_eldecl = 0; p->scaffIndex = 0; p->scaffLevel = 0; - p->scaffold = 0; + p->scaffold = NULL; p->contentStringLen = 0; p->scaffSize = 0; p->scaffCount = 0; @@ -4526,7 +4526,7 @@ return 0; } else - newE->defaultAtts[i].value = 0; + newE->defaultAtts[i].value = NULL; } } @@ -4563,8 +4563,8 @@ XML_Parser parser) { HASH_TABLE_ITER iter; - const XML_Char *cachedOldBase = 0; - const XML_Char *cachedNewBase = 0; + const XML_Char *cachedOldBase = NULL; + const XML_Char *cachedNewBase = NULL; hashTableIterInit(&iter, oldTable); @@ -4866,7 +4866,7 @@ if (pool->start == 0) { pool->blocks = pool->freeBlocks; pool->freeBlocks = pool->freeBlocks->next; - pool->blocks->next = 0; + pool->blocks->next = NULL; pool->start = pool->blocks->s; pool->end = pool->start + pool->blocks->size; pool->ptr = pool->start; @@ -4987,7 +4987,7 @@ src++; } dest->numchildren = 0; - dest->children = 0; + dest->children = NULL; } else { unsigned int i; @@ -5000,7 +5000,7 @@ i++, cn = dtd.scaffold[cn].nextsib) { build_node(parser, cn, &(dest->children[i]), contpos, strpos); } - dest->name = 0; + dest->name = NULL; } } /* End build_node */ From fdrake@users.sourceforge.net Wed May 22 14:21:07 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed May 22 13:21:07 2002 Subject: [Expat-checkins] expat/tests chardata.h,1.2,1.3 Message-ID: Update of /cvsroot/expat/expat/tests In directory usw-pr-cvs1:/tmp/cvs-serv1687 Modified Files: chardata.h Log Message: Add a small comment to tell what this is. Index: chardata.h =================================================================== RCS file: /cvsroot/expat/expat/tests/chardata.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- chardata.h 21 May 2002 21:39:18 -0000 1.2 +++ chardata.h 22 May 2002 20:20:05 -0000 1.3 @@ -1,7 +1,8 @@ -/* chardata.h - * - * - */ +/* chardata.h + + Interface to some helper routines used to accumulate and check text + and attribute content. +*/ #ifndef XML_CHARDATA_H #define XML_CHARDATA_H 1 From fdrake@users.sourceforge.net Wed May 22 14:23:06 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Wed May 22 13:23:06 2002 Subject: [Expat-checkins] expat/tests runtests.c,1.19,1.20 Message-ID: Update of /cvsroot/expat/expat/tests In directory usw-pr-cvs1:/tmp/cvs-serv2456 Modified Files: runtests.c Log Message: Share the comment style with the rest of Expat. Index: runtests.c =================================================================== RCS file: /cvsroot/expat/expat/tests/runtests.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- runtests.c 22 May 2002 03:27:17 -0000 1.19 +++ runtests.c 22 May 2002 20:22:25 -0000 1.20 @@ -27,9 +27,9 @@ } /* Generate a failure using the parser state to create an error message; - * this should be used when the parser reports an error we weren't - * expecting. - */ + this should be used when the parser reports an error we weren't + expecting. +*/ static void _xml_failure(XML_Parser parser, const char *file, int line) { @@ -202,10 +202,10 @@ /* End regression test for SF bug #514281. */ /* Regression test for SF bug #477667. - * This test assures that any 8-bit character followed by a 7-bit - * character will not be mistakenly interpreted as a valid UTF-8 - * sequence. - */ + This test assures that any 8-bit character followed by a 7-bit + character will not be mistakenly interpreted as a valid UTF-8 + sequence. +*/ START_TEST(test_illegal_utf8) { char text[100]; @@ -230,8 +230,8 @@ START_TEST(test_utf16) { /* - * some text - */ + some text + */ char text[] = "\000<\000?\000x\000m\000\154\000 \000v\000e\000r\000s\000i\000o" "\000n\000=\000'\0001\000.\000\060\000'\000 \000e\000n\000c\000o" @@ -268,15 +268,14 @@ */ /* Helpers used by the following test; this checks any "attr" and "refs" - * attributes to make sure whitespace has been normalized. - */ + attributes to make sure whitespace has been normalized. -/* Return true if whitespace has been normalized in a string, using - * the rules for attribute value normalization. The 'is_cdata' flag - * is needed since CDATA attributes don't need to have multiple - * whitespace characters collapsed to a single space, while other - * attribute data types do. (Section 3.3.3 of the recommendation.) - */ + Return true if whitespace has been normalized in a string, using + the rules for attribute value normalization. The 'is_cdata' flag + is needed since CDATA attributes don't need to have multiple + whitespace characters collapsed to a single space, while other + attribute data types do. (Section 3.3.3 of the recommendation.) +*/ static int is_whitespace_normalized(const XML_Char *s, int is_cdata) { @@ -417,10 +416,10 @@ } /* Check that an element name and attribute name match the expected values. - * The expected values are passed as an array reference of string pointers - * provided as the userData argument; the first is the expected - * element name, and the second is the expected attribute name. - */ + The expected values are passed as an array reference of string pointers + provided as the userData argument; the first is the expected + element name, and the second is the expected attribute name. +*/ static void triplet_start_checker(void *userData, const XML_Char *name, const XML_Char **atts) @@ -438,9 +437,9 @@ } /* Check that the element name passed to the end-element handler matches - * the expected value. The expected value is passed as the first element - * in an array of strings passed as the userData argument. - */ + the expected value. The expected value is passed as the first element + in an array of strings passed as the userData argument. +*/ static void triplet_end_checker(void *userData, const XML_Char *name) { From fdrake@users.sourceforge.net Thu May 23 12:38:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 23 11:38:03 2002 Subject: [Expat-checkins] expat/lib xmlparse.c,1.39,1.40 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv22368/lib Modified Files: xmlparse.c Log Message: In the "DTD scaffold", keep the count of elements allocated in sync with the number of elements. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- xmlparse.c 22 May 2002 04:27:06 -0000 1.39 +++ xmlparse.c 23 May 2002 18:37:03 -0000 1.40 @@ -4944,7 +4944,10 @@ dtd.scaffSize *= 2; } else { - temp = MALLOC(dtd.scaffSize * sizeof(CONTENT_SCAFFOLD)); + /* 32 is the new value of dtd.scaffSize; + these two occurances must be kept in sync: + */ + temp = MALLOC(32 * sizeof(CONTENT_SCAFFOLD)); if (temp == NULL) return -1; dtd.scaffSize = 32; From fdrake@users.sourceforge.net Thu May 23 13:09:07 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 23 12:09:07 2002 Subject: [Expat-checkins] expat/lib xmlparse.c,1.40,1.41 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv26803/lib Modified Files: xmlparse.c Log Message: Give in and define a constant for the intial number of elements in the content type scaffold. This removes the annoying magic number in the code. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- xmlparse.c 23 May 2002 18:37:03 -0000 1.40 +++ xmlparse.c 23 May 2002 18:50:51 -0000 1.41 @@ -168,6 +168,8 @@ int nextsib; } CONTENT_SCAFFOLD; +#define INIT_SCAFFOLD_ELEMENTS 32 + typedef struct block { struct block *next; int size; @@ -4944,13 +4946,10 @@ dtd.scaffSize *= 2; } else { - /* 32 is the new value of dtd.scaffSize; - these two occurances must be kept in sync: - */ - temp = MALLOC(32 * sizeof(CONTENT_SCAFFOLD)); + temp = MALLOC(INIT_SCAFFOLD_ELEMENTS * sizeof(CONTENT_SCAFFOLD)); if (temp == NULL) return -1; - dtd.scaffSize = 32; + dtd.scaffSize = INIT_SCAFFOLD_ELEMENTS; } dtd.scaffold = temp; } From kwaclaw@users.sourceforge.net Thu May 30 12:04:03 2002 From: kwaclaw@users.sourceforge.net (kwaclaw@users.sourceforge.net) Date: Thu May 30 11:04:03 2002 Subject: [Expat-checkins] expat/lib xmltok.c,1.15,1.16 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv28325 Modified Files: xmltok.c Log Message: Applied patch # 562005 "Detect invalid UTF-8 sequences" Index: xmltok.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- xmltok.c 20 May 2002 11:06:41 -0000 1.15 +++ xmltok.c 30 May 2002 18:02:59 -0000 1.16 @@ -66,12 +66,40 @@ ? UTF8_GET_NAMING3(pages, (const unsigned char *)(p)) \ : 0)) +/* Detection of invalid UTF-8 sequences is based on Table 3.1B + of Unicode 3.2: http://www.unicode.org/unicode/reports/tr28/. + Implementation details: + (A & 0x80) == 0 means A < 0x80 + and + (A & 0xC0) == 0xC0 means A > 0xBF +*/ + +#define UTF8_INVALID2(p) \ + ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0) + #define UTF8_INVALID3(p) \ - ((((*p) && 0xF0) == 0xE0) \ - && (((p)[1] && 0xC0) == 0x80) \ - && (((p)[2] && 0xC0) == 0x80)) + (((p)[2] & 0x80) == 0 || ((p)[2] & 0xC0) == 0xC0 \ + || \ + ((*p) == 0xE0 \ + ? \ + (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0 \ + : \ + ((p)[1] & 0x80) == 0 \ + || \ + ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0))) -#define UTF8_INVALID4(p) ((*p) == 0xF4 && ((p)[1] & 0x30) != 0) +#define UTF8_INVALID4(p) \ + (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 \ + || \ + ((p)[2] & 0x80) == 0 || ((p)[2] & 0xC0) == 0xC0 \ + || \ + ((*p) == 0xF0 \ + ? \ + (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0 \ + : \ + ((p)[1] & 0x80) == 0 \ + || \ + ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0))) static int isNever(const ENCODING *enc, const char *p) @@ -107,7 +135,11 @@ #define utf8_isNmstrt4 isNever -#define utf8_isInvalid2 isNever +static int +utf8_isInvalid2(const ENCODING *enc, const char *p) +{ + return UTF8_INVALID2((const unsigned char *)p); +} static int utf8_isInvalid3(const ENCODING *enc, const char *p) From fdrake@users.sourceforge.net Thu May 30 13:04:04 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 30 12:04:04 2002 Subject: [Expat-checkins] htdocs Makefile,NONE,1.1 Message-ID: Update of /cvsroot/expat/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv16605 Added Files: Makefile Log Message: Simple makefile that remembers how to update the anonymous checkout of the HTML docs that gets shoved out through HTTP. --- NEW FILE: Makefile --- DIR=/home/groups/e/ex/expat/htdocs HOST=expat.sourceforge.net install: ssh $(HOST) cd $(DIR) '&&' cvs up From fdrake@users.sourceforge.net Thu May 30 20:31:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 30 19:31:02 2002 Subject: [Expat-checkins] expat/examples elements.dsp,1.2,1.3 Message-ID: Update of /cvsroot/expat/expat/examples In directory usw-pr-cvs1:/tmp/cvs-serv21770/examples Modified Files: elements.dsp Log Message: Renamed the Expat DLLs from "expat.dll" to "libexpat.dll". This solves a real naming conflict with Perl's XML::Parser::Expat module and the relatively recent 1.95.x naming of the combined Expat DLL. This does not introduce new names for the "wide" version of the Expat API; this will be a separate change. See SF bug #432456. Index: elements.dsp =================================================================== RCS file: /cvsroot/expat/expat/examples/elements.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- elements.dsp 27 Jul 2001 14:21:23 -0000 1.2 +++ elements.dsp 31 May 2002 02:30:31 -0000 1.3 @@ -51,7 +51,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 odbccp32.lib expat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib expat.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\lib\Release" +# ADD LINK32 odbccp32.lib libexpat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\lib\Release" !ELSEIF "$(CFG)" == "elements - Win32 Debug" @@ -67,7 +67,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe @@ -75,7 +75,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 odbccp32.lib expat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /out:"Debug/elements.exe" /libpath:"..\lib\Debug" +# ADD LINK32 odbccp32.lib libexpat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\lib\Debug" !ENDIF From fdrake@users.sourceforge.net Thu May 30 20:31:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 30 19:31:02 2002 Subject: [Expat-checkins] expat/lib expat.dsp,1.7,1.8 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv21770/lib Modified Files: expat.dsp Log Message: Renamed the Expat DLLs from "expat.dll" to "libexpat.dll". This solves a real naming conflict with Perl's XML::Parser::Expat module and the relatively recent 1.95.x naming of the combined Expat DLL. This does not introduce new names for the "wide" version of the Expat API; this will be a separate change. See SF bug #432456. Index: expat.dsp =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.dsp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- expat.dsp 17 May 2002 21:38:12 -0000 1.7 +++ expat.dsp 31 May 2002 02:30:31 -0000 1.8 @@ -40,6 +40,7 @@ # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /D "COMPILED_FROM_DSP" /FD /c @@ -53,7 +54,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"Release\libexpat.dll" !ELSEIF "$(CFG)" == "expat - Win32 Debug" @@ -66,7 +67,6 @@ # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c # ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /FR /FD /GZ /c @@ -79,7 +79,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /debug /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /debug /machine:I386 /out:"Debug\libexpat.dll" !ENDIF From fdrake@users.sourceforge.net Thu May 30 21:13:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 30 20:13:02 2002 Subject: [Expat-checkins] expat expat.dsw,1.4,1.5 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv7290 Modified Files: expat.dsw Log Message: Added new project to the MSVC workspace: expatw. This builds libexpatw.dll (in release and debug versions) using wchar_t output. This *probably* closes SF bug #432456. See comments in the issue tracker for more info. Index: expat.dsw =================================================================== RCS file: /cvsroot/expat/expat/expat.dsw,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- expat.dsw 27 Jul 2001 14:46:06 -0000 1.4 +++ expat.dsw 31 May 2002 03:12:47 -0000 1.5 @@ -30,6 +30,18 @@ ############################################################################### +Project: "expatw"=.\lib\expatw.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "outline"=.\examples\outline.dsp - Package Owner=<4> Package=<5> From fdrake@users.sourceforge.net Thu May 30 21:13:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 30 20:13:02 2002 Subject: [Expat-checkins] expat/lib expatw.dsp,NONE,1.1 .cvsignore,1.3,1.4 Message-ID: Update of /cvsroot/expat/expat/lib In directory usw-pr-cvs1:/tmp/cvs-serv7290/lib Modified Files: .cvsignore Added Files: expatw.dsp Log Message: Added new project to the MSVC workspace: expatw. This builds libexpatw.dll (in release and debug versions) using wchar_t output. This *probably* closes SF bug #432456. See comments in the issue tracker for more info. --- NEW FILE: expatw.dsp --- # Microsoft Developer Studio Project File - Name="expatw" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=expatw - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "expatw.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "expatw.mak" CFG="expatw - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "expatw - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "expatw - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "expatw - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release-w" # PROP Intermediate_Dir "Release-w" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /D "XML_UNICODE_WCHAR_T" /FD /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"Release-w\libexpatw.dll" !ELSEIF "$(CFG)" == "expatw - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug-w" # PROP Intermediate_Dir "Debug-w" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /Yu"stdafx.h" /FD /GZ /c # ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "_DEBUG" /D "COMPILED_FROM_DSP" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPAT_EXPORTS" /D "XML_UNICODE_WCHAR_T" /FR /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /debug /machine:I386 /out:"Debug-w\libexpatw.dll" !ENDIF # Begin Target # Name "expatw - Win32 Release" # Name "expatw - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\xmlparse.c !IF "$(CFG)" == "expatw - Win32 Release" !ELSEIF "$(CFG)" == "expatw - Win32 Debug" # ADD CPP /GX- /Od !ENDIF # End Source File # Begin Source File SOURCE=.\xmlrole.c # End Source File # Begin Source File SOURCE=.\xmltok.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=.\ascii.h # End Source File # Begin Source File SOURCE=.\asciitab.h # End Source File # Begin Source File SOURCE=.\expat.h # End Source File # Begin Source File SOURCE=.\iasciitab.h # End Source File # Begin Source File SOURCE=.\latin1tab.h # End Source File # Begin Source File SOURCE=.\nametab.h # End Source File # Begin Source File SOURCE=.\utf8tab.h # End Source File # Begin Source File SOURCE=.\xmlrole.h # End Source File # Begin Source File SOURCE=.\xmltok.h # End Source File # Begin Source File SOURCE=.\xmltok_impl.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project Index: .cvsignore =================================================================== RCS file: /cvsroot/expat/expat/lib/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- .cvsignore 24 Jul 2001 16:50:37 -0000 1.3 +++ .cvsignore 31 May 2002 03:12:47 -0000 1.4 @@ -4,7 +4,9 @@ *.la expat.h Debug +Debug-w Release +Release-w expat.ncb expat.opt expat.plg From fdrake@users.sourceforge.net Thu May 30 21:46:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 30 20:46:02 2002 Subject: [Expat-checkins] expat Changes,1.11,1.12 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv17727 Modified Files: Changes Log Message: Add section for Expat 1.95.3. Added blank lines for readability. Index: Changes =================================================================== RCS file: /cvsroot/expat/expat/Changes,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Changes 28 Jul 2001 03:29:55 -0000 1.11 +++ Changes 31 May 2002 03:45:50 -0000 1.12 @@ -1,3 +1,16 @@ +Release 1.95.3 (not yet) + - Added a project to the MSVC workspace to create a wchar_t + version of the library; the DLLs are named libexpatw.dll. + - Changed the name of the Windows DLLs from expat.dll to + libexpat.dll; this fixes SF bug #432456. + - Added the XML_ParserReset() API function. + - Made the XML_UNICODE builds usable (thanks, Karl!). + - Install a man page for xmlwf on Unix systems. + - Fixed many bugs; see SF bug reports 231864, 461380, 464837, + 466885, 469226, 477667, 484419, 487840, 494749, 496505, + 547350. Other bugs which we can't test as easily may also + have been fixed, especially in the area of build support. + Release 1.95.2 Fri Jul 27 2001 - More changes to make MSVC happy with the build; add a single workspace to support both the library and xmlwf application. @@ -10,6 +23,7 @@ - Fix the UTF-8 BOM bug. - Cleaned up warning messages for several compilers. - Added the -Wall, -Wstrict-prototypes options for GCC. + Release 1.95.1 Sun Oct 22 15:11:36 EDT 2000 - Changes to get expat to build under Microsoft compiler - Removed all aborts and instead return an UNEXPECTED_STATE error. @@ -22,6 +36,7 @@ account to test on. - The reference had the wrong label for XML_SetStartNamespaceDecl. Reported by an anonymous user. + Release 1.95.0 Fri Sep 29 2000 - XML_ParserCreate_MM Allows you to set a memory management suite to replace the From fdrake@users.sourceforge.net Thu May 30 22:02:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 30 21:02:02 2002 Subject: [Expat-checkins] expat README,1.13,1.14 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv22221 Modified Files: README Log Message: Link to SF's own mail archiver rather than GeoCrawler. Index: README =================================================================== RCS file: /cvsroot/expat/expat/README,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- README 20 Apr 2002 21:15:46 -0000 1.13 +++ README 31 May 2002 04:00:59 -0000 1.14 @@ -67,4 +67,6 @@ Discussion related to the direction of future expat development takes place on expat-discuss@lists.sourceforge.net. Archives of this list -may be found at http://www.geocrawler.com/redir-sf.php3?list=expat-discuss. +may be found at: + + http://sourceforge.net/mailarchive/forum.php?forum_id=6385 From fdrake@users.sourceforge.net Thu May 30 22:37:01 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Thu May 30 21:37:01 2002 Subject: [Expat-checkins] expat/win32 expat.iss,1.7,1.8 Message-ID: Update of /cvsroot/expat/expat/win32 In directory usw-pr-cvs1:/tmp/cvs-serv773 Modified Files: expat.iss Log Message: Added the test suite and wchar_t versions of the DLL. Index: expat.iss =================================================================== RCS file: /cvsroot/expat/expat/win32/expat.iss,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- expat.iss 24 Apr 2002 13:10:09 -0000 1.7 +++ expat.iss 31 May 2002 04:35:57 -0000 1.8 @@ -8,7 +8,7 @@ AppId=expat AppVersion=1.95.3 AppVerName=expat 1.95.3 -AppCopyright=Copyright © 1998-2001 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers +AppCopyright=Copyright © 1998-2002 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers DefaultDirName={sd}\Expat-1.95.3 AppPublisher=The Expat Developers AppPublisherURL=http://expat.sourceforge.net/ @@ -35,12 +35,17 @@ CopyMode: alwaysoverwrite; Source: doc\*.css; DestDir: "{app}\Doc" CopyMode: alwaysoverwrite; Source: lib\Release\*.dll; DestDir: "{app}\Libs" CopyMode: alwaysoverwrite; Source: lib\Release\*.lib; DestDir: "{app}\Libs" +CopyMode: alwaysoverwrite; Source: lib\Release-w\*.dll; DestDir: "{app}\Libs" +CopyMode: alwaysoverwrite; Source: lib\Release-w\*.lib; DestDir: "{app}\Libs" CopyMode: alwaysoverwrite; Source: expat.dsw; DestDir: "{app}\Source" CopyMode: alwaysoverwrite; Source: lib\*.c; DestDir: "{app}\Source\lib" CopyMode: alwaysoverwrite; Source: lib\*.h; DestDir: "{app}\Source\lib" CopyMode: alwaysoverwrite; Source: lib\*.dsp; DestDir: "{app}\Source\lib" CopyMode: alwaysoverwrite; Source: examples\*.c; DestDir: "{app}\Source\examples" CopyMode: alwaysoverwrite; Source: examples\*.dsp; DestDir: "{app}\Source\examples" +CopyMode: alwaysoverwrite; Source: tests\*.c; DestDir: "{app}\Source\tests" +CopyMode: alwaysoverwrite; Source: tests\*.h; DestDir: "{app}\Source\tests" +CopyMode: alwaysoverwrite; Source: tests\README.txt; DestDir: "{app}\Source\tests" CopyMode: alwaysoverwrite; Source: xmlwf\*.c*; DestDir: "{app}\Source\xmlwf" CopyMode: alwaysoverwrite; Source: xmlwf\*.h; DestDir: "{app}\Source\xmlwf" CopyMode: alwaysoverwrite; Source: xmlwf\*.dsp; DestDir: "{app}\Source\xmlwf" From fdrake@users.sourceforge.net Fri May 31 08:50:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 31 07:50:03 2002 Subject: [Expat-checkins] expat MANIFEST,1.11,1.12 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv21613 Modified Files: MANIFEST Log Message: Updated MANIFEST to reflect changes in the conftools directory. Index: MANIFEST =================================================================== RCS file: /cvsroot/expat/expat/MANIFEST,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- MANIFEST 17 May 2002 21:30:06 -0000 1.11 +++ MANIFEST 31 May 2002 14:49:22 -0000 1.12 @@ -10,8 +10,9 @@ conftools/ac_c_bigendian_cross.m4 conftools/config.guess conftools/config.sub +conftools/expat.m4 conftools/install-sh -conftools/ltconfig +conftools/libtool.m4 conftools/ltmain.sh conftools/mkinstalldirs doc/reference.html From fdrake@users.sourceforge.net Fri May 31 09:04:04 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 31 08:04:04 2002 Subject: [Expat-checkins] expat MANIFEST,1.12,1.13 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv27841 Modified Files: MANIFEST Log Message: Add the recent additions to the doc/ directory. doc/xmlwf.1 is needed for the install step on Unix. Index: MANIFEST =================================================================== RCS file: /cvsroot/expat/expat/MANIFEST,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- MANIFEST 31 May 2002 14:49:22 -0000 1.12 +++ MANIFEST 31 May 2002 15:03:34 -0000 1.13 @@ -17,6 +17,8 @@ conftools/mkinstalldirs doc/reference.html doc/style.css +doc/xmlwf.1 +doc/xmlwf.sgml examples/elements.c examples/outline.c lib/ascii.h From fdrake@users.sourceforge.net Fri May 31 09:16:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 31 08:16:02 2002 Subject: [Expat-checkins] expat MANIFEST,1.13,1.14 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv3958 Modified Files: MANIFEST Log Message: Add test suite to the distribution. Index: MANIFEST =================================================================== RCS file: /cvsroot/expat/expat/MANIFEST,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- MANIFEST 31 May 2002 15:03:34 -0000 1.13 +++ MANIFEST 31 May 2002 15:15:18 -0000 1.14 @@ -37,6 +37,11 @@ lib/xmltok_impl.h lib/xmltok_ns.c lib/winconfig.h +tests/README.txt +tests/chardata.c +tests/chardata.h +tests/runtests.c +tests/xmltest.sh xmlwf/codepage.c xmlwf/codepage.h xmlwf/ct.c From fdrake@users.sourceforge.net Fri May 31 09:52:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 31 08:52:03 2002 Subject: [Expat-checkins] expat Makefile.in,1.32,1.33 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv32076 Modified Files: Makefile.in Log Message: Factor out the definition of the directory the manual page is installed into; hopefully this will fix the RPM construction. Index: Makefile.in =================================================================== RCS file: /cvsroot/expat/expat/Makefile.in,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- Makefile.in 18 May 2002 00:26:59 -0000 1.32 +++ Makefile.in 31 May 2002 15:51:21 -0000 1.33 @@ -40,6 +40,7 @@ bindir = @bindir@ libdir = @libdir@ includedir = @includedir@ +mandir = @prefix@/man/man1 top_builddir = . @@ -78,17 +79,17 @@ tests/runtests install: xmlwf/xmlwf lib/$(LIBRARY) lib/$(APIHEADER) - $(mkinstalldirs) $(bindir) $(libdir) $(includedir) + $(mkinstalldirs) $(bindir) $(libdir) $(includedir) $(mandir) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf $(LIBTOOL) --mode=install $(INSTALL) lib/$(LIBRARY) $(libdir)/$(LIBRARY) $(INSTALL_DATA) lib/$(APIHEADER) $(includedir) - $(INSTALL_DATA) doc/xmlwf.1 $(prefix)/man/man1 + $(INSTALL_DATA) doc/xmlwf.1 $(mandir) uninstall: $(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(LIBRARY) rm -f $(includedir)/$(APIHEADER) - rm -f $(prefix)/man/man1/xmlwf.1 + rm -f $(mandir)/xmlwf.1 # for VPATH builds (invoked by configure) mkdir-init: From fdrake@users.sourceforge.net Fri May 31 10:34:04 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 31 09:34:04 2002 Subject: [Expat-checkins] htdocs index.html,1.16,1.17 Message-ID: Update of /cvsroot/expat/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv21594 Modified Files: index.html Log Message: Added a note about the Eiffel bindings. Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- index.html 21 May 2002 14:45:18 -0000 1.16 +++ index.html 31 May 2002 16:33:53 -0000 1.17 @@ -79,6 +79,12 @@ C++ interface to Expat (old; not updated since Expat 1.2)
  • + The GOBO project + is working on an Eiffel binding for Expat. Development appears to + have slowed, and there isn't any status information about the Expat + bindings on the website. (I had to dig around the CVS to find any + of the XML support.) +
  • The TclXML project includes a Tcl binding for Expat
  • From fdrake@users.sourceforge.net Fri May 31 14:34:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 31 13:34:02 2002 Subject: [Expat-checkins] expat NEWS,1.1,NONE Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv10454 Removed Files: NEWS Log Message: Remove NEWS since this information is already being provided in Changes. --- NEWS DELETED --- From fdrake@users.sourceforge.net Fri May 31 14:43:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 31 13:43:03 2002 Subject: [Expat-checkins] expat Changes,1.12,1.13 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv15408 Modified Files: Changes Log Message: Added a couple more interesting items that had been lurking in the forgotten NEWS file. Set an expected date for the 1.95.3 release. Index: Changes =================================================================== RCS file: /cvsroot/expat/expat/Changes,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Changes 31 May 2002 03:45:50 -0000 1.12 +++ Changes 31 May 2002 20:42:18 -0000 1.13 @@ -1,10 +1,12 @@ -Release 1.95.3 (not yet) +Release 1.95.3 Mon Jun 3 2002 - Added a project to the MSVC workspace to create a wchar_t version of the library; the DLLs are named libexpatw.dll. - Changed the name of the Windows DLLs from expat.dll to libexpat.dll; this fixes SF bug #432456. - Added the XML_ParserReset() API function. + - Fixed XML_SetReturnNSTriplet() to work for element names. - Made the XML_UNICODE builds usable (thanks, Karl!). + - Allow xmlwf to read from standard input. - Install a man page for xmlwf on Unix systems. - Fixed many bugs; see SF bug reports 231864, 461380, 464837, 466885, 469226, 477667, 484419, 487840, 494749, 496505, From fdrake@users.sourceforge.net Fri May 31 15:32:02 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 31 14:32:02 2002 Subject: [Expat-checkins] expat configure.in,1.29,1.30 Message-ID: Update of /cvsroot/expat/expat In directory usw-pr-cvs1:/tmp/cvs-serv6972 Modified Files: configure.in Log Message: Bump the version number of the shared library according to the libtool recommendations. Index: configure.in =================================================================== RCS file: /cvsroot/expat/expat/configure.in,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- configure.in 18 May 2002 00:26:59 -0000 1.29 +++ configure.in 31 May 2002 21:31:12 -0000 1.30 @@ -44,9 +44,9 @@ dnl If the API changes incompatibly set LIBAGE back to 0 dnl -LIBCURRENT=1 +LIBCURRENT=2 LIBREVISION=0 -LIBAGE=1 +LIBAGE=2 AC_CONFIG_HEADER(expat_config.h) From fdrake@users.sourceforge.net Fri May 31 20:13:03 2002 From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net) Date: Fri May 31 19:13:03 2002 Subject: [Expat-checkins] expat/win32 expat.iss,1.8,1.9 Message-ID: Update of /cvsroot/expat/expat/win32 In directory usw-pr-cvs1:/tmp/cvs-serv19606/win32 Modified Files: expat.iss Log Message: Specify the compression type; the current version of Inno Setup supports the more efficient bzip algorithm, so we can produce a smaller installer to download. Or at least partially mitigate the addition of the wchar_t version of the DLLs. Install the Changes file as Changes.txt. Add a note telling what version of Inno Setup the script is for. Index: expat.iss =================================================================== RCS file: /cvsroot/expat/expat/win32/expat.iss,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- expat.iss 31 May 2002 04:35:57 -0000 1.8 +++ expat.iss 1 Jun 2002 02:12:30 -0000 1.9 @@ -2,6 +2,7 @@ ; information on the free installer builder, see www.jrsoftware.org. ; ; This script was contributed by Tim Peters. +; The current version is used with Inno Setup 2.0.19. [Setup] AppName=expat @@ -17,7 +18,7 @@ UninstallDisplayName=Expat XML Parser (version 1.95.3) UninstallFilesDir={app}\Uninstall -CompressLevel=9 +Compression=bzip/9 SourceDir=.. OutputDir=win32 DisableStartupPrompt=yes @@ -28,8 +29,8 @@ [Files] CopyMode: alwaysoverwrite; Source: xmlwf\Release\*.exe; DestDir: "{app}" CopyMode: alwaysoverwrite; Source: win32\MANIFEST.txt; DestDir: "{app}" +CopyMode: alwaysoverwrite; Source: Changes; DestDir: "{app}"; DestName: Changes.txt CopyMode: alwaysoverwrite; Source: COPYING; DestDir: "{app}"; DestName: COPYING.txt -CopyMode: alwaysoverwrite; Source: NEWS; DestDir: "{app}"; DestName: NEWS.txt CopyMode: alwaysoverwrite; Source: README; DestDir: "{app}"; DestName: README.txt CopyMode: alwaysoverwrite; Source: doc\*.html; DestDir: "{app}\Doc" CopyMode: alwaysoverwrite; Source: doc\*.css; DestDir: "{app}\Doc"