Commit Graph

229 Commits

Author SHA1 Message Date
Fred L. Drake, Jr.
0bd69962db Bring indentation consistency to the header comments. 2002-05-22 04:04:39 +00:00
Greg Stein
5b5355d8c5 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.
2002-05-20 11:06:41 +00:00
Greg Stein
2186041a07 Karl noticed that Expat didn't build on Windows any more. winconfig.h
needs to state that memmove() exists.
2002-05-20 11:01:29 +00:00
Karl Waclawek
8a891572a0 Merged in patch # 551599 2002-05-18 03:34:44 +00:00
Greg Stein
04d54677dc 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
2002-05-18 00:26:59 +00:00
Greg Stein
de857347b6 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.
2002-05-17 21:42:05 +00:00
Greg Stein
0d64c9f4e9 There is no lib/config.h file... 2002-05-17 21:38:12 +00:00
Greg Stein
9fcff4a9eb 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
2002-05-17 21:30:07 +00:00
Greg Stein
d3947b2fef follow Fred's footsteps and reformat the copyright header. 2002-05-17 21:23:35 +00:00
Fred L. Drake, Jr.
aeb96f4e38 Code hygiene edits. 2002-05-17 19:12:54 +00:00
Fred L. Drake, Jr.
65b4ed8f47 Using "0" instead of "NULL" is insane, and leads to unmaintainable code.
Fix a number of other "code-hygiene" consistency nits.
2002-05-17 18:47:53 +00:00
Fred L. Drake, Jr.
7040180274 Minor nit; layout function signatures in a more consistent way. 2002-05-17 18:17:33 +00:00
Fred L. Drake, Jr.
fa2455c305 Include a more reasonable definition of the UTF8_INVALID3() macro.
It still is not used anywhere, though.  ;-(
2002-05-17 18:05:06 +00:00
Fred L. Drake, Jr.
aec2b976cd 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.
2002-05-17 15:21:53 +00:00
Fred L. Drake, Jr.
7857293967 Be more careful about failed MALLOC() and REALLOC() calls. This avoids a
number of potential memory leaks.
2002-05-17 15:09:34 +00:00
Fred L. Drake, Jr.
3edce7a7ca Fix a number of potential memory leaks around REALLOC(). More are lurking. 2002-05-17 03:41:34 +00:00
Fred L. Drake, Jr.
5b5c48d4a3 Add casts to suppress a couple of warnings from MSVC with warning level 4. 2002-05-15 15:57:22 +00:00
Fred L. Drake, Jr.
6556c9be67 Wrap some long lines, including ones I just introduced.
There ought to be a good way to use a real editor with MSCV!
2002-04-26 05:14:20 +00:00
Fred L. Drake, Jr.
79aab4b10a Cut down on the warnings from MSVC6 on Warning Level 4. 2002-04-26 04:46:24 +00:00
Fred L. Drake, Jr.
644d3aca65 XML_ParserReset(): New function. Reset a parser to be used again, without
having to incur memory allocation costs for subsequent parses.
This closes SF patch #450608, contributed by David Crowley.
2002-04-24 03:36:23 +00:00
Fred L. Drake, Jr.
36f5bfd4b9 Squash compiler warning (GCC): simply referencing a variable in the
initialization clause of a for statement does not have any effect.
2002-04-23 21:36:16 +00:00
Karl Waclawek
968b13268b Attribute type constants did not have null terminators. 2002-04-23 19:48:29 +00:00
Karl Waclawek
42ab6c34f1 Fixed rev. 1.26 patch for XML_SetReturnNSTriplet.
Added fixes to make UTF-16 output work when XML_UNICODE is defined.
2002-04-23 13:49:31 +00:00
Karl Waclawek
59d1c05288 XML_UNICODE fixes 2002-04-23 13:48:50 +00:00
Fred L. Drake, Jr.
94cf789277 Bump version number. 2002-04-20 21:17:15 +00:00
Fred L. Drake, Jr.
37371404cd Check in SF patch #476929: Fix XML_SetReturnNSTriplet().
This is slightly modified from the submitted patch to ensure a variable is
never used uninitialized.
Patch contributed by Karl Waclawek.
2002-04-19 20:52:39 +00:00
Greg Stein
a13d856e8f * Switch to a single, top-level Makefile (simplification, consistency)
* use libtool to compile/link all programs
* remove */Makefile.in and remove them from configure
* remove autom4te.cache after running autoconf
* remove .o from the FILEMAP logic in configure and the Make system;
  provides more flexibility in the Makefile to use it
* for VPATH builds: create the build subdirs by running
  "make mkdir-init" from the configure script
* adjust .cvsignore files to account for presence of .libs now
2001-12-07 10:19:31 +00:00
Fred L. Drake, Jr.
4bc54b7225 prologProcessor(): Avoid segfault by making sure "next" is initialized;
fix suggested by Tim Crook.
This fixes (I think!) SF bug #226514.

Removed extra "break".
2001-11-16 20:57:30 +00:00
Fred L. Drake, Jr.
5c7be90ecd Wrap a *lot* of long lines to fit in an 80-column world, but still not all.
Change one of the error messages, closing SF bug #463032.
2001-10-01 20:52:54 +00:00
Greg Stein
a5e3cad879 Revamp how the version stuff is handled. Use the header file as the
original, and extract the numbers within the configure script.

* configure.in: extract the numbers from lib/expat.h

* Makefile.in: simplify the construction of DISTDIR

* lib/Makefile.in: no need to define the VERSION preprocessor symbol

* lib/expat.dsp: do not define VERSION (changed, but untested!)

* lib/xmlparse.c: revamp the XML_ExpatVersion() function

* lib/expat.h(.in): just ship the baby, rather than generating it
2001-08-23 12:35:53 +00:00
Greg Stein
866f6330cc Clean out some unused bits from the makefiles. Remove some of the recursion
and just do it from the top-level instead.
2001-08-23 09:24:45 +00:00
Fred L. Drake, Jr.
57a3480f95 XML_Parse(): If XML_GetBuffer() returns NULL, do not attempt to move
data aronud, just propogate the error.

This closes SF bug #434665.
2001-08-09 18:08:56 +00:00
Fred L. Drake, Jr.
34966ccef9 Switch to testing that _MSC_EXTENSIONS is defined, not __declspec. (We can
probably remove the exception for __BEOS__ now, but I cannot test that.)
2001-07-30 19:01:47 +00:00
Fred L. Drake, Jr.
a81f09f829 Remove all traces of the XMLCALLBACK macro -- there appears to be no way
to add __cdecl to a typedef of a function type that MSVC does not complain
about.  Callback implementations may need to add explicit __cdecl
annotations in sources not compiled with the C calling convention as the
default.
2001-07-27 17:17:44 +00:00
Fred L. Drake, Jr.
df1b71d17e Try again. 2001-07-27 17:03:01 +00:00
Fred L. Drake, Jr.
58be86d815 Make sure that XMLPARSEAPI specifies the calling convention when building
under MSVC -- this is needed when using the pre-compiled DLL with projects
built using a different calling convention.

XMLPARSEAPI now takes the return type as a parameter and inserts annotations
on both sides of the type to make sure the compiler is happy.  A new
macro, XMLCALLBACK, is used to perform similar annotation of the callback
function types, which do not need the dllimport/dllexport annotations but
do still need the __cdecl annotation.

This closes SF bug #413653.
2001-07-27 16:30:56 +00:00
Fred L. Drake, Jr.
f6ea3590dc Update the lib and xmlwf project files to be part of the larger workspace. 2001-07-27 14:56:31 +00:00
Fred L. Drake, Jr.
a381bda8c4 Removed unusual use of "const" to avoid errors from a Sun compiler. 2001-07-25 17:22:48 +00:00
Fred L. Drake, Jr.
718bd9e746 Removed useless RCSId static from the code.
Added #include to pick up the memmove() prototype.

Added parentheses in some conditions to suppress compiler warnings.
2001-07-25 17:20:45 +00:00
Fred L. Drake, Jr.
712c70975d Remove useless RCSId static from the code. 2001-07-25 17:18:43 +00:00
Fred L. Drake, Jr.
b6448b02a1 Toss the old MSVC workspace. 2001-07-25 16:13:36 +00:00
Fred L. Drake, Jr.
4ae9b88ab8 Remove the extra DESTDIR variable. 2001-07-25 15:13:38 +00:00
Fred L. Drake, Jr.
845f869a2f Remove one more line that was not supposed to have gotten checked in
(part of an unfinished feature).
2001-07-25 14:40:06 +00:00
Fred L. Drake, Jr.
180f35f5eb Revert unintended portion of a checkin; these files were not supposed to
have been changed with the most recent Makefile changes.
2001-07-25 03:29:56 +00:00
Fred L. Drake, Jr.
05d1fac780 Make sure all the makefiles have at least a dummy check target and
reasonable distclean and maintainer-clean targets.

This fixes the last part of SF bug #430942.
2001-07-25 03:05:22 +00:00
Fred L. Drake, Jr.
f501679409 Update the MSVC project. I don't understand all the
changes, but it seems to work.
2001-07-24 21:41:05 +00:00
Fred L. Drake, Jr.
8a96f5b08d Add the MSVC workspace file. 2001-07-24 16:52:54 +00:00
Fred L. Drake, Jr.
ba30f956c8 Tell CVS to ignore the Windows temporary files. 2001-07-24 16:50:37 +00:00
Fred L. Drake, Jr.
a6b3939dd9 Oops, remove a prototype for a feature that is not yet ready. 2001-07-24 16:03:51 +00:00
Fred L. Drake, Jr.
a0f045d46d The previous checkin of expat.h.in broke the build for Windows (now everyone
will just have to wonder how I got anything at all working on Windows).

Since we do not want to place the XMLPARSEAPI marker in the middle of a
type name, always tack it onto the beginning -- anywhere else seems fragile
at best.
2001-07-24 16:00:52 +00:00
Fred L. Drake, Jr.
84ec06ca9c Support building from directories other than the source directory.
Patch contributed by Mo DeJong -- thanks!

This closes SF patch #431340.
2001-07-21 03:37:12 +00:00
Fred L. Drake, Jr.
517663ce07 Avoid specifying XMLPARSEAPI in the middle of a prototype's return
value; some compilers that expand XMLPARSEAPI to a non-empty value
complain.

This closes SF patch #412076.
2001-07-21 02:28:28 +00:00
Greg Stein
4232566291 Revamp config/build to keep generated files out of CVS (some libtool files
were out of date, and we've previously seen expat.h out of sync).

*) Use new script "buildconf.sh" to create the set of generated files
   (aclocal.m4, config.h.in, configure). This is intended to be used by
   developers (rerun when configure.in changes) and just before a release
   (releases include these outputs).

   Developers now need the "autoconf" and "libtool" packages.

*) config.h.in is now built by autoheader and includes bits from acconfig.h
   rather than manual construction/maintenance. (renamed from config.hin)

