Commit Graph

376 Commits

Author SHA1 Message Date
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
Max Kellermann 59d38f876a util/StringUtil: add StripRight() overload with "end" argument 2014-08-07 16:08:02 +02:00
Max Kellermann 74aafe6a10 util/StringUtil: use IsWhitespaceOrNull() in StripRight()
The null byte is whitespace, too.
2014-08-07 16:08:02 +02:00
Max Kellermann f860a2fbd6 util/StringUtil: move code to StripRight() 2014-08-07 16:08:02 +02:00
Max Kellermann 87bcf739ee util/StringUtil: rename strchug_fast() to StripLeft() 2014-08-07 16:08:02 +02:00
Max Kellermann db6db51742 util/CharUtil: add IsWhitespaceFast() 2014-08-07 16:08:02 +02:00
Max Kellermann 981be7956b util/CharUtil: make IsWhitespace*() "constexpr" 2014-08-07 16:08:02 +02:00
Max Kellermann 8c10aa575c util/CharUtil: fix indent 2014-08-07 16:08:02 +02:00
Max Kellermann cf16d81fa4 util/ForeignFifoBuffer: add method Swap() 2014-08-07 09:02:24 +02:00
Max Kellermann 2beb763b4f util/ForeignFifoBuffer: add method MoveFrom() 2014-08-07 08:53:02 +02:00
Max Kellermann 08fee9a284 util/ForeignFifoBuffer: add method GetAvailable() 2014-08-06 22:55:59 +02:00
Max Kellermann f89da17827 util/DynamicFifoBuffer: move code to new base class ForeignFifoBuffer 2014-08-06 17:39:07 +02:00
Max Kellermann ea26da0be7 util/FifoBuffer: rename to StaticFifoBuffer 2014-08-06 17:29:05 +02:00
Max Kellermann c8858f85d8 util/Error: add method FormatLastError() 2014-07-30 22:10:31 +02:00
Max Kellermann d1bc46ffad util/Error: add SetLastError() overload with "DWORD code" parameter 2014-07-30 22:08:26 +02:00
Max Kellermann 32e5848f34 util/Error: add "printf" attributes 2014-07-30 22:02:46 +02:00
Max Kellermann f9e63dfd65 util/DynamicFifoBuffer: fix typo in API documentation 2014-07-30 20:53:09 +02:00
Max Kellermann d8558a3af3 util/Cast: add "const" overload 2014-07-14 17:08:57 +02:00
Max Kellermann 72eedb1c98 util/Cast: add missing include 2014-07-14 17:08:41 +02:00
Max Kellermann 3c5cf9500d util/Cast: fix indent 2014-07-14 16:44:43 +02:00
Max Kellermann 7a1f3177c9 util/Cast: reimplement as template without macro 2014-07-14 16:24:07 +02:00
Max Kellermann f8da8b0261 util/Cast: add const overloads 2014-07-14 16:02:02 +02:00
Max Kellermann 393cb7fd7d util/Cast: suppress "unused function" warning by using "inline" 2014-07-14 15:58:12 +02:00
Max Kellermann e74e1256d4 util/Cast: fix indent 2014-07-14 15:57:48 +02:00
Max Kellermann 211aea1441 util/ConstBuffer: add method skip_front() 2014-06-26 22:25:03 +02:00
Max Kellermann 74a46788cd util/ConstBuffer: wrap assert() in NDEBUG check
Fixes build failure because assert.h was not included.
2014-06-26 13:31:48 +02:00
Max Kellermann 7213c26798 util/ConstBuffer: add method Contains() 2014-06-23 22:30:01 +02:00
Max Kellermann 3ca0a39a35 db/simple: use class boost::intrusive::list
Remove the C list_head library and use type-safe C++ instead.
2014-06-16 18:39:16 +02:00
Max Kellermann 7fb9bebd46 util/{Const,Writable}Buffer: add front(), back(), pop_{front,back}(), shift() 2014-04-24 09:50:19 +02:00
Max Kellermann 3b8a9dd6ec util/{Const,Writable}Buffer: add typedef reference_type 2014-04-24 09:47:59 +02:00
Max Kellermann a68acf5c66 util/ConstBuffer: add FromVoid(), ToVoid() to "void" specialization
Provide the full API.
2014-03-18 12:09:17 +01:00
Max Kellermann 328860c8ba util/CircularBuffer: add method GetSpace() 2014-03-16 00:28:42 +01:00
Max Kellermann 89ac111853 util/CircularBuffer: add method GetSize() 2014-03-16 00:27:18 +01:00
Max Kellermann 3d4f588a7f util/CircularBuffer: rename GetSize() to GetCapacity() 2014-03-15 23:12:20 +01:00
Max Kellermann f660d30138 util/CircularBuffer: new buffer class 2014-03-15 18:35:52 +01:00
Max Kellermann 1e06c66c77 java: new helper library for the Android port 2014-03-01 18:48:20 +01:00
Max Kellermann 4ba7427fa0 util/{Const,Writable}Buffer: add operator[] 2014-03-01 07:49:13 +01:00
Max Kellermann 9dc5335e3e util/{Const,Writable}Buffer: add template specialization for "void"
Omit a few methods that are not applicable.
2014-03-01 07:37:58 +01:00
Max Kellermann d333de1980 util/ConstBuffer: remove cast operator ConstBuffer<void>
This was bugged, because it did not scale the "size".
2014-03-01 07:37:20 +01:00
Max Kellermann 6ba1fe7568 UriUtil: support ftp:// URLs in uri_remove_auth() 2014-02-24 19:59:53 +01:00
Max Kellermann fb5fbb8088 util/Tokenizer: relicense to BSD-2 2014-02-19 10:41:48 +01:00
Max Kellermann 2b21312b36 util/StringUtil: add StringEndsWith()
Replaces g_str_has_suffix().
2014-02-18 09:18:42 +01:00
Max Kellermann 579e48edbb util/StringUtil: add function Strip()
Replaces g_strstrip().
2014-02-17 22:37:43 +01:00
Max Kellermann d05ae4b444 util/HugeAllocator: relicense to BSD-2 2014-02-10 13:32:50 +01:00