Commit Graph

415 Commits

Author SHA1 Message Date
sergei
f138637678 xmlread.pp, moved decoder procedures to xmlutils.pp, so they can be reused by other code.
git-svn-id: trunk@15737 -
2010-08-08 03:27:31 +00:00
sergei
118f1d645b xmlread.pp:
- removed an unused field FDocNotValid
- optimized away a variable in ParseEndTag().

git-svn-id: trunk@15736 -
2010-08-08 02:47:04 +00:00
sergei
f39e793448 * Moved TWideCharBuf and associated functions from xmlread.pp to xmlutils.pp, so this stuff can be reused by other code.
git-svn-id: trunk@15718 -
2010-08-06 08:00:45 +00:00
sergei
e1eec8c687 - xmlread.pp, removed redundant 'var' modifiers from TStream arguments of less common used functions. This should have been done a long ago, as part of r11788.
git-svn-id: trunk@15717 -
2010-08-06 07:44:51 +00:00
sergei
1876fb1c74 XPath: now when predicate filtering is no longer dependent on axis, it becomes possible to use the same code for TStep and TXPathFilterNode. Inherited TStep from TXPathFilterNode, removed duplicating code.
git-svn-id: trunk@15654 -
2010-07-28 15:25:19 +00:00
sergei
ae7aef0861 XPath: reworked step processing:
* For ancestor and ancestor-or-self axes, added checks for attribute nodes similar to parent axis.
* For reverse axes, collect and filter nodes in 'natural' (i.e. reversed) order, and only then reverse order while adding to result node set. This is much simpler to implement.
* Fixed memory leak (not destroying TXPathFilterNode.FExpr)

git-svn-id: trunk@15652 -
2010-07-28 14:25:08 +00:00
sergei
22038d7db6 + XPath test suite, implemented possibility to use a specified context node instead of fixed root element.
* enabled expressions which start with a FilterNode.
+ added a test for ancestor:: axis of attribute.

git-svn-id: trunk@15650 -
2010-07-28 12:24:27 +00:00
sergei
c902b96673 * XPath, change parsing of function call so that function arguments are parsed before creating the function node. This way function nodes can validate their arguments at creation time.
* also changed function argument container type from TFPList to dynamic array.

git-svn-id: trunk@15641 -
2010-07-26 19:30:26 +00:00
sergei
5352b78c4a * XPath, fixed parsing of 'prefix:*' node tests:
o The prefix to resolve should not include following ':*' characters
  o NextToken changes CurTokenString, so NextToken must be after reading CurTokenString.
  o Added a test for that
* XPath test suite, fixed comparison of numeric result (it is quite tricky in presence of NaNs).

git-svn-id: trunk@15639 -
2010-07-26 16:35:35 +00:00
sergei
0f5795baaf XPath, use a perfect hash to recognize all possible keywords.
git-svn-id: trunk@15638 -
2010-07-26 13:49:46 +00:00
sergei
83711ff972 XPath improvements:
- Deleted TXPathLocationPathNode, it was too much overhead to store a single bit of information. The path root (if any) is now represented by TStep node with Axis=axisRoot.
* Changed TStep linkage from 'right' to 'left', this is consistent with the way of parsing  expressions and considerably simplifies evaluation.
* Fixed ParsePathExpr procedure so it no longer accepts empty/truncated expressions.

git-svn-id: trunk@15632 -
2010-07-24 23:15:35 +00:00
sergei
d44a1603db * TXPathScanner.ParseStep split into two functions in order to reduce complexity and improve readability.
* Also modified it so the data is accumulated in local vars, and resulting TStep objects are created only after the parsing is successfully complete.
* TXPathScanner.ParsePrimaryExpr: eliminated variable.