*) added conftools/PrintPath from the ASF; it is a portable "which"

*) added "extraclean" target to top-level Makefile to get rid of all
   generated files (return to pure CVS state; before buildconf.sh)

*) updates various bits for config.hin -> config.h.in rename

*) no longer need to delete the ".deps" subdir since we don't create it
   anymore (dependencies are explicit rather than auto-generated).
2001-03-10 15:41:50 +00:00
Fred L. Drake, Jr.
2ce9cd4140 Sam TH:
Remove gcc-specific cruft from the Makefile -- this hurts portability!

This closes SF tracker patch #403584, and probably more platform-specific
build process bugs than I care to think about.
2001-03-01 04:04:26 +00:00
Fred L. Drake, Jr.
ffa686a288 Updated version from config.h.in update (includes wrapping of lots of long
lines).
2001-03-01 03:44:45 +00:00
Fred L. Drake, Jr.
4c3f32531d Sam TH:
BeOS defines __declspec, but we don't use it there.

This closes SF tracker patch #403581.
2001-03-01 03:19:27 +00:00
Fred L. Drake, Jr.
a6823aa552 Fix SF bug #123767: segfault on UTF-8 BOM.
(Reported with fix by Bruce Kaskel.)
2001-02-16 18:12:49 +00:00
Fred L. Drake, Jr.
2eb02dd3de Added XMLPARSEAPI to the prototype for XML_DefaultCurrent().
Re-wrapped some comments that exceeded 80 characters per line.

