summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-04-02Simplify plist_dict_merge() after plist_dict_set_item() API changeGravatar Nikias Bassen1-3/+0
2014-04-01xplist: Fix timezone-bound date/time conversionGravatar Nikias Bassen1-1/+4
2014-03-29Fix endian detection in configure.acGravatar Chow Loong Jin1-0/+4
On debian-mips, neither __LITTLE_ENDIAN__ nor __BIG_ENDIAN__ are defined anywhere, so PLIST_BYTE_ORDER defaults to PLIST_LITTLE_ENDIAN when it should really be PLIST_BIG_ENDIAN on this architecture. This fixes issue #13.
2014-03-28build-sys: Fix parallel buildGravatar Christophe Fergeau1-1/+1
On my machine, parallel builds fail with: make[2]: Entering directory `/home/teuf/hack/libplist/src' CCLD libplist.la make[2]: *** No rule to make target `../src/libplist.la', needed by `libplist++.la'. Stop. If $(top_builddir)/src/libplist.la does not exist yet when trying to link libplist++.la, automake/make will not realize the $(top_builddir)/src/libplist.la dependency is the same as the libplist.la target, and will thus be unable to generate $(top_builddir)/src/libplist.la. Using the libplist.la instead fixes this issue. I've checked that srcdir!=builddir and make distcheck still pass after this change.
2014-03-19deprecated plist_dict_insert_item in favor of plist_dict_set_itemGravatar Nikias Bassen2-8/+8
2014-03-19plist_dict_set_item: insert key/value pair if key not already presentGravatar Nikias Bassen1-10/+11
2014-02-13Replace some LDADD references to use $(top_builddir) for distcheckGravatar Martin Szulecki1-1/+1
2014-02-13fix make distcheckGravatar Nikias Bassen1-3/+3
2014-02-06bplist: prevent segmentation fault in plist_from_bin()Gravatar Nikias Bassen1-0/+3
2013-12-13bplist: make plist_utf8_to_utf16 static since it is only used internallyGravatar Nikias Bassen1-1/+1
2013-12-13xplist: fix another compiler warning with castGravatar Nikias Bassen1-1/+1
2013-12-13bytearray: silence compiler warning about pointer arithmetic with castGravatar Nikias Bassen1-1/+1
2013-12-13base64: silence compiler warning by using correct typeGravatar Nikias Bassen1-1/+2
2013-12-13xplist: silence compiler warningGravatar Nikias Bassen1-1/+1
2013-12-13xplist: fix shadowed variable declarationGravatar Nikias Bassen1-3/+3
2013-12-13change build system to autotoolsGravatar Nikias Bassen2-59/+47
2013-12-13add new plist_dict_merge() functionGravatar Nikias Bassen1-0/+27
2013-11-12base64: get rid of strtok_r and use strspn+strcspn insteadGravatar Nikias Bassen1-13/+14
strtok_r is not available on win32 and the designated strtok_s function is reported to not work on windows xp. Hence we use an easier an non-destructive implementation with strspn and strcspn to strip out the whitespace.
2013-11-12base64: fix compilation with win32Gravatar Nikias Bassen1-0/+4
this is a temporary fix, we'll replace strtok_r with a custom implementation soon.
2013-10-29fixed mavericks compile problem, return iterator of _map.end() instead of ↵Gravatar Jim Koning1-1/+1
iterator of NULL
2013-10-17UTF-16 surrogate pair fixGravatar shane1-4/+37
Handle UTF-16 surrogate pair conversion to/from UTF-8
2013-10-09base64: use strtok_r instead of strtok to make sure we're thread safeGravatar Nikias Bassen1-2/+3
2013-05-30bplist: use __FLOAT_WORD_ORDER__ instead of __VFP_FP__ for floating point ↵Gravatar Nikias Bassen1-1/+4
endianness detection
2013-03-19C++: added support for PLIST_UID nodes (class Uid)Gravatar Nikias Bassen3-0/+81
2013-03-07xml plists: make sure we don't produce <data/> if it's emptyGravatar Nikias Bassen1-0/+9
2012-11-13C++ bindings: added support for PLIST_KEY nodes.Gravatar Nikias Bassen3-1/+84
2012-11-08Fix crash when converting plists containing commentsGravatar Nikias Bassen1-0/+4
Thanks to free2000fly for pointing this out. The issue was that XML plists with comments converted to binary plists would result in invalid binary nodes, thus converting back these binary plists resulted in a crash.
2012-09-16plist_data_compare: for PLIST_DATA, compare length before accessing dataGravatar Nicolás Alvarez1-0/+2
2012-09-16xplist: set DST to not available in parse_date()Gravatar Nikias Bassen1-0/+1
2012-09-16implemented handling of UID keyed encoding typeGravatar Nikias Bassen3-2/+140
2012-04-24fix plist_dict_set_item() and plist_array_set_item()Gravatar Nikias Bassen1-9/+17
2012-02-12set PLIST_BYTE_ORDER if required and compiler provides itGravatar Nikias Bassen1-0/+9
2012-02-11bplist: fix invalid memory access in copy_plist_dataGravatar Nikias Bassen1-4/+4
2012-01-12fix compiler warningsGravatar Nikias Bassen4-13/+4
2011-09-26move cmake endianess detection to proper place and actually USE itGravatar Nikias Bassen1-0/+1
2011-09-11Win32: do not use visibility attributeGravatar Nikias Bassen1-1/+1
2011-06-01Fix base64 encodingGravatar Nikias Bassen1-8/+6
2011-05-29Use simple sscanf for parsing dates if strptime is not availableGravatar Nikias Bassen1-2/+15
2011-05-29use signed char instead of int8_tGravatar Nikias Bassen1-1/+1
2011-05-29Use malloc+snprintf instead of asprintfGravatar Nikias Bassen1-2/+4
2011-05-29user CMAKE_C_OUTPUT_EXTENSION instead of .oGravatar Nikias Bassen1-5/+5
2011-05-28define be16toh, be32toh, be64toh if not availableGravatar Nikias Bassen1-0/+34
2011-05-28Add missing includeGravatar Nikias Bassen1-0/+1
2011-05-27Make libplist glib freeGravatar Nikias Bassen14-204/+866
2011-03-16Plugging memory leak in write_unicodeGravatar Christophe Fergeau1-0/+1
2011-02-12Make sure install_name_tool on OSX picks up library install pathGravatar Martin Szulecki1-0/+6
This allows dylib to correctly find the library and fixes linking on OSX.
2011-02-12Fix Dictionary copy constructorGravatar Christophe Fergeau1-1/+1
While iterating over all the keys stored in the source Dictionary to copy them to create the copied Dictonary, the name of the key being copied was only set to a non-NULL value for the first key we copy. This was then leading to an assertion when trying to create a std::string from a NULL pointer. Simple test-case: int main() { PList::Dictionary a; PList::String b("Hello"); PList::String c("Hi!"); PList::Dictionary d; a.Insert("Key", &b); a.Insert("Another Key", &c); std::cout << a.ToXml() << std::endl; d.Insert("dictionary", &a); //CRAAAAAAAAASH! std::cout << d.ToXml() << std::endl; return 0; } /* Output: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Key</key> <string>Hello</string> <key>Another Key</key> <string>Hi!</string> </dict> </plist> terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct NULL not valid */ Signed-off-by: Martin Szulecki <opensuse@sukimashita.com>
2010-08-23Fixes the xml export.Gravatar Dogbert1-2/+2
Apple's activation server refuses XML tickets when this patch isn't applied.
2010-07-29Fix unicode binary writing.Gravatar Jonathan Beck1-7/+23
2010-04-18Endianness, alignment and type-punning fixes for binary plist supportGravatar Julien BLACHE1-13/+63
- endianness issues: on big endian machines, writing out only part of an integer was broken (get_needed_bytes(x) < sizeof(x)) -> shift integer before memcpy() on big endian machines - alignment issues: unaligned reads when loading binary plist. Leads to slow runtime performance (kernel trapping and fixing things up), SIGBUS (kernel not helping us out) -> introduce get_unaligned() and have the compiler generate the code needed for the unaligned access (note that there remains unaligned accesses that I haven't been able to track down - I've seen 2 of them with test #2) - type-punning issues: breaking strict aliasing rules can lead to unexpected results as the compiler takes full advantage of the aliasing while optimizing -> introduce the plist_uint_ptr union instead of casting pointers Tested on amd64, alpha and hppa.