Commit Graph

369 Commits

Author SHA1 Message Date
Max Kellermann c19292c036 Util/StringUtil: use std::copy_n() 2015-03-02 22:35:59 +01:00
Max Kellermann 64b9e7fd48 util/DynamicFifoBuffer: adjust include guard 2015-02-16 00:53:59 +01:00
Max Kellermann ae7e1a22cb Merge branch 'v0.19.x' 2015-01-26 20:57:29 +01:00
PHO 023b9c1e7e Test the existence of strndup(3) before using it.
This can eliminate the ad-hoc "#ifdef WIN32" and can also support other platforms lacking it as well (including Darwin 9).
2015-01-26 20:39:49 +01:00
Max Kellermann 6725c2afa1 util/format: allow upper case, digits and underscore in names 2015-01-22 18:59:42 +01:00
Max Kellermann e9d4b73cc3 util/format: move code to is_name_char() 2015-01-22 18:59:01 +01:00
Max Kellermann 91a12f76cd util/CharUtil: minor API documentation fix 2015-01-15 19:34:02 +01:00
Max Kellermann e8debd2e45 output/recorder: dynamic file name 2015-01-14 22:03:26 +01:00
Max Kellermann 712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann 412bedb697 Merge branch 'v0.19.x' 2014-12-26 14:40:32 +01:00
Max Kellermann 940cab8620 Merge branch 'v0.18.x' into v0.19.x 2014-12-26 14:28:52 +01:00
Max Kellermann 53f4044890 util/{ASCII,UriUtil}, ...: work around -Wtautological-pointer-compare
New in clang 3.6.
2014-12-26 13:43:32 +01:00
Max Kellermann 705b3c6b63 util/ASCII: fix indent 2014-12-26 13:37:38 +01:00
Max Kellermann 0964b06240 Compiler.h: add macro GCC_OLDER_THAN() 2014-12-26 13:30:44 +01:00
Max Kellermann 8400da9934 Merge tag 'v0.19.7' 2014-12-17 19:27:59 +01:00
Max Kellermann 81f17d10c8 util/HugeAllocator: enable MEM_COMMIT on Windows
Without MEM_COMMIT, the reserved address space is not accessible, and
MPD crashes.
2014-12-17 19:10:58 +01:00
Max Kellermann 2fec463542 util/HugeAllocator: disable MEM_LARGE_PAGES on Windows
MEM_LARGE_PAGES does not appear to work.  Instead, MEM_RESERVE appears
to be necessary.  Until I figure this out, this large pages are
disabled.
2014-12-12 13:20:58 +01:00
Max Kellermann 4741d7bfe2 Merge branch 'v0.19.x' 2014-12-12 13:14:29 +01:00
Max Kellermann dbbcbc3616 Util/Manual: cast via void* to avoid alignment warnings 2014-12-09 23:10:05 +01:00
Max Kellermann 1889150013 Util/Manual: use Get() in Destruct() 2014-12-09 23:08:53 +01:00
Max Kellermann 14f9cdde6b Util/Manual: add assertion to Get() 2014-12-09 23:08:22 +01:00
Max Kellermann 3ab0691eec Util/Manual: add method Get()
May be more clear than operators.
2014-12-09 23:07:43 +01:00
Max Kellermann 1e073a196f util/Manual: use gcc_alignas() 2014-12-09 23:05:47 +01:00
Max Kellermann ad4e597f74 util/Error: use FormatMessage() instead of g_win32_error_message() 2014-12-05 00:10:44 +01:00
Max Kellermann 4b70f9d213 util/DivideString: add option "strip" 2014-12-04 23:05:44 +01:00
Max Kellermann 4e2f4e2091 util/StringUtil: add ToUpperASCII()
Replaces g_ascii_strup() and allows building the Vorbis encoder
without GLib.
2014-12-04 17:43:01 +01:00
Max Kellermann e69bef3ce3 util/SplitString: new utility class
Replaces GLib's g_strsplit().
2014-12-04 09:14:28 +01:00
Max Kellermann 050f0c3d8f util/SplitString: rename to DivideString 2014-12-03 21:38:06 +01:00
Max Kellermann 849b0563ce util/Alloc: add fallback for gcc 4.6 2014-11-28 19:44:32 +01:00
Max Kellermann d93172bee8 Compiler.h: add macro CLANG_OR_GCC_VERSION() 2014-11-28 19:09:56 +01:00
Max Kellermann 25429af122 Compiler.h: add macro GCC_OLDER_THAN() 2014-11-28 19:09:52 +01:00
Max Kellermann b19d3629b9 util/Manual: use GCC_CHECK_VERSION 2014-11-28 19:00:26 +01:00
Max Kellermann 84c519df09 util/Alloc: remove bogus "unused" attribute 2014-11-27 18:21:50 +01:00
Max Kellermann 303d67aed2 Merge tag 'v0.19.2' 2014-11-02 14:06:05 +01:00
Max Kellermann 674091424e util/UriUtil: add uri_get_suffix() overload that ignores query string 2014-11-02 11:53:31 +01:00
Max Kellermann eab32f2e5d util/UriUtil: add uri_get_suffix() overload that ignores query string 2014-11-01 12:45:47 +01:00
Max Kellermann 1178f2c1ab Util/Alloc: add xstrcatdup(), replacing g_strconcat() 2014-10-25 01:24:10 +02:00
Max Kellermann 063d369672 util/StaticFifoBuffer: make Shift() public 2014-10-19 00:49:08 +02:00
Max Kellermann 8ed4124184 util/DynamicFifoBuffer: make the "Range" type public
Export it from the protected base class.  This fixes a build failure
on Mac OS X.
2014-10-11 20:28:08 +02:00
Max Kellermann 464767c5fd db/upnp/Util: move caturl() to util/UriUtil.cxx 2014-10-10 22:43:40 +02:00
Max Kellermann b70bf938c2 util/UTF8: add SequenceLengthUTF8() 2014-10-10 22:11:38 +02:00
Max Kellermann d5cf41e043 util/UTF8: new library 2014-10-10 22:11:38 +02:00
Max Kellermann a9f6556454 Merge branch 'v0.18.x' 2014-08-16 08:25:10 +02:00
François Revol 40280fa6cf util: Fix header for strcasecmp
According to POSIX and both OSX and Linux manpages,
strcasecmp comes from strings.h, not string.h.

Most OSes also have them available in string.h,
but we just fixed the headers on Haiku and it now
only provides them in strings.h.

We might want to fall back to string.h for other
OSes though...

cf.
http://pubs.opengroup.org/onlinepubs/009695399/functions/strcasecmp.html
http://linux.die.net/man/3/strcasecmp
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/strcasecmp.3.html
2014-08-16 06:51:13 +02:00
Max Kellermann c597538b40 util/HugeAllocator: implement on Windows 2014-08-11 23:06:45 +02:00
Max Kellermann 2ccfb71d12 util/CharUtil: add ToLowerASCII() 2014-08-11 18:42:05 +02:00
Max Kellermann 5ac2a69940 input/TextInputStream: move ReadBufferedLine() to util/TextFile.hxx 2014-08-07 19:38:25 +02:00
Max Kellermann e88dd9b08b util/DynamicFifoBuffer: make GetCapacity() and Clear() public 2014-08-07 19:21:09 +02:00
Max Kellermann 67958f7fa7 util/{Static,Foreign}FifoBuffer: lazy shift
Reduce the number of unnecessary memmove() calls.
2014-08-07 16:11:00 +02:00
Max Kellermann ab9c527274 util/StaticFifoBuffer: fix indent 2014-08-07 16:08:55 +02:00