This closes SF bug #129217.
2001-01-26 19:18:31 +00:00
Fred L. Drake, Jr.
faea974737 Simplify, since we no longer need the temporaries for version information. 2001-01-24 19:41:12 +00:00
Fred L. Drake, Jr.
2f5721e204 Template for the expat.h header, processed by the configure script.
(We still need to keep expat.h checked in since it is not generated on
Windows.)
2001-01-24 19:40:13 +00:00
Fred L. Drake, Jr.
a3fcd14422 Use the new XML_*_VERSION constants to fill in the XML_Expat_Version
structure.
2001-01-24 19:38:54 +00:00
Fred L. Drake, Jr.
f4f26d227b Add definitions of XML_MAJOR_VERSION, XML_MINOR_VERSION, and
XML_MICRO_VERSION.  These contain version-specific information, but
this header is about to become a generated file, so that's ok.
2001-01-24 19:37:36 +00:00
Clark Cooper
604600883c Clark's compromise changes to Fred's version info change. 2000-12-27 19:37:37 +00:00
Fred L. Drake, Jr.
0e5418f698 Remove VERSION; this is no longer used in this directory since the version
information is computed from the XML_*_VERSION constants.
2000-12-21 01:49:27 +00:00
Fred L. Drake, Jr.
eb5ef0f8d9 XML_ExpatVersionInfo(): New function; returns library version as a
structure that can be examined at runtime.