git-svn-id: trunk@15628 -
2010-07-24 03:21:40 +00:00
sergei
b4b83a7edb * HTML reader, attempt recovery from misplaced '<' characters (another part of Mantis #16916).
git-svn-id: trunk@15574 -
2010-07-15 04:54:14 +00:00
sergei
1a50f3ed26 * The fix in r15551 was not entirely correct. Must handle the case when string ends with a single whitespace.
git-svn-id: trunk@15570 -
2010-07-14 14:35:13 +00:00
sergei
7e2f713d09 * HTML parser: in case of malformed input, do not create attributes with invalid names (Mantis #16916).
* Along the way, eliminated one layer of useless converting strings from wide to ansi and back.

git-svn-id: trunk@15564 -
2010-07-14 13:54:09 +00:00
sergei
83238862f7 * The tag name may be followed by any whitespace char, not only #32 (Mantis #16906)
git-svn-id: trunk@15551 -
2010-07-11 13:21:08 +00:00
sergei
ead5707179 + Enumeration type for XML version
+ Implemented DOM level 3 properties xmlVersion and xmlEncoding for both TDOMDocument and TDOMEntity classes. Also declared property inputEncoding for these classes.
* Non-conformant TXMLDocument.Encoding has been deprecated; it is now an alias for xmlEncoding property.
* TDOMDocument and TDOMEntity now share a common ancestor, TDOMNode_TopLevel.
* api.xml: enabled testing for the new properties

git-svn-id: trunk@15443 -
2010-06-15 19:36:22 +00:00
sergei
8f29def76e * xmlread.pp: when IgnoreComments=True, merge together text nodes that precede and follow the skipped comment. With this fix, the reader finally produces normalized documents in all modes, so remove the corresponding cheat from testing program (xmlts.pp).
git-svn-id: trunk@15442 -
2010-06-15 16:13:42 +00:00
sergei
3bb9bfd2b8 * XPath, fixed parent axis of attribute nodes: it must consist of the owner element of an attribute.
+ Tests

git-svn-id: trunk@15439 -
2010-06-14 21:15:53 +00:00
sergei
1ed130e2e1 * Fixed XPath functions name() and local-name(), which should behave different from DOM properties of the same names. name() is empty for text, comment and document nodes. local-name() is the same as name() for non-prefixed attributes and processing instructions.
+ Another dozen of tests.

git-svn-id: trunk@15438 -
2010-06-14 17:21:35 +00:00
sergei
73bafe0444 + Implement TSAXReader.Abort method, which can be used to end the parsing prematurely (Mantis #16703)
git-svn-id: trunk@15414 -
2010-06-12 16:51:10 +00:00
joost
7fea1915e4 * fpmake.pp updates
git-svn-id: trunk@15268 -
2010-05-13 18:15:31 +00:00
sergei
112a288442 xmlread.pp, TXMLFileSource.FetchData, don't lose the data that remains in the input buffer. Fixes Mantis #15776.
git-svn-id: trunk@14919 -
2010-02-15 19:40:26 +00:00
sergei
a24b84c11b * Fixed CDATA section splitting which got broken due to excessive optimization in r14194.
git-svn-id: trunk@14648 -
2010-01-14 21:38:22 +00:00
sergei
5dee45a6a3 * A forgotten part of r13824: the condition in assertion must be the same as the condition of calling TNodePool.AddExtent.
git-svn-id: trunk@14644 -
2010-01-14 16:23:54 +00:00
pierre
55cffbef12 * Update Makefiles
git-svn-id: trunk@14385 -
2009-12-10 08:36:52 +00:00
sergei
14d42da206 * dom.pp: clean up
git-svn-id: trunk@14362 -
2009-12-08 09:09:23 +00:00
sergei
c8efa67ac7 * xmlread.pp, added a flag to force input stack unwinding upon reader destruction.
Without this, certain (malformed) documents (e.g. eduni/xml-1.1/005.xml) were causing
  InputSource leaks.

  Note: these leaks are a side effect from recent changes to entity processing and are not
  observed with older versions.

git-svn-id: trunk@14361 -
2009-12-08 08:10:35 +00:00
sergei
a7d1856620 * Removed null-termination in TXMLStreamInputSource.FetchData(): it isn't necessary and is causing unaligned access errors with ARM CPUs.
git-svn-id: trunk@14360 -
2009-12-08 05:20:44 +00:00
sergei
255c14fc4d * TDOMElement.RemoveAttributeNode() was not resetting OwnerElement property of the removed attribute to nil, fixed and added a test case.
git-svn-id: trunk@14351 -
2009-12-07 16:16:10 +00:00
sergei
9eac0ee0a4 * xmlread.pp: In case of reference to an undefined parameter entity, produce a validation error and ignore further DTD declarations unless the document is standalone (compliance).
git-svn-id: trunk@14293 -
2009-12-01 09:12:28 +00:00
sergei
e45469b377 * xmlread.pp: move all entity recursion checks into one place (in ContextPush).
git-svn-id: trunk@14290 -
2009-11-30 16:15:53 +00:00
sergei
ad3e19de3d * Rewrote TXMLReader.ParseContent to eliminate the inner loop;
* Also modified TXMLReader.ParseContent so that it produces normalized text nodes, i.e. merges text nodes on entity boundaries (when Options.ExpandEntities=True, of course) and merges the text coming from CDATA sections when Options.CDSectionsAsText=True.

git-svn-id: trunk@14248 -
2009-11-21 21:59:16 +00:00
sergei
25a3cc09ef xmlread.pp: More on entity processing:
* General entities are now processed non-recursively;
* They are now re-parsed on each inclusion, enabling proper validation and ensuring SAX-compatible order of events. Also less dependent on DOM-specific calls like CloneNode.

git-svn-id: trunk@14232 -
2009-11-20 23:32:08 +00:00
sergei
968338c428 * Reverted removal of 'ISO8859-1' encoding because it is still used in fcl-registry.
git-svn-id: trunk@14209 -
2009-11-18 11:42:35 +00:00
sergei
4ec8f0c617 * Call StoreLocation once in SkipQuote, rather than every time after calling it.
- Removed recognition of 'ISO8859-1', as it was a workaround for incorrect fpdoc encodings.
- Removed with statement in ParseContent, it won't work if we handle entities non-recusively, because FSource will be changing.

git-svn-id: trunk@14207 -
2009-11-18 00:48:05 +00:00
sergei
73b7248597 * Replaced all literal parsing routines with a single ParseLiteral(). Due to entity handling issues, this isn't yet enabled for attributes, therefore the current code contains some amount of redundancy.
* Started refactoring of the entity processing.

git-svn-id: trunk@14202 -
2009-11-16 23:43:01 +00:00
sergei
0589b2a846 XML writer:
* Moved line ending processing from the encoder to a higher level; without this, implementing/using external encoders is very problematic.
+ Implemented line ending processing for c14n mode.

git-svn-id: trunk@14194 -
2009-11-15 23:04:02 +00:00
sergei
1a28ccb0be + More c14n conformance in the writer:
* dedicated procedure for writing the document node;
  * no indenting in c14n mode;
  * ignore Specified property of the attributes in c14n mode.

git-svn-id: trunk@14192 -
2009-11-15 21:14:39 +00:00
sergei
5c60f0e9e2 XML writer: split CDATA sections at the ']]>' sequence.
git-svn-id: trunk@14186 -
2009-11-15 16:35:13 +00:00
sergei
6a8064fc3f + Added TDOMNode_WithChildren.InternalAppend, and used it to build node tree when cloning nodes. This speeds up the scenario when cloneNode() and node lists are used together, because the document is no longer marked as modified at each call to cloneNode.
git-svn-id: trunk@14147 -
2009-11-11 20:33:03 +00:00
sergei
4c5505b71c - removed dependency on avl_tree, improves speed, thread safety and memory requirements.
git-svn-id: trunk@14145 -
2009-11-11 14:19:50 +00:00
sergei
461fde4ed0 xmlread.pp, tighten up checks while parsing the xml declaration:
* Hard limit of literal lengths: 3 on version, 30 on encoding name, 2 or 3 on standalone. Without this, a misplaced quote could cause excessive amount of processing, because input buffer is reloaded by small 3-char chunks at this time.
* Encoding validity is checked in-line, the very first illegal character aborts processing.

git-svn-id: trunk@13961 -
2009-10-26 21:23:24 +00:00
sergei
158afbb5b4 * Fixed bug in length calculation, causing any namespaced attributes with local part differing only in the last character (or consisting of a single character), to be erroneously reported as duplicate.
git-svn-id: trunk@13960 -
2009-10-26 19:17:54 +00:00
sergei
b1d0bfef75 * Fixed the order of checks during parsing the xml declaration, this provides more accurate diagnostic for tests dtd07, encoding07, ibm77n03.
* Delay switching to xml 1.1 rules until the declaration has been parsed, this ensures that NEL and LSEP chars in declaration are rejected (rmt-056, rmt-057).

git-svn-id: trunk@13922 -
2009-10-23 04:16:15 +00:00
sergei
06b5b65534 Straightening handling of base URI and SystemID:
- TXMLCharSource.PublicID removed, it is unused.
* Base URI of an entity is stored in FURI field of entity, and passed to ResolveEntity.
* When error happens while parsing an internal entity, report the URI where that entity was declared, not where it was included.

git-svn-id: trunk@13921 -
2009-10-22 23:41:24 +00:00
sergei
d44c6876cd xpath.pp:
* text() selector matches text and CDATA nodes, but not comments
* Names of processing instructions are now matched as they should.

git-svn-id: trunk@13915 -
2009-10-20 22:13:13 +00:00
sergei
0c50cfe10a + Initial implementation of property TDOMParseOptions.CanonicalForm. The only thing it does yet is ignoring the DTD.
* Fixed relevant tests.

git-svn-id: trunk@13914 -
2009-10-20 22:09:51 +00:00
sergei
edb79b62e0 * Changed TSpecialCharCallback from method into a regular procedure, this allows to drop all the {$ifdef fpc}@{$endif} ugliness.
* Also changed TSpecialCharCallback to take the string and the index, so it can process certain sequences, not only single chars.
* In canonical mode, CDATA sections are written as text.

git-svn-id: trunk@13906 -
2009-10-17 22:09:20 +00:00
sergei
d2fa20949a XML writer: write namespace declarations before attribites and optionally sort them as required by c14n.
git-svn-id: trunk@13894 -
2009-10-17 12:30:04 +00:00
sergei
df5dec2106 * TNSSupport.CheckAttribute added check for null nsURI, it should not emit prefixes for namespaceless attributes.
* Reformatted and fixed comments.

git-svn-id: trunk@13886 -
2009-10-17 11:02:01 +00:00
sergei
013fbb8566 Fixed memory leaks in tests.
git-svn-id: trunk@13878 -
2009-10-16 22:50:46 +00:00
sergei
f68faa154d xmlread.pp: now uses TNSSupport class from xmlutils unit instead of its own copy of the same code.
git-svn-id: trunk@13861 -
2009-10-15 22:11:13 +00:00
sergei
f387d7cb2d * Only EXMLReadError is expected to be thrown from a negative test, any other exception is unexpected and should render the test as failed.
git-svn-id: trunk@13860 -
2009-10-15 21:27:31 +00:00
sergei
b48a0060b8 xmlread.pp, refactoring of literal handling:
* separate procedure SkipQuote, reused by SkipQuotedLiteral and ExpectAttValue;
* inlined SkipPubidLiteral to the (only) place where it is called.

git-svn-id: trunk@13858 -
2009-10-14 22:12:27 +00:00
sergei
ea85a7ec11 xmlwrite.pp: c14n compliance: write whitespace after PI name only if its data is not empty
git-svn-id: trunk@13856 -
2009-10-13 21:50:07 +00:00
sergei
a283bc4f46 xpath.pp:
* Progress with namespace support. Resolve namespace prefixed while parsing, compare namespaceURI/localNames while evaluating. Existing tests for namespace-uri(), local-name() and name() now all pass, but resolving interface isn't ready for general use yet.
* Fixed name() to default to context node if argument is omitted.

xpathts.pp:
+ support for prefix resolving while testing.

git-svn-id: trunk@13846 -
2009-10-11 15:04:33 +00:00
sergei
7e731c78b6 xpath.pp: cleaned up and simplified TXPathScanner.GetToken()
git-svn-id: trunk@13842 -
2009-10-10 23:57:39 +00:00
sergei
3f5ce0d228 xpath.pp: Fixed runtime range and overflow checks, at least those which could be detected with existing test suite.
git-svn-id: trunk@13827 -
2009-10-09 17:47:53 +00:00
sergei
d156a08593 * Hunted down another node pool bug, thanks to Vincent Snijders and mighty valgrind. Due to wrong condition, the last block of extent wasn't used to put an object there, but later a cleanup attempt at that address was attempted.
git-svn-id: trunk@13824 -
2009-10-09 15:37:15 +00:00
sergei
8798a9d558 xmlread.pp:
* Report unclosed Ignore section as soon as it is detected, improves error messages and simplifies the code.
* Since SkipUntilSeq is only ever called with 1 or 2 delimiter chars, support just that rather than arbitrary-length array. Simplifies code.

git-svn-id: trunk@13818 -
2009-10-08 14:48:34 +00:00
sergei
dbf48c0535 * Fixed (runtime) overflows and range checks, so the package runs after compiling with OPT="-Criot -gtl". That Delphi compatibility patch is starting to cause more trouble than benefit...
git-svn-id: trunk@13817 -
2009-10-08 00:46:27 +00:00
sergei
2a924d0335 * For some reason, any assignment of NaN cannot be compiled with overflow checking, issue #14748.
git-svn-id: trunk@13816 -
2009-10-07 21:27:11 +00:00
sergei
4d2e6bac7f * TDOMDocument now checks its children and allows only a single Element/DocType child. This fixes about 8 test cases at Level 3.
+ Initial moves to implement TDOMNode.BaseURI (not yet functional)

git-svn-id: trunk@13809 -
2009-10-06 11:03:25 +00:00
sergei
0c41473f7b Two more DOM Level 3 functions + tests for them:
+ TDOMNode.lookupPrefix()
+ TDOMNode.isDefaultNamespaceURI()

git-svn-id: trunk@13800 -
2009-10-03 23:35:20 +00:00
sergei
78b41cd8f6 + XML writer now performs the namespace normalization.
git-svn-id: trunk@13789 -
2009-10-01 19:29:13 +00:00
sergei
eb18aa8831 + 3 more tests for verifying the namespace fixup
git-svn-id: trunk@13788 -
2009-10-01 19:14:36 +00:00
sergei
d2c3ab0730 * r13729 was broken due to missing typecast, shame on me. Fixed.
git-svn-id: trunk@13787 -
2009-10-01 19:11:47 +00:00
Jonas Maebe
2db72437e8 * fixed range check errors
git-svn-id: trunk@13736 -
2009-09-18 10:34:06 +00:00
sergei
fc34dc84ff domunit.pp:
+ Added TDOMTestBase.LoadStringData method, allows loading documents from string.
* Don't return empty string from GetResourceURI when file doesn't exist. Thus we can see the problematic filename in the test output.

+ Added extras.pp, contains a few tests not present in w3.org test suite.
+ Added extras2.pp, contains some tests ported by hand because no automatic conversion possible yet. It addresses namespace fixup during serialization and canonical-form issues.

README_DOM.txt: updated to reflect the added units.

git-svn-id: trunk@13729 -
2009-09-17 09:58:15 +00:00
sergei
425170167d * Base units of the package now can be compiled also with Delphi, patch from Dariusz Mazur (with some modifications).
git-svn-id: trunk@13627 -
2009-08-30 21:01:08 +00:00
sergei
e9e6439345 * dom.pp: fixed one possible reason of crashing in Delphi 2009
* xmlutils.pp: clean up

git-svn-id: trunk@13604 -
2009-08-29 18:11:08 +00:00
michael
f853ac4c63 * Undid previous patch, because not all compiles
git-svn-id: trunk@13603 -
2009-08-27 20:10:54 +00:00
michael
612d58c80f * Patch from Dariusz Mazur to fix compilation with Delphi
git-svn-id: trunk@13602 -
2009-08-27 18:40:17 +00:00
sergei
a4c60f81a0 Fixed buffer reloading logic which happened to crash on x64 when reading DTD with unterminated ignore section.
git-svn-id: trunk@13549 -
2009-08-17 15:57:31 +00:00
sergei
d6244f680a * InstanceSize must be rounded up to sizeof(Pointer) everywhere, fixes #14348
git-svn-id: trunk@13548 -
2009-08-17 13:41:02 +00:00
Jonas Maebe
847354fe10 * Makefiles version 2.5.1
git-svn-id: trunk@13533 -
2009-08-13 21:21:28 +00:00
sergei
f748a01baf * Once the #14143 is fixed, I may (and actually must) remove the related workarounds.
git-svn-id: trunk@13504 -
2009-08-09 05:42:53 +00:00
Jonas Maebe
e246cac3ac * regenerated using latest fpcmake
git-svn-id: trunk@13487 -
2009-08-02 18:40:14 +00:00
sergei
a9d9841eee * XPath: number-to-string conversion is now compliant to the specs (no scientific notation, decimal separator is a hardcoded period, correct output values for INF/NAN) + tests.
git-svn-id: trunk@13389 -
2009-07-15 09:56:48 +00:00
sergei
4545f311a7 * A huge initial patch for HTML DOM module, makes most of the properties/methods functional, although a lot more work is still required.
git-svn-id: trunk@13383 -
2009-07-11 13:07:24 +00:00
sergei
cc253cca5b SAX cleanup, part 1:
* dynamic -> virtual (does not change anything, in fact, because FPC handles these two keywords identically).
* Default implementations for GetFeature, GetProperty, SetFeature, SetProperty - removes warnings about abstract methods at build time.

git-svn-id: trunk@13382 -
2009-07-11 12:57:55 +00:00
sergei
d8a74620a5 + Added definitions for deprecated (in HTML 4.01) attributes. Deprecated elements are already there.
git-svn-id: trunk@13381 -
2009-07-11 12:53:31 +00:00
sergei
26366263f1 sax_xml.pp:
* Recognize only five predefined XML entities, not all the stuff defined for HTML.
* Recognize character refs in hex notation only using lowercase 'x'.

git-svn-id: trunk@13376 -
2009-07-09 23:12:16 +00:00
sergei
173a0647a3 Reworked entity reference handling in SAX parsers:
* htmldefs.pp - no more limited to Latin-1; uses binary search instead of linear.
* sax_html.pp - no longer emits SkippedEntity events; any reference is either resolved or handled as text.
* sax_xml.pp - in contrast to HTML, never handles entities as text (either resolved or passed to SkippedEntity).

git-svn-id: trunk@13368 -
2009-07-07 20:40:32 +00:00
sergei
e4e62b2ac0 * Removed argument to TXMLCharSource.NewLine, it is redundant.
* In case of decoding error, count line endings in the same way as during normal processing.
* Improved error diagnostics in ParseAttlistDecl().

git-svn-id: trunk@13359 -
2009-07-03 21:51:58 +00:00
sergei
fcd96805fa htmldefs.pp:
+ Define elements which may omit end-tag (except HTML, HEAD and BODY which may also omit the start-tag)
+ Define which elements may close other elements (modelled after libxml2).
* DIV may have #PCDATA content.

sax_html.pp:
* Improve the parser to report startElement/endElement events properly. Should resolve Mantis #14073 and related element hierarchy issues.

git-svn-id: trunk@13357 -
2009-07-02 23:13:44 +00:00
sergei
5f45dd409b SAX readers: never transition from scText to scWhitespace state, and don't reset token while transitioning from scWhitespace to scText. This ensures that only pure-whitespace chunks are ever reported via IgnorableWhitespace event, and that text nodes are not broken into words.
This provides a partial fix for Mantis #14073.

git-svn-id: trunk@13355 -
2009-07-01 22:00:22 +00:00
sergei
ccb730c051 *HTML writer: change charset in 'meta' tag (if any) to utf-8, because it is the encoding we actually write.
git-svn-id: trunk@13354 -
2009-07-01 16:02:46 +00:00
sergei
a8e6f79ef3 * SAX parsers: support hexadecimal notation in character references and return result in a SAXChar
instead of Char, provides a partial fix for #14074

git-svn-id: trunk@13351 -
2009-06-29 14:20:50 +00:00
Jonas Maebe
1f6ec379de * moved field definitions before method/property definitions (see mantis
#13971)

git-svn-id: trunk@13330 -
2009-06-27 11:27:31 +00:00
sergei
106a605e05 xpath.pp:
- Removed (made abstract) default implementations of TXPathVariable.AsText(), AsNumber() and
  AsBoolean(). These methods are overriden by all TXPathVariable descendants, therefore in
  TXPathVariable itself they are dead and only increase executable size.
- Removed debug statement committed by accident in r13256.

tests/xpathts.pp:
* Annotated some tests, added a few tests for name(), namespace-uri() and local-name().

git-svn-id: trunk@13322 -
2009-06-24 19:16:33 +00:00
sergei
986dfd01fb xmlread.pp:
+ Character count checks for parameter entities, protects against entity expansion attacks using PE's.
+ Cache external PE's so they are only fetched once, considerably reduces traffic and CPU load in
  case of attack.
* Do not repeat attempts to read from input stream once the read operation has returned less bytes
  than requested.

git-svn-id: trunk@13321 -
2009-06-23 22:46:26 +00:00
sergei
09867a1f6e xmlread.pp:
+ New option TDOMParseOptions.DisallowDoctype - prohibits processing of the DTD (specs compliant,
  targeted for SOAP applications).
+ New option TDOMParseOptions.MaxChars - limits max document length, protects against entity
  expansion attacks and DoS by feeding in too long documents. Default value of 0 means no
  restrictions. Tested with internal and external general entities, TBD with parameter entities.
* Fixed calculation of URIs used to retrieve external entities, they should be evaluated at the
  point of entity declaration rather than at the point of resolving (which happens at the first
  inclusion). 
dom.pp:
* TDOMNode.SetReadOnly, calling Attributes was causing creation of TAttributeMap on every element.
  Fixed.

git-svn-id: trunk@13313 -
2009-06-22 19:57:11 +00:00
sergei
0a7e62ac04 - dropped remaining calls to GetChar (replaced with FSource.NextChar).
* simplified AddForwardRef, now it always uses FTokenStart as position.

git-svn-id: trunk@13304 -
2009-06-20 16:28:18 +00:00
sergei
dbd2759da9 + Implementation of TDOMDocument.DocumentURI and TDOMAttr.IsID + tests.
git-svn-id: trunk@13291 -
2009-06-18 21:34:07 +00:00
sergei
64966ccae1 * Refactored the main parsing loop, it is no longer recursive with respect to elements (still
recursive with respect to entities, however). This enables more useful backtrace in case of
  parsing errors, and makes more fun at profiling.

git-svn-id: trunk@13275 -
2009-06-14 18:00:26 +00:00
marco
1d5758b29d * Minor fixes to $ifdef writeln's I had lying around.
git-svn-id: trunk@13268 -
2009-06-12 21:09:20 +00:00
sergei
f31048dc01 * Flag undeclared elements with ContentType = ctUndeclared, it's much more self-documenting than the
mysterious HasElementDecl.

git-svn-id: trunk@13266 -
2009-06-12 20:20:14 +00:00
sergei
f31d31049e Improved XPath test suite and added some more tests.
git-svn-id: trunk@13260 -
2009-06-11 19:21:37 +00:00
sergei
44ebbec358 Minor fixes to the reader:
- Removed remaining assignments of TXMLFileInputSource.SystemID, as it is assigned in constructor.
- As attributes now remove themselves from owner upon destruction, removed the redundant check.
* ReadXMLFile, ReadDTDFile: Moved all assignments of Document to the 'finally' sections to avoid
  leaks if parsing error happens. This was already done in most frequently used overloaded
  ReadXMLFile, but wasn't noticed in other places.
* TXMLReader.CheckName was unable to detect a malformed local part of a QName if its prefix is
  well-formed and crosses the buffer boundary. Fixed.

git-svn-id: trunk@13259 -
2009-06-11 18:29:25 +00:00
sergei
a45049155e XPath parser improvements:
* Qualified names, 'NCName:*' and  variable references are handled as single tokens (no
  whitespace is allowed between parts).
* Function and variable names may have a prefix now.

git-svn-id: trunk@13256 -
2009-06-10 21:42:46 +00:00
sergei
538f82091a XPath improvements:
+ Utility function TXPathScanner.SkipToken, saves some amount of typing.
* Allow TXPathLocationPathNode to have FFirstStep = nil, and don't create a redundant
  initial step while parsing.

git-svn-id: trunk@13253 -
2009-06-09 22:52:16 +00:00
sergei
f0e6946688 XML/HTML writers, handle denormalized line-ending sequences (#13 and #13#10), fixes #13879.
git-svn-id: trunk@13247 -
2009-06-08 20:01:30 +00:00
sergei
26767125f0 * Refactored TXPathLocationPathNode.Evaluate(), split that awful 3-level nested procedure into
TStep.SelectNodes, TStep.ApplyPredicates and the remaining part.
* Since predicates contained in a location path are evaluated within separate contexts of their own,
  evaluation of the location path itself does not require a full context (only need context nodes).
  This simplifies things quite a bit.
+ Added support for evaluating filter expressions follwed by location path. Things like
  "id('foo')/bar" work now.

git-svn-id: trunk@13244 -
2009-06-06 18:51:50 +00:00
sergei
e66e35ac2c XPath: reducing memory load:
* Store predicates of TStep and TXPathFilterNode in dynarrays instead of TList, this way we allocate
  only as much memory as needed, and allocate anything only when predicates are actually present
  (that's minority of all cases).
* Eliminated intermediate TList in filtering step results.
* Remaining TList's replaced by TFPList's.
* Fixed ordering of nodes on preceding-sibling axis.

git-svn-id: trunk@13230 -
2009-06-03 09:09:53 +00:00
sergei
3327371e24 + Implemented DOM level 3 method TDOMNode.LookupNamespaceURI().
* Default attributes which have a colon in name now get a namespace assigned upon restoring. This
  fixes remaining level 2 testsuite failures.

git-svn-id: trunk@13229 -
2009-06-02 13:56:24 +00:00
sergei
32b98580fa + Namespace support in TDOMElementList, makes GetElementsByTagNameNS() operational.
+ Modified TDOMImplentation.HasFeature to return True for level 2 features.

Now the DOM Level 2 support is fairly complete (1 error and 1 failure still remain).

git-svn-id: trunk@13228 -
2009-06-01 21:19:36 +00:00
sergei
c5114c7423 * Modified TDOMNodeList. It now has a fixed BuildList procedure which iterates descendant nodes,
calling NodeFilter for each node. The NodeFilter return value determines whether the node will
  be added to the list, and whether node's children should be recursively iterated.
  This considerably simplifies creating TDOMNodeList descendants, as they no longer need to mess
  with the class internals (FRevision, FList, etc).

git-svn-id: trunk@13227 -
2009-06-01 20:55:18 +00:00
sergei
2cd0a1ad27 + Part of DOM level 2 namespace support (handling namespaced attributes)
* Cloning/importing attributes and elements preserves their namespaces
* Importing an element does not import non-specified attributes.
+ Separate, much faster, implementation for element cloning.

git-svn-id: trunk@13226 -
2009-06-01 19:43:34 +00:00
sergei
baa07b1a22 Bringing readme's up to date
git-svn-id: trunk@13216 -
2009-05-31 10:38:28 +00:00
sergei
466c41da12 * Added .txt extension to README_DOM (this one was missed while fixing Mantis #12358)
git-svn-id: trunk@13215 -
2009-05-31 09:14:37 +00:00
sergei
b631754754 + Processing of prefixed attributes and prefix bindings. This completes namespace support at
the XML reader side.

git-svn-id: trunk@13214 -
2009-05-31 08:18:06 +00:00
sergei
cf98a19e8e + Implementation of TDOMDocument.CreateAttributeNS and CreateElementsNS
+ Initial part of TDOMElement.SetAttributeNS
+ TDOMImplementation.CreateDocumentType checks validity of QualifiedName
* Use 'managed' memory allocation in TDOMEntity.CloneNode and TDOMNotation.CloneNode to avoid leaks
* TDOMDocument.RemoveID now using THashTable.RemoveData(), simplifies things

git-svn-id: trunk@13200 -
2009-05-26 22:14:21 +00:00
sergei
55e3c6be3a dom.pp: No more failures on level 1 testsuite... at last.
+ Implemented handling of default attributes:
  * creating an element also creates and attaches the default attributes;
  * removing an attribute restores it with default value, if there's one.
+ Attribute nodes remove themselves from the owner element upon destruction, making it possible
  to Free attributes manually.
* TDOMNamedNodeMap.SetNamedItem does not reset attribute OwnerElement if the argument node is already
  contained in the map (and whole operation is therefore is a no-op).

git-svn-id: trunk@13196 -
2009-05-25 20:28:40 +00:00
sergei
733d2c38d5 dom.pp: Customized memory management, fixes 17 test cases and all memory leaks in testsuite:
* Every node created by Document.CreateXXX method is now guaranteed to be destroyed with the
  document, whether it is part of the tree or not. Therefore, DOM methods which remove nodes
  from the tree (namely, TDOMNode.RemoveChild, TDOMNode.ReplaceChild,
  TDOMElement.SetAttributeNode and TDOMElement.SetAttributeNodeNS) no longer need to destroy
  their return value and are now conformant to the specs.
* Nodes are allocated in arrays of instances (emulates 'placement new operator' in C++ terms).
  Allocation and freeing are as fast as possible (just assigns a couple of pointers).
* Behaviour of nodes that are created by direct call to constructor is unchanged.

git-svn-id: trunk@13185 -
2009-05-21 23:07:32 +00:00
sergei
d3dd0d6aa0 dom.pp: Added node memory management code (pure addition, no functionality changes this time).
git-svn-id: trunk@13184 -
2009-05-21 20:45:16 +00:00
sergei
035fe43b72 Final strike for #13605:
src/dom.pp:
* GetElementsByTagName[NS] results now get cached in a hashtable. Repeated calls to
  GetElementsByTagName with same arguments return the same instance of NodeList. All NodeLists
  created during document lifetime are destroyed with the document.

src/xmlutils.pp:
* THashTable.Lookup(), changed SetString to SetLength+Move because SetString truncates on #0
+ added THashTable.RemoveData() method

tests/api.xml:
- No longer need to 'garbage collect' the NodeLists.

git-svn-id: trunk@13180 -
2009-05-20 23:08:24 +00:00
sergei
17bbe72d08 * Moved TDOMAttrDef class from xmlread.pp to dom.pp (in order to implement default attribute handling at DOM level).
* Using regular CloneNode() method to create copies of TDOMAttrDef.

git-svn-id: trunk@13176 -
2009-05-18 22:03:37 +00:00
sergei
0a242ba49f dom.pp: Ignore node read-only property when its owning document is being destroyed (enables destroying nodes in arbitrary order).
git-svn-id: trunk@13175 -
2009-05-18 20:33:43 +00:00
sergei
6049600ccb DOM test suite enhancements:
* Do not convert tests which request implementation attribute 'signed'='true'.
  Such tests aren't applicable to our unsigned DOM, they only cause compiler warnings
  and noise in the test report.
+ Support for default properties (obj.item(x) -> obj[x]).
+ Support black-listing of testcases. Some of them (in HTML testsuite) are easier to
  rewrite by hand than to convert.
+ Support adding certain units to 'uses' clause (e.g. HTML suite must use dom_html).

git-svn-id: trunk@13172 -
2009-05-17 22:56:51 +00:00
sergei
66c0840bce * TDOMText.SplitText should check that its argument isn't readonly before doing anything else.
Since the procedure still raises NO_MODIFICATION_ERR later (while inserting new node to the parent),
the testsuite wasn't able to detect this bug, causing the old node to be modified and the new node to leak :/

git-svn-id: trunk@13144 -
2009-05-15 13:30:31 +00:00
sergei
54b475a68b dom.pp:
* Partial fix for #13605 (fixes the issue as reported, but a fix for nodelists returned by
  GetElementsByTagName[NS] is also needed):
  - Each node which can have children has an associated instance of TDOMNodeList;
  - Other nodes are substituted by special 'null' node, having an empty child list;
  - Muiltiple calls to ChildNodes return the same instance of TDOMNodeList;
  - Calling Free on result of ChildNodes is optional; if not freed, it will be destroyed with
    the owning node.

tests/domunit.pp:
* Changed TFPObjectList to TObjectList, which has been found to destroy its elements in opposite
 order (reported as #13715). As NodeLists became owned by Document, old (FIFO) destruction order is
 causing their double destruction.

git-svn-id: trunk@13143 -
2009-05-14 21:00:29 +00:00
sergei
4eef2b87a1 dom.pp: Moved creation of all TDOMNodeList's to TDOMDocument (another part of #13605).
git-svn-id: trunk@13134 -
2009-05-12 19:46:42 +00:00
sergei
448b621ff4 xpath.pp: A slightly more efficient implementation of TXPathCompareNode.Evaluate().
git-svn-id: trunk@13130 -
2009-05-10 19:38:32 +00:00
sergei
7a478e64c2 xpath.pp: Honor axis direction when filtering step result with predicates. For reverse axes, ContextPosition is now relative to the last node of the set. The third argument of TXPathExprNode.EvalPredicate() is redundant and has been removed.
git-svn-id: trunk@13129 -
2009-05-10 19:32:22 +00:00
sergei
4cabfad02a xpath.pp: Fixed lexical analysis in ParseStep(), now conformant with paragraph 3.7 of the specs:
* Identifier is treated as AxisName only if it is followed by '::'
* Identifier is treated as NodeType only if it is followed by '('.

git-svn-id: trunk@13123 -
2009-05-09 20:27:29 +00:00
sergei
f3e64cf8ce xpath.pp: replaced TXPathScanner.SaveState/RestoreState by PeekToken().
git-svn-id: trunk@13120 -
2009-05-09 19:55:38 +00:00
sergei
d03e569ae9 Further XPath improvements:
+ Implemented [more or less] correct parsing of last two variations of PathExpr [19].
  (only parsing - evaluation still has to be done).

git-svn-id: trunk@13116 -
2009-05-08 21:30:55 +00:00
sergei
d839aada5b xpath refactoring:
* Split parsing location steps into a separate procedure, TXPathScanner.ParseStep();
* Changed some case statements to if's, in order to improve indentation and readability.

git-svn-id: trunk@13115 -
2009-05-08 07:42:55 +00:00
sergei
dceb9320f5 Cleanup of dom.pp:
- Removed TRefClass, memory of TDOMNodeList's must be managed in some other way (part of #13605).
- Removed unnecessary forward class declarations.

git-svn-id: trunk@13113 -
2009-05-07 18:13:14 +00:00
sergei
9fe4f59c5a Three XPath scanner fixes:
* #12 is not a whitespace char;
* '!' is not valid unless it is a part of '!=' token;
* Accept full XML 1.0 name character range as identifiers.

git-svn-id: trunk@13109 -
2009-05-07 06:51:41 +00:00
sergei
8c898e963a + Implements XPath function id() + test. Running the test is another story, however, because it requires parsing FilterExpr+'/'+RelativeLocationPath, which is currently not implemented.
git-svn-id: trunk@13106 -
2009-05-06 20:07:09 +00:00
sergei
e17ac308e0 Implementation of XPath function lang() + tests.
git-svn-id: trunk@13060 -
2009-04-29 17:52:39 +00:00
sergei
841625e3dd Refactoring, no functional changes
xmlread.pp:
* Moved assignment of TXMLFileInputSource.SystemID into TXMLInputFileSource.Create.
* Eliminated nested procedure in TXMLReader.ProcessDefaultAttributes, it was redundant since
  r12026.

xpath.pp:
* Moved predicate evaluation code, which is common for filter and step nodes, into
  TXPathExprNode.EvalPredicate().

git-svn-id: trunk@13056 -
2009-04-28 19:35:07 +00:00
sergei
efcccbf895 Test suite improvements, targeted to support the HTML suite:
domunit.pp:
+ Added AssertEqualsNoCase() method.
* TDOMTestBase.Load chaned doc argument to untyped, because some tests use TDOMNode instead of a
  TDOMDocument.
* Completed the URIEquals() method; changed parameter types to PChar in order to be able to
  distinguish nil from empty string.
* Modified GetResourceURI method so it is capable to handle the directory structure of CVS
  snapshot (level2/html using data files from level1/html).

testgen.pp:
* Counterparts to changes in domunit.pp
+ Support for renaming APIs (e.g. 'type'->'htmlType')
+ Support for enforcing the correct type of function arguments (emits 'as' operator).

api.xml:
+ Added data for DOM Level3 XPath and Level2 HTML suites.

git-svn-id: trunk@13055 -
2009-04-28 19:18:07 +00:00
sergei
e75bad33e4 Applied a fix similar to r13047:
* Handle empty tags by emitting a pair of StartElement/EndElement
  events. While this is optional in HTML parser, here in XML parser it is a requirement.

git-svn-id: trunk@13048 -
2009-04-26 18:11:03 +00:00
sergei
b9ad8e3755 * Handle xml/xhtml style empty tags by emitting a pair of StartElement/EndElement events with
correct tag name.

Slightly modified patch from Marco van de Voort, resolves #13409.

git-svn-id: trunk@13047 -
2009-04-26 17:56:21 +00:00
sergei
b02aededf8 More progress with XPath:
src/xpath.pp:

+ Implemented sum() and normalize-space() core functions.
* Rewrote comparison code, nodesets are now handled correctly (to the
  extent of the tests which I could find).
* starts-with() and contains() return True when second argument is an
  empty string - that differs from Pos() behavior.
* NaNs are propagated through mod operator, floor() and ceiling().
* Fixed memory leak caused by not releasing arguments after function
  calls.
* string-value of a nodeset is the value of its first node, not all
  nodes glued together.

tests/xpathts.pp:

+ Added 120 tests, most coming from OASIS Prototype XSLT/XPath 1.0
  conformance test suite.
+ Tests can now take an input xml data as a string.

git-svn-id: trunk@13046 -
2009-04-26 16:06:15 +00:00
michael
f641281a7e * Patch from Sergei Gorelkin:
+ added TXPathBinaryNode as a common ancestor for binary operations;
  + TXPathBooleanOpNode now handles only 'and' and 'or' operators,
    the purpose is to not evaluate the second argument if the result can
    be determined by the first argument;
  * Comparison operations moved to TXPathCompareNode and fixed
    to support INFs and NANs correctly;
  * Fixed TranslateWideString() that was not deleting characters;
  * Fixed 'substring-after' function so its result is empty when argument
    string does not contain the pattern;
  * Fixed 'round' funcion so it complies to the specs;
  * Completed implementation of 'substring' function (but surrogate pairs
    are not handled yet);
  * Mask exInvalidOp and exZeroDivide FPU exceptions while evaluating
    expressions, this ensures correct calculations with respect to INFs
    and NANs.
  + Added testsuite for xpath

git-svn-id: trunk@12961 -
2009-03-23 08:37:51 +00:00
michael
8cf5d9abf2 * Patch from Sergei Gorelkin
* TXPathUnionNode.Evaluate: fixed two crashes. The object returned by
    TXPathVariable.AsNodeSet is owned by that TXPathVariable and should
    not be explicitly destroyed. Also TXPathVariable should not be
    released if its AsNodeSet result will be used later.

  * TXPathLocationPathNode.Evaluate/EvaluateStep:

    - fixed crash in axisFollowing case branch (caused by wrong variable
      being used in the loop).
    - rewrote axisPreceding branch so it builds the result node list in
      correct (document) order.
    - Fixed predicate match condition that was always evaluating as True.

  * TXPathScanner.ParseLocationPath: modified so it never returns nil.
    This fixes crash in cases when '/' or '//' are used otherwise than
    the whole expression (e.g. 'string(/)').

  * Replaced manual searching in TList by calls to IndexOf() in two
    places.

git-svn-id: trunk@12934 -
2009-03-20 20:09:55 +00:00
michael
9662260088 * Patch from Sergei Gorelkin:
Fixes a bug in internal DTD subset processing, which was preventing
  tokens that cross input buffer boundary from being correctly added to
  DocType.InternalSubset (the first part of such tokens was dropped).

git-svn-id: trunk@12860 -
2009-03-06 10:32:49 +00:00
michael
478aefebd8 * Patch from Sergei Gorelkin:
* Fixed crash resulting out of changing TDOMDocument.OwnerDocument
    from Self to nil a while ago.
  * Refactored the TXPathScanner code so that it:
    a) does not use UngetToken.
    b) does not build CurTokenString by appending single characters.
    c) moved parsing code from nested procedures to regular TXPathScanner
       methods.
  + Implemented many (but not all yet) core library functions.
  + Support for scanning 'processing-instruction("name")' syntax.
  + Support for scanning 'foo:*' and 'foo:bar' node name tests.
  * NodeSets are always convertible to numbers and booleans.
  * String representation of an Element is its TextContent, not NodeName.
  * TXPathConstantNode must Release its value, not destroy it (enables
    correct result of expressions that consist of a single constant).
  * Some fixes in attempt to make math operations conformant to the specs.

git-svn-id: trunk@12855 -
2009-03-04 10:31:20 +00:00
Jonas Maebe
4bf254bc32 * added .txt extensions to all README, TODO and COPYING files
(mantis #12358)

git-svn-id: trunk@12825 -
2009-02-28 17:34:08 +00:00
michael
c44f0eb6dd * Patch from Sergei Gorelkin:
dom.pp:

  * Added a comment about TDOMDocument destruction order.
  * Changed declaration of standard namespaces from literals to typed
    consts. This makes package operational on arm-wince which has a flaw
    in WideString literal assignments (issue #13237).
    Even without that bug, the change allows to save some bytes in
    executable, because typed consts are only put there once, while
    literals are compiled in for every unit that uses them.

  htmwrite.pp:

* removed an unused variable

git-svn-id: trunk@12819 -
2009-02-28 11:50:19 +00:00
joost
a2f5f7400b * Replaces several direct references to FNSI.QName by the NodeName property, so
that descendent classes can override the NodeName properly
 * Fixed an AV when GetNodeName is called and there is no NodeName set
 * Removed the THtmlCustomElement.NodeName property and override the GetNodeName
   method instead. The hashtable of TDOMNode_NS is not used because
   THtmlCustomElement uses a faster lookupsystem for tag/node-names
 * Added a basic test for the htmlwriter unit

git-svn-id: trunk@12732 -
2009-02-09 21:43:09 +00:00
Jonas Maebe
b39cc14c47 * regenerated after patch to Makefile.fpc in r12636
git-svn-id: trunk@12656 -
2009-02-02 16:07:24 +00:00
florian
c127154efa o Haiku patches by Olivier Coursiere
+ add posix thread support
  * improve signal handling
  * synchronize haiku's baseunix unit with the unix one (maybe it will be possible to remove Haiku's one in a future patch, but i keep it for now)
  + add support for standard sockets
  * fix some functions import to use the right libraries under Haiku
  * fix packages compilation

git-svn-id: trunk@12636 -
2009-02-01 10:30:55 +00:00
michael
ee3ac64afb * Hopefully fixed argument size problem on 64-bit windows
git-svn-id: trunk@12601 -
2009-01-26 09:04:37 +00:00
michael
aecbef27b2 * Patch from Sergei Gorelkin:
* Changed the design of input decoders so they process data by chunks
    instead of char-by-char. It is much faster, and allows supporting
    external pluggable decoders.
  + Interface for external decoders.
  * ResolvePredefined() is rewritten so it doesn't call CompareMem five
    times do determine a single char.
  * ParseCharRef renamed to ParseRef, because it parses entity refs as
    well.
  * Added guard conditions to prevent integer overflows in ParseRef.
  * ContextPush(TXMLCharSource) merged into Initialize().

  xmliconv.pas is a new unit, containing an libiconv-based decoder. It depends on existing iconvenc package, and
  thus supports all platforms that are supported by iconvenc.

  xmliconv_windows.pas is the variation that allows to use libiconv functionality on Windows (It would require
  the iconv.dll to be distributed with the application, but since I haven't succeeded yet in writing a native
  Windows decoder, this is better than nothing).

git-svn-id: trunk@12582 -
2009-01-22 21:53:30 +00:00
michael
7666920852 * Patch from Sergei Gorelkin:
xmlread.pp:
  * Remove TXMLReader.FCurChar, by replacing it by FSource.FBuf^.
  * Aiming to support any input encoding, the parser has been refactored
    to consume UTF-16 produced by 'xml-unaware' decoder (i.e. with line
    endings unadjusted and possibly containing chars that are invalid for
    XML). The majority of parsing is now done in SkipUntil methods of
    TXMLCharSource and TXMLDecodingSource. This design also considerably
    increases performance because it processed chars in batches instead of
    one-by-one (the decoders still process chars one-by-one, but they are
    subject for soon replacement).
  * Signature of BufAppendChunk changed to take starting and ending
    addresses of the buffer instead of starting address and length.
  * More sophisticated parsing of end-tags, avoids calls to StoreLocation
    if possible (despite its trvial look, StoreLocation is quite expensive
    in CPU cycles).


  dom.pp:
  * Some progress with DOM level 2. Implemented namespaceURI, prefix,
    localName properties for Elements and Attributes. The namespace
    information occupies only 32 bits per node.
  * Implemented storing names of elements and attributes in a hash table.
    This considerably reduces amount of used memory because each unique
    string is stored only once. Reducing memory allocation count also
    improves parsing speed.
  * Using the hash table also allows to link DTD declarations directly to
    the element nodes, avoiding any lookup at all.

  dom_htmp.pp:
  * Merely fixes compilation after changes to the DOM.

git-svn-id: trunk@12318 -
2008-12-08 19:51:46 +00:00
peter
2916256b2c * change externalurl to homepageurl
git-svn-id: trunk@12170 -
2008-11-18 23:58:52 +00:00
michael
67f56b7adf * Patch from Sergei Gorelkin:
src/xmlread.pp, src/dom.pp
  * Improvements to attribute processing: attributes are now validated as
    they come. This enables reporting of the corresponding validation
    errors at correct positions (previously everything was reported at the
    end of element start-tag).
  * Search for a declaration for attribute, not for an attribute
    corresponding to the declaration. This reduces number of lookups
    (because unspecified attributes are not searched) and obsoletes the
    need in FDeclared field on every attribute.

  tests/domunit.pp, tests/testgen.pp:

  * Various improvements required to support converting of the
    DOM level 3 XPath module.

git-svn-id: trunk@12026 -
2008-11-04 18:33:05 +00:00
marco
054eeff8ee * FCL fpmake manifests
git-svn-id: trunk@11962 -
2008-10-23 21:09:14 +00:00
Jonas Maebe
0cad00fbdb - reverted r11751, 11755 and 11759 because
a) they should not be necessary and only hide the symptoms of a not
      understood bug on some platforms
   b) doing so breaks things on some other platforms

git-svn-id: trunk@11951 -
2008-10-23 14:22:00 +00:00
marco
1295c499c9 * More fpmake fixes. Exampledirs and includefiles mostly fixed for these.
gdbint moves two examples from src to exampledir + makefile fix.

git-svn-id: trunk@11949 -
2008-10-22 22:08:05 +00:00
marco
e5db5e4aa8 * regened makefiles to propagate makefile versions
git-svn-id: trunk@11947 -
2008-10-22 17:32:15 +00:00
marco
3591d54f24 * updated all makefile.fpc versions to 2.2.2 for fppkg compat.
git-svn-id: trunk@11945 -
2008-10-22 17:19:13 +00:00
michael
e632e754cf * Patch from Sergei Gorelkin
xmlutils.pp:
  + Added THashTable - a simple hashed container with WideString keys.

  dom.pp:
  * Use the hash table instead of a sorted list for storing document IDs.
  * Replaced all TLists by TFPList (which is smaller and faster).
  * Fixed TDOMElement.RemoveAttributeNode to throw NOT_FOUND_ERR when
    the requested node is not one of the element's attributes.
  + Added node read-only checks where required by the specs, this fixes
    about 50 DOM tests.

  xmlread.pp:

  * Got rid of TXMLCharSource.FReloadHook, the corresponding procedure may
    be called directly.
  * Used a separate buffer to store the entity value literals, this
    enables correct including of external PEs that have a text declaration
    at the beginning.
  * Some refactoring: ParseAttribute has been split into a separate
    procedure, ProcessTextAndRefs was merged into ParseContent.

git-svn-id: trunk@11942 -
2008-10-22 12:25:12 +00:00
peter
7b188a6a0e * reset version to latest release: 2.2.2-0
git-svn-id: trunk@11907 -
2008-10-17 18:36:45 +00:00
michael
213f8a41c7 * Large patch from Sergei Gorelkin:
xmlutils.pp, names.inc:
    * exclude colon from the NameChar bitmap and handle it in code.

  dom.pp:
    + TDOMText.IsElementContentWhitespace now implemented completely.
    * Attributes created by TDOMElement.SetAttribute get their
     OwnerElement property assigned properly
    * Attribute replaced by TDOMNamedNodeMap.SetNamedItem get their
     OwnerElement reset to nil
    * TDOMElement.SetAttributeNode does not destroy the attribute when it
     is being replaced by itself
    * Most node boolean properties collected into a single FFlags field
     to reduce memory requirements.

  xmlread.pp:
    + Syntax-level support of namespaces: handle colons in names, check
     correct qualified name syntax, prohibit colons in entity/notation/PI
     names and ID/IDREF attribute values (all this only happens when
     Options.Namespaces is set to True - not by default).
    * Reaching end of input while parsing the Ignore Section is a fatal
     error because parameter entities are not recognized there.
    * Reaching end of input while parsing entity value literal that was
     started in a parameter entity aborts immediately instead of hopelessly
     scanning the whole document up to its end.
    * Fixed parsing duplicate Element declarations. The content models of
     subsequent declarations are now discarded as they should - not
     appended to the existing model.
    * Fixed parsing duplicate Attlist declarations. In addition to dropping
     the attribute declaration itself, do not modify the corresponding
     element declaration and suppress 'Duplicate ID attribute' and
     'Duplicate NOTATION attribute' validation errors.
    * Fixed error position in cases when attribute value lacks the closing
     quote.
    * Some refactoring in order to reduce number of WideString vars and code
     size (some SkipX and ExpectX merged into SkipX(required: Boolean)).
    * TXMLCharSource.FLocation record replaced by single integer FLineNo
     because LinePosition is always calculated.
    * TXMLCharSource.FCursor replaced by local var.
    * TXMLReader.NameIs changed to a more general BufEquals(), it eliminates
     TXMLReader.GetString and some WideString variables.

  tests/xmlts.pp:
    * Ignored tests do not change suite conformance state.

  tests/testgen.pp
    * Added a forgotten semicolon.

git-svn-id: trunk@11869 -
2008-10-08 18:06:52 +00:00
joost
c4789a5ae4 * Removed unnessesary var-keyword in declaration of ReadXMLFile (Fixes compilation)
git-svn-id: trunk@11788 -
2008-09-15 08:17:35 +00:00
marco
e7c43e55c5 * more unaligned fixes for xmlread. Mantis 12137
git-svn-id: trunk@11759 -
2008-09-13 09:54:13 +00:00
florian
7c82bbcbcd * use unaligned instead some hacking :)
git-svn-id: trunk@11755 -
2008-09-13 08:42:35 +00:00
marco
0d9bf5addb * committed fix for unaligned access from id 12079
git-svn-id: trunk@11751 -
2008-09-12 16:59:56 +00:00
marco
622ace494e * fix from Michalis K. for nesting depth of XMLs (# 11957)
git-svn-id: trunk@11644 -
2008-08-24 08:23:02 +00:00
michael
797103884a * Patch from Sergei Gorelkin to handle unicode
git-svn-id: trunk@11637 -
2008-08-23 11:34:47 +00:00
michael
b3d983ce07 * Initial testsuite from Sergei Gorelkin
* testgen.pp - an utility to convert w3.org tests from XML format
      into fpcunit-compatible Pascal source. The official testsuite uses
      xslt for conversion, but, since there is no xslt for Pascal, and no
      xslt support in FCL yet, I wrote an utility.
    * api.xml    - API 'database', needed by testgen.
    * domunit.pp - an fpcunit extension, provides DOM-specific runtime
      support.
    * README_DOM - provides some instructions about putting it all together.

git-svn-id: trunk@11390 -
2008-07-17 14:57:31 +00:00
michael
42601356dd * Patch from Sergei Gorelkin: * Makes TDOMParser.ParseURI throw EXMLReadError when URI is not resolvable (consistent with the Parse method).
git-svn-id: trunk@11389 -
2008-07-17 14:55:07 +00:00
michael
d812fa0c92 * Patch from Sergei Gorelkin:
* excludes #$FFFE and #$FFFF from allowed XML 1.1 name chars, so
  IsXmlName result is correct when its argument comes not from the
  parser.
xmlread.pp:
+ Two new parsing options, Namespaces and ResolveExternals (not
  functional yet but needed to proceed).
* Fixed checking of WFC [28a], forces fatal error as soon as possible
  and prevents parsing of further (potentially malicious) data.
  Hopefully now it is truly compliant to the specs and not just
  satisfies the tests.
* In entity value literals, nesting is checked by entity, not by the
  input source (consistent to other places).
- Saving FCursor around attribute default value isn't necessary because
  FCursor is always nil while parsing the DTD.
* TList's changed to more lightweight TFPList's.
* Changed once more (probably the last time) recognizing the standalone
  percent sign in parameter entity declarations. Rationale is that
  FCurChar is no more out of sync with FSource.FBuf^, and therefore may
  be removed.

tests/xmlts.pp and tests/README:
+ Added support for the latest XML test suite (by skipping tests
  targeted for the upcoming fifth edition of XML specs).
+ 'Namespaces' option is passed to the parser.
* README updated with the latest testsuite URL.

git-svn-id: trunk@11303 -
2008-07-01 19:14:56 +00:00
Jonas Maebe
9d8bee1887 * regenerated with changes in r11233
git-svn-id: trunk@11234 -
2008-06-15 15:52:25 +00:00
michael
fa1b9a1878 * Patch from Sergei Gorelkin to improve DOM compliance:
dom.pp:
* Document.OwnerDocument returns nil.
* Document.TextContent returns empty string and setting it does nothing.
* Fixed EntityReference, it now gets its children upon creation and is
  correctly imported between documents.
+ Node.IsSupported()
* DOM feature name comparison is done case-insensitive.
* Reworked Node.AppendChild/Node.InsertBefore. Duplicate functionality
  removed. Resolves remaining issues with hierarchy/ownership checks
  (except for Document nodes which is a different story altogether).
  The same code is now executed for nodes attached to a Fragment as
  well as for regular nodes.
+ Text.SplitText checks for valid ParentNode.

xmlread.pp:
+ Implemented TDOMParser.ParseWithContext (except the case of replacing
  the whole document)
* Fixed AV when calling ParseXXX methods with input source that could
  not be resolved.
* Completely ignore comments in external DTD subset, it fixes a couple
  of DOM tests and has no effect on XML testsuite.

git-svn-id: trunk@11217 -
2008-06-11 05:40:49 +00:00
giulio
14d4f02fa0 * fixed fpc_zipinstall for go32v2 and the like
* makefiles regenerated

git-svn-id: trunk@11180 -
2008-06-03 14:01:09 +00:00
Tomas Hajny
77581bedd1 * makefiles regenerated with newer fpcmake
git-svn-id: trunk@11107 -
2008-05-28 06:34:32 +00:00
Jonas Maebe
b6c43bad7d * regenerated for i386-Haiku and darwin cross compilation changes
git-svn-id: trunk@11073 -
2008-05-24 09:29:08 +00:00
micha
0b2f80a38b * regenerate Makefiles to get armeb-linux support globally (also arm-darwin, so it seems)
git-svn-id: trunk@10888 -
2008-05-05 18:46:55 +00:00
micha
b0838b13d7 * add armeb target to compiler/Makefiles
git-svn-id: trunk@10552 -
2008-03-24 17:48:11 +00:00
joost
eb34e7b96d * Added Meta, Link and Script methods to THTMLWriter
* Fixed typo Attrubute - Attribute

git-svn-id: trunk@10469 -
2008-03-09 20:00:53 +00:00
michael
77b38b6be5 * Patch from Sergei Gorelkin:
fcl-xml/src/dom.pp: resolved a number of Level 1 conformance issues:

  * Node.Normalize always deletes empty text nodes
  * Node.Normalize is recursive into Attributes
  * Node.InsertBefore corrected exception code in case when RefChild is
    not one of node's children
  + Node.InsertBefore added missing check for possible cycle in tree
  + Node.AppendChild and Node.InsertBefore added checking type of NewChild
  + CloneNode enabled for Fragment and Entity
  - CloneNode deleted for DocumentType (w3 specs directly prohibit cloning
    it between documents, and cloning within one document is claimed
    'implementation specific' - but makes no sense).
  + Node.ImportNode is now working

  * Uncommented Level 2 node properties (NamespaceURI, localName and
    Prefix), this caused a name clash and a lot of function argument
    renames.

  fcl-xml/src/xmlutils.pp:

  + overloaded IsXmlName() that accepts PWideChars

  fcl-xml/src/xmlconf.pp

  * Applied a fix similar to xmlcfg.pp for Mantis #10554

  fcl-xml/src/xmlread.pp:

  * Major: Got errors reported at correct locations for all 1600+ negative
    tests. Easy to say, but it required modifying almost every second
    line of code.
  * TContentParticle references an existing element definition instead of
    storing its own name (this allows content model matching without
    string comparisons).
  * Resorted to old-style 'object' for TElementValidator and to plain
    procedures for decoders (allows to drop almost all related memory
    management).
  * Moved parameter entity detection from char to token level, this
    simplifies things a bit.
  + Added second level of buffering to input source (a step towards
    supporting arbitrary encodings).
  * The main parsing loop contains no implicit exception frames now.


  fcl-xml/src/xmlwrite.pp

  * Replaced the stupid indenting algorithm with a simple rule: "Do not
    write indents adjacent to text nodes". Now it does not make a mess
    out of the documents which were parsed with PreserveWhitespace=True.
  * Use specialized node properties instead of generic ones, this
    eliminates WideString copies and results in almost 2x performance
    boost in Windows.
  * Even more performance:
    * Write line endings together with indents -> twice less calls.
    * Increase slack in buffer and write strings with known length (i.e.
      most of markup) without overflow checking.

  fcl-xml/tests/xmlts.pp:

  * Use parser options instead of dedicated procedure to 'canonicalize'
    documents, the parser has become mature enough to do that.
  * Fatal error in non-valid category is a test failure, as well as
    validation error alone in not-wellformed category.

  fcl-xml/src/README

  * Brought a bit up to date

  fcl-xml/tests/README

  + Added testsuite errata/issues

git-svn-id: trunk@10314 -
2008-02-13 10:31:09 +00:00
peter
1c065d8279 * updated
git-svn-id: trunk@10282 -
2008-02-10 19:20:10 +00:00
marco
d115a72549 * Related to #7902, sax_xml now compiled
git-svn-id: trunk@10222 -
2008-02-05 09:02:27 +00:00
peter
0e0fbee1cd * remove dependency on itself
git-svn-id: trunk@9920 -
2008-01-25 16:23:31 +00:00
peter
66b6f5d4f7 * fix netdb dependencies
git-svn-id: trunk@9919 -
2008-01-25 00:40:35 +00:00
peter
875168c56b * new fpmake.pp
git-svn-id: trunk@9911 -
2008-01-24 23:37:32 +00:00
peter
e338befa21 * mode objfpc added
* remove old fpmake

git-svn-id: trunk@9910 -
2008-01-24 23:35:30 +00:00
marco
db3eb67852 * fix for 10554
git-svn-id: trunk@9742 -
2008-01-13 19:31:54 +00:00
marco
523eee3920 * xpath memleak patch from #10573
git-svn-id: trunk@9666 -
2008-01-07 10:27:40 +00:00
michael
915aa94e2d * Implemented dummys for missing methods
git-svn-id: trunk@9411 -
2007-12-07 16:42:09 +00:00
Jonas Maebe
c9ce918485 * regenerated for darwin/x86_64
git-svn-id: trunk@9181 -
2007-11-10 18:37:19 +00:00
peter
a0984505b2 * regenerated to fix fpc detection on non-i386
git-svn-id: trunk@8991 -
2007-10-29 16:34:18 +00:00
peter
324b1732ab * regenerated to update dependencies
git-svn-id: trunk@8988 -
2007-10-29 09:07:18 +00:00
michael
4e6cd59d8c * Patch by Sergei Gorelkin:
xmlread.pp:
  * As a step towards SAX-based validation, element content validator is
  rewritten from scratch, so it now accepts child elements one by
  one. This also enables reporting location of validation errors (however,
  most locations aren't reported correctly yet).
  * More straightforward handling of comments and PIs in internal subset.
  * Attribute text is handled separately from element text.
  * Unified handling of fatal and validation errors.

  xmlutils.pp:
  * Removed auto widechar->char conversions. These should have been a part
  of fix for #9528, but were not noticed at that moment.

  dom.pp:
  * Reworked 'ugly workarounds' in node removal code.
  + Element nodes remove themselves from document list of IDs, so no invalid pointers are left around.

  xmlts.pp:
  * Corrected validation diagnostics (display the first message and ingore subsequent ones).
  * Validation error alone in a not-well-formed case is a test failure.

git-svn-id: trunk@8896 -
2007-10-21 16:09:41 +00:00
joost
1cfdfe6c72 * Made THTMLWriter.StartElement and EndElement public instead of protected
git-svn-id: trunk@8571 -
2007-09-20 19:26:48 +00:00
michael
169b04a237 * Fixed issue #9528 with patch from Sergei Gorelkin
git-svn-id: trunk@8343 -
2007-08-31 13:25:47 +00:00
Jonas Maebe
cb744d37ff - reverted change for avoiding recompilation of units in subdirs,
it breaks other things

git-svn-id: trunk@8298 -
2007-08-22 08:16:10 +00:00
Jonas Maebe
30bc89cfe5 * fixed dependency checking for source files in subdirectories relative
to the makefile location + regenerated all Makefiles
  * hopefully fixed fpmkunit dependencies

git-svn-id: trunk@8297 -
2007-08-22 07:04:23 +00:00
joost
bb8ba21960 * THTML_Text can now produce text
git-svn-id: trunk@8029 -
2007-07-12 20:56:35 +00:00
Almindor
8fff7af149 * fix bug #9222 by Sergei Gorelkin
git-svn-id: trunk@8028 -
2007-07-12 19:50:38 +00:00
michael
8b9b6130d9 * Fixed equivalent of bug #8529
git-svn-id: trunk@6983 -
2007-03-24 21:44:00 +00:00
michael
0ec0f734bd * Patch to fix reset
git-svn-id: trunk@6982 -
2007-03-24 21:37:50 +00:00
Jonas Maebe
673d02c6b8 * re-added darwin/ppc64 support (please use up-to-date fpcmake)
git-svn-id: trunk@6973 -
2007-03-24 17:26:10 +00:00
mazen
57696aa274 * Build unixutil package for all Linux platforms instead of only Linux/i386.
git-svn-id: trunk@6972 -
2007-03-24 14:06:30 +00:00
Jonas Maebe
2b2b8c4f4f * regenerated to darwin/ppc64 (please use up-to-date fpcmake!)
git-svn-id: trunk@6900 -
2007-03-17 10:33:17 +00:00
michael
d7752d3c69 * added an improved but incompatible TXMLConfig from Sergei Gorelkin
git-svn-id: trunk@6897 -
2007-03-16 23:14:10 +00:00
Almindor
9aebd665a9 * fix for xmlconfig.getvalue from Sergei
git-svn-id: trunk@6875 -
2007-03-16 10:17:24 +00:00
Almindor
5ead448bac * patch from Sergei, fixes bug #8492
git-svn-id: trunk@6874 -
2007-03-15 19:26:07 +00:00
Jonas Maebe
4e5488529d * fixed class conversion and inheritance tree errors
git-svn-id: trunk@6871 -
2007-03-15 09:48:21 +00:00
Jonas Maebe
4ce43b9fe0 * fixed Makefile for linux-i386 (contained htmldefs twice for some reason,
regenerated)

git-svn-id: trunk@6845 -
2007-03-14 12:38:36 +00:00
Tomas Hajny
9024d66959 * units htmlelements and htmlwriter moved from fcl-web to fcl-xml
git-svn-id: trunk@6840 -
2007-03-14 00:13:22 +00:00
Tomas Hajny
821354b18f * unit htmldefs moved to fcl-xml
git-svn-id: trunk@6839 -
2007-03-13 23:39:15 +00:00
michael
64895f6b51 * Added template and README from Sergei Gorelkin
git-svn-id: trunk@6769 -
2007-03-10 13:34:59 +00:00
michael
645b0d2cb1 * Patch from Sergei Gorelkin
+ DTD validation
  + Correct reporting of the position of most fatal errors
  + TDOMDocument.CreateElement and others check their arguments for validity
    (INVALID_CHARACTER_ERR is reported where specification says)
  + property TDOMAttr.DataType
  + implemented TDOMDocument.GetElementByID
  * Common code moved to xmlutils.pp
  * whitespace in PublicID literals is normalized

git-svn-id: trunk@6749 -
2007-03-08 09:40:00 +00:00
Jonas Maebe
c13ff3729b * Merged 2.3 branch changes:
+ darwin/ppc64 support
    + val/str/read(ln)/write(ln) support for enums
    + simple cse at the node tree level
    + if-node simplify support
    + simple ssa support for memory locations
    + support for optional overflow/rangecheck boolean parameters for
      operators
    * a lot of unification of the ppc32/ppc64 code generators


........
r6380 | jonas | 2007-02-08 21:25:36 +0100 (Thu, 08 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ncgld.pas
   M /branches/fpc_2_3/compiler/tgobj.pas
   A /branches/fpc_2_3/tests/webtbs/tw8283.pp

  + support for replacing the memory location of a temp (including
    local variables) with that of another temp to avoid unnecessary
    copies (mantis #8283)

........
r6381 | jonas | 2007-02-08 22:53:36 +0100 (Thu, 08 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/nflw.pas
   A /branches/fpc_2_3/tests/webtbs/tw8282.pp

  + simplify support for ifn (based on patch by Florian)

........
r6386 | peter | 2007-02-09 13:48:53 +0100 (Fri, 09 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/htypechk.pas
   M /branches/fpc_2_3/compiler/ncal.pas
   M /branches/fpc_2_3/compiler/symconst.pas

  * overflow,rangecheck optional parameters for operators, patch from 8281

........
r6391 | jonas | 2007-02-09 23:52:13 +0100 (Fri, 09 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc/agppcgas.pas
   M /branches/fpc_2_3/compiler/powerpc64/cpunode.pas
   D /branches/fpc_2_3/compiler/powerpc64/nppcinl.pas
   M /branches/fpc_2_3/compiler/ppcgen/ngppcinl.pas

  * merged fsqrt(s) support to common powerpc unit, activate for ppc32
    if -Op970 is used (still default for ppc64, since default cpu there
    is already ppc970)

........
r6394 | jonas | 2007-02-10 18:58:47 +0100 (Sat, 10 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc/cgcpu.pas
   M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas
   M /branches/fpc_2_3/compiler/ppcgen/cgppc.pas

  * adapted a_jmp_name for darwin/ppc64
  * merged g_intf_wrapper for ppc32 and ppc64, and added darwin/ppc64
    support to it

........
r6396 | jonas | 2007-02-10 20:16:06 +0100 (Sat, 10 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/cgobj.pas

  + darwin/ppc64 support for g_indirect_sym_load

........
r6397 | jonas | 2007-02-10 20:22:49 +0100 (Sat, 10 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc/cgcpu.pas
   M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas
   M /branches/fpc_2_3/compiler/ppcgen/cgppc.pas

  + darwin/ppc64 support to ppc64's fixref
  * moved ppc32 a_load_store to cgppc and use it for darwin/ppc64 as
    well (its relocatable symbols are only 32 bits large)

........
r6399 | jonas | 2007-02-10 22:02:37 +0100 (Sat, 10 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems.pas

  + system_x86_64_darwin identifier
  + set default source system for system_x86_64_darwin and
    system_powerpc64_darwin

........
r6404 | jonas | 2007-02-10 23:01:23 +0100 (Sat, 10 Feb 2007) | 5 lines
Changed paths:
   M /branches/fpc_2_3/compiler/aasmdata.pas
   M /branches/fpc_2_3/compiler/aggas.pas
   M /branches/fpc_2_3/compiler/cgobj.pas
   M /branches/fpc_2_3/compiler/cgutils.pas
   M /branches/fpc_2_3/compiler/cresstr.pas
   M /branches/fpc_2_3/compiler/dbgdwarf.pas
   M /branches/fpc_2_3/compiler/dbgstabs.pas
   M /branches/fpc_2_3/compiler/ncgutil.pas
   M /branches/fpc_2_3/compiler/ogelf.pas
   M /branches/fpc_2_3/compiler/pdecvar.pas
   M /branches/fpc_2_3/compiler/pmodules.pas
   M /branches/fpc_2_3/compiler/symdef.pas
   M /branches/fpc_2_3/compiler/systems.pas

  + system_x86_64_darwin identifier
  + systems_darwin set which collects all darwin variants
  + added support for darwin/ppc64 and darwin/x86_64 where needed in
    the generic code

........
r6406 | jonas | 2007-02-10 23:24:32 +0100 (Sat, 10 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/cgobj.pas

  * ifdef cpu64 -> ifdef cpu64bit

........
r6409 | jonas | 2007-02-11 00:34:04 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/pdecvar.pas

  * fixed ppc64 compilation

........
r6413 | jonas | 2007-02-11 12:41:27 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/bsd/system.pp
   M /branches/fpc_2_3/rtl/darwin/powerpc/sig_cpu.inc
   M /branches/fpc_2_3/rtl/darwin/signal.inc

  + darwin/ppc64 support for signal routines

........
r6415 | jonas | 2007-02-11 13:54:53 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems/i_linux.pas

  * set abi of linux/ppc64 to abi_powerpc_sysv

........
r6416 | jonas | 2007-02-11 13:55:51 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc64/cputarg.pas
   M /branches/fpc_2_3/compiler/systems/i_bsd.pas
   M /branches/fpc_2_3/compiler/systems/t_bsd.pas

  + darwin/ppc64 source and target information

........
r6418 | jonas | 2007-02-11 14:19:55 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/powerpc64/math.inc

  * darwin/ppc64 compilation fixes

........
r6419 | jonas | 2007-02-11 14:22:22 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc/cgcpu.pas
   M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas
   M /branches/fpc_2_3/compiler/ppcgen/cgppc.pas

  * darwin/ppc64 needs the 32 bit version of a_loadaddr_ref_reg

........
r6420 | jonas | 2007-02-11 14:22:55 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/utils/fpcm/fpcmmain.pp

  + darwin/ppc64 support

........
r6426 | jonas | 2007-02-11 16:13:19 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc64/rappcgas.pas

  * fixed refaddr parsing for darwin/ppc64

........
r6427 | jonas | 2007-02-11 16:14:21 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc/agppcgas.pas
   M /branches/fpc_2_3/compiler/powerpc64/agppcgas.pas
   A /branches/fpc_2_3/compiler/ppcgen/agppcutl.pas

  * moved ppc32/ppc64 assembler writer helpers to a common unit

........
r6430 | jonas | 2007-02-11 17:53:23 +0100 (Sun, 11 Feb 2007) | 4 lines
Changed paths:
   D /branches/fpc_2_3/rtl/darwin/powerpc/sig_cpu.inc
   D /branches/fpc_2_3/rtl/darwin/powerpc/sighnd.inc
   A /branches/fpc_2_3/rtl/darwin/powerpc64
   A /branches/fpc_2_3/rtl/darwin/powerpc64/sig_cpu.inc
   A /branches/fpc_2_3/rtl/darwin/powerpc64/sighnd.inc
   A /branches/fpc_2_3/rtl/darwin/ppcgen
   A /branches/fpc_2_3/rtl/darwin/ppcgen/ppchnd.inc (from /branches/fpc_2_3/rtl/darwin/powerpc/sighnd.inc:6422)
   A /branches/fpc_2_3/rtl/darwin/ppcgen/sig_ppc.inc (from /branches/fpc_2_3/rtl/darwin/powerpc/sig_cpu.inc:6422)
   M /branches/fpc_2_3/rtl/darwin/signal.inc

  * fixed ppc/ppc64 signal include handling (both real files are in
    ppcgen, dummies in powerpc and powerpc64 which include those files)
    (1st step because pre-commit filter can't handle replaced files)

........
r6431 | jonas | 2007-02-11 17:53:47 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   A /branches/fpc_2_3/rtl/darwin/powerpc/sig_cpu.inc
   A /branches/fpc_2_3/rtl/darwin/powerpc/sighnd.inc

  * second step of signal include patch

........
r6432 | jonas | 2007-02-11 19:00:12 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems/t_bsd.pas

  * changed darwin checks to use systems_darwin constant

........
r6433 | jonas | 2007-02-11 19:05:38 +0100 (Sun, 11 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas

  * handle non-multiple-of-4 offsets with 64 bit loads/stores for
    darwin/ppc64

........
r6434 | jonas | 2007-02-11 19:05:56 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   D /branches/fpc_2_3/compiler/powerpc/agppcgas.pas
   D /branches/fpc_2_3/compiler/powerpc64/agppcgas.pas
   A /branches/fpc_2_3/compiler/ppcgen/agppcgas.pas (from /branches/fpc_2_3/compiler/ppcgen/agppcutl.pas:6427)
   D /branches/fpc_2_3/compiler/ppcgen/agppcutl.pas

  * completely merged ppc assembler writers

........
r6435 | jonas | 2007-02-11 19:06:40 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/darwin/console.pp
   M /branches/fpc_2_3/rtl/darwin/termiosproc.inc

  * fixed 64 bit compilation

........
r6436 | jonas | 2007-02-11 19:09:28 +0100 (Sun, 11 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/packages/extra/Makefile.fpc

  * universal interfaces aren't 64 bit ready yet -> only compile for
    darwin/ppc and darwin/i386

........
r6438 | jonas | 2007-02-11 19:22:34 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64
   A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64/ctest.o
   A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64/tcext3.o
   A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64/tcext4.o
   A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64/tcext5.o

  + compiled for darwin/ppc64

........
r6439 | jonas | 2007-02-11 20:24:42 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ppcgen/cgppc.pas

  * patch from Thomas to fix linux/ppc64

........
r6440 | jonas | 2007-02-11 20:25:15 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems.pas

  * fixed setting source OS for darwin/ppc64

........
r6444 | florian | 2007-02-11 22:24:20 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/globtype.pas
   M /branches/fpc_2_3/compiler/nopt.pas
   M /branches/fpc_2_3/compiler/nutils.pas
   M /branches/fpc_2_3/compiler/optcse.pas
   M /branches/fpc_2_3/compiler/psub.pas

+ first node cse implementation

........
r6445 | jonas | 2007-02-11 22:30:07 +0100 (Sun, 11 Feb 2007) | 6 lines
Changed paths:
   M /branches/fpc_2_3/compiler/cresstr.pas

  * hack to work around strange darwin/ppc64 linker bug: it seems to
    have problems if you put a global symbol at the end of a section
    without any data following (at least in case of the resource strings
    section) -> add dummy byte at the end for darwin/ppc64 (otherwise
    it messes up the address of the first symbol stub entry)

........
r6449 | jonas | 2007-02-11 23:23:44 +0100 (Sun, 11 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems/i_bsd.pas

  * cpupowerpc is defined for both ppc32 and ppc64 ->
    changed to cpupowerpc32 to avoid defining source
    wrongly on ppc64

........
r6450 | jonas | 2007-02-11 23:26:34 +0100 (Sun, 11 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ppcgen/ngppcset.pas

  * disable jump tables for darwin/ppc64 for now, don't work
    yet for some reason

........
r6451 | florian | 2007-02-11 23:54:37 +0100 (Sun, 11 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ncal.pas
   M /branches/fpc_2_3/compiler/nutils.pas
   M /branches/fpc_2_3/compiler/optcse.pas

* improved cse
* better complexity calculation for subscript nodes with classes or interfaces

........
r6456 | jonas | 2007-02-12 19:33:22 +0100 (Mon, 12 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/nutils.pas

  + support for notn,shln,shrn,equaln,unequaln,gtn,gten,ltn,lten in
    node_cplexity()
  * mark muln,divn,modn as more complex

........
r6469 | jonas | 2007-02-13 15:56:01 +0100 (Tue, 13 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/optcse.pas

  * fixed when cross-compiling a 64 bit compiler from a 32 bit platform

........
r6471 | jonas | 2007-02-13 16:17:16 +0100 (Tue, 13 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc64/cputarg.pas

  * include stabs support (can work on darwin/ppc64, but doesn't work
    yet)

........
r6473 | jonas | 2007-02-13 16:45:48 +0100 (Tue, 13 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas
   M /branches/fpc_2_3/compiler/powerpc64/cpupara.pas

  * R2 is a volatile and usable register under darwin/ppc64
  * R13 is a reserved non-volatile register under darwin/ppc64 (tls)

........
r6479 | jonas | 2007-02-13 20:40:50 +0100 (Tue, 13 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems/i_bsd.pas

  * maxCrecordalign seems to have to be 8 rather 4, in spite of what
    the ABI docs say (although they are contradictory to some extent)

........
r6487 | jonas | 2007-02-14 15:57:40 +0100 (Wed, 14 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/tests/webtbs/tw8153a.pp

  * fixed for darwin/ppc64

........
r6488 | jonas | 2007-02-14 15:58:56 +0100 (Wed, 14 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/tests/webtbs/tw7851a.pp

  * fixed for darwin/ppc64

........
r6494 | jonas | 2007-02-15 19:36:55 +0100 (Thu, 15 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems/i_bsd.pas

  * set default debug info for darwin/ppc64 to dwarf2 since
    it works better than stabs currently

........
r6500 | jonas | 2007-02-15 21:38:16 +0100 (Thu, 15 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/version.pas

  * updated version to 2.3.0

........
r6505 | jonas | 2007-02-15 22:39:28 +0100 (Thu, 15 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/version.pas

  * changed version to 2.3.1

........
r6511 | jonas | 2007-02-16 15:17:24 +0100 (Fri, 16 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc64/itcpugas.pas

  * system_powerpc_darwin -> system_powerpc64_darwin

........
r6546 | daniel | 2007-02-18 15:48:54 +0100 (Sun, 18 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ncginl.pas
   M /branches/fpc_2_3/compiler/ncgld.pas
   M /branches/fpc_2_3/compiler/ncgrtti.pas
   M /branches/fpc_2_3/compiler/ncnv.pas
   M /branches/fpc_2_3/compiler/ninl.pas
   M /branches/fpc_2_3/compiler/nld.pas
   M /branches/fpc_2_3/compiler/nutils.pas
   M /branches/fpc_2_3/compiler/pinline.pas
   M /branches/fpc_2_3/rtl/inc/astrings.inc
   M /branches/fpc_2_3/rtl/inc/compproc.inc
   M /branches/fpc_2_3/rtl/inc/sstrings.inc
   M /branches/fpc_2_3/rtl/inc/text.inc
   M /branches/fpc_2_3/rtl/inc/wstrings.inc

  + Val/str/read/write support for enumeration types.

........
r6547 | daniel | 2007-02-18 17:01:20 +0100 (Sun, 18 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/inc/sstrings.inc

  * Fix val code that I broke.

........
r6571 | daniel | 2007-02-20 09:27:44 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/inc/astrings.inc
   M /branches/fpc_2_3/rtl/inc/sstrings.inc
   M /branches/fpc_2_3/rtl/inc/text.inc
   M /branches/fpc_2_3/rtl/inc/wstrings.inc

  * o2s -> ord2str, s2o -> str2ord

........
r6572 | daniel | 2007-02-20 09:33:30 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ncgld.pas
   M /branches/fpc_2_3/compiler/ncgrtti.pas
   M /branches/fpc_2_3/compiler/ninl.pas
   M /branches/fpc_2_3/compiler/nld.pas

  * o2s -> ord2str, s2o -> str2ord

........
r6574 | daniel | 2007-02-20 12:07:58 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/inc/compproc.inc

  * o2s -> ord2str, s2o -> str2ord

........
r6578 | daniel | 2007-02-20 22:18:49 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/inc/text.inc

  * Change longint to valsint.

........
r6579 | daniel | 2007-02-20 22:29:09 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ninl.pas

  * Handle ordinal currency types.

........
r6580 | jonas | 2007-02-20 22:29:11 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ncgrtti.pas

  * fixed compilation for cpurequiresproperalignment

........
r6581 | jonas | 2007-02-20 22:30:21 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ninl.pas

  * fixed typo

........
r6582 | daniel | 2007-02-20 22:36:19 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ninl.pas

  * Set is_real to true.

........
r6590 | jonas | 2007-02-21 20:23:54 +0100 (Wed, 21 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems/i_bsd.pas

  * set tf_dwarf_only_local_labels for darwin/ppc64

git-svn-id: trunk@6720 -
2007-03-04 20:16:57 +00:00
peter
bc3a21e1a1 * split fcl into separate fcl-* packages
git-svn-id: trunk@6660 -
2007-02-25 22:19:19 +00:00
peter
5b8dd4c004 * move fcl sources to separate packages
git-svn-id: trunk@6655 -
2007-02-25 21:02:26 +00:00