XML_ExpatVersion():  Construct the return value from the new version
        information constants.

XML_MAJOR_VERSION, XML_MINOR_VERSION,
XML_MICRO_VERSION:  New constants; these specify the version of the
        library in a form that can be queried by client applications
        at compile time.  This is useful in determining if functions
        should be considered available (like those above).
2000-12-21 00:32:47 +00:00
Fred L. Drake, Jr.
fd297d8120 Tell CVS to ignore generated Makefiles and working dirs used by libtool. 2000-10-30 21:25:05 +00:00
Clark Cooper
ae2257acce Changes for compiling under Microsoft Dev Studio. 2000-10-22 19:20:23 +00:00
Clark Cooper
b1bcd0060a Remove aborts and instead return an UNEXPECTED_STATE error. 2000-10-20 15:37:28 +00:00
Clark Cooper
809a5d2916 Revised fix for abort occurring with a percent followed by whitespace or
another percent in entity values.
2000-10-20 15:14:36 +00:00
Clark Cooper
c4ca6cf75e Defined XML_SetEndNamespaceDeclHandler to resolve bug # 116381 2000-10-10 18:48:48 +00:00
Clark Cooper
219c9e2de6 Fix make problems on BSD & HPUX reported in Bug # 116248 2000-10-10 18:34:11 +00:00
James Clark
d93eff7f99 Fix abort with space following percent sign in entity value 2000-10-09 06:26:10 +00:00
Clark Cooper
aa45fb851a Versioning information, fill in Changes file, possible final commit before
first release (1.95.0)
2000-09-29 14:57:45 +00:00
Clark Cooper
63d2f68760 Switch to using MANIFEST to build distribution.
Also fix xmlwf to use current entity declaration signature.
2000-09-28 19:47:35 +00:00
Clark Cooper
e8b7b5fa4f Fixes to allow DLLs to built under Windows. 2000-09-28 17:53:00 +00:00
Clark Cooper
91ae02924d Changes for namespace triplets. 2000-09-25 00:58:49 +00:00
Clark Cooper
24a3551e56 Added dynamic malloc substitution. Added libtool versioning. 2000-09-24 03:43:37 +00:00
Clark Cooper
c446fb274e Merged in modifications from perl-expat. Also fiddled around with more
configuration issues.
2000-09-21 21:20:18 +00:00
Clark Cooper
c135be083d These are the first check-ins for the libexpat task: create configuration
files and setup for building a shareable libexpat.
2000-09-18 16:26:23 +00:00